@dcl/shop 0.1.0-28661536077.commit-c5e8ad5 → 0.1.0-28703787617.commit-d117df8

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 (193) hide show
  1. package/assets/Assets-FLrOHysp.js +1 -0
  2. package/assets/Cart-74G7u3M0.js +1 -0
  3. package/assets/{CircularProgress-DGwI2EN6.js → CircularProgress-D-iaLmF3.js} +1 -1
  4. package/assets/Collection-AO4XdOKU.js +1 -0
  5. package/assets/{ConstantsUtil-4Wiw99iz.js → ConstantsUtil-CkFCQ14z.js} +1 -1
  6. package/assets/Creator-8VyZOUv7.js +1 -0
  7. package/assets/{ExchangeController-zdGbkpDw.js → ExchangeController-D7DGcIN0.js} +1 -1
  8. package/assets/GetCredits-BQyEYRN1.js +2 -0
  9. package/assets/{HelpersUtil-C-HlMh2E.js → HelpersUtil-CWaTGhBJ.js} +1 -1
  10. package/assets/ImportListings-DT4n0cu0.js +1 -0
  11. package/assets/ItemDetail-Dxzb-zAN.js +1 -0
  12. package/assets/ItemDetail-yNwYjl_l.css +1 -0
  13. package/assets/Market-DahFqRly.js +1 -0
  14. package/assets/MyAssets-QhQumAsS.js +1 -0
  15. package/assets/{MyFavorites-C8VF3wpf.js → MyFavorites-CU6la9k8.js} +1 -1
  16. package/assets/MyPurchases-BNqJ6kya.js +1 -0
  17. package/assets/{NetworkUtil-mKiGb5Li.js → NetworkUtil-DRBYr7tG.js} +1 -1
  18. package/assets/NotFound-BK3mhtdy.js +1 -0
  19. package/assets/{RealCheckout-Df7L_Xxc.js → RealCheckout-DyqEWKbw.js} +1 -1
  20. package/assets/Success-ytt79-xY.js +1 -0
  21. package/assets/{SvgIcon-QHzcyq_c.js → SvgIcon-CqOcU2_R.js} +1 -1
  22. package/assets/{SwapController-BO0XUPjk.js → SwapController-BAvEAFso.js} +1 -1
  23. package/assets/{TradeService-3h9JUVn6.js → TradeService-DqHp35f0.js} +1 -1
  24. package/assets/{W3MFrameProviderSingleton-AoTKwfu7.js → W3MFrameProviderSingleton-C9eN6p7c.js} +3 -3
  25. package/assets/{WebCryptoP256-wHkiJKyS.js → WebCryptoP256-DMw8pfkw.js} +1 -1
  26. package/assets/{basic-DUypXmlM.js → basic-O8asjnC_.js} +1 -1
  27. package/assets/{biconomy-Ck4AyQiM.js → biconomy-DRAo41DQ.js} +1 -1
  28. package/assets/{browser-ponyfill-l3wX528D.js → browser-ponyfill-DgNUJw98.js} +1 -1
  29. package/assets/{browser-DgBqnGcY.js → browser-tNtPL9tA.js} +1 -1
  30. package/assets/{buy-BBAUmAfR.js → buy-DdbFtykN.js} +1 -1
  31. package/assets/{buy-gasless-NviXjZ0f.js → buy-gasless-KC8nGxjE.js} +1 -1
  32. package/assets/{ccip-Dlq9umjU.js → ccip-BJ7oys_I.js} +1 -1
  33. package/assets/{ccip-DeKQauhT.js → ccip-CiM7ro0m.js} +1 -1
  34. package/assets/{chains-BZnWnQvl.js → chains-BvaNJh8k.js} +1 -1
  35. package/assets/collection-Bp-GjNsA.css +1 -0
  36. package/assets/collections-F5S4KOPA.js +1 -0
  37. package/assets/{common-DRglK3kR.js → common-nfYPFMcM.js} +1 -1
  38. package/assets/{controller-Bgx9211-.js → controller-DFV5C_Bj.js} +2 -2
  39. package/assets/{core-Cki3FCQh.js → core-DoHB-Fsq.js} +4 -4
  40. package/assets/{custom-xEKfNNsJ.js → custom-CHMO6DAH.js} +1 -1
  41. package/assets/{data-capture-Uz1HkKqY.js → data-capture-C0KcKXM2.js} +1 -1
  42. package/assets/decimals-BF3lya9z.js +1 -0
  43. package/assets/{decimals-dZeJ2OUx.js → decimals-D2DxCA74.js} +1 -1
  44. package/assets/{detectExtension-BC3UKuJR.js → detectExtension-BgXbwH_B.js} +1 -1
  45. package/assets/{email-B4jWVAso.js → email-BCwmDy2I.js} +1 -1
  46. package/assets/{embedded-wallet-Gve5MDWK.js → embedded-wallet-Bt4p5ewN.js} +1 -1
  47. package/assets/{engine-B4nb2cpG.js → engine-B9SUxJLQ.js} +1 -1
  48. package/assets/{estimate-l1-fee-Bi_voOoR.js → estimate-l1-fee-DBKkdttH.js} +1 -1
  49. package/assets/eth_estimateGas-CgtMLqRU.js +1 -0
  50. package/assets/{eth_getStorageAt-CAD8m7vv.js → eth_getStorageAt-DOrCpfo7.js} +1 -1
  51. package/assets/eth_getTransactionCount-C5pT27ll.js +1 -0
  52. package/assets/{ethereum-rOnUivvy.js → ethereum-DymVJL-H.js} +1 -1
  53. package/assets/{ethers-g2M4Ny1y.js → ethers-BxoDGoYp.js} +1 -1
  54. package/assets/{extractIPFS-B1Y_qYYI.js → extractIPFS-BOd_GXbf.js} +1 -1
  55. package/assets/{features-BxjM9Oqa.js → features-NGIu4mkR.js} +1 -1
  56. package/assets/{fetchTokenMetadata-BYtXvAQ3.js → fetchTokenMetadata-CkXgTWUT.js} +2 -2
  57. package/assets/{fortmatic-BkOjsQRr.js → fortmatic-fqRJiMUL.js} +1 -1
  58. package/assets/{generateUtilityClasses-Bkw0uvCo.js → generateUtilityClasses-sji8XAMf.js} +1 -1
  59. package/assets/get-ecosystem-wallet-info-DphiBsfW.js +1 -0
  60. package/assets/{getBalance-Bd1PYOq-.js → getBalance-CsoixpqV.js} +2 -2
  61. package/assets/{getInstalledModules-D6GohJR0.js → getInstalledModules-BYiXEbWK.js} +1 -1
  62. package/assets/{getNFT-DfYeTU_3.js → getNFT-Bylv_Kez.js} +2 -2
  63. package/assets/{getNFT-DjbNgozj.js → getNFT-YvHp8dfS.js} +1 -1
  64. package/assets/{hashTypedData-PGCpbthX.js → hashTypedData-COanhsEe.js} +1 -1
  65. package/assets/{hashTypedData-CkyTd8hd.js → hashTypedData-EVHZYlMo.js} +1 -1
  66. package/assets/import-D0C6XMTV.js +1 -0
  67. package/assets/{in-app-wallet-calls-Cwc8dXWH.js → in-app-wallet-calls-Drs5geFM.js} +1 -1
  68. package/assets/{index-Dd_mETVS.js → index--Vhvv8yH.js} +1 -1
  69. package/assets/{index-JiIXuUkn.js → index-2H94zSx1.js} +1 -1
  70. package/assets/{index-BNPOkjv5.js → index-48EHi-ha.js} +2 -2
  71. package/assets/{index-BJA0fGtl.js → index-6zaqIgnj.js} +1 -1
  72. package/assets/{index-BXrDMTU7.js → index-B1w_z5D2.js} +1 -1
  73. package/assets/{index-BSaXeP16.js → index-B3EyEzJm.js} +1 -1
  74. package/assets/{index-CDOD9uhi.js → index-B4sUKZKp.js} +1 -1
  75. package/assets/{index-DI8Unuup.js → index-B5_18Sy2.js} +1 -1
  76. package/assets/{index-DPFS0ct7.js → index-B5lBgsVo.js} +1 -1
  77. package/assets/{index-DvlW6z_K.js → index-BLNMzhpw.js} +1 -1
  78. package/assets/{index-jKY6hIGu.js → index-BNNismVl.js} +1 -1
  79. package/assets/{index-CbRsU3xQ.js → index-BP1uw9cy.js} +1 -1
  80. package/assets/{index-qM5H3DJK.js → index-BRKGO65_.js} +1 -1
  81. package/assets/{index-DpBhY8x7.js → index-BTiODZa8.js} +1 -1
  82. package/assets/{index-DPE1tooR.js → index-Bh15xqDM.js} +2 -2
  83. package/assets/{index-Cm6_R4ib.js → index-BicpyvoP.js} +1 -1
  84. package/assets/{index-CIqwUqUC.js → index-BirCCUh-.js} +1 -1
  85. package/assets/{index-FMZPlqM7.js → index-Biyjc0Ff.js} +1 -1
  86. package/assets/{index-Br3wJENI.js → index-Bjv1adIg.js} +1 -1
  87. package/assets/{index-DoUrSumr.js → index-BkOpRLMc.js} +1 -1
  88. package/assets/{index-DJAdlrXV.js → index-BplHQIa9.js} +2 -2
  89. package/assets/{index-BRL3bL9K.js → index-Bs2y7HT-.js} +1 -1
  90. package/assets/{index-D0hFzIFj.js → index-BwWuCRvy.js} +1 -1
  91. package/assets/{index-CdmgbuiF.js → index-BzWM88M9.js} +1 -1
  92. package/assets/{index-BHSgamRG.css → index-C--hbOLp.css} +1 -1
  93. package/assets/{index-Bwcqqbyi.js → index-C1uMNxxv.js} +1 -1
  94. package/assets/{index-CPaODTpw.js → index-C4zSCX_Z.js} +1 -1
  95. package/assets/{index-D2AOkPG1.js → index-C9iIs3VH.js} +1 -1
  96. package/assets/{index-CLRnYK1L.js → index-CBg9-0F-.js} +1 -1
  97. package/assets/{index-B23tJeMl.js → index-CR1VOdeC.js} +1 -1
  98. package/assets/{index-BIqiBFIC.js → index-CWIz0pK9.js} +1 -1
  99. package/assets/{index-BlUGwcMm.js → index-Cai7byJp.js} +3 -3
  100. package/assets/{index-0i5TDv0S.js → index-Cb1dH7Tg.js} +1 -1
  101. package/assets/{index-sg-VA8-W.js → index-CfFGLMLx.js} +1 -1
  102. package/assets/index-ChPBLIHl.js +1 -0
  103. package/assets/{index-Ckzv_oD_.js → index-Cly18UAC.js} +1 -1
  104. package/assets/{index-CEkgM83J.js → index-CmK1m9NK.js} +3 -3
  105. package/assets/{index-Ch2PE2ae.js → index-Cmy99N4f.js} +1 -1
  106. package/assets/{index-Bi-fY-OR.js → index-Co35w_CM.js} +1 -1
  107. package/assets/{index-C4JUM8rg.js → index-CuCnO4yR.js} +1 -1
  108. package/assets/{index-YDZW54NO.js → index-D1ZA4_ZB.js} +1 -1
  109. package/assets/{index-DFG39jUy.js → index-D8nMMSJq.js} +1 -1
  110. package/assets/{index-BF_U2wGF.js → index-DE61TJeV.js} +1 -1
  111. package/assets/{index-CiWbPrh3.js → index-DEeUUTUO.js} +1 -1
  112. package/assets/{index-nFhfTGAX.js → index-DGaYORdB.js} +1 -1
  113. package/assets/{index-DFz5_KEt.js → index-DHapZH9R.js} +1 -1
  114. package/assets/{index-BiJCK9Ts.js → index-DK0GKs7C.js} +1 -1
  115. package/assets/{index-jDSI8VUV.js → index-DLMdWJlR.js} +1 -1
  116. package/assets/{index-BdjP3WGz.js → index-DN4ZXuvL.js} +1 -1
  117. package/assets/{index-CX_lEX5Y.js → index-DUMku6a-.js} +1 -1
  118. package/assets/{index-s9PTMkSR.js → index-DVCPdKkJ.js} +1 -1
  119. package/assets/{index-CGCwGu_A.js → index-DblYPgYx.js} +1 -1
  120. package/assets/{index-DRxN3xGb.js → index-Dl9W3POH.js} +1 -1
  121. package/assets/{index-DK4ayCPs.js → index-DsKgUXPz.js} +2 -2
  122. package/assets/{index-njBZQFZk.js → index-DuKV08mq.js} +1 -1
  123. package/assets/{index-BDfhJESf.js → index-MxzGamB6.js} +15 -15
  124. package/assets/{index-BnMS896q.js → index-VE0M5Mr2.js} +1 -1
  125. package/assets/{index-BdmcyQvB.js → index-w8EkaS6t.js} +1 -1
  126. package/assets/{index.es-D2IFOg8C.js → index.es-BClJ76hs.js} +4 -4
  127. package/assets/{index.es-vvIbuDyz.js → index.es-DDd1J_nF.js} +1 -1
  128. package/assets/{index.es-CN64oUnh.js → index.es-DUW0sNV5.js} +1 -1
  129. package/assets/{localBatchGatewayRequest-0IAQv7Hi.js → localBatchGatewayRequest-BEscwULf.js} +1 -1
  130. package/assets/mana-rate-WQsbGubC.js +1 -0
  131. package/assets/{native-DaeP4CfJ.js → native-Df5jPT-i.js} +1 -1
  132. package/assets/network-DkdfbH4K.js +1 -0
  133. package/assets/{networks-2cU5JCTv.js → networks-D5LcG5gv.js} +1 -1
  134. package/assets/{onramp-DWqR-bWo.js → onramp-DzxiiMC8.js} +1 -1
  135. package/assets/{openzeppelin-Dz3V59Rq.js → openzeppelin-BCsPynaY.js} +1 -1
  136. package/assets/{ownerOf-BET-RRRT.js → ownerOf-DwzcsL2q.js} +1 -1
  137. package/assets/{parseNft-3prrq-4r.js → parseNft-CzLvm9ef.js} +2 -2
  138. package/assets/{parseSignature-BTvNPey1.js → parseSignature-B4doFBao.js} +3 -3
  139. package/assets/{parseSignature-Dl1rB15w.js → parseSignature-CinRawwX.js} +1 -1
  140. package/assets/{pay-with-exchange-CgCzas_y.js → pay-with-exchange-tMWgDDnR.js} +1 -1
  141. package/assets/{qr-overlay-D-OO9gcT.js → qr-overlay-C94LVOqT.js} +3 -3
  142. package/assets/{react-DwvsoSSx.js → react-E8ng6RF2.js} +1 -1
  143. package/assets/{receive-CBFW9m3h.js → receive-B0FD5_ig.js} +1 -1
  144. package/assets/{resolveImplementation-2FBdn2ht.js → resolveImplementation-C9bzQXlL.js} +1 -1
  145. package/assets/{rpc-De0vEv9l.js → rpc-CUaqpDHe.js} +1 -1
  146. package/assets/{secp256k1-C7fI5S9N.js → secp256k1-BLKhahcf.js} +1 -1
  147. package/assets/{secp256k1-C197fkYo.js → secp256k1-BmWwfDR7.js} +1 -1
  148. package/assets/{secp256k1-ChUNYBFm.js → secp256k1-GlWdSmTG.js} +1 -1
  149. package/assets/{send-batch-transaction-DShk-gcV.js → send-batch-transaction-D42bEH3M.js} +1 -1
  150. package/assets/{send-eip712-transaction-SFPP_gAi.js → send-eip712-transaction-DHldBunY.js} +2 -2
  151. package/assets/{send-gasless-transaction-Docv48io.js → send-gasless-transaction-DAsf2gzP.js} +2 -2
  152. package/assets/{send-SuqMdrHd.js → send-vszzHyZQ.js} +1 -1
  153. package/assets/{sendRawTransaction-BPfXMToY.js → sendRawTransaction-BJNSpFJo.js} +3 -3
  154. package/assets/{serializeTransaction-DMHBLi5b.js → serializeTransaction-Cu2FW0RG.js} +1 -1
  155. package/assets/{session-proposal-Dt64bUB6.js → session-proposal-CM8vBqao.js} +1 -1
  156. package/assets/{session-request-DYGsWMHu.js → session-request-CUSobHcI.js} +2 -2
  157. package/assets/{sha256-BOpGQYDd.js → sha256-jSuq_fL-.js} +1 -1
  158. package/assets/{signing-C3nvaDy6.js → signing-BhKuxj3M.js} +5 -5
  159. package/assets/{socials-DJtq6WhW.js → socials-C7Mn2teg.js} +1 -1
  160. package/assets/{swaps-C4XWvhCd.js → swaps-B3b3BPhb.js} +1 -1
  161. package/assets/{thirdweb-J8jOmvLe.js → thirdweb-CCaFaDhE.js} +3 -3
  162. package/assets/{totalSupply-DbaD9nSb.js → totalSupply-Dx-7-6sN.js} +1 -1
  163. package/assets/{transactionReceipt-PlxEQk-r.js → transactionReceipt-CJdji8HT.js} +1 -1
  164. package/assets/{transactions-kz-SBtvJ.js → transactions-BtFsRzN5.js} +1 -1
  165. package/assets/{utils-BbN_2WlV.js → utils-CtSpY5KY.js} +1 -1
  166. package/assets/{verifyHash-07I5JeUS.js → verifyHash-Bah8UUrJ.js} +1 -1
  167. package/assets/{w3m-modal-BNZMxn_5.js → w3m-modal-DmKuKuqr.js} +1 -1
  168. package/assets/{w3m-modal-tB0F86UK.js → w3m-modal-Dy2dzDqd.js} +1 -1
  169. package/assets/{wait-for-tx-receipt-BMQ-5ARo.js → wait-for-tx-receipt-YXpaJpa1.js} +1 -1
  170. package/assets/wallet-kind-B3ypFsr7.js +1 -0
  171. package/assets/{wallets-CiOgCIFj.js → wallets-lynKKcfc.js} +6 -6
  172. package/assets/{web-connector-Bw0rJWzG.js → web-connector-CRAHa7Tf.js} +3 -3
  173. package/assets/{writeContract-BqMgtGlJ.js → writeContract-Bvo9In1F.js} +1 -1
  174. package/assets/{zora-sepolia-BVtVAb15.js → zora-sepolia-9dBUmZVP.js} +1 -1
  175. package/assets/{zoraTestnet-BbrL5ebv.js → zoraTestnet-0zqjhwdj.js} +1 -1
  176. package/index.html +9 -10
  177. package/package.json +2 -2
  178. package/assets/Assets-ChJgKBH1.js +0 -1
  179. package/assets/Cart-D6GSuO0K.js +0 -1
  180. package/assets/GetCredits-Cu6_MyGi.js +0 -2
  181. package/assets/ImportListings-DmbE9jhc.js +0 -1
  182. package/assets/ItemDetail-CB3Wmm_G.css +0 -1
  183. package/assets/ItemDetail-Cb0yRx1Q.js +0 -1
  184. package/assets/MyAssets-C8Z-Q5EP.js +0 -1
  185. package/assets/MyPurchases-mx8kVa-5.js +0 -1
  186. package/assets/Success-BARddMAw.js +0 -1
  187. package/assets/decimals-C-SFGRlr.js +0 -1
  188. package/assets/eth_estimateGas-Dt91G8LZ.js +0 -1
  189. package/assets/eth_getTransactionCount-BjU7s2Kb.js +0 -1
  190. package/assets/get-ecosystem-wallet-info-B_w9A9F7.js +0 -1
  191. package/assets/import-DzdYI7x9.js +0 -1
  192. package/assets/index-7IV-CwwO.js +0 -1
  193. package/assets/network-Cql6J8Ku.js +0 -1
@@ -0,0 +1 @@
1
+ import{u as K,r as t,j as s}from"./react-E8ng6RF2.js";import{u as Q,t as E,C as W,A as Y,k as Z,f as z}from"./index-MxzGamB6.js";import"./ethers-BxoDGoYp.js";const C=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]},{key:"ens",label:"NAMEs",sub:[]},{key:"parcel",label:"Lands",sub:[]}],V={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]},X=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],y=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function te(){const[M]=K(),n=(M.get("q")??"").trim().toLowerCase(),[c,S]=t.useState("wearable"),[r,N]=t.useState(null),[i,w]=t.useState([]),[m,$]=t.useState(""),[h,A]=t.useState(""),[u,q]=t.useState("newest"),[l,d]=t.useState(null),b=m&&!Number.isNaN(Number(m))?Number(m):void 0,_=h&&!Number.isNaN(Number(h))?Number(h):void 0,B=r?V[r]:void 0,H=(y.find(e=>e.key===u)??y[0]).server,P={category:c,rarities:i.length?i:void 0,wearableCategories:B,minPriceCredits:b,maxPriceCredits:_,search:n||void 0,sortBy:H,first:200},{data:p,isLoading:o,error:R}=Q({queryKey:["listings",P],queryFn:()=>z(P),placeholderData:Z}),f=(p==null?void 0:p.items)??[],g=(p==null?void 0:p.total)??f.length,L=t.useRef(null);t.useEffect(()=>{o||!n||L.current===n||(L.current=n,E("Shop Searched",{query:n,result_count:g}))},[n,o,g]);const j=t.useRef("__init__");t.useEffect(()=>{if(o)return;const e=JSON.stringify({category:c,subCategory:r,rarities:i,min:b,max:_,sort:u});if(j.current==="__init__"||j.current===e){j.current=e;return}j.current=e,E("Shop Applied Filter",{filters:{category:c,sub_category:r,rarities:i,min_price_credits:b??null,max_price_credits:_??null,sort:u},result_count:g})},[c,r,i,b,_,u,o,g]);function F(e){S(e),N(null)}function O(e){w(a=>a.includes(e)?a.filter(J=>J!==e):[...a,e])}function T(){S("wearable"),N(null),w([]),$(""),A(""),d(null)}function v(e){d(a=>a===e?null:e)}const U=y.find(e=>e.key===u)??y[0],x=C.find(e=>e.key===c)??C[0],I=r?`${x.label} · ${r}`:x.label,k=!!(b||_),D=k?`${m||"0"}–${h||"∞"}`:"Price",G=c!=="wearable"||!!r||i.length>0||k;return s.jsxs("div",{className:"browse",children:[l?s.jsx("div",{className:"filterbar__scrim",onClick:()=>d(null),"aria-hidden":!0}):null,s.jsxs("div",{className:"filterbar",children:[s.jsxs("div",{className:"filterbar__filters",children:[s.jsxs("div",{className:"filterbar__item",children:[s.jsxs("button",{className:`filterbar__trigger${l==="section"?" is-open":""}${r||c!=="wearable"?" is-active":""}`,onClick:()=>v("section"),children:[I," ",s.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),l==="section"?s.jsxs("div",{className:"filter-pop filter-pop--section",children:[s.jsx("ul",{className:"filter-pop__cats",children:C.map(e=>s.jsx("li",{children:s.jsx("button",{className:`filter-pop__cat${c===e.key?" is-active":""}`,onClick:()=>F(e.key),children:e.label})},e.key))}),x.sub.length?s.jsxs("ul",{className:"filter-pop__subs",children:[s.jsx("li",{children:s.jsxs("button",{className:`filter-pop__sub${r?"":" is-active"}`,onClick:()=>{N(null),d(null)},children:["All ",x.label]})}),x.sub.map(e=>s.jsx("li",{children:s.jsx("button",{className:`filter-pop__sub${r===e?" is-active":""}`,onClick:()=>{N(a=>a===e?null:e),d(null)},children:e})},e))]}):null]}):null]}),s.jsxs("div",{className:"filterbar__item",children:[s.jsxs("button",{className:`filterbar__trigger${l==="rarity"?" is-open":""}${i.length?" is-active":""}`,onClick:()=>v("rarity"),children:["Rarity ",i.length?s.jsx("span",{className:"filterbar__badge",children:i.length}):null," ",s.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),l==="rarity"?s.jsx("div",{className:"filter-pop filter-pop--rarity",children:X.map(e=>s.jsxs("label",{className:"filter-pop__check",children:[s.jsx("input",{type:"checkbox",checked:i.includes(e),onChange:()=>O(e)}),s.jsx("span",{children:e})]},e))}):null]}),s.jsxs("div",{className:"filterbar__item",children:[s.jsxs("button",{className:`filterbar__trigger${l==="price"?" is-open":""}${k?" is-active":""}`,onClick:()=>v("price"),children:[D," ",s.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),l==="price"?s.jsxs("div",{className:"filter-pop filter-pop--price",children:[s.jsxs("div",{className:"filter-pop__price-row",children:[s.jsx("input",{type:"number",min:"0",placeholder:"Min",value:m,onChange:e=>$(e.target.value)}),s.jsx("span",{children:"–"}),s.jsx("input",{type:"number",min:"0",placeholder:"Max",value:h,onChange:e=>A(e.target.value)})]}),s.jsxs("p",{className:"filter-pop__hint",children:["Price in ",W.name]})]}):null]}),G?s.jsx("button",{className:"filterbar__clear",onClick:T,children:"Clear all"}):null]}),s.jsxs("div",{className:"filterbar__right",children:[s.jsxs("span",{className:"filterbar__count",children:[o?"…":`${f.length.toLocaleString()} item${f.length===1?"":"s"}`,n?` for “${n}”`:""]}),s.jsxs("div",{className:"filterbar__item",children:[s.jsxs("button",{className:`filterbar__sort${l==="sort"?" is-open":""}`,onClick:()=>v("sort"),children:["Sort by: ",U.label," ",s.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),l==="sort"?s.jsx("div",{className:"filter-pop filter-pop--sort",children:y.map(e=>s.jsx("button",{className:`filter-pop__sort${e.key===u?" is-active":""}`,onClick:()=>{q(e.key),d(null)},children:e.label},e.key))}):null]})]})]}),R?s.jsx("p",{className:"error",children:R.message}):null,s.jsx("div",{className:"grid",children:o?Array.from({length:15}).map((e,a)=>s.jsx("div",{className:"card card--skeleton"},a)):f.map(e=>s.jsx(Y,{item:e},e.id))}),!o&&f.length===0?s.jsx("p",{className:"muted",children:"No items match your filters."}):null]})}export{te as Assets};
@@ -0,0 +1 @@
1
+ import{b as z,r as j,j as e,L as T}from"./react-E8ng6RF2.js";import{i as _,d as B,u as L,j as Q,l as K,C as d,t as b,m as q,h as W,n as $,o as A,q as M,r as H,s as V,v as D,w as J,f as O}from"./index-MxzGamB6.js";import{f as I}from"./buy-DdbFtykN.js";import{g as X,b as Z,w as ee,G as se}from"./buy-gasless-KC8nGxjE.js";import"./ethers-BxoDGoYp.js";import"./index-CWIz0pK9.js";function ae(a){const o=a,l=(o.message??"").toLowerCase();return o.code===4001||l.includes("reject")||l.includes("denied")||l.includes("cancel")?"You cancelled the request.":l.includes("insufficient")?`You don't have enough ${d.name} — get more first.`:l.includes("no active listing")?o.message:"Couldn't complete checkout — please try again."}function te(a){return J(a.received[0].amount)}function oe(){const a=_(s=>s.items),o=_(s=>s.remove),l=_(s=>s.clear),P=_(s=>s.add),{session:t}=B(),{data:y}=L({queryKey:["upsell-listings"],queryFn:()=>O({first:40}),staleTime:6e4}),{data:n}=Q(t),v=K(),F=z(),[g,h]=j.useState(null),[N,f]=j.useState(null),[p,C]=j.useState(!1),u=a.reduce((s,m)=>s+m.priceCredits,0),U=new Set(a.map(s=>s.id)),w=((y==null?void 0:y.items)??[]).filter(s=>!U.has(s.id)).slice(0,6);async function Y(){if(!t){f("Sign in to check out.");return}f(null),C(!0),b("Shop Started Checkout",{cart_size:a.length,cart_value_credits:u,cart_value_usd:q(u),has_sufficient_credits:((n==null?void 0:n.credits)??0)>=u});const s=a.slice(),m=[];let k="authorize",S=!1;try{h("Preparing your order…");const c=[];for(const r of a){const x=r.tradeId?await W(r.tradeId):await $(r.contractAddress,r.itemId??"");if(!x)throw new Error(`No active listing for ${r.name}.`);const G=te(x),{credit:E,maxCreditedValue:R}=await A(t.identity,G,r.tradeId);m.push(E.id),c.push({trade:x,credits:[E],maxCreditedValue:R})}h("Confirming your purchase…"),k="submit";let i=[];if(X())try{i=await Z({purchases:c,buyer:t.address,signer:t.signer}),await Promise.all(i.map(r=>ee(r))),S=!0}catch(r){if(!(r instanceof se))throw r;i=await I({purchases:c,buyer:t.address,signer:t.signer})}else i=await I({purchases:c,buyer:t.address,signer:t.signer});l(),h("Purchased! 🎉"),b("Shop Completed Purchase",{...M(s),payment_type:"credits",no_crypto_step:S,transaction_hash:i[0]??null}),v.invalidateQueries({queryKey:["usd-balance"]}),F("/success",{state:{items:s,txHash:i[0]}})}catch(c){if(console.error("[checkout] failed",c),b(V(c)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:k,error_code:H(c),value_usd:q(u),cart_size:a.length}),m.length){try{await D(t.identity,m)}catch(i){console.error("[checkout] release failed",i)}v.invalidateQueries({queryKey:["usd-balance"]})}f(ae(c)),h(null)}finally{C(!1)}}return a.length===0?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx("span",{className:"ico ico-cart cart-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"cart-empty__title",children:"Your cart is empty"}),e.jsx("p",{className:"muted",children:"Find something you love and it’ll show up here."}),e.jsx(T,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):e.jsxs("div",{className:"cart",children:[e.jsxs("h1",{children:["Cart (",a.length,")"]}),e.jsx("div",{className:"cart__list",children:a.map(s=>e.jsxs("div",{className:"cart__row",children:[e.jsx("div",{className:"cart__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsxs("div",{className:"cart__info",children:[e.jsx("div",{className:"cart__name",children:s.name}),e.jsx("div",{className:"muted",children:s.creator?`By ${s.creator}`:""})]}),e.jsxs("div",{className:"cart__price",children:[d.symbol," ",s.priceCredits]}),e.jsx("button",{className:"link",onClick:()=>o(s.id),disabled:p,children:"Remove"})]},s.id))}),e.jsxs("div",{className:"cart__foot",children:[e.jsxs("div",{className:"cart__total",children:[e.jsxs("div",{children:["Total ",e.jsxs("strong",{children:[d.symbol," ",u]})]}),t?e.jsxs("div",{className:"muted cart__balance",children:["Your balance: ",d.symbol," ",(n==null?void 0:n.credits)??0]}):null]}),e.jsxs("div",{className:"cart__actions",children:[e.jsxs(T,{className:"btn btn--ghost",to:"/credits",children:["Get ",d.name]}),null,e.jsx("button",{className:"btn btn--ghost",onClick:l,disabled:p,children:"Clear"}),e.jsx("button",{className:"btn btn--purple",onClick:Y,disabled:p,children:"Checkout"})]})]}),g?e.jsx("p",{className:"muted",style:{marginTop:12},children:g}):null,N?e.jsx("p",{className:"error",style:{marginTop:12},children:N}):null,w.length>0?e.jsxs("div",{className:"cart-upsell",children:[e.jsx("h2",{className:"cart-upsell__title",children:"You might also like"}),e.jsx("div",{className:"cart-upsell__row",children:w.map(s=>e.jsxs("div",{className:"cart-upsell__card",children:[e.jsx("div",{className:"cart-upsell__thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}),e.jsx("div",{className:"cart-upsell__name",title:s.name,children:s.name}),e.jsxs("div",{className:"cart-upsell__price",children:[d.symbol," ",s.priceCredits]}),e.jsx("button",{className:"btn btn--sm cart-upsell__add",onClick:()=>P(s,"upsell"),disabled:p,children:"Add"})]},s.id))})]}):null]})}export{oe as Cart};
@@ -1,4 +1,4 @@
1
- import{g as N,a as U,u as w,_ as z,b as o,c as E,d as n,e as I,s as v,f as D,k as _}from"./generateUtilityClasses-Bkw0uvCo.js";import{r as F,j as g}from"./react-DwvsoSSx.js";function K(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=_(P||(P=l`
1
+ import{g as N,a as U,u as w,_ as z,b as o,c as E,d as n,e as I,s as v,f as D,k as _}from"./generateUtilityClasses-sji8XAMf.js";import{r as F,j as g}from"./react-E8ng6RF2.js";function K(r){return N("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const W=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,P,b,S,$;const t=44,B=_(P||(P=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -0,0 +1 @@
1
+ import{a as m,b as d,j as e}from"./react-E8ng6RF2.js";import{u as p,a as u,A as h}from"./index-MxzGamB6.js";import{f as g}from"./collections-F5S4KOPA.js";/* empty css */import"./ethers-BxoDGoYp.js";function f(){var t;const{contractAddress:a}=m(),n=d(),{data:s=[],isLoading:l,error:c}=p({queryKey:["collection-page",a],enabled:!!a,queryFn:()=>g(a,{first:60})}),r=(t=s[0])==null?void 0:t.creator;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>n("/assets"),children:"Collectibles"}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:"Collection"})]}),e.jsxs("header",{className:"collection-page__head",children:[e.jsx("h1",{className:"collection-page__title",children:"Collection"}),r?e.jsx(u,{address:r,className:"collection-page__creator"}):null,e.jsx("span",{className:"muted collection-page__count",children:l?"…":`${s.length.toLocaleString()} item${s.length===1?"":"s"}`})]}),c?e.jsx("p",{className:"error",children:c.message}):null,e.jsx("div",{className:"grid",children:l?Array.from({length:12}).map((o,i)=>e.jsx("div",{className:"card card--skeleton"},i)):s.map(o=>e.jsx(h,{item:o},o.id))}),!l&&!c&&s.length===0?e.jsx("p",{className:"muted",children:"This collection has no items to show."}):null]})}export{f as Collection,f as default};
@@ -1 +1 @@
1
- import{p as t}from"./ethers-g2M4Ny1y.js";var e={};const o={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof t<"u"&&typeof e<"u"?e.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{o as C};
1
+ import{p as t}from"./ethers-BxoDGoYp.js";var e={};const o={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof t<"u"&&typeof e<"u"?e.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{o as C};
@@ -0,0 +1 @@
1
+ import{a as n,b as i,j as e}from"./react-E8ng6RF2.js";import{u as m,a as d,A as p}from"./index-MxzGamB6.js";import{a as u}from"./collections-F5S4KOPA.js";/* empty css */import"./ethers-BxoDGoYp.js";function N(){const{address:a}=n(),t=i(),{data:s=[],isLoading:r,error:l}=m({queryKey:["creator-page",a],enabled:!!a,queryFn:()=>u(a,{first:60})});return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>t("/assets"),children:"Collectibles"}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:"Creator"})]}),e.jsxs("header",{className:"collection-page__head",children:[a?e.jsx(d,{address:a,className:"collection-page__title-creator"}):null,e.jsx("span",{className:"muted collection-page__count",children:r?"…":`${s.length.toLocaleString()} item${s.length===1?"":"s"}`})]}),l?e.jsx("p",{className:"error",children:l.message}):null,e.jsx("div",{className:"grid",children:r?Array.from({length:12}).map((c,o)=>e.jsx("div",{className:"card card--skeleton"},o)):s.map(c=>e.jsx(p,{item:c},c.id))}),!r&&!l&&s.length===0?e.jsx("p",{className:"muted",children:"This creator has no items to show yet."}):null]})}export{N as Creator,N as default};
@@ -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-AoTKwfu7.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-BlUGwcMm.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-C9eN6p7c.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-Cai7byJp.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};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RealCheckout-DyqEWKbw.js","assets/react-E8ng6RF2.js","assets/index-MxzGamB6.js","assets/ethers-BxoDGoYp.js","assets/index-C--hbOLp.css"])))=>i.map(i=>d[i]);
2
+ import{z as M,d as B,l as T,t as p,r as b,C as u,D,E as S,_ as V}from"./index-MxzGamB6.js";import{b as A,r as o,j as e}from"./react-E8ng6RF2.js";import{C as f}from"./CircularProgress-D-iaLmF3.js";import"./ethers-BxoDGoYp.js";import"./generateUtilityClasses-sji8XAMf.js";const F=.1,w=[{id:"pack_5",usd:5,credits:x(5)},{id:"pack_10",usd:10,credits:x(10)},{id:"pack_25",usd:25,credits:x(25),bestValue:!0},{id:"pack_50",usd:50,credits:x(50)}];function x(t){return Math.round(t/F)}function E(t){return w.find(s=>s.id===t)}const y="mock_cs_";function U(){return!0}async function z(t,s){const a=E(t);if(!a)throw new Error("Unknown pack");return q(a)}async function Y(t,s={}){const{intervalMs:a,timeoutMs:c,signal:n,identity:i}=s;if(t.startsWith(y)||U())return K(t,s)}function q(t){const s=`${y}${t.id}_${Date.now()}`;return P(400).then(()=>({orderId:s,clientSecret:`${y}${t.id}`,mock:!0}))}async function K(t,s={}){await P(s.intervalMs??900);const a=t.replace(y,"").replace(/_\d+$/,""),c=E(a),n=(c==null?void 0:c.credits)??0;if(s.address&&c)try{const i=await M(s.address,Math.round(c.usd*100));return{status:"credited",creditsGranted:n,newBalance:i.credits}}catch(i){return{status:"failed",error:i.message}}return{status:"credited",creditsGranted:n,newBalance:n}}function P(t,s){return new Promise((a,c)=>{setTimeout(a,t)})}const k="mock",L=o.lazy(()=>V(()=>import("./RealCheckout-DyqEWKbw.js"),__vite__mapDeps([0,1,2,3,4])));function v(t){const s=t;if((s==null?void 0:s.name)==="AbortError")return"You cancelled the request.";const a=((s==null?void 0:s.message)??"").toLowerCase();return a.includes("sign in")?`Sign in to get ${u.name}.`:a.includes("timed out")?`This is taking longer than usual — your ${u.name} will appear shortly.`:"Couldn't complete your purchase — please try again."}function se(){const t=A(),{session:s,signIn:a}=B(),c=T(),[n,i]=o.useState("select"),[r,_]=o.useState(null),[m,C]=o.useState(null),[$,N]=o.useState(null),[R,h]=o.useState(null),j=o.useRef(null);o.useEffect(()=>()=>{var d;return(d=j.current)==null?void 0:d.abort()},[]);const G=o.useCallback(async d=>{if(!s){a();return}h(null),_(d),i("paying"),p("Shop Started Buy Credits",{pack_usd:d.usd,credits:d.credits,provider:k});try{const l=await z(d.id,{address:s.address,identity:s.identity});C(l)}catch(l){console.error(l),p("Shop Buy Credits Failed",{step:"checkout",error_code:b(l),pack_usd:d.usd}),h(v(l)),i("error")}},[s,a]),I=o.useCallback(async()=>{if(!m)return;i("processing");const d=new AbortController;j.current=d;try{const l=await Y(m.orderId,{signal:d.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});l.status==="credited"?(N(l.creditsGranted??(r==null?void 0:r.credits)??0),i("success"),p("Shop Completed Buy Credits",{order_id:m.orderId,pack_usd:(r==null?void 0:r.usd)??null,credits:l.creditsGranted??(r==null?void 0:r.credits)??0,provider:k}),c.invalidateQueries({queryKey:["usd-balance"]})):(p("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(r==null?void 0:r.usd)??null}),h(l.error??`Couldn't add your ${u.name} — please try again.`),i("error"))}catch(l){console.error(l),p("Shop Buy Credits Failed",{step:"grant",error_code:b(l),pack_usd:(r==null?void 0:r.usd)??null}),h(v(l)),i("error")}},[m,r,s,c]);function g(){var d;(d=j.current)==null||d.abort(),i("select"),_(null),C(null),N(null),h(null)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsxs("h1",{className:"getcredits__title",children:["Get ",u.name]}),e.jsxs("p",{className:"muted",children:["Add ",u.name," to your account to shop. Pay with any card."]})]}),n==="select"&&e.jsx(O,{onSelect:G}),n==="paying"&&r&&e.jsx(Q,{pack:r,checkout:m,onPaid:I,onCancel:g}),n==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(f,{size:40}),e.jsxs("p",{className:"getcredits__status-title",children:["Adding your ",u.name,"…"]}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),n==="success"&&e.jsxs("div",{className:"getcredits__status getcredits__status--ok",role:"status","aria-live":"polite",children:[e.jsx("div",{className:"getcredits__confetti","aria-hidden":!0,children:"🎉"}),e.jsx("p",{className:"getcredits__status-title",children:"You’re all set!"}),e.jsxs("p",{className:"muted",children:[e.jsxs("strong",{children:[u.symbol," ",$]})," ",u.name," added to your account."]}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>t("/cart"),children:"Back to cart"}),e.jsxs("button",{className:"btn btn--ghost",onClick:g,children:["Get more ",u.name]})]})]}),n==="error"&&e.jsxs("div",{className:"getcredits__status getcredits__status--err",role:"alert",children:[e.jsx("p",{className:"getcredits__status-title",children:"Something went wrong"}),e.jsx("p",{className:"error",children:R}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:g,children:"Try again"})})]})]})}function O({onSelect:t}){return e.jsx("div",{className:"packs",children:w.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>t(s),"aria-label":`Get ${S(s.credits)} for $${s.usd}`,children:[s.bestValue&&e.jsx("span",{className:"pack__ribbon",children:"Best value"}),e.jsxs("span",{className:"pack__credits",children:[e.jsx(D,{className:"pack__credits-ico"}),s.credits]}),e.jsx("span",{className:"pack__label",children:u.name}),e.jsxs("span",{className:"pack__price",children:["$",s.usd]}),e.jsxs("span",{className:"pack__cta",children:["Get ",u.name]})]},s.id))})}function Q({pack:t,checkout:s,onPaid:a,onCancel:c}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:c,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:[u.symbol," ",S(t.credits)]})]}),e.jsxs("div",{className:"pay__summary-row pay__summary-row--total",children:[e.jsx("span",{children:"You pay"}),e.jsxs("strong",{children:["$",t.usd]})]})]}),e.jsx("div",{className:"pay__form",children:s?s.mock?e.jsx(W,{onPaid:a,amountUsd:t.usd}):e.jsx(o.Suspense,{fallback:e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(f,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]}),children:e.jsx(L,{clientSecret:s.clientSecret,onComplete:a})}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(f,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function W({onPaid:t,amountUsd:s}){const[a,c]=o.useState("4242 4242 4242 4242"),[n,i]=o.useState(!1);function r(){i(!0),setTimeout(()=>t(),700)}return e.jsxs("div",{className:"card-form","aria-label":"Payment details",children:[e.jsx("p",{className:"muted small card-form__note",children:"Demo mode — no real charge is made."}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Card number"}),e.jsx("input",{value:a,onChange:_=>c(_.target.value),disabled:n,inputMode:"numeric"})]}),e.jsxs("div",{className:"card-form__row",children:[e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"Expiry"}),e.jsx("input",{defaultValue:"12 / 34",disabled:n})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:n,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:r,disabled:n,children:n?"Processing…":`Pay $${s}`})]})}export{se as GetCredits,se as default};
@@ -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-BdjP3WGz.js";import{d as g,r as v}from"./index-BlUGwcMm.js";import{C as c}from"./ConstantsUtil-4Wiw99iz.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-AoTKwfu7.js";import{au as y}from"./NetworkUtil-mKiGb5Li.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-DN4ZXuvL.js";import{d as g,r as v}from"./index-Cai7byJp.js";import{C as c}from"./ConstantsUtil-CkFCQ14z.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-C9eN6p7c.js";import{au as y}from"./NetworkUtil-DRBYr7tG.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -0,0 +1 @@
1
+ import{b as L,r as d,j as e,L as E}from"./react-E8ng6RF2.js";import{t as M,C as o,d as Q,l as A,u as K,G as F}from"./index-MxzGamB6.js";import{i as P,f as R}from"./import-D0C6XMTV.js";import{s as Y}from"./wallet-kind-B3ypFsr7.js";import"./ethers-BxoDGoYp.js";import"./buy-DdbFtykN.js";import"./index-CWIz0pK9.js";import"./mana-rate-WQsbGubC.js";function W({queue:n,session:k,onClose:N,onDone:u}){const f=L(),r=Y(k.providerType),[c,y]=d.useState(()=>n.map(()=>"pending")),[b,C]=d.useState("running"),S=d.useRef(!1);d.useEffect(()=>{if(S.current)return;S.current=!0;let a=!1;return(async()=>{for(let i=0;i<n.length;i++){if(a)return;y(p=>p.map((h,g)=>g===i?"active":h));try{await P(n[i].item,n[i].priceCredits,k),M("Shop Migrated Listing",{item_id:n[i].item.itemId??n[i].item.oldTradeId??null,contract_address:n[i].item.contractAddress,new_price_credits:n[i].priceCredits,new_price_usd:n[i].priceCredits/10}),a||y(p=>p.map((h,g)=>g===i?"done":h))}catch(p){const h=p,g=h.code===4001||/reject|denied|cancel/i.test(h.message??"");a||y(I=>I.map((w,t)=>t===i?g?"skipped":"failed":w))}}a||C("finished")})(),()=>{a=!0}},[]);const m=c.filter(a=>a==="done").length,x=c.findIndex(a=>a==="active"),_=Math.round(c.filter(a=>a!=="pending"&&a!=="active").length/n.length*100);function j(){u(),N()}if(b==="finished"){const a=c.filter(i=>i==="skipped"||i==="failed").length;return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal modal--success",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),e.jsx("h2",{className:"modal__title",children:m>0?"You're in the Shop! 🎉":"Nothing listed"}),e.jsxs("p",{className:"muted",style:{margin:0},children:[m>0?`${m} ${m===1?"item is":"items are"} now for sale with ${o.name}.`:"No items were listed.",a>0?` ${a} skipped — you can try those again anytime.`:""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:j,children:"Done"}),m>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{u(),N(),f("/assets")},children:"View in Shop"}):null]})]})})}return e.jsx("div",{className:"modal-backdrop",role:"presentation",children:e.jsxs("div",{className:"modal migrate",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx("h2",{className:"modal__title",children:"Listing your items"}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[r?"Confirm each item to add it to the Shop.":"Adding your items to the Shop."," ",x>=0?`${x+1} of ${n.length}`:""]}),e.jsx("div",{className:"migrate__progress",children:e.jsx("div",{className:"migrate__bar",style:{width:`${_}%`}})}),e.jsx("ul",{className:"migrate__list",children:n.map((a,i)=>e.jsxs("li",{className:`migrate__row migrate__row--${c[i]}`,children:[e.jsx("span",{className:"migrate__thumb",children:a.item.thumbnail?e.jsx("img",{src:a.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:a.item.name,children:a.item.name||"Item"}),e.jsxs("span",{className:"migrate__price",children:[o.symbol," ",a.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:c[i]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",r?"Confirm…":"Adding…"]}):c[i]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):c[i]==="skipped"?e.jsx("span",{className:"migrate__skip",children:"Skipped"}):c[i]==="failed"?e.jsx("span",{className:"migrate__skip",children:"Failed"}):e.jsx("span",{className:"migrate__wait",children:"Waiting"})})]},a.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:r?"A quick confirmation pops up for each item. Keep this open.":"This only takes a moment — keep this open."})]})})}const G=[{key:"creations",title:"Your creations",sub:"Items you made. Put them on sale in the Shop."},{key:"owned",title:"Items you own",sub:"Things you've bought elsewhere — resell them in the Shop."}];function X(){const{session:n,signIn:k,restore:N}=Q(),u=A(),f=n==null?void 0:n.address;d.useEffect(()=>{N()},[N]);const{data:r,isLoading:c}=K({queryKey:["importable",f],queryFn:()=>R(f),enabled:!!f}),[y,b]=d.useState({}),[C,S]=d.useState(new Set),[m,x]=d.useState(null),_=d.useMemo(()=>[...(r==null?void 0:r.creations)??[],...(r==null?void 0:r.owned)??[]],[r]);d.useEffect(()=>{_.length&&b(t=>{const l={...t};for(const s of _)l[s.oldTradeId]==null&&(l[s.oldTradeId]=s.suggestedCredits);return l})},[_]);const j=t=>!C.has(t),a=t=>y[t.oldTradeId]??t.suggestedCredits,i=_.filter(t=>j(t.oldTradeId)),p=i.reduce((t,l)=>t+a(l),0);function h(t,l){const s=l.replace(/[^\d]/g,"");b(v=>({...v,[t]:s===""?0:parseInt(s,10)}))}function g(t){S(l=>{const s=new Set(l);return s.has(t)?s.delete(t):s.add(t),s})}function I(t){return t.map(l=>({item:l,priceCredits:Math.max(1,a(l))}))}function w(){u.invalidateQueries({queryKey:["importable"]}),u.invalidateQueries({queryKey:["listings"]}),u.invalidateQueries({queryKey:["my-assets"]}),u.invalidateQueries({queryKey:["collection-sale-state"]}),F.success("Your Shop is updated.")}return n?!c&&_.length===0?e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"✨"}),e.jsx("h1",{className:"imp-empty__title",children:"You're all caught up"}),e.jsx("p",{className:"muted",children:"Everything you sell is already in the Shop — nothing to import."}),e.jsx(E,{className:"btn btn--purple",to:"/my-assets",children:"Go to My Assets"})]}):e.jsxs("div",{className:"imp",children:[e.jsxs("header",{className:"imp__head",children:[e.jsx("span",{className:"imp__eyebrow",children:"Import to the Shop"}),e.jsxs("h1",{className:"imp__title",children:["Bring your listings ",e.jsx("span",{className:"imp__grad",children:"into the Shop"})]}),e.jsxs("p",{className:"imp__lede",children:["These items are already for sale elsewhere. We suggested a price in ",o.name," for each — matched to today's rate and rounded up. Adjust anything, then list them."]})]}),e.jsxs("div",{className:"imp__ratebar",children:[e.jsx("span",{className:"imp__diamond",children:o.symbol})," 1 ",o.nameSingular," = $0.10 · prices rounded up"]}),c?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((t,l)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},l))}):G.map(t=>{const l=(r==null?void 0:r[t.key])??[];return l.length===0?null:e.jsxs("section",{className:"imp__section",children:[e.jsxs("div",{className:"imp__section-head",children:[e.jsx("h2",{className:"imp__section-title",children:t.title}),e.jsx("span",{className:"imp__section-sub",children:t.sub})]}),e.jsx("div",{className:"imp__list",children:l.map(s=>{const v=a(s),$=v!==s.suggestedCredits;return e.jsxs("article",{className:`imp-row${j(s.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:j(s.oldTradeId),onChange:()=>g(s.oldTradeId),"aria-label":`Include ${s.name}`}),e.jsx("div",{className:"imp-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"imp-chip",children:s.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx("span",{className:"imp-price__diamond","aria-hidden":!0,children:o.symbol}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:v.toLocaleString(),onChange:T=>h(s.oldTradeId,T.target.value),"aria-label":`Price in ${o.name} for ${s.name}`})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(v*.1).toFixed(2)]}),$?e.jsxs("button",{className:"imp-price__reset",onClick:()=>b(T=>({...T,[s.oldTradeId]:s.suggestedCredits})),children:["Reset to ",o.symbol,s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!j(s.oldTradeId),onClick:()=>x(I([s])),children:"List"})})]},s.oldTradeId)})})]},t.key)}),e.jsx("div",{className:"imp-dock",children:e.jsxs("div",{className:"imp-dock__inner",children:[e.jsxs("div",{className:"imp-dock__summary",children:[e.jsxs("div",{className:"imp-dock__total",children:[e.jsx("span",{className:"imp__diamond",children:o.symbol})," ",p.toLocaleString()]}),e.jsxs("div",{className:"imp-dock__sub",children:[i.length," item",i.length===1?"":"s"," selected · $",(p*.1).toFixed(2)]})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsxs("button",{className:"btn btn--purple imp-dock__cta",disabled:i.length===0,onClick:()=>x(I(i)),children:["List all (",i.length,")"]})]})}),m&&n?e.jsx(W,{queue:m,session:n,onClose:()=>x(null),onDone:w}):null]}):e.jsxs("div",{className:"imp-empty",children:[e.jsx("span",{className:"imp-empty__ico","aria-hidden":!0,children:"📦"}),e.jsx("h1",{className:"imp-empty__title",children:"Import your listings"}),e.jsx("p",{className:"muted",children:"Sign in to bring the items you already sell into the Shop."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>k(),children:"Sign in"})]})}export{X as ImportListings};
@@ -0,0 +1 @@
1
+ import{j as e,r as d,a as ce,d as ne,b as le}from"./react-E8ng6RF2.js";import{d as U,H as de,W as oe,x as E,c as V,i as S,D,G as ue,j as me,u as L,t as B,I as he,a as fe,C as K,h as _e,w as pe,o as xe,q as ve,v as Ie,m as be,r as je,s as Ne,J as ye,n as ge}from"./index-MxzGamB6.js";import{h as G}from"./buy-DdbFtykN.js";import{g as we,a as Ce,w as ke,G as Ae}from"./buy-gasless-KC8nGxjE.js";import{f as Ee}from"./collections-F5S4KOPA.js";import"./ethers-BxoDGoYp.js";import"./index-CWIz0pK9.js";function Se({item:i}){const c=U(I=>{var l;return(l=I.session)==null?void 0:l.address}),{data:r}=de(c),m=c&&r?c:"default",f=i.category==="emote";return e.jsx(oe,{id:"shop-item-preview",contractAddress:i.contractAddress,tokenId:i.tokenId??void 0,itemId:i.tokenId?void 0:i.itemId??void 0,profile:m,type:f?void 0:E.PreviewType.AVATAR,emote:f?void 0:E.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:f?1.5:void 0,wheelStart:f?100:void 0,dev:V.chainId===80002,disableFadeEffect:!0},i.id)}function Te(i){return i==="male"?"♂":i==="female"?"♀":i==="unisex"?"⚥":""}function Pe({title:i,items:c,activeId:r,onSelect:m,onViewAll:f}){const I=d.useRef(null),l=S(a=>a.add),g=S(a=>a.items.map(o=>o.id));if(c.length===0)return null;function s(a){l(a,"carousel"),ue.success(`“${a.name}” added to your cart.`)}function b(a){const o=I.current;o&&o.scrollBy({left:a*Math.round(o.clientWidth*.8),behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:i}),e.jsxs("div",{className:"collection-carousel__head-right",children:[f?e.jsx("button",{className:"collection-carousel__viewall",onClick:f,children:"View all"}):null,e.jsxs("div",{className:"collection-carousel__arrows",children:[e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>b(-1),"aria-label":"Scroll left",children:"‹"}),e.jsx("button",{className:"collection-carousel__arrow",onClick:()=>b(1),"aria-label":"Scroll right",children:"›"})]})]})]}),e.jsx("div",{className:"collection-carousel__track",ref:I,children:c.map(a=>{const o=Te(a.gender),w=a.id===r,j=a.priceCredits>0,_=g.includes(a.id);return e.jsxs("article",{className:`collection-carousel__card${w?" is-active":""}`,onClick:()=>m(a),role:"button",tabIndex:0,"aria-current":w||void 0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),m(a))},children:[e.jsxs("div",{className:"collection-carousel__media",children:[a.thumbnail?e.jsx("img",{className:"collection-carousel__img",src:a.thumbnail,alt:a.name,loading:"lazy"}):null,j?e.jsx("button",{className:"collection-carousel__add",disabled:_,"aria-label":_?"In cart":`Add ${a.name} to cart`,title:_?"In cart":"Add to cart",onClick:h=>{h.stopPropagation(),_||s(a)},children:e.jsx("span",{className:`ico ${_?"ico-cart-solid":"ico-cart"}`,"aria-hidden":!0})}):null]}),e.jsxs("div",{className:"collection-carousel__body",children:[e.jsx("div",{className:"collection-carousel__name",title:a.name,children:a.name}),e.jsxs("div",{className:"collection-carousel__meta",children:[j?e.jsxs("span",{className:"collection-carousel__price",children:[e.jsx(D,{className:"collection-carousel__diamond"}),a.priceCredits]}):e.jsx("span",{className:"collection-carousel__price collection-carousel__na",children:"Not listed"}),e.jsxs("span",{className:"collection-carousel__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:a.rarity}),o?e.jsx("span",{className:"chip chip--icon",children:o}):null]})]})]})]},a.id)})})]})}function Re(i){return Object.values(E.Rarity).includes(i)}function $e(i){return i==="male"?"Male":i==="female"?"Female":i==="unisex"?"Unisex":null}function Le(i){const c=i,r=(c.message??"").toLowerCase();return c.code===4001||r.includes("reject")||r.includes("denied")||r.includes("cancel")?"You cancelled the request.":r.includes("insufficient")?`You don't have enough ${K.name} — get more first.`:r.includes("no active listing")||r.includes("not for sale")?"This item is not for sale right now.":"Couldn't complete checkout — please try again."}function Ve(){const{contractAddress:i,tokenId:c}=ce(),{state:r}=ne(),m=le(),f=S(t=>t.add),I=S(t=>t.items),{session:l}=U(),{data:g}=me(l),[s,b]=d.useState(()=>r!=null&&r.item?{...r.item,tradeId:r.tradeId??r.item.tradeId}:{id:`${i}-${c}`,name:"",creator:"",contractAddress:i??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:V.chainId,thumbnail:"",priceCredits:0,gender:null,tokenId:c??void 0,tradeId:r==null?void 0:r.tradeId}),[a,o]=d.useState(!1),[w,j]=d.useState(null),[_,h]=d.useState(null),{data:N=[],isFetched:O}=L({queryKey:["collection-items",s.contractAddress],enabled:!!s.contractAddress,queryFn:()=>Ee(s.contractAddress,{first:20})}),{data:T,isLoading:Y}=L({queryKey:["shop-item",s.contractAddress,c],enabled:!(r!=null&&r.item)&&!!s.contractAddress&&!!c,queryFn:()=>ye(s.contractAddress,c)});d.useEffect(()=>{T&&b(t=>t.tradeId?t:{...T})},[T]),d.useEffect(()=>{if(s.name||N.length===0)return;const t=c&&N.find(n=>n.tokenId===c||n.itemId===c)||N.find(n=>n.contractAddress===s.contractAddress);t&&b(n=>({...t,tradeId:n.tradeId??t.tradeId}))},[N]);const z=d.useMemo(()=>{const t=new Set,n=[];for(const u of N){if(u.id===s.id||s.itemId&&u.itemId===s.itemId||s.tokenId&&u.tokenId===s.tokenId)continue;const A=`${u.contractAddress}-${u.itemId??u.tokenId??u.id}`;t.has(A)||(t.add(A),n.push(u))}return n},[N,s.id,s.itemId,s.tokenId]),{data:H,isLoading:C}=L({queryKey:["detail-trade",s.id,s.tradeId,s.contractAddress,s.itemId],enabled:!!s.contractAddress,queryFn:async()=>{if(s.tradeId)return s.tradeId;if(s.itemId){const t=await ge(s.contractAddress,s.itemId);return(t==null?void 0:t.id)??null}return null}}),v=s.tradeId??H??void 0,p=!!v,k=d.useMemo(()=>({...s,tradeId:v,id:v??s.id}),[s,v]),P=I.some(t=>t.id===k.id);d.useEffect(()=>{j(null),h(null)},[s.id]);const F=d.useRef(null);d.useEffect(()=>{!s.name||C||F.current===s.id||(F.current=s.id,B("Shop Viewed Item",{...he(s),for_sale:p}))},[s.id,s.name,C,p]);function J(t){b(t);const n=t.tokenId??t.itemId;t.contractAddress&&n&&m(`/item/${t.contractAddress}/${n}`,{replace:!0,state:{item:t}}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"})}function Q(){!p||P||f(k,"item_detail")}async function Z(){var A;if(!p||!v)return;if(!l){h("Log in to check out.");return}h(null),o(!0);let t,n="authorize",u=!1;try{j(`Buying ${s.name||"item"}…`);const x=await _e(v);if(!x)throw new Error("not for sale");const R=(A=x.received)==null?void 0:A[0],ie=pe(R==null?void 0:R.amount),{credit:M,maxCreditedValue:re}=await xe(l.identity,ie,v);t=M.id,n="submit";const $={trade:x,buyer:l.address,signer:l.signer,credits:[M],maxCreditedValue:re};let y;if(we())try{y=await Ce($),await ke(y),u=!0}catch(W){if(!(W instanceof Ae))throw W;y=await G($)}else y=await G($);t=void 0,B("Shop Completed Purchase",{...ve([k]),payment_type:"credits",no_crypto_step:u,transaction_hash:y??null}),m("/success",{state:{items:[k],txHash:y}})}catch(x){console.error("[detail] buy now failed:",x),t&&Ie(l.identity,[t]).catch(()=>{}),B(Ne(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:n,error_code:je(x),value_usd:be(k.priceCredits)}),h(Le(x)),j(null)}finally{o(!1)}}const X=Re(s.rarity)?s.rarity:E.Rarity.COMMON,[ee]=E.Rarity.getGradient(X),q=$e(s.gender),se="More from this collection",te=p?P?"In cart":C?"Checking…":"Add to cart":"Not for sale",ae=Y||!!s.contractAddress&&!O;return!s.name&&!ae?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx("span",{className:"ico ico-cart item-detail__notfound-ico","aria-hidden":!0}),e.jsx("h1",{className:"item-detail__notfound-title",children:"This item isn’t available"}),e.jsx("p",{className:"muted",children:"It may have been delisted or moved. Browse the shop for something else."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>m("/assets"),children:"Browse the shop"})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":"Breadcrumb",children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>m("/assets"),children:"Collectibles"}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:s.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",style:{background:`radial-gradient(circle at 50% 38%, ${ee}33 0%, var(--media) 68%)`},children:e.jsx(Se,{item:s})}),e.jsxs("div",{className:"item-detail__info",children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:s.name||"Loading…"}),e.jsx("button",{className:"item-detail__fav","aria-label":"Add to favorites",children:e.jsx("span",{className:"ico ico-heart","aria-hidden":!0})})]}),s.creator?e.jsx(fe,{address:s.creator,className:"item-detail__creator",linkToProfile:!0}):null,e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",children:s.rarity}),e.jsx("span",{className:"chip",children:s.category==="emote"?"Emote":"Wearable"}),q?e.jsx("span",{className:"chip",children:q}):null]}),e.jsxs("div",{className:"item-detail__card",children:[e.jsxs("div",{className:"item-detail__price-block",children:[e.jsx("div",{className:"item-detail__price-label",children:"Price"}),p?e.jsxs("div",{className:"item-detail__price",children:[e.jsx(D,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:s.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"}),l?e.jsxs("div",{className:"item-detail__balance muted",children:["Your balance: ",K.symbol," ",(g==null?void 0:g.credits)??0]}):null]}),e.jsxs("div",{className:"item-detail__ctas",children:[p?e.jsx("button",{className:"btn btn--purple item-detail__cta",onClick:Z,disabled:a||C,children:a?"Working…":"Buy now"}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:Q,disabled:!p||P||C||a,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),te]})]}),w?e.jsx("p",{className:"muted item-detail__status",children:w}):null,_?e.jsx("p",{className:"error item-detail__status",children:_}):null]})]})]}),e.jsx(Pe,{title:se,items:z,activeId:s.id,onSelect:J,onViewAll:s.contractAddress?()=>m(`/collection/${s.contractAddress}`):void 0})]})}export{Ve as ItemDetail,Ve as default};
@@ -0,0 +1 @@
1
+ .item-detail{max-width:1721px;margin:0 auto}.item-detail__crumbs{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-bottom:22px}.item-detail__crumb-link{background:none;border:0;padding:0;font:inherit;color:var(--muted)}.item-detail__crumb-link:hover{color:var(--text)}.item-detail__crumb-sep{color:var(--muted-2)}.item-detail__crumb-current{color:var(--text);font-weight:600}.item-detail__main{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,522px);gap:40px;align-items:start}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr}}.item-detail__preview{position:relative;height:min(752px,70vh);border-radius:var(--radius-card);overflow:hidden;background:var(--media)}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__info{display:flex;flex-direction:column;gap:14px}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:clamp(24px,2.4vw,34px);font-weight:700;line-height:1.15;color:var(--text)}.item-detail__fav{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:#fff;display:grid;place-items:center;color:var(--text)}.item-detail__fav .ico-heart{width:18px;height:18px}.item-detail__creator{color:var(--muted);font-size:14px;margin-top:-6px}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.item-detail__card{margin-top:8px;border:1px solid var(--line);border-radius:var(--radius-card);padding:20px;display:flex;flex-direction:column;gap:16px;background:#fff}.item-detail__price-block{display:flex;flex-direction:column;gap:6px}.item-detail__price-label{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text-2)}.item-detail__diamond{width:28px;height:28px;color:var(--text-2)}.item-detail__price-value{font-size:34px;line-height:1}.item-detail__price--none{font-size:18px;color:var(--muted)}.item-detail__balance{font-size:13px}.item-detail__ctas{display:flex;flex-direction:column;gap:12px}.item-detail__cta{width:100%;height:44px;text-align:center}.item-detail__addcart{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:var(--radius-btn);font-weight:600;font-size:13px;text-transform:uppercase;letter-spacing:.046em}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__addcart-ico{width:20px;height:20px}.item-detail__status{margin:0;font-size:13px}.collection-carousel{margin-top:56px}.collection-carousel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.collection-carousel__title{font-size:20px;font-weight:600;color:var(--text)}.collection-carousel__head-right{display:flex;align-items:center;gap:16px}.collection-carousel__viewall{background:none;border:0;padding:0;color:var(--accent);font-weight:600;font-size:13px;cursor:pointer;white-space:nowrap}.collection-carousel__viewall:hover{text-decoration:underline}.collection-carousel__arrows{display:flex;gap:10px}.collection-carousel__arrow{width:44px;height:44px;border-radius:50%;border:0;background:#fff;color:var(--text);font-size:22px;line-height:1;display:grid;place-items:center;box-shadow:0 6px 16px #16151829;transition:transform .12s ease,box-shadow .12s ease}.collection-carousel__arrow:hover{transform:scale(1.06);box-shadow:0 8px 20px #16151833}@media(prefers-reduced-motion:reduce){.collection-carousel__arrow{transition:none}}.collection-carousel__track{display:flex;gap:16px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}.collection-carousel__card{flex:0 0 220px;scroll-snap-align:start;text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius-card);overflow:hidden;padding:0;display:flex;flex-direction:column;transition:box-shadow .15s ease,transform .15s ease}.collection-carousel__card:hover{transform:translateY(-2px);box-shadow:0 0 0 2px var(--brand-violet),0 10px 30px #a524b347}.collection-carousel__card.is-active{box-shadow:0 0 0 2px var(--accent)}.collection-carousel__media{position:relative;aspect-ratio:1 / 1;background:var(--media)}.collection-carousel__img{width:100%;height:100%;object-fit:contain;display:block}.collection-carousel__body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:8px}.collection-carousel__name{font-weight:600;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.collection-carousel__meta{display:flex;align-items:center;justify-content:space-between;gap:8px}.collection-carousel__price{display:flex;align-items:center;gap:5px;font-weight:600;font-size:15px;color:var(--text-2)}.collection-carousel__diamond{width:14px;height:14px;color:var(--text-2)}.collection-carousel__chips{display:flex;align-items:center;gap:6px}.collection-carousel__na{color:var(--muted);font-weight:600;font-size:13px}.collection-carousel__card{cursor:pointer}.collection-carousel__card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.collection-carousel__add{position:absolute;bottom:10px;right:10px;z-index:2;width:34px;height:34px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:grid;place-items:center;box-shadow:0 4px 12px #691fa959;transition:transform .12s ease,background .15s ease}.collection-carousel__add:hover{transform:scale(1.08)}.collection-carousel__add:disabled{background:var(--muted-2);cursor:default;box-shadow:none}.collection-carousel__add .ico{width:18px;height:18px}.item-detail--notfound{min-height:46vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}.item-detail__notfound-ico{width:44px;height:44px;opacity:.4}.item-detail__notfound-title{font-size:22px}.item-detail--notfound .btn{margin-top:6px}
@@ -0,0 +1 @@
1
+ import{b as ae,r as c,j as e,u as re}from"./react-E8ng6RF2.js";import{u as z,c as B,d as se,j as te,l as D,h as ie,o as ne,v as A,t as T,r as H,s as G,D as K,E as Q,C as R,A as le,k as ce,F as oe}from"./index-MxzGamB6.js";import{r as de,a as U,m as ue}from"./mana-rate-WQsbGubC.js";import{h as O}from"./buy-DdbFtykN.js";import{g as me,a as he,w as pe,G as ye}from"./buy-gasless-KC8nGxjE.js";import"./ethers-BxoDGoYp.js";import"./index-CWIz0pK9.js";function _e(){return z({queryKey:["mana-rate",B.chainId],queryFn:()=>de(B.chainId),staleTime:6e4,refetchInterval:6e4,retry:1})}function Y(a){const u=a,d=(u.message??"").toLowerCase();return u.code===4001||d.includes("reject")||d.includes("denied")||d.includes("cancel")?"You cancelled the request.":d.includes("insufficient")?`Not enough ${R.name} — get more first.`:d.includes("not found")||d.includes("no active listing")||d.includes("404")?"This item was just sold or removed. Refreshing the market…":"Couldn't complete checkout — please try again."}function fe(a){return{id:a.tradeId,tradeId:a.tradeId,name:a.name,creator:a.creator,contractAddress:a.contractAddress,itemId:a.itemId,category:a.category,wearableCategory:a.wearableCategory??void 0,rarity:a.rarity,network:a.network,chainId:a.chainId,thumbnail:a.thumbnail,priceCredits:0,gender:null}}function be({listing:a,rate:u,onClose:d,onSold:v}){const{session:i}=se(),{data:n}=te(i),g=D(),m=ae(),[C,f]=c.useState("confirm"),[N,h]=c.useState("Locking today’s price…"),[y,j]=c.useState(null),[s,P]=c.useState(null),p=c.useRef(null),$=Math.ceil(U(a.manaWei,u)/10);c.useEffect(()=>{let k=!1;if(!i){f("error"),j("Log in to check out.");return}return(async()=>{try{const t=await ie(a.tradeId);if(!t)throw new Error("not found");const l=U(a.manaWei,u);if(!Number.isFinite(l)||l<=0)throw new Error("price unavailable");const{credit:x,maxCreditedValue:q,usdCents:L}=await ne(i.identity,l,a.tradeId);if(k){A(i.identity,[x.id]).catch(()=>{});return}p.current=x.id,P({trade:t,credit:x,maxCreditedValue:q,usdCents:L,credits:Math.ceil(L/10)}),h("")}catch(t){if(k)return;console.error("[market] authorize failed",t),T(G(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:H(t),value_usd:Math.round(U(a.manaWei,u))/100}),f("error"),j(Y(t))}})(),()=>{k=!0,p.current&&i&&(A(i.identity,[p.current]).catch(()=>{}),p.current=null)}},[]);const b=!!s&&((n==null?void 0:n.credits)??0)<s.credits;async function w(){if(!i||!s)return;if(b){A(i.identity,[s.credit.id]).catch(()=>{}),p.current=null,m("/credits");return}f("working"),j(null);let k=!1;try{h("Confirming your purchase…");const t={trade:s.trade,buyer:i.address,signer:i.signer,credits:[s.credit],maxCreditedValue:s.maxCreditedValue};let l;if(me())try{l=await he(t),await pe(l),k=!0}catch(x){if(!(x instanceof ye))throw x;l=await O(t)}else l=await O(t);p.current=null,T("Shop Completed Purchase",{items:[{item_id:a.itemId??null,contract_address:a.contractAddress,token_id:null,price_usd:s.usdCents/100}],value_credits:s.credits,value_usd:s.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:k,transaction_hash:l??null}),g.invalidateQueries({queryKey:["usd-balance"]}),m("/success",{state:{items:[fe(a)],txHash:l}})}catch(t){console.error("[market] buy now failed",t),A(i.identity,[s.credit.id]).catch(()=>{}),p.current=null,T(G(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:H(t),value_usd:s.usdCents/100}),g.invalidateQueries({queryKey:["usd-balance"]});const l=Y(t);j(l),f("error"),/sold or removed/i.test(l)&&v()}}function I(){i&&s&&A(i.identity,[s.credit.id]).catch(()=>{}),p.current=null,d()}const _=C==="working";return e.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${a.name}`,children:[e.jsx("div",{className:"mkt-modal__scrim",onClick:_?void 0:I,"aria-hidden":!0}),e.jsxs("div",{className:"mkt-modal__card",children:[e.jsxs("div",{className:"mkt-modal__head",children:[e.jsx("div",{className:"mkt-modal__thumb",children:a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx("div",{className:"mkt-modal__name",title:a.name,children:a.name||"Item"}),e.jsx("span",{className:"chip chip--rarity",children:a.rarity})]})]}),e.jsx("div",{className:"mkt-modal__price",children:s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Final price"}),e.jsxs("div",{className:"mkt-modal__price-value",children:[e.jsx(K,{className:"mkt-modal__diamond"}),Q(s.credits)]}),e.jsxs("div",{className:"mkt-modal__price-sub muted",children:["Locked for this purchase · $",(s.usdCents/100).toFixed(2)]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mkt-modal__price-label",children:"Today’s price"}),e.jsxs("div",{className:"mkt-modal__price-value mkt-modal__price-value--approx",children:[e.jsx("span",{className:"mkt-modal__approx","aria-hidden":!0,children:"≈"}),e.jsx(K,{className:"mkt-modal__diamond"}),Q($)]}),e.jsx("div",{className:"mkt-modal__price-sub muted",children:N||"Locking today’s price…"})]})}),i?e.jsxs("div",{className:"mkt-modal__balance muted",children:["Your balance: ",R.symbol," ",(n==null?void 0:n.credits)??0]}):null,b?e.jsxs("p",{className:"muted mkt-modal__note",children:["You’ll need a few more ",R.name," to buy this."]}):null,N&&C==="working"?e.jsx("p",{className:"muted mkt-modal__note",children:N}):null,y?e.jsx("p",{className:"error mkt-modal__note",children:y}):null,e.jsxs("div",{className:"mkt-modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:I,disabled:_,children:"Cancel"}),e.jsx("button",{className:"btn btn--purple",onClick:w,disabled:_||!s,children:_?"Working…":b?`Get ${R.name}`:"Confirm purchase"})]})]})]})}const W=[{key:"wearable",label:"Wearables",sub:["Head","Upper Body","Handwear","Lower Body","Feet","Accessories","Skins"]},{key:"emote",label:"Emotes",sub:[]}],ke={Head:["head","hat","hair","facial_hair","eyes","eyebrows","mouth","mask","helmet","tiara","top_head"],"Upper Body":["upper_body"],Handwear:["hands_wear"],"Lower Body":["lower_body"],Feet:["feet"],Accessories:["earring","eyewear"],Skins:["skin"]},xe=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],E=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Price: Low to High",server:"cheapest"},{key:"price-desc",label:"Price: High to Low",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function ve(a){return{id:a.tradeId,tradeId:a.tradeId,name:a.name,creator:a.creator,contractAddress:a.contractAddress,itemId:a.itemId,category:a.category,wearableCategory:a.wearableCategory??void 0,rarity:a.rarity,network:a.network,chainId:a.chainId,thumbnail:a.thumbnail,priceCredits:0,gender:null}}function Ae(){const[a]=re(),u=(a.get("q")??"").trim().toLowerCase(),d=D(),[v,i]=c.useState("wearable"),[n,g]=c.useState(null),[m,C]=c.useState([]),[f,N]=c.useState("newest"),[h,y]=c.useState(null),[j,s]=c.useState(null),P=n?ke[n]:void 0,p=(E.find(r=>r.key===f)??E[0]).server,$={category:v,rarities:m.length?m:void 0,wearableCategories:P,search:u||void 0,sortBy:p,first:200},{data:b,isLoading:w,error:I}=z({queryKey:["legacy-listings",$],queryFn:()=>oe($),placeholderData:ce}),{data:_,isError:k}=_e(),t=c.useMemo(()=>(b==null?void 0:b.items)??[],[b]),l=r=>_?ue(r.manaWei,_):null;function x(r){i(r),g(null)}function q(r){C(o=>o.includes(r)?o.filter(M=>M!==r):[...o,r])}function L(){i("wearable"),g(null),C([]),y(null)}function F(r){y(o=>o===r?null:r)}function V(r){const o=t.find(M=>M.tradeId===r.tradeId);o&&s(o)}function Z(){d.invalidateQueries({queryKey:["legacy-listings"]})}const J=E.find(r=>r.key===f)??E[0],S=W.find(r=>r.key===v)??W[0],X=n?`${S.label} · ${n}`:S.label,ee=v!=="wearable"||!!n||m.length>0;return e.jsxs("div",{className:"browse",children:[e.jsxs("div",{className:"market-banner",children:[e.jsx("span",{className:"market-banner__ico","aria-hidden":!0,children:"✨"}),e.jsx("span",{children:"Prices here follow the live market and may shift slightly at checkout."})]}),k?e.jsx("p",{className:"market-banner market-banner--warn",children:"The market price is temporarily unavailable — buying is paused for a moment. Please try again shortly."}):null,h?e.jsx("div",{className:"filterbar__scrim",onClick:()=>y(null),"aria-hidden":!0}):null,e.jsxs("div",{className:"filterbar",children:[e.jsxs("div",{className:"filterbar__filters",children:[e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${h==="section"?" is-open":""}${n||v!=="wearable"?" is-active":""}`,onClick:()=>F("section"),children:[X," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="section"?e.jsxs("div",{className:"filter-pop filter-pop--section",children:[e.jsx("ul",{className:"filter-pop__cats",children:W.map(r=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__cat${v===r.key?" is-active":""}`,onClick:()=>x(r.key),children:r.label})},r.key))}),S.sub.length?e.jsxs("ul",{className:"filter-pop__subs",children:[e.jsx("li",{children:e.jsxs("button",{className:`filter-pop__sub${n?"":" is-active"}`,onClick:()=>{g(null),y(null)},children:["All ",S.label]})}),S.sub.map(r=>e.jsx("li",{children:e.jsx("button",{className:`filter-pop__sub${n===r?" is-active":""}`,onClick:()=>{g(o=>o===r?null:r),y(null)},children:r})},r))]}):null]}):null]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${h==="rarity"?" is-open":""}${m.length?" is-active":""}`,onClick:()=>F("rarity"),children:["Rarity ",m.length?e.jsx("span",{className:"filterbar__badge",children:m.length}):null," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="rarity"?e.jsx("div",{className:"filter-pop filter-pop--rarity",children:xe.map(r=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:m.includes(r),onChange:()=>q(r)}),e.jsx("span",{children:r})]},r))}):null]}),ee?e.jsx("button",{className:"filterbar__clear",onClick:L,children:"Clear all"}):null]}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[w?"…":`${t.length.toLocaleString()} item${t.length===1?"":"s"}`,u?` for “${u}”`:""]}),e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__sort${h==="sort"?" is-open":""}`,onClick:()=>F("sort"),children:["Sort by: ",J.label," ",e.jsx("span",{className:"filterbar__chev","aria-hidden":!0,children:"▾"})]}),h==="sort"?e.jsx("div",{className:"filter-pop filter-pop--sort",children:E.map(r=>e.jsx("button",{className:`filter-pop__sort${r.key===f?" is-active":""}`,onClick:()=>{N(r.key),y(null)},children:r.label},r.key))}):null]})]})]}),I?e.jsx("p",{className:"error",children:I.message}):null,e.jsx("div",{className:"grid",children:w?Array.from({length:15}).map((r,o)=>e.jsx("div",{className:"card card--skeleton"},o)):t.map(r=>e.jsx(le,{item:ve(r),mode:"market",marketPriceCredits:l(r),onBuyNow:V},r.tradeId))}),!w&&t.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null,j&&_?e.jsx(be,{listing:j,rate:_,onClose:()=>s(null),onSold:()=>{s(null),Z()}}):null]})}export{Ae as Market,Ae as default};
@@ -0,0 +1 @@
1
+ import{b as Q,r as u,j as s,L as se}from"./react-E8ng6RF2.js";import{x as H,c as Y,K as ne,l as U,C as j,p as X,t as P,G as W,r as J,d as ae,u as F,h as te,L as ie,M as re}from"./index-MxzGamB6.js";import{f as le}from"./import-D0C6XMTV.js";import{a as ce,b as oe,i as de,e as me,c as ue,d as he}from"./buy-DdbFtykN.js";import{s as pe}from"./wallet-kind-B3ypFsr7.js";import"./ethers-BxoDGoYp.js";import"./mana-rate-WQsbGubC.js";import"./index-CWIz0pK9.js";const K=()=>`${Y.builderServerUrl}/v1`;function z(e){return Array.isArray(e)?e:"results"in e&&Array.isArray(e.results)?e.results:"data"in e&&Array.isArray(e.data)?e.data:[]}async function Z(e,i){const a=await ne(e,{method:"GET",identity:i,metadata:{}});if(!a.ok)throw new Error(`builder-server ${a.status}: ${await a.text()}`);const o=await a.json();return o.data??o}function be(e,i){const a=i-e;return a>0?a:0}function ge(e){var i,a,o,l,c;return((a=(i=e.data)==null?void 0:i.wearable)==null?void 0:a.category)??((l=(o=e.data)==null?void 0:o.emote)==null?void 0:l.category)??((c=e.data)==null?void 0:c.category)??e.type??"wearable"}function G(e){return`${K()}/storage/contents/${e}`}function L(e,i){if(!e)return"";if(/^https?:\/\//.test(e))return e;const a=i==null?void 0:i[e];return a?G(a):/^(ba|Qm)/.test(e)?G(e):""}async function ye(e,i){try{const a=await fetch(`${K()}/items/${e}/${i}/contents`);if(!a.ok)return{};const o=await a.json();return o.data??o}catch{return{}}}async function xe(e,i,a){const o=L(e.thumbnail,e.contents)||L("thumbnail.png",e.contents);if(o)return o;if(i&&a){const l=await ye(i,a);return L(e.thumbnail,l)||L("thumbnail.png",l)||L("image.png",l)}return""}async function fe(e,i){const a=`${K()}/${e.toLowerCase()}/collections?is_published=true`,o=await Z(a,i);return z(o).filter(l=>l.is_published&&!!l.contract_address).map(l=>({id:l.id,name:l.name,contractAddress:l.contract_address.toLowerCase(),isPublished:l.is_published,isApproved:l.is_approved,minters:(l.minters??[]).map(c=>c.toLowerCase())}))}async function je(e,i){const a=`${K()}/collections/${e.id}/items`,o=await Z(a,i);return(await Promise.all(z(o).map(async c=>{const I=c.rarity??"common",_=Number(c.total_supply??0)||0;let h=0;try{h=H.Rarity.getMaxSupply(I)}catch{h=0}const N=(c.contract_address??e.contractAddress).toLowerCase(),p=c.blockchain_item_id??"";return{id:c.id,collectionId:e.id,collectionName:e.name,contractAddress:N,blockchainItemId:p,name:c.name,category:ge(c),rarity:I,thumbnail:await xe(c,N,p),type:c.type??"wearable",isPublished:c.is_published??e.isPublished,isApproved:c.is_approved??e.isApproved,totalSupply:_,maxSupply:h,remainingSupply:be(_,h),minters:e.minters}}))).filter(_e)}function _e(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function Ne(e,i){const a=await fe(e,i);return(await Promise.all(a.map(async l=>{try{return await je(l,i)}catch{return[]}}))).flat()}const ve=1e3*60*60*24*182;function Ie(e){const i=e,a=(i.message??"").toLowerCase();return i.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't list your item — please try again."}function ke({asset:e,session:i,onClose:a}){const o=U(),l=Q(),[c,I]=u.useState("10"),[_,h]=u.useState(null),[N,p]=u.useState(null),[b,C]=u.useState(!1),[x,f]=u.useState(null);async function A(){p(null);const d=Number(c);if(!Number.isInteger(d)||d<=0){p("Enter a whole number of credits");return}C(!0);try{h("Getting your item ready…"),await ce({signer:i.signer,contractAddress:e.contractAddress,chainId:e.chainId}),h("Listing your item…");const v=await oe({signer:i.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:d/10,expiresAtMs:Date.now()+ve});h("Publishing…"),await X(v,i.identity),h(null),f(d),P("Shop Listed Item",{item_id:e.itemId??e.tokenId??null,contract_address:e.contractAddress,price_credits:d,price_usd:d/10,listing_type:"secondary",is_primary:!1}),W.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["my-assets",i.address]})}catch(v){console.error(v),P("Shop Listing Failed",{listing_type:"secondary",error_code:J(v)}),p(Ie(v)),h(null)}finally{C(!1)}}function g(){a(),l(`/item/${e.contractAddress}/${e.tokenId}`)}return x!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[j.symbol," ",x]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:g,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["List “",e.name,"”"]}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",j.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:d=>I(d.target.value),disabled:b})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",j.name," (1 ",j.nameSingular," = $0.10)."]}),_?s.jsx("p",{className:"muted",children:_}):null,N?s.jsx("p",{className:"error",children:N}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:b,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:A,disabled:b,children:b?"Working…":"List for sale"})]})]})})}const Ce=1e3*60*60*24*182;function Se(e){const i=e,a=(i.message??"").toLowerCase();return i.code===4001||a.includes("reject")||a.includes("denied")||a.includes("cancel")?"You cancelled the request.":"Couldn't publish your item — please try again."}function we({item:e,session:i,onClose:a}){const o=U(),l=Q(),[c,I]=u.useState("10"),[_,h]=u.useState(null),[N,p]=u.useState(null),[b,C]=u.useState(!1),[x,f]=u.useState(null),[A,g]=u.useState(null),d=Y.chainId,v=pe(i.providerType);u.useEffect(()=>{let m=!1;return(async()=>{try{const k=await de({contractAddress:e.contractAddress,chainId:d});m||f(k)}catch{m||f(!1)}})(),()=>{m=!0}},[e.contractAddress,d]);async function E(){p(null);const m=Number(c);if(!Number.isInteger(m)||m<=0){p("Enter a whole number of credits");return}C(!0);try{x||(h("Enabling sales for this collection…"),await me({signer:i.signer,contractAddress:e.contractAddress,chainId:d}),f(!0)),h("Publishing your item…");const k=await ue({signer:i.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:H.Network.MATIC,chainId:d},usdPrice:m/10,uses:e.remainingSupply,expiresAtMs:Date.now()+Ce});h("Finishing up…"),await X(k,i.identity),h(null),g(m),P("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:m,price_usd:m/10,listing_type:"primary",is_primary:!0}),W.success(`“${e.name}” is now on sale!`),o.invalidateQueries({queryKey:["publishable-items"]}),o.invalidateQueries({queryKey:["collection-sale-state"]})}catch(k){console.error(k),P("Shop Listing Failed",{listing_type:"primary",error_code:J(k)}),p(Se(k)),h(null)}finally{C(!1)}}function S(){a(),l(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const $=b?"Working…":x===!1?"Enable & publish":"Publish for sale";return A!==null?s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:m=>m.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:"It’s on sale! 🎉"}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"modal-success__name",children:e.name}),s.jsxs("p",{className:"muted small",children:["Listed for ",s.jsxs("strong",{children:[j.symbol," ",A]})," · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:S,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:a,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:m=>m.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsxs("h2",{className:"modal__title",children:["Publish “",e.name,"”"]}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsxs("p",{className:"muted small",children:["From your collection “",e.collectionName,"” · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("label",{className:"field",children:[s.jsxs("span",{children:["Price (",j.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:c,onChange:m=>I(m.target.value),disabled:b})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",j.name," (1 ",j.nameSingular," = $0.10)."]}),x===!1&&!b?v?s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? It needs a one-time approval, then you’ll confirm the listing — two quick confirmations. After this, listing more items from this collection is a single step."]}):s.jsxs("p",{className:"muted small primary-note",children:["First time selling from “",e.collectionName,"”? Setting it up takes a moment — after that, listing more items from this collection is instant."]}):x===!0&&!b?v?s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is a single confirmation."}):s.jsx("p",{className:"muted small primary-note",children:"This collection is ready — publishing is instant."}):null,_?s.jsx("p",{className:"muted",children:_}):null,N?s.jsx("p",{className:"error",children:N}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:a,disabled:b,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:E,disabled:b||x===null,children:x===null?"Checking…":$})]})]})})}function V(e){return{id:e.id,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.itemId,category:e.category,rarity:e.rarity??"common",network:e.network,chainId:e.chainId,thumbnail:e.image,priceCredits:e.listingPrice??0,gender:null,tokenId:e.tokenId}}function T(e){return{id:`${e.contractAddress}-${e.blockchainItemId}`,name:e.name,creator:"",contractAddress:e.contractAddress,itemId:e.blockchainItemId,category:e.category,rarity:e.rarity,network:"MATIC",chainId:Y.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null}}function Te(){const{session:e,error:i,signIn:a,restore:o}=ae(),l=Q(),c=U(),[I,_]=u.useState(null),[h,N]=u.useState(null),[p,b]=u.useState(null),[C,x]=u.useState(null);function f(n){const t=n.tokenId??n.itemId??"";!n.contractAddress||!t||l(`/item/${n.contractAddress}/${t}`,{state:{item:n}})}async function A(n,t,r){if(e){x(null),b(r);try{const y=await te(n);await he({trade:y,signer:e.signer}),W.success(`“${t}” is no longer for sale.`),await c.invalidateQueries({queryKey:["my-assets",e.address]}),await c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(y){const M=y,q=(M.message??"").toLowerCase();x(M.code===4001||q.includes("reject")||q.includes("denied")?"You cancelled the request.":"Couldn't remove the listing — please try again.")}finally{b(null)}}}u.useEffect(()=>{o()},[o]);const g=e==null?void 0:e.address,{data:d,isLoading:v,error:E}=F({queryKey:["my-assets",g],queryFn:()=>ie(g),enabled:!!g}),{data:S}=F({queryKey:["importable",g],queryFn:()=>le(g),enabled:!!g}),$=((S==null?void 0:S.creations.length)??0)+((S==null?void 0:S.owned.length)??0),{data:m,isLoading:k,isError:ee}=F({queryKey:["publishable-items",g],queryFn:()=>Ne(g,e.identity),enabled:!!e,retry:!1}),D=u.useMemo(()=>[...new Set((m??[]).map(n=>n.contractAddress))],[m]),{data:w}=F({queryKey:["collection-sale-state",g,D],enabled:D.length>0,queryFn:async()=>{const n=await Promise.all(D.map(async r=>[r,await re(r)])),t={};for(const[r,y]of n)for(const[M,q]of Object.entries(y))t[`${r}-${M}`]=q;return t}}),O=n=>w==null?void 0:w[`${n.contractAddress}-${n.blockchainItemId}`],R=u.useMemo(()=>(m??[]).filter(n=>{var t;return(t=O(n))==null?void 0:t.isOnSale}),[m,w]),B=u.useMemo(()=>{var t;const n=new Map;for(const r of m??[]){if((t=w==null?void 0:w[`${r.contractAddress}-${r.blockchainItemId}`])!=null&&t.isOnSale)continue;const y=n.get(r.collectionId)??{id:r.collectionId,name:r.collectionName,items:[]};y.items.push(r),n.set(r.collectionId,y)}return[...n.values()]},[m,w]);return e?s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),$>0?s.jsxs(se,{className:"import-banner",to:"/import",children:[s.jsx("span",{className:"import-banner__ico","aria-hidden":!0,children:"📦"}),s.jsxs("span",{className:"import-banner__text",children:[s.jsx("strong",{children:"Import your listings"}),s.jsxs("span",{className:"import-banner__sub",children:["You have ",$," item",$===1?"":"s"," for sale elsewhere — bring them into the Shop."]})]}),s.jsx("span",{className:"import-banner__cta",children:"Import"})]}):null,s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Items you own"}),s.jsx("p",{className:"myassets__section-sub",children:"Wearables & emotes you’ve bought — resell them in the Shop."})]}),E?s.jsx("p",{className:"error",children:E.message}):null,C?s.jsx("p",{className:"error",children:C}):null,s.jsx("div",{className:"asset-grid",children:v?Array.from({length:8}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${t}`)):d==null?void 0:d.assets.map(n=>s.jsxs("article",{className:"asset-card asset-card--link",onClick:()=>f(V(n)),role:"link",tabIndex:0,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),f(V(n)))},children:[s.jsx("div",{className:"asset-card__img",children:n.image?s.jsx("img",{src:n.image,alt:n.name}):null}),s.jsx("div",{className:"asset-card__name",title:n.name,children:n.name}),n.isOnSale?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"asset-card__listed",children:[s.jsxs("span",{className:"asset-card__price",children:[j.symbol," ",n.listingPrice]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:p===n.id||!n.tradeId,onClick:t=>{t.stopPropagation(),n.tradeId&&A(n.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]}):s.jsx("button",{className:"btn btn--sm",onClick:t=>{t.stopPropagation(),P("Shop Started Listing",{listing_type:"secondary",item_id:n.itemId??n.tokenId??null}),_(n)},children:"List for sale"})]},n.id))}),!v&&d&&d.assets.length===0?s.jsx("p",{className:"muted",children:"No items in your inventory yet."}):null]}),s.jsxs("div",{className:"myassets__section",children:[s.jsxs("div",{className:"myassets__section-head",children:[s.jsx("h2",{className:"myassets__section-title",children:"Your creations"}),s.jsxs("p",{className:"myassets__section-sub",children:["Items you made. Put them on sale in the Shop — set a price in ",j.name," and buyers pay with ",j.name,"."]})]}),k?s.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((n,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${t}`))}):ee?s.jsx("p",{className:"publish-empty",children:"We couldn’t load your collections right now. Please try again in a moment."}):R.length===0&&B.length===0?s.jsx("p",{className:"publish-empty",children:"You don’t have any items to publish yet."}):s.jsxs(s.Fragment,{children:[R.length>0?s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:"On sale"}),s.jsx("div",{className:"publish-grid",children:R.map(n=>{var t;return s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>f(T(n)),role:"link",tabIndex:0,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),f(T(n)))},children:[s.jsx("div",{className:"publish-card__img",children:n.thumbnail?s.jsx("img",{src:n.thumbnail,alt:n.name}):null}),s.jsx("div",{className:"publish-card__name",title:n.name,children:n.name}),s.jsxs("div",{className:"publish-card__listed",children:[s.jsxs("span",{className:"publish-card__price",children:[j.symbol," ",((t=O(n))==null?void 0:t.priceCredits)??0]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost publish-card__cta",disabled:p===n.id,onClick:r=>{r.stopPropagation();const y=O(n);y!=null&&y.tradeId&&A(y.tradeId,n.name,n.id)},children:p===n.id?"Removing…":"Remove listing"})]},`${n.contractAddress}-${n.blockchainItemId}`)})})]}):null,B.map(n=>s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:n.name}),s.jsx("div",{className:"publish-grid",children:n.items.map(t=>s.jsxs("article",{className:"publish-card publish-card--link",onClick:()=>f(T(t)),role:"link",tabIndex:0,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),f(T(t)))},children:[s.jsx("div",{className:"publish-card__img",children:t.thumbnail?s.jsx("img",{src:t.thumbnail,alt:t.name}):null}),s.jsx("div",{className:"publish-card__name",title:t.name,children:t.name}),s.jsxs("div",{className:"publish-card__meta",children:[s.jsx("span",{className:"publish-chip publish-chip--rarity",children:t.rarity}),s.jsxs("span",{className:"publish-card__supply",children:[t.remainingSupply.toLocaleString()," available"]})]}),s.jsx("button",{className:"btn btn--sm btn--purple publish-card__cta",onClick:r=>{r.stopPropagation(),P("Shop Started Listing",{listing_type:"primary",item_id:t.blockchainItemId}),N(t)},children:"Put on sale"})]},`${t.contractAddress}-${t.blockchainItemId}`))})]},n.id))]})]}),I?s.jsx(ke,{asset:I,session:e,onClose:()=>_(null)}):null,h?s.jsx(we,{item:h,session:e,onClose:()=>N(null)}):null]}):s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),s.jsx("p",{className:"muted",children:"Sign in to sell your items."}),s.jsx("div",{className:"connect-row",children:s.jsx("button",{className:"btn btn--purple",onClick:()=>a(),children:"Sign in"})}),i?s.jsx("p",{className:"error",children:i}):null]})}export{Te as MyAssets};
@@ -1 +1 @@
1
- import{j as s,L as a}from"./react-DwvsoSSx.js";import{a as i,A as r}from"./index-BDfhJESf.js";import"./ethers-g2M4Ny1y.js";function l(){const e=i(t=>Object.values(t.items));return e.length===0?s.jsxs("div",{className:"favorites-empty",children:[s.jsx("span",{className:"ico ico-heart favorites-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"favorites-empty__title",children:"No favorites yet"}),s.jsx("p",{className:"muted",children:"Tap the heart on any item to save it here."}),s.jsx(a,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):s.jsxs("section",{className:"favorites",children:[s.jsxs("div",{className:"favorites__head",children:[s.jsx("h1",{children:"My Favorites"}),s.jsxs("span",{className:"favorites__count",children:[e.length," item",e.length>1?"s":""]})]}),s.jsx("div",{className:"grid",children:e.map(t=>s.jsx(r,{item:t},t.id))})]})}export{l as MyFavorites};
1
+ import{j as s,L as a}from"./react-E8ng6RF2.js";import{b as i,A as r}from"./index-MxzGamB6.js";import"./ethers-BxoDGoYp.js";function l(){const e=i(t=>Object.values(t.items));return e.length===0?s.jsxs("div",{className:"favorites-empty",children:[s.jsx("span",{className:"ico ico-heart favorites-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"favorites-empty__title",children:"No favorites yet"}),s.jsx("p",{className:"muted",children:"Tap the heart on any item to save it here."}),s.jsx(a,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):s.jsxs("section",{className:"favorites",children:[s.jsxs("div",{className:"favorites__head",children:[s.jsx("h1",{children:"My Favorites"}),s.jsxs("span",{className:"favorites__count",children:[e.length," item",e.length>1?"s":""]})]}),s.jsx("div",{className:"grid",children:e.map(t=>s.jsx(r,{item:t},t.id))})]})}export{l as MyFavorites};
@@ -0,0 +1 @@
1
+ import{j as e,L as d}from"./react-E8ng6RF2.js";import{d as u,u as h,C as l,e as o,g as m}from"./index-MxzGamB6.js";import"./ethers-BxoDGoYp.js";function p(s){try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function _({status:s}){return s==="PENDING"?e.jsx("span",{className:"purchase__badge purchase__badge--pending",children:"Processing"}):e.jsx("span",{className:"purchase__badge purchase__badge--done",children:"Completed"})}function x({purchase:s}){const{data:a}=h({queryKey:["trade-display",s.tradeId],queryFn:()=>o(s.tradeId),enabled:!!s.tradeId,staleTime:3e5}),t=(a==null?void 0:a.name)??"Item",c=(a==null?void 0:a.thumbnail)??"",r=(a==null?void 0:a.tokenId)??(a==null?void 0:a.itemId)??"",n=a!=null&&a.contractAddress&&r?`/item/${a.contractAddress}/${r}`:void 0,i=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"purchase__thumb",children:c?e.jsx("img",{src:c,alt:t}):null}),e.jsxs("div",{className:"purchase__info",children:[e.jsx("div",{className:"purchase__name",title:t,children:t}),e.jsx("div",{className:"muted purchase__date",children:p(s.createdAt)})]}),e.jsx(_,{status:s.status}),e.jsxs("div",{className:"purchase__price",children:[l.symbol," ",s.credits]})]});return n?e.jsx(d,{className:"purchase",to:n,children:i}):e.jsx("div",{className:"purchase",children:i})}function g(){const{session:s}=u(),{data:a,isLoading:t}=h({queryKey:["purchases",s==null?void 0:s.address],queryFn:()=>m(s.address,s.identity),enabled:!!s});if(!s)return e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"Sign in to see your purchases"}),e.jsx("p",{className:"muted",children:"Your order history shows up here once you sign in."})]});const c=(a??[]).filter(r=>r.status!=="EXPIRED");return!t&&c.length===0?e.jsxs("div",{className:"purchases-empty",children:[e.jsx("span",{className:"ico ico-cart purchases-empty__ico","aria-hidden":!0}),e.jsx("p",{className:"purchases-empty__title",children:"No purchases yet"}),e.jsx("p",{className:"muted",children:"When you buy something it’ll appear here."}),e.jsx(d,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]}):e.jsxs("section",{className:"purchases",children:[e.jsxs("div",{className:"purchases__head",children:[e.jsx("h1",{children:"My Purchases"}),t?null:e.jsxs("span",{className:"purchases__count",children:[c.length," order",c.length>1?"s":""]})]}),e.jsx("div",{className:"purchases__list",children:t?Array.from({length:4}).map((r,n)=>e.jsx("div",{className:"purchase purchase--skeleton"},n)):c.map(r=>e.jsx(x,{purchase:r},r.id))})]})}export{g as MyPurchases};
@@ -1,4 +1,4 @@
1
- import{p as ee}from"./ethers-g2M4Ny1y.js";const ae="2.54.1";let T={getDocsUrl:({docsBaseUrl:r,docsPath:e="",docsSlug:t})=>e?`${r??"https://viem.sh"}${e}${t?`#${t}`:""}`:void 0,version:`viem@${ae}`};class o extends Error{constructor(e,t={}){var p;const n=(()=>{var u;return t.cause instanceof o?t.cause.details:(u=t.cause)!=null&&u.message?t.cause.message:t.details})(),a=t.cause instanceof o&&t.cause.docsPath||t.docsPath,s=(p=T.getDocsUrl)==null?void 0:p.call(T,{...t,docsPath:a}),i=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...T.version?[`Version: ${T.version}`]:[]].join(`
1
+ import{p as ee}from"./ethers-BxoDGoYp.js";const ae="2.54.1";let T={getDocsUrl:({docsBaseUrl:r,docsPath:e="",docsSlug:t})=>e?`${r??"https://viem.sh"}${e}${t?`#${t}`:""}`:void 0,version:`viem@${ae}`};class o extends Error{constructor(e,t={}){var p;const n=(()=>{var u;return t.cause instanceof o?t.cause.details:(u=t.cause)!=null&&u.message?t.cause.message:t.details})(),a=t.cause instanceof o&&t.cause.docsPath||t.docsPath,s=(p=T.getDocsUrl)==null?void 0:p.call(T,{...t,docsPath:a}),i=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...n?[`Details: ${n}`]:[],...T.version?[`Version: ${T.version}`]:[]].join(`
2
2
  `);super(i,t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=ae}walk(e){return se(this,e)}}function se(r,e){return e!=null&&e(r)?r:r&&typeof r=="object"&&"cause"in r&&r.cause!==void 0?se(r.cause,e):e?null:r}class oe extends o{constructor({max:e,min:t,signed:n,size:a,value:s}){super(`Number "${s}" is not in safe ${a?`${a*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}class Ke extends o{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class fe extends o{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class me extends o{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}function ie(r,{strict:e=!0}={}){return!r||typeof r!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(r):r.startsWith("0x")}function te(r){return ie(r,{strict:!1})?Math.ceil((r.length-2)/2):r.length}function v(r,{dir:e="left"}={}){let t=typeof r=="string"?r.replace("0x",""):r,n=0;for(let a=0;a<t.length-1&&t[e==="left"?a:t.length-a-1].toString()==="0";a++)n++;return t=e==="left"?t.slice(n):t.slice(0,t.length-n),typeof r=="string"?(t.length===1&&e==="right"&&(t=`${t}0`),`0x${t.length%2===1?`0${t}`:t}`):t}class Ve extends o{constructor({offset:e,position:t,size:n}){super(`Slice ${t==="start"?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class ue extends o{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}class Ye extends o{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${t} ${n} long, but is ${e} ${n} long.`,{name:"InvalidBytesLengthError"})}}function g(r,{dir:e,size:t=32}={}){return typeof r=="string"?he(r,{dir:e,size:t}):ye(r,{dir:e,size:t})}function he(r,{dir:e,size:t=32}={}){if(t===null)return r;const n=r.replace("0x","");if(n.length>t*2)throw new ue({size:Math.ceil(n.length/2),targetSize:t,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](t*2,"0")}`}function ye(r,{dir:e,size:t=32}={}){if(t===null)return r;if(r.length>t)throw new ue({size:r.length,targetSize:t,type:"bytes"});const n=new Uint8Array(t);for(let a=0;a<t;a++){const s=e==="right";n[s?a:t-a-1]=r[s?a:r.length-a-1]}return n}const ge=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Xe(r,e={}){return typeof r=="number"||typeof r=="bigint"?le(r,e):typeof r=="string"?Te(r,e):typeof r=="boolean"?Ee(r,e):ce(r,e)}function Ee(r,e={}){const t=`0x${Number(r)}`;return typeof e.size=="number"?(y(t,{size:e.size}),g(t,{size:e.size})):t}function ce(r,e={}){let t="";for(let a=0;a<r.length;a++)t+=ge[r[a]];const n=`0x${t}`;return typeof e.size=="number"?(y(n,{size:e.size}),g(n,{dir:"right",size:e.size})):n}function le(r,e={}){const{signed:t,size:n}=e,a=BigInt(r);let s;n?t?s=(1n<<BigInt(n)*8n-1n)-1n:s=2n**(BigInt(n)*8n)-1n:typeof r=="number"&&(s=BigInt(Number.MAX_SAFE_INTEGER));const i=typeof s=="bigint"&&t?-s-1n:0;if(s&&a>s||a<i){const u=typeof r=="bigint"?"n":"";throw new oe({max:s?`${s}${u}`:void 0,min:`${i}${u}`,signed:t,size:n,value:`${r}${u}`})}const p=`0x${(t&&a<0?(1n<<BigInt(n*8))+BigInt(a):a).toString(16)}`;return n?g(p,{size:n}):p}const Ne=new TextEncoder;function Te(r,e={}){const t=Ne.encode(r);return ce(t,e)}const ve=new TextEncoder;function Je(r,e={}){return typeof r=="number"||typeof r=="bigint"?Oe(r,e):typeof r=="boolean"?we(r,e):ie(r)?O(r,e):Ae(r,e)}function we(r,e={}){const t=new Uint8Array(1);return t[0]=Number(r),typeof e.size=="number"?(y(t,{size:e.size}),g(t,{size:e.size})):t}const m={zero:48,nine:57,A:65,F:70,a:97,f:102};function re(r){if(r>=m.zero&&r<=m.nine)return r-m.zero;if(r>=m.A&&r<=m.F)return r-(m.A-10);if(r>=m.a&&r<=m.f)return r-(m.a-10)}function O(r,e={}){let t=r;e.size&&(y(t,{size:e.size}),t=g(t,{dir:"right",size:e.size}));let n=t.slice(2);n.length%2&&(n=`0${n}`);const a=n.length/2,s=new Uint8Array(a);for(let i=0,p=0;i<a;i++){const u=re(n.charCodeAt(p++)),E=re(n.charCodeAt(p++));if(u===void 0||E===void 0)throw new o(`Invalid byte sequence ("${n[p-2]}${n[p-1]}" in "${n}").`);s[i]=u*16+E}return s}function Oe(r,e){const t=le(r,e);return O(t)}function Ae(r,e={}){const t=ve.encode(r);return typeof e.size=="number"?(y(t,{size:e.size}),g(t,{dir:"right",size:e.size})):t}function y(r,{size:e}){if(te(r)>e)throw new me({givenSize:te(r),maxSize:e})}function Qe(r,e){const t={to:e},n=t.to;return n==="number"?Me(r,t):n==="bigint"?de(r,t):n==="string"?Ce(r,t):n==="boolean"?xe(r,t):O(r,t)}function de(r,e={}){const{signed:t}=e;e.size&&y(r,{size:e.size});const n=BigInt(r);if(!t)return n;const a=(r.length-2)/2,s=(1n<<BigInt(a)*8n-1n)-1n;return n<=s?n:n-BigInt(`0x${"f".padStart(a*2,"f")}`)-1n}function xe(r,e={}){let t=r;if(e.size&&(y(t,{size:e.size}),t=v(t)),v(t)==="0x00")return!1;if(v(t)==="0x01")return!0;throw new fe(t)}function Me(r,e={}){const t=de(r,e),n=Number(t);if(!Number.isSafeInteger(n))throw new oe({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:e.signed,size:e.size,value:`${t}n`});return n}function Ce(r,e={}){let t=O(r);return e.size&&(y(t,{size:e.size}),t=v(t,{dir:"right"})),new TextDecoder().decode(t)}const Ze={gwei:9,wei:18},Re={ether:-9,wei:9};function Se(r,e){let t=r.toString();const n=t.startsWith("-");n&&(t=t.slice(1)),t=t.padStart(e,"0");let[a,s]=[t.slice(0,t.length-e),t.slice(t.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${a||"0"}${s?`.${s}`:""}`}function w(r,e="wei"){return Se(r,Re[e])}class pe extends o{constructor({cause:e,message:t}={}){var a;const n=(a=t==null?void 0:t.replace("execution reverted: ",""))==null?void 0:a.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(pe,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(pe,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted|gas required exceeds allowance/});class Pe extends o{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${w(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(Pe,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class _e extends o{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${w(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(_e,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class Ie extends o{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(Ie,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class $e extends o{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
3
3
  `),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty($e,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class Ue extends o{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(Ue,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class De extends o{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
4
4
  `),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(De,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class je extends o{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(je,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class Le extends o{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(Le,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class ze extends o{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(ze,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Be extends o{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${w(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${w(n)} gwei`:""}).`].join(`
@@ -0,0 +1 @@
1
+ import{j as e,L as s}from"./react-E8ng6RF2.js";function t(){return e.jsxs("div",{className:"notfound",children:[e.jsx("span",{className:"ico ico-cart notfound__ico","aria-hidden":!0}),e.jsx("h1",{className:"notfound__title",children:"Page not found"}),e.jsx("p",{className:"muted",children:"The page you’re looking for isn’t here. Let’s get you back to the shop."}),e.jsx(s,{className:"btn btn--purple",to:"/assets",children:"Browse the shop"})]})}export{t as NotFound,t as default};
@@ -1,2 +1,2 @@
1
- import{g as Ee,R as a,r as be,j as W}from"./react-DwvsoSSx.js";import{g as ke}from"./index-BDfhJESf.js";import"./ethers-g2M4Ny1y.js";var q={exports:{}},D,V;function Pe(){if(V)return D;V=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return D=n,D}var B,G;function we(){if(G)return B;G=1;var n=Pe();function e(){}function t(){}return t.resetWarningCache=e,B=function(){function r(u,s,c,y,f,S){if(S!==n){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},B}var J;function Re(){return J||(J=1,q.exports=we()()),q.exports}var xe=Re();const d=Ee(xe);var re="https://js.stripe.com/v3",je=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var Oe=function(){for(var e=document.querySelectorAll('script[src^="'.concat(re,'"]')),t=0;t<e.length;t++){var r=e[t];if(je.test(r.src))return r}return null},z=function(e){var t="",r=document.createElement("script");r.src="".concat(re).concat(t);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},Te=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:t})},R=null,N=null,L=null,Ae=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},Ne=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},Le=function(e){return R!==null?R:(R=new Promise(function(t,r){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var o=Oe();if(!(o&&e)){if(!o)o=z(e);else if(o&&L!==null&&N!==null){var i;o.removeEventListener("load",L),o.removeEventListener("error",N),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=z(e)}}L=Ne(t,r),N=Ae(r),o.addEventListener("load",L),o.addEventListener("error",N)}catch(u){r(u);return}}),R.catch(function(t){return R=null,Promise.reject(t)}))},Ie=function(e,t,r){if(e===null)return null;var o=e.apply(void 0,t);return Te(o,r),o},x,ne=!1,oe=function(){return x||(x=Le(null).catch(function(e){return x=null,Promise.reject(e)}),x)};Promise.resolve().then(function(){return oe()}).catch(function(n){ne||console.warn(n)});var Ue=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];ne=!0;var o=Date.now();return oe().then(function(i){return Ie(i,t,o)})};function H(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function X(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H(Object(t),!0).forEach(function(r){ie(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function I(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(e){return typeof e}:I=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(n)}function ie(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ae(n,e){return _e(n)||We(n,e)||qe(n,e)||De()}function _e(n){if(Array.isArray(n))return n}function We(n,e){var t=n&&(typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"]);if(t!=null){var r=[],o=!0,i=!1,u,s;try{for(t=t.call(n);!(o=(u=t.next()).done)&&(r.push(u.value),!(e&&r.length===e));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw s}}return r}}function qe(n,e){if(n){if(typeof n=="string")return Q(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Q(n,e)}}function Q(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{g as Ee,R as a,r as be,j as W}from"./react-E8ng6RF2.js";import{c as ke}from"./index-MxzGamB6.js";import"./ethers-BxoDGoYp.js";var q={exports:{}},D,V;function Pe(){if(V)return D;V=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return D=n,D}var B,G;function we(){if(G)return B;G=1;var n=Pe();function e(){}function t(){}return t.resetWarningCache=e,B=function(){function r(u,s,c,y,f,S){if(S!==n){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},B}var J;function Re(){return J||(J=1,q.exports=we()()),q.exports}var xe=Re();const d=Ee(xe);var re="https://js.stripe.com/v3",je=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var Oe=function(){for(var e=document.querySelectorAll('script[src^="'.concat(re,'"]')),t=0;t<e.length;t++){var r=e[t];if(je.test(r.src))return r}return null},z=function(e){var t="",r=document.createElement("script");r.src="".concat(re).concat(t);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},Te=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"4.6.0",startTime:t})},R=null,N=null,L=null,Ae=function(e){return function(){e(new Error("Failed to load Stripe.js"))}},Ne=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},Le=function(e){return R!==null?R:(R=new Promise(function(t,r){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe){t(window.Stripe);return}try{var o=Oe();if(!(o&&e)){if(!o)o=z(e);else if(o&&L!==null&&N!==null){var i;o.removeEventListener("load",L),o.removeEventListener("error",N),(i=o.parentNode)===null||i===void 0||i.removeChild(o),o=z(e)}}L=Ne(t,r),N=Ae(r),o.addEventListener("load",L),o.addEventListener("error",N)}catch(u){r(u);return}}),R.catch(function(t){return R=null,Promise.reject(t)}))},Ie=function(e,t,r){if(e===null)return null;var o=e.apply(void 0,t);return Te(o,r),o},x,ne=!1,oe=function(){return x||(x=Le(null).catch(function(e){return x=null,Promise.reject(e)}),x)};Promise.resolve().then(function(){return oe()}).catch(function(n){ne||console.warn(n)});var Ue=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];ne=!0;var o=Date.now();return oe().then(function(i){return Ie(i,t,o)})};function H(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function X(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H(Object(t),!0).forEach(function(r){ie(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function I(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(e){return typeof e}:I=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(n)}function ie(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ae(n,e){return _e(n)||We(n,e)||qe(n,e)||De()}function _e(n){if(Array.isArray(n))return n}function We(n,e){var t=n&&(typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"]);if(t!=null){var r=[],o=!0,i=!1,u,s;try{for(t=t.call(n);!(o=(u=t.next()).done)&&(r.push(u.value),!(e&&r.length===e));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(i)throw s}}return r}}function qe(n,e){if(n){if(typeof n=="string")return Q(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Q(n,e)}}function Q(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C=function(e,t,r){var o=!!r,i=a.useRef(r);a.useEffect(function(){i.current=r},[r]),a.useEffect(function(){if(!o||!e)return function(){};var u=function(){i.current&&i.current.apply(i,arguments)};return e.on(t,u),function(){e.off(t,u)}},[o,t,e,i])},Y=function(e){var t=a.useRef(e);return a.useEffect(function(){t.current=e},[e]),t.current},w=function(e){return e!==null&&I(e)==="object"},Be=function(e){return w(e)&&typeof e.then=="function"},Me=function(e){return w(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},Z="[object Object]",Ye=function n(e,t){if(!w(e)||!w(t))return e===t;var r=Array.isArray(e),o=Array.isArray(t);if(r!==o)return!1;var i=Object.prototype.toString.call(e)===Z,u=Object.prototype.toString.call(t)===Z;if(i!==u)return!1;if(!i&&!r)return e===t;var s=Object.keys(e),c=Object.keys(t);if(s.length!==c.length)return!1;for(var y={},f=0;f<s.length;f+=1)y[s[f]]=!0;for(var S=0;S<c.length;S+=1)y[c[S]]=!0;var m=Object.keys(y);if(m.length!==s.length)return!1;var h=e,k=t,E=function(P){return n(h[P],k[P])};return m.every(E)},Fe=function(e,t,r){return w(e)?Object.keys(e).reduce(function(o,i){var u=!w(t)||!Ye(e[i],t[i]);return r.includes(i)?(u&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),o):u?X(X({},o||{}),{},ie({},i,e[i])):o},null):null},ue="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",ee=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;if(e===null||Me(e))return e;throw new Error(t)},$e=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;if(Be(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(o){return ee(o,t)})};var r=ee(e,t);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},Ke=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"2.8.1"}),e.registerAppInfo({name:"react-stripe-js",version:"2.8.1",url:"https://stripe.com/docs/stripe-js/react"}))},ce=a.createContext(null);ce.displayName="ElementsContext";var Ve=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e};d.any,d.object;d.func.isRequired;var se=a.createContext(null);se.displayName="CustomCheckoutSdkContext";var Ge=function(e,t){if(!e)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CustomCheckoutProvider> provider."));return e},Je=a.createContext(null);Je.displayName="CustomCheckoutContext";d.any,d.shape({clientSecret:d.string.isRequired,elementsOptions:d.object}).isRequired;var te=function(e){var t=a.useContext(se),r=a.useContext(ce);if(t&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CustomCheckoutProvider> and <Elements> providers."));return t?Ge(t,e):Ve(r,e)},ze=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},p=function(e,t){var r="".concat(ze(e),"Element"),o=function(c){var y=c.id,f=c.className,S=c.options,m=S===void 0?{}:S,h=c.onBlur,k=c.onFocus,E=c.onReady,j=c.onChange,P=c.onEscape,le=c.onClick,pe=c.onLoadError,fe=c.onLoaderStart,me=c.onNetworksChange,he=c.onConfirm,ve=c.onCancel,Ce=c.onShippingAddressChange,ye=c.onShippingRateChange,O=te("mounts <".concat(r,">")),T="elements"in O?O.elements:null,A="customCheckoutSdk"in O?O.customCheckoutSdk:null,ge=a.useState(null),$=ae(ge,2),v=$[0],Se=$[1],b=a.useRef(null),U=a.useRef(null);C(v,"blur",h),C(v,"focus",k),C(v,"escape",P),C(v,"click",le),C(v,"loaderror",pe),C(v,"loaderstart",fe),C(v,"networkschange",me),C(v,"confirm",he),C(v,"cancel",ve),C(v,"shippingaddresschange",Ce),C(v,"shippingratechange",ye),C(v,"change",j);var _;E&&(e==="expressCheckout"?_=E:_=function(){E(v)}),C(v,"ready",_),a.useLayoutEffect(function(){if(b.current===null&&U.current!==null&&(T||A)){var g=null;A?g=A.createElement(e,m):T&&(g=T.create(e,m)),b.current=g,Se(g),g&&g.mount(U.current)}},[T,A,m]);var K=Y(m);return a.useEffect(function(){if(b.current){var g=Fe(m,K,["paymentRequest"]);g&&"update"in b.current&&b.current.update(g)}},[m,K]),a.useLayoutEffect(function(){return function(){if(b.current&&typeof b.current.destroy=="function")try{b.current.destroy(),b.current=null}catch{}}},[]),a.createElement("div",{id:y,className:f,ref:U})},i=function(c){te("mounts <".concat(r,">"));var y=c.id,f=c.className;return a.createElement("div",{id:y,className:f})},u=t?i:o;return u.propTypes={id:d.string,className:d.string,onChange:d.func,onBlur:d.func,onFocus:d.func,onReady:d.func,onEscape:d.func,onClick:d.func,onLoadError:d.func,onLoaderStart:d.func,onNetworksChange:d.func,onConfirm:d.func,onCancel:d.func,onShippingAddressChange:d.func,onShippingRateChange:d.func,options:d.object},u.displayName=r,u.__elementType=e,u},l=typeof window>"u",F=a.createContext(null);F.displayName="EmbeddedCheckoutProviderContext";var de=function(){var e=a.useContext(F);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},He="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",Xe=function(e){var t=e.stripe,r=e.options,o=e.children,i=a.useMemo(function(){return $e(t,He)},[t]),u=a.useRef(null),s=a.useRef(null),c=a.useState({embeddedCheckout:null}),y=ae(c,2),f=y[0],S=y[1];a.useEffect(function(){if(!(s.current||u.current)){var k=function(j){s.current||u.current||(s.current=j,u.current=s.current.initEmbeddedCheckout(r).then(function(P){S({embeddedCheckout:P})}))};i.tag==="async"&&!s.current&&(r.clientSecret||r.fetchClientSecret)?i.stripePromise.then(function(E){E&&k(E)}):i.tag==="sync"&&!s.current&&(r.clientSecret||r.fetchClientSecret)&&k(i.stripe)}},[i,r,f,s]),a.useEffect(function(){return function(){f.embeddedCheckout?(u.current=null,f.embeddedCheckout.destroy()):u.current&&u.current.then(function(){u.current=null,f.embeddedCheckout&&f.embeddedCheckout.destroy()})}},[f.embeddedCheckout]),a.useEffect(function(){Ke(s)},[s]);var m=Y(t);a.useEffect(function(){m!==null&&m!==t&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[m,t]);var h=Y(r);return a.useEffect(function(){if(h!=null){if(r==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}r.clientSecret===void 0&&r.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),h.clientSecret!=null&&r.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.fetchClientSecret!=null&&r.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.onComplete!=null&&r.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),h.onShippingDetailsChange!=null&&r.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),h.onLineItemsChange!=null&&r.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[h,r]),a.createElement(F.Provider,{value:f},o)},Qe=function(e){var t=e.id,r=e.className,o=de(),i=o.embeddedCheckout,u=a.useRef(!1),s=a.useRef(null);return a.useLayoutEffect(function(){return!u.current&&i&&s.current!==null&&(i.mount(s.current),u.current=!0),function(){if(u.current&&i)try{i.unmount(),u.current=!1}catch{}}},[i]),a.createElement("div",{ref:s,id:t,className:r})},Ze=function(e){var t=e.id,r=e.className;return de(),a.createElement("div",{id:t,className:r})},et=l?Ze:Qe;p("auBankAccount",l);p("card",l);p("cardNumber",l);p("cardExpiry",l);p("cardCvc",l);p("fpxBank",l);p("iban",l);p("idealBank",l);p("p24Bank",l);p("epsBank",l);p("payment",l);p("expressCheckout",l);p("currencySelector",l);p("paymentRequestButton",l);p("linkAuthentication",l);p("address",l);p("shippingAddress",l);p("paymentMethodMessaging",l);p("affirmMessage",l);p("afterpayClearpayMessage",l);let M=null;function tt(){return M||(M=Ue(ke.stripePublishableKey)),M}function it({clientSecret:n,onComplete:e}){const t=be.useMemo(()=>({clientSecret:n,onComplete:e}),[n,e]);return W.jsx("div",{className:"stripe-embed",children:W.jsx(Xe,{stripe:tt(),options:t,children:W.jsx(et,{})})})}export{it as RealCheckout,it as default};
@@ -0,0 +1 @@
1
+ import{j as s,d as _,b as x,N as j}from"./react-E8ng6RF2.js";import{d as v,W as h,x as t,c as r}from"./index-MxzGamB6.js";import{s as N}from"./wallet-kind-B3ypFsr7.js";import"./ethers-BxoDGoYp.js";function g(){return s.jsxs("div",{className:"success-anim",role:"img","aria-label":"Purchase successful",children:[s.jsxs("svg",{className:"success-anim__svg",viewBox:"0 0 120 120",children:[s.jsx("circle",{className:"success-anim__ring",cx:"60",cy:"60",r:"54"}),s.jsx("path",{className:"success-anim__check",d:"M37 61 l16 16 l30 -34"})]}),s.jsx("span",{className:"success-anim__spark success-anim__spark--1","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--2","aria-hidden":!0,children:"✦"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--3","aria-hidden":!0,children:"◈"}),s.jsx("span",{className:"success-anim__spark success-anim__spark--4","aria-hidden":!0,children:"✦"})]})}const b=r.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",f=r.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function k(e){return e.itemId?`urn:decentraland:${r.chainId===80002?"amoy":"matic"}:collections-v2:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function E(){const{state:e}=_(),o=x(),{session:a}=v(),n=(e==null?void 0:e.items)??[];if(n.length===0)return s.jsx(j,{to:"/assets",replace:!0});const c=n[0],d=(a==null?void 0:a.address)??"default",l=c.category==="emote",m=l?[]:n.map(k).filter(i=>!!i),u=e==null?void 0:e.txHash,p=!!u&&N(a==null?void 0:a.providerType);return s.jsxs("div",{className:"success",children:[s.jsx("div",{className:"success__preview",children:m.length>0?s.jsx(h,{profile:d,urns:m,type:t.PreviewType.AVATAR,emote:t.PreviewEmote.FASHION,background:"ecebed",dev:r.chainId===80002},c.id):s.jsx(h,{contractAddress:c.contractAddress,tokenId:c.tokenId??void 0,itemId:c.tokenId?void 0:c.itemId??void 0,profile:d,type:l?void 0:t.PreviewType.AVATAR,emote:l?void 0:t.PreviewEmote.FASHION,background:"ecebed",dev:r.chainId===80002},c.id)}),s.jsxs("div",{className:"success__panel",children:[s.jsx(g,{}),s.jsx("h1",{className:"success__title",children:"It’s yours!"}),n.length===1?s.jsxs("p",{className:"success__sub",children:[s.jsx("strong",{children:c.name})," is now in your wardrobe."]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"success__sub",children:[n.length," items are now in your wardrobe."]}),s.jsx("ul",{className:"success__list",children:n.map(i=>s.jsx("li",{children:i.name},i.id))})]}),s.jsxs("div",{className:"success__links",children:[s.jsx("button",{className:"success__receipt",onClick:()=>o("/my-purchases"),children:"View order"}),p?s.jsx("a",{className:"success__receipt",href:`${f}${u}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null]}),s.jsxs("div",{className:"success__actions",children:[s.jsx("a",{className:"btn btn--purple",href:b,target:"_blank",rel:"noreferrer",children:"Use it in-world"}),s.jsx("button",{className:"btn btn--ghost",onClick:()=>o("/assets"),children:"Keep shopping"})]})]})]})}export{E as Success,E as default};
@@ -1 +1 @@
1
- import{p as G}from"./ethers-g2M4Ny1y.js";import{b as I,i as z,w as Y,T as K,h as W,j as k,r as x,l as H,m as j,g as Q,a as q,u as J,_ as X,c as Z,d as D,e as tt,s as et}from"./generateUtilityClasses-Bkw0uvCo.js";import{r as h,j as $}from"./react-DwvsoSSx.js";function nt(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?U.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?U.STAGING:t.endsWith(".io")||t.endsWith(".zone")?U.DEVELOPMENT:null}function ot(e){const t=new URLSearchParams(e.search),n=t.get("ENV")||t.get("env");if(n){const a=n.toLowerCase();if(F(a))return a}return null}var y={},U;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(U||(U={}));function w(){return Object.values(U)}function F(e){return w().includes(e)}function g(e){if(F(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${w().map(t=>`"${t}"`).join(", ")}.`)}function at(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:n,VITE_DCL_DEFAULT_ENV:a,GATSBY_DCL_DEFAULT_ENV:o}=e;if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&a&&t!==a)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&o&&t!==o)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(n&&o&&n!==o)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?g(t):n?g(n):a?g(a):o?g(o):U.PRODUCTION}function rt(e){if(typeof window<"u"){const n=ot(window.location);if(n)return n;const a=nt(window.location);if(a)return a}return at(typeof G=="object"&&typeof y=="object"?y:e)}function st(e,t){const n=rt(t==null?void 0:t.systemEnvVariables),a=e[n];return{get:(o,r="")=>{if(!a)throw new Error(`Could not find a config for env=${n}`);return o in a?a[o]:r},is:o=>n===o,getEnv:()=>n}}const ct="https://wearable-preview.decentraland.zone",dt="https://decentraland.zone/account",_t="https://decentraland.zone/profile",lt="https://decentraland.zone/marketplace",Rt="https://decentraland.zone/builder",Lt="https://decentraland.zone/dao",Et="https://decentraland.zone/governance",Ut="https://decentraland.zone/events",it="https://decentraland.zone/places",pt="https://decentraland.org/create/",Tt="https://docs.decentraland.org/player/",At="https://decentraland.zone/download/creator-hub/",ht="https://decentraland.zone/download/",St="https://decentraland.zone/download_success/",Ot="ea2ybdmmn1kv",Nt="master",Ct="18g1DzIyBxvu0steSwKyQr",ut="https://cms.decentraland.org",gt="https://decentraland.zone/marketplace/names/claim",Dt="https://decentraland.zone/marketplace/lands",mt="https://decentraland.zone/marketplace/account",It="https://decentraland.zone/create/",ft="https://studios.decentraland.zone/",vt="https://decentraland.zone/builder/collections",Pt="https://decentraland.zone/builder/names",$t="https://decentraland.zone/builder/worlds?tab=dcl",yt="https://decentraland.zone/builder/land",bt="https://decentraland.zone/events/me/",Bt="https://decentraland.zone/places/favorites/",Vt="https://docs.decentraland.org/player/",wt="https://docs.decentraland.org/creator/",Ft="https://decentraland.zone/blog/",Mt="https://docs.decentraland.org/contributor/",Gt="https://decentraland.zone/governance/transparency/",zt="https://decentraland.zone/governance/proposals/",Yt="https://decentraland.zone/dao/grants/",Kt="https://decentraland.zone/governance/projects/",Wt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",kt="https://decentraland.zone/marketplace/settings",xt="https://dcl.gg/discord",Ht="https://reddit.com/r/decentraland",jt="https://github.com/decentraland",Qt="https://x.com/decentraland",qt="https://instagram.com/decentraland_foundation/",Jt="https://youtube.com/@decentraland_foundation",Xt="https://tiktok.com/@decentraland_fdn",Zt="https://linkedin.com/company/decentralandorg",te="https://decentraland.zone/privacy",ee="https://decentraland.zone/terms",ne="https://decentraland.zone/content",oe="https://decentraland.zone/ethics",ae="https://decentraland.org/help",re="mailto:hello@decentraland.org",se="https://docs.decentraland.org/faqs/decentraland-101",ce="https://docs.decentraland.org",de="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",_e="https://download-gateway.decentraland.zone",le="https://decentraland.zone/top-scenes",Re="https://testflight.apple.com/join/KF4r3jlU",Le="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Ee={WEARABLE_PREVIEW_URL:ct,ACCOUNT_URL:dt,PROFILE_URL:_t,MARKETPLACE_URL:lt,BUILDER_URL:Rt,DAO_URL:Lt,GOVERNANCE_URL:Et,EVENTS_URL:Ut,PLACES_URL:it,CREATE_URL:pt,LEARN_URL:Tt,CREATOR_HUB_URL:At,DOWNLOAD_URL:ht,DOWNLOAD_SUCCESS_URL:St,CONTENTFUL_SPACE_ID:Ot,CONTENTFUL_ENV:Nt,CONTENTFUL_NAVBAR_ENTRY_ID:Ct,CONTENTFUL_CONTENTFUL_CDN_URL:ut,MARKETPLACE_NAMES_URL:gt,MARKETPLACE_LANDS_URL:Dt,MARKETPLACE_MY_ASSETS_URL:mt,LANDING_CREATORS_URL:It,STUDIOS_URL:ft,BUILDER_WEARABLE_EMOTES_URL:vt,BUILDER_NAMES_URL:Pt,BUILDER_WORLDS_URL:$t,BUILDER_LAND_URL:yt,EVENTS_MY_EVENTS:bt,PLACES_MY_FAVORITE_URL:Bt,DOCS_ABOUT_URL:Vt,DOCS_CREATORS_URL:wt,BLOG_URL:Ft,DOCS_CONTRIBUTOR_URL:Mt,GOVERNANCE_TRANSPARENCY_URL:Gt,GOVERNANCE_PROPOSALS_URL:zt,DAO_GRANTS_URL:Yt,GOVERNANCE_PROJECTS_URL:Kt,DOCS_DAO_URL:Wt,MARKETPLACE_SETTINGS_URL:kt,DISCORD_URL:xt,REDDIT_URL:Ht,GITHUB_URL:jt,X_URL:Qt,INSTAGRAM_URL:qt,YOUTUBE_URL:Jt,TIKTOK_URL:Xt,LINKEDIN_URL:Zt,PRIVACY_POLICY_URL:te,TERMS_OF_USE_URL:ee,CONTENT_POLICY_URL:ne,CODE_OF_ETHICS_URL:oe,SUPPORT_URL:ae,EMAIL_HELLO_URL:re,FAQ_URL:se,DOCS_URL:ce,BEEHIV_SUBSCRIPTION_URL:de,AUTO_SIGNING_BASE_URL:_e,TOP_SCENES_URL:le,IOS_STORE_URL:Re,ANDROID_STORE_URL:Le},Ue="https://wearable-preview.decentraland.org",ie="https://decentraland.org/account",pe="https://decentraland.org/profile",Te="https://decentraland.org/marketplace",Ae="https://decentraland.org/builder",he="https://decentraland.org/dao",Se="https://decentraland.org/governance",Oe="https://decentraland.org/events",Ne="https://decentraland.org/places",Ce="https://decentraland.org/create/",ue="https://docs.decentraland.org/player/",ge="https://decentraland.org/download/creator-hub/",De="https://decentraland.org/download/",me="https://decentraland.org/download_success/",Ie="ea2ybdmmn1kv",fe="master",ve="18g1DzIyBxvu0steSwKyQr",Pe="https://cms.decentraland.org",$e="https://decentraland.org/marketplace/names/claim",ye="https://decentraland.org/marketplace/lands",be="https://decentraland.org/marketplace/account",Be="https://decentraland.org/create/",Ve="https://studios.decentraland.org/",we="https://decentraland.org/builder/collections",Fe="https://decentraland.org/builder/names",Me="https://decentraland.org/builder/worlds?tab=dcl",Ge="https://decentraland.org/builder/land",ze="https://decentraland.org/events/me/",Ye="https://decentraland.org/places/favorites/",Ke="https://docs.decentraland.org/player/",We="https://docs.decentraland.org/creator/",ke="https://decentraland.org/blog/",xe="https://docs.decentraland.org/contributor/",He="https://decentraland.org/governance/transparency/",je="https://decentraland.org/governance/proposals/",Qe="https://decentraland.org/dao/grants/",qe="https://decentraland.org/governance/projects/",Je="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Xe="https://decentraland.org/marketplace/settings",Ze="https://dcl.gg/discord",tn="https://reddit.com/r/decentraland",en="https://github.com/decentraland",nn="https://x.com/decentraland",on="https://instagram.com/decentraland_foundation/",an="https://youtube.com/@decentraland_foundation",rn="https://tiktok.com/@decentraland_fdn",sn="https://linkedin.com/company/decentralandorg",cn="https://decentraland.org/privacy",dn="https://decentraland.org/terms",_n="https://decentraland.org/content",ln="https://decentraland.org/ethics",Rn="https://decentraland.org/help",Ln="mailto:hello@decentraland.org",En="https://docs.decentraland.org/faqs/decentraland-101",Un="https://docs.decentraland.org",pn="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",Tn="https://download-gateway.decentraland.org",An="https://decentraland.org/top-scenes",hn="https://testflight.apple.com/join/KF4r3jlU",Sn="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",On={WEARABLE_PREVIEW_URL:Ue,ACCOUNT_URL:ie,PROFILE_URL:pe,MARKETPLACE_URL:Te,BUILDER_URL:Ae,DAO_URL:he,GOVERNANCE_URL:Se,EVENTS_URL:Oe,PLACES_URL:Ne,CREATE_URL:Ce,LEARN_URL:ue,CREATOR_HUB_URL:ge,DOWNLOAD_URL:De,DOWNLOAD_SUCCESS_URL:me,CONTENTFUL_SPACE_ID:Ie,CONTENTFUL_ENV:fe,CONTENTFUL_NAVBAR_ENTRY_ID:ve,CONTENTFUL_CONTENTFUL_CDN_URL:Pe,MARKETPLACE_NAMES_URL:$e,MARKETPLACE_LANDS_URL:ye,MARKETPLACE_MY_ASSETS_URL:be,LANDING_CREATORS_URL:Be,STUDIOS_URL:Ve,BUILDER_WEARABLE_EMOTES_URL:we,BUILDER_NAMES_URL:Fe,BUILDER_WORLDS_URL:Me,BUILDER_LAND_URL:Ge,EVENTS_MY_EVENTS:ze,PLACES_MY_FAVORITE_URL:Ye,DOCS_ABOUT_URL:Ke,DOCS_CREATORS_URL:We,BLOG_URL:ke,DOCS_CONTRIBUTOR_URL:xe,GOVERNANCE_TRANSPARENCY_URL:He,GOVERNANCE_PROPOSALS_URL:je,DAO_GRANTS_URL:Qe,GOVERNANCE_PROJECTS_URL:qe,DOCS_DAO_URL:Je,MARKETPLACE_SETTINGS_URL:Xe,DISCORD_URL:Ze,REDDIT_URL:tn,GITHUB_URL:en,X_URL:nn,INSTAGRAM_URL:on,YOUTUBE_URL:an,TIKTOK_URL:rn,LINKEDIN_URL:sn,PRIVACY_POLICY_URL:cn,TERMS_OF_USE_URL:dn,CONTENT_POLICY_URL:_n,CODE_OF_ETHICS_URL:ln,SUPPORT_URL:Rn,EMAIL_HELLO_URL:Ln,FAQ_URL:En,DOCS_URL:Un,BEEHIV_SUBSCRIPTION_URL:pn,AUTO_SIGNING_BASE_URL:Tn,TOP_SCENES_URL:An,IOS_STORE_URL:hn,ANDROID_STORE_URL:Sn},Nn="https://wearable-preview.decentraland.today",Cn="https://decentraland.today/account",un="https://decentraland.today/profile",gn="https://decentraland.today/marketplace",Dn="https://decentraland.today/builder",mn="https://decentraland.today/dao",In="https://decentraland.today/governance",fn="https://decentraland.zone/events",vn="https://decentraland.zone/places",Pn="https://decentraland.today/create/",$n="https://docs.decentraland.org/player/",yn="https://decentraland.today/download/creator-hub/",bn="https://decentraland.today/download/",Bn="https://decentraland.today/download_success/",Vn="ea2ybdmmn1kv",wn="master",Fn="18g1DzIyBxvu0steSwKyQr",Mn="https://cms.decentraland.org",Gn="https://decentraland.today/marketplace/names/claim",zn="https://decentraland.today/marketplace/lands",Yn="https://decentraland.today/marketplace/account",Kn="https://decentraland.today/create/",Wn="https://studios.decentraland.today/",kn="https://decentraland.today/builder/collections",xn="https://decentraland.today/builder/names",Hn="https://decentraland.today/builder/worlds?tab=dcl",jn="https://decentraland.today/builder/land",Qn="https://decentraland.today/events/me/",qn="https://decentraland.today/places/favorites/",Jn="https://docs.decentraland.org/player/",Xn="https://docs.decentraland.org/creator/",Zn="https://decentraland.today/blog/",to="https://docs.decentraland.org/contributor/",eo="https://decentraland.today/governance/transparency/",no="https://decentraland.today/governance/proposals/",oo="https://decentraland.today/dao/grants/",ao="https://decentraland.today/governance/projects/",ro="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",so="https://decentraland.today/marketplace/settings",co="https://dcl.gg/discord",_o="https://reddit.com/r/decentraland",lo="https://github.com/decentraland",Ro="https://x.com/decentraland",Lo="https://instagram.com/decentraland_foundation/",Eo="https://youtube.com/@decentraland_foundation",Uo="https://tiktok.com/@decentraland_fdn",io="https://linkedin.com/company/decentralandorg",po="https://decentraland.org/privacy",To="https://decentraland.org/terms",Ao="https://decentraland.org/content",ho="https://decentraland.org/ethics",So="https://decentraland.org/help",Oo="mailto:hello@decentraland.org",No="https://docs.decentraland.org/faqs/decentraland-101",Co="https://docs.decentraland.org",uo="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",go="https://download-gateway.decentraland.zone",Do="https://decentraland.zone/top-scenes",mo="https://testflight.apple.com/join/KF4r3jlU",Io="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",fo={WEARABLE_PREVIEW_URL:Nn,ACCOUNT_URL:Cn,PROFILE_URL:un,MARKETPLACE_URL:gn,BUILDER_URL:Dn,DAO_URL:mn,GOVERNANCE_URL:In,EVENTS_URL:fn,PLACES_URL:vn,CREATE_URL:Pn,LEARN_URL:$n,CREATOR_HUB_URL:yn,DOWNLOAD_URL:bn,DOWNLOAD_SUCCESS_URL:Bn,CONTENTFUL_SPACE_ID:Vn,CONTENTFUL_ENV:wn,CONTENTFUL_NAVBAR_ENTRY_ID:Fn,CONTENTFUL_CONTENTFUL_CDN_URL:Mn,MARKETPLACE_NAMES_URL:Gn,MARKETPLACE_LANDS_URL:zn,MARKETPLACE_MY_ASSETS_URL:Yn,LANDING_CREATORS_URL:Kn,STUDIOS_URL:Wn,BUILDER_WEARABLE_EMOTES_URL:kn,BUILDER_NAMES_URL:xn,BUILDER_WORLDS_URL:Hn,BUILDER_LAND_URL:jn,EVENTS_MY_EVENTS:Qn,PLACES_MY_FAVORITE_URL:qn,DOCS_ABOUT_URL:Jn,DOCS_CREATORS_URL:Xn,BLOG_URL:Zn,DOCS_CONTRIBUTOR_URL:to,GOVERNANCE_TRANSPARENCY_URL:eo,GOVERNANCE_PROPOSALS_URL:no,DAO_GRANTS_URL:oo,GOVERNANCE_PROJECTS_URL:ao,DOCS_DAO_URL:ro,MARKETPLACE_SETTINGS_URL:so,DISCORD_URL:co,REDDIT_URL:_o,GITHUB_URL:lo,X_URL:Ro,INSTAGRAM_URL:Lo,YOUTUBE_URL:Eo,TIKTOK_URL:Uo,LINKEDIN_URL:io,PRIVACY_POLICY_URL:po,TERMS_OF_USE_URL:To,CONTENT_POLICY_URL:Ao,CODE_OF_ETHICS_URL:ho,SUPPORT_URL:So,EMAIL_HELLO_URL:Oo,FAQ_URL:No,DOCS_URL:Co,BEEHIV_SUBSCRIPTION_URL:uo,AUTO_SIGNING_BASE_URL:go,TOP_SCENES_URL:Do,IOS_STORE_URL:mo,ANDROID_STORE_URL:Io},Ko=st({[U.DEVELOPMENT]:Ee,[U.STAGING]:fo,[U.PRODUCTION]:On});var vo=z,Po=function(t){return t!=="theme"},b=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?vo:Po},B=function(t,n,a){var o;if(n){var r=n.shouldForwardProp;o=t.__emotion_forwardProp&&r?function(l){return t.__emotion_forwardProp(l)&&r(l)}:r}return typeof o!="function"&&a&&(o=t.__emotion_forwardProp),o},$o=function(t){var n=t.cache,a=t.serialized,o=t.isStringTag;return x(n,a,o),H(function(){return j(n,a,o)}),null},yo=function e(t,n){var a=t.__emotion_real===t,o=a&&t.__emotion_base||t,r,l;n!==void 0&&(r=n.label,l=n.target);var L=B(t,n,a),A=L||b(o),i=!A("as");return function(){var R=arguments,c=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(r!==void 0&&c.push("label:"+r+";"),R[0]==null||R[0].raw===void 0)c.push.apply(c,R);else{var E=R[0];c.push(E[0]);for(var T=R.length,_=1;_<T;_++)c.push(R[_],E[_])}var d=Y(function(s,p,O){var m=i&&s.as||o,S="",f=[],N=s;if(s.theme==null){N={};for(var v in s)N[v]=s[v];N.theme=h.useContext(K)}typeof s.className=="string"?S=W(p.registered,f,s.className):s.className!=null&&(S=s.className+" ");var P=k(c.concat(f),p.registered,N);S+=p.key+"-"+P.name,l!==void 0&&(S+=" "+l);var M=i&&L===void 0?b(m):A,C={};for(var u in s)i&&u==="as"||M(u)&&(C[u]=s[u]);return C.className=S,O&&(C.ref=O),h.createElement(h.Fragment,null,h.createElement($o,{cache:p,serialized:P,isStringTag:typeof m=="string"}),h.createElement(m,C))});return d.displayName=r!==void 0?r:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=o,d.__emotion_styles=c,d.__emotion_forwardProp=L,Object.defineProperty(d,"toString",{value:function(){return"."+l}}),d.withComponent=function(s,p){var O=e(s,I({},n,p,{shouldForwardProp:B(d,p,!0)}));return O.apply(void 0,c)},d}},bo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],V=yo.bind(null);bo.forEach(function(e){V[e]=V(e)});function Bo(e){return Q("MuiSvgIcon",e)}q("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Vo=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],wo=e=>{const{color:t,fontSize:n,classes:a}=e,o={root:["root",t!=="inherit"&&`color${D(t)}`,`fontSize${D(n)}`]};return tt(o,Bo,a)},Fo=et("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${D(n.color)}`],t[`fontSize${D(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,a,o,r,l,L,A,i,R,c,E,T,_;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(a=n.create)==null?void 0:a.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((r=e.typography)==null||(l=r.pxToRem)==null?void 0:l.call(r,20))||"1.25rem",medium:((L=e.typography)==null||(A=L.pxToRem)==null?void 0:A.call(L,24))||"1.5rem",large:((i=e.typography)==null||(R=i.pxToRem)==null?void 0:R.call(i,35))||"2.1875rem"}[t.fontSize],color:(c=(E=(e.vars||e).palette)==null||(E=E[t.color])==null?void 0:E.main)!=null?c:{action:(T=(e.vars||e).palette)==null||(T=T.action)==null?void 0:T.active,disabled:(_=(e.vars||e).palette)==null||(_=_.action)==null?void 0:_.disabled,inherit:void 0}[t.color]}}),Mo=h.forwardRef(function(t,n){const a=J({props:t,name:"MuiSvgIcon"}),{children:o,className:r,color:l="inherit",component:L="svg",fontSize:A="medium",htmlColor:i,inheritViewBox:R=!1,titleAccess:c,viewBox:E="0 0 24 24"}=a,T=X(a,Vo),_=h.isValidElement(o)&&o.type==="svg",d=I({},a,{color:l,component:L,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:R,viewBox:E,hasSvgAsChild:_}),s={};R||(s.viewBox=E);const p=wo(d);return $.jsxs(Fo,I({as:L,className:Z(p.root,r),focusable:"false",color:i,"aria-hidden":c?void 0:!0,role:c?"img":void 0,ref:n},s,T,_&&o.props,{ownerState:d,children:[_?o.props.children:o,c?$.jsx("title",{children:c}):null]}))});Mo.muiName="SvgIcon";export{Mo as S,Ko as c,V as n};
1
+ import{p as G}from"./ethers-BxoDGoYp.js";import{b as I,i as z,w as Y,T as K,h as W,j as k,r as x,l as H,m as j,g as Q,a as q,u as J,_ as X,c as Z,d as D,e as tt,s as et}from"./generateUtilityClasses-sji8XAMf.js";import{r as h,j as $}from"./react-E8ng6RF2.js";function nt(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?U.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?U.STAGING:t.endsWith(".io")||t.endsWith(".zone")?U.DEVELOPMENT:null}function ot(e){const t=new URLSearchParams(e.search),n=t.get("ENV")||t.get("env");if(n){const a=n.toLowerCase();if(F(a))return a}return null}var y={},U;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(U||(U={}));function w(){return Object.values(U)}function F(e){return w().includes(e)}function g(e){if(F(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${w().map(t=>`"${t}"`).join(", ")}.`)}function at(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:n,VITE_DCL_DEFAULT_ENV:a,GATSBY_DCL_DEFAULT_ENV:o}=e;if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&a&&t!==a)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&o&&t!==o)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(n&&o&&n!==o)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?g(t):n?g(n):a?g(a):o?g(o):U.PRODUCTION}function rt(e){if(typeof window<"u"){const n=ot(window.location);if(n)return n;const a=nt(window.location);if(a)return a}return at(typeof G=="object"&&typeof y=="object"?y:e)}function st(e,t){const n=rt(t==null?void 0:t.systemEnvVariables),a=e[n];return{get:(o,r="")=>{if(!a)throw new Error(`Could not find a config for env=${n}`);return o in a?a[o]:r},is:o=>n===o,getEnv:()=>n}}const ct="https://wearable-preview.decentraland.zone",dt="https://decentraland.zone/account",_t="https://decentraland.zone/profile",lt="https://decentraland.zone/marketplace",Rt="https://decentraland.zone/builder",Lt="https://decentraland.zone/dao",Et="https://decentraland.zone/governance",Ut="https://decentraland.zone/events",it="https://decentraland.zone/places",pt="https://decentraland.org/create/",Tt="https://docs.decentraland.org/player/",At="https://decentraland.zone/download/creator-hub/",ht="https://decentraland.zone/download/",St="https://decentraland.zone/download_success/",Ot="ea2ybdmmn1kv",Nt="master",Ct="18g1DzIyBxvu0steSwKyQr",ut="https://cms.decentraland.org",gt="https://decentraland.zone/marketplace/names/claim",Dt="https://decentraland.zone/marketplace/lands",mt="https://decentraland.zone/marketplace/account",It="https://decentraland.zone/create/",ft="https://studios.decentraland.zone/",vt="https://decentraland.zone/builder/collections",Pt="https://decentraland.zone/builder/names",$t="https://decentraland.zone/builder/worlds?tab=dcl",yt="https://decentraland.zone/builder/land",bt="https://decentraland.zone/events/me/",Bt="https://decentraland.zone/places/favorites/",Vt="https://docs.decentraland.org/player/",wt="https://docs.decentraland.org/creator/",Ft="https://decentraland.zone/blog/",Mt="https://docs.decentraland.org/contributor/",Gt="https://decentraland.zone/governance/transparency/",zt="https://decentraland.zone/governance/proposals/",Yt="https://decentraland.zone/dao/grants/",Kt="https://decentraland.zone/governance/projects/",Wt="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",kt="https://decentraland.zone/marketplace/settings",xt="https://dcl.gg/discord",Ht="https://reddit.com/r/decentraland",jt="https://github.com/decentraland",Qt="https://x.com/decentraland",qt="https://instagram.com/decentraland_foundation/",Jt="https://youtube.com/@decentraland_foundation",Xt="https://tiktok.com/@decentraland_fdn",Zt="https://linkedin.com/company/decentralandorg",te="https://decentraland.zone/privacy",ee="https://decentraland.zone/terms",ne="https://decentraland.zone/content",oe="https://decentraland.zone/ethics",ae="https://decentraland.org/help",re="mailto:hello@decentraland.org",se="https://docs.decentraland.org/faqs/decentraland-101",ce="https://docs.decentraland.org",de="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",_e="https://download-gateway.decentraland.zone",le="https://decentraland.zone/top-scenes",Re="https://testflight.apple.com/join/KF4r3jlU",Le="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",Ee={WEARABLE_PREVIEW_URL:ct,ACCOUNT_URL:dt,PROFILE_URL:_t,MARKETPLACE_URL:lt,BUILDER_URL:Rt,DAO_URL:Lt,GOVERNANCE_URL:Et,EVENTS_URL:Ut,PLACES_URL:it,CREATE_URL:pt,LEARN_URL:Tt,CREATOR_HUB_URL:At,DOWNLOAD_URL:ht,DOWNLOAD_SUCCESS_URL:St,CONTENTFUL_SPACE_ID:Ot,CONTENTFUL_ENV:Nt,CONTENTFUL_NAVBAR_ENTRY_ID:Ct,CONTENTFUL_CONTENTFUL_CDN_URL:ut,MARKETPLACE_NAMES_URL:gt,MARKETPLACE_LANDS_URL:Dt,MARKETPLACE_MY_ASSETS_URL:mt,LANDING_CREATORS_URL:It,STUDIOS_URL:ft,BUILDER_WEARABLE_EMOTES_URL:vt,BUILDER_NAMES_URL:Pt,BUILDER_WORLDS_URL:$t,BUILDER_LAND_URL:yt,EVENTS_MY_EVENTS:bt,PLACES_MY_FAVORITE_URL:Bt,DOCS_ABOUT_URL:Vt,DOCS_CREATORS_URL:wt,BLOG_URL:Ft,DOCS_CONTRIBUTOR_URL:Mt,GOVERNANCE_TRANSPARENCY_URL:Gt,GOVERNANCE_PROPOSALS_URL:zt,DAO_GRANTS_URL:Yt,GOVERNANCE_PROJECTS_URL:Kt,DOCS_DAO_URL:Wt,MARKETPLACE_SETTINGS_URL:kt,DISCORD_URL:xt,REDDIT_URL:Ht,GITHUB_URL:jt,X_URL:Qt,INSTAGRAM_URL:qt,YOUTUBE_URL:Jt,TIKTOK_URL:Xt,LINKEDIN_URL:Zt,PRIVACY_POLICY_URL:te,TERMS_OF_USE_URL:ee,CONTENT_POLICY_URL:ne,CODE_OF_ETHICS_URL:oe,SUPPORT_URL:ae,EMAIL_HELLO_URL:re,FAQ_URL:se,DOCS_URL:ce,BEEHIV_SUBSCRIPTION_URL:de,AUTO_SIGNING_BASE_URL:_e,TOP_SCENES_URL:le,IOS_STORE_URL:Re,ANDROID_STORE_URL:Le},Ue="https://wearable-preview.decentraland.org",ie="https://decentraland.org/account",pe="https://decentraland.org/profile",Te="https://decentraland.org/marketplace",Ae="https://decentraland.org/builder",he="https://decentraland.org/dao",Se="https://decentraland.org/governance",Oe="https://decentraland.org/events",Ne="https://decentraland.org/places",Ce="https://decentraland.org/create/",ue="https://docs.decentraland.org/player/",ge="https://decentraland.org/download/creator-hub/",De="https://decentraland.org/download/",me="https://decentraland.org/download_success/",Ie="ea2ybdmmn1kv",fe="master",ve="18g1DzIyBxvu0steSwKyQr",Pe="https://cms.decentraland.org",$e="https://decentraland.org/marketplace/names/claim",ye="https://decentraland.org/marketplace/lands",be="https://decentraland.org/marketplace/account",Be="https://decentraland.org/create/",Ve="https://studios.decentraland.org/",we="https://decentraland.org/builder/collections",Fe="https://decentraland.org/builder/names",Me="https://decentraland.org/builder/worlds?tab=dcl",Ge="https://decentraland.org/builder/land",ze="https://decentraland.org/events/me/",Ye="https://decentraland.org/places/favorites/",Ke="https://docs.decentraland.org/player/",We="https://docs.decentraland.org/creator/",ke="https://decentraland.org/blog/",xe="https://docs.decentraland.org/contributor/",He="https://decentraland.org/governance/transparency/",je="https://decentraland.org/governance/proposals/",Qe="https://decentraland.org/dao/grants/",qe="https://decentraland.org/governance/projects/",Je="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",Xe="https://decentraland.org/marketplace/settings",Ze="https://dcl.gg/discord",tn="https://reddit.com/r/decentraland",en="https://github.com/decentraland",nn="https://x.com/decentraland",on="https://instagram.com/decentraland_foundation/",an="https://youtube.com/@decentraland_foundation",rn="https://tiktok.com/@decentraland_fdn",sn="https://linkedin.com/company/decentralandorg",cn="https://decentraland.org/privacy",dn="https://decentraland.org/terms",_n="https://decentraland.org/content",ln="https://decentraland.org/ethics",Rn="https://decentraland.org/help",Ln="mailto:hello@decentraland.org",En="https://docs.decentraland.org/faqs/decentraland-101",Un="https://docs.decentraland.org",pn="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",Tn="https://download-gateway.decentraland.org",An="https://decentraland.org/top-scenes",hn="https://testflight.apple.com/join/KF4r3jlU",Sn="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",On={WEARABLE_PREVIEW_URL:Ue,ACCOUNT_URL:ie,PROFILE_URL:pe,MARKETPLACE_URL:Te,BUILDER_URL:Ae,DAO_URL:he,GOVERNANCE_URL:Se,EVENTS_URL:Oe,PLACES_URL:Ne,CREATE_URL:Ce,LEARN_URL:ue,CREATOR_HUB_URL:ge,DOWNLOAD_URL:De,DOWNLOAD_SUCCESS_URL:me,CONTENTFUL_SPACE_ID:Ie,CONTENTFUL_ENV:fe,CONTENTFUL_NAVBAR_ENTRY_ID:ve,CONTENTFUL_CONTENTFUL_CDN_URL:Pe,MARKETPLACE_NAMES_URL:$e,MARKETPLACE_LANDS_URL:ye,MARKETPLACE_MY_ASSETS_URL:be,LANDING_CREATORS_URL:Be,STUDIOS_URL:Ve,BUILDER_WEARABLE_EMOTES_URL:we,BUILDER_NAMES_URL:Fe,BUILDER_WORLDS_URL:Me,BUILDER_LAND_URL:Ge,EVENTS_MY_EVENTS:ze,PLACES_MY_FAVORITE_URL:Ye,DOCS_ABOUT_URL:Ke,DOCS_CREATORS_URL:We,BLOG_URL:ke,DOCS_CONTRIBUTOR_URL:xe,GOVERNANCE_TRANSPARENCY_URL:He,GOVERNANCE_PROPOSALS_URL:je,DAO_GRANTS_URL:Qe,GOVERNANCE_PROJECTS_URL:qe,DOCS_DAO_URL:Je,MARKETPLACE_SETTINGS_URL:Xe,DISCORD_URL:Ze,REDDIT_URL:tn,GITHUB_URL:en,X_URL:nn,INSTAGRAM_URL:on,YOUTUBE_URL:an,TIKTOK_URL:rn,LINKEDIN_URL:sn,PRIVACY_POLICY_URL:cn,TERMS_OF_USE_URL:dn,CONTENT_POLICY_URL:_n,CODE_OF_ETHICS_URL:ln,SUPPORT_URL:Rn,EMAIL_HELLO_URL:Ln,FAQ_URL:En,DOCS_URL:Un,BEEHIV_SUBSCRIPTION_URL:pn,AUTO_SIGNING_BASE_URL:Tn,TOP_SCENES_URL:An,IOS_STORE_URL:hn,ANDROID_STORE_URL:Sn},Nn="https://wearable-preview.decentraland.today",Cn="https://decentraland.today/account",un="https://decentraland.today/profile",gn="https://decentraland.today/marketplace",Dn="https://decentraland.today/builder",mn="https://decentraland.today/dao",In="https://decentraland.today/governance",fn="https://decentraland.zone/events",vn="https://decentraland.zone/places",Pn="https://decentraland.today/create/",$n="https://docs.decentraland.org/player/",yn="https://decentraland.today/download/creator-hub/",bn="https://decentraland.today/download/",Bn="https://decentraland.today/download_success/",Vn="ea2ybdmmn1kv",wn="master",Fn="18g1DzIyBxvu0steSwKyQr",Mn="https://cms.decentraland.org",Gn="https://decentraland.today/marketplace/names/claim",zn="https://decentraland.today/marketplace/lands",Yn="https://decentraland.today/marketplace/account",Kn="https://decentraland.today/create/",Wn="https://studios.decentraland.today/",kn="https://decentraland.today/builder/collections",xn="https://decentraland.today/builder/names",Hn="https://decentraland.today/builder/worlds?tab=dcl",jn="https://decentraland.today/builder/land",Qn="https://decentraland.today/events/me/",qn="https://decentraland.today/places/favorites/",Jn="https://docs.decentraland.org/player/",Xn="https://docs.decentraland.org/creator/",Zn="https://decentraland.today/blog/",to="https://docs.decentraland.org/contributor/",eo="https://decentraland.today/governance/transparency/",no="https://decentraland.today/governance/proposals/",oo="https://decentraland.today/dao/grants/",ao="https://decentraland.today/governance/projects/",ro="https://docs.decentraland.org/player/general/dao/overview/what-is-the-dao/",so="https://decentraland.today/marketplace/settings",co="https://dcl.gg/discord",_o="https://reddit.com/r/decentraland",lo="https://github.com/decentraland",Ro="https://x.com/decentraland",Lo="https://instagram.com/decentraland_foundation/",Eo="https://youtube.com/@decentraland_foundation",Uo="https://tiktok.com/@decentraland_fdn",io="https://linkedin.com/company/decentralandorg",po="https://decentraland.org/privacy",To="https://decentraland.org/terms",Ao="https://decentraland.org/content",ho="https://decentraland.org/ethics",So="https://decentraland.org/help",Oo="mailto:hello@decentraland.org",No="https://docs.decentraland.org/faqs/decentraland-101",Co="https://docs.decentraland.org",uo="https://embeds.beehiiv.com/ff89783d-748b-4ba3-8700-4759f6f62831?slim=true",go="https://download-gateway.decentraland.zone",Do="https://decentraland.zone/top-scenes",mo="https://testflight.apple.com/join/KF4r3jlU",Io="https://play.google.com/store/apps/details?id=org.decentraland.godotexplorer",fo={WEARABLE_PREVIEW_URL:Nn,ACCOUNT_URL:Cn,PROFILE_URL:un,MARKETPLACE_URL:gn,BUILDER_URL:Dn,DAO_URL:mn,GOVERNANCE_URL:In,EVENTS_URL:fn,PLACES_URL:vn,CREATE_URL:Pn,LEARN_URL:$n,CREATOR_HUB_URL:yn,DOWNLOAD_URL:bn,DOWNLOAD_SUCCESS_URL:Bn,CONTENTFUL_SPACE_ID:Vn,CONTENTFUL_ENV:wn,CONTENTFUL_NAVBAR_ENTRY_ID:Fn,CONTENTFUL_CONTENTFUL_CDN_URL:Mn,MARKETPLACE_NAMES_URL:Gn,MARKETPLACE_LANDS_URL:zn,MARKETPLACE_MY_ASSETS_URL:Yn,LANDING_CREATORS_URL:Kn,STUDIOS_URL:Wn,BUILDER_WEARABLE_EMOTES_URL:kn,BUILDER_NAMES_URL:xn,BUILDER_WORLDS_URL:Hn,BUILDER_LAND_URL:jn,EVENTS_MY_EVENTS:Qn,PLACES_MY_FAVORITE_URL:qn,DOCS_ABOUT_URL:Jn,DOCS_CREATORS_URL:Xn,BLOG_URL:Zn,DOCS_CONTRIBUTOR_URL:to,GOVERNANCE_TRANSPARENCY_URL:eo,GOVERNANCE_PROPOSALS_URL:no,DAO_GRANTS_URL:oo,GOVERNANCE_PROJECTS_URL:ao,DOCS_DAO_URL:ro,MARKETPLACE_SETTINGS_URL:so,DISCORD_URL:co,REDDIT_URL:_o,GITHUB_URL:lo,X_URL:Ro,INSTAGRAM_URL:Lo,YOUTUBE_URL:Eo,TIKTOK_URL:Uo,LINKEDIN_URL:io,PRIVACY_POLICY_URL:po,TERMS_OF_USE_URL:To,CONTENT_POLICY_URL:Ao,CODE_OF_ETHICS_URL:ho,SUPPORT_URL:So,EMAIL_HELLO_URL:Oo,FAQ_URL:No,DOCS_URL:Co,BEEHIV_SUBSCRIPTION_URL:uo,AUTO_SIGNING_BASE_URL:go,TOP_SCENES_URL:Do,IOS_STORE_URL:mo,ANDROID_STORE_URL:Io},Ko=st({[U.DEVELOPMENT]:Ee,[U.STAGING]:fo,[U.PRODUCTION]:On});var vo=z,Po=function(t){return t!=="theme"},b=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?vo:Po},B=function(t,n,a){var o;if(n){var r=n.shouldForwardProp;o=t.__emotion_forwardProp&&r?function(l){return t.__emotion_forwardProp(l)&&r(l)}:r}return typeof o!="function"&&a&&(o=t.__emotion_forwardProp),o},$o=function(t){var n=t.cache,a=t.serialized,o=t.isStringTag;return x(n,a,o),H(function(){return j(n,a,o)}),null},yo=function e(t,n){var a=t.__emotion_real===t,o=a&&t.__emotion_base||t,r,l;n!==void 0&&(r=n.label,l=n.target);var L=B(t,n,a),A=L||b(o),i=!A("as");return function(){var R=arguments,c=a&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(r!==void 0&&c.push("label:"+r+";"),R[0]==null||R[0].raw===void 0)c.push.apply(c,R);else{var E=R[0];c.push(E[0]);for(var T=R.length,_=1;_<T;_++)c.push(R[_],E[_])}var d=Y(function(s,p,O){var m=i&&s.as||o,S="",f=[],N=s;if(s.theme==null){N={};for(var v in s)N[v]=s[v];N.theme=h.useContext(K)}typeof s.className=="string"?S=W(p.registered,f,s.className):s.className!=null&&(S=s.className+" ");var P=k(c.concat(f),p.registered,N);S+=p.key+"-"+P.name,l!==void 0&&(S+=" "+l);var M=i&&L===void 0?b(m):A,C={};for(var u in s)i&&u==="as"||M(u)&&(C[u]=s[u]);return C.className=S,O&&(C.ref=O),h.createElement(h.Fragment,null,h.createElement($o,{cache:p,serialized:P,isStringTag:typeof m=="string"}),h.createElement(m,C))});return d.displayName=r!==void 0?r:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",d.defaultProps=t.defaultProps,d.__emotion_real=d,d.__emotion_base=o,d.__emotion_styles=c,d.__emotion_forwardProp=L,Object.defineProperty(d,"toString",{value:function(){return"."+l}}),d.withComponent=function(s,p){var O=e(s,I({},n,p,{shouldForwardProp:B(d,p,!0)}));return O.apply(void 0,c)},d}},bo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],V=yo.bind(null);bo.forEach(function(e){V[e]=V(e)});function Bo(e){return Q("MuiSvgIcon",e)}q("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Vo=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],wo=e=>{const{color:t,fontSize:n,classes:a}=e,o={root:["root",t!=="inherit"&&`color${D(t)}`,`fontSize${D(n)}`]};return tt(o,Bo,a)},Fo=et("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${D(n.color)}`],t[`fontSize${D(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,a,o,r,l,L,A,i,R,c,E,T,_;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(a=n.create)==null?void 0:a.call(n,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((r=e.typography)==null||(l=r.pxToRem)==null?void 0:l.call(r,20))||"1.25rem",medium:((L=e.typography)==null||(A=L.pxToRem)==null?void 0:A.call(L,24))||"1.5rem",large:((i=e.typography)==null||(R=i.pxToRem)==null?void 0:R.call(i,35))||"2.1875rem"}[t.fontSize],color:(c=(E=(e.vars||e).palette)==null||(E=E[t.color])==null?void 0:E.main)!=null?c:{action:(T=(e.vars||e).palette)==null||(T=T.action)==null?void 0:T.active,disabled:(_=(e.vars||e).palette)==null||(_=_.action)==null?void 0:_.disabled,inherit:void 0}[t.color]}}),Mo=h.forwardRef(function(t,n){const a=J({props:t,name:"MuiSvgIcon"}),{children:o,className:r,color:l="inherit",component:L="svg",fontSize:A="medium",htmlColor:i,inheritViewBox:R=!1,titleAccess:c,viewBox:E="0 0 24 24"}=a,T=X(a,Vo),_=h.isValidElement(o)&&o.type==="svg",d=I({},a,{color:l,component:L,fontSize:A,instanceFontSize:t.fontSize,inheritViewBox:R,viewBox:E,hasSvgAsChild:_}),s={};R||(s.viewBox=E);const p=wo(d);return $.jsxs(Fo,I({as:L,className:Z(p.root,r),focusable:"false",color:i,"aria-hidden":c?void 0:!0,role:c?"img":void 0,ref:n},s,T,_&&o.props,{ownerState:d,children:[_?o.props.children:o,c?$.jsx("title",{children:c}):null]}))});Mo.muiName="SvgIcon";export{Mo as S,Ko as c,V as n};