@dcl/shop 0.5.1-30936490891.commit-42e2634 → 0.5.1-30937489674.commit-7b5f7ec

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 (177) hide show
  1. package/_assets/{Activity-CIJJTSUp.js → Activity-CKACY7GY.js} +3 -3
  2. package/_assets/{AnimatedBackground-Bv2erZC5.js → AnimatedBackground-Bjoz5yE_.js} +1 -1
  3. package/_assets/{Assets-BoR-QJY6.js → Assets-BxK2PTe5.js} +2 -2
  4. package/_assets/{Assets.styles-BePHQ_QA.js → Assets.styles-VFZDtV-L.js} +1 -1
  5. package/_assets/{Authorizations-BCA1IImf.js → Authorizations-Dk24wf9N.js} +1 -1
  6. package/_assets/{Cart-DTe7zox3.js → Cart-t8K6Hez2.js} +2 -2
  7. package/_assets/{CircularProgress-DzeFXlov.js → CircularProgress-ocqiOFwz.js} +1 -1
  8. package/_assets/{Collection-DHHXSeak.js → Collection-CqxTIiTW.js} +1 -1
  9. package/_assets/{CollectionCarousel-Orp4rJm9.js → CollectionCarousel-DK1GQlTQ.js} +1 -1
  10. package/_assets/{Creator-AMjYkiKe.js → Creator-MrzjHPNF.js} +1 -1
  11. package/_assets/{ErrorNotice-I9zAvGEr.js → ErrorNotice-uoSUw6uz.js} +1 -1
  12. package/_assets/{ExchangeController-B-TJWUiW.js → ExchangeController-xP28M4re.js} +1 -1
  13. package/_assets/{GetCredits-BNkvpwnR.js → GetCredits-B0xA7J-B.js} +1 -1
  14. package/_assets/{HelpersUtil-ylN16m8a.js → HelpersUtil-3gFlrCTY.js} +1 -1
  15. package/_assets/{ItemDetail-k2BANQ0W.js → ItemDetail-AFjL4E8F.js} +3 -3
  16. package/_assets/{LoadMore-DPVuoR5W.js → LoadMore-C0MsRFAE.js} +1 -1
  17. package/_assets/{ManaPricingBanner.styles-nRVCJe8Y.js → ManaPricingBanner.styles-DAzIc42S.js} +1 -1
  18. package/_assets/{MenuList-yS83NC0F.js → MenuList-CbV8jiXv.js} +1 -1
  19. package/_assets/{MyAssets-Ds0TK1z5.js → MyAssets-CcOi2fL-.js} +1 -1
  20. package/_assets/{MyFavorites-CDmtpdZP.js → MyFavorites-22WPJMqY.js} +1 -1
  21. package/_assets/{NotFound-CVe0kC-t.js → NotFound-D9cWw9u4.js} +1 -1
  22. package/_assets/{NotificationsBell-Fprokx0Q.js → NotificationsBell-DBQ0fDk3.js} +1 -1
  23. package/_assets/{OutfitDetail-CdEsz8A4.js → OutfitDetail-BJ3owKrx.js} +1 -1
  24. package/_assets/{OutfitPreview-Y1WhUQaY.js → OutfitPreview-fzgtTYGf.js} +1 -1
  25. package/_assets/{OutfitStudio-B9G6xI3H.js → OutfitStudio-Alyfoac0.js} +1 -1
  26. package/_assets/{StoreSettings-RMqF_ccU.js → StoreSettings-VMrIBOxF.js} +1 -1
  27. package/_assets/{Success-rJNIKLQ6.js → Success-B7QER1pk.js} +1 -1
  28. package/_assets/{SwapController-CgtlXeu5.js → SwapController-Dljt42lz.js} +1 -1
  29. package/_assets/{Tooltip-D1Bg11IA.js → Tooltip-CmakEXxx.js} +1 -1
  30. package/_assets/{TradeService-BhQmC5tm.js → TradeService-Bwt0lbfd.js} +1 -1
  31. package/_assets/{W3MFrameProviderSingleton-D-orryVV.js → W3MFrameProviderSingleton-C8-47Rcd.js} +3 -3
  32. package/_assets/{WebCryptoP256-Ckj1TqYw.js → WebCryptoP256-DmUARNki.js} +1 -1
  33. package/_assets/{authorizations-vn6dbOqY.js → authorizations-DiCizdf8.js} +1 -1
  34. package/_assets/{basic-D2f8I1xA.js → basic-CA1aEmBR.js} +1 -1
  35. package/_assets/{biconomy-BZAxWDGN.js → biconomy-SwZIbMwk.js} +1 -1
  36. package/_assets/{browseLayout.styles-BYrLBkl5.js → browseLayout.styles-HpCz3gHu.js} +1 -1
  37. package/_assets/{builder-DT_IucDZ.js → builder-6kwRAptb.js} +1 -1
  38. package/_assets/{buy-k-76F4x2.js → buy-CAtkwGsU.js} +1 -1
  39. package/_assets/{buy-gasless-DP35z8wI.js → buy-gasless-CwGKDSKP.js} +1 -1
  40. package/_assets/{categories-_gS0pssw.js → categories-CLN28P36.js} +1 -1
  41. package/_assets/{ccip-skuYIwjJ.js → ccip-C72ffo0Q.js} +1 -1
  42. package/_assets/{ccip-B4KLf1_A.js → ccip-CprmDCNP.js} +1 -1
  43. package/_assets/{clsx-BtU7gPvo.js → clsx-DMh9fL43.js} +1 -1
  44. package/_assets/{controller-BkNCBo5Z.js → controller-DHU-FUxQ.js} +2 -2
  45. package/_assets/{core-NV0Q-IPg.js → core-FzD1qHVC.js} +4 -4
  46. package/_assets/{createSvgIcon-ONkmiYB6.js → createSvgIcon-C8hW4bVO.js} +1 -1
  47. package/_assets/{custom-B2TqKkEi.js → custom-DSLGRsLr.js} +1 -1
  48. package/_assets/{data-capture-ubD-gh1z.js → data-capture-DZbiDCwX.js} +1 -1
  49. package/_assets/{email-yk5CxwkK.js → email-B6b7Pihn.js} +1 -1
  50. package/_assets/{embedded-wallet-Sdgu7IIM.js → embedded-wallet-B0umeTds.js} +1 -1
  51. package/_assets/{emotion-styled.browser.esm-Bi-gHJrz.js → emotion-styled.browser.esm-mh182qus.js} +1 -1
  52. package/_assets/{engine-tdlero6P.js → engine-BVwkhnlH.js} +1 -1
  53. package/_assets/{errors-WsZgWksO.js → errors-DDxkr-df.js} +1 -1
  54. package/_assets/{estimate-l1-fee-CyMpT0rk.js → estimate-l1-fee-DkXKfMMP.js} +1 -1
  55. package/_assets/{execute-C4cl9W-o.js → execute-CQY30MRS.js} +2 -2
  56. package/_assets/{features-CZqcLmC4.js → features-aABiY83f.js} +1 -1
  57. package/_assets/{fetchTokenMetadata-CS5UBL6x.js → fetchTokenMetadata-B-ittUXv.js} +2 -2
  58. package/_assets/{field.styles-CJlWBLbF.js → field.styles-AnVl2SkN.js} +1 -1
  59. package/_assets/{get-ecosystem-wallet-info-07JzLM0i.js → get-ecosystem-wallet-info-DYzdNY3r.js} +1 -1
  60. package/_assets/{getBalance-DL9ADD0u.js → getBalance-B25lcD9r.js} +1 -1
  61. package/_assets/{getNFT-D17z9oKn.js → getNFT-3gQ0u_Ad.js} +1 -1
  62. package/_assets/{getNFT-DoaFm4AC.js → getNFT-BPKHDI15.js} +1 -1
  63. package/_assets/{getThemeProps-Cl72yIFf.js → getThemeProps-BtZT8-J5.js} +1 -1
  64. package/_assets/{grid.styles-BZnnDTVu.js → grid.styles-CEjkD1f9.js} +1 -1
  65. package/_assets/{hashTypedData-wJwJpwvj.js → hashTypedData-B6Ns7uwn.js} +1 -1
  66. package/_assets/{hashTypedData-CrsUYWGu.js → hashTypedData-C90fm0lo.js} +1 -1
  67. package/_assets/{in-app-Btz7IDiL.js → in-app-pXzv7C_J.js} +1 -1
  68. package/_assets/{in-app-wallet-calls-DP3IphiJ.js → in-app-wallet-calls-DCv6deqZ.js} +1 -1
  69. package/_assets/{index-EECYRahm.js → index-7Hk55boV.js} +1 -1
  70. package/_assets/{index-Dlg6tqPP.js → index-A4O9UD-C.js} +1 -1
  71. package/_assets/{index-grgWjFlo.js → index-B5JBd4fr.js} +1 -1
  72. package/_assets/{index-BYbz0Puw.js → index-B8pZZJz-.js} +1 -1
  73. package/_assets/{index-8SWxdM-1.js → index-B9tSckDx.js} +1 -1
  74. package/_assets/{index-IsmxguMZ.js → index-BAnEsc71.js} +1 -1
  75. package/_assets/{index-C1Z_9GsV.js → index-BClXql-a.js} +1 -1
  76. package/_assets/{index-CBXYUzDZ.js → index-BFBb0rfQ.js} +2 -2
  77. package/_assets/{index-O4FksRMn.js → index-BIBwoiYY.js} +1 -1
  78. package/_assets/{index-Dy5Vw1H0.js → index-BR6IEMrM.js} +258 -258
  79. package/_assets/{index-BeQhSahz.js → index-BRLHYe51.js} +1 -1
  80. package/_assets/{index-CZF0PGAb.js → index-BVqb5Xn1.js} +1 -1
  81. package/_assets/{index-DpOehH6H.js → index-BZs9emRd.js} +3 -3
  82. package/_assets/{index-BQimjtyT.js → index-BeXckPt5.js} +3 -3
  83. package/_assets/{index-B59Gh8B7.js → index-BesOjXiK.js} +1 -1
  84. package/_assets/{index-m00Y2hq4.js → index-BxFAMFrH.js} +1 -1
  85. package/_assets/{index-BE-fLnWc.js → index-BxLAJ5x3.js} +1 -1
  86. package/_assets/{index-C7KsfPUz.js → index-ByYcwLlF.js} +1 -1
  87. package/_assets/{index-7BMeGSgL.js → index-C-PYa491.js} +1 -1
  88. package/_assets/index-CCZG6i6u.js +472 -0
  89. package/_assets/{index-C0xJOFUc.js → index-CH298nNs.js} +1 -1
  90. package/_assets/{index-nNKO8ftl.js → index-CIksKUax.js} +2 -2
  91. package/_assets/{index-DcebaGnX.js → index-CKjylYSE.js} +1 -1
  92. package/_assets/{index-CtASwK4E.js → index-CMuJ-UZF.js} +1 -1
  93. package/_assets/{index-DJ-CxX91.js → index-CNx03geY.js} +1 -1
  94. package/_assets/{index-BtwYGrhd.js → index-Cap8a-RE.js} +1 -1
  95. package/_assets/{index-CFksIzM4.js → index-CcgIVLBV.js} +1 -1
  96. package/_assets/{index-Bi_Apm6j.js → index-Ceayuq0S.js} +1 -1
  97. package/_assets/{index-CMFliAhY.js → index-Chom5dJx.js} +1 -1
  98. package/_assets/{index-ClHp2_nl.js → index-Co-gW5Hp.js} +1 -1
  99. package/_assets/{index-CzghBU6C.js → index-CrM8tpME.js} +1 -1
  100. package/_assets/{index-CtaCRDRI.js → index-Cy4PNM6A.js} +1 -1
  101. package/_assets/{index-CrWSaqPI.js → index-D7cHIqYc.js} +1 -1
  102. package/_assets/{index-Cxty1u3d.js → index-DC4Kv9-V.js} +1 -1
  103. package/_assets/{index-BVdlPUJG.js → index-DFbrx-dL.js} +1 -1
  104. package/_assets/{index-DKnXZSeg.js → index-DRc8upCX.js} +1 -1
  105. package/_assets/{index-D4hVVIWp.js → index-DUGGEaWM.js} +1 -1
  106. package/_assets/{index-CPdKHNCF.js → index-DUkz3Hx0.js} +1 -1
  107. package/_assets/{index-C45bHTUp.js → index-DY1F0LWT.js} +1 -1
  108. package/_assets/{index-CQQrdcNQ.js → index-Dm6iw_dl.js} +1 -1
  109. package/_assets/{index-CL530K8Y.js → index-DoqNeaqf.js} +1 -1
  110. package/_assets/{index-Ci8PIdRp.js → index-DosEHc_-.js} +1 -1
  111. package/_assets/{index-DjltGmXq.js → index-Dq8QHFiA.js} +1 -1
  112. package/_assets/{index-B5UKanqd.js → index-DykCPSFI.js} +1 -1
  113. package/_assets/{index-BlQcf37-.js → index-JK8hABNP.js} +1 -1
  114. package/_assets/{index-BbQMVOsy.js → index-JTqfub3n.js} +3 -3
  115. package/_assets/{index-CbHNXAwv.js → index-N1xuzaCt.js} +2 -2
  116. package/_assets/{index-BM3ki5xD.js → index-OAxN4fc3.js} +1 -1
  117. package/_assets/{index-BxzWlq1h.js → index-VGBz5J8e.js} +1 -1
  118. package/_assets/{index-DimCwX0M.js → index-YfEt1Rml.js} +1 -1
  119. package/_assets/{index-639jix5x.js → index-k4tf1CLH.js} +1 -1
  120. package/_assets/{index-DQM4pVOP.js → index-oHxf4tR1.js} +1 -1
  121. package/_assets/{index.es-KzvQwqfO.js → index.es-C8eU1wA8.js} +1 -1
  122. package/_assets/{index.es-BzqwGWTI.js → index.es-CK_ga1Is.js} +4 -4
  123. package/_assets/{index.es-StMi_Ya4.js → index.es-DZzFd5-b.js} +1 -1
  124. package/_assets/{localBatchGatewayRequest-DQGGi_PU.js → localBatchGatewayRequest-DTVgXIFF.js} +1 -1
  125. package/_assets/{mana-convert-D_y2vjtn.js → mana-convert-gocBeMiL.js} +1 -1
  126. package/_assets/{networks-DDcMYhGU.js → networks-NA0vFG8W.js} +1 -1
  127. package/_assets/{onramp-CBdambV_.js → onramp-piEEcDx9.js} +1 -1
  128. package/_assets/{openzeppelin-DSxwqs4i.js → openzeppelin-DqdNqCan.js} +1 -1
  129. package/_assets/{parseNft-DHPQc0OX.js → parseNft-BUAibBaN.js} +2 -2
  130. package/_assets/{parseSignature-DJF5siOG.js → parseSignature-BD7TDX9C.js} +3 -3
  131. package/_assets/{parseSignature-CGumShnk.js → parseSignature-CLxsZU9k.js} +1 -1
  132. package/_assets/{passkeys-C9h38bzo.js → passkeys-eWclvb1O.js} +1 -1
  133. package/_assets/{pay-with-exchange-CdWIlkYG.js → pay-with-exchange-C8DalAYE.js} +1 -1
  134. package/_assets/{qr-overlay-DfYnP7zW.js → qr-overlay-BMuU__O0.js} +1 -1
  135. package/_assets/{receive-BDPZr_50.js → receive-38k_LlRS.js} +1 -1
  136. package/_assets/{resolveImplementation-1IibNw8J.js → resolveImplementation-SB0AO_yR.js} +1 -1
  137. package/_assets/{rpc-Be4cuLO-.js → rpc-DEZlb2Y-.js} +1 -1
  138. package/_assets/{secp256k1-C2A9iNFQ.js → secp256k1-B-O8Geq4.js} +1 -1
  139. package/_assets/{secp256k1-CBaRftLy.js → secp256k1-Boxg6ZAq.js} +1 -1
  140. package/_assets/{secp256k1-CfSstl_L.js → secp256k1-DOOppOlV.js} +1 -1
  141. package/_assets/{send-DpFdmYN7.js → send-YrDd7FYi.js} +1 -1
  142. package/_assets/{send-batch-transaction-Bfap8p0Z.js → send-batch-transaction-Dyy9Uesb.js} +1 -1
  143. package/_assets/{send-eip712-transaction-Ca7s6qzX.js → send-eip712-transaction-3GcoolNv.js} +2 -2
  144. package/_assets/{send-gasless-transaction-DPOigmTX.js → send-gasless-transaction-QtEZzpC5.js} +2 -2
  145. package/_assets/{send-transaction-D2BNOa_n.js → send-transaction-DSdOj9eC.js} +2 -2
  146. package/_assets/{sendMetaTransaction-feJSI2TG.js → sendMetaTransaction-D3FwHHTn.js} +1 -1
  147. package/_assets/{sendRawTransaction-B-XApuqY.js → sendRawTransaction-CjOHZO88.js} +3 -3
  148. package/_assets/{serializeTransaction-I8okodGI.js → serializeTransaction-D_Dc_9Gp.js} +1 -1
  149. package/_assets/{session-proposal-DvL8lvR_.js → session-proposal-Ba1SoCtq.js} +1 -1
  150. package/_assets/{session-request-BXYdMjrw.js → session-request-CDBg7zst.js} +2 -2
  151. package/_assets/{signing-DT63E54M.js → signing-BSzxbe16.js} +3 -3
  152. package/_assets/{socials-ClcK9a8P.js → socials-CCZXYTfQ.js} +1 -1
  153. package/_assets/{swaps-C0ufdoJC.js → swaps-UHy-bRsG.js} +1 -1
  154. package/_assets/{thirdweb-B50LsjvD.js → thirdweb-k1S3G2Wc.js} +3 -3
  155. package/_assets/{to-serializable-transaction-D0wz5egz.js → to-serializable-transaction-BUvEWstJ.js} +2 -2
  156. package/_assets/{trade-encoding-SVWWPYXU.js → trade-encoding-DhmJ3YE9.js} +1 -1
  157. package/_assets/{transactionReceipt-BW33bMK1.js → transactionReceipt-DFrpXDGO.js} +1 -1
  158. package/_assets/{transactions-Dydjvljn.js → transactions-B4l-FEOR.js} +1 -1
  159. package/_assets/{useCreditPacks-BFQph8eD.js → useCreditPacks-m_96quiO.js} +1 -1
  160. package/_assets/useImportable-Ck2Tt8Ei.js +1 -0
  161. package/_assets/{useInfiniteGrid-Dz6b_PHh.js → useInfiniteGrid-XWDqyvpD.js} +1 -1
  162. package/_assets/useManaRate-sGau1wQV.js +1 -0
  163. package/_assets/{useStore-ff9cCCX6.js → useStore-DUJBpXit.js} +1 -1
  164. package/_assets/{useTheme-BzWpoSXD.js → useTheme-ViRtXA8G.js} +1 -1
  165. package/_assets/{verifyHash-6ZvXkv0_.js → verifyHash-Drn9Way6.js} +1 -1
  166. package/_assets/{w3m-modal-BI6MOh7J.js → w3m-modal-B0M073Ob.js} +1 -1
  167. package/_assets/{w3m-modal-B5LvO_YQ.js → w3m-modal-B7mGVnE3.js} +1 -1
  168. package/_assets/{wait-for-tx-receipt-B6htZpEq.js → wait-for-tx-receipt-BW8Z_n83.js} +1 -1
  169. package/_assets/{wallets-cwZJIsw-.js → wallets-DZ2SYb3M.js} +5 -5
  170. package/_assets/{web-connector-BMBh8mIE.js → web-connector-Yp5dVaCI.js} +3 -3
  171. package/_assets/{writeContract-C3lGbTIC.js → writeContract-BL3rIi0q.js} +1 -1
  172. package/_assets/{zoraTestnet-Dvb_L0a4.js → zoraTestnet-Cmcli8zw.js} +1 -1
  173. package/index.html +11 -11
  174. package/package.json +2 -2
  175. package/_assets/index-EheyvR55.js +0 -472
  176. package/_assets/useImportable-BP4DqZ-f.js +0 -1
  177. package/_assets/useManaRate-CfhYfW7C.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-EheyvR55.js","_assets/react-DehiWSvs.js","_assets/index-Dy5Vw1H0.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-BP4DqZ-f.js","_assets/buy-k-76F4x2.js","_assets/mana-convert-D_y2vjtn.js","_assets/authorizations-vn6dbOqY.js","_assets/sendMetaTransaction-feJSI2TG.js","_assets/trade-encoding-SVWWPYXU.js","_assets/ManaPricingBanner.styles-nRVCJe8Y.js","_assets/field.styles-CJlWBLbF.js"])))=>i.map(i=>d[i]);
2
- import{bn as bt,s as u,t as n,o as yt,B as vt,n as jt,q as kt,b as d,u as A,I as k,bo as Z,bp as J,bq as wt,_ as It,w as P,br as $t,b3 as q,ar as At,bs as Pt,bt as z}from"./index-Dy5Vw1H0.js";import{r as y,e as Lt,j as e,L as et,a as Nt}from"./react-DehiWSvs.js";import{m as Et}from"./mana-convert-D_y2vjtn.js";import{u as Tt}from"./useManaRate-CfhYfW7C.js";import{u as Ct}from"./useImportable-BP4DqZ-f.js";import{L as St}from"./LoadMore-DPVuoR5W.js";import{u as I}from"./useInfiniteGrid-Dz6b_PHh.js";import{m as it}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-k-76F4x2.js";import"./authorizations-vn6dbOqY.js";import"./sendMetaTransaction-feJSI2TG.js";import"./trade-encoding-SVWWPYXU.js";const Ft=15e3;function Mt(t,a){return t.txHash&&a.txHash?t.txHash===a.txHash:t.txHash||a.txHash?!1:t.status===a.status&&Math.abs(t.createdAt-a.createdAt)<=Ft}function Dt(t){const a=[...t].sort((i,c)=>c.createdAt-i.createdAt),s=[];for(const i of a){const c=s[s.length-1];c&&Mt(c[c.length-1],i)?c.push(i):s.push([i])}return s.map(i=>{var c;return{id:((c=i.find(r=>r.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,h)=>r+h.credits,0),lines:i}})}function qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function zt(t){const a=[],s=new Map;for(const i of t){const c=qt(i);if(!c){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=s.get(c);if(r){r.quantity+=1,r.credits+=i.credits;continue}const h={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(c,h),a.push(h)}return a}function Ht(t,a){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:a?Et(t.manaWei,a):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Ot(t){const s=Dt(t.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=t.sales.map(o=>{const p=Ht(o,t.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),c=(t.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),r=new Set(t.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(o=>!r.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...s,...i,...c,...h].sort((o,p)=>p.createdAt-o.createdAt||(o.id<p.id?-1:1))}function Rt(t,a){return a==="all"?t:a==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const at=t=>t.trim().toLowerCase();function Wt(t){const a=new Map;for(const s of t??[]){const i=at(s.txHash??"");if(!i)continue;const c=a.get(i);c?c.push(s):a.set(i,[s])}return a}function _t(t,a,s=Date.now()){const i=a.txHash?t.get(at(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?Bt(i[0].netCents):null,r=i.filter(o=>!o.available&&o.availableAt>s);if(r.length===0)return{kind:"credited",credits:c};const h=r.reduce((o,p)=>Math.max(o,p.availableAt),0);return{kind:"pending",credits:c,availableAt:h}}function Bt(t){return bt(t)}const Gt="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/credits-product-vs4Q6u6l.svg",H=yt`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-CCZG6i6u.js","_assets/react-DehiWSvs.js","_assets/index-BR6IEMrM.js","_assets/sentry-973sfbO9.js","_assets/dcl-schemas-Dr9BTjb7.js","_assets/ethers-CtNGBird.js","_assets/intl-CBcMB1D2.js","_assets/index-D-NhBWWr.css","_assets/useImportable-Ck2Tt8Ei.js","_assets/buy-CAtkwGsU.js","_assets/mana-convert-gocBeMiL.js","_assets/authorizations-DiCizdf8.js","_assets/sendMetaTransaction-D3FwHHTn.js","_assets/trade-encoding-DhmJ3YE9.js","_assets/ManaPricingBanner.styles-DAzIc42S.js","_assets/field.styles-AnVl2SkN.js"])))=>i.map(i=>d[i]);
2
+ import{bn as bt,s as u,t as n,o as yt,B as vt,n as jt,q as kt,b as d,u as A,I as k,bo as Z,bp as J,bq as wt,_ as It,w as P,br as $t,b3 as q,ar as At,bs as Pt,bt as z}from"./index-BR6IEMrM.js";import{r as y,e as Lt,j as e,L as et,a as Nt}from"./react-DehiWSvs.js";import{m as Et}from"./mana-convert-gocBeMiL.js";import{u as Tt}from"./useManaRate-sGau1wQV.js";import{u as Ct}from"./useImportable-Ck2Tt8Ei.js";import{L as St}from"./LoadMore-C0MsRFAE.js";import{u as I}from"./useInfiniteGrid-XWDqyvpD.js";import{m as it}from"./mana-matic-C4e1sNO3.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./buy-CAtkwGsU.js";import"./authorizations-DiCizdf8.js";import"./sendMetaTransaction-D3FwHHTn.js";import"./trade-encoding-DhmJ3YE9.js";const Ft=15e3;function Mt(t,a){return t.txHash&&a.txHash?t.txHash===a.txHash:t.txHash||a.txHash?!1:t.status===a.status&&Math.abs(t.createdAt-a.createdAt)<=Ft}function Dt(t){const a=[...t].sort((i,c)=>c.createdAt-i.createdAt),s=[];for(const i of a){const c=s[s.length-1];c&&Mt(c[c.length-1],i)?c.push(i):s.push([i])}return s.map(i=>{var c;return{id:((c=i.find(r=>r.txHash))==null?void 0:c.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(r=>r.createdAt)),status:i.some(r=>r.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((r,h)=>r+h.credits,0),lines:i}})}function qt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function zt(t){const a=[],s=new Map;for(const i of t){const c=qt(i);if(!c){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const r=s.get(c);if(r){r.quantity+=1,r.credits+=i.credits;continue}const h={key:c,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(c,h),a.push(h)}return a}function Ht(t,a){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:a?Et(t.manaWei,a):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Ot(t){const s=Dt(t.purchases.filter(o=>o.status!=="EXPIRED")).map(o=>({kind:"purchase",id:`purchase:${o.id}`,createdAt:o.createdAt,order:o})),i=t.sales.map(o=>{const p=Ht(o,t.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),c=(t.creditOrders??[]).filter(o=>o.status!=="failed"&&o.status!=="abandoned").map(o=>({kind:"credit",id:`credit:${o.id}`,createdAt:o.createdAt,order:o})),r=new Set(t.purchases.filter(o=>o.txHash).map(o=>o.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(o=>!r.has(o.txHash.toLowerCase())).map(o=>({kind:"mana-purchase",id:`mana-purchase:${o.id}`,createdAt:o.createdAt,sale:o}));return[...s,...i,...c,...h].sort((o,p)=>p.createdAt-o.createdAt||(o.id<p.id?-1:1))}function Rt(t,a){return a==="all"?t:a==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const at=t=>t.trim().toLowerCase();function Wt(t){const a=new Map;for(const s of t??[]){const i=at(s.txHash??"");if(!i)continue;const c=a.get(i);c?c.push(s):a.set(i,[s])}return a}function _t(t,a,s=Date.now()){const i=a.txHash?t.get(at(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const c=i.length===1?Bt(i[0].netCents):null,r=i.filter(o=>!o.available&&o.availableAt>s);if(r.length===0)return{kind:"credited",credits:c};const h=r.reduce((o,p)=>Math.max(o,p.availableAt),0);return{kind:"pending",credits:c,availableAt:h}}function Bt(t){return bt(t)}const Gt="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/credits-product-vs4Q6u6l.svg",H=yt`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,Ut=u.section`
@@ -333,4 +333,4 @@ import{bn as bt,s as u,t as n,o as yt,B as vt,n as jt,q as kt,b as d,u as A,I as
333
333
  margin: 6px 0 0;
334
334
  `,ae=u(vt)`
335
335
  margin-top: 12px;
336
- `,K=M.withComponent(et),ne=y.lazy(()=>It(()=>import("./index-EheyvR55.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.ImportListings}))),$=24,se=["all","purchases","sales"],D="migrate";function j(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ct(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function dt(t){const a=Number(t)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function lt({children:t}){const a=y.useRef(null),[s,i]=y.useState(null),c=()=>{var h;const r=(h=a.current)==null?void 0:h.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return e.jsxs(te,{ref:a,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[t,s?Nt.createPortal(e.jsx(ee,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function re({item:t}){const a=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||a,{data:i,isLoading:c}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Pt(t.tradeId):z(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),r=s&&c,h=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",p=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,m=e.jsxs(e.Fragment,{children:[r?e.jsx(W,{}):e.jsx(R,{children:o?e.jsx("img",{src:o,alt:h}):e.jsx(k,{name:"cart",size:20})}),e.jsxs(_,{children:[r?e.jsx(G,{}):e.jsx(B,{title:h,children:h}),t.quantity>1?e.jsx(U,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(ie,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(K,{to:p,"data-link":"true",children:m}):e.jsx(M,{children:m})}function oe({order:t}){const a=zt(t.lines),s=a.reduce((i,c)=>i+c.quantity,0);return e.jsxs(L,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(v,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(O,{children:a.map(i=>e.jsx(re,{item:i},i.key))})]})}function ce({sale:t}){const{data:a,isLoading:s}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),c=(a==null?void 0:a.thumbnail)??"",r=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(W,{}):e.jsx(R,{children:c?e.jsx("img",{src:c,alt:i}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[s?e.jsx(G,{}):e.jsx(B,{title:i,children:i}),e.jsx(U,{children:d("activity.boughtFrom",{account:ct(t.seller)})})]})]});return e.jsxs(L,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.paidWithMana")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(v,{children:[dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]})]})]}),e.jsx(O,{children:r?e.jsx(K,{to:r,"data-link":"true",children:h}):e.jsx(M,{children:h})})]})}function de({sale:t,payout:a}){const{data:s,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),c=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,o=e.jsxs(e.Fragment,{children:[i?e.jsx(W,{}):e.jsx(R,{children:r?e.jsx("img",{src:r,alt:c}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[i?e.jsx(G,{}):e.jsx(B,{title:c,children:c}),e.jsxs(U,{children:[d("activity.soldTo",{account:ct(t.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:j(a.availableAt)})}`:""]})]})]});return e.jsxs(L,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.saleLabel")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?e.jsxs(v,{"data-kind":"income",children:["+",dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]}):a.credits!==null?e.jsxs(v,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",At(a.credits)]}):e.jsx(v,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(O,{children:h?e.jsx(K,{to:h,"data-link":"true",children:o}):e.jsx(M,{children:o})})]})}function le({order:t}){const a=`$${(t.usdCents/100).toFixed(2)}`,s=$t(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(L,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(Yt,{children:e.jsx("img",{src:Gt,alt:"","aria-hidden":!0})}),e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":s,children:i}),e.jsxs(v,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function ue({filter:t}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(rt,{children:[e.jsx(k,{name:a.icon,size:40,color:n.colors.muted2}),e.jsx(ot,{children:a.title}),e.jsx("p",{className:"muted",children:a.body}),t!=="sales"?e.jsx(ae,{as:et,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Le(){const{session:t}=jt(),[a,s]=y.useState("all"),[i,c]=Lt(),r=i.get("view")===D;kt({title:r?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:h}=Ct(),o=h!==void 0&&(h>0||r),p=!!t&&!r&&a!=="sales",m=!!t&&!r&&a!=="purchases",x=I(["purchases",t==null?void 0:t.address],l=>wt(t.address,t.identity,{first:$,skip:l}),{enabled:p}),g=I(["sales",t==null?void 0:t.address],l=>Z(t.address,{role:"seller",first:$,skip:l}),{enabled:m}),f=I(["credit-orders",t==null?void 0:t.address],l=>J(t.address,t.identity,{first:$,skip:l}),{enabled:p}),b=I(["mana-purchases",t==null?void 0:t.address],l=>Z(t.address,{role:"buyer",first:$,skip:l}),{enabled:p}),{data:V}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>J(t.address,t.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ut=y.useMemo(()=>Wt(V),[V]),{data:ht}=Tt(m);if(!t)return e.jsxs(rt,{children:[e.jsx(k,{name:"clock",size:40,color:n.colors.muted2}),e.jsx(ot,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Q=Rt(Ot({purchases:p?x.items:[],sales:m?g.items:[],creditOrders:p?f.items:[],manaPurchases:p?b.items:[],rate:ht}),a),pt=p&&(x.isLoading||f.isLoading||b.isLoading)||m&&g.isLoading,X=p&&(x.isFetchingNextPage||f.isFetchingNextPage||b.isFetchingNextPage)||m&&g.isFetchingNextPage,mt=p&&(x.hasNextPage||f.hasNextPage||b.hasNextPage)||m&&g.hasNextPage;function xt(){p&&x.hasNextPage&&x.fetchNextPage(),p&&f.hasNextPage&&f.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),m&&g.hasNextPage&&g.fetchNextPage()}function gt(l){if(s(l),!r)return;const w=new URLSearchParams(i);w.delete("view"),c(w,{replace:!0})}function ft(){const l=new URLSearchParams(i);l.set("view",D),c(l,{replace:!0})}return e.jsxs(Ut,{"data-view":r?D:"feed",children:[e.jsx(Kt,{children:e.jsx(Vt,{children:d("nav.activity")})}),e.jsxs(Qt,{role:"tablist","aria-label":d("nav.activity"),children:[se.map(l=>e.jsx(nt,{type:"button",role:"tab","aria-selected":!r&&a===l,"data-active":!r&&a===l,"data-testid":`activity-filter-${l}`,onClick:()=>gt(l),children:d(`activity.filter.${l}`)},l)),o?e.jsxs(Xt,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":h?d("activity.migrate.chipAria",{count:h}):void 0,onClick:ft,children:[d("activity.migrate.chip"),h?e.jsx(Zt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),r?e.jsx(y.Suspense,{fallback:e.jsx(Jt,{"aria-busy":"true"}),children:e.jsx(ne,{})}):pt?e.jsx(Y,{children:Array.from({length:5}).map((l,w)=>e.jsx(tt,{},w))}):Q.length===0?e.jsx(ue,{filter:a}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[Q.map(l=>l.kind==="purchase"?e.jsx(oe,{order:l.order},l.id):l.kind==="credit"?e.jsx(le,{order:l.order},l.id):l.kind==="mana-purchase"?e.jsx(ce,{sale:l.sale},l.id):e.jsx(de,{sale:l.sale,payout:_t(ut,l.sale)},l.id)),X?e.jsx(tt,{}):null]}),e.jsx(St,{hasNextPage:mt,isFetching:X,onLoadMore:xt})]})]})}export{Le as Activity};
336
+ `,K=M.withComponent(et),ne=y.lazy(()=>It(()=>import("./index-CCZG6i6u.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(t=>({default:t.ImportListings}))),$=24,se=["all","purchases","sales"],D="migrate";function j(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ct(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function dt(t){const a=Number(t)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function lt({children:t}){const a=y.useRef(null),[s,i]=y.useState(null),c=()=>{var h;const r=(h=a.current)==null?void 0:h.getBoundingClientRect();r&&i({top:r.bottom+8,left:r.left+r.width/2})};return e.jsxs(te,{ref:a,tabIndex:0,onMouseEnter:c,onMouseLeave:()=>i(null),onFocus:c,onBlur:()=>i(null),children:[t,s?Nt.createPortal(e.jsx(ee,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function re({item:t}){const a=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||a,{data:i,isLoading:c}=A({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?Pt(t.tradeId):z(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),r=s&&c,h=(i==null?void 0:i.name)??d("activity.itemFallback"),o=(i==null?void 0:i.thumbnail)??"",p=q({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,m=e.jsxs(e.Fragment,{children:[r?e.jsx(W,{}):e.jsx(R,{children:o?e.jsx("img",{src:o,alt:h}):e.jsx(k,{name:"cart",size:20})}),e.jsxs(_,{children:[r?e.jsx(G,{}):e.jsx(B,{title:h,children:h}),t.quantity>1?e.jsx(U,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(ie,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]});return p?e.jsx(K,{to:p,"data-link":"true",children:m}):e.jsx(M,{children:m})}function oe({order:t}){const a=zt(t.lines),s=a.reduce((i,c)=>i+c.quantity,0);return e.jsxs(L,{"data-testid":"purchase-order",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(v,{children:[e.jsx(P,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(O,{children:a.map(i=>e.jsx(re,{item:i},i.key))})]})}function ce({sale:t}){const{data:a,isLoading:s}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??d("activity.itemFallback"),c=(a==null?void 0:a.thumbnail)??"",r=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(W,{}):e.jsx(R,{children:c?e.jsx("img",{src:c,alt:i}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[s?e.jsx(G,{}):e.jsx(B,{title:i,children:i}),e.jsx(U,{children:d("activity.boughtFrom",{account:ct(t.seller)})})]})]});return e.jsxs(L,{"data-testid":"activity-mana-purchase",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.paidWithMana")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(v,{children:[dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]})]})]}),e.jsx(O,{children:r?e.jsx(K,{to:r,"data-link":"true",children:h}):e.jsx(M,{children:h})})]})}function de({sale:t,payout:a}){const{data:s,isLoading:i}=A({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>z(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),c=(s==null?void 0:s.name)??d("activity.itemFallback"),r=(s==null?void 0:s.thumbnail)??"",h=q({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,o=e.jsxs(e.Fragment,{children:[i?e.jsx(W,{}):e.jsx(R,{children:r?e.jsx("img",{src:r,alt:c}):e.jsx(k,{name:"offer",size:20})}),e.jsxs(_,{children:[i?e.jsx(G,{}):e.jsx(B,{title:c,children:c}),e.jsxs(U,{children:[d("activity.soldTo",{account:ct(t.counterparty)}),a.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:j(a.availableAt)})}`:""]})]})]});return e.jsxs(L,{"data-testid":"activity-sale",children:[e.jsxs(N,{children:[e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsx(C,{children:d("activity.saleLabel")})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),a.kind==="direct"?e.jsxs(v,{"data-kind":"income",children:["+",dt(t.manaWei)," ",e.jsx(lt,{children:e.jsx(st,{src:it,alt:"MANA"})})]}):a.credits!==null?e.jsxs(v,{"data-kind":"income",children:[e.jsx(P,{className:"ccy-mark"})," +",At(a.credits)]}):e.jsx(v,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(O,{children:h?e.jsx(K,{to:h,"data-link":"true",children:o}):e.jsx(M,{children:o})})]})}function le({order:t}){const a=`$${(t.usdCents/100).toFixed(2)}`,s=$t(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(L,{"data-testid":"credit-order",children:e.jsxs(N,{children:[e.jsx(Yt,{children:e.jsx("img",{src:Gt,alt:"","aria-hidden":!0})}),e.jsxs(E,{children:[e.jsx(T,{children:j(t.createdAt)}),e.jsxs(C,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:a})]})]}),e.jsxs(S,{children:[e.jsx(F,{"data-status":s,children:i}),e.jsxs(v,{"data-kind":"income",children:["+",e.jsx(P,{className:"ccy-mark"})," ",t.credits]})]})]})})}function ue({filter:t}){const a={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(rt,{children:[e.jsx(k,{name:a.icon,size:40,color:n.colors.muted2}),e.jsx(ot,{children:a.title}),e.jsx("p",{className:"muted",children:a.body}),t!=="sales"?e.jsx(ae,{as:et,to:"/items",variant:"purple",children:d("notFound.cta")}):null]})}function Le(){const{session:t}=jt(),[a,s]=y.useState("all"),[i,c]=Lt(),r=i.get("view")===D;kt({title:r?d("seo.import.title"):d("nav.activity"),noindex:!0});const{count:h}=Ct(),o=h!==void 0&&(h>0||r),p=!!t&&!r&&a!=="sales",m=!!t&&!r&&a!=="purchases",x=I(["purchases",t==null?void 0:t.address],l=>wt(t.address,t.identity,{first:$,skip:l}),{enabled:p}),g=I(["sales",t==null?void 0:t.address],l=>Z(t.address,{role:"seller",first:$,skip:l}),{enabled:m}),f=I(["credit-orders",t==null?void 0:t.address],l=>J(t.address,t.identity,{first:$,skip:l}),{enabled:p}),b=I(["mana-purchases",t==null?void 0:t.address],l=>Z(t.address,{role:"buyer",first:$,skip:l}),{enabled:p}),{data:V}=A({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>J(t.address,t.identity,{first:200}).then(l=>l.payouts),enabled:m,staleTime:6e4}),ut=y.useMemo(()=>Wt(V),[V]),{data:ht}=Tt(m);if(!t)return e.jsxs(rt,{children:[e.jsx(k,{name:"clock",size:40,color:n.colors.muted2}),e.jsx(ot,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const Q=Rt(Ot({purchases:p?x.items:[],sales:m?g.items:[],creditOrders:p?f.items:[],manaPurchases:p?b.items:[],rate:ht}),a),pt=p&&(x.isLoading||f.isLoading||b.isLoading)||m&&g.isLoading,X=p&&(x.isFetchingNextPage||f.isFetchingNextPage||b.isFetchingNextPage)||m&&g.isFetchingNextPage,mt=p&&(x.hasNextPage||f.hasNextPage||b.hasNextPage)||m&&g.hasNextPage;function xt(){p&&x.hasNextPage&&x.fetchNextPage(),p&&f.hasNextPage&&f.fetchNextPage(),p&&b.hasNextPage&&b.fetchNextPage(),m&&g.hasNextPage&&g.fetchNextPage()}function gt(l){if(s(l),!r)return;const w=new URLSearchParams(i);w.delete("view"),c(w,{replace:!0})}function ft(){const l=new URLSearchParams(i);l.set("view",D),c(l,{replace:!0})}return e.jsxs(Ut,{"data-view":r?D:"feed",children:[e.jsx(Kt,{children:e.jsx(Vt,{children:d("nav.activity")})}),e.jsxs(Qt,{role:"tablist","aria-label":d("nav.activity"),children:[se.map(l=>e.jsx(nt,{type:"button",role:"tab","aria-selected":!r&&a===l,"data-active":!r&&a===l,"data-testid":`activity-filter-${l}`,onClick:()=>gt(l),children:d(`activity.filter.${l}`)},l)),o?e.jsxs(Xt,{type:"button",role:"tab","aria-selected":r,"data-active":r,"data-testid":"activity-filter-migrate","aria-label":h?d("activity.migrate.chipAria",{count:h}):void 0,onClick:ft,children:[d("activity.migrate.chip"),h?e.jsx(Zt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),r?e.jsx(y.Suspense,{fallback:e.jsx(Jt,{"aria-busy":"true"}),children:e.jsx(ne,{})}):pt?e.jsx(Y,{children:Array.from({length:5}).map((l,w)=>e.jsx(tt,{},w))}):Q.length===0?e.jsx(ue,{filter:a}):e.jsxs(e.Fragment,{children:[e.jsxs(Y,{children:[Q.map(l=>l.kind==="purchase"?e.jsx(oe,{order:l.order},l.id):l.kind==="credit"?e.jsx(le,{order:l.order},l.id):l.kind==="mana-purchase"?e.jsx(ce,{sale:l.sale},l.id):e.jsx(de,{sale:l.sale,payout:_t(ut,l.sale)},l.id)),X?e.jsx(tt,{}):null]}),e.jsx(St,{hasNextPage:mt,isFetching:X,onLoadMore:xt})]})]})}export{Le as Activity};
@@ -1,4 +1,4 @@
1
- import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-Dy5Vw1H0.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
1
+ import{r as l,j as v}from"./react-DehiWSvs.js";import{s as u}from"./index-BR6IEMrM.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -1,4 +1,4 @@
1
- import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-Dy5Vw1H0.js";import{r as dt,s as pt,u as ht}from"./buy-k-76F4x2.js";import{a as xt,m as Le}from"./mana-convert-D_y2vjtn.js";import{u as Ue}from"./useManaRate-CfhYfW7C.js";import{g as ft,h as mt,i as ut,j as gt,k as bt,C as yt,l as wt,o as jt,m as vt,n as $t,M as Ct,p as kt,E as St,q as Et,r as Rt,s as _t,t as Tt,u as zt,v as It}from"./Assets.styles-BePHQ_QA.js";import{S as Te,R as At,F as Nt,e as Mt}from"./categories-_gS0pssw.js";import{L as Pt}from"./LoadMore-DPVuoR5W.js";import{u as Wt}from"./useInfiniteGrid-Dz6b_PHh.js";import{E as Bt}from"./ErrorNotice-I9zAvGEr.js";import{d as Ft}from"./dcl-schemas-Dr9BTjb7.js";import{s as Lt,G as Ut,w as Ht,S as Ot}from"./buy-gasless-DP35z8wI.js";import{i as Gt}from"./trade-encoding-SVWWPYXU.js";import{f as Dt}from"./errors-WsZgWksO.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-D1Bg11IA.js";import{G as Kt}from"./grid.styles-BZnnDTVu.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-vn6dbOqY.js";import"./sendMetaTransaction-feJSI2TG.js";function V(i){const o=i.source??"item",a=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<He?{ok:!1,reason:"too-short"}:o.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Ft.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(i,o={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${a}`);const x=await d.available(i);if((p=o.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return xt(L,i)}async function sn(i,o,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:i,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(i,o){const a=be.from(i.availableAmount),l=be.from(L).sub(a);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(i,o={}){const a=tn,h=o.intervalMs??1e4,l=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${i}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(i){const{name:o,identity:a,signer:h}=i,l=i.chainId??F.chainId,d=i.provider??"across",x=(i.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:o,buyer:x,chainId:l,provider:d});try{const u=await dt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,o,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Lt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ut))throw b;f=await pt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ht(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:o,buyer:x,originConfirmed:r}),u instanceof Ot)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
1
+ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8 as Xe,b9 as Ye,a as et,s,t,n as Be,a$ as tt,x as nt,ar as ge,b as n,v as st,I as S,w as M,bw as ne,a_ as it,R as Y,bc as ot,bb as rt,q as Fe,ad as at,af as _e,ag as q,at as lt,bx as ct}from"./index-BR6IEMrM.js";import{r as dt,s as pt,u as ht}from"./buy-CAtkwGsU.js";import{a as xt,m as Le}from"./mana-convert-gocBeMiL.js";import{u as Ue}from"./useManaRate-sGau1wQV.js";import{g as ft,h as mt,i as ut,j as gt,k as bt,C as yt,l as wt,o as jt,m as vt,n as $t,M as Ct,p as kt,E as St,q as Et,r as Rt,s as _t,t as Tt,u as zt,v as It}from"./Assets.styles-VFZDtV-L.js";import{S as Te,R as At,F as Nt,e as Mt}from"./categories-CLN28P36.js";import{L as Pt}from"./LoadMore-C0MsRFAE.js";import{u as Wt}from"./useInfiniteGrid-XWDqyvpD.js";import{E as Bt}from"./ErrorNotice-uoSUw6uz.js";import{d as Ft}from"./dcl-schemas-Dr9BTjb7.js";import{s as Lt,G as Ut,w as Ht,S as Ot}from"./buy-gasless-CwGKDSKP.js";import{j as Gt}from"./trade-encoding-DhmJ3YE9.js";import{f as Dt}from"./errors-DDxkr-df.js";import{J as qt,C as Vt,B as be}from"./ethers-CtNGBird.js";import{n as Zt}from"./Tooltip-CmakEXxx.js";import{G as Kt}from"./grid.styles-CEjkD1f9.js";import"./sentry-973sfbO9.js";import"./intl-CBcMB1D2.js";import"./authorizations-DiCizdf8.js";import"./sendMetaTransaction-D3FwHHTn.js";function V(i){const o=i.source??"item",a=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${o}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(i){const o=i.trim();return o.length===0?{ok:!1,reason:"empty"}:Jt.test(o)?o.length<He?{ok:!1,reason:"too-short"}:o.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Ft.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(i,o={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${a}`);const x=await d.available(i);if((p=o.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(i){return xt(L,i)}async function sn(i,o,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:i,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(i,o){const a=be.from(i.availableAmount),l=be.from(L).sub(a);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Gt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(i,o={}){const a=tn,h=o.intervalMs??1e4,l=o.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${i}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(i){const{name:o,identity:a,signer:h}=i,l=i.chainId??F.chainId,d=i.provider??"across",x=(i.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:o,buyer:x,chainId:l,provider:d});try{const u=await dt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,o,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let f;try{f=await Lt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ut))throw b;f=await pt(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:f}),await Ht(f),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:f}),d==="across"){const b=await rn(f,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:f};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:f,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:f}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:o,buyer:x,originConfirmed:r}),u instanceof Ot)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -379,7 +379,7 @@ import{d as We,r as m,j as e,e as Qe}from"./react-DehiWSvs.js";import{c as F,b8
379
379
  color: ${t.colors.accent};
380
380
  }
381
381
  }
382
- `;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/governance-DnazlIjy.webp",An=s.div`
382
+ `;function En({name:i,priceCredits:o,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=m.useState("confirm"),[g,w]=m.useState(""),[j,k]=m.useState(null),f=m.useRef(!1),b=g.trim().toLowerCase()===i.toLowerCase(),v=r==="completing",E=o!=null?ge(o):"—",C=o==null,T=l==null?void 0:l.credits,R=o!=null&&T!=null?o-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;m.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||f.current)){f.current=!0,u("completing"),k(null);try{const y=await an({name:i,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ot(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{f.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(oe,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(i)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(fn,{"aria-hidden":!0,children:"@"}),e.jsx(mn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(fe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:it,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.pendingHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(fe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(ie,{children:n("names.successHeaderTitle")}),e.jsx(oe,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-items")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(i){return i.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const _n="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/governance-DnazlIjy.webp",An=s.div`
383
383
  width: 100%;
384
384
  min-width: 0;
385
385
  `,Nn=s.nav`
@@ -1,4 +1,4 @@
1
- import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-_gS0pssw.js";import{n as c,T as se}from"./Tooltip-D1Bg11IA.js";import{t as e,s as o,I as g,b as s,ad as ae,C as v}from"./index-Dy5Vw1H0.js";const re=o.div`
1
+ import{r as $,j as t}from"./react-DehiWSvs.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-CLN28P36.js";import{n as c,T as se}from"./Tooltip-CmakEXxx.js";import{t as e,s as o,I as g,b as s,ad as ae,C as v}from"./index-BR6IEMrM.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 P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,n as G,v as O,I as z,w as B,u as w,x as K,c as Q,y as H,z as A,j as X,A as Z,D as T}from"./index-Dy5Vw1H0.js";import{a as J,b as U,c as V,d as Y,s as tt,e as it}from"./authorizations-vn6dbOqY.js";import{f as et}from"./builder-DT_IucDZ.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-WsZgWksO.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-feJSI2TG.js";const nt=D`
1
+ import{j as i,L as _,r as P}from"./react-DehiWSvs.js";import{s as n,B as W,t as a,o as D,q as F,b as e,n as G,v as O,I as z,w as B,u as w,x as K,c as Q,y as H,z as A,j as X,A as Z,D as T}from"./index-BR6IEMrM.js";import{c as J,d as U,b as V,e as Y,s as tt,a as it}from"./authorizations-DiCizdf8.js";import{f as et}from"./builder-6kwRAptb.js";import{m as ot}from"./mana-matic-C4e1sNO3.js";import{f as at}from"./errors-DDxkr-df.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-D3FwHHTn.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,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as le,s as i,b as s,ar as de,a_ as sa,aq as na,I as O,w as Mt,ac as Ne,q as ia,O as Q,ae as dt,n as ra,u as oa,a$ as ca,x as da,b0 as la,b1 as ua,b2 as ha,b3 as pa,v as ga,b4 as lt,R as G,b5 as ut,b6 as xa,j as ae,c as ht,b7 as ma,C as fa,b8 as pt,b9 as Be,ba as ye,bb as be,bc as gt,g as ve,d as ya,e as We,bd as ba}from"./index-Dy5Vw1H0.js";import{M as va,S as wa,C as Ca,H as ja,a as ka,T as $a,X as Sa,b as Ma,B as Ta,c as Ia,d as xt,e as Pa,f as ke,P as Tt,m as za,g as Aa,h as Ea,i as qa,j as It,k as $e,L as Ra,l as _a,n as mt,o as ft,W as Ba,p as Wa,q as Fa,A as La,r as Ka,s as Ua,t as Na,u as Qa,v as Oa,w as Ha,x as Va,y as Ga,z as Da,D as Ya,E as Ja,F as Xa,G as Za,I as es,J as ts,K as Fe,N as as,O as ss,Q as ns,R as is,U as yt,V as bt,Y as rs,Z as os,_ as cs}from"./CollectionCarousel-Orp4rJm9.js";import{u as ds}from"./useManaRate-CfhYfW7C.js";import{u as ls,r as us,g as hs,b as Le}from"./buy-k-76F4x2.js";import{j as ps,k as gs,e as xs,n as ms,f as fs,A as ys}from"./authorizations-vn6dbOqY.js";import{b as bs,w as vs,S as vt,G as ws}from"./buy-gasless-DP35z8wI.js";import{u as Cs,M as js,R as we,r as ks,c as $s,p as wt}from"./useCreditPacks-BFQph8eD.js";import{i as Ss,a as Ms}from"./errors-WsZgWksO.js";import{E as Ts}from"./ErrorNotice-I9zAvGEr.js";import{u as Ct}from"./mana-convert-D_y2vjtn.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-SVWWPYXU.js";import"./sendMetaTransaction-feJSI2TG.js";const{colors:se,radius:Is}=le,Ps=i.div`
1
+ import{j as e,L as Se,r as P,d as ta,b as aa}from"./react-DehiWSvs.js";import{t as le,s as i,b as s,ar as de,a_ as sa,aq as na,I as O,w as Mt,ac as Ne,q as ia,O as Q,ae as dt,n as ra,u as oa,a$ as ca,x as da,b0 as la,b1 as ua,b2 as ha,b3 as pa,v as ga,b4 as lt,R as G,b5 as ut,b6 as xa,j as ae,c as ht,b7 as ma,C as fa,b8 as pt,b9 as Be,ba as ye,bb as be,bc as gt,g as ve,d as ya,e as We,bd as ba}from"./index-BR6IEMrM.js";import{M as va,S as wa,C as Ca,H as ja,a as ka,T as $a,X as Sa,b as Ma,B as Ta,c as Ia,d as xt,e as Pa,f as ke,P as Tt,m as za,g as Aa,h as Ea,i as qa,j as It,k as $e,L as Ra,l as _a,n as mt,o as ft,W as Ba,p as Wa,q as Fa,A as La,r as Ka,s as Ua,t as Na,u as Qa,v as Oa,w as Ha,x as Va,y as Ga,z as Da,D as Ya,E as Ja,F as Xa,G as Za,I as es,J as ts,K as Fe,N as as,O as ss,Q as ns,R as is,U as yt,V as bt,Y as rs,Z as os,_ as cs}from"./CollectionCarousel-DK1GQlTQ.js";import{u as ds}from"./useManaRate-sGau1wQV.js";import{u as ls,r as us,g as hs,b as Le}from"./buy-CAtkwGsU.js";import{j as ps,k as gs,a as xs,n as ms,f as fs,A as ys}from"./authorizations-DiCizdf8.js";import{b as bs,w as vs,S as vt,G as ws}from"./buy-gasless-CwGKDSKP.js";import{u as Cs,M as js,R as we,r as ks,c as $s,p as wt}from"./useCreditPacks-m_96quiO.js";import{i as Ss,a as Ms}from"./errors-DDxkr-df.js";import{E as Ts}from"./ErrorNotice-uoSUw6uz.js";import{u as Ct}from"./mana-convert-gocBeMiL.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-DhmJ3YE9.js";import"./sendMetaTransaction-D3FwHHTn.js";const{colors:se,radius:Is}=le,Ps=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,d as ta,b as aa}from"./react-DehiWSvs.js";import{t
58
58
  font-weight: 700;
59
59
  color: ${se.text};
60
60
  }
61
- `,Rs="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/buy-error-22UunaPC.png";function _s(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(va,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(wa,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Ca,{"data-tall":Y||void 0,children:[e.jsxs(ja,{children:[e.jsxs(ka,{children:[e.jsx($a,{children:D}),!W&&e.jsx(Sa,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Ma,{})})]}),e.jsxs(Ta,{children:[e.jsx(Ia,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Pa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{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=za(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Bs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Ws,{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(Aa,{"data-testid":"buy-error",children:[e.jsx(Ea,{src:Rs,alt:"",width:64,height:80}),e.jsxs(qa,{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 Bs({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(Ra,{src:sa,alt:"",width:61,height:61}),e.jsx(_a,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Ws({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(Wa,{}),e.jsxs(Fa,{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(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(La,{children:[e.jsx(Ka,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ua,{children:[e.jsxs("div",{children:[e.jsxs(Na,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(Es,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Qa,{address:n.item.creator}):null]}),e.jsxs(Oa,{children:[e.jsx(Ha,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Va,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ga,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Da,{}),e.jsx(Ya,{children:de(n.credits)}),e.jsxs(Ja,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Xa,{children:[e.jsxs(Za,{children:[e.jsx(es,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ts,{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
+ `,Rs="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/buy-error-22UunaPC.png";function _s(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(va,{role:"dialog","aria-modal":"true","aria-label":s("cartCheckout.dialogAria"),children:[e.jsx(wa,{onClick:W?void 0:z,"aria-hidden":!0}),e.jsxs(Ca,{"data-tall":Y||void 0,children:[e.jsxs(ja,{children:[e.jsxs(ka,{children:[e.jsx($a,{children:D}),!W&&e.jsx(Sa,{onClick:z,"aria-label":s("buyModal.close"),children:e.jsx(Ma,{})})]}),e.jsxs(Ta,{children:[e.jsx(Ia,{children:l==="nofunds"?s("buyModal.dclBalance"):s("buyModal.myCreditsBalance")}),e.jsx(xt,{}),e.jsx(Pa,{children:de(I)})]})]}),l==="choose"&&e.jsxs(ke,{children:[e.jsxs(qs,{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=za(o.totalCents??0,o.totalManaWei??0n);return A!=null?s("buyModal.manaRate",{mana:A.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),l==="processing"&&e.jsx(Bs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),l==="nofunds"&&e.jsx(Ws,{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(Aa,{"data-testid":"buy-error",children:[e.jsx(Ea,{src:Rs,alt:"",width:64,height:80}),e.jsxs(qa,{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 Bs({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(Ra,{src:sa,alt:"",width:61,height:61}),e.jsx(_a,{children:ne}),D?e.jsxs(Ps,{children:[e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{"data-step":!0,style:{width:`${Y}%`}})}),I>1?e.jsxs(zs,{children:[l,"/",I]}):null]}):e.jsx(mt,{"aria-hidden":!0,children:e.jsx(ft,{})})]})}function Ws({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(Wa,{}),e.jsxs(Fa,{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(As,{children:o.map(n=>{const L=n.quantity??1;return e.jsxs(La,{children:[e.jsx(Ka,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Ua,{children:[e.jsxs("div",{children:[e.jsxs(Na,{title:n.item.name,children:[n.item.name||s("buyModal.itemFallback"),L>1?e.jsx(Es,{children:s("cartCheckout.qty",{count:L})}):null]}),n.item.creator?e.jsx(Qa,{address:n.item.creator}):null]}),e.jsxs(Oa,{children:[e.jsx(Ha,{}),e.jsx("span",{children:de(n.priceCredits*L)})]})]})]},n.item.id)})}),e.jsx(Va,{children:I.map(n=>{const L=n.id===z;return e.jsxs(Ga,{"data-testid":"credit-pack","data-on":L||void 0,onClick:()=>W(n.id),children:[e.jsx(Da,{}),e.jsx(Ya,{children:de(n.credits)}),e.jsxs(Ja,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(Xa,{children:[e.jsxs(Za,{children:[e.jsx(es,{}),e.jsx("span",{children:de((A==null?void 0:A.credits)??0)})]}),e.jsxs(ts,{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{a8 as N,a9 as U,aa as o,ab as n,ac as D,o as M}from"./index-Dy5Vw1H0.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-BtU7gPvo.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 a=44,B=M(P||(P=l`
1
+ import{a8 as N,a9 as U,aa as o,ab as n,ac as D,o as M}from"./index-BR6IEMrM.js";import{r as w,j as g}from"./react-DehiWSvs.js";import{g as z,a as E,c as I,b as F,s as v}from"./clsx-DMh9fL43.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 a=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,u as V,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,W as X,y as T,I as ee,b as a,c as te,j as ae,u as re,q as oe,C as ie,af as F,ag as se,aY as ne,aZ as ce}from"./index-Dy5Vw1H0.js";import{E as le}from"./ErrorNotice-I9zAvGEr.js";import{d as de,g as pe,a as xe,P as ue,C as me,b as ge,c as he,B as be,S as fe,M as je,A as ve}from"./browseLayout.styles-BYrLBkl5.js";import{u as ye}from"./useStore-ff9cCCX6.js";import{S as z,C as Ce,F as we,c as Ne,P as Se,d as ke,H as Pe,e as $e}from"./categories-_gS0pssw.js";import{L as Ae}from"./LoadMore-DPVuoR5W.js";import{u as Me}from"./useInfiniteGrid-Dz6b_PHh.js";import{G as Ee}from"./grid.styles-BZnnDTVu.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const Re=c.section`
1
+ import{j as e,r as m,u as V,d as J}from"./react-DehiWSvs.js";import{t as v,s as c,W as X,y as T,I as ee,b as a,c as te,j as ae,u as re,q as oe,C as ie,af as F,ag as se,aY as ne,aZ as ce}from"./index-BR6IEMrM.js";import{E as le}from"./ErrorNotice-uoSUw6uz.js";import{d as de,g as pe,a as xe,P as ue,C as me,b as ge,c as he,B as be,S as fe,M as je,A as ve}from"./browseLayout.styles-HpCz3gHu.js";import{u as ye}from"./useStore-DUJBpXit.js";import{S as z,C as Ce,F as we,c as Ne,P as Se,d as ke,H as Pe,e as $e}from"./categories-CLN28P36.js";import{L as Ae}from"./LoadMore-C0MsRFAE.js";import{u as Me}from"./useInfiniteGrid-XWDqyvpD.js";import{G as Ee}from"./grid.styles-CEjkD1f9.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.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-DehiWSvs.js";import{s as e,t as o,b as g,w as k,ar as j,bu as C,C as G,o as Y,I as Q,j as X,g as W,e as B,d as Z,a0 as J,bS as F,ag as q}from"./index-Dy5Vw1H0.js";import{s as ee,f as U,A as H,g as K,r as te,m as ne,i as ae,M as ie,h as oe}from"./authorizations-vn6dbOqY.js";import{i as se}from"./errors-WsZgWksO.js";import{E as re}from"./ErrorNotice-I9zAvGEr.js";import{a as ce}from"./buy-k-76F4x2.js";import{g as de,f as le}from"./trade-encoding-SVWWPYXU.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-feJSI2TG.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(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>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(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,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}),s>0n&&i>0&&i<n){const d=n-i,f=be(d,n,s);l>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,m=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(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",we=e.div`
1
+ import{j as t,r as v}from"./react-DehiWSvs.js";import{s as e,t as o,b as g,w as k,ar as j,bu as C,C as G,o as Y,I as Q,j as X,g as W,e as B,d as Z,a0 as J,bS as F,ag as q}from"./index-BR6IEMrM.js";import{s as ee,f as U,A as H,g as K,r as te,m as ne,i as ae,M as ie,h as oe}from"./authorizations-DiCizdf8.js";import{i as se}from"./errors-DDxkr-df.js";import{E as re}from"./ErrorNotice-uoSUw6uz.js";import{a as ce}from"./buy-CAtkwGsU.js";import{g as de,f as le}from"./trade-encoding-DhmJ3YE9.js";import{s as pe,M as he,E as ue}from"./sendMetaTransaction-D3FwHHTn.js";import{I as xe,C as ge}from"./ethers-CtNGBird.js";const R="shop:resume_after_signin",fe=900*1e3;function dt(a){try{sessionStorage.setItem(R,JSON.stringify({...a,at:Date.now()}))}catch{}}function lt(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>fe?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}function me(a,n){return(a+n-1n)/n}function be(a,n,i){return a<=0||n<=0?0n:a>=n?i:me(i*BigInt(a),BigInt(n))}function pt(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,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}),s>0n&&i>0&&i<n){const d=n-i,f=be(d,n,s);l>=f&&c.push({method:"combined",creditsCents:i,manaWei:f})}s>0n&&l>=s&&c.push({method:"mana",creditsCents:0,manaWei:s});const p=((b=c.find(d=>d.method==="credits"))==null?void 0:b.method)??((y=c.find(d=>d.method==="combined"))==null?void 0:y.method)??((w=c.find(d=>d.method==="mana"))==null?void 0:w.method)??null,m=!c.some(d=>d.method==="mana"||d.method==="combined")&&s>0n&&l>0n?{manaWei:l,manaCents:ye(l,n,s),priceCents:n}:null;return{options:c,preferred:p,manaShortfall:m}}function ye(a,n,i){return Number(a*BigInt(n)/i)}function ht(a,n){let i=Number.isFinite(n)?Math.max(0,Math.trunc(n)):0;return a.map(s=>{const l=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,c=Math.min(l,i);return i-=c,c})}function M(a){return Number.isFinite(a)?Math.max(0,a)/10:0}function ut(a,n){return a.options.find(i=>i.method===n)??null}function xt(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",we=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -1,4 +1,4 @@
1
- import{d as V,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Y,F as je,H as R,G as W,s as r,be as ve,aq as Ce,bf as ye,b as t,bg as $e,bh as _,B as ke,ac as Z,W as J,n as Ne,y as Q,I as T,c as Pe,q as Se,af as S,C as Le,ag as Ae,bd as Fe,bi as Ee}from"./index-Dy5Vw1H0.js";import{d as Me,g as ze,a as Be,P as Ie,C as Re,b as We,c as _e,A as Te,B as He,S as Ge,M as Ue,e as De,f as Ke}from"./browseLayout.styles-BYrLBkl5.js";import{u as Oe,L as qe}from"./useStore-ff9cCCX6.js";import{S as H,C as Ve,F as Ye,c as Ze,P as Je,d as Qe,H as Xe,e as et}from"./categories-_gS0pssw.js";import{L as G}from"./LoadMore-DPVuoR5W.js";import{u as U}from"./useInfiniteGrid-Dz6b_PHh.js";import{E as D}from"./ErrorNotice-I9zAvGEr.js";import{G as K}from"./grid.styles-BZnnDTVu.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:tt}=Y,it=r.article`
1
+ import{d as V,j as e,L as be,u as fe,e as we,r as y}from"./react-DehiWSvs.js";import{t as Y,F as je,H as R,G as W,s as r,be as ve,aq as Ce,bf as ye,b as t,bg as $e,bh as _,B as ke,ac as Z,W as J,n as Ne,y as Q,I as T,c as Pe,q as Se,af as S,C as Le,ag as Ae,bd as Fe,bi as Ee}from"./index-BR6IEMrM.js";import{d as Me,g as ze,a as Be,P as Ie,C as Re,b as We,c as _e,A as Te,B as He,S as Ge,M as Ue,e as De,f as Ke}from"./browseLayout.styles-HpCz3gHu.js";import{u as Oe,L as qe}from"./useStore-DUJBpXit.js";import{S as H,C as Ve,F as Ye,c as Ze,P as Je,d as Qe,H as Xe,e as et}from"./categories-CLN28P36.js";import{L as G}from"./LoadMore-C0MsRFAE.js";import{u as U}from"./useInfiniteGrid-XWDqyvpD.js";import{E as D}from"./ErrorNotice-uoSUw6uz.js";import{G as K}from"./grid.styles-CEjkD1f9.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";const{colors:u,radius:X,media:tt}=Y,it=r.article`
2
2
  height: 300px;
3
3
  background: ${u.bg};
4
4
  border-radius: ${X.card};
@@ -1 +1 @@
1
- import{j as r}from"./react-DehiWSvs.js";import{I as i}from"./index-Dy5Vw1H0.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-DehiWSvs.js";import{I as i}from"./index-BR6IEMrM.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-D-orryVV.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-BQimjtyT.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-C8-47Rcd.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-BeXckPt5.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{d as he,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,o as B,q as ue,b as r,C as p,n as ge,x as fe,R as g,b3 as me,j as N,bc as U,I as ie,a_ as H,w as re,bv as D}from"./index-Dy5Vw1H0.js";import{R as K}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as ve}from"./useCreditPacks-BFQph8eD.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-convert-D_y2vjtn.js";const P="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/pack-stacks-D-V2jSHW.webp",oe="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/pack-chest-BX_j84xW.webp",$e="https://cdn.decentraland.org/@dcl/shop/0.5.1-30936490891.commit-42e2634/_assets/credit-coin-CmcTCd5i.webp",je="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.5.1-30936490891.commit-42e2634/_assets/packs-backdrop-BcXiUPeP.webp",O="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Pe=i.div`
1
+ import{d as he,e as xe,r as l,j as t}from"./react-DehiWSvs.js";import{s as i,t as e,o as B,q as ue,b as r,C as p,n as ge,x as fe,R as g,b3 as me,j as N,bc as U,I as ie,a_ as H,w as re,bv as D}from"./index-BR6IEMrM.js";import{R as K}from"./resume-buy-Bf0zIH7y.js";import{u as be,a as we,R as ye,c as ke,i as Ce,b as ve}from"./useCreditPacks-m_96quiO.js";import"./sentry-973sfbO9.js";import"./dcl-schemas-Dr9BTjb7.js";import"./ethers-CtNGBird.js";import"./intl-CBcMB1D2.js";import"./mana-convert-gocBeMiL.js";const P="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/pack-coins-BDh1ZDbh.webp",ne="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/pack-stacks-D-V2jSHW.webp",oe="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/pack-chest-BX_j84xW.webp",$e="https://cdn.decentraland.org/@dcl/shop/0.5.1-30937489674.commit-7b5f7ec/_assets/credit-coin-CmcTCd5i.webp",je="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.5.1-30937489674.commit-7b5f7ec/_assets/packs-backdrop-BcXiUPeP.webp",O="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-grgWjFlo.js";import{d as g,r as v}from"./index-BQimjtyT.js";import{C as c}from"./ConstantsUtil-Di3dRDAF.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-D-orryVV.js";import{au as y}from"./NetworkUtil-EoWQDMpU.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-B5JBd4fr.js";import{d as g,r as v}from"./index-BeXckPt5.js";import{C as c}from"./ConstantsUtil-Di3dRDAF.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-C8-47Rcd.js";import{au as y}from"./NetworkUtil-EoWQDMpU.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;