@abtnode/blocklet-services 1.16.32-beta-04a5da00 → 1.16.32-beta-4d47ae7f

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 (212) hide show
  1. package/api/services/auth/connect/receive-transfer-app-owner.js +8 -5
  2. package/dist/assets/{Add-2VoKTpUb.js → Add-D8_0U-mi.js} +1 -1
  3. package/dist/assets/{AddBox-Dl7mso27.js → AddBox-BpwHbwbG.js} +1 -1
  4. package/dist/assets/{Alert-DPUEB95E.js → Alert-Dlco0B3L.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-0yDa2aHH.js → ArrowDropDown-exkF-BIK.js} +1 -1
  6. package/dist/assets/{Avatar-Cw952dlh.js → Avatar-B1SFM1MR.js} +1 -1
  7. package/dist/assets/{ButtonGroup-d0oDm0RO.js → ButtonGroup-CTrZ2Hyv.js} +1 -1
  8. package/dist/assets/{CheckCircle-CyZ2-BIj.js → CheckCircle-BNxyw6NJ.js} +1 -1
  9. package/dist/assets/{ChevronRight-DDyzifk9.js → ChevronRight-DBpo88DV.js} +1 -1
  10. package/dist/assets/{Close-BkBXMJo_.js → Close-DgxsFA7q.js} +1 -1
  11. package/dist/assets/{CloseOutlined-DmlGPmzq.js → CloseOutlined-CN4iKY7n.js} +1 -1
  12. package/dist/assets/{Delete-B2wSgiTE.js → Delete-BaSq9RZZ.js} +1 -1
  13. package/dist/assets/{DeleteOutline-BMqkCxEq.js → DeleteOutline-Du2BPdlg.js} +1 -1
  14. package/dist/assets/{Done-ZAZhEq2L.js → Done-BG-Fw8ts.js} +1 -1
  15. package/dist/assets/{Download-1xH6mRbf.js → Download-C1y29u9K.js} +1 -1
  16. package/dist/assets/{Edit-MvOKdBEJ.js → Edit-u2-N8rQN.js} +1 -1
  17. package/dist/assets/{EditIcon-B68lRQt1.js → EditIcon-B2Y7T-CN.js} +1 -1
  18. package/dist/assets/{Error-xmdfCNYq.js → Error-B1K0WhCp.js} +1 -1
  19. package/dist/assets/{ExpandMore-DkoxrM3F.js → ExpandMore-DBQIHjkB.js} +1 -1
  20. package/dist/assets/{FilterList-DbTqBTrF.js → FilterList-DumRQ8ls.js} +4 -4
  21. package/dist/assets/{FormControl-BUn4wQGt.js → FormControl-CeSJJZgZ.js} +1 -1
  22. package/dist/assets/{FormControlLabel-Cn1ZEQIw.js → FormControlLabel-CpH9LTeH.js} +1 -1
  23. package/dist/assets/{FormGroup-BDqHH6R7.js → FormGroup-B0Xdxgiy.js} +1 -1
  24. package/dist/assets/{Google-DwKupHqA.js → Google-CvB2nYH_.js} +1 -1
  25. package/dist/assets/Hidden-DJwWGZh0.js +1 -0
  26. package/dist/assets/{InfoOutlined-CgNZyv9N.js → InfoOutlined-BIY-Lnxg.js} +1 -1
  27. package/dist/assets/{InputAdornment-DKErxOxA.js → InputAdornment-VVruavKc.js} +1 -1
  28. package/dist/assets/{InputLabel-BU0FzAth.js → InputLabel-3M9sMlBq.js} +1 -1
  29. package/dist/assets/{LastPage-BRQIhdX7.js → LastPage-CBInTPpp.js} +1 -1
  30. package/dist/assets/{Launch-DZvL7Btt.js → Launch-Dhq-grBI.js} +1 -1
  31. package/dist/assets/{LaunchOutlined-BEo8P2Tl.js → LaunchOutlined-DnkKRXxH.js} +1 -1
  32. package/dist/assets/{Link-CPGMRK--.js → Link-Cpnh7s1v.js} +1 -1
  33. package/dist/assets/{ListItemText-D00e-P7J.js → ListItemText-CHjUage1.js} +1 -1
  34. package/dist/assets/{LoadingButton-Dnokttyl.js → LoadingButton-C47nsxMx.js} +1 -1
  35. package/dist/assets/{LockIcon-lwFTQyw5.js → LockIcon-CoUaWmH-.js} +1 -1
  36. package/dist/assets/{Loop-UQ-nGsCg.js → Loop-CbcENVkw.js} +1 -1
  37. package/dist/assets/{MoreHoriz-ClHVZaho.js → MoreHoriz-B4gnOmnB.js} +1 -1
  38. package/dist/assets/{MoreVert-D7siuKO-.js → MoreVert-CBWkVJTE.js} +1 -1
  39. package/dist/assets/{OpenInNew-Dn1FcPSH.js → OpenInNew-svkkbJCn.js} +1 -1
  40. package/dist/assets/{Pagination-EqcGDqMl.js → Pagination-BBwBFjSJ.js} +1 -1
  41. package/dist/assets/{PlayArrow-CnWuAQ7W.js → PlayArrow-D-mvqfoj.js} +1 -1
  42. package/dist/assets/{QuestionMarkCircle-B7Bpx0cE.js → QuestionMarkCircle-Duxt-AlB.js} +1 -1
  43. package/dist/assets/{RadioGroup-Bu2zmWw_.js → RadioGroup-C4DI71vM.js} +1 -1
  44. package/dist/assets/{Search-CQlVySI6.js → Search-BOxcXluh.js} +1 -1
  45. package/dist/assets/{Select-BzfN1x8W.js → Select-drnrjZt8.js} +1 -1
  46. package/dist/assets/{ServerLogo-DfCDjLNl.js → ServerLogo-CxVp5JLf.js} +1 -1
  47. package/dist/assets/{Skeleton-DqrgKJha.js → Skeleton-YurB3EC5.js} +1 -1
  48. package/dist/assets/{Slider-BtNkKS5B.js → Slider-BX1l_Lvj.js} +1 -1
  49. package/dist/assets/{Stepper-xGvqwz44.js → Stepper-UV_DHoEg.js} +1 -1
  50. package/dist/assets/{TextField-OgHHL_KP.js → TextField-D_Jtjg13.js} +1 -1
  51. package/dist/assets/{Toolbar-IW4D_zYa.js → Toolbar-D7_EWzTj.js} +1 -1
  52. package/dist/assets/{ViewList-BFQT-hmR.js → ViewList-Bwkry3LO.js} +1 -1
  53. package/dist/assets/access-control-YUBGali8.js +13 -0
  54. package/dist/assets/actions-5mXSkQB4.js +1 -0
  55. package/dist/assets/{add-component-core-BPcx3JYq.js → add-component-core-DFH5qH7x.js} +1 -1
  56. package/dist/assets/add-resource-BJ9u32jP.js +1 -0
  57. package/dist/assets/addon-CUxwPHa_.js +31 -0
  58. package/dist/assets/{analytics-C434vWOY.js → analytics-B29460Yu.js} +1 -1
  59. package/dist/assets/api-DbvHYaVa.js +1 -0
  60. package/dist/assets/audit-logs-C1AOwGce.js +58 -0
  61. package/dist/assets/{button-CR8UEQyZ.js → button-BqgSoT0h.js} +1 -1
  62. package/dist/assets/{click-to-copy-3x1G9XH4.js → click-to-copy-CM2U6JEg.js} +1 -1
  63. package/dist/assets/{complete-k3Qs8bm-.js → complete-DaiPBjLS.js} +4 -4
  64. package/dist/assets/{component-D-I8mVct.js → component-npmbPVSM.js} +1 -1
  65. package/dist/assets/{config-D3UgjDma.js → config-BygYwcXq.js} +1 -1
  66. package/dist/assets/{config-D5HYWnF4.js → config-CxG4Kz4G.js} +2 -2
  67. package/dist/assets/{config-navigation-CpN5oPZv.js → config-navigation-Rsc7sQGs.js} +1 -1
  68. package/dist/assets/confirm-3b8GTIgU.js +7 -0
  69. package/dist/assets/{connect-D07YGJkK.js → connect-26mFy5d9.js} +1 -1
  70. package/dist/assets/connect-B87FT6ev.js +5 -0
  71. package/dist/assets/connect-to-B0Td9yUD.js +54 -0
  72. package/dist/assets/{content-layout-DPij9Nh6.js → content-layout-B7X0Mv3n.js} +1 -1
  73. package/dist/assets/{dashboard-BeSQUyuf.js → dashboard-BrV_SESr.js} +8 -8
  74. package/dist/assets/{did-address-43xkXM21.js → did-address-BWnma-3-.js} +1 -1
  75. package/dist/assets/domain-CkCbH8sj.js +9 -0
  76. package/dist/assets/domain-list-wgNQeEgv.js +15 -0
  77. package/dist/assets/{exchange-passport--fiEF2lu.js → exchange-passport-BZ8Q-G3h.js} +1 -1
  78. package/dist/assets/{fallback-Cn_W-m4r.js → fallback-C5E1lZAR.js} +1 -1
  79. package/dist/assets/{format-error-Bn7NObKb.js → format-error-BVI56bJg.js} +1 -1
  80. package/dist/assets/fuel-XF4sXoDA.js +32 -0
  81. package/dist/assets/fullpage-BOyZgu9A.js +1 -0
  82. package/dist/assets/{home-C1E0r4u0.js → home-Dajv5NTd.js} +1 -1
  83. package/dist/assets/{iframe-EFuUBe3_.js → iframe-CmugPIuF.js} +1 -1
  84. package/dist/assets/{index-BnsMQNE7.js → index-2xySyQ5i.js} +2 -2
  85. package/dist/assets/{index-CKp5dXwW.js → index-B0NvcpjT.js} +1 -1
  86. package/dist/assets/index-B7Un-ZeO.js +68 -0
  87. package/dist/assets/{index-Bdey46ix.js → index-BK4259Qj.js} +1 -1
  88. package/dist/assets/index-BP53WpUP.js +4 -0
  89. package/dist/assets/{index-Cb0PVWPM.js → index-BRJLJSjg.js} +2 -2
  90. package/dist/assets/{index-CosdjVLd.js → index-BiafpQ0u.js} +16 -16
  91. package/dist/assets/index-BisUmH-h.js +1 -0
  92. package/dist/assets/index-BrcKk7u6.js +1 -0
  93. package/dist/assets/{index-QiNYWFY0.js → index-BtQK2llU.js} +1 -1
  94. package/dist/assets/{index-cz02fWRO.js → index-BtQOF6n3.js} +1 -1
  95. package/dist/assets/{index-DFjXeol_.js → index-BvZ1bsPZ.js} +1 -1
  96. package/dist/assets/{index-BtPZTcXb.js → index-C0qYe9TG.js} +1 -1
  97. package/dist/assets/{index-Dg03Eob-.js → index-C1Puqx4M.js} +1 -1
  98. package/dist/assets/{index-DesPWyQa.js → index-C2sin8wt.js} +1 -1
  99. package/dist/assets/{index-xkcMt7XQ.js → index-CFmNTsQh.js} +1 -1
  100. package/dist/assets/{index-s7iKiLXT.js → index-CLQi4cVY.js} +6 -6
  101. package/dist/assets/{index-CjW-BiBJ.js → index-CTFB4nHV.js} +1 -1
  102. package/dist/assets/{index-oDZbyv4v.js → index-Ca5y7O4k.js} +4 -4
  103. package/dist/assets/{index-BJtcCGWr.js → index-Cixwi4BX.js} +1 -1
  104. package/dist/assets/index-CrurRDDC.js +1 -0
  105. package/dist/assets/{index-C0SGixzY.js → index-D0ZBFe_v.js} +9 -9
  106. package/dist/assets/{index-UGGSjH4u.js → index-D5lkEFWM.js} +1 -1
  107. package/dist/assets/{index-CvPYqGkG.js → index-DCkU-F0r.js} +1 -1
  108. package/dist/assets/{index-BLVcicxZ.js → index-DHNVLiI8.js} +1 -1
  109. package/dist/assets/{index-CTfT52DI.js → index-DPyKucXe.js} +1 -1
  110. package/dist/assets/{index-BCp3frMn.js → index-Dcphtm5y.js} +1 -1
  111. package/dist/assets/{index-DIxJxM78.js → index-DfZjT3WA.js} +2 -2
  112. package/dist/assets/{index-BZUzIWGh.js → index-TlMkikTm.js} +1 -1
  113. package/dist/assets/{index-D5vX4Ooa.js → index-UKHQeYs5.js} +1 -1
  114. package/dist/assets/{index-DwqzQo9e.js → index-hv_yaUi2.js} +5 -5
  115. package/dist/assets/{index-Cvw6NSyS.js → index-p81jbN_h.js} +1 -1
  116. package/dist/assets/{index.es-DohPHCUD.js → index.es-w-0rtBPs.js} +1 -1
  117. package/dist/assets/{index.esm-Beu0fK3G.js → index.esm-CptJw3C8.js} +1 -1
  118. package/dist/assets/{invitation-c2LXgJZO.js → invitation-KAlNPJe6.js} +2 -2
  119. package/dist/assets/invite-C_RF0Rm2.js +10 -0
  120. package/dist/assets/{issue-passport-CCZaXyql.js → issue-passport-DM7CKvcB.js} +1 -1
  121. package/dist/assets/{item-CBjm7rgp.js → item-DIkrlQMP.js} +1 -1
  122. package/dist/assets/{jss-plugin-props-sort.esm-D6EO5AkF.js → jss-plugin-props-sort.esm-BzROyw1n.js} +1 -1
  123. package/dist/assets/{launch-result-message-DAGuAhAQ.js → launch-result-message-CIfX9Pg1.js} +1 -1
  124. package/dist/assets/{layout-oG70Renu.js → layout-Bb2LZLxa.js} +2 -2
  125. package/dist/assets/list-header-BDhQIu5L.js +57 -0
  126. package/dist/assets/localization-V0WRiXKC.js +1 -0
  127. package/dist/assets/{log-BmIrjtPp.js → log-o0iKO5dx.js} +1 -1
  128. package/dist/assets/{login-juMWHvtW.js → login-B9UvusG-.js} +1 -1
  129. package/dist/assets/{login-oauth-callback-_A65YhiH.js → login-oauth-callback-cZ3oa4a_.js} +1 -1
  130. package/dist/assets/{logo-uploader-P1VlMV5V.js → logo-uploader-D4yqBa_O.js} +3 -3
  131. package/dist/assets/{lost-passport-BkiX_vW7.js → lost-passport-soFqeEb7.js} +4 -4
  132. package/dist/assets/{lottie-Cf2K1-ns.js → lottie-DsjCdNh-.js} +1 -1
  133. package/dist/assets/notifications-B9Mu8Fxb.js +62 -0
  134. package/dist/assets/{open-window-DvlHyaGG.js → open-window-B5RcEIrm.js} +1 -1
  135. package/dist/assets/overview-CFbnZdV0.js +12 -0
  136. package/dist/assets/page-header-BvuGyCDw.js +31 -0
  137. package/dist/assets/{permission-DaB1xF5g.js → permission-BuA9Zt4q.js} +1 -1
  138. package/dist/assets/{preferences-Td5o-d6-.js → preferences-BzcjmMUC.js} +1 -1
  139. package/dist/assets/publish-resource-DwhFCZXw.js +1 -0
  140. package/dist/assets/{react-CwZHH_b9.js → react-CwUjkFxY.js} +3 -3
  141. package/dist/assets/{redux-uiwtTAq3.js → redux-BDPBPXLM.js} +1 -1
  142. package/dist/assets/{resource-dialog-D8uC-XQU.js → resource-dialog-BBzXGjTp.js} +1 -1
  143. package/dist/assets/sdk-CI7TJ_xu.js +1 -0
  144. package/dist/assets/selector-DktPytoX.js +48 -0
  145. package/dist/assets/session-Cw-dytKR.js +1 -0
  146. package/dist/assets/setup-DRfpHXNv.js +19 -0
  147. package/dist/assets/{shorten-label-DHOOsTvW.js → shorten-label-3owfLRzi.js} +1 -1
  148. package/dist/assets/{slicedToArray-shTeAcQc.js → slicedToArray-CQG0j1sa.js} +1 -1
  149. package/dist/assets/{spaces-BirpDOm3.js → spaces-DDj9ynWl.js} +1 -1
  150. package/dist/assets/start-DCKDZC67.js +187 -0
  151. package/dist/assets/step-actions-CoJc8417.js +31 -0
  152. package/dist/assets/studio-B_0UB40R.js +6 -0
  153. package/dist/assets/switch-control-Bun_5Zkk.js +13 -0
  154. package/dist/assets/{toUpper-BAGcwHI1.js → toUpper-Bf_TQKK7.js} +1 -1
  155. package/dist/assets/transfer-C7Cxyvnx.js +16 -0
  156. package/dist/assets/{uniqBy-C2dKepDX.js → uniqBy-BqI7ffNX.js} +1 -1
  157. package/dist/assets/{unsubscribe-CLOTSJNJ.js → unsubscribe-B-iaO9gM.js} +1 -1
  158. package/dist/assets/{url-join-CTlMVeSl.js → url-join-BoNn2Qh7.js} +1 -1
  159. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BniHEOwv.js → use-blocklet-info-for-connect-did-spaces-CfK0RcTD.js} +1 -1
  160. package/dist/assets/use-mobile-C19pzcVe.js +1 -0
  161. package/dist/assets/{useAsync-C-N7xB1Q.js → useAsync-Ca_M5Jhn.js} +1 -1
  162. package/dist/assets/{useFormControl-DqoBF9iH.js → useFormControl-Cs3LGXJe.js} +1 -1
  163. package/dist/assets/{useLocalStorage-kWCrVKjB.js → useLocalStorage-3-rj5S6B.js} +1 -1
  164. package/dist/assets/{useSetState-B68uVZku.js → useSetState-BTR-3GfC.js} +1 -1
  165. package/dist/assets/{useSlot-CQP4hUUG.js → useSlot-C1f6ZTLt.js} +1 -1
  166. package/dist/assets/{useSlotProps-DMBoZT8C.js → useSlotProps-CCXsWmb3.js} +1 -1
  167. package/dist/assets/{useThemeProps-V4iYGCCr.js → useThemeProps-BjkDmxHT.js} +1 -1
  168. package/dist/assets/user-center-BN2FDsvO.js +1 -0
  169. package/dist/assets/user-sessions-BIEmgTqD.js +1 -0
  170. package/dist/assets/{util-D_sPE-Qe.js → util-DBNeRhAr.js} +1 -1
  171. package/dist/assets/{wrap-locale-BrsNecIZ.js → wrap-locale-D7L9anic.js} +1 -1
  172. package/dist/index.html +1 -1
  173. package/dist/service-worker.js +1 -1
  174. package/package.json +18 -18
  175. package/dist/assets/Hidden-w-nWLLe2.js +0 -1
  176. package/dist/assets/access-control-2b9mvnB3.js +0 -13
  177. package/dist/assets/actions-DaKlRJnV.js +0 -1
  178. package/dist/assets/add-resource-2dxnZcDy.js +0 -1
  179. package/dist/assets/addon-CSAbVfSS.js +0 -31
  180. package/dist/assets/api-_ltIr2BU.js +0 -1
  181. package/dist/assets/audit-logs-CZte5uoR.js +0 -58
  182. package/dist/assets/confirm-CtLbKcS0.js +0 -7
  183. package/dist/assets/connect-B7XAaWGG.js +0 -5
  184. package/dist/assets/connect-to-COqWAMKF.js +0 -54
  185. package/dist/assets/domain-4Nq3hHWj.js +0 -9
  186. package/dist/assets/domain-list-M6G-dRKq.js +0 -15
  187. package/dist/assets/fuel-Df5fciLt.js +0 -32
  188. package/dist/assets/fullpage-DTRlawT9.js +0 -1
  189. package/dist/assets/index-98pN37bN.js +0 -4
  190. package/dist/assets/index-B29G6Shi.js +0 -1
  191. package/dist/assets/index-BrwvkAJ2.js +0 -68
  192. package/dist/assets/index-Bup-bUaa.js +0 -1
  193. package/dist/assets/index-D9l4FLNE.js +0 -1
  194. package/dist/assets/invite-um-OhXL2.js +0 -10
  195. package/dist/assets/list-header-DfX9T1rW.js +0 -57
  196. package/dist/assets/localization-C8kIKwrb.js +0 -1
  197. package/dist/assets/notifications-DwrtVs17.js +0 -62
  198. package/dist/assets/overview-BIRtop8p.js +0 -12
  199. package/dist/assets/page-header-CNwTM6gh.js +0 -31
  200. package/dist/assets/publish-resource-WQmyUOcm.js +0 -1
  201. package/dist/assets/sdk-ByGrtgOC.js +0 -1
  202. package/dist/assets/selector-CLP7imhL.js +0 -48
  203. package/dist/assets/session-BmQaZaGU.js +0 -1
  204. package/dist/assets/setup-WlrDU92w.js +0 -19
  205. package/dist/assets/start-pnT_BQvG.js +0 -187
  206. package/dist/assets/step-actions-Dj3cCBJ3.js +0 -31
  207. package/dist/assets/studio-D3LuzSrd.js +0 -6
  208. package/dist/assets/switch-control-dGBNspU7.js +0 -13
  209. package/dist/assets/transfer-BPGSieyR.js +0 -16
  210. package/dist/assets/use-mobile-coO1LYtd.js +0 -1
  211. package/dist/assets/user-center-B6VeBSYd.js +0 -1
  212. package/dist/assets/user-sessions-Bdav9S_E.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-CwZHH_b9.js","assets/index-DIxJxM78.js","assets/index-D8NuaJ66.css","assets/index-D5vX4Ooa.js","assets/preact.module-DJUF--8d.js","assets/index-Bdey46ix.js","assets/index-BZUzIWGh.js","assets/toUpper-BAGcwHI1.js","assets/index-DFjXeol_.js","assets/fallback-Cn_W-m4r.js","assets/index-C0SGixzY.js","assets/Toolbar-IW4D_zYa.js","assets/Hidden-w-nWLLe2.js","assets/index-Cb0PVWPM.js","assets/MoreVert-D7siuKO-.js","assets/selector-CLP7imhL.js","assets/ExpandMore-DkoxrM3F.js","assets/Avatar-Cw952dlh.js","assets/useSlot-CQP4hUUG.js","assets/resource-dialog-D8uC-XQU.js","assets/OpenInNew-Dn1FcPSH.js","assets/CloseOutlined-DmlGPmzq.js","assets/use-mobile-coO1LYtd.js","assets/Link-CPGMRK--.js","assets/index-B29G6Shi.js","assets/index-BLVcicxZ.js","assets/index-CTfT52DI.js","assets/FormControlLabel-Cn1ZEQIw.js","assets/useFormControl-DqoBF9iH.js","assets/index-Dg03Eob-.js","assets/FilterList-DbTqBTrF.js","assets/useThemeProps-V4iYGCCr.js","assets/toPropertyKey-PLuKRk1e.js","assets/FormControl-BUn4wQGt.js","assets/FormGroup-BDqHH6R7.js","assets/InputLabel-BU0FzAth.js","assets/ListItemText-D00e-P7J.js","assets/Select-BzfN1x8W.js","assets/TextField-OgHHL_KP.js","assets/LastPage-BRQIhdX7.js","assets/index-cz02fWRO.js","assets/redux-uiwtTAq3.js","assets/Search-CQlVySI6.js","assets/Delete-B2wSgiTE.js","assets/index-Cvw6NSyS.js","assets/url-join-CTlMVeSl.js","assets/uniqBy-C2dKepDX.js","assets/react-BW7E7-P9.css"])))=>i.map(i=>d[i]);
2
- import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG as Fe,T as G,r as R,aJ as m1,aM as c2,aN as Ue,aO as qe,cP as d2,fx as l1,Z as Te,$ as Ne,B as z,n as Oe,P as h,a1 as We,G as X,e as v1,u as te,aQ as we,aZ as Ve,by as n1,a3 as e1,L as ue,bL as g0,a as ve,aD as ge,K as u2,t as $,a0 as ae,dw as p2,ab as ye,c as pe,I as h2,bW as g1,ch as b0,cE as f2,cN as He,cO as j0,ak as x2,d2 as m2,cI as Je,bF as re,c4 as Qe,fi as v2,a9 as X1,b as ne,bn as w0,dy as R0,aj as b1,bo as C0,co as y0,aU as Ae,aT as g2,a4 as z0,fy as J1,f7 as Me,bl as b2,av as S0,cV as j2,l as w2,aC as R2,ar as C2,as as i1}from"./index-DIxJxM78.js";import{d as j1}from"./Add-2VoKTpUb.js";import{d as y2}from"./AddBox-Dl7mso27.js";import{d as k0}from"./Delete-B2wSgiTE.js";import{d as z2}from"./Error-xmdfCNYq.js";import{D as w1}from"./index-Dg03Eob-.js";import{T as I0,b as S2}from"./index-CvPYqGkG.js";import{C as R1}from"./confirm-CtLbKcS0.js";import{u as s1}from"./session-BmQaZaGU.js";import{W as Q1}from"./did-address-43xkXM21.js";import{B as C1,d as k2}from"./ChevronRight-DDyzifk9.js";import{S as be}from"./shorten-label-DHOOsTvW.js";import{A as M0}from"./Avatar-Cw952dlh.js";import{d as I2}from"./Download-1xH6mRbf.js";import{d as M2}from"./QuestionMarkCircle-B7Bpx0cE.js";import{b as P2,c as Y1,T as L2}from"./index-B29G6Shi.js";import{_ as Ie}from"./useSetState-B68uVZku.js";import{c as y1}from"./index-BZUzIWGh.js";import{C as u1,F as p1,S as T2}from"./FormControlLabel-Cn1ZEQIw.js";import{A as P0}from"./Alert-DPUEB95E.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-_ltIr2BU.js";import{i as N2}from"./index-xkcMt7XQ.js";import{d as V2}from"./ExpandMore-DkoxrM3F.js";import{d as D2}from"./OpenInNew-Dn1FcPSH.js";import{u as L0}from"./useThemeProps-V4iYGCCr.js";import{u as _2}from"./useSlotProps-DMBoZT8C.js";import{d as E2}from"./DeleteOutline-BMqkCxEq.js";import{c as B2,A as T0,u as A2,S as O2,U as H2}from"./item-CBjm7rgp.js";import{d as $2}from"./ArrowDropDown-0yDa2aHH.js";import{f as Le}from"./format-error-Bn7NObKb.js";import{B as h1}from"./ButtonGroup-d0oDm0RO.js";import{T as Pe}from"./TextField-OgHHL_KP.js";import{I as z1}from"./InputAdornment-DKErxOxA.js";import{C as F2}from"./click-to-copy-3x1G9XH4.js";import{d as U2}from"./Launch-DZvL7Btt.js";import{L as q2}from"./MoreVert-D7siuKO-.js";import{a as W2}from"./ListItemText-D00e-P7J.js";import{S as Z1}from"./index-CTfT52DI.js";import{M as G2}from"./index-CjW-BiBJ.js";import{r as K2}from"./index-BJtcCGWr.js";import{d as X2}from"./Done-ZAZhEq2L.js";import{c as N0,d as V0,b as J2,S as Q2,a as Y2}from"./Stepper-xGvqwz44.js";import{R as Z2,a as e0}from"./RadioGroup-Bu2zmWw_.js";import"./FilterList-DbTqBTrF.js";import"./toPropertyKey-PLuKRk1e.js";import"./FormControl-BUn4wQGt.js";import"./useFormControl-DqoBF9iH.js";import"./FormGroup-BDqHH6R7.js";import"./InputLabel-BU0FzAth.js";import"./Select-BzfN1x8W.js";import"./LastPage-BRQIhdX7.js";import"./Toolbar-IW4D_zYa.js";import"./index-cz02fWRO.js";import"./redux-uiwtTAq3.js";import"./Search-CQlVySI6.js";import"./index-BLVcicxZ.js";import"./Link-CPGMRK--.js";import"./useSlot-CQP4hUUG.js";import"./jss-plugin-props-sort.esm-D6EO5AkF.js";const et=a2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),tt=["slots","slotProps"],ot=se(v0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:K1(e.palette.grey[200],.12)}:{backgroundColor:K1(e.palette.grey[600],.12)})})),lt=se(et)({width:24,height:16});function nt(e){const{slots:t={},slotProps:l={}}=e,s=je(e,tt),r=e;return o.jsx("li",{children:o.jsx(ot,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(lt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function st(e){return Fe("MuiBreadcrumbs",e)}const rt=$e("MuiBreadcrumbs",["root","ol","li","separator"]),it=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],at=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,t)},ct=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${rt.li}`]:t.li},t.root]})({}),dt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ut=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ut,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const D0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,it),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=at(v),S=c2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(nt,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(ct,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(dt,{className:C.ol,ref:N,ownerState:v,children:pt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ht(e){return Fe("MuiStepButton",e)}const t0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ft=["children","className","icon","optional"],xt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ht,t)},mt=se(v0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${t0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${t0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),vt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,ft),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),y=A({},s,{orientation:g}),p=xt(y),d={icon:i,optional:a},m=d2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(mt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function gt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const bt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],jt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},gt,t)},wt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Rt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Ct=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,bt);R.useContext(V0);const{active:x,last:g,expanded:y}=R.useContext(N0),p=A({},s,{last:g}),d=jt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(wt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Rt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},yt=Ne;Object.defineProperty(S1,"__esModule",{value:!0});var _0=S1.default=void 0,zt=yt(Te()),St=o;_0=S1.default=(0,zt.default)((0,St.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var k1={},kt=Ne;Object.defineProperty(k1,"__esModule",{value:!0});var E0=k1.default=void 0,It=kt(Te()),Mt=o;E0=k1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Se({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Se.propTypes={size:h.number};Se.defaultProps={size:24};function I1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(M0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}I1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function M1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Se,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(I1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(I0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Q1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(g0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(y2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(_0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(k0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(u2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Pt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(E0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(z2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}M1.propTypes={initUrl:h.object};M1.defaultProps={initUrl:null};const Pt=ae(z)`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-CwUjkFxY.js","assets/index-DfZjT3WA.js","assets/index-D8NuaJ66.css","assets/index-UKHQeYs5.js","assets/preact.module-DJUF--8d.js","assets/index-BK4259Qj.js","assets/index-TlMkikTm.js","assets/toUpper-Bf_TQKK7.js","assets/index-BvZ1bsPZ.js","assets/fallback-C5E1lZAR.js","assets/index-D0ZBFe_v.js","assets/Toolbar-D7_EWzTj.js","assets/Hidden-DJwWGZh0.js","assets/index-BRJLJSjg.js","assets/MoreVert-CBWkVJTE.js","assets/selector-DktPytoX.js","assets/ExpandMore-DBQIHjkB.js","assets/Avatar-B1SFM1MR.js","assets/useSlot-C1f6ZTLt.js","assets/resource-dialog-BBzXGjTp.js","assets/OpenInNew-svkkbJCn.js","assets/CloseOutlined-CN4iKY7n.js","assets/use-mobile-C19pzcVe.js","assets/Link-Cpnh7s1v.js","assets/index-CrurRDDC.js","assets/index-DHNVLiI8.js","assets/index-DPyKucXe.js","assets/FormControlLabel-CpH9LTeH.js","assets/useFormControl-Cs3LGXJe.js","assets/index-C1Puqx4M.js","assets/FilterList-DumRQ8ls.js","assets/useThemeProps-BjkDmxHT.js","assets/toPropertyKey-PLuKRk1e.js","assets/FormControl-CeSJJZgZ.js","assets/FormGroup-B0Xdxgiy.js","assets/InputLabel-3M9sMlBq.js","assets/ListItemText-CHjUage1.js","assets/Select-drnrjZt8.js","assets/TextField-D_Jtjg13.js","assets/LastPage-CBInTPpp.js","assets/index-BtQOF6n3.js","assets/redux-BDPBPXLM.js","assets/Search-BOxcXluh.js","assets/Delete-BaSq9RZZ.js","assets/index-p81jbN_h.js","assets/url-join-BoNn2Qh7.js","assets/uniqBy-BqI7ffNX.js","assets/react-BW7E7-P9.css"])))=>i.map(i=>d[i]);
2
+ import{as as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG as Fe,T as G,r as R,aJ as m1,aM as c2,aN as Ue,aO as qe,cP as d2,fx as l1,X as Te,Y as Ne,B as z,n as Oe,P as h,$ as We,G as X,e as v1,u as te,aQ as we,aZ as Ve,by as n1,a1 as e1,L as ue,bL as g0,a as ve,aD as ge,K as u2,t as $,Z as ae,dw as p2,a9 as ye,c as pe,I as h2,bW as g1,ch as b0,cE as f2,cN as He,cO as j0,ai as x2,d2 as m2,cI as Je,bF as re,c4 as Qe,fi as v2,a7 as X1,b as ne,bn as w0,dy as R0,ah as b1,bo as C0,co as y0,aU as Ae,aT as g2,a2 as z0,fy as J1,f7 as Me,bl as b2,at as S0,cV as j2,l as w2,aC as R2,ap as C2,aq as i1}from"./index-DfZjT3WA.js";import{d as j1}from"./Add-D8_0U-mi.js";import{d as y2}from"./AddBox-BpwHbwbG.js";import{d as k0}from"./Delete-BaSq9RZZ.js";import{d as z2}from"./Error-B1K0WhCp.js";import{D as w1}from"./index-C1Puqx4M.js";import{T as I0,b as S2}from"./index-DCkU-F0r.js";import{C as R1}from"./confirm-3b8GTIgU.js";import{u as s1}from"./session-Cw-dytKR.js";import{W as Q1}from"./did-address-BWnma-3-.js";import{B as C1,d as k2}from"./ChevronRight-DBpo88DV.js";import{S as be}from"./shorten-label-3owfLRzi.js";import{A as M0}from"./Avatar-B1SFM1MR.js";import{d as I2}from"./Download-C1y29u9K.js";import{d as M2}from"./QuestionMarkCircle-Duxt-AlB.js";import{b as P2,c as Y1,T as L2}from"./index-CrurRDDC.js";import{_ as Ie}from"./useSetState-BTR-3GfC.js";import{c as y1}from"./index-TlMkikTm.js";import{C as u1,F as p1,S as T2}from"./FormControlLabel-CpH9LTeH.js";import{A as P0}from"./Alert-Dlco0B3L.js";import{p as t1}from"./index-HqFqdQ4r.js";import"./api-DbvHYaVa.js";import{i as N2}from"./index-CFmNTsQh.js";import{d as V2}from"./ExpandMore-DBQIHjkB.js";import{d as D2}from"./OpenInNew-svkkbJCn.js";import{u as L0}from"./useThemeProps-BjkDmxHT.js";import{u as _2}from"./useSlotProps-CCXsWmb3.js";import{d as E2}from"./DeleteOutline-Du2BPdlg.js";import{c as B2,A as T0,u as A2,S as O2,U as H2}from"./item-DIkrlQMP.js";import{d as $2}from"./ArrowDropDown-exkF-BIK.js";import{f as Le}from"./format-error-BVI56bJg.js";import{B as h1}from"./ButtonGroup-CTrZ2Hyv.js";import{T as Pe}from"./TextField-D_Jtjg13.js";import{I as z1}from"./InputAdornment-VVruavKc.js";import{C as F2}from"./click-to-copy-CM2U6JEg.js";import{d as U2}from"./Launch-Dhq-grBI.js";import{L as q2}from"./MoreVert-CBWkVJTE.js";import{a as W2}from"./ListItemText-CHjUage1.js";import{S as Z1}from"./index-DPyKucXe.js";import{M as G2}from"./index-CTFB4nHV.js";import{r as K2}from"./index-Cixwi4BX.js";import{d as X2}from"./Done-BG-Fw8ts.js";import{c as N0,d as V0,b as J2,S as Q2,a as Y2}from"./Stepper-UV_DHoEg.js";import{R as Z2,a as e0}from"./RadioGroup-C4DI71vM.js";import"./FilterList-DumRQ8ls.js";import"./toPropertyKey-PLuKRk1e.js";import"./FormControl-CeSJJZgZ.js";import"./useFormControl-Cs3LGXJe.js";import"./FormGroup-B0Xdxgiy.js";import"./InputLabel-3M9sMlBq.js";import"./Select-drnrjZt8.js";import"./LastPage-CBInTPpp.js";import"./Toolbar-D7_EWzTj.js";import"./index-BtQOF6n3.js";import"./redux-BDPBPXLM.js";import"./Search-BOxcXluh.js";import"./index-DHNVLiI8.js";import"./Link-Cpnh7s1v.js";import"./useSlot-C1f6ZTLt.js";import"./jss-plugin-props-sort.esm-BzROyw1n.js";const et=a2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),tt=["slots","slotProps"],ot=se(v0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:K1(e.palette.grey[200],.12)}:{backgroundColor:K1(e.palette.grey[600],.12)})})),lt=se(et)({width:24,height:16});function nt(e){const{slots:t={},slotProps:l={}}=e,s=je(e,tt),r=e;return o.jsx("li",{children:o.jsx(ot,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(lt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function st(e){return Fe("MuiBreadcrumbs",e)}const rt=$e("MuiBreadcrumbs",["root","ol","li","separator"]),it=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],at=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},st,t)},ct=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${rt.li}`]:t.li},t.root]})({}),dt=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ut=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function pt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ut,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const D0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,it),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=at(v),S=c2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(nt,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(ct,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(dt,{className:C.ol,ref:N,ownerState:v,children:pt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function ht(e){return Fe("MuiStepButton",e)}const t0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),ft=["children","className","icon","optional"],xt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},ht,t)},mt=se(v0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${t0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${t0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),vt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,ft),{disabled:f,active:x}=R.useContext(N0),{orientation:g}=R.useContext(V0),y=A({},s,{orientation:g}),p=xt(y),d={icon:i,optional:a},m=d2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(J2,A({},d,{children:r}));return o.jsx(mt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function gt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const bt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],jt=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},gt,t)},wt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),Rt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Ct=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,bt);R.useContext(V0);const{active:x,last:g,expanded:y}=R.useContext(N0),p=A({},s,{last:g}),d=jt(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(wt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(Rt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},yt=Ne;Object.defineProperty(S1,"__esModule",{value:!0});var _0=S1.default=void 0,zt=yt(Te()),St=o;_0=S1.default=(0,zt.default)((0,St.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var k1={},kt=Ne;Object.defineProperty(k1,"__esModule",{value:!0});var E0=k1.default=void 0,It=kt(Te()),Mt=o;E0=k1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Se({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Se.propTypes={size:h.number};Se.defaultProps={size:24};function I1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(M0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}I1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function M1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Se,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(I1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(I0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Q1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(g0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(y2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(_0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(k0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(u2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Pt,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(E0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(z2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}M1.propTypes={initUrl:h.object};M1.defaultProps={initUrl:null};const Pt=ae(z)`
3
3
  .main-table > div:first-child {
4
4
  display: none;
5
5
  }
@@ -133,7 +133,7 @@ import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG a
133
133
  background: #fff;
134
134
  z-index: 10;
135
135
  }
136
- `,a0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(a0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(a0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function W0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Fl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ul(e,{did:t,projectId:l,messageId:s}){return W0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function ql(e,{did:t,projectId:l,storeId:s}){return W0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const G0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function O1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Le(K)}`)}finally{S(null)}},{storeList:M}=G0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(w0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(R0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(C0,{onClickAway:P,children:o.jsxs(y0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(g2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(T0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}O1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};O1.defaultProps={store:null,blocklet:null};const c0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],d0=1024*1024*10,u0=R.lazy(()=>z0(()=>import("./react-CwZHH_b9.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function K0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Ul(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Fl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Le(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Wl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Pe,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(O1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(M0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Se,{}),children:[o.jsx(u0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(u0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}K0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Wl=ae.div`
136
+ `,a0="lastWantToConnectStoreId";function $l(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(a0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(a0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function W0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Fl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Ul(e,{did:t,projectId:l,messageId:s}){return W0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function ql(e,{did:t,projectId:l,storeId:s}){return W0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const G0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function O1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Le(K)}`)}finally{S(null)}},{storeList:M}=G0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx($2,{})})]}),o.jsx(w0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(R0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(C0,{onClickAway:P,children:o.jsxs(y0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),B2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(g2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(T0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}O1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};O1.defaultProps={store:null,blocklet:null};const c0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],d0=1024*1024*10,u0=R.lazy(()=>z0(()=>import("./react-CwUjkFxY.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function K0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=$l(s),N=A2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Ul(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Fl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Le(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Wl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Pe,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(O1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Pe,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(M0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(E2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Se,{}),children:[o.jsx(u0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(u0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:c0,maxFileSize:d0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}K0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Wl=ae.div`
137
137
  margin-top: 24px;
138
138
  .screenshot {
139
139
  margin-bottom: 16px;
@@ -178,7 +178,7 @@ import{au as a2,j as o,aH as se,cJ as v0,aL as A,fw as K1,aK as je,aF as $e,aG a
178
178
  padding-bottom: 12px;
179
179
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
180
180
  }
181
- `;function e2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}e2.propTypes={text:h.string.isRequired};function t2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(P2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Y1,{value:"write",label:"Write"}),o.jsx(Y1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Pe,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(e2,{text:e.blockletIntroduction||""})})]})}t2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var F1={},o3=Ne;Object.defineProperty(F1,"__esModule",{value:!0});var o2=F1.default=void 0,l3=o3(Te()),h0=o;o2=F1.default=(0,l3.default)([(0,h0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,h0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function U1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(o2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}U1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};U1.defaultProps={step:0,ok:!1,active:0,error:""};function l2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||J0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!e3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(vt,{icon:o.jsx(U1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(Ct,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}l2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const n3=[".zip",".gz"],s3=1024*1024*100,r3=R.lazy(()=>z0(()=>import("./react-CwZHH_b9.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function q1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(T2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Se,{}),children:o.jsx(r3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:n3,maxFileSize:s3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}q1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};q1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Pe,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function n2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&n2(e[t]);return e}const i3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},f0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},a3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},x0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function W1({initUrl:e,...t}){var G1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Ie({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ie({}),[y,p]=R.useState(!1),[d,m]=Ie(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Ie({}),[V,M]=R.useState(""),[k,L]=Ie({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(i2=>{D[i2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,ke]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{i3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((G1=ce[0])==null?void 0:G1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=w2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=n2(D.release),s!=="view"&&(D.release.note=""),f(_=>f0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(_.blockletVersion)&&(_.blockletVersion=Me.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=f0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Le(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Se,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],r2=de[Z]||de[de.length-1],Re=a3[Z];return o.jsxs(c3,{...t,children:[o.jsx(Z0,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(l2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:ke,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[r2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(M2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(K0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(t2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(Z2,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(L2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(A1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(q1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(T1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}W1.propTypes={initUrl:h.object};W1.defaultProps={initUrl:null};const c3=ae.div`
181
+ `;function e2({text:e}){return e?o.jsx(G2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[K2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}e2.propTypes={text:h.string.isRequired};function t2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(P2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Y1,{value:"write",label:"Write"}),o.jsx(Y1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Pe,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(e2,{text:e.blockletIntroduction||""})})]})}t2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var F1={},o3=Ne;Object.defineProperty(F1,"__esModule",{value:!0});var o2=F1.default=void 0,l3=o3(Te()),h0=o;o2=F1.default=(0,l3.default)([(0,h0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,h0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function U1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(X2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(o2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}U1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};U1.defaultProps={step:0,ok:!1,active:0,error:""};function l2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||J0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Q2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!e3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(Y2,{children:[o.jsx(vt,{icon:o.jsx(U1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(Ct,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}l2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const n3=[".zip",".gz"],s3=1024*1024*100,r3=R.lazy(()=>z0(()=>import("./react-CwUjkFxY.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])).then(e=>({default:e.Uploader})));function q1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(T2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Se,{}),children:o.jsx(r3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:n3,maxFileSize:s3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}q1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};q1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Pe,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Pe,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function n2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&n2(e[t]);return e}const i3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},f0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},a3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},x0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function W1({initUrl:e,...t}){var G1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Ie({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ie({}),[y,p]=R.useState(!1),[d,m]=Ie(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Ie({}),[V,M]=R.useState(""),[k,L]=Ie({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(i2=>{D[i2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,ke]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{i3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((G1=ce[0])==null?void 0:G1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=w2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=n2(D.release),s!=="view"&&(D.release.note=""),f(_=>f0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Me.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Le(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Me.valid(_.blockletVersion)&&(_.blockletVersion=Me.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=f0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Le(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Se,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],r2=de[Z]||de[de.length-1],Re=a3[Z];return o.jsxs(c3,{...t,children:[o.jsx(Z0,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(l2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:ke,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[r2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(M2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(K0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(t2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(Z2,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(e0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(L2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(A1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(q1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[x0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(T1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}W1.propTypes={initUrl:h.object};W1.defaultProps={initUrl:null};const c3=ae.div`
182
182
  .section {
183
183
  &.full-width {
184
184
  max-width: 100%;
@@ -1 +1 @@
1
- import{d as A,v as R,p as w,e as p}from"./index-CjW-BiBJ.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
1
+ import{d as A,v as R,p as w,e as p}from"./index-CTFB4nHV.js";const O=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,x=/^[a-zA-Z]:\\/;function N(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return x.test(e)?!1:O.test(e)}const _=["http","https"],z=["nofollow"],L={};function T(e){const r=e||L,g=r.protocols||_,u=A(r.test);return function(h){R(h,"element",function(t,y,E){if(t.tagName==="a"&&typeof t.properties.href=="string"&&u(t,y,E)){const o=t.properties.href;if(N(o)?g.includes(o.slice(0,o.indexOf(":"))):o.startsWith("//")){const n=s(r.content,t),c=n&&!Array.isArray(n)?[n]:n,i=s(r.rel,t)||z,a=typeof i=="string"?w(i):i,f=s(r.target,t),l=s(r.properties,t);if(l&&Object.assign(t.properties,p(l)),a.length>0&&(t.properties.rel=[...a]),f&&(t.properties.target=f),c){const m=s(r.contentProperties,t)||{};t.children.push({type:"element",tagName:"span",properties:p(m),children:p(c)})}}}})}}function s(e,r){return typeof e=="function"?e(r):e}export{T as r};
@@ -0,0 +1 @@
1
+ import{aF as ve,aG as me,aH as X,cJ as $e,aI as He,aL as p,r as d,aJ as Se,aK as ae,aN as L,j as u,aO as ge,as as Oe,cE as at,cK as Ae,cL as Xe,cM as De,aM as se,ai as it,cN as fe,cO as ct,bu as dt,aB as F,P as W}from"./index-DfZjT3WA.js";let U;function _e(){if(U)return U;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),U="reverse",e.scrollLeft>0?U="default":(e.scrollLeft=1,e.scrollLeft===0&&(U="negative")),document.body.removeChild(e),U}function ut(e,t){const l=e.scrollLeft;if(t!=="rtl")return l;switch(_e()){case"negative":return e.scrollWidth-e.clientWidth+l;case"reverse":return e.scrollWidth-e.clientWidth-l;default:return l}}function bt(e){return me("MuiTab",e)}const k=ve("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),pt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ft=e=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:v,selected:h,disabled:b}=e,g={root:["root",a&&v&&"labelIcon",`textColor${He(l)}`,s&&"fullWidth",n&&"wrapped",h&&"selected",b&&"disabled"],iconWrapper:["iconWrapper"]};return ge(g,bt,t)},ht=X($e,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${He(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${k.iconWrapper}`]:t.iconWrapper}]}})(({theme:e,ownerState:t})=>p({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${k.iconWrapper}`]:p({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${k.selected}`]:{opacity:1},[`&.${k.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${k.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${k.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),xe=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:v=!1,fullWidth:h,icon:b,iconPosition:g="top",indicator:B,label:y,onChange:m,onClick:w,onFocus:j,selected:T,selectionFollowsFocus:x,textColor:D="inherit",value:R,wrapped:ie=!1}=s,_=ae(s,pt),V=p({},s,{disabled:a,disableFocusRipple:v,selected:T,icon:!!b,iconPosition:g,label:!!y,fullWidth:h,textColor:D,wrapped:ie}),q=ft(V),$=b&&y&&d.isValidElement(b)?d.cloneElement(b,{className:L(q.iconWrapper,b.props.className)}):b,ee=E=>{!T&&m&&m(E,R),w&&w(E)},K=E=>{x&&!T&&m&&m(E,R),j&&j(E)};return u.jsxs(ht,p({focusRipple:!v,className:L(q.root,n),ref:l,role:"tab","aria-selected":T,disabled:a,onClick:ee,onFocus:K,ownerState:V,tabIndex:T?0:-1},_,{children:[g==="top"||g==="start"?u.jsxs(d.Fragment,{children:[$,y]}):u.jsxs(d.Fragment,{children:[y,$]}),B]}))}),vt=Oe(u.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),mt=Oe(u.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function St(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function gt(e,t,l,s={},n=()=>{}){const{ease:a=St,duration:v=300}=s;let h=null;const b=t[e];let g=!1;const B=()=>{g=!0},y=m=>{if(g){n(new Error("Animation cancelled"));return}h===null&&(h=m);const w=Math.min(1,(m-h)/v);if(t[e]=a(w)*(l-b)+b,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(y)};return b===l?(n(new Error("Element already at target position")),B):(requestAnimationFrame(y),B)}const xt=["onChange"],yt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Ct(e){const{onChange:t}=e,l=ae(e,xt),s=d.useRef(),n=d.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return at(()=>{const v=Ae(()=>{const b=s.current;a(),b!==s.current&&t(s.current)}),h=Xe(n.current);return h.addEventListener("resize",v),()=>{v.clear(),h.removeEventListener("resize",v)}},[t]),d.useEffect(()=>{a(),t(s.current)},[t]),u.jsx("div",p({style:yt,ref:n},l))}function Bt(e){return me("MuiTabScrollButton",e)}const wt=ve("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Tt=["className","slots","slotProps","direction","orientation","disabled"],Mt=e=>{const{classes:t,orientation:l,disabled:s}=e;return ge({root:["root",l,s&&"disabled"]},Bt,t)},It=X($e,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.orientation&&t[l.orientation]]}})(({ownerState:e})=>p({width:40,flexShrink:0,opacity:.8,[`&.${wt.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Rt=d.forwardRef(function(t,l){var s,n;const a=Se({props:t,name:"MuiTabScrollButton"}),{className:v,slots:h={},slotProps:b={},direction:g}=a,B=ae(a,Tt),y=De(),m=p({isRtl:y},a),w=Mt(m),j=(s=h.StartScrollButtonIcon)!=null?s:vt,T=(n=h.EndScrollButtonIcon)!=null?n:mt,x=se({elementType:j,externalSlotProps:b.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m}),D=se({elementType:T,externalSlotProps:b.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:m});return u.jsx(It,p({component:"div",className:L(w.root,v),ref:l,role:null,ownerState:m,tabIndex:null},B,{children:g==="left"?u.jsx(j,p({},x)):u.jsx(T,p({},D))}))});function Et(e){return me("MuiTabs",e)}const he=ve("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),zt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ke=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Le=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,ne=(e,t,l)=>{let s=!1,n=l(e,t);for(;n;){if(n===e.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(e,n);else{n.focus();return}}},Wt=e=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:v,scrollButtonsHideMobile:h,classes:b}=e;return ge({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",v&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",h&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Et,b)},Pt=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${he.scrollButtons}`]:t.scrollButtons},{[`& .${he.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>p({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${he.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),Nt=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})(({ownerState:e})=>p({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),kt=X("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})(({ownerState:e})=>p({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),Lt=X("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>p({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),Ft=X(Ct)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Fe={},ye=d.forwardRef(function(t,l){const s=Se({props:t,name:"MuiTabs"}),n=it(),a=De(),{"aria-label":v,"aria-labelledby":h,action:b,centered:g=!1,children:B,className:y,component:m="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:T,orientation:x="horizontal",ScrollButtonComponent:D=Rt,scrollButtons:R="auto",selectionFollowsFocus:ie,slots:_={},slotProps:V={},TabIndicatorProps:q={},TabScrollButtonProps:$={},textColor:ee="primary",value:K,variant:E="standard",visibleScrollbar:ce=!1}=s,Ue=ae(s,zt),M=E==="scrollable",C=x==="vertical",G=C?"scrollTop":"scrollLeft",te=C?"top":"left",oe=C?"bottom":"right",de=C?"clientHeight":"clientWidth",J=C?"height":"width",H=p({},s,{component:m,allowScrollButtonsMobile:w,indicatorColor:j,orientation:x,vertical:C,scrollButtons:R,textColor:ee,variant:E,visibleScrollbar:ce,fixed:!M,hideScrollbar:M&&!ce,scrollableX:M&&!C,scrollableY:M&&C,centered:g&&!M,scrollButtonsHideMobile:!w}),P=Wt(H),Ye=se({elementType:_.StartScrollButtonIcon,externalSlotProps:V.startScrollButtonIcon,ownerState:H}),Ve=se({elementType:_.EndScrollButtonIcon,externalSlotProps:V.endScrollButtonIcon,ownerState:H}),[Ce,Ge]=d.useState(!1),[O,Be]=d.useState(Fe),[we,Je]=d.useState(!1),[Te,Qe]=d.useState(!1),[Me,Ze]=d.useState(!1),[Ie,et]=d.useState({overflow:"hidden",scrollbarWidth:0}),Re=new Map,z=d.useRef(null),A=d.useRef(null),Ee=()=>{const o=z.current;let r;if(o){const i=o.getBoundingClientRect();r={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ut(o,a?"rtl":"ltr"),scrollWidth:o.scrollWidth,top:i.top,bottom:i.bottom,left:i.left,right:i.right}}let c;if(o&&K!==!1){const i=A.current.children;if(i.length>0){const f=i[Re.get(K)];c=f?f.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:c}},Q=fe(()=>{const{tabsMeta:o,tabMeta:r}=Ee();let c=0,i;if(C)i="top",r&&o&&(c=r.top-o.top+o.scrollTop);else if(i=a?"right":"left",r&&o){const S=a?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;c=(a?-1:1)*(r[i]-o[i]+S)}const f={[i]:c,[J]:r?r[J]:0};if(isNaN(O[i])||isNaN(O[J]))Be(f);else{const S=Math.abs(O[i]-f[i]),I=Math.abs(O[J]-f[J]);(S>=1||I>=1)&&Be(f)}}),ue=(o,{animation:r=!0}={})=>{r?gt(G,z.current,o,{duration:n.transitions.duration.standard}):z.current[G]=o},ze=o=>{let r=z.current[G];C?r+=o:(r+=o*(a?-1:1),r*=a&&_e()==="reverse"?-1:1),ue(r)},We=()=>{const o=z.current[de];let r=0;const c=Array.from(A.current.children);for(let i=0;i<c.length;i+=1){const f=c[i];if(r+f[de]>o){i===0&&(r=o);break}r+=f[de]}return r},tt=()=>{ze(-1*We())},ot=()=>{ze(We())},lt=d.useCallback(o=>{et({overflow:null,scrollbarWidth:o})},[]),rt=()=>{const o={};o.scrollbarSizeListener=M?u.jsx(Ft,{onChange:lt,className:L(P.scrollableX,P.hideScrollbar)}):null;const c=M&&(R==="auto"&&(we||Te)||R===!0);return o.scrollButtonStart=c?u.jsx(D,p({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Ye},orientation:x,direction:a?"right":"left",onClick:tt,disabled:!we},$,{className:L(P.scrollButtons,$.className)})):null,o.scrollButtonEnd=c?u.jsx(D,p({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ve},orientation:x,direction:a?"left":"right",onClick:ot,disabled:!Te},$,{className:L(P.scrollButtons,$.className)})):null,o},Pe=fe(o=>{const{tabsMeta:r,tabMeta:c}=Ee();if(!(!c||!r)){if(c[te]<r[te]){const i=r[G]+(c[te]-r[te]);ue(i,{animation:o})}else if(c[oe]>r[oe]){const i=r[G]+(c[oe]-r[oe]);ue(i,{animation:o})}}}),le=fe(()=>{M&&R!==!1&&Ze(!Me)});d.useEffect(()=>{const o=Ae(()=>{z.current&&Q()});let r;const c=S=>{S.forEach(I=>{I.removedNodes.forEach(Z=>{var N;(N=r)==null||N.unobserve(Z)}),I.addedNodes.forEach(Z=>{var N;(N=r)==null||N.observe(Z)})}),o(),le()},i=Xe(z.current);i.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(o),Array.from(A.current.children).forEach(S=>{r.observe(S)})),typeof MutationObserver<"u"&&(f=new MutationObserver(c),f.observe(A.current,{childList:!0})),()=>{var S,I;o.clear(),i.removeEventListener("resize",o),(S=f)==null||S.disconnect(),(I=r)==null||I.disconnect()}},[Q,le]),d.useEffect(()=>{const o=Array.from(A.current.children),r=o.length;if(typeof IntersectionObserver<"u"&&r>0&&M&&R!==!1){const c=o[0],i=o[r-1],f={root:z.current,threshold:.99},S=pe=>{Je(!pe[0].isIntersecting)},I=new IntersectionObserver(S,f);I.observe(c);const Z=pe=>{Qe(!pe[0].isIntersecting)},N=new IntersectionObserver(Z,f);return N.observe(i),()=>{I.disconnect(),N.disconnect()}}},[M,R,Me,B==null?void 0:B.length]),d.useEffect(()=>{Ge(!0)},[]),d.useEffect(()=>{Q()}),d.useEffect(()=>{Pe(Fe!==O)},[Pe,O]),d.useImperativeHandle(b,()=>({updateIndicator:Q,updateScrollButtons:le}),[Q,le]);const Ne=u.jsx(Lt,p({},q,{className:L(P.indicator,q.className),ownerState:H,style:p({},O,q.style)}));let re=0;const nt=d.Children.map(B,o=>{if(!d.isValidElement(o))return null;const r=o.props.value===void 0?re:o.props.value;Re.set(r,re);const c=r===K;return re+=1,d.cloneElement(o,p({fullWidth:E==="fullWidth",indicator:c&&!Ce&&Ne,selected:c,selectionFollowsFocus:ie,onChange:T,textColor:ee,value:r},re===1&&K===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),st=o=>{const r=A.current,c=ct(r).activeElement;if(c.getAttribute("role")!=="tab")return;let f=x==="horizontal"?"ArrowLeft":"ArrowUp",S=x==="horizontal"?"ArrowRight":"ArrowDown";switch(x==="horizontal"&&a&&(f="ArrowRight",S="ArrowLeft"),o.key){case f:o.preventDefault(),ne(r,c,Le);break;case S:o.preventDefault(),ne(r,c,ke);break;case"Home":o.preventDefault(),ne(r,null,ke);break;case"End":o.preventDefault(),ne(r,null,Le);break}},be=rt();return u.jsxs(Pt,p({className:L(P.root,y),ownerState:H,ref:l,as:m},Ue,{children:[be.scrollButtonStart,be.scrollbarSizeListener,u.jsxs(Nt,{className:P.scroller,ownerState:H,style:{overflow:Ie.overflow,[C?`margin${a?"Left":"Right"}`:"marginBottom"]:ce?void 0:-Ie.scrollbarWidth},ref:z,children:[u.jsx(kt,{"aria-label":v,"aria-labelledby":h,"aria-orientation":x==="vertical"?"vertical":null,className:P.flexContainer,ownerState:H,onKeyDown:st,ref:A,role:"tablist",children:nt}),Ce&&Ne]}),be.scrollButtonEnd]}))}),je="index",Y={tabs:`${je}-tabs`,tab:`${je}-tab`},jt=dt(ye)(({theme:e})=>({[`& .${Y.tabs}`]:{},[`& .${Y.tab}`]:{fontSize:"0.875rem",[e.breakpoints.up("md")]:{fontSize:"1rem"}}}));function qe({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:F.backgroundsBgComponent,padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:F.foregroundsFgSubtile,fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"white",borderColor:F.lineBorderBase,color:F.foregroundsFgBase}},".MuiTabs-indicator":{display:"none"},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}qe.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function Ke({tabs:e,current:t,onChange:l,...s}){return u.jsx(ye,{scrollButtons:"auto",value:t,onChange:(n,a)=>l(a),...s,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{"&::after":{content:'""',display:"block",width:"100%",height:"1px",backgroundColor:F.strokeBorderStrong,bottom:0}},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:F.foregroundsFgSubtile,fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:F.foregroundsFgBase}},".MuiTabs-indicator":{height:"1px",backgroundColor:F.foregroundsFgBase},...s.sx},children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}Ke.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};function $t({tabs:e,current:t,onChange:l,...s}){return s.variant==="card"?u.jsx(qe,{...s,tabs:e,current:t,onChange:l}):s.variant==="line"?u.jsx(Ke,{...s,tabs:e,current:t,onChange:l}):u.jsx(jt,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(n,a)=>l(a),indicatorColor:"primary",...s,className:[Y.tabs,s.className||""].join(" "),children:e.map(n=>u.jsx(xe,{className:Y.tab,value:n.value,label:n.label,icon:n.icon||null},n.value))})}$t.propTypes={tabs:W.array.isRequired,current:W.string.isRequired,onChange:W.func.isRequired};export{mt as K,$t as T,vt as a,ye as b,xe as c,he as t};
@@ -1,4 +1,4 @@
1
- import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as re,j as n,aN as R,aO as Me,dd as no,c$ as ro,ak as ee,cM as to,de as ao,X as so,df as io,dg as lo,_ as co,c5 as po,au as se,P as r,Z as ie,$ as le,bu as y,ad as uo,aC as de,L as J,T as D,b as ho,aD as Re,B as C,bv as xo,I as q,dh as Ie,H as Te,a1 as mo,Q as Le,k as te,di as fo,l as X,dj as go,dk as bo}from"./index-DIxJxM78.js";import{T as vo}from"./Toolbar-IW4D_zYa.js";import{H as Be}from"./Hidden-w-nWLLe2.js";const ae={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};function yo(e){return Pe("MuiAppBar",e)}ze("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const jo=["className","color","enableColorOnDark","position"],wo=e=>{const{color:o,position:t,classes:a}=e,l={root:["root",`color${_(o)}`,`position${_(t)}`]};return Me(l,yo,a)},Q=(e,o)=>e?`${e==null?void 0:e.replace(")","")}, ${o})`:o,ko=Z(Ne,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[`position${_(t.position)}`],o[`color${_(t.color)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},o.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},o.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="static"&&{position:"static"},o.position==="relative"&&{position:"relative"},!e.vars&&$({},o.color==="default"&&{backgroundColor:t,color:e.palette.getContrastText(t)},o.color&&o.color!=="default"&&o.color!=="inherit"&&o.color!=="transparent"&&{backgroundColor:e.palette[o.color].main,color:e.palette[o.color].contrastText},o.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!o.enableColorOnDark&&{backgroundColor:null,color:null},o.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},o.color==="default"&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette.AppBar.defaultBg:Q(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":o.enableColorOnDark?e.vars.palette.text.primary:Q(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},o.color&&!o.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette[o.color].main:Q(e.vars.palette.AppBar.darkBg,e.vars.palette[o.color].main),"--AppBar-color":o.enableColorOnDark?e.vars.palette[o.color].contrastText:Q(e.vars.palette.AppBar.darkColor,e.vars.palette[o.color].contrastText)},!["inherit","transparent"].includes(o.color)&&{backgroundColor:"var(--AppBar-background)"},{color:o.color==="inherit"?"inherit":"var(--AppBar-color)"},o.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),$o=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiAppBar"}),{className:l,color:c="primary",enableColorOnDark:d=!1,position:i="fixed"}=a,u=re(a,jo),s=$({},a,{color:c,position:i,enableColorOnDark:d}),x=wo(s);return n.jsx(ko,$({square:!0,component:"header",ownerState:s,elevation:4,className:R(x.root,l,i==="fixed"&&"mui-fixed"),ref:t},u))});function Po(e){return Pe("MuiDrawer",e)}ze("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const zo=["BackdropProps"],No=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Ae=(e,o)=>{const{ownerState:t}=e;return[o.root,(t.variant==="permanent"||t.variant==="persistent")&&o.docked,o.modal]},Co=e=>{const{classes:o,anchor:t,variant:a}=e,l={root:["root"],docked:[(a==="permanent"||a==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${_(t)}`,a!=="temporary"&&`paperAnchorDocked${_(t)}`]};return Me(l,Po,o)},Mo=Z(no,{name:"MuiDrawer",slot:"Root",overridesResolver:Ae})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),ke=Z("div",{shouldForwardProp:ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ae})({flex:"0 0 auto"}),Ro=Z(Ne,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.paper,o[`paperAnchor${_(t.anchor)}`],t.variant!=="temporary"&&o[`paperAnchorDocked${_(t.anchor)}`]]}})(({theme:e,ownerState:o})=>$({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},o.anchor==="left"&&{left:0},o.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="right"&&{right:0},o.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="left"&&o.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="top"&&o.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="right"&&o.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="bottom"&&o.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),De={left:"right",right:"left",top:"down",bottom:"up"};function Io(e){return["left","right"].indexOf(e)!==-1}function To({direction:e},o){return e==="rtl"&&Io(o)?De[o]:o}const _e=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiDrawer"}),l=ee(),c=to(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:u,children:s,className:x,elevation:m=16,hideBackdrop:j=!1,ModalProps:{BackdropProps:w}={},onClose:P,open:b=!1,PaperProps:f={},SlideProps:z,TransitionComponent:M=ao,transitionDuration:B=d,variant:I="temporary"}=a,N=re(a.ModalProps,zo),g=re(a,No),k=p.useRef(!1);p.useEffect(()=>{k.current=!0},[]);const A=To({direction:c?"rtl":"ltr"},i),F=$({},a,{anchor:i,elevation:m,open:b,variant:I},g),T=Co(F),h=n.jsx(Ro,$({elevation:I==="temporary"?m:0,square:!0},f,{className:R(T.paper,f.className),ownerState:F,children:s}));if(I==="permanent")return n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:h}));const v=n.jsx(M,$({in:b,direction:De[A],timeout:B,appear:k.current},z,{children:h}));return I==="persistent"?n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:v})):n.jsx(Mo,$({BackdropProps:$({},u,w,{transitionDuration:B}),className:R(T.root,T.modal,x),open:b,ownerState:F,onClose:P,hideBackdrop:j,ref:t},g,N,{children:v}))});function Lo(e,o){var t,a=so(e),l=(t=o==null?void 0:o.wait)!==null&&t!==void 0?t:1e3,c=p.useMemo(function(){return io(function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];return a.current.apply(a,lo([],co(d),!1))},l,o)},[]);return po(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}const Bo=se(n.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ao=se(n.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Do=se(n.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),Fe=p.createContext(),_o=e=>{const o=p.useContext(Fe);return p.useLayoutEffect(()=>{},[]),o};function He({children:e,...o}){const[t,a]=p.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),l=()=>{a(d=>({...d,inFullPage:!d.inFullPage}))},c=p.useMemo(()=>({...t,headerVisible:!t.inFullPage||t.headerVisibleInFullPage,footerVisible:!t.inFullPage||t.footerVisibleInFullPage,sidebarVisible:!t.inFullPage||t.sidebarVisibleInFullPage,toggleFullPage:l,configure:d=>a(i=>({...i,...d}))}),[t]);return n.jsx(Fe.Provider,{value:c,...o,children:e})}He.propTypes={children:r.node.isRequired};var ce={},Fo=le;Object.defineProperty(ce,"__esModule",{value:!0});var Oe=ce.default=void 0,Ho=Fo(ie()),Oo=n;Oe=ce.default=(0,Ho.default)((0,Oo.jsx)("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");var pe={},Wo=le;Object.defineProperty(pe,"__esModule",{value:!0});var We=pe.default=void 0,Eo=Wo(ie()),Vo=n;We=pe.default=(0,Eo.default)((0,Vo.jsx)("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen");function ue({name:e,size:o,alt:t,color:a,style:l,prefix:c,showBadge:d,...i}){const u=`${c}/${e}-${a.replace(/^#/,"")}.png`;return n.jsxs(qo,{style:{width:o,height:o},children:[n.jsx(uo,{width:o,height:o,alt:t||e,src:u,style:Object.assign({width:o},l),...i}),d&&n.jsx("i",{className:"badge-point"})]})}ue.propTypes={name:r.string.isRequired,size:r.number,color:r.string,alt:r.string,style:r.object,prefix:r.string,showBadge:r.bool};ue.defaultProps={size:36,color:"#000000",alt:"",style:{},prefix:"/images",showBadge:!1};const qo=y("div")`
1
+ import{aG as Pe,aF as ze,aH as Z,ah as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as re,j as n,aN as R,aO as Me,dd as no,c$ as ro,ai as ee,cM as to,de as ao,V as so,df as io,dg as lo,_ as co,c5 as po,as as se,P as r,X as ie,Y as le,bu as y,ab as uo,aC as de,L as K,T as D,b as ho,aD as Re,B as C,bv as xo,I as q,dh as Ie,H as Te,$ as mo,N as Le,k as te,di as fo,l as X,dj as go,dk as bo}from"./index-DfZjT3WA.js";import{T as vo}from"./Toolbar-D7_EWzTj.js";import{H as Be}from"./Hidden-DJwWGZh0.js";const ae={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};function yo(e){return Pe("MuiAppBar",e)}ze("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const jo=["className","color","enableColorOnDark","position"],wo=e=>{const{color:o,position:t,classes:a}=e,l={root:["root",`color${_(o)}`,`position${_(t)}`]};return Me(l,yo,a)},J=(e,o)=>e?`${e==null?void 0:e.replace(")","")}, ${o})`:o,ko=Z(Ne,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[`position${_(t.position)}`],o[`color${_(t.color)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return $({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},o.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},o.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},o.position==="static"&&{position:"static"},o.position==="relative"&&{position:"relative"},!e.vars&&$({},o.color==="default"&&{backgroundColor:t,color:e.palette.getContrastText(t)},o.color&&o.color!=="default"&&o.color!=="inherit"&&o.color!=="transparent"&&{backgroundColor:e.palette[o.color].main,color:e.palette[o.color].contrastText},o.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!o.enableColorOnDark&&{backgroundColor:null,color:null},o.color==="transparent"&&$({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&$({},o.color==="default"&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette.AppBar.defaultBg:J(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":o.enableColorOnDark?e.vars.palette.text.primary:J(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},o.color&&!o.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":o.enableColorOnDark?e.vars.palette[o.color].main:J(e.vars.palette.AppBar.darkBg,e.vars.palette[o.color].main),"--AppBar-color":o.enableColorOnDark?e.vars.palette[o.color].contrastText:J(e.vars.palette.AppBar.darkColor,e.vars.palette[o.color].contrastText)},!["inherit","transparent"].includes(o.color)&&{backgroundColor:"var(--AppBar-background)"},{color:o.color==="inherit"?"inherit":"var(--AppBar-color)"},o.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),$o=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiAppBar"}),{className:l,color:c="primary",enableColorOnDark:d=!1,position:i="fixed"}=a,u=re(a,jo),s=$({},a,{color:c,position:i,enableColorOnDark:d}),x=wo(s);return n.jsx(ko,$({square:!0,component:"header",ownerState:s,elevation:4,className:R(x.root,l,i==="fixed"&&"mui-fixed"),ref:t},u))});function Po(e){return Pe("MuiDrawer",e)}ze("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const zo=["BackdropProps"],No=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],Ae=(e,o)=>{const{ownerState:t}=e;return[o.root,(t.variant==="permanent"||t.variant==="persistent")&&o.docked,o.modal]},Co=e=>{const{classes:o,anchor:t,variant:a}=e,l={root:["root"],docked:[(a==="permanent"||a==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${_(t)}`,a!=="temporary"&&`paperAnchorDocked${_(t)}`]};return Me(l,Po,o)},Mo=Z(no,{name:"MuiDrawer",slot:"Root",overridesResolver:Ae})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),ke=Z("div",{shouldForwardProp:ro,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ae})({flex:"0 0 auto"}),Ro=Z(Ne,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.paper,o[`paperAnchor${_(t.anchor)}`],t.variant!=="temporary"&&o[`paperAnchorDocked${_(t.anchor)}`]]}})(({theme:e,ownerState:o})=>$({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},o.anchor==="left"&&{left:0},o.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="right"&&{right:0},o.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},o.anchor==="left"&&o.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="top"&&o.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="right"&&o.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},o.anchor==="bottom"&&o.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),De={left:"right",right:"left",top:"down",bottom:"up"};function Io(e){return["left","right"].indexOf(e)!==-1}function To({direction:e},o){return e==="rtl"&&Io(o)?De[o]:o}const _e=p.forwardRef(function(o,t){const a=Ce({props:o,name:"MuiDrawer"}),l=ee(),c=to(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{anchor:i="left",BackdropProps:u,children:s,className:x,elevation:m=16,hideBackdrop:j=!1,ModalProps:{BackdropProps:w}={},onClose:P,open:b=!1,PaperProps:f={},SlideProps:z,TransitionComponent:M=ao,transitionDuration:B=d,variant:I="temporary"}=a,N=re(a.ModalProps,zo),g=re(a,No),k=p.useRef(!1);p.useEffect(()=>{k.current=!0},[]);const A=To({direction:c?"rtl":"ltr"},i),F=$({},a,{anchor:i,elevation:m,open:b,variant:I},g),T=Co(F),h=n.jsx(Ro,$({elevation:I==="temporary"?m:0,square:!0},f,{className:R(T.paper,f.className),ownerState:F,children:s}));if(I==="permanent")return n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:h}));const v=n.jsx(M,$({in:b,direction:De[A],timeout:B,appear:k.current},z,{children:h}));return I==="persistent"?n.jsx(ke,$({className:R(T.root,T.docked,x),ownerState:F,ref:t},g,{children:v})):n.jsx(Mo,$({BackdropProps:$({},u,w,{transitionDuration:B}),className:R(T.root,T.modal,x),open:b,ownerState:F,onClose:P,hideBackdrop:j,ref:t},g,N,{children:v}))});function Lo(e,o){var t,a=so(e),l=(t=o==null?void 0:o.wait)!==null&&t!==void 0?t:1e3,c=p.useMemo(function(){return io(function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];return a.current.apply(a,lo([],co(d),!1))},l,o)},[]);return po(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}const Bo=se(n.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Ao=se(n.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),Do=se(n.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),Fe=p.createContext(),_o=e=>{const o=p.useContext(Fe);return p.useLayoutEffect(()=>{},[]),o};function He({children:e,...o}){const[t,a]=p.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),l=()=>{a(d=>({...d,inFullPage:!d.inFullPage}))},c=p.useMemo(()=>({...t,headerVisible:!t.inFullPage||t.headerVisibleInFullPage,footerVisible:!t.inFullPage||t.footerVisibleInFullPage,sidebarVisible:!t.inFullPage||t.sidebarVisibleInFullPage,toggleFullPage:l,configure:d=>a(i=>({...i,...d}))}),[t]);return n.jsx(Fe.Provider,{value:c,...o,children:e})}He.propTypes={children:r.node.isRequired};var ce={},Fo=le;Object.defineProperty(ce,"__esModule",{value:!0});var Oe=ce.default=void 0,Ho=Fo(ie()),Oo=n;Oe=ce.default=(0,Ho.default)((0,Oo.jsx)("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");var pe={},Wo=le;Object.defineProperty(pe,"__esModule",{value:!0});var We=pe.default=void 0,Vo=Wo(ie()),Eo=n;We=pe.default=(0,Vo.default)((0,Eo.jsx)("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen");function ue({name:e,size:o,alt:t,color:a,style:l,prefix:c,showBadge:d,...i}){const u=`${c}/${e}-${a.replace(/^#/,"")}.png`;return n.jsxs(qo,{style:{width:o,height:o},children:[n.jsx(uo,{width:o,height:o,alt:t||e,src:u,style:Object.assign({width:o},l),...i}),d&&n.jsx("i",{className:"badge-point"})]})}ue.propTypes={name:r.string.isRequired,size:r.number,color:r.string,alt:r.string,style:r.object,prefix:r.string,showBadge:r.bool};ue.defaultProps={size:36,color:"#000000",alt:"",style:{},prefix:"/images",showBadge:!1};const qo=y("div")`
2
2
  position: relative;
3
3
  .badge-point {
4
4
  position: absolute;
@@ -12,7 +12,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
12
12
  0px 1px 4px rgba(0, 0, 0, 0.3),
13
13
  0px 0px 20px rgba(0, 0, 0, 0.1);
14
14
  }
15
- `;var Ee=function(o){return n.jsx("svg",{...o,children:n.jsxs("g",{fill:"none",fillRule:"evenodd",stroke:"#FFF",children:[n.jsx("path",{d:"M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"}),n.jsx("path",{d:"M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"})]})})};Ee.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"45",height:"52",viewBox:"0 0 45 52"};var Ve=function(o){return n.jsx("svg",{...o,children:n.jsx("path",{fill:"#FFF",fillRule:"evenodd",d:"M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"})})};Ve.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"99",height:"18",viewBox:"0 0 99 18"};var qe=function(o){return n.jsx("svg",{...o,children:n.jsxs("g",{fill:"none",fillRule:"evenodd",stroke:"#000",children:[n.jsx("path",{d:"M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"}),n.jsx("path",{d:"M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"})]})})};qe.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"45",height:"52",viewBox:"0 0 45 52"};var Ue=function(o){return n.jsx("svg",{...o,children:n.jsx("path",{fillRule:"evenodd",d:"M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"})})};Ue.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"99",height:"18",viewBox:"0 0 99 18"};function U({showText:e,showLogo:o,mode:t,layout:a,...l}){const c=t==="light"?n.jsx(Ee,{}):n.jsx(qe,{}),d=t==="light"?n.jsx(Ve,{className:"logo-text"}):n.jsx(Ue,{className:"logo-text"});return n.jsxs(Uo,{layout:a,...l,children:[o&&c,e&&d]})}U.propTypes={mode:r.oneOf(["light","dark"]),layout:r.oneOf(["vertical","horizontal"]),showText:r.bool,showLogo:r.bool};U.defaultProps={mode:"dark",layout:"vertical",showText:!0,showLogo:!0};const Uo=y("span")`
15
+ `;var Ve=function(o){return n.jsx("svg",{...o,children:n.jsxs("g",{fill:"none",fillRule:"evenodd",stroke:"#FFF",children:[n.jsx("path",{d:"M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"}),n.jsx("path",{d:"M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"})]})})};Ve.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"45",height:"52",viewBox:"0 0 45 52"};var Ee=function(o){return n.jsx("svg",{...o,children:n.jsx("path",{fill:"#FFF",fillRule:"evenodd",d:"M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"})})};Ee.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"99",height:"18",viewBox:"0 0 99 18"};var qe=function(o){return n.jsx("svg",{...o,children:n.jsxs("g",{fill:"none",fillRule:"evenodd",stroke:"#000",children:[n.jsx("path",{d:"M.5 13.077L22.15.577l21.651 12.5v25l-21.65 12.5L.5 38.077zM22.15.577v50M.5 13.077l43.301 25m-43.301 0l43.301-25"}),n.jsx("path",{d:"M22.15 38.077l10.826-6.25-10.825-18.75-10.825 18.75z"})]})})};qe.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"45",height:"52",viewBox:"0 0 45 52"};var Ue=function(o){return n.jsx("svg",{...o,children:n.jsx("path",{fillRule:"evenodd",d:"M6.5.053h2.864L16.028 18h-2.114l-1.391-3.795H3.504L2.14 18H0L6.5.053zm1.474 1.481L4.04 12.563h7.895L7.975 1.534zm14.44 3.542c1.27 0 2.198.296 2.78.892.58.597.871 1.52.871 2.765v.36c0 .117-.008.245-.026.385h-1.826c.018-.14.027-.292.027-.452v-.48c0-.766-.186-1.283-.551-1.55-.367-.266-.916-.4-1.65-.4-.968 0-1.698.24-2.189.723-.493.48-.738 1.208-.738 2.187v8.308h-1.88V5.341h1.824l-.079 1.443c.376-.614.863-1.053 1.463-1.316a4.868 4.868 0 0 1 1.974-.392zM35.95 15.903c.501-.328.752-1.205.752-2.63h1.852c0 1.924-.403 3.178-1.208 3.765-.806.589-2.158.882-4.055.882-2.65 0-4.24-.538-4.766-1.616-.529-1.076-.793-2.781-.793-5.114 0-2.118.367-3.645 1.102-4.581.732-.934 2.209-1.401 4.43-1.401 1.378 0 2.569.221 3.572.665 1.002.446 1.503 1.497 1.503 3.153v.188a.234.234 0 0 0-.027.106v.106h-1.826c0-1.12-.228-1.851-.685-2.188-.455-.34-1.23-.507-2.322-.507-1.665 0-2.713.259-3.142.782-.43.524-.646 1.67-.646 3.44V12.2c0 1.4.161 2.448.485 3.15.322.7 1.297 1.048 2.926 1.048 1.397 0 2.346-.165 2.848-.495zm15.87-.318c.606-.328.912-1.263.912-2.805 0-.924-.147-1.69-.444-2.302-.294-.611-1.007-.917-2.133-.917h-7.09v6.516h5.528c1.543 0 2.617-.165 3.226-.492zm-8.754-13.85v6.036h5.665c1.325 0 2.239-.214 2.737-.643.503-.428.755-1.288.755-2.575 0-1.09-.192-1.834-.577-2.226-.385-.394-1.116-.591-2.19-.591h-6.39zM52 8.466c1.185.322 1.956.816 2.314 1.482.359.67.54 1.581.54 2.739 0 1.6-.325 2.858-.97 3.764-.647.909-1.874 1.363-3.686 1.363H41.05V0h8.62c1.592 0 2.759.312 3.503.934.744.624 1.115 1.78 1.115 3.473 0 1.014-.129 1.855-.386 2.522-.258.669-.89 1.181-1.903 1.536zm5.43 9.348V.001h1.907v17.812H57.43zm13.374-6.168v-.708c0-1.539-.141-2.636-.426-3.297-.284-.658-1.191-.99-2.718-.99h-.401c-1.617 0-2.625.25-3.025.75-.399.5-.599 1.632-.599 3.4v2.021c0 .206.008.407.024.602a9.48 9.48 0 0 0 .216 1.474c.106.465.275.822.505 1.072.196.179.435.302.72.373.283.072.586.116.905.135h1.254c1.083 0 1.914-.151 2.492-.456.577-.302.9-1.043.972-2.22a18.338 18.338 0 0 0 .054-1.447c.015-.233.027-.47.027-.71zm-3.786-6.518c2.399 0 3.956.414 4.672 1.243.717.828 1.074 2.418 1.074 4.766 0 2.048-.219 3.704-.657 4.966C71.668 17.367 70.16 18 67.581 18c-2.237 0-3.782-.347-4.632-1.042-.85-.694-1.275-2.205-1.275-4.54v-1.174c0-2.12.318-3.669.954-4.646.635-.98 2.099-1.471 4.39-1.471zm16.434 10.776c.501-.328.752-1.205.752-2.63h1.853c0 1.924-.403 3.178-1.209 3.765-.804.589-2.157.882-4.054.882-2.648 0-4.24-.538-4.767-1.616-.528-1.076-.79-2.781-.79-5.114 0-2.118.365-3.645 1.1-4.581.732-.934 2.21-1.401 4.43-1.401 1.377 0 2.568.221 3.571.665 1.003.446 1.504 1.497 1.504 3.153v.188a.232.232 0 0 0-.026.106v.106H83.99c0-1.12-.229-1.851-.686-2.188-.455-.34-1.23-.507-2.323-.507-1.665 0-2.712.259-3.142.782-.43.524-.643 1.67-.643 3.44V12.2c0 1.4.16 2.448.482 3.15.324.7 1.298 1.048 2.927 1.048 1.397 0 2.346-.165 2.847-.495zm9.236-4.82L99 17.813h-2.47l-5.317-6.01h-.752v6.01h-1.907V0h1.907v10.362h.752l4.512-5.02h2.309l-5.346 5.741z"})})};Ue.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"99",height:"18",viewBox:"0 0 99 18"};function U({showText:e,showLogo:o,mode:t,layout:a,...l}){const c=t==="light"?n.jsx(Ve,{}):n.jsx(qe,{}),d=t==="light"?n.jsx(Ee,{className:"logo-text"}):n.jsx(Ue,{className:"logo-text"});return n.jsxs(Uo,{layout:a,...l,children:[o&&c,e&&d]})}U.propTypes={mode:r.oneOf(["light","dark"]),layout:r.oneOf(["vertical","horizontal"]),showText:r.bool,showLogo:r.bool};U.defaultProps={mode:"dark",layout:"vertical",showText:!0,showLogo:!0};const Uo=y("span")`
16
16
  display: inline-flex;
17
17
  flex-direction: ${e=>e.layout==="horizontal"?"row":"column"};
18
18
  justify-content: center;
@@ -22,7 +22,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
22
22
  ${e=>e.layout==="vertical"?"margin-top: 8px;":""}
23
23
  ${e=>e.layout==="vertical"?"":"margin-left: 8px;"};
24
24
  }
25
- `;function he({images:e,links:o,prefix:t,addons:a,logo:l,...c}){const d=ee(),i=de(),u=(s,x)=>new RegExp(`/${x}`).test(i.pathname);return n.jsxs(So,{...c,children:[n.jsx(J,{to:"/",className:"sidebar-logo",children:l||n.jsx(U,{showText:!1,size:20})}),o.map(({url:s,name:x,title:m,showBadge:j})=>{const w=u(s,x);return n.jsxs(Go,{component:J,selected:w,to:s,children:[n.jsx(ue,{name:e[x],size:36,color:w?"#00c2c4":d.typography.color.main,prefix:t,showBadge:j}),n.jsx(D,{component:"span",className:"menu-title",children:m})]},s)}),n.jsx("div",{style:{flex:1}}),a]})}he.propTypes={images:r.object.isRequired,links:r.array.isRequired,prefix:r.string,addons:r.any,logo:r.any};he.defaultProps={prefix:"/images",addons:null,logo:null};const So=p.memo(y("div")`
25
+ `;function he({images:e,links:o,prefix:t,addons:a,logo:l,...c}){const d=ee(),i=de(),u=(s,x)=>new RegExp(`/${x}`).test(i.pathname);return n.jsxs(So,{...c,children:[n.jsx(K,{to:"/",className:"sidebar-logo",children:l||n.jsx(U,{showText:!1,size:20})}),o.map(({url:s,name:x,title:m,showBadge:j})=>{const w=u(s,x);return n.jsxs(Go,{component:K,selected:w,to:s,children:[n.jsx(ue,{name:e[x],size:36,color:w?"#00c2c4":d.typography.color.main,prefix:t,showBadge:j}),n.jsx(D,{component:"span",className:"menu-title",children:m})]},s)}),n.jsx("div",{style:{flex:1}}),a]})}he.propTypes={images:r.object.isRequired,links:r.array.isRequired,prefix:r.string,addons:r.any,logo:r.any};he.defaultProps={prefix:"/images",addons:null,logo:null};const So=p.memo(y("div")`
26
26
  flex: 1;
27
27
  display: flex;
28
28
  flex-direction: column;
@@ -72,7 +72,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
72
72
  color: ${e=>e.theme.palette.text.primary};
73
73
  }
74
74
  }
75
- `;var xe={},Yo=le;Object.defineProperty(xe,"__esModule",{value:!0});var me=xe.default=void 0,Xo=Yo(ie()),Qo=n;me=xe.default=(0,Xo.default)((0,Qo.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");const Jo=y($o)`
75
+ `;var xe={},Yo=le;Object.defineProperty(xe,"__esModule",{value:!0});var me=xe.default=void 0,Xo=Yo(ie()),Jo=n;me=xe.default=(0,Xo.default)((0,Jo.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");const Ko=y($o)`
76
76
  && {
77
77
  z-index: ${e=>e.theme.zIndex.drawer};
78
78
  background: ${e=>e.theme.palette.background.default};
@@ -142,7 +142,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
142
142
  display: block;
143
143
  }
144
144
  }
145
- `;function fe({children:e,brand:o,brandAddon:t,description:a,addons:l,onToggleMenu:c,homeUrl:d,logo:i,...u}){return n.jsx(Jo,{position:"sticky",className:"header",...u,children:n.jsxs(vo,{disableGutters:!1,className:"header-toolbar",children:[n.jsx(Re,{color:"inherit","aria-label":"open drawer",edge:"start",className:"header-menu","aira-label":"header menu button",onClick:c,children:n.jsx(me,{})}),n.jsxs(J,{to:d,className:"header-link",children:[n.jsx(Be,{mdDown:!0,children:n.jsx("div",{className:"header-logo",children:i||n.jsx(U,{showText:!1})})}),n.jsxs("div",{className:"header-title",children:[n.jsxs(D,{component:"h2",noWrap:!0,className:"header-title__primary",children:[o,t]}),n.jsx(D,{component:"p",noWrap:!0,className:"header-title__secondary",children:a})]})]}),n.jsx(C,{flexGrow:1}),!!e&&n.jsx("div",{className:"header-children",children:e}),n.jsx("div",{className:"header-addons",children:l})]})})}fe.propTypes={onToggleMenu:r.func.isRequired,brand:r.string.isRequired,brandAddon:r.object,description:r.any.isRequired,children:r.any,addons:r.any,homeUrl:r.string,logo:r.any};fe.defaultProps={children:null,addons:null,brandAddon:null,homeUrl:"/",logo:null};function W(e){var m;const o=xo(e,W,["dark","style"]),{className:t,copyStart:a,style:l,brand:c,dark:d,addon:i}=o,u=`${new Date().getFullYear()}`,s=`${a}`,x=u===s?u:`${s}-${u}`;return n.jsxs(Ko,{className:t,style:l,dark:d,children:[n.jsx(q,{maxWidth:!1,children:n.jsxs(D,{component:"div",className:"footer",children:[n.jsxs(D,{component:"p",className:"footer-item",children:[n.jsxs("span",{className:"footer-copy",children:["Copyright © ",x," "]}),n.jsx("span",{className:"footer-brand",children:c})]}),i&&n.jsx(D,{component:"div",className:"footer-item",sx:{order:{xs:"-1",md:"initial"},ml:{xs:0,md:"auto"},width:{xs:"100%",md:"auto"}},children:i}),n.jsxs(D,{component:"p",className:"footer-item",style:{justifyContent:"flex-end",flexShrink:0},children:["Powered by",n.jsx(U,{mode:d?"light":"dark",layout:"horizontal",className:"logo-container"})]})]})}),n.jsx(C,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:(m=window==null?void 0:window.blocklet)==null?void 0:m.version})]})}W.propTypes={dark:r.bool,className:r.string,copyStart:r.oneOfType([r.string,r.number]),brand:r.string,style:r.object,addon:r.node};W.defaultProps={dark:!1,brand:"ArcBlock",copyStart:"2017",className:"",style:{},addon:null};const Ko=y("div",{shouldForwardProp:e=>e!=="dark"})`
145
+ `;function fe({children:e,brand:o,brandAddon:t,description:a,addons:l,onToggleMenu:c,homeUrl:d,logo:i,...u}){return n.jsx(Ko,{position:"sticky",className:"header",...u,children:n.jsxs(vo,{disableGutters:!1,className:"header-toolbar",children:[n.jsx(Re,{color:"inherit","aria-label":"open drawer",edge:"start",className:"header-menu","aira-label":"header menu button",onClick:c,children:n.jsx(me,{})}),n.jsxs(K,{to:d,className:"header-link",children:[n.jsx(Be,{mdDown:!0,children:n.jsx("div",{className:"header-logo",children:i||n.jsx(U,{showText:!1})})}),n.jsxs("div",{className:"header-title",children:[n.jsxs(D,{component:"h2",noWrap:!0,className:"header-title__primary",children:[o,t]}),n.jsx(D,{component:"p",noWrap:!0,className:"header-title__secondary",children:a})]})]}),n.jsx(C,{flexGrow:1}),!!e&&n.jsx("div",{className:"header-children",children:e}),n.jsx("div",{className:"header-addons",children:l})]})})}fe.propTypes={onToggleMenu:r.func.isRequired,brand:r.string.isRequired,brandAddon:r.object,description:r.any.isRequired,children:r.any,addons:r.any,homeUrl:r.string,logo:r.any};fe.defaultProps={children:null,addons:null,brandAddon:null,homeUrl:"/",logo:null};function W(e){var m;const o=xo(e,W,["dark","style"]),{className:t,copyStart:a,style:l,brand:c,dark:d,addon:i}=o,u=`${new Date().getFullYear()}`,s=`${a}`,x=u===s?u:`${s}-${u}`;return n.jsxs(Qo,{className:t,style:l,dark:d,children:[n.jsx(q,{maxWidth:!1,children:n.jsxs(D,{component:"div",className:"footer",children:[n.jsxs(D,{component:"p",className:"footer-item",children:[n.jsxs("span",{className:"footer-copy",children:["Copyright © ",x," "]}),n.jsx("span",{className:"footer-brand",children:c})]}),i&&n.jsx(D,{component:"div",className:"footer-item",sx:{order:{xs:"-1",md:"initial"},ml:{xs:0,md:"auto"},width:{xs:"100%",md:"auto"}},children:i}),n.jsxs(D,{component:"p",className:"footer-item",style:{justifyContent:"flex-end",flexShrink:0},children:["Powered by",n.jsx(U,{mode:d?"light":"dark",layout:"horizontal",className:"logo-container"})]})]})}),n.jsx(C,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:(m=window==null?void 0:window.blocklet)==null?void 0:m.version})]})}W.propTypes={dark:r.bool,className:r.string,copyStart:r.oneOfType([r.string,r.number]),brand:r.string,style:r.object,addon:r.node};W.defaultProps={dark:!1,brand:"ArcBlock",copyStart:"2017",className:"",style:{},addon:null};const Qo=y("div",{shouldForwardProp:e=>e!=="dark"})`
146
146
  position: relative;
147
147
  margin-top: 64px;
148
148
  padding: 24px 0 32px;
@@ -243,7 +243,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
243
243
  float: left;
244
244
  white-space: nowrap;
245
245
  }
246
- `;function E({logo:e,brand:o,brandAddon:t,description:a,children:l,addons:c,prepend:d,align:i,maxWidth:u,homeLink:s,...x}){const m=p.useRef(),[j,w]=p.useState("0px"),P={minWidth:j};p.useEffect(()=>{const{searchParams:f}=new URL(window.location.href);f.get("inviter")&&window.localStorage.setItem("inviter",f.get("inviter")),m.current&&w(`${m.current.offsetWidth}px`)},[]);const b=()=>{const f=n.jsxs(n.Fragment,{children:[e&&n.jsx("div",{className:"header-logo",ref:m,children:e}),o&&n.jsx(Se,{height:44,sx:{flexShrink:{xs:1}},children:n.jsxs("div",{className:"header-brand",children:[n.jsx("div",{className:"header-brand-title",children:n.jsx("h2",{children:o})}),n.jsx("div",{className:"header-brand-desc",children:a})]})})]});return typeof s=="function"?s(f):n.jsx("a",{href:s,children:f})};return n.jsx(on,{...x,children:n.jsxs(q,{maxWidth:u,className:"header-container",children:[d,n.jsx("div",{className:"header-brand-wrapper",style:P,children:b()}),n.jsx("div",{className:"header-brand-addon",children:t}),i==="right"&&n.jsx(C,{display:"inline-block",flexGrow:1}),l,i==="left"&&n.jsx(C,{display:"inline-block",flexGrow:1}),n.jsx("div",{className:"header-addons",children:c})]})})}E.propTypes={logo:r.node,brand:r.node,brandAddon:r.node,description:r.node,children:r.node,addons:r.node,prepend:r.node,align:r.oneOf(["left","right"]),maxWidth:r.oneOfType([r.string,r.oneOf(["xs","sm","md","lg","xl",!1])]),homeLink:r.oneOfType([r.string,r.func])};E.defaultProps={logo:null,brand:null,brandAddon:null,description:null,children:null,addons:null,prepend:null,align:"left",maxWidth:void 0,homeLink:"/"};const on=y(C)`
246
+ `;function V({logo:e,brand:o,brandAddon:t,description:a,children:l,addons:c,prepend:d,align:i,maxWidth:u,homeLink:s,...x}){const m=p.useRef(),[j,w]=p.useState("0px"),P={minWidth:j};p.useEffect(()=>{const{searchParams:f}=new URL(window.location.href);f.get("inviter")&&window.localStorage.setItem("inviter",f.get("inviter")),m.current&&w(`${m.current.offsetWidth}px`)},[]);const b=()=>{const f=n.jsxs(n.Fragment,{children:[e&&n.jsx("div",{className:"header-logo",ref:m,children:e}),o&&n.jsx(Se,{height:44,sx:{flexShrink:{xs:1}},children:n.jsxs("div",{className:"header-brand",children:[n.jsx("div",{className:"header-brand-title",children:n.jsx("h2",{children:o})}),n.jsx("div",{className:"header-brand-desc",children:a})]})})]});return typeof s=="function"?s(f):n.jsx("a",{href:s,children:f})};return n.jsx(on,{...x,children:n.jsxs(q,{maxWidth:u,className:"header-container",children:[d,n.jsx("div",{className:"header-brand-wrapper",style:P,children:b()}),n.jsx("div",{className:"header-brand-addon",children:t}),i==="right"&&n.jsx(C,{display:"inline-block",flexGrow:1}),l,i==="left"&&n.jsx(C,{display:"inline-block",flexGrow:1}),n.jsx("div",{className:"header-addons",children:c})]})})}V.propTypes={logo:r.node,brand:r.node,brandAddon:r.node,description:r.node,children:r.node,addons:r.node,prepend:r.node,align:r.oneOf(["left","right"]),maxWidth:r.oneOfType([r.string,r.oneOf(["xs","sm","md","lg","xl",!1])]),homeLink:r.oneOfType([r.string,r.func])};V.defaultProps={logo:null,brand:null,brandAddon:null,description:null,children:null,addons:null,prepend:null,align:"left",maxWidth:void 0,homeLink:"/"};const on=y(C)`
247
247
  position: relative;
248
248
  z-index: ${e=>e.theme.zIndex.appBar};
249
249
  font-size: 14px;
@@ -339,7 +339,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
339
339
  }
340
340
  }
341
341
  }
342
- `;function be({menu:e,prepend:o,children:t,...a}){const l=ee(),c=mo(l.breakpoints.down("md")),[d,i]=p.useState(!1),u=typeof t=="function"?t({isMobile:c,closeMenu:()=>i(!1)}):t,s=Le({changed:!1,value:"",priority:""});return te(()=>{var x;if((x=document.documentElement)!=null&&x.style){const m=()=>{s.changed&&(s.value?document.documentElement.style.setProperty("overflow",s.value,s.priority):document.documentElement.style.removeProperty("overflow"),s.value="",s.priority="",s.changed=!1)};return d?(s.changed=!0,s.value=document.documentElement.style.getPropertyValue("overflow"),s.priority=document.documentElement.style.getPropertyPriority("overflow"),document.documentElement.style.setProperty("overflow","revert","important")):m(),m}return()=>{}},[d]),t?n.jsxs(nn,{prepend:o||n.jsx(Re,{sx:{color:l.palette.grey[500]},edge:"start",className:"header-menu","aria-label":"header menu button",onClick:()=>i(!d),children:d?n.jsx(fo,{}):n.jsx(me,{})}),...a,children:[!c&&u,c&&n.jsx(_e,{open:d,onClose:()=>i(!1),ModalProps:{disablePortal:!1,keepMounted:!0,BackdropComponent:null},anchor:"top",sx:{top:64,zIndex:l.zIndex.appBar-1},PaperProps:{style:{top:64,bottom:0,boxShadow:"none"}},children:n.jsx(rn,{children:u})})]}):n.jsx(E,{prepend:o,...a})}be.propTypes={...E.PropTypes,children:r.oneOfType([r.node,r.func])};be.defaultProps={...E.defaultProps};const nn=y(E)`
342
+ `;function be({menu:e,prepend:o,children:t,...a}){const l=ee(),c=mo(l.breakpoints.down("md")),[d,i]=p.useState(!1),u=typeof t=="function"?t({isMobile:c,closeMenu:()=>i(!1)}):t,s=Le({changed:!1,value:"",priority:""});return te(()=>{var x;if((x=document.documentElement)!=null&&x.style){const m=()=>{s.changed&&(s.value?document.documentElement.style.setProperty("overflow",s.value,s.priority):document.documentElement.style.removeProperty("overflow"),s.value="",s.priority="",s.changed=!1)};return d?(s.changed=!0,s.value=document.documentElement.style.getPropertyValue("overflow"),s.priority=document.documentElement.style.getPropertyPriority("overflow"),document.documentElement.style.setProperty("overflow","revert","important")):m(),m}return()=>{}},[d]),t?n.jsxs(nn,{prepend:o||n.jsx(Re,{sx:{color:l.palette.grey[500]},edge:"start",className:"header-menu","aria-label":"header menu button",onClick:()=>i(!d),children:d?n.jsx(fo,{}):n.jsx(me,{})}),...a,children:[!c&&u,c&&n.jsx(_e,{open:d,onClose:()=>i(!1),ModalProps:{disablePortal:!1,keepMounted:!0,BackdropComponent:null},anchor:"top",sx:{top:64,zIndex:l.zIndex.appBar-1},PaperProps:{style:{top:64,bottom:0,boxShadow:"none"}},children:n.jsx(rn,{children:u})})]}):n.jsx(V,{prepend:o,...a})}be.propTypes={...V.PropTypes,children:r.oneOfType([r.node,r.func])};be.defaultProps={...V.defaultProps};const nn=y(V)`
343
343
  .header-menu {
344
344
  display: none;
345
345
  }
@@ -536,7 +536,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
536
536
  .navmenu-sub--opened > .navmenu-sub-container {
537
537
  display: block;
538
538
  }
539
- `,ve=p.createContext();function Ye(e){return e?p.Children.toArray(e).filter(o=>o.type===G||o.type===O):null}function Xe(e){return p.useRef(e||`navmenu-item-id-${Math.random().toString(36).slice(2)}`).current}function S({items:e,mode:o,children:t,activeId:a,textColor:l,activeTextColor:c,bgColor:d,onSelected:i,...u}){var T;if(t=Ye(t),!(e!=null&&e.length)&&!(t!=null&&t.length))throw new Error("One of 'items' or 'children' is required by NavMenu component.");const s=Le({activeId:a,openedIds:[],hiddenItemCount:0}),x=X(h=>{s.activeId=h,i==null||i(h)}),m=X(h=>{s.openedIds.push(h)}),j=X(h=>{s.openedIds=s.openedIds.filter(v=>v!==h)}),w=te(()=>({...s,mode:o,activate:x,open:m,close:j}),[s.activeId,s.hiddenItemCount,s.openedIds,o,x,m,j]),P=p.useRef(),b=p.useRef([]),f=p.useRef(),z=s.hiddenItemCount===((T=b.current)==null?void 0:T.length),M=z?{marginLeft:"0px"}:void 0,B=te(()=>z?n.jsx(Ao,{}):n.jsx(Do,{}),[z]),I=h=>p.Children.map(h,(v,H)=>p.cloneElement(v,{ref:L=>{b.current[H]=L}})),N=Ie(P.current),{run:g}=Lo(X(()=>{let h=0,v=0,H=!1;const L=(N==null?void 0:N.width)||0,ne=f.current?f.current.offsetWidth+parseFloat(window.getComputedStyle(f.current).marginLeft):0;b.current.forEach((V,eo)=>{if(V){V.style.display="flex";const oo=eo>0?parseFloat(window.getComputedStyle(V).marginLeft):0,we=V.offsetWidth+oo;L-ne>=h+we&&!H?h+=we:(V.style.display="none",H=!0,v++)}}),v!==s.hiddenItemCount&&(s.hiddenItemCount=v)}),{wait:100});p.useLayoutEffect(()=>{o==="horizontal"&&g()},[N==null?void 0:N.width,o]),p.useEffect(()=>{if(o==="horizontal")return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[o,e]),p.useEffect(()=>{a!=null&&(s.activeId=a)},[a]);const k=R("navmenu",`navmenu--${o}`,u.className),A=(h,v,H=!1)=>h!=null&&h.children?n.jsx(O,{id:h.id,icon:h.icon,label:h.label,ref:H?L=>{b.current[v]=L}:void 0,children:h.children.map((L,ne)=>A(L,ne,!1))},h.id):n.jsx(G,{id:h.id,icon:h.icon,label:h.label,active:h.active,ref:H?L=>{b.current[v]=L}:void 0},h.id),je=e?e==null?void 0:e.slice(-s.hiddenItemCount).map((h,v)=>A(h,v)):t==null?void 0:t.slice(-s.hiddenItemCount),F=o==="inline"?an:tn;return n.jsx(ve.Provider,{value:w,children:n.jsx(F,{...u,className:k,$textColor:l,$activeTextColor:c,$bgColor:d,children:n.jsxs("ul",{className:"navmenu-root",ref:P,children:[e?e.map((h,v)=>A(h,v,!0)):I(t),s.hiddenItemCount>0&&n.jsx(O,{expandIcon:!1,icon:B,label:"",ref:f,style:M,children:je})]})})})}S.propTypes={items:r.array,mode:r.oneOf(["horizontal","vertical","inline"]),children:r.array,activeId:r.string,textColor:r.string,activeTextColor:r.string,bgColor:r.string,onSelected:r.func};S.defaultProps={items:null,mode:"horizontal",children:null,activeId:null,textColor:"#9397a1",activeTextColor:"#25292f",bgColor:"#fff",onSelected:null};const G=p.forwardRef(({id:e,icon:o,label:t,active:a,onClick:l,...c},d)=>{const i=Xe(e),{activeId:u,activate:s}=p.useContext(ve),x=R("navmenu-item",{"navmenu-item--active":u===i},c.className);p.useEffect(()=>{a&&s(i)},[a]);const m=()=>{l==null||l(),s(i)};return n.jsxs("li",{...c,className:x,onClick:m,ref:d,children:[o&&n.jsx("span",{className:"navmenu-item-icon",children:o}),n.jsx("span",{className:"navmenu-item-label",children:t})]})});G.propTypes={id:r.string,icon:r.element,label:r.node,active:r.bool,onClick:r.func};G.defaultProps={id:null,icon:null,label:"",active:!1,onClick:null};const O=p.forwardRef(({id:e,icon:o,label:t,children:a,expandIcon:l,...c},d)=>{const i=Xe(e),{openedIds:u,open:s,close:x,mode:m}=p.useContext(ve),j=u.includes(i),w=R("navmenu-sub",{"navmenu-sub--opened":j},c.className),P=m==="inline",b=P?{onClick:()=>{u.includes(i)?x(i):s(i)}}:{onMouseEnter:()=>s(i),onMouseLeave:()=>x(i)},f=P?{onClick:z=>z.stopPropagation()}:{};return n.jsxs("li",{...c,className:w,...b,ref:d,children:[o&&n.jsx("span",{className:"navmenu-sub-icon",children:o}),n.jsx("span",{className:"navmenu-sub-label",children:t}),l&&n.jsx("span",{className:"navmenu-sub-expand-icon",children:(l==null?void 0:l({isOpen:j}))||l}),n.jsx("div",{className:"navmenu-sub-container",...f,children:n.jsx("ul",{className:"navmenu-sub-list",children:Ye(a)})})]})});O.propTypes={id:r.string,icon:r.element,label:r.node.isRequired,children:r.array.isRequired,expandIcon:r.oneOfType([r.node,r.func])};O.defaultProps={id:null,icon:null,expandIcon:({isOpen:e})=>n.jsx(Bo,{style:{transform:`rotate(${e?180:0}deg)`}})};S.Item=G;S.Sub=O;function oe({children:e,routerLinkComponent:o,to:t,external:a,...l}){return a?n.jsx("a",{href:t,...l,children:e}):n.jsx(o,{to:t,...l,children:e})}oe.propTypes={children:r.any.isRequired,routerLinkComponent:r.elementType.isRequired,external:r.bool,to:r.oneOfType([r.string,r.object]).isRequired};oe.defaultProps={external:!1};function Qe(e){return n.jsx(oe,{routerLinkComponent:J,...e})}function ye({className:e,...o}){const t=o.external&&typeof e=="function"?e({}):e;return n.jsx(oe,{routerLinkComponent:go,className:t,...o})}ye.propTypes={className:r.oneOfType([r.string,r.func])};ye.defaultProps={className:""};function Je(e,o){var u;if((u=e.children)!=null&&u.length)return sn(e,o);const{url:t,icon:a,title:l,showBadge:c,external:d,active:i}=e;return n.jsx("li",{className:"layout-sidebar-item",children:n.jsxs(ye,{external:d,to:t,className:({isActive:s})=>R("layout-sidebar-link",{"layout-sidebar-link--active":d?i:s}),children:[a&&n.jsx("span",{className:`layout-sidebar-icon ${c?"layout-sidebar-badge":""}`,children:a}),n.jsx(D,{component:"span",className:"layout-sidebar-link-text",children:l})]})},`${t}-${o}`)}function sn(e,o){return n.jsxs("li",{className:"layout-sidebar-group",children:[n.jsx("span",{className:"layout-sidebar-group-title",children:e.title}),n.jsx("ul",{children:e.children.map(Je)})]},`group-${e.title}-${o}`)}function K({links:e,addons:o,dense:t,...a}){return n.jsxs(dn,{...a,className:R({"layout-sidebar-dense":t}),children:[n.jsx("ul",{children:e.map(Je)}),n.jsx("div",{style:{flex:1}}),o]})}K.propTypes={links:r.array.isRequired,addons:r.any,dense:r.bool};K.defaultProps={addons:null,dense:!1};const ln="linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))",dn=y("div")`
539
+ `,ve=p.createContext();function Ye(e){return e?p.Children.toArray(e).filter(o=>o.type===G||o.type===O):null}function Xe(e){return p.useRef(e||`navmenu-item-id-${Math.random().toString(36).slice(2)}`).current}function S({items:e,mode:o,children:t,activeId:a,textColor:l,activeTextColor:c,bgColor:d,onSelected:i,...u}){var T;if(t=Ye(t),!(e!=null&&e.length)&&!(t!=null&&t.length))throw new Error("One of 'items' or 'children' is required by NavMenu component.");const s=Le({activeId:a,openedIds:[],hiddenItemCount:0}),x=X(h=>{s.activeId=h,i==null||i(h)}),m=X(h=>{s.openedIds.push(h)}),j=X(h=>{s.openedIds=s.openedIds.filter(v=>v!==h)}),w=te(()=>({...s,mode:o,activate:x,open:m,close:j}),[s.activeId,s.hiddenItemCount,s.openedIds,o,x,m,j]),P=p.useRef(),b=p.useRef([]),f=p.useRef(),z=s.hiddenItemCount===((T=b.current)==null?void 0:T.length),M=z?{marginLeft:"0px"}:void 0,B=te(()=>z?n.jsx(Ao,{}):n.jsx(Do,{}),[z]),I=h=>p.Children.map(h,(v,H)=>p.cloneElement(v,{ref:L=>{b.current[H]=L}})),N=Ie(P.current),{run:g}=Lo(X(()=>{let h=0,v=0,H=!1;const L=(N==null?void 0:N.width)||0,ne=f.current?f.current.offsetWidth+parseFloat(window.getComputedStyle(f.current).marginLeft):0;b.current.forEach((E,eo)=>{if(E){E.style.display="flex";const oo=eo>0?parseFloat(window.getComputedStyle(E).marginLeft):0,we=E.offsetWidth+oo;L-ne>=h+we&&!H?h+=we:(E.style.display="none",H=!0,v++)}}),v!==s.hiddenItemCount&&(s.hiddenItemCount=v)}),{wait:100});p.useLayoutEffect(()=>{o==="horizontal"&&g()},[N==null?void 0:N.width,o]),p.useEffect(()=>{if(o==="horizontal")return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[o,e]),p.useEffect(()=>{a!=null&&(s.activeId=a)},[a]);const k=R("navmenu",`navmenu--${o}`,u.className),A=(h,v,H=!1)=>h!=null&&h.children?n.jsx(O,{id:h.id,icon:h.icon,label:h.label,ref:H?L=>{b.current[v]=L}:void 0,children:h.children.map((L,ne)=>A(L,ne,!1))},h.id):n.jsx(G,{id:h.id,icon:h.icon,label:h.label,active:h.active,ref:H?L=>{b.current[v]=L}:void 0},h.id),je=e?e==null?void 0:e.slice(-s.hiddenItemCount).map((h,v)=>A(h,v)):t==null?void 0:t.slice(-s.hiddenItemCount),F=o==="inline"?an:tn;return n.jsx(ve.Provider,{value:w,children:n.jsx(F,{...u,className:k,$textColor:l,$activeTextColor:c,$bgColor:d,children:n.jsxs("ul",{className:"navmenu-root",ref:P,children:[e?e.map((h,v)=>A(h,v,!0)):I(t),s.hiddenItemCount>0&&n.jsx(O,{expandIcon:!1,icon:B,label:"",ref:f,style:M,children:je})]})})})}S.propTypes={items:r.array,mode:r.oneOf(["horizontal","vertical","inline"]),children:r.array,activeId:r.string,textColor:r.string,activeTextColor:r.string,bgColor:r.string,onSelected:r.func};S.defaultProps={items:null,mode:"horizontal",children:null,activeId:null,textColor:"#9397a1",activeTextColor:"#25292f",bgColor:"#fff",onSelected:null};const G=p.forwardRef(({id:e,icon:o,label:t,active:a,onClick:l,...c},d)=>{const i=Xe(e),{activeId:u,activate:s}=p.useContext(ve),x=R("navmenu-item",{"navmenu-item--active":u===i},c.className);p.useEffect(()=>{a&&s(i)},[a]);const m=()=>{l==null||l(),s(i)};return n.jsxs("li",{...c,className:x,onClick:m,ref:d,children:[o&&n.jsx("span",{className:"navmenu-item-icon",children:o}),n.jsx("span",{className:"navmenu-item-label",children:t})]})});G.propTypes={id:r.string,icon:r.element,label:r.node,active:r.bool,onClick:r.func};G.defaultProps={id:null,icon:null,label:"",active:!1,onClick:null};const O=p.forwardRef(({id:e,icon:o,label:t,children:a,expandIcon:l,...c},d)=>{const i=Xe(e),{openedIds:u,open:s,close:x,mode:m}=p.useContext(ve),j=u.includes(i),w=R("navmenu-sub",{"navmenu-sub--opened":j},c.className),P=m==="inline",b=P?{onClick:()=>{u.includes(i)?x(i):s(i)}}:{onMouseEnter:()=>s(i),onMouseLeave:()=>x(i)},f=P?{onClick:z=>z.stopPropagation()}:{};return n.jsxs("li",{...c,className:w,...b,ref:d,children:[o&&n.jsx("span",{className:"navmenu-sub-icon",children:o}),n.jsx("span",{className:"navmenu-sub-label",children:t}),l&&n.jsx("span",{className:"navmenu-sub-expand-icon",children:(l==null?void 0:l({isOpen:j}))||l}),n.jsx("div",{className:"navmenu-sub-container",...f,children:n.jsx("ul",{className:"navmenu-sub-list",children:Ye(a)})})]})});O.propTypes={id:r.string,icon:r.element,label:r.node.isRequired,children:r.array.isRequired,expandIcon:r.oneOfType([r.node,r.func])};O.defaultProps={id:null,icon:null,expandIcon:({isOpen:e})=>n.jsx(Bo,{style:{transform:`rotate(${e?180:0}deg)`}})};S.Item=G;S.Sub=O;function oe({children:e,routerLinkComponent:o,to:t,external:a,...l}){return a?n.jsx("a",{href:t,...l,children:e}):n.jsx(o,{to:t,...l,children:e})}oe.propTypes={children:r.any.isRequired,routerLinkComponent:r.elementType.isRequired,external:r.bool,to:r.oneOfType([r.string,r.object]).isRequired};oe.defaultProps={external:!1};function Je(e){return n.jsx(oe,{routerLinkComponent:K,...e})}function ye({className:e,...o}){const t=o.external&&typeof e=="function"?e({}):e;return n.jsx(oe,{routerLinkComponent:go,className:t,...o})}ye.propTypes={className:r.oneOfType([r.string,r.func])};ye.defaultProps={className:""};function Ke(e,o){var u;if((u=e.children)!=null&&u.length)return sn(e,o);const{url:t,icon:a,title:l,showBadge:c,external:d,active:i}=e;return n.jsx("li",{className:"layout-sidebar-item",children:n.jsxs(ye,{external:d,to:t,className:({isActive:s})=>R("layout-sidebar-link",{"layout-sidebar-link--active":d?i:s}),children:[a&&n.jsx("span",{className:`layout-sidebar-icon ${c?"layout-sidebar-badge":""}`,children:a}),n.jsx(D,{component:"span",className:"layout-sidebar-link-text",children:l})]})},`${t}-${o}`)}function sn(e,o){return n.jsxs("li",{className:"layout-sidebar-group",children:[n.jsx("span",{className:"layout-sidebar-group-title",children:e.title}),n.jsx("ul",{children:e.children.map(Ke)})]},`group-${e.title}-${o}`)}function Q({links:e,addons:o,dense:t,...a}){return n.jsxs(dn,{...a,className:R({"layout-sidebar-dense":t}),children:[n.jsx("ul",{children:e.map(Ke)}),n.jsx("div",{style:{flex:1}}),o]})}Q.propTypes={links:r.array.isRequired,addons:r.any,dense:r.bool};Q.defaultProps={addons:null,dense:!1};const ln="linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))",dn=y("div")`
540
540
  display: flex;
541
541
  flex-direction: column;
542
542
  ul {
@@ -661,7 +661,7 @@ import{aG as Pe,aF as ze,aH as Z,aj as Ne,aI as _,aL as $,r as p,aJ as Ce,aK as
661
661
  margin-top: 16px;
662
662
  }
663
663
  }
664
- `;function cn({closeMenu:e,...o}){const t=de();return p.useEffect(()=>{e()},[t]),n.jsx(S,{...o})}function Ke(e,o){return e.map(t=>{var a;return(a=t.children)!=null&&a.length?{...t,label:t.title,children:Ke(t.children,o)}:{...t,label:n.jsx(Qe,{to:t.url,external:t.external,children:t.title}),active:t.external?t.active:!!bo({path:t.url,end:!1},o.pathname)}})}function Y({children:e,title:o,headerProps:t,links:a=[],fullWidth:l,dense:c,footerProps:d,...i}){const u=ee(),{inFullPage:s,showToggleButton:x,headerVisible:m,footerVisible:j,sidebarVisible:w,toggleFullPage:P}=_o(),b=de(),f=p.useMemo(()=>Ke(a,b),[b,a]),z=f.some(g=>{var k;return!!((k=g.children)!=null&&k.length)}),M=c==="auto"?f.length>=8||z:c,B=R("dashboard",{"dashboard-dense":M},i.className),N={homeLink:g=>{var k;return n.jsx(Qe,{to:((k=window.blocklet)==null?void 0:k.prefix)||"/",children:g})},...t};return p.useEffect(()=>{const{searchParams:g}=new URL(window.location.href);g.get("inviter")&&window.localStorage.setItem("inviter",g.get("inviter"))},[]),n.jsxs(pn,{...i,className:B,children:[n.jsx(Te,{title:o},o),m&&n.jsx(un,{...N,className:"dashboard-header",children:a!=null&&a.length?({isMobile:g,closeMenu:k})=>g?n.jsx(cn,{mode:"inline",items:f,closeMenu:k,bgColor:"transparent",activeTextColor:u.palette.primary.main}):null:null}),n.jsxs(C,{display:"flex",className:"dashboard-body",children:[n.jsx(Be,{mdDown:!0,children:!!(a!=null&&a.length)&&w&&n.jsx(C,{className:"dashboard-sidebar",children:M?n.jsx(K,{links:a,dense:M}):n.jsx(C,{className:"dashboard-sidebar-container",children:n.jsx(K,{links:a,dense:M})})})}),n.jsxs(C,{className:"dashboard-main",children:[x&&n.jsx(C,{sx:{position:"absolute",top:4,right:4,display:"flex",justifyContent:"center",alignItems:"center",width:24,height:24,color:"#fff",bgcolor:"rgba(158,158,158, 0.6);",borderRadius:1,cursor:"pointer"},onClick:P,children:s?n.jsx(We,{style:{fontSize:18}}):n.jsx(Oe,{style:{fontSize:18}})}),n.jsx(q,{className:"dashboard-content",...l&&{maxWidth:!1},children:e}),j&&n.jsx(W,{...d})]})]})]})}Y.propTypes={children:r.any.isRequired,title:r.string,links:r.array.isRequired,headerProps:r.object,fullWidth:r.bool,sidebarWidth:r.number,dense:r.oneOf([!0,!1,"auto"])};Y.defaultProps={title:"Home",headerProps:{},fullWidth:!1,sidebarWidth:120,dense:"auto"};const pn=y("div",{shouldForwardProp:e=>e!=="sidebarWidth"})`
664
+ `;function cn({closeMenu:e,...o}){const t=de();return p.useEffect(()=>{e()},[t]),n.jsx(S,{...o})}function Qe(e,o){return e.map(t=>{var a;return(a=t.children)!=null&&a.length?{...t,label:t.title,children:Qe(t.children,o)}:{...t,label:n.jsx(Je,{to:t.url,external:t.external,children:t.title}),active:t.external?t.active:!!bo({path:t.url,end:!1},o.pathname)}})}function Y({children:e,title:o,headerProps:t,links:a=[],fullWidth:l,dense:c,footerProps:d,...i}){const u=ee(),{inFullPage:s,showToggleButton:x,headerVisible:m,footerVisible:j,sidebarVisible:w,toggleFullPage:P}=_o(),b=de(),f=p.useMemo(()=>Qe(a,b),[b,a]),z=f.some(g=>{var k;return!!((k=g.children)!=null&&k.length)}),M=c==="auto"?f.length>=8||z:c,B=R("dashboard",{"dashboard-dense":M},i.className),N={homeLink:g=>{var k;return n.jsx(Je,{to:((k=window.blocklet)==null?void 0:k.prefix)||"/",children:g})},...t};return p.useEffect(()=>{const{searchParams:g}=new URL(window.location.href);g.get("inviter")&&window.localStorage.setItem("inviter",g.get("inviter"))},[]),n.jsxs(pn,{...i,className:B,children:[n.jsx(Te,{title:o},o),m&&n.jsx(un,{...N,className:"dashboard-header",children:a!=null&&a.length?({isMobile:g,closeMenu:k})=>g?n.jsx(cn,{mode:"inline",items:f,closeMenu:k,bgColor:"transparent",activeTextColor:u.palette.primary.main}):null:null}),n.jsxs(C,{display:"flex",className:"dashboard-body",children:[n.jsx(Be,{mdDown:!0,children:!!(a!=null&&a.length)&&w&&n.jsx(C,{className:"dashboard-sidebar",children:M?n.jsx(Q,{links:a,dense:M}):n.jsx(C,{className:"dashboard-sidebar-container",children:n.jsx(Q,{links:a,dense:M})})})}),n.jsxs(C,{className:"dashboard-main",children:[x&&n.jsx(C,{sx:{position:"absolute",top:4,right:4,display:"flex",justifyContent:"center",alignItems:"center",width:24,height:24,color:"#fff",bgcolor:"rgba(158,158,158, 0.6);",borderRadius:1,cursor:"pointer"},onClick:P,children:s?n.jsx(We,{style:{fontSize:18}}):n.jsx(Oe,{style:{fontSize:18}})}),n.jsx(q,{className:"dashboard-content",...l&&{maxWidth:!1},children:e}),j&&n.jsx(W,{...d})]})]})]})}Y.propTypes={children:r.any.isRequired,title:r.string,links:r.array.isRequired,headerProps:r.object,fullWidth:r.bool,sidebarWidth:r.number,dense:r.oneOf([!0,!1,"auto"])};Y.defaultProps={title:"Home",headerProps:{},fullWidth:!1,sidebarWidth:120,dense:"auto"};const pn=y("div",{shouldForwardProp:e=>e!=="sidebarWidth"})`
665
665
  &.dashboard {
666
666
  display: flex;
667
667
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{r as r0,aZ as hb,aQ as WA,bX as aA,j as y,cr as nA,cs as db,t as dA,ab as tA,P,a0 as C0,n as YM,ct as KM,cu as iA,cv as QM,cw as tb,b8 as rA,a1 as Xb,ad as sA,cx as fA,cy as uA,cz as RA,cA as lA,cB as LA,cC as NA,T as BA,C as hA}from"./index-DIxJxM78.js";import{g as XA,a as mA,b as TA}from"./spaces-BirpDOm3.js";import{j as yA}from"./url-join-CTlMVeSl.js";import{S as W2}from"./Skeleton-DqrgKJha.js";import{H as gA}from"./Hidden-w-nWLLe2.js";function _A(){const[M,b]=r0.useState(null),{blocklet:O}=hb();return r0.useEffect(()=>{b(XA(O))},[O]),{storageEndpoint:M}}const mb=r0.createContext({}),{Provider:SA,Consumer:R5}=mb;function Tb({children:M}){const[b,O]=r0.useState(!1),[c,q]=r0.useState(null),{blocklet:W,actions:{refreshBlocklet:d}}=hb(),{storageEndpoint:i}=_A(),{api:X}=WA();aA(async()=>{try{if(O(!0),db.isEmpty(i)){q(null);return}const E=await mA(i);q(E)}catch(E){console.error(E),dA.error(E.message)}finally{O(!1)}},[i]);const R=()=>{q(null),d()},w=async E=>{q(E),await Q(E.endpoint),d()},Q=async E=>{await X.configBlocklet({input:{did:[W.meta.did],configs:[{key:tA.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:E}]}}),d()};r0.useEffect(()=>{async function E(){if(!c)return;const D=await TA(c.endpoint,c.name),n0=db.merge(c,{name:D});q(n0)}E()},[]);const _=!!(i&&c);return y.jsx(SA,{value:{loading:b,spaceGateway:c,deleteSpaceGateway:R,updateSpaceGateway:w,storageEndpoint:i,settingStorageEndpoint:Q,hasStorageEndpoint:_},children:M})}Tb.propTypes={children:nA.node.isRequired};Tb.defaultProps={};function l5(){return r0.useContext(mb)}function JM({value:M,size:b,style:O,...c}){return y.jsxs(kA,{style:{width:b,height:b,...O},...c,children:[y.jsx(YM,{variant:"determinate",role:"progressbar",value:100,size:b,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),y.jsx(YM,{variant:"determinate",value:M,role:"progressbar",size:b,thickness:10,"aria-label":"main progress bar"})]})}JM.propTypes={value:P.number.isRequired,size:P.number,style:P.object};JM.defaultProps={size:10,style:{}};const kA=C0.span`
1
+ import{r as r0,aZ as hb,aQ as WA,bX as aA,j as y,cr as nA,cs as db,t as dA,a9 as tA,P,Z as C0,n as YM,ct as KM,cu as iA,cv as QM,cw as tb,b8 as rA,$ as Xb,ab as sA,cx as fA,cy as uA,cz as RA,cA as lA,cB as LA,cC as NA,T as BA,C as hA}from"./index-DfZjT3WA.js";import{g as XA,a as mA,b as TA}from"./spaces-DDj9ynWl.js";import{j as yA}from"./url-join-BoNn2Qh7.js";import{S as W2}from"./Skeleton-YurB3EC5.js";import{H as gA}from"./Hidden-DJwWGZh0.js";function _A(){const[M,b]=r0.useState(null),{blocklet:O}=hb();return r0.useEffect(()=>{b(XA(O))},[O]),{storageEndpoint:M}}const mb=r0.createContext({}),{Provider:SA,Consumer:R5}=mb;function Tb({children:M}){const[b,O]=r0.useState(!1),[c,q]=r0.useState(null),{blocklet:W,actions:{refreshBlocklet:d}}=hb(),{storageEndpoint:i}=_A(),{api:X}=WA();aA(async()=>{try{if(O(!0),db.isEmpty(i)){q(null);return}const E=await mA(i);q(E)}catch(E){console.error(E),dA.error(E.message)}finally{O(!1)}},[i]);const R=()=>{q(null),d()},w=async E=>{q(E),await Q(E.endpoint),d()},Q=async E=>{await X.configBlocklet({input:{did:[W.meta.did],configs:[{key:tA.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:E}]}}),d()};r0.useEffect(()=>{async function E(){if(!c)return;const D=await TA(c.endpoint,c.name),n0=db.merge(c,{name:D});q(n0)}E()},[]);const _=!!(i&&c);return y.jsx(SA,{value:{loading:b,spaceGateway:c,deleteSpaceGateway:R,updateSpaceGateway:w,storageEndpoint:i,settingStorageEndpoint:Q,hasStorageEndpoint:_},children:M})}Tb.propTypes={children:nA.node.isRequired};Tb.defaultProps={};function l5(){return r0.useContext(mb)}function JM({value:M,size:b,style:O,...c}){return y.jsxs(kA,{style:{width:b,height:b,...O},...c,children:[y.jsx(YM,{variant:"determinate",role:"progressbar",value:100,size:b,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),y.jsx(YM,{variant:"determinate",value:M,role:"progressbar",size:b,thickness:10,"aria-label":"main progress bar"})]})}JM.propTypes={value:P.number.isRequired,size:P.number,style:P.object};JM.defaultProps={size:10,style:{}};const kA=C0.span`
2
2
  display: inline-block;
3
3
  position: relative;
4
4
  > * {