@dcl/shop 0.10.1-31042990976.commit-7edc9b6 → 1.0.0

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.
Files changed (191) hide show
  1. package/_assets/Activity-CJO4ONwi.js +371 -0
  2. package/_assets/AnimatedBackground-CHiOSgJ6.js +97 -0
  3. package/_assets/{Assets-BzPVRWYe.js → Assets-1KVsmH01.js} +8 -8
  4. package/_assets/{Assets.styles-D4-S4NWG.js → Assets.styles-BUHnZ7Nb.js} +140 -132
  5. package/_assets/{Authorizations-gGXOHHeT.js → Authorizations-BGlyC4dr.js} +28 -26
  6. package/_assets/Cart-afrKtZvj.js +707 -0
  7. package/_assets/{CircularProgress-DNShuaaC.js → CircularProgress-K7JjSpPZ.js} +1 -1
  8. package/_assets/{Collection-CI_bqtk6.js → Collection-B0G71rJV.js} +19 -19
  9. package/_assets/CollectionCarousel-B4hzcKRb.js +816 -0
  10. package/_assets/{Confetti-DkcOmptO.js → Confetti-BBhDY6Q2.js} +1 -1
  11. package/_assets/{Creator-CFf63R4B.js → Creator-CYC3eVKx.js} +7 -7
  12. package/_assets/{ErrorNotice-C_rQ_hZp.js → ErrorNotice-CnPcFEw_.js} +1 -1
  13. package/_assets/{ExchangeController-BPF_kkCP.js → ExchangeController-BAefeOHy.js} +1 -1
  14. package/_assets/{Faq--E1fBOzk.js → Faq-D03YByjo.js} +20 -14
  15. package/_assets/{GetCredits-C2rjzPBY.js → GetCredits-Cyw0rRMV.js} +114 -80
  16. package/_assets/{Grow-CyHu9l8s.js → Grow-CPwRVF9g.js} +1 -1
  17. package/_assets/{HelpersUtil-Bh7qiwp_.js → HelpersUtil-DJC0aWJi.js} +1 -1
  18. package/_assets/{ItemDetail-CtR1YHPh.js → ItemDetail-DSuMCjR9.js} +510 -480
  19. package/_assets/LazyEmoteControls-D-xqLU4A.js +2 -0
  20. package/_assets/{LoadMore-BQIcG-2Y.js → LoadMore-CMAFsns3.js} +1 -1
  21. package/_assets/ManaPricingBanner.styles-Bb7BS6EM.js +93 -0
  22. package/_assets/{MyAssets-Dk_4queh.js → MyAssets-C5lGRPqP.js} +33 -33
  23. package/_assets/{MyFavorites-yuyxKJv4.js → MyFavorites-C1t1o6Li.js} +12 -11
  24. package/_assets/{NotFound-rquTctww.js → NotFound-Bdi_fN5j.js} +1 -1
  25. package/_assets/{NotificationsBell-CFCmzqHj.js → NotificationsBell-BQk3EV9b.js} +1 -1
  26. package/_assets/{OutfitDetail-BFc4wS6X.js → OutfitDetail-D3Mwl6KR.js} +4 -4
  27. package/_assets/{OutfitPreview-C214293j.js → OutfitPreview-BpWwkAro.js} +2 -2
  28. package/_assets/{OutfitStudio-OOy9Y3VP.js → OutfitStudio-BL7OYD9h.js} +1 -1
  29. package/_assets/{StoreSettings-BpkjL6md.js → StoreSettings-BNhzJJib.js} +1 -1
  30. package/_assets/{Success-BXjczKuA.js → Success-Cnu7oCbI.js} +1 -1
  31. package/_assets/{SwapController-CA7wAH0n.js → SwapController-BD23YCPw.js} +1 -1
  32. package/_assets/{Tooltip-BoJS18Z3.js → Tooltip-tAvMrdFp.js} +1 -1
  33. package/_assets/{TradeService-DsmKoPxy.js → TradeService-a2JgoWq2.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-DKeivVWe.js → W3MFrameProviderSingleton-CPDmjNiA.js} +3 -3
  35. package/_assets/{WebCryptoP256-CJPdW9Ug.js → WebCryptoP256-DIEJtB0I.js} +1 -1
  36. package/_assets/{authorizations-2Xd-ft_C.js → authorizations-HgwrWkaa.js} +1 -1
  37. package/_assets/{basic-CpO7N7NV.js → basic-B3qEjJvY.js} +1 -1
  38. package/_assets/{biconomy-HF5uwOUc.js → biconomy-CzcDC8vB.js} +1 -1
  39. package/_assets/{builder-uBBMnbtK.js → builder-TZGldT6a.js} +1 -1
  40. package/_assets/{buy-CgUGATyG.js → buy-CuFubBZY.js} +1 -1
  41. package/_assets/{buy-gasless-CVTH5KGZ.js → buy-gasless-DO6cBuJ3.js} +1 -1
  42. package/_assets/{categories-yTyOCTA2.js → categories-B3DJZe02.js} +54 -54
  43. package/_assets/{ccip-Bq1h60c1.js → ccip-CB03B_MW.js} +1 -1
  44. package/_assets/{ccip-BjT8ndU2.js → ccip-VI2-jJnV.js} +1 -1
  45. package/_assets/collectionPage.styles-DXfFyRiH.js +49 -0
  46. package/_assets/{controller-CBtSaaQD.js → controller-CEo6ipG_.js} +2 -2
  47. package/_assets/{core-CIuOeePP.js → core-DmqfUS4f.js} +4 -4
  48. package/_assets/{createSvgIcon-Dax4uwaL.js → createSvgIcon-WfOAVB94.js} +4 -4
  49. package/_assets/{custom-CYUokIbm.js → custom-bIxIBqCn.js} +1 -1
  50. package/_assets/{data-capture-6P55-IaB.js → data-capture-Dtaj6ehs.js} +1 -1
  51. package/_assets/disposePreview-5vjiqVZ0.js +1 -0
  52. package/_assets/{email-nYmfz15C.js → email-DBXWS-p0.js} +1 -1
  53. package/_assets/{embedded-wallet-D_e_UWzV.js → embedded-wallet-DqlpsZRk.js} +1 -1
  54. package/_assets/{emotion-styled.browser.esm-s1GWUoDX.js → emotion-styled.browser.esm-pOAX0dMa.js} +1 -1
  55. package/_assets/{engine-CpLQoIqI.js → engine-gP8vp-2g.js} +1 -1
  56. package/_assets/{errors-hu6Xw0D2.js → errors-WNvNILsF.js} +1 -1
  57. package/_assets/{estimate-l1-fee-CLRDa6fI.js → estimate-l1-fee-X1cvAsdL.js} +1 -1
  58. package/_assets/{execute-DqPg9Ksw.js → execute-V2l_cDAW.js} +2 -2
  59. package/_assets/{features-BtrrmffG.js → features-CFR_-yBt.js} +1 -1
  60. package/_assets/{fetchTokenMetadata-DFJ36WnI.js → fetchTokenMetadata-Do5GLuIQ.js} +2 -2
  61. package/_assets/{field.styles-XpeJ0COA.js → field.styles-ciG_OcBi.js} +1 -1
  62. package/_assets/{get-ecosystem-wallet-info-DlCx83R8.js → get-ecosystem-wallet-info-CyDTxLgQ.js} +1 -1
  63. package/_assets/{getBalance-B5ocM9g2.js → getBalance-7wKu8RUe.js} +1 -1
  64. package/_assets/{getNFT-oiyevCuO.js → getNFT-BbpUiMXR.js} +1 -1
  65. package/_assets/{getNFT-DBaH5cpy.js → getNFT-DecLUThv.js} +1 -1
  66. package/_assets/{grid.styles-Dpb8Greh.js → grid.styles-Caahz6PS.js} +1 -1
  67. package/_assets/{hashTypedData-CeLfcFPQ.js → hashTypedData-C9kgxiiE.js} +1 -1
  68. package/_assets/{hashTypedData-NanWeJ-D.js → hashTypedData-Ca524zaX.js} +1 -1
  69. package/_assets/hero-credits-mobile-C9Muog4T.webp +0 -0
  70. package/_assets/{in-app-DfEVZ7ts.js → in-app-B-disnkm.js} +1 -1
  71. package/_assets/{in-app-wallet-calls-CaankqgP.js → in-app-wallet-calls-3yighozE.js} +1 -1
  72. package/_assets/{index-De-xiANX.js → index--1pBMb8n.js} +1 -1
  73. package/_assets/{index-BNnBkkJr.js → index-2-BWsekC.js} +1 -1
  74. package/_assets/{index-DxUWfPTE.js → index-8xcbpK09.js} +1 -1
  75. package/_assets/{index-Dyf04oQ8.js → index-B6l73M7K.js} +1 -1
  76. package/_assets/{index-BJ6fvgAM.js → index-BBX5Tona.js} +1 -1
  77. package/_assets/{index-_l18b6D8.js → index-BLCTVSaC.js} +1 -1
  78. package/_assets/{index-CYd-9A8i.js → index-BMFVFrWl.js} +3 -3
  79. package/_assets/{index-CaH_IfZ9.js → index-BQB7qYN1.js} +1 -1
  80. package/_assets/index-BYP7oMPZ.css +1 -0
  81. package/_assets/{index-BMGdvlP9.js → index-Bd7SNoIN.js} +2 -2
  82. package/_assets/{index-OiVd03k_.js → index-BdQllJHM.js} +1 -1
  83. package/_assets/{index-Cbb2oZ2Y.js → index-BjEDpwxR.js} +1 -1
  84. package/_assets/{index-B4WRMX84.js → index-BrU_i04f.js} +1 -1
  85. package/_assets/{index-BGSoCmOn.js → index-BuImQh6o.js} +1 -1
  86. package/_assets/{index-COqbI5lZ.js → index-C3MGLBUO.js} +1 -1
  87. package/_assets/index-C616xNgB.js +3699 -0
  88. package/_assets/{index-DI0-gUeO.js → index-CAl290ro.js} +1 -1
  89. package/_assets/{index-BPoXI4qO.js → index-CEDBhmGn.js} +1 -1
  90. package/_assets/{index-C8Cm7Ukd.js → index-CEnhHz30.js} +1 -1
  91. package/_assets/{index-BC1n3NBn.js → index-CFziwAGz.js} +1 -1
  92. package/_assets/{index-DJxot5zE.js → index-CGcb9Mz3.js} +1 -1
  93. package/_assets/{index-DxD-NQZ2.js → index-CKkE-eRE.js} +1 -1
  94. package/_assets/{index-cpjoojGa.js → index-CONyzZZC.js} +3 -3
  95. package/_assets/{index-BHzYL11-.js → index-CO_xP_3N.js} +1 -1
  96. package/_assets/{index-BqVSjccZ.js → index-CUAEZ5zJ.js} +1 -1
  97. package/_assets/index-CZBUgvRB.js +1 -0
  98. package/_assets/{index-BXdpk7Oq.js → index-CdFrv2eV.js} +1 -1
  99. package/_assets/{index-zPBk9zxn.js → index-CjhGjrdW.js} +1 -1
  100. package/_assets/{index-w9D58X3R.js → index-CmlH9TBP.js} +1 -1
  101. package/_assets/{index-enm6a-Yh.js → index-CyITvpDL.js} +1 -1
  102. package/_assets/{index-UiKz3U--.js → index-D58OkhU1.js} +1 -1
  103. package/_assets/{index-BKYIrw8q.js → index-D9iAFl4E.js} +1 -1
  104. package/_assets/{index-CWMeoaW8.js → index-DCAUOF_r.js} +1 -1
  105. package/_assets/{index-B-kvIPu1.js → index-DCMLwiSR.js} +1 -1
  106. package/_assets/{index-CPOch-_L.js → index-DEw1jYQT.js} +1 -1
  107. package/_assets/{index-Bry4nBQ3.js → index-DJOlt1Iv.js} +1 -1
  108. package/_assets/{index-Bu9Qy6np.js → index-DKghJgJj.js} +1 -1
  109. package/_assets/{index-CaRe7gid.js → index-DNvcQt0s.js} +3 -3
  110. package/_assets/{index-jzVm2M_d.js → index-DRI1gQSo.js} +1 -1
  111. package/_assets/{index-gR7VkXwX.js → index-DUmo7598.js} +3 -3
  112. package/_assets/{index-BccvdHMd.js → index-Dag4zALf.js} +1 -1
  113. package/_assets/index-DsH_mBtT.js +622 -0
  114. package/_assets/{index-BntzHAg5.js → index-DvjyzmjB.js} +1 -1
  115. package/_assets/{index-T6PQTPj1.js → index-DxB85HDB.js} +1 -1
  116. package/_assets/{index-ChhX0J8g.js → index-Eip3e8N8.js} +1 -1
  117. package/_assets/{index-CQMg581G.js → index-Gw3Mauv_.js} +1 -1
  118. package/_assets/{index-CkvT2_Qp.js → index-JuH5W7YS.js} +2 -2
  119. package/_assets/{index-D9avTVnT.js → index-N5sgh9IC.js} +1 -1
  120. package/_assets/{index-CIJje8vF.js → index-o0b8cjRQ.js} +1 -1
  121. package/_assets/{index-Deo0xkWr.js → index-p0fxtTsZ.js} +2 -2
  122. package/_assets/{index-FaWeourd.js → index-p4Ph7ugv.js} +1 -1
  123. package/_assets/{index-B0jVlmk0.js → index-tCYP1O3W.js} +1 -1
  124. package/_assets/{index-BZQS2qMR.js → index-yiECqJCb.js} +1 -1
  125. package/_assets/{index.es-DZrZt1nk.js → index.es-C5PJ78RX.js} +1 -1
  126. package/_assets/{index.es-COh1P5q0.js → index.es-D73EniUm.js} +1 -1
  127. package/_assets/{index.es-DKfCNVgZ.js → index.es-DF_hlZIu.js} +4 -4
  128. package/_assets/{localBatchGatewayRequest-BI4PJuWG.js → localBatchGatewayRequest-DvkdRgNo.js} +1 -1
  129. package/_assets/{networks-Blxn8DDe.js → networks-7b-i0dnd.js} +1 -1
  130. package/_assets/{onramp-Dy-wl2-G.js → onramp-CoF8bFaS.js} +1 -1
  131. package/_assets/{openzeppelin-BMYbmCTg.js → openzeppelin-DcsEW8tQ.js} +1 -1
  132. package/_assets/{parseNft-C3NZ6wub.js → parseNft-CNJ2CwyE.js} +2 -2
  133. package/_assets/{parseSignature-DYiE9TKW.js → parseSignature-D0-1k6Yx.js} +1 -1
  134. package/_assets/{parseSignature-C_OIotiZ.js → parseSignature-whU_pkfu.js} +3 -3
  135. package/_assets/{passkeys-B1XwJZLc.js → passkeys-SqHHDvyI.js} +1 -1
  136. package/_assets/{pay-with-exchange-CNHEYWhj.js → pay-with-exchange-Cvr7dd94.js} +1 -1
  137. package/_assets/promo-best-rated-emotes-C6kNvB-a.png +0 -0
  138. package/_assets/promo-week-selected-outfits-BBmkZYZx.png +0 -0
  139. package/_assets/{qr-overlay-xYKFPsA7.js → qr-overlay-HlBTd234.js} +1 -1
  140. package/_assets/{receive-CZ46hzUV.js → receive-HPltMi_i.js} +1 -1
  141. package/_assets/{resolveImplementation-CjcXKJyr.js → resolveImplementation-CM1yFlGf.js} +1 -1
  142. package/_assets/{rpc-CcyaVsGv.js → rpc-CPS_djFB.js} +1 -1
  143. package/_assets/{secp256k1-CKJqWWFY.js → secp256k1-CQmdb_AD.js} +1 -1
  144. package/_assets/{secp256k1-CtAF_8et.js → secp256k1-ChRNiO68.js} +1 -1
  145. package/_assets/{secp256k1-ZiNVKyYC.js → secp256k1-DUTfCpIK.js} +1 -1
  146. package/_assets/{send-batch-transaction-BjDzAjfB.js → send-batch-transaction-Vn4JOFM5.js} +1 -1
  147. package/_assets/{send-eip712-transaction-C_cuPsBN.js → send-eip712-transaction-Qvibiwhe.js} +2 -2
  148. package/_assets/{send-gasless-transaction-nJMNrEi5.js → send-gasless-transaction-DQLcvFHt.js} +2 -2
  149. package/_assets/{send-transaction-DlrF4JVI.js → send-transaction-CZ0kapdy.js} +2 -2
  150. package/_assets/{send-C3JUT-Wt.js → send-zy_Vr6BQ.js} +1 -1
  151. package/_assets/{sendMetaTransaction-CYTRgQS4.js → sendMetaTransaction-Ba_-1nOk.js} +1 -1
  152. package/_assets/{sendRawTransaction-CrjHCLLH.js → sendRawTransaction-BUz1EYd8.js} +3 -3
  153. package/_assets/{serializeTransaction-DCwr_uqm.js → serializeTransaction-B8qCVIIu.js} +1 -1
  154. package/_assets/{session-proposal-Cr_4TYaU.js → session-proposal-BqO43SKO.js} +1 -1
  155. package/_assets/{session-request-VECe4LIn.js → session-request-DbQI-hjo.js} +2 -2
  156. package/_assets/{signing-DsQKDYvj.js → signing-CVGndCRE.js} +3 -3
  157. package/_assets/{skeleton.styles-B5haYcet.js → skeleton.styles-K9f1Sxf1.js} +1 -1
  158. package/_assets/{socials-B80b3Xbl.js → socials-CNOGl_eO.js} +1 -1
  159. package/_assets/{styled-qF6AFIDl.js → styled-CljNQW-J.js} +1 -1
  160. package/_assets/{swaps-9KfTzTvK.js → swaps-D5haogfk.js} +1 -1
  161. package/_assets/{thirdweb-C31f21KI.js → thirdweb-CC2bk-Up.js} +3 -3
  162. package/_assets/{to-serializable-transaction-DRO125BM.js → to-serializable-transaction-BB0M9pw8.js} +2 -2
  163. package/_assets/{transactionReceipt-D2IEagp9.js → transactionReceipt-puJsrtjz.js} +1 -1
  164. package/_assets/{transactions-COJcFMl1.js → transactions-BnYHwdat.js} +1 -1
  165. package/_assets/{useCreditPacks-UUgawD-U.js → useCreditPacks-xyyhS_80.js} +1 -1
  166. package/_assets/{useImportable-DdzyhNKj.js → useImportable-Bh7jH6e9.js} +1 -1
  167. package/_assets/{useInfiniteGrid-CWAXtPPS.js → useInfiniteGrid-CV4TXaLn.js} +1 -1
  168. package/_assets/{useTheme-nSt_zjh9.js → useTheme-Czw2-J4G.js} +1 -1
  169. package/_assets/{verifyHash-3joPxTRt.js → verifyHash-CAYWYGEG.js} +1 -1
  170. package/_assets/{w3m-modal-fllBGzZL.js → w3m-modal-DtofW43q.js} +1 -1
  171. package/_assets/{w3m-modal-BdMUp7-V.js → w3m-modal-Fr29zvJe.js} +1 -1
  172. package/_assets/{wait-for-tx-receipt-DLk5rirA.js → wait-for-tx-receipt-mfzWqQ40.js} +1 -1
  173. package/_assets/{wallets-p_5_3A7U.js → wallets-DT2LKaVF.js} +5 -5
  174. package/_assets/{web-connector-B1ItZy3i.js → web-connector-4TZSYYzx.js} +3 -3
  175. package/_assets/{writeContract-_6f7I-3C.js → writeContract-CEQ0n4-z.js} +1 -1
  176. package/_assets/{zoraTestnet-BegtFmVb.js → zoraTestnet-Cd1Th5ww.js} +1 -1
  177. package/index.html +11 -11
  178. package/package.json +2 -2
  179. package/_assets/Activity-Cx-gKp62.js +0 -381
  180. package/_assets/AnimatedBackground-yDvJglBx.js +0 -97
  181. package/_assets/Cart-C4zUzYSx.js +0 -669
  182. package/_assets/CollectionCarousel-BAwS8rTZ.js +0 -804
  183. package/_assets/LazyEmoteControls-BUp4tFZX.js +0 -2
  184. package/_assets/ManaPricingBanner.styles-Dj_122X4.js +0 -74
  185. package/_assets/collectionPage.styles-BOOK4JE1.js +0 -48
  186. package/_assets/disposePreview-C6zVmkpS.js +0 -1
  187. package/_assets/index-BL2RPpVH.js +0 -3390
  188. package/_assets/index-C3zA3tgr.js +0 -519
  189. package/_assets/index-D-NhBWWr.css +0 -1
  190. package/_assets/index-sW8OdK66.js +0 -1
  191. package/_assets/packs-backdrop-BcXiUPeP.webp +0 -0
@@ -1,804 +0,0 @@
1
- import{j as e,r as v}from"./react-BYHuwl8r.js";import{s as t,t as s,b as m,z as k,L as $,bW as C,C as Y,w as X,I as U,F as Z,g as W,h as B,f as q,at as J,aa as ee,b_ as F,ar as te}from"./index-BL2RPpVH.js";import{s as ne,f as _,A as H,g as K,r as ae,m as ie,i as oe,j as se}from"./authorizations-2Xd-ft_C.js";import{i as re}from"./errors-hu6Xw0D2.js";import{E as ce}from"./ErrorNotice-C_rQ_hZp.js";import{l as de,m as le,n as pe}from"./buy-CgUGATyG.js";import{s as he,M as ue,E as xe}from"./sendMetaTransaction-CYTRgQS4.js";import{I as ge,C as fe}from"./ethers-BDpbhgX6.js";const R="shop:resume_after_signin",me=900*1e3;function ct(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function dt(a){let n;try{n=sessionStorage.getItem(R)}catch{return null}if(!n)return null;try{sessionStorage.removeItem(R)}catch{}let i;try{i=JSON.parse(n)}catch{return null}return!i||i.type!==a||typeof i.at!="number"||Date.now()-i.at>me?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function be(a,n){return(a+n-1n)/n}function ye(a,n,i){return a<=0||n<=0?0n:a>=n?i:be(i*BigInt(a),BigInt(n))}function lt(a){var b,h,w;const n=Number.isFinite(a.priceCents)?Math.max(0,Math.trunc(a.priceCents)):0,i=Number.isFinite(a.balanceCents)?Math.max(0,Math.trunc(a.balanceCents)):0,o=a.priceManaWei>0n?a.priceManaWei:0n,l=a.manaBalanceWei>0n?a.manaBalanceWei:0n;if(n<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=n&&c.push({method:"credits",creditsCents:n,manaWei:0n}),o>0n&&i>0&&i<n){const d=n-i,y=ye(d,n,o);l>=y&&c.push({method:"combined",creditsCents:i,manaWei:y})}o>0n&&l>=o&&c.push({method:"mana",creditsCents:0,manaWei:o});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((h=c.find(d=>d.method==="combined"))==null?void 0:h.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,g=!c.some(d=>d.method==="mana"||d.method==="combined")&&o>0n&&l>0n?{manaWei:l,manaCents:we(l,n,o),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:g}}function we(a,n,i){return Number(a*BigInt(n)/i)}function pt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(o=>{const l=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(l,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ht(a,n){return a.options.find(i=>i.method===n)??null}function ut(a,n){if(!Number.isFinite(a)||a<=0||n<=0n)return null;const i=a/10;return Number(n)/1e18/i}const T="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ve=t.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 12px;
5
- align-items: stretch;
6
- width: 100%;
7
- `,O=`
8
- width: 100%;
9
- min-height: 56px;
10
- display: flex;
11
- align-items: center;
12
- justify-content: center;
13
- gap: 8px;
14
- flex-wrap: wrap;
15
- padding: 0 12px;
16
- border: 0;
17
- border-radius: 12px;
18
- cursor: pointer;
19
- transition:
20
- background 0.15s ease,
21
- filter 0.15s ease;
22
- font-family: ${s.font.sans};
23
- font-weight: 600;
24
- font-size: 15px;
25
- line-height: 24px;
26
- letter-spacing: 0.46px;
27
- text-transform: uppercase;
28
- color: ${s.colors.softWhite};
29
-
30
- &:focus-visible {
31
- outline: 2px solid ${s.colors.accent};
32
- outline-offset: 2px;
33
- }
34
- &:disabled {
35
- opacity: 0.6;
36
- cursor: default;
37
- }
38
- `,D=t.button`
39
- ${O}
40
- background: ${s.gradients.amethyst};
41
-
42
- &:hover:not(:disabled) {
43
- filter: brightness(1.08);
44
- }
45
- `,N=t.button`
46
- ${O}
47
- background: ${s.colors.text2};
48
-
49
- &:hover:not(:disabled) {
50
- background: ${s.colors.gray0};
51
- }
52
- `,M=t.span`
53
- display: inline-flex;
54
- align-items: center;
55
- gap: 6px;
56
- text-transform: none;
57
- letter-spacing: 0;
58
-
59
- span {
60
- font-size: 20px;
61
- font-weight: 600;
62
- line-height: normal;
63
- }
64
- .ico {
65
- width: 24px;
66
- height: 24px;
67
- background: ${s.colors.softWhite};
68
- }
69
- `,E=t.span`
70
- position: relative;
71
- display: block;
72
- width: 30px;
73
- height: 30px;
74
- flex: none;
75
-
76
- /* Centred in the slot, not pinned to its top: the slot is taller than the glyph and sits next to a
77
- vertically centred amount, so a top-pinned mark reads as floating above the number. */
78
- img {
79
- position: absolute;
80
- top: 50%;
81
- left: 0;
82
- transform: translateY(-50%);
83
- width: 24px;
84
- height: 24px;
85
- display: block;
86
- }
87
- `,ke=t.span`
88
- font-size: 13px;
89
- font-weight: 600;
90
- letter-spacing: 0.02em;
91
- opacity: 0.85;
92
- `,je=t.span`
93
- font-size: 18px;
94
- font-weight: 600;
95
- opacity: 0.7;
96
- `,$e=t.p`
97
- margin: 0;
98
- font-family: ${s.font.sans};
99
- font-weight: 400;
100
- font-size: 12px;
101
- line-height: 1;
102
- color: ${s.colors.muted};
103
- text-align: center;
104
- `,Ce=t.p`
105
- margin: -4px 0 0;
106
- font-family: ${s.font.sans};
107
- font-weight: 400;
108
- font-size: 12px;
109
- line-height: 1.4;
110
- color: ${s.colors.muted};
111
- text-align: center;
112
- `;function xt({options:a,totalCents:n,onPay:i,busy:o=!1,rateNote:l,creditsLabel:c,shortfall:p,showCreditsAmount:x=!0,creditsFallback:g=null}){const b=a.some(h=>h.method==="credits");return e.jsxs(ve,{children:[!b&&g?e.jsx(D,{type:"button","data-testid":"pay-with-credits-topup",onClick:g.onClick,disabled:o,children:e.jsx("span",{children:g.label})}):null,a.map(h=>h.method==="credits"?e.jsxs(D,{type:"button","data-testid":"pay-with-credits",onClick:()=>i("credits"),disabled:o,children:[e.jsx("span",{children:c??m("buyModal.buy")}),x?e.jsxs(M,{children:[e.jsx(k,{}),e.jsx("span",{children:$(z(h.creditsCents))})]}):null]},"credits"):h.method==="mana"?e.jsxs(N,{type:"button","data-testid":"pay-with-mana",onClick:()=>i("mana"),disabled:o,children:[e.jsx("span",{children:m("buyModal.buyWithMana")}),e.jsxs(M,{children:[e.jsx(E,{children:e.jsx("img",{src:T,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(h.manaWei)})]})]},"mana"):e.jsxs(N,{type:"button","data-testid":"pay-with-combined",onClick:()=>i("combined"),disabled:o,children:[e.jsx("span",{children:m("buyModal.buyWith")}),e.jsxs(M,{children:[e.jsx(k,{}),e.jsx("span",{children:$(z(h.creditsCents))}),e.jsx(je,{children:"+"}),e.jsx(E,{children:e.jsx("img",{src:T,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(h.manaWei)}),e.jsx(ke,{children:"MANA"})]})]},"combined")),p?e.jsxs(e.Fragment,{children:[e.jsxs(N,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[e.jsx("span",{children:m("buyModal.buyWithMana")}),e.jsxs(M,{children:[e.jsx(E,{children:e.jsx("img",{src:T,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(p.manaWei)})]})]},"mana-short"),e.jsx(Ce,{"data-testid":"mana-shortfall-note",children:m("buyModal.manaWorth",{mana:C(p.manaWei),credits:$(z(p.manaCents)),price:$(z(p.priceCents)),currency:Y.name})})]}):null,l?e.jsx($e,{"data-testid":"mana-rate-note",children:l}):null,e.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:n})]})}function gt(a,n){const i=(o,...l)=>void a.invalidateQueries({queryKey:n?[o,...l]:[o]});a.invalidateQueries({queryKey:["usd-balance"]}),a.invalidateQueries({queryKey:["detail-trade"]}),a.invalidateQueries({queryKey:["shop-item"]}),i("owned-token",n==null?void 0:n.contractAddress,n==null?void 0:n.tokenId),i("public-token",n==null?void 0:n.contractAddress,n==null?void 0:n.tokenId),i("item-resales",n==null?void 0:n.contractAddress,n==null?void 0:n.itemId),a.invalidateQueries({queryKey:["shop-items"]}),a.invalidateQueries({queryKey:["catalog-items"]}),a.invalidateQueries({queryKey:["overview-listings"]}),a.invalidateQueries({queryKey:["upsell-listings"]}),a.invalidateQueries({queryKey:["my-assets"]}),a.invalidateQueries({queryKey:["purchases"]}),a.invalidateQueries({queryKey:["owned-item-count"]})}const ze=X`
113
- to { transform: rotate(360deg); }
114
- `,Me=t.div`
115
- position: fixed;
116
- inset: 0;
117
- z-index: 10000;
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- padding: 16px;
122
- background: rgba(22, 21, 24, 0.55);
123
- `,Ae=t.div`
124
- width: 480px;
125
- max-width: 100%;
126
- max-height: 92vh;
127
- overflow-y: auto;
128
- background: ${s.colors.white};
129
- border-radius: 16px;
130
- padding: 12px 16px 16px;
131
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
132
- display: flex;
133
- flex-direction: column;
134
- gap: 20px;
135
- `,We=t.div`
136
- display: flex;
137
- align-items: center;
138
- justify-content: space-between;
139
- gap: 8px;
140
- padding-bottom: 16px;
141
- border-bottom: 1px solid ${s.colors.gray4};
142
- `,Ie=t.h2`
143
- margin: 0;
144
- font-family: ${s.font.sans};
145
- font-weight: 600;
146
- font-size: 20px;
147
- line-height: 1.6;
148
- color: ${s.colors.text};
149
- `,Se=t.button`
150
- flex: none;
151
- display: grid;
152
- place-items: center;
153
- width: 24px;
154
- height: 24px;
155
- border: 0;
156
- background: none;
157
- cursor: pointer;
158
- color: ${s.colors.text};
159
-
160
- .ico {
161
- width: 18px;
162
- height: 18px;
163
- }
164
- &:disabled {
165
- opacity: 0.4;
166
- cursor: default;
167
- }
168
- &:focus-visible {
169
- outline: 2px solid ${s.colors.accent};
170
- outline-offset: 2px;
171
- }
172
- `,Te=t.div`
173
- display: grid;
174
- grid-template-columns: 44px 1fr;
175
- align-items: center;
176
- gap: 14px;
177
- padding: 14px 18px;
178
- background: ${s.colors.white};
179
- border: 1px solid ${s.colors.line};
180
- border-radius: 16px;
181
- `,Ne=t.div`
182
- width: 44px;
183
- height: 44px;
184
- border-radius: 10px;
185
- background: ${s.colors.media};
186
- overflow: hidden;
187
- display: flex;
188
- align-items: center;
189
- justify-content: center;
190
- color: ${s.colors.muted2};
191
-
192
- img {
193
- width: 100%;
194
- height: 100%;
195
- object-fit: contain;
196
- }
197
- .ccy-mark {
198
- width: 26px;
199
- height: 26px;
200
- }
201
- `,Ee=t.div`
202
- min-width: 0;
203
- display: flex;
204
- flex-direction: column;
205
- gap: 4px;
206
- `,Be=t.span`
207
- font-weight: 700;
208
- color: ${s.colors.text};
209
- `,Re=t.span`
210
- font-size: 13px;
211
- line-height: 1.45;
212
- color: ${s.colors.muted};
213
- `,Le=t.p`
214
- margin: 0;
215
- font-size: 12px;
216
- line-height: 1.5;
217
- color: ${s.colors.muted2};
218
- `,Pe=t.div`
219
- display: flex;
220
- gap: 12px;
221
-
222
- ${s.media.maxWidth("mobile")} {
223
- flex-direction: column-reverse;
224
- }
225
- `,Fe=t.button`
226
- flex: 1 1 0;
227
- height: 48px;
228
- border: 2px solid ${s.colors.accent};
229
- border-radius: 12px;
230
- background: transparent;
231
- color: ${s.colors.accent};
232
- cursor: pointer;
233
- font-family: ${s.font.sans};
234
- font-weight: 600;
235
- font-size: 13px;
236
- line-height: 24px;
237
- letter-spacing: 0.46px;
238
- text-transform: uppercase;
239
-
240
- &:hover:not(:disabled) {
241
- background: rgba(105, 31, 169, 0.06);
242
- }
243
- &:disabled {
244
- cursor: default;
245
- opacity: 0.5;
246
- }
247
- &:focus-visible {
248
- outline: 2px solid ${s.colors.accent};
249
- outline-offset: 2px;
250
- }
251
- `,Ke=t.button`
252
- flex: 1 1 0;
253
- display: inline-flex;
254
- align-items: center;
255
- justify-content: center;
256
- gap: 8px;
257
- height: 48px;
258
- border: 0;
259
- border-radius: 12px;
260
- background: ${s.colors.accent};
261
- color: ${s.colors.softWhite};
262
- cursor: pointer;
263
- font-family: ${s.font.sans};
264
- font-weight: 600;
265
- font-size: 13px;
266
- line-height: 24px;
267
- letter-spacing: 0.46px;
268
- text-transform: uppercase;
269
-
270
- &:hover:not(:disabled) {
271
- background: ${s.colors.accentHover};
272
- }
273
- &:disabled {
274
- cursor: default;
275
- background: rgba(105, 31, 169, 0.4);
276
- }
277
- &:focus-visible {
278
- outline: 2px solid ${s.colors.accent};
279
- outline-offset: 2px;
280
- }
281
- `,De=t.span`
282
- width: 16px;
283
- height: 16px;
284
- border-radius: 50%;
285
- border: 2px solid rgba(255, 255, 255, 0.5);
286
- border-top-color: ${s.colors.white};
287
- animation: ${ze} 0.7s linear infinite;
288
-
289
- @media (prefers-reduced-motion: reduce) {
290
- animation: none;
291
- }
292
- `;function ft({auth:a,signer:n,title:i,reason:o,name:l,image:c,icon:p,onAuthorized:x,onCancel:g,onClose:b}){const[h,w]=v.useState(!1),[d,y]=v.useState(null);async function j(){w(!0),y(null);try{await ne({auth:a,signer:n,active:!0}),x()}catch(u){re(u)?y(m("authorizeStep.errorRejected")):(Z(u,{flow:"authorize_step",kind:a.kind}),y(m("authorizeStep.errorGeneric"))),w(!1)}}return e.jsx(Me,{onClick:h?void 0:b,role:"presentation",children:e.jsxs(Ae,{onClick:u=>u.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":i,children:[e.jsxs(We,{children:[e.jsx(Ie,{children:i}),e.jsx(Se,{onClick:b,disabled:h,"aria-label":m("authorizeStep.close"),children:e.jsx(U,{name:"close",className:"ico"})})]}),e.jsxs(Te,{"data-testid":"authorize-step-row",children:[e.jsx(Ne,{children:c?e.jsx("img",{src:c,alt:""}):p}),e.jsxs(Ee,{children:[e.jsx(Be,{title:l,children:l}),e.jsx(Re,{children:o})]})]}),e.jsx(Le,{children:m("authorizeStep.note")}),e.jsx(ce,{message:d}),e.jsxs(Pe,{children:[e.jsx(Fe,{type:"button",onClick:g,disabled:h,children:m("authorizeStep.cancel")}),e.jsx(Ke,{type:"button","data-testid":"authorize-step-action",onClick:()=>void j(),disabled:h,children:h?e.jsxs(e.Fragment,{children:[e.jsx(De,{"aria-hidden":!0}),m("authorizeStep.authorizing")]}):m("authorizeStep.authorize")})]})]})})}async function mt(a){const[n]=await Qe({...a,trades:[a.trade]});return n}async function Qe(a){const{trades:n,buyer:i,signer:o,onSigned:l}=a;if(n.length===0)throw new Error("No items to buy");const c=new Map;for(const x of n){const g=`${x.chainId}:${x.contract.toLowerCase()}`,b=c.get(g);b?b.push(x):c.set(g,[x])}const p=[];for(const x of c.values())p.push(await Ue({trades:x,buyer:i,signer:o,onSigned:l}));return p}async function Ue(a){const{trades:n,buyer:i,signer:o,onSigned:l}=a,c=n[0],p=W(q(c.contract),c.chainId),x=W(B.MANAToken,c.chainId);await _({auth:{kind:H.Allowance,contractAddress:x.address,spenderAddress:p.address,chainId:c.chainId},signer:o});const g=n.map(d=>le(d,i));if(K.enabled)try{const d=new ge(p.abi).encodeFunctionData("accept",[g]),y=ae(),j=ie(o.provider,y),u=await he(j,y,d,p,{serverURL:K.relayerUrl});return l==null||l(),await oe(u,"the MANA purchase"),u}catch(d){if(d instanceof ue&&d.code===xe.USER_DENIED||d instanceof se)throw d;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",d)}await J(o.provider,c.chainId);const h=await new fe(p.address,p.abi,o).accept(g,pe(c.chainId));return l==null||l(),(await h.wait()).transactionHash}async function bt(a){const{trade:n,buyer:i,signer:o,credits:l,manaGapWei:c,onBroadcast:p,onReverted:x}=a;if(l.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(c<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const g=W(B.MANAToken,n.chainId),b=W(B.CreditsManager,n.chainId);await _({auth:{kind:H.Allowance,contractAddress:g.address,spenderAddress:b.address,chainId:n.chainId},signer:o});const w=(l.reduce((d,y)=>d+BigInt(y.availableAmount),0n)+c).toString();return de({trade:n,buyer:i,signer:o,credits:l,maxCreditedValue:w,onBroadcast:p,onReverted:x})}function yt(a){return e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...a,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function wt(a){return e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,...a,children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]})}const{colors:r,gradients:V,radius:G,z:_e}=s,vt=t.div`
293
- position: fixed;
294
- inset: 0;
295
- z-index: ${_e.overlay};
296
- display: flex;
297
- overflow-y: auto;
298
- padding: 20px;
299
- `,kt=t.div`
300
- position: fixed;
301
- inset: 0;
302
- background: rgba(22, 21, 24, 0.45);
303
- `,jt=t.div`
304
- position: relative;
305
- z-index: 1;
306
- margin: auto;
307
- width: 100%;
308
- /* Wide enough to fit all 4 credit bundles comfortably in a single row (the credits-server returns 4;
309
- the Figma mock showed 3 at ~180px). The pack tiles flex to share this width. */
310
- max-width: 700px;
311
- /* Flex-item auto-minimum can otherwise push the card past the viewport on a narrow screen. */
312
- min-width: 0;
313
- /* Never taller than the viewport (100% of the padded overlay): the no-funds state stacks a warning, a
314
- line list, 4 pack tiles, the total AND the Cancel/Buy pair, which overflows a laptop screen at 100%
315
- zoom and used to take the CTAs off-screen with it. The body absorbs the difference, and the clip is
316
- the backstop — a phase that forgets to make itself shrinkable is then visibly cut off at the card's
317
- edge instead of painting its buttons out on the scrim. */
318
- max-height: 100%;
319
- overflow: hidden;
320
- background: ${r.white};
321
- border-radius: 16px;
322
- padding: 12px 16px 16px;
323
- box-shadow: 0 24px 60px rgba(22, 21, 24, 0.28);
324
- animation: cart-pop-in 0.16s ease;
325
- display: flex;
326
- flex-direction: column;
327
- gap: 24px;
328
-
329
- &[data-tall] {
330
- min-height: 379px;
331
- justify-content: space-between;
332
- }
333
- `,$t=t.div`
334
- display: flex;
335
- flex-direction: column;
336
- gap: 4px;
337
- padding-bottom: 16px;
338
- border-bottom: 1px solid ${r.gray4};
339
- `,Ct=t.div`
340
- display: flex;
341
- align-items: flex-start;
342
- justify-content: space-between;
343
- gap: 8px;
344
- `,zt=t.h2`
345
- margin: 0;
346
- font-size: 20px;
347
- font-weight: 600;
348
- line-height: 1.6;
349
- color: ${r.text};
350
- `,Mt=t.button`
351
- flex-shrink: 0;
352
- border: 0;
353
- background: transparent;
354
- cursor: pointer;
355
- padding: 2px;
356
- line-height: 0;
357
- `,At=t.div`
358
- display: flex;
359
- align-items: center;
360
- gap: 4px;
361
- `,Wt=t.span`
362
- font-size: 14px;
363
- font-weight: 600;
364
- color: ${r.muted1};
365
- `,It=t(k)`
366
- width: 14px;
367
- height: 14px;
368
- background: ${r.text};
369
- `,St=t.span`
370
- font-size: 14px;
371
- color: ${r.text};
372
- `,Tt=t.div`
373
- display: flex;
374
- flex-direction: column;
375
- gap: 24px;
376
- /* Shrink inside a viewport-capped card instead of overflowing it. Anything with its own flexible
377
- region (e.g. the cart's line list) gives up height first; this scroll is the last resort so the
378
- CTAs are always reachable on a short screen. */
379
- min-height: 0;
380
- overflow-y: auto;
381
-
382
- /* Processing / loading states centre a single element in a taller body. */
383
- &[data-processing] {
384
- flex: 1;
385
- align-items: center;
386
- justify-content: center;
387
- gap: 32px;
388
- padding: 24px 0;
389
- }
390
- `,Nt=t.div`
391
- display: flex;
392
- gap: 12px;
393
- align-items: center;
394
- `,Et=t.div`
395
- flex-shrink: 0;
396
- width: 180px;
397
- height: 180px;
398
- background: ${r.media};
399
- border: 1px solid ${r.muted2};
400
- border-radius: 16px;
401
- display: grid;
402
- place-items: center;
403
- overflow: hidden;
404
-
405
- & img {
406
- width: 83%;
407
- height: 83%;
408
- object-fit: contain;
409
- filter: drop-shadow(0.7px 2.9px 3.7px rgba(0, 0, 0, 0.1));
410
- }
411
- `,Bt=t.div`
412
- flex: 1;
413
- min-width: 0;
414
- display: flex;
415
- flex-direction: column;
416
- gap: 32px;
417
- padding: 8px;
418
- `,Rt=t.div`
419
- font-size: 20px;
420
- font-weight: 600;
421
- line-height: 1.57;
422
- color: ${r.text};
423
- overflow: hidden;
424
- text-overflow: ellipsis;
425
- `,Lt=t(ee)`
426
- font-size: 10px;
427
- line-height: 1.43;
428
- color: ${r.muted};
429
- `,Pt=t.div`
430
- display: flex;
431
- align-items: center;
432
- gap: 4px;
433
-
434
- & span {
435
- font-size: 24px;
436
- font-weight: 600;
437
- color: ${r.text2};
438
- }
439
- `,Ft=t(k)`
440
- width: 24px;
441
- height: 24px;
442
- background: ${r.text2};
443
- `,Kt=t.div`
444
- display: flex;
445
- align-items: center;
446
- gap: 8px;
447
- justify-content: center;
448
- background: rgba(255, 162, 90, 0.3);
449
- border-radius: ${G.btn};
450
- padding: 12px 8px;
451
- `,Dt=t.p`
452
- margin: 0;
453
- font-size: 14px;
454
- line-height: 1.334;
455
- color: ${r.text2};
456
- text-align: center;
457
-
458
- & b {
459
- font-weight: 700;
460
- }
461
- `,Qt=t.div`
462
- display: flex;
463
- gap: 12px;
464
- `,Ut=t.button`
465
- flex: 1;
466
- height: 109px;
467
- border: 1px solid ${r.muted2};
468
- background: ${r.media};
469
- border-radius: 16px;
470
- display: flex;
471
- align-items: center;
472
- justify-content: center;
473
- gap: 8px;
474
- cursor: pointer;
475
- transition: border-color 0.12s ease;
476
-
477
- &[data-on] {
478
- border: 4px solid ${r.magenta};
479
- }
480
- `,_t=t(k)`
481
- width: 24px;
482
- height: 24px;
483
- background: ${r.text};
484
- `,Ht=t.span`
485
- font-size: 24px;
486
- font-weight: 500;
487
- color: ${r.text};
488
- `,Ot=t.span`
489
- font-size: 14px;
490
- color: ${r.text};
491
- `,Vt=t.div`
492
- display: flex;
493
- align-items: center;
494
- justify-content: space-between;
495
- border-top: 1px solid ${r.gray4};
496
- padding-top: 12px;
497
- `,Gt=t.div`
498
- display: flex;
499
- align-items: center;
500
- gap: 8px;
501
- font-size: 24px;
502
- font-weight: 700;
503
- color: ${r.text};
504
- `,Yt=t(k)`
505
- width: 30px;
506
- height: 30px;
507
- background: ${r.text};
508
- `,Xt=t.span`
509
- font-size: 14px;
510
- font-weight: 600;
511
- color: ${r.muted1};
512
- `,Zt=t.div`
513
- position: sticky;
514
- bottom: 0;
515
- display: flex;
516
- gap: 12px;
517
- margin-top: -8px;
518
- padding-top: 8px;
519
- background: ${r.white};
520
- `,qt=t.button`
521
- flex: 1;
522
- /* Let the CTAs shrink so their min-content can't widen the modal past the viewport on mobile. */
523
- min-width: 0;
524
- height: 46px;
525
- border-radius: ${G.btn};
526
- border: 0;
527
- cursor: pointer;
528
- font-size: 15px;
529
- font-weight: 600;
530
- letter-spacing: 0.46px;
531
- text-transform: uppercase;
532
- display: inline-flex;
533
- align-items: center;
534
- justify-content: center;
535
- gap: 8px;
536
-
537
- &[data-full] {
538
- width: 100%;
539
- }
540
- &[data-variant='gradient'] {
541
- background: ${V.amethyst};
542
- color: ${r.softWhite};
543
- }
544
- &[data-variant='outline'] {
545
- background: transparent;
546
- border: 2px solid ${r.accent};
547
- color: ${r.accent};
548
- font-size: 13px;
549
- }
550
- &[data-variant='ruby'] {
551
- background: ${r.dclRed};
552
- color: ${r.softWhite};
553
- font-size: 13px;
554
- letter-spacing: 0.61px;
555
- }
556
- // Solid accent fill (the error state's "Try again").
557
- &[data-variant='purple'] {
558
- background: ${r.accent};
559
- color: ${r.softWhite};
560
- font-size: 13px;
561
- }
562
- &:disabled {
563
- opacity: 0.6;
564
- cursor: default;
565
- }
566
- `,Jt=t.img`
567
- width: 61px;
568
- height: 61px;
569
- `,en=t.div`
570
- display: flex;
571
- flex-direction: column;
572
- align-items: center;
573
- gap: 16px;
574
- background: rgba(255, 201, 213, 0.5);
575
- border-radius: 16px;
576
- padding: 24px 16px;
577
- `,tn=t.img`
578
- width: 64px;
579
- height: 80px;
580
- object-fit: contain;
581
- `,nn=t.p`
582
- margin: 0;
583
- text-align: center;
584
- font-size: 20px;
585
- line-height: 1.334;
586
- font-weight: 400;
587
- color: ${r.text2};
588
-
589
- & b {
590
- font-weight: 700;
591
- }
592
- `,an=t.div`
593
- font-size: 20px;
594
- font-weight: 700;
595
- color: ${r.text2};
596
- text-align: center;
597
- `,on=t.div`
598
- width: 100%;
599
- max-width: 456px;
600
- height: 12px;
601
- background: ${r.media};
602
- border-radius: 100px;
603
- overflow: hidden;
604
- `,sn=t.span`
605
- display: block;
606
- height: 100%;
607
- width: 40%;
608
- border-radius: 100px;
609
- background: ${V.amethyst};
610
- animation: buy-modal-progress 1.1s ease-in-out infinite;
611
-
612
- @keyframes buy-modal-progress {
613
- 0% {
614
- transform: translateX(-120%);
615
- }
616
- 100% {
617
- transform: translateX(320%);
618
- }
619
- }
620
-
621
- &[data-step] {
622
- animation: none;
623
- min-width: 12px;
624
- transition: width 0.35s ease;
625
- }
626
- `,rn=t.div`
627
- display: flex;
628
- flex-direction: column;
629
- align-items: center;
630
- gap: 16px;
631
- background: rgba(193, 238, 207, 0.5);
632
- border-radius: 16px;
633
- padding: 24px 16px;
634
-
635
- &[data-wide] {
636
- flex-direction: row;
637
- align-items: center;
638
- gap: 24px;
639
- padding: 16px 24px;
640
- }
641
- @media (max-width: 600px) {
642
- &[data-wide] {
643
- flex-direction: column;
644
- gap: 12px;
645
- padding: 16px;
646
- }
647
- }
648
- `,cn=t.p`
649
- margin: 0;
650
- font-size: 20px;
651
- line-height: 1.334;
652
- color: ${r.text2};
653
- text-align: center;
654
-
655
- & b {
656
- font-weight: 700;
657
- }
658
-
659
- &[data-wide] {
660
- text-align: left;
661
- font-size: 18px;
662
- }
663
- @media (max-width: 600px) {
664
- &[data-wide] {
665
- text-align: center;
666
- }
667
- }
668
- `,{colors:I,media:A}=s,He=t.section`
669
- margin-top: 40px;
670
- `,Oe=t.div`
671
- display: flex;
672
- align-items: center;
673
- justify-content: space-between;
674
- margin-bottom: 20px;
675
- `,Ve=t.h2`
676
- font-size: 22px;
677
- font-weight: 700;
678
- color: ${I.text};
679
- `,Ge=t.button`
680
- display: inline-flex;
681
- align-items: center;
682
- gap: 4px;
683
- background: none;
684
- border: 0;
685
- padding: 0;
686
- color: ${I.accent};
687
- font-weight: 700;
688
- font-size: 13px;
689
- letter-spacing: 0.046em;
690
- text-transform: uppercase;
691
- cursor: pointer;
692
- white-space: nowrap;
693
-
694
- &:hover {
695
- text-decoration: underline;
696
- }
697
- `,Ye=t(U)`
698
- transform: rotate(-90deg);
699
- `,Xe=t.div`
700
- position: relative;
701
- `,Q=t.button`
702
- position: absolute;
703
- top: 112px;
704
- transform: translateY(-50%);
705
- z-index: 5;
706
- width: 53px;
707
- height: 53px;
708
- padding: 0;
709
- border: 0;
710
- background: transparent;
711
- cursor: pointer;
712
- filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
713
- transition:
714
- transform 0.15s ease,
715
- filter 0.15s ease,
716
- opacity 0.15s ease;
717
-
718
- & img {
719
- display: block;
720
- width: 100%;
721
- height: 100%;
722
- }
723
- // Sit the arrows in the page gutter (aligned to the nav's 54px), not over the cards — at -40px their
724
- // inner edge landed ~13px onto the first/last card.
725
- &[data-side='left'] {
726
- left: -53px;
727
- }
728
- &[data-side='right'] {
729
- right: -53px;
730
- }
731
- &[data-side='left'] img {
732
- transform: scaleX(-1);
733
- }
734
- &:hover:not(:disabled) {
735
- transform: translateY(-50%) scale(1.07);
736
- }
737
- &:disabled {
738
- opacity: 0;
739
- pointer-events: none;
740
- }
741
-
742
- @media (prefers-reduced-motion: reduce) {
743
- transition: none;
744
- }
745
- ${A.maxWidth("lg")} {
746
- display: none;
747
- }
748
- `,Ze=t.div`
749
- display: grid;
750
- grid-auto-flow: column;
751
- grid-auto-columns: calc((100% - 64px) / 5);
752
- gap: 16px;
753
- overflow-x: auto;
754
- overflow-y: hidden;
755
- padding: 12px 14px;
756
- margin-left: -14px;
757
- scroll-padding-inline: 14px;
758
- scroll-snap-type: x mandatory;
759
- scrollbar-width: none;
760
-
761
- &::-webkit-scrollbar {
762
- display: none;
763
- }
764
- & > * {
765
- scroll-snap-align: start;
766
- }
767
- ${A.maxWidth("xl")} {
768
- grid-auto-columns: calc((100% - 48px) / 4);
769
- }
770
- ${A.maxWidth("lg")} {
771
- grid-auto-columns: calc((100% - 32px) / 3);
772
- }
773
- ${A.maxWidth("sm")} {
774
- grid-auto-columns: calc((100% - 16px) / 2);
775
- }
776
- `,qe=t.div`
777
- display: flex;
778
- align-items: center;
779
- justify-content: center;
780
- gap: 8px;
781
- margin-top: 18px;
782
- `,Je=t.button`
783
- width: 10px;
784
- height: 10px;
785
- border-radius: 50%;
786
- border: 0;
787
- padding: 0;
788
- background: ${I.lineStrong};
789
- opacity: 0.5;
790
- cursor: pointer;
791
- transition:
792
- opacity 0.12s ease,
793
- background 0.12s ease,
794
- transform 0.12s ease;
795
-
796
- &:hover {
797
- opacity: 0.8;
798
- }
799
- &[data-active] {
800
- background: ${I.accent};
801
- opacity: 1;
802
- transform: scale(1.1);
803
- }
804
- `;function dn({title:a,items:n,onViewAll:i}){const o=v.useRef(null),[l,c]=v.useState(1),[p,x]=v.useState(0),[g,b]=v.useState(!0),[h,w]=v.useState(!1),d=v.useCallback(()=>{const u=o.current;if(!u)return;const{scrollLeft:f,scrollWidth:L,clientWidth:S}=u,P=Math.max(1,Math.ceil(L/S));c(P),x(Math.min(P-1,Math.round(f/S))),b(f<=1),w(f+S>=L-1)},[]);if(v.useEffect(()=>{d();const u=o.current;if(u)return u.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{u.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[d,n.length]),n.length===0)return null;function y(u){const f=o.current;f&&f.scrollBy({left:u*f.clientWidth,behavior:"smooth"})}function j(u){const f=o.current;f&&f.scrollTo({left:u*f.clientWidth,behavior:"smooth"})}return e.jsxs(He,{"data-testid":"carousel",children:[e.jsxs(Oe,{children:[e.jsx(Ve,{children:a}),i?e.jsxs(Ge,{onClick:i,children:[m("collectionCarousel.viewAll"),e.jsx(Ye,{name:"chevron-down",size:16})]}):null]}),e.jsxs(Xe,{children:[e.jsx(Q,{"data-side":"left",onClick:()=>y(-1),"aria-label":m("collectionCarousel.scrollLeft"),disabled:g,children:e.jsx("img",{src:F,alt:"","aria-hidden":!0})}),e.jsx(Ze,{ref:o,children:n.map(u=>e.jsx(te,{item:u},u.id))}),e.jsx(Q,{"data-side":"right",onClick:()=>y(1),"aria-label":m("collectionCarousel.scrollRight"),disabled:h,children:e.jsx("img",{src:F,alt:"","aria-hidden":!0})})]}),l>1?e.jsx(qe,{"aria-label":m("collectionCarousel.pages"),children:Array.from({length:l}).map((u,f)=>e.jsx(Je,{"data-active":f===p||void 0,"aria-label":m("collectionCarousel.goToPage",{page:f+1}),"aria-current":f===p?"true":void 0,onClick:()=>j(f)},f))}):null]})}export{z as $,Nt as A,At as B,jt as C,Ht as D,Ot as E,Vt as F,Gt as G,$t as H,Yt as I,Xt as J,lt as K,Jt as L,vt as M,dt as N,dn as O,xt as P,ft as Q,T as R,kt as S,zt as T,ct as U,gt as V,Kt as W,Mt as X,Qe as Y,pt as Z,ye as _,Ct as a,rn as a0,cn as a1,mt as a2,ht as a3,bt as a4,yt as b,Wt as c,It as d,St as e,Tt as f,en as g,tn as h,nn as i,Zt as j,qt as k,an as l,ut as m,on as n,sn as o,wt as p,Dt as q,Et as r,Bt as s,Rt as t,Lt as u,Pt as v,Ft as w,Qt as x,Ut as y,_t as z};