@dcl/shop 0.10.1-31029565525.commit-8eeaa8f → 0.10.1-31032606668.commit-30914a5
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-BnUTRccC.js → Activity-CBQ0_5Gp.js} +3 -3
- package/_assets/{AnimatedBackground-CFxGJrvr.js → AnimatedBackground-DzU3vjuD.js} +1 -1
- package/_assets/{Assets-DKArlsdV.js → Assets-Bm8xT-wK.js} +48 -48
- package/_assets/{Assets.styles-Crxo5ZgZ.js → Assets.styles-D_DUFdKV.js} +56 -56
- package/_assets/{Authorizations-BVsBhVRE.js → Authorizations-YCl9mcd9.js} +1 -1
- package/_assets/{Cart-DGWIQa7u.js → Cart-BRPkkQw3.js} +13 -13
- package/_assets/{CircularProgress-C2EMA-WY.js → CircularProgress-BvMoYOvy.js} +1 -1
- package/_assets/Collection-D7bUo9dI.js +162 -0
- package/_assets/{CollectionCarousel-BfWdU9TS.js → CollectionCarousel-Bs4fBuN6.js} +18 -18
- package/_assets/{Confetti-2clep845.js → Confetti-Bf7aP0NE.js} +1 -1
- package/_assets/Creator-DctbYEDT.js +306 -0
- package/_assets/{ErrorNotice-DuUZx_7m.js → ErrorNotice-BU7FyT1W.js} +1 -1
- package/_assets/{ExchangeController-d78CG8uk.js → ExchangeController-D7v6FLdb.js} +1 -1
- package/_assets/{Faq-CD5Cn1w0.js → Faq-DBZpkL9P.js} +1 -1
- package/_assets/{GetCredits-DByVocxz.js → GetCredits-DEsgS54C.js} +14 -14
- package/_assets/{Grow-pVAVq4p8.js → Grow-GSOfEN2l.js} +1 -1
- package/_assets/{HelpersUtil-OmexlG_i.js → HelpersUtil-CkBhbL_r.js} +1 -1
- package/_assets/{ItemDetail-BB7--DmF.js → ItemDetail-B3yupLtb.js} +209 -209
- package/_assets/LazyEmoteControls-DLcKgwgu.js +2 -0
- package/_assets/{LoadMore-Bka3px9r.js → LoadMore-i3u3Pyt6.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-05aOeHWK.js → ManaPricingBanner.styles-C18BesFl.js} +1 -1
- package/_assets/MyAssets-C-lv91w7.js +381 -0
- package/_assets/{MyFavorites-CdmRx3i0.js → MyFavorites-U-UxHb-o.js} +2 -2
- package/_assets/{NotFound-Cv_WsqDu.js → NotFound-DkcTAlkz.js} +1 -1
- package/_assets/{NotificationsBell-B_4w5VLE.js → NotificationsBell-DDCAY3l-.js} +1 -1
- package/_assets/{OutfitDetail-BlE4dNxL.js → OutfitDetail-BFmRzzjx.js} +4 -4
- package/_assets/{OutfitPreview-BjiO0VsO.js → OutfitPreview-DPS3H3_3.js} +2 -2
- package/_assets/{OutfitStudio-D9LQ_WGt.js → OutfitStudio-CrgVuCXP.js} +59 -59
- package/_assets/{StoreSettings-DpevQbL3.js → StoreSettings-BLndphwX.js} +43 -43
- package/_assets/Success-BY9OhkKm.js +280 -0
- package/_assets/{SwapController-BCq8cczu.js → SwapController-DXYjEOyv.js} +1 -1
- package/_assets/{Tooltip-BSg8PAuJ.js → Tooltip-BajbwTea.js} +1 -1
- package/_assets/{TradeService-DnRblc5X.js → TradeService-Cv02JkEQ.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BkgMeT5j.js → W3MFrameProviderSingleton-A5mBxhYF.js} +3 -3
- package/_assets/{WebCryptoP256-5hLL6y4k.js → WebCryptoP256-CnQALEMv.js} +1 -1
- package/_assets/{authorizations-BZabD414.js → authorizations-Xqbnmu9x.js} +1 -1
- package/_assets/{basic-CID-Qs3b.js → basic-CvPWviGS.js} +1 -1
- package/_assets/{biconomy-BWK8rG_e.js → biconomy-glo4y4ek.js} +1 -1
- package/_assets/{builder-C0HXHDnK.js → builder-BqnhdDxo.js} +1 -1
- package/_assets/{buy-DMMwBXQK.js → buy-Cq5r6s_d.js} +1 -1
- package/_assets/{buy-gasless-DkT1GvmP.js → buy-gasless-CaSmt8Rn.js} +1 -1
- package/_assets/{categories-LpPpJwMX.js → categories-Cc9LF1R4.js} +44 -50
- package/_assets/{ccip-CmVA7LRy.js → ccip-DtPCxwhK.js} +1 -1
- package/_assets/{ccip-CTHaF-0F.js → ccip-HLzoBWhd.js} +1 -1
- package/_assets/{collectionPage.styles-C0OU97Vl.js → collectionPage.styles-rLItNGdu.js} +2 -2
- package/_assets/{controller-BSCAkC53.js → controller-DLVCl98j.js} +2 -2
- package/_assets/{core-BY58gAaC.js → core-BoCM39Dc.js} +4 -4
- package/_assets/{createSvgIcon-Co2I3KNE.js → createSvgIcon-CF6VIRxG.js} +1 -1
- package/_assets/{custom-BFUJnR6C.js → custom-BQJpm4NP.js} +1 -1
- package/_assets/{data-capture-BcT9TYL5.js → data-capture-CPxjWW7W.js} +1 -1
- package/_assets/{email-zKJhfKOQ.js → email-DglJsBXd.js} +1 -1
- package/_assets/{embedded-wallet-DZzfkRu7.js → embedded-wallet-CRWhciW5.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-dvplhB66.js → emotion-styled.browser.esm-BATaYRNB.js} +1 -1
- package/_assets/{engine-B3Mf1brx.js → engine-CRPW7FqE.js} +1 -1
- package/_assets/{errors-BGVCQOMz.js → errors-D4C9kv7B.js} +1 -1
- package/_assets/{estimate-l1-fee-DMFrbofF.js → estimate-l1-fee-aOXZ8ihZ.js} +1 -1
- package/_assets/{execute-DCGV6tDo.js → execute-k2RZ2hTw.js} +2 -2
- package/_assets/{features-DqHFEBDx.js → features-BmdkdPP-.js} +1 -1
- package/_assets/{fetchTokenMetadata-D6K4KP_4.js → fetchTokenMetadata-Bmcczr66.js} +2 -2
- package/_assets/{field.styles-DcKQ_iNz.js → field.styles-DQVBZTuq.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-D6HzrmoJ.js → get-ecosystem-wallet-info-BbJRcc1t.js} +1 -1
- package/_assets/{getBalance-LGdYuyxa.js → getBalance-DC-t3UhM.js} +1 -1
- package/_assets/{getNFT-Cw0O3Ml9.js → getNFT-BlzNSmnK.js} +1 -1
- package/_assets/{getNFT-CuZyZceA.js → getNFT-DwruUWap.js} +1 -1
- package/_assets/{grid.styles-BoDTH9-L.js → grid.styles-2-Lphh1_.js} +1 -1
- package/_assets/{hashTypedData-CM__DDH2.js → hashTypedData-BLMgL5Vz.js} +1 -1
- package/_assets/{hashTypedData-qqC1Tbni.js → hashTypedData-D6ew3JpS.js} +1 -1
- package/_assets/{in-app-BwohLVFE.js → in-app-BRl8aLUS.js} +1 -1
- package/_assets/{in-app-wallet-calls-DkQZMb0p.js → in-app-wallet-calls-Cf8UnG06.js} +1 -1
- package/_assets/{index-D8uSGtoz.js → index-B2N5oNn8.js} +1 -1
- package/_assets/{index-DplFHsVz.js → index-BBOn5orP.js} +1 -1
- package/_assets/{index-CRUz-lFa.js → index-BD25cQD4.js} +1 -1
- package/_assets/{index-C4OULSnf.js → index-BDzGigH2.js} +1 -1
- package/_assets/{index-txSbIXUX.js → index-BISFLA3c.js} +1 -1
- package/_assets/{index-DY-CJBBw.js → index-BJovGEvB.js} +1 -1
- package/_assets/{index-CwEAusBk.js → index-BKj0f9wi.js} +1 -1
- package/_assets/{index-BeHXNx4l.js → index-BTkQgQDi.js} +1 -1
- package/_assets/{index-BHs8Nm1v.js → index-BXzvQW0o.js} +1 -1
- package/_assets/{index-jQ98hJsI.js → index-BZL5qpA4.js} +2 -2
- package/_assets/{index-BOCGS4MY.js → index-B_PIYV8c.js} +2 -2
- package/_assets/{index-BDKp6O92.js → index-BelRIVeb.js} +1 -1
- package/_assets/{index-BSioXpnp.js → index-BkspOCIc.js} +1 -1
- package/_assets/{index-unjRyi-x.js → index-Bq_9XM9n.js} +1 -1
- package/_assets/{index-CVEw6hKC.js → index-C-WOsJGb.js} +1 -1
- package/_assets/{index-CvJmHkgv.js → index-C0tIouBf.js} +3 -3
- package/_assets/{index-DVP9mmy0.js → index-C6G5Ojpz.js} +1 -1
- package/_assets/{index-MhPhsWP8.js → index-C7hGN0lI.js} +1 -1
- package/_assets/{index-CFjdvXcL.js → index-CBe4gtAt.js} +2 -2
- package/_assets/{index-DOmua37r.js → index-CFypPkBr.js} +1 -1
- package/_assets/{index-dguKxdA7.js → index-CHb52k2r.js} +2 -2
- package/_assets/{index-DnafkRIs.js → index-CN8WHGrH.js} +1 -1
- package/_assets/{index-CDV3IoQm.js → index-COY9dHV9.js} +1 -1
- package/_assets/{index-DqogjYMl.js → index-CPTPmsi2.js} +1 -1
- package/_assets/{index-CM4gYpZ8.js → index-CPhcLOEq.js} +1 -1
- package/_assets/{index-Dg22Nieo.js → index-Ch87wzNg.js} +1 -1
- package/_assets/index-CqRUWZDq.js +1 -0
- package/_assets/{index-Dij6LJf6.js → index-CuSvjeNM.js} +1 -1
- package/_assets/{index-BLKe1fxG.js → index-CwFxxSc1.js} +299 -299
- package/_assets/{index-CRd1XuYs.js → index-CwKi0BcO.js} +1 -1
- package/_assets/{index-B9zvMdI0.js → index-CxTgEmAp.js} +1 -1
- package/_assets/{index-BPqobsB6.js → index-CyQd3Dif.js} +1 -1
- package/_assets/{index-BRZA_fuK.js → index-D7TrWXvV.js} +1 -1
- package/_assets/{index-BSFFapHO.js → index-DCZ36akI.js} +1 -1
- package/_assets/{index-CCenxE7k.js → index-DFNARVN7.js} +1 -1
- package/_assets/{index-Bo-edPJM.js → index-DGXzZsJb.js} +1 -1
- package/_assets/{index-CSHbp-r-.js → index-DKKo0LoX.js} +11 -11
- package/_assets/{index-MuXfi5UE.js → index-DOGInGKk.js} +1 -1
- package/_assets/{index-BsgL3ujL.js → index-DQ1Y3Whz.js} +1 -1
- package/_assets/{index-BzVWz4Tj.js → index-DRKYu1B3.js} +1 -1
- package/_assets/{index-DlhJ9Qox.js → index-DRyHPso7.js} +1 -1
- package/_assets/{index-UR9Qpju9.js → index-DSJJjIyM.js} +3 -3
- package/_assets/{index-B-2CvxPO.js → index-DSQSVjLs.js} +1 -1
- package/_assets/{index-CVIbA-VT.js → index-DdL-MVH6.js} +1 -1
- package/_assets/{index-CTenZZ8l.js → index-DgkGEui6.js} +1 -1
- package/_assets/{index-LP5Of-SX.js → index-Sn4izkWE.js} +1 -1
- package/_assets/index-UdM3HuhV.js +1 -0
- package/_assets/{index-CWhL4zBo.js → index-e3mxlGeM.js} +1 -1
- package/_assets/{index-Bo5HGYUE.js → index-fRwny2zx.js} +1 -1
- package/_assets/{index-0DS7nWrl.js → index-fvtPPVdt.js} +1 -1
- package/_assets/{index-ShFdgjrK.js → index-j8jUDLYS.js} +1 -1
- package/_assets/{index-BBrm4kwZ.js → index-rj2Zyfmj.js} +3 -3
- package/_assets/{index.es-WFmF4El-.js → index.es-C7evsiQb.js} +4 -4
- package/_assets/{index.es-CM1g4yN5.js → index.es-DF_rXR3Q.js} +1 -1
- package/_assets/{index.es-C61rbBYw.js → index.es-DYP1_xK_.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DGjQ1weV.js → localBatchGatewayRequest-BXykDIjc.js} +1 -1
- package/_assets/{networks-C1UzX1Sm.js → networks-DKlZyT-L.js} +1 -1
- package/_assets/{onramp-Fd2Cj3wL.js → onramp-ByQtA-xO.js} +1 -1
- package/_assets/{openzeppelin-BYo8OyKm.js → openzeppelin-CroDtw4s.js} +1 -1
- package/_assets/{parseNft-Gein49L0.js → parseNft-BH0wDTt0.js} +2 -2
- package/_assets/{parseSignature-k67zYFy4.js → parseSignature-DgaK7Nqy.js} +1 -1
- package/_assets/{parseSignature-DaGe9UWu.js → parseSignature-VSsiOnpe.js} +3 -3
- package/_assets/{passkeys-D3J4DzgH.js → passkeys-C1oIb99i.js} +1 -1
- package/_assets/{pay-with-exchange-CbWF1HDJ.js → pay-with-exchange-CttWQzQs.js} +1 -1
- package/_assets/{qr-overlay-nWKGC2_v.js → qr-overlay-DHUyjo36.js} +1 -1
- package/_assets/{receive-bg6fMaP3.js → receive-BKxXWv2t.js} +1 -1
- package/_assets/{resolveImplementation-3oaoK01c.js → resolveImplementation-X7KhKw3S.js} +1 -1
- package/_assets/{rpc-BohETOPd.js → rpc-CLJ9sbD8.js} +1 -1
- package/_assets/{secp256k1-DDb2NhqN.js → secp256k1-Cbp19gqh.js} +1 -1
- package/_assets/{secp256k1-DTNpVYCz.js → secp256k1-DPi4cvKJ.js} +1 -1
- package/_assets/{secp256k1-C-hoA_Tn.js → secp256k1-DxA18vH5.js} +1 -1
- package/_assets/{send-CmaFLfs9.js → send-EgTowmAZ.js} +1 -1
- package/_assets/{send-batch-transaction-BGvy0zyD.js → send-batch-transaction-wEk0AI7v.js} +1 -1
- package/_assets/{send-eip712-transaction-hYvHM7vZ.js → send-eip712-transaction-BBM2idYc.js} +2 -2
- package/_assets/{send-gasless-transaction-QyhmnHZB.js → send-gasless-transaction-UdxWKrE2.js} +2 -2
- package/_assets/{send-transaction-CtZe85mL.js → send-transaction-DEvt9fmJ.js} +2 -2
- package/_assets/{sendMetaTransaction-C5SAvbei.js → sendMetaTransaction-BYbBPih_.js} +1 -1
- package/_assets/{sendRawTransaction-B2WHhB1D.js → sendRawTransaction-D5OSt6IO.js} +3 -3
- package/_assets/{serializeTransaction-BwuobXgs.js → serializeTransaction-Blc5JuIS.js} +1 -1
- package/_assets/{session-proposal-pdBgnfq3.js → session-proposal-BOLRFjK9.js} +1 -1
- package/_assets/{session-request-DVhv1Cj8.js → session-request-CRjXklwV.js} +2 -2
- package/_assets/{signing-BRSDIb8-.js → signing-B3rrMiJs.js} +3 -3
- package/_assets/skeleton.styles-D3iPDKdT.js +7 -0
- package/_assets/{socials-D7ScJClR.js → socials-QIa2OQ6D.js} +1 -1
- package/_assets/{styled-CrSAMFFb.js → styled-CMJUrQY2.js} +1 -1
- package/_assets/{swaps-wmzxaVLP.js → swaps-DIftYDvd.js} +1 -1
- package/_assets/{thirdweb-WdIIt1R4.js → thirdweb-C0YKMkrc.js} +3 -3
- package/_assets/{to-serializable-transaction-Dcp4UJq5.js → to-serializable-transaction-Cjnw6yJ0.js} +2 -2
- package/_assets/{transactionReceipt-CX5pZ3y-.js → transactionReceipt-BCryC1fM.js} +1 -1
- package/_assets/{transactions-CP64yjJv.js → transactions-p19NlOdG.js} +1 -1
- package/_assets/{useCreditPacks-BtlA3bsY.js → useCreditPacks-DL0joeDc.js} +1 -1
- package/_assets/{useImportable-30ssdgwW.js → useImportable-CXGXlKVj.js} +1 -1
- package/_assets/{useInfiniteGrid-DwOzTLpA.js → useInfiniteGrid-DCnfT2gg.js} +1 -1
- package/_assets/{useTheme-BTDb7mvT.js → useTheme-vYv6two9.js} +1 -1
- package/_assets/{verifyHash-C6FN0xpS.js → verifyHash-Dnb3FmXs.js} +1 -1
- package/_assets/{w3m-modal-Bq0A97y3.js → w3m-modal-BPKpwX5-.js} +1 -1
- package/_assets/{w3m-modal-DoKC93v3.js → w3m-modal-CQfqosvf.js} +1 -1
- package/_assets/{wait-for-tx-receipt-25yHA4Ha.js → wait-for-tx-receipt-H6RTv4Cw.js} +1 -1
- package/_assets/{wallets-CLLcXEAl.js → wallets-C2vtueR8.js} +5 -5
- package/_assets/{web-connector-CXNgxhSL.js → web-connector-Cc4ShgT6.js} +3 -3
- package/_assets/{writeContract-78bJpqls.js → writeContract-B_DvmCjk.js} +1 -1
- package/_assets/{zoraTestnet-CNk9bURD.js → zoraTestnet-TFaEQBOe.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Collection-D6DIMkEd.js +0 -162
- package/_assets/Creator-k4PUSiKV.js +0 -306
- package/_assets/LazyEmoteControls-CtiNE6Cc.js +0 -2
- package/_assets/MyAssets-_v0xxc8e.js +0 -381
- package/_assets/Success-rROJaYNs.js +0 -280
- package/_assets/index-CLm02-HM.js +0 -1
- package/_assets/index-zCa2boac.js +0 -1
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import{b as de,j as e,L as Le,d as Me,u as Ae,r as L}from"./react-BYHuwl8r.js";import{u as Ie}from"./useUrlFilters-DH-gxdfV.js";import{u as Re,S as Z,R as Te,F as _e,e as Be}from"./categories-Cc9LF1R4.js";import{t as he,O as ze,Q as X,P as ee,s as i,bG as We,J as De,bH as Oe,b as o,bI as Ge,bJ as te,B as Ke,K as ue,a2 as me,bt as Ue,o as He,D as pe,bA as qe,bu as Ve,bv as Je,I as oe,c as Qe,x as Ye,v as Ze,am as Xe,ao as et,ap as tt,aq as M,ar as re,bK as se,bL as ot}from"./index-CwFxxSc1.js";import{T as xe}from"./skeleton.styles-D3iPDKdT.js";import{d as rt,P as st,C as it,a as at,b as nt,A as lt,c as ct,e as dt}from"./collectionPage.styles-rLItNGdu.js";import{g as ht,h as ut,i as mt,j as pt,k as xt,C as gt,l as ft,o as bt,m as wt,n as vt,M as yt,E as jt,p as Ct,q as kt,r as $t,s as St,t as Nt}from"./Assets.styles-D_DUFdKV.js";import{L as ie}from"./LoadMore-i3u3Pyt6.js";import{u as ae}from"./useInfiniteGrid-DCnfT2gg.js";import{E as T}from"./ErrorNotice-BU7FyT1W.js";import{G as ne}from"./grid.styles-2-Lphh1_.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./Tooltip-BajbwTea.js";function Et(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:ge,media:Pt}=he,Ft=i.article`
|
|
2
|
+
height: 300px;
|
|
3
|
+
background: ${w.bg};
|
|
4
|
+
border-radius: ${ge.card};
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: relative;
|
|
7
|
+
isolation: isolate;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
transition: box-shadow 0.15s ease;
|
|
12
|
+
|
|
13
|
+
&::after {
|
|
14
|
+
${ze};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:focus-visible {
|
|
18
|
+
${X};
|
|
19
|
+
}
|
|
20
|
+
&:focus-visible::after {
|
|
21
|
+
${ee};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// The swap is a pointer affordance only: keyboard focus must not hide the creator row, whose profile
|
|
25
|
+
// link is focusable (visibility: hidden would drop it from the tab order). Enter/Space on the card
|
|
26
|
+
// already opens the collection.
|
|
27
|
+
@media (hover: hover) {
|
|
28
|
+
&:hover {
|
|
29
|
+
${X};
|
|
30
|
+
}
|
|
31
|
+
&:hover::after {
|
|
32
|
+
${ee};
|
|
33
|
+
}
|
|
34
|
+
&:hover [data-view] {
|
|
35
|
+
visibility: visible;
|
|
36
|
+
}
|
|
37
|
+
&:hover [data-meta] {
|
|
38
|
+
visibility: hidden;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`,Lt=i.div`
|
|
42
|
+
position: relative;
|
|
43
|
+
flex: 1;
|
|
44
|
+
min-height: 0;
|
|
45
|
+
background: ${w.media};
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
`,Mt=i.img`
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
object-fit: cover;
|
|
51
|
+
display: block;
|
|
52
|
+
`,At=i(We)`
|
|
53
|
+
& [data-testid='coll-thumb-cell'] img {
|
|
54
|
+
object-fit: contain;
|
|
55
|
+
padding: 10px;
|
|
56
|
+
}
|
|
57
|
+
`,It=i.div`
|
|
58
|
+
flex: 0 0 102px;
|
|
59
|
+
height: 102px;
|
|
60
|
+
padding: 12px 14px;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 8px;
|
|
64
|
+
`,Rt=i.h3`
|
|
65
|
+
margin: 0;
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
font-size: 18px;
|
|
68
|
+
line-height: 1.3;
|
|
69
|
+
color: ${w.text};
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
|
|
74
|
+
${Pt.maxWidth("mobile")} {
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
}
|
|
77
|
+
`,Tt=i.div`
|
|
78
|
+
flex: 1;
|
|
79
|
+
min-height: 0;
|
|
80
|
+
display: grid;
|
|
81
|
+
grid-template-areas: 'stack';
|
|
82
|
+
align-items: center;
|
|
83
|
+
|
|
84
|
+
& > * {
|
|
85
|
+
grid-area: stack;
|
|
86
|
+
}
|
|
87
|
+
`,_t=i.div`
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
gap: 10px;
|
|
92
|
+
`,Bt=i(De)`
|
|
93
|
+
min-width: 0;
|
|
94
|
+
color: ${w.muted};
|
|
95
|
+
|
|
96
|
+
& [data-avatar] {
|
|
97
|
+
width: 24px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
}
|
|
100
|
+
& [data-testid='creator-name'] {
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
}
|
|
103
|
+
& [data-testid='creator-display'] {
|
|
104
|
+
color: ${w.dclRed};
|
|
105
|
+
font-weight: 700;
|
|
106
|
+
}
|
|
107
|
+
`,zt=i.span`
|
|
108
|
+
min-width: 0;
|
|
109
|
+
`,Wt=i.span`
|
|
110
|
+
flex: none;
|
|
111
|
+
color: ${w.text};
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
`,Dt=i.button`
|
|
116
|
+
visibility: hidden;
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: 44px;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
background: ${w.accent};
|
|
123
|
+
color: ${w.softWhite};
|
|
124
|
+
border: 0;
|
|
125
|
+
border-radius: ${ge.btn};
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
font-size: 13px;
|
|
128
|
+
text-transform: uppercase;
|
|
129
|
+
letter-spacing: 0.046em;
|
|
130
|
+
transition: background 0.15s ease;
|
|
131
|
+
|
|
132
|
+
&:hover {
|
|
133
|
+
background: ${w.accentHover};
|
|
134
|
+
}
|
|
135
|
+
&:active {
|
|
136
|
+
background: ${w.accentActive};
|
|
137
|
+
}
|
|
138
|
+
`;function Ot({collection:r,cover:s,itemCount:a}){const l=de(),{contractAddress:c,name:d,creator:b}=r,y=s==null||a==null,{data:n}=Oe(c,y),g=s==null?(n==null?void 0:n.items)??[]:[],f=a??(n==null?void 0:n.total);function h(){l(`/collection/${c}`)}return e.jsxs(Ft,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:h,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),h())},children:[e.jsx(Lt,{children:s?e.jsx(Mt,{"data-testid":"coll-card-img",src:s,alt:"",loading:"lazy"}):g.length>0?e.jsx(At,{items:g,tinted:!1}):null}),e.jsxs(It,{children:[e.jsx(Rt,{title:d,children:d}),e.jsxs(Tt,{children:[e.jsxs(_t,{"data-meta":!0,"data-testid":"coll-card-meta",children:[b?e.jsx(Bt,{address:b,linkToProfile:!0}):e.jsx(zt,{children:" "}),e.jsx(Wt,{"data-testid":"coll-card-count","aria-busy":f==null||void 0,children:f==null?e.jsx(xe,{className:"skeleton",width:54,"data-testid":"coll-card-count-skeleton","aria-hidden":!0}):o("collectionCard.itemCount",{count:f})})]}),e.jsx(Dt,{"data-view":!0,"data-testid":"coll-card-view",onClick:m=>{m.stopPropagation(),h()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})]})}function Gt({address:r,className:s=""}){const a=Ge(),l=te(d=>d.followed.includes(r.toLowerCase())),c=te(d=>d.toggle);return!a||!r?null:e.jsx(Ke,{type:"button",size:"sm",variant:l?"ghost":"outline",className:s||void 0,"data-testid":"follow-button","aria-pressed":l,title:l?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>c(r),children:l?o("creator.following"):o("creator.follow")})}const{colors:C,radius:fe,media:v}=he,be=ue`
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
height: 44px;
|
|
143
|
+
padding: 0 28px;
|
|
144
|
+
border: 2px solid ${C.white};
|
|
145
|
+
border-radius: ${fe.btn};
|
|
146
|
+
background: transparent;
|
|
147
|
+
color: ${C.white};
|
|
148
|
+
font-weight: 600;
|
|
149
|
+
font-size: 13px;
|
|
150
|
+
text-transform: uppercase;
|
|
151
|
+
letter-spacing: 0.046em;
|
|
152
|
+
text-decoration: none;
|
|
153
|
+
`,Kt=i.section`
|
|
154
|
+
position: relative;
|
|
155
|
+
border-radius: ${fe.card};
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
margin-bottom: 24px;
|
|
158
|
+
min-height: 360px;
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
|
|
163
|
+
&& .creator-hero__follow {
|
|
164
|
+
${be};
|
|
165
|
+
}
|
|
166
|
+
&& .creator-hero__follow:hover:not(:disabled) {
|
|
167
|
+
background: rgba(255, 255, 255, 0.14);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
${v.maxWidth("mobile")} {
|
|
171
|
+
min-height: 260px;
|
|
172
|
+
}
|
|
173
|
+
`,Ut=i.div`
|
|
174
|
+
position: absolute;
|
|
175
|
+
inset: 0;
|
|
176
|
+
z-index: 0;
|
|
177
|
+
`,Ht=i.img`
|
|
178
|
+
width: 100%;
|
|
179
|
+
height: 100%;
|
|
180
|
+
object-fit: cover;
|
|
181
|
+
display: block;
|
|
182
|
+
`,qt=i.div`
|
|
183
|
+
position: absolute;
|
|
184
|
+
inset: 0;
|
|
185
|
+
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
|
|
186
|
+
`,Vt=i.div`
|
|
187
|
+
position: absolute;
|
|
188
|
+
top: 16px;
|
|
189
|
+
right: 16px;
|
|
190
|
+
z-index: 2;
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
gap: 8px;
|
|
194
|
+
|
|
195
|
+
${v.maxWidth("mobile")} {
|
|
196
|
+
top: 12px;
|
|
197
|
+
right: 12px;
|
|
198
|
+
gap: 6px;
|
|
199
|
+
}
|
|
200
|
+
`,we=ue`
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
color: ${C.white};
|
|
205
|
+
transition: opacity 0.15s linear;
|
|
206
|
+
|
|
207
|
+
&:hover {
|
|
208
|
+
opacity: 0.8;
|
|
209
|
+
}
|
|
210
|
+
& .ico {
|
|
211
|
+
width: 36px;
|
|
212
|
+
height: 36px;
|
|
213
|
+
}
|
|
214
|
+
${v.maxWidth("mobile")} {
|
|
215
|
+
& .ico {
|
|
216
|
+
width: 30px;
|
|
217
|
+
height: 30px;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
`,Jt=i.a`
|
|
221
|
+
${we};
|
|
222
|
+
`,Qt=i(Le)`
|
|
223
|
+
${we};
|
|
224
|
+
width: 32px;
|
|
225
|
+
height: 32px;
|
|
226
|
+
border-radius: 50%;
|
|
227
|
+
border: 2px solid ${C.white};
|
|
228
|
+
transition: background-color 0.15s linear;
|
|
229
|
+
|
|
230
|
+
&:hover {
|
|
231
|
+
opacity: 1;
|
|
232
|
+
background: rgba(255, 255, 255, 0.24);
|
|
233
|
+
}
|
|
234
|
+
& .ico {
|
|
235
|
+
width: 16px;
|
|
236
|
+
height: 16px;
|
|
237
|
+
}
|
|
238
|
+
${v.maxWidth("mobile")} {
|
|
239
|
+
width: 28px;
|
|
240
|
+
height: 28px;
|
|
241
|
+
& .ico {
|
|
242
|
+
width: 14px;
|
|
243
|
+
height: 14px;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
`,Yt=i.div`
|
|
247
|
+
position: relative;
|
|
248
|
+
z-index: 1;
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
align-items: center;
|
|
252
|
+
text-align: center;
|
|
253
|
+
gap: 24px;
|
|
254
|
+
padding: 32px 20px;
|
|
255
|
+
|
|
256
|
+
${v.maxWidth("mobile")} {
|
|
257
|
+
padding: 56px 16px 24px;
|
|
258
|
+
}
|
|
259
|
+
`,le=i.img`
|
|
260
|
+
display: block;
|
|
261
|
+
width: 112px;
|
|
262
|
+
height: 112px;
|
|
263
|
+
border-radius: 50%;
|
|
264
|
+
object-fit: cover;
|
|
265
|
+
border: 4px solid ${C.white};
|
|
266
|
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
|
|
267
|
+
background: #ff4bed;
|
|
268
|
+
|
|
269
|
+
${v.maxWidth("mobile")} {
|
|
270
|
+
width: 88px;
|
|
271
|
+
height: 88px;
|
|
272
|
+
}
|
|
273
|
+
`,Zt=i.h2`
|
|
274
|
+
margin: 0;
|
|
275
|
+
font-size: 18px;
|
|
276
|
+
font-weight: 700;
|
|
277
|
+
color: ${C.white};
|
|
278
|
+
line-height: 1.6;
|
|
279
|
+
|
|
280
|
+
${v.maxWidth("mobile")} {
|
|
281
|
+
font-size: 16px;
|
|
282
|
+
}
|
|
283
|
+
`,Xt=i.p`
|
|
284
|
+
margin: 0;
|
|
285
|
+
font-size: 15px;
|
|
286
|
+
color: ${C.white};
|
|
287
|
+
line-height: 1.6;
|
|
288
|
+
max-width: 520px;
|
|
289
|
+
|
|
290
|
+
${v.maxWidth("mobile")} {
|
|
291
|
+
font-size: 14px;
|
|
292
|
+
}
|
|
293
|
+
`,eo=i.div`
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: center;
|
|
296
|
+
gap: 12px;
|
|
297
|
+
flex-wrap: wrap;
|
|
298
|
+
justify-content: center;
|
|
299
|
+
`,to=i.a`
|
|
300
|
+
${be};
|
|
301
|
+
transition: background 0.15s ease;
|
|
302
|
+
|
|
303
|
+
&:hover {
|
|
304
|
+
background: rgba(255, 255, 255, 0.14);
|
|
305
|
+
}
|
|
306
|
+
`,oo={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function ro({address:r}){var m,j;const{data:s}=me(r),{data:a}=Ue(r),l=He(p=>{var $;return($=p.session)==null?void 0:$.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(s==null?void 0:s.name)||pe(r),b=(j=(m=s==null?void 0:s.avatar)==null?void 0:m.snapshots)==null?void 0:j.face256,y=(a==null?void 0:a.cover)||rt,n=a==null?void 0:a.description,g=`${Qe.profileUrl}/${r}`,f=qe.filter(p=>a==null?void 0:a.links[p]),h=Ve(Je({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Kt,{"aria-label":`${d} storefront`,children:[e.jsxs(Ut,{children:[e.jsx(Ht,{src:y,alt:"",loading:"eager"}),e.jsx(qt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Vt,{children:[f.map(p=>e.jsx(Jt,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(oe,{name:oo[p]})},p)),c&&e.jsx(Qt,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(oe,{name:"pen"})})]}),e.jsxs(Yt,{children:[b?e.jsx(le,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(le,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(Zt,{children:d}),n?e.jsx(Xt,{children:n}):null]}),e.jsxs(eo,{children:[e.jsx(to,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Gt,{address:r,className:"creator-hero__follow"})]})]})]})}const so=["all","on_sale","not_for_sale"],ce=48;function jo(){var Q,Y;const{address:r}=Me(),s=de(),[a]=Ae(),l=a.has("collections"),{data:c}=me(r),d=(c==null?void 0:c.name)||(r?pe(r):o("creator.fallbackName"));Ye({title:d,description:o("seo.creator.description",{name:d}),image:(Y=(Q=c==null?void 0:c.avatar)==null?void 0:Q.snapshots)==null?void 0:Y.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[y,n]=Ie(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:j,smart:p,sort:$}=y,S=so.includes(y.status)?y.status:"all",_=t=>n({status:t});Re(`${l}:${g}:${f??""}`);const[E,N]=L.useState(!1);L.useEffect(()=>{if(!E)return;const t=Fe=>{Fe.key==="Escape"&&N(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[E]);const B=m&&!Number.isNaN(Number(m))?Number(m):void 0,z=j&&!Number.isNaN(Number(j))?Number(j):void 0,ve=f?Be[f]:void 0,ye=(Z.find(t=>t.key===$)??Z[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:ve,minPriceCredits:B,maxPriceCredits:z,isWearableSmart:p||void 0,isOnSale:S==="all"?void 0:S==="on_sale",sortBy:ye},{items:A,total:je,isLoading:Ce,isPlaceholderData:ke,error:D,hasNextPage:$e,isFetchingNextPage:O,isFetchNextPageError:Se,fetchNextPage:Ne}=ae(["creator-items",W],t=>se({...W,first:ce,skip:t}),{enabled:!!r&&!l}),P=Ze({queryKey:["creator-item-count",r],queryFn:()=>se({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=ae(["creator-collections",r],t=>ot(r,{first:ce,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function G(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Ee(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}`:""},{replace:!0})}function Pe(){if(l){Ee();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function K(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function U(){n(b)}const k=[];(g==="wearable"||g==="emote")&&k.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>G("all")}),(B!=null||z!=null)&&k.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of Te)h.includes(t)&&k.push({key:`rarity-${t}`,label:Xe(t),onRemove:()=>K(t)});p&&k.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),S!=="all"&&k.push({key:"status",label:S==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>_("all")});const F=Et({gridLoading:Ce||ke,gridError:!!D,gridCount:A.length,baselinePending:P.isPending,baselineError:P.isError,baselineCount:P.data}),I=F==="skeletons",{data:H}=et(),q=L.useMemo(()=>A.map(t=>({...t,priceCredits:tt(t,H)})),[A,H]),V=t=>t.priceCredits>0||!!t.manaWei,J=q.filter(V),R=F==="items"||F==="skeletons"?null:F;return e.jsxs(st,{children:[e.jsxs(it,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(at,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(nt,{children:d})]}),r?e.jsx(ro,{address:r}):null,!l&&!I&&J.length>0?e.jsx(lt,{items:J,source:"creator"}):null,e.jsxs(ht,{children:[E?e.jsx(ut,{onClick:()=>N(!1),"aria-hidden":!0}):null,e.jsxs(mt,{"data-open":E||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(pt,{children:[e.jsx(xt,{children:o("assets.filters")}),e.jsx(gt,{onClick:()=>N(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(ft,{children:e.jsx(bt,{category:g,subCategory:f,onCategory:G,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:j,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:K,status:S,onStatus:_,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Pe})}),e.jsx(wt,{children:e.jsx(vt,{type:"button",onClick:()=>N(!1),children:o("assets.showItems")})})]}),e.jsx(yt,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(ct,{children:e.jsx(dt,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(xe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(T,{message:o("creator.error")}):null,e.jsx(ne,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Ot,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(_e,{sort:$,onSort:t=>n({sort:t}),total:je,loading:I,onOpenFilters:()=>N(!0),chips:k,onClearChips:U}),D?e.jsx(T,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ne,{"data-testid":"creator-grid",children:I?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[q.map(t=>V(t)?e.jsx(re,{item:t},t.id):e.jsx(re,{item:t,mode:"view"},t.id)),O?e.jsx(M,{count:6}):null]})}),e.jsx(ie,{hasNextPage:$e,isFetching:O,isError:Se,onLoadMore:()=>void Ne()}),R==="error"?e.jsx(T,{message:o("creator.error"),testId:"creator-empty-error"}):R==="no-creations"?e.jsx("p",{className:"muted","data-testid":"creator-empty-none",children:o("creator.emptyNoCreations")}):R==="filters"?e.jsxs(jt,{"data-testid":"creator-empty-filters",children:[e.jsxs(Ct,{children:[e.jsx(kt,{children:o("creator.emptyFilters.title")}),e.jsx($t,{children:o("creator.emptyFilters.body",{count:P.data??0})})]}),e.jsx(St,{children:e.jsx(Nt,{type:"button",onClick:U,children:o("filterBar.clearAll")})})]}):null]})})]})]})}export{jo as Creator,jo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-
|
|
1
|
+
import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-CwFxxSc1.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-
|
|
1
|
+
import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-A5mBxhYF.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-rj2Zyfmj.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=P.bigNumber(e.amount??0).round(8),n=P.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw A.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await W({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=l.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=E.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await m.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),m.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?E.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:p||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{m as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,j as o}from"./react-BYHuwl8r.js";import{t as e,s as a,b as r,I as f}from"./index-
|
|
1
|
+
import{r as h,j as o}from"./react-BYHuwl8r.js";import{t as e,s as a,b as r,I as f}from"./index-CwFxxSc1.js";const w=a.section`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 36px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t as e,w as
|
|
1
|
+
import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t as e,w as F,x as ge,b as n,C as h,o as fe,A as me,$ as g,bh as be,F as G,br as N,bX as we,bb as H,z as re,I as ye,bY as Q}from"./index-CwFxxSc1.js";import{C as ke}from"./Confetti-Bf7aP0NE.js";import{F as Ce}from"./Faq-DBZpkL9P.js";import{R as D}from"./resume-buy-Bf0zIH7y.js";import{u as ve,a as $e,R as je,c as Se,i as Ae,b as Pe}from"./useCreditPacks-DL0joeDc.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";const A="https://cdn.decentraland.org/@dcl/shop/0.10.1-31032606668.commit-30914a5/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.10.1-31032606668.commit-30914a5/_assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.10.1-31032606668.commit-30914a5/_assets/pack-chest-BX_j84xW.webp",Re="https://cdn.decentraland.org/@dcl/shop/0.10.1-31032606668.commit-30914a5/_assets/credit-coin-CmcTCd5i.webp",Te="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",_e="https://cdn.decentraland.org/@dcl/shop/0.10.1-31032606668.commit-30914a5/_assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Be=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 24px;
|
|
@@ -23,7 +23,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
23
23
|
${e.media.maxWidth("mobile")} {
|
|
24
24
|
padding: 32px 16px 40px;
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,Fe=i.div`
|
|
27
27
|
position: absolute;
|
|
28
28
|
inset: 0;
|
|
29
29
|
z-index: -1;
|
|
@@ -33,7 +33,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
33
33
|
background-size: cover;
|
|
34
34
|
background-position: 50% 96%;
|
|
35
35
|
background-repeat: no-repeat;
|
|
36
|
-
`,
|
|
36
|
+
`,qe=i.div`
|
|
37
37
|
position: relative;
|
|
38
38
|
width: 100%;
|
|
39
39
|
display: flex;
|
|
@@ -144,7 +144,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
144
144
|
line-height: 1.6;
|
|
145
145
|
color: ${e.colors.media};
|
|
146
146
|
text-align: center;
|
|
147
|
-
`,
|
|
147
|
+
`,K=i.div`
|
|
148
148
|
display: grid;
|
|
149
149
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
150
150
|
gap: 24px;
|
|
@@ -160,7 +160,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
160
160
|
gap: 12px;
|
|
161
161
|
row-gap: 24px;
|
|
162
162
|
}
|
|
163
|
-
`,
|
|
163
|
+
`,O=i.button`
|
|
164
164
|
position: relative;
|
|
165
165
|
display: flex;
|
|
166
166
|
flex-direction: column;
|
|
@@ -199,9 +199,9 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
199
199
|
inset: 0;
|
|
200
200
|
border-radius: inherit;
|
|
201
201
|
pointer-events: none;
|
|
202
|
-
-webkit-mask: ${
|
|
202
|
+
-webkit-mask: ${Y};
|
|
203
203
|
-webkit-mask-composite: xor;
|
|
204
|
-
mask: ${
|
|
204
|
+
mask: ${Y};
|
|
205
205
|
mask-composite: exclude;
|
|
206
206
|
transition: opacity 0.15s ease;
|
|
207
207
|
}
|
|
@@ -342,7 +342,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
342
342
|
font-size: 32px;
|
|
343
343
|
line-height: 24px;
|
|
344
344
|
}
|
|
345
|
-
`,
|
|
345
|
+
`,Ye=i.span`
|
|
346
346
|
font-family: ${e.font.sans};
|
|
347
347
|
font-size: 20px;
|
|
348
348
|
font-weight: 500;
|
|
@@ -354,7 +354,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
354
354
|
font-size: 16px;
|
|
355
355
|
line-height: 12px;
|
|
356
356
|
}
|
|
357
|
-
`,
|
|
357
|
+
`,Ke=i.span`
|
|
358
358
|
display: block;
|
|
359
359
|
width: 70%;
|
|
360
360
|
aspect-ratio: 1;
|
|
@@ -365,7 +365,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
365
365
|
height: 100%;
|
|
366
366
|
object-fit: contain;
|
|
367
367
|
}
|
|
368
|
-
`,
|
|
368
|
+
`,Oe=i.span`
|
|
369
369
|
display: flex;
|
|
370
370
|
align-items: center;
|
|
371
371
|
justify-content: center;
|
|
@@ -389,7 +389,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
389
389
|
letter-spacing: 0.46px;
|
|
390
390
|
color: ${e.colors.text2};
|
|
391
391
|
text-transform: uppercase;
|
|
392
|
-
`,Ve=
|
|
392
|
+
`,Ve=F`
|
|
393
393
|
to {
|
|
394
394
|
background-position: -200% 0;
|
|
395
395
|
}
|
|
@@ -452,7 +452,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
452
452
|
font-size: 16px;
|
|
453
453
|
line-height: 1.4;
|
|
454
454
|
color: rgba(255, 255, 255, 0.88);
|
|
455
|
-
`,nt=
|
|
455
|
+
`,nt=F`
|
|
456
456
|
0%, 100% {
|
|
457
457
|
transform: scale(1);
|
|
458
458
|
opacity: 1;
|
|
@@ -499,7 +499,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
499
499
|
display: flex;
|
|
500
500
|
align-items: center;
|
|
501
501
|
gap: 8px;
|
|
502
|
-
`,lt=
|
|
502
|
+
`,lt=F`
|
|
503
503
|
0% {
|
|
504
504
|
left: -40%;
|
|
505
505
|
}
|
|
@@ -708,4 +708,4 @@ import{b as ue,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t a
|
|
|
708
708
|
margin: 0;
|
|
709
709
|
font-family: ${e.font.sans};
|
|
710
710
|
color: ${e.colors.err};
|
|
711
|
-
`,v=Ae()?"mock":"stripe",te=[A,A,ne,se],St={pack_5:A,pack_10:A,pack_25:ne,pack_50:se};function ae(d,s){return St[d.id]??te[s%te.length]}function At(d,s){return d.artUrl??ae(d,s)}const Pt=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function ie(d){const s=d;if((s==null?void 0:s.name)==="AbortError")return n("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?n("getCredits.errorSignIn",{currency:h.name}):f.includes("timed out")?n("getCredits.errorTimeout",{currency:h.name}):n("getCredits.errorGeneric")}function Ut(){var L;ge({title:n("nav.getCredits",{currency:h.name}),noindex:!0});const d=ue(),{session:s,signIn:f}=fe(),o=me(),[m,b]=xe(),{packs:$,isLoading:y}=ve(),[u,p]=l.useState("select"),[c,
|
|
711
|
+
`,v=Ae()?"mock":"stripe",te=[A,A,ne,se],St={pack_5:A,pack_10:A,pack_25:ne,pack_50:se};function ae(d,s){return St[d.id]??te[s%te.length]}function At(d,s){return d.artUrl??ae(d,s)}const Pt=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function ie(d){const s=d;if((s==null?void 0:s.name)==="AbortError")return n("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?n("getCredits.errorSignIn",{currency:h.name}):f.includes("timed out")?n("getCredits.errorTimeout",{currency:h.name}):n("getCredits.errorGeneric")}function Ut(){var L;ge({title:n("nav.getCredits",{currency:h.name}),noindex:!0});const d=ue(),{session:s,signIn:f}=fe(),o=me(),[m,b]=xe(),{packs:$,isLoading:y}=ve(),[u,p]=l.useState("select"),[c,q]=l.useState(null),[j,E]=l.useState(null),de=(j!=null?(L=$.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Re,[ce,k]=l.useState(null),[le,R]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const I=l.useCallback(()=>{b(r=>{const a=new URLSearchParams(r);return a.delete("order"),a.delete("canceled"),a},{replace:!0})},[b]),_=l.useCallback(async r=>{p("processing");const a=new AbortController;T.current=a;try{const x=await $e(r,{signal:a.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(x.status==="credited"){const w=x.creditsGranted??(c==null?void 0:c.credits)??0;E(w>0?w:null),p("success"),g("Shop Completed Buy Credits",{order_id:r,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:v}),o.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(je)){const S={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};d("/cart",{state:S});return}}catch{}try{const S=sessionStorage.getItem(D);if(S){sessionStorage.removeItem(D);const U=JSON.parse(S),M=be(U);if(M){d(M,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else x.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),o.invalidateQueries({queryKey:["usd-balance"]}),p("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),k(x.error??n("getCredits.errorGrant",{currency:h.name})),p("error"))}catch(x){G(x,{flow:"get_credits",step:"grant",order_id:r}),g("Shop Buy Credits Failed",{step:"grant",error_code:N(x),pack_usd:(c==null?void 0:c.usd)??null}),k(ie(x)),p("error")}},[c,s,o,d]),pe=l.useCallback(async r=>{if(!s){f();return}k(null),R(!1),q(r),p(v==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:v});try{const a=await Se(r.id,{address:s.address,identity:s.identity});if(a.mock)_(a.orderId);else if(a.url)g("Shop Redirected To Stripe",{order_id:a.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=a.url;else throw new Error("Checkout did not return a redirect url")}catch(a){G(a,{flow:"get_credits",step:"checkout",provider:v}),g("Shop Buy Credits Failed",{step:"checkout",error_code:N(a),pack_usd:r.usd}),k(ie(a)),p("error")}},[s,f,_]),B=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(B.current)return;const r=m.get("order");if(m.get("canceled")!=null){B.current=!0,g("Shop Buy Credits Cancelled",{order_id:r,provider:v}),r&&s&&we(r,s.identity),I(),R(!0),p("select");return}r&&(p("processing"),s&&(B.current=!0,I(),_(r)))},[m,s]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),q(null),E(null),k(null),R(!1)}function he(){const r=W.current;if(!r)return;const a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:a?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(Be,{children:[(u==="select"||u==="redirecting")&&t.jsxs(ze,{"data-testid":"credits-hero",children:[t.jsx(Fe,{"aria-hidden":!0}),t.jsxs(qe,{children:[t.jsxs(Ie,{$hidden:u==="redirecting",children:[t.jsxs(We,{children:[t.jsx(Le,{children:n("getCredits.title")}),t.jsxs(Ue,{children:[t.jsx(Me,{children:n("getCredits.subtitle")}),t.jsx(Ge,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:n("getCredits.learnMore")})]})]}),le&&t.jsx(Ne,{role:"status",children:n("getCredits.canceledNote")}),t.jsx(Rt,{packs:$,loading:y,onSelect:r=>void pe(r)})]}),u==="redirecting"&&t.jsxs(it,{role:"status","aria-live":"polite",children:[t.jsx(ot,{src:H,alt:"",width:72,height:72}),t.jsx(rt,{children:n("getCredits.redirecting")})]})]}),t.jsx(Ee,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(Ce,{title:"faq.title",entries:Pt,tone:"on-dark"})})]}),u==="processing"&&t.jsxs(st,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:H,alt:"",width:61,height:61}),t.jsxs(at,{children:[t.jsxs(dt,{children:[t.jsx("strong",{children:n("getCredits.processing")}),"…"]}),t.jsxs(ct,{"aria-hidden":!0,children:[t.jsx(pt,{children:t.jsx(ht,{})}),t.jsx(ut,{children:"1/1"})]})]})]}),u==="success"&&t.jsxs(xt,{role:"status","aria-live":"polite",children:[t.jsx(ke,{}),t.jsxs(gt,{children:[t.jsx(ft,{src:Te,alt:"",width:60,height:60}),t.jsxs(mt,{children:[t.jsx("strong",{children:n("getCredits.successTitle")})," ",n("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(bt,{children:t.jsxs(wt,{children:[t.jsx(yt,{src:de,alt:"",width:93,height:93}),t.jsxs(kt,{children:[t.jsx(re,{}),t.jsxs("span",{children:[t.jsx(Ct,{children:n("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(vt,{children:n("getCredits.creditsAdded")})]})]})]})}),t.jsxs($t,{children:[t.jsx(C,{"data-variant":"outline",onClick:z,children:n("getCredits.buyMore",{currency:h.name})}),t.jsx(C,{onClick:()=>d("/items"),children:n("getCredits.startShopping")})]})]}),u==="pending"&&t.jsxs(Z,{role:"status","aria-live":"polite",children:[t.jsx(J,{children:n("getCredits.pendingTitle",{currency:h.name})}),t.jsx(tt,{children:n("getCredits.pendingBody")}),t.jsxs(ee,{children:[t.jsx(C,{onClick:()=>d("/items"),children:n("getCredits.startShopping")}),t.jsx(C,{"data-variant":"outline",onClick:z,children:n("getCredits.done")})]})]}),u==="error"&&t.jsxs(Z,{role:"alert",children:[t.jsx(J,{"data-tone":"error",children:n("getCredits.errorTitle")}),t.jsx(jt,{children:ce}),t.jsx(ee,{children:t.jsx(C,{onClick:z,children:n("getCredits.tryAgain")})})]})]})}function Rt({packs:d,loading:s,onSelect:f}){return s?t.jsx(K,{"aria-busy":"true","aria-label":n("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(o=>t.jsxs(O,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsx(Xe,{}),t.jsx(Ze,{})]}),t.jsx(Je,{})]}),t.jsx(et,{})]},o))}):t.jsx(K,{children:d.map((o,m)=>{const b=Pe(o,d);return t.jsxs(O,{type:"button","data-testid":"pack","data-best":o.bestValue?"true":void 0,onClick:()=>f(o),"aria-label":b?n("getCredits.packAriaBonus",{amount:Q(o.credits),usd:o.usd,bonus:b.bonus,baseline:b.baseline}):n("getCredits.packAria",{amount:Q(o.credits),usd:o.usd}),children:[o.bestValue&&t.jsxs(He,{children:[t.jsx(ye,{name:"star-rounded"}),n("getCredits.packBadge")]}),t.jsxs(V,{children:[t.jsxs(X,{children:[t.jsxs(Qe,{children:[t.jsx(re,{}),t.jsx(De,{children:o.credits})]}),t.jsx(Ye,{children:n("getCredits.packUnit",{currency:h.name})})]}),t.jsx(Ke,{children:t.jsx("img",{src:At(o,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const y=$.currentTarget;y.dataset.artFallback||(y.dataset.artFallback="done",y.src=ae(o,m))}})})]}),t.jsxs(Oe,{children:["$",o.usd.toFixed(2)]})]},o.id)})})}export{Ut as GetCredits,Ut as default};
|