@abtnode/webapp 1.17.8-beta-20260108-021819-e099f0ca → 1.17.8-beta-20260108-120904-21cb5fb6

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 (191) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-Chnfr9fe.js → AdapterDayjs-CtD5my-S.js} +1 -1
  4. package/dist/assets/{Add-b-MNk7UB.js → Add-CVe35B9U.js} +1 -1
  5. package/dist/assets/ArrowDropDown-59b471Ns.js +1 -0
  6. package/dist/assets/{Autocomplete-79tADtg2.js → Autocomplete-CZdtlRmS.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-Cqjt-kp8.js → Breadcrumbs-DOWk4s-Q.js} +1 -1
  8. package/dist/assets/{ButtonGroup-C_JbniJW.js → ButtonGroup-83J5hh2q.js} +1 -1
  9. package/dist/assets/{CSSTransition-DinXVMZy.js → CSSTransition-Dmpq-B51.js} +1 -1
  10. package/dist/assets/{CallMerge-CF5jo3Pw.js → CallMerge-CZNqia3S.js} +1 -1
  11. package/dist/assets/{CardContent-CYNmFsYJ.js → CardContent-DXDn75TD.js} +1 -1
  12. package/dist/assets/{ChevronLeft-Byy2_Dj8.js → ChevronLeft-B8v-crqw.js} +1 -1
  13. package/dist/assets/{ChevronRight-BKFXnJ7g.js → ChevronRight-DIxNh4jH.js} +1 -1
  14. package/dist/assets/{Clear-Chg9fOPG.js → Clear-kzRbvP4u.js} +1 -1
  15. package/dist/assets/{Delete-B306vkSB.js → Delete-Cw_Z_UMc.js} +1 -1
  16. package/dist/assets/{DeleteOutline-BjSm7PCr.js → DeleteOutline-D2i9YJBS.js} +1 -1
  17. package/dist/assets/{Done-Bh0vP7e6.js → Done-CmV6TZSG.js} +1 -1
  18. package/dist/assets/{Edit-DFmlgA7E.js → Edit-DDUKSYdb.js} +1 -1
  19. package/dist/assets/{EditOutlined-Qskj3-tY.js → EditOutlined-MUSbzQj_.js} +1 -1
  20. package/dist/assets/{ErrorOutline-CjKNiJFO.js → ErrorOutline-jxA-S5AH.js} +1 -1
  21. package/dist/assets/{FilterList-Dphn1UXx.js → FilterList-B8T7rkYs.js} +1 -1
  22. package/dist/assets/{Google-C0G3l0jL.js → Google-Bg8SlDZS.js} +1 -1
  23. package/dist/assets/{HelpOutline--A0maMxb.js → HelpOutline-BOrIHXkQ.js} +1 -1
  24. package/dist/assets/{KeyboardArrowDown-CD6n37Y9.js → KeyboardArrowDown-CE7zJDcv.js} +1 -1
  25. package/dist/assets/{Launch-Cor8d4pT.js → Launch-BHeCrhBj.js} +1 -1
  26. package/dist/assets/{Link-Mg5UlAaZ.js → Link-C39j8j-1.js} +1 -1
  27. package/dist/assets/{ListItemButton-C8XIzvy_.js → ListItemButton-DLzzgnWj.js} +1 -1
  28. package/dist/assets/{ListSubheader-CHT01bOG.js → ListSubheader-BgTycqrg.js} +1 -1
  29. package/dist/assets/{LoadingButton-DtnAWL1w.js → LoadingButton-OiBPqmL8.js} +1 -1
  30. package/dist/assets/{MoreVert-KNjOpSoE.js → MoreVert-DJQ3tC1s.js} +1 -1
  31. package/dist/assets/{OpenInNew-DGDd5qxt.js → OpenInNew-awII5Ys1.js} +1 -1
  32. package/dist/assets/{Refresh-B0_3c6OW.js → Refresh-BpllOjUS.js} +1 -1
  33. package/dist/assets/{Replay-BzP784vV.js → Replay-CMmg_T4k.js} +1 -1
  34. package/dist/assets/{Search-CUoYhy1v.js → Search-DobdZczv.js} +1 -1
  35. package/dist/assets/{Stepper-DfUO9buC.js → Stepper-DJ4LlLol.js} +1 -1
  36. package/dist/assets/{TableSearch-DxZYknBa.js → TableSearch-NL7mGzF6.js} +1 -1
  37. package/dist/assets/{ToggleButtonGroup-BwLu2zCu.js → ToggleButtonGroup-1ZqP29sD.js} +1 -1
  38. package/dist/assets/{UnfoldMore-DvSw9pGy.js → UnfoldMore-BNE7Q7I9.js} +1 -1
  39. package/dist/assets/{Verified-CfonAx-G.js → Verified-pVnWh8ct.js} +1 -1
  40. package/dist/assets/{VerifiedUser-wCwGdsz1.js → VerifiedUser-Bq5EjyL0.js} +1 -1
  41. package/dist/assets/{ViewList-DhdvL6AT.js → ViewList-DikGBOob.js} +1 -1
  42. package/dist/assets/{_createAggregator-BLxu5C4t.js → _createAggregator-xAuoCETp.js} +1 -1
  43. package/dist/assets/{actions-Wo9kGXdj.js → actions-BHqqnvHK.js} +1 -1
  44. package/dist/assets/{actions-D1YtdqKL.js → actions-QNxlOGpH.js} +1 -1
  45. package/dist/assets/{agreement-07HiBYSX.js → agreement-D-rCiZRR.js} +1 -1
  46. package/dist/assets/api-ZR56mSDv.js +1 -0
  47. package/dist/assets/{appearance-CKF7Bo6h.js → appearance-CL4dIHJL.js} +1 -1
  48. package/dist/assets/{audit-logs-CLt2l7-q.js → audit-logs-BHIFDkts.js} +1 -1
  49. package/dist/assets/{base-chart-_0APPWGp.js → base-chart-CbniXo_r.js} +1 -1
  50. package/dist/assets/{blocklet-ClPWX-SV.js → blocklet-e4asDkfP.js} +1 -1
  51. package/dist/assets/{chain-Bg9mny_E.js → chain-CADjEEjt.js} +1 -1
  52. package/dist/assets/{click-to-copy-BbJJzGI1.js → click-to-copy-D5SbepAS.js} +1 -1
  53. package/dist/assets/cloneDeep-ChH4oif_.js +1 -0
  54. package/dist/assets/{config-navigation-B-CtKO70.js → config-navigation-ySXIDWww.js} +3 -3
  55. package/dist/assets/{connect-2JDWTFDP.js → connect-CdvuGCCf.js} +1 -1
  56. package/dist/assets/{connect-to-CBEHT895.js → connect-to-98MGJ7Yl.js} +1 -1
  57. package/dist/assets/{cssMode-U7KzpQEJ.js → cssMode-C_dsdlzf.js} +1 -1
  58. package/dist/assets/{delete-confirm-Cx4JPY2I.js → delete-confirm-Dk2gUSc_.js} +1 -1
  59. package/dist/assets/depsEqual-D1oKMHHx.js +1 -0
  60. package/dist/assets/{detail-Cgws9Fjd.js → detail-BSLJegmW.js} +3 -3
  61. package/dist/assets/{domains-BJzrDugH.js → domains-DgPIevHh.js} +1 -1
  62. package/dist/assets/{download-Df1TrhTI.js → download-DjUrRSaE.js} +1 -1
  63. package/dist/assets/{edit.svg-833vjqGH.js → edit.svg-BGFHNdYl.js} +1 -1
  64. package/dist/assets/emotion-cache.browser.esm-CO4m2LjK.js +1 -0
  65. package/dist/assets/engine-AOyfq5pg.js +1 -0
  66. package/dist/assets/{freemarker2-J5nZkQuM.js → freemarker2-Ynl3hbRt.js} +1 -1
  67. package/dist/assets/{get-safe-url-QppwE77w.js → get-safe-url-D0pcxgUJ.js} +1 -1
  68. package/dist/assets/getValidReactChildren-BrnINUbd.js +1 -0
  69. package/dist/assets/{graphqlMode-5yY_akok.js → graphqlMode-D3ZzOvwh.js} +2 -2
  70. package/dist/assets/{handlebars-DfBT6Rl2.js → handlebars-BXtXOFnU.js} +1 -1
  71. package/dist/assets/{html-BBpT31Z8.js → html-68WkZj1H.js} +1 -1
  72. package/dist/assets/{html-title-BpNgi7iw.js → html-title-CT8s_pnR.js} +1 -1
  73. package/dist/assets/{htmlMode-CDF4YwlA.js → htmlMode-D6dQwFeL.js} +1 -1
  74. package/dist/assets/{iframe-CH8rbppJ.js → iframe-BzTEh7qO.js} +1 -1
  75. package/dist/assets/{index-jHF3D4cy.js → index-AoP-pJu3.js} +1 -1
  76. package/dist/assets/{index-B8qqbKQt.js → index-B-25u8Uu.js} +1 -1
  77. package/dist/assets/index-B1_4iuGC.js +782 -0
  78. package/dist/assets/{index-tNmk7CjJ.js → index-BAYzgNzt.js} +1 -1
  79. package/dist/assets/{index-BdVOugOI.js → index-BFzkIx2h.js} +1 -1
  80. package/dist/assets/index-BQ9Dluv4.js +1 -0
  81. package/dist/assets/{index-B3tcK3_z.js → index-BTw_aopw.js} +14 -14
  82. package/dist/assets/{index-Dr7VuVvC.js → index-BV0mjh6r.js} +1 -1
  83. package/dist/assets/{index-DSjaZAu3.js → index-BaJk36L1.js} +1 -1
  84. package/dist/assets/{index-BJVvRV0h.js → index-BazbEWXv.js} +1 -1
  85. package/dist/assets/{index-CsTd8Q4H.js → index-Bd2vWvMu.js} +1 -1
  86. package/dist/assets/{index-CbnvHmOA.js → index-Bmj3JRL8.js} +1 -1
  87. package/dist/assets/{index-DCHzmqFc.js → index-BspQeR3D.js} +1 -1
  88. package/dist/assets/{index-CKWS_NIP.js → index-Bwnzqjf1.js} +1 -1
  89. package/dist/assets/{index-B4fcaU-r.js → index-CB1i_uf2.js} +1 -1
  90. package/dist/assets/{index-DqkfLKvE.js → index-CIjzdo65.js} +1 -1
  91. package/dist/assets/{index-CDd3s2GI.js → index-CVfXb0nN.js} +1 -1
  92. package/dist/assets/{index-CaxsY_au.js → index-CmbSgUyL.js} +3 -3
  93. package/dist/assets/{index-BikUP_wv.js → index-Cmvy-qPR.js} +1 -1
  94. package/dist/assets/{index-BVJB29cJ.js → index-Cp8XtCdH.js} +1 -1
  95. package/dist/assets/{index-BSBkhGl0.js → index-Cq78KErH.js} +1 -1
  96. package/dist/assets/{index-WHQs_PkC.js → index-Cy488fNr.js} +1 -1
  97. package/dist/assets/{index-B6x6Mq9n.js → index-D2bmvDtL.js} +1 -1
  98. package/dist/assets/{index-Crqqt-AN.js → index-D33KlJUT.js} +1 -1
  99. package/dist/assets/{index-3MwDYHdN.js → index-DA7EVQ4v.js} +9 -9
  100. package/dist/assets/{index-DXfP6ckA.js → index-DDI8UY6T.js} +2 -2
  101. package/dist/assets/{index-BBe9oV9e.js → index-DLJTQrAL.js} +1 -1
  102. package/dist/assets/{index-Bek3Nxot.js → index-DQhyMeoV.js} +3 -3
  103. package/dist/assets/{index-D_L4A5jU.js → index-DVXDeiLF.js} +1 -1
  104. package/dist/assets/{index-m8sITmne.js → index-DXHVn7yq.js} +1 -1
  105. package/dist/assets/{index-BbND9whL.js → index-Da8PZ-lu.js} +1 -1
  106. package/dist/assets/{index-iqFfmV_z.js → index-DfDHgwS-.js} +1 -1
  107. package/dist/assets/{index-BqrWLXQw.js → index-Dpw7fQUd.js} +3 -3
  108. package/dist/assets/{index-DrsAyGr6.js → index-DuNah4NO.js} +1 -1
  109. package/dist/assets/{index-BHQcEGDq.js → index-DvMdH51T.js} +1 -1
  110. package/dist/assets/{index-CBHMH4Z7.js → index-DxFY8dMO.js} +1 -1
  111. package/dist/assets/{index-cZdqepfp.js → index-Dz1ZwZ8x.js} +1 -1
  112. package/dist/assets/{index-0NOALS_P.js → index-Fir5RRo8.js} +1 -1
  113. package/dist/assets/{index-FdUIQyuT.js → index-Fr0im6-l.js} +1 -1
  114. package/dist/assets/{index-DJfXtT-f.js → index-Jt9YjCeK.js} +1 -1
  115. package/dist/assets/{index-CHgpIuFF.js → index-Ltxc7YUP.js} +1 -1
  116. package/dist/assets/{index-BfTQCMKf.js → index-LvA6paIR.js} +1 -1
  117. package/dist/assets/{index-CbK68mel.js → index-ZuJcpT1T.js} +1 -1
  118. package/dist/assets/{index-BfnrUUfH.js → index-bAcW8HYF.js} +1 -1
  119. package/dist/assets/{index-BRSm_uSW.js → index-teas2Eib.js} +3 -3
  120. package/dist/assets/{index-CZX-K9Eg.js → index-yR3ovHMI.js} +1 -1
  121. package/dist/assets/{index.esm-WZ7Avw4n.js → index.esm-CL88L2RD.js} +1 -1
  122. package/dist/assets/{install-from-url-PuHPLadE.js → install-from-url-C9wGB_q1.js} +1 -1
  123. package/dist/assets/{invitation-Bi2QgUpB.js → invitation-DBHFAKTZ.js} +1 -1
  124. package/dist/assets/{is-path-prefix-equal-BAfeJQQq.js → is-path-prefix-equal-Df12gAPj.js} +1 -1
  125. package/dist/assets/{item-hbtsGcq0.js → item-D4OgvExU.js} +1 -1
  126. package/dist/assets/{javascript-CH6uPFyX.js → javascript-CY8tPfqG.js} +1 -1
  127. package/dist/assets/{jsonMode-B3mvgwT0.js → jsonMode-B1lllzUE.js} +1 -1
  128. package/dist/assets/{liquid-BoDus-ho.js → liquid-gpD4GU-k.js} +1 -1
  129. package/dist/assets/{list-header-C3SJDsfy.js → list-header-CjwjgfKp.js} +1 -1
  130. package/dist/assets/{lock.svg-CGmlgpmU.js → lock.svg-BmAm_LJl.js} +1 -1
  131. package/dist/assets/{log-D4BWVj7G.js → log-9z7r8Lwt.js} +1 -1
  132. package/dist/assets/{lottie-react.esm-ayFZjR4e.js → lottie-react.esm-C8kqAAU9.js} +1 -1
  133. package/dist/assets/{mdx-C33wkq6H.js → mdx-BwNO0Air.js} +1 -1
  134. package/dist/assets/{memory-lh5QZ4zg.js → memory-DO3ZqhrY.js} +1 -1
  135. package/dist/assets/{metric-chc-qmc8.js → metric-BcTiOrOk.js} +1 -1
  136. package/dist/assets/omit-jBEByUQC.js +1 -0
  137. package/dist/assets/{overview-DL-GP40o.js → overview-CikmJX9H.js} +1 -1
  138. package/dist/assets/{permission-D09K4EY6.js → permission-D1opDJhT.js} +1 -1
  139. package/dist/assets/{preference-iiwdIYk6.js → preference-Cs7lm-MF.js} +3 -3
  140. package/dist/assets/{provider-icon-Dm9XYo2I.js → provider-icon-CFKcu3V6.js} +1 -1
  141. package/dist/assets/{python-D_lYYAX1.js → python-CNXRlmYQ.js} +1 -1
  142. package/dist/assets/{raf-schd.esm-Bo9SYHL8.js → raf-schd.esm-D0EagQlv.js} +1 -1
  143. package/dist/assets/{razor-dpsmZHh4.js → razor-eMpDpC4X.js} +1 -1
  144. package/dist/assets/{rotate-session-key-Bfdv46s3.js → rotate-session-key-BiL0Bo_O.js} +1 -1
  145. package/dist/assets/{runtime-BUcScDcM.js → runtime-DUYT_SiT.js} +1 -1
  146. package/dist/assets/schema-iTOku2t8.js +1 -0
  147. package/dist/assets/sdk-B0lvz_Iz.js +1 -0
  148. package/dist/assets/{service-DCzLPjA3.js → service-BTdtH483.js} +1 -1
  149. package/dist/assets/{shorten-label-CN9pEyom.js → shorten-label-BNzeaF4J.js} +1 -1
  150. package/dist/assets/{simple-select-DxwJpURO.js → simple-select-BhAfKrhv.js} +1 -1
  151. package/dist/assets/{spaces-BrB8zqzV.js → spaces-OwZlXUZ4.js} +1 -1
  152. package/dist/assets/{status-BZx_J-ps.js → status-D6WlCP08.js} +1 -1
  153. package/dist/assets/{status-B-GGRrEB.js → status-cEVhL_8t.js} +1 -1
  154. package/dist/assets/{switch-control-X9WA2UjB.js → switch-control-DfH5Tjol.js} +1 -1
  155. package/dist/assets/{table-icons-Xs4hP9Pw.js → table-icons-CDTf0wL3.js} +1 -1
  156. package/dist/assets/{team-B9jB42uy.js → team-BGXKsY22.js} +1 -1
  157. package/dist/assets/{toLower-DwWNsNMJ.js → toLower-CSOmIMZJ.js} +1 -1
  158. package/dist/assets/toUpper-DnO1VFxi.js +1 -0
  159. package/dist/assets/{traffic-C_4zWOQM.js → traffic-DvCEQ5xd.js} +1 -1
  160. package/dist/assets/{tsMode-57DuREfP.js → tsMode-Let-Q8zu.js} +1 -1
  161. package/dist/assets/{typescript-BJp2b_J1.js → typescript-DyjM7FW9.js} +1 -1
  162. package/dist/assets/{url-evaluation-DetQFE_e.js → url-evaluation-Bukt7_Lj.js} +1 -1
  163. package/dist/assets/{url-join-rRKl4Ear.js → url-join-xsOaQKQ2.js} +1 -1
  164. package/dist/assets/{use-mobile-DOhPXmq7.js → use-mobile-BIQUR7Fz.js} +1 -1
  165. package/dist/assets/{use-mobile-BDRFDg8j.js → use-mobile-CFNU7YUg.js} +1 -1
  166. package/dist/assets/{useAsync-B59MJoKM.js → useAsync-tWL_hrVo.js} +1 -1
  167. package/dist/assets/{useAsyncRetry-CGp0YSlH.js → useAsyncRetry-CUFV5zTA.js} +1 -1
  168. package/dist/assets/{useLocalStorage-Dpl2DibN.js → useLocalStorage-MLO2O-Eu.js} +1 -1
  169. package/dist/assets/{useThemeProps-BS48y1B2.js → useThemeProps-C4X8Xuf-.js} +1 -1
  170. package/dist/assets/{util-DgOs7OwT.js → util-Byl4XHzq.js} +1 -1
  171. package/dist/assets/{wait-container-CxHAyAQN.js → wait-container-80uXorh3.js} +1 -1
  172. package/dist/assets/{without-wallet-qfmn1VhQ.js → without-wallet-U6nu7HMX.js} +1 -1
  173. package/dist/assets/wrap-locale-pkCcV7CX.js +1 -0
  174. package/dist/assets/{xml-BZRt8HAs.js → xml-CtKLgaY7.js} +1 -1
  175. package/dist/assets/{yaml-0X7rH3i7.js → yaml-CMyMNgnc.js} +1 -1
  176. package/dist/index.html +1 -1
  177. package/package.json +1 -1
  178. package/dist/assets/ArrowDropDown-lsZjWbH5.js +0 -1
  179. package/dist/assets/api-eF9wxSJp.js +0 -1
  180. package/dist/assets/cloneDeep-DNOsGRuG.js +0 -1
  181. package/dist/assets/depsEqual-Cvglsxh5.js +0 -1
  182. package/dist/assets/emotion-cache.browser.esm-Epiq9rij.js +0 -1
  183. package/dist/assets/engine-a9f8P0CB.js +0 -1
  184. package/dist/assets/getValidReactChildren-Cjo-LFyx.js +0 -1
  185. package/dist/assets/index-B31H3tAk.js +0 -1
  186. package/dist/assets/index-HqyXcG7M.js +0 -602
  187. package/dist/assets/omit-C11lcOpj.js +0 -1
  188. package/dist/assets/schema-DidDB4o0.js +0 -1
  189. package/dist/assets/sdk-l1r4MOQ_.js +0 -1
  190. package/dist/assets/toUpper-DXK6zXOf.js +0 -1
  191. package/dist/assets/wrap-locale-D8IL6u8L.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CaxsY_au.js","./index-Bek3Nxot.js","./index-DUrTVFR9.css","./url-join-rRKl4Ear.js","./index-BdVOugOI.js","./_createAggregator-BLxu5C4t.js","./depsEqual-Cvglsxh5.js","./index-cZdqepfp.js","./index-DRYJ0xIl.js","./toUpper-DXK6zXOf.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{c0 as fp,b$ as pp,r as C,c1 as hp,fS as gp,j as g,b8 as Qe,c3 as ct,c4 as vp,iy as mp,iz as bp,ho as yp,ev as xp,iA as Sp,ew as wp,bQ as xc,bR as Cp,bO as Ip,bP as Rp,bT as Sc,ez as Qn,iB as Tp,fD as _p,eH as Dp,iC as Pp,hK as kp,eG as Op,hH as wc,iD as Ep,hs as Np,gm as Mp,fE as Ap,i2 as Lp,V as Ee,a3 as rt,y as Re,aP as Bt,c7 as At,i as zp,d_ as jp,aH as be,b as $e,fN as Fp,d$ as Bp,ey as _r,fz as br,di as Cc,eD as $p,iE as Gp,eC as Ic,bd as Xn,eO as or,iF as F,fZ as K,fG as Wp,iG as Qr,be as X,o as x,eM as Zn,aQ as zo,iH as jo,cA as rr,aD as ye,J as re,ag as Hp,F as oe,b9 as Fo,eE as Qt,T as de,a4 as je,b1 as Zi,bA as Ct,iI as Up,bn as Rc,E as Xr,iJ as qp,iK as Vp,t as ut,gk as Nn,P as Kp,br as Xe,eg as Tc,C as _c,bJ as Yp,iL as eo,N as Bo,g8 as Jp,g5 as Dc,H as Mt,Q as Pc,$ as kc,v as Mn,iM as Oc,f as ot,eL as Qp,by as Xp,hy as Ec,eJ as Nr,a7 as Zp,a8 as eh,iN as $a,iO as Nc,iP as th,iQ as rh,dt as ei,gb as nh,h1 as ih,h2 as oh,dn as ti,bD as Te,eh as ah,h_ as sh,e1 as lh,hD as ch,iR as An,iS as Mc,hk as Ac,L as Lc,z as ri,iT as Ga,iU as zc,iV as to,iW as uh,iX as dh,s as dr,iY as fh,g4 as ph,cz as jc,iZ as hh,bG as gh,i_ as vh,dv as et,D as mh,Y as bh,cv as yh,i$ as xh,a$ as Sh,bg as Wa,U as Ln,a9 as Ha,j0 as wh,j1 as Ch,j2 as Ih,dE as Rh,j3 as Fc,j4 as Th,aB as Bc,f$ as $c,j5 as $o,j6 as _h,ib as Gc,j7 as Dh,b5 as Ph,cE as Xt,j8 as kh,j9 as Wc,ek as Cn,M as Oh,av as zn,dz as Eh,bz as Nh,cy as Go,ja as Mh,hB as Ah,jb as Hc,aV as Lh,jc as zh,cU as jh,jd as Fh,d3 as Bh,G as Ua,fH as qa,eN as $h,a5 as Uc,Z as Va,je as Ka,R as Gh,S as Ya}from"./index-Bek3Nxot.js";import{r as Wh}from"./omit-C11lcOpj.js";import{r as Hh}from"./cloneDeep-DNOsGRuG.js";import{r as Uh}from"./index-BdVOugOI.js";import{c as qh,u as Vh}from"./_createAggregator-BLxu5C4t.js";import{u as $t}from"./blocklet-ClPWX-SV.js";import{H as Kh,G as Yh,M as Jh,N as Qh,O as Ja,K as Xh,L as Zh}from"./index-CsTd8Q4H.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as eg,f as qc,u as fe,g as ae,r as $r,w as jn,h as Vc,i as Gt,j as Kc,k as tg,l as rg,o as ro}from"./raf-schd.esm-Bo9SYHL8.js";import{_ as A,b as Qa,c as ng,a as ig,d as og}from"./redux-DfszZyTl.js";import{_ as ag}from"./typeof-QjJsDpFa.js";import{u as Yc,b as sg}from"./team-B9jB42uy.js";import{b as lg}from"./actions-Wo9kGXdj.js";import{u as cg,a as ug,C as pt}from"./index.esm-WZ7Avw4n.js";import{S as no}from"./simple-select-DxwJpURO.js";import{b as dg,a as Xa,T as fg}from"./html-title-BpNgi7iw.js";import{C as Jc}from"./Clear-Chg9fOPG.js";import{A as pg}from"./ArrowDropDown-lsZjWbH5.js";import{a as hg}from"./api-eF9wxSJp.js";import{A as gg}from"./Autocomplete-79tADtg2.js";import{L as vg}from"./ListItemButton-C8XIzvy_.js";import{u as Qc}from"./use-mobile-BDRFDg8j.js";import{u as mg}from"./index-CbnvHmOA.js";import{d as bg}from"./KeyboardArrowDown-CD6n37Y9.js";import{S as yg}from"./Search-CUoYhy1v.js";import{A as xg}from"./Add-b-MNk7UB.js";import{O as Sg}from"./OpenInNew-DGDd5qxt.js";import{t as wg}from"./index-DSjaZAu3.js";import{I as Cg}from"./iframe-CH8rbppJ.js";import{B as bi}from"./ButtonGroup-C_JbniJW.js";import{L as Za}from"./LoadingButton-DtnAWL1w.js";import"./depsEqual-Cvglsxh5.js";import"./url-evaluation-DetQFE_e.js";import"./useLocalStorage-Dpl2DibN.js";import"./MoreVert-KNjOpSoE.js";import"./DeleteOutline-BjSm7PCr.js";import"./get-safe-url-QppwE77w.js";import"./permission-D09K4EY6.js";import"./ListSubheader-CHT01bOG.js";import"./getValidReactChildren-Cjo-LFyx.js";function Ig(e){return fp("MuiListItemAvatar",e)}pp("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Rg=e=>{const{alignItems:r,classes:n}=e;return vp({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Ig,n)},Tg=Qe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),es=C.forwardRef(function(r,n){const t=hp({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(gp),s={...t,alignItems:a.alignItems},l=Rg(s);return g.jsx(Tg,{className:ct(l.root,i),ownerState:s,ref:n,...o})});var _g=mp(function(){return bp?sessionStorage:void 0});function Dg(e,r){return yp(r,function(n){return e[n]})}function Pg(e){return e==null?[]:Dg(e,xp(e))}var kg=Sp.isFinite;function ts(e){return typeof e=="number"&&kg(e)}function Og(e){return typeof e=="number"&&e==wp(e)}var Eg=qh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Ng=Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"}));var Mg=xc(function(e){var r=Cp(e);return r=typeof r=="function"?r:void 0,Ip(Rp(e,1,Sc,!0),void 0,r)});const Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Mg},Symbol.toStringTag,{value:"Module"}));var Xc=xc(function(e,r){return Sc(e)?lg(e,r):[]}),yr={};const Lg=Qn(Ag),zg=Qn(Tp),jg=Qn(Ng);var rs;function Fg(){return rs||(rs=1,function(e){var r=yr&&yr.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=D,e.isMatchSection=S,e.nestNavigationList=Q,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=_p(),t=Dp(),i=r(Lg),o=r(Pp),a=r(kp),s=r(zg),l=r(Op),c=r(Wh),u=r(Hh),d=Lp(),f=r(Uh()),p=r(wc()),h=r(Ep),v=r(Np),m=r(jg),y=Mp(),b=Ap();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const I="header",_="/",P="/",w="/";function D(G,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:pe=0}={}){Array.isArray(V)?V.forEach((me,Ce)=>{j(me,{index:Ce,parent:se,level:pe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:pe}),j(V[k],{parent:V,level:pe}),N==="last"&&W(V,se,{index:te,level:pe}))}j(G)}function S(G,W){return W===I&&(0,s.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function T(G){try{return JSON.parse(G)}catch{return G}}function R(G){return G.map(W=>{const k={...W};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 O(G="/",W=""){if((0,p.default)(W||""))return W;const k=f.default.join(G,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L(G,W,{strict:k=!0}={}){let N=G,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M(G,W){const k=(0,u.default)(G);return D(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H(G=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)(G),j=[];return D(N,(V,te,{level:se})=>{if(se>=W){const{items:pe=[]}=V;if(pe&&Array.isArray(pe)&&pe.length>0){delete V.items;const me=pe.map(Ce=>k(Ce,V));if(te)te.items.push(...me);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...me)}}else if(se===1){const me=k((0,c.default)(V,["items"]),te);j.push(me)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B(G={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:pe={}}=j,me=(0,u.default)(pe?.navigation||[]);(0,y.hasStartEngine)(pe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...me);const Ce=V.name||"",Se=V.mountPoint||_,Pe=j===G?"":pe.name||"",Fe=j===G?"":j.mountPoint||_;for(const ke of se){if(!(0,y.hasStartEngine)(ke.meta))continue;const he=ke.meta.name,xe=ke.mountPoint,dt=[Ce,Pe,he].filter(Boolean).join("."),mr=ke.meta.navigation||[],mi=(0,d.joinURL)(Se,Fe,xe);ke.meta?.capabilities?.navigation!==!1&&W.push({did:ke.meta.did,name:dt,link:mi,title:ke.meta.title||"",navigation:mr.map(Ke=>({section:I,...Ke}))});const ft=me.find(Ke=>Ke.component?Ke.component===he:!1);if(ft){if(!ft.link)if(ke.meta.navigation&&ke.meta.navigation.length>0){const Ke=k(ke,{mountPoint:Fe,name:Pe});Ke.length>0&&(ft.items=ft.items??[],ft.items.push(...Ke))}else ft.link=P}else if(ke.meta?.capabilities?.navigation!==!1){const Ke=k(ke,{mountPoint:Fe,name:Pe}),un={title:ke.meta.title,component:he,id:ke.meta.did};Ke.length>0?(un.items=Ke,un.link=void 0):un.link=P,te.push(un)}}return te}return{navigationList:k(G),components:W}}function $(G){const W=(0,u.default)(G).filter(k=>k.id);return D(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U(G,W=2){const k=(0,u.default)(G),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[I],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return D(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(pe=>pe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J(G,W){return W&&Array.isArray(G.items)?G.items.filter(k=>(0,s.default)(k.section)?S(G.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee(G){const W=(0,u.default)(G),k=[];for(const N of W){let te=function(se,pe){const me=J(se,pe);V.push({...j,section:pe,items:me})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((me,Ce)=>{const{section:Se=[I]}=Ce||{};return me.push(...Se),me},[]),pe=[...new Set(se)];for(const me of pe)te(N,me)}else V.push({...N,section:I});k.push(...V)}return k}function Q(G=[]){const W=(0,u.default)(G);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z(G,W=[]){const k=Q(G);return D(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q(G){return G.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ne=G=>{const[W,k]=(0,m.default)(G,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=ne;const ie=G=>{const[,W]=(0,m.default)(G,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ie;function ue(G={},W={}){const{beforeProcess:k=he=>he}=W,{navigationList:N,components:j}=B(G),V=new Map;N.forEach(he=>{he.items?.forEach(xe=>{V.set((0,d.joinURL)(he.id,xe.id),xe)})});const te=(0,l.default)(G,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(he=>!(he.from==="team-tmpl"&&se.includes(he?.parent))).map(he=>{if(he.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(he,"private")){const xe=V.get(he.id);xe&&Object.prototype.hasOwnProperty.call(xe,"private")&&(he.private=xe.private)}return!te&&he.section==="userCenter"&&he.id==="/userCenter/orgs"?null:he}).filter(Boolean):G.settings.navigations=[]);const pe=R(ie(G?.settings?.navigations||[])).map(E),me=U(k(N)),Ce=$(me),Pe=ee(Ce).reduce((he,xe)=>["bottom","social","sessionManager","userCenter"].includes(xe.section)&&xe.items&&xe.items.length>0?(he.push(...xe.items.map(mr=>{const{section:mi}=xe,ft=L(xe.link,mr.link),Ke=[xe.component,mr.component].filter(Boolean).join(".");return{...mr,section:mi,link:ft,component:Ke,parent:""}})),he):(he.push(xe),he),[]),Fe=H(Pe,{transform(he,xe){let{component:dt}=he;return xe?.component&&(dt=[xe.component,he.component].filter(Boolean).join(".")),E({...he,component:dt})}});return{navigationList:(0,i.default)(pe,Fe,(he,xe)=>{const dt=["id","section"];return(0,o.default)((0,a.default)(he,dt),(0,a.default)(xe,dt))}),components:j,builtinList:Fe}}}(yr)),yr}var Ae=Fg();const Zc=C.createContext(null),ns="/",Bg="header",is={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function yi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const at=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),os=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),$g=(e,r)=>{const n=Ae.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===$e.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===$e.NAV_GROUP_SERVICES)===-1&&n.unshift(os($e.NAV_GROUP_SERVICES,e("navigation.services"),[at("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),at("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),at("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),at("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),at("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),at("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===$e.NAV_GROUP_SYSTEM)===-1&&n.unshift(os($e.NAV_GROUP_SYSTEM,e("navigation.system"),[at("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),at("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),at("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function as({name:e}){return g.jsx(Fp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Gg({children:e}){const{blocklet:r,actions:n}=$t(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ae.parseNavigation(r,{beforeProcess(w){const D=rt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(is,S)&&is[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!D.some(O=>O.id===T.id)&&D.push(T)})}),$g(t,D)}}),s=Bt({rawNavigation:rt(i),activeSection:Bg,components:o}),l=C.useMemo(()=>Ae.sortRootNavigation(Ae.nestNavigationList(rt(s.rawNavigation))),[s.rawNavigation]),c=C.useMemo(()=>{const w=Ae.filterNavigation(rt(s.rawNavigation),o);return Ae.joinLink(w,o)},[o,s.rawNavigation]),u=C.useCallback(w=>{if(!w.id)return"";const D=Ae.flattenNavigation(Ae.joinLink(l,o)),S=D.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(as,{name:S.component})}else if(S.parent){const T=D.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(as,{name:T.component})}return S?.link},[l,o]),d=C.useCallback(w=>{s.activeSection=w},[s]),f=C.useCallback(w=>{const D=[];Ae.deepWalk(w,(T,R)=>{const O={...At(T,["children","expand"]),parent:R?.id};D.push(O)});const S=rt(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=D.find(O=>yi(O,T));return R?!Ae.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...D]},[s]),p=C.useCallback((w=[])=>{const D=rt(s.rawNavigation).map(S=>{const T=w.find(R=>yi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=D},[s]),h=C.useCallback((w,D=ns)=>w.map(T=>{const O=o.find(H=>H.name===T.component)?.link||D,L=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(L,M||ns),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:O}}),[o,u]),v=C.useCallback(w=>{p([w])},[p]),m=C.useCallback(w=>{const D=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=rt(s.rawNavigation).filter(S=>!D.includes(S.id))},[s]),y=C.useCallback((w={},D=-1)=>{const S={...w,id:zp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(O=>O.section===s.activeSection);if(D<0||D>R.length-1)T.push(S);else{const O=R[D],L=T.findIndex(M=>yi(M,O));T.splice(L,0,S)}return s.rawNavigation=T,S},[s]),b=C.useCallback(w=>{const S=rt(l).filter(T=>Ae.isMatchSection(T.section,w));return h(S)},[l,h]),I=C.useCallback(async w=>{const S=w.map(T=>jp(T,Bp)).map(T=>{const R={...T};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(S)},[n]),_=C.useCallback(async w=>{if(w){const D=a.filter(T=>Ae.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ae.isMatchSection(T.section,w));await I(S),s.rawNavigation=[...S,...D]}else await I([]),s.rawNavigation=rt(a)},[I,s,a]),P=C.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:f,getNavigation:b,saveNavigationList:I,resetNavigation:_}),[s,c,o,u,d,v,m,y,f,b,I,_]);return g.jsx(Zc.Provider,{value:P,children:e})}function eu(){const e=C.useContext(Zc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ze={},xi,ss;function Wg(){if(ss)return xi;ss=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,s=parseInt,l=typeof _r=="object"&&_r&&_r.Object===Object&&_r,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,D,S){var T,R,O,L,M,H,E=0,B=!1,$=!1,U=!0;if(typeof w!="function")throw new TypeError(e);D=P(D)||0,b(S)&&(B=!!S.leading,$="maxWait"in S,O=$?p(P(S.maxWait)||0,D):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=T,N=R;return T=R=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,D),B?J(W):L}function Q(W){var k=W-H,N=W-E,j=D-k;return $?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=D||k<0||$&&N>=O}function q(){var W=v();if(Z(W))return ne(W);M=setTimeout(q,Q(W))}function ne(W){return M=void 0,U&&T?J(W):(T=R=void 0,L)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function ue(){return M===void 0?L:ne(v())}function G(){var W=v(),k=Z(W);if(T=arguments,R=this,H=W,k){if(M===void 0)return ee(H);if($)return M=setTimeout(q,D),J(H)}return M===void 0&&(M=setTimeout(q,D)),L}return G.cancel=ie,G.flush=ue,G}function y(w,D,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,D,{leading:T,maxWait:D,trailing:R})}function b(w){var D=typeof w;return!!w&&(D=="object"||D=="function")}function I(w){return!!w&&typeof w=="object"}function _(w){return typeof w=="symbol"||I(w)&&f.call(w)==n}function P(w){if(typeof w=="number")return w;if(_(w))return r;if(b(w)){var D=typeof w.valueOf=="function"?w.valueOf():w;w=b(D)?D+"":D}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return xi=y,xi}var xr={exports:{}},kt={exports:{}},Hg=kt.exports,ls;function Ug(){return ls||(ls=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?kt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(kt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(kt.exports=function(){return Date.now()-n},n=Date.now()):(kt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Hg)),kt.exports}var cs;function qg(){if(cs)return xr.exports;cs=1;for(var e=Ug(),r=typeof window>"u"?_r: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 s=0,l=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-s));s=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:d,cancelled:!1}),l},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return xr.exports=function(d){return i.call(r,d)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},xr.exports}var dn={},us;function Vg(){if(us)return dn;us=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return dn}var Ht={},ds;function Kg(){if(ds)return Ht;ds=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.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 Ht}var fs;function Yg(){if(fs)return Ze;fs=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.createHorizontalStrength=T,Ze.createVerticalStrength=R,Ze.createScrollingComponent=M,Ze.default=H,Ze.defaultVerticalStrength=Ze.defaultHorizontalStrength=void 0;var e=u(Cc()),r=c(Ic()),n=$p(),t=c(Wg()),i=c(qg()),o=c(Vg()),a=Kh,s=c(Gp()),l=Kg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};U.get||U.set?Object.defineProperty(B,$,U):B[$]=E[$]}}return B.default=E,B}function d(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function($){return typeof $}:d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},d(E)}function f(){return f=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var U in $)Object.prototype.hasOwnProperty.call($,U)&&(E[U]=$[U])}return E},f.apply(this,arguments)}function p(E,B){if(E==null)return{};var $=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&($[U]=E[U])}return $}function h(E,B){if(E==null)return{};var $={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&($[J]=E[J]);return $}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var $=0;$<B.length;$++){var U=B[$];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,$){return B&&m(E.prototype,B),E}function b(E,B){return B&&(d(B)==="object"||typeof B=="function")?B:w(E)}function I(E){return I=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},I(E)}function _(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function D(E,B,$){return B in E?Object.defineProperty(E,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):E[B]=$,E}var S=150;function T(E){return function($,U){var J=$.x,ee=$.w,Q=$.y,Z=$.h,q=Math.min(ee/2,E),ne=U.x>=J&&U.x<=J+ee,ie=ne&&U.y>=Q&&U.y<=Q+Z;if(ie){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function R(E){return function($,U){var J=$.y,ee=$.h,Q=$.x,Z=$.w,q=Math.min(ee/2,E),ne=U.y>=J&&U.y<=J+ee,ie=ne&&U.x>=Q&&U.x<=Q+Z;if(ie){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=T(S);Ze.defaultHorizontalStrength=O;var L=R(S);Ze.defaultVerticalStrength=L;function M(E){var B=function($){_(U,$);function U(J,ee){var Q;return v(this,U),Q=b(this,I(U).call(this,J,ee)),D(w(w(Q)),"updateScrolling",(0,t.default)(function(Z){var q=Q.container.getBoundingClientRect(),ne=q.left,ie=q.top,ue=q.width,G=q.height,W={x:ne,y:ie,w:ue,h:G},k=(0,l.getCoords)(Z),N=Q.props,j=N.horizontalStrength,V=N.verticalStrength;Q.scaleX=j(W,k),Q.scaleY=V(W,k),!Q.frame&&(Q.scaleX||Q.scaleY)&&Q.startScrolling()},100,{trailing:!1})),D(w(w(Q)),"handleEvent",function(Z){Q.dragging&&!Q.attached&&(Q.attach(),Q.updateScrolling(Z))}),Q.wrappedInstance=e.default.createRef(),Q.scaleX=0,Q.scaleY=0,Q.frame=null,Q.attached=!1,Q.dragging=!1,Q}return y(U,[{key:"componentDidMount",value:function(){var ee=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 Q=this.props.dragDropManager;this.clearMonitorSubscription=Q.getMonitor().subscribeToStateChange(function(){return ee.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 ee=this.props.dragDropManager,Q=ee.getMonitor().isDragging();!this.dragging&&Q?this.dragging=!0:this.dragging&&!Q&&(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 ee=this,Q=0,Z=function q(){var ne=ee.scaleX,ie=ee.scaleY,ue=ee.container,G=ee.props,W=G.strengthMultiplier,k=G.onScrollChange;if(W===0||ne+ie===0){ee.stopScrolling();return}if(Q+=1,Q%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,pe=ue.clientHeight,me=ne?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+ne*W):N,Ce=ie?ue.scrollTop=(0,l.intBetween)(0,te-pe,j+ie*W):j;k(me,Ce)}ee.frame=(0,i.default)(q)};Z()}},{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 ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var Q=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,f({ref:this.wrappedInstance},Q))}}]),U}(e.Component);return D(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),D(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,f({},$,{dragDropManager:J}))})}}return Ze}var In=Yg();const Jg=Xn(In);var Qg=Yh();const ps=Xn(Qg);function tu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ru(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function nu(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}}tu.__suppressDeprecationWarning=!0;ru.__suppressDeprecationWarning=!0;nu.__suppressDeprecationWarning=!0;function Zr(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-CmbSgUyL.js","./index-DQhyMeoV.js","./index-DUrTVFR9.css","./url-join-xsOaQKQ2.js","./index-BFzkIx2h.js","./_createAggregator-xAuoCETp.js","./depsEqual-D1oKMHHx.js","./index-Dz1ZwZ8x.js","./index-DRYJ0xIl.js","./toUpper-DnO1VFxi.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{c0 as fp,b$ as pp,r as C,c1 as hp,fS as gp,j as g,b8 as Qe,c3 as ct,c4 as vp,iy as mp,iz as bp,ho as yp,ev as xp,iA as Sp,ew as wp,bQ as xc,bR as Cp,bO as Ip,bP as Rp,bT as Sc,ez as Qn,iB as Tp,fD as _p,eH as Dp,iC as Pp,hK as kp,eG as Op,hH as wc,iD as Ep,hs as Np,gm as Mp,fE as Ap,i2 as Lp,V as Ee,a3 as rt,y as Re,aP as Bt,c7 as At,i as zp,d_ as jp,aH as be,b as $e,fN as Fp,d$ as Bp,ey as _r,fz as br,di as Cc,eD as $p,iE as Gp,eC as Ic,bd as Xn,eO as or,iF as F,fZ as K,fG as Wp,iG as Qr,be as X,o as x,eM as Zn,aQ as zo,iH as jo,cA as rr,aD as ye,J as re,ag as Hp,F as oe,b9 as Fo,eE as Qt,T as de,a4 as je,b1 as Zi,bA as Ct,iI as Up,bn as Rc,E as Xr,iJ as qp,iK as Vp,t as ut,gk as Nn,P as Kp,br as Xe,eg as Tc,C as _c,bJ as Yp,iL as eo,N as Bo,g8 as Jp,g5 as Dc,H as Mt,Q as Pc,$ as kc,v as Mn,iM as Oc,f as ot,eL as Qp,by as Xp,hy as Ec,eJ as Nr,a7 as Zp,a8 as eh,iN as $a,iO as Nc,iP as th,iQ as rh,dt as ei,gb as nh,h1 as ih,h2 as oh,dn as ti,bD as Te,eh as ah,h_ as sh,e1 as lh,hD as ch,iR as An,iS as Mc,hk as Ac,L as Lc,z as ri,iT as Ga,iU as zc,iV as to,iW as uh,iX as dh,s as dr,iY as fh,g4 as ph,cz as jc,iZ as hh,bG as gh,i_ as vh,dv as et,D as mh,Y as bh,cv as yh,i$ as xh,a$ as Sh,bg as Wa,U as Ln,a9 as Ha,j0 as wh,j1 as Ch,j2 as Ih,dE as Rh,j3 as Fc,j4 as Th,aB as Bc,f$ as $c,j5 as $o,j6 as _h,ib as Gc,j7 as Dh,b5 as Ph,cE as Xt,j8 as kh,j9 as Wc,ek as Cn,M as Oh,av as zn,dz as Eh,bz as Nh,cy as Go,ja as Mh,hB as Ah,jb as Hc,aV as Lh,jc as zh,cU as jh,jd as Fh,d3 as Bh,G as Ua,fH as qa,eN as $h,a5 as Uc,Z as Va,je as Ka,R as Gh,S as Ya}from"./index-DQhyMeoV.js";import{r as Wh}from"./omit-jBEByUQC.js";import{r as Hh}from"./cloneDeep-ChH4oif_.js";import{r as Uh}from"./index-BFzkIx2h.js";import{c as qh,u as Vh}from"./_createAggregator-xAuoCETp.js";import{u as $t}from"./blocklet-e4asDkfP.js";import{H as Kh,G as Yh,M as Jh,N as Qh,O as Ja,K as Xh,L as Zh}from"./index-Bd2vWvMu.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as eg,f as qc,u as fe,g as ae,r as $r,w as jn,h as Vc,i as Gt,j as Kc,k as tg,l as rg,o as ro}from"./raf-schd.esm-D0EagQlv.js";import{_ as A,b as Qa,c as ng,a as ig,d as og}from"./redux-DfszZyTl.js";import{_ as ag}from"./typeof-QjJsDpFa.js";import{u as Yc,b as sg}from"./team-BGXKsY22.js";import{b as lg}from"./actions-BHqqnvHK.js";import{u as cg,a as ug,C as pt}from"./index.esm-CL88L2RD.js";import{S as no}from"./simple-select-BhAfKrhv.js";import{b as dg,a as Xa,T as fg}from"./html-title-CT8s_pnR.js";import{C as Jc}from"./Clear-kzRbvP4u.js";import{A as pg}from"./ArrowDropDown-59b471Ns.js";import{a as hg}from"./api-ZR56mSDv.js";import{A as gg}from"./Autocomplete-CZdtlRmS.js";import{L as vg}from"./ListItemButton-DLzzgnWj.js";import{u as Qc}from"./use-mobile-CFNU7YUg.js";import{u as mg}from"./index-Bmj3JRL8.js";import{d as bg}from"./KeyboardArrowDown-CE7zJDcv.js";import{S as yg}from"./Search-DobdZczv.js";import{A as xg}from"./Add-CVe35B9U.js";import{O as Sg}from"./OpenInNew-awII5Ys1.js";import{t as wg}from"./index-BaJk36L1.js";import{I as Cg}from"./iframe-BzTEh7qO.js";import{B as bi}from"./ButtonGroup-83J5hh2q.js";import{L as Za}from"./LoadingButton-OiBPqmL8.js";import"./depsEqual-D1oKMHHx.js";import"./url-evaluation-Bukt7_Lj.js";import"./useLocalStorage-MLO2O-Eu.js";import"./MoreVert-DJQ3tC1s.js";import"./DeleteOutline-D2i9YJBS.js";import"./get-safe-url-D0pcxgUJ.js";import"./permission-D1opDJhT.js";import"./ListSubheader-BgTycqrg.js";import"./getValidReactChildren-BrnINUbd.js";function Ig(e){return fp("MuiListItemAvatar",e)}pp("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Rg=e=>{const{alignItems:r,classes:n}=e;return vp({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Ig,n)},Tg=Qe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),es=C.forwardRef(function(r,n){const t=hp({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(gp),s={...t,alignItems:a.alignItems},l=Rg(s);return g.jsx(Tg,{className:ct(l.root,i),ownerState:s,ref:n,...o})});var _g=mp(function(){return bp?sessionStorage:void 0});function Dg(e,r){return yp(r,function(n){return e[n]})}function Pg(e){return e==null?[]:Dg(e,xp(e))}var kg=Sp.isFinite;function ts(e){return typeof e=="number"&&kg(e)}function Og(e){return typeof e=="number"&&e==wp(e)}var Eg=qh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const Ng=Object.freeze(Object.defineProperty({__proto__:null,default:Eg},Symbol.toStringTag,{value:"Module"}));var Mg=xc(function(e){var r=Cp(e);return r=typeof r=="function"?r:void 0,Ip(Rp(e,1,Sc,!0),void 0,r)});const Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Mg},Symbol.toStringTag,{value:"Module"}));var Xc=xc(function(e,r){return Sc(e)?lg(e,r):[]}),yr={};const Lg=Qn(Ag),zg=Qn(Tp),jg=Qn(Ng);var rs;function Fg(){return rs||(rs=1,function(e){var r=yr&&yr.__importDefault||function(G){return G&&G.__esModule?G:{default:G}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=D,e.isMatchSection=S,e.nestNavigationList=Q,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=_p(),t=Dp(),i=r(Lg),o=r(Pp),a=r(kp),s=r(zg),l=r(Op),c=r(Wh),u=r(Hh),d=Lp(),f=r(Uh()),p=r(wc()),h=r(Ep),v=r(Np),m=r(jg),y=Mp(),b=Ap();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const I="header",_="/",P="/",w="/";function D(G,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:pe=0}={}){Array.isArray(V)?V.forEach((me,Ce)=>{j(me,{index:Ce,parent:se,level:pe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:pe}),j(V[k],{parent:V,level:pe}),N==="last"&&W(V,se,{index:te,level:pe}))}j(G)}function S(G,W){return W===I&&(0,s.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function T(G){try{return JSON.parse(G)}catch{return G}}function R(G){return G.map(W=>{const k={...W};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 O(G="/",W=""){if((0,p.default)(W||""))return W;const k=f.default.join(G,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L(G,W,{strict:k=!0}={}){let N=G,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M(G,W){const k=(0,u.default)(G);return D(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H(G=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)(G),j=[];return D(N,(V,te,{level:se})=>{if(se>=W){const{items:pe=[]}=V;if(pe&&Array.isArray(pe)&&pe.length>0){delete V.items;const me=pe.map(Ce=>k(Ce,V));if(te)te.items.push(...me);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...me)}}else if(se===1){const me=k((0,c.default)(V,["items"]),te);j.push(me)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B(G={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:pe={}}=j,me=(0,u.default)(pe?.navigation||[]);(0,y.hasStartEngine)(pe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...me);const Ce=V.name||"",Se=V.mountPoint||_,Pe=j===G?"":pe.name||"",Fe=j===G?"":j.mountPoint||_;for(const ke of se){if(!(0,y.hasStartEngine)(ke.meta))continue;const he=ke.meta.name,xe=ke.mountPoint,dt=[Ce,Pe,he].filter(Boolean).join("."),mr=ke.meta.navigation||[],mi=(0,d.joinURL)(Se,Fe,xe);ke.meta?.capabilities?.navigation!==!1&&W.push({did:ke.meta.did,name:dt,link:mi,title:ke.meta.title||"",navigation:mr.map(Ke=>({section:I,...Ke}))});const ft=me.find(Ke=>Ke.component?Ke.component===he:!1);if(ft){if(!ft.link)if(ke.meta.navigation&&ke.meta.navigation.length>0){const Ke=k(ke,{mountPoint:Fe,name:Pe});Ke.length>0&&(ft.items=ft.items??[],ft.items.push(...Ke))}else ft.link=P}else if(ke.meta?.capabilities?.navigation!==!1){const Ke=k(ke,{mountPoint:Fe,name:Pe}),un={title:ke.meta.title,component:he,id:ke.meta.did};Ke.length>0?(un.items=Ke,un.link=void 0):un.link=P,te.push(un)}}return te}return{navigationList:k(G),components:W}}function $(G){const W=(0,u.default)(G).filter(k=>k.id);return D(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U(G,W=2){const k=(0,u.default)(G),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[I],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return D(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(pe=>pe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J(G,W){return W&&Array.isArray(G.items)?G.items.filter(k=>(0,s.default)(k.section)?S(G.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee(G){const W=(0,u.default)(G),k=[];for(const N of W){let te=function(se,pe){const me=J(se,pe);V.push({...j,section:pe,items:me})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((me,Ce)=>{const{section:Se=[I]}=Ce||{};return me.push(...Se),me},[]),pe=[...new Set(se)];for(const me of pe)te(N,me)}else V.push({...N,section:I});k.push(...V)}return k}function Q(G=[]){const W=(0,u.default)(G);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z(G,W=[]){const k=Q(G);return D(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q(G){return G.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ne=G=>{const[W,k]=(0,m.default)(G,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=ne;const ie=G=>{const[,W]=(0,m.default)(G,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ie;function ue(G={},W={}){const{beforeProcess:k=he=>he}=W,{navigationList:N,components:j}=B(G),V=new Map;N.forEach(he=>{he.items?.forEach(xe=>{V.set((0,d.joinURL)(he.id,xe.id),xe)})});const te=(0,l.default)(G,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(he=>!(he.from==="team-tmpl"&&se.includes(he?.parent))).map(he=>{if(he.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(he,"private")){const xe=V.get(he.id);xe&&Object.prototype.hasOwnProperty.call(xe,"private")&&(he.private=xe.private)}return!te&&he.section==="userCenter"&&he.id==="/userCenter/orgs"?null:he}).filter(Boolean):G.settings.navigations=[]);const pe=R(ie(G?.settings?.navigations||[])).map(E),me=U(k(N)),Ce=$(me),Pe=ee(Ce).reduce((he,xe)=>["bottom","social","sessionManager","userCenter"].includes(xe.section)&&xe.items&&xe.items.length>0?(he.push(...xe.items.map(mr=>{const{section:mi}=xe,ft=L(xe.link,mr.link),Ke=[xe.component,mr.component].filter(Boolean).join(".");return{...mr,section:mi,link:ft,component:Ke,parent:""}})),he):(he.push(xe),he),[]),Fe=H(Pe,{transform(he,xe){let{component:dt}=he;return xe?.component&&(dt=[xe.component,he.component].filter(Boolean).join(".")),E({...he,component:dt})}});return{navigationList:(0,i.default)(pe,Fe,(he,xe)=>{const dt=["id","section"];return(0,o.default)((0,a.default)(he,dt),(0,a.default)(xe,dt))}),components:j,builtinList:Fe}}}(yr)),yr}var Ae=Fg();const Zc=C.createContext(null),ns="/",Bg="header",is={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function yi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const at=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),os=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),$g=(e,r)=>{const n=Ae.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===$e.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===$e.NAV_GROUP_SERVICES)===-1&&n.unshift(os($e.NAV_GROUP_SERVICES,e("navigation.services"),[at("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),at("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),at("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),at("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),at("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),at("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===$e.NAV_GROUP_SYSTEM)===-1&&n.unshift(os($e.NAV_GROUP_SYSTEM,e("navigation.system"),[at("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),at("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),at("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function as({name:e}){return g.jsx(Fp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Gg({children:e}){const{blocklet:r,actions:n}=$t(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=Ae.parseNavigation(r,{beforeProcess(w){const D=rt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(is,S)&&is[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!D.some(O=>O.id===T.id)&&D.push(T)})}),$g(t,D)}}),s=Bt({rawNavigation:rt(i),activeSection:Bg,components:o}),l=C.useMemo(()=>Ae.sortRootNavigation(Ae.nestNavigationList(rt(s.rawNavigation))),[s.rawNavigation]),c=C.useMemo(()=>{const w=Ae.filterNavigation(rt(s.rawNavigation),o);return Ae.joinLink(w,o)},[o,s.rawNavigation]),u=C.useCallback(w=>{if(!w.id)return"";const D=Ae.flattenNavigation(Ae.joinLink(l,o)),S=D.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(as,{name:S.component})}else if(S.parent){const T=D.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(as,{name:T.component})}return S?.link},[l,o]),d=C.useCallback(w=>{s.activeSection=w},[s]),f=C.useCallback(w=>{const D=[];Ae.deepWalk(w,(T,R)=>{const O={...At(T,["children","expand"]),parent:R?.id};D.push(O)});const S=rt(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=D.find(O=>yi(O,T));return R?!Ae.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,...D]},[s]),p=C.useCallback((w=[])=>{const D=rt(s.rawNavigation).map(S=>{const T=w.find(R=>yi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=D},[s]),h=C.useCallback((w,D=ns)=>w.map(T=>{const O=o.find(H=>H.name===T.component)?.link||D,L=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:h(L,M||ns),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:O}}),[o,u]),v=C.useCallback(w=>{p([w])},[p]),m=C.useCallback(w=>{const D=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=rt(s.rawNavigation).filter(S=>!D.includes(S.id))},[s]),y=C.useCallback((w={},D=-1)=>{const S={...w,id:zp.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(O=>O.section===s.activeSection);if(D<0||D>R.length-1)T.push(S);else{const O=R[D],L=T.findIndex(M=>yi(M,O));T.splice(L,0,S)}return s.rawNavigation=T,S},[s]),b=C.useCallback(w=>{const S=rt(l).filter(T=>Ae.isMatchSection(T.section,w));return h(S)},[l,h]),I=C.useCallback(async w=>{const S=w.map(T=>jp(T,Bp)).map(T=>{const R={...T};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(S)},[n]),_=C.useCallback(async w=>{if(w){const D=a.filter(T=>Ae.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ae.isMatchSection(T.section,w));await I(S),s.rawNavigation=[...S,...D]}else await I([]),s.rawNavigation=rt(a)},[I,s,a]),P=C.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:d,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:f,getNavigation:b,saveNavigationList:I,resetNavigation:_}),[s,c,o,u,d,v,m,y,f,b,I,_]);return g.jsx(Zc.Provider,{value:P,children:e})}function eu(){const e=C.useContext(Zc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ze={},xi,ss;function Wg(){if(ss)return xi;ss=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,s=parseInt,l=typeof _r=="object"&&_r&&_r.Object===Object&&_r,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),d=Object.prototype,f=d.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,D,S){var T,R,O,L,M,H,E=0,B=!1,$=!1,U=!0;if(typeof w!="function")throw new TypeError(e);D=P(D)||0,b(S)&&(B=!!S.leading,$="maxWait"in S,O=$?p(P(S.maxWait)||0,D):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=T,N=R;return T=R=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,D),B?J(W):L}function Q(W){var k=W-H,N=W-E,j=D-k;return $?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=D||k<0||$&&N>=O}function q(){var W=v();if(Z(W))return ne(W);M=setTimeout(q,Q(W))}function ne(W){return M=void 0,U&&T?J(W):(T=R=void 0,L)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function ue(){return M===void 0?L:ne(v())}function G(){var W=v(),k=Z(W);if(T=arguments,R=this,H=W,k){if(M===void 0)return ee(H);if($)return M=setTimeout(q,D),J(H)}return M===void 0&&(M=setTimeout(q,D)),L}return G.cancel=ie,G.flush=ue,G}function y(w,D,S){var T=!0,R=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(T="leading"in S?!!S.leading:T,R="trailing"in S?!!S.trailing:R),m(w,D,{leading:T,maxWait:D,trailing:R})}function b(w){var D=typeof w;return!!w&&(D=="object"||D=="function")}function I(w){return!!w&&typeof w=="object"}function _(w){return typeof w=="symbol"||I(w)&&f.call(w)==n}function P(w){if(typeof w=="number")return w;if(_(w))return r;if(b(w)){var D=typeof w.valueOf=="function"?w.valueOf():w;w=b(D)?D+"":D}if(typeof w!="string")return w===0?w:+w;w=w.replace(t,"");var S=o.test(w);return S||a.test(w)?s(w.slice(2),S?2:8):i.test(w)?r:+w}return xi=y,xi}var xr={exports:{}},kt={exports:{}},Hg=kt.exports,ls;function Ug(){return ls||(ls=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?kt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(kt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(kt.exports=function(){return Date.now()-n},n=Date.now()):(kt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Hg)),kt.exports}var cs;function qg(){if(cs)return xr.exports;cs=1;for(var e=Ug(),r=typeof window>"u"?_r: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 s=0,l=0,c=[],u=1e3/60;i=function(d){if(c.length===0){var f=e(),p=Math.max(0,u-(f-s));s=p+f,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:d,cancelled:!1}),l},o=function(d){for(var f=0;f<c.length;f++)c[f].handle===d&&(c[f].cancelled=!0)}}return xr.exports=function(d){return i.call(r,d)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(d){d||(d=r),d.requestAnimationFrame=i,d.cancelAnimationFrame=o},xr.exports}var dn={},us;function Vg(){if(us)return dn;us=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return dn}var Ht={},ds;function Kg(){if(ds)return Ht;ds=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.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 Ht}var fs;function Yg(){if(fs)return Ze;fs=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.createHorizontalStrength=T,Ze.createVerticalStrength=R,Ze.createScrollingComponent=M,Ze.default=H,Ze.defaultVerticalStrength=Ze.defaultHorizontalStrength=void 0;var e=u(Cc()),r=c(Ic()),n=$p(),t=c(Wg()),i=c(qg()),o=c(Vg()),a=Kh,s=c(Gp()),l=Kg();function c(E){return E&&E.__esModule?E:{default:E}}function u(E){if(E&&E.__esModule)return E;var B={};if(E!=null){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};U.get||U.set?Object.defineProperty(B,$,U):B[$]=E[$]}}return B.default=E,B}function d(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function($){return typeof $}:d=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},d(E)}function f(){return f=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var U in $)Object.prototype.hasOwnProperty.call($,U)&&(E[U]=$[U])}return E},f.apply(this,arguments)}function p(E,B){if(E==null)return{};var $=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&($[U]=E[U])}return $}function h(E,B){if(E==null)return{};var $={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&($[J]=E[J]);return $}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var $=0;$<B.length;$++){var U=B[$];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,$){return B&&m(E.prototype,B),E}function b(E,B){return B&&(d(B)==="object"||typeof B=="function")?B:w(E)}function I(E){return I=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},I(E)}function _(E,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(B&&B.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),B&&P(E,B)}function P(E,B){return P=Object.setPrototypeOf||function(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function D(E,B,$){return B in E?Object.defineProperty(E,B,{value:$,enumerable:!0,configurable:!0,writable:!0}):E[B]=$,E}var S=150;function T(E){return function($,U){var J=$.x,ee=$.w,Q=$.y,Z=$.h,q=Math.min(ee/2,E),ne=U.x>=J&&U.x<=J+ee,ie=ne&&U.y>=Q&&U.y<=Q+Z;if(ie){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function R(E){return function($,U){var J=$.y,ee=$.h,Q=$.x,Z=$.w,q=Math.min(ee/2,E),ne=U.y>=J&&U.y<=J+ee,ie=ne&&U.x>=Q&&U.x<=Q+Z;if(ie){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=T(S);Ze.defaultHorizontalStrength=O;var L=R(S);Ze.defaultVerticalStrength=L;function M(E){var B=function($){_(U,$);function U(J,ee){var Q;return v(this,U),Q=b(this,I(U).call(this,J,ee)),D(w(w(Q)),"updateScrolling",(0,t.default)(function(Z){var q=Q.container.getBoundingClientRect(),ne=q.left,ie=q.top,ue=q.width,G=q.height,W={x:ne,y:ie,w:ue,h:G},k=(0,l.getCoords)(Z),N=Q.props,j=N.horizontalStrength,V=N.verticalStrength;Q.scaleX=j(W,k),Q.scaleY=V(W,k),!Q.frame&&(Q.scaleX||Q.scaleY)&&Q.startScrolling()},100,{trailing:!1})),D(w(w(Q)),"handleEvent",function(Z){Q.dragging&&!Q.attached&&(Q.attach(),Q.updateScrolling(Z))}),Q.wrappedInstance=e.default.createRef(),Q.scaleX=0,Q.scaleY=0,Q.frame=null,Q.attached=!1,Q.dragging=!1,Q}return y(U,[{key:"componentDidMount",value:function(){var ee=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 Q=this.props.dragDropManager;this.clearMonitorSubscription=Q.getMonitor().subscribeToStateChange(function(){return ee.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 ee=this.props.dragDropManager,Q=ee.getMonitor().isDragging();!this.dragging&&Q?this.dragging=!0:this.dragging&&!Q&&(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 ee=this,Q=0,Z=function q(){var ne=ee.scaleX,ie=ee.scaleY,ue=ee.container,G=ee.props,W=G.strengthMultiplier,k=G.onScrollChange;if(W===0||ne+ie===0){ee.stopScrolling();return}if(Q+=1,Q%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,pe=ue.clientHeight,me=ne?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+ne*W):N,Ce=ie?ue.scrollTop=(0,l.intBetween)(0,te-pe,j+ie*W):j;k(me,Ce)}ee.frame=(0,i.default)(q)};Z()}},{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 ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var Q=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,f({ref:this.wrappedInstance},Q))}}]),U}(e.Component);return D(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),D(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),D(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,f({},$,{dragDropManager:J}))})}}return Ze}var In=Yg();const Jg=Xn(In);var Qg=Yh();const ps=Xn(Qg);function tu(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function ru(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function nu(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}}tu.__suppressDeprecationWarning=!0;ru.__suppressDeprecationWarning=!0;nu.__suppressDeprecationWarning=!0;function Zr(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 nd=Object.freeze({left:0,top:0,width:16,height:16}),$n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),on=Object.freeze({...nd,...$n}),mo=Object.freeze({...on,body:"",hidden:!1}),Ay=Object.freeze({width:null,height:null}),id=Object.freeze({...Ay,...$n});function Ly(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 zy=/[\s,]+/;function jy(e,r){r.split(zy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const od={...id,preserveAspectRatio:""};function pl(e){const r={...od},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ly(n("rotate","")),jy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Fy(e,r){for(const n in od)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,an=(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 s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!_n(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!_n(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!_n(s,n)?null:s}return null},_n=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function By(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 hl(e,r){const n=By(e,r);for(const t in mo)t in $n?t in e&&!(t in n)&&(n[t]=$n[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function $y(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 s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Gy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=hl(t[s]||i[s],o)}return a(r),n.forEach(a),hl(e,o)}function ad(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=$y(e);for(const i in t){const o=t[i];o&&(r(i,Gy(e,i,o)),n.push(i))}return n}const Wy={provider:"",aliases:{},not_found:{},...nd};function zi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function sd(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!zi(e,Wy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!zi(o,mo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(zr)||typeof a!="string"||!n[a]&&!t[a]||!zi(o,mo))return null}return r}const Gn=Object.create(null);function Hy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Rt(e,r){const n=Gn[e]||(Gn[e]=Object.create(null));return n[r]||(n[r]=Hy(e,r))}function aa(e,r){return sd(r)?ad(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Uy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function qy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Gn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Gn[i]||{})).forEach(a=>{const s=Rt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function ld(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?an(e,!0,Hr):e;if(r){const n=Rt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function cd(e,r){const n=an(e,!0,Hr);if(!n)return!1;const t=Rt(n.provider,n.prefix);return Uy(t,n.name,r)}function gl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return sd(e)&&(e.prefix="",ad(e,(o,a)=>{a&&cd(o,a)&&(i=!0)})),i}const n=e.prefix;if(!_n({provider:r,prefix:n,name:"a"}))return!1;const t=Rt(r,n);return!!aa(t,e)}function Vy(e){return!!Ur(e)}function Ky(e){const r=Ur(e);return r?{...on,...r}:null}function Yy(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,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=Rt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:s};u.push(d)}),r}function ud(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Jy(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,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.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!==s&&(n||ud([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qy=0;function Xy(e,r,n){const t=Qy++,i=ud.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 bo=Object.create(null);function vl(e,r){bo[e]=r}function yo(e){return bo[e]||bo[""]}function Zy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?an(i,r,n):i;o&&t.push(o)}),t}var ex={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function tx(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 w=e.resources.slice(0);for(a=[];w.length>1;){const D=Math.floor(Math.random()*w.length);a.push(w[D]),w=w.slice(0,D).concat(w.slice(D+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){l==="pending"&&(l="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,D){D&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function I(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function _(w,D,S){const T=D!=="success";switch(f=f.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=S,b();return}if(T){u=S,f.length||(a.length?P():b());return}if(h(),I(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),l==="pending"&&(I(),b())},e.timeout);return}b();return}const D={status:"pending",resource:w,callback:(S,T)=>{_(D,S,T)}};f.push(D),c++,d=setTimeout(P,e.rotate),n(w,r,D.callback)}return setTimeout(P),y}function dd(e){const r={...ex,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=tx(r,s,l,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function sa(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 li=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],Dn=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?Dn.push(wr.shift()):Dn.push(wr.pop());li[""]=sa({resources:["https://api.iconify.design"].concat(Dn)});function ml(e,r){const n=sa(r);return n===null?!1:(li[e]=n,!0)}function ci(e){return li[e]}function rx(){return Object.keys(li)}function bl(){}const ji=Object.create(null);function nx(e){if(!ji[e]){const r=ci(e);if(!r)return;const n=dd(r),t={config:r,redundancy:n};ji[e]=t}return ji[e]}function fd(e,r,n){let t,i;if(typeof e=="string"){const o=yo(e);if(!o)return n(void 0,424),bl;i=o.send;const a=nx(e);a&&(t=a.redundancy)}else{const o=sa(e);if(o){t=dd(o);const a=e.resources?e.resources[0]:"",s=yo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),bl):t.query(r,i,n)().abort}const yl="iconify2",qr="iconify",pd=qr+"-count",xl=qr+"-version",hd=36e5,ix=168;function xo(e,r){try{return e.getItem(r)}catch{}}function la(e,r,n){try{return e.setItem(r,n),!0}catch{}}function Sl(e,r){try{e.removeItem(r)}catch{}}function So(e,r){return la(e,pd,r.toString())}function wo(e){return parseInt(xo(e,pd))||0}const jt={local:!0,session:!0},gd={local:new Set,session:new Set};let ca=!1;function ox(e){ca=e}let gn=typeof window>"u"?{}:window;function vd(e){const r=e+"Storage";try{if(gn&&gn[r]&&typeof gn[r].length=="number")return gn[r]}catch{}jt[e]=!1}function md(e,r){const n=vd(e);if(!n)return;const t=xo(n,xl);if(t!==yl){if(t){const s=wo(n);for(let l=0;l<s;l++)Sl(n,qr+l.toString())}la(n,xl,yl),So(n,0);return}const i=Math.floor(Date.now()/hd)-ix,o=s=>{const l=qr+s.toString(),c=xo(n,l);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,s))return!0}catch{}Sl(n,l)}};let a=wo(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,So(n,a)):gd[e].add(s))}function bd(){if(!ca){ox(!0);for(const e in jt)md(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=Rt(t,i);if(!aa(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ax(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in jt)md(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function sx(e,r){ca||bd();function n(t){let i;if(!jt[t]||!(i=vd(t)))return;const o=gd[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=wo(i),!So(i,a+1))return;const s={cached:Math.floor(Date.now()/hd),provider:e.provider,data:r};return la(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!ax(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function wl(){}function lx(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Jy(e)}))}function cx(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=yo(n)))return;o.prepare(n,t,i).forEach(s=>{fd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=aa(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),sx(e,l)}catch(c){console.error(c)}lx(e)})})}))}const ua=(e,r)=>{const n=Zy(e,!0,ld()),t=Yy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,wl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(Rt(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:d}=l,f=Rt(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&cx(l,i[c][u])}),r?Xy(r,t,o):wl},ux=e=>new Promise((r,n)=>{const t=typeof e=="string"?an(e,!0):e;if(!t){n(e);return}ua([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...on,...o});return}}n(e)})});function dx(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function fx(e,r){const n=typeof e=="string"?an(e,!0,!0):null;if(!n){const o=dx(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ua([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Fi(e){return e.hasAttribute("inline")}let yd=!1;try{yd=navigator.vendor.indexOf("Apple")===0}catch{}function px(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(yd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const hx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Co(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(hx);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=gx.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const vx=e=>e==="unset"||e==="undefined"||e==="none";function xd(e,r){const n={...on,...e},t={...id,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,d;a===null?(d=s===null?"1em":s==="auto"?c:s,u=Co(d,l/c)):(u=a==="auto"?l:a,d=s===null?Co(u,c/l):s==="auto"?c:s);const f={},p=(h,v)=>{vx(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:f,body:o}}const mx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Wn=mx();function bx(e){Wn=e}function yx(){return Wn}function xx(e,r){const n=ci(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 Sx(e){return e===404}const wx=(e,r,n)=>{const t=[],i=xx(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Cx(e){if(typeof e=="string"){const r=ci(e);if(r)return r.path}return"/"}const Ix=(e,r,n)=>{if(!Wn){n("abort",424);return}let t=Cx(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.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;Wn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Sx(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)})},Rx={prepare:wx,send:Ix};function Cl(e,r){switch(e){case"local":case"session":jt[e]=r;break;case"all":for(const n in jt)jt[n]=r;break}}const Bi="data-style";let Sd="";function Tx(e){Sd=e}function Il(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Bi));n||(n=document.createElement("style"),n.setAttribute(Bi,Bi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Sd}function wd(){vl("",Rx),ld(!0);let e;try{e=window}catch{}if(e){if(bd(),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"||!gl(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;ml(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>Cl(n,!0),disableCache:n=>Cl(n,!1),iconExists:Vy,getIcon:Ky,listIcons:qy,addIcon:cd,addCollection:gl,calculateSize:Co,buildIcon:xd,loadIcons:ua,loadIcon:ux,addAPIProvider:ml,appendCustomStyle:Tx,_api:{getAPIConfig:ci,setAPIModule:vl,sendAPIQuery:fd,setFetch:bx,getFetch:yx,listAPIProviders:rx}}}function Cd(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 _x(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Dx(e){return"data:image/svg+xml,"+_x(e)}function Px(e){return'url("'+Dx(e)+'")'}const Io={"background-color":"currentColor"},Id={"background-color":"transparent"},Rl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Tl={"-webkit-mask":Io,mask:Io,background:Id};for(const e in Tl){const r=Tl[e];for(const n in Rl)r[e+"-"+n]=Rl[n]}function _l(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function kx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Cd(i,{...o,width:r.width+"",height:r.height+""}),s=Px(a),l=t.style,c={"--svg":s,width:_l(o.width),height:_l(o.height),...n?Io:Id};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function Ox(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function Ex(e){return jr===void 0&&Ox(),jr?jr.createHTML(e):e}function Nx(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=Cd(e.body,n);return r.innerHTML=Ex(i),r.firstChild}function Dl(e,r){const n=r.icon.data,t=r.customisations,i=xd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Nx(i);break;default:a=kx(i,{...on,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function Pl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Mx(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 s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Fi(this);Il(s,l),this._state=Pl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Fi(this),c=this._state;l!==c.inline&&(c.inline=l,Il(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Fi(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Dl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=pl(this);(s.attrMode!==c||Fy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=fx(s,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});l.data?this._gotIconData(l):this._state=Pl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,pl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=px(s.data.body,c),d=this._state.inline;Dl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:d,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=wd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const Ax=Mx()||wd(),{enableCache:h_,disableCache:g_,iconExists:v_,getIcon:m_,listIcons:b_,addIcon:y_,addCollection:x_,calculateSize:S_,buildIcon:w_,loadIcons:C_,loadIcon:I_,addAPIProvider:R_,_api:T_}=Ax,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),Rd=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},da=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=da(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),Td=e=>/^https?:\/\//.test(e),_d=e=>/^mailto:/i.test(e.trim()),Lx=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)},Dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Lx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},zx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.length,l=e.reduce((v,m)=>v+i+(m[a]?.length||0)*o,0),c=Math.ceil(l/n),u=[[]];let d=0,f=0;const p=c*.2,h=v=>f>c-p&&d<n-1&&f+v>c+p;return e.forEach(v=>{const m=i+(v[a]?.length||0)*o;t&&h(i)&&(d++,f=0,u[d]=[]),!t&&f>0&&(s<=n||h(m))&&(d++,f=0,u[d]=[]),u[d].push({...v,group:!0}),f+=i,v[a]&&v[a].forEach(y=>{t&&h(o)&&(d++,f=0,u[d]=[]),u[d].push({...y,group:!1}),f+=o})}),u};function nt({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]=C.useState(!1),[s,l]=C.useState(!0);if(zo(async()=>{l(!0);try{await jo(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Td(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function fa(e=["en","zh"]){const{blocklet:r}=$t();return C.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>$e.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=$e.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:$e.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const jx=e=>e.from!=="team-tmpl";function Fx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Hp(e.slice(0,t-1),r.slice(0,i-1)))}function Pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=$t(),{defaultLocale:t}=fa(),i=n.environments.find(s=>s.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=oe(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Qt(s)&&(c=s[r]||s[t]||s.en),!C.isValidElement(l)&&Qt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(re,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(de,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(de,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Fo(o(e.icon))?g.jsx(nt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}Pd.propTypes={treeNode:x.object.isRequired};const Bx=Qe(re)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function kd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(Bx,{children:g.jsx(Xh,{backend:Zh,...i,children:g.jsx(Pm,{generateNodeProps:o=>{const a=jx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(re,{sx:{width:16,height:16}}),title:g.jsx(Pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Fx,theme:My})})})}kd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var $x=wc();const Gx=Xn($x);function Od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Ee(),c=C.useRef(),[u,d]=C.useState(null),f=Bt({localeList:[],inputLocale:"",localeError:""}),p=C.useMemo(()=>!!u,[u]),h=C.useMemo(()=>o.includes(i)?i:t,[o,i]),v=C.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=C.useMemo(()=>Object.keys(At(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),y=C.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=oe(S=>S?S===t||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),I=oe((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?f.localeError=R:f.localeError="",R}),_=oe(()=>{d(null),f.inputLocale="",f.localeError=""}),P=oe(()=>{const S=f.inputLocale?.trim();I(S)===!0&&(_(),f.localeList.push(S),r(S))}),w=oe((S,T)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Xc(f.localeList,T),s(T)}),D=oe(S=>{const{value:T}=S.target;I(T),f.inputLocale=T});return C.useEffect(()=>{f.localeList=[...o]},[o,f]),Vh("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(dg,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx(Xa,{label:y,value:t}),v.map(S=>g.jsx(Xa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(je,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(je,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Zi,{open:p,anchorEl:u,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(re,{sx:{p:2,width:"270px"},children:[g.jsx(de,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(re,{sx:{mt:1},children:g.jsx(no,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:D,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(re,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(Ct,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}Od.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const pa=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ed(e,r,n=5e3){for(const t of pa){const i=Re(t,e);try{return await hg.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 Wx({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 Ed("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const vn=new Map;async function Hx(e){if(vn.has(e))return vn.get(e);const r=(async()=>{const{data:n}=await Ed("/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)})();vn.set(e,r);try{return await r}catch(n){throw vn.delete(e),n}}function Ux(e){return Re(pa[0],`${e}.svg`)}function qx(e){try{const r=new URL(e);for(const n of pa)if(r.origin===n)return Up(r.pathname).replace(".svg","");return""}catch{return""}}function Vx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Fo(e)&&(n=qx(e))),{isIconId:r,iconId:n}}const Kx=C.lazy(()=>Yp(()=>import("./index-CaxsY_au.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}))),kl=Xe(nt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Nd({icon:e,...r}){const[n,t]=C.useState(!1);return zo(async()=>{t(!1),await jo(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}Nd.propTypes={icon:x.string.isRequired};function Ro({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=Rc(),{blocklet:u}=$t(),d=Xr(Z=>Z.breakpoints.down("md")),f=u.environments.find(Z=>Z.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:y,locale:b}=Ee(),{isIconId:I,iconId:_}=Vx(e),[P,w]=C.useState(null),{onChange:D,onBlur:S,sx:T,...R}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Bt({showPopover:!1}),E=oe(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:f?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[f?.value,c]),B=oe(async Z=>await h.current.getUploader().uploadFile(Z)),$=oe(()=>{w(null)}),U=oe(()=>{L&&w(m.current)}),J=oe(async Z=>{try{if(o==="url"){const q=Ux(Z),ne=await qp(q,{width:128,height:128}),ie=await Vp(ne,Z);await B(ie)}else D?.(Z)}catch(q){console.error("Failed to pick icon:",q)}$()}),ee=oe(Z=>{Z.stopPropagation(),v.current.open(),$()}),Q=oe(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(ut,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:L?U:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Nn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(kl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Nn,{position:"end",children:[g.jsx(je,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),D("")},children:g.jsx(Jc,{style:{fontSize:18}})}),O&&g.jsx(Kp,{title:y("common.upload"),children:g.jsx(je,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Nd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(re,{component:pg,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(Zi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Md,{label:n,placeholder:t,value:I?_:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(To,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:Q}),g.jsx(To,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:Q}),g.jsx(Zi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(kl,{size:120,icon:E(e),alt:"Error"})})]})}Ro.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function Md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=C.useState([]),[c,u]=C.useState(!0),[d,f]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),y=C.useRef(1),b=C.useRef(!0),{t:I}=Ee(),_=96,P=oe(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*_,R=S*_,O=m.current.slice(T,R);l(L=>[...L,...O]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=oe(S=>{m.current=S,y.current=1,b.current=S.length>_;const T=S.slice(0,_);l(T),h(S.length===0),b.current&&P()}),{run:D}=Tc(async S=>{if(S){u(!0);try{const{icons:T}=await Wx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:O,clientHeight:L}=v.current;(R+L>=O-150||O<=L)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),zo(async()=>{if(d)D(d);else{u(!0);try{const S=await Hx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,D,w]),g.jsxs(Yx,{ref:v,sx:t,...a,children:[g.jsxs(re,{className:"icon-picker-input",children:[g.jsx(ut,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(je,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Jc,{style:{fontSize:18}})})}}}),g.jsx(Ct,{onClick:o,children:I("common.cancel")})]}),g.jsxs(re,{children:[s.length>0&&g.jsx(re,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Jx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(re,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(_c,{size:20})})]})]})}Md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Yx=Xe(re)(({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}})),Jx=Xe(je,{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 To({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 g.jsx(C.Suspense,{children:g.jsx(Kx,{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}})})}To.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const Ol=24,El=48,Nl="add";x.string.isRequired;function ha({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Yc(),{t:s,locale:l}=Ee(),{localeMap:c,defaultLocale:u}=fa(),d=oe(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=oe(k=>Xc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(N=>Qt(k[N])?Object.keys(k[N]):[]))),u)),p=C.useRef(()=>{}),h=Bt({isRoot:!0,type:Nl,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:I,formState:{errors:_}}=cg({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=ug({control:m}),w=P.component,D=P.title,S=P.description,T=P.link,R=P.parent;C.useEffect(()=>{h.formState.title[h.locale]=D},[D]),C.useEffect(()=>{h.formState.description[h.locale]=S},[S]),C.useEffect(()=>{h.formState.link[h.locale]=T},[T]),C.useEffect(()=>{i?.(P)},[P,i]);const O=C.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===R),[n,t,w,R]),L=C.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Qt(N)?N[h.locale]:N;if(w)return eo(j);const V=Qt(O.link)?O.link[h.locale]:O.link;return eo(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=C.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ae.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ae.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=oe(()=>{h.isRoot=!0,h.locale=u,h.type=Nl,h.linkDisabled=!1,h.formState=d(),y(),I(),p.current=()=>{}}),E=oe((k={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(N=>{Pg(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Bo(k.role)&&(k.role=void 0),k)),B=oe(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),$=oe((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:pe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const me=f(k),Ce=(Se,Pe)=>{Dc(Se)?h.formState[Pe]=me.reduce((Fe,ke)=>(Fe[ke]=Se,Fe),{[u]:Se}):Qt(Se)?h.formState[Pe]=rt(Se):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),be.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",pe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const Pe=Jp(Se,["id","title","description","icon","component","link","role"]);N(Pe)}}),U=oe(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>Ol)return s("navigation.form.titleTooLong",{len:Ol})}return!0}),J=oe(k=>{const N=k?.trim();return N&&N.length>El?s("navigation.form.descriptionTooLong",{len:El}):!0}),ee=oe(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),Q=oe(async k=>{const N=k?.trim();if(N){if(Fo(ee(N)))return!0;try{await jo(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=oe(k=>{const N=k?.trim();return N?Q(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=oe(k=>{const N=k?.trim();return N?Ae.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),ne=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{I()})}),ie=oe(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=oe(k=>{const N=ie();N===!0?p.current(E(k)):Mt.error(N)}),G=oe(k=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=At(h.formState[N],k)}),i?.(P)}),W=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{I()})});return C.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,$,v,ue]),g.jsxs(re,{...o,children:[g.jsx(Od,{sx:{mb:1},onAdd:W,onChange:ne,onRemoveLocale:G,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(pt,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(Ro,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(pt,{name:"icon",control:m,rules:{validate:Q},render:({field:k})=>g.jsx(Ro,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(pt,{name:"component",control:m,render:({field:k})=>g.jsx(no,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholder:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!_?.component?.message,helperText:_?.component?.message||" ",...At(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(pt,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!_?.description?.message,helperText:_?.description?.message||" ",...k})}),g.jsx(pt,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(Pc,{fullWidth:!0,margin:"dense",children:g.jsx(gg,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(ut,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!_?.link?.message,helperText:_?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Nn,{position:"start",sx:{textDecoration:Gx(T||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(re,{component:"li",...N,children:[j.label,g.jsx(de,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(pt,{name:"role",control:m,render:({field:k})=>g.jsx(no,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholder:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!_?.role?.message,helperText:_?.role?.message||" ",...At(k,"ref")})}),r==="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})})]})]})}ha.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ga({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:s}]=sg(),[l,c]=C.useState("add"),u=C.useRef(null),d=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),f=C.useCallback(()=>{s(),u.current?.reset()},[s]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(f,y)),a()},[a,f]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(f,y)),a()},[a,f]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(kc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Mn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ha,{ref:u,section:r,components:n,rawNavigations:t})})}ga.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Ad({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Ee(),l=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=C.useCallback(v=>{u(v),r(o)},[r,o]),f=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(je,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(je,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(je,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(je,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Ad.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Pn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Qx=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},Xx=(e,r="en",n="en")=>{if(typeof e=="string"){if(Td(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(_d(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Oc(o.items?.length?o.link:Xx(o.link,r,n),t),_rawLink:o.link}),"items")},Zx=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),eS=e=>{if(!e?.length)return null;const r=Zx(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},va=e=>{if(!e)return null;const r={...e};return r.theme=Qx(r.theme),r.navigation=eS(tS(r.navigation)),r},tS=(e=[])=>da(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Ld=(e,r)=>da(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"),rS={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"/>'},nS={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 iS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(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(v=>p.component===v.name);return{...p,component:h}}),l=ot(),c=C.useRef(null),u=Bt({open:!1}),d=oe((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return s.length===0||!e?.user?null:g.jsxs(re,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(je,{size:"medium",ref:c,children:g.jsx(ye,{icon:rS,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Qp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Xp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(Ec,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Zp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(eh,{disablePadding:!0,children:g.jsxs(vg,{href:$a(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?g.jsx(re,{component:"img",src:`${Nc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||nS,color:l.palette.text.secondary}),g.jsx(de,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:$a(h.title,r)})]})},h.id))}),g.jsx(th,{session:e,children:g.jsx(Mn,{variant:"outlined",fullWidth:!0,href:rh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const zd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),jd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number,profileUrl:x.string}),oS=["admin","owner"],aS=e=>e.endsWith(".ip.abtnet.io"),sS=e=>e.endsWith(".did.abtnet.io"),lS={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:"配置域名"}},cS=1e3*60*60*24*30,Ml=".well-known/service/admin/domains";function Fd({locale:e="en",session:r={}}){const n=r?.user,t=Qc(),[i,o]=C.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>cS}),a=oe((f,p={})=>ei(lS,f,e,"en",p)),s=C.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),l=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const f=Re(window.location.origin,Ml);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&oS.includes(n.role);return window.location.href.includes(Ml)||t||!aS(s)&&!sS(s)?null:g.jsxs(nh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(ih,{sx:{padding:"20px !important"},children:[g.jsx(de,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(de,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(re,{component:"ul",children:l.map(f=>g.jsx(de,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(oh,{sx:{px:"12px !important"},children:[g.jsx(Ct,{onClick:c,children:a("skip")}),d&&g.jsx(Ct,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Fd.propTypes={locale:x.string,session:x.object};const Me={};function uS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Nc,e);return new lh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function dS(e="admin"){return Me[e]||(Me[e]=uS(e)),Me[e]}const fS=(e="admin")=>{const r=C.use(ti),{session:n}=r??{},t=Te(()=>n.user?.did,[n.user]),i=ah(t);return sh(()=>{Object.keys(Me).forEach(o=>{Me[o]?.isConnected()&&Me[o]?.disconnect(),delete Me[o]})}),t?(i&&i!==t&&Object.keys(Me).forEach(o=>{Me[o]&&(Me[o].isConnected()&&Me[o].disconnect(),Me[o].connect())}),!Me[e]&&n.user&&(Me[e]=dS(e),Me[e].connect()),Me[e]):null},pS={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>'},hS={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"/>'},gS={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 vS(){const e=ot();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Xr(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const mS=e=>!Bo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,bS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},yS=async(e,r)=>{try{return await Ac().user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},xS=async(e,r)=>{const{type:n,did:t}=e;return Mc.isSameAddr(n,"did")?await yS(t,r)||An.getLink(e):An.getLink(e)},SS=async(e,r,n=!0)=>{const t=An.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof An.Link){if(n){const o=await xS(i,r),{type:a,chainId:s,did:l}=i;return Mc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${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="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},wS=e=>ch.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),CS={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=ot(),t=ri(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Lc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function IS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=ot(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Te(()=>{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]),d=Te(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=oe(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Jt,{user:d[0],color:c});const m=d.slice(0,-1),y=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:y,color:c})]});const b=d.length>3,I=b?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((_,P)=>g.jsxs(X.Fragment,{children:[g.jsx(Jt,{user:_,color:c}),P<I.length-1?", ":""]},_.did)),b?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=oe(()=>{const m=a?CS[a]:null;return m?m(l,r.length):null}),h=Te(()=>{const m=f(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,d,f,p]),v=Te(()=>{if(!e)return null;const m=bS(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Bo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Lc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const RS={normal:Ga,success:pS,info:Ga,warning:hS,error:gS},TS=dr(ph)`
43
+ */const nd=Object.freeze({left:0,top:0,width:16,height:16}),$n=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),on=Object.freeze({...nd,...$n}),mo=Object.freeze({...on,body:"",hidden:!1}),Ay=Object.freeze({width:null,height:null}),id=Object.freeze({...Ay,...$n});function Ly(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 zy=/[\s,]+/;function jy(e,r){r.split(zy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const od={...id,preserveAspectRatio:""};function pl(e){const r={...od},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=Ly(n("rotate","")),jy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Fy(e,r){for(const n in od)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,an=(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 s=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:t,prefix:l,name:s};return r&&!_n(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!_n(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!_n(s,n)?null:s}return null},_n=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function By(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 hl(e,r){const n=By(e,r);for(const t in mo)t in $n?t in e&&!(t in n)&&(n[t]=$n[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function $y(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 s=t[a]&&t[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function Gy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=hl(t[s]||i[s],o)}return a(r),n.forEach(a),hl(e,o)}function ad(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=$y(e);for(const i in t){const o=t[i];o&&(r(i,Gy(e,i,o)),n.push(i))}return n}const Wy={provider:"",aliases:{},not_found:{},...nd};function zi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function sd(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!zi(e,Wy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!zi(o,mo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(zr)||typeof a!="string"||!n[a]&&!t[a]||!zi(o,mo))return null}return r}const Gn=Object.create(null);function Hy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Rt(e,r){const n=Gn[e]||(Gn[e]=Object.create(null));return n[r]||(n[r]=Hy(e,r))}function aa(e,r){return sd(r)?ad(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Uy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function qy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Gn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Gn[i]||{})).forEach(a=>{const s=Rt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function ld(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?an(e,!0,Hr):e;if(r){const n=Rt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function cd(e,r){const n=an(e,!0,Hr);if(!n)return!1;const t=Rt(n.provider,n.prefix);return Uy(t,n.name,r)}function gl(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return sd(e)&&(e.prefix="",ad(e,(o,a)=>{a&&cd(o,a)&&(i=!0)})),i}const n=e.prefix;if(!_n({provider:r,prefix:n,name:"a"}))return!1;const t=Rt(r,n);return!!aa(t,e)}function Vy(e){return!!Ur(e)}function Ky(e){const r=Ur(e);return r?{...on,...r}:null}function Yy(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,s=i.name,l=n[o]||(n[o]=Object.create(null)),c=l[a]||(l[a]=Rt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const d={provider:o,prefix:a,name:s};u.push(d)}),r}function ud(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Jy(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,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const c=l.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!==s&&(n||ud([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Qy=0;function Xy(e,r,n){const t=Qy++,i=ud.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 bo=Object.create(null);function vl(e,r){bo[e]=r}function yo(e){return bo[e]||bo[""]}function Zy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?an(i,r,n):i;o&&t.push(o)}),t}var ex={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function tx(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 w=e.resources.slice(0);for(a=[];w.length>1;){const D=Math.floor(Math.random()*w.length);a.push(w[D]),w=w.slice(0,D).concat(w.slice(D+1))}a=a.concat(w)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l="pending",c=0,u,d=null,f=[],p=[];typeof t=="function"&&p.push(t);function h(){d&&(clearTimeout(d),d=null)}function v(){l==="pending"&&(l="aborted"),h(),f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function m(w,D){D&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:f.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function I(){f.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),f=[]}function _(w,D,S){const T=D!=="success";switch(f=f.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(D==="abort"){u=S,b();return}if(T){u=S,f.length||(a.length?P():b());return}if(h(),I(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",p.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(f.length){d=setTimeout(()=>{h(),l==="pending"&&(I(),b())},e.timeout);return}b();return}const D={status:"pending",resource:w,callback:(S,T)=>{_(D,S,T)}};f.push(D),c++,d=setTimeout(P,e.rotate),n(w,r,D.callback)}return setTimeout(P),y}function dd(e){const r={...ex,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=tx(r,s,l,(d,f)=>{t(),c&&c(d,f)});return n.push(u),u}function o(s){return n.find(l=>s(l))||null}return{query:i,find:o,setIndex:s=>{r.index=s},getIndex:()=>r.index,cleanup:t}}function sa(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 li=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],Dn=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?Dn.push(wr.shift()):Dn.push(wr.pop());li[""]=sa({resources:["https://api.iconify.design"].concat(Dn)});function ml(e,r){const n=sa(r);return n===null?!1:(li[e]=n,!0)}function ci(e){return li[e]}function rx(){return Object.keys(li)}function bl(){}const ji=Object.create(null);function nx(e){if(!ji[e]){const r=ci(e);if(!r)return;const n=dd(r),t={config:r,redundancy:n};ji[e]=t}return ji[e]}function fd(e,r,n){let t,i;if(typeof e=="string"){const o=yo(e);if(!o)return n(void 0,424),bl;i=o.send;const a=nx(e);a&&(t=a.redundancy)}else{const o=sa(e);if(o){t=dd(o);const a=e.resources?e.resources[0]:"",s=yo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),bl):t.query(r,i,n)().abort}const yl="iconify2",qr="iconify",pd=qr+"-count",xl=qr+"-version",hd=36e5,ix=168;function xo(e,r){try{return e.getItem(r)}catch{}}function la(e,r,n){try{return e.setItem(r,n),!0}catch{}}function Sl(e,r){try{e.removeItem(r)}catch{}}function So(e,r){return la(e,pd,r.toString())}function wo(e){return parseInt(xo(e,pd))||0}const jt={local:!0,session:!0},gd={local:new Set,session:new Set};let ca=!1;function ox(e){ca=e}let gn=typeof window>"u"?{}:window;function vd(e){const r=e+"Storage";try{if(gn&&gn[r]&&typeof gn[r].length=="number")return gn[r]}catch{}jt[e]=!1}function md(e,r){const n=vd(e);if(!n)return;const t=xo(n,xl);if(t!==yl){if(t){const s=wo(n);for(let l=0;l<s;l++)Sl(n,qr+l.toString())}la(n,xl,yl),So(n,0);return}const i=Math.floor(Date.now()/hd)-ix,o=s=>{const l=qr+s.toString(),c=xo(n,l);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,s))return!0}catch{}Sl(n,l)}};let a=wo(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,So(n,a)):gd[e].add(s))}function bd(){if(!ca){ox(!0);for(const e in jt)md(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=Rt(t,i);if(!aa(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function ax(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in jt)md(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function sx(e,r){ca||bd();function n(t){let i;if(!jt[t]||!(i=vd(t)))return;const o=gd[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=wo(i),!So(i,a+1))return;const s={cached:Math.floor(Date.now()/hd),provider:e.provider,data:r};return la(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!ax(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function wl(){}function lx(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Jy(e)}))}function cx(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=yo(n)))return;o.prepare(n,t,i).forEach(s=>{fd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=aa(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(d=>{u.delete(d)}),sx(e,l)}catch(c){console.error(c)}lx(e)})})}))}const ua=(e,r)=>{const n=Zy(e,!0,ld()),t=Yy(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,wl)}),()=>{l=!1}}const i=Object.create(null),o=[];let a,s;return t.pending.forEach(l=>{const{provider:c,prefix:u}=l;if(u===s&&c===a)return;a=c,s=u,o.push(Rt(c,u));const d=i[c]||(i[c]=Object.create(null));d[u]||(d[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:d}=l,f=Rt(c,u),p=f.pendingIcons||(f.pendingIcons=new Set);p.has(d)||(p.add(d),i[c][u].push(d))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&cx(l,i[c][u])}),r?Xy(r,t,o):wl},ux=e=>new Promise((r,n)=>{const t=typeof e=="string"?an(e,!0):e;if(!t){n(e);return}ua([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...on,...o});return}}n(e)})});function dx(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function fx(e,r){const n=typeof e=="string"?an(e,!0,!0):null;if(!n){const o=dx(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ua([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Fi(e){return e.hasAttribute("inline")}let yd=!1;try{yd=navigator.vendor.indexOf("Apple")===0}catch{}function px(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(yd||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const hx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Co(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(hx);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=gx.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const vx=e=>e==="unset"||e==="undefined"||e==="none";function xd(e,r){const n={...on,...e},t={...id,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,d;a===null?(d=s===null?"1em":s==="auto"?c:s,u=Co(d,l/c)):(u=a==="auto"?l:a,d=s===null?Co(u,c/l):s==="auto"?c:s);const f={},p=(h,v)=>{vx(v)||(f[h]=v.toString())};return p("width",u),p("height",d),f.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:f,body:o}}const mx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Wn=mx();function bx(e){Wn=e}function yx(){return Wn}function xx(e,r){const n=ci(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 Sx(e){return e===404}const wx=(e,r,n)=>{const t=[],i=xx(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},s=0;return n.forEach((l,c)=>{s+=l.length+1,s>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},s=l.length),a.icons.push(l)}),t.push(a),t};function Cx(e){if(typeof e=="string"){const r=ci(e);if(r)return r.path}return"/"}const Ix=(e,r,n)=>{if(!Wn){n("abort",424);return}let t=Cx(r.provider);switch(r.type){case"icons":{const o=r.prefix,s=r.icons.join(","),l=new URLSearchParams({icons:s});t+=o+".json?"+l.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;Wn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Sx(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)})},Rx={prepare:wx,send:Ix};function Cl(e,r){switch(e){case"local":case"session":jt[e]=r;break;case"all":for(const n in jt)jt[n]=r;break}}const Bi="data-style";let Sd="";function Tx(e){Sd=e}function Il(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Bi));n||(n=document.createElement("style"),n.setAttribute(Bi,Bi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+Sd}function wd(){vl("",Rx),ld(!0);let e;try{e=window}catch{}if(e){if(bd(),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"||!gl(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;ml(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>Cl(n,!0),disableCache:n=>Cl(n,!1),iconExists:Vy,getIcon:Ky,listIcons:qy,addIcon:cd,addCollection:gl,calculateSize:Co,buildIcon:xd,loadIcons:ua,loadIcon:ux,addAPIProvider:ml,appendCustomStyle:Tx,_api:{getAPIConfig:ci,setAPIModule:vl,sendAPIQuery:fd,setFetch:bx,getFetch:yx,listAPIProviders:rx}}}function Cd(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 _x(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Dx(e){return"data:image/svg+xml,"+_x(e)}function Px(e){return'url("'+Dx(e)+'")'}const Io={"background-color":"currentColor"},Id={"background-color":"transparent"},Rl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Tl={"-webkit-mask":Io,mask:Io,background:Id};for(const e in Tl){const r=Tl[e];for(const n in Rl)r[e+"-"+n]=Rl[n]}function _l(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function kx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=Cd(i,{...o,width:r.width+"",height:r.height+""}),s=Px(a),l=t.style,c={"--svg":s,width:_l(o.width),height:_l(o.height),...n?Io:Id};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function Ox(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function Ex(e){return jr===void 0&&Ox(),jr?jr.createHTML(e):e}function Nx(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=Cd(e.body,n);return r.innerHTML=Ex(i),r.firstChild}function Dl(e,r){const n=r.icon.data,t=r.customisations,i=xd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=Nx(i);break;default:a=kx(i,{...on,...n},o==="mask")}const s=Array.from(e.childNodes).find(l=>{const c=l.tagName&&l.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});s?a.tagName==="SPAN"&&s.tagName===a.tagName?s.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,s):e.appendChild(a)}function Pl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function Mx(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 s=this._shadowRoot=this.attachShadow({mode:"open"}),l=Fi(this);Il(s,l),this._state=Pl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Fi(this),c=this._state;l!==c.inline&&(c.inline=l,Il(this._shadowRoot,l))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Fi(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const l=this._shadowRoot;if(s.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Dl(l,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,l=this.getAttribute("icon");if(l!==s.icon.value){this._iconChanged(l);return}if(!s.rendered)return;const c=this.getAttribute("mode"),u=pl(this);(s.attrMode!==c||Fy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=fx(s,(c,u,d)=>{const f=this._state;if(f.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:d};p.data?this._gotIconData(p):f.icon=p});l.data?this._gotIconData(l):this._state=Pl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,pl(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=px(s.data.body,c),d=this._state.inline;Dl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:d,customisations:l,attrMode:c,renderedMode:u})}};i.forEach(s=>{s in o.prototype||Object.defineProperty(o.prototype,s,{get:function(){return this.getAttribute(s)},set:function(l){l!==null?this.setAttribute(s,l):this.removeAttribute(s)}})});const a=wd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const Ax=Mx()||wd(),{enableCache:h_,disableCache:g_,iconExists:v_,getIcon:m_,listIcons:b_,addIcon:y_,addCollection:x_,calculateSize:S_,buildIcon:w_,loadIcons:C_,loadIcon:I_,addAPIProvider:R_,_api:T_}=Ax,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),Rd=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},da=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=da(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),Td=e=>/^https?:\/\//.test(e),_d=e=>/^mailto:/i.test(e.trim()),Lx=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)},Dd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>Lx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},zx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.length,l=e.reduce((v,m)=>v+i+(m[a]?.length||0)*o,0),c=Math.ceil(l/n),u=[[]];let d=0,f=0;const p=c*.2,h=v=>f>c-p&&d<n-1&&f+v>c+p;return e.forEach(v=>{const m=i+(v[a]?.length||0)*o;t&&h(i)&&(d++,f=0,u[d]=[]),!t&&f>0&&(s<=n||h(m))&&(d++,f=0,u[d]=[]),u[d].push({...v,group:!0}),f+=i,v[a]&&v[a].forEach(y=>{t&&h(o)&&(d++,f=0,u[d]=[]),u[d].push({...y,group:!1}),f+=o})}),u};function nt({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]=C.useState(!1),[s,l]=C.useState(!0);if(zo(async()=>{l(!0);try{await jo(e),a(!0)}catch{a(!1)}l(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Td(e))return g.jsx(rr,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(rr,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function fa(e=["en","zh"]){const{blocklet:r}=$t();return C.useMemo(()=>{const t=r.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),i=t?t.value.split(","):e,o=i[0]||"en",a=i.filter(c=>$e.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=$e.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:$e.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const jx=e=>e.from!=="team-tmpl";function Fx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Hp(e.slice(0,t-1),r.slice(0,i-1)))}function Pd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=$t(),{defaultLocale:t}=fa(),i=n.environments.find(s=>s.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=oe(s=>{if(s?.startsWith("/"))try{return new URL(s,i?.value).href}catch{console.error("Failed to parse url",{url:s,origin:i?.value})}return s});function a(){const{title:s,subtitle:l}=e;let c=s,u=l;return Qt(s)&&(c=s[r]||s[t]||s.en),!C.isValidElement(l)&&Qt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(re,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(de,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(de,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(Fo(o(e.icon))?g.jsx(nt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}Pd.propTypes={treeNode:x.object.isRequired};const Bx=Qe(re)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function kd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(Bx,{children:g.jsx(Xh,{backend:Zh,...i,children:g.jsx(Pm,{generateNodeProps:o=>{const a=jx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(re,{sx:{width:16,height:16}}),title:g.jsx(Pd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Fx,theme:My})})})}kd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var $x=wc();const Gx=Xn($x);function Od({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Ee(),c=C.useRef(),[u,d]=C.useState(null),f=Bt({localeList:[],inputLocale:"",localeError:""}),p=C.useMemo(()=>!!u,[u]),h=C.useMemo(()=>o.includes(i)?i:t,[o,i]),v=C.useMemo(()=>f.localeList.filter(S=>!!a[S]),[f.localeList,a]),m=C.useMemo(()=>Object.keys(At(a,[...f.localeList,t])).map(S=>({title:a[S],value:S})),[f.localeList]),y=C.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=oe(S=>S?S===t||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),I=oe((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?f.localeError=R:f.localeError="",R}),_=oe(()=>{d(null),f.inputLocale="",f.localeError=""}),P=oe(()=>{const S=f.inputLocale?.trim();I(S)===!0&&(_(),f.localeList.push(S),r(S))}),w=oe((S,T)=>{S.preventDefault(),S.stopPropagation(),f.localeList=Xc(f.localeList,T),s(T)}),D=oe(S=>{const{value:T}=S.target;I(T),f.inputLocale=T});return C.useEffect(()=>{f.localeList=[...o]},[o,f]),Vh("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(dg,{sx:e,value:h,onChange:(S,T)=>{n(T)},children:[g.jsx(Xa,{label:y,value:t}),v.map(S=>g.jsx(Xa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(je,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(je,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{d(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(Zi,{open:p,anchorEl:u,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(re,{sx:{p:2,width:"270px"},children:[g.jsx(de,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(re,{sx:{mt:1},children:g.jsx(no,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:m,onChange:D,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(re,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(Ct,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}Od.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,defaultLocale:x.string,locale:x.string,localeMap:x.object,locales:x.array};const pa=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ed(e,r,n=5e3){for(const t of pa){const i=Re(t,e);try{return await hg.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 Wx({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 Ed("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const vn=new Map;async function Hx(e){if(vn.has(e))return vn.get(e);const r=(async()=>{const{data:n}=await Ed("/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)})();vn.set(e,r);try{return await r}catch(n){throw vn.delete(e),n}}function Ux(e){return Re(pa[0],`${e}.svg`)}function qx(e){try{const r=new URL(e);for(const n of pa)if(r.origin===n)return Up(r.pathname).replace(".svg","");return""}catch{return""}}function Vx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Fo(e)&&(n=qx(e))),{isIconId:r,iconId:n}}const Kx=C.lazy(()=>Yp(()=>import("./index-CmbSgUyL.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}))),kl=Xe(nt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Nd({icon:e,...r}){const[n,t]=C.useState(!1);return zo(async()=>{t(!1),await jo(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}Nd.propTypes={icon:x.string.isRequired};function Ro({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=Rc(),{blocklet:u}=$t(),d=Xr(Z=>Z.breakpoints.down("md")),f=u.environments.find(Z=>Z.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:y,locale:b}=Ee(),{isIconId:I,iconId:_}=Vx(e),[P,w]=C.useState(null),{onChange:D,onBlur:S,sx:T,...R}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Bt({showPopover:!1}),E=oe(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:f?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[f?.value,c]),B=oe(async Z=>await h.current.getUploader().uploadFile(Z)),$=oe(()=>{w(null)}),U=oe(()=>{L&&w(m.current)}),J=oe(async Z=>{try{if(o==="url"){const q=Ux(Z),ne=await qp(q,{width:128,height:128}),ie=await Vp(ne,Z);await B(ie)}else D?.(Z)}catch(q){console.error("Failed to pick icon:",q)}$()}),ee=oe(Z=>{Z.stopPropagation(),v.current.open(),$()}),Q=oe(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(ut,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:L?U:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Nn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(kl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Nn,{position:"end",children:[g.jsx(je,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),D("")},children:g.jsx(Jc,{style:{fontSize:18}})}),O&&g.jsx(Kp,{title:y("common.upload"),children:g.jsx(je,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Nd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(re,{component:pg,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(Zi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...d&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Md,{label:n,placeholder:t,value:I?_:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(To,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:Q}),g.jsx(To,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:Q}),g.jsx(Zi,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:m.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:g.jsx(kl,{size:120,icon:E(e),alt:"Error"})})]})}Ro.propTypes={value:x.string.isRequired,label:x.any,placeholder:x.any,helperText:x.string,methods:x.arrayOf(x.oneOf(["select","upload"])),iconifyShape:x.oneOf(["id","url"])};function Md({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=C.useState([]),[c,u]=C.useState(!0),[d,f]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),y=C.useRef(1),b=C.useRef(!0),{t:I}=Ee(),_=96,P=oe(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*_,R=S*_,O=m.current.slice(T,R);l(L=>[...L,...O]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=oe(S=>{m.current=S,y.current=1,b.current=S.length>_;const T=S.slice(0,_);l(T),h(S.length===0),b.current&&P()}),{run:D}=Tc(async S=>{if(S){u(!0);try{const{icons:T}=await Wx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:O,clientHeight:L}=v.current;(R+L>=O-150||O<=L)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),zo(async()=>{if(d)D(d);else{u(!0);try{const S=await Hx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[d,D,w]),g.jsxs(Yx,{ref:v,sx:t,...a,children:[g.jsxs(re,{className:"icon-picker-input",children:[g.jsx(ut,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:d,sx:{flexGrow:1},autoFocus:!0,onChange:S=>f(S.target.value),slotProps:{input:{endAdornment:g.jsx(je,{sx:{visibility:d?"visible":"hidden"},onClick:()=>f(""),children:g.jsx(Jc,{style:{fontSize:18}})})}}}),g.jsx(Ct,{onClick:o,children:I("common.cancel")})]}),g.jsxs(re,{children:[s.length>0&&g.jsx(re,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:s.map(S=>g.jsx(Jx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(ye,{icon:S,width:"32",height:"32"})},S))}),p&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(re,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(re,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(_c,{size:20})})]})]})}Md.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Yx=Xe(re)(({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}})),Jx=Xe(je,{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 To({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 g.jsx(C.Suspense,{children:g.jsx(Kx,{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}})})}To.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const Ol=24,El=48,Nl="add";x.string.isRequired;function ha({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Yc(),{t:s,locale:l}=Ee(),{localeMap:c,defaultLocale:u}=fa(),d=oe(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),f=oe(k=>Xc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(N=>Qt(k[N])?Object.keys(k[N]):[]))),u)),p=C.useRef(()=>{}),h=Bt({isRoot:!0,type:Nl,linkDisabled:!1,locale:u,formState:d(),get localeList(){return f(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:I,formState:{errors:_}}=cg({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=ug({control:m}),w=P.component,D=P.title,S=P.description,T=P.link,R=P.parent;C.useEffect(()=>{h.formState.title[h.locale]=D},[D]),C.useEffect(()=>{h.formState.description[h.locale]=S},[S]),C.useEffect(()=>{h.formState.link[h.locale]=T},[T]),C.useEffect(()=>{i?.(P)},[P,i]);const O=C.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===R),[n,t,w,R]),L=C.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Qt(N)?N[h.locale]:N;if(w)return eo(j);const V=Qt(O.link)?O.link[h.locale]:O.link;return eo(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=C.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ae.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ae.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=oe(()=>{h.isRoot=!0,h.locale=u,h.type=Nl,h.linkDisabled=!1,h.formState=d(),y(),I(),p.current=()=>{}}),E=oe((k={})=>(h.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(N=>{Pg(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Bo(k.role)&&(k.role=void 0),k)),B=oe(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),$=oe((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:pe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const me=f(k),Ce=(Se,Pe)=>{Dc(Se)?h.formState[Pe]=me.reduce((Fe,ke)=>(Fe[ke]=Se,Fe),{[u]:Se}):Qt(Se)?h.formState[Pe]=rt(Se):h.formState[Pe]={}};be.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),be.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",pe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const Pe=Jp(Se,["id","title","description","icon","component","link","role"]);N(Pe)}}),U=oe(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>Ol)return s("navigation.form.titleTooLong",{len:Ol})}return!0}),J=oe(k=>{const N=k?.trim();return N&&N.length>El?s("navigation.form.descriptionTooLong",{len:El}):!0}),ee=oe(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),Q=oe(async k=>{const N=k?.trim();if(N){if(Fo(ee(N)))return!0;try{await jo(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=oe(k=>{const N=k?.trim();return N?Q(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=oe(k=>{const N=k?.trim();return N?Ae.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),ne=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{I()})}),ie=oe(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=oe(k=>{const N=ie();N===!0?p.current(E(k)):Mt.error(N)}),G=oe(k=>{h.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=At(h.formState[N],k)}),i?.(P)}),W=oe(k=>{h.locale=k,be.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{I()})});return C.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,$,v,ue]),g.jsxs(re,{...o,children:[g.jsx(Od,{sx:{mb:1},onAdd:W,onChange:ne,onRemoveLocale:G,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(pt,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(Ro,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(pt,{name:"icon",control:m,rules:{validate:Q},render:({field:k})=>g.jsx(Ro,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!_?.icon?.message,helperText:_?.icon?.message,disabled:h.locale!==u,...k})}),h.isRoot&&g.jsx(pt,{name:"component",control:m,render:({field:k})=>g.jsx(no,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholder:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!_?.component?.message,helperText:_?.component?.message||" ",...At(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(pt,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!_?.description?.message,helperText:_?.description?.message||" ",...k})}),g.jsx(pt,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(Pc,{fullWidth:!0,margin:"dense",children:g.jsx(gg,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(ut,{...N,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!_?.link?.message,helperText:_?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:L?g.jsx(Nn,{position:"start",sx:{textDecoration:Gx(T||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(re,{component:"li",...N,children:[j.label,g.jsx(de,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(pt,{name:"role",control:m,render:({field:k})=>g.jsx(no,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholder:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!_?.role?.message,helperText:_?.role?.message||" ",...At(k,"ref")})}),r==="bottomNavigation"&&g.jsx(pt,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(ut,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!_?.title?.message,helperText:_?.title?.message||" ",...k})})]})]})}ha.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function ga({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Ee(),[o,{setTrue:a,setFalse:s}]=sg(),[l,c]=C.useState("add"),u=C.useRef(null),d=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),f=C.useCallback(()=>{s(),u.current?.reset()},[s]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(f,y)),a()},[a,f]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(f,y)),a()},[a,f]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:f}),[p,h,f]),g.jsx(kc,{open:o,title:d,keepMounted:!0,onClose:f,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Mn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ha,{ref:u,section:r,components:n,rawNavigations:t})})}ga.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Ad({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Ee(),l=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const d=C.useCallback(v=>{u(v),r(o)},[r,o]),f=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:s(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(je,{size:"small",color:"success",onClick:d,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(je,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?s("navigation.action.noEdit"):o.visible?s("navigation.action.hide"):s("navigation.action.show"),children:g.jsx(je,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(je,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Ad.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Pn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Qx=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},Xx=(e,r="en",n="en")=>{if(typeof e=="string"){if(Td(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(_d(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Oc(o.items?.length?o.link:Xx(o.link,r,n),t),_rawLink:o.link}),"items")},Zx=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),eS=e=>{if(!e?.length)return null;const r=Zx(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},va=e=>{if(!e)return null;const r={...e};return r.theme=Qx(r.theme),r.navigation=eS(tS(r.navigation)),r},tS=(e=[])=>da(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Ld=(e,r)=>da(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"),rS={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"/>'},nS={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 iS({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(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(v=>p.component===v.name);return{...p,component:h}}),l=ot(),c=C.useRef(null),u=Bt({open:!1}),d=oe((p=!u.open)=>{u.open=p}),f=t==="hover"?{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}:{onClick:()=>d()};return s.length===0||!e?.user?null:g.jsxs(re,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...f,children:[g.jsx(je,{size:"medium",ref:c,children:g.jsx(ye,{icon:rS,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Qp,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Xp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),d(!1)},children:g.jsx(Ec,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Zp,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(eh,{disablePadding:!0,children:g.jsxs(vg,{href:$a(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?g.jsx(re,{component:"img",src:`${Nc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||nS,color:l.palette.text.secondary}),g.jsx(de,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:$a(h.title,r)})]})},h.id))}),g.jsx(th,{session:e,children:g.jsx(Mn,{variant:"outlined",fullWidth:!0,href:rh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const zd=x.shape({appLogo:x.node,appName:x.string,theme:x.shape({background:x.string}),enableConnect:x.bool,enableLocale:x.bool,navigation:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object]),icon:x.string,items:x.arrayOf(x.shape({title:x.oneOfType([x.string,x.object]),link:x.oneOfType([x.string,x.object])}))}))}),jd=x.shape({showText:x.bool,showRole:x.bool,switchDid:x.bool,switchProfile:x.bool,switchPassport:x.bool,disableLogout:x.bool,onLogin:x.func,onLogout:x.func,onSwitchDid:x.func,onSwitchProfile:x.func,onSwitchPassport:x.func,menu:x.array,menuRender:x.func,dark:x.bool,size:x.number,profileUrl:x.string}),oS=["admin","owner"],aS=e=>e.endsWith(".ip.abtnet.io"),sS=e=>e.endsWith(".did.abtnet.io"),lS={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:"配置域名"}},cS=1e3*60*60*24*30,Ml=".well-known/service/admin/domains";function Fd({locale:e="en",session:r={}}){const n=r?.user,t=Qc(),[i,o]=C.useState(()=>{const f=window.localStorage.getItem("domain-warning-skip");if(!f)return!0;const p=+new Date,h=+new Date(f);return p-h>cS}),a=oe((f,p={})=>ei(lS,f,e,"en",p)),s=C.useMemo(()=>{try{const{hostname:f}=new URL(window.location.href);return f}catch{return""}},[]),l=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const f=Re(window.location.origin,Ml);f.startsWith("http")&&window.open(f,"_blank"),o(!1)},[]),d=n?.role&&oS.includes(n.role);return window.location.href.includes(Ml)||t||!aS(s)&&!sS(s)?null:g.jsxs(nh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(ih,{sx:{padding:"20px !important"},children:[g.jsx(de,{sx:{fontSize:"20px",fontWeight:"500"},children:a(d?"owner.title":"guest.title")}),g.jsx(de,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(d?"owner.description":"guest.description")}),d&&g.jsx(re,{component:"ul",children:l.map(f=>g.jsx(de,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:f},f))})]}),g.jsxs(oh,{sx:{px:"12px !important"},children:[g.jsx(Ct,{onClick:c,children:a("skip")}),d&&g.jsx(Ct,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Fd.propTypes={locale:x.string,session:x.object};const Me={};function uS(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Nc,e);return new lh.WsClient(n,{heartbeatIntervalMs:100*1e3})}function dS(e="admin"){return Me[e]||(Me[e]=uS(e)),Me[e]}const fS=(e="admin")=>{const r=C.use(ti),{session:n}=r??{},t=Te(()=>n.user?.did,[n.user]),i=ah(t);return sh(()=>{Object.keys(Me).forEach(o=>{Me[o]?.isConnected()&&Me[o]?.disconnect(),delete Me[o]})}),t?(i&&i!==t&&Object.keys(Me).forEach(o=>{Me[o]&&(Me[o].isConnected()&&Me[o].disconnect(),Me[o].connect())}),!Me[e]&&n.user&&(Me[e]=dS(e),Me[e].connect()),Me[e]):null},pS={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>'},hS={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"/>'},gS={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 vS(){const e=ot();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Xr(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const mS=e=>!Bo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,bS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},yS=async(e,r)=>{try{return await Ac().user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},xS=async(e,r)=>{const{type:n,did:t}=e;return Mc.isSameAddr(n,"did")?await yS(t,r)||An.getLink(e):An.getLink(e)},SS=async(e,r,n=!0)=>{const t=An.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof An.Link){if(n){const o=await xS(i,r),{type:a,chainId:s,did:l}=i;return Mc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${s}" data-did="${l}">${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="${s}" data-did="${l}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},wS=e=>ch.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),CS={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=ot(),t=ri(Re(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Lc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function IS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=ot(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Te(()=>{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]),d=Te(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),f=oe(()=>{if(!Array.isArray(d)||d.length===0)return null;if(d.length===1)return g.jsx(Jt,{user:d[0],color:c});const m=d.slice(0,-1),y=d[d.length-1];if(d.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{user:y,color:c})]});const b=d.length>3,I=b?d.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((_,P)=>g.jsxs(X.Fragment,{children:[g.jsx(Jt,{user:_,color:c}),P<I.length-1?", ":""]},_.did)),b?`, and ${d.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=oe(()=>{const m=a?CS[a]:null;return m?m(l,r.length):null}),h=Te(()=>{const m=f(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,d,f,p]),v=Te(()=>{if(!e)return null;const m=bS(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Bo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Lc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const RS={normal:Ga,success:pS,info:Ga,warning:hS,error:gS},TS=dr(ph)`
44
44
  font-size: 20px;
45
45
  `,_S=dr.div`
46
46
  display: flex;