@dcl/shop 0.1.0-30835612462.commit-48765f9 → 0.1.0-30897342413.commit-036e931

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 (174) hide show
  1. package/_assets/{Activity-C96oKaM7.js → Activity-DUBRQnWV.js} +3 -3
  2. package/_assets/{AnimatedBackground-Cg4YrmHy.js → AnimatedBackground-CmAZhAYA.js} +1 -1
  3. package/_assets/Assets-NRrjcYA5.js +800 -0
  4. package/_assets/{Assets.styles-BO8jltml.js → Assets.styles-3wC-xeWp.js} +1 -1
  5. package/_assets/{Authorizations-D7hfFylo.js → Authorizations-aNMRQo6Q.js} +1 -1
  6. package/_assets/{Cart-DPW25tAG.js → Cart-zIOhAh9c.js} +2 -2
  7. package/_assets/{CircularProgress-B2h31Yy9.js → CircularProgress-LjKPNQUw.js} +1 -1
  8. package/_assets/{Collection-BS21SN6A.js → Collection-C46Ze7ov.js} +1 -1
  9. package/_assets/{CollectionCarousel-WI45XOFA.js → CollectionCarousel-B71TAj46.js} +1 -1
  10. package/_assets/Creator-D7kFPPn9.js +306 -0
  11. package/_assets/{ErrorNotice-q0dn0iRL.js → ErrorNotice-DNbl0Lx6.js} +1 -1
  12. package/_assets/{ExchangeController-Dtgh1od6.js → ExchangeController-B1JcnenY.js} +1 -1
  13. package/_assets/{GetCredits-D-jeDJ75.js → GetCredits-BLKTlUHn.js} +1 -1
  14. package/_assets/{HelpersUtil-D2_GPqxX.js → HelpersUtil-B004FVhm.js} +1 -1
  15. package/_assets/{ImportListings-BNjL24xn.js → ImportListings-CyzEyfcm.js} +6 -6
  16. package/_assets/{ItemDetail-BXpWKwPY.js → ItemDetail-apY0RKkT.js} +3 -3
  17. package/_assets/{LoadMore-DoQvuFO_.js → LoadMore-CvF1ryR6.js} +1 -1
  18. package/_assets/{MenuList-DOJfvyqr.js → MenuList-BmbNiqyv.js} +1 -1
  19. package/_assets/{MyAssets-DpQnCJPT.js → MyAssets-ClsL7CoM.js} +1 -1
  20. package/_assets/{MyFavorites-DFO63j-P.js → MyFavorites-VWLNpe0r.js} +1 -1
  21. package/_assets/{NotFound-BocUG6Wo.js → NotFound-DQHwDF1N.js} +1 -1
  22. package/_assets/{NotificationsBell-iaGtBsC9.js → NotificationsBell-C5ky0lqZ.js} +1 -1
  23. package/_assets/{StoreSettings-Bc_NBrxI.js → StoreSettings-CgbxKhUS.js} +1 -1
  24. package/_assets/{Success-BIMxdHvn.js → Success-C_SNXVeS.js} +1 -1
  25. package/_assets/{SwapController-DeKeu3FE.js → SwapController-DjUyjCYK.js} +1 -1
  26. package/_assets/{Tooltip-BLyu7Dfk.js → Tooltip-VDc8mbHU.js} +1 -1
  27. package/_assets/{TradeService-CWqv5slk.js → TradeService-T7Ac3zPB.js} +1 -1
  28. package/_assets/{W3MFrameProviderSingleton-1MRMKUrL.js → W3MFrameProviderSingleton-BGLSOpiV.js} +3 -3
  29. package/_assets/{WebCryptoP256-BAvl6xkt.js → WebCryptoP256-D7qVD_y0.js} +1 -1
  30. package/_assets/{authorizations-DDsnY_Zf.js → authorizations-BTC_bFln.js} +1 -1
  31. package/_assets/{basic-BzVRhtZ-.js → basic-8iVIK2Fo.js} +1 -1
  32. package/_assets/{biconomy-yl7EuW3B.js → biconomy-BreMnkVT.js} +1 -1
  33. package/_assets/{browseLayout.styles-u63rKyzf.js → browseLayout.styles-De0FGl5x.js} +1 -1
  34. package/_assets/{builder-BO6I7uZQ.js → builder-C4njBf3q.js} +1 -1
  35. package/_assets/{buy-gasless-Cxl5QDDd.js → buy-gasless-aqj0tOF3.js} +1 -1
  36. package/_assets/{buy-DN9Q4fmJ.js → buy-myGa3uAa.js} +1 -1
  37. package/_assets/{categories-DFgZJeSL.js → categories-A3Tq54j-.js} +1 -1
  38. package/_assets/{ccip-C9MO7Vbh.js → ccip-BeYige_y.js} +1 -1
  39. package/_assets/{ccip-5db1OYaq.js → ccip-NXlbV8_q.js} +1 -1
  40. package/_assets/{clsx-Dv5E4mS4.js → clsx-BETN9X51.js} +2 -2
  41. package/_assets/{controller-DNuVvFDa.js → controller-DL4fylV8.js} +2 -2
  42. package/_assets/{core-Do4xTqpU.js → core-D8ptIKw3.js} +4 -4
  43. package/_assets/{createSvgIcon-TyRUGFdQ.js → createSvgIcon-sbUQV66i.js} +4 -4
  44. package/_assets/{custom-Cdk30JmS.js → custom-BgXN6B3q.js} +1 -1
  45. package/_assets/{data-capture-DwwEo9Zw.js → data-capture-C-JR2KzF.js} +1 -1
  46. package/_assets/{email-DiU12yVh.js → email-DpFveLJ0.js} +1 -1
  47. package/_assets/{embedded-wallet-Gkjm7p7P.js → embedded-wallet-C2gUO5wT.js} +1 -1
  48. package/_assets/{emotion-styled.browser.esm-1jXvUKUZ.js → emotion-styled.browser.esm-DH8Xabrh.js} +1 -1
  49. package/_assets/{engine-BlXXh7Bj.js → engine-5oCjjcrK.js} +1 -1
  50. package/_assets/{errors-BshsHqbY.js → errors-DqL59l4z.js} +1 -1
  51. package/_assets/{estimate-l1-fee-Jhm2Yxur.js → estimate-l1-fee-BujsJkmp.js} +1 -1
  52. package/_assets/{execute-BrbMEhFX.js → execute-BvpVcytD.js} +2 -2
  53. package/_assets/{features-WtRCFBGN.js → features-hynqqeoJ.js} +1 -1
  54. package/_assets/{fetchTokenMetadata-Bm5qOhHz.js → fetchTokenMetadata-BnJnLsZ6.js} +2 -2
  55. package/_assets/{get-ecosystem-wallet-info-Bk3TC-8s.js → get-ecosystem-wallet-info-DQdOd1yi.js} +1 -1
  56. package/_assets/{getBalance-D5TAQGrF.js → getBalance-x0HlsVC8.js} +1 -1
  57. package/_assets/{getNFT-BXhNmL18.js → getNFT-BmIGxF2X.js} +1 -1
  58. package/_assets/{getNFT-CCYMJGO3.js → getNFT-U6fW1c3o.js} +1 -1
  59. package/_assets/{getThemeProps-jxkK7aJF.js → getThemeProps-BzsYMuYq.js} +1 -1
  60. package/_assets/{grid.styles-Dc-BunHd.js → grid.styles-B36wgJRU.js} +1 -1
  61. package/_assets/{hashTypedData-Ca0HEadf.js → hashTypedData-BtyGAAso.js} +1 -1
  62. package/_assets/{hashTypedData-DVgRVFNg.js → hashTypedData-D5cKiuOe.js} +1 -1
  63. package/_assets/{import-DOwZHLAr.js → import-Da0nCdcK.js} +1 -1
  64. package/_assets/{in-app-5OmWNOhY.js → in-app-tkTqoTeW.js} +1 -1
  65. package/_assets/{in-app-wallet-calls-BRQJJecy.js → in-app-wallet-calls-Dyb8JyC6.js} +1 -1
  66. package/_assets/{index-BUWXcU3w.js → index--n_fMjyX.js} +1 -1
  67. package/_assets/{index-D7m3HL9N.js → index-8AINMf2V.js} +1 -1
  68. package/_assets/{index-C24ZPX4S.js → index-B-ELrI2-.js} +1 -1
  69. package/_assets/{index-CUdjYgOL.js → index-B6RSvfuU.js} +1 -1
  70. package/_assets/{index-DDY4z1Qo.js → index-BCMTVfZb.js} +1 -1
  71. package/_assets/{index-Cp14nZEB.js → index-BGOR7uqp.js} +1 -1
  72. package/_assets/{index-C_QkMk4V.js → index-BJaBIZon.js} +2 -2
  73. package/_assets/{index-PVirg3CC.js → index-BJhXMkl3.js} +2 -2
  74. package/_assets/{index-Yqi1mlp4.js → index-BNnslvoC.js} +1 -1
  75. package/_assets/{index-DgkhTIuB.js → index-BSfKLWot.js} +1 -1
  76. package/_assets/{index-BJOGj8uX.js → index-BX7nt43X.js} +1 -1
  77. package/_assets/{index-Ddv8zF_v.js → index-B_EmM_OX.js} +1 -1
  78. package/_assets/{index-DCTmqT9n.js → index-BarS2mgL.js} +1 -1
  79. package/_assets/{index-DCJUcLs-.js → index-Beqa_Gje.js} +1 -1
  80. package/_assets/{index-hUwYbJaz.js → index-Bg9_Rb37.js} +2 -2
  81. package/_assets/{index-BgkliADR.js → index-BnaX4TbU.js} +1 -1
  82. package/_assets/{index-BFBjDoQ6.js → index-BrAm6VBC.js} +1 -1
  83. package/_assets/{index-D6QGQCMT.js → index-ByCGiKUv.js} +1 -1
  84. package/_assets/{index-DQ3nh_Gh.js → index-C184oxsV.js} +1 -1
  85. package/_assets/{index-COIPDAvM.js → index-C3EyLY1t.js} +1 -1
  86. package/_assets/{index-DmlmMlHx.js → index-C7Dd_OFn.js} +1 -1
  87. package/_assets/{index-DFWSTox1.js → index-CCOhxr4Y.js} +3 -3
  88. package/_assets/{index-BVkfXvB0.js → index-CPOONJNk.js} +1 -1
  89. package/_assets/{index-Clxl6O3m.js → index-CZuEgdES.js} +1 -1
  90. package/_assets/{index-p4aiSGwy.js → index-Cd7uOoEN.js} +1 -1
  91. package/_assets/{index-Bjz1afXG.js → index-CnNlT6GN.js} +1 -1
  92. package/_assets/{index-SIu0g-iY.js → index-D05mgWf9.js} +1 -1
  93. package/_assets/{index-EDfm-4gk.js → index-D8MKf1c9.js} +1 -1
  94. package/_assets/{index-BE_Ebetr.js → index-DCH4Sk36.js} +1 -1
  95. package/_assets/{index-CLwiHF4x.js → index-DFUj2qC_.js} +1 -1
  96. package/_assets/{index-CKvAeyW_.js → index-DI_IjAcF.js} +88 -88
  97. package/_assets/{index-Dx8DDVd9.js → index-D_k1yIWZ.js} +1 -1
  98. package/_assets/{index-B4VI0jMN.js → index-Dc05m3c2.js} +1 -1
  99. package/_assets/{index-M_xvfKlg.js → index-DeajtqZQ.js} +1 -1
  100. package/_assets/{index-CX9Whfxj.js → index-Dent5zap.js} +1 -1
  101. package/_assets/{index-Fy8-NNgy.js → index-DfFeZ6Vp.js} +1 -1
  102. package/_assets/{index-2OVx4iJi.js → index-DheZlekn.js} +3 -3
  103. package/_assets/{index-CKNfn6Vk.js → index-DxM-to32.js} +3 -3
  104. package/_assets/{index-Da6pHJ2U.js → index-DxM-zc2w.js} +1 -1
  105. package/_assets/{index-COvhkZx4.js → index-Dya8ahcx.js} +1 -1
  106. package/_assets/{index-BhozS4qR.js → index-FsUhf4jJ.js} +1 -1
  107. package/_assets/{index-tDQizk_n.js → index-HLQrRyOg.js} +1 -1
  108. package/_assets/{index-DyTr5Odp.js → index-Nj11N1Vp.js} +2 -2
  109. package/_assets/{index-Be0TtwRh.js → index-Sc6q1Ecn.js} +1 -1
  110. package/_assets/{index-CrrW0USV.js → index-UHqRfL2i.js} +1 -1
  111. package/_assets/{index-CyM-uKEn.js → index-VL-eJTDX.js} +1 -1
  112. package/_assets/{index-hycTvNv9.js → index-VOzIxfGw.js} +1 -1
  113. package/_assets/{index-E6nd8w7r.js → index-hdy1vdaF.js} +1 -1
  114. package/_assets/{index-a4DwWHMC.js → index-mSffj-0T.js} +2 -2
  115. package/_assets/{index-DBb0SZED.js → index-rT-FK12h.js} +1 -1
  116. package/_assets/{index-B0qtsAE-.js → index-uIjOgtMi.js} +1 -1
  117. package/_assets/{index.es-CuQzAuJf.js → index.es-Ca2F0FMx.js} +4 -4
  118. package/_assets/{index.es-CHF2aRm8.js → index.es-DIF91egA.js} +1 -1
  119. package/_assets/{index.es-4BnFbLIq.js → index.es-creG5doh.js} +1 -1
  120. package/_assets/{localBatchGatewayRequest-BiaZ99qV.js → localBatchGatewayRequest-DsmOioor.js} +1 -1
  121. package/_assets/{mana-convert-fQ28xr65.js → mana-convert-CTsfw0Op.js} +1 -1
  122. package/_assets/{mana-rate-CX4vkbTv.js → mana-rate-BxYQ9xUU.js} +1 -1
  123. package/_assets/{networks-BLWCcklV.js → networks-cAv5X6o3.js} +1 -1
  124. package/_assets/{onramp-ofeNemBP.js → onramp-g7sfARS-.js} +1 -1
  125. package/_assets/{openzeppelin-CQ4xxvCW.js → openzeppelin-BCr3n-Wo.js} +1 -1
  126. package/_assets/{parseNft-BA1YqoMO.js → parseNft-BhL_ChhV.js} +2 -2
  127. package/_assets/{parseSignature-CdZk3HUU.js → parseSignature--tz_iwev.js} +3 -3
  128. package/_assets/{parseSignature-Bv3a-ckt.js → parseSignature-DvfiZIZV.js} +1 -1
  129. package/_assets/{passkeys-cIb8SYvN.js → passkeys-Bvs56mq5.js} +1 -1
  130. package/_assets/{pay-with-exchange-DgR6jsOE.js → pay-with-exchange-XkI8_OCE.js} +1 -1
  131. package/_assets/{qr-overlay-Cfft7a0M.js → qr-overlay-Bk2XZPWy.js} +1 -1
  132. package/_assets/{receive-BKMf0MUc.js → receive-BMeT0Lz-.js} +1 -1
  133. package/_assets/{resolveImplementation-BUhQkFuG.js → resolveImplementation-Bx83F7NY.js} +1 -1
  134. package/_assets/{rpc-BSCW9r0K.js → rpc-DbNw9jL1.js} +1 -1
  135. package/_assets/{secp256k1-DZ_AtAE9.js → secp256k1-BEusWpwQ.js} +1 -1
  136. package/_assets/{secp256k1-D7Ic1AnI.js → secp256k1-gVzAYZdt.js} +1 -1
  137. package/_assets/{secp256k1-Cc7ZGphI.js → secp256k1-k_sy808b.js} +1 -1
  138. package/_assets/{send-D0GDu_vS.js → send-CXMx0Ee3.js} +1 -1
  139. package/_assets/{send-batch-transaction-Bx_S55BL.js → send-batch-transaction-CDuCIKM-.js} +1 -1
  140. package/_assets/{send-eip712-transaction-BeQ_HoA6.js → send-eip712-transaction-BeDgEcMv.js} +2 -2
  141. package/_assets/{send-gasless-transaction-mq5auYkP.js → send-gasless-transaction-B3NobiIc.js} +2 -2
  142. package/_assets/{send-transaction-D3g0h3x8.js → send-transaction-SAvzY1Zv.js} +2 -2
  143. package/_assets/{sendMetaTransaction-CfYBmJqE.js → sendMetaTransaction-BLHMOdHq.js} +1 -1
  144. package/_assets/{sendRawTransaction-Bdfd1V50.js → sendRawTransaction-DEpVlnFQ.js} +3 -3
  145. package/_assets/{serializeTransaction-Bq1icuDU.js → serializeTransaction-BeikLUOw.js} +1 -1
  146. package/_assets/{session-proposal-CeKp7mKZ.js → session-proposal-CXFPx6Nc.js} +1 -1
  147. package/_assets/{session-request-CZ68hd2h.js → session-request-yTpVxJp5.js} +2 -2
  148. package/_assets/{signing-C7pGWbAD.js → signing-ClnsTXrn.js} +3 -3
  149. package/_assets/{socials-DVfxwwog.js → socials-vhiZxWBx.js} +1 -1
  150. package/_assets/{swaps-BHlzfOa6.js → swaps-BYey02hd.js} +1 -1
  151. package/_assets/{thirdweb-PU38RH0J.js → thirdweb-M2_jjUS_.js} +3 -3
  152. package/_assets/{to-serializable-transaction-gDnQ8f6A.js → to-serializable-transaction-BTD2tsYD.js} +2 -2
  153. package/_assets/{trade-encoding-DPKBDNkR.js → trade-encoding-BVlmzFE-.js} +1 -1
  154. package/_assets/{transactionReceipt-CkDBxTqo.js → transactionReceipt-OZUBm-CR.js} +1 -1
  155. package/_assets/{transactions-CC5Z4LdW.js → transactions-CHSrtQ-4.js} +1 -1
  156. package/_assets/{useCreditPacks-CQXC1itx.js → useCreditPacks-DkU8BJEb.js} +1 -1
  157. package/_assets/{useInfiniteGrid-CK8TA2xA.js → useInfiniteGrid-NfDPHWXi.js} +1 -1
  158. package/_assets/useManaRate-BV_Xzv0_.js +1 -0
  159. package/_assets/{useSecondarySales-BVKMem4L.js → useSecondarySales-Caon2E63.js} +1 -1
  160. package/_assets/{useStore-55b8sEvt.js → useStore-TorFHABK.js} +1 -1
  161. package/_assets/{useTheme-s40vMPeT.js → useTheme-D346drKA.js} +1 -1
  162. package/_assets/{verifyHash-UTScJ5vY.js → verifyHash-C_z3J9Yf.js} +1 -1
  163. package/_assets/{w3m-modal-BcGHx_GU.js → w3m-modal-BCtgJ1Ma.js} +1 -1
  164. package/_assets/{w3m-modal-DvvX0FR6.js → w3m-modal-DyyYMui-.js} +1 -1
  165. package/_assets/{wait-for-tx-receipt-DeBOMM1R.js → wait-for-tx-receipt-SA_Mo0zv.js} +1 -1
  166. package/_assets/{wallets-JW3aPEWT.js → wallets-CiVaPBHB.js} +5 -5
  167. package/_assets/{web-connector-RvG-aCdp.js → web-connector-Cc9dNw1Y.js} +3 -3
  168. package/_assets/{writeContract-Dqe7Ta-l.js → writeContract-BSMHcTCt.js} +1 -1
  169. package/_assets/{zoraTestnet-DDg_i6X6.js → zoraTestnet-CftGmIvi.js} +1 -1
  170. package/index.html +11 -11
  171. package/package.json +2 -2
  172. package/_assets/Assets-BUbwNh-5.js +0 -787
  173. package/_assets/Creator-DQZ74uf0.js +0 -306
  174. package/_assets/useManaRate-DvHMbg5D.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-DFgZJeSL.js";import{n as c,T as se}from"./Tooltip-BLyu7Dfk.js";import{t as e,s as o,I as g,e as s,o as ae,h as v}from"./index-CKvAeyW_.js";const re=o.div`
1
+ import{r as $,j as t}from"./react-vyZjIDcS.js";import{R as C,a as oe,C as ie,b as ne}from"./categories-A3Tq54j-.js";import{n as c,T as se}from"./Tooltip-VDc8mbHU.js";import{t as e,s as o,I as g,e as s,o as ae,h as v}from"./index-DI_IjAcF.js";const re=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{j as i,L as _,r as F}from"./react-vyZjIDcS.js";import{s as n,B as G,t as a,x as D,m as P,e,n as W,y as O,I as b,z as B,u as w,D as K,c as Q,E as H,F as A,l as X,G as Z,q as E}from"./index-CKvAeyW_.js";import{a as J,b as U,c as V,d as Y,s as tt,f as it}from"./authorizations-DDsnY_Zf.js";import{a as et}from"./builder-BO6I7uZQ.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-BshsHqbY.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-CfYBmJqE.js";const nt=D`
1
+ import{j as i,L as _,r as F}from"./react-vyZjIDcS.js";import{s as n,B as G,t as a,x as D,m as P,e,n as W,y as O,I as b,z as B,u as w,D as K,c as Q,E as H,F as A,l as X,G as Z,q as E}from"./index-DI_IjAcF.js";import{a as J,b as U,c as V,d as Y,s as tt,f as it}from"./authorizations-BTC_bFln.js";import{a as et}from"./builder-C4njBf3q.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-DqL59l4z.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-BLHMOdHq.js";const nt=D`
2
2
  to { transform: rotate(360deg); }
3
3
  `,st=D`
4
4
  to { background-position: -200% 0; }
@@ -1,4 +1,4 @@
1
- import{j as e,L as Se,r as P,b as ea,a as ta}from"./react-vyZjIDcS.js";import{t as le,s as i,e as s,K as de,aj as aa,H as sa,I as H,z as Mt,J as Ue,m as na,ak as Q,R as dt,n as ia,u as ra,al as oa,D as ca,am as da,an as la,ao as ua,ap as ha,y as pa,aq as lt,ar as G,as as ut,at as ga,l as ae,c as ht,au as xa,h as ma,av as pt,aw as _e,ax as ye,ay as be,az as gt,a as ve,b as fa,C as We,aA as ya}from"./index-CKvAeyW_.js";import{M as ba,S as va,C as wa,H as Ca,a as ja,T as ka,X as $a,b as Sa,B as Ma,c as Ta,d as xt,e as Ia,f as ke,P as Tt,m as Pa,g as za,h as Aa,i as Ea,j as It,k as $e,L as qa,l as Ra,n as mt,o as ft,W as Ba,p as _a,q as Wa,A as Fa,r as La,s as Ka,t as Na,u as Ua,v as Qa,w as Ha,x as Oa,y as Va,z as Ga,D as Da,E as Ya,F as Ja,G as Xa,I as Za,J as es,K as Fe,N as ts,O as as,Q as ss,R as ns,U as yt,V as bt,Y as is,Z as rs,_ as os}from"./CollectionCarousel-WI45XOFA.js";import{u as cs}from"./useManaRate-DvHMbg5D.js";import{r as ds}from"./mana-rate-CX4vkbTv.js";import{i as ls,j as us,f as hs,n as ps,h as gs,A as xs}from"./authorizations-DDsnY_Zf.js";import{g as ms,b as Le}from"./buy-DN9Q4fmJ.js";import{b as fs,w as ys,S as vt,G as bs}from"./buy-gasless-Cxl5QDDd.js";import{u as vs,M as ws,R as we,r as Cs,c as js,p as wt}from"./useCreditPacks-CQXC1itx.js";import{i as ks,a as $s}from"./errors-BshsHqbY.js";import{E as Ss}from"./ErrorNotice-q0dn0iRL.js";import{u as Ct}from"./mana-convert-fQ28xr65.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-DPKBDNkR.js";import"./sendMetaTransaction-CfYBmJqE.js";const{colors:se,radius:Ms}=le,Ts=i.div`
1
+ import{j as e,L as Se,r as P,b as ea,a as ta}from"./react-vyZjIDcS.js";import{t as le,s as i,e as s,K as de,aj as aa,H as sa,I as H,z as Mt,J as Ue,m as na,ak as Q,R as dt,n as ia,u as ra,al as oa,D as ca,am as da,an as la,ao as ua,ap as ha,y as pa,aq as lt,ar as G,as as ut,at as ga,l as ae,c as ht,au as xa,h as ma,av as pt,aw as _e,ax as ye,ay as be,az as gt,a as ve,b as fa,C as We,aA as ya}from"./index-DI_IjAcF.js";import{M as ba,S as va,C as wa,H as Ca,a as ja,T as ka,X as $a,b as Sa,B as Ma,c as Ta,d as xt,e as Ia,f as ke,P as Tt,m as Pa,g as za,h as Aa,i as Ea,j as It,k as $e,L as qa,l as Ra,n as mt,o as ft,W as Ba,p as _a,q as Wa,A as Fa,r as La,s as Ka,t as Na,u as Ua,v as Qa,w as Ha,x as Oa,y as Va,z as Ga,D as Da,E as Ya,F as Ja,G as Xa,I as Za,J as es,K as Fe,N as ts,O as as,Q as ss,R as ns,U as yt,V as bt,Y as is,Z as rs,_ as os}from"./CollectionCarousel-B71TAj46.js";import{u as cs}from"./useManaRate-BV_Xzv0_.js";import{r as ds}from"./mana-rate-BxYQ9xUU.js";import{i as ls,j as us,f as hs,n as ps,h as gs,A as xs}from"./authorizations-BTC_bFln.js";import{g as ms,b as Le}from"./buy-myGa3uAa.js";import{b as fs,w as ys,S as vt,G as bs}from"./buy-gasless-aqj0tOF3.js";import{u as vs,M as ws,R as we,r as Cs,c as js,p as wt}from"./useCreditPacks-DkU8BJEb.js";import{i as ks,a as $s}from"./errors-DqL59l4z.js";import{E as Ss}from"./ErrorNotice-DNbl0Lx6.js";import{u as Ct}from"./mana-convert-CTsfw0Op.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-BVlmzFE-.js";import"./sendMetaTransaction-BLHMOdHq.js";const{colors:se,radius:Ms}=le,Ts=i.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -58,7 +58,7 @@ import{j as e,L as Se,r as P,b as ea,a as ta}from"./react-vyZjIDcS.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `,Es="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?s("cartCheckout.errorTitle"):l==="nofunds"?s("cartCheckout.titleNoFunds"):l==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(ba,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(va,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(wa,{"data-tall":Y||void 0,children:[e.jsxs(Ca,{children:[e.jsxs(ja,{children:[e.jsx(ka,{children:D}),!W&&e.jsx($a,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Sa,{})})]}),e.jsxs(Ma,{children:[e.jsx(Ta,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ia,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(As,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),de(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Pa(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Bs,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(ke,{children:[e.jsxs(za,{"data-testid":"buy-error",children:[e.jsx(Aa,{src:Es,alt:"",width:64,height:80}),e.jsxs(Ea,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:z,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"purple",onClick:o.onRetry??z,children:s("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?s("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(qa,{src:aa,alt:"",width:61,height:61}),e.jsx(Ra,{children:ne}),D?e.jsxs(Ts,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Is,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Bs({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(Ba,{"data-testid":"nofunds-warning",children:[e.jsx(_a,{}),e.jsxs(Wa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",s("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(Ps,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Fa,{children:[e.jsx(La,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ka,{children:[e.jsxs("div",{children:[e.jsxs(Na,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(zs,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Ua,{address:n.item.creator}):null]}),e.jsxs(Qa,{children:[e.jsx(Ha,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Oa,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Va,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ga,{}),e.jsx(Da,{children:de(n.credits)}),e.jsxs(Ya,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Ja,{children:[e.jsxs(Xa,{children:[e.jsx(Za,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(es,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:Y,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"gradient",onClick:D,children:s("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=le,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
61
+ `,Es="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/buy-error-22UunaPC.png";function qs(o){const{phase:l,balanceCredits:I,onClose:z}=o,W=l==="processing",D=l==="error"?s("cartCheckout.errorTitle"):l==="nofunds"?s("cartCheckout.titleNoFunds"):l==="choose"?s("buyModal.choosePayment"):s("cartCheckout.titleBuy"),Y=l==="processing";return e.jsxs(ba,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(va,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(wa,{"data-tall":Y||void 0,children:[e.jsxs(Ca,{children:[e.jsxs(ja,{children:[e.jsx(ka,{children:D}),!W&&e.jsx($a,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Sa,{})})]}),e.jsxs(Ma,{children:[e.jsx(Ta,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Ia,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(As,{children:[e.jsx("span",{children:s("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(xt,{}),de(o.totalCredits??0)]})]}),e.jsx(Tt,{options:o.options??[],totalCents:o.totalCents??0,onPay:o.onPay??(()=>{}),rateNote:(()=>{const A=Pa(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Rs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Bs,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:z}),l==="error"&&e.jsxs(ke,{children:[e.jsxs(za,{"data-testid":"buy-error",children:[e.jsx(Aa,{src:Es,alt:"",width:64,height:80}),e.jsxs(Ea,{children:[e.jsx("b",{children:s("cartCheckout.errorHeadline")})," ",o.message??s("cartCheckout.errorBody")]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:z,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"purple",onClick:o.onRetry??z,children:s("cartCheckout.tryAgain")})]})]})]})]})}function Rs({stage:o,step:l,total:I,isSelfCustody:z,signatures:W}){const D=o==="reserving",Y=I>0?Math.min(100,Math.round(l/I*100)):0,A=z&&W&&W.total>1,ne=o==="awaiting-signature"?z?A?s("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):s("buyModal.confirmToContinue"):s("buyModal.completingTransaction"):o==="settling"?s("buyModal.completingTransaction"):s("cartCheckout.preparing");return e.jsxs(ke,{"data-processing":!0,children:[e.jsx(qa,{src:aa,alt:"",width:61,height:61}),e.jsx(Ra,{children:ne}),D?e.jsxs(Ts,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(Is,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Bs({lines:o,shortfallCredits:l,packs:I,selectedPack:z,onSelectPack:W,onBuyPacks:D,onCancel:Y}){const A=I.find(n=>n.id===z),ne=o.reduce((n,L)=>n+(L.quantity??1),0);return e.jsxs(ke,{children:[e.jsxs(Ba,{"data-testid":"nofunds-warning",children:[e.jsx(_a,{}),e.jsxs(Wa,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:Math.max(0,l)})})," ",s("buyModal.warningToPurchase",{count:ne})]})]}),e.jsx(Ps,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(Fa,{children:[e.jsx(La,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ka,{children:[e.jsxs("div",{children:[e.jsxs(Na,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(zs,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Ua,{address:n.item.creator}):null]}),e.jsxs(Qa,{children:[e.jsx(Ha,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Oa,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Va,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Ga,{}),e.jsx(Da,{children:de(n.credits)}),e.jsxs(Ya,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Ja,{children:[e.jsxs(Xa,{children:[e.jsx(Za,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(es,{children:["$",((A==null?void 0:A.usd)??0).toFixed(2)]})]}),e.jsxs(It,{children:[e.jsx($e,{"data-variant":"outline",onClick:Y,children:s("buyModal.cancel")}),e.jsx($e,{"data-variant":"gradient",onClick:D,children:s("buyModal.buy")})]})]})}const{colors:r,gradients:Pt,radius:Z}=le,zt="@media (max-width: 1080px)",T="@media (max-width: 880px)",jt=i.div`
62
62
  max-width: 1510px;
63
63
  margin: 0 auto;
64
64
  /* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
@@ -1,4 +1,4 @@
1
- import{N,O as U,P as o,Q as n,J as D,x as M}from"./index-CKvAeyW_.js";import{r as w,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-Dv5E4mS4.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
1
+ import{N,O as U,P as o,Q as n,J as D,x as M}from"./index-DI_IjAcF.js";import{r as w,j as g}from"./react-vyZjIDcS.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-BETN9X51.js";function K(r){return z("MuiCircularProgress",r)}E("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=M(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ag as J,E,I as X,e as a,c as ee,l as te,u as ae,m as re,h as oe,S as z,A as ie,ah as se,ai as ne}from"./index-CKvAeyW_.js";import{E as ce}from"./ErrorNotice-q0dn0iRL.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-u63rKyzf.js";import{u as ve}from"./useStore-55b8sEvt.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-DFgZJeSL.js";import{L as $e}from"./LoadMore-DoQvuFO_.js";import{u as Pe}from"./useInfiniteGrid-CK8TA2xA.js";import{G as Me}from"./grid.styles-Dc-BunHd.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const Re=c.section`
1
+ import{j as e,r as m,e as Y,b as Z}from"./react-vyZjIDcS.js";import{t as v,s as c,ag as J,E,I as X,e as a,c as ee,l as te,u as ae,m as re,h as oe,S as z,A as ie,ah as se,ai as ne}from"./index-DI_IjAcF.js";import{E as ce}from"./ErrorNotice-DNbl0Lx6.js";import{d as le,g as de,a as pe,P as xe,C as ue,b as me,c as ge,B as he,S as be,M as fe,A as je}from"./browseLayout.styles-De0FGl5x.js";import{u as ve}from"./useStore-TorFHABK.js";import{c as F,a as ye,F as Ce,d as we,P as Se,e as ke,H as Ae,S as Ne}from"./categories-A3Tq54j-.js";import{L as $e}from"./LoadMore-CvF1ryR6.js";import{u as Pe}from"./useInfiniteGrid-NfDPHWXi.js";import{G as Me}from"./grid.styles-B36wgJRU.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const Re=c.section`
2
2
  position: relative;
3
3
  border-radius: ${v.radius.card};
4
4
  overflow: hidden;
@@ -1,4 +1,4 @@
1
- import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,e as g,z as k,K as j,bd as C,h as G,x as Y,I as Q,l as X,a as W,C as E,b as Z,be as J,bf as F,A as q}from"./index-CKvAeyW_.js";import{s as ee,h as U,A as H,g as K,r as te,m as ne,e as ae}from"./authorizations-DDsnY_Zf.js";import{i as ie}from"./errors-BshsHqbY.js";import{E as oe}from"./ErrorNotice-q0dn0iRL.js";import{a as se}from"./buy-DN9Q4fmJ.js";import{g as re,d as ce}from"./trade-encoding-DPKBDNkR.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-CfYBmJqE.js";import{I as he,C as ue}from"./ethers-CXBJm_wN.js";const R="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(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>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var b,y,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,s=a.priceManaWei>0n?a.priceManaWei:0n,d=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}),s>0n&&i>0&&i<n){const l=n-i,f=fe(l,n,s);d>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(l=>l.method==="credits"))==null?void 0:b.method)??((y=c.find(l=>l.method==="combined"))==null?void 0:y.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,m=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(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",be=e.div`
1
+ import{j as t,r as v}from"./react-vyZjIDcS.js";import{s as e,t as o,e as g,z as k,K as j,be as C,h as G,x as Y,I as Q,l as X,a as W,C as E,b as Z,bf as J,bg as F,A as q}from"./index-DI_IjAcF.js";import{s as ee,h as U,A as H,g as K,r as te,m as ne,e as ae}from"./authorizations-BTC_bFln.js";import{i as ie}from"./errors-DqL59l4z.js";import{E as oe}from"./ErrorNotice-DNbl0Lx6.js";import{a as se}from"./buy-myGa3uAa.js";import{g as re,d as ce}from"./trade-encoding-BVlmzFE-.js";import{s as de,M as le,E as pe}from"./sendMetaTransaction-BLHMOdHq.js";import{I as he,C as ue}from"./ethers-CXBJm_wN.js";const R="shop:resume_after_signin",xe=900*1e3;function rt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function ct(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>xe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function ge(a,n){return(a+n-1n)/n}function fe(a,n,i){return a<=0||n<=0?0n:a>=n?i:ge(i*BigInt(a),BigInt(n))}function dt(a){var b,y,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,s=a.priceManaWei>0n?a.priceManaWei:0n,d=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}),s>0n&&i>0&&i<n){const l=n-i,f=fe(l,n,s);d>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&d>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(l=>l.method==="credits"))==null?void 0:b.method)??((y=c.find(l=>l.method==="combined"))==null?void 0:y.method)??((w=c.find(l=>l.method==="mana"))==null?void 0:w.method)??null,m=!c.some(l=>l.method==="mana"||l.method==="combined")&&s>0n&&d>0n?{manaWei:d,manaCents:me(d,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function me(a,n,i){return Number(a*BigInt(n)/i)}function lt(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const d=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(d,i);return i-=c,c})}function z(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function pt(a,n){return a.options.find(i=>i.method===n)??null}function ht(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",be=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -0,0 +1,306 @@
1
+ import{b as Y,j as e,L as ue,e as fe,u as be,r as y}from"./react-vyZjIDcS.js";import{t as J,aB as we,aC as R,aD as _,s as a,aE as je,H as ve,aF as Ce,e as t,aG as ye,aH as W,B as $e,J as Z,ag as q,n as ke,E as Q,I as T,c as Ne,m as Pe,S,h as Se,A as Le,aA as Ae,aI as Me}from"./index-DI_IjAcF.js";import{d as Fe,g as Ee,a as ze,P as Be,C as Ie,b as Re,c as _e,A as We,B as Te,S as He,M as Ge,e as Ue,f as De}from"./browseLayout.styles-De0FGl5x.js";import{u as Ke,L as Oe}from"./useStore-TorFHABK.js";import{c as H,a as Ve,F as Ye,d as Je,P as Ze,e as qe,H as Qe,S as Xe}from"./categories-A3Tq54j-.js";import{L as G}from"./LoadMore-CvF1ryR6.js";import{u as U}from"./useInfiniteGrid-NfDPHWXi.js";import{E as D}from"./ErrorNotice-DNbl0Lx6.js";import{G as K}from"./grid.styles-B36wgJRU.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:et}=J,tt=a.article`
2
+ height: 300px;
3
+ background: ${u.bg};
4
+ border-radius: ${X.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
+ ${we};
15
+ }
16
+
17
+ &:focus-visible {
18
+ ${R};
19
+ }
20
+ &:focus-visible::after {
21
+ ${_};
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
+ ${R};
30
+ }
31
+ &:hover::after {
32
+ ${_};
33
+ }
34
+ &:hover [data-view] {
35
+ visibility: visible;
36
+ }
37
+ &:hover [data-meta] {
38
+ visibility: hidden;
39
+ }
40
+ }
41
+ `,it=a.div`
42
+ position: relative;
43
+ flex: 1;
44
+ min-height: 0;
45
+ background: ${u.media};
46
+ overflow: hidden;
47
+ `,ot=a.img`
48
+ width: 100%;
49
+ height: 100%;
50
+ object-fit: cover;
51
+ display: block;
52
+ `,at=a(je)`
53
+ & [data-testid='coll-thumb-cell'] img {
54
+ object-fit: contain;
55
+ padding: 10px;
56
+ }
57
+ `,rt=a.div`
58
+ flex: 0 0 102px;
59
+ height: 102px;
60
+ padding: 12px 14px;
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 8px;
64
+ `,st=a.h3`
65
+ margin: 0;
66
+ font-weight: 700;
67
+ font-size: 18px;
68
+ line-height: 1.3;
69
+ color: ${u.text};
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+
74
+ ${et.maxWidth("mobile")} {
75
+ font-size: 16px;
76
+ }
77
+ `,nt=a.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
+ `,ct=a.div`
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: space-between;
91
+ gap: 10px;
92
+ `,lt=a(ve)`
93
+ min-width: 0;
94
+ color: ${u.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: ${u.dclRed};
105
+ font-weight: 700;
106
+ }
107
+ `,dt=a.span`
108
+ min-width: 0;
109
+ `,ht=a.span`
110
+ flex: none;
111
+ color: ${u.text};
112
+ font-weight: 600;
113
+ font-size: 14px;
114
+ white-space: nowrap;
115
+ `,xt=a.button`
116
+ visibility: hidden;
117
+ width: 100%;
118
+ height: 44px;
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ background: ${u.accent};
123
+ color: ${u.softWhite};
124
+ border: 0;
125
+ border-radius: ${X.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: ${u.accentHover};
134
+ }
135
+ &:active {
136
+ background: ${u.accentActive};
137
+ }
138
+ `;function pt({collection:r,cover:i,itemCount:s}){const n=Y(),{contractAddress:g,name:x,creator:f}=r,C=i==null||s==null,{data:d}=Ce(g,C),w=i==null?(d==null?void 0:d.items)??[]:[],m=s??(d==null?void 0:d.total);function b(){n(`/collection/${g}`)}return e.jsxs(tt,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:b,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b())},children:[e.jsx(it,{children:i?e.jsx(ot,{"data-testid":"coll-card-img",src:i,alt:"",loading:"lazy"}):w.length>0?e.jsx(at,{items:w,tinted:!1}):null}),e.jsxs(rt,{children:[e.jsx(st,{title:x,children:x}),e.jsxs(nt,{children:[e.jsxs(ct,{"data-meta":!0,"data-testid":"coll-card-meta",children:[f?e.jsx(lt,{address:f,linkToProfile:!0}):e.jsx(dt,{children:" "}),e.jsx(ht,{children:m==null?"…":t("collectionCard.itemCount",{count:m})})]}),e.jsx(xt,{"data-view":!0,"data-testid":"coll-card-view",onClick:h=>{h.stopPropagation(),b()},tabIndex:-1,children:t("collectionCard.viewCollection")})]})]})]})}function gt({address:r,className:i=""}){const s=ye(),n=W(x=>x.followed.includes(r.toLowerCase())),g=W(x=>x.toggle);return!s||!r?null:e.jsx($e,{type:"button",size:"sm",variant:n?"ghost":"outline",className:i||void 0,"aria-pressed":n,title:n?t("creator.unfollowTitle"):t("creator.followTitle"),onClick:()=>g(r),children:n?t("creator.following"):t("creator.follow")})}const{colors:v,radius:ee,media:j}=J,te=Z`
139
+ display: inline-flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ height: 44px;
143
+ padding: 0 28px;
144
+ border: 2px solid ${v.white};
145
+ border-radius: ${ee.btn};
146
+ background: transparent;
147
+ color: ${v.white};
148
+ font-weight: 600;
149
+ font-size: 13px;
150
+ text-transform: uppercase;
151
+ letter-spacing: 0.046em;
152
+ text-decoration: none;
153
+ `,mt=a.section`
154
+ position: relative;
155
+ border-radius: ${ee.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
+ ${te};
165
+ }
166
+ && .creator-hero__follow:hover:not(:disabled) {
167
+ background: rgba(255, 255, 255, 0.14);
168
+ }
169
+
170
+ ${j.maxWidth("mobile")} {
171
+ min-height: 260px;
172
+ }
173
+ `,ut=a.div`
174
+ position: absolute;
175
+ inset: 0;
176
+ z-index: 0;
177
+ `,ft=a.img`
178
+ width: 100%;
179
+ height: 100%;
180
+ object-fit: cover;
181
+ display: block;
182
+ `,bt=a.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
+ `,wt=a.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
+ ${j.maxWidth("mobile")} {
196
+ top: 12px;
197
+ right: 12px;
198
+ gap: 6px;
199
+ }
200
+ `,ie=Z`
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ color: ${v.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
+ ${j.maxWidth("mobile")} {
215
+ & .ico {
216
+ width: 30px;
217
+ height: 30px;
218
+ }
219
+ }
220
+ `,jt=a.a`
221
+ ${ie};
222
+ `,vt=a(ue)`
223
+ ${ie};
224
+ width: 32px;
225
+ height: 32px;
226
+ border-radius: 50%;
227
+ border: 2px solid ${v.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
+ ${j.maxWidth("mobile")} {
239
+ width: 28px;
240
+ height: 28px;
241
+ & .ico {
242
+ width: 14px;
243
+ height: 14px;
244
+ }
245
+ }
246
+ `,Ct=a.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
+ ${j.maxWidth("mobile")} {
257
+ padding: 56px 16px 24px;
258
+ }
259
+ `,O=a.img`
260
+ display: block;
261
+ width: 112px;
262
+ height: 112px;
263
+ border-radius: 50%;
264
+ object-fit: cover;
265
+ border: 4px solid ${v.white};
266
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
267
+ background: #ff4bed;
268
+
269
+ ${j.maxWidth("mobile")} {
270
+ width: 88px;
271
+ height: 88px;
272
+ }
273
+ `,yt=a.h2`
274
+ margin: 0;
275
+ font-size: 18px;
276
+ font-weight: 700;
277
+ color: ${v.white};
278
+ line-height: 1.6;
279
+
280
+ ${j.maxWidth("mobile")} {
281
+ font-size: 16px;
282
+ }
283
+ `,$t=a.p`
284
+ margin: 0;
285
+ font-size: 15px;
286
+ color: ${v.white};
287
+ line-height: 1.6;
288
+ max-width: 520px;
289
+
290
+ ${j.maxWidth("mobile")} {
291
+ font-size: 14px;
292
+ }
293
+ `,kt=a.div`
294
+ display: flex;
295
+ align-items: center;
296
+ gap: 12px;
297
+ flex-wrap: wrap;
298
+ justify-content: center;
299
+ `,Nt=a.a`
300
+ ${te};
301
+ transition: background 0.15s ease;
302
+
303
+ &:hover {
304
+ background: rgba(255, 255, 255, 0.14);
305
+ }
306
+ `,Pt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function St({address:r}){var h,$;const{data:i}=q(r),{data:s}=Ke(r),n=ke(l=>{var k;return(k=l.session)==null?void 0:k.address}),g=!!n&&n.toLowerCase()===r.toLowerCase(),x=(i==null?void 0:i.name)||Q(r),f=($=(h=i==null?void 0:i.avatar)==null?void 0:h.snapshots)==null?void 0:$.face256,C=(s==null?void 0:s.cover)||Fe,d=s==null?void 0:s.description,w=`${Ne.profileUrl}/${r}`,m=Oe.filter(l=>s==null?void 0:s.links[l]),b=Ee(ze({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(mt,{"aria-label":`${x} storefront`,children:[e.jsxs(ut,{children:[e.jsx(ft,{src:C,alt:"",loading:"eager"}),e.jsx(bt,{"aria-hidden":!0})]}),(m.length>0||g)&&e.jsxs(wt,{children:[m.map(l=>e.jsx(jt,{"data-testid":"creator-hero-link",href:(s==null?void 0:s.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:t(`creator.link.${l}`),"aria-label":t(`creator.link.${l}`),children:e.jsx(T,{name:Pt[l]})},l)),g&&e.jsx(vt,{to:"/store-settings",title:t("creator.editStore"),"aria-label":t("creator.editStore"),children:e.jsx(T,{name:"pen"})})]}),e.jsxs(Ct,{children:[f?e.jsx(O,{src:f,alt:"",loading:"eager",style:{backgroundColor:b}}):e.jsx(O,{as:"span","aria-hidden":!0,style:{backgroundColor:b}}),e.jsxs("div",{children:[e.jsx(yt,{children:x}),d?e.jsx($t,{children:d}):null]}),e.jsxs(kt,{children:[e.jsx(Nt,{"data-testid":"creator-hero-view",href:w,target:"_blank",rel:"noopener noreferrer",children:t("creator.viewProfile")}),e.jsx(gt,{address:r,className:"creator-hero__follow"})]})]})]})}const V=48;function Gt(){const{address:r}=fe(),i=Y(),[s]=be(),n=s.has("collections"),{data:g}=q(r),x=(g==null?void 0:g.name)||(r?Q(r):t("creator.fallbackName"));Pe({title:x,description:t("seo.creator.description",{name:x})});const[f,C]=y.useState("wearable"),[d,w]=y.useState(null),[m,b]=y.useState([]),[h,$]=y.useState(""),[l,k]=y.useState(""),[A,oe]=y.useState("newest"),M=h&&!Number.isNaN(Number(h))?Number(h):void 0,F=l&&!Number.isNaN(Number(l))?Number(l):void 0,ae=d?Xe[d]:void 0,re=(H.find(o=>o.key===A)??H[0]).server,E={creator:r,category:f,rarities:m.length?m:void 0,wearableCategories:ae,minPriceCredits:M,maxPriceCredits:F,sortBy:re},{items:N,total:se,isLoading:P,error:z,hasNextPage:ne,isFetchingNextPage:B,fetchNextPage:ce}=U(["creator-listings",E],o=>Ae({...E,first:V,skip:o}),{enabled:!!r&&!n}),p=U(["creator-collections",r],o=>Me(r,{first:V,skip:o}).then(c=>({items:c.collections,total:c.total})),{enabled:!!r&&n});function le(o){C(o),w(null),n&&I()}function I(){const o=new URLSearchParams(s);o.delete("collections");const c=o.toString();i({search:c?`?${c}`:""},{replace:!0})}function de(){if(n){I();return}const o=new URLSearchParams(s);o.delete("collections");const c=o.toString();i({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function he(o){b(c=>c.includes(o)?c.filter(me=>me!==o):[...c,o])}function xe(){C("wearable"),w(null),b([]),$(""),k("")}const L=!!(M||F),pe=L?`${h||"0"}–${l||"∞"}`:t("filter.price"),ge=f!=="wearable"||!!d||m.length>0||L;return e.jsxs(Be,{children:[e.jsxs(Ie,{"aria-label":t("creator.breadcrumbAria"),children:[e.jsx(Re,{onClick:()=>i("/assets"),children:t("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(_e,{children:x})]}),r?e.jsx(St,{address:r}):null,!n&&!P&&N.length>0?e.jsx(We,{items:N,source:"creator"}):null,e.jsxs(Te,{children:[e.jsx(He,{children:e.jsx(Ve,{category:f,subCategory:d,onCategory:le,onSub:w,title:t("creator.category"),flat:!0,collections:n,onCollections:de})}),e.jsx(Ge,{children:n?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{children:e.jsx(De,{children:p.isLoading?"…":t("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{"data-variant":"collections",children:p.isLoading?e.jsx(S,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(o=>e.jsx(pt,{collection:o,itemCount:o.itemCount},o.contractAddress)),p.isFetchingNextPage?e.jsx(S,{count:6}):null]})}),e.jsx(G,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:t("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ye,{rarities:m,onToggleRarity:he,sort:A,onSort:oe,total:se,loading:P,anyActive:ge,onClear:xe,renderTrailing:o=>e.jsx(Je,{panelKey:"price",label:pe,active:L,panel:o,children:e.jsxs(Ze,{"data-variant":"price",children:[e.jsxs(qe,{children:[e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMin"),placeholder:t("creator.priceMinPlaceholder"),value:h,onChange:c=>$(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMax"),placeholder:t("creator.priceMaxPlaceholder"),value:l,onChange:c=>k(c.target.value)})]}),e.jsx(Qe,{children:t("creator.priceHint",{currency:Se.name})})]})})}),z?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{children:P?e.jsx(S,{count:15}):e.jsxs(e.Fragment,{children:[N.map(o=>e.jsx(Le,{item:o},o.id)),B?e.jsx(S,{count:6}):null]})}),e.jsx(G,{hasNextPage:ne,isFetching:B,onLoadMore:()=>void ce()}),!P&&!z&&N.length===0?e.jsx("p",{className:"muted",children:t("creator.empty")}):null]})})]})]})}export{Gt as Creator,Gt as default};
@@ -1 +1 @@
1
- import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-CKvAeyW_.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
+ import{j as r}from"./react-vyZjIDcS.js";import{I as i}from"./index-DI_IjAcF.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-1MRMKUrL.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-2OVx4iJi.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
+ 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-BGLSOpiV.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-DheZlekn.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{b as xe,u as ue,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,x as T,m as he,e as r,h as p,n as ge,D as fe,ar as f,ap as me,l as N,az as H,I as re,aj as D,z as E,aR as K}from"./index-CKvAeyW_.js";import{R as O}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as je}from"./useCreditPacks-CQXC1itx.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./mana-convert-fQ28xr65.js";const P="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/pack-chest-BX_j84xW.webp",$e="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/credit-coin-CmcTCd5i.webp",ve="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",Se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30835612462.commit-48765f9/_assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
1
+ import{b as xe,u as ue,r as l,j as t}from"./react-vyZjIDcS.js";import{s as i,t as e,x as T,m as he,e as r,h as p,n as ge,D as fe,ar as f,ap as me,l as N,az as H,I as re,aj as D,z as E,aS as K}from"./index-DI_IjAcF.js";import{R as O}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as je}from"./useCreditPacks-DkU8BJEb.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./mana-convert-CTsfw0Op.js";const P="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/pack-stacks-D-V2jSHW.webp",se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/pack-chest-BX_j84xW.webp",$e="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/credit-coin-CmcTCd5i.webp",ve="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",Se="https://cdn.decentraland.org/@dcl/shop/0.1.0-30897342413.commit-036e931/_assets/packs-backdrop-BcXiUPeP.webp",Y="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -1,4 +1,4 @@
1
- import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-Bjz1afXG.js";import{d as g,r as v}from"./index-2OVx4iJi.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-1MRMKUrL.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
1
+ import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CnNlT6GN.js";import{d as g,r as v}from"./index-DheZlekn.js";import{C as c}from"./ConstantsUtil-Dfwpy1eP.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-BGLSOpiV.js";import{au as y}from"./NetworkUtil-HlUKXKcF.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,x as ie,y as se,e as i,h as Q,B as I,z,ar as ne,aQ as K,l as W,m as re,n as oe,D as ae,u as de,F as ce}from"./index-CKvAeyW_.js";import{i as le,R as pe,f as ge}from"./import-DOwZHLAr.js";import{u as xe}from"./useSecondarySales-BVKMem4L.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./buy-DN9Q4fmJ.js";import"./authorizations-DDsnY_Zf.js";import"./sendMetaTransaction-CfYBmJqE.js";import"./trade-encoding-DPKBDNkR.js";import"./mana-rate-CX4vkbTv.js";import"./mana-convert-fQ28xr65.js";function U({size:o=12,...w}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...w,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:M,radius:me,z:ue}=S,he=ie`
1
+ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s as t,x as ie,y as se,e as i,h as B,B as I,z,ar as ne,aR as K,l as W,m as re,n as oe,D as ae,u as de,F as ce}from"./index-DI_IjAcF.js";import{i as le,R as pe,f as ge}from"./import-Da0nCdcK.js";import{u as xe}from"./useSecondarySales-Caon2E63.js";import"./sentry-B35L1FdR.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CXBJm_wN.js";import"./intl-CBcMB1D2.js";import"./buy-myGa3uAa.js";import"./authorizations-BTC_bFln.js";import"./sendMetaTransaction-BLHMOdHq.js";import"./trade-encoding-BVlmzFE-.js";import"./mana-rate-BxYQ9xUU.js";import"./mana-convert-CTsfw0Op.js";function U({size:o=12,...w}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...w,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:M,radius:me,z:ue}=S,he=ie`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0;
@@ -179,7 +179,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
179
179
  font-size: 12px;
180
180
  `,Ee=t.p`
181
181
  margin: 12px 0 0;
182
- `;function Be({queue:o,session:w,onClose:j,onDone:m}){const v=ee(),p=se(w.providerType),[g,b]=h.useState(()=>o.map(()=>"pending")),[R,A]=h.useState("running"),k=h.useRef(!1);h.useEffect(()=>{if(k.current)return;k.current=!0;let n=!1;return(async()=>{for(let a=0;a<o.length;a++){if(n)return;b(x=>x.map((u,f)=>f===a?"active":u));try{await le(o[a].item,o[a].priceCredits,w),ne("Shop Migrated Listing",{item_id:o[a].item.itemId??o[a].item.oldTradeId??null,contract_address:o[a].item.contractAddress,new_price_credits:o[a].priceCredits,new_price_usd:K(o[a].priceCredits)}),n||b(x=>x.map((u,f)=>f===a?"done":u))}catch(x){if(x instanceof pe)W(x,{flow:"import_listing",step:"relist",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(u=>u.map((f,C)=>C===a?"unlisted":f));else{const u=x,f=u.code===4001||/reject|denied|cancel/i.test(u.message??"");f||W(x,{flow:"import_listing",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(C=>C.map((B,F)=>F===a?f?"skipped":"failed":B))}}}n||A("finished")})(),()=>{n=!0}},[]);const $=g.filter(n=>n==="done").length,N=g.findIndex(n=>n==="active"),E=Math.round(g.filter(n=>n!=="pending"&&n!=="active").length/o.length*100);function L(){m(),j()}if(R==="finished"){const n=g.filter(a=>a==="skipped"||a==="failed").length,l=g.filter(a=>a==="unlisted").length;return e.jsx(H,{role:"presentation",children:e.jsxs(Z,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(be,{"aria-hidden":!0,children:e.jsx(U,{size:30})}),e.jsx(O,{children:$>0?i("migrate.successTitle"):i("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[$>0?i("migrate.listedSummary",{count:$,currency:Q.name}):i("migrate.noneListed"),n>0?" "+i("migrate.skippedSummary",{count:n}):"",l>0?" "+i("migrate.unlistedSummary",{count:l}):""]}),e.jsxs(fe,{"data-actions":!0,children:[e.jsx(I,{variant:"ghost",onClick:L,children:i("getCredits.done")}),l>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),j(),v("/my-assets")},children:i("migrate.goToMyAssets")}):$>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),j(),v("/assets")},children:i("migrate.viewInShop")}):null]})]})})}return e.jsx(H,{role:"presentation",children:e.jsxs(je,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[p?i("migrate.subConfirm"):i("migrate.subManaged")," ",N>=0?i("migrate.progressCount",{current:N+1,total:o.length}):""]}),e.jsx(ve,{children:e.jsx(ke,{style:{width:`${E}%`}})}),e.jsx($e,{children:o.map((n,l)=>e.jsxs(Se,{"data-status":g[l],children:[e.jsx(Ie,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsx(Le,{title:n.item.name,children:n.item.name||i("migrate.itemFallback")}),e.jsxs(Ce,{children:[e.jsx(z,{className:"ccy-mark"})," ",n.priceCredits.toLocaleString()]}),e.jsx(Te,{children:g[l]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"spinner","aria-hidden":!0})," ",p?i("migrate.statusConfirm"):i("migrate.statusAdding")]}):g[l]==="done"?e.jsx(Ne,{children:e.jsx(U,{})}):g[l]==="skipped"?e.jsx(_,{children:i("migrate.statusSkipped")}):g[l]==="failed"?e.jsx(_,{children:i("migrate.statusFailed")}):g[l]==="unlisted"?e.jsx(_,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(ze,{children:i("migrate.statusWaiting")})})]},n.item.oldTradeId))}),e.jsx(Ee,{className:"muted small",children:p?i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const{colors:r,gradients:Qe,radius:Re}=S,D="@media (max-width: 620px)",G=t.div`
182
+ `;function Re({queue:o,session:w,onClose:j,onDone:m}){const v=ee(),p=se(w.providerType),[g,b]=h.useState(()=>o.map(()=>"pending")),[A,Q]=h.useState("running"),k=h.useRef(!1);h.useEffect(()=>{if(k.current)return;k.current=!0;let n=!1;return(async()=>{for(let a=0;a<o.length;a++){if(n)return;b(x=>x.map((u,f)=>f===a?"active":u));try{await le(o[a].item,o[a].priceCredits,w),ne("Shop Migrated Listing",{item_id:o[a].item.itemId??o[a].item.oldTradeId??null,contract_address:o[a].item.contractAddress,new_price_credits:o[a].priceCredits,new_price_usd:K(o[a].priceCredits)}),n||b(x=>x.map((u,f)=>f===a?"done":u))}catch(x){if(x instanceof pe)W(x,{flow:"import_listing",step:"relist",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(u=>u.map((f,C)=>C===a?"unlisted":f));else{const u=x,f=u.code===4001||/reject|denied|cancel/i.test(u.message??"");f||W(x,{flow:"import_listing",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(C=>C.map((R,F)=>F===a?f?"skipped":"failed":R))}}}n||Q("finished")})(),()=>{n=!0}},[]);const $=g.filter(n=>n==="done").length,N=g.findIndex(n=>n==="active"),E=Math.round(g.filter(n=>n!=="pending"&&n!=="active").length/o.length*100);function L(){m(),j()}if(A==="finished"){const n=g.filter(a=>a==="skipped"||a==="failed").length,l=g.filter(a=>a==="unlisted").length;return e.jsx(H,{role:"presentation",children:e.jsxs(Z,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(be,{"aria-hidden":!0,children:e.jsx(U,{size:30})}),e.jsx(O,{children:$>0?i("migrate.successTitle"):i("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[$>0?i("migrate.listedSummary",{count:$,currency:B.name}):i("migrate.noneListed"),n>0?" "+i("migrate.skippedSummary",{count:n}):"",l>0?" "+i("migrate.unlistedSummary",{count:l}):""]}),e.jsxs(fe,{"data-actions":!0,children:[e.jsx(I,{variant:"ghost",onClick:L,children:i("getCredits.done")}),l>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),j(),v("/my-assets")},children:i("migrate.goToMyAssets")}):$>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),j(),v("/assets")},children:i("migrate.viewInShop")}):null]})]})})}return e.jsx(H,{role:"presentation",children:e.jsxs(je,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[p?i("migrate.subConfirm"):i("migrate.subManaged")," ",N>=0?i("migrate.progressCount",{current:N+1,total:o.length}):""]}),e.jsx(ve,{children:e.jsx(ke,{style:{width:`${E}%`}})}),e.jsx($e,{children:o.map((n,l)=>e.jsxs(Se,{"data-status":g[l],children:[e.jsx(Ie,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsx(Le,{title:n.item.name,children:n.item.name||i("migrate.itemFallback")}),e.jsxs(Ce,{children:[e.jsx(z,{className:"ccy-mark"})," ",n.priceCredits.toLocaleString()]}),e.jsx(Te,{children:g[l]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"spinner","aria-hidden":!0})," ",p?i("migrate.statusConfirm"):i("migrate.statusAdding")]}):g[l]==="done"?e.jsx(Ne,{children:e.jsx(U,{})}):g[l]==="skipped"?e.jsx(_,{children:i("migrate.statusSkipped")}):g[l]==="failed"?e.jsx(_,{children:i("migrate.statusFailed")}):g[l]==="unlisted"?e.jsx(_,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(ze,{children:i("migrate.statusWaiting")})})]},n.item.oldTradeId))}),e.jsx(Ee,{className:"muted small",children:p?i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const{colors:r,gradients:Be,radius:Ae}=S,D="@media (max-width: 620px)",G=t.div`
183
183
  max-width: 520px;
184
184
  margin: 0 auto;
185
185
  text-align: center;
@@ -196,7 +196,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
196
196
  margin: 4px 0 0;
197
197
  `,V=t(I)`
198
198
  margin-top: 10px;
199
- `,Ae=t.div`
199
+ `,Qe=t.div`
200
200
  max-width: 860px;
201
201
  margin: 0 auto;
202
202
  padding-bottom: 120px;
@@ -220,7 +220,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
220
220
  line-height: 1.08;
221
221
  margin: 0 0 10px;
222
222
  `,Ke=t.span`
223
- background: ${Qe.amethyst};
223
+ background: ${Be.amethyst};
224
224
  -webkit-background-clip: text;
225
225
  background-clip: text;
226
226
  color: transparent;
@@ -317,7 +317,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
317
317
  `,Xe=t.div`
318
318
  width: 56px;
319
319
  height: 56px;
320
- border-radius: ${Re.card};
320
+ border-radius: ${Ae.card};
321
321
  overflow: hidden;
322
322
  flex: none;
323
323
  display: grid;
@@ -444,4 +444,4 @@ import{j as e,b as ee,r as h,L as te}from"./react-vyZjIDcS.js";import{t as S,s a
444
444
  flex: 1 1 auto;
445
445
  `,xt=t(I)`
446
446
  padding: 13px 24px;
447
- `,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:w,restore:j}=oe(),m=ae(),v=o==null?void 0:o.address;h.useEffect(()=>{j()},[j]);const{data:p,isLoading:g}=de({queryKey:["importable",v],queryFn:()=>ge(v),enabled:!!v}),b=xe(),R=h.useMemo(()=>mt.filter(d=>!d.secondary||b),[b]),[A,k]=h.useState({}),[$,N]=h.useState(new Set),[E,L]=h.useState(null),n=h.useMemo(()=>[...(p==null?void 0:p.creations)??[],...b?(p==null?void 0:p.owned)??[]:[]],[p,b]);h.useEffect(()=>{n.length&&k(d=>{const c={...d};for(const s of n)c[s.oldTradeId]==null&&(c[s.oldTradeId]=s.suggestedCredits);return c})},[n]);const l=d=>!$.has(d),a=d=>A[d.oldTradeId]??d.suggestedCredits,x=n.filter(d=>l(d.oldTradeId)),u=x.reduce((d,c)=>d+a(c),0);function f(d,c){const s=c.replace(/[^\d]/g,"");k(T=>({...T,[d]:s===""?0:parseInt(s,10)}))}function C(d){N(c=>{const s=new Set(c);return s.has(d)?s.delete(d):s.add(d),s})}function B(d){return d.map(c=>({item:c,priceCredits:Math.max(1,a(c))}))}function F(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(i("importListings.toastUpdated"))}return o?!g&&n.length===0?e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"✨"}),e.jsx(J,{children:i("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:i("importListings.emptyBody")}),e.jsx(V,{as:te,to:"/my-assets",variant:"purple",children:i("importListings.goToMyAssets")})]}):e.jsxs(Ae,{children:[e.jsxs(Fe,{children:[e.jsx(Pe,{children:i("importListings.eyebrow")}),e.jsxs(_e,{children:[i("importListings.titleLead")," ",e.jsx(Ke,{children:i("importListings.titleAccent")})]}),e.jsx(De,{children:i("importListings.lede",{currency:Q.name})})]}),e.jsxs(We,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",i("importListings.rate",{currency:Q.nameSingular})]}),g?e.jsx(X,{children:Array.from({length:4}).map((d,c)=>e.jsx(Je,{},c))}):R.map(d=>{const c=(p==null?void 0:p[d.key])??[];return c.length===0?null:e.jsxs(Ue,{children:[e.jsxs(He,{children:[e.jsx(Oe,{children:i(d.title)}),e.jsx(Ge,{children:i(d.sub)})]}),e.jsx(X,{children:c.map(s=>{const T=a(s),q=T!==s.suggestedCredits;return e.jsxs(Ye,{"data-off":l(s.oldTradeId)?void 0:!0,children:[e.jsx(Ve,{type:"checkbox",checked:l(s.oldTradeId),onChange:()=>C(s.oldTradeId),"aria-label":i("importListings.includeItem",{name:s.name})}),e.jsx(Xe,{children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs(Ze,{children:[e.jsx(qe,{title:s.name,children:s.name||i("importListings.itemFallback")}),e.jsx(et,{children:s.rarity})]}),e.jsxs(tt,{children:[e.jsxs(it,{children:[e.jsx(z,{size:15,color:S.colors.text}),e.jsx(st,{"data-testid":"imp-price-input",inputMode:"numeric",value:T.toLocaleString(),onChange:P=>f(s.oldTradeId,P.target.value),"aria-label":i("importListings.priceAria",{currency:Q.name,name:s.name})})]}),e.jsxs(nt,{children:[e.jsxs("span",{children:["$",K(T).toFixed(2)]}),q?e.jsxs(rt,{onClick:()=>k(P=>({...P,[s.oldTradeId]:s.suggestedCredits})),children:[i("importListings.resetTo")," ",e.jsx(z,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx(ot,{children:e.jsx(at,{size:"sm",disabled:!l(s.oldTradeId),onClick:()=>L(B([s])),children:i("importListings.list")})})]},s.oldTradeId)})})]},d.key)}),e.jsx(dt,{children:e.jsxs(ct,{children:[e.jsxs("div",{children:[e.jsxs(lt,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",u.toLocaleString()]}),e.jsx(pt,{children:i("importListings.selectedSummary",{count:x.length,usd:K(u).toFixed(2)})})]}),e.jsx(gt,{}),e.jsx(xt,{variant:"purple",disabled:x.length===0,onClick:()=>L(B(x)),children:i("importListings.listAll",{count:x.length})})]})}),E&&o?e.jsx(Be,{queue:E,session:o,onClose:()=>L(null),onDone:F}):null]}):e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"📦"}),e.jsx(J,{children:i("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:i("importListings.signInBody")}),e.jsx(V,{variant:"purple",onClick:()=>w(),children:i("storeSettings.signIn")})]})}export{Tt as ImportListings};
447
+ `,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:w,restore:j}=oe(),m=ae(),v=o==null?void 0:o.address;h.useEffect(()=>{j()},[j]);const{data:p,isLoading:g}=de({queryKey:["importable",v],queryFn:()=>ge(v),enabled:!!v}),b=xe(),A=h.useMemo(()=>mt.filter(d=>!d.secondary||b),[b]),[Q,k]=h.useState({}),[$,N]=h.useState(new Set),[E,L]=h.useState(null),n=h.useMemo(()=>[...(p==null?void 0:p.creations)??[],...b?(p==null?void 0:p.owned)??[]:[]],[p,b]);h.useEffect(()=>{n.length&&k(d=>{const c={...d};for(const s of n)c[s.oldTradeId]==null&&(c[s.oldTradeId]=s.suggestedCredits);return c})},[n]);const l=d=>!$.has(d),a=d=>Q[d.oldTradeId]??d.suggestedCredits,x=n.filter(d=>l(d.oldTradeId)),u=x.reduce((d,c)=>d+a(c),0);function f(d,c){const s=c.replace(/[^\d]/g,"");k(T=>({...T,[d]:s===""?0:parseInt(s,10)}))}function C(d){N(c=>{const s=new Set(c);return s.has(d)?s.delete(d):s.add(d),s})}function R(d){return d.map(c=>({item:c,priceCredits:Math.max(1,a(c))}))}function F(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(i("importListings.toastUpdated"))}return o?!g&&n.length===0?e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"✨"}),e.jsx(J,{children:i("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:i("importListings.emptyBody")}),e.jsx(V,{as:te,to:"/my-assets",variant:"purple",children:i("importListings.goToMyAssets")})]}):e.jsxs(Qe,{children:[e.jsxs(Fe,{children:[e.jsx(Pe,{children:i("importListings.eyebrow")}),e.jsxs(_e,{children:[i("importListings.titleLead")," ",e.jsx(Ke,{children:i("importListings.titleAccent")})]}),e.jsx(De,{children:i("importListings.lede",{currency:B.name})})]}),e.jsxs(We,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",i("importListings.rate",{currency:B.nameSingular})]}),g?e.jsx(X,{children:Array.from({length:4}).map((d,c)=>e.jsx(Je,{},c))}):A.map(d=>{const c=(p==null?void 0:p[d.key])??[];return c.length===0?null:e.jsxs(Ue,{children:[e.jsxs(He,{children:[e.jsx(Oe,{children:i(d.title)}),e.jsx(Ge,{children:i(d.sub)})]}),e.jsx(X,{children:c.map(s=>{const T=a(s),q=T!==s.suggestedCredits;return e.jsxs(Ye,{"data-off":l(s.oldTradeId)?void 0:!0,children:[e.jsx(Ve,{type:"checkbox",checked:l(s.oldTradeId),onChange:()=>C(s.oldTradeId),"aria-label":i("importListings.includeItem",{name:s.name})}),e.jsx(Xe,{children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs(Ze,{children:[e.jsx(qe,{title:s.name,children:s.name||i("importListings.itemFallback")}),e.jsx(et,{children:s.rarity})]}),e.jsxs(tt,{children:[e.jsxs(it,{children:[e.jsx(z,{size:15,color:S.colors.text}),e.jsx(st,{"data-testid":"imp-price-input",inputMode:"numeric",value:T.toLocaleString(),onChange:P=>f(s.oldTradeId,P.target.value),"aria-label":i("importListings.priceAria",{currency:B.name,name:s.name})})]}),e.jsxs(nt,{children:[e.jsxs("span",{children:["$",K(T).toFixed(2)]}),q?e.jsxs(rt,{onClick:()=>k(P=>({...P,[s.oldTradeId]:s.suggestedCredits})),children:[i("importListings.resetTo")," ",e.jsx(z,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx(ot,{children:e.jsx(at,{size:"sm",disabled:!l(s.oldTradeId),onClick:()=>L(R([s])),children:i("importListings.list")})})]},s.oldTradeId)})})]},d.key)}),e.jsx(dt,{children:e.jsxs(ct,{children:[e.jsxs("div",{children:[e.jsxs(lt,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",u.toLocaleString()]}),e.jsx(pt,{children:i("importListings.selectedSummary",{count:x.length,usd:K(u).toFixed(2)})})]}),e.jsx(gt,{}),e.jsx(xt,{variant:"purple",disabled:x.length===0,onClick:()=>L(R(x)),children:i("importListings.listAll",{count:x.length})})]})}),E&&o?e.jsx(Re,{queue:E,session:o,onClose:()=>L(null),onDone:F}):null]}):e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"📦"}),e.jsx(J,{children:i("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:i("importListings.signInBody")}),e.jsx(V,{variant:"purple",onClick:()=>w(),children:i("storeSettings.signIn")})]})}export{Tt as ImportListings};