@dcl/shop 0.1.0-29527153652.commit-d2eebfa → 0.1.0-29584116670.commit-7b991d9

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 (229) hide show
  1. package/assets/{AnimatedBackground-BtDeGtuY.js → AnimatedBackground-B9Pw1kge.js} +1 -1
  2. package/assets/Assets-FsQDhPLn.js +1 -0
  3. package/assets/Cart-BezIJz77.js +1 -0
  4. package/assets/Cart-C612IvK3.css +1 -0
  5. package/assets/{CircularProgress-3Y_POW5D.js → CircularProgress-BGTYLSVF.js} +5 -5
  6. package/assets/Collection-X9hhX-Rz.js +1 -0
  7. package/assets/{ConstantsUtil-BTo1-KgH.js → ConstantsUtil-BL7ODi4n.js} +1 -1
  8. package/assets/{ContentClient-CEkpPq6Z.js → ContentClient-XY1tEPuy.js} +1 -1
  9. package/assets/Creator-DK5t63LO.js +1 -0
  10. package/assets/CssVarsProvider-CxQAolcH.js +24 -0
  11. package/assets/{DeploymentBuilder-DPr-ptgp.js → DeploymentBuilder-C9YxIsXI.js} +1 -1
  12. package/assets/{ExchangeController-D4CpJ8kl.js → ExchangeController-BPeo8fj3.js} +1 -1
  13. package/assets/GetCredits-X4PI-ku7.js +1 -0
  14. package/assets/{HelpersUtil-BeiA-N3I.js → HelpersUtil-DUakraTi.js} +1 -1
  15. package/assets/ImportListings-8eKbca2b.js +1 -0
  16. package/assets/ItemDetail-C31uL9qN.css +1 -0
  17. package/assets/ItemDetail-CreYcWa4.js +2 -0
  18. package/assets/{LoadMore-DsKzH4Rv.js → LoadMore-Borbhtjd.js} +1 -1
  19. package/assets/MyAssets-C9v-DUMQ.js +1 -0
  20. package/assets/{MyFavorites-B6ImIszd.js → MyFavorites-Di5_hT1d.js} +1 -1
  21. package/assets/{MyPurchases-BH0keZsh.js → MyPurchases-qrWgZ9ZY.js} +1 -1
  22. package/assets/{NetworkUtil-DInevqnn.js → NetworkUtil-bxmjbsdp.js} +1 -1
  23. package/assets/NotFound-Co_hmXY9.js +1 -0
  24. package/assets/{StoreSettings-C66yF7xF.js → StoreSettings-Cle2P_Dp.js} +1 -1
  25. package/assets/Success-CdecfFR-.js +1 -0
  26. package/assets/{SwapController-fK7v6beM.js → SwapController-D31BIXvU.js} +1 -1
  27. package/assets/{TradeService-BYjElQ_J.js → TradeService-VoevqRD7.js} +1 -1
  28. package/assets/{W3MFrameProviderSingleton-BvT93_mb.js → W3MFrameProviderSingleton-C3ngIw23.js} +3 -3
  29. package/assets/{WebCryptoP256-lk8Phz0j.js → WebCryptoP256-DKJaSk24.js} +1 -1
  30. package/assets/{basic-DLKrLmdo.js → basic-ZT38cLV3.js} +1 -1
  31. package/assets/{biconomy-7wiec39b.js → biconomy-A8N4_tES.js} +1 -1
  32. package/assets/{browser-9oFjBwrz.js → browser-7Z6Tx7yC.js} +1 -1
  33. package/assets/{browser-ponyfill-DMgE6PM5.js → browser-ponyfill-C_hn4Jen.js} +1 -1
  34. package/assets/browser-ponyfill-iWQHRc9C.js +1 -0
  35. package/assets/buy-DCyi2TCj.js +1 -0
  36. package/assets/{buy-gasless-CFOJz7EI.js → buy-gasless-CgSRLXqb.js} +1 -1
  37. package/assets/cart-checkout-Bl-9Rmuy.js +1 -0
  38. package/assets/categories-CAhRovwN.js +1 -0
  39. package/assets/categories-CBvVTfQE.css +1 -0
  40. package/assets/{ccip-Dgzo1FXe.js → ccip-C3eSvUSX.js} +1 -1
  41. package/assets/{ccip-DNX1aV6c.js → ccip-f8kMMqoC.js} +1 -1
  42. package/assets/{chains-BQ5Swd2q.js → chains-D4mXFh-0.js} +1 -1
  43. package/assets/collection-mQvOrKnG.js +1 -0
  44. package/assets/colors-LINLm1ux.js +1 -0
  45. package/assets/{common-CBPtpBt7.js → common-Bq3lgphe.js} +1 -1
  46. package/assets/{controller-16-J3O8L.js → controller-Bo7JkTt3.js} +2 -2
  47. package/assets/{core-DXuYXUj1.js → core-DSbh2F_2.js} +4 -4
  48. package/assets/{custom-BTyOEs9D.js → custom-DCy5VCfZ.js} +1 -1
  49. package/assets/{data-capture-DQHZCQ9R.js → data-capture-CaGo1PxF.js} +1 -1
  50. package/assets/{decimals-DKkXzXLC.js → decimals-4fS10X_L.js} +1 -1
  51. package/assets/decimals-DY9F9u4r.js +1 -0
  52. package/assets/{detectExtension-Wqss5tRf.js → detectExtension-BE4V-7e-.js} +1 -1
  53. package/assets/{email-BA8oF4Sb.js → email-BGxNiLrQ.js} +1 -1
  54. package/assets/{embedded-wallet-CmR3JoQA.js → embedded-wallet-DfdKfc0a.js} +1 -1
  55. package/assets/emotion-styled.browser.esm-C2X3f31i.js +1 -0
  56. package/assets/{engine-D7X1-7M_.js → engine-BaNurLKk.js} +1 -1
  57. package/assets/{estimate-l1-fee-mP34fdnr.js → estimate-l1-fee-CDwQNanq.js} +1 -1
  58. package/assets/eth_estimateGas-DJGaFjHN.js +1 -0
  59. package/assets/{eth_getStorageAt-CcAHGbyZ.js → eth_getStorageAt-B2TJaBLZ.js} +1 -1
  60. package/assets/eth_getTransactionCount-DH8Lt3om.js +1 -0
  61. package/assets/{ethereum-CD3dxaW_.js → ethereum-dj4CvyL9.js} +1 -1
  62. package/assets/{ethers-DwWf2RqE.js → ethers-BZNCwGB1.js} +1 -1
  63. package/assets/{extractIPFS-ptBh3aqV.js → extractIPFS-MFYkzgfw.js} +1 -1
  64. package/assets/{features-Dadqu3Gy.js → features-BVZ7jwMo.js} +1 -1
  65. package/assets/{fetchTokenMetadata-Yjbzq3OX.js → fetchTokenMetadata-Df-8ebIh.js} +2 -2
  66. package/assets/{fortmatic-DhmlcDbL.js → fortmatic-udOxQk4J.js} +1 -1
  67. package/assets/get-ecosystem-wallet-info-BYGhhdDR.js +1 -0
  68. package/assets/{getBalance-CcpUJJbb.js → getBalance-CiOU_KSA.js} +2 -2
  69. package/assets/{getInstalledModules-B29UYWwx.js → getInstalledModules-CK2r6Us9.js} +1 -1
  70. package/assets/{getNFT-C8XHKgBR.js → getNFT-CsrwIavu.js} +1 -1
  71. package/assets/{getNFT-DRamL_wJ.js → getNFT-uxrgnO16.js} +2 -2
  72. package/assets/getOverlayAlpha-DIkhrJTf.js +1 -0
  73. package/assets/{hashTypedData-BRhQ_lPd.js → hashTypedData-BeKO9Gph.js} +1 -1
  74. package/assets/{hashTypedData-B8qJCKv2.js → hashTypedData-D7G_pwf8.js} +1 -1
  75. package/assets/{import-C0KzuCTc.js → import-w6IYTyx9.js} +1 -1
  76. package/assets/{in-app-wallet-calls-BMeL3YV4.js → in-app-wallet-calls-BmNgoKoi.js} +1 -1
  77. package/assets/{index-BWmqibNa.js → index-0_Q-5Yph.js} +1 -1
  78. package/assets/{index-B3ocNsJt.js → index-7ugDLFZa.js} +2 -2
  79. package/assets/{index-BxnBUVzy.js → index-B2VBWa02.js} +1 -1
  80. package/assets/{index-ByM1xTND.js → index-B54Zm0IT.js} +1 -1
  81. package/assets/index-BMwA__hl.js +1 -0
  82. package/assets/{index-DNGhO1UM.js → index-BY0majDU.js} +1 -1
  83. package/assets/{index-CJQuE4Vh.js → index-BkvyQrui.js} +1 -1
  84. package/assets/{index-Df8IehzX.js → index-BnfRTjdt.js} +2 -2
  85. package/assets/{index-BiY5ZJ1L.js → index-Bp3ufdYu.js} +1 -1
  86. package/assets/index-BsYYLNpm.js +1 -0
  87. package/assets/{index-DkIBv-8E.js → index-BxwA4vLu.js} +1 -1
  88. package/assets/{index-BsFR4koq.js → index-ByU7K3c5.js} +1 -1
  89. package/assets/{index-Bz7fb3vC.js → index-C0cRipMv.js} +1 -1
  90. package/assets/{index-Czt6tP80.js → index-C0w8Y7Pr.js} +1 -1
  91. package/assets/{index-CjpJ162L.js → index-C1wLfrk8.js} +1 -1
  92. package/assets/{index-CG-dA0rF.js → index-C7pz3G7b.js} +1 -1
  93. package/assets/{index-D4UonDIb.js → index-CBmf80G9.js} +3 -3
  94. package/assets/{index-CGecUMNA.js → index-CPz55u4g.js} +1 -1
  95. package/assets/{index-DfyoH385.js → index-C_QZ68es.js} +1 -1
  96. package/assets/{index-DvmI6WZg.js → index-Ci9R2pAr.js} +1 -1
  97. package/assets/{index-CYZw7sLz.js → index-CiID_KCu.js} +1 -1
  98. package/assets/index-CiMPT_Ro.js +1 -0
  99. package/assets/{index-Dp3Py-Ws.js → index-Cq0eRfqs.js} +1 -1
  100. package/assets/{index-BL5vFwJv.js → index-Csqh-gdI.js} +1 -1
  101. package/assets/{index-BxFWKJ00.js → index-CzJC68I6.js} +1 -1
  102. package/assets/{index-Df6T9jlW.js → index-D-2T01Jr.js} +1 -1
  103. package/assets/{index-Dex_bJg1.js → index-D2PwoM0f.js} +1 -1
  104. package/assets/index-D2idpE6X.css +1 -0
  105. package/assets/{index-rfcI92-3.js → index-D32umKam.js} +1 -1
  106. package/assets/{index-DOk2P7Zl.js → index-D5kLlKQU.js} +1 -1
  107. package/assets/{index-iYlfzQJZ.js → index-D8CfAsn6.js} +3 -3
  108. package/assets/index-DEFc7rHy.js +74 -0
  109. package/assets/{index-DVAVXeLV.js → index-DF7PMIfD.js} +3 -3
  110. package/assets/{index-CrKpXY-Z.js → index-DHF4L8Ec.js} +1 -1
  111. package/assets/{index-D2HgI4Mu.js → index-DJd0Ttfu.js} +1 -1
  112. package/assets/{index-Cd5vM2Jh.js → index-DQ2RZxO2.js} +1 -1
  113. package/assets/{index-DGIRcK5n.js → index-DWYIiSc1.js} +1 -1
  114. package/assets/{index-CXOpVxKU.js → index-DZeAExGv.js} +1 -1
  115. package/assets/{index-sr7QrKQZ.js → index-DitpCD_h.js} +1 -1
  116. package/assets/{index-DFGIa8d3.js → index-DjnVWlwG.js} +1 -1
  117. package/assets/{index-C1AneBnm.js → index-Dk1_26DS.js} +1 -1
  118. package/assets/{index-CUe6g2db.js → index-DpbmEoKi.js} +1 -1
  119. package/assets/{index-EYxoPD15.js → index-Ds4wBJ9D.js} +1 -1
  120. package/assets/{index-BpmLS8_h.js → index-DvCjqrZB.js} +1 -1
  121. package/assets/{index-kA7_bUnK.js → index-DxQ4Zi7k.js} +1 -1
  122. package/assets/{index-BtK9ZDTb.js → index-Dxs_0mDk.js} +1 -1
  123. package/assets/{index-DVG9WYtE.js → index-DzzaizOc.js} +1 -1
  124. package/assets/{index-BCzwAhbN.js → index-E-7ReSrK.js} +1 -1
  125. package/assets/index-FLQXl_Se.js +2 -0
  126. package/assets/{index-BSOhCppl.js → index-HirbVXiG.js} +2 -2
  127. package/assets/{index-DeBofuPQ.js → index-NtR9tB0O.js} +1 -1
  128. package/assets/{index-BmHevYxh.js → index-OBTfAbI2.js} +1 -1
  129. package/assets/{index-DT90wIp1.js → index-VtK5IfsQ.js} +1 -1
  130. package/assets/index-W4B_IWIP.js +103 -0
  131. package/assets/{index-CuwAAEkV.js → index-Z5yFLCBO.js} +1 -1
  132. package/assets/{index-C5nVlEYH.js → index-ZLecI7pg.js} +1 -1
  133. package/assets/{index-By6STTNb.js → index-_MXYcG3h.js} +1 -1
  134. package/assets/{index-Dqw_U4li.js → index-aZDU5Fi_.js} +1 -1
  135. package/assets/{index-EiHJjF_U.js → index-fQoyXaDm.js} +1 -1
  136. package/assets/{index-t67nymVk.js → index-ge5YPyFz.js} +1 -1
  137. package/assets/{index-Dl9lo-Tk.js → index-goOeCklY.js} +1 -1
  138. package/assets/{index-BuUSB4r5.js → index-kaNpKyjd.js} +1 -1
  139. package/assets/{index-_heiRLxG.js → index-kcVdtF2N.js} +1 -1
  140. package/assets/{index-Iapi1Q6R.js → index-mpn87Y1d.js} +1 -1
  141. package/assets/{index-CEeQH9eo.js → index-o7U3KUfn.js} +2 -2
  142. package/assets/{index.es-DsvM4XzW.js → index.es-C2HPR15G.js} +4 -4
  143. package/assets/{index.es-DHouqHFo.js → index.es-CJCMJluv.js} +1 -1
  144. package/assets/{index.es-BnHkek_2.js → index.es-KdBFnvI-.js} +1 -1
  145. package/assets/{localBatchGatewayRequest-Cmn1dfqz.js → localBatchGatewayRequest-o3WN89Be.js} +1 -1
  146. package/assets/{mana-rate-DObImZN2.js → mana-rate-brJZyjav.js} +1 -1
  147. package/assets/{native-B49T_qnV.js → native-BS4RJIkv.js} +1 -1
  148. package/assets/network-DkheBt26.js +1 -0
  149. package/assets/{networks-D1cCGfqG.js → networks-DhDaelkG.js} +1 -1
  150. package/assets/{onramp-Dj3OMdJa.js → onramp-DPhEOHlt.js} +1 -1
  151. package/assets/{openzeppelin-jmYZOwb-.js → openzeppelin-BlzaCD2g.js} +1 -1
  152. package/assets/{ownerOf-Cg8vrCG0.js → ownerOf-FaMMoQLm.js} +1 -1
  153. package/assets/{parseNft-DQjOfM3E.js → parseNft-D4_DbJgc.js} +2 -2
  154. package/assets/{parseSignature-BhGVGyy8.js → parseSignature-CP7LKJ4p.js} +1 -1
  155. package/assets/{parseSignature-D-2KGIjo.js → parseSignature-lw07DHDL.js} +3 -3
  156. package/assets/{pay-with-exchange-D7uxTE5e.js → pay-with-exchange-CBQcsvWb.js} +1 -1
  157. package/assets/payments-DJNklmWA.js +1 -0
  158. package/assets/{qr-overlay-ASsJZZn5.js → qr-overlay-BhLZ2pHm.js} +3 -3
  159. package/assets/{react-C51i12iP.js → react-BMZSDQJw.js} +1 -1
  160. package/assets/{receive--EqYLwG2.js → receive-BOuIH1ov.js} +1 -1
  161. package/assets/{resolveImplementation-DyRnucGw.js → resolveImplementation-CedBj6Km.js} +1 -1
  162. package/assets/resume-buy-Bf0zIH7y.js +1 -0
  163. package/assets/{rpc-CjcTpc0V.js → rpc-SuxnpJNf.js} +1 -1
  164. package/assets/{secp256k1-QnclhqY7.js → secp256k1-Bp72qBlb.js} +1 -1
  165. package/assets/{secp256k1-C3pUvKM8.js → secp256k1-DGcDefMZ.js} +1 -1
  166. package/assets/{secp256k1-CuYcQbK2.js → secp256k1-DUCs4Szw.js} +1 -1
  167. package/assets/{send-CH7qei4t.js → send-Cc73qyEa.js} +1 -1
  168. package/assets/{send-batch-transaction-Cr5kGUem.js → send-batch-transaction-CqMxMLal.js} +1 -1
  169. package/assets/{send-eip712-transaction-DNEzCZTW.js → send-eip712-transaction-Ba7gc6Na.js} +2 -2
  170. package/assets/{send-gasless-transaction-BnwvR3f6.js → send-gasless-transaction-Bkq9RgVC.js} +2 -2
  171. package/assets/{sendRawTransaction-BIHxQG44.js → sendRawTransaction-jimkH_Vk.js} +3 -3
  172. package/assets/{serializeTransaction-DbiNVef8.js → serializeTransaction-B4_qo8zw.js} +1 -1
  173. package/assets/{session-proposal-DvE_C2Qm.js → session-proposal-OqodD00Z.js} +1 -1
  174. package/assets/{session-request-DF5W14aH.js → session-request-X9CJVkkE.js} +2 -2
  175. package/assets/{sha256-DhQnMvgr.js → sha256-BbyKZ-d_.js} +1 -1
  176. package/assets/{signing-BChtQR_k.js → signing-CyLHhd-P.js} +5 -5
  177. package/assets/{socials-ibz-qcug.js → socials-LFY_yxPF.js} +1 -1
  178. package/assets/{swaps-D5GQ3VUK.js → swaps-BdY-zWwk.js} +1 -1
  179. package/assets/{thirdweb-CaDKinrI.js → thirdweb-BR0EhpSm.js} +3 -3
  180. package/assets/{totalSupply-DaG75TVX.js → totalSupply-B_MUJcfB.js} +1 -1
  181. package/assets/trade-encoding-BOT9-UWu.js +1 -0
  182. package/assets/{transactionReceipt-DVjUNlv8.js → transactionReceipt-D4B3HzeC.js} +1 -1
  183. package/assets/{transactions-DN5Djj2C.js → transactions-B6cGdLdV.js} +1 -1
  184. package/assets/{useInfiniteGrid-BeqyJL-J.js → useInfiniteGrid-BK47MfTg.js} +1 -1
  185. package/assets/useStore-CgLb6TAk.js +2 -0
  186. package/assets/useTheme-0gLXH6kA.js +1 -0
  187. package/assets/useTheme-BSc7aqCZ.js +1 -0
  188. package/assets/{utils-rl7KiNyp.js → utils-DAnGDyuB.js} +1 -1
  189. package/assets/{verifyHash-C2MKzB9x.js → verifyHash-CnPKc_YI.js} +1 -1
  190. package/assets/{w3m-modal-JCjAaYVQ.js → w3m-modal-DPallRNX.js} +1 -1
  191. package/assets/{w3m-modal-Bpc7iV--.js → w3m-modal-N4vv62zw.js} +1 -1
  192. package/assets/{wait-for-tx-receipt-4J-SfEVn.js → wait-for-tx-receipt-D4Q553BP.js} +1 -1
  193. package/assets/{wallet-kind-DmRQR63L.js → wallet-kind-Bio8Yuti.js} +1 -1
  194. package/assets/{wallets-CH6ovtsY.js → wallets-D-H2dLAA.js} +6 -6
  195. package/assets/{web-connector-fZY0b-3_.js → web-connector-BhqHMVXD.js} +3 -3
  196. package/assets/{writeContract-D6AcaE27.js → writeContract-sZ9-DuTE.js} +1 -1
  197. package/assets/{zora-sepolia-Cmu9LYjr.js → zora-sepolia-Jfao6Y6c.js} +1 -1
  198. package/assets/{zoraTestnet-CHyjVmWt.js → zoraTestnet-UB0HXnxi.js} +1 -1
  199. package/index.html +8 -8
  200. package/package.json +2 -2
  201. package/assets/Assets-CicnCRkP.js +0 -1
  202. package/assets/Cart-bywt8_CL.js +0 -1
  203. package/assets/Collection-C4oILWgm.js +0 -1
  204. package/assets/Creator-C4puJP6z.js +0 -1
  205. package/assets/GetCredits-gEfRJgGT.js +0 -1
  206. package/assets/ImportListings-DgevLbSo.js +0 -1
  207. package/assets/ItemDetail--AzXh8S2.css +0 -1
  208. package/assets/ItemDetail-DFD_2ZeC.js +0 -2
  209. package/assets/MyAssets-C_jVBeCP.js +0 -1
  210. package/assets/NotFound-BUwRH5h0.js +0 -1
  211. package/assets/Success-B2aNqHp6.js +0 -1
  212. package/assets/browser-ponyfill-Djb5Py6a.js +0 -1
  213. package/assets/buy-DIwWkpJJ.js +0 -1
  214. package/assets/categories-DYe3ZXtu.js +0 -1
  215. package/assets/categories-FoGfjyVm.css +0 -1
  216. package/assets/collection-BHilCUwH.js +0 -1
  217. package/assets/decimals-DWEHw5Cf.js +0 -1
  218. package/assets/emotion-styled.browser.esm-hMeaJLB-.js +0 -1
  219. package/assets/eth_estimateGas-hNSxz4co.js +0 -1
  220. package/assets/eth_getTransactionCount-kHoTdsNW.js +0 -1
  221. package/assets/get-ecosystem-wallet-info-BHxUH0sn.js +0 -1
  222. package/assets/index-BPiKxEfw.js +0 -1
  223. package/assets/index-BcX-FSIU.css +0 -1
  224. package/assets/index-Bh8SuC59.js +0 -74
  225. package/assets/index-C0kv5kHB.js +0 -103
  226. package/assets/index-DH3Yzbz3.js +0 -1
  227. package/assets/network-S_CrOtw4.js +0 -1
  228. package/assets/trade-encoding-3-fY1Skv.js +0 -1
  229. package/assets/useStore-BgEatlVS.js +0 -2
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.zone/" />
17
17
 
18
18
  <!-- Favicon: the Decentraland mark (same as the marketplace). -->
19
- <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/apple-touch-icon.png" />
21
21
  <meta name="apple-mobile-web-app-title" content="DCL Shop" />
22
- <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/site.webmanifest" />
23
23
 
24
24
  <!-- Open Graph -->
25
25
  <meta property="og:type" content="website" />
@@ -48,7 +48,7 @@
48
48
  <meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
49
49
 
50
50
  <!-- Sitemap -->
51
- <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,10 +60,10 @@
60
60
  <link rel="preconnect" href="https://wearable-preview.decentraland.org" />
61
61
  <link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
62
62
  <link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
63
- <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/assets/index-C0kv5kHB.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/assets/react-C51i12iP.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/assets/ethers-DwWf2RqE.js">
66
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/assets/index-BcX-FSIU.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/index-W4B_IWIP.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/react-BMZSDQJw.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/ethers-BZNCwGB1.js">
66
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29584116670.commit-7b991d9/assets/index-D2idpE6X.css">
67
67
  </head>
68
68
  <body>
69
69
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-29527153652.commit-d2eebfa",
3
+ "version": "0.1.0-29584116670.commit-7b991d9",
4
4
  "main": "index.js",
5
5
  "author": "Decentraland",
6
6
  "license": "Apache-2.0",
@@ -8,5 +8,5 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/shop.git"
10
10
  },
11
- "commit": "d2eebfa4c90bf3e64b0bd4dd7e07f9619217fe6b"
11
+ "commit": "7b991d9e70020a2daa28e69dfae3b54b41cb1e42"
12
12
  }
@@ -1 +0,0 @@
1
- import{u as xe,r as t,j as e,b as be}from"./react-C51i12iP.js";import{b as ye,e as z,a as je,m as ge,n as se,d as Ne,j as ve,x as Ce,E as A,v as E,D as V,z as D,C as w,a7 as H,q as ke,s as Y,A as J,a8 as we}from"./index-C0kv5kHB.js";import{r as Se,a as G,m as Ie}from"./mana-rate-DObImZN2.js";import{S as X,C as Me,R as Ee,F as Pe,a as Z,b as Fe}from"./categories-DYe3ZXtu.js";import{L as Re}from"./LoadMore-DsKzH4Rv.js";import{a as ee}from"./buy-DIwWkpJJ.js";import{g as Ae,a as Le,w as qe,S as We,G as Te}from"./buy-gasless-CFOJz7EI.js";import{u as Oe}from"./useInfiniteGrid-BeqyJL-J.js";import"./ethers-DwWf2RqE.js";import"./index-t67nymVk.js";import"./trade-encoding-3-fY1Skv.js";function Ue(){return ye({queryKey:["mana-rate",z.chainId],queryFn:()=>Se(z.chainId),staleTime:6e4,refetchInterval:6e4,retry:1})}function ae(s){const d=s,m=(d.message??"").toLowerCase();return d.code===4001||m.includes("reject")||m.includes("denied")||m.includes("cancel")?"You cancelled the request.":m.includes("insufficient")?`Not enough ${Y.name} — get more first.`:m.includes("not found")||m.includes("no active listing")||m.includes("404")?"This item was just sold or removed. Refreshing the market…":m.includes("your own listing")?"You can't buy your own listing.":"Couldn't complete checkout — please try again."}function $e(s){return{id:s.tradeId,tradeId:s.tradeId,name:s.name,creator:s.creator,contractAddress:s.contractAddress,itemId:s.itemId,category:s.category,wearableCategory:s.wearableCategory??void 0,rarity:s.rarity,network:s.network,chainId:s.chainId,thumbnail:s.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function Be({listing:s,rate:d,onClose:m,onSold:v}){const{session:n}=je(),{data:c,isError:P}=ge(n),_=se(),F=xe(),[C,y]=t.useState("confirm"),[j,S]=t.useState("Locking today’s price…"),[g,I]=t.useState(null),[r,$]=t.useState(null),u=t.useRef(null),k=Math.ceil(G(s.manaWei,d)/10);t.useEffect(()=>{let b=!1;if(!n){y("error"),I("Sign in to check out.");return}return(async()=>{try{const i=await Ne(s.tradeId);if(!i)throw new Error("not found");if(ve(i,n.address))throw new Error("You can't buy your own listing.");const l=G(s.manaWei,d);if(!Number.isFinite(l)||l<=0)throw new Error("price unavailable");const{credit:h,maxCreditedValue:L,usdCents:f}=await Ce(n.identity,l,s.tradeId);if(b){A(n.identity,[h.id]).catch(()=>{});return}u.current=h.id,$({trade:i,credit:h,maxCreditedValue:L,usdCents:f,credits:Math.ceil(f/10)}),S("")}catch(i){if(b)return;console.error("[market] authorize failed",i),E(D(i)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:V(i),value_usd:Math.round(G(s.manaWei,d))/100}),y("error"),I(ae(i))}})(),()=>{b=!0,u.current&&n&&(A(n.identity,[u.current]).catch(()=>{}),u.current=null)}},[]);const M=!!r&&c!=null&&c.credits<r.credits;async function R(){if(!n||!r)return;if(M){E("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:r.credits,credits_balance:(c==null?void 0:c.credits)??0,shortfall:Math.max(0,r.credits-((c==null?void 0:c.credits)??0))}),A(n.identity,[r.credit.id]).catch(()=>{}),u.current=null,F("/credits");return}y("working"),I(null);let b=!1;try{S("Confirming your purchase…");const i={trade:r.trade,buyer:n.address,signer:n.signer,credits:[r.credit],maxCreditedValue:r.maxCreditedValue};let l;if(Ae())try{l=await Le(i),await qe(l),b=!0}catch(h){if(h instanceof We)b=!0;else if(h instanceof Te)l=await ee(i);else throw h}else l=await ee(i);u.current=null,E("Shop Completed Purchase",{items:[{item_id:s.itemId??null,contract_address:s.contractAddress,token_id:null,price_usd:r.usdCents/100}],value_credits:r.credits,value_usd:r.usdCents/100,purchase_type:"item",is_primary:!0,payment_type:"credits",no_crypto_step:b,transaction_hash:l??null}),_.invalidateQueries({queryKey:["usd-balance"]}),F("/success",{state:{items:[$e(s)],txHash:l}})}catch(i){console.error("[market] buy now failed",i),A(n.identity,[r.credit.id]).catch(()=>{}),u.current=null,E(D(i)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:V(i),value_usd:r.usdCents/100}),_.invalidateQueries({queryKey:["usd-balance"]});const l=ae(i);I(l),y("error"),/sold or removed/i.test(l)&&v()}}function x(){n&&r&&A(n.identity,[r.credit.id]).catch(()=>{}),u.current=null,m()}const p=C==="working";return e.jsxs("div",{className:"mkt-modal",role:"dialog","aria-modal":"true","aria-label":`Buy ${s.name}`,children:[e.jsx("div",{className:"mkt-modal__scrim",onClick:p?void 0:x,"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:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{children:[e.jsx("div",{className:"mkt-modal__name",title:s.name,children:s.name||"Item"}),e.jsx("span",{className:"chip chip--rarity",children:s.rarity})]})]}),e.jsx("div",{className:"mkt-modal__price",children:r?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(w,{className:"mkt-modal__diamond"}),H(r.credits)]}),e.jsxs("div",{className:"mkt-modal__price-sub muted",children:["Locked for this purchase · $",(r.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(w,{className:"mkt-modal__diamond"}),H(k)]}),e.jsx("div",{className:"mkt-modal__price-sub muted",children:j||"Locking today’s price…"})]})}),n?e.jsxs("div",{className:"mkt-modal__balance muted",children:["Your balance: ",e.jsx(w,{className:"ccy-mark"})," ",ke(c,P)]}):null,M?e.jsxs("p",{className:"muted mkt-modal__note",children:["You’ll need a few more ",Y.name," to buy this."]}):null,j&&C==="working"?e.jsx("p",{className:"muted mkt-modal__note",children:j}):null,g?e.jsx("p",{className:"error mkt-modal__note",children:g}):null,e.jsxs("div",{className:"mkt-modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:x,disabled:p,children:"Cancel"}),e.jsx("button",{className:"btn btn--purple",onClick:R,disabled:p||!r,children:p?"Buying…":M?`Get ${Y.name}`:"Confirm purchase"})]})]})]})}const Ge=48,N=1e5;function Ye(s){return{tradeId:s.tradeId??s.id,listingType:"primary",contractAddress:s.contractAddress,itemId:s.itemId??"",name:s.name,thumbnail:s.thumbnail,rarity:s.rarity,category:s.category,wearableCategory:s.wearableCategory??null,creator:s.creator,manaWei:s.manaWei??"0",available:1,network:s.network,chainId:s.chainId,createdAt:0}}function sa(){const[s]=be(),d=(s.get("q")??"").trim().toLowerCase(),m=se(),[v,n]=t.useState("wearable"),[c,P]=t.useState(null),[_,F]=t.useState([]),[C,y]=t.useState(""),[j,S]=t.useState(""),[g,I]=t.useState("newest"),[r,$]=t.useState(!1),[u,k]=t.useState(!1),[M,R]=t.useState(null);t.useEffect(()=>{if(!u)return;const a=o=>{o.key==="Escape"&&k(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[u]);const x=C&&!Number.isNaN(Number(C))?Number(C):void 0,p=j&&!Number.isNaN(Number(j))?Number(j):void 0,b=c?Fe[c]:void 0,i=(X.find(a=>a.key===g)??X[0]).server,l={category:v,rarities:_.length?_:void 0,wearableCategories:b,minPriceCredits:x,maxPriceCredits:p,search:d||void 0,sortBy:i},{items:h,total:L,isLoading:f,error:re,hasNextPage:te,isFetchingNextPage:K,fetchNextPage:ie}=Oe(["unified-listings",l],a=>we({...l,first:Ge,skip:a})),q=L,{data:W,isError:ne}=Ue(),ce=a=>W&&a.manaWei?Ie(a.manaWei,W):null,Q=t.useRef(null);t.useEffect(()=>{f||!d||Q.current===d||(Q.current=d,E("Shop Searched",{query:d,result_count:q}))},[d,f,q]);const T=t.useRef("__init__");t.useEffect(()=>{if(f)return;const a=JSON.stringify({category:v,subCategory:c,rarities:_,min:x,max:p,sort:g});if(T.current==="__init__"||T.current===a){T.current=a;return}T.current=a,E("Shop Applied Filter",{filters:{category:v,sub_category:c,rarities:_,min_price_credits:x??null,max_price_credits:p??null,sort:g},result_count:q})},[v,c,_,x,p,g,f,q]);function le(a){n(a),P(null)}function oe(a){F(o=>o.includes(a)?o.filter(B=>B!==a):[...o,a])}function de(){n("wearable"),P(null),F([]),y(""),S("")}function ue(a){const o=h.find(B=>B.id===a.id);o&&o.source==="legacy"&&o.manaWei&&R(Ye(o))}function me(){m.invalidateQueries({queryKey:["unified-listings"]})}const O=x!=null?Math.min(x,N):0,U=p!=null?Math.min(p,N):N,he=O/N*100,pe=U/N*100;function _e(a){const o=Math.min(a,U);y(o<=0?"":String(o))}function fe(a){const o=Math.max(a,O);S(o>=N?"":String(o))}return e.jsxs("div",{className:"browse browse--sidebar",children:[u?e.jsx("div",{className:"browse__scrim",onClick:()=>k(!1),"aria-hidden":!0}):null,e.jsxs("aside",{className:`browse__sidebar${u?" is-open":""}`,children:[e.jsxs("div",{className:"browse__sidebar-head",children:[e.jsx("span",{className:"browse__sidebar-title",children:"Filters"}),e.jsx("button",{className:"browse__sidebar-close",onClick:()=>k(!1),"aria-label":"Close filters",children:"✕"})]}),e.jsx("div",{className:"sidebar__section-label",children:"Category"}),e.jsx(Me,{category:v,subCategory:c,onCategory:le,onSub:P}),e.jsx("div",{className:"sidebar__divider"}),e.jsx("div",{className:"sidebar__section-label",children:"Price"}),e.jsxs("div",{className:"price-filter",children:[e.jsxs("div",{className:"price-filter__inputs",children:[e.jsxs("label",{className:"price-filter__field",children:[e.jsx("span",{className:"price-filter__field-label",children:"Min"}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(w,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"0",value:C,onChange:a=>y(a.target.value)})]})]}),e.jsx("span",{className:"price-filter__to",children:"to"}),e.jsxs("label",{className:"price-filter__field",children:[e.jsx("span",{className:"price-filter__field-label",children:"Max"}),e.jsxs("span",{className:"price-filter__box",children:[e.jsx(w,{className:"price-filter__coin"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"0",value:j,onChange:a=>S(a.target.value)})]})]})]}),e.jsxs("div",{className:"price-filter__slider",style:{"--min-pct":`${he}%`,"--max-pct":`${pe}%`},children:[e.jsx("div",{className:"price-filter__track","aria-hidden":!0}),e.jsx("div",{className:"price-filter__fill","aria-hidden":!0}),e.jsx("input",{type:"range",min:0,max:N,value:O,"aria-label":"Minimum price slider",onChange:a=>_e(Number(a.target.value))}),e.jsx("input",{type:"range",min:0,max:N,value:U,"aria-label":"Maximum price slider",onChange:a=>fe(Number(a.target.value))})]}),e.jsxs("div",{className:"price-filter__range",children:[e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(w,{className:"price-filter__coin"}),O.toLocaleString()]}),e.jsxs("span",{className:"price-filter__range-val",children:[e.jsx(w,{className:"price-filter__coin"}),U.toLocaleString()]})]})]}),e.jsx("div",{className:"sidebar__divider"}),e.jsxs("button",{type:"button",className:"sidebar__section-toggle","aria-expanded":r,onClick:()=>$(a=>!a),children:[e.jsx("span",{className:"sidebar__section-label",children:"Rarity"}),e.jsx("span",{className:`ico ico-chevron sidebar__section-chev${r?" is-up":""}`,"aria-hidden":!0})]}),r?e.jsx("div",{className:"rarity-filter",children:Ee.map(a=>e.jsxs("label",{className:`rarity-filter__check${_.includes(a)?" is-on":""}`,children:[e.jsx("input",{type:"checkbox",checked:_.includes(a),onChange:()=>oe(a)}),e.jsx("span",{children:a})]},a))}):null,e.jsxs("div",{className:"browse__sidebar-foot",children:[e.jsx("button",{type:"button",className:"browse__clear",onClick:de,children:"Clear Filters"}),e.jsx("button",{type:"button",className:"browse__apply",onClick:()=>k(!1),children:"Apply"})]})]}),e.jsxs("div",{className:"browse__main",children:[e.jsx(Pe,{sort:g,onSort:I,total:L,loading:f,query:d,onOpenFilters:()=>k(!0)}),ne&&h.some(a=>a.source==="legacy")?e.jsx("p",{className:"market-banner market-banner--warn",children:"Some market prices are temporarily unavailable — buying those items is paused for a moment. Please try again shortly."}):null,re?e.jsx("p",{className:"error",children:"Couldn’t load items — please try again."}):null,e.jsx("div",{className:"grid",children:f?e.jsx(Z,{count:15}):e.jsxs(e.Fragment,{children:[h.map(a=>a.source==="legacy"?e.jsx(J,{item:a,mode:"market",marketPriceCredits:ce(a),onBuyNow:ue},a.id):e.jsx(J,{item:a},a.id)),K?e.jsx(Z,{count:6}):null]})}),e.jsx(Re,{hasNextPage:te,isFetching:K,onLoadMore:()=>ie()}),!f&&h.length===0?e.jsx("p",{className:"muted",children:"No items match your filters."}):null]}),M&&W?e.jsx(Be,{listing:M,rate:W,onClose:()=>R(null),onSold:()=>{R(null),me()}}):null]})}export{sa as Assets};
@@ -1 +0,0 @@
1
- import{u as se,r as j,j as s,L as B}from"./react-C51i12iP.js";import{j as te,k as ae,l as R,a as re,b as ne,m as ce,n as ie,t as I,o as le,C as F,q as oe,s as V,A as de,v as q,w as D,i as z,x as ue,y as he,z as O,D as me,E as pe,d as fe,F as _e,G as ye}from"./index-C0kv5kHB.js";import{b as Q}from"./buy-DIwWkpJJ.js";import{g as ge,b as be,w as xe,S as je,G as ve}from"./buy-gasless-CFOJz7EI.js";import"./ethers-DwWf2RqE.js";import"./trade-encoding-3-fY1Skv.js";import"./index-t67nymVk.js";function Ce(t){return Math.ceil(t/10)}async function Ne(t,n,o){var S;const g=[],a=[],v=[];for(const r of t)try{const h=await o(r);if(!h){a.push(r);continue}if(te(h,n)){v.push(r);continue}const _=ae((S=h.received[0])==null?void 0:S.amount);if(!Number.isFinite(_)||_<=0){a.push(r);continue}g.push({item:r,trade:h,usdCents:_,priceCredits:Ce(_)})}catch{a.push(r)}const C=g.reduce((r,h)=>r+h.priceCredits,0),b=a.length>0||v.length>0||g.some(r=>r.priceCredits!==r.item.priceCredits);return{buyable:g,unavailable:a,own:v,liveTotalCredits:C,orderChanged:b}}function K(t){const n=t,o=(n.message??"").toLowerCase();return n.code===4001||o.includes("reject")||o.includes("denied")||o.includes("cancel")?"You cancelled the request.":o.includes("insufficient")?`You don't have enough ${V.name} — get more first.`:o.includes("no active listing")||o.includes("your own listing")?n.message:"Couldn't complete checkout — please try again."}const we=12e4;function ke(t){const n=[];return t.unavailable.length&&n.push(`${t.unavailable.length} no longer available`),t.own.length&&n.push(`${t.own.length} you can't buy (your own listing)`),`Removed ${n.join(" and ")} from your cart.`}function qe(){const t=R(e=>e.items),n=R(e=>e.remove),o=R(e=>e.clear),g=R(e=>e.setFittingOpen),{session:a}=re(),v=t.some(e=>e.category!=="emote"),{data:C}=ne({queryKey:["upsell-listings"],queryFn:()=>ye({first:40}),staleTime:6e4}),{data:b,isError:S}=ce(a),r=ie(),h=se(),[_,m]=j.useState(null),[L,p]=j.useState(null),[G,E]=j.useState(null),[N,T]=j.useState(!1),[d,w]=j.useState(null),M=j.useRef(0),P=t.reduce((e,c)=>e+c.priceCredits,0),H=d?d.liveTotalCredits:P,J=new Set(t.map(e=>e.id)),U=((C==null?void 0:C.items)??[]).filter(e=>!J.has(e.id)).slice(0,6),X=new Map(d==null?void 0:d.buyable.map(e=>[e.item.id,e])),Z=e=>e.tradeId?fe(e.tradeId):_e(e.contractAddress,e.itemId??"");function W(e){e(),w(null),E(null),p(null)}async function Y(e){if(!a||e.length===0)return;const c=e.map(i=>({...i.item,priceCredits:i.priceCredits})),y=[];let k="authorize",A=!1;try{m("Preparing your order…");const i=[];for(const l of e){const{credit:x,maxCreditedValue:f}=await ue(a.identity,l.usdCents,l.item.tradeId);y.push(x.id),i.push({trade:l.trade,credits:[x],maxCreditedValue:f})}m("Confirming your purchase…"),k="submit";let u=[];if(ge())try{u=await be({purchases:i,buyer:a.address,signer:a.signer});const x=(await Promise.allSettled(u.map(f=>xe(f)))).flatMap(f=>f.status==="rejected"?[f.reason]:[]);if(x.length&&!x.some(f=>f instanceof je))throw x[0];A=!0}catch(l){if(!(l instanceof ve))throw l;u=await Q({purchases:i,buyer:a.address,signer:a.signer})}else u=await Q({purchases:i,buyer:a.address,signer:a.signer});e.forEach(l=>n(l.item.id)),w(null),m("Purchased! 🎉"),q("Shop Completed Purchase",{...he(c),payment_type:"credits",no_crypto_step:A,transaction_hash:u[0]??null}),r.invalidateQueries({queryKey:["usd-balance"]}),h("/success",{state:{items:c,txHash:u[0]}})}catch(i){if(O(i)||z(i,{flow:"cart_checkout",step:k,cart_size:e.length}),q(O(i)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:k,error_code:me(i),value_usd:D(c.reduce((u,l)=>u+l.priceCredits,0)),cart_size:e.length}),y.length){try{await pe(a.identity,y)}catch(u){z(u,{flow:"cart_checkout",step:"release"})}r.invalidateQueries({queryKey:["usd-balance"]})}p(K(i)),m(null)}}async function $(){if(!a){p("Sign in to check out.");return}p(null),E(null),T(!0),q("Shop Started Checkout",{cart_size:t.length,cart_value_credits:P,cart_value_usd:D(P),has_sufficient_credits:((b==null?void 0:b.credits)??0)>=P});try{m("Reviewing your cart…");const e=await Ne(t,a.address,Z),c=[...e.unavailable,...e.own];if(c.length&&(c.forEach(y=>n(y.id)),E(ke(e))),e.buyable.length===0){p("None of these items are available to buy right now."),w(null),m(null);return}if(e.orderChanged){w(e),M.current=Date.now(),m(null);return}await Y(e.buyable)}catch(e){z(e,{flow:"cart_checkout",step:"review",cart_size:t.length}),p(K(e)),m(null)}finally{T(!1)}}async function ee(){if(d){if(!a){p("Sign in to check out.");return}if(Date.now()-M.current>we){w(null),E(null),await $();return}p(null),T(!0);try{await Y(d.buyable)}finally{T(!1)}}}return t.length===0?s.jsxs("div",{className:"cart cart--empty",children:[s.jsx("span",{className:"ico ico-cart cart-empty__ico","aria-hidden":!0}),s.jsx("p",{className:"cart-empty__title",children:I("cart.empty.title")}),s.jsx("p",{className:"muted",children:I("cart.empty.body")}),s.jsx(B,{className:"btn btn--purple",to:"/assets",children:I("cart.empty.cta")})]}):s.jsxs("div",{className:"cart",children:[s.jsxs("h1",{children:["Cart (",t.length,")"]}),s.jsxs("div",{className:"cart__body",children:[s.jsxs("div",{className:"cart__main",children:[s.jsx("div",{className:"cart__list",children:t.map(e=>{const c=X.get(e.id),y=c?c.priceCredits:e.priceCredits,k=!!c&&c.priceCredits!==e.priceCredits;return s.jsxs("div",{className:"cart__row",children:[s.jsx("div",{className:"cart__thumb",children:e.thumbnail?s.jsx("img",{src:e.thumbnail,alt:e.name}):null}),s.jsxs("div",{className:"cart__info",children:[s.jsx("div",{className:"cart__name",children:e.name}),e.creator?s.jsx(le,{address:e.creator,className:"cart__creator",linkToProfile:!0}):null]}),s.jsxs("div",{className:"cart__price",children:[s.jsx(F,{className:"ccy-mark"})," ",y,k?s.jsx("span",{className:"muted",style:{marginLeft:6,textDecoration:"line-through"},children:e.priceCredits}):null]}),s.jsx("button",{className:"cart__remove",onClick:()=>W(()=>n(e.id)),disabled:N,"aria-label":`Remove ${e.name}`,title:"Remove",children:s.jsx("span",{className:"ico ico-trash","aria-hidden":!0})})]},e.id)})}),s.jsxs("div",{className:"cart__utils",children:[s.jsx("button",{className:"link",onClick:()=>W(o),disabled:N,children:"Clear cart"}),null]})]}),s.jsxs("aside",{className:"cart__summary",children:[s.jsx("h2",{className:"cart__summary-title",children:"Order summary"}),s.jsxs("div",{className:"cart__total",children:[s.jsxs("div",{className:"cart__total-line",children:[s.jsx("span",{children:"Total"}),s.jsxs("strong",{children:[s.jsx(F,{className:"ccy-mark"})," ",H]})]}),a?s.jsxs("div",{className:"muted cart__balance",children:["Your balance: ",s.jsx(F,{className:"ccy-mark"})," ",oe(b,S)]}):null]}),s.jsxs("div",{className:"cart__actions",children:[s.jsx("button",{className:"btn btn--purple cart__checkout",onClick:d?ee:$,disabled:N,children:N?"Working…":d?"Confirm purchase":"Checkout"}),s.jsxs(B,{className:"btn btn--ghost",to:"/credits",children:["Get ",V.name]}),v?s.jsx("button",{className:"btn btn--ghost",onClick:()=>g(!0),disabled:N,children:"Try on outfit"}):null]}),d?s.jsx("p",{className:"muted cart__msg",children:"Prices or availability changed since you added these — review the updated total and confirm to buy."}):null,G?s.jsx("p",{className:"muted cart__msg",children:G}):null,_?s.jsx("p",{className:"muted cart__msg",children:_}):null,L?s.jsx("p",{className:"error cart__msg",children:L}):null]})]}),U.length>0?s.jsxs("section",{className:"row cart-upsell",children:[s.jsx("div",{className:"row__head",children:s.jsx("h2",{className:"row__title",children:"You might also like"})}),s.jsx("div",{className:"row__track",children:U.map(e=>s.jsx(de,{item:e},e.id))})]}):null]})}export{qe as Cart};
@@ -1 +0,0 @@
1
- import{j as e,r as m,d as O,u as Q}from"./react-C51i12iP.js";import{H as Y,t,e as Z,i as z,b as J,s as V,A as W,av as X,ay as ee}from"./index-C0kv5kHB.js";import{d as ae,s as M,g as re,a as se,A as te}from"./collection-BHilCUwH.js";import{u as ce}from"./useStore-BgEatlVS.js";import{S as T,C as oe,F as ie,c as le,a as F,b as ne}from"./categories-DYe3ZXtu.js";import{L as de}from"./LoadMore-DsKzH4Rv.js";import{u as me}from"./useInfiniteGrid-BeqyJL-J.js";import"./ethers-DwWf2RqE.js";function ue({name:r,creator:a}){const{data:c}=ce(a),i=(c==null?void 0:c.cover)||ae;return e.jsxs("section",{className:"collection-hero","aria-label":r,children:[e.jsxs("div",{className:"collection-hero__cover",children:[e.jsx("img",{className:"collection-hero__cover-img",src:i,alt:"",loading:"eager"}),e.jsx("div",{className:"collection-hero__scrim","aria-hidden":!0})]}),e.jsx("h1",{className:"collection-hero__title",children:r})]})}function pe({address:r}){var x,o;const{data:a}=Y(r),[c,i]=m.useState(!1);if(!r)return null;const l=(a==null?void 0:a.name)||M(r),u=(o=(x=a==null?void 0:a.avatar)==null?void 0:x.snapshots)==null?void 0:o.face256,p=`${Z.profileUrl}/${r}`,g=re(se({name:a==null?void 0:a.name,hasClaimedName:a==null?void 0:a.hasClaimedName,ethAddress:(a==null?void 0:a.ethAddress)??r}));async function n(){try{await navigator.clipboard.writeText(r),i(!0),window.setTimeout(()=>i(!1),1500)}catch(_){z(_,{flow:"copy_creator_address"})}}return e.jsxs("div",{className:"creator-card",children:[u?e.jsx("img",{className:"creator-card__ava",src:u,alt:"",loading:"eager",style:{backgroundColor:g}}):e.jsx("span",{className:"creator-card__ava creator-card__ava--ph","aria-hidden":!0,style:{backgroundColor:g}}),e.jsx("h2",{className:"creator-card__name",title:l,children:l}),e.jsxs("button",{type:"button",className:"creator-card__account",onClick:()=>void n(),title:c?t("collection.copied"):t("collection.copyAddress"),"aria-label":c?t("collection.copied"):t("collection.copyAddress"),children:[e.jsx("span",{className:"creator-card__account-text",children:M(r)}),e.jsx("span",{className:"ico ico-copy creator-card__copy","aria-hidden":!0})]}),e.jsx("a",{className:"creator-card__view",href:p,target:"_blank",rel:"noopener noreferrer",children:t("collection.viewProfile")})]})}const he=48;function Ce(){var k;const{contractAddress:r}=O(),a=Q(),[c,i]=m.useState("wearable"),[l,u]=m.useState(null),[p,g]=m.useState([]),[n,x]=m.useState(""),[o,_]=m.useState(""),[v,R]=m.useState("newest"),f=n&&!Number.isNaN(Number(n))?Number(n):void 0,C=o&&!Number.isNaN(Number(o))?Number(o):void 0,B=l?ne[l]:void 0,E=(T.find(s=>s.key===v)??T[0]).server,y={category:c,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:f,maxPriceCredits:C,sortBy:E},{items:b,total:L,isLoading:N,error:w,hasNextPage:U,isFetchingNextPage:A,fetchNextPage:$}=me(["collection-page",r,y],s=>X(r,{...y,first:he,skip:s}),{enabled:!!r}),{data:h}=J({queryKey:["collection-meta",r],queryFn:()=>ee(r),enabled:!!r,staleTime:5*6e4}),S=(h==null?void 0:h.name)||t("collection.fallbackTitle"),P=(h==null?void 0:h.creator)||((k=b[0])==null?void 0:k.creator);function I(s){i(s),u(null)}function q(s){g(d=>d.includes(s)?d.filter(D=>D!==s):[...d,s])}function G(){i("wearable"),u(null),g([]),x(""),_("")}const j=!!(f||C),H=j?`${n||"0"}–${o||"∞"}`:t("filter.price"),K=c!=="wearable"||!!l||p.length>0||j;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:()=>a("/assets"),children:t("collection.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:S})]}),e.jsx(ue,{name:S,creator:P}),e.jsxs("div",{className:"browse browse--sidebar collection-page__browse",children:[e.jsxs("aside",{className:"browse__sidebar",children:[e.jsx(pe,{address:P}),e.jsx(oe,{category:c,subCategory:l,onCategory:I,onSub:u,title:t("collection.category"),flat:!0})]}),e.jsxs("div",{className:"browse__main",children:[!N&&b.length>0?e.jsx(te,{items:b,source:"collection"}):null,e.jsx(ie,{rarities:p,onToggleRarity:q,sort:v,onSort:R,total:L,loading:N,anyActive:K,onClear:G,renderTrailing:s=>e.jsx(le,{panelKey:"price",label:H,active:j,panel:s,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"Min",value:n,onChange:d=>x(d.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"Max",value:o,onChange:d=>_(d.target.value)})]}),e.jsxs("p",{className:"filter-pop__hint",children:["Price in ",V.name]})]})})}),w?e.jsx("p",{className:"error",children:t("collection.error")}):null,e.jsx("div",{className:"grid",children:N?e.jsx(F,{count:15}):e.jsxs(e.Fragment,{children:[b.map(s=>e.jsx(W,{item:s},s.id)),A?e.jsx(F,{count:6}):null]})}),e.jsx(de,{hasNextPage:U,isFetching:A,onLoadMore:()=>$()}),!N&&!w&&b.length===0?e.jsx("p",{className:"muted",children:t("collection.empty")}):null]})]})]})}export{Ce as Collection,Ce as default};
@@ -1 +0,0 @@
1
- import{u as I,j as e,L as ee,d as ae,b as se,r as p}from"./react-C51i12iP.js";import{aB as re,aC as te,o as oe,t as o,aD as $,H as U,a as ce,e as le,s as ne,A as ie,G as de,aE as me}from"./index-C0kv5kHB.js";import{s as D,d as ue,g as he,a as ge,A as xe}from"./collection-BHilCUwH.js";import{u as _e,L as Ne}from"./useStore-BgEatlVS.js";import{S as B,C as je,a as w,F as pe,c as be,b as fe}from"./categories-DYe3ZXtu.js";import{L as E}from"./LoadMore-DsKzH4Rv.js";import{u as R}from"./useInfiniteGrid-BeqyJL-J.js";import"./ethers-DwWf2RqE.js";function Ce({collection:r,cover:a,itemCount:t}){const n=I(),{contractAddress:m,name:N,creator:g}=r,j=a==null||t==null,{data:i}=re(m,j),_=a==null?(i==null?void 0:i.items)??[]:[],h=t??(i==null?void 0:i.total);function x(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:x,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),x())},children:[e.jsx("div",{className:"coll-card__media",children:a?e.jsx("img",{className:"coll-card__img",src:a,alt:"",loading:"lazy"}):_.length>0?e.jsx(te,{items:_,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:N,children:N}),e.jsxs("div",{className:"coll-card__meta",children:[g?e.jsx(oe,{address:g,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":o("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),x()},tabIndex:-1,children:o("collectionCard.viewCollection")})]})]})}function ve({address:r,className:a=""}){const t=$(m=>m.followed.includes(r.toLowerCase())),n=$(m=>m.toggle);return r?e.jsx("button",{type:"button",className:`btn btn--sm ${t?"btn--ghost":"btn--outline"} ${a}`.trim(),"aria-pressed":t,title:t?o("creator.unfollowTitle"):o("creator.followTitle"),onClick:()=>n(r),children:t?o("creator.following"):o("creator.follow")}):null}const we={website:"ico-website",twitter:"ico-twitter",discord:"ico-discord",facebook:"ico-facebook"};function ke({address:r}){var d,b;const{data:a}=U(r),{data:t}=_e(r),n=ce(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===r.toLowerCase(),N=(a==null?void 0:a.name)||D(r),g=(b=(d=a==null?void 0:a.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,j=(t==null?void 0:t.cover)||ue,i=t==null?void 0:t.description,_=`${le.profileUrl}/${r}`,h=Ne.filter(l=>t==null?void 0:t.links[l]),x=he(ge({name:a==null?void 0:a.name,hasClaimedName:a==null?void 0:a.hasClaimedName,ethAddress:(a==null?void 0:a.ethAddress)??r}));return e.jsxs("section",{className:"creator-hero","aria-label":`${N} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:j,alt:"",loading:"eager"}),e.jsx("div",{className:"creator-hero__scrim","aria-hidden":!0})]}),(h.length>0||m)&&e.jsxs("div",{className:"creator-hero__links",children:[h.map(l=>e.jsx("a",{className:"creator-hero__link",href:(t==null?void 0:t.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${l}`),"aria-label":o(`creator.link.${l}`),children:e.jsx("span",{className:`ico ${we[l]}`,"aria-hidden":!0})},l)),m&&e.jsx(ee,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx("span",{className:"ico ico-pen","aria-hidden":!0})})]}),e.jsxs("div",{className:"creator-hero__body",children:[g?e.jsx("img",{className:"creator-hero__ava",src:g,alt:"",loading:"eager",style:{backgroundColor:x}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:x}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:N}),i?e.jsx("p",{className:"creator-hero__desc",children:i}):null]}),e.jsxs("div",{className:"creator-hero__actions",children:[e.jsx("a",{className:"creator-hero__view",href:_,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(ve,{address:r,className:"creator-hero__follow"})]})]})]})}const T=48;function Be(){const{address:r}=ae(),a=I(),[t]=se(),n=t.has("collections"),{data:m}=U(r),N=(m==null?void 0:m.name)||(r?D(r):o("creator.fallbackName")),[g,j]=p.useState("wearable"),[i,_]=p.useState(null),[h,x]=p.useState([]),[d,b]=p.useState(""),[l,f]=p.useState(""),[P,K]=p.useState("newest"),S=d&&!Number.isNaN(Number(d))?Number(d):void 0,y=l&&!Number.isNaN(Number(l))?Number(l):void 0,G=i?fe[i]:void 0,O=(B.find(s=>s.key===P)??B[0]).server,L={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:G,minPriceCredits:S,maxPriceCredits:y,sortBy:O},{items:C,total:H,isLoading:v,error:A,hasNextPage:Y,isFetchingNextPage:F,fetchNextPage:z}=R(["creator-listings",L],s=>de({...L,first:T,skip:s}),{enabled:!!r&&!n}),u=R(["creator-collections",r],s=>me(r,{first:T,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!r&&n});function W(s){j(s),_(null),n&&M()}function M(){const s=new URLSearchParams(t);s.delete("collections");const c=s.toString();a({search:c?`?${c}`:""},{replace:!0})}function Z(){if(n){M();return}const s=new URLSearchParams(t);s.delete("collections");const c=s.toString();a({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function q(s){x(c=>c.includes(s)?c.filter(X=>X!==s):[...c,s])}function J(){j("wearable"),_(null),x([]),b(""),f("")}const k=!!(S||y),Q=k?`${d||"0"}–${l||"∞"}`:o("filter.price"),V=g!=="wearable"||!!i||h.length>0||k;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:()=>a("/assets"),children:o("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:N})]}),r?e.jsx(ke,{address:r}):null,!n&&!v&&C.length>0?e.jsx(xe,{items:C,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(je,{category:g,subCategory:i,onCategory:W,onSub:_,title:o("creator.category"),flat:!0,collections:n,onCollections:Z})}),e.jsx("div",{className:"browse__main",children:n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"creator-collections__bar",children:e.jsx("span",{className:"assets__count",children:u.isLoading?"…":o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx("p",{className:"error",children:o("creator.error")}):null,e.jsx("div",{className:"grid grid--collections",children:u.isLoading?e.jsx(w,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(s=>e.jsx(Ce,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(E,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:o("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(pe,{rarities:h,onToggleRarity:q,sort:P,onSort:K,total:H,loading:v,anyActive:V,onClear:J,renderTrailing:s=>e.jsx(be,{panelKey:"price",label:Q,active:k,panel:s,children:e.jsxs("div",{className:"filter-pop filter-pop--price",children:[e.jsxs("div",{className:"filter-pop__price-row",children:[e.jsx("input",{type:"number",min:"0","aria-label":"Minimum price",placeholder:"Min",value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":"Maximum price",placeholder:"Max",value:l,onChange:c=>f(c.target.value)})]}),e.jsxs("p",{className:"filter-pop__hint",children:["Price in ",ne.name]})]})})}),A?e.jsx("p",{className:"error",children:o("creator.error")}):null,e.jsx("div",{className:"grid",children:v?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[C.map(s=>e.jsx(ie,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(E,{hasNextPage:Y,isFetching:F,onLoadMore:()=>z()}),!v&&!A&&C.length===0?e.jsx("p",{className:"muted",children:o("creator.empty")}):null]})})]})]})}export{Be as Creator,Be as default};
@@ -1 +0,0 @@
1
- import{u as H,b as Q,r as l,j as e}from"./react-C51i12iP.js";import{af as T,e as b,ag as W,a as J,n as X,v as _,s as m,i as B,D as G,C as S,a7 as D}from"./index-C0kv5kHB.js";import{C as A}from"./CircularProgress-3Y_POW5D.js";import"./ethers-DwWf2RqE.js";function F(){return b.creditsServerUrl}async function Z(t,s){const r=await T(`${F()}/credits/checkout`,{method:"POST",identity:s,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify({packId:t})});if(!r.ok)throw new Error(`checkout ${r.status}: ${await r.text()}`);const{orderId:a,url:c}=await r.json();return{orderId:a,url:c,mock:!1}}async function ee(t,s,r={}){const{intervalMs:a=1500,timeoutMs:c=6e4,signal:o}=r,h=Date.now()+c;for(;;){if(o!=null&&o.aborted)throw new DOMException("Aborted","AbortError");const u=await se(t,s,o);if(u.status!=="processing")return u;if(Date.now()>h)return{status:"pending"};await te(a,o)}}async function se(t,s,r){const a=await T(`${F()}/credits/orders/${t}`,{method:"GET",identity:s,metadata:{},signal:r});if(!a.ok)throw new Error(`order status ${a.status}`);return a.json()}function te(t,s){return new Promise((r,a)=>{const c=setTimeout(r,t);s==null||s.addEventListener("abort",()=>{clearTimeout(c),a(new DOMException("Aborted","AbortError"))})})}const re=.1,U=[{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/re)}function O(t){return U.find(s=>s.id===t)}const C="mock_cs_",ae=new Set([80002,11155111,1337,31337]);function E(){const t=!b.stripePublishableKey;if(t&&!ae.has(b.chainId))throw new Error(`Stripe publishable key is missing on chainId=${b.chainId}, which is not a recognized test network. Refusing to fall back to mock payments in a real-money environment — configure STRIPE_PUBLISHABLE_KEY.`);return t}async function ne(t,s){const r=O(t);if(!r)throw new Error("Unknown pack");if(E())return ie(r);if(!(s!=null&&s.identity))throw new Error("Sign in to get credits.");return Z(t,s.identity)}async function ce(t,s={}){const{intervalMs:r,timeoutMs:a,signal:c,identity:o}=s;if(E()||t.startsWith(C))return oe(t,s);if(!o)throw new Error("Sign in to get credits.");return ee(t,o,{intervalMs:r,timeoutMs:a,signal:c})}function ie(t){const s=`${C}${t.id}_${Date.now()}`;return L(400).then(()=>({orderId:s,clientSecret:`${C}${t.id}`,mock:!0}))}async function oe(t,s={}){await L(s.intervalMs??900);const r=t.replace(C,"").replace(/_\d+$/,""),a=O(r),c=(a==null?void 0:a.credits)??0;if(s.address&&a)try{const o=await W(s.address,Math.round(a.usd*100));return{status:"credited",creditsGranted:c,newBalance:o.credits}}catch(o){return{status:"failed",error:o.message}}return{status:"credited",creditsGranted:c,newBalance:c}}function L(t,s){return new Promise((r,a)=>{setTimeout(r,t)})}const j=E()?"mock":"stripe";function M(t){const s=t;if((s==null?void 0:s.name)==="AbortError")return"You cancelled the request.";const r=((s==null?void 0:s.message)??"").toLowerCase();return r.includes("sign in")?`Sign in to get ${m.name}.`:r.includes("timed out")?`This is taking longer than usual — your ${m.name} will appear shortly.`:"Couldn't complete your purchase — please try again."}function ge(){const t=H(),{session:s,signIn:r}=J(),a=X(),[c,o]=Q(),[h,u]=l.useState("select"),[i,P]=l.useState(null),[f,$]=l.useState(null),[Y,R]=l.useState(null),[K,g]=l.useState(null),[V,N]=l.useState(!1),k=l.useRef(null);l.useEffect(()=>()=>{var n;return(n=k.current)==null?void 0:n.abort()},[]);const I=l.useCallback(()=>{o(n=>{const d=new URLSearchParams(n);return d.delete("order"),d.delete("canceled"),d},{replace:!0})},[o]),w=l.useCallback(async n=>{u("processing");const d=new AbortController;k.current=d;try{const p=await ce(n,{signal:d.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});p.status==="credited"?(R(p.creditsGranted??(i==null?void 0:i.credits)??0),u("success"),_("Shop Completed Buy Credits",{order_id:n,pack_usd:(i==null?void 0:i.usd)??null,credits:p.creditsGranted??(i==null?void 0:i.credits)??0,provider:j}),a.invalidateQueries({queryKey:["usd-balance"]})):p.status==="pending"?(_("Shop Buy Credits Pending",{step:"grant",pack_usd:(i==null?void 0:i.usd)??null}),a.invalidateQueries({queryKey:["usd-balance"]}),u("pending")):(_("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(i==null?void 0:i.usd)??null}),g(p.error??`Couldn't add your ${m.name} — please try again.`),u("error"))}catch(p){B(p,{flow:"get_credits",step:"grant",order_id:n}),_("Shop Buy Credits Failed",{step:"grant",error_code:G(p),pack_usd:(i==null?void 0:i.usd)??null}),g(M(p)),u("error")}},[i,s,a]),q=l.useCallback(async n=>{if(!s){r();return}g(null),N(!1),P(n),u("paying"),_("Shop Started Buy Credits",{pack_usd:n.usd,credits:n.credits,provider:j});try{const d=await ne(n.id,{address:s.address,identity:s.identity});if(d.mock)$(d);else if(d.url)_("Shop Redirected To Stripe",{order_id:d.orderId,pack_usd:n.usd,credits:n.credits}),window.location.href=d.url;else throw new Error("Checkout did not return a redirect url")}catch(d){B(d,{flow:"get_credits",step:"checkout",provider:j}),_("Shop Buy Credits Failed",{step:"checkout",error_code:G(d),pack_usd:n.usd}),g(M(d)),u("error")}},[s,r]),z=l.useCallback(()=>{f&&w(f.orderId)},[f,w]),v=l.useRef(!1);l.useEffect(()=>{if(v.current)return;const n=c.get("order");if(c.get("canceled")!=null){v.current=!0,_("Shop Buy Credits Cancelled",{order_id:n,provider:j}),I(),N(!0),u("select");return}n&&(u("processing"),s&&(v.current=!0,I(),w(n)))},[c,s]);function y(){var n;(n=k.current)==null||n.abort(),u("select"),P(null),$(null),R(null),g(null),N(!1)}return e.jsxs("div",{className:"getcredits",children:[e.jsxs("header",{className:"getcredits__head",children:[e.jsxs("h1",{className:"getcredits__title",children:["Get ",m.name]}),e.jsxs("p",{className:"muted",children:["Add ",m.name," to your account to shop. Pay with any card."]})]}),s?e.jsxs(e.Fragment,{children:[h==="select"&&e.jsxs(e.Fragment,{children:[V&&e.jsx("p",{className:"getcredits__note muted",role:"status",children:"Payment canceled — no charge was made. Pick a pack whenever you’re ready."}),e.jsx(de,{onSelect:q})]}),h==="paying"&&i&&e.jsx(le,{pack:i,checkout:f,onPaid:z,onCancel:y}),h==="processing"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(A,{size:40}),e.jsxs("p",{className:"getcredits__status-title",children:["Adding your ",m.name,"…"]}),e.jsx("p",{className:"muted",children:"Payment received. Just a moment while we top up your balance."})]}),h==="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:[e.jsx(S,{className:"ccy-mark"})," ",Y]})," ",m.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:y,children:["Get more ",m.name]})]})]}),h==="pending"&&e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsxs("p",{className:"getcredits__status-title",children:["Your ",m.name," are on the way"]}),e.jsx("p",{className:"muted",children:"Your payment went through. It’s taking a little longer than usual to confirm — your balance will update automatically as soon as it lands, no need to pay again."}),e.jsxs("div",{className:"getcredits__status-actions",children:[e.jsx("button",{className:"btn",onClick:()=>t("/cart"),children:"Back to cart"}),e.jsx("button",{className:"btn btn--ghost",onClick:y,children:"Done"})]})]}),h==="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:K}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn",onClick:y,children:"Try again"})})]})]}):e.jsxs("div",{className:"getcredits__status",role:"status",children:[e.jsxs("p",{className:"getcredits__status-title",children:["Sign in to get ",m.name]}),e.jsxs("p",{className:"muted",children:["Connect your account to buy ",m.name," and start shopping."]}),e.jsx("div",{className:"getcredits__status-actions",children:e.jsx("button",{className:"btn btn--purple",onClick:r,children:"Sign in"})})]})]})}function de({onSelect:t}){return e.jsx("div",{className:"packs",children:U.map(s=>e.jsxs("button",{type:"button",className:`pack${s.bestValue?" pack--best":""}`,onClick:()=>t(s),"aria-label":`Get ${D(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(S,{className:"pack__credits-ico"}),s.credits]}),e.jsx("span",{className:"pack__label",children:m.name}),e.jsxs("span",{className:"pack__price",children:["$",s.usd]}),e.jsxs("span",{className:"pack__cta",children:["Get ",m.name]})]},s.id))})}function le({pack:t,checkout:s,onPaid:r,onCancel:a}){return e.jsxs("div",{className:"pay",children:[e.jsxs("div",{className:"pay__summary",children:[e.jsx("button",{className:"link",onClick:a,children:"← Choose a different pack"}),e.jsxs("div",{className:"pay__summary-row",children:[e.jsx("span",{children:"You’ll get"}),e.jsxs("strong",{children:[e.jsx(S,{className:"ccy-mark"})," ",D(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!=null&&s.mock?e.jsx(ue,{onPaid:r,amountUsd:t.usd}):e.jsxs("div",{className:"getcredits__status",role:"status","aria-live":"polite",children:[e.jsx(A,{size:32}),e.jsx("p",{className:"muted",children:"Getting the payment form ready…"})]})})]})}function ue({onPaid:t,amountUsd:s}){const[r,a]=l.useState("4242 4242 4242 4242"),[c,o]=l.useState(!1);function h(){o(!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:r,onChange:u=>a(u.target.value),disabled:c,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:c})]}),e.jsxs("label",{className:"field",children:[e.jsx("span",{children:"CVC"}),e.jsx("input",{defaultValue:"123",disabled:c,inputMode:"numeric"})]})]}),e.jsx("button",{className:"btn btn--purple card-form__pay",onClick:h,disabled:c,children:c?"Processing…":`Pay $${s}`})]})}export{ge as GetCredits,ge as default};
@@ -1 +0,0 @@
1
- import{u as E,r as p,j as e,L as A}from"./react-C51i12iP.js";import{v as Q,i as L,s as S,C as v,a as R,n as F,b as K,ae as P}from"./index-C0kv5kHB.js";import{i as W,R as Y,f as G}from"./import-C0KzuCTc.js";import{s as O}from"./wallet-kind-DmRQR63L.js";import"./ethers-DwWf2RqE.js";import"./buy-DIwWkpJJ.js";import"./trade-encoding-3-fY1Skv.js";import"./index-t67nymVk.js";import"./mana-rate-DObImZN2.js";function B({queue:n,session:I,onClose:g,onDone:h}){const x=E(),c=O(I.providerType),[d,j]=p.useState(()=>n.map(()=>"pending")),[b,C]=p.useState("running"),w=p.useRef(!1);p.useEffect(()=>{if(w.current)return;w.current=!0;let t=!1;return(async()=>{for(let s=0;s<n.length;s++){if(t)return;j(r=>r.map((m,o)=>o===s?"active":m));try{await W(n[s].item,n[s].priceCredits,I),Q("Shop Migrated Listing",{item_id:n[s].item.itemId??n[s].item.oldTradeId??null,contract_address:n[s].item.contractAddress,new_price_credits:n[s].priceCredits,new_price_usd:n[s].priceCredits/10}),t||j(r=>r.map((m,o)=>o===s?"done":m))}catch(r){if(r instanceof Y)L(r,{flow:"import_listing",step:"relist",itemId:n[s].item.itemId??n[s].item.oldTradeId}),t||j(m=>m.map((o,y)=>y===s?"unlisted":o));else{const m=r,o=m.code===4001||/reject|denied|cancel/i.test(m.message??"");o||L(r,{flow:"import_listing",itemId:n[s].item.itemId??n[s].item.oldTradeId}),t||j(y=>y.map((T,a)=>a===s?o?"skipped":"failed":T))}}}t||C("finished")})(),()=>{t=!0}},[]);const u=d.filter(t=>t==="done").length,N=d.findIndex(t=>t==="active"),_=Math.round(d.filter(t=>t!=="pending"&&t!=="active").length/n.length*100);function f(){h(),g()}if(b==="finished"){const t=d.filter(r=>r==="skipped"||r==="failed").length,s=d.filter(r=>r==="unlisted").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:u>0?"You're in the Shop! 🎉":"Nothing listed"}),e.jsxs("p",{className:"muted",style:{margin:0},children:[u>0?`${u} ${u===1?"item is":"items are"} now for sale with ${S.name}.`:"No items were listed.",t>0?` ${t} skipped — you can try those again anytime.`:"",s>0?` ${s} ${s===1?"item was":"items were"} taken off the old marketplace but couldn't be re-listed — re-list ${s===1?"it":"them"} from My Assets.`:""]}),e.jsxs("div",{className:"modal__actions",children:[e.jsx("button",{className:"btn btn--ghost",onClick:f,children:"Done"}),s>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),g(),x("/my-assets")},children:"Go to My Assets"}):u>0?e.jsx("button",{className:"btn btn--purple",onClick:()=>{h(),g(),x("/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:[c?"We take down each old listing and re-list it for credits — confirm each step.":"Moving your items to the Shop."," ",N>=0?`${N+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((t,s)=>e.jsxs("li",{className:`migrate__row migrate__row--${d[s]}`,children:[e.jsx("span",{className:"migrate__thumb",children:t.item.thumbnail?e.jsx("img",{src:t.item.thumbnail,alt:""}):null}),e.jsx("span",{className:"migrate__name",title:t.item.name,children:t.item.name||"Item"}),e.jsxs("span",{className:"migrate__price",children:[e.jsx(v,{className:"ccy-mark"})," ",t.priceCredits.toLocaleString()]}),e.jsx("span",{className:"migrate__status",children:d[s]==="active"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner migrate__spin","aria-hidden":!0})," ",c?"Confirm…":"Adding…"]}):d[s]==="done"?e.jsx("span",{className:"migrate__tick",children:"✓"}):d[s]==="skipped"?e.jsx("span",{className:"migrate__skip",children:"Skipped"}):d[s]==="failed"?e.jsx("span",{className:"migrate__skip",children:"Failed"}):d[s]==="unlisted"?e.jsx("span",{className:"migrate__skip",title:"Removed from the old marketplace but not re-listed — re-list it from My Assets.",children:"Not listed"}):e.jsx("span",{className:"migrate__wait",children:"Waiting"})})]},t.item.oldTradeId))}),e.jsx("p",{className:"muted small migrate__hint",children:c?"A couple of quick confirmations pop up per item (take down + re-list). Keep this open.":"This only takes a moment — keep this open."})]})})}const U=[{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 se(){const{session:n,signIn:I,restore:g}=R(),h=F(),x=n==null?void 0:n.address;p.useEffect(()=>{g()},[g]);const{data:c,isLoading:d}=K({queryKey:["importable",x],queryFn:()=>G(x),enabled:!!x}),[j,b]=p.useState({}),[C,w]=p.useState(new Set),[u,N]=p.useState(null),_=p.useMemo(()=>[...(c==null?void 0:c.creations)??[],...(c==null?void 0:c.owned)??[]],[c]);p.useEffect(()=>{_.length&&b(a=>{const l={...a};for(const i of _)l[i.oldTradeId]==null&&(l[i.oldTradeId]=i.suggestedCredits);return l})},[_]);const f=a=>!C.has(a),t=a=>j[a.oldTradeId]??a.suggestedCredits,s=_.filter(a=>f(a.oldTradeId)),r=s.reduce((a,l)=>a+t(l),0);function m(a,l){const i=l.replace(/[^\d]/g,"");b(k=>({...k,[a]:i===""?0:parseInt(i,10)}))}function o(a){w(l=>{const i=new Set(l);return i.has(a)?i.delete(a):i.add(a),i})}function y(a){return a.map(l=>({item:l,priceCredits:Math.max(1,t(l))}))}function T(){h.invalidateQueries({queryKey:["importable"]}),h.invalidateQueries({queryKey:["unified-listings"]}),h.invalidateQueries({queryKey:["my-assets"]}),h.invalidateQueries({queryKey:["collection-sale-state"]}),P.success("Your Shop is updated.")}return n?!d&&_.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(A,{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 ",S.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(v,{className:"ccy-mark imp__diamond"})," 1 ",S.nameSingular," = $0.10 · prices rounded up"]}),d?e.jsx("div",{className:"imp__list",children:Array.from({length:4}).map((a,l)=>e.jsx("div",{className:"imp-row imp-row--skeleton"},l))}):U.map(a=>{const l=(c==null?void 0:c[a.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:a.title}),e.jsx("span",{className:"imp__section-sub",children:a.sub})]}),e.jsx("div",{className:"imp__list",children:l.map(i=>{const k=t(i),M=k!==i.suggestedCredits;return e.jsxs("article",{className:`imp-row${f(i.oldTradeId)?"":" is-off"}`,children:[e.jsx("input",{type:"checkbox",className:"imp-check",checked:f(i.oldTradeId),onChange:()=>o(i.oldTradeId),"aria-label":`Include ${i.name}`}),e.jsx("div",{className:"imp-thumb",children:i.thumbnail?e.jsx("img",{src:i.thumbnail,alt:""}):null}),e.jsxs("div",{className:"imp-meta",children:[e.jsx("div",{className:"imp-name",title:i.name,children:i.name||"Item"}),e.jsx("span",{className:"imp-chip",children:i.rarity})]}),e.jsxs("div",{className:"imp-price",children:[e.jsxs("div",{className:"imp-price__field",children:[e.jsx(v,{className:"ccy-mark imp-price__diamond"}),e.jsx("input",{className:"imp-price__input",inputMode:"numeric",value:k.toLocaleString(),onChange:$=>m(i.oldTradeId,$.target.value),"aria-label":`Price in ${S.name} for ${i.name}`})]}),e.jsxs("div",{className:"imp-price__sub",children:[e.jsxs("span",{children:["$",(k*.1).toFixed(2)]}),M?e.jsxs("button",{className:"imp-price__reset",onClick:()=>b($=>({...$,[i.oldTradeId]:i.suggestedCredits})),children:["Reset to ",e.jsx(v,{className:"ccy-mark"}),i.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx("div",{className:"imp-action",children:e.jsx("button",{className:"btn btn--sm imp-row__list",disabled:!f(i.oldTradeId),onClick:()=>N(y([i])),children:"List"})})]},i.oldTradeId)})})]},a.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(v,{className:"ccy-mark imp__diamond"})," ",r.toLocaleString()]}),e.jsxs("div",{className:"imp-dock__sub",children:[s.length," item",s.length===1?"":"s"," selected · $",(r*.1).toFixed(2)]})]}),e.jsx("span",{className:"imp-dock__spacer"}),e.jsxs("button",{className:"btn btn--purple imp-dock__cta",disabled:s.length===0,onClick:()=>N(y(s)),children:["List all (",s.length,")"]})]})}),u&&n?e.jsx(B,{queue:u,session:n,onClose:()=>N(null),onDone:T}):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:()=>I(),children:"Sign in"})]})}export{se as ImportListings};
@@ -1 +0,0 @@
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:24px}.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,1045fr) minmax(0,514fr);gap:48px;align-items:start;max-width:1607px;margin:0 auto}@media(max-width:900px){.item-detail__main{grid-template-columns:1fr;gap:24px;max-width:none}}.item-detail__preview{position:relative;aspect-ratio:1045 / 752;border-radius:16px;overflow:hidden;background:var(--media)}@media(max-width:900px){.item-detail__preview{aspect-ratio:1 / 1}}.item-detail__preview iframe,.item-detail__preview>*{width:100%;height:100%;border:0;display:block}.item-detail__preview>.item-preview__toggle{position:absolute;top:16px;left:16px;z-index:2;width:auto;height:auto;display:inline-flex;gap:2px;padding:3px;background:#ffffffeb;border:1px solid var(--line);border-radius:999px;box-shadow:0 1px 4px #0000001f}.item-preview__toggle button{border:0;background:none;cursor:pointer;padding:6px 16px;border-radius:999px;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);transition:background .12s ease,color .12s ease}.item-preview__toggle button.is-active{background:var(--text);color:#fff}.item-preview__toggle button:not(.is-active):hover{color:var(--text)}.item-detail__preview>.item-preview__emote-controls{position:absolute;bottom:14px;left:50%;transform:translate(-50%);z-index:2;width:auto;height:auto;max-width:92%;display:flex;align-items:center;background:#ffffffeb;border:1px solid var(--line);border-radius:12px;padding:6px 10px;box-shadow:0 1px 4px #0000001f}.item-detail__preview>.item-preview__note{position:absolute;bottom:14px;left:50%;transform:translate(-50%);z-index:2;width:auto;height:auto;max-width:88%;margin:0;text-align:center;background:#161518c7;color:#fff;font-size:12px;font-weight:500;padding:6px 12px;border-radius:999px}.item-detail__preview>.item-preview__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:transparent}.item-preview__spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:item-preview-spin .8s linear infinite}@keyframes item-preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.item-preview__spinner{animation-duration:2.4s}}.item-detail__info{display:flex;flex-direction:column;gap:20px}.item-detail__info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.item-detail__title{font-size:28px;font-weight:600;line-height:34px;color:var(--text-2)}.item-detail__fav{flex:none;width:40px;height:40px;border-radius:50%;border:0;background:var(--media);display:grid;place-items:center;color:var(--text-2);cursor:pointer;transition:color .12s ease,background .12s ease}.item-detail__fav:hover{background:var(--line)}.item-detail__fav.is-on{color:var(--dcl-red)}.item-detail__fav .ico-heart{width:18px;height:18px}.item-detail__label{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.item-detail__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:-6px}.item-detail__chips .chip{height:24px;padding:0 8px;gap:3px;font-size:12px;border-radius:4px;letter-spacing:.02em;text-transform:uppercase}.item-detail__chip{background:var(--chip);color:var(--text-2)}.item-detail__chip-ico{width:16px;height:16px;color:var(--text-2)}.item-detail__section{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.item-detail__desc-text{margin:0;color:var(--text-2);font-size:14px;line-height:30px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.item-detail__desc-text.is-expanded{-webkit-line-clamp:unset;overflow:visible}.item-detail__desc-toggle{font-size:13px;align-self:flex-start}.item-detail__meta{display:grid;grid-template-columns:1fr 1fr;gap:16px}.item-detail__meta-col{display:flex;flex-direction:column;gap:10px;min-width:0}.item-detail__creator.creator{color:var(--accent);font-size:14px;gap:12px}.item-detail__creator .creator__ava{width:48px;height:48px}.item-detail__creator .creator__ava--letter{font-size:18px}.item-detail__creator .creator__name{color:var(--accent);font-weight:500;text-decoration:underline}.item-detail__creator.creator--link:hover .creator__name{color:var(--brand-violet)}.item-detail__divider{border:0;border-top:1px solid var(--line);margin:4px 0;width:100%}.item-detail__price-block{display:flex;flex-direction:column;gap:8px}.item-detail__price-label{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.item-detail__price{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--text)}.item-detail__diamond{width:30px;height:30px;color:var(--brand-violet)}.item-detail__price-value{font-size:30px;line-height:1}.item-detail__price--none{font-size:18px;color:var(--muted)}.item-detail__price--sale{flex-wrap:wrap;gap:10px 14px}.item-detail__price--sale .item-detail__price,.item-detail__price--sale .item-detail__price-value,.item-detail__price--sale .item-detail__diamond{color:var(--dcl-red)}.item-detail__price-was{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:line-through;font-weight:600;font-size:20px}.item-detail__diamond--was{width:18px;height:18px;color:var(--muted)}.item-detail__sale-badge{display:inline-flex;align-items:center;background:var(--dcl-red);color:#fff;font-weight:800;font-size:13px;letter-spacing:.03em;text-transform:uppercase;border-radius:6px;padding:4px 10px}.item-detail__countdown{display:inline-flex;align-items:center;gap:5px;background:var(--rarity-bg);color:var(--accent);font-size:13px;font-weight:700;border-radius:6px;padding:4px 10px;white-space:nowrap}.item-detail__countdown .sale-countdown__ico{width:14px;height:14px}.item-detail__balance{font-size:13px}.item-detail__ctas{display:flex;flex-direction:column;gap:12px;margin-top:4px}.item-detail__cta{width:100%;height:48px;border-radius:8px;font-size:15px;text-align:center}.item-detail__addcart{width:100%;height:48px;display:flex;align-items:center;justify-content:center;gap:8px;background:var(--black-btn);color:var(--soft-white);border:0;border-radius:8px;font-weight:600;font-size:15px;text-transform:uppercase;letter-spacing:.046em;cursor:pointer;transition:filter .15s ease}.item-detail__addcart:hover:not(:disabled){filter:brightness(1.35)}.item-detail__addcart:disabled{opacity:.55;cursor:default}.item-detail__addcart-ico{width:20px;height:20px}.item-detail__status{margin:0;font-size:13px}.item-detail__own-note{margin:0;font-size:14px}.item-detail__own-note a{color:var(--accent);font-weight:600}@media(max-width:900px){.item-detail__title{font-size:20px;line-height:24px}.item-detail__info-head{order:0}.item-detail__chips{order:1}.item-detail__meta{order:2;grid-template-columns:1fr}.item-detail__description{order:3}.item-detail__divider{order:4}.item-detail__price-block{order:5}.item-detail__ctas{order:6}.item-detail__status{order:7}}.collection-carousel{margin-top:64px}.collection-carousel__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.collection-carousel__title{font-size:22px;font-weight:700;color:var(--text)}.collection-carousel__viewall{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:0;color:var(--accent);font-weight:700;font-size:13px;letter-spacing:.046em;text-transform:uppercase;cursor:pointer;white-space:nowrap}.collection-carousel__viewall:hover{text-decoration:underline}.collection-carousel__viewall-ico{width:16px;height:16px;transform:rotate(-90deg)}.collection-carousel__viewport{position:relative}.collection-carousel__arrow{position:absolute;top:calc(50% - 22px);transform:translateY(-50%);z-index:3;width:52px;height:52px;border-radius:50%;border:0;background:#fff;color:var(--text);font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:0 6px 16px #16151829;transition:transform .12s ease,box-shadow .12s ease,opacity .12s ease}.collection-carousel__arrow--left{left:-10px}.collection-carousel__arrow--right{right:-10px}.collection-carousel__arrow:hover:not(:disabled){transform:translateY(-50%) scale(1.06);box-shadow:0 8px 20px #16151833}.collection-carousel__arrow:disabled{opacity:0;pointer-events:none}@media(prefers-reduced-motion:reduce){.collection-carousel__arrow{transition:none}}@media(max-width:900px){.collection-carousel__arrow{display:none}}.collection-carousel__track{display:flex;gap:16px;overflow-x:auto;padding:12px 10px;margin:0 -10px;scroll-snap-type:x proximity;scrollbar-width:none}.collection-carousel__track::-webkit-scrollbar{display:none}.collection-carousel__track>.card{flex:0 0 281px;scroll-snap-align:start}@media(max-width:720px){.collection-carousel__track>.card{flex:0 0 44vw}}.collection-carousel__dots{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:18px}.collection-carousel__dot{width:10px;height:10px;border-radius:50%;border:0;padding:0;background:var(--line-strong);opacity:.5;cursor:pointer;transition:opacity .12s ease,background .12s ease,transform .12s ease}.collection-carousel__dot:hover{opacity:.8}.collection-carousel__dot.is-active{background:var(--accent);opacity:1;transform:scale(1.1)}.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}
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bh8SuC59.js","assets/react-C51i12iP.js","assets/index-C0kv5kHB.js","assets/ethers-DwWf2RqE.js","assets/index-BcX-FSIU.css","assets/emotion-styled.browser.esm-hMeaJLB-.js","assets/CircularProgress-3Y_POW5D.js"])))=>i.map(i=>d[i]);
2
- import{j as e,r,d as be,a as je,u as ge,L as ye}from"./react-C51i12iP.js";import{_ as we,a as ie,H as Ne,K as Ie,J as Ce,aj as Ae,W as ke,g as L,e as re,ak as Ee,A as Se,l as X,u as ee,m as Le,b as F,al as Pe,v as V,am as Te,an as Re,ao as Fe,ap as $e,aq as Be,ar as qe,as as Me,o as We,C as $,at as te,au as De,q as Oe,d as Ve,j as ze,k as Ue,x as Ke,y as Ge,z as ae,i as Ye,E as He,w as Je,D as Qe,s as Ze,av as Xe,aw as et,ax as tt,F as at}from"./index-C0kv5kHB.js";import{a as se}from"./buy-DIwWkpJJ.js";import{g as st,a as it,w as rt,S as nt,G as lt}from"./buy-gasless-CFOJz7EI.js";import"./ethers-DwWf2RqE.js";import"./trade-encoding-3-fY1Skv.js";import"./index-t67nymVk.js";const ct=r.lazy(()=>we(()=>import("./index-Bh8SuC59.js").then(a=>a.i),__vite__mapDeps([0,1,2,3,4,5,6])).then(a=>({default:a.EmoteControls})));function dt(a){return e.jsx(r.Suspense,{fallback:null,children:e.jsx(ct,{...a})})}function ot({item:a}){const l=ie(c=>{var n;return(n=c.session)==null?void 0:n.address}),{data:s,isLoading:m}=Ne(l),N=l&&s?l:"default",_=a.category==="emote",[p,d]=r.useState("avatar"),f=!_&&p==="item",[A,t]=r.useState(!0);r.useEffect(()=>{t(!0)},[a.id,f]);const g=!!l&&!!s,o=g&&Ie(a,Ce(s)),b=Ae(a)[0],I=g&&!o&&!_;return e.jsxs(e.Fragment,{children:[m?null:e.jsx(ke,{id:"shop-item-preview",contractAddress:a.contractAddress,tokenId:a.tokenId??void 0,itemId:a.tokenId?void 0:a.itemId??void 0,profile:f?void 0:o?N:"default",bodyShape:f||o?void 0:b,type:_?void 0:f?L.PreviewType.WEARABLE:L.PreviewType.AVATAR,emote:_||f?void 0:L.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:_?1.5:void 0,wheelStart:_?100:void 0,dev:re.chainId===80002,onLoad:()=>t(!1)},a.id),m||A?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,I&&!f?e.jsxs("p",{className:"item-preview__note",children:["Shown on a ",Ee(b)," body — this item isn’t made for your avatar’s shape."]}):null,_?e.jsx("div",{className:"item-preview__emote-controls",children:e.jsx(dt,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":"Preview mode",children:[e.jsx("button",{type:"button",className:p==="avatar"?"is-active":"","aria-pressed":p==="avatar",onClick:()=>d("avatar"),children:"On avatar"}),e.jsx("button",{type:"button",className:p==="item"?"is-active":"","aria-pressed":p==="item",onClick:()=>d("item"),children:"Item"})]})]})}function mt({title:a,items:l,onViewAll:s}){const m=r.useRef(null),[N,_]=r.useState(1),[p,d]=r.useState(0),[f,A]=r.useState(!0),[t,g]=r.useState(!1),o=r.useCallback(()=>{const c=m.current;if(!c)return;const{scrollLeft:n,scrollWidth:y,clientWidth:v}=c,P=Math.max(1,Math.ceil(y/v));_(P),d(Math.min(P-1,Math.round(n/v))),A(n<=1),g(n+v>=y-1)},[]);if(r.useEffect(()=>{o();const c=m.current;if(c)return c.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o),()=>{c.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[o,l.length]),l.length===0)return null;function b(c){const n=m.current;n&&n.scrollBy({left:c*n.clientWidth,behavior:"smooth"})}function I(c){const n=m.current;n&&n.scrollTo({left:c*n.clientWidth,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:a}),s?e.jsxs("button",{className:"collection-carousel__viewall",onClick:s,children:["View all",e.jsx("span",{className:"ico ico-chevron collection-carousel__viewall-ico","aria-hidden":!0})]}):null]}),e.jsxs("div",{className:"collection-carousel__viewport",children:[e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>b(-1),"aria-label":"Scroll left",disabled:f,children:"‹"}),e.jsx("div",{className:"collection-carousel__track",ref:m,children:l.map(c=>e.jsx(Se,{item:c},c.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>b(1),"aria-label":"Scroll right",disabled:t,children:"›"})]}),N>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":"Carousel pages",children:Array.from({length:N}).map((c,n)=>e.jsx("button",{className:`collection-carousel__dot${n===p?" is-active":""}`,"aria-label":`Go to page ${n+1}`,"aria-current":n===p?"true":void 0,onClick:()=>I(n)},n))}):null]})}function ut(a){return Object.values(L.Rarity).includes(a)}function ht(a){return a==="male"?"Male":a==="female"?"Female":a==="unisex"?"Unisex":null}function _t(a){return a.wearableCategory?a.wearableCategory.replace(/_/g," "):a.category==="emote"?"Emote":"Wearable"}function pt(a){const l=a,s=(l.message??"").toLowerCase();return l.code===4001||s.includes("reject")||s.includes("denied")||s.includes("cancel")?"You cancelled the request.":s.includes("insufficient")?`You don't have enough ${Ze.name} — get more first.`:s.includes("no active listing")||s.includes("not for sale")?"This item is not for sale right now.":"Couldn't complete checkout — please try again."}function wt(){const{contractAddress:a,tokenId:l}=be(),{state:s}=je(),m=ge(),N=X(i=>i.add),_=X(i=>i.items),p=ee(i=>i.toggle),{session:d}=ie(),{data:f,isError:A}=Le(d),[t,g]=r.useState(()=>s!=null&&s.item?{...s.item,tradeId:s.tradeId??s.item.tradeId}:{id:`${a}-${l}`,name:"",creator:"",contractAddress:a??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:re.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:l??void 0,tradeId:s==null?void 0:s.tradeId}),[o,b]=r.useState(!1),[I,c]=r.useState(null),[n,y]=r.useState(null),{data:v=[],isFetched:P}=F({queryKey:["collection-items",t.contractAddress],enabled:!!t.contractAddress,queryFn:()=>Xe(t.contractAddress,{first:20}).then(i=>i.items)}),{data:B,isLoading:ne}=F({queryKey:["shop-item",t.contractAddress,l],enabled:!(s!=null&&s.item)&&!!t.contractAddress&&!!l,queryFn:()=>et(t.contractAddress,l)});r.useEffect(()=>{B&&g(i=>i.tradeId?i:{...B})},[B]);const[z,le]=r.useState(!1),{data:q=""}=F({queryKey:["item-desc",t.contractAddress,t.itemId],enabled:!!t.contractAddress&&!!t.itemId,staleTime:5*6e4,queryFn:()=>tt(t.contractAddress,t.itemId)});r.useEffect(()=>{if(t.name||v.length===0)return;const i=l&&v.find(u=>u.tokenId===l||u.itemId===l)||v.find(u=>u.contractAddress===t.contractAddress);i&&g(u=>({...i,tradeId:u.tradeId??i.tradeId}))},[v]);const ce=r.useMemo(()=>{const i=new Set,u=[];for(const h of v){if(h.id===t.id||t.itemId&&h.itemId===t.itemId||t.tokenId&&h.tokenId===t.tokenId)continue;const S=`${h.contractAddress}-${h.itemId??h.tokenId??h.id}`;i.has(S)||(i.add(S),u.push(h))}return u},[v,t.id,t.itemId,t.tokenId]),{data:de,isLoading:k}=F({queryKey:["detail-trade",t.id,t.tradeId,t.contractAddress,t.itemId],enabled:!!t.contractAddress,queryFn:async()=>{if(t.tradeId)return t.tradeId;if(t.itemId){const i=await at(t.contractAddress,t.itemId);return(i==null?void 0:i.id)??null}return null}}),w=t.tradeId??de??void 0,j=!!w,oe=Pe({priceCredits:t.priceCredits,compareAtCredits:t.compareAtCredits,saleEndsAt:t.saleEndsAt}),E=r.useMemo(()=>({...t,tradeId:w,id:w??t.id}),[t,w]),M=_.some(i=>i.id===E.id),T=ee(i=>!!i.items[t.id]);r.useEffect(()=>{c(null),y(null)},[t.id]);const U=r.useRef(null);r.useEffect(()=>{!t.name||k||U.current===t.id||(U.current=t.id,V("Shop Viewed Item",{...Te(t),for_sale:j}),Re(t))},[t.id,t.name,k,j]);const R=`${a}/${l}`,K=r.useRef(R);r.useEffect(()=>{K.current!==R&&(K.current=R,s!=null&&s.item&&g({...s.item,tradeId:s.tradeId??s.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[R]);function me(){!j||M||Q||N(E,"item_detail")}async function ue(){var S;if(!j||!w)return;if(!d){y("Sign in to check out.");return}y(null),b(!0);let i,u="authorize",h=!1;try{c(`Buying ${t.name||"item"}…`);const x=await Ve(w);if(!x)throw new Error("not for sale");if(ze(x,d.address)){y("You can't buy your own listing."),c(null),b(!1);return}const W=(S=x.received)==null?void 0:S[0],ve=Ue(W==null?void 0:W.amount),{credit:Z,maxCreditedValue:xe}=await Ke(d.identity,ve,w);i=Z.id,u="submit";const D={trade:x,buyer:d.address,signer:d.signer,credits:[Z],maxCreditedValue:xe};let C;if(st())try{C=await it(D),await rt(C),h=!0}catch(O){if(O instanceof nt)h=!0;else if(O instanceof lt)C=await se(D);else throw O}else C=await se(D);i=void 0,V("Shop Completed Purchase",{...Ge([E]),payment_type:"credits",no_crypto_step:h,transaction_hash:C??null}),m("/success",{state:{items:[E],txHash:C}})}catch(x){ae(x)||Ye(x,{flow:"buy",step:u,gasless:h}),i&&He(d.identity,[i]).catch(()=>{}),V(ae(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:u,error_code:Qe(x),value_usd:Je(E.priceCredits)}),y(pt(x)),c(null)}finally{b(!1)}}const G=ut(t.rarity)?t.rarity:L.Rarity.COMMON,Y=ht(t.gender),H=Fe(t),J=$e(t.gender),he=j&&oe,_e="More from this collection",Q=Be(t,d==null?void 0:d.address),pe=j?M?"In cart":k?"Checking…":"Add to cart":"Not for sale",fe=ne||!!t.contractAddress&&!P;return!t.name&&!fe?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 Collectibles for something else."}),e.jsx("button",{className:"btn btn--purple",onClick:()=>m("/assets"),children:"Browse Collectibles"})]}):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:t.name||"Item"})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsx("div",{className:"item-detail__preview",children:t.name?e.jsx(ot,{item:t}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":"Loading preview",children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})})}),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:t.name||"Loading…"}),e.jsx("button",{className:`item-detail__fav${T?" is-on":""}`,onClick:()=>p(t),"aria-pressed":T,"aria-label":T?"Remove from favorites":"Add to favorites",children:e.jsx("span",{className:`ico ${T?"ico-heart-solid":"ico-heart"}`,"aria-hidden":!0})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:Me(G),color:qe(G)},children:t.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[H?e.jsx("span",{className:`ico ico-${H} item-detail__chip-ico`,"aria-hidden":!0}):null,_t(t)]}),Y?e.jsxs("span",{className:"chip item-detail__chip",children:[J?e.jsx("span",{className:`ico ico-${J} item-detail__chip-ico`,"aria-hidden":!0}):null,Y]}):null]}),q?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:"Description"}),e.jsx("p",{className:`item-detail__desc-text${z?" is-expanded":""}`,children:q}),q.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>le(i=>!i),children:z?"Show less":"Read more"}):null]}):null,t.creator?e.jsx("div",{className:"item-detail__meta",children:e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:"Creator"}),e.jsx(We,{address:t.creator,className:"item-detail__creator",linkToProfile:!0})]})}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsxs("div",{className:"item-detail__price-block",children:[e.jsx("div",{className:"item-detail__price-label",children:"Price"}),j?he?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx($,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:t.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx($,{className:"item-detail__diamond item-detail__diamond--was"}),t.compareAtCredits]}),te(t.compareAtCredits,t.priceCredits)>0?e.jsxs("span",{className:"item-detail__sale-badge",children:["SALE -",te(t.compareAtCredits,t.priceCredits),"%"]}):null,e.jsx(De,{endsAt:t.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx($,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:t.priceCredits})]}):e.jsx("div",{className:"item-detail__price item-detail__price--none",children:"Not for sale"}),d?e.jsxs("div",{className:"item-detail__balance muted",children:["Your balance: ",e.jsx($,{className:"ccy-mark"})," ",Oe(f,A)]}):null]}),e.jsx("div",{className:"item-detail__ctas",children:Q?e.jsxs("p",{className:"item-detail__own-note muted",children:["This is your item — manage it in ",e.jsx(ye,{to:"/my-assets",children:"My Assets"}),"."]}):e.jsxs(e.Fragment,{children:[j?e.jsx("button",{className:"btn btn--purple item-detail__cta",onClick:ue,disabled:o||k,children:o?"Buying…":"Buy now"}):null,e.jsxs("button",{className:"item-detail__addcart",onClick:me,disabled:!j||M||k||o,children:[e.jsx("span",{className:"ico ico-cart-solid item-detail__addcart-ico","aria-hidden":!0}),pe]})]})}),I?e.jsx("p",{className:"muted item-detail__status",children:I}):null,n?e.jsx("p",{className:"error item-detail__status",children:n}):null]})]}),e.jsx(mt,{title:_e,items:ce,onViewAll:t.contractAddress?()=>m(`/collection/${t.contractAddress}`):void 0})]})}export{wt as ItemDetail,wt as default};
@@ -1 +0,0 @@
1
- import{u as U,r as d,j as s,L as re}from"./react-C51i12iP.js";import{g as Z,e as V,af as le,n as B,C as q,s as w,p as ee,v as P,ae as G,i as W,D as se,a as ce,b as Y,az as oe,d as de,aA as me}from"./index-C0kv5kHB.js";import{f as ue}from"./import-C0KzuCTc.js";import{c as he}from"./buy-DIwWkpJJ.js";import{a as pe,b as ge,i as be,e as ye,c as xe}from"./trade-encoding-3-fY1Skv.js";import{s as je}from"./wallet-kind-DmRQR63L.js";import{L as fe}from"./LoadMore-DsKzH4Rv.js";import{u as _e}from"./useInfiniteGrid-BeqyJL-J.js";import"./ethers-DwWf2RqE.js";import"./mana-rate-DObImZN2.js";import"./index-t67nymVk.js";const F=()=>`${V.builderServerUrl}/v1`;function ae(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 ne(e,i){const n=await le(e,{method:"GET",identity:i,metadata:{}});if(!n.ok)throw new Error(`builder-server ${n.status}: ${await n.text()}`);const c=await n.json();return c.data??c}function Ne(e,i){const n=i-e;return n>0?n:0}function ve(e){var i,n,c,r,l;return((n=(i=e.data)==null?void 0:i.wearable)==null?void 0:n.category)??((r=(c=e.data)==null?void 0:c.emote)==null?void 0:r.category)??((l=e.data)==null?void 0:l.category)??e.type??"wearable"}function z(e){return`${F()}/storage/contents/${e}`}function $(e,i){if(!e)return"";if(/^https?:\/\//.test(e))return e;const n=i==null?void 0:i[e];return n?z(n):/^(ba|Qm)/.test(e)?z(e):""}async function Ie(e,i){try{const n=await fetch(`${F()}/items/${e}/${i}/contents`);if(!n.ok)return{};const c=await n.json();return c.data??c}catch{return{}}}async function ke(e,i,n){const c=$(e.thumbnail,e.contents)||$("thumbnail.png",e.contents);if(c)return c;if(i&&n){const r=await Ie(i,n);return $(e.thumbnail,r)||$("thumbnail.png",r)||$("image.png",r)}return""}async function Se(e,i){const n=`${F()}/${e.toLowerCase()}/collections?is_published=true`,c=await ne(n,i);return ae(c).filter(r=>r.is_published&&!!r.contract_address).map(r=>({id:r.id,name:r.name,contractAddress:r.contract_address.toLowerCase(),isPublished:r.is_published,isApproved:r.is_approved,minters:(r.minters??[]).map(l=>l.toLowerCase())}))}async function we(e,i){const n=`${F()}/collections/${e.id}/items`,c=await ne(n,i);return(await Promise.all(ae(c).map(async l=>{const v=l.rarity??"common",f=Number(l.total_supply??0)||0;let m=0;try{m=Z.Rarity.getMaxSupply(v)}catch{m=0}const _=(l.contract_address??e.contractAddress).toLowerCase(),p=l.blockchain_item_id??"";return{id:l.id,collectionId:e.id,collectionName:e.name,contractAddress:_,blockchainItemId:p,name:l.name,category:ve(l),rarity:v,thumbnail:await ke(l,_,p),type:l.type??"wearable",isPublished:l.is_published??e.isPublished,isApproved:l.is_approved??e.isApproved,totalSupply:f,maxSupply:m,remainingSupply:Ne(f,m),minters:e.minters}}))).filter(Ce)}function Ce(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function Ae(e,i){const n=await Se(e,i);return(await Promise.all(n.map(async r=>{try{return await we(r,i)}catch{return[]}}))).flat()}const Pe=1e3*60*60*24*182;function $e(e){const i=e,n=(i.message??"").toLowerCase();return i.code===4001||n.includes("reject")||n.includes("denied")||n.includes("cancel")?"You cancelled the request.":"Couldn't list your item — please try again."}function Le({asset:e,session:i,onClose:n}){const c=B(),r=U(),[l,v]=d.useState("10"),[f,m]=d.useState(null),[_,p]=d.useState(null),[g,k]=d.useState(!1),[j,I]=d.useState(null);async function C(){p(null);const o=Number(l);if(!Number.isInteger(o)||o<=0){p("Enter a whole number of credits");return}k(!0);try{m("Getting your item ready…"),await pe({signer:i.signer,contractAddress:e.contractAddress,chainId:e.chainId}),m("Listing your item…");const N=await ge({signer:i.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:o/10,expiresAtMs:Date.now()+Pe});m("Publishing…"),await ee(N,i.identity),m(null),I(o),P("Shop Listed Item",{item_id:e.itemId??e.tokenId??null,contract_address:e.contractAddress,price_credits:o,price_usd:o/10,listing_type:"secondary",is_primary:!1}),G.success(`“${e.name}” is now on sale!`),c.invalidateQueries({queryKey:["my-assets",i.address]})}catch(N){W(N,{flow:"list_secondary"}),P("Shop Listing Failed",{listing_type:"secondary",error_code:se(N)}),p($e(N)),m(null)}finally{k(!1)}}function x(){n(),r(`/item/${e.contractAddress}/${e.tokenId}`)}return j!==null?s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:o=>o.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:[s.jsx(q,{className:"ccy-mark"})," ",j]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:x,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:o=>o.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 (",w.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:o=>v(o.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",w.name," (1 ",w.nameSingular," = $0.10)."]}),f?s.jsx("p",{className:"muted",children:f}):null,_?s.jsx("p",{className:"error",children:_}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:C,disabled:g,children:g?"Listing…":"Put on sale"})]})]})})}const Ee=1e3*60*60*24*182;function Me(e){const i=e,n=(i.message??"").toLowerCase();return i.code===4001||n.includes("reject")||n.includes("denied")||n.includes("cancel")?"You cancelled the request.":"Couldn't publish your item — please try again."}function qe({item:e,session:i,onClose:n}){const c=B(),r=U(),[l,v]=d.useState("10"),[f,m]=d.useState(null),[_,p]=d.useState(null),[g,k]=d.useState(!1),[j,I]=d.useState(null),[C,x]=d.useState(null),o=V.chainId,N=je(i.providerType);d.useEffect(()=>{let u=!1;return(async()=>{try{const b=await be({contractAddress:e.contractAddress,chainId:o});u||I(b)}catch{u||I(!1)}})(),()=>{u=!0}},[e.contractAddress,o]);async function T(){p(null);const u=Number(l);if(!Number.isInteger(u)||u<=0){p("Enter a whole number of credits");return}k(!0);try{j||(m("Enabling sales for this collection…"),await ye({signer:i.signer,contractAddress:e.contractAddress,chainId:o}),I(!0)),m("Publishing your item…");const b=await xe({signer:i.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:Z.Network.MATIC,chainId:o},usdPrice:u/10,uses:e.remainingSupply,expiresAtMs:Date.now()+Ee});m("Finishing up…"),await ee(b,i.identity),m(null),x(u),P("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:u,price_usd:u/10,listing_type:"primary",is_primary:!0}),G.success(`“${e.name}” is now on sale!`),c.invalidateQueries({queryKey:["publishable-items"]}),c.invalidateQueries({queryKey:["collection-sale-state"]})}catch(b){W(b,{flow:"list_primary"}),P("Shop Listing Failed",{listing_type:"primary",error_code:se(b)}),p(Me(b)),m(null)}finally{k(!1)}}function O(){n(),r(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const L=g?"Listing…":j===!1?"Enable & put on sale":"Put on sale";return C!==null?s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:u=>u.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:[s.jsx(q,{className:"ccy-mark"})," ",C]})," · ",e.remainingSupply.toLocaleString()," available"]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,children:"Done"}),s.jsx("button",{className:"btn btn--purple",onClick:O,children:"View in Shop"})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:n,role:"presentation",children:s.jsxs("div",{className:"modal",onClick:u=>u.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 (",w.name,")"]}),s.jsx("input",{type:"number",min:"1",step:"1",value:l,onChange:u=>v(u.target.value),disabled:g})]}),s.jsxs("p",{className:"muted small",children:["Priced in whole ",w.name," (1 ",w.nameSingular," = $0.10)."]}),j===!1&&!g?N?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."]}):j===!0&&!g?N?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,f?s.jsx("p",{className:"muted",children:f}):null,_?s.jsx("p",{className:"error",children:_}):null,s.jsxs("div",{className:"modal__actions",children:[s.jsx("button",{className:"btn btn--ghost",onClick:n,disabled:g,children:"Cancel"}),s.jsx("button",{className:"btn",onClick:T,disabled:g||j===null,children:j===null?"Checking…":L})]})]})})}const Fe=48;function Te(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,isSmart:!1,tokenId:e.tokenId}}function J(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:V.chainId,thumbnail:e.thumbnail,priceCredits:0,gender:null,isSmart:!1}}function He(){const{session:e,error:i,signIn:n,restore:c}=ce(),r=U(),l=B(),[v,f]=d.useState(null),[m,_]=d.useState(null),[p,g]=d.useState(null),[k,j]=d.useState(null);function I(a){const t=a.tokenId??a.itemId??"";!a.contractAddress||!t||r(`/item/${a.contractAddress}/${t}`,{state:{item:a}})}async function C(a,t,h){if(e){j(null),g(h);try{const y=await de(a);await he({trade:y,signer:e.signer}),G.success(`“${t}” is no longer for sale.`),await l.invalidateQueries({queryKey:["my-assets",e.address]}),await l.invalidateQueries({queryKey:["collection-sale-state"]})}catch(y){const E=y,M=(E.message??"").toLowerCase(),X=E.code===4001||M.includes("reject")||M.includes("denied");X||W(y,{flow:"remove-listing",tradeId:a}),j(X?"You cancelled the request.":"Couldn't remove the listing — please try again.")}finally{g(null)}}}d.useEffect(()=>{c()},[c]);const x=e==null?void 0:e.address,{items:o,isLoading:N,error:T,hasNextPage:O,isFetchingNextPage:L,fetchNextPage:u}=_e(["my-assets",x],a=>oe(x,{first:Fe,skip:a}).then(t=>({items:t.assets,total:t.total})),{enabled:!!x}),{data:b}=Y({queryKey:["importable",x],queryFn:()=>ue(x),enabled:!!x}),R=((b==null?void 0:b.creations.length)??0)+((b==null?void 0:b.owned.length)??0),{data:A,isLoading:te,isError:ie}=Y({queryKey:["publishable-items",x],queryFn:()=>Ae(x,e.identity),enabled:!!e,retry:!1}),K=d.useMemo(()=>[...new Set((A??[]).map(a=>a.contractAddress))],[A]),{data:S}=Y({queryKey:["collection-sale-state",x,K],enabled:K.length>0,queryFn:async()=>{const a=await Promise.all(K.map(async h=>[h,await me(h)])),t={};for(const[h,y]of a)for(const[E,M]of Object.entries(y))t[`${h}-${E}`]=M;return t}}),Q=a=>S==null?void 0:S[`${a.contractAddress}-${a.blockchainItemId}`],D=d.useMemo(()=>(A??[]).filter(a=>{var t;return(t=Q(a))==null?void 0:t.isOnSale}),[A,S]),H=d.useMemo(()=>{var t;const a=new Map;for(const h of A??[]){if((t=S==null?void 0:S[`${h.contractAddress}-${h.blockchainItemId}`])!=null&&t.isOnSale)continue;const y=a.get(h.collectionId)??{id:h.collectionId,name:h.collectionName,items:[]};y.items.push(h),a.set(h.collectionId,y)}return[...a.values()]},[A,S]);return e?s.jsxs("section",{className:"myassets",children:[s.jsx("h1",{children:"My Assets"}),R>0?s.jsxs(re,{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 ",R," item",R===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."})]}),T?s.jsx("p",{className:"error",children:"Couldn’t load your items — please try again."}):null,k?s.jsx("p",{className:"error",children:k}):null,s.jsxs("div",{className:"asset-grid",children:[N?Array.from({length:8}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`sk-${t}`)):o.map(a=>s.jsxs("article",{className:"asset-card asset-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${a.name}`,onClick:()=>I(Te(a))}),s.jsx("div",{className:"asset-card__img",children:a.image?s.jsx("img",{src:a.image,alt:a.name}):null}),s.jsx("div",{className:"asset-card__name",title:a.name,children:a.name}),a.isOnSale?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"asset-card__listed",children:[s.jsxs("span",{className:"asset-card__price",children:[s.jsx(q,{className:"ccy-mark"})," ",a.listingPrice]}),s.jsx("span",{className:"badge",children:"On sale"})]}),s.jsx("button",{className:"btn btn--sm btn--ghost asset-card__remove",disabled:p===a.id||!a.tradeId,onClick:t=>{t.stopPropagation(),a.tradeId&&C(a.tradeId,a.name,a.id)},children:p===a.id?"Removing…":"Remove listing"})]}):s.jsx("button",{className:"btn btn--sm",onClick:t=>{t.stopPropagation(),P("Shop Started Listing",{listing_type:"secondary",item_id:a.itemId??a.tokenId??null}),f(a)},children:"Put on sale"})]},a.id)),L?Array.from({length:4}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`msk-${t}`)):null]}),s.jsx(fe,{hasNextPage:O,isFetching:L,onLoadMore:()=>void u()}),!N&&o.length===0?s.jsx("p",{className:"muted",children:"No items in your wardrobe 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 ",w.name," and buyers pay with"," ",w.name,"."]})]}),te?s.jsx("div",{className:"publish-grid",children:Array.from({length:4}).map((a,t)=>s.jsx("div",{className:"asset-card asset-card--skeleton"},`pub-sk-${t}`))}):ie?s.jsx("p",{className:"publish-empty",children:"We couldn’t load your collections right now. Please try again in a moment."}):D.length===0&&H.length===0?s.jsx("p",{className:"publish-empty",children:"You don’t have any items to publish yet."}):s.jsxs(s.Fragment,{children:[D.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:D.map(a=>{var t;return s.jsxs("article",{className:"publish-card publish-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${a.name}`,onClick:()=>I(J(a))}),s.jsx("div",{className:"publish-card__img",children:a.thumbnail?s.jsx("img",{src:a.thumbnail,alt:a.name}):null}),s.jsx("div",{className:"publish-card__name",title:a.name,children:a.name}),s.jsxs("div",{className:"publish-card__listed",children:[s.jsxs("span",{className:"publish-card__price",children:[s.jsx(q,{className:"ccy-mark"})," ",((t=Q(a))==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===a.id,onClick:h=>{h.stopPropagation();const y=Q(a);y!=null&&y.tradeId&&C(y.tradeId,a.name,a.id)},children:p===a.id?"Removing…":"Remove listing"})]},`${a.contractAddress}-${a.blockchainItemId}`)})})]}):null,H.map(a=>s.jsxs("div",{className:"creations-collection",children:[s.jsx("h3",{className:"creations-collection__name",children:a.name}),s.jsx("div",{className:"publish-grid",children:a.items.map(t=>s.jsxs("article",{className:"publish-card publish-card--link",children:[s.jsx("button",{className:"card-link-overlay","aria-label":`View ${t.name}`,onClick:()=>I(J(t))}),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:h=>{h.stopPropagation(),P("Shop Started Listing",{listing_type:"primary",item_id:t.blockchainItemId}),_(t)},children:"Put on sale"})]},`${t.contractAddress}-${t.blockchainItemId}`))})]},a.id))]})]}),v?s.jsx(Le,{asset:v,session:e,onClose:()=>f(null)}):null,m?s.jsx(qe,{item:m,session:e,onClose:()=>_(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:()=>n(),children:"Sign in"})}),i?s.jsx("p",{className:"error",children:i}):null]})}export{He as MyAssets};
@@ -1 +0,0 @@
1
- import{j as t,L as n}from"./react-C51i12iP.js";import{t as o}from"./index-C0kv5kHB.js";import"./ethers-DwWf2RqE.js";function i(){return t.jsxs("div",{className:"notfound",children:[t.jsx("span",{className:"ico ico-cart notfound__ico","aria-hidden":!0}),t.jsx("h1",{className:"notfound__title",children:o("notFound.title")}),t.jsx("p",{className:"muted",children:o("notFound.body")}),t.jsx(n,{className:"btn btn--purple",to:"/assets",children:o("notFound.cta")})]})}export{i as NotFound,i as default};
@@ -1 +0,0 @@
1
- import{j as e,a as E,u as $,N as F,r as w}from"./react-C51i12iP.js";import{a as T,H as C,I as V,J as M,K as R,L,M as B,W as I,g as _,e as g,N as K}from"./index-C0kv5kHB.js";import{s as O}from"./wallet-kind-DmRQR63L.js";import{w as U,S as W}from"./buy-gasless-CFOJz7EI.js";import"./ethers-DwWf2RqE.js";import"./trade-encoding-3-fY1Skv.js";import"./index-t67nymVk.js";function Y(){return e.jsxs("div",{className:"success-anim",role:"img","aria-label":"Purchase successful",children:[e.jsxs("svg",{className:"success-anim__svg",viewBox:"0 0 120 120",children:[e.jsx("circle",{className:"success-anim__ring",cx:"60",cy:"60",r:"54"}),e.jsx("path",{className:"success-anim__check",d:"M37 61 l16 16 l30 -34"})]}),e.jsx("span",{className:"success-anim__spark success-anim__spark--1","aria-hidden":!0,children:"✦"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--2","aria-hidden":!0,children:"✦"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--3","aria-hidden":!0,children:"◈"}),e.jsx("span",{className:"success-anim__spark success-anim__spark--4","aria-hidden":!0,children:"✦"})]})}const z=n=>new Promise(s=>setTimeout(s,n));function H(n,s){const[a,l]=w.useState(n?"pending":"confirmed"),o=s?`${s.owner}-${s.contractAddress}-${s.itemId}`:"";return w.useEffect(()=>{if(!n)return;let r=!1;return(async()=>{let t=!1;for(let m=0;m<20&&!r;m++)try{await U(n,{timeoutMs:15e3}),t=!0;break}catch(d){if(d instanceof W)continue;r||l("failed");return}if(!r){if(!t){l("timed-out");return}if(!s){l("confirmed");return}l("indexing");for(let m=0;m<40&&!r;m++){if(await K(s.owner,s.contractAddress,s.itemId)){r||l("confirmed");return}await z(3e3)}r||l("timed-out")}})(),()=>{r=!0}},[n,o]),a}const J=g.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump",x=g.chainId===80002?"https://amoy.polygonscan.com/tx/":"https://polygonscan.com/tx/";function se(){const{state:n}=E(),s=$(),{session:a}=T(),{data:l}=C(a==null?void 0:a.address),o=n==null?void 0:n.txHash,r=(n==null?void 0:n.items)??[],t=r[0],m=a!=null&&a.address&&(t!=null&&t.contractAddress)&&(t!=null&&t.itemId)?{owner:a.address,contractAddress:t.contractAddress,itemId:t.itemId}:null,d=H(o,m),c=r;if(c.length===0)return e.jsx(F,{to:"/assets",replace:!0});const h=c[0],j=c.filter(i=>i.category!=="emote"),A=c.find(i=>i.category==="emote")??null,b=j.map(V).filter(i=>!!i),f=M(l),S=!!f&&j.every(i=>R(i,f)),P=L(j)??f??B,v=!!(a!=null&&a.address)&&S,y=v?a.address:"default",k=v?void 0:P,u=A??h,N=u.category==="emote",p=!!o&&O(a==null?void 0:a.providerType);return e.jsxs("div",{className:"success",children:[e.jsx("div",{className:"success__preview",children:b.length>0?e.jsx(I,{profile:y,bodyShape:k,urns:b,type:_.PreviewType.AVATAR,emote:_.PreviewEmote.FASHION,background:"ecebed",dev:g.chainId===80002},h.id):e.jsx(I,{contractAddress:u.contractAddress,tokenId:u.tokenId??void 0,itemId:u.tokenId?void 0:u.itemId??void 0,profile:y,bodyShape:N?void 0:k,type:N?void 0:_.PreviewType.AVATAR,emote:N?void 0:_.PreviewEmote.FASHION,background:"ecebed",dev:g.chainId===80002},u.id)}),e.jsx("div",{className:"success__panel",children:d==="pending"||d==="indexing"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"spinner success__spinner","aria-hidden":!0}),e.jsx("h1",{className:"success__title",children:d==="indexing"?"Finalizing your purchase…":"Processing your purchase…"}),e.jsx("p",{className:"success__sub",children:d==="indexing"?e.jsxs(e.Fragment,{children:["Payment confirmed — adding"," ",c.length===1?e.jsx("strong",{children:h.name}):`${c.length} items`," to your wardrobe. Almost there."]}):e.jsxs(e.Fragment,{children:["Confirming ",c.length===1?e.jsx("strong",{children:h.name}):`${c.length} items`," on-chain. This usually takes a few seconds — keep this tab open."]})}),p?e.jsx("div",{className:"success__links",children:e.jsx("a",{className:"success__receipt",href:`${x}${o}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"})}):null]}):d==="timed-out"?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"success__title",children:"Still processing…"}),e.jsxs("p",{className:"success__sub",children:["This is taking longer than usual to confirm. Your purchase may still complete — check"," ",e.jsx("button",{className:"link",onClick:()=>s("/my-purchases"),children:"My Purchases"})," in a few minutes to see the final status. No need to buy again."]}),e.jsx("div",{className:"success__links",children:p?e.jsx("a",{className:"success__receipt",href:`${x}${o}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null}),e.jsxs("div",{className:"success__actions",children:[e.jsx("button",{className:"btn btn--purple",onClick:()=>s("/my-purchases"),children:"View my purchases"}),e.jsx("button",{className:"btn btn--ghost",onClick:()=>s("/assets"),children:"Keep shopping"})]})]}):d==="failed"?e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"success__title",children:"Your purchase didn’t go through"}),e.jsx("p",{className:"success__sub",children:"The transaction failed on-chain, so nothing was delivered. Your credits weren’t spent (any hold is released shortly) — you can try again."}),e.jsx("div",{className:"success__links",children:p?e.jsx("a",{className:"success__receipt",href:`${x}${o}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null}),e.jsx("div",{className:"success__actions",children:e.jsx("button",{className:"btn btn--purple",onClick:()=>s("/assets"),children:"Back to shop"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Y,{}),e.jsx("h1",{className:"success__title",children:"It’s yours!"}),c.length===1?e.jsxs("p",{className:"success__sub",children:[e.jsx("strong",{children:h.name})," is now in your wardrobe."]}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"success__sub",children:[c.length," items are now in your wardrobe."]}),e.jsx("ul",{className:"success__list",children:c.map(i=>e.jsx("li",{children:i.name},i.id))})]}),e.jsxs("div",{className:"success__links",children:[e.jsx("button",{className:"success__receipt",onClick:()=>s("/my-purchases"),children:"View order"}),p?e.jsx("a",{className:"success__receipt",href:`${x}${o}`,target:"_blank",rel:"noreferrer",children:"View transaction ↗"}):null]}),e.jsxs("div",{className:"success__actions",children:[e.jsx("a",{className:"btn btn--purple",href:J,target:"_blank",rel:"noreferrer",children:"Use it in-world"}),e.jsx("button",{className:"btn btn--ghost",onClick:()=>s("/assets"),children:"Keep shopping"})]})]})})]})}export{se as Success,se as default};
@@ -1 +0,0 @@
1
- import{g as r}from"./react-C51i12iP.js";import{r as o}from"./browser-ponyfill-DMgE6PM5.js";var t=o();const f=r(t);export{f as o};
@@ -1 +0,0 @@
1
- import{g as A,e as N}from"./index-C0kv5kHB.js";import{d as l,f as C,g as E,h as y}from"./trade-encoding-3-fY1Skv.js";import{g as m,a as p,C as I}from"./index-t67nymVk.js";import{C as g,J as M,B as u}from"./ethers-DwWf2RqE.js";async function U(a){const t=a.received[0],r=t.amount??"0";if(t.assetType!==A.TradeAssetType.USD_PEGGED_MANA)return r;const c=m(p(a.contract),a.chainId),e=new M(N.rpcUrl),n=await new g(c.address,["function manaUsdAggregator() view returns (address)"],e).manaUsdAggregator(),s=new g(n,["function decimals() view returns (uint8)","function latestRoundData() view returns (uint80,int256,uint256,uint256,uint80)"],e),i=await s.decimals(),w=await s.latestRoundData(),f=u.from(w[1]);return u.from(r).mul(u.from(10).pow(i)).div(f).mul(102).div(100).toString()}async function b(a,t,r){const c=r.provider;await C(c,a);const e=await c.getNetwork();if(e.chainId!==a)throw new Error(`Wrong network: wallet is on chain ${e.chainId}, expected ${a}. Switch networks and try again.`);const o=m(I.CreditsManager,a);return(await(await new g(o.address,o.abi,r).useCredits(t,y(a))).wait()).transactionHash}async function V(a){const{trade:t,signer:r}=a,c=(await r.getAddress()).toLowerCase();await C(r.provider,t.chainId);const e=m(p(t.contract),t.chainId),o=E(t,c);return(await(await new g(e.address,e.abi,r).cancelSignature([o],y(t.chainId))).wait()).transactionHash}async function $(a){const{trade:t,buyer:r,signer:c,credits:e}=a;if(e.length===0)throw new Error("No credits to spend");const o=m(p(t.contract),t.chainId),n=a.maxCreditedValue??await U(t),s=l(o.address,o.abi,[t],r,e,n);return b(t.chainId,s,c)}async function G(a){const{purchases:t,buyer:r,signer:c}=a;if(t.length===0)throw new Error("No items to buy");const e=new Map;for(const n of t){const s=`${n.trade.chainId}:${n.trade.contract.toLowerCase()}`,i=e.get(s);i?i.push(n):e.set(s,[n])}const o=[];for(const n of e.values()){const{chainId:s,contract:i}=n[0].trade,w=m(p(i),s),f=n.map(d=>d.trade),h=n.flatMap(d=>d.credits),v=n.reduce((d,k)=>d.add(u.from(k.maxCreditedValue)),u.from(0)).toString(),x=l(w.address,w.abi,f,r,h,v);o.push(await b(s,x,c))}return o}export{$ as a,G as b,V as c};
@@ -1 +0,0 @@
1
- import{r as x,j as e}from"./react-C51i12iP.js";import{t as N}from"./index-C0kv5kHB.js";const w=[{key:"all",labelKey:"categories.shopAll"},{key:"wearable",labelKey:"categories.wearables",expandable:!0,subs:[{key:"Head",labelKey:"categories.head",icon:"cat-head"},{key:"Upper Body",labelKey:"categories.upperBody",icon:"cat-upper"},{key:"Handwear",labelKey:"categories.handwear",icon:"cat-handwear"},{key:"Lower Body",labelKey:"categories.lowerBody",icon:"cat-lower"},{key:"Feet",labelKey:"categories.feet",icon:"cat-feet"},{key:"Accessories",labelKey:"categories.accessories",icon:"cat-accessories"},{key:"Skins",labelKey:"categories.skins",icon:"cat-skins"}]},{key:"emote",labelKey:"categories.emotes",expandable:!0,subs:[{key:"Dance",labelKey:"categories.dance",icon:"emote-dance"},{key:"Stunt",labelKey:"categories.stunt",icon:"emote-stunt"},{key:"Greetings",labelKey:"categories.greetings",icon:"emote-greetings"},{key:"Fun",labelKey:"categories.fun",icon:"emote-fun"},{key:"Poses",labelKey:"categories.poses",icon:"emote-poses"},{key:"Reactions",labelKey:"categories.reactions",icon:"emote-reactions"},{key:"Horror",labelKey:"categories.horror",icon:"emote-horror"},{key:"Miscellaneous",labelKey:"categories.miscellaneous",icon:"emote-misc"}]}];function A({category:i,subCategory:d,onCategory:m,onSub:u,title:p,flat:h=!1,collections:r=!1,onCollections:n}){const[y,_]=x.useState(()=>i==="wearable"?"wearable":null);function k(s){s.subs?_(b=>{const a=b!==s.key;return a&&m(s.key),a?s.key:null}):(m(s.key),_(null))}return e.jsxs("div",{className:`catfilter${h?" catfilter--flat":""}`,children:[p?e.jsx("p",{className:"catfilter__title",children:p}):null,w.map(s=>{const b=y===s.key&&!!s.subs,a=!r&&s.key===i;return e.jsxs("div",{className:"catfilter__group",children:[e.jsxs("button",{type:"button",className:`catfilter__cat${b?" is-expanded":""}${a?" is-selected":""}`,onClick:()=>k(s),children:[e.jsx("span",{className:"catfilter__cat-label",children:N(s.labelKey)}),s.expandable?e.jsx("span",{className:`ico ico-chevron catfilter__chev${b?" is-up":""}`,"aria-hidden":!0}):null]}),s.subs?e.jsx("div",{className:`catfilter__subs${b?" is-open":""}`,children:e.jsx("div",{className:"catfilter__subs-inner",children:s.subs.map(o=>e.jsx("button",{type:"button",className:`catfilter__sub${d===o.key?" is-active":""}`,onClick:()=>u(d===o.key?null:o.key),children:e.jsxs("span",{className:"catfilter__sub-left",children:[e.jsx("span",{className:`ico ico-${o.icon} catfilter__sub-ico`,"aria-hidden":!0}),e.jsx("span",{className:"catfilter__sub-label",children:N(o.labelKey)})]})},o.key))})}):null]},s.key)}),n?e.jsx("div",{className:"catfilter__group",children:e.jsx("button",{type:"button",className:`catfilter__cat${r?" is-selected":""}`,onClick:n,children:e.jsx("span",{className:"catfilter__cat-label",children:N("categories.collections")})})}):null]})}function K({options:i,value:d,onChange:m,label:u,placeholder:p,align:h="left",className:r="",ariaLabel:n,open:y,onOpenChange:_}){const[k,s]=x.useState(!1),a=y!==void 0?y:k,o=x.useRef(null),f=x.useRef(_);f.current=_;const t=x.useCallback(l=>{var v;y!==void 0?(v=f.current)==null||v.call(f,l):s(l)},[y]),j=i.find(l=>l.value===d),c=u??(j==null?void 0:j.label)??p;return x.useEffect(()=>{if(!a)return;function l(g){o.current&&!o.current.contains(g.target)&&t(!1)}function v(g){g.key==="Escape"&&t(!1)}return document.addEventListener("pointerdown",l),document.addEventListener("keydown",v),()=>{document.removeEventListener("pointerdown",l),document.removeEventListener("keydown",v)}},[a,t]),e.jsxs("div",{className:`dropdown${r?` ${r}`:""}`,ref:o,children:[e.jsxs("button",{type:"button",className:`dropdown__trigger${a?" is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,"aria-label":n,onClick:()=>t(!a),children:[e.jsx("span",{className:"dropdown__label",children:c}),e.jsx("span",{className:`ico ico-chevron dropdown__chev${a?" is-up":""}`,"aria-hidden":!0})]}),a?e.jsx("ul",{className:`dropdown__menu dropdown__menu--${h}`,role:"listbox",children:i.map(l=>e.jsx("li",{role:"none",children:e.jsx("button",{type:"button",role:"option","aria-selected":l.value===d,className:`dropdown__option${l.value===d?" is-active":""}`,onClick:()=>{m(l.value),t(!1)},children:l.label})},l.value))}):null]})}const $=["common","uncommon","rare","epic","legendary","mythic","unique","exotic"],S=[{key:"newest",label:"Newest",server:"newest"},{key:"price-asc",label:"Cheapest",server:"cheapest"},{key:"price-desc",label:"Most Expensive",server:"most_expensive"},{key:"name",label:"Name (A–Z)",server:"name"}];function E({panelKey:i,label:d,active:m,badge:u,panel:p,children:h}){const r=p.open===i;return e.jsxs("div",{className:"filterbar__item",children:[e.jsxs("button",{className:`filterbar__trigger${r?" is-open":""}${m?" is-active":""}`,onClick:()=>p.toggle(i),children:[d," ",u?e.jsx("span",{className:"filterbar__badge",children:u}):null," ",e.jsx("span",{className:`ico ico-chevron filterbar__chev${r?" is-up":""}`,"aria-hidden":!0})]}),r?h:null]})}function B({sort:i,onSort:d,sortOptions:m=S,total:u,loading:p,query:h,onOpenFilters:r,rarities:n,onToggleRarity:y,rarityOptions:_=$,anyActive:k,onClear:s,renderLeading:b,renderTrailing:a}){const[o,f]=x.useState(null),t={open:o,toggle:c=>f(l=>l===c?null:c),close:()=>f(null)},j=!!y||!!b||!!a;return e.jsxs(e.Fragment,{children:[o?e.jsx("div",{className:"filterbar__scrim",onClick:t.close,"aria-hidden":!0}):null,e.jsxs("div",{className:"browse__toolbar",children:[e.jsxs("span",{className:"browse__count",children:[p?"…":`${u.toLocaleString()} Item${u===1?"":"s"}`,h?` for “${h}”`:""]}),j?e.jsxs("div",{className:"filterbar__filters",children:[b==null?void 0:b(t),y?e.jsx(E,{panelKey:"rarity",label:"Rarity",active:((n==null?void 0:n.length)??0)>0,badge:(n==null?void 0:n.length)||void 0,panel:t,children:e.jsx("div",{className:"filter-pop filter-pop--rarity",children:_.map(c=>e.jsxs("label",{className:"filter-pop__check",children:[e.jsx("input",{type:"checkbox",checked:(n==null?void 0:n.includes(c))??!1,onChange:()=>y(c)}),e.jsx("span",{children:c})]},c))})}):null,a==null?void 0:a(t),k?e.jsx("button",{className:"filterbar__clear",onClick:()=>{s==null||s(),t.close()},children:"Clear all"}):null]}):e.jsx("div",{className:"browse__dropdowns",children:r?e.jsxs("button",{type:"button",className:"browse__filters-btn",onClick:r,children:[e.jsx("span",{className:"ico ico-filter","aria-hidden":!0}),"Filters"]}):null}),e.jsxs("div",{className:"filterbar__right",children:[e.jsxs("span",{className:"filterbar__count",children:[p?"…":`${u.toLocaleString()} item${u===1?"":"s"}`,h?` for “${h}”`:""]}),e.jsx(K,{label:"Sort by",ariaLabel:"Sort by",value:i,options:m.map(c=>({value:c.key,label:c.label})),onChange:d,align:"right",open:t.open==="sort",onOpenChange:c=>c?t.toggle("sort"):t.close()})]})]})]})}function R({count:i=12}){return e.jsx(e.Fragment,{children:Array.from({length:i}).map((d,m)=>e.jsx("div",{className:"card card--skeleton","aria-hidden":!0},m))})}const H={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"],Dance:["dance"],Stunt:["stunt"],Greetings:["greetings"],Fun:["fun"],Poses:["poses"],Reactions:["reactions"],Horror:["horror"],Miscellaneous:["miscellaneous"]};export{A as C,B as F,$ as R,S,R as a,H as b,E as c};
@@ -1 +0,0 @@
1
- .dropdown{position:relative;display:inline-block}.dropdown__trigger{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;min-width:190px;height:44px;padding:0 16px;background:#fff;border:1px solid var(--line-strong);border-radius:var(--radius-card);color:var(--text);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;cursor:pointer;transition:border-color .15s ease,background .15s ease}.dropdown__trigger:hover{border-color:#7c7788}.dropdown__trigger:focus-visible{outline:0;border-color:var(--accent)}.dropdown__trigger.is-open{border-color:transparent;background:linear-gradient(180deg,#f4f3f6,#dcdae1)}.dropdown__label{overflow:hidden;text-overflow:ellipsis}.dropdown__chev{width:18px;height:18px;color:#43404a;flex:none;transition:transform .15s ease}.dropdown__chev.is-up{transform:rotate(180deg)}.dropdown__menu{position:absolute;top:calc(100% + 8px);z-index:40;min-width:100%;list-style:none;margin:0;padding:8px;background:#fff;border-radius:var(--radius-card);box-shadow:0 14px 36px #16151829;animation:cart-pop-in .16s ease}.dropdown__menu--left{left:0}.dropdown__menu--right{right:0}.dropdown__option{display:block;width:100%;text-align:left;background:none;border:0;padding:12px 16px;border-radius:10px;font-size:16px;color:var(--text);white-space:nowrap;cursor:pointer}.dropdown__option:hover{background:#f5f4f7}.dropdown__option.is-active{color:var(--accent);font-weight:700}
@@ -1 +0,0 @@
1
- import{j as f}from"./react-C51i12iP.js";import{l as h,a as m,aq as p,C as A,ae as b}from"./index-C0kv5kHB.js";const F="https://cdn.decentraland.org/@dcl/shop/0.1.0-29527153652.commit-d2eebfa/assets/default-cover-7vUE644d.jpeg",C=2166136261,x=16777619,_=4294967295,$=.75,E=1,M="#ffffff",N=/[\p{L}\p{N}]/u;function S(t){let s=C>>>0;for(let n=0;n<t.length;n++)s^=t.charCodeAt(n),s=Math.imul(s,x)>>>0;return s>>>0}function T(t,s,n){const r=t>=1?t-Math.floor(t):t,i=Math.floor(r*6),c=r*6-i,o=n*(1-s),a=n*(1-s*c),d=n*(1-s*(1-c));switch(i%6){case 0:return{r:n,g:d,b:o};case 1:return{r:a,g:n,b:o};case 2:return{r:o,g:n,b:d};case 3:return{r:o,g:a,b:n};case 4:return{r:d,g:o,b:n};default:return{r:n,g:o,b:a}}}function u(t){return Math.max(0,Math.min(255,Math.round(t*255))).toString(16).padStart(2,"0")}function j({r:t,g:s,b:n}){return`#${u(t)}${u(s)}${u(n)}`}function I(t){if(!t)return"";let s="";for(let n=0;n<t.length;n++){const r=t[n];N.test(r)&&(s+=r)}return s}function U({name:t,hasClaimedName:s,ethAddress:n}){const r=I(t);return r?s||!n||n.length<=4?r:`${r}#${n.slice(-4)}`:""}function O(t){if(!t)return M;const n=S(t)/_;return j(T(n,$,E))}function y(t){return/^0x[a-fA-F0-9]{40}$/.test(t)?`${t.slice(0,6)}…${t.slice(-4)}`:t}function H({items:t,source:s}){const n=h(e=>e.add),r=h(e=>e.items.map(l=>l.id)),i=m(e=>{var l;return(l=e.session)==null?void 0:l.address}),c=t.filter(e=>e.priceCredits>0&&!p(e,i));if(c.length===0)return null;const o=new Set(r),a=c.filter(e=>!o.has(e.id)),d=c.reduce((e,l)=>e+l.priceCredits,0);function g(){a.forEach(e=>n(e,s)),b.success(`Added ${a.length} item${a.length===1?"":"s"} to your cart.`)}return f.jsxs("div",{className:"addall",children:[f.jsxs("span",{className:"addall__summary",children:[c.length," for sale · ",f.jsx(A,{className:"addall__diamond"})," ",d.toLocaleString()]}),f.jsx("button",{className:"btn btn--purple btn--sm addall__cta",onClick:g,disabled:a.length===0,children:a.length===0?"All in cart":`Add all (${a.length}) to cart`})]})}export{H as A,U as a,F as d,O as g,y as s};
@@ -1 +0,0 @@
1
- import{w as r}from"./utils-rl7KiNyp.js";import{d as a}from"./decimals-DKkXzXLC.js";import"./ethers-DwWf2RqE.js";import"./react-C51i12iP.js";import"./signing-BChtQR_k.js";import"./index-C0kv5kHB.js";async function s(c){return r(()=>a(c),{cacheKey:`${c.contract.chain.id}:${c.contract.address}:decimals`,cacheTime:Number.POSITIVE_INFINITY})}export{s as decimals};
@@ -1 +0,0 @@
1
- import{S as z,$ as I,a0 as j,a1 as q,a2 as A,a3 as D,a4 as G,a5 as R,a6 as U}from"./index-C0kv5kHB.js";import{r as c}from"./react-C51i12iP.js";var V=I,W=function(e){return e!=="theme"},E=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?V:W},O=function(e,t,s){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(d){return e.__emotion_forwardProp(d)&&i(d)}:i}return typeof r!="function"&&s&&(r=e.__emotion_forwardProp),r},$=function(e){var t=e.cache,s=e.serialized,r=e.isStringTag;return G(t,s,r),R(function(){return U(t,s,r)}),null},B=function o(e,t){var s=e.__emotion_real===e,r=s&&e.__emotion_base||e,i,d;t!==void 0&&(i=t.label,d=t.target);var b=O(e,t,s),w=b||E(r),_=!w("as");return function(){var m=arguments,l=s&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&l.push("label:"+i+";"),m[0]==null||m[0].raw===void 0)l.push.apply(l,m);else{var S=m[0];l.push(S[0]);for(var x=m.length,p=1;p<x;p++)l.push(m[p],S[p])}var n=j(function(a,u,v){var P=_&&a.as||r,f="",F=[],h=a;if(a.theme==null){h={};for(var C in a)h[C]=a[C];h.theme=c.useContext(q)}typeof a.className=="string"?f=A(u.registered,F,a.className):a.className!=null&&(f=a.className+" ");var N=D(l.concat(F),u.registered,h);f+=u.key+"-"+N.name,d!==void 0&&(f+=" "+d);var k=_&&b===void 0?E(P):w,g={};for(var y in a)_&&y==="as"||k(y)&&(g[y]=a[y]);return g.className=f,v&&(g.ref=v),c.createElement(c.Fragment,null,c.createElement($,{cache:u,serialized:N,isStringTag:typeof P=="string"}),c.createElement(P,g))});return n.displayName=i!==void 0?i:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",n.defaultProps=e.defaultProps,n.__emotion_real=n,n.__emotion_base=r,n.__emotion_styles=l,n.__emotion_forwardProp=b,Object.defineProperty(n,"toString",{value:function(){return"."+d}}),n.withComponent=function(a,u){var v=o(a,z({},t,u,{shouldForwardProp:O(n,u,!0)}));return v.apply(void 0,l)},n}},H=["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"],T=B.bind(null);H.forEach(function(o){T[o]=T(o)});export{T as n};
@@ -1 +0,0 @@
1
- import{h as i}from"./signing-BChtQR_k.js";import"./utils-rl7KiNyp.js";import"./ethers-DwWf2RqE.js";import"./react-C51i12iP.js";import"./index-C0kv5kHB.js";async function n(t,e){const a=await t({method:"eth_estimateGas",params:[e]});return i(a)}export{n as eth_estimateGas};
@@ -1 +0,0 @@
1
- import{n as e,a as r}from"./signing-BChtQR_k.js";import"./utils-rl7KiNyp.js";import"./ethers-DwWf2RqE.js";import"./react-C51i12iP.js";import"./index-C0kv5kHB.js";async function b(t,o){const n=await t({method:"eth_getTransactionCount",params:[o.address,o.blockNumber?e(o.blockNumber):o.blockTag||"pending"]});return r(n)}export{b as eth_getTransactionCount};
@@ -1 +0,0 @@
1
- import{g as i}from"./wallets-CH6ovtsY.js";import"./signing-BChtQR_k.js";import"./utils-rl7KiNyp.js";import"./ethers-DwWf2RqE.js";import"./react-C51i12iP.js";import"./index-C0kv5kHB.js";import"./store-CraP4F4Y.js";import"./hashTypedData-B8qJCKv2.js";import"./index-CEeQH9eo.js";import"./events-DQ172AOg.js";import"./index-DT90wIp1.js";import"./index-CjpJ162L.js";import"./index-nibyPLVP.js";import"./index-CJdot1dH.js";import"./index-sr7QrKQZ.js";import"./ethereum-CD3dxaW_.js";async function x(o){const l=await i(o);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:o,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{x as getEcosystemWalletInfo};