@abtnode/blocklet-services 1.16.45-beta-20250609-111118-0d252ebe → 1.16.45-beta-20250612-231219-481217be

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 (217) hide show
  1. package/api/cache.js +36 -21
  2. package/api/libs/connect/session.js +2 -2
  3. package/api/middlewares/proxy-to-daemon.js +6 -2
  4. package/api/routes/blocklet.js +25 -5
  5. package/api/routes/dns-resolver.js +1 -1
  6. package/api/routes/env.js +2 -1
  7. package/api/services/auth/connect/invite.js +1 -1
  8. package/api/services/auth/connect/issue-passport.js +1 -1
  9. package/api/services/auth/connect/verify-destroy.js +3 -6
  10. package/api/services/auth/connect/verify-elevated.js +8 -9
  11. package/api/services/auth/session.js +1 -1
  12. package/api/services/oauth/server.js +2 -1
  13. package/api/socket/channel/did.js +2 -2
  14. package/dist/assets/{AdapterDayjs-BXVfASrK.js → AdapterDayjs-BzjU9O7t.js} +1 -1
  15. package/dist/assets/{ArrowDropDown-Ce8TY3aP.js → ArrowDropDown-CrJjI_sT.js} +1 -1
  16. package/dist/assets/{CheckCircle-M9NlpTm_.js → CheckCircle-BcPSvH2E.js} +1 -1
  17. package/dist/assets/{ChevronLeft-02OWcWpH.js → ChevronLeft-Ch9iK6fF.js} +1 -1
  18. package/dist/assets/{ChevronRight-CB8w0u2n.js → ChevronRight-DclARA5k.js} +1 -1
  19. package/dist/assets/{Community-vE_QnoqV.js → Community-D4mv0jfL.js} +1 -1
  20. package/dist/assets/{DeleteOutline-1-hBNY1U.js → DeleteOutline-CnS2XiM1.js} +1 -1
  21. package/dist/assets/{Done-CcJLRcBY.js → Done-C9LPqADS.js} +1 -1
  22. package/dist/assets/{Download-HHknpEZd.js → Download-D9LfWoxF.js} +1 -1
  23. package/dist/assets/{Edit-hd-cDU5C.js → Edit-rPlryssW.js} +1 -1
  24. package/dist/assets/{EditIcon-DiM9RB8U.js → EditIcon-DfiDnAsm.js} +1 -1
  25. package/dist/assets/{Error-D0rGqAKE.js → Error-q_AhSCeT.js} +1 -1
  26. package/dist/assets/{ExpandLess-Fb-uW6u_.js → ExpandLess-Da2Rv9Ox.js} +1 -1
  27. package/dist/assets/{Google-WGwK551e.js → Google-Buu8u6PW.js} +1 -1
  28. package/dist/assets/{Holiday-BnL2IwX3.js → Holiday-DkzYmdt-.js} +1 -1
  29. package/dist/assets/{Home-DeTVRhMG.js → Home-DkCBzKe9.js} +1 -1
  30. package/dist/assets/{InfoOutlined-CLiL5VeK.js → InfoOutlined-C8ZBPUhD.js} +1 -1
  31. package/dist/assets/{Launch-BwVeOcBz.js → Launch-Nu8TBDKk.js} +1 -1
  32. package/dist/assets/{LaunchOutlined-CPurmWuM.js → LaunchOutlined-DQZ7S23O.js} +1 -1
  33. package/dist/assets/{LockIcon-QnxDGvZv.js → LockIcon-BEG59s5q.js} +1 -1
  34. package/dist/assets/{Meeting-BkjjPbp7.js → Meeting-KSUAdbzW.js} +1 -1
  35. package/dist/assets/{MoreHoriz-9E3q8aHi.js → MoreHoriz-Ba9rYlyz.js} +1 -1
  36. package/dist/assets/{OffSick-D2B01pyN.js → OffSick-B0VcZ-o0.js} +1 -1
  37. package/dist/assets/{PlayArrow-B_ZNrQDa.js → PlayArrow-RVSfCmrB.js} +1 -1
  38. package/dist/assets/{QuestionMarkCircle-BMcwgPWr.js → QuestionMarkCircle-jbhclAfX.js} +1 -1
  39. package/dist/assets/{TuneOutlined-0oMZE8a4.js → TuneOutlined-CwV20zYf.js} +1 -1
  40. package/dist/assets/{ViewList-ColSGL1_.js → ViewList-D1BI4ac9.js} +1 -1
  41. package/dist/assets/{WorkingRemotely-CxoGYC4d.js → WorkingRemotely-5Kw3C-_c.js} +1 -1
  42. package/dist/assets/{access-control-nyeEpwlF.js → access-control-C-kFaf9T.js} +1 -1
  43. package/dist/assets/{actions-DtL6bYnA.js → actions-DYQW2ChM.js} +1 -1
  44. package/dist/assets/{add-component-core-CaE3xcyT.js → add-component-core-UeQfX1b1.js} +37 -37
  45. package/dist/assets/add-resource-BdL-oJxe.js +1 -0
  46. package/dist/assets/{addon-e-JO0VU3.js → addon-DMedfvRj.js} +1 -1
  47. package/dist/assets/{advanced-yrYBgA5T.js → advanced-BZZToP_j.js} +2 -2
  48. package/dist/assets/api-87p2GGd0.js +1 -0
  49. package/dist/assets/{appearance-DB1QowgL.js → appearance-CYop22yw.js} +1 -1
  50. package/dist/assets/ar-D9QEDjY-.js +7 -0
  51. package/dist/assets/{audit-logs-BamIXrWh.js → audit-logs-BtBk6uAY.js} +3 -3
  52. package/dist/assets/{authorize-B9LP0G9q.js → authorize-CQZkUNyV.js} +1 -1
  53. package/dist/assets/{base-chart-BYonGucU.js → base-chart-C2FJuVG1.js} +1 -1
  54. package/dist/assets/{base32-CmYq1ikq.js → base32-DEjena1X.js} +1 -1
  55. package/dist/assets/{branding-OlEgtAUT.js → branding-7ppDxFZf.js} +2 -2
  56. package/dist/assets/branding-gXMozCeI.js +54 -0
  57. package/dist/assets/{bundle-avatar-C41ZXEbR.js → bundle-avatar-B5-ypzmO.js} +1 -1
  58. package/dist/assets/button-YPMo8IwK.js +1 -0
  59. package/dist/assets/{click-to-copy-BUVqg1RQ.js → click-to-copy-BMX2P5UB.js} +1 -1
  60. package/dist/assets/{cloneDeep-ro06l5HL.js → cloneDeep-Jl_OPbSo.js} +1 -1
  61. package/dist/assets/{collapse--nd2JDBL.js → collapse-9taxUXec.js} +1 -1
  62. package/dist/assets/{complete-gnnvUqGU.js → complete-C8T0HN-B.js} +1 -1
  63. package/dist/assets/{component-ClWADDCr.js → component-D6hOmRzO.js} +1 -1
  64. package/dist/assets/{config-2Sy6fCTJ.js → config-DcwlSddI.js} +1 -1
  65. package/dist/assets/{config-QpBBpp7d.js → config-Sq1CUTiJ.js} +1 -1
  66. package/dist/assets/{config-navigation-CsVa3Hf0.js → config-navigation-IR_yUgmM.js} +6 -6
  67. package/dist/assets/{config-space-B39Ur9Mf.js → config-space-C3fS58cn.js} +1 -1
  68. package/dist/assets/{confirm-Bay3BcpN.js → confirm-DApmnpvm.js} +1 -1
  69. package/dist/assets/{connect-T4cAO9om.js → connect-BF4GoRL-.js} +1 -1
  70. package/dist/assets/connect-Bf8y7fMm.js +5 -0
  71. package/dist/assets/{connect-to-Dac7orQh.js → connect-to-Bwfa2hMr.js} +1 -1
  72. package/dist/assets/{content-layout-DuPlKBe3.js → content-layout-BC2QkTYi.js} +1 -1
  73. package/dist/assets/dashboard-B2X6c8E8.js +239 -0
  74. package/dist/assets/{de-Dv_ApqsF.js → de-BOa43YBF.js} +2 -2
  75. package/dist/assets/{delete-confirm-B1F5wKdb.js → delete-confirm-BsEqJQRY.js} +1 -1
  76. package/dist/assets/{did-address-bJAfhuZx.js → did-address-L54dTMrT.js} +1 -1
  77. package/dist/assets/domain-BGh0GDuZ.js +9 -0
  78. package/dist/assets/{domain-action-card-yyZstsWL.js → domain-action-card-DWqnvzry.js} +2 -2
  79. package/dist/assets/domains-CdwErmIF.js +1 -0
  80. package/dist/assets/dot-iw3hN9HL.js +7 -0
  81. package/dist/assets/{email-CYOorZ7K.js → email-By_nAv9m.js} +1 -1
  82. package/dist/assets/{empty-spinner-DSwpCqdd.js → empty-spinner-BHwHZpq-.js} +1 -1
  83. package/dist/assets/es-A3ma-OJp.js +9 -0
  84. package/dist/assets/{exchange-passport-xHfEBrd8.js → exchange-passport-BsgMfRJS.js} +1 -1
  85. package/dist/assets/fr-I3xKp6I5.js +7 -0
  86. package/dist/assets/{fuel-CtSAk9S3.js → fuel-RMmgm9AQ.js} +1 -1
  87. package/dist/assets/{gen-access-key-CoOxXtqa.js → gen-access-key-4teK8Dys.js} +1 -1
  88. package/dist/assets/{get-safe-url-BWDUV79Q.js → get-safe-url-B8xlSMyD.js} +1 -1
  89. package/dist/assets/{get-safe-url-CwT4-jkw.js → get-safe-url-t1C0E5Ux.js} +1 -1
  90. package/dist/assets/{hi-Dqbq8i5Y.js → hi-DacRhM8A.js} +1 -1
  91. package/dist/assets/{home-D1kBU1RC.js → home-CmHUXg5q.js} +1 -1
  92. package/dist/assets/{id-Bxr8o3Uo.js → id-B7LQAHL7.js} +3 -3
  93. package/dist/assets/{iframe-DsIqy16E.js → iframe-Dj9NLHp2.js} +1 -1
  94. package/dist/assets/{index-BoQJXOtZ.js → index-B2NkqENf.js} +1 -1
  95. package/dist/assets/{index-BpvW-cUy.js → index-BCtTVvHw.js} +1 -1
  96. package/dist/assets/{index-Cx-ESLe9.js → index-Bb7iSrGO.js} +4 -4
  97. package/dist/assets/{index-CTfYMqG2.js → index-Be8E3hiQ.js} +5 -5
  98. package/dist/assets/{index-DQl2QJod.js → index-BeE0KRva.js} +2 -2
  99. package/dist/assets/{index-DWgnwzKO.js → index-Bv7OAPJU.js} +1 -1
  100. package/dist/assets/{index-BnR8uU0R.js → index-BzZuK-66.js} +1 -1
  101. package/dist/assets/{index-CyS4mBmV.js → index-C8uNNoMb.js} +6 -6
  102. package/dist/assets/{index-CI4cLtBE.js → index-CCOwwQoc.js} +1 -1
  103. package/dist/assets/{index-DMSe2Qjx.js → index-CJQbYw9E.js} +2 -2
  104. package/dist/assets/{index-Dntq1ezd.js → index-CKY4HT0P.js} +1 -1
  105. package/dist/assets/{index-B18R5SlV.js → index-CMYalRl2.js} +7 -7
  106. package/dist/assets/{index-BXjOxZPH.js → index-CTlzm-Mc.js} +1 -1
  107. package/dist/assets/{index-8kcb4Nom.js → index-Cs3-IS09.js} +1 -1
  108. package/dist/assets/{index-DU8cx_m6.js → index-DEZojGsm.js} +1 -1
  109. package/dist/assets/{index-B7qZ5OdP.js → index-DXeoVV9Y.js} +11 -11
  110. package/dist/assets/{index-B1fP-8KR.js → index-DaM-GRtb.js} +2 -2
  111. package/dist/assets/{index-DaMn1fo9.js → index-Dfw2EDXA.js} +10 -10
  112. package/dist/assets/{index-DO-a7P7z.js → index-Dgsq6V-N.js} +1 -1
  113. package/dist/assets/{index-B4wY8GsU.js → index-DtZg53T9.js} +3 -3
  114. package/dist/assets/{index-j6UAnd8n.js → index-F85lIJcp.js} +1 -1
  115. package/dist/assets/{index-CY9xLy04.js → index-Inc_KF9k.js} +3 -3
  116. package/dist/assets/{index-CZgWTJXl.js → index-Mzv6hCex.js} +1 -1
  117. package/dist/assets/{index-Brd3-BIC.js → index-NnUiYa0L.js} +1 -1
  118. package/dist/assets/{index-C5vFhD_w.js → index-SX_KWrQh.js} +1 -1
  119. package/dist/assets/{invitation-BsuZg3B2.js → invitation-Ck_kq3Tr.js} +3 -3
  120. package/dist/assets/{invite-YNiMO-nB.js → invite-89aeW4Ho.js} +1 -1
  121. package/dist/assets/{issue-passport-2R7-XHuR.js → issue-passport-4udVYVdq.js} +1 -1
  122. package/dist/assets/{item-DHMVgmIa.js → item-D0U5vYXJ.js} +1 -1
  123. package/dist/assets/{ja-CJfcqkdo.js → ja-DRQ4Eecl.js} +3 -1
  124. package/dist/assets/{ko-BxAazRix.js → ko-CzL3UzwL.js} +3 -1
  125. package/dist/assets/{launch-result-message-DNgJY11G.js → launch-result-message-AharZGq2.js} +1 -1
  126. package/dist/assets/{layout-BnunMkuP.js → layout-CQb1lhEv.js} +1 -1
  127. package/dist/assets/{list-h4Ed_myi.js → list-BOdwWlS0.js} +2 -2
  128. package/dist/assets/{list-DZwgo-zf.js → list-KVxvPXZu.js} +6 -6
  129. package/dist/assets/{list-header-D976e09p.js → list-header-C7gle0n0.js} +1 -1
  130. package/dist/assets/localization-OxVxEhoS.js +1 -0
  131. package/dist/assets/{log-6M_J_pon.js → log-DOIh9luu.js} +1 -1
  132. package/dist/assets/{logger-KwxABgLK.js → logger-Dhaq1LDX.js} +1 -1
  133. package/dist/assets/{login-C2ILZhOf.js → login-J6Bsrh3B.js} +1 -1
  134. package/dist/assets/{login-oauth-callback-Dt9V4GRH.js → login-oauth-callback-BRmEibAb.js} +1 -1
  135. package/dist/assets/{logo-uploader-Dhh7Un4G.js → logo-uploader-Dzebv-rF.js} +3 -3
  136. package/dist/assets/{lost-passport-JODD9Yck.js → lost-passport-p5ZuXjnG.js} +2 -2
  137. package/dist/assets/{omit-O1pUD7ku.js → omit-BlzmxIB5.js} +1 -1
  138. package/dist/assets/{open-window-Dn44K3ur.js → open-window-Byi7CkW_.js} +1 -1
  139. package/dist/assets/{overview-Bjj9JLCV.js → overview-ClOSCvvh.js} +1 -1
  140. package/dist/assets/{page-header-JH9JWGMg.js → page-header-C_KAJILy.js} +1 -1
  141. package/dist/assets/{passport-item-CoNRdRpk.js → passport-item-Du8-xENr.js} +1 -1
  142. package/dist/assets/{permission-B7ZHEOJv.js → permission-ClRym5FB.js} +1 -1
  143. package/dist/assets/preferences-B6Y0XpLo.js +1 -0
  144. package/dist/assets/profile-embed-C_hd_hMh.js +1 -0
  145. package/dist/assets/{pt-FpFCyI6v.js → pt-CHKumXYv.js} +3 -3
  146. package/dist/assets/publish-resource-kHaYkbDE.js +1 -0
  147. package/dist/assets/{react-beautiful-dnd.esm-DCPrD7-r.js → react-beautiful-dnd.esm-CHsohizU.js} +1 -1
  148. package/dist/assets/{ru-BuGIFp9h.js → ru-CvkEKhgU.js} +1 -1
  149. package/dist/assets/{runtime-1mGYl_p2.js → runtime-D5P_2uNM.js} +1 -1
  150. package/dist/assets/{sanitize-DbZs1H_T.js → sanitize-B18rcrOf.js} +1 -1
  151. package/dist/assets/sdk-CbugbTkF.js +1 -0
  152. package/dist/assets/search-4YYphs0l.js +1 -0
  153. package/dist/assets/section-BDMQAX_r.js +41 -0
  154. package/dist/assets/{security-C2l4SCkx.js → security-CXewZHyS.js} +1 -1
  155. package/dist/assets/{session-1k8BRnYA.js → session-Bkvl2PSP.js} +1 -1
  156. package/dist/assets/setup-TPtYDnBB.js +30 -0
  157. package/dist/assets/{shorten-label-CTSJhlwO.js → shorten-label-BQvbtscf.js} +1 -1
  158. package/dist/assets/{simple-select-cKQxVH3U.js → simple-select-0cjVFuay.js} +1 -1
  159. package/dist/assets/{slicedToArray-CRrLoxQ4.js → slicedToArray-DFQjSbCD.js} +1 -1
  160. package/dist/assets/{spaces-CpSu6mVL.js → spaces-C1lh7et6.js} +1 -1
  161. package/dist/assets/{start-BotjXVuZ.js → start-BgSlMXsE.js} +1 -1
  162. package/dist/assets/{starting-progress-a7uoLG-L.js → starting-progress-BikYigPA.js} +1 -1
  163. package/dist/assets/{status-DIJ9lK3F.js → status-DDvFiBxA.js} +1 -1
  164. package/dist/assets/{step-actions-DLZOEVat.js → step-actions-_23FIn8v.js} +1 -1
  165. package/dist/assets/{studio-Cua13-ul.js → studio-Db5oA_Tx.js} +1 -1
  166. package/dist/assets/{switch-control-CzaI2YNK.js → switch-control-BYqb8MZf.js} +1 -1
  167. package/dist/assets/{table-tips-Czrj7r52.js → table-tips-BW6G2sKO.js} +1 -1
  168. package/dist/assets/{th-BafLD2wR.js → th-B2BUfjNJ.js} +1 -1
  169. package/dist/assets/{traffic-fPCLOWN3.js → traffic-CUSLm0PX.js} +1 -1
  170. package/dist/assets/{transfer-BqCYXmCB.js → transfer-CSsXAviu.js} +1 -1
  171. package/dist/assets/{unsubscribe-BE77Etc2.js → unsubscribe-BA46-fTa.js} +1 -1
  172. package/dist/assets/{use-blocklet-logo-DGSQQmh2.js → use-blocklet-logo-CTCMbFiC.js} +1 -1
  173. package/dist/assets/{use-mobile-CXU9YBvX.js → use-mobile-CtTQsfXN.js} +1 -1
  174. package/dist/assets/{use-mobile-CiFFAdJf.js → use-mobile-DwzRjjku.js} +1 -1
  175. package/dist/assets/{use-server-logo-BbYHFDuK.js → use-server-logo-UTr-CyJD.js} +1 -1
  176. package/dist/assets/useAsync-DVHp96Uu.js +1 -0
  177. package/dist/assets/{useLocalStorage-BF3BqN1O.js → useLocalStorage-DyVGBDlt.js} +1 -1
  178. package/dist/assets/user-center-Cap4mg5H.js +77 -0
  179. package/dist/assets/{util-xXGeezrD.js → util-DlS4tWs9.js} +1 -1
  180. package/dist/assets/{util-CS4PqVkK.js → util-M3UFXQFT.js} +1 -1
  181. package/dist/assets/{vendor-arcblock-B4hgrXYM.js → vendor-arcblock-DiSm3oUX.js} +7 -7
  182. package/dist/assets/{vendor-hooks-BCm626KH.js → vendor-hooks-BFlOfe0M.js} +1 -1
  183. package/dist/assets/{vendor-mui-core-wlbruq2I.js → vendor-mui-core-Bq8gXTan.js} +1 -1
  184. package/dist/assets/{vendor-mui-x-BKgL6hAa.js → vendor-mui-x-1nqAyytV.js} +1 -1
  185. package/dist/assets/vendor-utils-BotmZdBm.js +208 -0
  186. package/dist/assets/{vendor-ux-did-connect-CX7qG3_M.js → vendor-ux-did-connect-DVX9lQ8a.js} +66 -66
  187. package/dist/assets/{vi-BMZxxaJ2.js → vi-BykmwIAT.js} +3 -3
  188. package/dist/assets/wrap-locale-B8EvOR-l.js +1 -0
  189. package/dist/assets/{zh-DusA4qAT.js → zh-CbCaOuAd.js} +3 -1
  190. package/dist/assets/{zh-tw-BO-QhSNP.js → zh-tw-C9JfiCVV.js} +3 -1
  191. package/dist/index.html +6 -6
  192. package/dist/service-worker.js +1 -1
  193. package/package.json +33 -33
  194. package/dist/assets/add-resource-CG8u25Lv.js +0 -1
  195. package/dist/assets/api-CQoRx33p.js +0 -1
  196. package/dist/assets/ar-0ZkmCCuq.js +0 -7
  197. package/dist/assets/branding-C2Dm2Z1c.js +0 -54
  198. package/dist/assets/button-C0Vra3Ak.js +0 -1
  199. package/dist/assets/connect-B77rXeVL.js +0 -5
  200. package/dist/assets/dashboard-k0XcV2m5.js +0 -239
  201. package/dist/assets/domain-CEwb0Lyz.js +0 -9
  202. package/dist/assets/domains-CRt4uYYF.js +0 -1
  203. package/dist/assets/dot-DR7_m3Np.js +0 -7
  204. package/dist/assets/es-D_uF0siv.js +0 -7
  205. package/dist/assets/fr-DVFSQfDp.js +0 -7
  206. package/dist/assets/localization-BNjdHo-G.js +0 -1
  207. package/dist/assets/preferences-DUSp_pAb.js +0 -1
  208. package/dist/assets/profile-embed-BIjwkrGW.js +0 -1
  209. package/dist/assets/publish-resource-AW43Z8jj.js +0 -1
  210. package/dist/assets/sdk-BJQcHaGO.js +0 -1
  211. package/dist/assets/section-Bb547IGJ.js +0 -41
  212. package/dist/assets/setup-DxzbFXmd.js +0 -30
  213. package/dist/assets/useAsync-BMCqtJH2.js +0 -1
  214. package/dist/assets/useAsync-CBEJDwr0.js +0 -1
  215. package/dist/assets/user-center-olJmefSX.js +0 -77
  216. package/dist/assets/vendor-utils-B3iZkn2R.js +0 -208
  217. package/dist/assets/wrap-locale-Byq7otyk.js +0 -1
@@ -1 +0,0 @@
1
- import{j as o}from"./vendor-mui-core-wlbruq2I.js";import{B as n}from"./vendor-ux-did-connect-CX7qG3_M.js";function m({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
@@ -1,5 +0,0 @@
1
- import{j as r,ab as f,T as y,H as h,ah as x}from"./vendor-mui-core-wlbruq2I.js";import"./vendor-react-DEoibe3W.js";import{A as g}from"./vendor-utils-B3iZkn2R.js";import{u as w}from"./useAsync-CBEJDwr0.js";import{a as C,aY as T,F as i,ba as j,a3 as k,at as v}from"./vendor-ux-did-connect-CX7qG3_M.js";import{u as P,s as S}from"./index-B18R5SlV.js";import"./useAsync-BMCqtJH2.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";function U({children:p}){const{t:n,locale:u}=C(),{api:c,session:o}=P(),{encryptKey:l,decrypt:m}=T(),t=w(async()=>{var s;const e=new URL(window.location.href);e.pathname=g(((s=window==null?void 0:window.env)==null?void 0:s.apiPrefix)??"/","/api/did/setup/token"),e.searchParams.set("_ek_",l);const{data:a}=await c.get(e.href);return a}),d=async e=>{const a=Array.isArray(e)?e.find(s=>s.sessionToken):e;S(m(a.sessionToken));try{await o.refresh()}catch(s){k.error(s.message)}};return!t.value||t.loading||o.loading?r.jsx(i,{relative:"parent",children:r.jsx(f,{})}):o.user?p:t.error?r.jsx(i,{relative:"parent",children:r.jsx(y,{children:t.error.message})}):r.jsx(b,{popup:!0,open:!0,hideCloseButton:!0,action:"pre-setup",checkFn:c.get,checkTimeout:10*60*1e3,webWalletUrl:j(),onSuccess:d,locale:u,messages:{title:n("setup.connect.title"),scan:n("setup.connect.scan"),confirm:n("setup.connect.confirm"),success:n("setup.connect.success")},extraParams:{setup:!0,nw:t.value.url}})}U.propTypes={children:h.any.isRequired};const b=x(v)`
2
- .action-info-desc {
3
- padding: 0 72px;
4
- }
5
- `;export{U as default};
@@ -1,239 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-6M_J_pon.js","assets/vendor-mui-core-wlbruq2I.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-BF3BqN1O.js","assets/vendor-ux-did-connect-CX7qG3_M.js","assets/vendor-utils-B3iZkn2R.js","assets/vendor-hooks-BCm626KH.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-B18R5SlV.js","assets/vendor-arcblock-B4hgrXYM.js","assets/index-DOq-_YXu.css","assets/Download-HHknpEZd.js","assets/bundle-avatar-C41ZXEbR.js","assets/log-D33dFtt_.css","assets/index-Cx-ESLe9.js","assets/ViewList-ColSGL1_.js","assets/index-CZgWTJXl.js","assets/did-address-bJAfhuZx.js","assets/permission-B7ZHEOJv.js","assets/session-1k8BRnYA.js","assets/click-to-copy-BUVqg1RQ.js","assets/index-DO-a7P7z.js","assets/vendor-mui-x-BKgL6hAa.js","assets/AdapterDayjs-BXVfASrK.js","assets/index-8eXqqyHQ.js","assets/useAsync-CBEJDwr0.js","assets/useAsync-BMCqtJH2.js","assets/index-BnR8uU0R.js","assets/DeleteOutline-1-hBNY1U.js","assets/confirm-Bay3BcpN.js","assets/util-CS4PqVkK.js","assets/base32-CmYq1ikq.js","assets/sdk-BJQcHaGO.js","assets/actions-DtL6bYnA.js","assets/MoreHoriz-9E3q8aHi.js","assets/shorten-label-CTSJhlwO.js","assets/PlayArrow-B_ZNrQDa.js","assets/get-safe-url-CwT4-jkw.js","assets/use-blocklet-logo-DGSQQmh2.js","assets/InfoOutlined-CLiL5VeK.js","assets/dot-DR7_m3Np.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-CiFFAdJf.js","assets/index-DQl2QJod.js","assets/use-mobile-CXU9YBvX.js","assets/ExpandLess-Fb-uW6u_.js","assets/table-tips-Czrj7r52.js","assets/index-DaMn1fo9.js","assets/Error-D0rGqAKE.js","assets/empty-spinner-DSwpCqdd.js","assets/list-header-D976e09p.js","assets/QuestionMarkCircle-BMcwgPWr.js","assets/index-DVQCgvFb.js","assets/Launch-BwVeOcBz.js","assets/index-DU8cx_m6.js","assets/api-CQoRx33p.js","assets/ChevronRight-CB8w0u2n.js","assets/react-beautiful-dnd.esm-DCPrD7-r.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-DHMVgmIa.js","assets/Done-CcJLRcBY.js","assets/delete-confirm-B1F5wKdb.js","assets/ArrowDropDown-Ce8TY3aP.js","assets/index-BXjOxZPH.js","assets/index-C0Iiqot3.css","assets/index-DWgnwzKO.js","assets/overview-Bjj9JLCV.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-DIJ9lK3F.js","assets/omit-O1pUD7ku.js","assets/spaces-CpSu6mVL.js","assets/domains-CRt4uYYF.js","assets/domain-action-card-yyZstsWL.js","assets/util-xXGeezrD.js","assets/CheckCircle-M9NlpTm_.js","assets/index-B7qZ5OdP.js","assets/passport-item-CoNRdRpk.js","assets/Google-WGwK551e.js","assets/cloneDeep-ro06l5HL.js","assets/EditIcon-DiM9RB8U.js","assets/LockIcon-QnxDGvZv.js","assets/appearance-DB1QowgL.js","assets/audit-logs-BamIXrWh.js","assets/index-CTfYMqG2.js","assets/collapse--nd2JDBL.js","assets/section-Bb547IGJ.js","assets/list-DZwgo-zf.js","assets/traffic-fPCLOWN3.js","assets/iframe-DsIqy16E.js","assets/LaunchOutlined-CPurmWuM.js","assets/ChevronLeft-02OWcWpH.js","assets/index-BoQJXOtZ.js","assets/base-chart-BYonGucU.js","assets/index-Dntq1ezd.js","assets/config-navigation-CsVa3Hf0.js","assets/index-BpvW-cUy.js","assets/slicedToArray-CRrLoxQ4.js","assets/simple-select-cKQxVH3U.js","assets/index-B1fP-8KR.js","assets/connect-to-Dac7orQh.js","assets/config-space-B39Ur9Mf.js","assets/switch-control-CzaI2YNK.js","assets/index-DMSe2Qjx.js","assets/security-C2l4SCkx.js","assets/config-QpBBpp7d.js","assets/branding-C2Dm2Z1c.js","assets/sanitize-DbZs1H_T.js","assets/logo-uploader-Dhh7Un4G.js","assets/advanced-yrYBgA5T.js","assets/runtime-1mGYl_p2.js","assets/index-CyS4mBmV.js","assets/Edit-hd-cDU5C.js","assets/list-h4Ed_myi.js","assets/index-8kcb4Nom.js","assets/component-ClWADDCr.js","assets/TuneOutlined-0oMZE8a4.js","assets/add-component-core-CaE3xcyT.js","assets/launch-result-message-DNgJY11G.js","assets/page-header-JH9JWGMg.js","assets/index-CI4cLtBE.js","assets/content-layout-DuPlKBe3.js","assets/add-component-core-D-IRi6XF.css","assets/index-C5vFhD_w.js"])))=>i.map(i=>d[i]);
2
- import{r as F,bd as fs,bb as Lt,be as ps,B as Pt,k as M,a8 as xn,a3 as Z,a as Y,at as ms,n as zn,m as hs,d as gs,i as xs,aR as vs,D as Le,a1 as Dt,bf as ys,bg as bs,I as ws,F as Je,bh as js,bi as Ss,_ as P,ax as _s,a5 as Cs}from"./vendor-ux-did-connect-CX7qG3_M.js";import{H as v,j as o,a9 as V,ah as G,I as Rt,at as Is,ak as Hn,X as At,q as Es,b8 as ks,ab as re,b9 as Ts,bx as Ls,T as H,bv as Ps,bt as vn,bw as yn,aa as _,bJ as Ds,v as X,a7 as it,bK as Rs,e as ee,ae as As,bg as Ms,ap as Se,bL as Bn,ad as Ee,bM as $s,au as Os,ai as Ns,bN as Fn,bO as Vn,bP as qn,E as ae,b7 as Wn,y as Us,bi as zs}from"./vendor-mui-core-wlbruq2I.js";import{r as x,L as Kn,f as Gn,g as Hs,u as Bs,l as Fs}from"./vendor-react-DEoibe3W.js";import{D as at,f as N,E as ft,F as Vs,b as qs,G as Ws,H as Ks,I as Qn,y as me,J as Zn,K as Gs,k as ve,L as Qs,M as Zs,u as Xs,l as bn,Q as wn,g as Js,j as Ys,q as eo,n as be,m as to,o as no,P as ro,O as so,R as We,e as He,T as oo,U as io,V as ao,N as co,W as lo,c as jn}from"./index-B18R5SlV.js";import{ag as uo,A as he,ah as fo,z as Xn,b as Ke,ai as po}from"./vendor-utils-B3iZkn2R.js";import{_ as Sn}from"./useLocalStorage-BF3BqN1O.js";import{f as Mt}from"./index-8eXqqyHQ.js";import{c as ce,u as Ye,p as mo,h as et,f as Jn,e as ho,E as go,g as xo,H as vo,R as yo}from"./vendor-arcblock-B4hgrXYM.js";import{C as _n}from"./confirm-Bay3BcpN.js";import{d as bo}from"./PlayArrow-B_ZNrQDa.js";import{g as Cn}from"./get-safe-url-CwT4-jkw.js";import{u as Yn}from"./session-1k8BRnYA.js";import{b as ge,x as wo}from"./vendor-hooks-BCm626KH.js";import{i as jo,u as So,M as _o,c as ke,s as tt,H as Co,a as Io}from"./use-blocklet-logo-DGSQQmh2.js";import{d as Eo}from"./InfoOutlined-CLiL5VeK.js";import{_ as er,D as ko}from"./dot-DR7_m3Np.js";import{_ as tr}from"./useSetState-CWq0AVWn.js";import{u as To}from"./use-mobile-CiFFAdJf.js";const nr=x.createContext({});function $t({children:e,type:t}){const[n,r]=x.useState([]),s=x.useRef([]),a=l=>{if(!s.current.includes(l)){const u=[...s.current,l];r(u),s.current=u}},i=l=>{if(s.current.includes(l)){const u=s.current.filter(d=>d!==l);r(u),s.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));uo(u,n).forEach(p=>i(p))};return o.jsx(nr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:a,removeDeletingDid:i,matchDeletingDid:c},children:e})}$t.propTypes={type:v.string,children:v.node.isRequired};$t.defaultProps={type:"blocklets"};function Pl(){return x.useContext(nr)}var Ot={},Lo=V;Object.defineProperty(Ot,"__esModule",{value:!0});var rr=Ot.default=void 0,Po=Lo(F()),Do=o;rr=Ot.default=(0,Po.default)((0,Do.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Nt={},Ro=V;Object.defineProperty(Nt,"__esModule",{value:!0});var sr=Nt.default=void 0,Ao=Ro(F()),Mo=o;sr=Nt.default=(0,Ao.default)((0,Mo.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Ut={},$o=V;Object.defineProperty(Ut,"__esModule",{value:!0});var or=Ut.default=void 0,Oo=$o(F()),No=o;or=Ut.default=(0,Oo.default)((0,No.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var zt={},Uo=V;Object.defineProperty(zt,"__esModule",{value:!0});var ir=zt.default=void 0,zo=Uo(F()),Ho=o;ir=zt.default=(0,zo.default)((0,Ho.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Ht={},Bo=V;Object.defineProperty(Ht,"__esModule",{value:!0});var ar=Ht.default=void 0,Fo=Bo(F()),Vo=o;ar=Ht.default=(0,Fo.default)((0,Vo.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Bt={},qo=V;Object.defineProperty(Bt,"__esModule",{value:!0});var cr=Bt.default=void 0,Wo=qo(F()),Ko=o;cr=Bt.default=(0,Wo.default)((0,Ko.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Ft={},Go=V;Object.defineProperty(Ft,"__esModule",{value:!0});var lr=Ft.default=void 0,Qo=Go(F()),Zo=o;lr=Ft.default=(0,Qo.default)((0,Zo.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var Vt=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};Vt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Vt.displayName="dashboard";var qt={},Xo=V;Object.defineProperty(qt,"__esModule",{value:!0});var ur=qt.default=void 0,Jo=Xo(F()),Yo=o;ur=qt.default=(0,Jo.default)((0,Yo.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const pe={Start:bo,Stop:rr,Restart:sr,Reload:or,Remove:fs,Config:ir,Log:ar,Group:cr,Cancel:lr,Dashboard:Vt,Overview:ur},ei=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),s=new URL(he(n.origin,t));return s.search=r.toString(),s.toString()},ti="internal",ni="external";function Wt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:s,getComponentUrl:a,useBlockletUrlEvaluation:i,...c}){const l=at(),[u,d]=x.useState(null),[p,f]=x.useState(null),[y,g]=x.useState(!1),[h,S]=x.useState(null),{t:m}=x.useContext(Lt),[C]=Sn("skip-blocklet-setup",!1),{loading:w,recommendedUrl:L}=i(e),[R]=Sn("blocklet-type-filter",ti),j=N.isInProgress(e.status),[k,E]=x.useState(!1);x.useEffect(()=>{var A,B;if(!(e!=null&&e.controller))return;E(((B=(A=e==null?void 0:e.controller)==null?void 0:A.status)==null?void 0:B.value)===ce.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var q,te,oe;try{const W=await l.api.getLauncherSession({input:{launcherSessionId:(q=e==null?void 0:e.controller)==null?void 0:q.launcherSessionId,launcherUrl:(te=e==null?void 0:e.controller)==null?void 0:te.launcherUrl}});if(W!=null&&W.error){console.error("get launcher session failed",W.error);return}E([M.LAUNCH_SESSION_STATUS.overdue,M.LAUNCH_SESSION_STATUS.canceled,M.LAUNCH_SESSION_STATUS.terminated].includes((oe=W==null?void 0:W.launcherSession)==null?void 0:oe.status))}catch(W){console.error("call getLauncherSession error",W)}})()},[]);const{inService:T}=l,I=(b,A,B=!1)=>async()=>{const q=async Ne=>{var ze;t({action:b,blocklet:e}),g(!0),f(b);let Ue=!1;try{if(b==="remove")await A(Ne);else if(b==="start"){if(!N.hasRunnableComponent(e)){Z.error(m("blocklet.noComponent"));return}if(!T&&!C&&!((ze=e.settings)!=null&&ze.initialized)&&e.mode!==ce.BLOCKLET_MODES.DEVELOPMENT){if(!L||!xn(L)){Z.error(m("blocklet.gotoVisitError"));return}const Q=Vs(l.info),gn=new URL(L);gn.searchParams.set("serverUrl",Q),window.open(Cn(gn.href,{allowDomains:null})),n({action:b,blocklet:e});return}const ie=e.children.filter(Q=>!N.isInProgress(Q.status)&&Q.status!=="running").map(Q=>Q.meta.did),fe={did:e.meta.did,componentDids:ie};await A({input:fe})}else if(["stop","restart","reload"].includes(b)){const ie=e.children.filter(Q=>Q.status==="running").map(Q=>Q.meta.did),fe={did:e.meta.did,componentDids:ie};await A({input:fe})}else{const ie={did:e.meta.did};await A({input:ie})}b==="remove"?Ue=!0:await qs(1e3),b==="reload"&&Z.success(m("blocklet.reloadSuccess")),S(null),n({action:b,blocklet:e})}catch(ie){const fe=`Blocklet ${b} failed: ${Mt(ie)}`;throw n({action:b,blocklet:e,error:new Error(fe)}),new Error(fe)}finally{Ue||g(!1)}},te=()=>{g(!1),S(null)},oe=N.getDisplayName(e,!0),W=e.mode===ce.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(H,{component:"div",children:o.jsx(H,{gutterBottom:!0,children:m("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ne,Ue)=>o.jsxs(H,{component:"div",children:[o.jsx(H,{gutterBottom:!0,children:m("blocklet.action.removeApplicationDescription")}),o.jsxs(Ps,{name:"removeType",value:Ne.removeType,onChange:ze=>Ue({...Ne,removeType:ze.target.value}),children:[o.jsx(vn,{value:"backup",control:o.jsx(yn,{}),label:m("blocklet.action.removeApplicationAfterBackup")}),o.jsx(vn,{value:"complete",control:o.jsx(yn,{}),label:m("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},ds={stop:{title:`${m("common.stop")} ${oe}`,description:m("blocklet.action.stopDescription"),confirm:m("blocklet.action.confirmStop"),cancel:m("common.cancel"),onConfirm:q,onCancel:te},restart:{title:`${m("common.restart")} ${oe}`,description:m("blocklet.action.restartDescription"),confirm:m("blocklet.action.confirmRestart"),cancel:m("common.cancel"),onConfirm:q,onCancel:te},remove:{title:`${m("common.remove")} ${oe}`,confirm:m("blocklet.action.confirmRemove"),cancel:m("common.cancel"),onConfirm:q,onCancel:te,...W},cancelDownload:{title:`${m("common.cancel")}`,description:m("blocklet.action.cancelDownloadDescription",{name:oe}),confirm:m("common.confirm"),cancel:m("common.cancel"),onConfirm:q,onCancel:te}};B?S(ds[b]):await q()},U=!!u,$=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(b.currentTarget)},z=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(null)},$e=async(b,A)=>{try{A.stopPropagation(),A.preventDefault()}catch{}if(typeof b.handler=="function")try{g(!0),f(b.action),await b.handler()}catch(B){console.error(`Blocklet ${b.name} failed: `,B)}finally{g(!1),d(null)}else d(null)},as=!T&&N.isDeletableBlocklet(e)?{action:"remove",icon:pe.Remove,name:m("common.remove"),handler:I("remove",async({removeType:b})=>{b==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:j}:null,cs={action:"remove",icon:({sx:b,...A})=>o.jsx(pe.Cancel,{sx:{...b,paddingRight:"2px",zoom:.95},...A}),name:m("common.cancel"),handler:I("cancelDownload",l.api.cancelDownloadBlocklet,!0)},ls=N.getAppMissingConfigs(e),us=()=>{var q;const b=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),A=a==null?void 0:a({mountPoint:b,blocklet:e});if(!A||!xn(A)){Z.error(m("blocklet.gotoVisitError"));return}const B=(q=e==null?void 0:e.site)==null?void 0:q.domainAliases;window.open(Cn(ei(A,`${M.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:B==null?void 0:B.map(te=>te.value)}))};let Oe=[{action:"start",icon:pe.Start,inExternal:!0,name:m("common.start"),handler:I("start",l.api.startBlocklet),disabled:k||e.children.every(b=>b.status==="running")||ft(e.status)||w||j},{action:"stop",icon:pe.Stop,inExternal:!0,name:m("common.stop"),handler:I("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:pe.Restart,name:m("common.restart"),handler:I("restart",l.api.restartBlocklet,!0),disabled:k||e.status!=="running"},ft(e.status)?cs:as,{separator:!0},T?null:{action:"dashboard",icon:({style:b,...A})=>o.jsx(pe.Dashboard,{...A,style:{...b,width:"26px",height:"26px",paddingRight:"3px"}}),name:m("sidebar.dashboard"),handler:us}].filter(Boolean);return R===ni&&(Oe=Oe.filter(b=>b.inExternal)),r==="menu"?o.jsxs(In,{"data-cy":"blocklet-actions",children:[o.jsx(Rt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:$,size:"small",disabled:!s||!ft(e.status)&&y,children:o.jsx(ps,{})}),o.jsxs(Is,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:U,onClose:z,PaperProps:{},children:[ls.length>0&&o.jsxs(Hn,{style:{maxWidth:"400px"},severity:"error",children:[m("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Kn,{to:`/blocklets/${e.meta.did}/components`,children:m("blocklet.config.gotoFix")})]}),Oe.map((b,A)=>b.separator?o.jsx(At,{},`separator-${A}`):o.jsxs(Es,{dense:!0,onClick:B=>$e(b,B),disabled:y||b.disabled,"data-cy":`${b.action}-blocklet`,children:[o.jsx(ks,{style:{minWidth:24},children:p===b.action&&y?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(b.icon,{fontSize:"small"})}),o.jsx(Ts,{primary:b.name})]},b.name))]}),h&&o.jsx(_n,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):o.jsxs(In,{"data-cy":"blocklet-actions",...c,children:[o.jsx(Ls,{children:Oe.filter(b=>!b.separator&&!b.onlyInMenu).map(b=>o.jsxs(Pt,{title:b.name,"data-cy":`${b.action}-blocklet`,onClick:()=>$e(b),disabled:!!b.disabled||y,children:[p===b.action&&y?o.jsx(re,{size:16,sx:{marginRight:1}}):o.jsx(b.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:b.name})]},b.name))}),h&&o.jsx(_n,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}Wt.propTypes={getComponentUrl:v.func,blocklet:v.object.isRequired,onStart:v.func.isRequired,onComplete:v.func.isRequired,variant:v.oneOf(["menu","group"]),hasPermission:v.bool,useBlockletUrlEvaluation:v.func};Wt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const In=G.div`
3
- display: flex;
4
- align-items: center;
5
-
6
- @media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
7
- .MuiButton-root {
8
- padding: 4px;
9
- font-size: 10px;
10
- }
11
- }
12
- `,En=x.memo(Wt),ri=e=>{const t={};let n=null;return N.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=N.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},si=(e,t,n)=>{var a;const{hostname:r,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return s;const l=c[0],d=((((a=t.site)==null?void 0:a.domainAliases)||[]).map(p=>p.value).filter(Boolean).find(p=>p.endsWith(M.DEFAULT_DID_DOMAIN))||"").replace(`.${M.DEFAULT_DID_DOMAIN}`,"");return d?s.replace(r,`${d}-${l}.${M.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function dr(){const{t:e}=Y(),{api:t}=Yn(),{blocklet:n}=Ws(),{inService:r}=at(),[s,a]=x.useState(!1),[i,c]=x.useState(5),l=n&&n.structVersion!==M.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){Z.error(e("blocklet.migrate.tip.running"));return}const f=ri(n);if(f){Z.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}a(!0)}catch(f){Z.error(Mt(f))}},d=()=>{const f=si(window.location,n,r);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(y=>y-1)},1e3)},p=()=>a(!1);return[l&&o.jsxs(Hn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(_,{display:"flex",alignItems:"center",children:[o.jsx(Pt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>o.jsx(_,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&o.jsx(ms,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Ks(n,!0),title:N.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}dr.propTypes={};function oi(){const e=Ds();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const s=X(e.breakpoints.up(r));return!n&&s?r:n},null)||"xs"}function ii(e){return o.jsx(it,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function ai(e){return o.jsx(it,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function ci(e){return o.jsx(it,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function li(e){return o.jsx(it,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Be={fontSize:20,marginInlineEnd:8},ui={success:o.jsx(ii,{style:Be}),warning:o.jsx(ai,{style:Be}),error:o.jsx(ci,{style:Be}),info:o.jsx(li,{style:Be})},di=Rs(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:r=>({backgroundColor:`${As[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Ms[700]} !important`,width:t[r.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function Kt({keyId:e,notification:t={},viewAllUrl:n,content:r},s){var S,m,C;const a=di({breakpoint:oi()}),i=ee(),c=[a.contentRoot,a.lessPadding,a[t.severity]].join(" "),l=ui[t.severity],{closeSnackbar:u}=zn(),d=()=>u(e),p=Gn(),f=()=>{u(e),p(n)},y=ge(()=>jo(t),[t]),g=ge(()=>t==null?void 0:t.activity,[t]),h=So({activity:g,users:[t==null?void 0:t.actorInfo],actors:[(S=t==null?void 0:t.activity)==null?void 0:S.actor],extra:{linkColor:i.palette.primary.main,userDid:(C=(m=t==null?void 0:t.receivers)==null?void 0:m[0])==null?void 0:C.did}});return o.jsxs(hs,{ref:s,className:c,children:[o.jsxs("div",{className:a.message,children:[l,o.jsx(pi,{onClick:f,style:{width:"calc(100% - 30px)"},children:o.jsx(_,{children:y?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:h}),g.meta?o.jsx(_o,{meta:g.meta,type:g.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:t.title}),r||o.jsx("span",{className:"desc",children:t.description})]})})})]}),o.jsx("div",{className:a.action,children:o.jsx(Rt,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(gs,{className:a.icon})},"close")})]})}const fi=x.forwardRef(Kt);Kt.propTypes={viewAllUrl:v.string.isRequired,keyId:v.number.isRequired,notification:v.object.isRequired,content:v.node};Kt.defaultProps={content:null};const pi=G.div`
13
- cursor: pointer;
14
- display: flex;
15
- flex-direction: column;
16
- .title {
17
- overflow: hidden;
18
- text-overflow: ellipsis;
19
- display: -webkit-box;
20
- -webkit-line-clamp: 1;
21
- -webkit-box-orient: vertical;
22
- font-weight: bold;
23
- }
24
- .desc {
25
- overflow: hidden;
26
- text-overflow: ellipsis;
27
- display: -webkit-box;
28
- -webkit-line-clamp: 3;
29
- -webkit-box-orient: vertical;
30
- word-break: break-word;
31
- }
32
- `,mi=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},hi=e=>e.every(t=>t.type==="text"),gi=e=>e.every(t=>t.type==="image"),xi=e=>fo(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,s,a;return(a=(s=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:s.trim)==null?void 0:a.call(s)})),vi=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},yi=(e,t)=>{try{const n=xs.toTypeInfo(e);if(!(n.role!==void 0&&n.role!==vs.types.RoleType.ACCOUNT))return;const s=he(M.WELLKNOWN_SERVICE_PATH_PREFIX,"user");return Xn(s,{did:e,locale:t})}catch(n){console.error(n);return}},ue=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}}),Pe=e=>{if(!e)return null;try{return new URL(e).protocol!=="https:"?(console.warn("Image URL must use HTTPS protocol:",e),null):`${M.WELLKNOWN_SERVICE_PATH_PREFIX}/proxy?url=${e}`}catch(t){return console.warn("Invalid image URL format:",e,t),null}};function fr({attachment:e}){const{data:t}=e,n=ee();let r="";try{r=new URL(t.url).host}catch{r=t.url}return o.jsxs(Se,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!r&&o.jsx("span",{className:"url",children:r}),!!t.title&&o.jsx(_,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&o.jsx(_,{className:"description",style:{whiteSpace:"unset",color:n.palette.text.secondary},children:t.description}),!!t.image&&o.jsx(Le,{src:Ye.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"},fallback:Pe(Ye.getImagePath(t.image))})]})}fr.propTypes={attachment:v.object.isRequired};function pr({attachment:e}){const{data:t}=e;return o.jsx(Le,{src:Ye.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"},fallback:Pe(Ye.getImagePath(t.url))})}pr.propTypes={attachment:v.object.isRequired};function mr({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,s=n.size||t.size,a=n.fontWeight||t.fontWeight||400;let i="14px";return s==="small"?i="12px":s==="normal"?i="14px":s==="big"?i="16px":s==="large"&&(i="18px"),o.jsx(bi,{className:"title",style:{fontSize:i,color:r,whiteSpace:"unset",fontWeight:a},children:n.text})}mr.propTypes={attachment:v.object.isRequired};const bi=G.span`
33
- width: 100%;
34
- display: -webkit-box;
35
- -webkit-box-orient: vertical;
36
- -webkit-line-clamp: 2;
37
- overflow: hidden;
38
- text-overflow: ellipsis;
39
- white-space: normal;
40
- word-break: break-word;
41
- `;Gt.propTypes={locale:v.string,data:v.object.isRequired};Gt.defaultProps={locale:"en"};function Gt({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",a=`https://${ke.getUrlHost(t.chainHost)||ke.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,i=ee(),c=i.palette.mode==="dark";let l=t.amount;t.decimal&&(l=t.amount/10**t.decimal);const u=ge(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:a,target:"_blank",rel:"noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:o.jsxs(_,{display:"flex",flexDirection:"column",children:[o.jsxs(_,{sx:u,children:[o.jsx(H,{component:"div",sx:{fontWeight:700,color:i.palette.text.primary},children:r}),o.jsxs(H,{component:"div",align:"right",style:ue(tt.summaryStyle,c),flex:1,children:["+",l," ",t.symbol]})]}),o.jsxs(_,{sx:u,children:[o.jsx(H,{component:"div",style:ue({...tt.remarkStyle,fontSize:14},c),children:n}),o.jsx(_,{maxWidth:260,fontSize:14,children:o.jsx(Dt,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}Qt.propTypes={locale:v.string,data:v.object.isRequired};Qt.defaultProps={locale:"en"};function Qt({locale:e,data:t}){var d,p;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",s=ke.getUrlHost(t.chainHost)||ke.getChainHost(t.chainId),a=t.did||((p=(d=t==null?void 0:t.credential)==null?void 0:d.issuer)==null?void 0:p.id)||"",i=`https://${s}/explorer/assets/${a}`,l=ee().palette.mode==="dark",u=ge(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(_,{sx:{pr:1},children:o.jsx("a",{href:i,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(_,{display:"flex",flexDirection:"column",children:[o.jsxs(_,{sx:u,children:[o.jsx(H,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:n}),o.jsx(H,{component:"div",align:"right",style:ue(tt.summaryStyle,l),children:"+1 Asset"})]}),a?o.jsxs(_,{sx:u,children:[o.jsx(H,{component:"div",style:ue({...tt.remarkStyle,fontSize:14},l),children:r}),o.jsx(_,{maxWidth:260,fontSize:14,children:o.jsx(Dt,{did:a,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}hr.propTypes={data:v.object.isRequired,locale:v.string};function hr({data:e,locale:t="en"}){const r=ee().palette.mode==="dark";return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:s=>{s.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx(Le,{className:"image",src:e.logo,width:50,height:50,alt:"",fallback:Pe(e.logo)}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:ue({marginBottom:"6px"},r),children:e.title}),o.jsx(_,{maxWidth:260,fontSize:10,children:o.jsx(Dt,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}Zt.propTypes={locale:v.string,data:v.object.isRequired};Zt.defaultProps={locale:"en"};function Zt({locale:e,data:t}){const n=ke.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,s={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",a={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash",i=ee(),c=i.palette.mode==="dark";return o.jsxs("a",{href:r,target:"_blank",style:ue({textDecoration:"none",color:"initial",display:"block",fontSize:14},c),onClick:l=>{l.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:i.palette.text.secondary,margin:0},children:n}),o.jsx("p",{style:{color:i.palette.warning.main,margin:0},children:s}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[a,": ",t.hash]})]})}function gr({attachment:e,...t}){const{local:n}=x.useContext(Lt),r=X(a=>a.breakpoints.down("md")),s=ee();return o.jsxs(wi,{...t,isMd:r,children:[e.type==="link"&&o.jsx(fr,{attachment:e,...t,isMd:r}),e.type==="image"&&o.jsx(pr,{attachment:e,isMd:r}),e.type==="text"&&o.jsx(mr,{attachment:e,isMd:r}),e.type==="token"&&o.jsx(Gt,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?o.jsx(Qt,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&o.jsx(hr,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&o.jsx(Zt,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&o.jsx(At,{sx:{mb:1,mt:1},style:{color:s.palette.divider}})]})}const wi=G.div`
42
- display: ${({sx:e={}})=>e.display||"flex"};
43
- flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
44
- gap: ${({sx:e={}})=>e.gap||1};
45
- width: ${({isMd:e=!1})=>e?"100%":"auto"};
46
- &:last-child {
47
- margin-bottom: 0;
48
- }
49
- `;gr.propTypes={attachment:v.object.isRequired};function xr({data:e,...t}){const{items:n}=e;return o.jsx(ji,{...t,children:n.map(r=>o.jsxs(Bn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(_,{display:"flex",alignItems:"center",gap:1,children:[r.icon?o.jsx(Le,{src:r.icon,alt:r.title,style:{width:16,height:16},fallback:Pe(r.icon)}):null,o.jsxs(_,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?o.jsx(Ee,{title:r.subtitle,arrow:!0,placement:"top",children:o.jsx(Eo,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(_,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?o.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const ji=G(_)`
50
- display: flex;
51
- justify-content: flex-start;
52
- flex-wrap: wrap;
53
- gap: 16px;
54
- .metric-number {
55
- font-size: 18px;
56
- font-weight: 600;
57
- .sub-content {
58
- font-size: 12px;
59
- font-weight: 400;
60
- margin-left: 4px;
61
- }
62
- }
63
- .metric-name {
64
- font-size: 14px;
65
- color: rgba(156, 163, 175, 1);
66
- }
67
- `;xr.propTypes={data:v.object.isRequired};function vr({data:e}){const{items:t}=e,n=X(i=>i.breakpoints.down("sm")),r=X(i=>i.breakpoints.down("md")),s=X(i=>i.breakpoints.down("lg")),a=()=>n?1:r?3:s?4:6;return o.jsx($s,{variant:"quilted",cols:a(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(i=>{const c=i.cover||i.display;return c?o.jsx("a",{href:i.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(Os,{children:o.jsx(Le,{src:c,alt:i.title||"",style:{borderRadius:"8px"},fallback:Pe(c)})})},c):null})})}vr.propTypes={data:v.object.isRequired};function Xt({data:e,feedType:t,...n}){return o.jsxs(Si,{...n,children:[t==="data-tracker"&&e.type==="table"&&o.jsx(xr,{data:e}),(t==="graphic"||t==="gallery")&&o.jsx(vr,{data:e})]})}const Si=G.div`
68
- display: flex;
69
- flex-direction: column;
70
- width: 100%;
71
- margin-bottom: 4px;
72
- &:last-child {
73
- margin-bottom: 0;
74
- }
75
- `;Xt.propTypes={data:v.object.isRequired,feedType:v.string};Xt.defaultProps={feedType:"data-tracker"};Ge.propTypes={data:v.object.isRequired,style:v.object};function Ge({data:e,style:t={}}){const r=ee().palette.mode==="dark";return o.jsx(H,{style:ue({color:r&&e.darkModeColor?e.darkModeColor:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},r),children:e.text})}function yr({data:e}){const t=[];for(let n=0;n<(e==null?void 0:e.length);n+=2){const r=e[n],s=e[n+1];r&&s?t.push(o.jsxs(kn,{children:[o.jsx("td",{className:"label-col",children:o.jsx(Ge,{data:r.data,style:{whiteSpace:"nowrap"}})}),o.jsx("td",{className:"value-col",children:o.jsx(Ge,{data:s.data,style:{wordBreak:"break-all"}})})]},n)):r&&t.push(o.jsx(kn,{children:o.jsx("td",{className:"label-col",children:o.jsx(Ge,{data:r.data})})},n))}return o.jsx("table",{style:{width:"100%"},children:o.jsx("tbody",{children:t})})}yr.propTypes={data:v.array.isRequired};const kn=G.tr`
76
- display: flex;
77
- flex-direction: row;
78
- justify-content: flex-start;
79
- align-items: center;
80
- gap: ${({theme:e})=>e.spacing(1)};
81
- .label-col {
82
- min-width: 130px;
83
- flex-shrink: 0;
84
- }
85
- .value-col {
86
- flex: 1;
87
- }
88
- `;function Jt({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:s,...a}=e,i=X(d=>d.breakpoints.down("md"));if((!r||!r.length)&&Ke(s))return null;const c=mi(t),l=(d,p=!1)=>{if(!d&&!Array.isArray(d))return null;let f=d,y={},g="horizontal";p&&hi(d)&&(f=xi(d),g="vertical",y={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:i||f.length===1?"100%":"28%"});const h=vi(f);return o.jsx(_,{sx:{width:"100%",display:"flex",gap:1,flexDirection:p?"row":"column",justifyContent:"flex-start",alignItems:p?"center":"unset",flexWrap:"wrap"},children:f.map((S,m)=>S.type==="section"?o.jsx(yr,{data:S.fields},m):o.jsxs(x.Fragment,{children:[o.jsx(gr,{attachment:S,style:y,...a}),!(i&&g==="vertical")&&h&&f.length>1&&m!==f.length-1?o.jsx(At,{orientation:g,style:{color:ys.dividerColor},sx:g==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},m))})},u=gi(r);return o.jsx(_i,{children:o.jsxs("div",{className:"message-in-list",children:[r.length>0&&o.jsx("div",{className:"message-container",style:i?{width:"100%"}:{},children:u?l(r):o.jsx(Bn,{variant:"outlined",sx:{p:i?1:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!Ke(s)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(Xt,{data:s,feedType:e.feedType})})}),r.length===0&&Ke(s)&&n&&o.jsx(Ns,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const _i=G.div`
89
- display: flex;
90
- flex-direction: column;
91
- .message-in-list {
92
- padding: 8px 8px 8px 0;
93
- display: flex;
94
- border-radius: 8px;
95
- }
96
- .message-title {
97
- color: #25292f;
98
- font-size: 18px;
99
- font-weight: bold;
100
- word-break: break-all;
101
- }
102
-
103
- .attach-ske {
104
- position: relative;
105
- margin-left: 10px;
106
- &::after {
107
- content: '';
108
- position: absolute;
109
- left: -10px;
110
- top: 0;
111
- height: 100%;
112
- width: 4px;
113
- background-color: ${e=>e.leftLineColor};
114
- }
115
- }
116
-
117
- .message-body {
118
- color: #25292f;
119
- font-size: 16px;
120
- word-break: break-all;
121
- white-space: pre-line;
122
- }
123
- .message-container {
124
- display: flex;
125
- flex-direction: column;
126
- justify-content: flex-start;
127
- .data-container,
128
- .attachment-container {
129
- display: flex;
130
- flex-direction: column;
131
- width: 100%;
132
- }
133
- }
134
- .actions-container {
135
- margin-top: 10px;
136
- .actions-item {
137
- margin-right: 8px;
138
- }
139
- }
140
- `;Jt.propTypes={severity:v.string.isRequired,notification:v.object.isRequired,showSke:v.bool};Jt.defaultProps={showSke:!0};const pt=e=>mo.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Ci=async(e,t)=>{const{type:n,did:r}=e;return Jn.isSameAddr(n,"did")?await yi(r,t)||et.getLink(e):et.getLink(e)};function Ii(e){return new TextEncoder().encode(e).length>=1e4}const Ei=async(e,t,n=!0)=>{let r=e;Ii(e)&&(r=e.slice(0,1e4));const s=et.toTextList(r);return await Promise.all(s.map(async i=>{if(i instanceof et.Link){if(n){const c=await Ci(i,t),{type:l,chainId:u,did:d}=i;return Jn.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${u}" data-did="${d}">${i.text}</em>`:c?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${c}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${u}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};br.propTypes={notification:v.object,rows:v.number,minimal:v.bool};function br({notification:e,rows:t=2,minimal:n=!1}){const[r,s]=x.useState(!1),[a,i]=x.useState(""),{t:c,locale:l}=Y(),{palette:u}=ee(),d=x.useMemo(()=>{const{attachments:m}=e||{};if(!m)return!1;try{return m.length>0}catch{return!1}},[e]),p=x.useMemo(()=>{const{blocks:m}=e||{};if(!m)return!1;try{return m.length>0}catch{return!1}},[e]),f=x.useMemo(()=>{const{description:m}=e||{};return!!m},[e]),y=x.useMemo(()=>{const{data:m}=e||{};return!Ke(m)},[e]),g=x.useMemo(()=>d||p||f||y,[d,p,f,y]);if(x.useEffect(()=>{Ei((e==null?void 0:e.description)??"",l).then(m=>{i(m)})},[e==null?void 0:e.description,l]),!g)return null;const h=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,S=m=>{const{target:C}=m;C.getAttribute("data-name")==="toggle-expanded"&&(s(!r),m.customPreventRedirect=!0)};return o.jsxs(ki,{color:n?u.primary.contrastText:"",children:[o.jsx(_,{className:"text-container",component:"div",onClick:S,children:a&&(!r&&t>0?o.jsx(Co,{basedOn:"letters",unsafeHTML:pt(a),maxLine:t,ellipsisHTML:pt(h())}):o.jsx(H,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:pt(`${a}${h()}`)}}))}),!n&&(d||y)?o.jsx(Jt,{severity:e.severity,notification:e}):null]})}const ki=G(_)`
141
- width: 100%;
142
- color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
143
- .text-container {
144
- word-wrap: break-word;
145
- word-break: break-all;
146
- color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
147
- .toggle-btn {
148
- display: inline-block;
149
- white-space: nowrap;
150
- cursor: pointer;
151
- margin-left: 4px;
152
- color: ${e=>e.theme.palette.secondary.main};
153
- }
154
- .content.ellipsis {
155
- overflow: hidden;
156
- text-overflow: ellipsis;
157
- word-break: break-all;
158
- display: block;
159
- display: -webkit-box;
160
- -webkit-box-orient: vertical;
161
- -webkit-line-clamp: 2;
162
- line-height: 1.25;
163
- }
164
- }
165
- `,Ti=x.memo(br);var D=function(t,n,r){return Fn.call(n,"css")?o.jsx(Vn,qn(t,n),r):o.jsx(t,n,r)},Fe=function(t,n,r){return Fn.call(n,"css")?o.jsxs(Vn,qn(t,n),r):o.jsxs(t,n,r)};/**
166
- * (c) Iconify
167
- *
168
- * For the full copyright and license information, please view the license.txt or license.gpl.txt
169
- * files at https://github.com/iconify/iconify
170
- *
171
- * Licensed under MIT.
172
- *
173
- * @license MIT
174
- * @version 3.1.1
175
- */const wr=Object.freeze({left:0,top:0,width:16,height:16}),nt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),De=Object.freeze({...wr,...nt}),xt=Object.freeze({...De,body:"",hidden:!1});function Li(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Tn(e,t){const n=Li(e,t);for(const r in xt)r in nt?r in e&&!(r in n)&&(n[r]=nt[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Pi(e,t){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function a(i){if(n[i])return s[i]=[];if(!(i in s)){s[i]=null;const c=r[i]&&r[i].parent,l=c&&a(c);l&&(s[i]=[c].concat(l))}return s[i]}return Object.keys(n).concat(Object.keys(r)).forEach(a),s}function Di(e,t,n){const r=e.icons,s=e.aliases||Object.create(null);let a={};function i(c){a=Tn(r[c]||s[c],a)}return i(t),n.forEach(i),Tn(e,a)}function Ri(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const r=Pi(e);for(const s in r){const a=r[s];a&&(t(s,Di(e,s,a)),n.push(s))}return n}const _e=/^[a-z0-9]+(-[a-z0-9]+)*$/,ye=(e,t,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),l=s.pop(),u={provider:s.length>0?s[0]:r,prefix:l,name:c};return t&&!Qe(u)?null:u}const a=s[0],i=a.split("-");if(i.length>1){const c={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!Qe(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:a};return t&&!Qe(c,n)?null:c}return null},Qe=(e,t)=>e?!!((e.provider===""||e.provider.match(_e))&&(t&&e.prefix===""||e.prefix.match(_e))&&e.name.match(_e)):!1,Ai={provider:"",aliases:{},not_found:{},...wr};function mt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Mi(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!mt(e,Ai))return null;const n=t.icons;for(const s in n){const a=n[s];if(!s.match(_e)||typeof a.body!="string"||!mt(a,xt))return null}const r=t.aliases||Object.create(null);for(const s in r){const a=r[s],i=a.parent;if(!s.match(_e)||typeof i!="string"||!n[i]&&!r[i]||!mt(a,xt))return null}return t}const rt=Object.create(null);function $i(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function J(e,t){const n=rt[e]||(rt[e]=Object.create(null));return n[t]||(n[t]=$i(e,t))}function Yt(e,t){return Mi(t)?Ri(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Oi(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Ni(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(rt)).forEach(s=>{(typeof s=="string"&&typeof t=="string"?[t]:Object.keys(rt[s]||{})).forEach(i=>{const c=J(s,i);n=n.concat(Object.keys(c.icons).map(l=>(s!==""?"@"+s+":":"")+i+":"+l))})}),n}let en=!1;function Ui(e){return en}function Re(e){const t=typeof e=="string"?ye(e,!0,en):e;if(t){const n=J(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function zi(e,t){const n=ye(e,!0,en);if(!n)return!1;const r=J(n.provider,n.prefix);return Oi(r,n.name,t)}function jr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Qe({provider:t,prefix:n,name:"a"}))return!1;const r=J(t,n);return!!Yt(r,e)}function Hi(e){return!!Re(e)}function Bi(e){const t=Re(e);return t?{...De,...t}:null}const Sr=Object.freeze({width:null,height:null}),_r=Object.freeze({...Sr,...nt}),Fi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Vi=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function vt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Fi);if(r===null||!r.length)return e;const s=[];let a=r.shift(),i=Vi.test(a);for(;;){if(i){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*t*n)/n)}else s.push(a);if(a=r.shift(),a===void 0)return s.join("");i=!i}}const qi=e=>e==="unset"||e==="undefined"||e==="none";function ct(e,t){const n={...De,...e},r={..._r,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach(g=>{const h=[],S=g.hFlip,m=g.vFlip;let C=g.rotate;S?m?C+=2:(h.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),h.push("scale(-1 1)"),s.top=s.left=0):m&&(h.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),h.push("scale(1 -1)"),s.top=s.left=0);let w;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:w=s.height/2+s.top,h.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:h.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,h.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}C%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),h.length&&(a='<g transform="'+h.join(" ")+'">'+a+"</g>")});const i=r.width,c=r.height,l=s.width,u=s.height;let d,p;i===null?(p=c===null?"1em":c==="auto"?u:c,d=vt(p,l/u)):(d=i==="auto"?l:i,p=c===null?vt(d,u/l):c==="auto"?u:c);const f={},y=(g,h)=>{qi(h)||(f[g]=h.toString())};return y("width",d),y("height",p),f.viewBox=s.left.toString()+" "+s.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:a}}const Wi=/\sid="(\S+)"/g,Ki="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Gi=0;function Cr(e,t=Ki){const n=[];let r;for(;r=Wi.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const i=typeof t=="function"?t(a):t+(Gi++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const le={local:!0,session:!0},Ir={local:new Set,session:new Set};let tn=!1;function Qi(e){tn=e}const Ln="iconify2",Te="iconify",Er=Te+"-count",Pn=Te+"-version",kr=36e5,Zi=168;function yt(e,t){try{return e.getItem(t)}catch{}}function nn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Dn(e,t){try{e.removeItem(t)}catch{}}function bt(e,t){return nn(e,Er,t.toString())}function wt(e){return parseInt(yt(e,Er))||0}let Ve=typeof window>"u"?{}:window;function Tr(e){const t=e+"Storage";try{if(Ve&&Ve[t]&&typeof Ve[t].length=="number")return Ve[t]}catch{}le[e]=!1}function Lr(e,t){const n=Tr(e);if(!n)return;const r=yt(n,Pn);if(r!==Ln){if(r){const c=wt(n);for(let l=0;l<c;l++)Dn(n,Te+l.toString())}nn(n,Pn,Ln),bt(n,0);return}const s=Math.floor(Date.now()/kr)-Zi,a=c=>{const l=Te+c.toString(),u=yt(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>s&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Dn(n,l)}};let i=wt(n);for(let c=i-1;c>=0;c--)a(c)||(c===i-1?(i--,bt(n,i)):Ir[e].add(c))}function Pr(){if(!tn){Qi(!0);for(const e in le)Lr(e,t=>{const n=t.data,r=t.provider,s=n.prefix,a=J(r,s);if(!Yt(a,n).length)return!1;const i=n.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,i):i,!0})}}function Dr(e,t){switch(e){case"local":case"session":le[e]=t;break;case"all":for(const n in le)le[n]=t;break}}const jt=Object.create(null);function Rr(e,t){jt[e]=t}function St(e){return jt[e]||jt[""]}function rn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const lt=Object.create(null),we=["https://api.simplesvg.com","https://api.unisvg.com"],Ze=[];for(;we.length>0;)we.length===1||Math.random()>.5?Ze.push(we.shift()):Ze.push(we.pop());lt[""]=rn({resources:["https://api.iconify.design"].concat(Ze)});function Ar(e,t){const n=rn(t);return n===null?!1:(lt[e]=n,!0)}function ut(e){return lt[e]}function Xi(){return Object.keys(lt)}const Ji=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let st=Ji();function Yi(e){st=e}function ea(){return st}function ta(e,t){const n=ut(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(i=>{s=Math.max(s,i.length)});const a=t+".json?icons=";r=n.maxURL-s-n.path.length-a.length}return r}function na(e){return e===404}const ra=(e,t,n)=>{const r=[],s=ta(e,t),a="icons";let i={type:a,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=s&&u>0&&(r.push(i),i={type:a,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),r.push(i),r};function sa(e){if(typeof e=="string"){const t=ut(e);if(t)return t.path}return"/"}const oa=(e,t,n)=>{if(!st){n("abort",424);return}let r=sa(t.provider);switch(t.type){case"icons":{const a=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=a+".json?"+l.toString();break}case"custom":{const a=t.uri;r+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let s=503;st(e+r).then(a=>{const i=a.status;if(i!==200){setTimeout(()=>{n(na(i)?"abort":"next",i)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",s)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",s)})},ia={prepare:ra,send:oa};function aa(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const a=s.provider,i=s.prefix,c=s.name,l=n[a]||(n[a]=Object.create(null)),u=l[i]||(l[i]=J(a,i));let d;c in u.icons?d=t.loaded:i===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:a,prefix:i,name:c};d.push(p)}),t}function Mr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==t))})}function ca(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,s=e.prefix;t.forEach(a=>{const i=a.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==s)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:r,prefix:s,name:u});else if(e.missing.has(u))i.missing.push({provider:r,prefix:s,name:u});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||Mr([e],a.id),a.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),a.abort))})}))}let la=0;function ua(e,t,n){const r=la++,s=Mr.bind(null,n,r);if(!t.pending.length)return s;const a={id:r,icons:t,callback:e,abort:s};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(a)}),s}function da(e,t=!0,n=!1){const r=[];return e.forEach(s=>{const a=typeof s=="string"?ye(s,t,n):s;a&&r.push(a)}),r}var fa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function pa(e,t,n,r){const s=e.resources.length,a=e.random?Math.floor(Math.random()*s):e.index;let i;if(e.random){let j=e.resources.slice(0);for(i=[];j.length>1;){const k=Math.floor(Math.random()*j.length);i.push(j[k]),j=j.slice(0,k).concat(j.slice(k+1))}i=i.concat(j)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));const c=Date.now();let l="pending",u=0,d,p=null,f=[],y=[];typeof r=="function"&&y.push(r);function g(){p&&(clearTimeout(p),p=null)}function h(){l==="pending"&&(l="aborted"),g(),f.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),f=[]}function S(j,k){k&&(y=[]),typeof j=="function"&&y.push(j)}function m(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:S,abort:h}}function C(){l="failed",y.forEach(j=>{j(void 0,d)})}function w(){f.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),f=[]}function L(j,k,E){const T=k!=="success";switch(f=f.filter(I=>I!==j),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){d=E,C();return}if(T){d=E,f.length||(i.length?R():C());return}if(g(),w(),!e.random){const I=e.resources.indexOf(j.resource);I!==-1&&I!==e.index&&(e.index=I)}l="completed",y.forEach(I=>{I(E)})}function R(){if(l!=="pending")return;g();const j=i.shift();if(j===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(w(),C())},e.timeout);return}C();return}const k={status:"pending",resource:j,callback:(E,T)=>{L(k,E,T)}};f.push(k),u++,p=setTimeout(R,e.rotate),n(j,t,k.callback)}return setTimeout(R),m}function $r(e){const t={...fa,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function s(c,l,u){const d=pa(t,c,l,(p,f)=>{r(),u&&u(p,f)});return n.push(d),d}function a(c){return n.find(l=>c(l))||null}return{query:s,find:a,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Rn(){}const ht=Object.create(null);function ma(e){if(!ht[e]){const t=ut(e);if(!t)return;const n=$r(t),r={config:t,redundancy:n};ht[e]=r}return ht[e]}function Or(e,t,n){let r,s;if(typeof e=="string"){const a=St(e);if(!a)return n(void 0,424),Rn;s=a.send;const i=ma(e);i&&(r=i.redundancy)}else{const a=rn(e);if(a){r=$r(a);const i=e.resources?e.resources[0]:"",c=St(i);c&&(s=c.send)}}return!r||!s?(n(void 0,424),Rn):r.query(t,s,n)().abort}function ha(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in le)Lr(r,s=>{const a=s.data;return s.provider!==e.provider||a.prefix!==e.prefix||a.lastModified===t});return!0}function ga(e,t){tn||Pr();function n(r){let s;if(!le[r]||!(s=Tr(r)))return;const a=Ir[r];let i;if(a.size)a.delete(i=Array.from(a).shift());else if(i=wt(s),!bt(s,i+1))return;const c={cached:Math.floor(Date.now()/kr),provider:e.provider,data:t};return nn(s,Te+i.toString(),JSON.stringify(c))}t.lastModified&&!ha(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function An(){}function xa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ca(e)}))}function va(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let a;if(!s||!(a=St(n)))return;a.prepare(n,r,s).forEach(c=>{Or(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=Yt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),ga(e,l)}catch(u){console.error(u)}xa(e)})})}))}const ya=e=>{const n=J(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},sn=(e,t)=>{const n=da(e,!0,Ui()),r=aa(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,An)}),()=>{l=!1}}const s=Object.create(null),a=[];let i,c;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===i)return;i=u,c=d,a.push(J(u,d));const p=s[u]||(s[u]=Object.create(null));p[d]||(p[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=J(u,d),y=f.pendingIcons||(f.pendingIcons=new Set);y.has(p)||(y.add(p),s[u][d].push(p))}),a.forEach(l=>{const{provider:u,prefix:d}=l;s[u][d].length&&va(l,s[u][d])}),t?ua(t,r,a):An},ba=e=>new Promise((t,n)=>{const r=typeof e=="string"?ye(e,!0):e;if(!r){n(e);return}sn([r||e],s=>{if(s.length&&r){const a=Re(r);if(a){t({...De,...a});return}}n(e)})});function Nr(e,t){const n={...e};for(const r in t){const s=t[r],a=typeof s;r in Sr?(s===null||s&&(a==="string"||a==="number"))&&(n[r]=s):a===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const dt={..._r,inline:!1},gt="iconify",_t="iconify-inline",se="iconifyData"+Date.now();let de=[];function Ae(e){for(let t=0;t<de.length;t++){const n=de[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Ur(e,t=!1){let n=Ae(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},de.push(n),n)}function wa(){if(document.documentElement)return Ur(document.documentElement);de.push({node:()=>document.documentElement})}function ja(e){de=de.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Me(){return de}function Sa(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Ce=null;const _a={childList:!0,subtree:!0,attributes:!0};function zr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Ce&&Ce(e)}))}function Ca(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const s=t[r];if(s.addedNodes&&s.addedNodes.length>0||s.type==="attributes"&&s.target[se]!==void 0){n.paused||zr(e);return}}}function Hr(e,t){e.observer.instance.observe(t,_a)}function ot(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Ca.bind(null,e)),Hr(e,n),t.paused||zr(e))}function Mn(){Me().forEach(ot)}function Br(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ia(e){const t=Ce!==null;if(Ce!==e&&(Ce=e,t&&Me().forEach(Br)),t){Mn();return}Sa(Mn)}function Ct(e){(e?[e]:Me()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Ea(e){if(e){const t=Ae(e);t&&Ct(t)}else Ct()}function It(e){(e?[e]:Me()).forEach(t=>{if(!t.observer){ot(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?Hr(t,r):ot(t);else return}})}function ka(e){if(e){const t=Ae(e);t&&It(t)}else It()}function Fr(e,t=!1){const n=Ur(e,t);return ot(n),n}function Vr(e){const t=Ae(e);t&&(Br(t),ja(e))}function Ta(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const s in dt)if(n[s]!==r[s])return!0;return!1}function La(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/s,a%1===0?r(a):0)}}return t}const Pa=/[\s,]+/;function Da(e,t){t.split(Pa).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ra=["width","height"],Aa=["inline","hFlip","vFlip"];function Ma(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function $a(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&ye(t,!0);if(!n)return null;const r={...dt,inline:e.classList&&e.classList.contains(_t)};Ra.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const s=e.getAttribute("data-rotate");typeof s=="string"&&(r.rotate=La(s));const a=e.getAttribute("data-flip");typeof a=="string"&&Da(r,a),Aa.forEach(c=>{const l="data-"+c,u=Ma(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:i}}const Oa="svg."+gt+", i."+gt+", span."+gt+", i."+_t+", span."+_t;function Na(e){const t=[];return e.querySelectorAll(Oa).forEach(n=>{const r=n[se]||n.tagName.toLowerCase()!=="svg"?$a(n):null;r&&t.push({node:n,props:r})}),t}function qr(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Ie;function Ua(){try{Ie=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ie=null}}function za(e){return Ie===void 0&&Ua(),Ie?Ie.createHTML(e):e}function Wr(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Kr(e,t,n,r){const s=e.classList;if(r){const i=r.classList;Array.from(i).forEach(c=>{s.add(c)})}const a=[];return t.forEach(i=>{s.contains(i)?n.has(i)&&a.push(i):(s.add(i),a.push(i))}),n.forEach(i=>{t.has(i)||s.remove(i)}),a}function Gr(e,t,n){const r=e.style;(n||[]).forEach(a=>{r.removeProperty(a)});const s=[];for(const a in t)r.getPropertyValue(a)||(s.push(a),r.setProperty(a,t[a]));return s}function Qr(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const s=t.customisations,a=ct(n,s),i=e[se],c=qr(Cr(a.body),{"aria-hidden":"true",role:"img",...a.attributes});r.innerHTML=za(c);const l=r.childNodes[0],u=e.attributes;for(let g=0;g<u.length;g++){const h=u.item(g),S=h.name;S!=="class"&&!l.hasAttribute(S)&&l.setAttribute(S,h.value)}const d=Wr(t.icon),p=Kr(l,d,new Set(i&&i.addedClasses),e),f=Gr(l,s.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),y={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[se]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function Ha(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ba(e){return"data:image/svg+xml,"+Ha(e)}function Fa(e){return'url("'+Ba(e)+'")'}const Va={display:"inline-block"},Et={"background-color":"currentColor"},Zr={"background-color":"transparent"},$n={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},On={"-webkit-mask":Et,mask:Et,background:Zr};for(const e in On){const t=On[e];for(const n in $n)t[e+"-"+n]=$n[n]}function Nn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function qa(e,t,n,r){const s=t.customisations,a=ct(n,s),i=a.attributes,c=e[se],l=qr(a.body,{...i,width:n.width+"",height:n.height+""}),u=Wr(t.icon),d=Kr(e,u,new Set(c&&c.addedClasses)),f={"--svg":Fa(l),width:Nn(i.width),height:Nn(i.height),...Va,...r?Et:Zr};s.inline&&(f["vertical-align"]="-0.125em");const y=Gr(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[se]=g,e}let qe=!1;function Wa(){qe||(qe=!0,setTimeout(()=>{qe&&(qe=!1,xe())}))}function xe(e,t=!1){const n=Object.create(null);function r(s,a){const{provider:i,prefix:c,name:l}=s,u=J(i,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(a&&!ya(s)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Me()).forEach(s=>{const a=typeof s.node=="function"?s.node():s.node;if(!a||!a.querySelectorAll)return;let i=!1,c=!1;function l(u,d,p){if(c||(c=!0,Ct(s)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,y=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){qa(u,d,{...De,...p},y);return}}Qr(u,d,p)}Na(a).forEach(({node:u,props:d})=>{const p=u[se];if(!p){const{status:y,icon:g}=r(d.icon,!0);if(g){l(u,d,g);return}i=i||y==="loading",u[se]={...d,status:y};return}let f;if(Ta(p,d)){if(f=r(d.icon,p.name!==d.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=r(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),s.temporary&&!i?Vr(a):t&&i?Fr(a,!0):c&&s.observer&&It(s)});for(const s in n){const a=n[s];for(const i in a){const c=a[i];sn(Array.from(c).map(l=>({provider:s,prefix:i,name:l})),Wa)}}}function Ka(e){const t=Ae(e);t?xe(t):xe({node:e,temporary:!0},!0)}function Xr(e,t,n=!1){const r=Re(e);if(!r)return null;const s=ye(e),a=Nr(dt,t||{}),i=Qr(document.createElement("span"),{name:e,icon:s,customisations:a},r);return n?i.outerHTML:i}function Ga(){return"3.1.1"}function Qa(e,t){return Xr(e,t,!1)}function Za(e,t){return Xr(e,t,!0)}function Xa(e,t){const n=Re(e);if(!n)return null;const r=Nr(dt,t||{});return ct(n,r)}function Ja(e){e?Ka(e):xe()}if(typeof document<"u"&&typeof window<"u"){wa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!jr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ia(xe),xe()})}function Ya(e,t){Dr(e,t!==!1)}function ec(e){Dr(e,!0)}Rr("",ia);if(typeof document<"u"&&typeof window<"u"){Pr();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;Ar(n,s)||console.error(r)}catch{console.error(r)}}}}const tc={getAPIConfig:ut,setAPIModule:Rr,sendAPIQuery:Or,setFetch:Yi,getFetch:ea,listAPIProviders:Xi},nc={_api:tc,addAPIProvider:Ar,loadIcons:sn,loadIcon:ba,iconExists:Hi,getIcon:Bi,listIcons:Ni,addIcon:zi,addCollection:jr,replaceIDs:Cr,calculateSize:vt,buildIcon:ct,getVersion:Ga,renderSVG:Qa,renderHTML:Za,renderIcon:Xa,scan:Ja,observe:Fr,stopObserving:Vr,pauseObserver:Ea,resumeObserver:ka,enableCache:Ya,disableCache:ec};try{self.Iconify===void 0&&(self.Iconify=nc)}catch{}var on={},rc=V;Object.defineProperty(on,"__esModule",{value:!0});var Jr=on.default=void 0,sc=rc(F()),oc=o;Jr=on.default=(0,sc.default)((0,oc.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function an({infos:e}){const{t}=Y(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(s=>{n.searchParams.set(s.label,s.value)});const r=e.map(s=>`* ${s.label}: ${s.value}`).join(`
176
- `);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
177
-
178
-
179
-
180
- <!--
181
- [Server Info]
182
- ${r}
183
- * Page: ${window.location.href}
184
- -->
185
- `),D(_,{sx:{mx:{xs:0,md:2}},children:D(Se,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}an.propTypes={infos:v.arrayOf(v.shape({label:v.string,value:v.string}))};an.defaultProps={infos:[]};var ic={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},ac={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const kt=new Map,cc=(e,t)=>{kt.set(e,t)},lc=(e="en_US")=>kt.get(e)||kt.get("en_US");var Yr={registerLang:cc,getLang:lc},uc=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const dc=uc,{getLang:je}=Yr,fc=(e,t)=>t===1?e:`${e}s`,pc=1e-7;var mc=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const n=je(t.locale),r=[],s=(c,l)=>{const u=Math.floor(c*10**l+pc);return(Math.round(u)/10**l).toFixed(l)},a=(c,l,u)=>{if((r.length===0||!t.colonNotation)&&c===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=n[l]||je("en_US")[l],{short:p}=n[l]||je("en_US")[l];let f=(u||c||"0").toString(),y,g;if(t.colonNotation){y=r.length>0?":":"",g="";const h=f.includes(".")?f.split(".")[0].length:f.length,S=r.length>0?2:1;f="0".repeat(Math.max(0,S-h))+f}else y="",t.locale==="zh_CN"?Object.values(i).filter(h=>h>0).length>1?!i.days&&!i.hours&&i.minutes&&t.compact?g=d:g=p:i.minutes?g=d:g=p:g=t.verbose?` ${fc(d,c)}`:p;r.push(y+f+g)},i=dc(e);if(a(Math.trunc(i.days/365),"year"),a(i.days%365,"day"),a(i.hours,"hour"),a(i.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(a(i.seconds,"second"),t.formatSubMilliseconds)a(i.milliseconds,"millisecond"),a(i.microseconds,"microsecond"),a(i.nanoseconds,"nanosecond");else{const c=i.milliseconds+i.microseconds/1e3+i.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=c>=1?Math.round(c):Math.ceil(c),d=l?c.toFixed(l):u;a(Number.parseFloat(d,10),"millisecond",d)}else{const c=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=s(c,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");a(Number.parseFloat(d,10),"second",d)}if(r.length===0){const c=(n.millisecond||je("en_US").millisecond).long,l=(n.millisecond||je("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${c}`:l}`:`0${t.verbose?` ${c}s`:l}`}if(t.compact)return r[0];if(typeof t.unitCount=="number"){const c=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(c)}return t.colonNotation?r.join(""):r.join(" ")};const hc=ic,gc=ac,{registerLang:cn}=Yr,es=mc;cn("en_US",hc);cn("zh_CN",gc);es.registerLang=cn;var xc=es;const ts=Hs(xc);var ln={},vc=V;Object.defineProperty(ln,"__esModule",{value:!0});var Tt=ln.default=void 0,yc=vc(F()),Un=o;Tt=ln.default=(0,yc.default)([(0,Un.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Un.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ne({children:e}){return X(n=>n.breakpoints.down("md"))?o.jsx(Ee,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(_,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(Tt,{fontSize:"small"})})}):o.jsxs(_,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(Tt,{fontSize:"small"}),e]})}ne.propTypes={children:v.node.isRequired};const bc="https://launcher.arcblock.io/",wc=30*24*60*60*1e3;function un({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,k,E,T,I,U;const{t:a,locale:i}=Y(),c=at(),[l,u]=tr({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),p=ee(),f=X($=>$.breakpoints.down("md")),{sx:y={},...g}=s,h=f?"mobile":"desktop",S=er(async()=>{const[$,z]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),Qn({launcherUrl:e||bc,nftDid:n,launcherSessionId:r,locale:i,theme:p.palette.mode})]);if($!=null&&$.error)throw new Error($.error);return{launcherSession:$.launcherSession,subscriptionURL:z}},[i]);if(S.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!f&&a("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...y},...g});if(S.error)return console.error(S.error),o.jsx(ae,{label:o.jsx(ne,{children:a(`expiration.${h}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...y},...g,onClick:()=>S.retry()});const m=$=>{u({popoverAnchorEl:$.currentTarget})},C=()=>{u({popoverAnchorEl:null})},w=(j=S.value)==null?void 0:j.launcherSession;let L="success";[M.LAUNCH_SESSION_STATUS.overdue,M.LAUNCH_SESSION_STATUS.canceled,M.LAUNCH_SESSION_STATUS.terminated].includes((E=(k=S.value)==null?void 0:k.launcherSession)==null?void 0:E.status)&&(L="error");let R=null;if(w.expirationDate&&!w.subscription){const $=me(w.expirationDate).diff(me(),"ms");R=a(`expiration.${h}.tips.${L}`,{validity:ts($,{locale:Zn(i),compact:!0,verbose:!0})}),$>0&&$<=wc&&(L="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(ae,{label:o.jsx(ne,{children:R||((I=(T=w==null?void 0:w.subscription)==null?void 0:T.product)==null?void 0:I.name)||a("common.subscription")}),color:L,variant:L!=="success"?"contained":"outlined",sx:{cursor:"pointer",...y},...g,onClick:m}),o.jsx(Wn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:C,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(_,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:o.jsx("iframe",{ref:d,title:a("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:(U=S.value)==null?void 0:U.subscriptionURL})})})]})}un.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};un.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const jc=30*24*60*60*1e3,Sc="https://launcher.arcblock.io/";function dn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...s}){var j,k,E,T,I,U,$;const{t:a,locale:i}=Y(),[c,l]=tr({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=X(z=>z.breakpoints.down("md")),p=at(),{sx:f={},...y}=s,g=d?"mobile":"desktop",h=er(async()=>{const[z,$e]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),Qn({launcherUrl:e||Sc,nftDid:n,launcherSessionId:r,locale:i})]);if(z!=null&&z.error)throw new Error(z.error);return{launcherSession:z.launcherSession,subscriptionURL:$e}},[i]);if(h.loading)return o.jsx(ae,{label:o.jsxs(ne,{children:[!d&&a("expiration.desktop.loading"),o.jsx(re,{size:16})]}),variant:"success",sx:{cursor:"pointer",...f},...y});if(h.error)return console.error(h.error),o.jsx(ae,{label:o.jsx(ne,{children:a(`expiration.${g}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...f},...y,onClick:()=>h.retry()});const S=(k=(j=h.value)==null?void 0:j.launcherSession)==null?void 0:k.expirationDate,m=me(S).isBefore(me()),C=me(S).diff(me(),"ms");let w="success";C<=jc&&(w="warning"),m&&(w="error");const L=z=>{l({popoverAnchorEl:z.currentTarget})},R=()=>{l({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((T=(E=h.value)==null?void 0:E.launcherSession)==null?void 0:T.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:a("expiration.desktop.nextInvoice",{date:Gs(S,i)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...f},...y,onClick:L}),!((U=(I=h.value)==null?void 0:I.launcherSession)!=null&&U.subscription)&&o.jsx(ae,{label:o.jsx(ne,{children:a(`expiration.${g}.tips.${w}`,{validity:ts(C,{locale:Zn(i),compact:!0,verbose:!0})})}),color:w,variant:w!=="success"?"contained":"outlined",sx:{cursor:"pointer",...f},...y,onClick:L}),o.jsx(Wn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:R,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(_,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:u,title:a("common.subscription"),width:"100%",height:"600px",style:{border:0},src:($=h.value)==null?void 0:$.subscriptionURL})})})]})}dn.propTypes={chainHost:v.string.isRequired,nftId:v.string,launcherSessionId:v.string,sx:v.object,retention:v.number,launcherUrl:v.string.isRequired};dn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var fn={},_c=V;Object.defineProperty(fn,"__esModule",{value:!0});var ns=fn.default=void 0,Cc=_c(F()),Ic=o;ns=fn.default=(0,Cc.default)((0,Ic.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var pn={},Ec=V;Object.defineProperty(pn,"__esModule",{value:!0});var rs=pn.default=void 0,kc=Ec(F()),Tc=o;rs=pn.default=(0,kc.default)((0,Tc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const Lc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function mn({children:e,style:t,...n}){return o.jsx(bs,{style:t,...n,children:e})}mn.propTypes={children:v.any.isRequired,style:v.object};mn.defaultProps={style:{}};const O={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Xe={added:O.grey,waiting:O.yellow,downloading:O.yellow,extracting:O.yellow,downloaded:O.grey,installing:O.yellow,installed:O.grey,starting:O.yellow,running:O.running,stopping:O.yellow,stopped:O.reverse,error:O.error,upgrading:O.yellow,restarting:O.yellow,corrupted:O.error,deleting:O.yellow,resource:O.primary},Pc={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function ss({isResource:e,status:t,variant:n,source:r,progress:s,...a}){const{t:i}=x.useContext(Lt),c=N.isInProgress(t),l=e&&t==="stopped"?"resource":t,u=i(`blocklet.status.${l}`);return n==="pin"?o.jsx(Ee,{title:i("blocklet.statusTip",{status:u}),children:o.jsxs(_,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...a,children:[o.jsx(_,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Xe[l],style:{opacity:.15}}),o.jsx(_,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Xe[l]})]})}):n==="dot"?o.jsx(Ee,{title:i("blocklet.statusTip",{status:u}),children:o.jsx(ko,{color:Xe[l],...a})}):o.jsxs(mn,{type:Pc[l],...a,children:[c&&o.jsx(re,{size:12,color:"inherit",style:{marginRight:5}}),u,l==="downloading"&&s?o.jsx("div",{style:{marginLeft:5},children:`${s} %`}):null]})}ss.propTypes={status:v.string.isRequired,variant:v.oneOf(["dot","tag","pin"]),source:v.string,progress:v.number,isResource:v.bool};ss.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Dc(){const{inFullPage:e,toggleFullPage:t}=xo();return D(Rt,{onClick:t,children:e?D(rs,{sx:{transform:"scale(1.3)"}}):D(ns,{sx:{transform:"scale(1.3)"}})})}function hn({children:e}){var S;const{t}=Y(),{loading:n,error:r,actions:{refreshBlocklet:s},env:a,blocklet:i}=ve(),{info:c}=Qs(),l=Bs(),u=X(m=>m.breakpoints.down("md")),{appId:d,version:p}=a,f=[{label:"App ID",value:d},{label:"App Version",value:p},{label:"App Bundle Name",value:(S=i==null?void 0:i.meta)==null?void 0:S.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],y=m=>{var w,L,R,j;const C=Array.isArray(m)?m:[m];if(u||C.unshift(D(Dc,{})),i){const k={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Zs(i)?C.unshift(D(un,{chainHost:(w=i==null?void 0:i.controller)==null?void 0:w.chainHost,nftId:(L=i==null?void 0:i.controller)==null?void 0:L.nftId,launcherSessionId:(R=i==null?void 0:i.controller)==null?void 0:R.launcherSessionId,launcherUrl:(j=i==null?void 0:i.controller)==null?void 0:j.launcherUrl,sx:k})):c.ownerNft&&c.launcher&&C.unshift(D(dn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:k}))}return C},g=Io({blocklet:i}),h={logo:g?D("img",{src:g,alt:"logo"}):null,brandAddon:D(_,{children:i&&Fe(_,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[D(Ee,{title:N.isRunning(i==null?void 0:i.status)?void 0:t(`blocklet.status.${i==null?void 0:i.status}`),children:D(_,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:Xe[i==null?void 0:i.status]})}),D(_,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.getDisplayName(i)}),D(_,{component:ws,icon:Lc,sx:{color:"text.secondary"}})]})})};return Fe(Rc,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:h,footerProps:{addon:D(an,{infos:f})},children:[!i&&n&&D(Je,{relative:"parent",children:D(re,{})}),!i&&r&&Fe(Je,{relative:"parent",children:[Fe(_,{display:"flex",alignItems:"center",children:[D(Jr,{color:"error",sx:{marginRight:1}}),Mt(r)]}),D(Pt,{onClick:()=>s(),children:D("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!i&&D(_,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:D(js,{FallbackComponent:go,resetKeys:[l.pathname],children:e})})]})}hn.propTypes={children:v.any};hn.defaultProps={children:null};const Rc=G(ho)`
186
- div.dashboard-content {
187
- padding: 0;
188
- }
189
- .header-addons .locales {
190
- max-height: 400px;
191
- overflow-y: auto;
192
- }
193
-
194
- .header-brand-addon {
195
- display: block;
196
- }
197
- `;function Ac(){var m,C,w;const{t:e,locale:t}=Y(),{blocklet:n,launcherSession:r,refreshSubscription:s}=ve(),{connectApi:a,session:i,api:c}=Xs(),[l,u]=x.useState(!1),[d,p]=x.useState(""),[f,y]=wo({subscriptionURL:"#"});if(x.useEffect(()=>{var L,R;(bn(n,r)||wn(r))&&Js({launcherSessionId:(L=n==null?void 0:n.controller)==null?void 0:L.launcherSessionId,launcherUrl:(R=n==null?void 0:n.controller)==null?void 0:R.launcherUrl,locale:t}).then(j=>{y({subscriptionURL:j})}).catch(j=>{console.error("get subscription url error:",j)})},[n,r]),x.useEffect(()=>{var L;if((L=n.controller)!=null&&L.launcherUrl){const R=he(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(R).then(j=>j.json()).then(j=>{var T,I;const k=(I=(T=j.componentMountPoints)==null?void 0:T.find(U=>U.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:I.mountPoint,E=he(n.controller.launcherUrl,k);p(E)})}},[(m=n.controller)==null?void 0:m.launcherUrl]),!n||!r)return"";let g=null,h="",S="error";return Ys(r)?(g=eo(r)?o.jsx(Se,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):o.jsx(Us,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),h=e("blocklet.suspendedCausedByPastDue",{deadline:be(r==null?void 0:r.reservedUntil,t)})):wn(r)?(g=o.jsx(Se,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.willBeSuspendedSoon",{deadline:be((((C=r==null?void 0:r.subscription)==null?void 0:C.cancel_at)||0)*1e3,t)}),S="warning"):bn(n,r)?(g=o.jsx(Se,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.suspendedCausedByExpired",{deadline:be(r==null?void 0:r.reservedUntil,t),canceledAt:be((((w=r==null?void 0:r.subscription)==null?void 0:w.canceled_at)||0)*1e3,t)})):to(n,r)&&(g=o.jsx(Kn,{to:he(M.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),h=e("blocklet.suspendedCausedByTerminated",{canceledAt:be(r==null?void 0:r.terminatedAt,t),deadline:no(r==null?void 0:r.terminatedAt,t)})),h?o.jsxs(_,{component:Ss,type:S,sx:{"&> .alert-content":{display:"block"}},children:[l&&d&&r&&o.jsx(ro,{session:i,connect:a,baseUrl:d,authToken:r.subscription.authToken,children:o.jsx(so,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),s(),u(!1)}})}),h,o.jsx(H,{component:"span",sx:{marginLeft:"4px"},children:g})]}):null}const os=x.createContext({});function Dl(){return x.useContext(os)}const{Provider:Mc,Consumer:Rl}=os,{did:K,appId:$c}=window.env;function Oc({children:e}){var j,k;const{t,locale:n}=Y(),{blocklet:r}=ve(),[s,a]=x.useState([]),[i,c]=x.useState([]),[l,u]=x.useState([]),d=N.getDisplayName(r),p=((j=((r==null?void 0:r.environments)||[]).find(E=>E.key===ce.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:j.value)||"auto",f=(r==null?void 0:r.trustedPassports)||[],y=(r==null?void 0:r.trustedFactories)||[],g=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const E=await He.doBatchQuery({getRoles:{input:{teamDid:K}},getPermissions:{input:{teamDid:K}},getInvitations:{input:{teamDid:K}}}),T=(E.getRoles.roles||[]).filter(I=>!M.RBAC_CONFIG.roles.some(U=>U.name===I.name&&(!U.passport||U.ci))).map(I=>(I.hasDescription=!!I.description,I.hasDescription||(I.description=t("team.passport.description",{teamName:d,title:I.title})),I));c(po(T,[I=>oo(I.name)],["desc"])),u(E.getPermissions.permissions||[]),a(E.getInvitations.invitations||[])}catch(E){Z.error(E.message)}},S=({did:E}={})=>{const T={teamDid:K,user:{did:E}};return He.getUser({input:T})},m=({query:E,paging:T}={})=>{const I={teamDid:K};return T&&(I.paging=T),E&&(I.query=E),I.sort={lastLoginAt:-1},He.getUsers({input:I})},C=()=>He.getUsersCountPerRole({input:{teamDid:K}}),w=()=>h();x.useEffect(()=>{var E;(E=r==null?void 0:r.meta)!=null&&E.did&&h()},[(k=r==null?void 0:r.meta)==null?void 0:k.did]),x.useEffect(()=>{c(E=>E.map(T=>(T.hasDescription||(T.description=t("team.passport.description",{teamName:d,title:T.title})),{...T})))},[t,n]);const L=E=>{E.teamDid===K&&h()};We(ce.TeamEvents.userAdded,L,[K]),We(ce.TeamEvents.userRemoved,L,[K]),We(ce.TeamEvents.userUpdated,L,[K]);const R={teamDid:K,teamIssuerDid:$c,teamName:d,invitations:s,roles:i,permissions:l,trustedPassports:f,trustedFactories:y,isNodeTeam:!1,enablePassportIssuance:g,refresh:w,passportColor:p,endpoint:window.location.origin,blocklet:r,api:{getUser:S,getUsers:m,getUsersCountPerRole:C}};return o.jsx(Mc,{value:R,children:e})}const Nc=x.lazy(()=>P(()=>import("./log-6M_J_pon.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),Uc=x.lazy(()=>P(()=>import("./index-Cx-ESLe9.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,3,37,38,39,40,41,42,43]))),zc=x.lazy(()=>P(()=>import("./index-DQl2QJod.js"),__vite__mapDeps([44,4,2,5,1,6,7,8,40,10,9,11,45,46,30,25,34,35,47,3,37,38,20,39,41,27,42,43]))),Hc=x.lazy(()=>P(()=>import("./index-DaMn1fo9.js"),__vite__mapDeps([48,2,1,9,4,5,6,7,8,10,11,49,30,25,20,18,50,13,36,51,12,21,52,42,53,54,55,56,57,23,29,58,59,60,61,62,38,63,64,65,66]))),Bc=x.lazy(()=>P(()=>import("./overview-Bjj9JLCV.js"),__vite__mapDeps([67,1,2,4,5,6,7,8,10,40,68,9,11,28,41,27,18,69,70,71,56,3,25,30,37,38,20,39,42,43]))),Fc=x.lazy(()=>P(()=>import("./domains-CRt4uYYF.js"),__vite__mapDeps([72,2,4,5,1,6,7,8,9,10,11,73,46,19,20,41,27,30,25,34,35,62,21,74,42,40,26,28,75]))),Vc=x.lazy(()=>P(()=>import("./index-B7qZ5OdP.js"),__vite__mapDeps([76,2,6,5,1,4,7,8,9,10,11,18,77,31,32,45,19,20,78,79,80,30,25,51,42,81,3,37,38,39,40,41,27,43]))),qc=x.lazy(()=>P(()=>import("./appearance-DB1QowgL.js"),__vite__mapDeps([82,5,2,4,1,6,7,8,9,10,11,45]))),Wc=x.lazy(()=>P(()=>import("./audit-logs-BamIXrWh.js"),__vite__mapDeps([83,4,2,5,1,6,7,8,31,32,3,9,10,11,64,65,40,36,66,25,30,37,38,20,39,41,27,42,43]))),Kc=x.lazy(()=>P(()=>import("./index-CTfYMqG2.js"),__vite__mapDeps([84,2,1,5,4,6,7,8,9,10,11,39,20,85,86,36,28,87,55,13,40,75,31,32,18,88,41,27,89,90,91,57,92,25,93,94,23,24,45,3,30,37,38,42,43]))),Gc=x.lazy(()=>P(()=>import("./config-navigation-CsVa3Hf0.js"),__vite__mapDeps([95,2,4,5,1,6,7,8,70,79,10,96,9,11,97,98,63,56,39,20,58,59,89,25,3,30,37,38,40,41,27,42,43]))),Qc=x.lazy(()=>P(()=>import("./index-B1fP-8KR.js"),__vite__mapDeps([99,1,2,6,5,10,4,7,8,9,11,45,56,100,101,71,25,29,28,94,35,38,102,51,3,30,37,20,39,40,41,27,42,43]))),Zc=x.lazy(()=>P(()=>import("./index-DMSe2Qjx.js"),__vite__mapDeps([103,4,2,5,1,6,7,8,10,9,11,102,86,68,28,32,45]))),Xc=x.lazy(()=>P(()=>import("./security-C2l4SCkx.js"),__vite__mapDeps([104,4,2,5,1,6,7,8,9,10,11,98,105,45,3,25,30,37,38,20,39,40,41,27,42,43]))),Jc=x.lazy(()=>P(()=>import("./branding-C2Dm2Z1c.js"),__vite__mapDeps([106,2,1,4,5,6,7,8,10,107,70,96,61,108,53,80,63,9,11,19,20,39,86]))),Yc=x.lazy(()=>P(()=>import("./advanced-yrYBgA5T.js"),__vite__mapDeps([109,2,1,9,4,5,6,7,8,10,11,19,20,40,30,25,42,86,21,28,18,69,70,3,37,38,39,41,27,43]))),el=x.lazy(()=>P(()=>import("./traffic-fPCLOWN3.js").then(e=>e.t),__vite__mapDeps([88,2,9,1,4,5,6,7,8,10,11,41,27,89,90,91,57,92,25,93,94,23,24]))),tl=x.lazy(()=>P(()=>import("./runtime-1mGYl_p2.js"),__vite__mapDeps([110,2,1,4,5,6,7,8,9,10,11,93,94,13,3,25,30,37,38,20,39,40,41,27,42,43]))),nl=x.lazy(()=>P(()=>import("./index-CyS4mBmV.js"),__vite__mapDeps([111,2,4,5,1,6,7,8,112,25,77,18,31,32,9,10,11,22,23,24,30,21,62,19,20,13,34,35,45,47,40,3,37,38,39,41,27,42,43]))),rl=x.lazy(()=>P(()=>import("./list-h4Ed_myi.js"),__vite__mapDeps([113,2,4,5,1,6,7,8,10,112,41,27,17,9,11,22,23,24,50,21,62,30,25,77,18,31,32,34,35,47,40,45,3,37,38,20,39,42,43]))),sl=x.lazy(()=>P(()=>import("./index-8kcb4Nom.js"),__vite__mapDeps([114,2,4,5,1,6,7,8,54,56,47,40,45,9,10,11,3,25,30,37,38,20,39,41,27,42,43]))),ol=x.lazy(()=>P(()=>import("./component-ClWADDCr.js"),__vite__mapDeps([115,1,2,5,4,6,7,8,10,9,11,25,116,102,19,20,112,97,92,59,107,70,96,21,57,91,63,117,60,54,61,29,62,30,38,18,118,119,101,71,56,108,53,120,85,78,79,64,65,28,3,74,45,121,100,122,81,40,89,13,37,34,35,39,41,27,42,43]))),il=x.lazy(()=>P(()=>import("./index-C5vFhD_w.js"),__vite__mapDeps([123,1,2,4,5,6,7,8,9,10,11]))),al=he(M.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),cl=e=>{const{enqueueSnackbar:t}=zn(),n=x.useCallback(r=>Xn(al,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);We(`${e}/${M.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const s=n(r),{severity:a,description:i}=r||{},c=["error","warning"].includes(a)||r.sticky;r.source==="system"&&t(i,{variant:a,autoHideDuration:c?null:5e3,content:l=>o.jsx(fi,{viewAllUrl:s,keyId:l,notification:r,content:o.jsx(Ti,{notification:r,minimal:!0,rows:0})})})},[],"user")};function is({blocklet:e,isAdmin:t}){return t?o.jsx(Kc,{blocklet:e}):o.jsx(yo,{status:403})}is.propTypes={blocklet:v.object.isRequired,isAdmin:v.bool.isRequired};const ll=e=>{var d,p;const{t}=Y(),{blocklet:n,actions:{refreshBlocklet:r},client:s,did:a}=ve(),i=(d=n==null?void 0:n.meta)==null?void 0:d.did,c=!n||lo(n.status)?[]:N.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:o.jsx(zs,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"},{label:t("oauth.client.tab"),value:"oauth"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advancedConfig"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"},{label:t("common.mcpServers"),value:"mcp-servers"}],developers:[{label:t("common.logs"),value:"logs",show:((p=n==null?void 0:n.children)==null?void 0:p.length)&&n.structVersion===M.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:Bc,components:ol,members:o.jsx(Uc,{type:"blocklet",createPassportSvg:jn}),passports:o.jsx(Vc,{createPassportSvg:jn}),settings:o.jsx(Zc,{orientation:"vertical"}),security:o.jsx(Xc,{}),"did-spaces":o.jsx(Qc,{navOrientation:"horizontal"}),domains:Fc,branding:o.jsx(Jc,{blocklet:n,onUpdate:r}),theming:o.jsx(qc,{}),navigation:Gc,sitemap:o.jsx(Cs,{children:t("common.comingSoon")}),notifications:o.jsx(is,{blocklet:n,isAdmin:e}),"audit-logs":o.jsx(Wc,{scope:i,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(el,{client:s,did:a}),advanced:o.jsx(Yc,{blocklet:n,onUpdate:r}),webhooks:o.jsx(zc,{}),"access-keys":o.jsx(nl,{}),"mcp-servers":o.jsx(sl,{}),logs:Nc,performance:o.jsx(tl,{client:s,did:a}),docs:il,publish:o.jsx(Hc,{}),oauth:o.jsx(rl,{})};return{tabGroups:l,renders:u}};function ul(){var m,C;const e=Gn(),{tab:t="overview",subtab:n}=Fs(),{blocklet:r,refreshFlag:s}=ve(),{session:a}=Yn(),i=ge(()=>{var w;return(w=a==null?void 0:a.user)==null?void 0:w.did},[a]),c=To(),l=ge(()=>{var w;return((w=a.user)==null?void 0:w.role)&&ao.includes(a.user.role)},[a]);cl(i);const{tabGroups:u,renders:d}=ll(l),p=w=>{e(`${M.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${w}`)},f=(u[t]||[]).filter(w=>w.show===void 0||w.show),y=((m=(f||[]).find(w=>w.value===n))==null?void 0:m.value)||((C=f==null?void 0:f[0])==null?void 0:C.value)||t,g=d[y]||d.overview,h=["overview"].includes(t),S=r?o.jsxs($t,{type:"components",children:[f.length>0&&o.jsxs(_,{mb:2,display:"flex",alignItems:"center",gap:2,children:[o.jsx(_s,{tabs:f,current:y,onChange:p,scrollButtons:"auto"}),h&&!c&&o.jsx(_,{flex:1,display:"flex",justifyContent:"flex-end",children:o.jsx(_,{component:"div",className:"page-header",children:r?o.jsx(En,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:w}={})=>{w&&Z.error(w.message)},variant:"group"}):null})})]}),o.jsx(_,{className:"page-content",children:o.jsx(x.Suspense,{fallback:o.jsx(Je,{relative:"parent",children:o.jsx(re,{})}),children:x.isValidElement(g)?g:o.jsx(g,{blocklet:r})})})]}):o.jsx(Je,{relative:"parent",children:o.jsx(re,{})});return o.jsx(co,{children:o.jsx(Oc,{children:o.jsx(hn,{children:o.jsxs(fl,{children:[c&&h&&o.jsx(_,{component:"div",className:"page-header",mb:2,children:r?o.jsx(En,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:w}={})=>{w&&Z.error(w.message)},variant:"group"}):null}),o.jsx(dr,{}),o.jsx(Ac,{}),S]})},`${s}`)})})}function dl(){var r;const{blocklet:e}=ve(),{t}=Y(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const s=io();return n&&s.connect(),()=>{n&&s.isConnected()&&s.disconnect()}},[n]),o.jsxs(o.Fragment,{children:[o.jsx(vo,{children:o.jsx("title",{children:t("pageTitle.dashboard")})}),o.jsx(ul,{})]})}const fl=G.main`
198
- .page-header {
199
- display: flex;
200
- justify-content: space-between;
201
- align-items: center;
202
- flex-wrap: wrap;
203
- gap: 16px;
204
- }
205
-
206
- .page-title {
207
- display: flex;
208
- align-items: center;
209
-
210
- .page-link {
211
- font-size: 15px;
212
- margin-top: 8px;
213
- margin-left: 8px;
214
- }
215
- }
216
-
217
- @media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
218
- .page-header {
219
- flex-direction: column;
220
- align-items: flex-start;
221
- .page-actions,
222
- .MuiButtonGroup-root {
223
- width: 100%;
224
- }
225
- .MuiButtonGroup-root {
226
- .MuiButtonBase-root {
227
- flex: 1;
228
- }
229
- .blocklet-action-text {
230
- display: none;
231
- }
232
- }
233
- }
234
-
235
- .page-title {
236
- margin-bottom: 15px;
237
- }
238
- }
239
- `,Al=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"}));export{ss as B,mn as W,sr as a,ir as b,rr as c,Jr as d,cr as e,pe as f,Pl as g,Al as h,ts as p,Dl as u};
@@ -1,9 +0,0 @@
1
- import{j as o,aa as i,H as x,ah as k}from"./vendor-mui-core-wlbruq2I.js";import{k as b,f as B,am as w,d as I}from"./index-B18R5SlV.js";import{D as E,a as T,b as A}from"./domain-action-card-yyZstsWL.js";import{bb as L}from"./vendor-ux-did-connect-CX7qG3_M.js";import{P as W}from"./page-header-JH9JWGMg.js";import{r,h as H}from"./vendor-react-DEoibe3W.js";import{_}from"./useSetState-CWq0AVWn.js";import{S as D}from"./button-C0Vra3Ak.js";import{S as N}from"./layout-BnunMkuP.js";import{S as $}from"./step-actions-DLZOEVat.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-arcblock-B4hgrXYM.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./ExpandLess-Fb-uW6u_.js";import"./permission-B7ZHEOJv.js";import"./session-1k8BRnYA.js";import"./dot-DR7_m3Np.js";import"./useAsync-BMCqtJH2.js";import"./confirm-Bay3BcpN.js";import"./index-8eXqqyHQ.js";import"./actions-DtL6bYnA.js";import"./MoreHoriz-9E3q8aHi.js";import"./delete-confirm-B1F5wKdb.js";import"./click-to-copy-BUVqg1RQ.js";import"./util-xXGeezrD.js";import"./InfoOutlined-CLiL5VeK.js";import"./useAsync-CBEJDwr0.js";import"./index-BnR8uU0R.js";import"./CheckCircle-M9NlpTm_.js";import"./content-layout-DuPlKBe3.js";import"./use-mobile-CiFFAdJf.js";function d({onNext:s,onPrevious:S}){var h,f;const{t:n}=r.useContext(L),[j,p]=r.useState(!1),{blocklet:e}=b(),[c,y]=r.useState(""),P=(((e==null?void 0:e.site)||{}).domainAliases||[]).map(t=>B.replaceSlotToIp(t.value,c)),[a,m]=_({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),l=(f=(h=e.environments)==null?void 0:h.find(t=>t.key==="BLOCKLET_APP_PK"))==null?void 0:f.value,g=P.find(t=>w.isDidDomain(t)),[u,v]=H();return r.useEffect(()=>{I.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{y(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(z,{children:[o.jsx(i,{className:"header",children:o.jsx(W,{title:n("setup.domain.title"),subTitle:n("setup.domain.subTitle"),onClickBack:S})}),o.jsxs(i,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:`${n("setup.domain.buyOrConnect")} (${n("common.optional")})`})}),o.jsx(i,{mt:1,children:o.jsx(T,{blocklet:e,bugDidDomainProps:{appPk:l,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:l,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:g,currentIp:c,inBlockletSetup:!0,shouldCheckDomain:!0,onInputDomain:t=>{m({domain:t.domain,type:t.type}),p(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const C={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};u.set("redirect",t.domain),v(u,{replace:!0}),m(C),s()},onError:p}})})]}),o.jsx(i,{children:o.jsx(A,{inSetup:!0,showAllDomains:!0,systemTips:o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",mb:1,children:o.jsx(i,{display:"inline",children:n("setup.domain.skipDescription")})})})})]}),o.jsx($,{mt:8,disabled:!!a.addDomainState.text,blocklet:e,onStartNow:()=>s("complete"),children:a.domain?o.jsx(D,{variant:"contained",loading:!!a.addDomainState.text,disabled:j||!!a.addDomainState.text||!a.domain,onClick:()=>s(),children:a.addDomainState.text||n("setup.continue")}):o.jsx(D,{variant:"contained",disabled:!!a.addDomainState.text,onClick:()=>s(),children:n("setup.continue")})})]})}function yt(s){return o.jsx(E,{children:o.jsx(d,{...s})})}d.propTypes={onNext:x.func,onPrevious:x.func};d.defaultProps={onNext:()=>{},onPrevious:()=>{}};const z=k(N)`
2
- height: 100%;
3
- overflow-y: hidden;
4
-
5
- .form {
6
- width: 100%;
7
- height: 100%;
8
- }
9
- `;export{yt as default};
@@ -1 +0,0 @@
1
- import{r as m}from"./vendor-react-DEoibe3W.js";import{a as n}from"./vendor-ux-did-connect-CX7qG3_M.js";import{G as p,D as l,M as c,f as u}from"./index-B18R5SlV.js";import{a as x,b as d}from"./domain-action-card-yyZstsWL.js";import{j as t,aa as k,al as f,ak as D}from"./vendor-mui-core-wlbruq2I.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./ExpandLess-Fb-uW6u_.js";import"./permission-B7ZHEOJv.js";import"./session-1k8BRnYA.js";import"./dot-DR7_m3Np.js";import"./useAsync-BMCqtJH2.js";import"./confirm-Bay3BcpN.js";import"./index-8eXqqyHQ.js";import"./actions-DtL6bYnA.js";import"./MoreHoriz-9E3q8aHi.js";import"./delete-confirm-B1F5wKdb.js";import"./click-to-copy-BUVqg1RQ.js";import"./util-xXGeezrD.js";import"./useSetState-CWq0AVWn.js";import"./InfoOutlined-CLiL5VeK.js";import"./useAsync-CBEJDwr0.js";import"./index-BnR8uU0R.js";import"./CheckCircle-M9NlpTm_.js";function h(){const{blocklet:o,actions:{updateBlockletDomainAliases:s}}=p(),{inService:r}=l(),{t:e}=n(),a=m.useMemo(()=>{let i=!0;return c(o)&&(i=i&&r),i},[r,o]);return t.jsxs(k,{component:f,sx:{maxWidth:820},gap:3,children:[t.jsxs(t.Fragment,{children:[u.isAccessible(o.status)===!1&&t.jsx(D,{severity:"warning",children:e("blocklet.router.noRunning")}),a&&t.jsx(x,{blocklet:o,updateBlockletDomainAliases:s,connectDomainProps:{shouldCheckDomain:!0}})]}),t.jsx(d,{showAllDomains:!0,updateBlockletDomainAliases:s})]})}h.propTypes={};export{h as default};
@@ -1,7 +0,0 @@
1
- import{z as m}from"./vendor-hooks-BCm626KH.js";import{r as v}from"./vendor-react-DEoibe3W.js";import{r as y}from"./useAsync-BMCqtJH2.js";import{ah as p}from"./vendor-mui-core-wlbruq2I.js";var c={};Object.defineProperty(c,"__esModule",{value:!0});var e=m,i=v,b=e.__importDefault(y()),A=function(r,t){t===void 0&&(t=[]);var a=i.useState(0),l=a[0],_=a[1],s=b.default(r,e.__spreadArrays(t,[l])),o=s.loading,d=i.useCallback(function(){o||_(function(f){return f+1})},e.__spreadArrays(t,[o]));return e.__assign(e.__assign({},s),{retry:d})},D=c.default=A;const n={success:"#3ab39d",error:"#D0021B"},u="10px",k=p.div`
2
- display: inline-block;
3
- min-width: ${r=>r.size||u};
4
- min-height: ${r=>r.size||u};
5
- background-color: ${r=>n[r.color]||r.color||n.success};
6
- border-radius: 100%;
7
- `;export{k as D,D as _};