@abtnode/webapp 1.16.44-beta-20250516-225119-c0b5ec8d → 1.16.44-beta-20250520-004606-6cd8a0d3

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 (236) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Hu_1QWFw.js → AdapterDayjs-C79-iXnA.js} +6 -6
  4. package/dist/assets/{Add-B-whK8Og.js → Add-Dr17acvQ.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-D24TTMvH.js → ArrowDropDown-BeVQ7W_f.js} +1 -1
  6. package/dist/assets/{Autocomplete-CHlN80bM.js → Autocomplete-Dxuf1ndW.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-Do80FKEd.js → Breadcrumbs-m3ZWWS-Y.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BJpKQaa5.js → ButtonGroup-D8iCR_UA.js} +1 -1
  9. package/dist/assets/{CSSTransition-CL3Ps2jl.js → CSSTransition-DMBk20B6.js} +1 -1
  10. package/dist/assets/{CallMerge-6gNoogQf.js → CallMerge-CuhH8Rfn.js} +1 -1
  11. package/dist/assets/CardContent-BhT4vmBc.js +1 -0
  12. package/dist/assets/{ChevronLeft-DCgw7PVK.js → ChevronLeft-DRnsqgri.js} +1 -1
  13. package/dist/assets/{ChevronRight-BkDmz6Jp.js → ChevronRight-BUxNE2e8.js} +1 -1
  14. package/dist/assets/{Clear-CH1dCzcl.js → Clear-DiiXyvpY.js} +1 -1
  15. package/dist/assets/{Close-qBNbi4Ug.js → Close-Cx2b036Y.js} +1 -1
  16. package/dist/assets/{Community-C7i42E2Q.js → Community-DT6H5xHG.js} +1 -1
  17. package/dist/assets/{Delete-CgPI_eC5.js → Delete-Db12JNaW.js} +1 -1
  18. package/dist/assets/{Delete-DliA3mdg.js → Delete-DibgMbRa.js} +1 -1
  19. package/dist/assets/{DeleteOutline-Cx4fsGxu.js → DeleteOutline-vkCr-A0J.js} +1 -1
  20. package/dist/assets/{Done-DNcp5cRU.js → Done-CDp0yF_G.js} +1 -1
  21. package/dist/assets/{Edit-WMHj4INs.js → Edit-CQIAI4Xx.js} +1 -1
  22. package/dist/assets/{ErrorOutline-CBbwlMhr.js → ErrorOutline-DCAxmStN.js} +1 -1
  23. package/dist/assets/{HelpOutline-9IHMC0WQ.js → HelpOutline-4rllQwkH.js} +1 -1
  24. package/dist/assets/{Holiday-C8LY8_Xa.js → Holiday-Bhfc8ari.js} +1 -1
  25. package/dist/assets/{Launch-Dw-I3nnd.js → Launch-Dss7Qu-X.js} +1 -1
  26. package/dist/assets/{Link-e5N_7Dtu.js → Link-BL98xVyl.js} +1 -1
  27. package/dist/assets/{ListItemButton-glXjZswW.js → ListItemButton-CalO7fFj.js} +1 -1
  28. package/dist/assets/{ListSubheader-q3nAde5e.js → ListSubheader-CZoW0Yjm.js} +1 -1
  29. package/dist/assets/{LoadingButton-BXZL61GP.js → LoadingButton-C1tBqNRZ.js} +1 -1
  30. package/dist/assets/{LockIcon-BJD4BUmY.js → LockIcon-BIs3NFsi.js} +1 -1
  31. package/dist/assets/{Meeting-Bzs1L390.js → Meeting-DElinHPN.js} +1 -1
  32. package/dist/assets/{MoreHoriz-BPa-vzup.js → MoreHoriz-BamWxTeP.js} +1 -1
  33. package/dist/assets/{MoreVert-ygAE5zXH.js → MoreVert-BrdZPzwo.js} +1 -1
  34. package/dist/assets/{OffSick-CzZuC8-v.js → OffSick-PL_bKC4S.js} +1 -1
  35. package/dist/assets/{OpenInNew-BIkhjwqJ.js → OpenInNew-DXZU9TBc.js} +1 -1
  36. package/dist/assets/{Public-Dxdvvihr.js → Public-Dr1m2N7G.js} +1 -1
  37. package/dist/assets/{Refresh-9g5ukYUh.js → Refresh-VxrYYzfd.js} +1 -1
  38. package/dist/assets/{SchemaReference.es-rTtLb9nE.js → SchemaReference.es-Bm8CNcXG.js} +1 -1
  39. package/dist/assets/{Search-BWfKoeW0.js → Search-DqihVCic.js} +1 -1
  40. package/dist/assets/{Slider-X_Dbeb_B.js → Slider-B8HWvhga.js} +1 -1
  41. package/dist/assets/{Stepper-CAwK24YR.js → Stepper-BCrOaECo.js} +1 -1
  42. package/dist/assets/{Switch-B_ZA3R4H.js → Switch-CIGEpWB6.js} +1 -1
  43. package/dist/assets/{TableRow-LUYIbYYH.js → TableRow-DSBApqUZ.js} +1 -1
  44. package/dist/assets/{TableSearch-DryNoX9z.js → TableSearch-C3sQDzER.js} +1 -1
  45. package/dist/assets/{ToggleButtonGroup-vsVyuLtl.js → ToggleButtonGroup-2wE1N-s9.js} +1 -1
  46. package/dist/assets/{Verified-BDGlFDHV.js → Verified-DAT8F9n5.js} +1 -1
  47. package/dist/assets/{VerifiedUser-CahjDQlN.js → VerifiedUser-BzqFFroG.js} +1 -1
  48. package/dist/assets/{ViewColumn-Y-NBF0dy.js → ViewColumn-DZ8hNz9g.js} +1 -1
  49. package/dist/assets/{ViewList-Bd5d0iY_.js → ViewList-B52x_JLH.js} +1 -1
  50. package/dist/assets/{WorkingRemotely-9hVl1hvM.js → WorkingRemotely-Cr2dx3vw.js} +1 -1
  51. package/dist/assets/{_createAggregator-DLtLS5ot.js → _createAggregator-CtUq-Bm1.js} +1 -1
  52. package/dist/assets/{actions-BhwFbvNf.js → actions-CSIY5MjI.js} +1 -1
  53. package/dist/assets/{actions-CQrliwxs.js → actions-pkMFjLzT.js} +2 -2
  54. package/dist/assets/{agreement-DOCzlZYK.js → agreement-D5AaipUa.js} +5 -5
  55. package/dist/assets/api-CWQIMtn6.js +1 -0
  56. package/dist/assets/{appearance-Bj48z57w.js → appearance-Rsnizthu.js} +1 -1
  57. package/dist/assets/{ar-2yn9i2dw.js → ar-C_INBNFD.js} +1 -1
  58. package/dist/assets/{audit-logs-DZxZnVwe.js → audit-logs-DuYx96S8.js} +1 -1
  59. package/dist/assets/blocklet-Ca7hIY9r.js +1 -0
  60. package/dist/assets/{brace-fold.es-CwvOFnq9.js → brace-fold.es-BbuUT1bx.js} +1 -1
  61. package/dist/assets/{chain-DW6-BOPV.js → chain-lJbBI8lt.js} +2 -2
  62. package/dist/assets/{click-to-copy-NkGN8EyZ.js → click-to-copy-DunM7RYV.js} +1 -1
  63. package/dist/assets/cloneDeep-B7rgkTOg.js +1 -0
  64. package/dist/assets/{closebrackets.es-DrjVd75R.js → closebrackets.es-iBNy7XLq.js} +1 -1
  65. package/dist/assets/{codemirror.es-DQ3ePCqU.js → codemirror.es-olwlvV8O.js} +1 -1
  66. package/dist/assets/{collapse-FkL4URhV.js → collapse-pVfCVGsT.js} +1 -1
  67. package/dist/assets/{comment.es-DlV3kW-O.js → comment.es-CYuI6LGK.js} +1 -1
  68. package/dist/assets/{config-navigation-BijLYy-F.js → config-navigation-DCerXksA.js} +3 -3
  69. package/dist/assets/{connect-to-Vc7E5-UM.js → connect-to-PXHcA1x_.js} +1 -1
  70. package/dist/assets/{de-CEKbJD3-.js → de-EYXdEi3Y.js} +1 -1
  71. package/dist/assets/{delete-confirm-WhK8nGuj.js → delete-confirm-CKJM7oLk.js} +1 -1
  72. package/dist/assets/{detail-Df6H4ZPs.js → detail-Dg3I6B4n.js} +3 -3
  73. package/dist/assets/{dialog.es-xMJKI9Lh.js → dialog.es-D824_H5X.js} +1 -1
  74. package/dist/assets/domains-NOopC5Rf.js +28 -0
  75. package/dist/assets/{download-BLbVLPTB.js → download-B2axstvn.js} +1 -1
  76. package/dist/assets/emotion-react.browser.esm-CH67Z3jf.js +1 -0
  77. package/dist/assets/{es-dvMygD-W.js → es-3jqVamM8.js} +1 -1
  78. package/dist/assets/{foldgutter.es-B_-xDjtB.js → foldgutter.es-9QgJOpar.js} +1 -1
  79. package/dist/assets/{fr-BvFd5xp9.js → fr-CUcR-yNv.js} +1 -1
  80. package/dist/assets/{get-safe-url-BJSiqBsp.js → get-safe-url-BswgeNVU.js} +1 -1
  81. package/dist/assets/{get-safe-url-M6nGqKp3.js → get-safe-url-BwrYOF2l.js} +1 -1
  82. package/dist/assets/getValidReactChildren-2WQ5-6h6.js +1 -0
  83. package/dist/assets/hi-DNldhMTl.js +5 -0
  84. package/dist/assets/{hint.es-Du2uNLDf.js → hint.es-Bg3Bg91x.js} +1 -1
  85. package/dist/assets/{hint.es2-DfyQQrQH.js → hint.es2-CtVGSKy-.js} +1 -1
  86. package/dist/assets/{id-B1Mq_eQI.js → id-CmSIFhX-.js} +1 -1
  87. package/dist/assets/{iframe-uzgOIcHS.js → iframe-D8EuM9FZ.js} +1 -1
  88. package/dist/assets/{index-Bb_ZoBt1.js → index-1fHL4NLA.js} +1 -1
  89. package/dist/assets/{index-CED3Eqhn.js → index-3hUI0XWj.js} +1 -1
  90. package/dist/assets/{index-M-c0W-SQ.js → index-7AfdoVCB.js} +1 -1
  91. package/dist/assets/{index-2NLfrlha.js → index-9SxmA2ZK.js} +1 -1
  92. package/dist/assets/{index-YTaSOOwL.js → index-B1T9zVyF.js} +1 -1
  93. package/dist/assets/{index-DrUjokqV.js → index-BSVtXZA5.js} +1 -1
  94. package/dist/assets/{index-Bmtcygi9.js → index-Bd6-uEej.js} +4 -4
  95. package/dist/assets/{index-Ducl-yvK.js → index-BgfI9oqP.js} +4 -4
  96. package/dist/assets/{index-DANmjPqe.js → index-BmTru3ER.js} +1 -1
  97. package/dist/assets/{index-idlXfnJU.js → index-BsaFIq1a.js} +1 -1
  98. package/dist/assets/{index-DX3h3jsX.js → index-BwcQ-v7n.js} +1 -1
  99. package/dist/assets/index-C1AeyTeh.js +1 -0
  100. package/dist/assets/{index-BkYiBMUu.js → index-C3nC1vZU.js} +1 -1
  101. package/dist/assets/index-C4GlctnC.js +87 -0
  102. package/dist/assets/{index-DTI4BkNW.js → index-CGargw6n.js} +9 -9
  103. package/dist/assets/{index-DgMghQir.js → index-CL9Vrgs0.js} +1 -1
  104. package/dist/assets/{index-BACNAzdg.js → index-CMAKmzMc.js} +11 -11
  105. package/dist/assets/{index-ChGWeAoT.js → index-CMPNSvEP.js} +1 -1
  106. package/dist/assets/{index-CjFBhX6R.js → index-CR29WT8-.js} +1 -1
  107. package/dist/assets/{index-DutylRlW.js → index-CRLGpfQP.js} +1 -1
  108. package/dist/assets/index-CT5y3MWl.js +155 -0
  109. package/dist/assets/{index-DuODXdGq.js → index-CVvuXYj2.js} +3 -3
  110. package/dist/assets/{index-Bq85UHN2.js → index-Cnc4xzOD.js} +1 -1
  111. package/dist/assets/{index-CjBp95Te.js → index-CrtwGdrB.js} +1 -1
  112. package/dist/assets/{index-SqBYmqJv.js → index-D2Z-mQN5.js} +3 -3
  113. package/dist/assets/{index-DKUpJiTq.js → index-D9LzJ8Wk.js} +12 -12
  114. package/dist/assets/index-D9dQPWQL.js +1 -0
  115. package/dist/assets/{index-Bo-N9ZZS.js → index-DDhjA_J6.js} +1 -1
  116. package/dist/assets/{index-DQIKAMuC.js → index-DJo_NuyL.js} +1 -1
  117. package/dist/assets/{index-DqvSsunq.js → index-DO0xkQta.js} +17 -17
  118. package/dist/assets/{index-Api0RkD_.js → index-DQsQI7y-.js} +1 -1
  119. package/dist/assets/index-DYNPc0x8.js +109 -0
  120. package/dist/assets/{index-B8GS99Wr.js → index-DjuHtL5I.js} +1 -1
  121. package/dist/assets/{index-hJGrUWVV.js → index-Dl2gy2lk.js} +1 -1
  122. package/dist/assets/{index-yA3tM1jB.js → index-DmdIxVQV.js} +1 -1
  123. package/dist/assets/{index-DMDws1yA.js → index-EiK_j914.js} +1 -1
  124. package/dist/assets/{index-CgUGS_Zn.js → index-GsLKPFh7.js} +5 -5
  125. package/dist/assets/{index-DY0rnIvQ.js → index-JLvEb6lq.js} +1 -1
  126. package/dist/assets/{index-G6hKL35m.js → index-L99IjMpo.js} +1 -1
  127. package/dist/assets/{index-DU8P3lNm.js → index-MaZo-0IY.js} +1 -1
  128. package/dist/assets/{index-C4b651ZQ.js → index-NkYFHo4Q.js} +1 -1
  129. package/dist/assets/{index-BLUexfy_.js → index-QcWYn0US.js} +1 -1
  130. package/dist/assets/{index-RCmuyDMR.js → index-U1KqpW6O.js} +1 -1
  131. package/dist/assets/{index-u0GcnVeV.js → index-fFK_YyO8.js} +1 -1
  132. package/dist/assets/{index-3KlQvd1f.js → index-g4Pa9QCu.js} +2 -2
  133. package/dist/assets/{index-BVT-ixIa.js → index-k4OGecmF.js} +1 -1
  134. package/dist/assets/{index-Cax1rLeF.js → index-lHULqi5l.js} +1 -1
  135. package/dist/assets/{index-IWXwGVVh.js → index-n0V_zECF.js} +2 -2
  136. package/dist/assets/{index-CR2gE5g2.js → index-rlAZJLp4.js} +1 -1
  137. package/dist/assets/{index.esm-BhU35G9C.js → index.esm-CvOsHG0z.js} +1 -1
  138. package/dist/assets/{info-addon.es-CPzyoWb4.js → info-addon.es-Cx99Eu34.js} +1 -1
  139. package/dist/assets/{info.es-D5-UslFk.js → info.es-r6G7pvuv.js} +1 -1
  140. package/dist/assets/{install-from-url-CvqMMCKo.js → install-from-url-CAMFT77K.js} +1 -1
  141. package/dist/assets/{invitation-qA5bVm--.js → invitation-a75PydJz.js} +6 -6
  142. package/dist/assets/is-path-prefix-equal-tP_Em7g6.js +1 -0
  143. package/dist/assets/item-MkdTA7ZR.js +277 -0
  144. package/dist/assets/{ja-CCKVmbEX.js → ja-D-vAGmH7.js} +1 -1
  145. package/dist/assets/{javascript.es-Bi4XiziU.js → javascript.es-3UOa6hAX.js} +1 -1
  146. package/dist/assets/{jump-to-line.es-BEhBaQVE.js → jump-to-line.es-DtpaMTlX.js} +1 -1
  147. package/dist/assets/{jump.es-D_HGlVff.js → jump.es-DhxXT_Sj.js} +1 -1
  148. package/dist/assets/{ko-A_w8tIEg.js → ko-DpdamIdS.js} +1 -1
  149. package/dist/assets/{lint.es-DXIQDiFW.js → lint.es-CsD0hQVi.js} +1 -1
  150. package/dist/assets/{lint.es2-T86XSfSx.js → lint.es2-DU2epyfs.js} +1 -1
  151. package/dist/assets/{lint.es3-QrsCURAc.js → lint.es3-CtwrSwHH.js} +1 -1
  152. package/dist/assets/{list-header-DbzM_GZd.js → list-header-DLHqbQMu.js} +1 -1
  153. package/dist/assets/{log-D1woDO46.js → log-T4Gys8TD.js} +2 -2
  154. package/dist/assets/{lottie-react.esm-5SHHR4Kh.js → lottie-react.esm-DE7PZzmM.js} +1 -1
  155. package/dist/assets/{matchbrackets.es-DkhIDR9b.js → matchbrackets.es-Cbfo0kGw.js} +1 -1
  156. package/dist/assets/{memory-D1fug3gB.js → memory-DnziUg0a.js} +1 -1
  157. package/dist/assets/{metric-ChZoSNSx.js → metric-CXeJ1pVj.js} +1 -1
  158. package/dist/assets/{mode.es-C7vpO80y.js → mode.es-81u6K4KX.js} +1 -1
  159. package/dist/assets/{mode.es2-BxPP91JH.js → mode.es2-CKKLFqL3.js} +1 -1
  160. package/dist/assets/{mode.es3-D3euCiUs.js → mode.es3-Bv3GIpLP.js} +1 -1
  161. package/dist/assets/omit-BS9HjQsW.js +1 -0
  162. package/dist/assets/{onlineParser.es-Dv3ojmYM.js → onlineParser.es-Dao3EmVs.js} +1 -1
  163. package/dist/assets/overview-CINcLtup.js +13 -0
  164. package/dist/assets/{permission-CIEFWkaR.js → permission-BY_usLPC.js} +1 -1
  165. package/dist/assets/{preference-CGZrxant.js → preference-CquEhb-_.js} +4 -4
  166. package/dist/assets/pt-CEcOQeEC.js +5 -0
  167. package/dist/assets/{raf-schd.esm-D2YdSSsT.js → raf-schd.esm-Ivpfp78X.js} +1 -1
  168. package/dist/assets/refType-CSs4l3lt.js +1 -0
  169. package/dist/assets/{resource-dialog-BUsD19Cy.js → resource-dialog-sYzuZVwE.js} +4 -4
  170. package/dist/assets/ru-83xhwzPD.js +5 -0
  171. package/dist/assets/{runtime-DmliCtHn.js → runtime-By4tJgnP.js} +1 -1
  172. package/dist/assets/{schema-Dcd_4PT9.js → schema-CIVGWbJp.js} +1 -1
  173. package/dist/assets/sdk-dj0ARauA.js +1 -0
  174. package/dist/assets/{search.es-Dq2R-yp_.js → search.es-BoSdwsl_.js} +1 -1
  175. package/dist/assets/{searchcursor.es-sSprtinS.js → searchcursor.es-CbyR05zG.js} +1 -1
  176. package/dist/assets/{service-CRQQROx3.js → service-mHOJi74L.js} +1 -1
  177. package/dist/assets/{shorten-label-C03p-pfG.js → shorten-label-Cx9WVX2w.js} +1 -1
  178. package/dist/assets/{show-hint.es-DT0uCiTE.js → show-hint.es-BBwAXg-d.js} +1 -1
  179. package/dist/assets/{simple-select-9Y5bam0M.js → simple-select-D8ZhRe5q.js} +1 -1
  180. package/dist/assets/{spaces-C11TOrvj.js → spaces-Cg3ymUIh.js} +1 -1
  181. package/dist/assets/{status-D0j9AxRu.js → status-D68KxBTS.js} +1 -1
  182. package/dist/assets/{status-D-H-SlzG.js → status-DdweCl-L.js} +1 -1
  183. package/dist/assets/{sublime.es-Dlq8qSkc.js → sublime.es-J03GHmnf.js} +1 -1
  184. package/dist/assets/{switch-control-CIiFijrf.js → switch-control-DSz3cmNm.js} +1 -1
  185. package/dist/assets/{table-icons-BviR-2XS.js → table-icons-CHCR_r_-.js} +1 -1
  186. package/dist/assets/{table-tips-D63O0ZjI.js → table-tips-CFO-Ys9P.js} +1 -1
  187. package/dist/assets/team-DeJfgyE0.js +1 -0
  188. package/dist/assets/th-BQLlyW1N.js +5 -0
  189. package/dist/assets/{toLower-BPzu2rPJ.js → toLower-CRFOnVAM.js} +1 -1
  190. package/dist/assets/toUpper-wDnuTnwH.js +1 -0
  191. package/dist/assets/{traffic-DMf28Jqy.js → traffic-CILl5dnV.js} +2 -2
  192. package/dist/assets/{url-evaluation-CiS0m0gE.js → url-evaluation-Cjrq8Y2H.js} +1 -1
  193. package/dist/assets/{url-join-CwE3EUnC.js → url-join-Mz1JcbbA.js} +1 -1
  194. package/dist/assets/{use-mobile-B6rWKjo_.js → use-mobile-CpVsXFoV.js} +1 -1
  195. package/dist/assets/{use-mobile-DQ4xY9vN.js → use-mobile-DK73qoH8.js} +1 -1
  196. package/dist/assets/{useAsync-BwpiQkh2.js → useAsync-BCZg9cpL.js} +1 -1
  197. package/dist/assets/useAsyncRetry-DBtDInVv.js +1 -0
  198. package/dist/assets/{useLocalStorage-yyXOU8sf.js → useLocalStorage-1IK8Xf3D.js} +1 -1
  199. package/dist/assets/{useThemeProps-DA06OkGc.js → useThemeProps-Btw9Aun5.js} +1 -1
  200. package/dist/assets/{util-DIcvOfJ0.js → util-ks9_6DYA.js} +1 -1
  201. package/dist/assets/vi-DgWAr6FA.js +5 -0
  202. package/dist/assets/{wait-container-DB7Fvl8u.js → wait-container-B7LdKBV0.js} +3 -3
  203. package/dist/assets/withStyles-DWVK59by.js +1 -0
  204. package/dist/assets/wrap-locale-DoH7AJX_.js +1 -0
  205. package/dist/assets/{zh-Cti0XXui.js → zh-BL80PoOh.js} +2 -2
  206. package/dist/assets/{zh-tw-BLcDG99i.js → zh-tw-Dg5z1DFE.js} +1 -1
  207. package/dist/index.html +1 -1
  208. package/dist/service-worker.js +1 -1
  209. package/package.json +1 -1
  210. package/dist/assets/CardContent-_VxRx6xT.js +0 -1
  211. package/dist/assets/api-B2krrsTm.js +0 -1
  212. package/dist/assets/blocklet-DMuA5PdQ.js +0 -1
  213. package/dist/assets/cloneDeep-B1r2JtFj.js +0 -1
  214. package/dist/assets/domains-BLjPj3AW.js +0 -28
  215. package/dist/assets/emotion-react.browser.esm-BPIpPz3P.js +0 -1
  216. package/dist/assets/getValidReactChildren-rb5pggFM.js +0 -1
  217. package/dist/assets/hi-C51yBXa5.js +0 -5
  218. package/dist/assets/index-B59U_Lup.js +0 -155
  219. package/dist/assets/index-BENdKQR9.js +0 -87
  220. package/dist/assets/index-C2b2CJyH.js +0 -1
  221. package/dist/assets/index-D40SuWQU.js +0 -109
  222. package/dist/assets/index-yQhfY-D-.js +0 -1
  223. package/dist/assets/is-path-prefix-equal-CP-xgvsY.js +0 -1
  224. package/dist/assets/item-6mCxa8bi.js +0 -277
  225. package/dist/assets/omit-CaeWYRyw.js +0 -1
  226. package/dist/assets/overview-Dha81GsQ.js +0 -13
  227. package/dist/assets/pt-7HHecjdA.js +0 -5
  228. package/dist/assets/refType-BtU4sc8V.js +0 -1
  229. package/dist/assets/ru-Bw8FVC4M.js +0 -5
  230. package/dist/assets/sdk-Bg9zUQQV.js +0 -1
  231. package/dist/assets/team-Bt5GsvTe.js +0 -1
  232. package/dist/assets/th-DyW-mYrC.js +0 -5
  233. package/dist/assets/toUpper-Bk6xSBue.js +0 -1
  234. package/dist/assets/vi-bzer6J4H.js +0 -5
  235. package/dist/assets/withStyles-CPbSyJRI.js +0 -1
  236. package/dist/assets/wrap-locale-CYxNfqSO.js +0 -1
@@ -1,4 +1,4 @@
1
- import{u as _,j as t,L as Y,P as f,r as c,e as $,i as M,K as i,k,d as Q,Y as X,C as ee,m as te,H as v,a as p,A as w,b,dc as re,J as ne,bz as se,aG as oe,dd as ie,G as C,y as V,p as ae,l as me,x as le,bo as ce,n as ue}from"./index-DTI4BkNW.js";import{T as de}from"./index-Bo-N9ZZS.js";import{T as pe,I as fe}from"./traffic-DMf28Jqy.js";import{D as ge}from"./index-G6hKL35m.js";import{x as D}from"./index-BJHGOv7L.js";import{C as he,M as S}from"./memory-D1fug3gB.js";import{w as ye}from"./withStyles-CPbSyJRI.js";import{_ as xe}from"./useLocalStorage-yyXOU8sf.js";import{T as ve,a as Ce}from"./ToggleButtonGroup-vsVyuLtl.js";import"./iframe-uzgOIcHS.js";import"./ChevronLeft-DCgw7PVK.js";import"./ChevronRight-BkDmz6Jp.js";import"./index-idlXfnJU.js";import"./CardContent-_VxRx6xT.js";import"./AdapterDayjs-Hu_1QWFw.js";import"./useThemeProps-DA06OkGc.js";import"./CSSTransition-CL3Ps2jl.js";import"./refType-BtU4sc8V.js";import"./TableRow-LUYIbYYH.js";import"./emotion-react.browser.esm-BPIpPz3P.js";import"./ViewColumn-Y-NBF0dy.js";import"./Search-BWfKoeW0.js";import"./Clear-CH1dCzcl.js";import"./Delete-DliA3mdg.js";import"./index-3KlQvd1f.js";import"./MoreVert-ygAE5zXH.js";import"./TableSearch-DryNoX9z.js";import"./index-DQIKAMuC.js";import"./getValidReactChildren-rb5pggFM.js";function je(){const{api:s,info:o}=_();return t.jsx(pe,{client:s,did:o.did})}var L=function(s){return t.jsxs("svg",{...s,children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.08295 3.2C2.08295 2.58144 2.58439 2.08 3.20295 2.08H28.8029C29.4215 2.08 29.9229 2.58144 29.9229 3.2V13.44C29.9229 14.0586 29.4215 14.56 28.8029 14.56H3.20295C2.58439 14.56 2.08295 14.0586 2.08295 13.44V3.2ZM4.32295 4.32V12.32H27.6829V4.32H4.32295ZM2.08295 18.56C2.08295 17.9414 2.58439 17.44 3.20295 17.44H28.8029C29.4215 17.44 29.9229 17.9414 29.9229 18.56V28.8C29.9229 29.4186 29.4215 29.92 28.8029 29.92H3.20295C2.58439 29.92 2.08295 29.4186 2.08295 28.8V18.56ZM4.32295 19.68V27.68H27.6829V19.68H4.32295Z",fill:"currentColor"}),t.jsx("path",{d:"M8.96297 7.04001H7.68297C7.51323 7.04001 7.35044 7.10744 7.23042 7.22746C7.1104 7.34748 7.04297 7.51027 7.04297 7.68001V8.96001C7.04297 9.12975 7.1104 9.29253 7.23042 9.41256C7.35044 9.53258 7.51323 9.60001 7.68297 9.60001H8.96297C9.13271 9.60001 9.29549 9.53258 9.41552 9.41256C9.53554 9.29253 9.60297 9.12975 9.60297 8.96001V7.68001C9.60297 7.51027 9.53554 7.34748 9.41552 7.22746C9.29549 7.10744 9.13271 7.04001 8.96297 7.04001ZM8.96297 22.4H7.68297C7.51323 22.4 7.35044 22.4674 7.23042 22.5875C7.1104 22.7075 7.04297 22.8703 7.04297 23.04V24.32C7.04297 24.4897 7.1104 24.6525 7.23042 24.7726C7.35044 24.8926 7.51323 24.96 7.68297 24.96H8.96297C9.13271 24.96 9.29549 24.8926 9.41552 24.7726C9.53554 24.6525 9.60297 24.4897 9.60297 24.32V23.04C9.60297 22.8703 9.53554 22.7075 9.41552 22.5875C9.29549 22.4674 9.13271 22.4 8.96297 22.4ZM14.083 7.04001H12.803C12.6332 7.04001 12.4704 7.10744 12.3504 7.22746C12.2304 7.34748 12.163 7.51027 12.163 7.68001V8.96001C12.163 9.12975 12.2304 9.29253 12.3504 9.41256C12.4704 9.53258 12.6332 9.60001 12.803 9.60001H14.083C14.2527 9.60001 14.4155 9.53258 14.5355 9.41256C14.6555 9.29253 14.723 9.12975 14.723 8.96001V7.68001C14.723 7.51027 14.6555 7.34748 14.5355 7.22746C14.4155 7.10744 14.2527 7.04001 14.083 7.04001ZM14.083 22.4H12.803C12.6332 22.4 12.4704 22.4674 12.3504 22.5875C12.2304 22.7075 12.163 22.8703 12.163 23.04V24.32C12.163 24.4897 12.2304 24.6525 12.3504 24.7726C12.4704 24.8926 12.6332 24.96 12.803 24.96H14.083C14.2527 24.96 14.4155 24.8926 14.5355 24.7726C14.6555 24.6525 14.723 24.4897 14.723 24.32V23.04C14.723 22.8703 14.6555 22.7075 14.5355 22.5875C14.4155 22.4674 14.2527 22.4 14.083 22.4Z",fill:"currentColor"})]})};L.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};L.displayName="server";const Ie=ye(s=>({root:{height:10},colorPrimary:{backgroundColor:s.palette.grey[s.palette.mode==="light"?200:700]},bar:{backgroundColor:s.palette.secondary.main}}))(Y);function z(s){const{value:o}=s;return t.jsxs(i,{display:"flex",alignItems:"center",mt:2,children:[t.jsx(i,{width:"100%",style:{overflow:"hidden"},mr:1,children:t.jsx(Ie,{variant:"determinate",...s})}),t.jsx(i,{minWidth:35,children:t.jsx(k,{variant:"body2",color:"textSecondary",children:`${Math.round(o)}%`})})]})}z.propTypes={value:f.number.isRequired};function T({disk:s}){const{t:o}=c.useContext($),u=[{id:1,className:"used",title:o("system.used"),metric:M(s.used)},{id:2,className:"free",title:o("system.free"),metric:M(s.free)},{id:3,className:"total",title:o("system.total"),metric:M(s.total)}];return t.jsx(fe,{title:`${o("common.disk")} (${s.device})`,value:M(s.used),graph:t.jsx(i,{mt:3,children:t.jsx(z,{value:s.used/s.total*100})}),description:u.map((l,g)=>t.jsxs(i,{sx:{marginLeft:g===0?0:2},children:[l.title,": ",l.metric]},l.title))})}T.propTypes={disk:f.shape({used:f.number,free:f.number,total:f.number,device:f.string})};T.defaultProps={disk:{used:0,free:0,total:1,device:""}};const P={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function A({initialBlocklets:s}){var R;const{t:o,locale:u}=te(),{api:l,info:g}=_(),[h,j]=xe("runtime-view-interval",6),[y,Z]=c.useState(null),[d,I]=c.useState([]),N=c.useCallback(e=>{Z(e)},[]);c.useEffect(()=>{const e=[];e.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:P}),e.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:P}),s.forEach(r=>{v.forEachBlockletSync(r,(n,{id:a,ancestors:m})=>{n.runtimeInfo&&e.push({type:"blocklet",groupId:r.meta.did,groupName:v.getDisplayName(r),id:a,name:v.getDisplayName(n,!0),blocklet:r,component:n,runtimeInfo:n.runtimeInfo,ancestors:m})})}),I(e)},[!!((R=s==null?void 0:s[0])!=null&&R.appRuntimeInfo)]);const[x,F]=c.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[H,O]=c.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});p(w.EVENTS.NODE_RUNTIME_INFO,e=>{e.mem.total=e.mem.total||0,e.mem.used=e.mem.total-(e.mem.available||0),F(e),I(r=>r.map(n=>n.id==="server:daemon"?{...n,runtimeInfo:{...n.runtimeInfo,...e.daemon}}:n.id==="server:service"?{...n,runtimeInfo:{...n.runtimeInfo,...e.service}}:n))}),p(w.EVENTS.BLOCKLETS_RUNTIME_INFO,e=>{if(!e||!e.length){console.error("incorrect blocklets runtime info format",e);return}I(r=>r.map(n=>{const a=e.find(m=>m.componentId===n.id);return a?{...n,runtimeInfo:{...n.runtimeInfo,...a.runtimeInfo}}:n}))});const E=e=>{I(r=>r.filter(n=>n.groupId!==e.meta.did))},B=async e=>{try{const{blocklet:r}=await l.getBlocklet({input:{did:e.meta.did,attachRuntimeInfo:!0}});r.status!=="running"&&E(r),I(n=>{const a=n.filter(m=>m.groupId!==r.meta.did);return v.forEachBlockletSync(r,(m,{id:K,ancestors:J})=>{m.runtimeInfo&&a.push({type:"blocklet",groupId:r.meta.did,groupName:v.getDisplayName(r),id:K,name:v.getDisplayName(m,!0),blocklet:r,component:m,runtimeInfo:m.runtimeInfo,ancestors:J})}),a})}catch(r){V.error(r.message)}};p(b.BlockletEvents.removed,E),p(b.BlockletEvents.startFailed,E),p(b.BlockletEvents.statusChange,e=>{if(e.status!=="running"){E(e);return}B(e)}),p(b.BlockletEvents.updated,B),p(b.BlockletEvents.started,B);const G=()=>{l.getNodeRuntimeHistory({input:{hours:h}}).then(e=>{const r=e.history||[];O({cpu:r.map(n=>({date:n.date,value:n.cpu})),mem:r.map(n=>({date:n.date,value:n.mem})),daemonMem:r.map(n=>({date:n.date,value:n.daemonMem})),serviceMem:r.map(n=>({date:n.date,value:n.serviceMem}))})}).catch(e=>{V.error(e.message)})};c.useEffect(()=>{G()},[h]);const W=e=>ae(Number(e||0),{locale:me(u)}),q=[{label:o("common.group"),name:"groupName",options:{customBodyRenderLite(e){const{type:r,blocklet:n,groupName:a}=d[e];return r==="server"?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(re,{width:"14",height:"14"}),t.jsx(i,{ml:1,children:a})]}):t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(ne,{size:14,blocklet:n}),t.jsx(i,{ml:1,children:a})]})}}},{label:o("common.name"),name:"name",options:{customBodyRenderLite(e){const{type:r,name:n,component:a,ancestors:m}=d[e];return r==="server"?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(L,{width:"14",height:"14"}),t.jsx(i,{ml:1,children:n})]}):t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(se,{size:14,blocklet:a,ancestors:m}),t.jsx(i,{ml:1,children:n})]})}}},{label:o("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return W(r.uptime)}}},{label:o("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return M((r==null?void 0:r.memoryUsage)||0)},sortDirection:"asc"}},{label:o("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return`${(r.cpuUsage||0).toFixed(1)}%`}}},{label:o("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return r!=null&&r.uptime?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(oe,{icon:r!=null&&r.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),t.jsx(i,{ml:1,children:r!=null&&r.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:o("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:o("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return t.jsxs("div",{children:[t.jsxs(i,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[t.jsx(k,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:o("analytics.trend")}),t.jsx(ve,{size:"small",exclusive:!0,value:h,onChange:(e,r)=>{ie(r)&&j(r)},children:[1,3,6,12,24].map(e=>t.jsxs(Ce,{value:e,children:[e,"H"]},e))})]}),t.jsxs(C,{mb:4,container:!0,spacing:4,children:[t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(he,{...x.cpu,history:H.cpu,onHover:N,hoverIndex:y})},"cpu"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{...x.mem,history:H.mem,onHover:N,hoverIndex:y})},"memory"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{title:`Daemon ${o("common.memory")}`,total:D.parseSize(`${g.runtimeConfig.daemonMaxMemoryLimit}MiB`),used:x.daemon.memoryUsage||0,history:H.daemonMem,onHover:N,hoverIndex:y})},"memory-daemon"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{title:`Service ${o("common.memory")}`,total:D.parseSize(`${g.runtimeConfig.proxyMaxMemoryLimit}MiB`),instanceCount:x.service.instanceCount||0,used:x.service.memoryUsage||0,history:H.serviceMem,onHover:N,hoverIndex:y})},"memory-service"),x.disks.map(e=>t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(T,{disk:e})},e.device||"disk"))]}),t.jsx(ge,{className:"runtime-insight-list",title:o("analytics.detail"),locale:u,data:d,columns:q,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}A.propTypes={initialBlocklets:f.array.isRequired};function be(){const{data:s,externalData:o,initialized:u}=Q();if(!u)return t.jsx(X,{relative:"parent",children:t.jsx(ee,{})});const l=[...s,...o];return t.jsx(A,{initialBlocklets:l})}function et(){const s=le(),{t:o}=c.useContext($),{tab:u="traffic"}=ce(),l=y=>{s(`/analytics/${y}`)},g=[{label:o("common.traffic"),value:"traffic"},{label:o("common.runtime"),value:"runtime"}],h={traffic:je,runtime:be},j=h[u]||h.traffic;return t.jsxs(Me,{children:[t.jsx(k,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:o("common.analytics")}),t.jsx(de,{tabs:g,current:u,onChange:l}),t.jsx("div",{className:"page-content",children:c.isValidElement(j)?j:t.jsx(j,{})})]})}const Me=ue.main`
1
+ import{u as _,j as t,L as Y,P as f,r as c,e as $,i as M,K as i,k,d as Q,Y as X,C as ee,m as te,H as v,a as p,A as w,b,dd as re,J as ne,bx as se,aG as oe,de as ie,G as C,y as V,p as ae,l as me,x as le,bo as ce,n as ue}from"./index-CGargw6n.js";import{T as de}from"./index-DDhjA_J6.js";import{T as pe,I as fe}from"./traffic-CILl5dnV.js";import{D as ge}from"./index-L99IjMpo.js";import{x as D}from"./index-BJHGOv7L.js";import{C as he,M as S}from"./memory-DnziUg0a.js";import{w as ye}from"./withStyles-DWVK59by.js";import{_ as xe}from"./useLocalStorage-1IK8Xf3D.js";import{T as ve,a as Ce}from"./ToggleButtonGroup-2wE1N-s9.js";import"./iframe-D8EuM9FZ.js";import"./ChevronLeft-DRnsqgri.js";import"./ChevronRight-BUxNE2e8.js";import"./index-BsaFIq1a.js";import"./CardContent-BhT4vmBc.js";import"./AdapterDayjs-C79-iXnA.js";import"./useThemeProps-Btw9Aun5.js";import"./CSSTransition-DMBk20B6.js";import"./refType-CSs4l3lt.js";import"./TableRow-DSBApqUZ.js";import"./emotion-react.browser.esm-CH67Z3jf.js";import"./ViewColumn-DZ8hNz9g.js";import"./Search-DqihVCic.js";import"./Clear-DiiXyvpY.js";import"./Delete-DibgMbRa.js";import"./index-g4Pa9QCu.js";import"./MoreVert-BrdZPzwo.js";import"./TableSearch-C3sQDzER.js";import"./index-DJo_NuyL.js";import"./getValidReactChildren-2WQ5-6h6.js";function je(){const{api:s,info:o}=_();return t.jsx(pe,{client:s,did:o.did})}var L=function(s){return t.jsxs("svg",{...s,children:[t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.08295 3.2C2.08295 2.58144 2.58439 2.08 3.20295 2.08H28.8029C29.4215 2.08 29.9229 2.58144 29.9229 3.2V13.44C29.9229 14.0586 29.4215 14.56 28.8029 14.56H3.20295C2.58439 14.56 2.08295 14.0586 2.08295 13.44V3.2ZM4.32295 4.32V12.32H27.6829V4.32H4.32295ZM2.08295 18.56C2.08295 17.9414 2.58439 17.44 3.20295 17.44H28.8029C29.4215 17.44 29.9229 17.9414 29.9229 18.56V28.8C29.9229 29.4186 29.4215 29.92 28.8029 29.92H3.20295C2.58439 29.92 2.08295 29.4186 2.08295 28.8V18.56ZM4.32295 19.68V27.68H27.6829V19.68H4.32295Z",fill:"currentColor"}),t.jsx("path",{d:"M8.96297 7.04001H7.68297C7.51323 7.04001 7.35044 7.10744 7.23042 7.22746C7.1104 7.34748 7.04297 7.51027 7.04297 7.68001V8.96001C7.04297 9.12975 7.1104 9.29253 7.23042 9.41256C7.35044 9.53258 7.51323 9.60001 7.68297 9.60001H8.96297C9.13271 9.60001 9.29549 9.53258 9.41552 9.41256C9.53554 9.29253 9.60297 9.12975 9.60297 8.96001V7.68001C9.60297 7.51027 9.53554 7.34748 9.41552 7.22746C9.29549 7.10744 9.13271 7.04001 8.96297 7.04001ZM8.96297 22.4H7.68297C7.51323 22.4 7.35044 22.4674 7.23042 22.5875C7.1104 22.7075 7.04297 22.8703 7.04297 23.04V24.32C7.04297 24.4897 7.1104 24.6525 7.23042 24.7726C7.35044 24.8926 7.51323 24.96 7.68297 24.96H8.96297C9.13271 24.96 9.29549 24.8926 9.41552 24.7726C9.53554 24.6525 9.60297 24.4897 9.60297 24.32V23.04C9.60297 22.8703 9.53554 22.7075 9.41552 22.5875C9.29549 22.4674 9.13271 22.4 8.96297 22.4ZM14.083 7.04001H12.803C12.6332 7.04001 12.4704 7.10744 12.3504 7.22746C12.2304 7.34748 12.163 7.51027 12.163 7.68001V8.96001C12.163 9.12975 12.2304 9.29253 12.3504 9.41256C12.4704 9.53258 12.6332 9.60001 12.803 9.60001H14.083C14.2527 9.60001 14.4155 9.53258 14.5355 9.41256C14.6555 9.29253 14.723 9.12975 14.723 8.96001V7.68001C14.723 7.51027 14.6555 7.34748 14.5355 7.22746C14.4155 7.10744 14.2527 7.04001 14.083 7.04001ZM14.083 22.4H12.803C12.6332 22.4 12.4704 22.4674 12.3504 22.5875C12.2304 22.7075 12.163 22.8703 12.163 23.04V24.32C12.163 24.4897 12.2304 24.6525 12.3504 24.7726C12.4704 24.8926 12.6332 24.96 12.803 24.96H14.083C14.2527 24.96 14.4155 24.8926 14.5355 24.7726C14.6555 24.6525 14.723 24.4897 14.723 24.32V23.04C14.723 22.8703 14.6555 22.7075 14.5355 22.5875C14.4155 22.4674 14.2527 22.4 14.083 22.4Z",fill:"currentColor"})]})};L.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};L.displayName="server";const Ie=ye(s=>({root:{height:10},colorPrimary:{backgroundColor:s.palette.grey[s.palette.mode==="light"?200:700]},bar:{backgroundColor:s.palette.secondary.main}}))(Y);function z(s){const{value:o}=s;return t.jsxs(i,{display:"flex",alignItems:"center",mt:2,children:[t.jsx(i,{width:"100%",style:{overflow:"hidden"},mr:1,children:t.jsx(Ie,{variant:"determinate",...s})}),t.jsx(i,{minWidth:35,children:t.jsx(k,{variant:"body2",color:"textSecondary",children:`${Math.round(o)}%`})})]})}z.propTypes={value:f.number.isRequired};function T({disk:s}){const{t:o}=c.useContext($),u=[{id:1,className:"used",title:o("system.used"),metric:M(s.used)},{id:2,className:"free",title:o("system.free"),metric:M(s.free)},{id:3,className:"total",title:o("system.total"),metric:M(s.total)}];return t.jsx(fe,{title:`${o("common.disk")} (${s.device})`,value:M(s.used),graph:t.jsx(i,{mt:3,children:t.jsx(z,{value:s.used/s.total*100})}),description:u.map((l,g)=>t.jsxs(i,{sx:{marginLeft:g===0?0:2},children:[l.title,": ",l.metric]},l.title))})}T.propTypes={disk:f.shape({used:f.number,free:f.number,total:f.number,device:f.string})};T.defaultProps={disk:{used:0,free:0,total:1,device:""}};const P={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function A({initialBlocklets:s}){var R;const{t:o,locale:u}=te(),{api:l,info:g}=_(),[h,j]=xe("runtime-view-interval",6),[y,Z]=c.useState(null),[d,I]=c.useState([]),N=c.useCallback(e=>{Z(e)},[]);c.useEffect(()=>{const e=[];e.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:P}),e.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:P}),s.forEach(r=>{v.forEachBlockletSync(r,(n,{id:a,ancestors:m})=>{n.runtimeInfo&&e.push({type:"blocklet",groupId:r.meta.did,groupName:v.getDisplayName(r),id:a,name:v.getDisplayName(n,!0),blocklet:r,component:n,runtimeInfo:n.runtimeInfo,ancestors:m})})}),I(e)},[!!((R=s==null?void 0:s[0])!=null&&R.appRuntimeInfo)]);const[x,F]=c.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[H,O]=c.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});p(w.EVENTS.NODE_RUNTIME_INFO,e=>{e.mem.total=e.mem.total||0,e.mem.used=e.mem.total-(e.mem.available||0),F(e),I(r=>r.map(n=>n.id==="server:daemon"?{...n,runtimeInfo:{...n.runtimeInfo,...e.daemon}}:n.id==="server:service"?{...n,runtimeInfo:{...n.runtimeInfo,...e.service}}:n))}),p(w.EVENTS.BLOCKLETS_RUNTIME_INFO,e=>{if(!e||!e.length){console.error("incorrect blocklets runtime info format",e);return}I(r=>r.map(n=>{const a=e.find(m=>m.componentId===n.id);return a?{...n,runtimeInfo:{...n.runtimeInfo,...a.runtimeInfo}}:n}))});const E=e=>{I(r=>r.filter(n=>n.groupId!==e.meta.did))},B=async e=>{try{const{blocklet:r}=await l.getBlocklet({input:{did:e.meta.did,attachRuntimeInfo:!0}});r.status!=="running"&&E(r),I(n=>{const a=n.filter(m=>m.groupId!==r.meta.did);return v.forEachBlockletSync(r,(m,{id:K,ancestors:J})=>{m.runtimeInfo&&a.push({type:"blocklet",groupId:r.meta.did,groupName:v.getDisplayName(r),id:K,name:v.getDisplayName(m,!0),blocklet:r,component:m,runtimeInfo:m.runtimeInfo,ancestors:J})}),a})}catch(r){V.error(r.message)}};p(b.BlockletEvents.removed,E),p(b.BlockletEvents.startFailed,E),p(b.BlockletEvents.statusChange,e=>{if(e.status!=="running"){E(e);return}B(e)}),p(b.BlockletEvents.updated,B),p(b.BlockletEvents.started,B);const G=()=>{l.getNodeRuntimeHistory({input:{hours:h}}).then(e=>{const r=e.history||[];O({cpu:r.map(n=>({date:n.date,value:n.cpu})),mem:r.map(n=>({date:n.date,value:n.mem})),daemonMem:r.map(n=>({date:n.date,value:n.daemonMem})),serviceMem:r.map(n=>({date:n.date,value:n.serviceMem}))})}).catch(e=>{V.error(e.message)})};c.useEffect(()=>{G()},[h]);const W=e=>ae(Number(e||0),{locale:me(u)}),q=[{label:o("common.group"),name:"groupName",options:{customBodyRenderLite(e){const{type:r,blocklet:n,groupName:a}=d[e];return r==="server"?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(re,{width:"14",height:"14"}),t.jsx(i,{ml:1,children:a})]}):t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(ne,{size:14,blocklet:n}),t.jsx(i,{ml:1,children:a})]})}}},{label:o("common.name"),name:"name",options:{customBodyRenderLite(e){const{type:r,name:n,component:a,ancestors:m}=d[e];return r==="server"?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(L,{width:"14",height:"14"}),t.jsx(i,{ml:1,children:n})]}):t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(se,{size:14,blocklet:a,ancestors:m}),t.jsx(i,{ml:1,children:n})]})}}},{label:o("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return W(r.uptime)}}},{label:o("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return M((r==null?void 0:r.memoryUsage)||0)},sortDirection:"asc"}},{label:o("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return`${(r.cpuUsage||0).toFixed(1)}%`}}},{label:o("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(e){const{runtimeInfo:r}=d[e];return r!=null&&r.uptime?t.jsxs(i,{display:"flex",alignItems:"center",children:[t.jsx(oe,{icon:r!=null&&r.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),t.jsx(i,{ml:1,children:r!=null&&r.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:o("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:o("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return t.jsxs("div",{children:[t.jsxs(i,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[t.jsx(k,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:o("analytics.trend")}),t.jsx(ve,{size:"small",exclusive:!0,value:h,onChange:(e,r)=>{ie(r)&&j(r)},children:[1,3,6,12,24].map(e=>t.jsxs(Ce,{value:e,children:[e,"H"]},e))})]}),t.jsxs(C,{mb:4,container:!0,spacing:4,children:[t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(he,{...x.cpu,history:H.cpu,onHover:N,hoverIndex:y})},"cpu"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{...x.mem,history:H.mem,onHover:N,hoverIndex:y})},"memory"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{title:`Daemon ${o("common.memory")}`,total:D.parseSize(`${g.runtimeConfig.daemonMaxMemoryLimit}MiB`),used:x.daemon.memoryUsage||0,history:H.daemonMem,onHover:N,hoverIndex:y})},"memory-daemon"),t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(S,{title:`Service ${o("common.memory")}`,total:D.parseSize(`${g.runtimeConfig.proxyMaxMemoryLimit}MiB`),instanceCount:x.service.instanceCount||0,used:x.service.memoryUsage||0,history:H.serviceMem,onHover:N,hoverIndex:y})},"memory-service"),x.disks.map(e=>t.jsx(C,{item:!0,lg:3,md:6,sm:6,xs:12,children:t.jsx(T,{disk:e})},e.device||"disk"))]}),t.jsx(ge,{className:"runtime-insight-list",title:o("analytics.detail"),locale:u,data:d,columns:q,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}A.propTypes={initialBlocklets:f.array.isRequired};function be(){const{data:s,externalData:o,initialized:u}=Q();if(!u)return t.jsx(X,{relative:"parent",children:t.jsx(ee,{})});const l=[...s,...o];return t.jsx(A,{initialBlocklets:l})}function et(){const s=le(),{t:o}=c.useContext($),{tab:u="traffic"}=ce(),l=y=>{s(`/analytics/${y}`)},g=[{label:o("common.traffic"),value:"traffic"},{label:o("common.runtime"),value:"runtime"}],h={traffic:je,runtime:be},j=h[u]||h.traffic;return t.jsxs(Me,{children:[t.jsx(k,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:o("common.analytics")}),t.jsx(de,{tabs:g,current:u,onChange:l}),t.jsx("div",{className:"page-content",children:c.isValidElement(j)?j:t.jsx(j,{})})]})}const Me=ue.main`
2
2
  .page-header {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -0,0 +1,109 @@
1
+ import{m as D,j as e,R as P,P as f,r as b,N as O,O as V,S as H,Q,K as h,A as re,bp as $,bq as be,aY as G,t as q,B as z,C as je,ae as pe,e as Ce,D as de,aX as ve,U as ke,n as B,y as Te,aw as E,l as Ke,br as Ae,bs as we,W as ie,bt as Se,bu as De,bv as Re,bw as Ie,bx as Pe,H as $e,k as I,by as Be,aA as ce,V as Ne,X as _e,x as Le,u as Me,bo as We,d as Ue,bz as qe}from"./index-CGargw6n.js";import{T as ze}from"./index-DDhjA_J6.js";import Ee from"./audit-logs-DuYx96S8.js";import{T as ue,M as Fe}from"./index-3hUI0XWj.js";import{r as xe,P as Oe}from"./index-CMAKmzMc.js";import{u as N,T as Ve}from"./team-DeJfgyE0.js";import{g as He,D as Qe}from"./index-L99IjMpo.js";import{d as Ge}from"./Delete-DibgMbRa.js";import{d as Xe}from"./Edit-CQIAI4Xx.js";import{E as Ye}from"./index-g4Pa9QCu.js";import{d as Je}from"./Add-Dr17acvQ.js";import{C as le}from"./index-lHULqi5l.js";import{C as F}from"./click-to-copy-DunM7RYV.js";import{f as Ze}from"./index-BojVbZw0.js";import{D as et}from"./delete-confirm-CKJM7oLk.js";import{P as tt}from"./permission-BY_usLPC.js";import{u as st}from"./blocklet-Ca7hIY9r.js";import{A as ot}from"./actions-CSIY5MjI.js";import{u as nt}from"./use-mobile-DK73qoH8.js";import{T as me}from"./table-tips-CFO-Ys9P.js";import{u as at}from"./useAsyncRetry-DBtDInVv.js";import"./TableSearch-C3sQDzER.js";import"./Search-DqihVCic.js";import"./Clear-DiiXyvpY.js";import"./useLocalStorage-1IK8Xf3D.js";import"./index-D9LzJ8Wk.js";import"./shorten-label-Cx9WVX2w.js";import"./ViewList-B52x_JLH.js";import"./resource-dialog-sYzuZVwE.js";import"./index-BSVtXZA5.js";import"./use-mobile-CpVsXFoV.js";import"./ListItemButton-CalO7fFj.js";import"./index-U1KqpW6O.js";import"./emotion-react.browser.esm-CH67Z3jf.js";import"./index-CL9Vrgs0.js";import"./Switch-CIGEpWB6.js";import"./url-evaluation-Cjrq8Y2H.js";import"./index-D2Z-mQN5.js";import"./OpenInNew-DXZU9TBc.js";import"./index-BJHGOv7L.js";import"./HelpOutline-4rllQwkH.js";import"./index-CrtwGdrB.js";import"./ButtonGroup-D8iCR_UA.js";import"./getValidReactChildren-2WQ5-6h6.js";import"./AdapterDayjs-C79-iXnA.js";import"./useThemeProps-Btw9Aun5.js";import"./CSSTransition-DMBk20B6.js";import"./refType-CSs4l3lt.js";import"./index-CMPNSvEP.js";import"./Verified-DAT8F9n5.js";import"./DeleteOutline-vkCr-A0J.js";import"./ErrorOutline-DCAxmStN.js";import"./sdk-dj0ARauA.js";import"./LockIcon-BIs3NFsi.js";import"./cloneDeep-B7rgkTOg.js";import"./chain-lJbBI8lt.js";import"./list-header-DLHqbQMu.js";import"./ToggleButtonGroup-2wE1N-s9.js";import"./TableRow-DSBApqUZ.js";import"./ViewColumn-DZ8hNz9g.js";import"./MoreVert-BrdZPzwo.js";import"./MoreHoriz-BamWxTeP.js";import"./useAsync-BCZg9cpL.js";function X({value:t}){const{t:s,locale:p}=D(),l=new Date;return new Date(t)<l?e.jsxs("span",{style:{color:"red"},children:[e.jsx(P,{value:t,locale:p}),`${s("setting.accessKey.expired",{time:""})}`]}):e.jsx(P,{value:t,locale:p,type:"all"})}X.propTypes={value:f.string.isRequired};function Y({value:t,onChange:s,...p}){const{t:l}=D(),m=b.useMemo(()=>[{value:"signature",title:l("setting.accessKey.signature"),description:l("setting.accessKey.signatureDesc")},{value:"simple",title:l("setting.accessKey.simple"),description:l("setting.accessKey.simpleDesc")}],[l]);return e.jsxs(O,{style:{width:"100%"},variant:"outlined",...p,children:[e.jsx(V,{children:l("setting.accessKey.authType")}),e.jsx(H,{value:t,onChange:s,fullWidth:!0,label:l("setting.accessKey.authType"),children:m.map(n=>e.jsx(Q,{value:n.value,children:e.jsxs(h,{children:[e.jsx("span",{children:n.title}),e.jsx(h,{maxWidth:510,fontSize:12,color:"#999",whiteSpace:"normal",children:n.description})]})},n.value))})]})}Y.propTypes={value:f.string.isRequired,onChange:f.func.isRequired};const M=()=>{const t=re.RBAC_CONFIG.roles.filter(m=>m.passport),{inService:s}=$(),{roles:p}=N(),l=[...t,...s?p:[]];return be(l,"name").filter(m=>m.name!==re.ROLES.OWNER)};function J(t){const{remark:s,onCreate:p}=t,{api:l}=$(),{teamDid:m}=N(),{t:n}=D(),[k,C]=b.useState(!1),[c,x]=b.useState(null),u=M(),K=()=>{C(!1),x(null)},v=async a=>{const{remark:j,passport:r,authType:o}=a;C(!0);const y=await l.createAccessKey({input:{teamDid:m,remark:j.trim(),passport:r,expireAt:a.expireAt?new Date(a.expireAt).getTime():null,authType:o}}),{data:S}=y;p(S),x(null),C(!1)},g={title:`${n("common.create")} ${n("accessKey")}`,description:(a,j,r)=>e.jsxs(G,{gap:3,children:[e.jsx(q,{label:n("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,margin:"dense",value:a.remark,onChange:o=>{j({...a,remark:o.target.value,__disableConfirm:!a.passport||!o.target.value.trim()}),o.target.value.trim()?r(""):r(n("setting.accessKey.remarkInvalid"))}}),e.jsxs(O,{style:{width:"100%"},variant:"outlined",children:[e.jsx(V,{children:n("setting.accessKey.passport")}),e.jsx(H,{"data-cy":"create-access-key-select-passport",value:a.passport,onChange:o=>{const y=o.target.value;r(null),j({...a,passport:y,__disableConfirm:!a.remark||!y})},fullWidth:!0,label:n("setting.accessKey.passport"),disabled:k,children:u.map(o=>e.jsx(Q,{value:o.name,"data-cy":`create-access-key-passport-option-${o.name}`,children:e.jsxs(h,{children:[e.jsx("span",{children:o.title||o.name}),e.jsx(h,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:o.description})]})},o.name))})]}),e.jsx(Y,{value:a.authType,onChange:o=>{j({...a,authType:o.target.value})}}),e.jsx(ue,{placeholder:n("setting.accessKey.expireTime"),value:a.expireAt,onChange:o=>{j({...a,expireAt:o,__disableConfirm:!a.passport||!a.remark||!o})}})]}),confirm:n("common.confirm"),cancel:n("common.cancel"),color:"primary",params:{remark:s,authType:"signature",__disableConfirm:!s.trim()},onConfirm:v,onCancel:K};return e.jsxs(e.Fragment,{children:[e.jsxs(z,{sx:{color:"common.white"},edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>x(g),className:"rule-action",children:[k?e.jsx(je,{size:16}):e.jsx(Je,{style:{fontSize:16}}),n("common.create")]}),c&&e.jsx(pe,{title:c.title,description:c.description,confirm:c.confirm,color:c.color,cancel:c.cancel,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}J.propTypes={remark:f.string,onCreate:f.func};J.defaultProps={onCreate:()=>{},remark:""};function Z(t){const{onConfirm:s,accessKeyId:p,accessKeySecret:l,hideSecret:m}=t,{t:n}=b.useContext(Ce),[k,C]=b.useState(!1),[c,x]=b.useState(()=>m),u=()=>{x(!c)},K=a=>{C(a.target.checked)},v=b.useMemo(()=>{var a;return m?`const Client = require('@abtnode/client');
2
+
3
+ const client = new Client(fullEndpoint);
4
+ client.setAuthAccessKey({
5
+ accessKeyId: "${p}",
6
+ accessKeySecret: "${l}",
7
+ });
8
+ `:`curl -H "Authorization: Bearer ${l}" "${(a=window.blocklet)==null?void 0:a.appUrl}/.well-known/service/api/did/session"`},[m,p,l]),g=b.useMemo(()=>{var a;return m?`blocklet deploy --endpoint ${(a=window.blocklet)==null?void 0:a.appUrl} --access-key ${p} --access-secret ${l} {blockletPath}/.blocklet/bundle;`:null},[m,p,l]);return e.jsxs(de,{title:n("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(z,{disabled:m?!k:!1,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:n("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(rt,{children:n(m?"setting.accessKey.saveSecretTip":"setting.accessKey.viewSecret")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(U,{children:[e.jsx(W,{children:n("setting.accessKey.accessKeyId")}),e.jsx(F,{children:p})]}),e.jsxs(U,{children:[e.jsx(W,{children:n("setting.accessKey.accessKeySecret")}),c?e.jsx(z,{"data-cy":"show-secret-btn",color:"primary",onClick:u,children:n("setting.accessKey.showSecret")}):e.jsx(F,{children:l})]}),!c&&e.jsxs(U,{children:[e.jsx(W,{children:`Access Key ${n("setting.accessKey.usage")}`}),e.jsx(le,{code:v,language:"javascript"}),g&&e.jsx(le,{code:g,language:"bash"})]}),m&&e.jsx("div",{children:e.jsx(ve,{value:"end",disabled:c,control:e.jsx(ke,{checked:k,onChange:K}),label:n("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}Z.propTypes={accessKeyId:f.string.isRequired,accessKeySecret:f.string.isRequired,onConfirm:f.func,hideSecret:f.bool};Z.defaultProps={onConfirm:()=>{},hideSecret:!0};const W=B.div`
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ font-size: 16px;
13
+ margin-bottom: 8px;
14
+ `,U=B.div`
15
+ margin-bottom: 24px;
16
+ `,rt=B.div`
17
+ font-size: 16px;
18
+ font-weight: bold;
19
+ `;function ee(t){const{t:s,locale:p}=D(),{api:l}=$(),{teamDid:m}=N(),{accessKeyId:n,time:k,remark:C,onDelete:c=()=>{},onClose:x=()=>{}}=t,u=()=>{x()},K=async()=>{try{await l.deleteAccessKey({input:{teamDid:m,accessKeyId:n}}),c()}catch(a){Te.error(a==null?void 0:a.message)}finally{u()}},v=a=>({key:`<b>${n}</b>`,name:`<b>${C}</b>`,time:E(a,p),timeAge:Ze(new Date(a),Ke(p))}),g={keyName:C,title:s("setting.accessKey.title"),description:k?`${s("setting.accessKey.description",v(k))}`:`${s("setting.accessKey.descriptionNoTime",{key:`<b>${n}</b>`,name:`<b>${C}</b>`})}`,confirmPlaceholder:s("setting.accessKey.confirm_desc",{name:C}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:K,onCancel:u};return e.jsx(et,{keyName:g.keyName,title:g.title,description:g.description,confirmPlaceholder:g.confirmPlaceholder,confirm:g.confirm,cancel:g.cancel,params:g.params,onConfirm:g.onConfirm,onCancel:g.onCancel})}ee.propTypes={accessKeyId:f.string.isRequired,time:f.string.isRequired,remark:f.string.isRequired,onDelete:f.func,onClose:f.func};ee.defaultProps={onDelete:()=>{},onClose:()=>{}};function te(t){const{accessKeyId:s,remark:p,onUpdate:l,passport:m,expireAt:n,authType:k,onClose:C}=t,{api:c}=$(),{teamDid:x}=N(),{t:u}=D(),[K,v]=b.useState(!1),g=M(),a=()=>{v(!1),C()},j=async o=>{const{accessKeyId:y,remark:S="",passport:d,expireAt:R,authType:L}=o;v(!0),await c.updateAccessKey({input:{teamDid:x,accessKeyId:y,remark:S.trim(),passport:d,expireAt:R?new Date(R).getTime():null,authType:L}}),l(),a()},r={title:`${u("common.update")} ${u("accessKey")}`,description:(o,y,S)=>e.jsxs(G,{gap:3,children:[e.jsx(q,{label:u("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,margin:"dense",value:o.accessKeyId,disabled:!0}),e.jsx(q,{label:u("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,value:o.remark,onChange:d=>{y({...o,remark:d.target.value,__disableConfirm:!d.target.value.trim()}),d.target.value.trim()?S(""):S(u("setting.accessKey.remarkInvalid"))}}),e.jsxs(O,{style:{width:"100%"},variant:"outlined",children:[e.jsx(V,{children:u("setting.accessKey.passport")}),e.jsx(H,{"data-cy":"update-access-key-select-passport",value:o.passport,onChange:d=>{const R=d.target.value;S(null),y({...o,passport:R,__disableConfirm:!o.remark||!R})},fullWidth:!0,label:u("setting.accessKey.passport"),disabled:K,children:g.map(d=>e.jsx(Q,{value:d.name,"data-cy":`update-access-key-passport-option-${d.name}`,children:e.jsxs(h,{children:[e.jsx("span",{children:d.title||d.name}),e.jsx(h,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:d.description})]})},d.name))})]}),e.jsx(Y,{disabled:!0,value:o.authType,onChange:d=>{y({...o,authType:d.target.value})}}),e.jsx(ue,{placeholder:u("setting.accessKey.expireTime"),value:o.expireAt,onChange:d=>{y({...o,expireAt:d,__disableConfirm:!o.passport||!o.remark||!d})}})]}),confirm:u("common.confirm"),cancel:u("common.cancel"),color:"primary",params:{accessKeyId:s,remark:p,passport:m,expireAt:n,authType:k},onConfirm:j,onCancel:a};return e.jsx(pe,{title:r.title,description:r.description,confirm:r.confirm,color:r.color,cancel:r.cancel,params:r.params,onConfirm:r.onConfirm,onCancel:r.onCancel})}te.propTypes={accessKeyId:f.string.isRequired,remark:f.string,passport:f.string,expireAt:f.string,authType:f.string,onUpdate:f.func,onClose:f.func};te.defaultProps={onUpdate:()=>{},remark:"",passport:"",expireAt:"",authType:"signature",onClose:()=>{}};function se({accessKey:t,onCancel:s}){const{t:p}=D();return e.jsx(de,{title:p("accessKey"),onClose:s,open:!0,PaperProps:{style:{maxWidth:800}},fullWidth:!0,children:e.jsx(it,{children:e.jsx(ye,{accessKey:t})})})}se.propTypes={accessKey:f.object.isRequired,onCancel:f.func.isRequired};se.defaultProps={};const it=B(h)`
20
+ margin-top: -16px;
21
+
22
+ .tabs {
23
+ margin-left: 0;
24
+ margin-right: 0;
25
+ }
26
+ `;function ye({accessKey:t}){var a,j;const{t:s,locale:p}=D(),{api:l}=$(),{teamDid:m}=N(),{blocklet:n}=st(),k=M(),C=b.useCallback(async r=>r?(await l.getUser({input:{teamDid:m,user:{did:r}}})).user:null,[l,m]),c=Ae(()=>C(t.createdBy),{}),x=((n==null?void 0:n.children)||[]).find(r=>{var o;return((o=r==null?void 0:r.meta)==null?void 0:o.did)===t.componentDid}),u=b.useMemo(()=>{var r;return we((r=c==null?void 0:c.data)==null?void 0:r.avatar,m,!0)},[(a=c==null?void 0:c.data)==null?void 0:a.avatar,m]),K=k.find(r=>r.name===t.passport),v=K?K.title:t.passport,g=[{title:s("common.baseInfo"),items:[{label:s("setting.accessKey.accessKeyId"),content:e.jsx(ie,{did:t.accessKeyId,showQrcode:!0})},...t.authType==="simple"?[{label:s("setting.accessKey.accessKeySecret"),content:e.jsx(F,{children:`blocklet-${Se.toBase58(t.accessKeyPublic)}`})}]:[],{label:s("common.role"),content:e.jsx(h,{children:xe(v,t.passport)})},{label:s("common.createdVia"),content:t.createdVia},{label:s("common.createdBy"),content:c!=null&&c.data?e.jsx(h,{sx:{display:"flex",alignItems:"center",".MuiAvatar-root":{width:32,height:32}},children:e.jsx(De,{user:{...c.data,avatar:u},showDid:!0,cardType:Re.Detailed,infoType:Ie.Minimal,sx:{border:0,padding:0}})}):t.createdBy?e.jsx(ie,{did:t.createdBy,showQrcode:!0}):"-"}]},{title:s("common.timeInfo"),items:[{label:s("common.createdAt"),content:t.createdAt?e.jsx(P,{value:t.createdAt,type:"all",locale:p}):"-"},{label:s("common.lastUsedAt"),content:t.lastUsedAt?e.jsx(P,{value:t.lastUsedAt,type:"all",locale:p}):"-"},{label:s("common.expiredAt"),content:t.expireAt?e.jsx(X,{value:t.expireAt}):s("common.neverExpired")}]},{title:s("common.otherInfo"),items:[{label:s("setting.accessKey.authType"),content:t.authType},{label:s("common.remark"),content:t.remark},...t.authType!=="signature"?[{label:s("setting.accessKey.resourceType"),content:t.resourceType||"-"},{label:s("setting.accessKey.resourceId"),content:t.resourceId||"-"}]:[],...x?[{label:s("setting.accessKey.component"),content:e.jsxs(h,{width:{xs:250,sm:400},display:"flex",alignItems:"center",children:[e.jsx(Pe,{blocklet:x,ancestors:[n]}),e.jsx(h,{ml:"16px",sx:{minWidth:0},children:e.jsxs(h,{className:"component-header",children:[e.jsx(h,{className:"component-name",children:$e.getDisplayName(x,!0)}),e.jsx(h,{className:"component-version",children:(j=x==null?void 0:x.meta)==null?void 0:j.version})]})})]},x)}]:[]]}];return e.jsx(ct,{gap:3,children:e.jsx(h,{className:"info-area",children:g.map(r=>e.jsxs(h,{mb:3,children:[e.jsx(I,{variant:"h6",sx:{mb:1.5},children:r.title}),e.jsx(h,{className:"info-grid",children:r.items.map(o=>e.jsxs(h,{className:"info-item",children:[e.jsx(h,{className:"info-label",children:e.jsx(I,{variant:"subtitle2",color:"textSecondary",children:o.label})}),e.jsx(h,{children:o.content})]},o.label))})]},r.title))})})}ye.propTypes={accessKey:f.object.isRequired};const ct=B(G)`
27
+ .info-card {
28
+ margin-bottom: 24px;
29
+ overflow: hidden;
30
+ }
31
+
32
+ .card-content {
33
+ display: flex;
34
+ gap: 32px;
35
+ padding: 24px;
36
+ }
37
+
38
+ .passport-image {
39
+ width: 150px;
40
+ flex-shrink: 0;
41
+ transition: transform 0.2s ease-in-out;
42
+ cursor: pointer;
43
+
44
+ &:hover {
45
+ transform: scale(1.05);
46
+ }
47
+ }
48
+
49
+ .info-area {
50
+ flex: 1;
51
+ display: flex;
52
+ flex-direction: column;
53
+ }
54
+
55
+ .info-header {
56
+ padding-bottom: 16px;
57
+ border-bottom: 1px solid #eee;
58
+ }
59
+
60
+ .info-grid {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 12px;
64
+ }
65
+
66
+ .info-item {
67
+ display: flex;
68
+ gap: 8px;
69
+ }
70
+
71
+ .info-label {
72
+ display: flex;
73
+ align-items: center;
74
+ gap: 8px;
75
+ width: 140px;
76
+ }
77
+
78
+ .logs-card {
79
+ .card-header {
80
+ display: flex;
81
+ align-items: center;
82
+ gap: 8px;
83
+ padding: 16px 24px;
84
+ border-bottom: 1px solid #eee;
85
+ }
86
+
87
+ .MuiTimeline-root {
88
+ padding: 24px;
89
+ }
90
+
91
+ .MuiTimelineContent-root {
92
+ padding: 0px 16px;
93
+ }
94
+
95
+ .MuiTimelineDot-root {
96
+ margin: 0;
97
+ }
98
+ }
99
+ `;function lt(){var ne,ae;const{t,locale:s}=D(),{api:p,inService:l}=$(),{teamDid:m}=N(),[n,k]=b.useState({}),[C,c]=b.useState(null),[x,u]=b.useState(null),[K,v]=b.useState(null),g=nt(),a=M(),j=b.useRef(null),r=`access-keys-${m}`,o=He(r),[y,S]=b.useState({searchText:o.searchText||"",pageSize:o.rowsPerPage||10,page:1}),d=at(async()=>await p.getAccessKeys({input:{teamDid:m,paging:{page:y.page,pageSize:y.pageSize}}}),[y.page,y.pageSize]),{loading:R,error:L}=d,_=b.useMemo(()=>{var i;return((i=d.value)==null?void 0:i.list)||[]},[(ne=d.value)==null?void 0:ne.list]),fe=b.useMemo(()=>[{label:t("common.name"),name:"remark",options:{customBodyRender:(i,{rowIndex:A})=>{const w=_[A];return e.jsx(h,{display:"flex",alignItems:"center",gap:2,children:e.jsx(I,{children:w.remark||"N/A"})})}}},{label:"Access Key ID",name:"accessKeyId",options:{customBodyRender:i=>e.jsx(Be,{showDidLogo:!1,children:i})}},{label:t("common.role"),name:"passport",options:{customBodyRender:i=>{const A=a.find(T=>T.name===i),w=A?A.title:i;return e.jsx(h,{children:xe(w,i)})}}},{label:t("common.createdVia"),name:"createdVia",options:{customBodyRender:i=>e.jsx(I,{children:i})}},{label:t("setting.accessKey.authType"),name:"authType",options:{customBodyRender:i=>e.jsx(I,{children:t(`setting.accessKey.${i}`)})}},{label:t("common.createdAt"),name:"createdAt",options:{customBodyRender:i=>e.jsx(ce,{title:E(i,s),children:i?e.jsx(P,{value:i,locale:s}):"-"})}},{label:t("common.lastUsedAt"),name:"lastUsedAt",options:{customBodyRender:i=>e.jsx(ce,{title:E(i,s),children:i?e.jsx(P,{value:i,locale:s}):"-"})}},{label:t("common.expiredAt"),name:"expireAt",options:{customBodyRender:i=>i?e.jsx(X,{value:i}):t("common.neverExpired")}},{label:t("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRender:(i,{rowIndex:A})=>{const w=_[A];return e.jsx(ot,{"data-cy":"access-key-actions",actions:[{icon:e.jsx(Xe,{}),text:t("common.edit"),onClick:T=>{T.stopPropagation(),v(w)}},{icon:e.jsx(Ge,{}),text:t("common.delete"),onClick:T=>{T.stopPropagation(),u(w)}}]})}}}],[_,s,t,a,u,v]),ge=({page:i,rowsPerPage:A,searchText:w})=>{y.pageSize!==A?S(T=>({...T,searchText:"",pageSize:A,page:1})):y.page!==i+1?S(T=>({...T,searchText:"",page:i+1})):y.searchText!==w&&S(T=>({...T,searchText:w,page:1}))},oe=y.searchText?_.filter(i=>i.accessKeyId.toLowerCase().includes(y.searchText.toLowerCase())||(i.remark||"").toLowerCase().includes(y.searchText.toLowerCase())):_;return L?e.jsx(Ne,{severity:"error",children:_e(L)}):e.jsxs(h,{ref:j,sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[g?e.jsx(me,{title:t("setting.accessKey.listTitle"),tooltipTitle:t("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${s}/access-key`}):null,e.jsx(Qe,{durable:r,durableKeys:["page","rowsPerPage"],data:oe,columns:fe,options:{sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,page:y.page-1,rowsPerPage:y.pageSize,count:((ae=d.value)==null?void 0:ae.count)||0,searchDebounceTime:600,onRowClick(i,{dataIndex:A},w){var T;if((T=j.current)!=null&&T.contains(w.target)){const he=oe[A];c(he)}}},loading:R,onChange:ge,title:g?null:e.jsx(me,{title:t("setting.accessKey.listTitle"),tooltipTitle:t("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${s}/access-key`}),customButtons:[e.jsx(tt,{permission:l?"":"mutate_accessKey",children:e.jsx(J,{onCreate:i=>{const{accessKeyId:A,accessKeySecret:w,authType:T}=i;k({show:!0,accessKeyId:A,accessKeySecret:w,authType:T})}})})],emptyNode:e.jsx(Ye,{children:t("oauth.client.empty")})}),n.show&&e.jsx(Z,{hideSecret:n.authType==="signature",onConfirm:()=>{d.retry(),k({show:!1})},...n}),C&&e.jsx(se,{onCancel:()=>c(null),accessKey:C}),x&&e.jsx(ee,{accessKeyId:x.accessKeyId,time:x.lastUsedAt,remark:x.remark||"N/A",onDelete:d.retry,onClose:()=>u(null)}),K&&e.jsx(te,{...K,onUpdate:d.retry,onClose:()=>v(null)})]})}function mt(){return e.jsx(lt,{})}function Cs(){const t=Le(),{t:s}=D(),{info:p}=Me(),{tab:l="members"}=We(),m=j=>qe(j,p),{data:n}=Ue(),k=b.useCallback(j=>{const r=n.find(o=>[o.meta.did,o.appDid,o.appPid].includes(j));return r?r.meta.title:"Server"},[n]),C=b.useRef(null);C.current=k;const c=b.useCallback(()=>e.jsx(Ee,{showScope:!0,scopeFormatter:C.current}),[]),x=b.useCallback(()=>e.jsx(Fe,{type:"server",createPassportSvg:m}),[]),u=p.did,K=j=>{t(`/team/${j}`)},v={members:{label:s("common.members"),value:"members",component:x},passports:{label:s("team.member.passports"),value:"passports",component:Oe},"access-keys":{label:s("common.accessKey"),value:"access-keys",component:mt},"audit-logs":{label:s("common.auditLogs"),value:"audit-logs",component:c}},g=Object.values(v).map(({label:j,value:r})=>({label:j,value:r})),a=v[l]||v.member;return e.jsx(Ve,{teamDid:u,children:e.jsxs(pt,{children:[e.jsx(I,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:s("common.team")}),e.jsx(ze,{tabs:g,current:l,onChange:K,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(a.component,{createPassportSvg:m})})]})})}const pt=B.main`
100
+ .page-header {
101
+ display: flex;
102
+ justify-content: space-between;
103
+ align-items: center;
104
+ }
105
+
106
+ .page-content {
107
+ margin-top: 24px;
108
+ }
109
+ `;export{Cs as default};
@@ -1 +1 @@
1
- import{u,j as s,C as d,x as w,az as v,bt as C,cv as f,K as j,bB as I,af as P,A as S}from"./index-DTI4BkNW.js";import{I as R}from"./invitation-qA5bVm--.js";import{g as T}from"./get-safe-url-BJSiqBsp.js";import"./index-DrUjokqV.js";import"./index-RCmuyDMR.js";import"./emotion-react.browser.esm-BPIpPz3P.js";import"./index-u0GcnVeV.js";import"./sdk-Bg9zUQQV.js";import"./wrap-locale-CYxNfqSO.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=w(),{api:a,session:r}=v(),{info:l}=u(),c=i.get("redirect"),p=i.get("id"),e=C(async()=>{if(!p)return null;const{data:t}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=f(()=>{if(e.error)throw e.error;return e==null?void 0:e.data}),h=f(async(t,x=o=>o)=>{t&&(t.sessionToken&&P(x(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const o=decodeURIComponent(c);o.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?g(o,{replace:!0}):window.location.href=T(o)}else window.location.href=window.env.pathPrefix||"/"},50)});return e.loading?s.jsx(d,{}):s.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(R,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>I(t,l),checkFn:a.get,onLoginSuccess:h,passportColor:"default",onLogin:r.login})})}function z(){return u().loading?s.jsx(d,{}):s.jsx(k,{})}export{z as default};
1
+ import{u,j as s,C as d,x as w,az as v,br as C,ct as f,K as j,bz as I,af as P,A as S}from"./index-CGargw6n.js";import{I as R}from"./invitation-a75PydJz.js";import{g as T}from"./get-safe-url-BswgeNVU.js";import"./index-BSVtXZA5.js";import"./index-U1KqpW6O.js";import"./emotion-react.browser.esm-CH67Z3jf.js";import"./index-fFK_YyO8.js";import"./sdk-dj0ARauA.js";import"./wrap-locale-DoH7AJX_.js";function k(n){const{searchParams:i}=new URL(window.location.href),g=w(),{api:a,session:r}=v(),{info:l}=u(),c=i.get("redirect"),p=i.get("id"),e=C(async()=>{if(!p)return null;const{data:t}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=f(()=>{if(e.error)throw e.error;return e==null?void 0:e.data}),h=f(async(t,x=o=>o)=>{t&&(t.sessionToken&&P(x(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const o=decodeURIComponent(c);o.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?g(o,{replace:!0}):window.location.href=T(o)}else window.location.href=window.env.pathPrefix||"/"},50)});return e.loading?s.jsx(d,{}):s.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(R,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>I(t,l),checkFn:a.get,onLoginSuccess:h,passportColor:"default",onLogin:r.login})})}function _(){return u().loading?s.jsx(d,{}):s.jsx(k,{})}export{_ as default};
@@ -1,4 +1,4 @@
1
- import{r as y,u as J,_ as Me,aI as ii,j as e,A as D,aJ as In,aK as pr,aL as oi,aM as Ln,aN as rt,aO as Ce,aP as Se,P as f,n as re,m as z,ae as le,aQ as On,aR as ai,aS as Fn,aT as si,y as se,M as Nn,k as A,t as G,aA as pe,aU as Oe,C as Y,V as je,B as X,aV as gr,X as xe,K as q,e as Kt,R as it,aW as li,d as Yt,aX as $e,aY as fe,ab as ci,aZ as di,a_ as ui,a2 as mi,x as hr,W as $n,T as Un,h as ne,a$ as Vt,a as Nt,Q as Z,b as pt,b0 as xr,b1 as yr,U as br,a4 as $t,b2 as fi,b3 as pi,b4 as gi,b5 as hi,b6 as ot,b7 as vr,a9 as xi,H as yi,b8 as bi,aH as Ze,b9 as vi,aa as Et,a7 as At,ba as ji,a8 as Ut,g as Xt,I as wi,bb as Ci,bc as jr,bd as Ee,be as Ae,bf as Si,bg as Di,D as wr,s as zt,al as _i,f as ki,bh as Ri,bi as zn,am as Ti,bj as Pi,bk as Cr,bl as te,bm as Ei,S as Bn,p as Mn,l as Wn,bn as Ai,bo as Ii}from"./index-DTI4BkNW.js";import{T as Li}from"./index-Bo-N9ZZS.js";import{d as Oi}from"./ArrowDropDown-D24TTMvH.js";import{u as Qt,C as M,a as qn}from"./index.esm-BhU35G9C.js";import{S as ae}from"./switch-control-CIiFijrf.js";import{P as ie}from"./permission-CIEFWkaR.js";import{D as Sr,g as Fi}from"./index-G6hKL35m.js";import{d as Dr}from"./Link-e5N_7Dtu.js";import{d as we}from"./Delete-DliA3mdg.js";import{D as gt}from"./delete-confirm-WhK8nGuj.js";import{I as at}from"./index-ChGWeAoT.js";import{s as Ni}from"./logo-BKA11TRi.js";import{R as _r,a as Bt,b as $i,W as Je}from"./url-evaluation-CiS0m0gE.js";import{_ as Ui}from"./useLocalStorage-yyXOU8sf.js";import{d as zi}from"./Refresh-9g5ukYUh.js";import{L as Bi}from"./LoadingButton-BXZL61GP.js";import{C as Mi,R as Wi,d as kr}from"./Public-Dxdvvihr.js";import{d as Ue}from"./Add-B-whK8Og.js";import{B as Rr,D as Hn}from"./status-D0j9AxRu.js";import{i as qi}from"./is-path-prefix-equal-CP-xgvsY.js";import{d as Hi}from"./ChevronRight-BkDmz6Jp.js";import{d as Gi}from"./MoreVert-ygAE5zXH.js";import{d as Tr}from"./Edit-WMHj4INs.js";import{d as Ki}from"./CallMerge-6gNoogQf.js";import{C as Yi}from"./CardContent-_VxRx6xT.js";import{w as Vi}from"./withStyles-CPbSyJRI.js";import{S as Xi}from"./Slider-X_Dbeb_B.js";import"./index-DgMghQir.js";import"./Switch-B_ZA3R4H.js";import"./TableRow-LUYIbYYH.js";import"./useThemeProps-DA06OkGc.js";import"./emotion-react.browser.esm-BPIpPz3P.js";import"./ViewColumn-Y-NBF0dy.js";import"./Search-BWfKoeW0.js";import"./Clear-CH1dCzcl.js";import"./index-3KlQvd1f.js";import"./TableSearch-DryNoX9z.js";import"./click-to-copy-NkGN8EyZ.js";const ve="Dashboard",Pr=y.createContext({}),{Provider:Qi,Consumer:Hs}=Pr,Gn=[ve,D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP],Zi=(t,n)=>{if(t.name===D.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===D.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=Gn.includes(t.name),i=Gn.includes(n.name);return r&&i?Ln(t.name,n.name):r?-1:i?1:Ln(t.name,n.name)},Ji=({sites:t,nodePort:n})=>{const r=window.location.hostname,o=(t||[]).map(a=>{const{id:s,rules:d=[],corsAllowedOrigins:x=[]}=a;let{domain:c,domainAliases:u}=a;u=u||[],[D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP].includes(c)&&(c=ve,u.find(w=>w.value===r)||u.unshift({protected:!1,value:r}));const p={id:s,name:c,type:"domain",items:[],domainAliases:u,isProtected:a.isProtected,corsAllowedOrigins:x};return(d||[]).forEach(w=>{const{id:j,isProtected:R,from:{pathPrefix:v},to:S}=w;if(S.type===D.ROUTING_RULE_TYPES.BLOCKLET){let _="";Number.parseInt(S.port,10)===Number.parseInt(n,10)?(_="Blocklet Server Dashboard",S.type=D.ROUTING_RULE_TYPES.DAEMON):_=S.did,p.items.push({id:j,name:In(v||"/"),title:_,type:"rule",isProtected:R,pathPrefix:v,to:S})}else p.items.push({id:j,pathPrefix:v,name:In(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:R,to:S})}),p.items=pr(p.items,w=>w.name),p}).sort(Zi),l=o.reduce((a,s)=>{let{name:d}=s;return d.endsWith(D.BLOCKLET_SITE_GROUP_SUFFIX)&&([d]=d.split(".")),a[d]={...s,rules:s.items},a},{});return{sites:o,siteMap:l}},eo=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const a=n||(l.domainAliases||[])[0];if(!a)return null;let s=r;if(!s){const d=l.rules.filter(x=>!x.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];s=d?d.name:"/"}return rt(a.value,s,o)},to=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const l=o.domainAliases||[];if(!l.length)return[];let a=n;if(!a){const s=o.rules.filter(d=>!d.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];a=s?s.name:"/"}return l.map(s=>rt(s.value,a,i))},no=t=>{const n=t.map(i=>i.domain).filter(i=>![D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function Kn({children:t}){const{api:n,info:r}=J(),[i,o]=y.useState([]),[l,a]=y.useState([]),[s,d]=y.useState([]),x=Me(async()=>{const{sites:O}=await n.getRoutingSites({input:{snapshotHash:""}}),b=O||[];await Promise.all(b.map(async g=>(g.domainAliases=await ii(g.domainAliases,{getIP:oi}),g)));const m=no(b);o(b),a(m.domains),d([window.location.hostname,...m.domains,...m.domainsAliases.map(g=>g.value)])},[r]),c=(O,b)=>{o(m=>m.map(g=>g.id===O?b.domain?b:{...b,domain:g.domain}:g))},u=O=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(O)}}),p=async O=>{const b=await n.addRoutingSite({input:O});o(i.concat(b.site))},w=async(O,b)=>{const m=await n.updateRoutingSite({input:{id:O,...b}});if(m.site&&m.site.id){const g=i.findIndex(k=>k.id===m.site.id);g!==-1&&(i.splice(g,1,m.site),o([].concat(i)))}},j=async O=>{await n.deleteRoutingSite({input:{id:O}}),o(i.filter(b=>b.id!==O))},R=async(O,b,m)=>{const g=await n.addDomainAlias({input:{id:O,domainAlias:b,force:m}});c(O,g.site)},v=async(O,b)=>{const m=await n.deleteDomainAlias({input:{id:O,domainAlias:b}});c(O,m.site)},S=async(O,b)=>{const{site:m}=await n.addRoutingRule({input:{id:O,rule:b}});c(O,m)},_=async(O,b)=>{const{site:m}=await n.updateRoutingRule({input:{id:O,rule:b}});c(O,m)},C=async(O,b)=>{const{site:m}=await n.deleteRoutingRule({input:{id:O,ruleId:b}});c(O,m)},h={loading:x.loading,error:x.error,refresh:x.retry,api:n,actions:{addSite:p,updateSite:w,deleteSite:j,addDomainAlias:R,deleteDomainAlias:v,takeSnapshot:u,addRule:S,updateRule:_,deleteRule:C}},{sites:P,siteMap:I}=Ji({sites:i,nodePort:r.port});return h.sites=P,h.siteMap=I,h.domains=l,h.allDomains=s,h.getBlockletUrl=({did:O,domain:b,mountPoint:m,params:g})=>eo({did:O,domain:b,mountPoint:m,siteMap:h.siteMap,params:g}),h.getBlockletUrls=({did:O,mountPoint:b,params:m})=>to({did:O,mountPoint:b,siteMap:h.siteMap,params:m}),e.jsx(Qi,{value:{routing:h},children:t})}function ue(){const{routing:t}=y.useContext(Pr);return t}function Zt(t){const n=[D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE,D.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var Jt={},ro=Se;Object.defineProperty(Jt,"__esModule",{value:!0});var Er=Jt.default=void 0,io=ro(Ce()),oo=e;Er=Jt.default=(0,io.default)((0,oo.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ao(){return null}function en({confirm:t}){const[n,r]=y.useState(null),{t:i}=z(),o=()=>{r(null)},l=async s=>{if(s){let d=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d==="/"?On.push(`${s.pathname}`):(d.endsWith("/")&&(d=d.substring(0,d.length-1)),On.push(`${d}${s.pathname}`)),window.location.reload()}},a=(s,...d)=>{let x=typeof t=="function"?t(s,...d):t;return x?(typeof x=="string"&&(x={description:x}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>o(),...x}),!1):!0};return e.jsxs(so,{children:[e.jsx(ao,{message:a}),n&&e.jsx(le,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}en.propTypes={confirm:f.oneOfType([f.object,f.string,f.func])};en.defaultProps={confirm:null};const so=re.div`
1
+ import{r as y,u as J,_ as Me,aI as ii,j as e,A as D,aJ as In,aK as pr,aL as oi,aM as Ln,aN as rt,aO as Ce,aP as Se,P as f,n as re,m as z,ae as le,aQ as On,aR as ai,aS as Fn,aT as si,y as se,M as Nn,k as A,t as G,aA as pe,aU as Oe,C as Y,V as je,B as X,aV as gr,X as xe,K as q,e as Kt,R as it,aW as li,d as Yt,aX as $e,aY as fe,ab as ci,aZ as di,a_ as ui,a2 as mi,x as hr,W as $n,T as Un,h as ne,a$ as Vt,a as Nt,Q as Z,b as pt,b0 as xr,b1 as yr,U as br,a4 as $t,b2 as fi,b3 as pi,b4 as gi,b5 as hi,b6 as ot,b7 as vr,a9 as xi,H as yi,b8 as bi,aH as Ze,b9 as vi,aa as Et,a7 as At,ba as ji,a8 as Ut,g as Xt,I as wi,bb as Ci,bc as jr,bd as Ee,be as Ae,bf as Si,bg as Di,D as wr,s as zt,al as _i,f as ki,bh as Ri,bi as zn,am as Ti,bj as Pi,bk as Cr,bl as te,bm as Ei,S as Bn,p as Mn,l as Wn,bn as Ai,bo as Ii}from"./index-CGargw6n.js";import{T as Li}from"./index-DDhjA_J6.js";import{d as Oi}from"./ArrowDropDown-BeVQ7W_f.js";import{u as Qt,C as M,a as qn}from"./index.esm-CvOsHG0z.js";import{S as ae}from"./switch-control-DSz3cmNm.js";import{P as ie}from"./permission-BY_usLPC.js";import{D as Sr,g as Fi}from"./index-L99IjMpo.js";import{d as Dr}from"./Link-BL98xVyl.js";import{d as we}from"./Delete-DibgMbRa.js";import{D as gt}from"./delete-confirm-CKJM7oLk.js";import{I as at}from"./index-CMPNSvEP.js";import{s as Ni}from"./logo-BKA11TRi.js";import{R as _r,a as Bt,b as $i,W as Je}from"./url-evaluation-Cjrq8Y2H.js";import{_ as Ui}from"./useLocalStorage-1IK8Xf3D.js";import{d as zi}from"./Refresh-VxrYYzfd.js";import{L as Bi}from"./LoadingButton-C1tBqNRZ.js";import{C as Mi,R as Wi,d as kr}from"./Public-Dr1m2N7G.js";import{d as Ue}from"./Add-Dr17acvQ.js";import{B as Rr,D as Hn}from"./status-D68KxBTS.js";import{i as qi}from"./is-path-prefix-equal-tP_Em7g6.js";import{d as Hi}from"./ChevronRight-BUxNE2e8.js";import{d as Gi}from"./MoreVert-BrdZPzwo.js";import{d as Tr}from"./Edit-CQIAI4Xx.js";import{d as Ki}from"./CallMerge-CuhH8Rfn.js";import{C as Yi}from"./CardContent-BhT4vmBc.js";import{w as Vi}from"./withStyles-DWVK59by.js";import{S as Xi}from"./Slider-B8HWvhga.js";import"./index-CL9Vrgs0.js";import"./Switch-CIGEpWB6.js";import"./TableRow-DSBApqUZ.js";import"./useThemeProps-Btw9Aun5.js";import"./emotion-react.browser.esm-CH67Z3jf.js";import"./ViewColumn-DZ8hNz9g.js";import"./Search-DqihVCic.js";import"./Clear-DiiXyvpY.js";import"./index-g4Pa9QCu.js";import"./TableSearch-C3sQDzER.js";import"./click-to-copy-DunM7RYV.js";const ve="Dashboard",Pr=y.createContext({}),{Provider:Qi,Consumer:Hs}=Pr,Gn=[ve,D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP],Zi=(t,n)=>{if(t.name===D.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===D.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=Gn.includes(t.name),i=Gn.includes(n.name);return r&&i?Ln(t.name,n.name):r?-1:i?1:Ln(t.name,n.name)},Ji=({sites:t,nodePort:n})=>{const r=window.location.hostname,o=(t||[]).map(a=>{const{id:s,rules:d=[],corsAllowedOrigins:x=[]}=a;let{domain:c,domainAliases:u}=a;u=u||[],[D.DOMAIN_FOR_IP_SITE,D.DOMAIN_FOR_IP_SITE_REGEXP].includes(c)&&(c=ve,u.find(w=>w.value===r)||u.unshift({protected:!1,value:r}));const p={id:s,name:c,type:"domain",items:[],domainAliases:u,isProtected:a.isProtected,corsAllowedOrigins:x};return(d||[]).forEach(w=>{const{id:j,isProtected:R,from:{pathPrefix:v},to:S}=w;if(S.type===D.ROUTING_RULE_TYPES.BLOCKLET){let _="";Number.parseInt(S.port,10)===Number.parseInt(n,10)?(_="Blocklet Server Dashboard",S.type=D.ROUTING_RULE_TYPES.DAEMON):_=S.did,p.items.push({id:j,name:In(v||"/"),title:_,type:"rule",isProtected:R,pathPrefix:v,to:S})}else p.items.push({id:j,pathPrefix:v,name:In(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:R,to:S})}),p.items=pr(p.items,w=>w.name),p}).sort(Zi),l=o.reduce((a,s)=>{let{name:d}=s;return d.endsWith(D.BLOCKLET_SITE_GROUP_SUFFIX)&&([d]=d.split(".")),a[d]={...s,rules:s.items},a},{});return{sites:o,siteMap:l}},eo=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const l=i[t];if(!l)return null;const a=n||(l.domainAliases||[])[0];if(!a)return null;let s=r;if(!s){const d=l.rules.filter(x=>!x.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];s=d?d.name:"/"}return rt(a.value,s,o)},to=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const l=o.domainAliases||[];if(!l.length)return[];let a=n;if(!a){const s=o.rules.filter(d=>!d.name.startsWith(D.WELLKNOWN_PATH_PREFIX))[0];a=s?s.name:"/"}return l.map(s=>rt(s.value,a,i))},no=t=>{const n=t.map(i=>i.domain).filter(i=>![D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function Kn({children:t}){const{api:n,info:r}=J(),[i,o]=y.useState([]),[l,a]=y.useState([]),[s,d]=y.useState([]),x=Me(async()=>{const{sites:O}=await n.getRoutingSites({input:{snapshotHash:""}}),b=O||[];await Promise.all(b.map(async g=>(g.domainAliases=await ii(g.domainAliases,{getIP:oi}),g)));const m=no(b);o(b),a(m.domains),d([window.location.hostname,...m.domains,...m.domainsAliases.map(g=>g.value)])},[r]),c=(O,b)=>{o(m=>m.map(g=>g.id===O?b.domain?b:{...b,domain:g.domain}:g))},u=O=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(O)}}),p=async O=>{const b=await n.addRoutingSite({input:O});o(i.concat(b.site))},w=async(O,b)=>{const m=await n.updateRoutingSite({input:{id:O,...b}});if(m.site&&m.site.id){const g=i.findIndex(k=>k.id===m.site.id);g!==-1&&(i.splice(g,1,m.site),o([].concat(i)))}},j=async O=>{await n.deleteRoutingSite({input:{id:O}}),o(i.filter(b=>b.id!==O))},R=async(O,b,m)=>{const g=await n.addDomainAlias({input:{id:O,domainAlias:b,force:m}});c(O,g.site)},v=async(O,b)=>{const m=await n.deleteDomainAlias({input:{id:O,domainAlias:b}});c(O,m.site)},S=async(O,b)=>{const{site:m}=await n.addRoutingRule({input:{id:O,rule:b}});c(O,m)},_=async(O,b)=>{const{site:m}=await n.updateRoutingRule({input:{id:O,rule:b}});c(O,m)},C=async(O,b)=>{const{site:m}=await n.deleteRoutingRule({input:{id:O,ruleId:b}});c(O,m)},h={loading:x.loading,error:x.error,refresh:x.retry,api:n,actions:{addSite:p,updateSite:w,deleteSite:j,addDomainAlias:R,deleteDomainAlias:v,takeSnapshot:u,addRule:S,updateRule:_,deleteRule:C}},{sites:P,siteMap:I}=Ji({sites:i,nodePort:r.port});return h.sites=P,h.siteMap=I,h.domains=l,h.allDomains=s,h.getBlockletUrl=({did:O,domain:b,mountPoint:m,params:g})=>eo({did:O,domain:b,mountPoint:m,siteMap:h.siteMap,params:g}),h.getBlockletUrls=({did:O,mountPoint:b,params:m})=>to({did:O,mountPoint:b,siteMap:h.siteMap,params:m}),e.jsx(Qi,{value:{routing:h},children:t})}function ue(){const{routing:t}=y.useContext(Pr);return t}function Zt(t){const n=[D.DOMAIN_FOR_IP_SITE_REGEXP,D.DOMAIN_FOR_DEFAULT_SITE,D.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var Jt={},ro=Se;Object.defineProperty(Jt,"__esModule",{value:!0});var Er=Jt.default=void 0,io=ro(Ce()),oo=e;Er=Jt.default=(0,io.default)((0,oo.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ao(){return null}function en({confirm:t}){const[n,r]=y.useState(null),{t:i}=z(),o=()=>{r(null)},l=async s=>{if(s){let d=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";d==="/"?On.push(`${s.pathname}`):(d.endsWith("/")&&(d=d.substring(0,d.length-1)),On.push(`${d}${s.pathname}`)),window.location.reload()}},a=(s,...d)=>{let x=typeof t=="function"?t(s,...d):t;return x?(typeof x=="string"&&(x={description:x}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>l(s),onCancel:()=>o(),...x}),!1):!0};return e.jsxs(so,{children:[e.jsx(ao,{message:a}),n&&e.jsx(le,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}en.propTypes={confirm:f.oneOfType([f.object,f.string,f.func])};en.defaultProps={confirm:null};const so=re.div`
2
2
  margin-bottom: 24px;
3
3
  .top-btns-alert {
4
4
  @media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
@@ -1,4 +1,4 @@
1
- import{n as P,K as b,Z as X,j as e,$ as be,r as f,P as E,m as O,a0 as Ge,a1 as ve,a2 as j,a3 as He,a4 as re,a5 as qe,y as M,X as Z,a6 as Ve,k as L,T as Ye,a7 as Ke,B as U,D as Qe,C as Se,s as Xe,t as Ze,V as je,a8 as Je,a9 as et,aa as tt,u as I,e as st,ab as W,o as oe,z as ot,ac as ne,x as Ce,q as ae,ad as rt,W as ie,g as J,v as Pe,w as ee,ae as nt,af as at,ag as Re,ah as it,b as B,ai as xe,aj as lt,I as ct,ak as dt,M as pt,E as Te,al as ht,am as mt,an as Ee,ao as De,ap as Be,aq as Ue,ar as Oe,as as N,at as _e,au as Ae,av as Fe,aw as ut}from"./index-DTI4BkNW.js";import{t as ft}from"./toLower-BPzu2rPJ.js";import{P as H,L as xt,A as gt,S as Le,a as $e}from"./index-DMDws1yA.js";import{A as yt,D as le,u as wt,W as kt,P as bt,L as Ne,S as Me,a as Ie}from"./wait-container-DB7Fvl8u.js";import{g as te}from"./get-safe-url-BJSiqBsp.js";import{_ as ge}from"./useLocalStorage-yyXOU8sf.js";import{d as vt}from"./Launch-Dw-I3nnd.js";import{d as St}from"./DeleteOutline-Cx4fsGxu.js";import{g as jt,i as Ct}from"./spaces-C11TOrvj.js";import{d as Pt}from"./MoreVert-ygAE5zXH.js";import{E as Rt}from"./index-3KlQvd1f.js";import"./url-join-CwE3EUnC.js";import"./Close-qBNbi4Ug.js";import"./api-B2krrsTm.js";function ce({children:s,selected:i}){return e.jsxs(Tt,{children:[s,e.jsx(b,{className:`selected-container ${i?"selected":""}`,children:e.jsx(be,{className:"selected-icon"})})]})}const Tt=P(b)`
1
+ import{n as P,K as b,Z as X,j as e,$ as be,r as f,P as E,m as O,a0 as Ge,a1 as ve,a2 as j,a3 as He,a4 as re,a5 as qe,y as M,X as Z,a6 as Ve,k as L,T as Ye,a7 as Ke,B as U,D as Qe,C as Se,s as Xe,t as Ze,V as je,a8 as Je,a9 as et,aa as tt,u as I,e as st,ab as W,o as oe,z as ot,ac as ne,x as Ce,q as ae,ad as rt,W as ie,g as J,v as Pe,w as ee,ae as nt,af as at,ag as Re,ah as it,b as B,ai as xe,aj as lt,I as ct,ak as dt,M as pt,E as Te,al as ht,am as mt,an as Ee,ao as De,ap as Be,aq as Ue,ar as Oe,as as N,at as _e,au as Ae,av as Fe,aw as ut}from"./index-CGargw6n.js";import{t as ft}from"./toLower-CRFOnVAM.js";import{P as H,L as xt,A as gt,S as Le,a as $e}from"./index-EiK_j914.js";import{A as yt,D as le,u as wt,W as kt,P as bt,L as Ne,S as Me,a as Ie}from"./wait-container-B7LdKBV0.js";import{g as te}from"./get-safe-url-BswgeNVU.js";import{_ as ge}from"./useLocalStorage-1IK8Xf3D.js";import{d as vt}from"./Launch-Dss7Qu-X.js";import{d as St}from"./DeleteOutline-vkCr-A0J.js";import{g as jt,i as Ct}from"./spaces-Cg3ymUIh.js";import{d as Pt}from"./MoreVert-BrdZPzwo.js";import{E as Rt}from"./index-g4Pa9QCu.js";import"./url-join-Mz1JcbbA.js";import"./Close-Cx2b036Y.js";import"./api-CWQIMtn6.js";function ce({children:s,selected:i}){return e.jsxs(Tt,{children:[s,e.jsx(b,{className:`selected-container ${i?"selected":""}`,children:e.jsx(be,{className:"selected-icon"})})]})}const Tt=P(b)`
2
2
  position: relative;
3
3
 
4
4
  .selected-container {
@@ -1,4 +1,4 @@
1
- import{bY as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,bk as getDefaultExportFromCjs,n as newStyled,E as useMediaQuery,fE as Skeleton,cS as Img,$ as default_1$1,aA as Tooltip,en as Button,k as Typography,C as CircularProgress,b7 as styled,al as useTheme,fd as isObject,dy as deepmerge,dQ as StyledEngineProvider,dR as ThemeProvider,fF as ThemeProvider$1,fG as HeaderAddons,fH as Hidden,Y as Center,aO as requireCreateSvgIcon,aP as interopRequireDefaultExports,fI as Check,d6 as commonjsGlobal,cK as Buffer,bg as React,fh as noop,dn as styled$1}from"./index-DTI4BkNW.js";import{j as joinUrl}from"./url-join-CwE3EUnC.js";import{C as CloseIcon}from"./Close-qBNbi4Ug.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,a,s=window.location.pathname.replace(/\/$/,"/"))=>i?a?i===s:new RegExp(i).test(s):!1;function StepProvider({children:i,steps:a,mode:s}){const[o,u]=reactExports.useState("");!o&&a.length&&u(a[0].key);const E=a.map(V=>V.children?[{key:V.key,hasChild:!0},V.children.map(j=>({parentKey:V.key,key:j.key}))]:{key:V.key}).flat(1/0),S=E.filter(V=>!V.hasChild),T=V=>{let j;const I=E.findIndex($=>$.key===o?(j=$.parentKey,!0):!1);if(j===V)return"current";const M=E.findIndex($=>$.key===V);if(M!==-1){if(M===I)return"current";if(M<I)return"before"}return"after"};function P(V){u(V)}function C(V){if(typeof V=="function"){const j=V(S.findIndex(I=>I.key===o));u(S[j].key)}else u(S[V].key)}const B=S.findIndex(V=>V.key===o);reactExports.useEffect(()=>{if(s==="history"){let V="";a.some(j=>j.children&&j.children.length?j.children.some(I=>matchPath(I.path,I.exact)?(V=I.key,!0):!1):matchPath(j.path,j.exact)?(V=j.key,!0):!1),V&&u(V)}return()=>{}},[a,s]);const L={steps:a,totalStepsCount:S.length,getStepStatus:T,setActiveStepByKey:P,setActiveStepByIndex:C,activeStep:B,canBackToStep:V=>s==="memory"&&B!==0&&V<B};return jsxRuntimeExports.jsx(Provider,{value:L,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var a in i)if(has.call(i,a))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:a,logoUrl:s,locale:o,navLogo:u,loading:E}){const S=useMediaQuery(L=>L.breakpoints.down("md")),T=S?18:48,P=reactExports.useRef(null),[C,B]=reactExports.useState("");return reactExports.useEffect(()=>{P.current&&P.current.offsetHeight>34&&(C===""?B("middle"):C==="middle"&&B("small"))},[C]),jsxRuntimeExports.jsxs(Container$2,{className:C==="small"?"center-mode":"",children:[S?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[E&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:T,isMobile:S}),!E&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:T,logoUrl:s})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[S&&a&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:a}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!S&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:a||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${C==="middle"||C==="small"?"middle-size":""}`,ref:P,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:s,isMobile:S,blockletMeta:i,blockletSize:T,loading:E})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:a}){return a?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:a}){return jsxRuntimeExports.jsx(Img,{width:a,height:a,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:a,blockletMeta:s,blockletSize:o,loading:u}){const E=getBlockletDisplayName(s);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(s)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:a}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(s)})]}):jsxRuntimeExports.jsx(AppLink,{className:"app-link",target:"_blank",href:joinUrl((s==null?void 0:s.registryUrl)||"",`/blocklets/${s==null?void 0:s.did}`),title:E,children:E})}const MobileTitleStyle=newStyled.div`
1
+ import{bW as createSvgIcon,j as jsxRuntimeExports,r as reactExports,P as PropTypes,bk as getDefaultExportFromCjs,n as newStyled,E as useMediaQuery,fF as Skeleton,cR as Img,$ as default_1$1,aA as Tooltip,eo as Button,k as Typography,C as CircularProgress,b7 as styled,al as useTheme,fe as isObject,dz as deepmerge,dR as StyledEngineProvider,dS as ThemeProvider,fG as ThemeProvider$1,fH as HeaderAddons,fI as Hidden,Y as Center,aO as requireCreateSvgIcon,aP as interopRequireDefaultExports,fJ as Check,d7 as commonjsGlobal,cE as Buffer,bg as React,fi as noop,dp as styled$1}from"./index-CGargw6n.js";import{j as joinUrl}from"./url-join-Mz1JcbbA.js";import{C as CloseIcon}from"./Close-Cx2b036Y.js";const PriorityHigh=createSvgIcon([jsxRuntimeExports.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),jsxRuntimeExports.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh"),StepContext=reactExports.createContext(),{Provider}=StepContext,matchPath=(i,a,s=window.location.pathname.replace(/\/$/,"/"))=>i?a?i===s:new RegExp(i).test(s):!1;function StepProvider({children:i,steps:a,mode:s}){const[o,u]=reactExports.useState("");!o&&a.length&&u(a[0].key);const E=a.map(V=>V.children?[{key:V.key,hasChild:!0},V.children.map(j=>({parentKey:V.key,key:j.key}))]:{key:V.key}).flat(1/0),S=E.filter(V=>!V.hasChild),T=V=>{let j;const I=E.findIndex($=>$.key===o?(j=$.parentKey,!0):!1);if(j===V)return"current";const M=E.findIndex($=>$.key===V);if(M!==-1){if(M===I)return"current";if(M<I)return"before"}return"after"};function P(V){u(V)}function C(V){if(typeof V=="function"){const j=V(S.findIndex(I=>I.key===o));u(S[j].key)}else u(S[V].key)}const B=S.findIndex(V=>V.key===o);reactExports.useEffect(()=>{if(s==="history"){let V="";a.some(j=>j.children&&j.children.length?j.children.some(I=>matchPath(I.path,I.exact)?(V=I.key,!0):!1):matchPath(j.path,j.exact)?(V=j.key,!0):!1),V&&u(V)}return()=>{}},[a,s]);const L={steps:a,totalStepsCount:S.length,getStepStatus:T,setActiveStepByKey:P,setActiveStepByIndex:C,activeStep:B,canBackToStep:V=>s==="memory"&&B!==0&&V<B};return jsxRuntimeExports.jsx(Provider,{value:L,children:i})}function useStepContext(){return reactExports.useContext(StepContext)}StepProvider.propTypes={children:PropTypes.any.isRequired,steps:PropTypes.array.isRequired,mode:PropTypes.string};StepProvider.defaultProps={mode:"history"};var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;function isEmpty(i){if(i==null)return!0;if(typeof i=="boolean")return!1;if(typeof i=="number")return i===0;if(typeof i=="string"||typeof i=="function"||Array.isArray(i))return i.length===0;if(i instanceof Error)return i.message==="";if(i.toString==toString)switch(i.toString()){case"[object File]":case"[object Map]":case"[object Set]":return i.size===0;case"[object Object]":{for(var a in i)if(has.call(i,a))return!1;return!0}}return!1}var lib=isEmpty;const isEmpty$1=getDefaultExportFromCjs(lib),defaultBlockletLogo=""+new URL("blocklet-default-logo-Bspnu_ws.png",import.meta.url).href,translations={en:{optional:"Optional",defaultNavSubTitle:"Launching"},zh:{optional:"可选",defaultNavSubTitle:"启动"}},getTranslations=i=>translations[i]?translations[i]:translations.en,getLaunchingText=i=>i==="zh"?"启动":"Launching",getBlockletDisplayName=i=>(i==null?void 0:i.title)||(i==null?void 0:i.name)||"";function AppHeader({blockletMeta:i,subTitle:a,logoUrl:s,locale:o,navLogo:u,loading:E}){const S=useMediaQuery(L=>L.breakpoints.down("md")),T=S?18:48,P=reactExports.useRef(null),[C,B]=reactExports.useState("");return reactExports.useEffect(()=>{P.current&&P.current.offsetHeight>34&&(C===""?B("middle"):C==="middle"&&B("small"))},[C]),jsxRuntimeExports.jsxs(Container$2,{className:C==="small"?"center-mode":"",children:[S?jsxRuntimeExports.jsx("div",{className:"app-icon",children:u}):jsxRuntimeExports.jsxs("div",{className:"app-icon",children:[E&&jsxRuntimeExports.jsx(AppIconSkeleton,{blockletSize:T,isMobile:S}),!E&&jsxRuntimeExports.jsx(AppIcon,{blockletSize:T,logoUrl:s})]}),jsxRuntimeExports.jsxs("div",{className:"header-title",children:[S&&a&&jsxRuntimeExports.jsx("div",{className:"header-title-sub",children:a}),jsxRuntimeExports.jsxs("div",{className:"app-name-content",children:[!S&&jsxRuntimeExports.jsx("div",{className:"launching-context",children:a||getLaunchingText(o)}),jsxRuntimeExports.jsx("div",{className:`header-title-name ${C==="middle"||C==="small"?"middle-size":""}`,ref:P,children:jsxRuntimeExports.jsx(AppTitle,{logoUrl:s,isMobile:S,blockletMeta:i,blockletSize:T,loading:E})})]})]})]})}AppHeader.propTypes={blockletMeta:PropTypes.object,subTitle:PropTypes.any,logoUrl:PropTypes.string,locale:PropTypes.string,navLogo:PropTypes.any,loading:PropTypes.bool};AppHeader.defaultProps={subTitle:"",logoUrl:"",locale:"",navLogo:"",loading:!1,blockletMeta:{}};function AppIconSkeleton({blockletSize:i,isMobile:a}){return a?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:i,height:i})}function AppIcon({logoUrl:i,blockletSize:a}){return jsxRuntimeExports.jsx(Img,{width:a,height:a,src:i,alt:"blocklet icon",fallback:defaultBlockletLogo,style:{verticalAlign:"text-bottom"}},`layout-app-icon-${i}`)}function AppTitle({isMobile:i,logoUrl:a,blockletMeta:s,blockletSize:o,loading:u}){const E=getBlockletDisplayName(s);return u?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",width:100,height:16,alt:"icon",style:{marginTop:4}}):isEmpty$1(s)?jsxRuntimeExports.jsx(Skeleton,{variant:"rectangular",animation:!1,width:100,height:16,alt:"icon",style:{marginTop:4}}):i?jsxRuntimeExports.jsxs(MobileTitleStyle,{children:[jsxRuntimeExports.jsx(AppIcon,{blockletSize:o,logoUrl:a}),jsxRuntimeExports.jsx("span",{className:"ellipsis-title",children:getBlockletDisplayName(s)})]}):jsxRuntimeExports.jsx(AppLink,{className:"app-link",target:"_blank",href:joinUrl((s==null?void 0:s.registryUrl)||"",`/blocklets/${s==null?void 0:s.did}`),title:E,children:E})}const MobileTitleStyle=newStyled.div`
2
2
  .ellipsis-title {
3
3
  flex: 1;
4
4
  position: absolute;