@abtnode/webapp 1.16.49-beta-20250812-040454-05aece54 → 1.16.49-beta-20250813-141500-f02b41b4

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 (204) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Ct0VTXw3.js → AdapterDayjs-BjO18toV.js} +1 -1
  4. package/dist/assets/{Add-xsnJutmq.js → Add-D7FBmxz9.js} +1 -1
  5. package/dist/assets/ArrowDropDown-CGRxh8gD.js +1 -0
  6. package/dist/assets/{Autocomplete-B8LzLUZe.js → Autocomplete-Bj2hcqGf.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-BDzy2bld.js → Breadcrumbs-DwE835ah.js} +1 -1
  8. package/dist/assets/{ButtonGroup-2OIq-PXC.js → ButtonGroup-CToFieon.js} +1 -1
  9. package/dist/assets/{CSSTransition-RdSxc12C.js → CSSTransition-DG0p2bDc.js} +1 -1
  10. package/dist/assets/{CallMerge-DxChMRnd.js → CallMerge-DDDKPRmO.js} +1 -1
  11. package/dist/assets/{CardContent-D4kbuto4.js → CardContent-DXBw-i1o.js} +1 -1
  12. package/dist/assets/{ChevronLeft-KRG-fuZi.js → ChevronLeft-ClJUpIrX.js} +1 -1
  13. package/dist/assets/{ChevronRight-BmsIaZOg.js → ChevronRight-pNcrG18Z.js} +1 -1
  14. package/dist/assets/{Clear-ClOZ_U5s.js → Clear-wN_lM9i_.js} +1 -1
  15. package/dist/assets/{DeleteOutline-D00EO6C8.js → DeleteOutline-0Pjk0X04.js} +1 -1
  16. package/dist/assets/{Done-BTVTKjDk.js → Done-Bvnq95wW.js} +1 -1
  17. package/dist/assets/{Edit-DXMp4A9G.js → Edit-CVMHb0TK.js} +1 -1
  18. package/dist/assets/{ErrorOutline-C6AxgGOX.js → ErrorOutline-B2Mw_vUr.js} +1 -1
  19. package/dist/assets/{FilterList-TV3SGdIn.js → FilterList-agXhdRax.js} +1 -1
  20. package/dist/assets/{Google-BuIv4wD3.js → Google-CnSXuxho.js} +1 -1
  21. package/dist/assets/{HelpOutline-B7Ct-krn.js → HelpOutline-CNZGWmTU.js} +1 -1
  22. package/dist/assets/{Launch-BvjA_9TZ.js → Launch-CmazaRGZ.js} +1 -1
  23. package/dist/assets/{Link-Uzugo-zp.js → Link-DxObZpZX.js} +1 -1
  24. package/dist/assets/{ListItemButton-BBR__ebu.js → ListItemButton-Bk_S-24I.js} +1 -1
  25. package/dist/assets/{ListSubheader-CW_V4Z24.js → ListSubheader-CjL9mMf3.js} +1 -1
  26. package/dist/assets/{LoadingButton-Y_0rPcsy.js → LoadingButton-BTTKyDvk.js} +1 -1
  27. package/dist/assets/{MoreVert-DrzE5AUf.js → MoreVert-CpVaEDbL.js} +1 -1
  28. package/dist/assets/{OpenInNew-53sNi7bT.js → OpenInNew-zVEoRj2W.js} +1 -1
  29. package/dist/assets/{Refresh-02-oGzO6.js → Refresh-BZtduSQA.js} +1 -1
  30. package/dist/assets/{Search-7wyvQCyz.js → Search-C1hYBh2z.js} +1 -1
  31. package/dist/assets/{Slider-DACfJuWn.js → Slider-D41Gc6DM.js} +1 -1
  32. package/dist/assets/{Stepper-ZBVUR9pb.js → Stepper-Bax0qACN.js} +1 -1
  33. package/dist/assets/{Switch-D8Y_AkUP.js → Switch-BA5PH6p0.js} +1 -1
  34. package/dist/assets/{TableSearch-j7mUrdaA.js → TableSearch-BzANvfKC.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-CWiKD-9f.js → ToggleButtonGroup-BzxI_4Ka.js} +1 -1
  36. package/dist/assets/{Verified-COnwjqrJ.js → Verified-B9q95gmQ.js} +1 -1
  37. package/dist/assets/{VerifiedUser-DnX0aEPL.js → VerifiedUser-CPgjTUes.js} +1 -1
  38. package/dist/assets/{ViewList-_K538mHc.js → ViewList-CEZqTkZN.js} +1 -1
  39. package/dist/assets/{_createAggregator-Dt3Ih0i2.js → _createAggregator-6qCBlT2m.js} +1 -1
  40. package/dist/assets/{actions-DRuv-pyx.js → actions-CwHV7VOi.js} +1 -1
  41. package/dist/assets/{actions-Cxap2JOs.js → actions-Lc_gpmy_.js} +1 -1
  42. package/dist/assets/{agreement-DqRsm6CV.js → agreement-nMH2PwNa.js} +1 -1
  43. package/dist/assets/api-C4QD0LkR.js +1 -0
  44. package/dist/assets/{appearance-Bm7cllFQ.js → appearance-wME-EwFf.js} +1 -1
  45. package/dist/assets/{ar-BrkwppMS.js → ar-RVOyZ73G.js} +1 -1
  46. package/dist/assets/{audit-logs-ClrCXrBK.js → audit-logs-DQNniPIc.js} +1 -1
  47. package/dist/assets/{base-chart-vZbN8YRn.js → base-chart-DfzeqYgM.js} +1 -1
  48. package/dist/assets/{blocklet-CSWEnHbv.js → blocklet-CXBJcwmD.js} +1 -1
  49. package/dist/assets/chain-0epXNZTv.js +6 -0
  50. package/dist/assets/{click-to-copy-B94Iq4_S.js → click-to-copy-CCt7i81W.js} +1 -1
  51. package/dist/assets/client-BriPpb0D.js +1 -0
  52. package/dist/assets/cloneDeep-DZJaLQYA.js +1 -0
  53. package/dist/assets/{collapse-Dezh2CAn.js → collapse-UWItJur2.js} +1 -1
  54. package/dist/assets/{config-navigation-BXm4eTU9.js → config-navigation-D7hjrTsx.js} +3 -3
  55. package/dist/assets/{connect-to-Dyd-KizX.js → connect-to-DUMdqErZ.js} +1 -1
  56. package/dist/assets/{cssMode-B6wVTcZ6.js → cssMode-OQuv2wel.js} +1 -1
  57. package/dist/assets/{de-DjoPhrWS.js → de-BXIXPwxt.js} +1 -1
  58. package/dist/assets/{delete-confirm-BzjquUay.js → delete-confirm-i_RblorR.js} +1 -1
  59. package/dist/assets/{depsEqual-DIBRq7Fr.js → depsEqual-CLLXOjvx.js} +1 -1
  60. package/dist/assets/{detail-DFtAGu9W.js → detail-SmxG2E5W.js} +3 -3
  61. package/dist/assets/{domains-BKhbtqSe.js → domains-Bxk0d7jT.js} +2 -2
  62. package/dist/assets/{download-B60HlzLV.js → download-DtuXp01T.js} +12 -12
  63. package/dist/assets/{edit.svg-Ad7pR1Ko.js → edit.svg-BhSUheUT.js} +1 -1
  64. package/dist/assets/emotion-cache.browser.esm-BE8-ertk.js +1 -0
  65. package/dist/assets/engine-ByaR-FMJ.js +1 -0
  66. package/dist/assets/{es-BLM6BW2Z.js → es-DJvu101w.js} +1 -1
  67. package/dist/assets/{fr-DM9fauTH.js → fr-D9eGKSnG.js} +1 -1
  68. package/dist/assets/{freemarker2-sCWMHP7f.js → freemarker2-CSRF4Izm.js} +1 -1
  69. package/dist/assets/{get-safe-url-CXm2qbfD.js → get-safe-url-CO9heLC_.js} +1 -1
  70. package/dist/assets/getValidReactChildren-yMK1JaZz.js +1 -0
  71. package/dist/assets/{graphqlMode-NDLjYpwF.js → graphqlMode-Y3Syqq4-.js} +2 -2
  72. package/dist/assets/{handlebars-D5m3wM2h.js → handlebars-C5wgXGwl.js} +1 -1
  73. package/dist/assets/{hi-DgD0hgry.js → hi-CSHwUi_Z.js} +1 -1
  74. package/dist/assets/{html-CnanFkII.js → html-_LQ37iNF.js} +1 -1
  75. package/dist/assets/{html-title-Bv34eYvs.js → html-title-D7IA5_Dw.js} +1 -1
  76. package/dist/assets/{htmlMode-Dti9PEXK.js → htmlMode-CYNIx1xO.js} +1 -1
  77. package/dist/assets/{id-DRypmlkS.js → id-Dc-m_i57.js} +1 -1
  78. package/dist/assets/{iframe-B3SxZf1n.js → iframe-Cmb-t7Zd.js} +1 -1
  79. package/dist/assets/{index-DpI-XQ1l.js → index-50D2VUJd.js} +1 -1
  80. package/dist/assets/index-5CUDmo0b.js +11 -0
  81. package/dist/assets/{index-Blaj76Z0.js → index-7iaj_w93.js} +1 -1
  82. package/dist/assets/{index-CCbDqQl1.js → index-B4Clf5Is.js} +1 -1
  83. package/dist/assets/{index-D_KMww7L.js → index-B4M5fNtl.js} +1 -1
  84. package/dist/assets/{index-20ehiOeZ.js → index-BEosxyQ-.js} +1 -1
  85. package/dist/assets/{index-DiP98lQ7.js → index-BOJNvmUd.js} +1 -1
  86. package/dist/assets/{index-Cf_UuTrD.js → index-BQOJioXe.js} +11 -11
  87. package/dist/assets/{index-CFj27rKT.js → index-BTLRRIeH.js} +9 -9
  88. package/dist/assets/{index-9ZjKwjlW.js → index-BUYTK_02.js} +1 -1
  89. package/dist/assets/{index-efuh0Sux.js → index-BZaAN-VG.js} +1 -1
  90. package/dist/assets/{index-BvA1-xFo.js → index-BmtqDcN9.js} +1 -1
  91. package/dist/assets/{index-Bls5HB_P.js → index-Bs51pyjo.js} +1 -1
  92. package/dist/assets/{index-d42V1PV6.js → index-BxSe45Us.js} +1 -1
  93. package/dist/assets/{index-D4dcj0uz.js → index-C3GHA9Mq.js} +1 -1
  94. package/dist/assets/{index-B_2YBbna.js → index-C7AV4hRT.js} +1 -1
  95. package/dist/assets/{index-cjrclHNq.js → index-CAA85gOc.js} +1 -1
  96. package/dist/assets/{index-C_rTOaKu.js → index-CGgu2xDj.js} +3 -3
  97. package/dist/assets/index-CMuL6EA4.js +602 -0
  98. package/dist/assets/{index-DNRbXVNA.js → index-CPZEAvjw.js} +1 -1
  99. package/dist/assets/index-CR9frGrE.js +1 -0
  100. package/dist/assets/{index-PBerjRVW.js → index-CaxSNZzZ.js} +1 -1
  101. package/dist/assets/{index-D2dk65xX.js → index-CqD2fBUt.js} +97 -97
  102. package/dist/assets/{index-B9Ylk5Gm.js → index-CxHR01Rd.js} +3 -3
  103. package/dist/assets/{index-CWYVBDEB.js → index-D0H3PjUo.js} +1 -1
  104. package/dist/assets/{index-Bvj_iHG0.js → index-DBwi0mrP.js} +1 -1
  105. package/dist/assets/{index-kKVyr3jd.js → index-DDWxd2Ux.js} +1 -1
  106. package/dist/assets/{index-DFXj2mzy.js → index-DM9qDnRm.js} +1 -1
  107. package/dist/assets/{index-6PyJTHfC.js → index-DU2ssP7d.js} +3 -3
  108. package/dist/assets/{index-4YU_ikpW.js → index-DaPV0E1i.js} +1 -1
  109. package/dist/assets/{index-5QQWHLxz.js → index-DhjgCBSh.js} +1 -1
  110. package/dist/assets/{index-DBvsoi5Z.js → index-DpQcmMsP.js} +1 -1
  111. package/dist/assets/{index-DE8jtmRi.js → index-DuvpHuQS.js} +1 -1
  112. package/dist/assets/{index-BXeAZx39.js → index-DxXsj_BT.js} +1 -1
  113. package/dist/assets/{index-DHo8_7tw.js → index-DyXybTnU.js} +1 -1
  114. package/dist/assets/{index-DBGC5o42.js → index-KVQaYJ5Y.js} +1 -1
  115. package/dist/assets/{index-DiXR_x6S.js → index-OepyDXYU.js} +1 -1
  116. package/dist/assets/{index-BcnRn-Tc.js → index-S1_KC8Yl.js} +1 -1
  117. package/dist/assets/{index-k42VQ_AF.js → index-TFXeoKpv.js} +1 -1
  118. package/dist/assets/{index-DDnvl7tL.js → index-ZZeybSqq.js} +1 -1
  119. package/dist/assets/{index-HNAwOsYz.js → index-aZuZZsqe.js} +1 -1
  120. package/dist/assets/{index-JWFVT8uF.js → index-hHL_v0H9.js} +1 -1
  121. package/dist/assets/{index-B3l3haQa.js → index-kAJasXw_.js} +1 -1
  122. package/dist/assets/{index-DglyPV4Y.js → index-pskT-PqN.js} +2 -2
  123. package/dist/assets/{index-D-M7NZke.js → index-qOevQjkj.js} +1 -1
  124. package/dist/assets/{index.esm-DXYSp_08.js → index.esm-0YKGK8i_.js} +1 -1
  125. package/dist/assets/{install-from-url-CNnVXR83.js → install-from-url-xkTAZofh.js} +1 -1
  126. package/dist/assets/{invitation-DOJxBbSJ.js → invitation-COGTm43o.js} +1 -1
  127. package/dist/assets/{is-path-prefix-equal-DMtF094s.js → is-path-prefix-equal-8gdmSIzT.js} +1 -1
  128. package/dist/assets/{item-B5y2JEkY.js → item-DVoxQKtM.js} +1 -1
  129. package/dist/assets/{ja-BgI9SuxS.js → ja-DuWRl1OM.js} +1 -1
  130. package/dist/assets/{javascript-RMUsL7C4.js → javascript-9DHIuu8w.js} +1 -1
  131. package/dist/assets/{jsonMode-BdWDqW6d.js → jsonMode-DrQT0Rrg.js} +1 -1
  132. package/dist/assets/{ko-DxWYUlEG.js → ko-YalU3HfD.js} +1 -1
  133. package/dist/assets/{liquid-Br_d4nY3.js → liquid-1g4gJZY5.js} +1 -1
  134. package/dist/assets/{list-header-BKASZXQp.js → list-header-CNhWtGQP.js} +1 -1
  135. package/dist/assets/{log-DfyebCKD.js → log-Cv5rHloz.js} +1 -1
  136. package/dist/assets/{lottie-react.esm-DH7e7xCE.js → lottie-react.esm-C6YuAEWV.js} +1 -1
  137. package/dist/assets/{mdx-BWMokGXT.js → mdx-B-cv_j71.js} +1 -1
  138. package/dist/assets/{memory-EbVEVJ3v.js → memory-DPkaeOl7.js} +1 -1
  139. package/dist/assets/{metric-DF4CaZpP.js → metric-CiNgShR5.js} +1 -1
  140. package/dist/assets/omit-C5UyCO0S.js +1 -0
  141. package/dist/assets/{overview-Iijq_Ko4.js → overview-BA5biw-O.js} +1 -1
  142. package/dist/assets/{permission-Br1rNOjb.js → permission-DZQgH-wh.js} +1 -1
  143. package/dist/assets/{preference-DZ8p0ZAt.js → preference-auzdU7Dy.js} +3 -3
  144. package/dist/assets/{pt-DeehC2Gk.js → pt-B3IRBzK6.js} +1 -1
  145. package/dist/assets/{python-Drb_6EJR.js → python-tC148uh2.js} +1 -1
  146. package/dist/assets/{raf-schd.esm-DBpZPfTe.js → raf-schd.esm-2IIbMYWO.js} +1 -1
  147. package/dist/assets/{razor-CqhXoL3w.js → razor-DOE4a2El.js} +1 -1
  148. package/dist/assets/{rotate-session-key-sbLLFax2.js → rotate-session-key-Bdv8tRY6.js} +1 -1
  149. package/dist/assets/{ru-DGlqMwrt.js → ru-BEEcST35.js} +1 -1
  150. package/dist/assets/{runtime-Gcr9Fi-g.js → runtime-CQbc5vgt.js} +1 -1
  151. package/dist/assets/schema-ObohfjTu.js +1 -0
  152. package/dist/assets/sdk-Yo848YWX.js +1 -0
  153. package/dist/assets/{service-wMVBEYj5.js → service-mTfNIC7m.js} +1 -1
  154. package/dist/assets/{shorten-label-COTK-Aqe.js → shorten-label-B8e0Bk0t.js} +1 -1
  155. package/dist/assets/{simple-select-Jvgt7OyG.js → simple-select-IWkCsCtv.js} +1 -1
  156. package/dist/assets/{spaces-Ds86J12r.js → spaces-DrkRFkPj.js} +1 -1
  157. package/dist/assets/{status-CikSPd5y.js → status-BaKGKdEv.js} +1 -1
  158. package/dist/assets/{status-DSta50m1.js → status-L8y4a0he.js} +1 -1
  159. package/dist/assets/{switch-control-BcMqvX98.js → switch-control-DzVAWrsU.js} +1 -1
  160. package/dist/assets/{table-icons-BaaufujD.js → table-icons-CzZoaBLP.js} +1 -1
  161. package/dist/assets/{team-WiS8_opu.js → team-upwNpr8j.js} +1 -1
  162. package/dist/assets/{th-DH3YSYWo.js → th-DYSyn_pj.js} +1 -1
  163. package/dist/assets/{toLower-J-761LZs.js → toLower-By3wiYQ5.js} +1 -1
  164. package/dist/assets/toUpper-WFb-_EjO.js +1 -0
  165. package/dist/assets/{traffic-i-oajLGo.js → traffic-oApG71Gy.js} +1 -1
  166. package/dist/assets/{tsMode-BqPXeNK6.js → tsMode-3JYy3Rny.js} +1 -1
  167. package/dist/assets/{typescript-BeMpQ1cp.js → typescript-BpFSqCb2.js} +1 -1
  168. package/dist/assets/{url-evaluation-BHlD72Za.js → url-evaluation-CboxDo9a.js} +1 -1
  169. package/dist/assets/{url-join-Be8UMYxb.js → url-join-4f83ALpx.js} +1 -1
  170. package/dist/assets/{use-mobile-DKnUPYLh.js → use-mobile-ByGodlLU.js} +1 -1
  171. package/dist/assets/{use-mobile-CFKbUUod.js → use-mobile-DHBy85Ov.js} +1 -1
  172. package/dist/assets/{useAsync-BvyaX1xb.js → useAsync-DAJnGdBq.js} +1 -1
  173. package/dist/assets/{useAsyncRetry-COLHYiqH.js → useAsyncRetry-BFx8IbqU.js} +1 -1
  174. package/dist/assets/{useLocalStorage-CcnFSYKq.js → useLocalStorage-4sgI3E92.js} +1 -1
  175. package/dist/assets/{useThemeProps-12AJ9O-O.js → useThemeProps-ATydoH1u.js} +1 -1
  176. package/dist/assets/{util-BN8LJS24.js → util-DH4frn9i.js} +1 -1
  177. package/dist/assets/{vi-B-WRpo9V.js → vi-BvKqvojn.js} +1 -1
  178. package/dist/assets/{wait-container-BeVXHkhI.js → wait-container-CJvrIzPn.js} +1 -1
  179. package/dist/assets/{without-wallet-Ciw14vC_.js → without-wallet-BxHS9HA2.js} +1 -1
  180. package/dist/assets/wrap-locale-C7k7RLj9.js +1 -0
  181. package/dist/assets/{xml-CPmGSa9a.js → xml-9s8DQRAB.js} +1 -1
  182. package/dist/assets/{yaml-Bgt1uL1Q.js → yaml-D0a0z0M-.js} +1 -1
  183. package/dist/assets/{zh-jdBEl5u8.js → zh-BaEjqGHy.js} +1 -1
  184. package/dist/assets/{zh-tw-2esms75_.js → zh-tw-xcyHbP3V.js} +1 -1
  185. package/dist/index.html +1 -1
  186. package/dist/service-worker.js +1 -1
  187. package/package.json +1 -1
  188. package/dist/assets/ArrowDropDown-BKRskDGW.js +0 -1
  189. package/dist/assets/api-CNS9XStH.js +0 -1
  190. package/dist/assets/chain-DApQ_02_.js +0 -6
  191. package/dist/assets/client-CRwMqq4a.js +0 -1
  192. package/dist/assets/cloneDeep-XzHe1lBt.js +0 -1
  193. package/dist/assets/download-1sZ_L4eJ.css +0 -32
  194. package/dist/assets/emotion-cache.browser.esm-xd7x6o_F.js +0 -1
  195. package/dist/assets/engine-6r3-G42f.js +0 -1
  196. package/dist/assets/getValidReactChildren-Dx-rXSuI.js +0 -1
  197. package/dist/assets/index-BvZ7ueS0.js +0 -602
  198. package/dist/assets/index-Djt_Uvu7.js +0 -1
  199. package/dist/assets/index-DyWKbsNy.js +0 -11
  200. package/dist/assets/omit-DCOcIQME.js +0 -1
  201. package/dist/assets/schema-CtGZqsss.js +0 -1
  202. package/dist/assets/sdk-bmyf6_R7.js +0 -1
  203. package/dist/assets/toUpper-DndvmnJP.js +0 -1
  204. package/dist/assets/wrap-locale-B-zny1Rh.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-C_rTOaKu.js","./index-D2dk65xX.js","./index-DGkT7afN.css","./url-join-Be8UMYxb.js","./index-HNAwOsYz.js","./_createAggregator-Dt3Ih0i2.js","./depsEqual-DIBRq7Fr.js","./index-k42VQ_AF.js","./index-DRYJ0xIl.js","./toUpper-DndvmnJP.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{hw as Mf,hx as Af,gq as Lf,ds as zf,hy as jf,dt as Ff,bL as ec,bM as Bf,bJ as Gf,bK as $f,bO as tc,dw as An,hz as Wf,eC as Hf,hj as Uf,gP as qf,gM as rc,hA as Vf,gu as Kf,fs as Yf,eD as Jf,h6 as Qf,m as Oe,a3 as Ge,y as Ue,E as Ie,aP as or,r as I,j as v,c2 as Dt,J as Xf,fd as Zf,eN as ep,hn as tp,dv as Sr,ey as fr,dg as nc,dA as rp,hB as np,dz as ic,bd as Ln,dN as Xt,hC as B,eZ as K,eG as ip,hD as Hr,be as Z,o as S,dL as zn,aO as op,aQ as wo,hE as Co,cw as ni,aE as ye,b8 as mt,N as ie,ag as ap,b as kt,cr as ge,b9 as Io,dB as Yt,T as Re,a4 as ke,b1 as Fi,dH as Zt,hF as lp,bn as oc,F as jn,hG as sp,hH as cp,t as Ht,fp as Bi,az as up,dd as qe,ff as ac,C as dp,bE as fp,hI as Ra,O as Ro,fc as pp,H as xr,Q as lc,f5 as sc,$ as hp,v as cc,f as Et,dK as gp,bu as vp,gy as uc,dI as Dr,a7 as mp,a8 as bp,hJ as Da,hK as dc,hL as yp,hM as Sp,fM as fc,fg as xp,gC as wp,gA as Cp,g7 as Fn,hN as Ip,gF as Rp,hO as wn,hP as pc,by as Me,L as hc,z as Do,hQ as Ta,hR as gc,hS as Gi,hT as Dp,hU as Tp,s as ar,hV as Pp,f4 as _p,cv as vc,bB as kp,hW as Op,hX as Ep,hY as Np,hZ as Mp,h_ as Ap,h$ as mc,i0 as Lp,aC as bc,e$ as yc,i1 as To,i2 as zp,hf as Sc,b_ as ot,i3 as jp,b5 as Fp,cA as Ut,i4 as Bp,cP as Gp,i5 as $p,G as Pa,dn as ii,eH as _a,dM as Wp,i6 as Hp,a5 as xc,Y as ka,dG as Ze,i7 as Oa,R as Up,S as Ea,U as Na}from"./index-D2dk65xX.js";import{r as qp}from"./omit-DCOcIQME.js";import{r as Vp}from"./cloneDeep-XzHe1lBt.js";import{r as Kp}from"./index-HNAwOsYz.js";import{c as Yp,u as Jp}from"./_createAggregator-Dt3Ih0i2.js";import{u as Nt}from"./blocklet-CSWEnHbv.js";import{H as Qp,G as Xp,M as Zp,N as eh,O as Ma,K as th,L as rh}from"./index-20ehiOeZ.js";import{_ as Se,a as xe,b as je,c as Fe,d as Be,e as nh,f as wc,u as ce,g as ne,r as Mr,w as Cn,h as Cc,i as Mt,j as Ic,k as ih,l as oh,o as $i}from"./raf-schd.esm-DBpZPfTe.js";import{_ as M,b as Aa,c as ah,a as lh,d as sh}from"./redux-DfszZyTl.js";import{_ as ch}from"./typeof-QjJsDpFa.js";import{u as Rc,b as uh}from"./team-WiS8_opu.js";import{b as dh}from"./actions-Cxap2JOs.js";import{u as fh,a as ph,C as rt}from"./index.esm-DXYSp_08.js";import{S as Wi}from"./simple-select-Jvgt7OyG.js";import{b as hh,a as La}from"./html-title-Bv34eYvs.js";import{C as Dc}from"./Clear-ClOZ_U5s.js";import{A as gh}from"./ArrowDropDown-BKRskDGW.js";import{a as vh}from"./api-CNS9XStH.js";import{A as mh}from"./Autocomplete-B8LzLUZe.js";import{L as bh}from"./ListItemButton-BBR__ebu.js";import{u as Tc}from"./use-mobile-CFKbUUod.js";import{e as yh}from"./client-CRwMqq4a.js";import{I as Sh}from"./iframe-B3SxZf1n.js";import{B as oi}from"./ButtonGroup-2OIq-PXC.js";import{L as za}from"./LoadingButton-Y_0rPcsy.js";import"./depsEqual-DIBRq7Fr.js";import"./url-evaluation-BHlD72Za.js";import"./useLocalStorage-CcnFSYKq.js";import"./MoreVert-DrzE5AUf.js";import"./get-safe-url-CXm2qbfD.js";import"./permission-Br1rNOjb.js";import"./ListSubheader-CW_V4Z24.js";import"./getValidReactChildren-Dx-rXSuI.js";var xh=Mf(function(){return Af?sessionStorage:void 0});function wh(e,r){return Lf(r,function(n){return e[n]})}function Ch(e){return e==null?[]:wh(e,zf(e))}var Ih=jf.isFinite;function ja(e){return typeof e=="number"&&Ih(e)}function Rh(e){return typeof e=="number"&&e==Ff(e)}var Dh=Yp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Th=Object.freeze(Object.defineProperty({__proto__:null,default:Dh},Symbol.toStringTag,{value:"Module"}));var Ph=ec(function(e){var r=Bf(e);return r=typeof r=="function"?r:void 0,Gf($f(e,1,tc,!0),void 0,r)});const _h=Object.freeze(Object.defineProperty({__proto__:null,default:Ph},Symbol.toStringTag,{value:"Module"}));var Pc=ec(function(e,r){return tc(e)?dh(e,r):[]}),pr={};const kh=An(_h),Oh=An(Wf),Eh=An(Th);var Fa;function Nh(){return Fa||(Fa=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=_,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Hf(),t=r(kh),i=r(Uf),o=r(qf),a=r(Oh),l=r(qp),s=r(Vp),c=Qf(),u=r(Kp()),f=r(rc()),d=r(Vf),p=r(Kf),h=r(Eh),g=Yf(),m=Jf();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function _(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:de=0}={}){Array.isArray($)?$.forEach((se,me)=>{A(se,{index:me,parent:oe,level:de+1})}):$&&(O==="first"&&H($,oe,{index:J,level:de}),A($[k],{parent:$,level:de}),O==="last"&&H($,oe,{index:J,level:de}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function P(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,p.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=P(O[J],A),$),{}):(0,p.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=P(O,A[J]),$),{}):(0,p.default)(O)&&(0,p.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?P(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=P(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return _(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return _(O,($,J,{level:oe})=>{if(oe>=H){const{items:de=[]}=$;if(de&&Array.isArray(de)&&de.length>0){delete $.items;const se=de.map(me=>k(me,$));if(J)J.items.push(...se);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...se)}}else if(oe===1){const se=k((0,l.default)($,["items"]),J);A.push(se)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:de={}}=A,se=(0,s.default)(de?.navigation||[]);(0,g.hasStartEngine)(de)&&A.meta?.capabilities?.navigation!==!1&&J.push(...se);const me=$.name||"",ve=$.mountPoint||b,ue=A===F?"":de.name||"",be=A===F?"":A.mountPoint||b;for(const fe of oe){if(!(0,g.hasStartEngine)(fe.meta))continue;const Ve=fe.meta.name,ei=fe.mountPoint,ti=[me,ue,Ve].filter(Boolean).join("."),ri=fe.meta.navigation||[],Nf=(0,c.joinURL)(ve,be,ei);fe.meta?.capabilities?.navigation!==!1&&H.push({did:fe.meta.did,name:ti,link:Nf,title:fe.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=se.find(Je=>Je.component?Je.component===Ve:!1);if(Lt){if(!Lt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const Je=k(fe,{mountPoint:be,name:ue});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(fe.meta?.capabilities?.navigation!==!1){const Je=k(fe,{mountPoint:be,name:ue}),en={title:fe.meta.title,component:Ve,id:fe.meta.did};Je.length>0?(en.items=Je,en.link=void 0):en.link=w,J.push(en)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return _(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return _(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(de=>de.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,de){const se=W(oe,de);$.push({...A,section:de,items:se})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((se,me)=>{const{section:ve=[y]}=me||{};return se.push(...ve),se},[]),de=[...new Set(oe)];for(const se of de)J(O,se)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return _(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,h.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,h.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ue=>ue}=H,{navigationList:O,components:A}=U(F);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ue=>!(ue?.parent==="/team"&&ue.from==="team-tmpl")):F.settings.navigations=[]);const $=C(q(F?.settings?.navigations||[])).map(N),J=G(k(O)),oe=z(J),se=V(oe).reduce((ue,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ue.push(...be.items.map(Ve=>{const{section:ei}=be,ti=R(be.link,Ve.link),ri=[be.component,Ve.component].filter(Boolean).join(".");return{...Ve,section:ei,link:ti,component:ri,parent:""}})),ue):(ue.push(be),ue),[]),me=j(se,{transform(ue,be){let{component:fe}=ue;return be?.component&&(fe=[be.component,ue.component].filter(Boolean).join(".")),N({...ue,component:fe})}});return{navigationList:(0,t.default)($,me,(ue,be)=>{const fe=["id","section"];return(0,i.default)((0,o.default)(ue,fe),(0,o.default)(be,fe))}),components:A,builtinList:me}}}(pr)),pr}var Ee=Nh();const _c=I.createContext(null),Ba="/",Mh="header",Ga={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function ai(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ah=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Lh=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ah("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function $a({name:e}){return v.jsx(ep,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function zh({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Oe(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(x){const T=Ge(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Ga,C)&&Ga[C].forEach(P=>{T.some(R=>R.id===P.id)||T.push(P)})}),Lh(t,T)}}),l=or({rawNavigation:Ge(i),activeSection:Mh,components:o}),s=I.useMemo(()=>Ee.nestNavigationList(Ge(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ee.filterNavigation(Ge(l.rawNavigation),o);return Ee.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ee.flattenNavigation(Ee.joinLink(s,o)),C=T.find(P=>P.id===x.id);if(C?.component){if(!o.some(P=>P.name===C.component))return v.jsx($a,{name:C.component})}else if(C.parent){const P=T.find(R=>R.id===C.parent);if(P?.component&&!o.some(R=>R.name===P.component))return v.jsx($a,{name:P.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ee.deepWalk(x,(P,R)=>{const E={...Dt(P,["children","expand"]),parent:R?.id};T.push(E)});const C=Ge(l.rawNavigation).filter(P=>{if(!l.activeSection)return!1;const R=T.find(E=>ai(E,P));return R?!Ee.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),p=I.useCallback((x=[])=>{const T=Ge(l.rawNavigation).map(C=>{const P=x.find(R=>ai({...R,section:l.activeSection},C));return P?{...C,...P}:C});l.rawNavigation=T},[l]),h=I.useCallback((x,T=Ba)=>x.map(P=>{const E=o.find(U=>U.name===P.component)?.link||T,j=P.items||[],{link:N}=P;return{title:P.title,description:P.description,subtitle:u(P),link:N,icon:P.icon,children:h(j,N||Ba),section:P.section,visible:P.visible,parent:P.parent,component:P.component,id:P.id,role:P.role,from:P.from,__base:E}}),[o,u]),g=I.useCallback(x=>{p([x])},[p]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=Ge(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:Xf.nanoid(),section:l.activeSection,visible:!0},P=[...l.rawNavigation],R=P.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)P.push(C);else{const E=R[T],j=P.findIndex(N=>ai(N,E));P.splice(j,0,C)}return l.rawNavigation=P,C},[l]),b=I.useCallback(x=>{const C=Ge(s).filter(P=>Ee.isMatchSection(P.section,x));return h(C)},[s,h]),w=I.useCallback(async x=>{const C=x.map(P=>Zf(P,tp)).map(P=>{const R={...P};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=Ge(a)},[w,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(_c.Provider,{value:_,children:e})}function kc(){const e=I.useContext(_c);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},li,Wa;function jh(){if(Wa)return li;Wa=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var P,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=_(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?p(_(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=P,$=R;return P=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?h(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&P?Q(O):(P=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,P=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(P=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var P=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(P="leading"in C?!!C.leading:P,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:P,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function _(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return li=y,li}var hr={exports:{}},xt={exports:{}},Fh=xt.exports,Ha;function Bh(){return Ha||(Ha=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof fr<"u"&&fr!==null&&fr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=fr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=fr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Fh)),xt.exports}var Ua;function Gh(){if(Ua)return hr.exports;Ua=1;for(var e=Bh(),r=typeof window>"u"?Sr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var g=0;g<h.length;g++)if(!h[g].cancelled)try{h[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return hr.exports=function(f){return i.call(r,f)},hr.exports.cancel=function(){o.apply(r,arguments)},hr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},hr.exports}var tn={},qa;function $h(){if(qa)return tn;qa=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return tn}var zt={},Va;function Wh(){if(Va)return zt;Va=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return zt}var Ka;function Hh(){if(Ka)return Ke;Ka=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=P,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(nc()),r=c(ic()),n=rp(),t=c(jh()),i=c(Gh()),o=c($h()),a=Qp,l=c(np()),s=Wh();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function p(z,G){if(z==null)return{};var W=h(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function h(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&_(z,G)}function _(z,G){return _=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},_(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function P(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=P(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return te.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var te=this.props.dragDropManager,X=te.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,de=H.scrollHeight,se=H.clientWidth,me=H.clientHeight,ve=re?H.scrollLeft=(0,s.intBetween)(0,oe-se,$+re*O):$,ue=F?H.scrollTop=(0,s.intBetween)(0,de-me,J+F*O):J;A(ve,ue)}te.frame=(0,i.default)(q)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=p(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var gn=Hh();const Uh=Ln(gn);var qh=Xp();const Ya=Ln(qh);function Oc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Ec(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Nc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}Oc.__suppressDeprecationWarning=!0;Ec.__suppressDeprecationWarning=!0;Nc.__suppressDeprecationWarning=!0;function Ur(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CGgu2xDj.js","./index-CqD2fBUt.js","./index-DGkT7afN.css","./url-join-4f83ALpx.js","./index-aZuZZsqe.js","./_createAggregator-6qCBlT2m.js","./depsEqual-CLLXOjvx.js","./index-TFXeoKpv.js","./index-DRYJ0xIl.js","./toUpper-WFb-_EjO.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{hx as Mf,hy as Af,gq as Lf,ds as zf,hz as jf,dt as Ff,bL as ec,bM as Bf,bJ as Gf,bK as $f,bO as tc,dw as An,hA as Wf,eC as Hf,hk as Uf,gQ as qf,gO as rc,hB as Vf,gu as Kf,fs as Yf,eD as Jf,h7 as Qf,m as Oe,a3 as Ge,y as Ue,E as Ie,aP as or,r as I,j as v,c2 as Dt,J as Xf,fd as Zf,eN as ep,ho as tp,dv as Sr,ey as fr,dg as nc,dA as rp,hC as np,dz as ic,bd as Ln,dN as Xt,hD as B,eZ as K,eG as ip,hE as Hr,be as Z,o as S,dL as zn,aO as op,aQ as wo,hF as Co,cw as ni,aE as ye,b8 as mt,N as ie,ag as ap,b as kt,cr as ge,b9 as Io,dB as Yt,T as Re,a4 as ke,b1 as Fi,dH as Zt,hG as lp,bn as oc,F as jn,hH as sp,hI as cp,t as Ht,fp as Bi,az as up,dd as qe,ff as ac,C as dp,bE as fp,hJ as Ra,O as Ro,fc as pp,H as xr,Q as lc,f5 as sc,$ as hp,v as cc,f as Et,dK as gp,bu as vp,gy as uc,dI as Dr,a7 as mp,a8 as bp,hK as Da,hL as dc,hM as yp,hN as Sp,fM as fc,fg as xp,gC as wp,gA as Cp,g7 as Fn,hO as Ip,gF as Rp,hP as wn,hQ as pc,by as Me,L as hc,z as Do,hR as Ta,hS as gc,hT as Gi,hU as Dp,hV as Tp,s as ar,hW as Pp,f4 as _p,cv as vc,bB as kp,hX as Op,hY as Ep,hZ as Np,h_ as Mp,h$ as Ap,i0 as mc,i1 as Lp,aC as bc,e$ as yc,i2 as To,i3 as zp,hg as Sc,b_ as ot,i4 as jp,b5 as Fp,cA as Ut,i5 as Bp,cP as Gp,i6 as $p,G as Pa,dn as ii,eH as _a,dM as Wp,i7 as Hp,a5 as xc,Y as ka,dG as Ze,i8 as Oa,R as Up,S as Ea,U as Na}from"./index-CqD2fBUt.js";import{r as qp}from"./omit-C5UyCO0S.js";import{r as Vp}from"./cloneDeep-DZJaLQYA.js";import{r as Kp}from"./index-aZuZZsqe.js";import{c as Yp,u as Jp}from"./_createAggregator-6qCBlT2m.js";import{u as Nt}from"./blocklet-CXBJcwmD.js";import{H as Qp,G as Xp,M as Zp,N as eh,O as Ma,K as th,L as rh}from"./index-BEosxyQ-.js";import{_ as Se,a as xe,b as je,c as Fe,d as Be,e as nh,f as wc,u as ce,g as ne,r as Mr,w as Cn,h as Cc,i as Mt,j as Ic,k as ih,l as oh,o as $i}from"./raf-schd.esm-2IIbMYWO.js";import{_ as M,b as Aa,c as ah,a as lh,d as sh}from"./redux-DfszZyTl.js";import{_ as ch}from"./typeof-QjJsDpFa.js";import{u as Rc,b as uh}from"./team-upwNpr8j.js";import{b as dh}from"./actions-Lc_gpmy_.js";import{u as fh,a as ph,C as rt}from"./index.esm-0YKGK8i_.js";import{S as Wi}from"./simple-select-IWkCsCtv.js";import{b as hh,a as La}from"./html-title-D7IA5_Dw.js";import{C as Dc}from"./Clear-wN_lM9i_.js";import{A as gh}from"./ArrowDropDown-CGRxh8gD.js";import{a as vh}from"./api-C4QD0LkR.js";import{A as mh}from"./Autocomplete-Bj2hcqGf.js";import{L as bh}from"./ListItemButton-Bk_S-24I.js";import{u as Tc}from"./use-mobile-DHBy85Ov.js";import{e as yh}from"./client-BriPpb0D.js";import{I as Sh}from"./iframe-Cmb-t7Zd.js";import{B as oi}from"./ButtonGroup-CToFieon.js";import{L as za}from"./LoadingButton-BTTKyDvk.js";import"./depsEqual-CLLXOjvx.js";import"./url-evaluation-CboxDo9a.js";import"./useLocalStorage-4sgI3E92.js";import"./MoreVert-CpVaEDbL.js";import"./get-safe-url-CO9heLC_.js";import"./permission-DZQgH-wh.js";import"./ListSubheader-CjL9mMf3.js";import"./getValidReactChildren-yMK1JaZz.js";var xh=Mf(function(){return Af?sessionStorage:void 0});function wh(e,r){return Lf(r,function(n){return e[n]})}function Ch(e){return e==null?[]:wh(e,zf(e))}var Ih=jf.isFinite;function ja(e){return typeof e=="number"&&Ih(e)}function Rh(e){return typeof e=="number"&&e==Ff(e)}var Dh=Yp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Th=Object.freeze(Object.defineProperty({__proto__:null,default:Dh},Symbol.toStringTag,{value:"Module"}));var Ph=ec(function(e){var r=Bf(e);return r=typeof r=="function"?r:void 0,Gf($f(e,1,tc,!0),void 0,r)});const _h=Object.freeze(Object.defineProperty({__proto__:null,default:Ph},Symbol.toStringTag,{value:"Module"}));var Pc=ec(function(e,r){return tc(e)?dh(e,r):[]}),pr={};const kh=An(_h),Oh=An(Wf),Eh=An(Th);var Fa;function Nh(){return Fa||(Fa=1,function(e){var r=pr&&pr.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=re,e.deepWalk=_,e.isMatchSection=x,e.nestNavigationList=Q,e.filterNavigation=te,e.cleanOrphanNavigation=X,e.joinLink=E,e.flattenNavigation=j,e.splitNavigationBySection=V;const n=Hf(),t=r(kh),i=r(Uf),o=r(qf),a=r(Oh),l=r(qp),s=r(Vp),c=Qf(),u=r(Kp()),f=r(rc()),d=r(Vf),p=r(Kf),h=r(Eh),g=Yf(),m=Jf();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return m.checkLink}});const y="header",b="/",w="/",D="/";function _(F,H=()=>{},{key:k="children",order:O="first"}={}){function A($,{index:J=0,parent:oe=null,level:de=0}={}){Array.isArray($)?$.forEach((se,me)=>{A(se,{index:me,parent:oe,level:de+1})}):$&&(O==="first"&&H($,oe,{index:J,level:de}),A($[k],{parent:$,level:de}),O==="last"&&H($,oe,{index:J,level:de}))}A(F)}function x(F,H){return H===y&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(H):F===H}function T(F){try{return JSON.parse(F)}catch{return F}}function C(F){return F.map(H=>{const k={...H};return k.role&&(k.role=T(k.role)),k.section&&(k.section=T(k.section)),k.title&&(k.title=T(k.title)),k.description&&(k.description=T(k.description)),k.link&&(k.link=T(k.link)),k})}function P(F="/",H=""){if((0,f.default)(H||""))return H;const k=u.default.join(F,H||w);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function R(F,H,{strict:k=!0}={}){let O=F,A=H;return k||(O=O||"/",A=A||"/"),(0,d.default)(O)&&(0,p.default)(A)&&(0,m.checkLink)(A)?Object.keys(O).reduce(($,J)=>($[J]=P(O[J],A),$),{}):(0,p.default)(O)&&(0,m.checkLink)(O)&&(0,d.default)(A)?Object.keys(A).reduce(($,J)=>($[J]=P(O,A[J]),$),{}):(0,p.default)(O)&&(0,p.default)(A)?(0,m.checkLink)(O)||(0,m.checkLink)(A)?P(O,A):A:(0,d.default)(O)&&(0,d.default)(A)?[...new Set([...Object.keys(O),...Object.keys(A)])].reduce((J,oe)=>(J[oe]=P(O[oe],A[oe]),J),{}):A}function E(F,H){const k=(0,s.default)(F);return _(k,(O,A)=>{const $=O.component||O.child;if($){const J=H.find(oe=>oe.name===$);J&&(O.link=R(J.link,O.link,{strict:!1}))}else A&&(O.link=R(A.link,O.link))},{key:"items"}),k}function j(F=[],{depth:H=1,transform:k=O=>O}={}){const O=(0,s.default)(F),A=[];return _(O,($,J,{level:oe})=>{if(oe>=H){const{items:de=[]}=$;if(de&&Array.isArray(de)&&de.length>0){delete $.items;const se=de.map(me=>k(me,$));if(J)J.items.push(...se);else{const me=k((0,l.default)($,["items"]),J);A.push(me,...se)}}else if(oe===1){const se=k((0,l.default)($,["items"]),J);A.push(se)}}else oe===1&&A.push($)},{key:"items",order:"last"}),A}function N(F){if(F.section!=="bottomNavigation")return F;const H={...F};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const O=H[k];typeof O=="string"&&(H[k]={en:O})}),H}function U(F={}){const H=[];function k(A,$={}){const J=[],{children:oe=[],meta:de={}}=A,se=(0,s.default)(de?.navigation||[]);(0,g.hasStartEngine)(de)&&A.meta?.capabilities?.navigation!==!1&&J.push(...se);const me=$.name||"",ve=$.mountPoint||b,ue=A===F?"":de.name||"",be=A===F?"":A.mountPoint||b;for(const fe of oe){if(!(0,g.hasStartEngine)(fe.meta))continue;const Ve=fe.meta.name,ei=fe.mountPoint,ti=[me,ue,Ve].filter(Boolean).join("."),ri=fe.meta.navigation||[],Nf=(0,c.joinURL)(ve,be,ei);fe.meta?.capabilities?.navigation!==!1&&H.push({did:fe.meta.did,name:ti,link:Nf,title:fe.meta.title||"",navigation:ri.map(Je=>({section:y,...Je}))});const Lt=se.find(Je=>Je.component?Je.component===Ve:!1);if(Lt){if(!Lt.link)if(fe.meta.navigation&&fe.meta.navigation.length>0){const Je=k(fe,{mountPoint:be,name:ue});Je.length>0&&(Lt.items=Lt.items??[],Lt.items.push(...Je))}else Lt.link=w}else if(fe.meta?.capabilities?.navigation!==!1){const Je=k(fe,{mountPoint:be,name:ue}),en={title:fe.meta.title,component:Ve,id:fe.meta.did};Je.length>0?(en.items=Je,en.link=void 0):en.link=w,J.push(en)}}return J}return{navigationList:k(F),components:H}}function z(F){const H=(0,s.default)(F).filter(k=>k.id);return _(H,(k,O)=>{if(k.items&&k.items.length){for(let A=k.items.length-1;A>=0;A--)k.items[A].id||k.items.splice(A,1);k.items.length===0&&k.component&&(k.link=k.link||w)}O&&(k.parent=O.id,k.id=[O.id,k.id].join(D)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),H}function G(F,H=2){const k=(0,s.default)(F),O=j(k,{depth:H,transform:(A,$)=>($&&(A._parent||(A._parent=$.id,$.component||(A.link=R($.link,A.link))),A.section=A.section||$.section||[y],A.visible=A.visible??$.visible,$.role&&(A.role=A.role||$.role)),A.component=[$.component,A.component].filter(Boolean).join("."),A)});return _(O,A=>{A.items&&A.items.length>0&&A.items.reduceRight(($,J)=>{if(J._parent){const oe=A.items.findIndex(de=>de.id===J._parent);oe>=0&&A.items.splice(oe,1),delete J._parent}return null},null)},{key:"items"}),O}function W(F,H){return H&&Array.isArray(F.items)?F.items.filter(k=>(0,a.default)(k.section)?x(F.section,H):!!x(k.section,H)).map(k=>({...k,section:H})):[]}function V(F){const H=(0,s.default)(F),k=[];for(const O of H){let J=function(oe,de){const se=W(oe,de);$.push({...A,section:de,items:se})};const A=(0,s.default)((0,l.default)(O,["items"])),$=[];if(Array.isArray(O.section))for(const oe of O.section)J(O,oe);else if(O.section){const{section:oe}=O;J(O,oe)}else if(O.items&&O.items.length>0){const oe=O.items.reduce((se,me)=>{const{section:ve=[y]}=me||{};return se.push(...ve),se},[]),de=[...new Set(oe)];for(const se of de)J(O,se)}else $.push({...O,section:y});k.push(...$)}return k}function Q(F=[]){const H=(0,s.default)(F);return H.reduceRight((k,O,A)=>{if(O.parent){const $=H.find(J=>O.section&&J.section?J.section===O.section&&J.id===O.parent:J.id===O.parent);$&&($.items||($.items=[]),$.items=[O,...$.items]),H.splice(A,1)}return null},null),H}function te(F,H=[]){const k=Q(F);return _(k,A=>{if(A?.component&&(H.some($=>$.name===A.component)||(A.visible=!1)),A.items&&A.items.length)for(let $=A.items.length-1;$>=0;$--)A.items[$].visible===!1&&A.items.splice($,1)},{key:"items"}),k.filter(A=>!(A.visible===!1||A.items&&Array.isArray(A.items)&&A.items.length>0&&A.items?.every($=>$.visible===!1)))}function X(F){return F.map(H=>H.items&&Array.isArray(H.items)&&H.items.length===1&&["header","footer","",void 0,null].includes(H.section)?H.items[0]:H)}const ee=F=>{const[H,k]=(0,h.default)(F,O=>O.id==="/team");return[...H,...k]};e.sortRootNavigation=ee;const q=F=>{const[,H]=(0,h.default)(F,k=>{const O=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&O==="Access"||k.id==="/dashboard"&&O==="Blocklet"});return H};e.cleanOldNavigationHistory=q;function re(F={},H={}){const{beforeProcess:k=ue=>ue}=H,{navigationList:O,components:A}=U(F);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ue=>!(ue?.parent==="/team"&&ue.from==="team-tmpl")):F.settings.navigations=[]);const $=C(q(F?.settings?.navigations||[])).map(N),J=G(k(O)),oe=z(J),se=V(oe).reduce((ue,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ue.push(...be.items.map(Ve=>{const{section:ei}=be,ti=R(be.link,Ve.link),ri=[be.component,Ve.component].filter(Boolean).join(".");return{...Ve,section:ei,link:ti,component:ri,parent:""}})),ue):(ue.push(be),ue),[]),me=j(se,{transform(ue,be){let{component:fe}=ue;return be?.component&&(fe=[be.component,ue.component].filter(Boolean).join(".")),N({...ue,component:fe})}});return{navigationList:(0,t.default)($,me,(ue,be)=>{const fe=["id","section"];return(0,i.default)((0,o.default)(ue,fe),(0,o.default)(be,fe))}),components:A,builtinList:me}}}(pr)),pr}var Ee=Nh();const _c=I.createContext(null),Ba="/",Mh="header",Ga={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${Ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function ai(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const nt=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ah=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Lh=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ah("/team",e("navigation.blockletService"),[nt("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),nt("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),nt("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),nt("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),nt("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),nt("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),nt("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),nt("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function $a({name:e}){return v.jsx(ep,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function zh({children:e}){const{blocklet:r,actions:n}=Nt(),{t}=Oe(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(x){const T=Ge(x);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Ga,C)&&Ga[C].forEach(P=>{T.some(R=>R.id===P.id)||T.push(P)})}),Lh(t,T)}}),l=or({rawNavigation:Ge(i),activeSection:Mh,components:o}),s=I.useMemo(()=>Ee.nestNavigationList(Ge(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const x=Ee.filterNavigation(Ge(l.rawNavigation),o);return Ee.joinLink(x,o)},[o,l.rawNavigation]),u=I.useCallback(x=>{if(!x.id)return"";const T=Ee.flattenNavigation(Ee.joinLink(s,o)),C=T.find(P=>P.id===x.id);if(C?.component){if(!o.some(P=>P.name===C.component))return v.jsx($a,{name:C.component})}else if(C.parent){const P=T.find(R=>R.id===C.parent);if(P?.component&&!o.some(R=>R.name===P.component))return v.jsx($a,{name:P.component})}return C?.link},[s,o]),f=I.useCallback(x=>{l.activeSection=x},[l]),d=I.useCallback(x=>{const T=[];Ee.deepWalk(x,(P,R)=>{const E={...Dt(P,["children","expand"]),parent:R?.id};T.push(E)});const C=Ge(l.rawNavigation).filter(P=>{if(!l.activeSection)return!1;const R=T.find(E=>ai(E,P));return R?!Ee.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...C,...T]},[l]),p=I.useCallback((x=[])=>{const T=Ge(l.rawNavigation).map(C=>{const P=x.find(R=>ai({...R,section:l.activeSection},C));return P?{...C,...P}:C});l.rawNavigation=T},[l]),h=I.useCallback((x,T=Ba)=>x.map(P=>{const E=o.find(U=>U.name===P.component)?.link||T,j=P.items||[],{link:N}=P;return{title:P.title,description:P.description,subtitle:u(P),link:N,icon:P.icon,children:h(j,N||Ba),section:P.section,visible:P.visible,parent:P.parent,component:P.component,id:P.id,role:P.role,from:P.from,__base:E}}),[o,u]),g=I.useCallback(x=>{p([x])},[p]),m=I.useCallback(x=>{const T=l.rawNavigation.filter(C=>C.id===x||C.parent===x).map(C=>C.id);l.rawNavigation=Ge(l.rawNavigation).filter(C=>!T.includes(C.id))},[l]),y=I.useCallback((x={},T=-1)=>{const C={...x,id:Xf.nanoid(),section:l.activeSection,visible:!0},P=[...l.rawNavigation],R=P.filter(E=>E.section===l.activeSection);if(T<0||T>R.length-1)P.push(C);else{const E=R[T],j=P.findIndex(N=>ai(N,E));P.splice(j,0,C)}return l.rawNavigation=P,C},[l]),b=I.useCallback(x=>{const C=Ge(s).filter(P=>Ee.isMatchSection(P.section,x));return h(C)},[s,h]),w=I.useCallback(async x=>{const C=x.map(P=>Zf(P,tp)).map(P=>{const R={...P};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(C)},[n]),D=I.useCallback(async()=>{await w([]),l.rawNavigation=Ge(a)},[w,l,a]),_=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:g,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:w,resetNavigation:D}),[l,c,o,u,f,g,m,y,d,b,w,D]);return v.jsx(_c.Provider,{value:_,children:e})}function kc(){const e=I.useContext(_c);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},li,Wa;function jh(){if(Wa)return li;Wa=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Sr=="object"&&Sr&&Sr.Object===Object&&Sr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,g=function(){return u.Date.now()};function m(x,T,C){var P,R,E,j,N,U,z=0,G=!1,W=!1,V=!0;if(typeof x!="function")throw new TypeError(e);T=_(T)||0,b(C)&&(G=!!C.leading,W="maxWait"in C,E=W?p(_(C.maxWait)||0,T):E,V="trailing"in C?!!C.trailing:V);function Q(O){var A=P,$=R;return P=R=void 0,z=O,j=x.apply($,A),j}function te(O){return z=O,N=setTimeout(q,T),G?Q(O):j}function X(O){var A=O-U,$=O-z,J=T-A;return W?h(J,E-$):J}function ee(O){var A=O-U,$=O-z;return U===void 0||A>=T||A<0||W&&$>=E}function q(){var O=g();if(ee(O))return re(O);N=setTimeout(q,X(O))}function re(O){return N=void 0,V&&P?Q(O):(P=R=void 0,j)}function F(){N!==void 0&&clearTimeout(N),z=0,P=U=R=N=void 0}function H(){return N===void 0?j:re(g())}function k(){var O=g(),A=ee(O);if(P=arguments,R=this,U=O,A){if(N===void 0)return te(U);if(W)return N=setTimeout(q,T),Q(U)}return N===void 0&&(N=setTimeout(q,T)),j}return k.cancel=F,k.flush=H,k}function y(x,T,C){var P=!0,R=!0;if(typeof x!="function")throw new TypeError(e);return b(C)&&(P="leading"in C?!!C.leading:P,R="trailing"in C?!!C.trailing:R),m(x,T,{leading:P,maxWait:T,trailing:R})}function b(x){var T=typeof x;return!!x&&(T=="object"||T=="function")}function w(x){return!!x&&typeof x=="object"}function D(x){return typeof x=="symbol"||w(x)&&d.call(x)==n}function _(x){if(typeof x=="number")return x;if(D(x))return r;if(b(x)){var T=typeof x.valueOf=="function"?x.valueOf():x;x=b(T)?T+"":T}if(typeof x!="string")return x===0?x:+x;x=x.replace(t,"");var C=o.test(x);return C||a.test(x)?l(x.slice(2),C?2:8):i.test(x)?r:+x}return li=y,li}var hr={exports:{}},xt={exports:{}},Fh=xt.exports,Ha;function Bh(){return Ha||(Ha=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof fr<"u"&&fr!==null&&fr.hrtime?(xt.exports=function(){return(e()-i)/1e6},r=fr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=fr.uptime()*1e9,i=t-o):Date.now?(xt.exports=function(){return Date.now()-n},n=Date.now()):(xt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Fh)),xt.exports}var Ua;function Gh(){if(Ua)return hr.exports;Ua=1;for(var e=Bh(),r=typeof window>"u"?Sr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var g=0;g<h.length;g++)if(!h[g].cancelled)try{h[g].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return hr.exports=function(f){return i.call(r,f)},hr.exports.cancel=function(){o.apply(r,arguments)},hr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},hr.exports}var tn={},qa;function $h(){if(qa)return tn;qa=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return tn}var zt={},Va;function Wh(){if(Va)return zt;Va=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.noop=e,zt.intBetween=r,zt.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return zt}var Ka;function Hh(){if(Ka)return Ke;Ka=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=P,Ke.createVerticalStrength=R,Ke.createScrollingComponent=N,Ke.default=U,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(nc()),r=c(ic()),n=rp(),t=c(jh()),i=c(Gh()),o=c($h()),a=Qp,l=c(np()),s=Wh();function c(z){return z&&z.__esModule?z:{default:z}}function u(z){if(z&&z.__esModule)return z;var G={};if(z!=null){for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(z,W):{};V.get||V.set?Object.defineProperty(G,W,V):G[W]=z[W]}}return G.default=z,G}function f(z){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(W){return typeof W}:f=function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},f(z)}function d(){return d=Object.assign||function(z){for(var G=1;G<arguments.length;G++){var W=arguments[G];for(var V in W)Object.prototype.hasOwnProperty.call(W,V)&&(z[V]=W[V])}return z},d.apply(this,arguments)}function p(z,G){if(z==null)return{};var W=h(z,G),V,Q;if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(z);for(Q=0;Q<te.length;Q++)V=te[Q],!(G.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(z,V)&&(W[V]=z[V])}return W}function h(z,G){if(z==null)return{};var W={},V=Object.keys(z),Q,te;for(te=0;te<V.length;te++)Q=V[te],!(G.indexOf(Q)>=0)&&(W[Q]=z[Q]);return W}function g(z,G){if(!(z instanceof G))throw new TypeError("Cannot call a class as a function")}function m(z,G){for(var W=0;W<G.length;W++){var V=G[W];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(z,V.key,V)}}function y(z,G,W){return G&&m(z.prototype,G),z}function b(z,G){return G&&(f(G)==="object"||typeof G=="function")?G:x(z)}function w(z){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(W){return W.__proto__||Object.getPrototypeOf(W)},w(z)}function D(z,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(G&&G.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),G&&_(z,G)}function _(z,G){return _=Object.setPrototypeOf||function(V,Q){return V.__proto__=Q,V},_(z,G)}function x(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function T(z,G,W){return G in z?Object.defineProperty(z,G,{value:W,enumerable:!0,configurable:!0,writable:!0}):z[G]=W,z}var C=150;function P(z){return function(W,V){var Q=W.x,te=W.w,X=W.y,ee=W.h,q=Math.min(te/2,z),re=V.x>=Q&&V.x<=Q+te,F=re&&V.y>=X&&V.y<=X+ee;if(F){if(V.x<Q+q)return(V.x-Q-q)/q;if(V.x>Q+te-q)return-(Q+te-V.x-q)/q}return 0}}function R(z){return function(W,V){var Q=W.y,te=W.h,X=W.x,ee=W.w,q=Math.min(te/2,z),re=V.y>=Q&&V.y<=Q+te,F=re&&V.x>=X&&V.x<=X+ee;if(F){if(V.y<Q+q)return(V.y-Q-q)/q;if(V.y>Q+te-q)return-(Q+te-V.y-q)/q}return 0}}var E=P(C);Ke.defaultHorizontalStrength=E;var j=R(C);Ke.defaultVerticalStrength=j;function N(z){var G=function(W){D(V,W);function V(Q,te){var X;return g(this,V),X=b(this,w(V).call(this,Q,te)),T(x(x(X)),"updateScrolling",(0,t.default)(function(ee){var q=X.container.getBoundingClientRect(),re=q.left,F=q.top,H=q.width,k=q.height,O={x:re,y:F,w:H,h:k},A=(0,s.getCoords)(ee),$=X.props,J=$.horizontalStrength,oe=$.verticalStrength;X.scaleX=J(O,A),X.scaleY=oe(O,A),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),T(x(x(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(V,[{key:"componentDidMount",value:function(){var te=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return te.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var te=this.props.dragDropManager,X=te.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var te=this,X=0,ee=function q(){var re=te.scaleX,F=te.scaleY,H=te.container,k=te.props,O=k.strengthMultiplier,A=k.onScrollChange;if(O===0||re+F===0){te.stopScrolling();return}if(X+=1,X%2){var $=H.scrollLeft,J=H.scrollTop,oe=H.scrollWidth,de=H.scrollHeight,se=H.clientWidth,me=H.clientHeight,ve=re?H.scrollLeft=(0,s.intBetween)(0,oe-se,$+re*O):$,ue=F?H.scrollTop=(0,s.intBetween)(0,de-me,J+F*O):J;A(ve,ue)}te.frame=(0,i.default)(q)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var te=this.props;te.strengthMultiplier,te.verticalStrength,te.horizontalStrength,te.onScrollChange;var X=p(te,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(z,d({ref:this.wrappedInstance},X))}}]),V}(e.Component);return T(G,"displayName","Scrolling(".concat((0,o.default)(z),")")),T(G,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),T(G,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(G,z)}function U(z){var G=N(z);return function(W){return e.default.createElement(a.DragDropContextConsumer,null,function(V){var Q=V.dragDropManager;return Q===void 0?null:e.default.createElement(G,d({},W,{dragDropManager:Q}))})}}return Ke}var gn=Hh();const Uh=Ln(gn);var qh=Xp();const Ya=Ln(qh);function Oc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Ec(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Nc(e,r){try{var n=this.props,t=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,t)}finally{this.props=n,this.state=t}}Oc.__suppressDeprecationWarning=!0;Ec.__suppressDeprecationWarning=!0;Nc.__suppressDeprecationWarning=!0;function Ur(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof r.getSnapshotBeforeUpdate!="function")return e;var n=null,t=null,i=null;if(typeof r.componentWillMount=="function"?n="componentWillMount":typeof r.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof r.componentWillReceiveProps=="function"?t="componentWillReceiveProps":typeof r.UNSAFE_componentWillReceiveProps=="function"&&(t="UNSAFE_componentWillReceiveProps"),typeof r.componentWillUpdate=="function"?i="componentWillUpdate":typeof r.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||t!==null||i!==null){var o=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
5
5
  `+n:"")+(t!==null?`
@@ -40,7 +40,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
40
40
  *
41
41
  * @license MIT
42
42
  * @version 1.0.8
43
- */const Nu=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jr=Object.freeze({...Nu,...Dn}),ro=Object.freeze({...Jr,body:"",hidden:!1}),kb=Object.freeze({width:null,height:null}),Mu=Object.freeze({...kb,...Dn});function Ob(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const Eb=/[\s,]+/;function Nb(e,r){r.split(Eb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Au={...Mu,preserveAspectRatio:""};function Yl(e){const r={...Au},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ob(n("rotate","")),Nb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Mb(e,r){for(const n in Au)if(e[n]!==r[n])return!0;return!1}const kr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Qr=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!bn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!bn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!bn(l,n)?null:l}return null},bn=(e,r)=>e?!!((e.provider===""||e.provider.match(kr))&&(r&&e.prefix===""||e.prefix.match(kr))&&e.name.match(kr)):!1;function Ab(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function Jl(e,r){const n=Ab(e,r);for(const t in ro)t in Dn?t in e&&!(t in n)&&(n[t]=Dn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Lb(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function zb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=Jl(t[l]||i[l],o)}return a(r),n.forEach(a),Jl(e,o)}function Lu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=Lb(e);for(const i in t){const o=t[i];o&&(r(i,zb(e,i,o)),n.push(i))}return n}const jb={provider:"",aliases:{},not_found:{},...Nu};function Ii(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function zu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ii(e,jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(kr)||typeof o.body!="string"||!Ii(o,ro))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(kr)||typeof a!="string"||!n[a]&&!t[a]||!Ii(o,ro))return null}return r}const Tn=Object.create(null);function Fb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=Tn[e]||(Tn[e]=Object.create(null));return n[r]||(n[r]=Fb(e,r))}function Uo(e,r){return zu(r)?Lu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Bb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Gb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Tn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Tn[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let zr=!1;function ju(e){return typeof e=="boolean"&&(zr=e),zr}function jr(e){const r=typeof e=="string"?Qr(e,!0,zr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Fu(e,r){const n=Qr(e,!0,zr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Bb(t,n.name,r)}function Ql(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),zr&&!r&&!e.prefix){let i=!1;return zu(e)&&(e.prefix="",Lu(e,(o,a)=>{a&&Fu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!bn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Uo(t,e)}function $b(e){return!!jr(e)}function Wb(e){const r=jr(e);return r?{...Jr,...r}:null}function Hb(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Bu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ub(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Bu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let qb=0;function Vb(e,r,n){const t=qb++,i=Bu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const no=Object.create(null);function Xl(e,r){no[e]=r}function io(e){return no[e]||no[""]}function Kb(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Qr(i,r,n):i;o&&t.push(o)}),t}var Yb={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Jb(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),h(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(p=[]),typeof x=="function"&&p.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",p.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const P=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(P){u=C,d.length||(a.length?_():b());return}if(h(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(C)})}function _(){if(s!=="pending")return;h();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,P)=>{D(T,C,P)}};d.push(T),c++,f=setTimeout(_,e.rotate),n(x,r,T.callback)}return setTimeout(_),y}function Gu(e){const r={...Yb,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Jb(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Un=Object.create(null),vr=["https://api.simplesvg.com","https://api.unisvg.com"],yn=[];for(;vr.length>0;)vr.length===1||Math.random()>.5?yn.push(vr.shift()):yn.push(vr.pop());Un[""]=qo({resources:["https://api.iconify.design"].concat(yn)});function Zl(e,r){const n=qo(r);return n===null?!1:(Un[e]=n,!0)}function qn(e){return Un[e]}function Qb(){return Object.keys(Un)}function es(){}const Ri=Object.create(null);function Xb(e){if(!Ri[e]){const r=qn(e);if(!r)return;const n=Gu(r),t={config:r,redundancy:n};Ri[e]=t}return Ri[e]}function $u(e,r,n){let t,i;if(typeof e=="string"){const o=io(e);if(!o)return n(void 0,424),es;i=o.send;const a=Xb(e);a&&(t=a.redundancy)}else{const o=qo(e);if(o){t=Gu(o);const a=e.resources?e.resources[0]:"",l=io(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),es):t.query(r,i,n)().abort}const ts="iconify2",Fr="iconify",Wu=Fr+"-count",rs=Fr+"-version",Hu=36e5,Zb=168;function oo(e,r){try{return e.getItem(r)}catch{}}function Vo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ns(e,r){try{e.removeItem(r)}catch{}}function ao(e,r){return Vo(e,Wu,r.toString())}function lo(e){return parseInt(oo(e,Wu))||0}const _t={local:!0,session:!0},Uu={local:new Set,session:new Set};let Ko=!1;function ey(e){Ko=e}let an=typeof window>"u"?{}:window;function qu(e){const r=e+"Storage";try{if(an&&an[r]&&typeof an[r].length=="number")return an[r]}catch{}_t[e]=!1}function Vu(e,r){const n=qu(e);if(!n)return;const t=oo(n,rs);if(t!==ts){if(t){const l=lo(n);for(let s=0;s<l;s++)ns(n,Fr+s.toString())}Vo(n,rs,ts),ao(n,0);return}const i=Math.floor(Date.now()/Hu)-Zb,o=l=>{const s=Fr+l.toString(),c=oo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}ns(n,s)}};let a=lo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,ao(n,a)):Uu[e].add(l))}function Ku(){if(!Ko){ey(!0);for(const e in _t)Vu(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Uo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ty(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in _t)Vu(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function ry(e,r){Ko||Ku();function n(t){let i;if(!_t[t]||!(i=qu(t)))return;const o=Uu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=lo(i),!ao(i,a+1))return;const l={cached:Math.floor(Date.now()/Hu),provider:e.provider,data:r};return Vo(i,Fr+a.toString(),JSON.stringify(l))}r.lastModified&&!ty(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function is(){}function ny(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ub(e)}))}function iy(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=io(n)))return;o.prepare(n,t,i).forEach(l=>{$u(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Uo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),ry(e,s)}catch(c){console.error(c)}ny(e)})})}))}const Yo=(e,r)=>{const n=Kb(e,!0,ju()),t=Hb(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,is)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&iy(s,i[c][u])}),r?Vb(r,t,o):is},oy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Qr(e,!0):e;if(!t){n(e);return}Yo([t||e],i=>{if(i.length&&t){const o=jr(t);if(o){r({...Jr,...o});return}}n(e)})});function ay(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function ly(e,r){const n=typeof e=="string"?Qr(e,!0,!0):null;if(!n){const o=ay(e);return{value:e,data:o}}const t=jr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Yo([n],()=>r(e,n,jr(n)));return{value:e,name:n,loading:i}}function Di(e){return e.hasAttribute("inline")}let Yu=!1;try{Yu=navigator.vendor.indexOf("Apple")===0}catch{}function sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(Yu||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function so(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(cy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=uy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const dy=e=>e==="unset"||e==="undefined"||e==="none";function Ju(e,r){const n={...Jr,...e},t={...Mu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const g=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=so(f,s/c)):(u=a==="auto"?s:a,f=l===null?so(u,c/s):l==="auto"?c:l);const d={},p=(h,g)=>{dy(g)||(d[h]=g.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const fy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=fy();function py(e){Pn=e}function hy(){return Pn}function gy(e,r){const n=qn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function vy(e){return e===404}const my=(e,r,n)=>{const t=[],i=gy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function by(e){if(typeof e=="string"){const r=qn(e);if(r)return r.path}return"/"}const yy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=by(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Sy={prepare:my,send:yy};function os(e,r){switch(e){case"local":case"session":_t[e]=r;break;case"all":for(const n in _t)_t[n]=r;break}}const Ti="data-style";let Qu="";function xy(e){Qu=e}function as(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ti));n||(n=document.createElement("style"),n.setAttribute(Ti,Ti),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Qu}function Xu(){Xl("",Sy),ju(!0);let e;try{e=window}catch{}if(e){if(Ku(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Ql(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;Zl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>os(n,!0),disableCache:n=>os(n,!1),iconExists:$b,getIcon:Wb,listIcons:Gb,addIcon:Fu,addCollection:Ql,calculateSize:so,buildIcon:Ju,loadIcons:Yo,loadIcon:oy,addAPIProvider:Zl,appendCustomStyle:xy,_api:{getAPIConfig:qn,setAPIModule:Xl,sendAPIQuery:$u,setFetch:py,getFetch:hy,listAPIProviders:Qb}}}function Zu(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function wy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Cy(e){return"data:image/svg+xml,"+wy(e)}function Iy(e){return'url("'+Cy(e)+'")'}const co={"background-color":"currentColor"},ed={"background-color":"transparent"},ls={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ss={"-webkit-mask":co,mask:co,background:ed};for(const e in ss){const r=ss[e];for(const n in ls)r[e+"-"+n]=ls[n]}function cs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ry(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Zu(i,{...o,width:r.width+"",height:r.height+""}),l=Iy(a),s=t.style,c={"--svg":l,width:cs(o.width),height:cs(o.height),...n?co:ed};for(const u in c)s.setProperty(u,c[u]);return t}let Or;function Dy(){try{Or=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Or=null}}function Ty(e){return Or===void 0&&Dy(),Or?Or.createHTML(e):e}function Py(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=Zu(e.body,n);return r.innerHTML=Ty(i),r.firstChild}function us(e,r){const n=r.icon.data,t=r.customisations,i=Ju(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Py(i);break;default:a=Ry(i,{...Jr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function ds(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function _y(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Di(this);as(l,s),this._state=ds({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Di(this),c=this._state;s!==c.inline&&(c.inline=s,as(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Di(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}us(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=Yl(this);(l.attrMode!==c||Mb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=ly(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=ds(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Yl(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=sy(l.data.body,c),f=this._state.inline;us(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=Xu();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const ky=_y()||Xu(),{enableCache:zR,disableCache:jR,iconExists:FR,getIcon:BR,listIcons:GR,addIcon:$R,addCollection:WR,calculateSize:HR,buildIcon:UR,loadIcons:qR,loadIcon:VR,addAPIProvider:KR,_api:YR}=ky,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),td=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},Jo=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=Jo(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),rd=e=>/^https?:\/\//.test(e),Oy=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},nd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Oy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Ey=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,g)=>h+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const g=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(g)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c},Ny=(e,r)=>{const n=o=>{const a=o.match(/^(\d+\.\d+\.\d+(?:-[^-]+?-\d{8}))/);return a?a[1]:o},t=n(e),i=n(r);return t===i&&e!==r?!1:op.gte(t,i)};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(wo(async()=>{s(!0);try{await Co(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),rd(e))return v.jsx(ni,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ni,{component:"span",...t,sx:i,children:v.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ni,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const My=e=>e.from!=="team-tmpl";function Ay({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ap(e.slice(0,t-1),r.slice(0,i-1)))}function id({treeNode:e}){const{locale:r}=Oe(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Re,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Io(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}id.propTypes={treeNode:S.object.isRequired};const Ly=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function od({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Ly,{children:v.jsx(th,{backend:rh,...i,children:v.jsx(Iv,{generateNodeProps:o=>{const a=My(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(ye,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(id,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Ay,theme:_b})})})}od.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var zy=rc();const jy=Ln(zy),ln="en";function ad({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=ln,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Oe(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),p=I.useMemo(()=>i.includes(t)?t:ln,[i,t]),h=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,ln])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[ln]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),Jp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=Pc(f.localeList,T),a(T)}function _(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(hh,{sx:e,value:p,onChange:(x,T)=>{n(T)},children:[v.jsx(La,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(La,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(ke,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(ye,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(ke,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(ye,{icon:"mdi:plus"})})]}),v.jsx(Fi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Wi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:h,onChange:_,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}ad.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const Qo=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ld(e,r,n=5e3){for(const t of Qo){const i=Ue(t,e);try{return await vh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function Fy({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await ld("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const sn=new Map;async function By(e){if(sn.has(e))return sn.get(e);const r=(async()=>{const{data:n}=await ld("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();sn.set(e,r);try{return await r}catch(n){throw sn.delete(e),n}}function Gy(e){return Ue(Qo[0],`${e}.svg`)}function $y(e){try{const r=new URL(e);for(const n of Qo)if(r.origin===n)return lp(r.pathname).replace(".svg","");return""}catch{return""}}function Wy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Io(e)&&(n=$y(e))),{isIconId:r,iconId:n}}const Hy=I.lazy(()=>fp(()=>import("./index-C_rTOaKu.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),fs=qe(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function sd({icon:e,...r}){const[n,t]=I.useState(!1);return wo(async()=>{t(!1),await Co(e),t(!0)},[e]),e?n?v.jsx(ye,{icon:e,...r}):v.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}sd.propTypes={icon:S.string.isRequired};function uo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=oc(),{blocklet:u}=Nt(),f=jn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Oe(),{isIconId:w,iconId:D}=Wy(e),[_,x]=I.useState(null),{onChange:T,onBlur:C,sx:P,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=Ue(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ge(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ge(async ee=>await h.current.getUploader().uploadFile(ee)),W=ge(()=>{x(null)}),V=ge(()=>{j&&x(m.current)}),Q=ge(async ee=>{try{if(o==="url"){const q=Gy(ee),re=await sp(q,{width:128,height:128}),F=await cp(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ge(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ge(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...P},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Bi,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(fs,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Bi,{position:"end",children:[v.jsx(ke,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Dc,{style:{fontSize:18}})}),E&&v.jsx(up,{title:y("common.upload"),children:v.jsx(ke,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(sd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:gh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Fi,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(cd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(fo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),v.jsx(fo,{ref:g,locale:b,apiPath:N,headers:p,onUploadFinish:X}),v.jsx(Fi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(fs,{size:120,icon:z(e),alt:"Error"})})]})}uo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function cd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Oe(),D=96,_=ge(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,P=(C-1)*D,R=C*D,E=m.current.slice(P,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ge(C=>{m.current=C,y.current=1,b.current=C.length>D;const P=C.slice(0,D);s(P),h(C.length===0),b.current&&_()}),{run:T}=ac(async C=>{if(C){u(!0);try{const{icons:P}=await Fy({keyword:C});x(P)}catch(P){console.error("Failed to search icons:",P),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&_()},P=g.current;return P&&(P.addEventListener("scroll",C),C()),()=>{P&&P.removeEventListener("scroll",C)}},[_,c]),wo(async()=>{if(f)T(f);else{u(!0);try{const C=await By("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),h(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(Uy,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(ke,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Dc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(qy,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(ye,{icon:C,width:"32",height:"32"})},C))}),p&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(dp,{size:20})})]})]})}cd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const Uy=qe(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),qy=qe(ke,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function fo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return v.jsx(I.Suspense,{children:v.jsx(Hy,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}fo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const ps=24,hs=48,gs="add",$e="en",vs={title:{[$e]:""},description:{[$e]:""},link:{[$e]:""}};function ms(e){return Pc(Array.from(new Set(Ie.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),$e)}S.string.isRequired;function Xo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Rc(),{t:l,locale:s}=Oe(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:gs,linkDisabled:!1,locale:$e,formState:Ge(vs),get localeList(){return ms(d.formState)}}),{handleSubmit:p,control:h,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=fh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ie.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=ph({control:h}),D=w.component,_=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=_},[_]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const P=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(P?.component){const k=n.find(J=>J.name===P.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return Ra(A);const $=Yt(P.link)?P.link[d.locale]:P.link;return Ra(Ue(A,$||"/"))}return null},[n,d.locale,P,D]),E=I.useMemo(()=>{const{component:k}=P||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ee.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ee.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[P,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=$e,d.type=gs,d.linkDisabled=!1,d.formState=Ge(vs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{Ch(d.formState[O]).length>1&&(k[O]=d.formState[O])}),Ro(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:de=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const se=ms(k),me=(ve,ue)=>{sc(ve)?d.formState[ue]=se.reduce((be,fe)=>(be[fe]=ve,be),{[$e]:ve}):Yt(ve)?d.formState[ue]=Ge(ve):d.formState[ue]={}};Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>me(k[ve],ve)),Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>m(ve,d.formState[ve][d.locale])),m("component",oe),m("parent",J),m("role",de||[]),d.type="edit",d.isRoot=!J,f.current=ve=>{const ue=pp(ve,["id","title","description","icon","component","link","role"]);O(ue)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>ps)return l("navigation.form.titleTooLong",{len:ps})}return!0}function W(k){const O=k?.trim();return O&&O.length>hs?l("navigation.form.descriptionTooLong",{len:hs}):!0}const V=ge(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Io(V(O)))return!0;try{await Co(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ee.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):xr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=$e,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][$e]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:p(re)}),[U,j,z,p,re]),v.jsxs(ie,{...o,children:[v.jsx(ad,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:h,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:h,rules:{validate:te},render:({field:k})=>v.jsx(uo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:h,rules:{validate:Q},render:({field:k})=>v.jsx(uo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:h,render:({field:k})=>v.jsx(Wi,{fullWidth:!0,margin:"dense",disabled:d.locale!==$e&&k.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:h,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:h,rules:{validate:X},render:({field:k})=>v.jsx(lc,{fullWidth:!0,margin:"dense",children:v.jsx(mh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Bi,{position:"start",sx:{textDecoration:jy(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Re,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:h,render:({field:k})=>v.jsx(Wi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:h,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}Xo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function Zo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Oe(),[o,{setTrue:a,setFalse:l}]=uh(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),p=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),h=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),v.jsx(hp,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(cc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(Xo,{ref:u,section:r,components:n,rawNavigations:t})})}Zo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function ud({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Oe(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),p=I.useCallback(g=>{u(g),t(o)},[t,o]),h=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(ke,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(ye,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(ke,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(ye,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(ke,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?v.jsx(ye,{icon:"mdi:eye-off-outline"}):v.jsx(ye,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(ke,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:v.jsx(ye,{icon:"mdi:delete"})})})]})}ud.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const Sn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Vy=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ky=(e,r="en")=>{if(typeof e=="string"){if(rd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:Ky(t.link,r),_rawLink:t.link}),"items")},Yy=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Jy=e=>{if(!e?.length)return null;const r=Yy(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},ea=e=>{if(!e)return null;const r={...e};return r.theme=Vy(r.theme),r.navigation=Jy(Qy(r.navigation)),r},Qy=(e=[])=>Jo(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),dd=(e,r)=>Jo(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Xy={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Zy={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function eS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(g=>p.component===g.name);return{...p,component:h}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ge((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(ke,{size:"medium",ref:c,children:v.jsx(ye,{icon:Xy,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(gp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>v.jsx(vp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:v.jsx(uc,{...p,timeout:350,children:v.jsxs(Dr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(mp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>v.jsx(bp,{disablePadding:!0,children:v.jsxs(bh,{href:Da(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?v.jsx(ie,{component:"img",src:`${dc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(ye,{fontSize:50,icon:h.icon||Zy,color:s.palette.text.secondary}),v.jsx(Re,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Da(h.title,r)})]})},h.id))}),v.jsx(yp,{session:e,children:v.jsx(cc,{variant:"outlined",fullWidth:!0,href:Sp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const fd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),pd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),tS=["admin","owner"],rS=e=>e.endsWith(".ip.abtnet.io"),nS=e=>e.endsWith(".did.abtnet.io"),iS={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},oS=1e3*60*60*24*30,bs=".well-known/service/admin/domains";function hd({locale:e="en",session:r={}}){const n=r?.user,t=Tc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>oS}),a=ge((d,p={})=>fc(iS,d,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ue(window.location.origin,bs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&tS.includes(n.role);return window.location.href.includes(bs)||t||!rS(l)&&!nS(l)?null:v.jsxs(xp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(wp,{sx:{padding:"20px !important"},children:[v.jsx(Re,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Re,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Re,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Cp,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}hd.propTypes={locale:S.string,session:S.object};const Rt={};function aS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ue(r,dc,e);return new Ip.WsClient(n,{heartbeatIntervalMs:100*1e3})}function lS(e="admin"){return Rt[e]||(Rt[e]=aS(e)),Rt[e]}const sS=(e="admin")=>{const r=I.use(Fn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=lS(e),Rt[e].connect()),Rt[e]},cS={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},uS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},dS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function fS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=jn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const pS=e=>!Ro(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,hS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},gS=async(e,r)=>{try{return await yh.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},vS=async(e,r)=>{const{type:n,did:t}=e;return pc.isSameAddr(n,"did")?await gS(t,r)||wn.getLink(e):wn.getLink(e)},mS=async(e,r,n=!0)=>{const t=wn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof wn.Link){if(n){const o=await vS(i,r),{type:a,chainId:l,did:s}=i;return pc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},bS=e=>Rp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),yS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Do(Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(hc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function SS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ge(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,_)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),_<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),p=ge(()=>{const m=a?yS[a]:null;return m?m(s,r.length):null}),h=Me(()=>{const m=d(),y=p();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),g=Me(()=>{if(!e)return null;const m=hS(e);return m?.targetLink?Ue(i,m.targetLink):null},[e,i]);return!a||Ro(l)?null:v.jsxs(v.Fragment,{children:[h," ",g&&v.jsx(hc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const xS={normal:Ta,success:cS,info:Ta,warning:uS,error:dS},wS=ar(_p)`
43
+ */const Nu=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Jr=Object.freeze({...Nu,...Dn}),ro=Object.freeze({...Jr,body:"",hidden:!1}),kb=Object.freeze({width:null,height:null}),Mu=Object.freeze({...kb,...Dn});function Ob(e,r=0){const n=e.replace(/^-?[0-9.]*/,"");function t(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:t(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?t(o):0)}}return r}const Eb=/[\s,]+/;function Nb(e,r){r.split(Eb).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Au={...Mu,preserveAspectRatio:""};function Yl(e){const r={...Au},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ob(n("rotate","")),Nb(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Mb(e,r){for(const n in Au)if(e[n]!==r[n])return!0;return!1}const kr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Qr=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!bn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!bn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!bn(l,n)?null:l}return null},bn=(e,r)=>e?!!((e.provider===""||e.provider.match(kr))&&(r&&e.prefix===""||e.prefix.match(kr))&&e.name.match(kr)):!1;function Ab(e,r){const n={};!e.hFlip!=!r.hFlip&&(n.hFlip=!0),!e.vFlip!=!r.vFlip&&(n.vFlip=!0);const t=((e.rotate||0)+(r.rotate||0))%4;return t&&(n.rotate=t),n}function Jl(e,r){const n=Ab(e,r);for(const t in ro)t in Dn?t in e&&!(t in n)&&(n[t]=Dn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Lb(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function zb(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=Jl(t[l]||i[l],o)}return a(r),n.forEach(a),Jl(e,o)}function Lu(e,r){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{r(i,null),n.push(i)});const t=Lb(e);for(const i in t){const o=t[i];o&&(r(i,zb(e,i,o)),n.push(i))}return n}const jb={provider:"",aliases:{},not_found:{},...Nu};function Ii(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function zu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ii(e,jb))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(kr)||typeof o.body!="string"||!Ii(o,ro))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(kr)||typeof a!="string"||!n[a]&&!t[a]||!Ii(o,ro))return null}return r}const Tn=Object.create(null);function Fb(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function gt(e,r){const n=Tn[e]||(Tn[e]=Object.create(null));return n[r]||(n[r]=Fb(e,r))}function Uo(e,r){return zu(r)?Lu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Bb(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function Gb(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Tn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Tn[i]||{})).forEach(a=>{const l=gt(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let zr=!1;function ju(e){return typeof e=="boolean"&&(zr=e),zr}function jr(e){const r=typeof e=="string"?Qr(e,!0,zr):e;if(r){const n=gt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Fu(e,r){const n=Qr(e,!0,zr);if(!n)return!1;const t=gt(n.provider,n.prefix);return Bb(t,n.name,r)}function Ql(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),zr&&!r&&!e.prefix){let i=!1;return zu(e)&&(e.prefix="",Lu(e,(o,a)=>{a&&Fu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!bn({provider:r,prefix:n,name:"a"}))return!1;const t=gt(r,n);return!!Uo(t,e)}function $b(e){return!!jr(e)}function Wb(e){const r=jr(e);return r?{...Jr,...r}:null}function Hb(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=gt(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Bu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ub(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Bu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let qb=0;function Vb(e,r,n){const t=qb++,i=Bu.bind(null,n,t);if(!r.pending.length)return i;const o={id:t,icons:r,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}const no=Object.create(null);function Xl(e,r){no[e]=r}function io(e){return no[e]||no[""]}function Kb(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?Qr(i,r,n):i;o&&t.push(o)}),t}var Yb={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Jb(e,r,n,t){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let x=e.resources.slice(0);for(a=[];x.length>1;){const T=Math.floor(Math.random()*x.length);a.push(x[T]),x=x.slice(0,T).concat(x.slice(T+1))}a=a.concat(x)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function g(){s==="pending"&&(s="aborted"),h(),d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function m(x,T){T&&(p=[]),typeof x=="function"&&p.push(x)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:g}}function b(){s="failed",p.forEach(x=>{x(void 0,u)})}function w(){d.forEach(x=>{x.status==="pending"&&(x.status="aborted")}),d=[]}function D(x,T,C){const P=T!=="success";switch(d=d.filter(R=>R!==x),s){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){u=C,b();return}if(P){u=C,d.length||(a.length?_():b());return}if(h(),w(),!e.random){const R=e.resources.indexOf(x.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(C)})}function _(){if(s!=="pending")return;h();const x=a.shift();if(x===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(w(),b())},e.timeout);return}b();return}const T={status:"pending",resource:x,callback:(C,P)=>{D(T,C,P)}};d.push(T),c++,f=setTimeout(_,e.rotate),n(x,r,T.callback)}return setTimeout(_),y}function Gu(e){const r={...Yb,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Jb(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Un=Object.create(null),vr=["https://api.simplesvg.com","https://api.unisvg.com"],yn=[];for(;vr.length>0;)vr.length===1||Math.random()>.5?yn.push(vr.shift()):yn.push(vr.pop());Un[""]=qo({resources:["https://api.iconify.design"].concat(yn)});function Zl(e,r){const n=qo(r);return n===null?!1:(Un[e]=n,!0)}function qn(e){return Un[e]}function Qb(){return Object.keys(Un)}function es(){}const Ri=Object.create(null);function Xb(e){if(!Ri[e]){const r=qn(e);if(!r)return;const n=Gu(r),t={config:r,redundancy:n};Ri[e]=t}return Ri[e]}function $u(e,r,n){let t,i;if(typeof e=="string"){const o=io(e);if(!o)return n(void 0,424),es;i=o.send;const a=Xb(e);a&&(t=a.redundancy)}else{const o=qo(e);if(o){t=Gu(o);const a=e.resources?e.resources[0]:"",l=io(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),es):t.query(r,i,n)().abort}const ts="iconify2",Fr="iconify",Wu=Fr+"-count",rs=Fr+"-version",Hu=36e5,Zb=168;function oo(e,r){try{return e.getItem(r)}catch{}}function Vo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ns(e,r){try{e.removeItem(r)}catch{}}function ao(e,r){return Vo(e,Wu,r.toString())}function lo(e){return parseInt(oo(e,Wu))||0}const _t={local:!0,session:!0},Uu={local:new Set,session:new Set};let Ko=!1;function ey(e){Ko=e}let an=typeof window>"u"?{}:window;function qu(e){const r=e+"Storage";try{if(an&&an[r]&&typeof an[r].length=="number")return an[r]}catch{}_t[e]=!1}function Vu(e,r){const n=qu(e);if(!n)return;const t=oo(n,rs);if(t!==ts){if(t){const l=lo(n);for(let s=0;s<l;s++)ns(n,Fr+s.toString())}Vo(n,rs,ts),ao(n,0);return}const i=Math.floor(Date.now()/Hu)-Zb,o=l=>{const s=Fr+l.toString(),c=oo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}ns(n,s)}};let a=lo(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,ao(n,a)):Uu[e].add(l))}function Ku(){if(!Ko){ey(!0);for(const e in _t)Vu(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=gt(t,i);if(!Uo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ty(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in _t)Vu(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function ry(e,r){Ko||Ku();function n(t){let i;if(!_t[t]||!(i=qu(t)))return;const o=Uu[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=lo(i),!ao(i,a+1))return;const l={cached:Math.floor(Date.now()/Hu),provider:e.provider,data:r};return Vo(i,Fr+a.toString(),JSON.stringify(l))}r.lastModified&&!ty(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function is(){}function ny(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ub(e)}))}function iy(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,i=e.iconsToLoad;delete e.iconsToLoad;let o;if(!i||!(o=io(n)))return;o.prepare(n,t,i).forEach(l=>{$u(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Uo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),ry(e,s)}catch(c){console.error(c)}ny(e)})})}))}const Yo=(e,r)=>{const n=Kb(e,!0,ju()),t=Hb(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,is)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(gt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=gt(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&iy(s,i[c][u])}),r?Vb(r,t,o):is},oy=e=>new Promise((r,n)=>{const t=typeof e=="string"?Qr(e,!0):e;if(!t){n(e);return}Yo([t||e],i=>{if(i.length&&t){const o=jr(t);if(o){r({...Jr,...o});return}}n(e)})});function ay(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function ly(e,r){const n=typeof e=="string"?Qr(e,!0,!0):null;if(!n){const o=ay(e);return{value:e,data:o}}const t=jr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=Yo([n],()=>r(e,n,jr(n)));return{value:e,name:n,loading:i}}function Di(e){return e.hasAttribute("inline")}let Yu=!1;try{Yu=navigator.vendor.indexOf("Apple")===0}catch{}function sy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(Yu||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const cy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function so(e,r,n){if(r===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*r*n)/n;if(typeof e!="string")return e;const t=e.split(cy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=uy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const dy=e=>e==="unset"||e==="undefined"||e==="none";function Ju(e,r){const n={...Jr,...e},t={...Mu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const g=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(g.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),g.push("scale(-1 1)"),i.top=i.left=0):y&&(g.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),g.push("scale(1 -1)"),i.top=i.left=0);let w;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:w=i.height/2+i.top,g.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:g.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,g.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}b%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=so(f,s/c)):(u=a==="auto"?s:a,f=l===null?so(u,c/s):l==="auto"?c:l);const d={},p=(h,g)=>{dy(g)||(d[h]=g.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const fy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Pn=fy();function py(e){Pn=e}function hy(){return Pn}function gy(e,r){const n=qn(e);if(!n)return 0;let t;if(!n.maxURL)t=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=r+".json?icons=";t=n.maxURL-i-n.path.length-o.length}return t}function vy(e){return e===404}const my=(e,r,n)=>{const t=[],i=gy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function by(e){if(typeof e=="string"){const r=qn(e);if(r)return r.path}return"/"}const yy=(e,r,n)=>{if(!Pn){n("abort",424);return}let t=by(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Pn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(vy(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},Sy={prepare:my,send:yy};function os(e,r){switch(e){case"local":case"session":_t[e]=r;break;case"all":for(const n in _t)_t[n]=r;break}}const Ti="data-style";let Qu="";function xy(e){Qu=e}function as(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ti));n||(n=document.createElement("style"),n.setAttribute(Ti,Ti),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Qu}function Xu(){Xl("",Sy),ju(!0);let e;try{e=window}catch{}if(e){if(Ku(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Ql(i))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const t in n){const i="IconifyProviders["+t+"] is invalid.";try{const o=n[t];if(typeof o!="object"||!o||o.resources===void 0)continue;Zl(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>os(n,!0),disableCache:n=>os(n,!1),iconExists:$b,getIcon:Wb,listIcons:Gb,addIcon:Fu,addCollection:Ql,calculateSize:so,buildIcon:Ju,loadIcons:Yo,loadIcon:oy,addAPIProvider:Zl,appendCustomStyle:xy,_api:{getAPIConfig:qn,setAPIModule:Xl,sendAPIQuery:$u,setFetch:py,getFetch:hy,listAPIProviders:Qb}}}function Zu(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function wy(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Cy(e){return"data:image/svg+xml,"+wy(e)}function Iy(e){return'url("'+Cy(e)+'")'}const co={"background-color":"currentColor"},ed={"background-color":"transparent"},ls={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ss={"-webkit-mask":co,mask:co,background:ed};for(const e in ss){const r=ss[e];for(const n in ls)r[e+"-"+n]=ls[n]}function cs(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Ry(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Zu(i,{...o,width:r.width+"",height:r.height+""}),l=Iy(a),s=t.style,c={"--svg":l,width:cs(o.width),height:cs(o.height),...n?co:ed};for(const u in c)s.setProperty(u,c[u]);return t}let Or;function Dy(){try{Or=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Or=null}}function Ty(e){return Or===void 0&&Dy(),Or?Or.createHTML(e):e}function Py(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=Zu(e.body,n);return r.innerHTML=Ty(i),r.firstChild}function us(e,r){const n=r.icon.data,t=r.customisations,i=Ju(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Py(i);break;default:a=Ry(i,{...Jr,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function ds(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function _y(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Di(this);as(l,s),this._state=ds({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Di(this),c=this._state;s!==c.inline&&(c.inline=s,as(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Di(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}us(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=Yl(this);(l.attrMode!==c||Mb(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=ly(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=ds(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Yl(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=sy(l.data.body,c),f=this._state.inline;us(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=Xu();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const ky=_y()||Xu(),{enableCache:zR,disableCache:jR,iconExists:FR,getIcon:BR,listIcons:GR,addIcon:$R,addCollection:WR,calculateSize:HR,buildIcon:UR,loadIcons:qR,loadIcon:VR,addAPIProvider:KR,_api:YR}=ky,At=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:At(t[n],r,n)}):r(t)),td=(e,r="children")=>{const n=[];return At(e,t=>n.push(t),r),n},Jo=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=Jo(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),rd=e=>/^https?:\/\//.test(e),Oy=e=>{if(!e||!e?.startsWith("/"))return!1;const r=i=>i.endsWith("/")?i:`${i}/`,n=r(window.location.pathname),t=r(new URL(e,window.location.origin).pathname);return n.startsWith(t)},nd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Oy(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Ey=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,g)=>h+i+(g[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const g=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(g)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c},Ny=(e,r)=>{const n=o=>{const a=o.match(/^(\d+\.\d+\.\d+(?:-[^-]+?-\d{8}))/);return a?a[1]:o},t=n(e),i=n(r);return t===i&&e!==r?!1:op.gte(t,i)};function Qe({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[l,s]=I.useState(!0);if(wo(async()=>{s(!0);try{await Co(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),rd(e))return v.jsx(ni,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?v.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?v.jsx(ni,{component:"span",...t,sx:i,children:v.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),v.jsx(ni,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const My=e=>e.from!=="team-tmpl";function Ay({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ap(e.slice(0,t-1),r.slice(0,i-1)))}function id({treeNode:e}){const{locale:r}=Oe(),{blocklet:n}=Nt(),t=n.environments.find(a=>a.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return Yt(a)&&(s=a[r]),!I.isValidElement(l)&&Yt(l)&&(c=l[r]),v.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[v.jsx(Re,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&v.jsx(Re,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return v.jsxs(v.Fragment,{children:[e.icon&&(Io(i(e.icon))?v.jsx(Qe,{size:16,style:{marginRight:4},icon:i(e.icon)}):v.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}id.propTypes={treeNode:S.object.isRequired};const Ly=mt(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function od({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),v.jsx(Ly,{children:v.jsx(th,{backend:rh,...i,children:v.jsx(Iv,{generateNodeProps:o=>{const a=My(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?v.jsx(ye,{icon:"ic:round-drag-indicator"}):v.jsx(ie,{sx:{width:16,height:16}}),title:v.jsx(id,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Ay,theme:_b})})})}od.propTypes={treeData:S.object.isRequired,setTreeData:S.func,renderActions:S.func};var zy=rc();const jy=Ln(zy),ln="en";function ad({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=ln,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Oe(),s=I.useRef(),[c,u]=I.useState(null),f=or({localeList:[],inputLocale:"",localeError:""}),d=I.useMemo(()=>!!c,[c]),p=I.useMemo(()=>i.includes(t)?t:ln,[i,t]),h=I.useMemo(()=>Object.keys(Dt(o,[...f.localeList,ln])).map(x=>({title:o[x],value:x})),[f.localeList]),g=I.useMemo(()=>`Default (${o[ln]||Object.values(o)?.[0]})`,[o]);I.useEffect(()=>{f.localeList=[...i]},[i,f]),Jp("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(x){return x?x==="en"||f.localeList.includes(x)?l("navigation.form.localeExists",{value:x}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(x=""){const T=x?.trim(),C=m(T);return C!==!0?f.localeError=C:f.localeError="",C}function b(){const x=f.inputLocale?.trim();y(x)===!0&&(w(),f.localeList.push(x),r(x))}function w(){u(null),f.inputLocale="",f.localeError=""}function D(x,T){x.preventDefault(),x.stopPropagation(),f.localeList=Pc(f.localeList,T),a(T)}function _(x){const{value:T}=x.target;y(T),f.inputLocale=T}return v.jsxs(v.Fragment,{children:[v.jsxs(hh,{sx:e,value:p,onChange:(x,T)=>{n(T)},children:[v.jsx(La,{label:g,value:"en"}),f.localeList.map(x=>v.jsx(La,{sx:{position:"relative"},label:v.jsxs(v.Fragment,{children:[o[x],v.jsx(ke,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{D(T,x)},children:v.jsx(ye,{icon:"mdi:close",height:14})})]}),value:x},x)),v.jsx(ke,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:x=>{u(x.currentTarget)},children:v.jsx(ye,{icon:"mdi:plus"})})]}),v.jsx(Fi,{open:d,anchorEl:c,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:v.jsxs(ie,{sx:{p:2,width:"270px"},children:[v.jsx(Re,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),v.jsx(ie,{sx:{mt:1},children:v.jsx(Wi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:h,onChange:_,error:!!f.localeError,helperText:f.localeError||" "})}),v.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:v.jsx(Zt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}ad.propTypes={sx:S.any,onAdd:S.func,onChange:S.func,onRemoveLocale:S.func,locale:S.string,localeMap:S.object,locales:S.array};const Qo=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ld(e,r,n=5e3){for(const t of Qo){const i=Ue(t,e);try{return await vh.get(i,{params:r,timeout:n})}catch(o){console.warn(`Failed to fetch from ${i}:`,o)}}throw new Error(`All icon API endpoints ${e} failed`)}async function Fy({keyword:e,limit:r=999,start:n=0,palette:t=!1}){let i="",o=e;e.includes(":")&&([i,o]=e.split(":"));const{data:a}=await ld("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const sn=new Map;async function By(e){if(sn.has(e))return sn.get(e);const r=(async()=>{const{data:n}=await ld("/collection",{prefix:e}),t=new Set;return n.uncategorized?.forEach(i=>t.add(`${e}:${i}`)),Object.values(n.categories??{}).forEach(i=>{i.forEach(o=>t.add(`${e}:${o}`))}),Array.from(t)})();sn.set(e,r);try{return await r}catch(n){throw sn.delete(e),n}}function Gy(e){return Ue(Qo[0],`${e}.svg`)}function $y(e){try{const r=new URL(e);for(const n of Qo)if(r.origin===n)return lp(r.pathname).replace(".svg","");return""}catch{return""}}function Wy(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Io(e)&&(n=$y(e))),{isIconId:r,iconId:n}}const Hy=I.lazy(()=>fp(()=>import("./index-CGgu2xDj.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),fs=qe(Qe)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function sd({icon:e,...r}){const[n,t]=I.useState(!1);return wo(async()=>{t(!1),await Co(e),t(!0)},[e]),e?n?v.jsx(ye,{icon:e,...r}):v.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):v.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}sd.propTypes={icon:S.string.isRequired};function uo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=oc(),{blocklet:u}=Nt(),f=jn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===kt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),g=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Oe(),{isIconId:w,iconId:D}=Wy(e),[_,x]=I.useState(null),{onChange:T,onBlur:C,sx:P,...R}=a,E=i.includes("upload"),j=i.includes("select"),N=Ue(s,"/api/media/upload",u.appPid),U=or({showPopover:!1}),z=ge(ee=>{if(ee?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(ee,q).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),G=ge(async ee=>await h.current.getUploader().uploadFile(ee)),W=ge(()=>{x(null)}),V=ge(()=>{j&&x(m.current)}),Q=ge(async ee=>{try{if(o==="url"){const q=Gy(ee),re=await sp(q,{width:128,height:128}),F=await cp(re,ee);await G(F)}else T?.(ee)}catch(q){console.error("Failed to pick icon:",q)}W()}),te=ge(ee=>{ee.stopPropagation(),g.current.open(),W()}),X=ge(ee=>{a?.onChange?.(ee.data.url)});return v.jsxs(v.Fragment,{children:[v.jsx(Ht,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...P},onClick:j?V:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:v.jsx(Bi,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(U.showPopover=!0)},onMouseLeave:()=>{U.showPopover=!1},children:v.jsx(fs,{size:28,icon:z(e),alt:"Error"})}),endAdornment:v.jsxs(Bi,{position:"end",children:[v.jsx(ke,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),T("")},children:v.jsx(Dc,{style:{fontSize:18}})}),E&&v.jsx(up,{title:y("common.upload"),children:v.jsx(ke,{disableFocusRipple:!1,disableRipple:!1,onClick:te,children:v.jsx(sd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&v.jsx(ie,{component:gh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&v.jsx(Fi,{open:!!_,anchorEl:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:W,children:v.jsx(cd,{label:n,placeholder:t,value:w?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:Q,onClose:W})}),v.jsx(fo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),v.jsx(fo,{ref:g,locale:b,apiPath:N,headers:p,onUploadFinish:X}),v.jsx(Fi,{sx:{pointerEvents:"none"},open:U.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{U.showPopover=!1},disableRestoreFocus:!0,children:v.jsx(fs,{size:120,icon:z(e),alt:"Error"})})]})}uo.propTypes={value:S.string.isRequired,label:S.any,placeholder:S.any,helperText:S.string,methods:S.arrayOf(S.oneOf(["select","upload"])),iconifyShape:S.oneOf(["id","url"])};function cd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[p,h]=I.useState(!1),g=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:w}=Oe(),D=96,_=ge(()=>{!b.current||c||(u(!0),setTimeout(()=>{const C=y.current+1,P=(C-1)*D,R=C*D,E=m.current.slice(P,R);s(j=>[...j,...E]),y.current=C,b.current=R<m.current.length,u(!1)},300))}),x=ge(C=>{m.current=C,y.current=1,b.current=C.length>D;const P=C.slice(0,D);s(P),h(C.length===0),b.current&&_()}),{run:T}=ac(async C=>{if(C){u(!0);try{const{icons:P}=await Fy({keyword:C});x(P)}catch(P){console.error("Failed to search icons:",P),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:j}=g.current;(R+j>=E-150||E<=j)&&_()},P=g.current;return P&&(P.addEventListener("scroll",C),C()),()=>{P&&P.removeEventListener("scroll",C)}},[_,c]),wo(async()=>{if(f)T(f);else{u(!0);try{const C=await By("mdi-light");x(C)}catch(C){console.error("Failed to fetch default icons:",C),h(!0)}finally{u(!1)}}},[f,T,x]),v.jsxs(Uy,{ref:g,sx:t,...a,children:[v.jsxs(ie,{className:"icon-picker-input",children:[v.jsx(Ht,{label:w("navigation.form.searchIcons"),placeholder:w("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:C=>d(C.target.value),slotProps:{input:{endAdornment:v.jsx(ke,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:v.jsx(Dc,{style:{fontSize:18}})})}}}),v.jsx(Zt,{onClick:o,children:w("common.cancel")})]}),v.jsxs(ie,{children:[l.length>0&&v.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>v.jsx(qy,{$active:n===C,onClick:()=>{i(C)},children:v.jsx(ye,{icon:C,width:"32",height:"32"})},C))}),p&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:v.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&v.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:v.jsx(dp,{size:20})})]})]})}cd.propTypes={label:S.any,placeholder:S.any,value:S.string,sx:S.object,onPick:S.func.isRequired,onClose:S.func.isRequired};const Uy=qe(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),qy=qe(ke,{shouldForwardProp:e=>e!=="$active"})(({$active:e,theme:r})=>({boxSizing:"content-box",backgroundColor:e?r.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:r.palette.action.hover}}));function fo({ref:e=null,locale:r,apiPath:n,headers:t,imageEditorProps:i={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return v.jsx(I.Suspense,{children:v.jsx(Hy,{locale:r,ref:e,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:i,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:t}})})}fo.propTypes={ref:S.any,locale:S.string,apiPath:S.string,headers:S.object,imageEditorProps:S.object,onUploadFinish:S.func};const ps=24,hs=48,gs="add",$e="en",vs={title:{[$e]:""},description:{[$e]:""},link:{[$e]:""}};function ms(e){return Pc(Array.from(new Set(Ie.NAVIGATION_I18N_FIELDS.flatMap(r=>Yt(e[r])?Object.keys(e[r]):[]))),$e)}S.string.isRequired;function Xo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Rc(),{t:l,locale:s}=Oe(),{blocklet:c}=Nt(),u=I.useMemo(()=>{const k=c.environments.find(A=>A.key==="BLOCKLET_APP_LANGUAGES");return(k?k.value.split(","):["en","zh"]).filter(A=>kt.SUPPORTED_LANGUAGES[A]).reduce((A,$)=>(A[$]=kt.SUPPORTED_LANGUAGES[$].nativeName,A),{})},[c.environments]),f=I.useRef(()=>{}),d=or({isRoot:!0,type:gs,linkDisabled:!1,locale:$e,formState:Ge(vs),get localeList(){return ms(d.formState)}}),{handleSubmit:p,control:h,reset:g,setValue:m,clearErrors:y,formState:{errors:b}}=fh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Ie.NAVIGATION_I18N_FIELDS.forEach(k=>m(k,d.formState[k][d.locale]))},[m,d.locale]);const w=ph({control:h}),D=w.component,_=w.title,x=w.description,T=w.link,C=w.parent;I.useEffect(()=>{d.formState.title[d.locale]=_},[_]),I.useEffect(()=>{d.formState.description[d.locale]=x},[x]),I.useEffect(()=>{d.formState.link[d.locale]=T},[T]),I.useEffect(()=>{i?.(w)},[w,i]);const P=I.useMemo(()=>t.find(O=>D?n.find($=>$.name===D).did===O.id:O.id===C),[n,t,D,C]),R=I.useMemo(()=>{if(P?.component){const k=n.find(J=>J.name===P.component),{link:O}=k||{},A=Yt(O)?O[d.locale]:O;if(D)return Ra(A);const $=Yt(P.link)?P.link[d.locale]:P.link;return Ra(Ue(A,$||"/"))}return null},[n,d.locale,P,D]),E=I.useMemo(()=>{const{component:k}=P||{},O=n.find(J=>J.name===k),{navigation:A=[]}=O||{};return Ee.flattenNavigation(A,{transform(J,oe){return oe?.section&&(J.section=J.section||oe.section),J}}).filter(J=>J.link).filter(J=>Ee.isMatchSection(J.section,r)).map(J=>({label:J.link,title:J.title[s]||J.title}))},[P,n,r,s]),j=I.useCallback(()=>{d.isRoot=!0,d.locale=$e,d.type=gs,d.linkDisabled=!1,d.formState=Ge(vs),g(),y(),f.current=()=>{}},[y,g,d]),N=I.useCallback((k={})=>(d.localeList.length>0&&Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{Ch(d.formState[O]).length>1&&(k[O]=d.formState[O])}),Ro(k.role)&&(k.role=void 0),k),[d.localeList,d.formState]),U=I.useCallback(({parent:k}={},O=()=>{})=>{d.type="add",d.isRoot=!k,m("parent",k?.id),f.current=A=>{O(A)}},[m,d]),z=I.useCallback((k={},O=()=>{})=>{const{id:A,icon:$,parent:J,component:oe,role:de=[]}=k;m("id",A),m("icon",$),k.from==="team-tmpl"&&(d.linkDisabled=!0);const se=ms(k),me=(ve,ue)=>{sc(ve)?d.formState[ue]=se.reduce((be,fe)=>(be[fe]=ve,be),{[$e]:ve}):Yt(ve)?d.formState[ue]=Ge(ve):d.formState[ue]={}};Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>me(k[ve],ve)),Ie.NAVIGATION_I18N_FIELDS.forEach(ve=>m(ve,d.formState[ve][d.locale])),m("component",oe),m("parent",J),m("role",de||[]),d.type="edit",d.isRoot=!J,f.current=ve=>{const ue=pp(ve,["id","title","description","icon","component","link","role"]);O(ue)}},[m,d]);function G(k){const O=k?.trim();if(r!=="bottomNavigation"){if(!O)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(O.length>ps)return l("navigation.form.titleTooLong",{len:ps})}return!0}function W(k){const O=k?.trim();return O&&O.length>hs?l("navigation.form.descriptionTooLong",{len:hs}):!0}const V=ge(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k);async function Q(k){const O=k?.trim();if(O){if(Io(V(O)))return!0;try{await Co(O)}catch{return l("navigation.form.invalidIcon")}}return!0}function te(k){const O=k?.trim();return O?Q(O):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(k){const O=k?.trim();return O?Ee.checkLink(O)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=I.useCallback(k=>{d.locale=k,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]||(d.formState[O][k]="")}),setTimeout(()=>{y()})},[y,d]),q=I.useCallback(()=>{const{title:k,link:O}=d.formState;if(r!=="bottomNavigation")for(const A of Object.keys(k)){const $=G(k[A]);if($!==!0)return $}for(const A of Object.keys(O)){const $=X(O[A]);if($!==!0)return $}return!0},[r,d.formState]),re=I.useCallback(k=>{const O=q();O===!0?f.current(N(k)):xr.error(O)},[q,N]),F=I.useCallback(k=>{d.locale=$e,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O]=Dt(d.formState[O],k)}),i?.(w)},[d,w,i]),H=I.useCallback(k=>{d.locale=k,Ie.NAVIGATION_I18N_FIELDS.forEach(O=>{d.formState[O][k]=d.formState[O][$e]}),i?.(w),setTimeout(()=>{y()})},[y,d,w,i]);return I.useImperativeHandle(e,()=>({add:U,edit:z,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:p(re)}),[U,j,z,p,re]),v.jsxs(ie,{...o,children:[v.jsx(ad,{sx:{mb:1},onAdd:H,onChange:ee,onRemoveLocale:F,locale:d.locale,localeMap:u,locales:d.localeList}),v.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&v.jsx(rt,{name:"title",control:h,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})}),r==="bottomNavigation"?v.jsx(rt,{name:"icon",control:h,rules:{validate:te},render:({field:k})=>v.jsx(uo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,methods:["select"],iconifyShape:"url",...k})}):v.jsx(rt,{name:"icon",control:h,rules:{validate:Q},render:({field:k})=>v.jsx(uo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==$e,...k})}),d.isRoot&&v.jsx(rt,{name:"component",control:h,render:({field:k})=>v.jsx(Wi,{fullWidth:!0,margin:"dense",disabled:d.locale!==$e&&k.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Dt(k,"ref")})}),!d.isRoot&&["header"].includes(r)&&v.jsx(rt,{name:"description",control:h,rules:{validate:W},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...k})}),v.jsx(rt,{name:"link",control:h,rules:{validate:X},render:({field:k})=>v.jsx(lc,{fullWidth:!0,margin:"dense",children:v.jsx(mh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:O=>O.label,options:E,renderInput:O=>v.jsx(Ht,{...O,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?v.jsx(Bi,{position:"start",sx:{textDecoration:jy(T||"")?"line-through":""},children:R}):null}}}),renderOption:(O,A)=>v.jsxs(ie,{component:"li",...O,children:[A.label,v.jsx(Re,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:A.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(O,A)=>{k.onChange(A)}})})}),["dashboard","sessionManager"].includes(r)&&v.jsx(rt,{name:"role",control:h,render:({field:k})=>v.jsx(Wi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Dt(k,"ref")})}),r==="bottomNavigation"&&v.jsx(rt,{name:"title",control:h,rules:{validate:G},render:({field:k})=>v.jsx(Ht,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...k})})]})]})}Xo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array,onChange:S.func};function Zo({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Oe(),[o,{setTrue:a,setFalse:l}]=uh(),[s,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=I.useCallback(()=>{l(),u.current?.reset()},[l]),p=I.useCallback((g={},m=()=>{})=>{c("add"),u.current?.add(g,y=>m(d,y)),a()},[a,d]),h=I.useCallback((g={},m=()=>{})=>{c("edit"),u.current?.edit(g,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),v.jsx(hp,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:v.jsx(cc,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:v.jsx(Xo,{ref:u,section:r,components:n,rawNavigations:t})})}Zo.propTypes={ref:S.any,section:S.string,components:S.array,rawNavigations:S.array};function ud({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Oe(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(g){g.preventDefault(),g.stopPropagation()}const f=I.useCallback(g=>{u(g),r(o)},[r,o]),d=I.useCallback(g=>{u(g),n(o)},[n,o]),p=I.useCallback(g=>{u(g),t(o)},[t,o]),h=I.useCallback(g=>{u(g),i(o)},[i,o]);return v.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&v.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:v.jsx(ke,{size:"small",color:"success",onClick:f,disabled:c,children:v.jsx(ye,{icon:"mdi:plus-box-outline"})})}),v.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:v.jsx(ke,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:v.jsx(ye,{icon:"mdi:pencil-outline"})})}),v.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:v.jsx(ke,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?v.jsx(ye,{icon:"mdi:eye-off-outline"}):v.jsx(ye,{icon:"mdi:eye-outline"})})}),v.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:v.jsx(ke,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:v.jsx(ye,{icon:"mdi:delete"})})})]})}ud.propTypes={data:S.object.isRequired,className:S.string,add:S.func,edit:S.func,toggle:S.func,del:S.func,section:S.string};const Sn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Vy=e=>{const r={...e},n=e?.background;return typeof n=="string"?r.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(r.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),r},Ky=(e,r="en")=>{if(typeof e=="string"){if(rd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},Qt=(e,r="en")=>{if(!e?.length)return e;const n=(t,i)=>t&&typeof t=="object"?t[i]||t?.en||t?.zh:t;return At(e,t=>({...t,title:n(t.title,r),description:n(t.description,r),link:t.items?.length?t.link:Ky(t.link,r),_rawLink:t.link}),"items")},Yy=e=>At(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Jy=e=>{if(!e?.length)return null;const r=Yy(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return r.forEach(t=>{t.section?Array.isArray(t.section)?t.section.forEach(i=>{n[i]?.push(t)}):typeof t.section=="string"&&n[t.section]?.push(t):n.header.push(t)}),n},ea=e=>{if(!e)return null;const r={...e};return r.theme=Vy(r.theme),r.navigation=Jy(Qy(r.navigation)),r},Qy=(e=[])=>Jo(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),dd=(e,r)=>Jo(e,(n,t)=>{const i=!n.role||r&&(n.role.includes(r)||n.role.includes("guest"));return t.isLeaf?i:i&&t.filteredChildren?.length},"items"),Xy={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},Zy={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function eS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(g=>p.component===g.name);return{...p,component:h}}),s=Et(),c=I.useRef(null),u=or({open:!1}),f=ge((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:v.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[v.jsx(ke,{size:"medium",ref:c,children:v.jsx(ye,{icon:Xy,fontSize:n,style:{transform:"scale(1.08)"}})}),v.jsx(gp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>v.jsx(vp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:v.jsx(uc,{...p,timeout:350,children:v.jsxs(Dr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[v.jsx(mp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:l.map(h=>v.jsx(bp,{disablePadding:!0,children:v.jsxs(bh,{href:Da(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?v.jsx(ie,{component:"img",src:`${dc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):v.jsx(ye,{fontSize:50,icon:h.icon||Zy,color:s.palette.text.secondary}),v.jsx(Re,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Da(h.title,r)})]})},h.id))}),v.jsx(yp,{session:e,children:v.jsx(cc,{variant:"outlined",fullWidth:!0,href:Sp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const fd=S.shape({appLogo:S.node,appName:S.string,theme:S.shape({background:S.string}),enableConnect:S.bool,enableLocale:S.bool,navigation:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object]),icon:S.string,items:S.arrayOf(S.shape({title:S.oneOfType([S.string,S.object]),link:S.oneOfType([S.string,S.object])}))}))}),pd=S.shape({showText:S.bool,showRole:S.bool,switchDid:S.bool,switchProfile:S.bool,switchPassport:S.bool,disableLogout:S.bool,onLogin:S.func,onLogout:S.func,onSwitchDid:S.func,onSwitchProfile:S.func,onSwitchPassport:S.func,menu:S.array,menuRender:S.func,dark:S.bool,size:S.number}),tS=["admin","owner"],rS=e=>e.endsWith(".ip.abtnet.io"),nS=e=>e.endsWith(".did.abtnet.io"),iS={en:{guest:{title:"Notice: You are using a temporary domain",description:"You are accessing this site through a temporary domain. For a better experience, please contact the site administrator to configure a custom domain. Using a custom domain not only makes access more convenient but also ensures your access is more secure."},owner:{title:"Enhance Your Website Security",description:"Dear administrator, we recommend configuring your custom domain immediately, which will:",benefits1:"Automatically obtain HTTPS certificates to ensure secure data transmission",benefits2:"Create an exclusive brand image and increase website credibility",benefits3:"Get a shorter, more memorable access address",benefits4:"Provide visitors with a more professional experience",benefits5:"Domain configuration takes just minutes to complete, taking your website to the next level!"},skip:"Remind Me Later",bindDomain:"Configure Domain"},zh:{guest:{title:"温馨提示:当前使用的是临时域名",description:"您正在通过临时域名访问本站点。为了获得更好的访问体验,请联系站点管理员配置自定义域名。使用自定义域名不仅访问更便捷,还能确保您的访问更加安全。"},owner:{title:"提升网站安全性与专业度",description:"尊敬的管理员,我们建议您尽快配置自定义域名,这样可以:",benefits1:"自动获取 HTTPS 证书,确保数据传输安全",benefits2:"打造专属品牌形象,提升网站可信度",benefits3:"获得更简短、易记的访问地址",benefits4:"为访客提供更专业的访问体验",benefits5:"只需几分钟即可完成域名配置,全面提升您的网站品质!"},skip:"稍后提醒",bindDomain:"配置域名"}},oS=1e3*60*60*24*30,bs=".well-known/service/admin/domains";function hd({locale:e="en",session:r={}}){const n=r?.user,t=Tc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>oS}),a=ge((d,p={})=>fc(iS,d,e,"en",p)),l=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ue(window.location.origin,bs);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&tS.includes(n.role);return window.location.href.includes(bs)||t||!rS(l)&&!nS(l)?null:v.jsxs(xp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[v.jsxs(wp,{sx:{padding:"20px !important"},children:[v.jsx(Re,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),v.jsx(Re,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&v.jsx(ie,{component:"ul",children:s.map(d=>v.jsx(Re,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),v.jsxs(Cp,{sx:{px:"12px !important"},children:[v.jsx(Zt,{onClick:c,children:a("skip")}),f&&v.jsx(Zt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}hd.propTypes={locale:S.string,session:S.object};const Rt={};function aS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ue(r,dc,e);return new Ip.WsClient(n,{heartbeatIntervalMs:100*1e3})}function lS(e="admin"){return Rt[e]||(Rt[e]=aS(e)),Rt[e]}const sS=(e="admin")=>{const r=I.use(Fn),{session:n}=r??{};return!Rt[e]&&n.user&&(Rt[e]=lS(e),Rt[e].connect()),Rt[e]},cS={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g>'},uS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-3v4m0 3v.01"/>'},dS={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 0 9-9a9 9 0 0 0-9-9a9 9 0 0 0-9 9a9 9 0 0 0 9 9zM9 8l6 8m0-8l-6 8"/>'};function fS(){const e=Et();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=jn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const pS=e=>!Ro(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,hS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},gS=async(e,r)=>{try{return await yh.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},vS=async(e,r)=>{const{type:n,did:t}=e;return pc.isSameAddr(n,"did")?await gS(t,r)||wn.getLink(e):wn.getLink(e)},mS=async(e,r,n=!0)=>{const t=wn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof wn.Link){if(n){const o=await vS(i,r),{type:a,chainId:l,did:s}=i;return pc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},bS=e=>Rp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),yS={comment:(e,r)=>r&&r>1?v.jsxs(v.Fragment,{children:["left ",r," comments on your ",e]}):v.jsxs(v.Fragment,{children:["commented on your ",e]}),like:e=>v.jsxs(v.Fragment,{children:["liked your ",e]}),follow:()=>v.jsx(v.Fragment,{children:"followed you"}),tips:e=>v.jsxs(v.Fragment,{children:["gave tips to your ",e]}),mention:e=>v.jsxs(v.Fragment,{children:["mentioned you in ",e]}),assign:()=>v.jsx(v.Fragment,{children:"assigned you a task"})};function Wt({user:e,color:r=void 0}){const{palette:n}=Et(),t=Do(Ue(Ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return v.jsx(hc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Wt.displayName="UserLink";function SS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Et(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ge(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return v.jsx(Wt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return v.jsxs(v.Fragment,{children:[v.jsx(Wt,{user:m[0],color:c})," and ",v.jsx(Wt,{user:y,color:c})]});const b=f.length>3,w=b?f.slice(0,2):m;return v.jsxs(v.Fragment,{children:[w.map((D,_)=>v.jsxs(Z.Fragment,{children:[v.jsx(Wt,{user:D,color:c}),_<w.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:v.jsxs(v.Fragment,{children:[", and ",v.jsx(Wt,{user:y,color:c})]})]})}),p=ge(()=>{const m=a?yS[a]:null;return m?m(s,r.length):null}),h=Me(()=>{const m=d(),y=p();return!m||!y?null:v.jsxs(v.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),g=Me(()=>{if(!e)return null;const m=hS(e);return m?.targetLink?Ue(i,m.targetLink):null},[e,i]);return!a||Ro(l)?null:v.jsxs(v.Fragment,{children:[h," ",g&&v.jsx(hc,{href:g,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const xS={normal:Ta,success:cS,info:Ta,warning:uS,error:dS},wS=ar(_p)`
44
44
  font-size: 20px;
45
45
  `,CS=ar.div`
46
46
  display: flex;
@@ -1,4 +1,4 @@
1
- import{aG as x1,j as u,r as i,bn as It,aQ as T1,O as Re,H as ue,a2 as O1,b as Ht,a0 as xt,fb as Pe,f as Tt,F as v1,cq as Ot,b9 as je,iE as vt,m as le,cr as Lt,fM as Ut,iF as L1,y as R,fg as U1,gC as F1,a4 as Ft,by as xe,dn as kt,N as V,L as ge,iG as Rt,aV as k1,dF as R1,aO as ae,dd as P1,z as Ce,az as Pt,gw as j1,iH as N1,gu as M1,iI as V1,hA as K1,iJ as jt,iK as J1,iL as Z1,iM as G1,iN as Nt,iO as _1,iP as Q1,hi as X1,iQ as z1,cE as F,iR as Mt,iS as Y1,iw as q1,iT as W1,iU as Ne,fZ as $1,iV as e6,iW as t6,iX as n6,hj as r6,gP as s6,f5 as i6,dB as a6,T as se,$ as o6,D as c6,t as u6,v as Ge,C as l6,iY as _e,w as d6,hb as p6,dH as f6,gk as h6,a5 as C6,Y as Me,o as J,J as Qe,x as m6,ax as y6,al as E6}from"./index-D2dk65xX.js";import{v as Xe}from"./index-efuh0Sux.js";import{f as g6}from"./index-BojVbZw0.js";import{b as A6,c as S6,d as D6}from"./spaces-Ds86J12r.js";import{u as Ve}from"./blocklet-CSWEnHbv.js";import{D as w6}from"./DeleteOutline-D00EO6C8.js";import{O as Vt}from"./OpenInNew-53sNi7bT.js";import{x as B6}from"./index-DRYJ0xIl.js";import{H as b6}from"./HelpOutline-B7Ct-krn.js";import"./api-CNS9XStH.js";const I6=x1(u.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function H6(){const[e,r]=i.useState(null),{blocklet:n}=Ve();return i.useEffect(()=>{r(A6(n))},[n]),{storageEndpoint:e}}const Kt=i.createContext({}),{Provider:x6,Consumer:Hn}=Kt;function T6({children:e}){const[r,n]=i.useState(!1),[s,o]=i.useState(null),{blocklet:a,actions:{refreshBlocklet:f}}=Ve(),{storageEndpoint:l}=H6(),{api:d}=It();T1(async()=>{try{if(n(!0),Re(l)){o(null);return}const C=await S6(l);o(C)}catch(C){console.error(C),ue.error(C.message)}finally{n(!1)}},[l]);const h=()=>{o(null),f()},c=async C=>{o(C),await p(C.endpoint),f()},p=async C=>{await d.configBlocklet({input:{did:[a.meta.did],configs:[{key:Ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),f()};i.useEffect(()=>{async function C(){if(!s)return;const E=await D6(s.endpoint,s.name),A=O1(s,{name:E});o(A)}C()},[]);const m=!!(l&&s);return u.jsx(x6,{value:{loading:r,spaceGateway:s,deleteSpaceGateway:h,updateSpaceGateway:c,storageEndpoint:l,settingStorageEndpoint:p,hasStorageEndpoint:m},children:e})}T6.propTypes={children:xt.node.isRequired};function O6(){return i.useContext(Kt)}const Ae=Pe({});function v6({key:e}={key:"md"}){const r=Tt();return v1(r.breakpoints.down(e))}var U=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(U||{}),Jt=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Jt||{}),G=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(G||{});function L6({endpoint:e,deps:r=[]}){return Ot(async()=>{if(!je(e))return;const{headers:n}=await Ae.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,a,f,l,d,h,c,p,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(c===void 0||p===void 0){const E=a&&f&&l;return{version:d,name:C,subscriptionId:o,ownerDid:h||"",isAvailable:E,errorCode:E?0:U.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:d,name:C,subscriptionId:o,ownerDid:h,isAvailable:c==="true",errorCode:parseInt(p,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(r),onError(n){console.error(n)}})}const U6=vt.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
1
+ import{aG as x1,j as u,r as i,bn as It,aQ as T1,O as Re,H as ue,a2 as O1,b as Ht,a0 as xt,fb as Pe,f as Tt,F as v1,cq as Ot,b9 as je,iF as vt,m as le,cr as Lt,fM as Ut,iG as L1,y as R,fg as U1,gC as F1,a4 as Ft,by as xe,dn as kt,N as V,L as ge,iH as Rt,aV as k1,dF as R1,aO as ae,dd as P1,z as Ce,az as Pt,gw as j1,iI as N1,gu as M1,iJ as V1,hB as K1,iK as jt,iL as J1,iM as Z1,iN as G1,iO as Nt,iP as _1,iQ as Q1,hj as X1,iR as z1,cE as F,iS as Mt,iT as Y1,ix as q1,iU as W1,iV as Ne,fZ as $1,iW as e6,iX as t6,iY as n6,hk as r6,gQ as s6,f5 as i6,dB as a6,T as se,$ as o6,D as c6,t as u6,v as Ge,C as l6,iZ as _e,w as d6,hc as p6,dH as f6,gk as h6,a5 as C6,Y as Me,o as J,J as Qe,x as m6,ax as y6,al as E6}from"./index-CqD2fBUt.js";import{v as Xe}from"./index-BZaAN-VG.js";import{f as g6}from"./index-BojVbZw0.js";import{b as A6,c as S6,d as D6}from"./spaces-DrkRFkPj.js";import{u as Ve}from"./blocklet-CXBJcwmD.js";import{D as w6}from"./DeleteOutline-0Pjk0X04.js";import{O as Vt}from"./OpenInNew-zVEoRj2W.js";import{x as B6}from"./index-DRYJ0xIl.js";import{H as b6}from"./HelpOutline-CNZGWmTU.js";import"./api-C4QD0LkR.js";const I6=x1(u.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function H6(){const[e,r]=i.useState(null),{blocklet:n}=Ve();return i.useEffect(()=>{r(A6(n))},[n]),{storageEndpoint:e}}const Kt=i.createContext({}),{Provider:x6,Consumer:Hn}=Kt;function T6({children:e}){const[r,n]=i.useState(!1),[s,o]=i.useState(null),{blocklet:a,actions:{refreshBlocklet:f}}=Ve(),{storageEndpoint:l}=H6(),{api:d}=It();T1(async()=>{try{if(n(!0),Re(l)){o(null);return}const C=await S6(l);o(C)}catch(C){console.error(C),ue.error(C.message)}finally{n(!1)}},[l]);const h=()=>{o(null),f()},c=async C=>{o(C),await p(C.endpoint),f()},p=async C=>{await d.configBlocklet({input:{did:[a.meta.did],configs:[{key:Ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:C}]}}),f()};i.useEffect(()=>{async function C(){if(!s)return;const E=await D6(s.endpoint,s.name),A=O1(s,{name:E});o(A)}C()},[]);const m=!!(l&&s);return u.jsx(x6,{value:{loading:r,spaceGateway:s,deleteSpaceGateway:h,updateSpaceGateway:c,storageEndpoint:l,settingStorageEndpoint:p,hasStorageEndpoint:m},children:e})}T6.propTypes={children:xt.node.isRequired};function O6(){return i.useContext(Kt)}const Ae=Pe({});function v6({key:e}={key:"md"}){const r=Tt();return v1(r.breakpoints.down(e))}var U=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(U||{}),Jt=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Jt||{}),G=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(G||{});function L6({endpoint:e,deps:r=[]}){return Ot(async()=>{if(!je(e))return;const{headers:n}=await Ae.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,a,f,l,d,h,c,p,m]=[n["x-space-name"],n["x-subscription-id"],n["x-listable"]==="true",n["x-readable"]==="true",n["x-writeable"]==="true",n["x-space-version"],n["x-space-owner-did"],n["x-space-is-available"],n["x-error-code"],n["x-is-site-admin"]],C=s?decodeURIComponent(s):"";if(c===void 0||p===void 0){const E=a&&f&&l;return{version:d,name:C,subscriptionId:o,ownerDid:h||"",isAvailable:E,errorCode:E?0:U.UNAUTHORIZED,isSiteAdmin:m==="true"}}return{version:d,name:C,subscriptionId:o,ownerDid:h,isAvailable:c==="true",errorCode:parseInt(p,10),isSiteAdmin:m==="true"}},{refreshDeps:[e].concat(r),onError(n){console.error(n)}})}const U6=vt.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
2
2
  1. Please contact the DID Space administrator to verify the relevant configuration.
3
3
  2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
4
4
  If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),F6=vt.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
@@ -1,4 +1,4 @@
1
- import{m as et}from"./index-CFj27rKT.js";import"./index-D2dk65xX.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-BTLRRIeH.js";import"./index-CqD2fBUt.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license