@dcl/shop 0.1.0-29941568358.commit-de47e56 → 0.1.0-29942650568.commit-3cdb6da

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 (234) hide show
  1. package/assets/{AnimatedBackground-cMeJUDnS.js → AnimatedBackground-CysLhvvU.js} +3 -3
  2. package/assets/{Assets-D4bmQvg2.js → Assets-DsvJ5f0v.js} +15 -15
  3. package/assets/{Assets.styles-JIZQe0rQ.js → Assets.styles-CA7lhkqC.js} +28 -29
  4. package/assets/{Authorizations-Bxum5Ckz.js → Authorizations-vnz0r2Ax.js} +3 -3
  5. package/assets/Cart-CTQAeaCb.js +3 -0
  6. package/assets/{CircularProgress-DVvK_YYJ.js → CircularProgress-BoWkcKSM.js} +5 -5
  7. package/assets/{Collection-CCeBHPqN.js → Collection-DFg8H4cI.js} +1 -1
  8. package/assets/{CollectionCarousel-CfEwak3h.js → CollectionCarousel-BgmGp9gP.js} +1 -1
  9. package/assets/{ConstantsUtil-CPwpahR3.js → ConstantsUtil-DO6FyoSW.js} +1 -1
  10. package/assets/{ContentClient-DWUTshFt.js → ContentClient-Xp597FfN.js} +1 -1
  11. package/assets/Creator-DpJL7xsg.js +1 -0
  12. package/assets/{CssVarsProvider-CaTQjQty.js → CssVarsProvider-CVkDPUQi.js} +3 -3
  13. package/assets/{DeploymentBuilder-BeZK0qfR.js → DeploymentBuilder-Ba-Y42wz.js} +1 -1
  14. package/assets/{ErrorNotice-DDr3KjIH.js → ErrorNotice-BDH9xoG4.js} +1 -1
  15. package/assets/{ExchangeController-ZePEIh3m.js → ExchangeController-XYLG0Onl.js} +1 -1
  16. package/assets/{GetCredits-BcaMNIRG.js → GetCredits-C41Akzju.js} +1 -1
  17. package/assets/{HelpersUtil-CRTK_83W.js → HelpersUtil-CXmyL-9f.js} +1 -1
  18. package/assets/{ImportListings-9YfzHduB.js → ImportListings-DL4qvnkm.js} +1 -1
  19. package/assets/ItemDetail-8kxMVjol.js +78 -0
  20. package/assets/{LoadMore-BK9c312B.js → LoadMore-DwH_uJJ9.js} +1 -1
  21. package/assets/{MarketCheckout-BxM5rUvM.js → MarketCheckout-0NCiBi_9.js} +2 -2
  22. package/assets/MyAssets-ChdfSyve.js +258 -0
  23. package/assets/{MyFavorites-DWjt5m8Z.js → MyFavorites-BAgv7K26.js} +1 -1
  24. package/assets/{MyPurchases--MUfwO_U.js → MyPurchases-DlfJ7xtX.js} +4 -4
  25. package/assets/{NetworkUtil-CM7JZPbs.js → NetworkUtil-BGlQiKvg.js} +1 -1
  26. package/assets/{NotFound-DVZ9W5Hr.js → NotFound-uK-Ostnl.js} +1 -1
  27. package/assets/PrimaryListModal-Bm7Lx1a1.js +1 -0
  28. package/assets/{StoreSettings-CpeZPPkb.js → StoreSettings-jeamoHJO.js} +6 -6
  29. package/assets/Success-IAIc5xBC.js +4 -0
  30. package/assets/{SwapController-BH4rWo6P.js → SwapController-B81AJRRn.js} +1 -1
  31. package/assets/{Tooltip-zazDSBbm.js → Tooltip-CYItdKnL.js} +1 -1
  32. package/assets/{TradeService-IuqYxWb8.js → TradeService-BxBTy4_C.js} +1 -1
  33. package/assets/{W3MFrameProviderSingleton-CFGfbV9-.js → W3MFrameProviderSingleton-WHc1zToo.js} +3 -3
  34. package/assets/{WebCryptoP256-ByM1YcL4.js → WebCryptoP256-BQQeByzz.js} +1 -1
  35. package/assets/{authorizations-CsduRV0X.js → authorizations-C600xDT9.js} +1 -1
  36. package/assets/{basic-BMJtBJ3f.js → basic-CaSER4PW.js} +1 -1
  37. package/assets/{biconomy-WqxLiteU.js → biconomy-nsDuvr1X.js} +1 -1
  38. package/assets/{browser-7Z6Tx7yC.js → browser-Cad_aDY9.js} +1 -1
  39. package/assets/{browser-ponyfill-C_hn4Jen.js → browser-ponyfill-CQ0GHmxr.js} +1 -1
  40. package/assets/browser-ponyfill-vZOvKb_B.js +1 -0
  41. package/assets/{buy-CN2rC9a0.js → buy-C5J6mAtx.js} +1 -1
  42. package/assets/{buy-gasless-iZXsoGZN.js → buy-gasless-Sy6Gurph.js} +1 -1
  43. package/assets/{cart-checkout-CLMqKMCz.js → cart-checkout-BwJruvi6.js} +1 -1
  44. package/assets/{categories-D7_Qudaw.js → categories-CQMvcQ_A.js} +5 -5
  45. package/assets/{ccip-DLXgNS3N.js → ccip-CVFd9-T6.js} +1 -1
  46. package/assets/{ccip-Be5Dn1Zo.js → ccip-C_DKTuDg.js} +1 -1
  47. package/assets/{chains-DOpzCPsr.js → chains-C1bwVnfj.js} +1 -1
  48. package/assets/collection-BButATLz.js +1 -0
  49. package/assets/{common-BO9A6Obt.js → common-yfho93wI.js} +1 -1
  50. package/assets/{controller-CDv5xjYs.js → controller-C4IlqRFi.js} +2 -2
  51. package/assets/{core-B1vdvz8J.js → core-Bsb1vtZ6.js} +4 -4
  52. package/assets/{custom-3-JWbHeB.js → custom-B2_bVLxh.js} +1 -1
  53. package/assets/{data-capture-B9u0j-_M.js → data-capture-CeCg7Ckv.js} +1 -1
  54. package/assets/{decimals-z4vOxece.js → decimals-B36bI5dA.js} +1 -1
  55. package/assets/decimals-BPDUTKfa.js +1 -0
  56. package/assets/{detectExtension-Cvy4AYwr.js → detectExtension-CKplVZ9K.js} +1 -1
  57. package/assets/{email-Bu0wLP5a.js → email-DGWqulOs.js} +1 -1
  58. package/assets/{embedded-wallet-DALUv36Z.js → embedded-wallet-BDA__pmu.js} +1 -1
  59. package/assets/emotion-styled.browser.esm-Of0yAmXP.js +1 -0
  60. package/assets/{engine-COZjF6GN.js → engine-COT4y3N6.js} +1 -1
  61. package/assets/{errors-BuvqNt2H.js → errors-B2rT3Gvo.js} +1 -1
  62. package/assets/estimate-l1-fee-DSG403IA.js +1 -0
  63. package/assets/eth_estimateGas-BeErQaun.js +1 -0
  64. package/assets/{eth_getStorageAt-CqeWdstl.js → eth_getStorageAt-C0E8Vng5.js} +1 -1
  65. package/assets/eth_getTransactionCount-kFIWL36y.js +1 -0
  66. package/assets/{ethereum-C3MAoMFC.js → ethereum-C5kfwN9D.js} +1 -1
  67. package/assets/{ethers-Dpp9c5As.js → ethers-CLB2z3On.js} +1 -1
  68. package/assets/{execute-DVE3v1AF.js → execute-zpOqUNic.js} +2 -2
  69. package/assets/{extractIPFS-HvQvYdM-.js → extractIPFS-CsawLTu6.js} +1 -1
  70. package/assets/{features-CqkOcXXU.js → features-CMZ-QMXf.js} +1 -1
  71. package/assets/{fetchTokenMetadata-CZAPbDmS.js → fetchTokenMetadata-CZyR6DMv.js} +2 -2
  72. package/assets/{fortmatic-udOxQk4J.js → fortmatic-DwISA9k4.js} +1 -1
  73. package/assets/{get-bytecode-mfFuNYuc.js → get-bytecode-nwWHW248.js} +1 -1
  74. package/assets/get-ecosystem-wallet-info-Cll7wRD7.js +1 -0
  75. package/assets/{getBalance-BawNMn6h.js → getBalance-BlSTzNnh.js} +2 -2
  76. package/assets/{getInstalledModules-BNHlcIGs.js → getInstalledModules-fBSGgSis.js} +1 -1
  77. package/assets/{getNFT-BnfoPCmO.js → getNFT-bAbPTgKN.js} +2 -2
  78. package/assets/getNFT-yZahXefO.js +1 -0
  79. package/assets/{getOverlayAlpha-DAstUi74.js → getOverlayAlpha-CH1E19pc.js} +1 -1
  80. package/assets/{hashTypedData-CKhs32SE.js → hashTypedData-BjKHZJt2.js} +1 -1
  81. package/assets/{hashTypedData-Cb3dj8Vj.js → hashTypedData-CoI7qham.js} +1 -1
  82. package/assets/{import-D2QUSpyp.js → import-B-7LIWfg.js} +1 -1
  83. package/assets/{in-app-Dy6198Ub.js → in-app-DuAkMaop.js} +1 -1
  84. package/assets/{in-app-wallet-calls-Df8xMcoL.js → in-app-wallet-calls-VVaW7dWC.js} +1 -1
  85. package/assets/{index-DPTvpJzS.js → index-2LZVA_H9.js} +1 -1
  86. package/assets/{index-DgYBZU4A.js → index-B14E9dDt.js} +1 -1
  87. package/assets/{index-BhfJUYAQ.js → index-B2VkMi-_.js} +1 -1
  88. package/assets/{index-DIpMchso.js → index-B5bMVqc5.js} +1 -1
  89. package/assets/{index-CIfdS8Db.js → index-BC--wvbP.js} +1 -1
  90. package/assets/{index-B83hIo9e.js → index-BCa080Jk.js} +1 -1
  91. package/assets/{index-CRSMETpm.js → index-BEKwTyL9.js} +1 -1
  92. package/assets/{index-DPp2bhUs.js → index-BEL4KhCu.js} +1 -1
  93. package/assets/{index-B4Jw07i3.js → index-BSSPgvD1.js} +1 -1
  94. package/assets/{index-V1lpWoC-.js → index-BUzglYPe.js} +1 -1
  95. package/assets/{index-Cz1Suly9.js → index-BaDAgjcA.js} +1 -1
  96. package/assets/{index-Cnmgw5PF.js → index-BlnhiyW1.js} +1 -1
  97. package/assets/{index-DoxUiIoZ.js → index-BmwayVyG.js} +3 -3
  98. package/assets/{index-CjTTlJEo.js → index-Bn-EvtCB.js} +1 -1
  99. package/assets/{index-DP9-yadx.js → index-BsY45tr2.js} +1 -1
  100. package/assets/{index-CaOpng6c.js → index-Bwtbao7B.js} +1 -1
  101. package/assets/{index-BsI3EWcy.js → index-Bzlo07t4.js} +1 -1
  102. package/assets/{index-BcuysZka.js → index-C0_U8Amn.js} +1 -1
  103. package/assets/{index-B0SpA1TA.js → index-C0utXQ6l.js} +1 -1
  104. package/assets/{index-CEhWolV_.js → index-C2JrnQDe.js} +1 -1
  105. package/assets/{index-C2-W1jZ1.js → index-C4vAJ3fL.js} +1 -1
  106. package/assets/{index-4DPFDe86.js → index-CBhum_yI.js} +1 -1
  107. package/assets/index-CD_HpB6P.js +1 -0
  108. package/assets/{index-uTPBgRyq.js → index-CJs5gUNJ.js} +3 -3
  109. package/assets/{index-DIGUl9iX.js → index-CRZSv11U.js} +1 -1
  110. package/assets/{index-Tfh0IyJl.js → index-CUV4Rf3F.js} +1 -1
  111. package/assets/{index-CbxN7Krq.js → index-ChF-gCVV.js} +1 -1
  112. package/assets/{index-Ct22HWuE.js → index-CiH0W5Hj.js} +1 -1
  113. package/assets/{index-BIulqLQL.js → index-Cj8JMZ6F.js} +1 -1
  114. package/assets/{index-Cq0eRfqs.js → index-CjBPO58E.js} +1 -1
  115. package/assets/{index-D8me2ig5.js → index-CjnhvTx0.js} +1 -1
  116. package/assets/{index-Bi4zgWjQ.js → index-CkTptFnK.js} +2 -2
  117. package/assets/{index-rFCcyY0H.js → index-ClDUuLhd.js} +1 -1
  118. package/assets/{index-DJVoIGkn.js → index-CnFuk6fK.js} +1 -1
  119. package/assets/{index-BzcxFNUz.js → index-Cok_sFK3.js} +1 -1
  120. package/assets/{index-BpbWCyB4.js → index-CvIOskBU.js} +1 -1
  121. package/assets/{index-85kWMWjg.js → index-CyMsSal1.js} +2 -2
  122. package/assets/{index-C2ZtkYpB.js → index-CzOo8tvO.js} +2 -2
  123. package/assets/{index-BlBcCTXj.js → index-D2i7N7FD.js} +1 -1
  124. package/assets/{index-BItUV6PM.js → index-D4mGcEtB.js} +1 -1
  125. package/assets/{index-BRKyx7oU.js → index-D7J0TuHz.js} +2 -2
  126. package/assets/{index-FFhK2B90.js → index-DIZEbKwM.js} +1 -1
  127. package/assets/{index-D0xvd_Dp.js → index-DIusB22U.js} +2 -2
  128. package/assets/{index-BRNsIe3m.js → index-DJCp8uIp.js} +1 -1
  129. package/assets/index-DYDor-ZM.css +1 -0
  130. package/assets/{index-BCWp_6cV.js → index-DcAG03_T.js} +1 -1
  131. package/assets/{index-DtYBJNaS.js → index-DdAgdwh_.js} +1 -1
  132. package/assets/{index-CJRmkopy.js → index-DeO2Srep.js} +2 -2
  133. package/assets/{index-sN6H-jhd.js → index-Dfv7PJQh.js} +1 -1
  134. package/assets/{index-CQbgtHPx.js → index-DjQcD_Sm.js} +1 -1
  135. package/assets/{index-cjI3Jxw7.js → index-DmSOW0PY.js} +1 -1
  136. package/assets/{index-CXgtaw1w.js → index-Dp2XIou0.js} +1 -1
  137. package/assets/{index-BmlDboHr.js → index-DsttSp14.js} +3 -3
  138. package/assets/{index-CIHaBruC.js → index-DuM3vKAV.js} +1 -1
  139. package/assets/{index-DlvbN_Av.js → index-DvbuNJKq.js} +1 -1
  140. package/assets/{index-CNpvozfL.js → index-DxHb67V2.js} +1 -1
  141. package/assets/index-Q9d0V8TZ.js +289 -0
  142. package/assets/{index-DoaLV6gK.js → index-VrPb_Zz5.js} +1 -1
  143. package/assets/{index-D_Osq35D.js → index-Wkl8TG1w.js} +1 -1
  144. package/assets/{index-BPKqBTdV.js → index-ZjDtH0Hr.js} +1 -1
  145. package/assets/{index-cA2ARKGJ.js → index-gcnUvFrd.js} +1 -1
  146. package/assets/{index-CPs7rZSr.js → index-riVFlKIa.js} +1 -1
  147. package/assets/{index-HRvlJsjj.js → index-tAmGgcla.js} +1 -1
  148. package/assets/{index-kbFINusp.js → index-uk-CfnlL.js} +1 -1
  149. package/assets/{index-BDN6djsw.js → index-zvLgVYhW.js} +1 -1
  150. package/assets/{index.es-BqAU2pak.js → index.es-BzMx-nup.js} +4 -4
  151. package/assets/{index.es-DLc2fyYi.js → index.es-DAd9yxMt.js} +1 -1
  152. package/assets/{index.es-C7FJOZk9.js → index.es-fI5nPWfV.js} +1 -1
  153. package/assets/{linkAccount-Coo42zCf.js → linkAccount-DKoZKguc.js} +1 -1
  154. package/assets/{localBatchGatewayRequest-aE453fG9.js → localBatchGatewayRequest-BIFDJTSD.js} +1 -1
  155. package/assets/{mana-rate-CFrZfrxV.js → mana-rate-CC-yyhWK.js} +1 -1
  156. package/assets/{native-0dhyeu0o.js → native-t1vLKS11.js} +1 -1
  157. package/assets/{networks-DYw-qqg1.js → networks-DkdE2sZd.js} +1 -1
  158. package/assets/{onramp-Dv5XffT1.js → onramp-C_i59kJR.js} +1 -1
  159. package/assets/{openzeppelin-DY9zonpF.js → openzeppelin-BMNh5qua.js} +1 -1
  160. package/assets/{ownerOf-DZ5adWxQ.js → ownerOf-Cl_sRHvA.js} +1 -1
  161. package/assets/{parseNft-BoqFzz1w.js → parseNft-CW-hWGBI.js} +2 -2
  162. package/assets/{parseSignature-_8ci0C1c.js → parseSignature-C3GhRBL-.js} +3 -3
  163. package/assets/{parseSignature-DLqUl44D.js → parseSignature-NZopg6IG.js} +1 -1
  164. package/assets/{passkeys-9jKCllXJ.js → passkeys-DuQQbJhZ.js} +1 -1
  165. package/assets/{pay-with-exchange-q2w3TOV5.js → pay-with-exchange-DH6Kt6OD.js} +1 -1
  166. package/assets/{prepare-contract-call-C3igYCn_.js → prepare-contract-call-DmYPUPWz.js} +1 -1
  167. package/assets/{qr-overlay-kE0-Tb5Q.js → qr-overlay-u2BzHEzf.js} +3 -3
  168. package/assets/{react-BMZSDQJw.js → react-BrLDncxD.js} +1 -1
  169. package/assets/{receive-BlDcpWqy.js → receive-D2V6X2tA.js} +1 -1
  170. package/assets/{resolveImplementation-u5UN_seG.js → resolveImplementation-BsuIKFkz.js} +1 -1
  171. package/assets/{rpc-hzBSsIuq.js → rpc-BIhelmqB.js} +1 -1
  172. package/assets/{secp256k1-DogjvjtS.js → secp256k1-BHmvTUzO.js} +1 -1
  173. package/assets/{secp256k1-CIm5iUJu.js → secp256k1-BtgeD6jy.js} +1 -1
  174. package/assets/{secp256k1-D_XLFIAD.js → secp256k1-hNsXkUex.js} +1 -1
  175. package/assets/{send-33Lvo35v.js → send-DkPpjCf1.js} +1 -1
  176. package/assets/{send-batch-transaction-DxqLfBgo.js → send-batch-transaction-Bt9-Q0FO.js} +1 -1
  177. package/assets/{send-eip712-transaction-BWi3gkm3.js → send-eip712-transaction-CJ8Dr-eb.js} +2 -2
  178. package/assets/send-gasless-transaction-D5eQ85CY.js +2 -0
  179. package/assets/{send-transaction-DN1HyeTa.js → send-transaction-BK1KmPMR.js} +2 -2
  180. package/assets/{sendRawTransaction-DqtJOwfz.js → sendRawTransaction-Ddh_tSjE.js} +3 -3
  181. package/assets/{sentry-8SzFotJj.js → sentry-DYZXk5O5.js} +1 -1
  182. package/assets/{serializeTransaction-DOUpHqmp.js → serializeTransaction-f04zsBlb.js} +1 -1
  183. package/assets/{session-proposal-BtkIO7cP.js → session-proposal-r1mPrmCX.js} +1 -1
  184. package/assets/{session-request-lsymM3l6.js → session-request-Cfr7jp2h.js} +2 -2
  185. package/assets/{sha256-CDuVPJMW.js → sha256-DM_yyL1v.js} +1 -1
  186. package/assets/{signing-Bskb_x4I.js → signing-C-mKTJFW.js} +3 -3
  187. package/assets/{socials-BrDjbXdD.js → socials-pmAt6WyL.js} +1 -1
  188. package/assets/{swaps-BcWPrBSV.js → swaps-XKJYQXAz.js} +1 -1
  189. package/assets/{thirdweb-Cpf8EN89.js → thirdweb-B_kKfwse.js} +3 -3
  190. package/assets/{to-serializable-transaction-gyjNAfk6.js → to-serializable-transaction-rhTmQPEU.js} +2 -2
  191. package/assets/{totalSupply-qMyfSB-2.js → totalSupply-DKYveUeg.js} +1 -1
  192. package/assets/{trade-encoding-vTSEXgN1.js → trade-encoding-CaZYjVNs.js} +1 -1
  193. package/assets/{transaction-DiMmwD2W.js → transaction-HL8b44XJ.js} +1 -1
  194. package/assets/{transactionReceipt-Bum6hzjL.js → transactionReceipt-BcU054L-.js} +1 -1
  195. package/assets/{transactions-D-Z-vxC7.js → transactions-lrp4i700.js} +1 -1
  196. package/assets/useCreditPacks-Be9cG5vr.js +1 -0
  197. package/assets/{useInfiniteGrid-COXciuKu.js → useInfiniteGrid-8c-8xSTi.js} +1 -1
  198. package/assets/{useStore-cTXMZhwG.js → useStore-Ccbed9Z-.js} +2 -2
  199. package/assets/useTheme-7-Mr4FFJ.js +1 -0
  200. package/assets/useTheme-C3YHg0O0.js +1 -0
  201. package/assets/{utils-DLyVQGg1.js → utils-5mrprTVL.js} +1 -1
  202. package/assets/{verifyHash-DOsO5RNA.js → verifyHash-z4q1c5J1.js} +1 -1
  203. package/assets/{w3m-modal-oBw-UuhI.js → w3m-modal-2GWsHPDh.js} +1 -1
  204. package/assets/{w3m-modal-D1Pu_W_3.js → w3m-modal-DUSXSzQv.js} +1 -1
  205. package/assets/{wait-for-tx-receipt-BYt5Gcy_.js → wait-for-tx-receipt-CAc2Bmoi.js} +1 -1
  206. package/assets/{wallets-uu9PjeR0.js → wallets-BD_QGCV9.js} +5 -5
  207. package/assets/{web-connector-Vwf5Urnw.js → web-connector-Da5xZh52.js} +3 -3
  208. package/assets/{writeContract-iaip-T2H.js → writeContract-zNHMPW7R.js} +1 -1
  209. package/assets/{zora-sepolia-sSAsjV_j.js → zora-sepolia-Bef01XwU.js} +1 -1
  210. package/assets/{zoraTestnet-EJHbKpn0.js → zoraTestnet-Csb8JMNL.js} +1 -1
  211. package/index.html +11 -11
  212. package/package.json +2 -2
  213. package/assets/Cart-pFVN5ROM.js +0 -3
  214. package/assets/Creator-DyLgE_Lq.js +0 -1
  215. package/assets/ItemDetail-BSqp8w-l.js +0 -78
  216. package/assets/MyAssets-BA5zCiVR.js +0 -258
  217. package/assets/PrimaryListModal-CQHoY5iG.js +0 -1
  218. package/assets/Success-CxrAGNmd.js +0 -98
  219. package/assets/browser-ponyfill-iWQHRc9C.js +0 -1
  220. package/assets/collection-DbmjhyjW.js +0 -1
  221. package/assets/decimals-8h3d0d0Q.js +0 -1
  222. package/assets/emotion-styled.browser.esm-rI_2ZiJm.js +0 -1
  223. package/assets/estimate-l1-fee-y9SYh7nZ.js +0 -1
  224. package/assets/eth_estimateGas-BhQqpdnq.js +0 -1
  225. package/assets/eth_getTransactionCount-Ca9PbmYY.js +0 -1
  226. package/assets/get-ecosystem-wallet-info-CSMzgHAT.js +0 -1
  227. package/assets/getNFT-yjjewJwo.js +0 -1
  228. package/assets/index-BA2L6eSl.css +0 -1
  229. package/assets/index-BsYYLNpm.js +0 -1
  230. package/assets/index-V0hMC6mZ.js +0 -289
  231. package/assets/send-gasless-transaction-CC-pEfDw.js +0 -2
  232. package/assets/useCreditPacks-BJp5mEnq.js +0 -1
  233. package/assets/useTheme-Cv3anIxV.js +0 -1
  234. package/assets/useTheme-DmdtRbZb.js +0 -1
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.org/" />
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-29941568358.commit-de47e56/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/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-29941568358.commit-de47e56/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/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-29941568358.commit-de47e56/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,13 +60,13 @@
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-29941568358.commit-de47e56/assets/index-V0hMC6mZ.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/react-BMZSDQJw.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/dcl-schemas-BICTSpB5.js">
66
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/sentry-8SzFotJj.js">
67
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/ethers-Dpp9c5As.js">
68
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/intl-CBcMB1D2.js">
69
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/index-BA2L6eSl.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/index-Q9d0V8TZ.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/react-BrLDncxD.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/dcl-schemas-BICTSpB5.js">
66
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/sentry-DYZXk5O5.js">
67
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/ethers-CLB2z3On.js">
68
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/intl-CBcMB1D2.js">
69
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-29942650568.commit-3cdb6da/assets/index-DYDor-ZM.css">
70
70
  </head>
71
71
  <body>
72
72
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-29941568358.commit-de47e56",
3
+ "version": "0.1.0-29942650568.commit-3cdb6da",
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": "de47e5613f2214a58d9aec03315d237b2cdc20c9"
11
+ "commit": "3cdb6da7995cf67cd36ecb17a4946295828958bd"
12
12
  }
@@ -1,3 +0,0 @@
1
- import{j as e,r as j,u as Se,b as qe,L as Z}from"./react-BMZSDQJw.js";import{t as a,l as I,am as W,u as Le,ak as C,a as ie,g as Ie,e as Te,h as Pe,j as Ee,I as E,an as Be,J as Fe,q as J,ao as de,ap as Ae,x as R,s as Re,B as We,c as Ue,C as ze,o as $e,k as ue,aq as Qe,v as he,r as Ke,ar as Oe}from"./index-V0hMC6mZ.js";import{a as me}from"./buy-CN2rC9a0.js";import{g as Ge,a as Je,w as De,S as He,G as Ve}from"./buy-gasless-iZXsoGZN.js";import{R as D,r as Ye}from"./cart-checkout-CLMqKMCz.js";import{u as Xe,c as Ze}from"./useCreditPacks-BJp5mEnq.js";import{l as es}from"./loader-logo-BzY9EKdC.js";import{i as ss,a as as}from"./errors-BuvqNt2H.js";import{E as ts}from"./ErrorNotice-DDr3KjIH.js";import{C as cs}from"./CollectionCarousel-CfEwak3h.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-8SzFotJj.js";import"./ethers-Dpp9c5As.js";import"./intl-CBcMB1D2.js";import"./authorizations-CsduRV0X.js";import"./index-HN6Rk25C.js";import"./trade-encoding-vTSEXgN1.js";const rs="https://cdn.decentraland.org/@dcl/shop/0.1.0-29941568358.commit-de47e56/assets/buy-error-22UunaPC.png";function ns(t){const{phase:r,balanceCredits:u,onClose:l}=t,_=r==="processing",w=r!=="complete",M=r==="error"?a("cartCheckout.errorTitle"):r==="nofunds"?a("cartCheckout.titleNoFunds"):a("cartCheckout.titleBuy"),k=r==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:_?void 0:l,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${k?" buy-modal__card--tall":""}`,children:[w&&e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:M}),!_&&e.jsx("button",{className:"buy-modal__x",onClick:l,"aria-label":a("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:r==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(I,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:W(u)})]})]}),r==="processing"&&e.jsx(os,{stage:t.stage??"reserving",step:t.step??1,total:t.total??1,isSelfCustody:!!t.isSelfCustody}),r==="nofunds"&&e.jsx(ls,{lines:t.lines??[],shortfallCredits:t.shortfallCredits??0,packs:t.packs??[],selectedPack:t.selectedPack??"",onSelectPack:t.onSelectPack??(()=>{}),onBuyPacks:t.onBuyPacks??(()=>{}),onCancel:l}),r==="complete"&&e.jsx(is,{purchased:t.purchased??[],onMyAssets:t.onMyAssets??l,onTryInWorld:t.onTryInWorld??l}),r==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-error",children:[e.jsx("img",{className:"buy-error__art",src:rs,alt:"",width:64,height:80}),e.jsxs("p",{className:"buy-error__text",children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",a("cartCheckout.errorBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:l,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:t.onRetry??l,children:a("cartCheckout.tryAgain")})]})]})]})]})}function os({stage:t,step:r,total:u,isSelfCustody:l}){const _=t==="reserving",w=u>0?Math.min(100,Math.round(r/u*100)):0,M=t==="awaiting-signature"?l?a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):t==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:es,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:M}),_?e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill buy-modal__progress-fill--step",style:{width:`${w}%`}})}),u>1?e.jsxs("span",{className:"cart-checkout__step",children:[r,"/",u]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function ls({lines:t,shortfallCredits:r,packs:u,selectedPack:l,onSelectPack:_,onBuyPacks:w,onCancel:M}){const k=u.find(c=>c.id===l),H=t.reduce((c,y)=>c+(y.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,r)})})," ",a("buyModal.warningToPurchase",{count:H})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:t.map(c=>{const y=c.quantity??1;return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:c.item.thumbnail?e.jsx("img",{src:c.item.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"buy-modal__asset-name",title:c.item.name,children:[c.item.name||a("buyModal.itemFallback"),y>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:a("cartCheckout.qty",{count:y})}):null]}),c.item.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:a("search.byCreator",{name:c.item.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(I,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:W(c.priceCredits*y)})]})]})]},c.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:u.map(c=>{const y=c.id===l;return e.jsxs("button",{className:`buy-modal__pack${y?" buy-modal__pack--on":""}`,onClick:()=>_(c.id),children:[e.jsx(I,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:W(c.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",c.usd.toFixed(2),")"]})]},c.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(I,{className:"buy-modal__total-ico"}),e.jsx("span",{children:W((k==null?void 0:k.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((k==null?void 0:k.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:M,children:a("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:w,children:a("buyModal.buy")})]})]})}function is({purchased:t,onMyAssets:r,onTryInWorld:u}){return e.jsxs("div",{className:"buy-modal__body cart-checkout__done-body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"60",height:"60","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce77"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:a("getCredits.successTitle")})," ",a("buyModal.successBody")]})]}),e.jsx("div",{className:"cart-checkout__done",children:e.jsx("div",{className:"cart-checkout__done-scroll",children:t.map(l=>{const _=l.quantity??1;return e.jsxs("div",{className:"cart-checkout__done-row",children:[e.jsxs("div",{className:"cart-checkout__done-thumb",children:[l.thumbnail?e.jsx("img",{src:l.thumbnail,alt:""}):null,e.jsx("span",{className:"cart-checkout__done-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 18 18",width:"12",height:"12",children:e.jsx("path",{d:"M4 9l3.5 3.5L14 5",fill:"none",stroke:"#fff",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"cart-checkout__done-info",children:[e.jsxs("div",{className:"cart-checkout__done-name",title:l.name,children:[l.name||a("buyModal.itemFallback"),_>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:a("cartCheckout.qty",{count:_})}):null]}),l.creator?e.jsx("div",{className:"cart-checkout__done-creator",children:a("search.byCreator",{name:l.creator})}):null]}),e.jsxs("div",{className:"cart-checkout__done-price",children:[e.jsx(I,{className:"cart-checkout__done-price-ico"}),e.jsx("span",{children:W(l.priceCredits*_)})]})]},l.id)})})}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:r,children:a("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:u,children:[a("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})}const ds=Re(We)`
2
- margin-top: 12px;
3
- `;function _e(t){if(ss(t))return a("errors.rejected");const r=(t.message??"").toLowerCase();return r.includes("insufficient")?a("cart.error.insufficient",{currency:ze.name}):r.includes("no active listing")||r.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const us=12e4,hs=Ue.chainId===80002?"https://decentraland.zone/jump":"https://decentraland.org/jump";function ms(t){const r=[];return t.unavailable.length&&r.push(a("cart.drop.unavailable",{count:t.unavailable.length})),t.own.length&&r.push(a("cart.drop.own",{count:t.own.length})),a("cart.drop.removed",{items:r.join(` ${a("cart.drop.and")} `)})}const ye=t=>t.reduce((r,u)=>r+u.priceCredits*u.quantity,0),_s=t=>t.flatMap(r=>Array.from({length:r.quantity},()=>({...r,quantity:1})));function Ts(){Le({title:a("nav.cart"),noindex:!0});const t=C(s=>s.items),r=C(s=>s.remove),u=C(s=>s.increment),l=C(s=>s.decrement),_=C(s=>s.clear),w=C(s=>s.restore),M=C(s=>s.setFittingOpen),k=ie(s=>s.items),H=ie(s=>s.toggle),{session:c}=Ie(),y=Xe().packs.slice(0,3);j.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const pe=t.some(s=>s.category!=="emote"),{data:V}=Te({queryKey:["upsell-listings"],queryFn:()=>Oe({first:40}),staleTime:6e4}),{data:B}=Pe(c),U=Ee(),z=Se(),{state:T}=qe(),[ee,F]=j.useState(null),[be,S]=j.useState(null),[se,$]=j.useState(null),[xe,P]=j.useState(!1),[g,A]=j.useState(null),ae=j.useRef(0),[i,v]=j.useState(null),[Y,te]=j.useState(""),je=t.reduce((s,n)=>s+n.priceCredits*n.quantity,0),ce=t.reduce((s,n)=>s+n.quantity,0),ke=g?g.liveTotalCredits:je,ge=new Set(t.map(s=>s.id)),re=((V==null?void 0:V.items)??[]).filter(s=>!ge.has(s.id)).slice(0,12),fe=new Map(g==null?void 0:g.buyable.map(s=>[s.item.id,s])),Q=(B==null?void 0:B.credits)??0,ve=Ae;function K(s){s(),A(null),$(null),S(null)}function Ne(){v(null),P(!1)}function ne(s){const n=ye(s),o=Math.max(0,n-Q),b=y.find(h=>h.credits>=o)??y[y.length-1];te(b.id),J("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:n,credits_balance:Q,shortfall:o}),v({phase:"nofunds",lines:s.map(h=>({item:h.item,priceCredits:h.priceCredits,quantity:h.quantity})),shortfall:o}),P(!1)}async function Ce(s){if(!c||s.length===0)return;const n=_s(s),o=n.map(d=>({...d.item,priceCredits:d.priceCredits})),b=s.map(d=>({...d.item,priceCredits:d.priceCredits,quantity:d.quantity})),h=[];let N="authorize",G=!1;v({phase:"processing",stage:"reserving",step:1,total:n.length});try{const d=[];for(let m=0;m<n.length;m++){const L=n[m];v({phase:"processing",stage:"reserving",step:m+1,total:n.length});try{const{credit:p,maxCreditedValue:X}=await $e(c.identity,L.usdCents,L.trade.id);h.push(p.id),d.push({trade:L.trade,credits:[p],maxCreditedValue:X})}catch(p){if(as(p)){if(h.length){try{await ue(c.identity,h)}catch(X){R(X,{flow:"cart_checkout",step:"release"})}U.invalidateQueries({queryKey:["usd-balance"]})}ne(s);return}throw p}}N="submit";const x=()=>v({phase:"processing",stage:"settling",step:n.length,total:n.length});v({phase:"processing",stage:"awaiting-signature",step:n.length,total:n.length});let f=[];if(Ge())try{f=await Je({purchases:d,buyer:c.address,signer:c.signer,onSigned:x});const L=(await Promise.allSettled(f.map(p=>De(p)))).flatMap(p=>p.status==="rejected"?[p.reason]:[]);if(L.length&&!L.some(p=>p instanceof He))throw L[0];G=!0}catch(m){if(!(m instanceof Ve))throw m;f=await me({purchases:d,buyer:c.address,signer:c.signer,onSigned:x})}else f=await me({purchases:d,buyer:c.address,signer:c.signer});s.forEach(m=>r(m.item.id)),A(null),J("Shop Completed Purchase",{...Qe(o),payment_type:"credits",no_crypto_step:G,transaction_hash:f[0]??null}),U.invalidateQueries({queryKey:["usd-balance"]}),v({phase:"complete",purchased:b})}catch(d){if(he(d)||R(d,{flow:"cart_checkout",step:N,cart_size:s.length}),J(he(d)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:N,error_code:Ke(d),value_usd:de(o.reduce((x,f)=>x+f.priceCredits,0)),cart_size:n.length}),h.length){try{await ue(c.identity,h)}catch(x){R(x,{flow:"cart_checkout",step:"release"})}U.invalidateQueries({queryKey:["usd-balance"]})}v({phase:"error",message:_e(d)})}}function oe(s){const n=ye(s);if(B!=null&&B.credits<n){ne(s);return}Ce(s)}async function O(){if(!c){S(a("buyModal.signInToCheckout"));return}const s=C.getState().items;if(s.length===0)return;S(null),$(null),P(!0);const n=s.reduce((o,b)=>o+b.priceCredits*b.quantity,0);J("Shop Started Checkout",{cart_size:s.length,cart_value_credits:n,cart_value_usd:de(n),has_sufficient_credits:Q>=n});try{F(a("cart.status.reviewing"));const o=await Ye(s,c.address,ve),b=[...o.unavailable,...o.own];if(b.length&&(b.forEach(h=>r(h.id)),$(ms(o))),o.buyable.length===0){S(a("cart.error.noneAvailable")),A(null),F(null);return}if(o.orderChanged){A(o),ae.current=Date.now(),F(null);return}F(null),oe(o.buyable)}catch(o){R(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),S(_e(o)),F(null)}finally{P(!1)}}async function we(){if(g){if(!c){S(a("buyModal.signInToCheckout"));return}if(Date.now()-ae.current>us){A(null),$(null),await O();return}S(null),oe(g.buyable)}}async function Me(){if(Y){try{sessionStorage.setItem(D,JSON.stringify(C.getState().items))}catch{}P(!0);try{const s=await Ze(Y,c?{address:c.address,identity:c.identity}:void 0);if(s.url){window.location.href=s.url;return}z("/credits")}catch(s){try{sessionStorage.removeItem(D)}catch{}R(s,{flow:"cart_buy_credits"}),v({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{P(!1)}}}const le=j.useRef(!1);j.useEffect(()=>{if(!(T!=null&&T.resumeCheckout)||le.current)return;le.current=!0;try{const n=sessionStorage.getItem(D);if(n){sessionStorage.removeItem(D);const o=JSON.parse(n);Array.isArray(o)&&o.length&&w(o)}}catch{}U.invalidateQueries({queryKey:["usd-balance"]});const s=setTimeout(()=>void O(),0);return()=>clearTimeout(s)},[T==null?void 0:T.resumeCheckout]);const q=xe||(i==null?void 0:i.phase)==="processing";return t.length===0&&!i?e.jsxs("div",{className:"cart cart--empty",children:[e.jsx(E,{name:"cart",size:44,color:"var(--muted-2)"}),e.jsx("p",{className:"cart-empty__title",children:a("cart.empty.title")}),e.jsx("p",{className:"muted",children:a("cart.empty.body")}),e.jsx(ds,{as:Z,to:"/assets",variant:"purple",children:a("cart.empty.cta")})]}):e.jsxs("div",{className:"checkout",children:[e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>z(-1),type:"button",children:[e.jsx(E,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("div",{className:"checkout__left",children:[e.jsxs("div",{className:"checkout__head-card",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(E,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:a("cart.panelTitle",{count:ce})}),pe?e.jsxs("button",{className:"checkout__fitting",onClick:()=>M(!0),disabled:q,children:[e.jsx(E,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs("section",{className:"checkout__panel",children:[e.jsx("div",{className:"checkout__list",children:t.map(s=>{const n=fe.get(s.id),o=n?n.priceCredits:s.priceCredits,b=!!n&&n.priceCredits!==s.priceCredits,h=!s.tokenId,N=s.quantity,G=typeof s.available=="number"&&N>=s.available,d=o*N,x=!!k[s.id],f=s.tokenId??s.itemId,m=s.contractAddress&&f?`/item/${s.contractAddress}/${f}`:null;return e.jsxs("div",{className:"checkout__card",children:[e.jsxs("div",{className:"checkout__thumb",children:[m?e.jsx(Z,{className:"checkout__thumb-link",to:m,state:{item:s,tradeId:s.tradeId},"aria-label":s.name,children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null}):s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:s.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[m?e.jsx(Z,{className:"checkout__name",to:m,state:{item:s,tradeId:s.tradeId},title:s.name,children:s.name}):e.jsx("div",{className:"checkout__name",title:s.name,children:s.name}),s.creator?e.jsx(Be,{address:s.creator,className:"checkout__creator",linkToProfile:!0}):null]}),e.jsxs("div",{className:"checkout__foot",children:[h?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>K(()=>l(s.id)),disabled:q||N<=1,"aria-label":a("cart.decreaseQuantity",{name:s.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:N}),e.jsx("button",{className:"checkout__step",onClick:()=>K(()=>u(s.id)),disabled:q||G,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs("div",{className:"checkout__price",children:[e.jsx(I,{className:"checkout__price-ico"})," ",d,b?e.jsx("span",{className:"checkout__price-was",children:s.priceCredits*N}):null]})]})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${x?" is-on":""}`,onClick:()=>H(s),"aria-label":x?a("cart.removeFromFavorites",{name:s.name}):a("cart.addToFavorites",{name:s.name}),title:x?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(E,{name:x?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>K(()=>r(s.id)),disabled:q,"aria-label":a("cart.remove",{name:s.name}),title:a("cart.removeTitle"),children:e.jsx(E,{name:"trash",size:24})})]})]},s.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>K(_),disabled:q,children:a("cart.clearCart")})})]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:a("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:a("cart.totalItems",{count:ce})}),e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(I,{className:"checkout__total-ico"})," ",ke]})]}),e.jsx("button",{className:"checkout__cta",onClick:()=>void(g?we():O()),disabled:q,children:q?a("cart.working"):g?a("marketCheckout.confirmPurchase"):a("assetCard.buyNow")}),g?e.jsx("p",{className:"muted checkout__msg",children:a("cart.priceChanged")}):null,se?e.jsx("p",{className:"muted checkout__msg",children:se}):null,ee?e.jsx("p",{className:"muted checkout__msg",children:ee}):null,e.jsx(ts,{message:be,className:"checkout__msg"})]})]})]})]}),re.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(cs,{title:a("cart.youMightAlsoLike"),items:re})}):null,i?e.jsx(ns,{phase:i.phase,balanceCredits:Q,onClose:Ne,stage:i.phase==="processing"?i.stage:void 0,step:i.phase==="processing"?i.step:void 0,total:i.phase==="processing"?i.total:void 0,isSelfCustody:Fe(c==null?void 0:c.providerType),lines:i.phase==="nofunds"?i.lines:void 0,shortfallCredits:i.phase==="nofunds"?i.shortfall:void 0,packs:y,selectedPack:Y,onSelectPack:te,onBuyPacks:()=>void Me(),purchased:i.phase==="complete"?i.purchased:void 0,onMyAssets:()=>z("/assets?tab=mine"),onTryInWorld:()=>window.open(hs,"_blank","noopener"),message:i.phase==="error"?i.message:void 0,onRetry:()=>void O()}):null]})}export{Ts as Cart};
@@ -1 +0,0 @@
1
- import{u as K,j as e,L as re,d as se,a as te,r as j}from"./react-BMZSDQJw.js";import{aw as oe,ax as ce,an as le,t as a,ay as E,B as ne,ac as z,g as ie,I,c as de,u as me,A as ue,ar as he,az as ge,C as xe}from"./index-V0hMC6mZ.js";import{d as _e,g as pe,a as Ne,A as je}from"./collection-DbmjhyjW.js";import{u as be,L as fe}from"./useStore-cTXMZhwG.js";import{s as D}from"./address-DrURAr9O.js";import{d as $,a as ve,S as w,F as Ce,e as we,b as ke}from"./categories-D7_Qudaw.js";import{L as B}from"./LoadMore-BK9c312B.js";import{u as R}from"./useInfiniteGrid-COXciuKu.js";import{E as T}from"./ErrorNotice-DDr3KjIH.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-8SzFotJj.js";import"./ethers-Dpp9c5As.js";import"./intl-CBcMB1D2.js";import"./emotion-CSxEP8yM.js";function Pe({collection:t,cover:r,itemCount:o}){const n=K(),{contractAddress:m,name:g,creator:x}=t,N=r==null||o==null,{data:i}=oe(m,N),p=r==null?(i==null?void 0:i.items)??[]:[],h=o??(i==null?void 0:i.total);function _(){n(`/collection/${m}`)}return e.jsxs("article",{className:"coll-card",role:"link",tabIndex:0,onClick:_,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),_())},children:[e.jsx("div",{className:"coll-card__media",children:r?e.jsx("img",{className:"coll-card__img","data-testid":"coll-card-img",src:r,alt:"",loading:"lazy"}):p.length>0?e.jsx(ce,{items:p,className:"coll-card__cover"}):null}),e.jsxs("div",{className:"coll-card__body",children:[e.jsx("h3",{className:"coll-card__name",title:g,children:g}),e.jsxs("div",{className:"coll-card__meta",children:[x?e.jsx(le,{address:x,className:"coll-card__creator",linkToProfile:!0}):e.jsx("span",{className:"coll-card__creator",children:" "}),e.jsx("span",{className:"coll-card__count",children:h==null?"…":a("collectionCard.itemCount",{count:h})})]}),e.jsx("button",{className:"coll-card__view",onClick:d=>{d.stopPropagation(),_()},tabIndex:-1,children:a("collectionCard.viewCollection")})]})]})}function ye({address:t,className:r=""}){const o=E(m=>m.followed.includes(t.toLowerCase())),n=E(m=>m.toggle);return t?e.jsx(ne,{type:"button",size:"sm",variant:o?"ghost":"outline",className:r||void 0,"aria-pressed":o,title:o?a("creator.unfollowTitle"):a("creator.followTitle"),onClick:()=>n(t),children:o?a("creator.following"):a("creator.follow")}):null}const Se={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Le({address:t}){var d,b;const{data:r}=z(t),{data:o}=be(t),n=ie(l=>{var f;return(f=l.session)==null?void 0:f.address}),m=!!n&&n.toLowerCase()===t.toLowerCase(),g=(r==null?void 0:r.name)||D(t),x=(b=(d=r==null?void 0:r.avatar)==null?void 0:d.snapshots)==null?void 0:b.face256,N=(o==null?void 0:o.cover)||_e,i=o==null?void 0:o.description,p=`${de.profileUrl}/${t}`,h=fe.filter(l=>o==null?void 0:o.links[l]),_=pe(Ne({name:r==null?void 0:r.name,hasClaimedName:r==null?void 0:r.hasClaimedName,ethAddress:(r==null?void 0:r.ethAddress)??t}));return e.jsxs("section",{className:"creator-hero","aria-label":`${g} storefront`,children:[e.jsxs("div",{className:"creator-hero__cover",children:[e.jsx("img",{className:"creator-hero__cover-img",src:N,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","data-testid":"creator-hero-link",href:(o==null?void 0:o.links[l])??"",target:"_blank",rel:"noopener noreferrer",title:a(`creator.link.${l}`),"aria-label":a(`creator.link.${l}`),children:e.jsx(I,{name:Se[l]})},l)),m&&e.jsx(re,{className:"creator-hero__link creator-hero__edit",to:"/store-settings",title:a("creator.editStore"),"aria-label":a("creator.editStore"),children:e.jsx(I,{name:"pen"})})]}),e.jsxs("div",{className:"creator-hero__body",children:[x?e.jsx("img",{className:"creator-hero__ava",src:x,alt:"",loading:"eager",style:{backgroundColor:_}}):e.jsx("span",{className:"creator-hero__ava creator-hero__ava--ph","aria-hidden":!0,style:{backgroundColor:_}}),e.jsxs("div",{children:[e.jsx("h2",{className:"creator-hero__name",children:g}),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","data-testid":"creator-hero-view",href:p,target:"_blank",rel:"noopener noreferrer",children:a("creator.viewProfile")}),e.jsx(ye,{address:t,className:"creator-hero__follow"})]})]})]})}const U=48;function Ge(){const{address:t}=se(),r=K(),[o]=te(),n=o.has("collections"),{data:m}=z(t),g=(m==null?void 0:m.name)||(t?D(t):a("creator.fallbackName"));me({title:g,description:a("seo.creator.description",{name:g})});const[x,N]=j.useState("wearable"),[i,p]=j.useState(null),[h,_]=j.useState([]),[d,b]=j.useState(""),[l,f]=j.useState(""),[P,O]=j.useState("newest"),y=d&&!Number.isNaN(Number(d))?Number(d):void 0,S=l&&!Number.isNaN(Number(l))?Number(l):void 0,G=i?ke[i]:void 0,H=($.find(s=>s.key===P)??$[0]).server,L={creator:t,category:x,rarities:h.length?h:void 0,wearableCategories:G,minPriceCredits:y,maxPriceCredits:S,sortBy:H},{items:v,total:Y,isLoading:C,error:A,hasNextPage:W,isFetchingNextPage:F,fetchNextPage:Z}=R(["creator-listings",L],s=>he({...L,first:U,skip:s}),{enabled:!!t&&!n}),u=R(["creator-collections",t],s=>ge(t,{first:U,skip:s}).then(c=>({items:c.collections,total:c.total})),{enabled:!!t&&n});function q(s){N(s),p(null),n&&M()}function M(){const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}`:""},{replace:!0})}function J(){if(n){M();return}const s=new URLSearchParams(o);s.delete("collections");const c=s.toString();r({search:c?`?${c}&collections`:"?collections"},{replace:!0})}function Q(s){_(c=>c.includes(s)?c.filter(ae=>ae!==s):[...c,s])}function V(){N("wearable"),p(null),_([]),b(""),f("")}const k=!!(y||S),X=k?`${d||"0"}–${l||"∞"}`:a("filter.price"),ee=x!=="wearable"||!!i||h.length>0||k;return e.jsxs("div",{className:"collection-page",children:[e.jsxs("nav",{className:"collection-page__crumbs","aria-label":a("creator.breadcrumbAria"),children:[e.jsx("button",{className:"collection-page__crumb-link",onClick:()=>r("/assets"),children:a("creator.breadcrumb")}),e.jsx("span",{className:"collection-page__crumb-sep",children:"/"}),e.jsx("span",{className:"collection-page__crumb-current",children:g})]}),t?e.jsx(Le,{address:t}):null,!n&&!C&&v.length>0?e.jsx(je,{items:v,source:"creator"}):null,e.jsxs("div",{className:"browse browse--sidebar",children:[e.jsx("aside",{className:"browse__sidebar",children:e.jsx(ve,{category:x,subCategory:i,onCategory:q,onSub:p,title:a("creator.category"),flat:!0,collections:n,onCollections:J})}),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?"…":a("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(T,{message:a("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(Pe,{collection:s,itemCount:s.itemCount},s.contractAddress)),u.isFetchingNextPage?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx("p",{className:"muted",children:a("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ce,{rarities:h,onToggleRarity:Q,sort:P,onSort:O,total:Y,loading:C,anyActive:ee,onClear:V,renderTrailing:s=>e.jsx(we,{panelKey:"price",label:X,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":a("creator.priceMin"),placeholder:a("creator.priceMinPlaceholder"),value:d,onChange:c=>b(c.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":a("creator.priceMax"),placeholder:a("creator.priceMaxPlaceholder"),value:l,onChange:c=>f(c.target.value)})]}),e.jsx("p",{className:"filter-pop__hint",children:a("creator.priceHint",{currency:xe.name})})]})})}),A?e.jsx(T,{message:a("creator.error")}):null,e.jsx("div",{className:"grid",children:C?e.jsx(w,{count:15}):e.jsxs(e.Fragment,{children:[v.map(s=>e.jsx(ue,{item:s},s.id)),F?e.jsx(w,{count:6}):null]})}),e.jsx(B,{hasNextPage:W,isFetching:F,onLoadMore:()=>void Z()}),!C&&!A&&v.length===0?e.jsx("p",{className:"muted",children:a("creator.empty")}):null]})})]})]})}export{Ge as Creator,Ge as default};
@@ -1,78 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CJRmkopy.js","assets/react-BMZSDQJw.js","assets/dcl-schemas-BICTSpB5.js","assets/index-V0hMC6mZ.js","assets/sentry-8SzFotJj.js","assets/ethers-Dpp9c5As.js","assets/intl-CBcMB1D2.js","assets/index-BA2L6eSl.css","assets/emotion-styled.browser.esm-rI_2ZiJm.js","assets/useTheme-DmdtRbZb.js","assets/CircularProgress-DVvK_YYJ.js","assets/index-Bi4zgWjQ.js","assets/useTheme-Cv3anIxV.js","assets/CssVarsProvider-CaTQjQty.js","assets/getOverlayAlpha-DAstUi74.js","assets/index-DPTvpJzS.js","assets/colors-LINLm1ux.js"])))=>i.map(i=>d[i]);
2
- import{u as pe,r as c,j as e,d as ha,b as _a,L as ya}from"./react-BMZSDQJw.js";import{g as Y,h as pa,j as Ge,t,ap as fa,i as ba,b as xa,o as ja,k as ie,q as V,r as Be,v as _e,aq as va,x as le,l as M,am as ne,_ as ye,ac as ga,af as Na,ae as wa,aD as ka,ai as Ia,c as fe,aE as Ca,a3 as He,e as B,aF as Aa,I as F,y as O,s as z,aG as Sa,aH as Ma,aI as Pa,z as Ea,ak as Re,a as $e,aJ as Fa,aK as La,aL as Da,aM as Ta,aN as qa,al as Ba,u as Ra,aO as $a,aP as Oa,aQ as za,an as Ka,aR as Oe,aS as Wa,B as be,f as Va,E as Qa,au as Ua,aT as Ga,aU as Ha,av as Ja,aV as Ya,aW as Za}from"./index-V0hMC6mZ.js";import{d as Q}from"./dcl-schemas-BICTSpB5.js";import{b as ze,c as Xa}from"./buy-CN2rC9a0.js";import{S as et,P as at,f as tt}from"./PrimaryListModal-CQHoY5iG.js";import{g as st,b as it,w as rt,S as nt,G as lt}from"./buy-gasless-iZXsoGZN.js";import{u as dt,c as ot}from"./useCreditPacks-BJp5mEnq.js";import{R as Ke}from"./resume-buy-Bf0zIH7y.js";import{a as ct,f as We,i as mt}from"./errors-BuvqNt2H.js";import{E as xe}from"./ErrorNotice-DDr3KjIH.js";import{l as ut}from"./loader-logo-BzY9EKdC.js";import{C as ht}from"./CircularProgress-DVvK_YYJ.js";import{u as _t,M as yt}from"./MarketCheckout-BxM5rUvM.js";import{s as pt}from"./address-DrURAr9O.js";import{C as ft}from"./CollectionCarousel-CfEwak3h.js";import{T as Je}from"./Tooltip-zazDSBbm.js";import"./sentry-8SzFotJj.js";import"./ethers-Dpp9c5As.js";import"./intl-CBcMB1D2.js";import"./authorizations-CsduRV0X.js";import"./index-HN6Rk25C.js";import"./trade-encoding-vTSEXgN1.js";import"./mana-rate-CFrZfrxV.js";import"./emotion-CSxEP8yM.js";function bt({item:s,onClose:n,resume:r=!1}){var X,ee;const{session:d}=Y(),{data:o}=pa(d),h=Ge(),g=pe(),j=dt().packs.slice(0,3),[m,l]=c.useState("loading"),[a,N]=c.useState(null),[p,w]=c.useState(""),[L,b]=c.useState(s.priceCredits),[f,D]=c.useState(null),P=c.useRef(null),A=(f==null?void 0:f.credits)??L,Z=(o==null?void 0:o.credits)??0;c.useEffect(()=>{let u=!1;if(!d){l("error"),N(t("buyModal.signInToCheckout"));return}const k=_=>{const I=_-((o==null?void 0:o.credits)??0),x=j.find(T=>T.credits>=I)??j[j.length-1];w(x.id),V("Shop Buy Credits Prompted",{from:"item_checkout",credits_needed:_,credits_balance:(o==null?void 0:o.credits)??0,shortfall:Math.max(0,I)}),l("nofunds")};return(async()=>{var _,I;try{const x=await fa(s);if(!x)throw new Error("not for sale");if(ba(x,d.address))throw new Error("You can't buy your own listing.");const T=xa((I=(_=x.received)==null?void 0:_[0])==null?void 0:I.amount);if(!Number.isFinite(T)||T<=0)throw new Error("price unavailable");const K=Math.ceil(T/10);if(u)return;if(b(K),o!=null&&o.credits<K){k(K);return}try{const{credit:C,maxCreditedValue:G,usdCents:$}=await ja(d.identity,T,x.id);if(u){ie(d.identity,[C.id]).catch(()=>{});return}P.current=C.id;const ae=Math.ceil($/10);b(ae);const W={trade:x,credit:C,maxCreditedValue:G,usdCents:$,credits:ae};D(W),r?U(W):l("ready")}catch(C){if(u)return;if(ct(C)){k(K);return}throw C}}catch(x){if(u)return;V(_e(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"authorize",error_code:Be(x)}),l("error"),N(We(x,t("buyModal.error.generic"),{sale:!0}))}})(),()=>{u=!0,P.current&&d&&(ie(d.identity,[P.current]).catch(()=>{}),P.current=null)}},[]);async function U(u=f){if(!d||!u)return;l("processing"),N(null);let k=!1;try{const _={trade:u.trade,buyer:d.address,signer:d.signer,credits:[u.credit],maxCreditedValue:u.maxCreditedValue};let I;if(st())try{I=await it(_),await rt(I),k=!0}catch(x){if(x instanceof nt)k=!0;else if(x instanceof lt)I=await ze(_);else throw x}else I=await ze(_);P.current=null,V("Shop Completed Purchase",{...va([s]),payment_type:"credits",no_crypto_step:k,transaction_hash:I??null}),h.invalidateQueries({queryKey:["usd-balance"]}),l("complete")}catch(_){_e(_)||le(_,{flow:"buy",step:"submit",gasless:k}),ie(d.identity,[u.credit.id]).catch(()=>{}),P.current=null,V(_e(_)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Be(_)}),h.invalidateQueries({queryKey:["usd-balance"]}),N(We(_,t("buyModal.error.generic"),{sale:!0})),l("error")}}async function de(){if(!(!p||!d)){try{sessionStorage.setItem(Ke,JSON.stringify(s))}catch{}f&&ie(d.identity,[f.credit.id]).catch(()=>{}),P.current=null,l("loading");try{const u=await ot(p,{address:d.address,identity:d.identity});if(u.url){window.location.href=u.url;return}g("/credits")}catch(u){le(u,{flow:"buy_credits_and_item"});try{sessionStorage.removeItem(Ke)}catch{}N(t("buyModal.error.creditsCheckout")),l("error")}}}const R=m==="processing",E=m==="complete"?t("buyModal.titleComplete"):m==="nofunds"?t("buyModal.titleNoFunds"):t("buyModal.titleBuy");return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":t("buyModal.dialogAria",{name:s.name}),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:R?void 0:n,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${m==="processing"||m==="loading"?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:E}),!R&&e.jsx("button",{className:"buy-modal__x",onClick:n,"aria-label":t("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:m==="nofunds"?t("buyModal.dclBalance"):t("buyModal.myCreditsBalance")}),e.jsx(M,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:ne(Z)})]})]}),m==="loading"&&e.jsx("div",{className:"buy-modal__body buy-modal__processing",children:e.jsx(ht,{size:44})}),m==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(xe,{message:a}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:n,children:t("buyModal.close")})})]}),m==="nofunds"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:"buy-modal__warning-ico",children:[e.jsx("path",{d:"M12 3L2 20h20L12 3z",fill:"none",stroke:"#691fa9",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M12 9v5",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"17",r:"1.1",fill:"#691fa9"})]}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:t("buyModal.insufficientFunds")})," ",t("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:t("buyModal.warningCreditsAmount",{count:Math.max(0,A-Z)})})," ",t("buyModal.warningToPurchase",{count:1})]})]}),e.jsx(Ve,{item:s,priceCredits:A}),e.jsx("div",{className:"buy-modal__packs",children:j.map(u=>{const k=u.credits,_=u.id===p;return e.jsxs("button",{className:`buy-modal__pack${_?" buy-modal__pack--on":""}`,onClick:()=>w(u.id),children:[e.jsx(M,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:ne(k)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",u.usd.toFixed(2),")"]})]},u.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(M,{className:"buy-modal__total-ico"}),e.jsx("span",{children:ne(((X=j.find(u=>u.id===p))==null?void 0:X.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",(((ee=j.find(u=>u.id===p))==null?void 0:ee.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:n,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:()=>void de(),children:t("buyModal.buy")})]})]}),m==="ready"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsx(Ve,{item:s,priceCredits:A}),e.jsx("div",{className:"buy-modal__ctas",children:e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient buy-modal__btn--full",onClick:()=>void U(),children:t("buyModal.buy")})})]}),m==="processing"&&e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:ut,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:r?t("buyModal.completingPurchase"):t("buyModal.completingTransaction")}),e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]}),m==="complete"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__success",children:[e.jsxs("svg",{viewBox:"0 0 64 64",width:"64",height:"64","aria-hidden":!0,children:[e.jsx("circle",{cx:"32",cy:"32",r:"32",fill:"#34ce74"}),e.jsx("path",{d:"M20 33l8 8 16-18",fill:"none",stroke:"#fff",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsxs("p",{className:"buy-modal__success-text",children:[e.jsx("b",{children:t("getCredits.successTitle")})," ",t("buyModal.successBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:()=>g("/assets?tab=mine"),children:t("buyModal.myAssets")}),e.jsxs("button",{className:"buy-modal__btn buy-modal__btn--ruby",onClick:n,children:[t("buyModal.tryInWorld"),e.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":!0,children:e.jsx("path",{d:"M5 12h12M13 7l5 5-5 5",fill:"none",stroke:"#fcfcfc",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})]})]})]})}function Ve({item:s,priceCredits:n}){return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsx("div",{className:"buy-modal__asset-name",title:s.name,children:s.name||t("buyModal.itemFallback")}),s.creator?e.jsx("div",{className:"buy-modal__asset-creator",children:t("search.byCreator",{name:s.creator})}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(M,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:ne(n)})]})]})]})}const xt=c.lazy(async()=>{const[{EmoteControls:s},{Experimental_CssVarsProvider:n},{light:r}]=await Promise.all([ye(()=>import("./index-CJRmkopy.js").then(d=>d.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),ye(()=>import("./index-Bi4zgWjQ.js"),__vite__mapDeps([11,3,1,2,4,5,6,7,12,9,13,14])),ye(()=>import("./index-DPTvpJzS.js"),__vite__mapDeps([15,3,1,2,4,5,6,7,16,14,13,9]))]);return{default:d=>e.jsx(n,{theme:r,children:e.jsx(s,{...d})})}});function jt(s){return e.jsx(c.Suspense,{fallback:null,children:e.jsx(xt,{...s})})}function vt({item:s}){const n=Y(f=>{var D;return(D=f.session)==null?void 0:D.address}),{data:r,isLoading:d}=ga(n),o=n&&r?n:"default",h=s.category==="emote",[g,j]=c.useState("item"),m=!h&&g==="item",l=m||!d,[a,N]=c.useState(!0);c.useEffect(()=>{N(!0)},[s.id,m]);const p=!!n&&!!r,w=p&&Na(s,wa(r)),L=ka(s)[0],b=p&&!w&&!h;return e.jsxs(e.Fragment,{children:[l?e.jsx(Ia,{id:"shop-item-preview",contractAddress:s.contractAddress,tokenId:s.tokenId??void 0,itemId:s.tokenId?void 0:s.itemId??void 0,profile:m?void 0:w?o:"default",bodyShape:m||w?void 0:L,type:h?void 0:m?Q.PreviewType.WEARABLE:Q.PreviewType.AVATAR,emote:h||m?void 0:Q.PreviewEmote.FASHION,disableBackground:!0,wheelZoom:h?1.5:void 0,wheelStart:h?100:void 0,dev:fe.chainId===80002,onLoad:()=>N(!1)}):null,!l||a?e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"item-preview__spinner","aria-hidden":!0})}):null,b&&!m?e.jsx("p",{className:"item-preview__note",children:t("itemPreview.shownOnBody",{shape:Ca(L)})}):null,h?e.jsx("div",{className:"item-preview__emote-controls","data-testid":"emote-controls",children:e.jsx(jt,{wearablePreviewId:"shop-item-preview",hideFrameInput:!0})}):e.jsxs("div",{className:"item-preview__toggle",role:"group","aria-label":t("itemPreview.previewMode"),children:[e.jsxs("button",{type:"button",className:g==="avatar"?"is-active":"","aria-pressed":g==="avatar","aria-label":t("itemPreview.onAvatar"),onClick:()=>j("avatar"),children:[e.jsxs("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[e.jsx("circle",{cx:"12",cy:"7.5",r:"4"}),e.jsx("path",{d:"M4 20c0-4.2 3.6-6.5 8-6.5s8 2.3 8 6.5v.5H4z"})]}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.onAvatar")})]}),e.jsxs("button",{type:"button",className:g==="item"?"is-active":"","aria-pressed":g==="item","aria-label":t("itemPreview.item"),onClick:()=>j("item"),children:[e.jsx("svg",{className:"item-preview__toggle-ico",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M8.5 3 3 6l1.8 3.8 2.2-1V21h10V8.8l2.2 1L22 6l-5.5-3a2.6 2.6 0 0 1-4.5 1.4A2.6 2.6 0 0 1 8.5 3z"})}),e.jsx("span",{className:"item-preview__toggle-label",children:t("itemPreview.item")})]})]})]})}function Ye(){return fe.shopServerUrl||(typeof window<"u"?window.location.origin:"")}async function gt(s,n,r){const d=new URLSearchParams({contractAddress:s,itemId:n}),o=`${Ye()}/notify-requests?${d.toString()}`,h=await He(o,{method:"GET",identity:r,metadata:{}});if(!h.ok)throw new Error(`getNotifyRequest ${h.status}`);return h.json()}async function Nt(s,n){const r=`${Ye()}/notify-requests`,d=await He(r,{method:"POST",identity:n,metadata:{},headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!d.ok)throw new Error(`createNotifyRequest ${d.status}: ${await d.text()}`);await d.json().catch(()=>{})}function Qe(s){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s.trim())}function wt({item:s}){const n=Y(b=>b.session),r=Y(b=>b.signIn),[d,o]=c.useState(""),[h,g]=c.useState(!1),[j,m]=c.useState(!1),[l,a]=c.useState(null),N=!!n&&!!s.contractAddress&&!!s.itemId,{data:p}=B({queryKey:["notify-request",s.contractAddress,s.itemId,n==null?void 0:n.address],enabled:N,queryFn:()=>gt(s.contractAddress,s.itemId,n.identity)});c.useEffect(()=>{p!=null&&p.email&&o(b=>b||p.email)},[p==null?void 0:p.email]),c.useEffect(()=>{if(!n)return;let b=!1;return Aa().then(f=>{!b&&f&&o(D=>D||f)}),()=>{b=!0}},[n]);const w=j||!!(p!=null&&p.subscribed);async function L(b){if(b.preventDefault(),!(!n||!s.itemId||!Qe(d)||h)){g(!0),a(null);try{await Nt({contractAddress:s.contractAddress,itemId:s.itemId,chainId:s.chainId,email:d.trim()},n.identity),m(!0)}catch(f){le(f,{flow:"notify-me",contractAddress:s.contractAddress,itemId:s.itemId}),a(t("notifyMe.error"))}finally{g(!1)}}}return n?w?e.jsxs("div",{className:"notify notify__done","data-testid":"notify-subscribed",children:[e.jsx("span",{className:"notify__done-check","aria-hidden":!0,children:e.jsx(F,{name:"check",size:12})}),e.jsx("span",{className:"notify__done-text",children:t("notifyMe.subscribedBody")})]}):e.jsxs("form",{className:"notify",onSubmit:L,"data-testid":"notify",children:[e.jsx("label",{className:"notify__label",htmlFor:"notify-email",children:t("notifyMe.label")}),e.jsxs("div",{className:"notify__row",children:[e.jsx("input",{id:"notify-email",className:"notify__input",type:"email",inputMode:"email",autoComplete:"email",placeholder:t("notifyMe.placeholder"),value:d,onChange:b=>o(b.target.value),"data-testid":"notify-email"}),e.jsx("button",{type:"submit",className:"notify__btn",disabled:!Qe(d)||h,"data-testid":"notify-submit",children:h?t("notifyMe.working"):t("notifyMe.cta")})]}),e.jsx(xe,{message:l})]}):e.jsx("div",{className:"notify","data-testid":"notify",children:e.jsx("button",{type:"button",className:"notify__signin",onClick:r,"data-testid":"notify-signin",children:t("notifyMe.signInCta")})})}const kt=z.button`
3
- display: flex;
4
- align-items: center;
5
- justify-content: center;
6
- gap: 8px;
7
- width: 100%;
8
- height: 40px;
9
- padding: 0 12px;
10
- border: 2px solid #c640cd;
11
- border-radius: 8px;
12
- background: transparent;
13
- color: ${O.colors.accent};
14
- font-family: ${O.font.sans};
15
- font-weight: 600;
16
- font-size: 15px;
17
- line-height: 24px;
18
- letter-spacing: 0.46px;
19
- text-transform: uppercase;
20
- cursor: not-allowed;
21
- opacity: 0.55;
22
- transition: opacity 0.15s ease;
23
-
24
- &:hover,
25
- &:focus-visible {
26
- opacity: 0.75;
27
- }
28
- &:focus-visible {
29
- outline: 2px solid ${O.colors.accent};
30
- outline-offset: 2px;
31
- }
32
- `;function It({item:s}){return e.jsx(Je,{block:!0,content:t("makeOffer.comingSoon"),onShow:()=>V("Shop Make Offer Tooltip Shown",{contractAddress:s.contractAddress,itemId:s.itemId}),children:e.jsxs(kt,{type:"button","aria-disabled":!0,onClick:n=>n.preventDefault(),"data-testid":"make-offer",children:[e.jsx(F,{name:"offer",size:20,"aria-hidden":!0}),e.jsx("span",{children:t("makeOffer.cta")})]})})}const Ct=z(Sa)`
33
- display: flex;
34
- flex-direction: column;
35
- overflow: hidden;
36
- gap: 1px;
37
- background: ${O.colors.lineStrong};
38
- `;function At({contractAddress:s,name:n,items:r,className:d}){const o=pe();if(!s||!n)return null;const h=(r??[]).map(m=>m.thumbnail).filter(m=>!!m).slice(0,4),g=h.slice(0,2),j=h.slice(2,4);return e.jsxs(Ma,{as:"button","data-link":!0,className:d,"data-testid":"creator",onClick:m=>{m.stopPropagation(),o(`/collection/${s}`)},children:[h.length>0?e.jsxs(Ct,{as:"span","data-avatar":!0,"data-testid":"creator-ava","aria-hidden":!0,children:[e.jsx("span",{className:`collection-collage__row${j.length===0?" collection-collage__row--full":""}`,children:g.map((m,l)=>e.jsx("img",{src:m,alt:""},l))}),j.length>0?e.jsx("span",{className:"collection-collage__row",children:j.map((m,l)=>e.jsx("img",{src:m,alt:""},l))}):null]}):null,e.jsx(Pa,{"data-testid":"creator-name",children:Ea(n)})]})}const St=z(be)`
39
- margin-top: 6px;
40
- `,re=z(be)`
41
- && {
42
- width: 100%;
43
- height: 48px;
44
- font-size: 15px;
45
- font-weight: 600;
46
- letter-spacing: 0.46px;
47
- display: flex;
48
- align-items: center;
49
- justify-content: center;
50
- gap: 8px;
51
- }
52
-
53
- ${O.media.down("lg")} {
54
- .item-detail__ctas--dual && {
55
- flex: 1 1 auto;
56
- width: auto;
57
- }
58
- }
59
- `,Mt=z("div")`
60
- display: flex;
61
- flex-direction: column;
62
- gap: 10px;
63
- width: 100%;
64
- `,Pt=z(be)`
65
- && {
66
- width: 100%;
67
- height: 44px;
68
- }
69
- `,Et=z("p")`
70
- margin: 4px 0 0;
71
- font-size: 13px;
72
- color: ${O.colors.muted};
73
-
74
- a {
75
- color: ${O.colors.accent};
76
- font-weight: 600;
77
- }
78
- `;function Ft(s){return Object.values(Q.Rarity).includes(s)}function Lt(s){return s==="male"?t("itemDetail.genderMale"):s==="female"?t("itemDetail.genderFemale"):s==="unisex"?t("itemDetail.genderUnisex"):null}function Ue(s){return s.wearableCategory?s.wearableCategory.replace(/_/g," "):s.category==="emote"?t("itemDetail.categoryEmote"):t("itemDetail.categoryWearable")}function ls(){var Te;const{contractAddress:s,tokenId:n}=ha(),{state:r}=_a(),d=pe(),o=!!(r!=null&&r.market),h=(r==null?void 0:r.marketPriceCredits)??null,g=Re(i=>i.add),j=Re(i=>i.items),m=$e(i=>i.toggle),{session:l}=Y(),[a,N]=c.useState(()=>r!=null&&r.item?{...r.item,tradeId:r.tradeId??r.item.tradeId}:{id:`${s}-${n}`,name:"",creator:"",contractAddress:s??"",itemId:null,category:"wearable",rarity:"common",network:"MATIC",chainId:fe.chainId,thumbnail:"",priceCredits:0,gender:null,isSmart:!1,tokenId:n??void 0,tradeId:r==null?void 0:r.tradeId}),[p,w]=c.useState(!1),[L,b]=c.useState(!!(r!=null&&r.resumeBuy));c.useEffect(()=>{r!=null&&r.resumeBuy&&w(!0)},[r==null?void 0:r.resumeBuy]);const{data:f=[],isFetched:D}=B({queryKey:["collection-items",a.contractAddress],enabled:!!a.contractAddress,queryFn:()=>Ua(a.contractAddress,{first:20}).then(i=>i.items)}),P=a.available==null&&!a.tokenId,{data:A,isLoading:Z}=B({queryKey:["shop-item",a.contractAddress,n],enabled:!o&&!!a.contractAddress&&!!n&&(!(r!=null&&r.item)||P),queryFn:()=>Ga(a.contractAddress,n)});c.useEffect(()=>{A&&N(i=>i.tradeId?i.available!=null&&i.wearableCategory?i:{...i,available:i.available??A.available,wearableCategory:i.wearableCategory??A.wearableCategory}:{...A})},[A]);const[U,de]=c.useState(!1),{data:R=""}=B({queryKey:["item-desc",a.contractAddress,a.itemId],enabled:!!a.contractAddress&&!!a.itemId,staleTime:5*6e4,queryFn:()=>Ha(a.contractAddress,a.itemId)}),{data:E}=B({queryKey:["collection-meta",a.contractAddress],enabled:!!a.contractAddress,staleTime:5*6e4,queryFn:()=>Ja(a.contractAddress)});c.useEffect(()=>{if(a.name||A||f.length===0)return;const i=n&&f.find(v=>v.tokenId===n||v.itemId===n)||f.find(v=>v.contractAddress===a.contractAddress);i&&N(v=>({...i,tradeId:v.tradeId??i.tradeId}))},[f,A]);const X=c.useMemo(()=>{const i=new Set,v=[];for(const S of f){if(S.id===a.id||a.itemId&&S.itemId===a.itemId||a.tokenId&&S.tokenId===a.tokenId)continue;const qe=`${S.contractAddress}-${S.itemId??S.tokenId??S.id}`;i.has(qe)||(i.add(qe),v.push(S))}return v},[f,a.id,a.itemId,a.tokenId]),{data:ee,isLoading:u}=B({queryKey:["detail-trade",a.id,a.tradeId,a.contractAddress,a.itemId],enabled:!!a.contractAddress,queryFn:async()=>{if(a.tradeId)return a.tradeId;if(a.itemId){const i=await Ya(a.contractAddress,a.itemId);return(i==null?void 0:i.id)??null}return null}}),k=a.tradeId??ee??void 0,_=!!k,{data:I}=_t(o),x=c.useMemo(()=>{if(!o||!(r!=null&&r.item))return null;const i=r.item;return i.manaWei?{tradeId:i.tradeId??i.id,listingType:"primary",contractAddress:i.contractAddress,itemId:i.itemId??"",name:i.name,thumbnail:i.thumbnail,rarity:i.rarity,category:i.category,wearableCategory:i.wearableCategory??null,creator:i.creator,manaWei:i.manaWei,available:1,network:i.network,chainId:i.chainId,createdAt:0}:null},[o,r==null?void 0:r.item]),T=o&&h!=null&&!!I&&!!x,K=Fa({priceCredits:a.priceCredits,compareAtCredits:a.compareAtCredits,saleEndsAt:a.saleEndsAt}),C=c.useMemo(()=>({...a,tradeId:k,id:k??a.id}),[a,k]),G=j.some(i=>i.id===C.id),$=!C.tokenId,ae=((Te=j.find(i=>i.id===C.id))==null?void 0:Te.quantity)??0,W=$&&typeof a.available=="number"&&ae>=a.available,q=$e(i=>!!i.items[a.id]),je=c.useRef(null);c.useEffect(()=>{!a.name||u||je.current===a.id||(je.current=a.id,V("Shop Viewed Item",{...La(a),for_sale:_}),Da(a))},[a.id,a.name,u,_]);const te=`${s}/${n}`,ve=c.useRef(te);c.useEffect(()=>{ve.current!==te&&(ve.current=te,r!=null&&r.item&&N({...r.item,tradeId:r.tradeId??r.item.tradeId}),typeof window<"u"&&window.scrollTo({top:0,behavior:"smooth"}))},[te]);function Ze(){!_||ce||u||!$&&G||W||g(C,"item_detail")}const oe=Ft(a.rarity)?a.rarity:Q.Rarity.COMMON,ge=Lt(a.gender),Ne=Ta(a),we=qa(a.gender),Xe=_&&K,ea=t("itemDetail.moreFromCollection"),ce=Ba(a,l==null?void 0:l.address),se=Ge(),[aa,ke]=c.useState(!1),[ta,Ie]=c.useState(!1),[H,Ce]=c.useState(!1),[sa,Ae]=c.useState(null),{data:y,isLoading:ia}=B({queryKey:["owned-token",a.contractAddress,a.tokenId,l==null?void 0:l.address],enabled:!o&&!!(l!=null&&l.address)&&!!a.contractAddress&&!!a.tokenId,queryFn:()=>l?Za(l.address,a.contractAddress,a.tokenId):null});c.useEffect(()=>{y&&N(i=>i.name?i.issuedId?i:{...i,issuedId:y.issuedId}:{id:y.id,name:y.name,creator:"",contractAddress:y.contractAddress,itemId:y.itemId,category:y.category,rarity:y.rarity??"common",network:y.network,chainId:y.chainId,thumbnail:y.image,priceCredits:y.listingPrice??0,gender:null,isSmart:!1,tokenId:y.tokenId,issuedId:y.issuedId,tradeId:y.tradeId})},[y]);const{data:me}=B({queryKey:["publishable-item",a.contractAddress,a.itemId,l==null?void 0:l.address],enabled:ce&&!!l&&!!a.itemId,queryFn:async()=>l?(await tt(l.address,l.identity)).find(v=>v.contractAddress.toLowerCase()===a.contractAddress.toLowerCase()&&v.blockchainItemId===a.itemId)??null:null}),J=!!y,ue=!o&&(ce||J),ra=J?!!(y!=null&&y.isOnSale):_,he=J?y==null?void 0:y.tradeId:k,Se=J?!!y:!!me;async function Me(){await Promise.all([se.invalidateQueries({queryKey:["owned-token",a.contractAddress,a.tokenId]}),se.invalidateQueries({queryKey:["detail-trade"]}),se.invalidateQueries({queryKey:["shop-item"]}),se.invalidateQueries({queryKey:["collection-sale-state"]})])}async function Pe(i={}){if(!l||!he)return!1;Ae(null),Ce(!0);try{const v=await Va(he);return await Xa({trade:v,signer:l.signer}),i.silent||Qa.success(t("myAssets.removedFromSale",{name:a.name})),await Me(),!0}catch(v){const S=mt(v);return S||le(v,{flow:"remove-listing",tradeId:he}),Ae(S?t("getCredits.errorCanceled"):t("myAssets.removeListingError")),!1}finally{Ce(!1)}}function Ee(){J?ke(!0):Ie(!0)}async function na(){await Pe({silent:!0})&&Ee()}function Fe(){ke(!1),Ie(!1),Me()}const Le=_?u?t("itemDetail.checking"):W?t("itemDetail.maxInCart"):!$&&G?t("assetCard.inCart"):t("assetCard.addToCart"):t("itemDetail.notForSale"),la=typeof a.available=="number"&&a.available>0&&!a.tokenId&&!o,da=!o&&!a.tokenId&&a.available===0,oa=!ue&&_&&!o,ca=o||!ue,ma=Z||!!a.contractAddress&&!D||!a.name&&ia,De=!a.name&&!ma,ua=/^https?:\/\//i.test(a.thumbnail);return Ra(De?{title:t("seo.item.notFoundTitle"),noindex:!0}:a.name?{title:a.name,description:R||t("seo.item.fallbackDescription",{name:a.name,rarity:a.rarity,category:Ue(a),creator:pt(a.creator)}),image:ua?a.thumbnail:void 0,type:"product"}:{}),De?e.jsxs("div",{className:"item-detail item-detail--notfound",children:[e.jsx(F,{name:"cart",className:"item-detail__notfound-ico"}),e.jsx("h1",{className:"item-detail__notfound-title",children:t("itemDetail.notAvailableTitle")}),e.jsx("p",{className:"muted",children:t("itemDetail.notAvailableBody")}),e.jsx(St,{variant:"purple",onClick:()=>d("/assets"),children:t("notFound.cta")})]}):e.jsxs("div",{className:"item-detail",children:[e.jsxs("nav",{className:"item-detail__crumbs","aria-label":t("itemDetail.breadcrumbAria"),children:[e.jsx("button",{className:"item-detail__crumb-link",onClick:()=>d("/assets"),children:t("nav.collectibles")}),e.jsx("span",{className:"item-detail__crumb-sep",children:"/"}),e.jsx("span",{className:"item-detail__crumb-current",children:a.name||t("itemDetail.itemFallback")})]}),e.jsxs("div",{className:"item-detail__main",children:[e.jsxs("div",{className:"item-detail__preview","data-testid":"item-preview",children:[a.name?e.jsx(vt,{item:a}):e.jsx("div",{className:"item-preview__loading","aria-busy":"true","aria-label":t("itemPreview.loading"),children:e.jsx("span",{className:"skeleton item-preview__skeleton","aria-hidden":!0})}),e.jsx("button",{className:`item-detail__fav item-detail__fav--preview${q?" is-on":""}`,onClick:()=>m(a),"aria-pressed":q,"aria-label":q?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(F,{name:q?"heart-solid":"heart",size:18})})]}),e.jsx("div",{className:"item-detail__info",children:a.name?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"item-detail__info-head",children:[e.jsx("h1",{className:"item-detail__title",children:a.name}),e.jsx("button",{className:`item-detail__fav${q?" is-on":""}`,onClick:()=>m(a),"aria-pressed":q,"aria-label":q?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(F,{name:q?"heart-solid":"heart",size:18})})]}),e.jsxs("div",{className:"item-detail__chips",children:[e.jsx("span",{className:"chip chip--rarity",style:{background:za(oe),color:Oa(oe)},title:$a(a.rarity),children:a.rarity}),e.jsxs("span",{className:"chip item-detail__chip",children:[Ne?e.jsx(F,{name:Ne,size:18,color:"var(--text-2)"}):null,Ue(a)]}),ge?e.jsxs("span",{className:"chip item-detail__chip",children:[we?e.jsx(F,{name:we,size:18,color:"var(--text-2)"}):null,ge]}):null,a.issuedId?e.jsxs("span",{className:"chip item-detail__chip","data-testid":"detail-issued",children:["#",a.issuedId]}):null]}),R?e.jsxs("div",{className:"item-detail__section item-detail__description",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.description")}),e.jsx("p",{className:`item-detail__desc-text${U?" is-expanded":""}`,children:R}),R.length>140?e.jsx("button",{className:"link item-detail__desc-toggle",onClick:()=>de(i=>!i),children:U?t("itemDetail.showLess"):t("itemDetail.readMore")}):null]}):null,a.creator||E!=null&&E.name?e.jsxs("div",{className:"item-detail__meta",children:[a.creator?e.jsxs("div",{className:"item-detail__meta-col",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.creator")}),e.jsx(Ka,{address:a.creator,className:"item-detail__creator",linkToProfile:!0,hidePrefix:!0})]}):null,E!=null&&E.name?e.jsxs("div",{className:"item-detail__meta-col item-detail__meta-col--collection",children:[e.jsx("div",{className:"item-detail__label",children:t("itemDetail.collection")}),e.jsx(At,{contractAddress:a.contractAddress,name:E.name,items:f,className:"item-detail__creator"})]}):null]}):null,e.jsx("hr",{className:"item-detail__divider"}),e.jsx("div",{className:"item-detail__price-block",children:e.jsxs("div",{className:"item-detail__price-row",children:[e.jsxs("div",{className:"item-detail__price-col",children:[o||_?e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.price")}):null,o?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"item-detail__price item-detail__price--market",children:h==null?e.jsx("span",{className:"item-detail__price-value",children:"—"}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"item-detail__approx","aria-hidden":!0,children:"≈"}),e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:h})]})}),e.jsx("div",{className:"item-detail__market-note muted",children:t("assetCard.marketPrice")})]}):_?Xe?e.jsxs("div",{className:"item-detail__price item-detail__price--sale",children:[e.jsxs("span",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}),e.jsxs("span",{className:"item-detail__price-was",children:[e.jsx(M,{className:"item-detail__diamond item-detail__diamond--was"}),a.compareAtCredits]}),Oe(a.compareAtCredits,a.priceCredits)>0?e.jsx("span",{className:"item-detail__sale-badge",children:t("assetCard.saleWithDiscount",{pct:Oe(a.compareAtCredits,a.priceCredits)})}):null,e.jsx(Wa,{endsAt:a.saleEndsAt,className:"item-detail__countdown"})]}):e.jsxs("div",{className:"item-detail__price",children:[e.jsx(M,{className:"item-detail__diamond"}),e.jsx("span",{className:"item-detail__price-value",children:a.priceCredits})]}):e.jsxs("div",{className:"item-detail__price item-detail__price--none",children:[e.jsx("span",{children:t("itemDetail.notForSale")}),e.jsx(Je,{content:t("itemDetail.notForSaleHint"),children:e.jsx("span",{className:"item-detail__price-info",tabIndex:0,role:"img","aria-label":t("itemDetail.notForSaleHint"),children:e.jsx(F,{name:"info",size:14})})})]})]}),la?e.jsxs("div",{className:"item-detail__stock-col",children:[e.jsx("div",{className:"item-detail__price-label",children:t("itemDetail.stock")}),e.jsxs("div",{className:"item-detail__stock-value",children:[(a.available??0).toLocaleString(),"/",Q.Rarity.getMaxSupply(oe).toLocaleString()]})]}):da?e.jsx("div",{className:"item-detail__stock-col",children:e.jsx("div",{className:"item-detail__stock-value item-detail__stock-value--out","data-testid":"out-of-stock",children:t("itemDetail.outOfStock")})}):null]})}),e.jsx("div",{className:`item-detail__ctas${ca?" item-detail__ctas--buttons":""}${oa?" item-detail__ctas--dual":""}`,children:o?e.jsxs(re,{variant:"purple",onClick:()=>w(!0),disabled:!T,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),h!=null?e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),h]}):null]}):ue?e.jsxs(Mt,{"data-testid":"manage-actions",children:[e.jsx(xe,{message:sa}),ra?e.jsxs(e.Fragment,{children:[e.jsx(re,{variant:"purple",onClick:()=>void na(),disabled:H||!Se,children:e.jsx("span",{className:"item-detail__cta-label",children:H?t("itemDetail.manageWorking"):t("itemDetail.manageUpdatePrice")})}),e.jsx(Pt,{variant:"ghost",onClick:()=>void Pe(),disabled:H,children:H?t("myAssets.removing"):t("itemDetail.manageRemove")})]}):e.jsx(re,{variant:"purple",onClick:Ee,disabled:H||!Se,children:e.jsx("span",{className:"item-detail__cta-label",children:t("itemDetail.manageList")})}),e.jsxs(Et,{children:[t("itemDetail.ownItemPrefix")," ",e.jsx(ya,{to:"/my-assets",children:t("nav.myAssets")}),t("itemDetail.ownItemSuffix")]})]}):_?e.jsxs(e.Fragment,{children:[e.jsxs(re,{variant:"purple",onClick:()=>w(!0),disabled:u,children:[e.jsx("span",{className:"item-detail__cta-label",children:t("assetCard.buyNow")}),e.jsxs("span",{className:"item-detail__cta-price","aria-hidden":!0,children:[e.jsx(M,{className:"item-detail__cta-diamond"}),a.priceCredits]})]}),e.jsxs("button",{className:"item-detail__addcart",onClick:Ze,disabled:u||($?W:G),"aria-label":Le,children:[e.jsx(F,{name:"cart-solid"}),e.jsx("span",{className:"item-detail__addcart-label",children:Le})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(wt,{item:a}),e.jsx(It,{item:a})]})})]}):e.jsx(Dt,{})})]}),e.jsx(ft,{title:ea,items:X,onViewAll:a.contractAddress?()=>d(`/collection/${a.contractAddress}`):void 0}),p&&o&&x&&I?e.jsx(yt,{listing:x,rate:I,onClose:()=>w(!1),onSold:()=>w(!1)}):p&&!o?e.jsx(bt,{item:C,resume:L,onClose:()=>{w(!1),b(!1)}}):null,aa&&y&&l?e.jsx(et,{asset:y,session:l,onClose:Fe}):null,ta&&me&&l?e.jsx(at,{item:me,session:l,onClose:Fe}):null]})}function Dt(){return e.jsxs("div",{className:"item-detail__info-skel","aria-hidden":!0,children:[e.jsx("span",{className:"skeleton id-skel__title"}),e.jsxs("div",{className:"id-skel__chips",children:[e.jsx("span",{className:"skeleton id-skel__chip"}),e.jsx("span",{className:"skeleton id-skel__chip"})]}),e.jsx("span",{className:"skeleton id-skel__line"}),e.jsx("span",{className:"skeleton id-skel__line id-skel__line--short"}),e.jsx("hr",{className:"item-detail__divider"}),e.jsx("span",{className:"skeleton id-skel__price"}),e.jsx("span",{className:"skeleton id-skel__btn"})]})}export{ls as ItemDetail,ls as default};
@@ -1,258 +0,0 @@
1
- import{L as ve,a as Ze,r as c,j as t}from"./react-BMZSDQJw.js";import{s as a,y as s,I as j,u as Je,t as r,g as Xe,j as et,z as pe,e as K,B as tt,A as N,q as ue,D as st,f as ot,E as nt,x as rt,c as at,F as it}from"./index-V0hMC6mZ.js";import{f as lt}from"./import-D2QUSpyp.js";import{S as ct,P as dt,f as mt}from"./PrimaryListModal-CQHoY5iG.js";import{c as pt}from"./buy-CN2rC9a0.js";import{R as G,C as ut,a as ft,F as xt,S as D,b as fe}from"./categories-D7_Qudaw.js";import{L as ht}from"./LoadMore-BK9c312B.js";import{D as xe,F as he,R as yt,a as gt,b as bt,c as St,d as wt,S as jt,e as $t,f as Ct,g as It,h as vt,i as kt,j as At,k as Et,C as Tt,l as Ft,m as Rt,n as _t,M as Lt}from"./Assets.styles-JIZQe0rQ.js";import{u as Ot}from"./useInfiniteGrid-COXciuKu.js";import{E as Q}from"./ErrorNotice-DDr3KjIH.js";import{n as ke}from"./emotion-CSxEP8yM.js";import"./dcl-schemas-BICTSpB5.js";import"./sentry-8SzFotJj.js";import"./ethers-Dpp9c5As.js";import"./intl-CBcMB1D2.js";import"./mana-rate-CFrZfrxV.js";import"./index-HN6Rk25C.js";import"./trade-encoding-vTSEXgN1.js";import"./authorizations-CsduRV0X.js";import"./errors-BuvqNt2H.js";import"./Tooltip-zazDSBbm.js";a.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 4px;
5
- width: 100%;
6
- `;a.h2`
7
- margin: 0;
8
- padding: 4px 4px 2px;
9
- font-family: ${s.font.sans};
10
- font-weight: 700;
11
- font-size: 12px;
12
- letter-spacing: 0.46px;
13
- text-transform: uppercase;
14
- color: ${s.colors.muted};
15
- `;a("button",ke("selected"))`
16
- display: flex;
17
- align-items: center;
18
- gap: 10px;
19
- width: 100%;
20
- height: 40px;
21
- padding: 4px 12px;
22
- border: 0;
23
- border-radius: 8px;
24
- background: ${({selected:o})=>o?s.colors.media:"transparent"};
25
- color: ${s.colors.text};
26
- font-family: ${s.font.sans};
27
- font-weight: ${({selected:o})=>o?600:400};
28
- font-size: 14px;
29
- text-align: left;
30
- cursor: pointer;
31
-
32
- @media (hover: hover) {
33
- &:hover {
34
- background: ${s.colors.media};
35
- }
36
- }
37
- &:focus-visible {
38
- outline: 2px solid ${s.colors.accent};
39
- outline-offset: 2px;
40
- }
41
- `;a(j)`
42
- width: 18px;
43
- height: 18px;
44
- flex: none;
45
- color: ${s.colors.muted};
46
- `;a.div`
47
- display: flex;
48
- flex-direction: column;
49
- gap: 8px;
50
- width: 100%;
51
- `;a.span`
52
- font-family: ${s.font.sans};
53
- font-weight: 600;
54
- font-size: 14px;
55
- line-height: 1.43;
56
- color: ${s.colors.text};
57
- padding: 0 4px;
58
- `;a.div`
59
- display: flex;
60
- flex-wrap: wrap;
61
- gap: 8px;
62
- padding: 4px;
63
- `;a("button",ke("selected"))`
64
- display: inline-flex;
65
- align-items: center;
66
- gap: 4px;
67
- padding: 4px 10px;
68
- border-radius: 6px;
69
- background: ${({selected:o})=>o?s.colors.text:s.colors.softWhite};
70
- border: ${({selected:o})=>o?`1px solid ${s.colors.text}`:`0.5px solid ${s.colors.gray4}`};
71
- color: ${({selected:o})=>o?s.colors.white:s.colors.gray0};
72
- font-family: ${s.font.sans};
73
- font-weight: ${({selected:o})=>o?600:400};
74
- font-size: 12px;
75
- cursor: pointer;
76
-
77
- &:hover {
78
- border-color: ${s.colors.text};
79
- }
80
- &:focus-visible {
81
- outline: 2px solid ${s.colors.accent};
82
- outline-offset: 2px;
83
- }
84
- `;const Pt=a.div`
85
- display: flex;
86
- align-items: center;
87
- gap: 8px;
88
- height: 44px;
89
- padding: 0 12px;
90
- margin-bottom: 16px;
91
- border: 1px solid ${s.colors.lineStrong};
92
- border-radius: ${s.radius.btn};
93
- background: ${s.colors.white};
94
-
95
- &:focus-within {
96
- border-color: ${s.colors.accent};
97
- }
98
- `,zt=a(j)`
99
- width: 18px;
100
- height: 18px;
101
- flex: none;
102
- color: ${s.colors.muted};
103
- `,Bt=a.input`
104
- flex: 1;
105
- min-width: 0;
106
- border: 0;
107
- background: none;
108
- padding: 0;
109
- font-family: ${s.font.sans};
110
- font-size: 14px;
111
- color: ${s.colors.text};
112
-
113
- &::placeholder {
114
- color: ${s.colors.muted2};
115
- }
116
- &:focus {
117
- outline: 0;
118
- }
119
- `,Mt=a.button`
120
- display: grid;
121
- place-items: center;
122
- width: 24px;
123
- height: 24px;
124
- border: 0;
125
- border-radius: 50%;
126
- background: ${s.colors.chip};
127
- color: ${s.colors.text};
128
- cursor: pointer;
129
- flex: none;
130
-
131
- &:focus-visible {
132
- outline: 2px solid ${s.colors.accent};
133
- outline-offset: 2px;
134
- }
135
- `,qt=a(j)`
136
- width: 12px;
137
- height: 12px;
138
- `,ye=a.div`
139
- display: grid;
140
- grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
141
- gap: 20px;
142
-
143
- ${s.media.down("sm")} {
144
- grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
145
- gap: 12px;
146
- }
147
- `;a.p`
148
- margin: 24px 0;
149
- font-family: ${s.font.sans};
150
- font-size: 14px;
151
- color: ${s.colors.muted};
152
- `;const ge=a.div`
153
- display: flex;
154
- flex-direction: column;
155
- align-items: center;
156
- justify-content: center;
157
- gap: 6px;
158
- padding: 72px 24px;
159
- text-align: center;
160
- `,be=a.div`
161
- display: flex;
162
- align-items: center;
163
- justify-content: center;
164
- width: 72px;
165
- height: 72px;
166
- margin-bottom: 10px;
167
- border-radius: 50%;
168
- background: ${s.colors.navViolet};
169
- color: ${s.colors.accent};
170
- `,Se=a.p`
171
- margin: 0;
172
- font-family: ${s.font.sans};
173
- font-size: 18px;
174
- font-weight: 600;
175
- color: ${s.colors.text};
176
- `,we=a.p`
177
- margin: 0;
178
- max-width: 360px;
179
- font-family: ${s.font.sans};
180
- font-size: 14px;
181
- line-height: 1.5;
182
- color: ${s.colors.muted};
183
- `,Kt=a(ve)`
184
- margin-top: 12px;
185
- display: inline-flex;
186
- align-items: center;
187
- height: 40px;
188
- padding: 0 20px;
189
- border-radius: 8px;
190
- background: ${s.colors.accent};
191
- color: #fff;
192
- font-family: ${s.font.sans};
193
- font-size: 14px;
194
- font-weight: 600;
195
- text-decoration: none;
196
- cursor: pointer;
197
-
198
- &:hover {
199
- background: ${s.colors.accentHover};
200
- }
201
- `,Nt=a.section`
202
- max-width: 520px;
203
- margin: 48px auto;
204
- text-align: center;
205
- display: flex;
206
- flex-direction: column;
207
- gap: 16px;
208
- align-items: center;
209
- `,Gt=a.h1`
210
- margin: 0;
211
- font-family: ${s.font.sans};
212
- font-weight: 700;
213
- font-size: 24px;
214
- color: ${s.colors.text};
215
- `,Dt=a.p`
216
- margin: 0;
217
- font-family: ${s.font.sans};
218
- font-size: 15px;
219
- color: ${s.colors.muted};
220
- `,Qt=a(ve)`
221
- display: flex;
222
- align-items: center;
223
- gap: 12px;
224
- margin-bottom: 16px;
225
- padding: 12px 16px;
226
- border-radius: ${s.radius.btn};
227
- background: ${s.colors.rarityBg};
228
- color: ${s.colors.text};
229
- text-decoration: none;
230
-
231
- &:hover {
232
- filter: brightness(0.98);
233
- }
234
- &:focus-visible {
235
- outline: 2px solid ${s.colors.accent};
236
- outline-offset: 2px;
237
- }
238
- `,Ut=a.span`
239
- display: flex;
240
- flex-direction: column;
241
- flex: 1;
242
- min-width: 0;
243
- font-family: ${s.font.sans};
244
- `,Ht=a.strong`
245
- font-weight: 600;
246
- font-size: 14px;
247
- color: ${s.colors.text};
248
- `,Wt=a.span`
249
- font-size: 12px;
250
- color: ${s.colors.muted};
251
- `,Yt=a.span`
252
- flex: none;
253
- font-weight: 600;
254
- font-size: 13px;
255
- color: ${s.colors.accent};
256
- text-transform: uppercase;
257
- letter-spacing: 0.046em;
258
- `,Vt=48,je=[{key:"wearables",labelKey:"myAssets.sectionWearables",category:"wearable"},{key:"emotes",labelKey:"myAssets.sectionEmotes",category:"emote"},{key:"names",labelKey:"myAssets.sectionNames",category:"ens"},{key:"creations",labelKey:"myAssets.sectionCreations"}],U=[{key:"newest",label:"filterBar.sortNewest",server:"newest"},{key:"name",label:"filterBar.sortName",server:"name"},{key:"cheapest",label:"filterBar.sortCheapest",server:"cheapest"}];function $e(o){return o==="wearables"||o==="emotes"}const Ce={wearables:"wearable",emotes:"emote",names:"names",creations:""},Zt={wearable:"wearables",emote:"emotes",names:"names"};function Ie(o){return{id:o.id,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.itemId,category:o.category,rarity:o.rarity??"common",network:o.network,chainId:o.chainId,thumbnail:o.image,priceCredits:o.listingPrice??0,gender:null,isSmart:!1,tokenId:o.tokenId,issuedId:o.issuedId}}function Jt(o,T=0){return{id:`${o.contractAddress}-${o.blockchainItemId}`,name:o.name,creator:"",contractAddress:o.contractAddress,itemId:o.blockchainItemId,category:o.category,rarity:o.rarity,network:"MATIC",chainId:at.chainId,thumbnail:o.thumbnail,priceCredits:T,gender:null,isSmart:!1}}function Ss(){var ce,de;Je({title:r("nav.myAssets"),noindex:!0});const{session:o,error:T,signIn:Ae,restore:H}=Xe(),F=et(),[Ee,Te]=Ze(),W=Ee.get("section"),l=je.some(e=>e.key===W)?W:"wearables",[m,R]=c.useState("all"),[h,_]=c.useState([]),[p,$]=c.useState(null),[S,Fe]=c.useState("newest"),[C,Y]=c.useState(""),[y,Re]=c.useState(""),[I,g]=c.useState(!1),[_e,Le]=c.useState(!0),[Oe,Pe]=c.useState(!1),[V,Z]=c.useState(null),[J,X]=c.useState(null),[ee,te]=c.useState(null),[ze,se]=c.useState(null);c.useEffect(()=>{H()},[H]),c.useEffect(()=>{const e=setTimeout(()=>Re(C.trim()),300);return()=>clearTimeout(e)},[C]),c.useEffect(()=>{if(!I)return;const e=i=>{i.key==="Escape"&&g(!1)};document.addEventListener("keydown",e);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=n}},[I]);const u=o==null?void 0:o.address,Be=je.find(e=>e.key===l),v=$e(l),oe=(U.find(e=>e.key===S)??U[0]).server,Me=m==="on_sale"?r("filter.onSale"):m==="not_for_sale"?r("filter.notForSale"):"",qe=G.filter(e=>h.includes(e)).map(pe).join(", ");function ne(e){Te(n=>{const i=new URLSearchParams(n);return i.set("section",e),i},{replace:!0}),$(null),$e(e)||_([]),g(!1)}function re(e){_(n=>n.includes(e)?n.filter(i=>i!==e):[...n,e])}function Ke(e){const n=Zt[e];n&&ne(n)}const{items:L,total:Ne,isLoading:O,isPlaceholderData:P,error:Ge,hasNextPage:De,isFetchingNextPage:ae,fetchNextPage:Qe}=Ot(["my-assets",u,l,m,h,p,y,oe],e=>st(u,{category:Be.category,first:Vt,skip:e,search:y||void 0,rarities:v&&h.length?h:void 0,wearableCategories:l==="wearables"&&p?fe[p]:void 0,emoteCategories:l==="emotes"&&p?fe[p]:void 0,onlyOnSale:m==="on_sale"||void 0,sortBy:oe}).then(n=>({items:n.assets,total:n.total})),{enabled:!!u&&l!=="creations"}),z=c.useMemo(()=>m==="not_for_sale"?L.filter(e=>!e.isOnSale):L,[L,m]),{data:k,isLoading:B,isError:Ue}=K({queryKey:["publishable-items",u],queryFn:()=>mt(u,o.identity),enabled:!!o&&l==="creations",retry:!1}),M=c.useMemo(()=>[...new Set((k??[]).map(e=>e.contractAddress))],[k]),{data:A}=K({queryKey:["collection-sale-state",u,M],enabled:M.length>0,queryFn:async()=>{const e=await Promise.all(M.map(async i=>[i,await it(i)])),n={};for(const[i,d]of e)for(const[f,x]of Object.entries(d))n[`${i}-${f}`]=x;return n}}),w=e=>A==null?void 0:A[`${e.contractAddress}-${e.blockchainItemId}`],q=c.useMemo(()=>{let e=k??[];if(m==="on_sale"?e=e.filter(i=>{var d;return(d=w(i))==null?void 0:d.isOnSale}):m==="not_for_sale"&&(e=e.filter(i=>{var d;return!((d=w(i))!=null&&d.isOnSale)})),y){const i=y.toLowerCase();e=e.filter(d=>d.name.toLowerCase().includes(i))}const n=[...e];return S==="name"?n.sort((i,d)=>i.name.localeCompare(d.name)):S==="cheapest"&&n.sort((i,d)=>{var f,x;return(((f=w(i))==null?void 0:f.priceCredits)??0)-(((x=w(d))==null?void 0:x.priceCredits)??0)}),n},[k,A,m,y,S]),{data:b}=K({queryKey:["importable",u],queryFn:()=>lt(u),enabled:!!u}),ie=((b==null?void 0:b.creations.length)??0)+((b==null?void 0:b.owned.length)??0);async function le(e,n,i){if(o){se(null),te(i);try{const d=await ot(e);await pt({trade:d,signer:o.signer}),nt.success(r("myAssets.removedFromSale",{name:n})),await F.invalidateQueries({queryKey:["my-assets",o.address]}),await F.invalidateQueries({queryKey:["collection-sale-state"]}),await F.invalidateQueries({queryKey:["publishable-items"]})}catch(d){const f=d,x=(f.message??"").toLowerCase(),me=f.code===4001||x.includes("reject")||x.includes("denied");me||rt(d,{flow:"remove-listing",tradeId:e}),se(me?r("getCredits.errorCanceled"):r("myAssets.removeListingError"))}finally{te(null)}}}if(!o)return t.jsxs(Nt,{children:[t.jsx(Gt,{children:r("nav.myAssets")}),t.jsx(Dt,{children:r("myAssets.signInPrompt")}),t.jsx(tt,{variant:"purple",onClick:()=>Ae(),children:r("storeSettings.signIn")}),t.jsx(Q,{message:T})]});const He=l==="creations"?B:O||P,We=l==="creations"?q.length:m==="not_for_sale"?z.length:Ne,E=[];if(m!=="all"&&E.push({key:"status",label:m==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),v)for(const e of G)h.includes(e)&&E.push({key:`rarity-${e}`,label:pe(e),onRemove:()=>re(e)});if(v&&p){const e=(de=(ce=ut.find(n=>n.key===Ce[l]))==null?void 0:ce.subs)==null?void 0:de.find(n=>n.key===p);E.push({key:"sub",label:e?r(e.labelKey):p,onRemove:()=>$(null)})}function Ye(){R("all"),_([]),$(null)}const Ve=t.jsxs(t.Fragment,{children:[t.jsx(ft,{title:r("myAssets.assetsHeading"),category:Ce[l],subCategory:p,onCategory:Ke,onSub:$,onCollections:()=>ne("creations"),collections:l==="creations",extraLabelKey:"myAssets.sectionCreations",hideAll:!0}),v?t.jsxs(t.Fragment,{children:[t.jsx(xe,{}),t.jsx(he,{title:r("assets.rarity"),open:Oe,onToggle:()=>Pe(e=>!e),summary:qe,headerTestId:"sidebar-section-toggle",children:t.jsx(yt,{"data-testid":"rarity-filter",children:G.map(e=>{const n=h.includes(e);return t.jsxs(gt,{type:"button",selected:n,"aria-pressed":n,onClick:()=>re(e),"data-testid":"rarity-filter-check",children:[t.jsx(bt,{color:s.rarities[e],children:n?t.jsx(St,{name:"check","aria-hidden":!0}):null}),t.jsx(wt,{selected:n,children:e})]},e)})})})]}):null,t.jsx(xe,{}),t.jsx(he,{title:r("filter.status"),open:_e,onToggle:()=>Le(e=>!e),summary:Me,children:[["all",r("filter.statusAll")],["on_sale",r("filter.onSale")],["not_for_sale",r("filter.notForSale")]].map(([e,n])=>t.jsxs(jt,{children:[t.jsx($t,{type:"radio",name:"myassets-status",checked:m===e,onChange:()=>R(e)}),t.jsx(Ct,{children:n})]},e))})]});return t.jsxs(It,{"data-testid":"my-assets",children:[I?t.jsx(vt,{onClick:()=>g(!1),"aria-hidden":!0}):null,t.jsxs(kt,{className:I?"is-open":"","data-testid":"my-assets-sidebar",children:[t.jsxs(At,{children:[t.jsx(Et,{children:r("assets.filters")}),t.jsx(Tt,{onClick:()=>g(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),t.jsx(Ft,{children:Ve}),t.jsx(Rt,{children:t.jsx(_t,{type:"button",onClick:()=>g(!1),children:r("assets.showItems")})})]}),t.jsxs(Lt,{children:[t.jsxs(Pt,{children:[t.jsx(zt,{name:"search","aria-hidden":!0}),t.jsx(Bt,{type:"search",value:C,placeholder:r("myAssets.searchPlaceholder"),"aria-label":r("myAssets.searchPlaceholder"),onChange:e=>Y(e.target.value)}),C?t.jsx(Mt,{type:"button","aria-label":r("myAssets.clearSearch"),onClick:()=>Y(""),children:t.jsx(qt,{name:"close","aria-hidden":!0})}):null]}),ie>0?t.jsxs(Qt,{to:"/import",children:[t.jsx("span",{"aria-hidden":!0,children:"📦"}),t.jsxs(Ut,{children:[t.jsx(Ht,{children:r("myAssets.importTitle")}),t.jsx(Wt,{children:r("myAssets.importSub",{count:ie})})]}),t.jsx(Yt,{children:r("myAssets.import")})]}):null,t.jsx(xt,{sort:S,onSort:Fe,sortOptions:U,total:We,loading:He,query:y,onOpenFilters:()=>g(!0),chips:E,onClearChips:Ye}),(l==="creations"?Ue:Ge)?t.jsx(Q,{message:r("myAssets.ownedError"),testId:"my-assets-error"}):null,t.jsx(Q,{message:ze}),l==="creations"?t.jsxs(t.Fragment,{children:[t.jsx(ye,{"data-testid":"grid",children:B?t.jsx(D,{count:12}):q.map(e=>{const n=w(e),i=!!(n!=null&&n.isOnSale);return t.jsx(N,{item:Jt(e,(n==null?void 0:n.priceCredits)??0),mode:"manage",listed:i,busy:ee===e.id,onList:()=>{ue("Shop Started Listing",{listing_type:"primary",item_id:e.blockchainItemId}),X(e)},onUnlist:()=>{n!=null&&n.tradeId&&le(n.tradeId,e.name,e.id)}},`${e.contractAddress}-${e.blockchainItemId}`)})}),!B&&q.length===0?t.jsxs(ge,{children:[t.jsx(be,{children:t.jsx(j,{name:"pen",size:30,"aria-hidden":!0})}),t.jsx(Se,{children:r("myAssets.emptyCreationsTitle")}),t.jsx(we,{children:r("myAssets.nothingToPublish")})]}):null]}):t.jsxs(t.Fragment,{children:[t.jsxs(ye,{"data-testid":"grid",children:[O||P?t.jsx(D,{count:12}):z.map(e=>l==="names"?t.jsx(N,{item:{...Ie(e),category:"ens"},mode:"view"},e.id):t.jsx(N,{item:Ie(e),mode:"manage",listed:e.isOnSale,busy:ee===e.id,onList:()=>{ue("Shop Started Listing",{listing_type:"secondary",item_id:e.itemId??e.tokenId??null}),Z(e)},onUnlist:()=>{e.tradeId&&le(e.tradeId,e.name,e.id)}},e.id)),ae?t.jsx(D,{count:6}):null]}),m!=="not_for_sale"?t.jsx(ht,{hasNextPage:De,isFetching:ae,onLoadMore:()=>void Qe()}):null,!O&&!P&&z.length===0?t.jsxs(ge,{children:[t.jsx(be,{children:t.jsx(j,{name:l==="names"?"website":l==="emotes"?"emote-dance":"cat-upper",size:30,"aria-hidden":!0})}),t.jsx(Se,{children:l==="names"?r("myAssets.emptyNamesTitle"):r("myAssets.emptyOwnedTitle")}),t.jsx(we,{children:l==="names"?r("myAssets.namesEmpty"):r("myAssets.ownedEmpty")}),l!=="names"?t.jsx(Kt,{to:"/assets",children:r("myAssets.emptyBrowse")}):null]}):null]})]}),V?t.jsx(ct,{asset:V,session:o,onClose:()=>Z(null)}):null,J?t.jsx(dt,{item:J,session:o,onClose:()=>X(null)}):null]})}export{Ss as MyAssets};
@@ -1 +0,0 @@
1
- import{c as w,a3 as K,j as M,t as a,l as P,B as f,C as j,p as E,q as C,E as $,x as T,r as O,J as H}from"./index-V0hMC6mZ.js";import{d as q}from"./dcl-schemas-BICTSpB5.js";import{u as F,r as m,j as s}from"./react-BMZSDQJw.js";import{a as J,b as X,i as V,e as Y,c as z}from"./trade-encoding-vTSEXgN1.js";import{f as R}from"./errors-BuvqNt2H.js";import{E as U}from"./ErrorNotice-DDr3KjIH.js";const I=()=>`${w.builderServerUrl}/v1`;function B(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 Q(e,r){const t=await K(e,{method:"GET",identity:r,metadata:{}});if(!t.ok)throw new Error(`builder-server ${t.status}: ${await t.text()}`);const l=await t.json();return l.data??l}function Z(e,r){const t=r-e;return t>0?t:0}function ee(e){var r,t,l,i,n;return((t=(r=e.data)==null?void 0:r.wearable)==null?void 0:t.category)??((i=(l=e.data)==null?void 0:l.emote)==null?void 0:i.category)??((n=e.data)==null?void 0:n.category)??e.type??"wearable"}function A(e){return`${I()}/storage/contents/${e}`}function S(e,r){if(!e)return"";if(/^https?:\/\//.test(e))return e;const t=r==null?void 0:r[e];return t?A(t):/^(ba|Qm)/.test(e)?A(e):""}async function se(e,r){try{const t=await fetch(`${I()}/items/${e}/${r}/contents`);if(!t.ok)return{};const l=await t.json();return l.data??l}catch{return{}}}async function ae(e,r,t){const l=S(e.thumbnail,e.contents)||S("thumbnail.png",e.contents);if(l)return l;if(r&&t){const i=await se(r,t);return S(e.thumbnail,i)||S("thumbnail.png",i)||S("image.png",i)}return""}async function te(e,r){const t=`${I()}/${e.toLowerCase()}/collections?is_published=true`,l=await Q(t,r);return B(l).filter(i=>i.is_published&&!!i.contract_address).map(i=>({id:i.id,name:i.name,contractAddress:i.contract_address.toLowerCase(),isPublished:i.is_published,isApproved:i.is_approved,minters:(i.minters??[]).map(n=>n.toLowerCase())}))}async function re(e,r){const t=`${I()}/collections/${e.id}/items`,l=await Q(t,r);return(await Promise.all(B(l).map(async n=>{const x=n.rarity??"common",y=Number(n.total_supply??0)||0;let o;try{o=q.Rarity.getMaxSupply(x)}catch{o=0}const _=(n.contract_address??e.contractAddress).toLowerCase(),p=n.blockchain_item_id??"";return{id:n.id,collectionId:e.id,collectionName:e.name,contractAddress:_,blockchainItemId:p,name:n.name,category:ee(n),rarity:x,thumbnail:await ae(n,_,p),type:n.type??"wearable",isPublished:n.is_published??e.isPublished,isApproved:n.is_approved??e.isApproved,totalSupply:y,maxSupply:o,remainingSupply:Z(y,o),minters:e.minters}}))).filter(ie)}function ie(e){return e.isPublished&&e.isApproved&&e.blockchainItemId!==""&&e.blockchainItemId!=null&&e.remainingSupply>0}async function he(e,r){const t=await te(e,r);return(await Promise.all(t.map(async i=>{try{return await re(i,r)}catch{return[]}}))).flat()}const ne=1e3*60*60*24*182;function ye({asset:e,session:r,onClose:t}){const l=M(),i=F(),[n,x]=m.useState("10"),[y,o]=m.useState(null),[_,p]=m.useState(null),[u,N]=m.useState(!1),[h,v]=m.useState(null);async function k(){p(null);const c=Number(n);if(!Number.isInteger(c)||c<=0){p(a("sellModal.errorWholeNumber"));return}N(!0);try{o(a("sellModal.statusPreparing")),await J({signer:r.signer,contractAddress:e.contractAddress,chainId:e.chainId}),o(a("sellModal.statusListing"));const g=await X({signer:r.signer,nft:{contractAddress:e.contractAddress,tokenId:e.tokenId,network:e.network,chainId:e.chainId},usdPrice:c/10,expiresAtMs:Date.now()+ne});o(a("sellModal.statusPublishing")),await E(g,r.identity),o(null),v(c),C("Shop Listed Item",{item_id:e.itemId??e.tokenId??null,contract_address:e.contractAddress,price_credits:c,price_usd:c/10,listing_type:"secondary",is_primary:!1}),$.success(a("sellModal.toastOnSale",{name:e.name})),l.invalidateQueries({queryKey:["my-assets",r.address]})}catch(g){T(g,{flow:"list_secondary"}),C("Shop Listing Failed",{listing_type:"secondary",error_code:O(g)}),p(R(g,a("sellModal.errorGeneric"))),o(null)}finally{N(!1)}}function L(){t(),i(`/item/${e.contractAddress}/${e.tokenId}`)}return h!==null?s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:c=>c.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:a("sellModal.successTitle")}),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:[a("sellModal.listedFor")," ",s.jsxs("strong",{children:[s.jsx(P,{className:"ccy-mark"})," ",h]})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(f,{variant:"ghost",onClick:t,children:a("getCredits.done")}),s.jsx(f,{variant:"purple",onClick:L,children:a("sellModal.viewInShop")})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal","data-testid":"modal",onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("h2",{className:"modal__title",children:a("sellModal.listTitle",{name:e.name})}),e.image?s.jsx("img",{className:"modal__img",src:e.image,alt:e.name}):null,s.jsxs("label",{className:"field",children:[s.jsx("span",{children:a("sellModal.priceLabel",{currency:j.name})}),s.jsx("input",{type:"number",min:"1",step:"1",value:n,onChange:c=>x(c.target.value),disabled:u})]}),s.jsx("p",{className:"muted small",children:a("sellModal.pricedInWhole",{currency:j.name,currencySingular:j.nameSingular})}),y?s.jsx("p",{className:"muted",children:y}):null,s.jsx(U,{message:_}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(f,{variant:"ghost",onClick:t,disabled:u,children:a("sellModal.cancel")}),s.jsx(f,{onClick:()=>void k(),disabled:u,children:u?a("sellModal.listing"):a("sellModal.putOnSale")})]})]})})}const le=1e3*60*60*24*182;function ge({item:e,session:r,onClose:t}){const l=M(),i=F(),[n,x]=m.useState("10"),[y,o]=m.useState(null),[_,p]=m.useState(null),[u,N]=m.useState(!1),[h,v]=m.useState(null),[k,L]=m.useState(null),c=w.chainId,g=H(r.providerType);m.useEffect(()=>{let d=!1;return(async()=>{try{const b=await V({contractAddress:e.contractAddress,chainId:c});d||v(b)}catch{d||v(!1)}})(),()=>{d=!0}},[e.contractAddress,c]);async function W(){p(null);const d=Number(n);if(!Number.isInteger(d)||d<=0){p(a("primaryList.errorWholeNumber"));return}N(!0);try{h||(o(a("primaryList.statusEnabling")),await Y({signer:r.signer,contractAddress:e.contractAddress,chainId:c}),v(!0)),o(a("primaryList.statusPublishing"));const b=await z({signer:r.signer,item:{contractAddress:e.contractAddress,itemId:e.blockchainItemId,network:q.Network.MATIC,chainId:c},usdPrice:d/10,uses:e.remainingSupply,expiresAtMs:Date.now()+le});o(a("primaryList.statusFinishing")),await E(b,r.identity),o(null),L(d),C("Shop Listed Item",{item_id:e.blockchainItemId,contract_address:e.contractAddress,price_credits:d,price_usd:d/10,listing_type:"primary",is_primary:!0}),$.success(a("primaryList.toastOnSale",{name:e.name})),l.invalidateQueries({queryKey:["publishable-items"]}),l.invalidateQueries({queryKey:["collection-sale-state"]})}catch(b){T(b,{flow:"list_primary"}),C("Shop Listing Failed",{listing_type:"primary",error_code:O(b)}),p(R(b,a("primaryList.errorGeneric"))),o(null)}finally{N(!1)}}function D(){t(),i(`/item/${e.contractAddress}/${e.blockchainItemId}`)}const G=u?a("primaryList.listing"):h===!1?a("primaryList.enableAndPutOnSale"):a("primaryList.putOnSale");return k!==null?s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal modal--success",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("div",{className:"modal-success__check","aria-hidden":!0,children:"✓"}),s.jsx("h2",{className:"modal__title",children:a("primaryList.successTitle")}),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:[a("primaryList.listedFor")," ",s.jsxs("strong",{children:[s.jsx(P,{className:"ccy-mark"})," ",k]})," ",a("primaryList.dotAvailable",{count:e.remainingSupply})]}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(f,{variant:"ghost",onClick:t,children:a("getCredits.done")}),s.jsx(f,{variant:"purple",onClick:D,children:a("primaryList.viewInShop")})]})]})}):s.jsx("div",{className:"modal-backdrop",onClick:t,role:"presentation",children:s.jsxs("div",{className:"modal","data-testid":"modal",onClick:d=>d.stopPropagation(),role:"dialog","aria-modal":"true",children:[s.jsx("h2",{className:"modal__title",children:a("primaryList.publishTitle",{name:e.name})}),e.thumbnail?s.jsx("img",{className:"modal__img",src:e.thumbnail,alt:e.name}):null,s.jsx("p",{className:"muted small",children:a("primaryList.fromCollection",{collectionName:e.collectionName,count:e.remainingSupply})}),s.jsxs("label",{className:"field",children:[s.jsx("span",{children:a("primaryList.priceLabel",{currency:j.name})}),s.jsx("input",{type:"number",min:"1",step:"1",value:n,onChange:d=>x(d.target.value),disabled:u})]}),s.jsx("p",{className:"muted small",children:a("primaryList.pricedInWhole",{currency:j.name,currencySingular:j.nameSingular})}),h===!1&&!u?g?s.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeConfirm",{collectionName:e.collectionName})}):s.jsx("p",{className:"muted small primary-note",children:a("primaryList.firstTimeManaged",{collectionName:e.collectionName})}):h===!0&&!u?g?s.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyConfirm")}):s.jsx("p",{className:"muted small primary-note",children:a("primaryList.readyManaged")}):null,y?s.jsx("p",{className:"muted",children:y}):null,s.jsx(U,{message:_}),s.jsxs("div",{className:"modal__actions",children:[s.jsx(f,{variant:"ghost",onClick:t,disabled:u,children:a("primaryList.cancel")}),s.jsx(f,{onClick:()=>void W(),disabled:u||h===null,children:h===null?a("primaryList.checking"):G})]})]})})}export{ge as P,ye as S,he as f};