@abtnode/webapp 1.17.3-beta-20251126-121502-d0926972 → 1.17.3-beta-20251127-063055-94957209

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 (188) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-BjSFvDvr.js → AdapterDayjs-DU0D4sqH.js} +1 -1
  4. package/dist/assets/{Add-BmZCIl-_.js → Add-BKe5i02H.js} +1 -1
  5. package/dist/assets/ArrowDropDown-DZ4LPniJ.js +1 -0
  6. package/dist/assets/{Autocomplete-kBTyvXut.js → Autocomplete-DK0iCUAm.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DbJOP5vy.js → Breadcrumbs-2mIcJJiP.js} +1 -1
  8. package/dist/assets/{ButtonGroup-BlhSVfK3.js → ButtonGroup-B86tCmd3.js} +1 -1
  9. package/dist/assets/{CSSTransition-Cyc7snYy.js → CSSTransition-BZnv4uwU.js} +1 -1
  10. package/dist/assets/{CallMerge-CKPqdgb2.js → CallMerge-BdwpnGaL.js} +1 -1
  11. package/dist/assets/{CardContent-CJq0LG9T.js → CardContent-B3Ns-1d7.js} +1 -1
  12. package/dist/assets/{ChevronLeft-B42HGuyE.js → ChevronLeft-DKTuWlNz.js} +1 -1
  13. package/dist/assets/{ChevronRight-BLRImDEd.js → ChevronRight-U_VKk8yi.js} +1 -1
  14. package/dist/assets/{Clear-BoRiznJI.js → Clear-Bjaoevyy.js} +1 -1
  15. package/dist/assets/{DeleteOutline-_XfCv5J6.js → DeleteOutline-1L0qVW5f.js} +1 -1
  16. package/dist/assets/{Done-b5-rnBrk.js → Done-fcctYBnn.js} +1 -1
  17. package/dist/assets/{Edit-DGAlfiQv.js → Edit-Df-gu5W0.js} +1 -1
  18. package/dist/assets/{ErrorOutline-DevVxMhb.js → ErrorOutline-C2BuHaFO.js} +1 -1
  19. package/dist/assets/{FilterList-tXxMVwM9.js → FilterList-ip4QUiRE.js} +1 -1
  20. package/dist/assets/{Google-MSCLr2Nf.js → Google-C4HUt8aJ.js} +1 -1
  21. package/dist/assets/{HelpOutline-DIH3coQJ.js → HelpOutline-Dn_yz-1h.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-DDe3llHj.js → KeyboardArrowDown-C9ZFNMos.js} +1 -1
  23. package/dist/assets/{Launch-DZ6lDDzp.js → Launch-CFi1NSiy.js} +1 -1
  24. package/dist/assets/{Link-CQj5KcJh.js → Link-CQpp_kV1.js} +1 -1
  25. package/dist/assets/{ListItemButton-BJq_k_rp.js → ListItemButton-Dq8kjXAC.js} +1 -1
  26. package/dist/assets/{ListSubheader-BO55OpFe.js → ListSubheader-BN5vdmXx.js} +1 -1
  27. package/dist/assets/{LoadingButton-Bw73z7Kp.js → LoadingButton-YsBwLHRI.js} +1 -1
  28. package/dist/assets/{MoreVert-CykMlsrj.js → MoreVert-BFhM4QD_.js} +1 -1
  29. package/dist/assets/{OpenInNew-D8CczU9i.js → OpenInNew-BQ_lyYyz.js} +1 -1
  30. package/dist/assets/{Refresh-BClPDZOR.js → Refresh-BH-2JQxb.js} +1 -1
  31. package/dist/assets/{Search-BrXfrk6s.js → Search-XYz8f8XA.js} +1 -1
  32. package/dist/assets/{Stepper-Clv2yUpj.js → Stepper-CgNQuoDq.js} +1 -1
  33. package/dist/assets/{Switch-btQlV2VF.js → Switch-D-GptXzp.js} +1 -1
  34. package/dist/assets/{TableSearch-BkWoZDH8.js → TableSearch-20ltCGV9.js} +2 -2
  35. package/dist/assets/{ToggleButtonGroup-BBbP2Jx0.js → ToggleButtonGroup-BeJ2H-vs.js} +1 -1
  36. package/dist/assets/{UnfoldMore-RJlxkooV.js → UnfoldMore-ogSRr9M8.js} +1 -1
  37. package/dist/assets/{Verified-l0Y44mJl.js → Verified-DoWJRqF2.js} +1 -1
  38. package/dist/assets/{VerifiedUser-agBH4B6_.js → VerifiedUser-C8oAKXOY.js} +1 -1
  39. package/dist/assets/{ViewList-DqVhCHtG.js → ViewList-B9yb0HBO.js} +1 -1
  40. package/dist/assets/{_createAggregator-D2uXgg5x.js → _createAggregator-Ctg83h-t.js} +1 -1
  41. package/dist/assets/{actions-DOkacRyd.js → actions-CEVha9Lm.js} +2 -2
  42. package/dist/assets/{actions-BPQhtNul.js → actions-CcYVxFDV.js} +1 -1
  43. package/dist/assets/{agreement-peew__AK.js → agreement-Do9LS1H9.js} +3 -3
  44. package/dist/assets/api-BgkTVaD7.js +1 -0
  45. package/dist/assets/{appearance-Nhx9Kmv1.js → appearance-BAXcLNQv.js} +1 -1
  46. package/dist/assets/{audit-logs-BlbUuwN_.js → audit-logs-CNWSS6cO.js} +2 -2
  47. package/dist/assets/{base-chart-CzLW1tBo.js → base-chart-CtBedy-P.js} +1 -1
  48. package/dist/assets/{blocklet-DooKd_sI.js → blocklet-Dcm-KWY0.js} +1 -1
  49. package/dist/assets/{chain-EI4hm_8e.js → chain-B1M1oJUZ.js} +1 -1
  50. package/dist/assets/click-to-copy-UAGH53Qf.js +1 -0
  51. package/dist/assets/cloneDeep-a4PlXlaR.js +1 -0
  52. package/dist/assets/{collapse-CmeTRdrT.js → collapse-SFvNptyB.js} +1 -1
  53. package/dist/assets/{config-navigation-SDiPbeiK.js → config-navigation-BXWbV-Cs.js} +3 -3
  54. package/dist/assets/{connect-to-DxqW5HVH.js → connect-to-C1HXhR31.js} +4 -4
  55. package/dist/assets/{cssMode-U50M1_i-.js → cssMode-a2Qinu_F.js} +1 -1
  56. package/dist/assets/{delete-confirm-B_mXlLTh.js → delete-confirm-CykvEZcZ.js} +1 -1
  57. package/dist/assets/{depsEqual-CI7FeWZW.js → depsEqual-CNVuMuEd.js} +1 -1
  58. package/dist/assets/{detail-B_ewDRP9.js → detail-DgAURCp6.js} +3 -3
  59. package/dist/assets/{domains-DWWQ8C3v.js → domains-DzUka-Py.js} +2 -2
  60. package/dist/assets/{download-Jmt9jl6E.js → download-DAgi3KG_.js} +1 -1
  61. package/dist/assets/{edit.svg-DOKf0NKv.js → edit.svg-DYBjroym.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-Dakakd0R.js +1 -0
  63. package/dist/assets/engine-4rlPqZXl.js +1 -0
  64. package/dist/assets/{freemarker2-wCdJg_1P.js → freemarker2-C-5txAzw.js} +1 -1
  65. package/dist/assets/{get-safe-url-mJazyUZj.js → get-safe-url-slTYcduh.js} +1 -1
  66. package/dist/assets/getValidReactChildren-D4p_s3zF.js +1 -0
  67. package/dist/assets/{graphqlMode-r_xp5vcq.js → graphqlMode-CqvY2dvn.js} +2 -2
  68. package/dist/assets/{handlebars-CmQCPbdG.js → handlebars-BYAvYDfA.js} +1 -1
  69. package/dist/assets/{html-DYkdCzxq.js → html-BvL9XBVt.js} +1 -1
  70. package/dist/assets/{html-title-x1db95S1.js → html-title-C8DFoE3o.js} +1 -1
  71. package/dist/assets/{htmlMode-B2_nCAdZ.js → htmlMode-B2ou9eLB.js} +1 -1
  72. package/dist/assets/{iframe-BBrwuPrb.js → iframe-B2nulerg.js} +1 -1
  73. package/dist/assets/{index-Bexo5RVe.js → index-B069rJrU.js} +1 -1
  74. package/dist/assets/{index-9oTGqHiK.js → index-B0ezkZD_.js} +9 -9
  75. package/dist/assets/{index-DYWrZZLV.js → index-B22sxjhK.js} +1 -1
  76. package/dist/assets/{index-Ca1VB0fP.js → index-B7yK5r9r.js} +1 -1
  77. package/dist/assets/{index-m0BJnU58.js → index-BE_VxsDo.js} +1 -1
  78. package/dist/assets/{index-Bsv4O26i.js → index-BIyZS31y.js} +3 -3
  79. package/dist/assets/{index-cW_e6AnH.js → index-BQoDUo8G.js} +14 -14
  80. package/dist/assets/{index-C6nj_8zr.js → index-BTZ0eV0N.js} +1 -1
  81. package/dist/assets/{index-DMGtaArc.js → index-BVPjbwFh.js} +3 -3
  82. package/dist/assets/{index-Bge0nxkS.js → index-BYvHyq2X.js} +2 -2
  83. package/dist/assets/{index-BKe-qavD.js → index-BeBFdIcq.js} +1 -1
  84. package/dist/assets/{index-CMGLmPFR.js → index-Bk3Q7htA.js} +2 -2
  85. package/dist/assets/{index-eIb8MZiw.js → index-BxE9QNGJ.js} +1 -1
  86. package/dist/assets/{index-BD7DDM8N.js → index-C-ZSaiUf.js} +1 -1
  87. package/dist/assets/{index-BX3e3-Yl.js → index-C-ikBis3.js} +10 -10
  88. package/dist/assets/{index-DlRSxwJY.js → index-C3LdZf6o.js} +3 -3
  89. package/dist/assets/{index-D0h_Lxum.js → index-C4O6nFZK.js} +1 -1
  90. package/dist/assets/{index-BwyiJPiC.js → index-C4sXNe3X.js} +1 -1
  91. package/dist/assets/{index-BGAQvWoz.js → index-CGPesPdM.js} +1 -1
  92. package/dist/assets/{index-sHP8LVQG.js → index-CQBXMXxB.js} +1 -1
  93. package/dist/assets/{index-BNYZMueI.js → index-CcoyIHc2.js} +1 -1
  94. package/dist/assets/{index-8dobedE4.js → index-Cmq6DzBi.js} +1 -1
  95. package/dist/assets/{index-B7vOpBED.js → index-Cq0PEg3C.js} +1 -1
  96. package/dist/assets/{index-CCR0588i.js → index-CzOe4kWN.js} +1 -1
  97. package/dist/assets/{index-MQfB--7g.js → index-D1v2ub6O.js} +1 -1
  98. package/dist/assets/{index-DSwwhtGQ.js → index-DDHwRT_8.js} +1 -1
  99. package/dist/assets/{index-Cs2sn0We.js → index-DE2n9InK.js} +8 -8
  100. package/dist/assets/{index-D1rJ129A.js → index-DKNNRdfd.js} +2 -2
  101. package/dist/assets/{index-C6cKgXcg.js → index-DLW-FPc1.js} +1 -1
  102. package/dist/assets/{index-DWhhB9Hi.js → index-DNQRuNMg.js} +2 -2
  103. package/dist/assets/{index-BDfVLYgm.js → index-DcJaC3Zv.js} +1 -1
  104. package/dist/assets/{index-CNWl5k-n.js → index-Dd8DBQ06.js} +1 -1
  105. package/dist/assets/{index-ccBUb-g_.js → index-DevzmDa7.js} +2 -2
  106. package/dist/assets/{index-Q3-b6N6x.js → index-Dmm7CN3L.js} +1 -1
  107. package/dist/assets/{index-B6WuMj55.js → index-DrzeWNxs.js} +1 -1
  108. package/dist/assets/{index-BvQcTKRh.js → index-DudW3VZ0.js} +1 -1
  109. package/dist/assets/{index-CvM9vyEK.js → index-DxHUxvwT.js} +1 -1
  110. package/dist/assets/{index-BJY_2WX8.js → index-Dxb5VoXb.js} +1 -1
  111. package/dist/assets/{index-B1zRPZ23.js → index-Dxe6NqUd.js} +1 -1
  112. package/dist/assets/{index-bHYz6L_6.js → index-Gy9GijRe.js} +1 -1
  113. package/dist/assets/{index-CsRtSmIh.js → index-MI1PE9cE.js} +1 -1
  114. package/dist/assets/index-PmpfUMid.js +1 -0
  115. package/dist/assets/{index-Bf9Tsnzp.js → index-m59yehWt.js} +1 -1
  116. package/dist/assets/{index-B3mxPYvg.js → index-o0W75sh0.js} +2 -2
  117. package/dist/assets/{index-l0ejZk6e.js → index-t7M3AlIl.js} +2 -2
  118. package/dist/assets/{index-tY4NTQdt.js → index-zEOfnqWp.js} +1 -1
  119. package/dist/assets/{index.esm-CmfVZ8uo.js → index.esm-y0ki7yla.js} +1 -1
  120. package/dist/assets/{install-from-url-DKaI4Rhw.js → install-from-url-bDGtH7bg.js} +1 -1
  121. package/dist/assets/{invitation-BP2qXMkU.js → invitation-BMQ8ii-U.js} +2 -2
  122. package/dist/assets/{is-path-prefix-equal-D367I16F.js → is-path-prefix-equal-6ZIHUdY4.js} +1 -1
  123. package/dist/assets/{item-C6-NqxXS.js → item-CcYR2iTB.js} +8 -8
  124. package/dist/assets/{javascript-C8IdANXc.js → javascript-Dv9tLB_N.js} +1 -1
  125. package/dist/assets/{jsonMode-7RTtLpT6.js → jsonMode-DUlsfgRc.js} +1 -1
  126. package/dist/assets/{liquid-CF0mRQ0b.js → liquid-C9JfvrHT.js} +1 -1
  127. package/dist/assets/{list-header-DnPG8RQK.js → list-header-DE2pVYNH.js} +1 -1
  128. package/dist/assets/{lock.svg-DIpUz3_T.js → lock.svg-DK6tzOS0.js} +1 -1
  129. package/dist/assets/{log-CLLKDcVS.js → log-B0JHspX2.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-BzADuacJ.js → lottie-react.esm-BQ1sE4G7.js} +1 -1
  131. package/dist/assets/{mdx-393D49gD.js → mdx-D_F4JUXE.js} +1 -1
  132. package/dist/assets/{memory-BiZfGzaA.js → memory-Ca0TT2wR.js} +1 -1
  133. package/dist/assets/{metric-DQF3F8Ee.js → metric-B_ux39Cy.js} +1 -1
  134. package/dist/assets/omit-Cxe_6CRp.js +1 -0
  135. package/dist/assets/{overview-CCLYGiqE.js → overview-DdKaJYs3.js} +1 -1
  136. package/dist/assets/{permission-CB_zs2G4.js → permission-DL-rt2kz.js} +1 -1
  137. package/dist/assets/{preference-2qHeMKaE.js → preference-B32PPIXC.js} +4 -4
  138. package/dist/assets/{python-DeXJ9-sq.js → python-DxxmtajH.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-gP-_XKJP.js → raf-schd.esm-C3uAJs0d.js} +1 -1
  140. package/dist/assets/{razor-D15rTZli.js → razor-C21hzdPt.js} +1 -1
  141. package/dist/assets/{rotate-session-key-BqAzAxv_.js → rotate-session-key-Cxb_738W.js} +1 -1
  142. package/dist/assets/{runtime-Cf5aBcfV.js → runtime-Bdx0ukMN.js} +1 -1
  143. package/dist/assets/schema-CSqqEtp_.js +1 -0
  144. package/dist/assets/sdk-C4od53R_.js +1 -0
  145. package/dist/assets/{service-pECpZ6Fv.js → service-BM2nSHO0.js} +1 -1
  146. package/dist/assets/{shorten-label-5tBjSQXq.js → shorten-label-DnblKkIH.js} +1 -1
  147. package/dist/assets/{simple-select-DCNot1u5.js → simple-select-DPUPpFQ5.js} +1 -1
  148. package/dist/assets/{spaces-1p_UMor_.js → spaces-BKKKu_Dh.js} +1 -1
  149. package/dist/assets/{status-Xk2ZLYz1.js → status-COOoCu8i.js} +1 -1
  150. package/dist/assets/{status-DyTELFmb.js → status-DtYf6aZS.js} +1 -1
  151. package/dist/assets/{switch-control-DBKg8KSu.js → switch-control-CNmlIEr7.js} +1 -1
  152. package/dist/assets/{table-icons-DfjWu9CY.js → table-icons-C91WckX-.js} +1 -1
  153. package/dist/assets/{team-DHZ07Mee.js → team-DMp941g-.js} +1 -1
  154. package/dist/assets/{toLower-ylIkvfVr.js → toLower-BOZmijH1.js} +1 -1
  155. package/dist/assets/toUpper-BVrGP8Kf.js +1 -0
  156. package/dist/assets/{traffic-BlWSHfOP.js → traffic-CAtwfrwW.js} +1 -1
  157. package/dist/assets/{tsMode-BbObiMoD.js → tsMode-BsmIUAx_.js} +1 -1
  158. package/dist/assets/{typescript-Cuj7nGhN.js → typescript-CuXsCA8e.js} +1 -1
  159. package/dist/assets/{url-evaluation-DAoEPnuZ.js → url-evaluation-Dx99nTAj.js} +1 -1
  160. package/dist/assets/{url-join-CNIVoOP5.js → url-join--uxDIQ5s.js} +1 -1
  161. package/dist/assets/{use-mobile-B06ZsBLv.js → use-mobile-B_qRraPN.js} +1 -1
  162. package/dist/assets/{use-mobile-DRLSkCfk.js → use-mobile-gk4f0z32.js} +1 -1
  163. package/dist/assets/{useAsync-C_IdsZLT.js → useAsync-BkAVfcXM.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-AD_J4c2Y.js → useAsyncRetry-B53j1afR.js} +1 -1
  165. package/dist/assets/{useLocalStorage-CaDSR1Wc.js → useLocalStorage-BNDc6dCy.js} +1 -1
  166. package/dist/assets/{useThemeProps-DAtqRnvX.js → useThemeProps-CWZCrmyJ.js} +1 -1
  167. package/dist/assets/{util-B5JRPt0_.js → util-Hbz7ULeM.js} +1 -1
  168. package/dist/assets/{wait-container-D08poArP.js → wait-container-BwhzxN9f.js} +1 -1
  169. package/dist/assets/{without-wallet-Cq0jHe0-.js → without-wallet-Bms_Rs1m.js} +1 -1
  170. package/dist/assets/wrap-locale-BYm00LUc.js +1 -0
  171. package/dist/assets/{xml-yaEsWuy9.js → xml-jOEN8hj5.js} +1 -1
  172. package/dist/assets/{yaml-B2xGL9-8.js → yaml-DIuLKVgk.js} +1 -1
  173. package/dist/index.html +1 -1
  174. package/dist/service-worker.js +1 -1
  175. package/package.json +1 -1
  176. package/dist/assets/ArrowDropDown-DAMbspww.js +0 -1
  177. package/dist/assets/api-BEwC7jzb.js +0 -1
  178. package/dist/assets/click-to-copy-BYLhYz_K.js +0 -1
  179. package/dist/assets/cloneDeep-F6LuuTz3.js +0 -1
  180. package/dist/assets/emotion-cache.browser.esm-CKIgFJwY.js +0 -1
  181. package/dist/assets/engine-PA5Hlqhs.js +0 -1
  182. package/dist/assets/getValidReactChildren-C2GpPG5h.js +0 -1
  183. package/dist/assets/index-B8pH5JDj.js +0 -1
  184. package/dist/assets/omit-B8z6Iws2.js +0 -1
  185. package/dist/assets/schema-DVKja_3K.js +0 -1
  186. package/dist/assets/sdk-D_BY3a8P.js +0 -1
  187. package/dist/assets/toUpper-D9lAXG2I.js +0 -1
  188. package/dist/assets/wrap-locale-fe2iWyZX.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DlRSxwJY.js","./index-l0ejZk6e.js","./index-DGkT7afN.css","./url-join-CNIVoOP5.js","./index-BD7DDM8N.js","./_createAggregator-D2uXgg5x.js","./depsEqual-CI7FeWZW.js","./index-BGAQvWoz.js","./index-DRYJ0xIl.js","./toUpper-D9lAXG2I.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
- import{b$ as eh,b_ as th,r as I,c0 as rh,eT as nh,j as g,b8 as ot,c2 as nt,c3 as ih,hA as oh,hB as ah,gy as sh,dt as lh,hC as ch,du as uh,bP as pc,bQ as dh,bN as fh,bO as hh,bS as gc,dx as $n,hD as ph,eD as gh,ho as vh,gS as mh,dE as bh,gP as vc,hE as yh,gC as xh,fq as Sh,eE as wh,hb as Ch,V as Me,a2 as Qe,y as Ie,aH as be,aP as zt,c6 as Et,i as Ih,fb as Rh,eO as Th,hr as Dh,dw as Rr,ez as vr,dh as mc,dB as _h,hF as Ph,dA as bc,bd as Gn,dO as nr,hG as F,e_ as K,eH as kh,hH as Yr,be as Q,o as x,dM as Wn,aQ as Oo,hI as Eo,cA as er,aD as xe,b as ht,K as oe,af as Oh,cv as se,b9 as No,dC as Yt,T as me,a3 as Ae,b1 as Yi,dI as xt,hJ as Eh,bn as yc,E as Hn,hK as Nh,hL as Mh,t as it,fo as Rn,ay as Ah,br as Ve,fe as xc,C as Sc,bI as Lh,hM as Ma,M as Mo,fa as zh,f6 as wc,H as Ot,O as Cc,$ as Ic,v as Tn,hN as Rc,f as jt,dL as jh,by as Fh,gG as Tc,dJ as Or,a6 as Bh,a7 as $h,hO as Aa,hP as Dc,hQ as Gh,hR as Wh,hS as Un,ff as Hh,g8 as Uh,g9 as qh,hT as Vh,hU as Kh,hV as Yh,ge as qn,bC as Le,hW as Jh,h7 as Xh,hX as Qh,gL as Zh,hY as Dn,hZ as _c,L as Pc,z as Vn,h_ as La,h$ as kc,i0 as Ji,i1 as ep,i2 as tp,s as cr,i3 as rp,f5 as np,cz as Oc,i4 as ip,bF as op,i5 as ap,dH as Ye,D as sp,U as lp,cu as cp,i6 as up,a$ as dp,bg as za,Q as _n,a8 as ja,i7 as fp,i8 as hp,i9 as pp,ia as gp,ib as Ec,ic as vp,aB as Nc,f0 as Mc,id as Ao,ie as mp,hk as Ac,ig as bp,b5 as yp,cE as Jt,ih as xp,cT as Sp,ii as wp,d2 as Cp,G as Fa,dp as ui,eI as Ba,dN as Ip,ij as Rp,a4 as Lc,X as $a,ik as Ga,P as Tp,S as Wa}from"./index-l0ejZk6e.js";import{r as Dp}from"./omit-B8z6Iws2.js";import{r as _p}from"./cloneDeep-F6LuuTz3.js";import{r as Pp}from"./index-BD7DDM8N.js";import{c as kp,u as Op}from"./_createAggregator-D2uXgg5x.js";import{u as Ft}from"./blocklet-DooKd_sI.js";import{H as Ep,G as Np,M as Mp,N as Ap,O as Ha,K as Lp,L as zp}from"./index-BwyiJPiC.js";import{_ as Se,a as we,b as Ge,c as We,d as He,e as jp,f as zc,u as fe,g as ne,r as Fr,w as Pn,h as jc,i as Bt,j as Fc,k as Fp,l as Bp,o as Xi}from"./raf-schd.esm-gP-_XKJP.js";import{_ as A,b as Ua,c as $p,a as Gp,d as Wp}from"./redux-DfszZyTl.js";import{_ as Hp}from"./typeof-QjJsDpFa.js";import{u as Bc,b as Up}from"./team-DHZ07Mee.js";import{b as qp}from"./actions-DOkacRyd.js";import{u as Vp,a as Kp,C as lt}from"./index.esm-CmfVZ8uo.js";import{S as Qi}from"./simple-select-DCNot1u5.js";import{b as Yp,a as qa}from"./html-title-x1db95S1.js";import{C as $c}from"./Clear-BoRiznJI.js";import{A as Jp}from"./ArrowDropDown-DAMbspww.js";import{a as Xp}from"./api-BEwC7jzb.js";import{A as Qp}from"./Autocomplete-kBTyvXut.js";import{L as Zp}from"./ListItemButton-BJq_k_rp.js";import{u as Gc}from"./use-mobile-DRLSkCfk.js";import{u as eg}from"./index-BDfVLYgm.js";import{d as tg}from"./KeyboardArrowDown-DDe3llHj.js";import{S as rg}from"./Search-BrXfrk6s.js";import{A as ng}from"./Add-BmZCIl-_.js";import{O as ig}from"./OpenInNew-D8CczU9i.js";import{t as og}from"./index-DSwwhtGQ.js";import{I as ag}from"./iframe-BBrwuPrb.js";import{B as di}from"./ButtonGroup-BlhSVfK3.js";import{L as Va}from"./LoadingButton-Bw73z7Kp.js";import"./depsEqual-CI7FeWZW.js";import"./url-evaluation-DAoEPnuZ.js";import"./useLocalStorage-CaDSR1Wc.js";import"./MoreVert-CykMlsrj.js";import"./get-safe-url-mJazyUZj.js";import"./permission-CB_zs2G4.js";import"./ListSubheader-BO55OpFe.js";import"./getValidReactChildren-C2GpPG5h.js";function sg(e){return eh("MuiListItemAvatar",e)}th("MuiListItemAvatar",["root","alignItemsFlexStart"]);const lg=e=>{const{alignItems:r,classes:n}=e;return ih({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},sg,n)},cg=ot("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}}]}),Ka=I.forwardRef(function(r,n){const t=rh({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(nh),s={...t,alignItems:a.alignItems},l=lg(s);return g.jsx(cg,{className:nt(l.root,i),ownerState:s,ref:n,...o})});var ug=oh(function(){return ah?sessionStorage:void 0});function dg(e,r){return sh(r,function(n){return e[n]})}function fg(e){return e==null?[]:dg(e,lh(e))}var hg=ch.isFinite;function Ya(e){return typeof e=="number"&&hg(e)}function pg(e){return typeof e=="number"&&e==uh(e)}var gg=kp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const vg=Object.freeze(Object.defineProperty({__proto__:null,default:gg},Symbol.toStringTag,{value:"Module"}));var mg=pc(function(e){var r=dh(e);return r=typeof r=="function"?r:void 0,fh(hh(e,1,gc,!0),void 0,r)});const bg=Object.freeze(Object.defineProperty({__proto__:null,default:mg},Symbol.toStringTag,{value:"Module"}));var Wc=pc(function(e,r){return gc(e)?qp(e,r):[]}),mr={};const yg=$n(bg),xg=$n(ph),Sg=$n(vg);var Ja;function wg(){return Ja||(Ja=1,function(e){var r=mr&&mr.__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=ie,e.deepWalk=w,e.isMatchSection=_,e.nestNavigationList=ee,e.filterNavigation=X,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=gh(),t=r(yg),i=r(vh),o=r(mh),a=r(xg),s=r(bh),l=r(Dp),c=r(_p),u=Ch(),f=r(Pp()),d=r(vc()),h=r(yh),p=r(xh),v=r(Sg),m=Sh(),y=wh();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",P="/";function w(G,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((he,Ce)=>{O(he,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O(G)}function _(G,W){return W===b&&(0,a.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function S(G){try{return JSON.parse(G)}catch{return G}}function T(G){return G.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R(G="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join(G,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k(G,W,{strict:L=!0}={}){let N=G,O=W;return L||(N=N||"/",O=O||"/"),(0,h.default)(N)&&(0,p.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,p.default)(N)&&(0,y.checkLink)(N)&&(0,h.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,p.default)(N)&&(0,p.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,h.default)(N)&&(0,h.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j(G,W){const L=(0,c.default)(G);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M(G=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)(G),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const he=de.map(Ce=>L(Ce,U));if(te)te.items.push(...he);else{const Ce=L((0,l.default)(U,["items"]),te);O.push(Ce,...he)}}else if(ae===1){const he=L((0,l.default)(U,["items"]),te);O.push(he)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E(G={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,he=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...he);const Ce=U.name||"",ze=U.mountPoint||C,ye=O===G?"":de.name||"",_e=O===G?"":O.mountPoint||C;for(const le of ae){if(!(0,m.hasStartEngine)(le.meta))continue;const ve=le.meta.name,at=le.mountPoint,gr=[Ce,ye,ve].filter(Boolean).join("."),li=le.meta.navigation||[],ci=(0,u.joinURL)(ze,_e,at);le.meta?.capabilities?.navigation!==!1&&W.push({did:le.meta.did,name:gr,link:ci,title:le.meta.title||"",navigation:li.map(Xe=>({section:b,...Xe}))});const st=he.find(Xe=>Xe.component?Xe.component===ve:!1);if(st){if(!st.link)if(le.meta.navigation&&le.meta.navigation.length>0){const Xe=L(le,{mountPoint:_e,name:ye});Xe.length>0&&(st.items=st.items??[],st.items.push(...Xe))}else st.link=D}else if(le.meta?.capabilities?.navigation!==!1){const Xe=L(le,{mountPoint:_e,name:ye}),an={title:le.meta.title,component:ve,id:le.meta.did};Xe.length>0?(an.items=Xe,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L(G),components:W}}function B(G){const W=(0,c.default)(G).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(P)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function $(G,W=2){const L=(0,c.default)(G),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q(G,W){return W&&Array.isArray(G.items)?G.items.filter(L=>(0,a.default)(L.section)?_(G.section,W):!!_(L.section,W)).map(L=>({...L,section:W})):[]}function J(G){const W=(0,c.default)(G),L=[];for(const N of W){let te=function(ae,de){const he=q(ae,de);U.push({...O,section:de,items:he})};const O=(0,c.default)((0,l.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((he,Ce)=>{const{section:ze=[b]}=Ce||{};return he.push(...ze),he},[]),de=[...new Set(ae)];for(const he of de)te(N,he)}else U.push({...N,section:b});L.push(...U)}return L}function ee(G=[]){const W=(0,c.default)(G);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function X(G,W=[]){const L=ee(G);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z(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 V=G=>{const[W,L]=(0,v.default)(G,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=G=>{const[,W]=(0,v.default)(G,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie(G={},W={}){const{beforeProcess:L=le=>le}=W,{navigationList:N,components:O}=E(G),U=new Map;N.forEach(le=>{le.items?.forEach(ve=>{U.set((0,u.joinURL)(le.id,ve.id),ve)})});const te=(0,s.default)(G,"settings.org.enabled",!1);G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(le=>!(le?.parent==="/team"&&le.from==="team-tmpl")).map(le=>{if(le.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(le,"private")){const ve=U.get(le.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(le.private=ve.private)}return!te&&le.section==="userCenter"&&le.id==="/userCenter/orgs"?null:le}).filter(Boolean):G.settings.navigations=[]);const ae=T(re(G?.settings?.navigations||[])).map(H),de=$(L(N)),he=B(de),ze=J(he).reduce((le,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(le.push(...ve.items.map(gr=>{const{section:li}=ve,ci=k(ve.link,gr.link),st=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:ci,component:st,parent:""}})),le):(le.push(ve),le),[]),ye=M(ze,{transform(le,ve){let{component:at}=le;return ve?.component&&(at=[ve.component,le.component].filter(Boolean).join(".")),H({...le,component:at})}});return{navigationList:(0,t.default)(ae,ye,(le,ve)=>{const at=["id","section"];return(0,i.default)((0,o.default)(le,at),(0,o.default)(ve,at))}),components:O,builtinList:ye}}}(mr)),mr}var Ee=wg();const Hc=I.createContext(null),Xa="/",Cg="header",Qa={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ie(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:Ie(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:Ie(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:Ie(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:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Following & Followers",zh:"关注 & 粉丝"},icon:"ant-design:user-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ig=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Rg=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ig("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Za({name:e}){return g.jsx(Th,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Tg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Me(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(w){const _=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Qa,S)&&Qa[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!_.some(k=>k.id===T.id)&&_.push(T)})}),Rg(t,_)}}),s=zt({rawNavigation:Qe(i),activeSection:Cg,components:o}),l=I.useMemo(()=>Ee.nestNavigationList(Qe(s.rawNavigation)),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ee.filterNavigation(Qe(s.rawNavigation),o);return Ee.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ee.flattenNavigation(Ee.joinLink(l,o)),S=_.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Za,{name:S.component})}else if(S.parent){const T=_.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Za,{name:T.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ee.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};_.push(k)});const S=Qe(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=_.find(k=>fi(k,T));return R?!Ee.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),h=I.useCallback((w=[])=>{const _=Qe(s.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=_},[s]),p=I.useCallback((w,_=Xa)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||_,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:p(j,M||Xa),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{h([w])},[h]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=Qe(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:Ih.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(k=>k.section===s.activeSection);if(_<0||_>R.length-1)T.push(S);else{const k=R[_],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return s.rawNavigation=T,S},[s]),b=I.useCallback(w=>{const S=Qe(l).filter(T=>Ee.isMatchSection(T.section,w));return p(S)},[l,p]),C=I.useCallback(async w=>{const S=w.map(T=>Rh(T,Dh)).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]),D=I.useCallback(async w=>{if(w){const _=a.filter(T=>Ee.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ee.isMatchSection(T.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=Qe(a)},[C,s,a]),P=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Hc.Provider,{value:P,children:e})}function Uc(){const e=I.useContext(Hc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},hi,es;function Dg(){if(es)return hi;es=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 Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var T,R,k,j,M,H,E=0,B=!1,$=!1,q=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,$="maxWait"in S,k=$?h(P(S.maxWait)||0,_):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,_),B?J(L):j}function X(L){var N=L-H,O=L-E,U=_-N;return $?p(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=_||N<0||$&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,X(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function G(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if($)return M=setTimeout(V,_),J(H)}return M===void 0&&(M=setTimeout(V,_)),j}return W.cancel=ie,W.flush=G,W}function y(w,_,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,_,{leading:T,maxWait:_,trailing:R})}function b(w){var _=typeof w;return!!w&&(_=="object"||_=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function P(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var _=typeof w.valueOf=="function"?w.valueOf():w;w=b(_)?_+"":_}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 hi=y,hi}var br={exports:{}},Dt={exports:{}},_g=Dt.exports,ts;function Pg(){return ts||(ts=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Dt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Dt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Dt.exports=function(){return Date.now()-n},n=Date.now()):(Dt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(_g)),Dt.exports}var rs;function kg(){if(rs)return br.exports;rs=1;for(var e=Pg(),r=typeof window>"u"?Rr: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(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-s));s=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var v=0;v<p.length;v++)if(!p[v].cancelled)try{p[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var sn={},ns;function Og(){if(ns)return sn;ns=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var Gt={},is;function Eg(){if(is)return Gt;is=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.noop=e,Gt.intBetween=r,Gt.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 Gt}var os;function Ng(){if(os)return Ke;os=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=M,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(mc()),r=c(bc()),n=_h(),t=c(Dg()),i=c(kg()),o=c(Og()),a=Ep,s=c(Ph()),l=Eg();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 q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};q.get||q.set?Object.defineProperty(B,$,q):B[$]=E[$]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function($){return typeof $}:f=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var q in $)Object.prototype.hasOwnProperty.call($,q)&&(E[q]=$[q])}return E},d.apply(this,arguments)}function h(E,B){if(E==null)return{};var $=p(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&($[q]=E[q])}return $}function p(E,B){if(E==null)return{};var $={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[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 q=B[$];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,$){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},C(E)}function D(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(q,J){return q.__proto__=J,q},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 _(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($,q){var J=$.x,ee=$.w,X=$.y,Z=$.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=X&&q.y<=X+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function($,q){var J=$.y,ee=$.h,X=$.x,Z=$.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=X&&q.x<=X+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ke.defaultHorizontalStrength=k;var j=R(S);Ke.defaultVerticalStrength=j;function M(E){var B=function($){D(q,$);function q(J,ee){var X;return v(this,q),X=b(this,C(q).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,G=V.width,W=V.height,L={x:re,y:ie,w:G,h:W},N=(0,l.getCoords)(Z),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,N),X.scaleY=te(L,N),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),_(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{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 X=this.props.dragDropManager;this.clearMonitorSubscription=X.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,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,G=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var O=G.scrollLeft,U=G.scrollTop,te=G.scrollWidth,ae=G.scrollHeight,de=G.clientWidth,he=G.clientHeight,Ce=re?G.scrollLeft=(0,l.intBetween)(0,te-de,O+re*L):O,ze=ie?G.scrollTop=(0,l.intBetween)(0,ae-he,U+ie*L):U;N(Ce,ze)}ee.frame=(0,i.default)(V)};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 X=h(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return _(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),_(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),_(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},$,{dragDropManager:J}))})}}return Ke}var bn=Ng();const Mg=Gn(bn);var Ag=Np();const as=Gn(Ag);function qc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Vc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Kc(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}}qc.__suppressDeprecationWarning=!0;Vc.__suppressDeprecationWarning=!0;Kc.__suppressDeprecationWarning=!0;function Jr(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-C3LdZf6o.js","./index-t7M3AlIl.js","./index-DGkT7afN.css","./url-join--uxDIQ5s.js","./index-C-ZSaiUf.js","./_createAggregator-Ctg83h-t.js","./depsEqual-CNVuMuEd.js","./index-CGPesPdM.js","./index-DRYJ0xIl.js","./toUpper-BVrGP8Kf.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
2
+ import{c0 as eh,b$ as th,r as I,c1 as rh,eT as nh,j as g,b8 as ot,c3 as nt,c4 as ih,hA as oh,hB as ah,gy as sh,du as lh,hC as ch,dv as uh,bQ as pc,bR as dh,bO as fh,bP as hh,bT as gc,dy as $n,hD as ph,eD as gh,ho as vh,gS as mh,dF as bh,gP as vc,hE as yh,gC as xh,fq as Sh,eE as wh,hb as Ch,V as Me,a2 as Qe,y as Ie,aH as be,aP as zt,c7 as Et,i as Ih,fb as Rh,eO as Th,hr as Dh,dx as Rr,ez as vr,di as mc,dC as _h,hF as Ph,dB as bc,bd as Gn,dO as nr,hG as F,e_ as K,eH as kh,hH as Yr,be as Q,o as x,dM as Wn,aQ as Oo,hI as Eo,cB as er,aD as xe,b as ht,K as oe,af as Oh,cw as se,b9 as No,dD as Yt,T as me,a3 as Ae,b1 as Yi,bA as xt,hJ as Eh,bn as yc,E as Hn,hK as Nh,hL as Mh,t as it,fo as Rn,ay as Ah,br as Ve,fe as xc,C as Sc,bJ as Lh,hM as Ma,M as Mo,fa as zh,f6 as wc,H as Ot,O as Cc,$ as Ic,v as Tn,hN as Rc,f as jt,dL as jh,by as Fh,gG as Tc,dJ as Or,a6 as Bh,a7 as $h,hO as Aa,hP as Dc,hQ as Gh,hR as Wh,hS as Un,ff as Hh,g8 as Uh,g9 as qh,hT as Vh,hU as Kh,hV as Yh,ge as qn,bD as Le,hW as Jh,h7 as Xh,hX as Qh,gL as Zh,hY as Dn,hZ as _c,L as Pc,z as Vn,h_ as La,h$ as kc,i0 as Ji,i1 as ep,i2 as tp,s as cr,i3 as rp,f5 as np,cA as Oc,i4 as ip,bG as op,i5 as ap,dI as Ye,D as sp,U as lp,cv as cp,i6 as up,a$ as dp,bg as za,Q as _n,a8 as ja,i7 as fp,i8 as hp,i9 as pp,ia as gp,ib as Ec,ic as vp,aB as Nc,f0 as Mc,id as Ao,ie as mp,hk as Ac,ig as bp,b5 as yp,cF as Jt,ih as xp,cU as Sp,ii as wp,d3 as Cp,G as Fa,dq as ui,eI as Ba,dN as Ip,ij as Rp,a4 as Lc,X as $a,ik as Ga,P as Tp,S as Wa}from"./index-t7M3AlIl.js";import{r as Dp}from"./omit-Cxe_6CRp.js";import{r as _p}from"./cloneDeep-a4PlXlaR.js";import{r as Pp}from"./index-C-ZSaiUf.js";import{c as kp,u as Op}from"./_createAggregator-Ctg83h-t.js";import{u as Ft}from"./blocklet-Dcm-KWY0.js";import{H as Ep,G as Np,M as Mp,N as Ap,O as Ha,K as Lp,L as zp}from"./index-C4sXNe3X.js";import{_ as Se,a as we,b as Ge,c as We,d as He,e as jp,f as zc,u as fe,g as ne,r as Fr,w as Pn,h as jc,i as Bt,j as Fc,k as Fp,l as Bp,o as Xi}from"./raf-schd.esm-C3uAJs0d.js";import{_ as A,b as Ua,c as $p,a as Gp,d as Wp}from"./redux-DfszZyTl.js";import{_ as Hp}from"./typeof-QjJsDpFa.js";import{u as Bc,b as Up}from"./team-DMp941g-.js";import{b as qp}from"./actions-CEVha9Lm.js";import{u as Vp,a as Kp,C as lt}from"./index.esm-y0ki7yla.js";import{S as Qi}from"./simple-select-DPUPpFQ5.js";import{b as Yp,a as qa}from"./html-title-C8DFoE3o.js";import{C as $c}from"./Clear-Bjaoevyy.js";import{A as Jp}from"./ArrowDropDown-DZ4LPniJ.js";import{a as Xp}from"./api-BgkTVaD7.js";import{A as Qp}from"./Autocomplete-DK0iCUAm.js";import{L as Zp}from"./ListItemButton-Dq8kjXAC.js";import{u as Gc}from"./use-mobile-gk4f0z32.js";import{u as eg}from"./index-DcJaC3Zv.js";import{d as tg}from"./KeyboardArrowDown-C9ZFNMos.js";import{S as rg}from"./Search-XYz8f8XA.js";import{A as ng}from"./Add-BKe5i02H.js";import{O as ig}from"./OpenInNew-BQ_lyYyz.js";import{t as og}from"./index-DDHwRT_8.js";import{I as ag}from"./iframe-B2nulerg.js";import{B as di}from"./ButtonGroup-B86tCmd3.js";import{L as Va}from"./LoadingButton-YsBwLHRI.js";import"./depsEqual-CNVuMuEd.js";import"./url-evaluation-Dx99nTAj.js";import"./useLocalStorage-BNDc6dCy.js";import"./MoreVert-BFhM4QD_.js";import"./get-safe-url-slTYcduh.js";import"./permission-DL-rt2kz.js";import"./ListSubheader-BN5vdmXx.js";import"./getValidReactChildren-D4p_s3zF.js";function sg(e){return eh("MuiListItemAvatar",e)}th("MuiListItemAvatar",["root","alignItemsFlexStart"]);const lg=e=>{const{alignItems:r,classes:n}=e;return ih({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},sg,n)},cg=ot("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}}]}),Ka=I.forwardRef(function(r,n){const t=rh({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(nh),s={...t,alignItems:a.alignItems},l=lg(s);return g.jsx(cg,{className:nt(l.root,i),ownerState:s,ref:n,...o})});var ug=oh(function(){return ah?sessionStorage:void 0});function dg(e,r){return sh(r,function(n){return e[n]})}function fg(e){return e==null?[]:dg(e,lh(e))}var hg=ch.isFinite;function Ya(e){return typeof e=="number"&&hg(e)}function pg(e){return typeof e=="number"&&e==uh(e)}var gg=kp(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const vg=Object.freeze(Object.defineProperty({__proto__:null,default:gg},Symbol.toStringTag,{value:"Module"}));var mg=pc(function(e){var r=dh(e);return r=typeof r=="function"?r:void 0,fh(hh(e,1,gc,!0),void 0,r)});const bg=Object.freeze(Object.defineProperty({__proto__:null,default:mg},Symbol.toStringTag,{value:"Module"}));var Wc=pc(function(e,r){return gc(e)?qp(e,r):[]}),mr={};const yg=$n(bg),xg=$n(ph),Sg=$n(vg);var Ja;function wg(){return Ja||(Ja=1,function(e){var r=mr&&mr.__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=ie,e.deepWalk=w,e.isMatchSection=_,e.nestNavigationList=ee,e.filterNavigation=X,e.cleanOrphanNavigation=Z,e.joinLink=j,e.flattenNavigation=M,e.splitNavigationBySection=J;const n=gh(),t=r(yg),i=r(vh),o=r(mh),a=r(xg),s=r(bh),l=r(Dp),c=r(_p),u=Ch(),f=r(Pp()),d=r(vc()),h=r(yh),p=r(xh),v=r(Sg),m=Sh(),y=wh();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",C="/",D="/",P="/";function w(G,W=()=>{},{key:L="children",order:N="first"}={}){function O(U,{index:te=0,parent:ae=null,level:de=0}={}){Array.isArray(U)?U.forEach((he,Ce)=>{O(he,{index:Ce,parent:ae,level:de+1})}):U&&(N==="first"&&W(U,ae,{index:te,level:de}),O(U[L],{parent:U,level:de}),N==="last"&&W(U,ae,{index:te,level:de}))}O(G)}function _(G,W){return W===b&&(0,a.default)(G)?!0:Array.isArray(G)?G.includes(W):G===W}function S(G){try{return JSON.parse(G)}catch{return G}}function T(G){return G.map(W=>{const L={...W};return L.role&&(L.role=S(L.role)),L.section&&(L.section=S(L.section)),L.title&&(L.title=S(L.title)),L.description&&(L.description=S(L.description)),L.link&&(L.link=S(L.link)),L})}function R(G="/",W=""){if((0,d.default)(W||""))return W;const L=f.default.join(G,W||D);return L.length>1&&L.endsWith("/")?L.slice(0,L.length-1):L}function k(G,W,{strict:L=!0}={}){let N=G,O=W;return L||(N=N||"/",O=O||"/"),(0,h.default)(N)&&(0,p.default)(O)&&(0,y.checkLink)(O)?Object.keys(N).reduce((U,te)=>(U[te]=R(N[te],O),U),{}):(0,p.default)(N)&&(0,y.checkLink)(N)&&(0,h.default)(O)?Object.keys(O).reduce((U,te)=>(U[te]=R(N,O[te]),U),{}):(0,p.default)(N)&&(0,p.default)(O)?(0,y.checkLink)(N)||(0,y.checkLink)(O)?R(N,O):O:(0,h.default)(N)&&(0,h.default)(O)?[...new Set([...Object.keys(N),...Object.keys(O)])].reduce((te,ae)=>(te[ae]=R(N[ae],O[ae]),te),{}):O}function j(G,W){const L=(0,c.default)(G);return w(L,(N,O)=>{const U=N.component||N.child;if(U){const te=W.find(ae=>ae.name===U);te&&(N.link=k(te.link,N.link,{strict:!1}))}else O&&(N.link=k(O.link,N.link))},{key:"items"}),L}function M(G=[],{depth:W=1,transform:L=N=>N}={}){const N=(0,c.default)(G),O=[];return w(N,(U,te,{level:ae})=>{if(ae>=W){const{items:de=[]}=U;if(de&&Array.isArray(de)&&de.length>0){delete U.items;const he=de.map(Ce=>L(Ce,U));if(te)te.items.push(...he);else{const Ce=L((0,l.default)(U,["items"]),te);O.push(Ce,...he)}}else if(ae===1){const he=L((0,l.default)(U,["items"]),te);O.push(he)}}else ae===1&&O.push(U)},{key:"items",order:"last"}),O}function H(G){if(G.section!=="bottomNavigation")return G;const W={...G};return n.NAVIGATION_I18N_FIELDS.forEach(L=>{const N=W[L];typeof N=="string"&&(W[L]={en:N})}),W}function E(G={}){const W=[];function L(O,U={}){const te=[],{children:ae=[],meta:de={}}=O,he=(0,c.default)(de?.navigation||[]);(0,m.hasStartEngine)(de)&&O.meta?.capabilities?.navigation!==!1&&te.push(...he);const Ce=U.name||"",ze=U.mountPoint||C,ye=O===G?"":de.name||"",_e=O===G?"":O.mountPoint||C;for(const le of ae){if(!(0,m.hasStartEngine)(le.meta))continue;const ve=le.meta.name,at=le.mountPoint,gr=[Ce,ye,ve].filter(Boolean).join("."),li=le.meta.navigation||[],ci=(0,u.joinURL)(ze,_e,at);le.meta?.capabilities?.navigation!==!1&&W.push({did:le.meta.did,name:gr,link:ci,title:le.meta.title||"",navigation:li.map(Xe=>({section:b,...Xe}))});const st=he.find(Xe=>Xe.component?Xe.component===ve:!1);if(st){if(!st.link)if(le.meta.navigation&&le.meta.navigation.length>0){const Xe=L(le,{mountPoint:_e,name:ye});Xe.length>0&&(st.items=st.items??[],st.items.push(...Xe))}else st.link=D}else if(le.meta?.capabilities?.navigation!==!1){const Xe=L(le,{mountPoint:_e,name:ye}),an={title:le.meta.title,component:ve,id:le.meta.did};Xe.length>0?(an.items=Xe,an.link=void 0):an.link=D,te.push(an)}}return te}return{navigationList:L(G),components:W}}function B(G){const W=(0,c.default)(G).filter(L=>L.id);return w(W,(L,N)=>{if(L.items&&L.items.length){for(let O=L.items.length-1;O>=0;O--)L.items[O].id||L.items.splice(O,1);L.items.length===0&&L.component&&(L.link=L.link||D)}N&&(L.parent=N.id,L.id=[N.id,L.id].join(P)),L.from=L.from||"yaml",L.visible=L.visible??!0},{key:"items"}),W}function $(G,W=2){const L=(0,c.default)(G),N=M(L,{depth:W,transform:(O,U)=>(U&&(O._parent||(O._parent=U.id,U.component||(O.link=k(U.link,O.link))),O.section=O.section||U.section||[b],O.visible=O.visible??U.visible,U.role&&(O.role=O.role||U.role)),O.component=[U.component,O.component].filter(Boolean).join("."),O)});return w(N,O=>{O.items&&O.items.length>0&&O.items.reduceRight((U,te)=>{if(te._parent){const ae=O.items.findIndex(de=>de.id===te._parent);ae>=0&&O.items.splice(ae,1),delete te._parent}return null},null)},{key:"items"}),N}function q(G,W){return W&&Array.isArray(G.items)?G.items.filter(L=>(0,a.default)(L.section)?_(G.section,W):!!_(L.section,W)).map(L=>({...L,section:W})):[]}function J(G){const W=(0,c.default)(G),L=[];for(const N of W){let te=function(ae,de){const he=q(ae,de);U.push({...O,section:de,items:he})};const O=(0,c.default)((0,l.default)(N,["items"])),U=[];if(Array.isArray(N.section))for(const ae of N.section)te(N,ae);else if(N.section){const{section:ae}=N;te(N,ae)}else if(N.items&&N.items.length>0){const ae=N.items.reduce((he,Ce)=>{const{section:ze=[b]}=Ce||{};return he.push(...ze),he},[]),de=[...new Set(ae)];for(const he of de)te(N,he)}else U.push({...N,section:b});L.push(...U)}return L}function ee(G=[]){const W=(0,c.default)(G);return W.reduceRight((L,N,O)=>{if(N.parent){const U=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);U&&(U.items||(U.items=[]),U.items=[N,...U.items]),W.splice(O,1)}return null},null),W}function X(G,W=[]){const L=ee(G);return w(L,O=>{if(O?.component&&(W.some(U=>U.name===O.component)||(O.visible=!1)),O.items&&O.items.length)for(let U=O.items.length-1;U>=0;U--)O.items[U].visible===!1&&O.items.splice(U,1)},{key:"items"}),L.filter(O=>!(O.visible===!1||O.items&&Array.isArray(O.items)&&O.items.length>0&&O.items?.every(U=>U.visible===!1)))}function Z(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 V=G=>{const[W,L]=(0,v.default)(G,N=>N.id==="/team");return[...W,...L]};e.sortRootNavigation=V;const re=G=>{const[,W]=(0,v.default)(G,L=>{const N=typeof L.title=="string"?L.title:L.title?.en;return L.id==="/team"&&N==="Access"||L.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=re;function ie(G={},W={}){const{beforeProcess:L=le=>le}=W,{navigationList:N,components:O}=E(G),U=new Map;N.forEach(le=>{le.items?.forEach(ve=>{U.set((0,u.joinURL)(le.id,ve.id),ve)})});const te=(0,s.default)(G,"settings.org.enabled",!1);G?.settings?.navigations&&(Array.isArray(G.settings.navigations)?G.settings.navigations=[...G.settings.navigations].filter(le=>!(le?.parent==="/team"&&le.from==="team-tmpl")).map(le=>{if(le.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(le,"private")){const ve=U.get(le.id);ve&&Object.prototype.hasOwnProperty.call(ve,"private")&&(le.private=ve.private)}return!te&&le.section==="userCenter"&&le.id==="/userCenter/orgs"?null:le}).filter(Boolean):G.settings.navigations=[]);const ae=T(re(G?.settings?.navigations||[])).map(H),de=$(L(N)),he=B(de),ze=J(he).reduce((le,ve)=>["bottom","social","sessionManager","userCenter"].includes(ve.section)&&ve.items&&ve.items.length>0?(le.push(...ve.items.map(gr=>{const{section:li}=ve,ci=k(ve.link,gr.link),st=[ve.component,gr.component].filter(Boolean).join(".");return{...gr,section:li,link:ci,component:st,parent:""}})),le):(le.push(ve),le),[]),ye=M(ze,{transform(le,ve){let{component:at}=le;return ve?.component&&(at=[ve.component,le.component].filter(Boolean).join(".")),H({...le,component:at})}});return{navigationList:(0,t.default)(ae,ye,(le,ve)=>{const at=["id","section"];return(0,i.default)((0,o.default)(le,at),(0,o.default)(ve,at))}),components:O,builtinList:ye}}}(mr)),mr}var Ee=wg();const Hc=I.createContext(null),Xa="/",Cg="header",Qa={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${be.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ie(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:Ie(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:Ie(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:Ie(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:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Following & Followers",zh:"关注 & 粉丝"},icon:"ant-design:user-outlined",link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function fi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ig=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),Rg=(e,r)=>{const n=Ee.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Ig("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Za({name:e}){return g.jsx(Th,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Tg({children:e}){const{blocklet:r,actions:n}=Ft(),{t}=Me(),{navigationList:i,components:o,builtinList:a}=Ee.parseNavigation(r,{beforeProcess(w){const _=Qe(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Qa,S)&&Qa[S].forEach(T=>{(T.shouldDisplay&&typeof T.shouldDisplay=="function"?T.shouldDisplay:()=>!0)(r)&&!_.some(k=>k.id===T.id)&&_.push(T)})}),Rg(t,_)}}),s=zt({rawNavigation:Qe(i),activeSection:Cg,components:o}),l=I.useMemo(()=>Ee.nestNavigationList(Qe(s.rawNavigation)),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ee.filterNavigation(Qe(s.rawNavigation),o);return Ee.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ee.flattenNavigation(Ee.joinLink(l,o)),S=_.find(T=>T.id===w.id);if(S?.component){if(!o.some(T=>T.name===S.component))return g.jsx(Za,{name:S.component})}else if(S.parent){const T=_.find(R=>R.id===S.parent);if(T?.component&&!o.some(R=>R.name===T.component))return g.jsx(Za,{name:T.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ee.deepWalk(w,(T,R)=>{const k={...Et(T,["children","expand"]),parent:R?.id};_.push(k)});const S=Qe(s.rawNavigation).filter(T=>{if(!s.activeSection)return!1;const R=_.find(k=>fi(k,T));return R?!Ee.isMatchSection(R.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),h=I.useCallback((w=[])=>{const _=Qe(s.rawNavigation).map(S=>{const T=w.find(R=>fi({...R,section:s.activeSection},S));return T?{...S,...T}:S});s.rawNavigation=_},[s]),p=I.useCallback((w,_=Xa)=>w.map(T=>{const k=o.find(H=>H.name===T.component)?.link||_,j=T.items||[],{link:M}=T;return{title:T.title,description:T.description,subtitle:u(T),link:M,icon:T.icon,children:p(j,M||Xa),section:T.section,visible:T.visible,parent:T.parent,component:T.component,id:T.id,role:T.role,from:T.from,__base:k}}),[o,u]),v=I.useCallback(w=>{h([w])},[h]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=Qe(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:Ih.nanoid(),section:s.activeSection,visible:!0},T=[...s.rawNavigation],R=T.filter(k=>k.section===s.activeSection);if(_<0||_>R.length-1)T.push(S);else{const k=R[_],j=T.findIndex(M=>fi(M,k));T.splice(j,0,S)}return s.rawNavigation=T,S},[s]),b=I.useCallback(w=>{const S=Qe(l).filter(T=>Ee.isMatchSection(T.section,w));return p(S)},[l,p]),C=I.useCallback(async w=>{const S=w.map(T=>Rh(T,Dh)).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]),D=I.useCallback(async w=>{if(w){const _=a.filter(T=>Ee.isMatchSection(T.section,w)),S=s.rawNavigation.filter(T=>!Ee.isMatchSection(T.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=Qe(a)},[C,s,a]),P=I.useMemo(()=>({state:s,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:C,resetNavigation:D}),[s,c,o,u,f,v,m,y,d,b,C,D]);return g.jsx(Hc.Provider,{value:P,children:e})}function Uc(){const e=I.useContext(Hc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Ke={},hi,es;function Dg(){if(es)return hi;es=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 Rr=="object"&&Rr&&Rr.Object===Object&&Rr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,h=Math.max,p=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var T,R,k,j,M,H,E=0,B=!1,$=!1,q=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,$="maxWait"in S,k=$?h(P(S.maxWait)||0,_):k,q="trailing"in S?!!S.trailing:q);function J(L){var N=T,O=R;return T=R=void 0,E=L,j=w.apply(O,N),j}function ee(L){return E=L,M=setTimeout(V,_),B?J(L):j}function X(L){var N=L-H,O=L-E,U=_-N;return $?p(U,k-O):U}function Z(L){var N=L-H,O=L-E;return H===void 0||N>=_||N<0||$&&O>=k}function V(){var L=v();if(Z(L))return re(L);M=setTimeout(V,X(L))}function re(L){return M=void 0,q&&T?J(L):(T=R=void 0,j)}function ie(){M!==void 0&&clearTimeout(M),E=0,T=H=R=M=void 0}function G(){return M===void 0?j:re(v())}function W(){var L=v(),N=Z(L);if(T=arguments,R=this,H=L,N){if(M===void 0)return ee(H);if($)return M=setTimeout(V,_),J(H)}return M===void 0&&(M=setTimeout(V,_)),j}return W.cancel=ie,W.flush=G,W}function y(w,_,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,_,{leading:T,maxWait:_,trailing:R})}function b(w){var _=typeof w;return!!w&&(_=="object"||_=="function")}function C(w){return!!w&&typeof w=="object"}function D(w){return typeof w=="symbol"||C(w)&&d.call(w)==n}function P(w){if(typeof w=="number")return w;if(D(w))return r;if(b(w)){var _=typeof w.valueOf=="function"?w.valueOf():w;w=b(_)?_+"":_}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 hi=y,hi}var br={exports:{}},Dt={exports:{}},_g=Dt.exports,ts;function Pg(){return ts||(ts=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Dt.exports=function(){return performance.now()}:typeof vr<"u"&&vr!==null&&vr.hrtime?(Dt.exports=function(){return(e()-i)/1e6},r=vr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=vr.uptime()*1e9,i=t-o):Date.now?(Dt.exports=function(){return Date.now()-n},n=Date.now()):(Dt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(_g)),Dt.exports}var rs;function kg(){if(rs)return br.exports;rs=1;for(var e=Pg(),r=typeof window>"u"?Rr: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(f){if(c.length===0){var d=e(),h=Math.max(0,u-(d-s));s=h+d,setTimeout(function(){var p=c.slice(0);c.length=0;for(var v=0;v<p.length;v++)if(!p[v].cancelled)try{p[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(h))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return br.exports=function(f){return i.call(r,f)},br.exports.cancel=function(){o.apply(r,arguments)},br.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},br.exports}var sn={},ns;function Og(){if(ns)return sn;ns=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var Gt={},is;function Eg(){if(is)return Gt;is=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.noop=e,Gt.intBetween=r,Gt.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 Gt}var os;function Ng(){if(os)return Ke;os=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.createHorizontalStrength=T,Ke.createVerticalStrength=R,Ke.createScrollingComponent=M,Ke.default=H,Ke.defaultVerticalStrength=Ke.defaultHorizontalStrength=void 0;var e=u(mc()),r=c(bc()),n=_h(),t=c(Dg()),i=c(kg()),o=c(Og()),a=Ep,s=c(Ph()),l=Eg();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 q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,$):{};q.get||q.set?Object.defineProperty(B,$,q):B[$]=E[$]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function($){return typeof $}:f=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var $=arguments[B];for(var q in $)Object.prototype.hasOwnProperty.call($,q)&&(E[q]=$[q])}return E},d.apply(this,arguments)}function h(E,B){if(E==null)return{};var $=p(E,B),q,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)q=ee[J],!(B.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(E,q)&&($[q]=E[q])}return $}function p(E,B){if(E==null)return{};var $={},q=Object.keys(E),J,ee;for(ee=0;ee<q.length;ee++)J=q[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 q=B[$];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(E,q.key,q)}}function y(E,B,$){return B&&m(E.prototype,B),E}function b(E,B){return B&&(f(B)==="object"||typeof B=="function")?B:w(E)}function C(E){return C=Object.setPrototypeOf?Object.getPrototypeOf:function($){return $.__proto__||Object.getPrototypeOf($)},C(E)}function D(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(q,J){return q.__proto__=J,q},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 _(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($,q){var J=$.x,ee=$.w,X=$.y,Z=$.h,V=Math.min(ee/2,E),re=q.x>=J&&q.x<=J+ee,ie=re&&q.y>=X&&q.y<=X+Z;if(ie){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+ee-V)return-(J+ee-q.x-V)/V}return 0}}function R(E){return function($,q){var J=$.y,ee=$.h,X=$.x,Z=$.w,V=Math.min(ee/2,E),re=q.y>=J&&q.y<=J+ee,ie=re&&q.x>=X&&q.x<=X+Z;if(ie){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+ee-V)return-(J+ee-q.y-V)/V}return 0}}var k=T(S);Ke.defaultHorizontalStrength=k;var j=R(S);Ke.defaultVerticalStrength=j;function M(E){var B=function($){D(q,$);function q(J,ee){var X;return v(this,q),X=b(this,C(q).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var V=X.container.getBoundingClientRect(),re=V.left,ie=V.top,G=V.width,W=V.height,L={x:re,y:ie,w:G,h:W},N=(0,l.getCoords)(Z),O=X.props,U=O.horizontalStrength,te=O.verticalStrength;X.scaleX=U(L,N),X.scaleY=te(L,N),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),_(w(w(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{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 X=this.props.dragDropManager;this.clearMonitorSubscription=X.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,X=ee.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var ee=this,X=0,Z=function V(){var re=ee.scaleX,ie=ee.scaleY,G=ee.container,W=ee.props,L=W.strengthMultiplier,N=W.onScrollChange;if(L===0||re+ie===0){ee.stopScrolling();return}if(X+=1,X%2){var O=G.scrollLeft,U=G.scrollTop,te=G.scrollWidth,ae=G.scrollHeight,de=G.clientWidth,he=G.clientHeight,Ce=re?G.scrollLeft=(0,l.intBetween)(0,te-de,O+re*L):O,ze=ie?G.scrollTop=(0,l.intBetween)(0,ae-he,U+ie*L):U;N(Ce,ze)}ee.frame=(0,i.default)(V)};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 X=h(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return _(B,"displayName","Scrolling(".concat((0,o.default)(E),")")),_(B,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),_(B,"defaultProps",{onScrollChange:l.noop,verticalStrength:j,horizontalStrength:k,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function($){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},$,{dragDropManager:J}))})}}return Ke}var bn=Ng();const Mg=Gn(bn);var Ag=Np();const as=Gn(Ag);function qc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Vc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Kc(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}}qc.__suppressDeprecationWarning=!0;Vc.__suppressDeprecationWarning=!0;Kc.__suppressDeprecationWarning=!0;function Jr(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 Ku=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Ku,...En}),fo=Object.freeze({...tn,body:"",hidden:!1}),yy=Object.freeze({width:null,height:null}),Yu=Object.freeze({...yy,...En});function xy(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 Sy=/[\s,]+/;function wy(e,r){r.split(Sy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ju={...Yu,preserveAspectRatio:""};function al(e){const r={...Ju},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=xy(n("rotate","")),wy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Cy(e,r){for(const n in Ju)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(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&&!Sn(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&&!Sn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Sn(s,n)?null:s}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function Iy(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 sl(e,r){const n=Iy(e,r);for(const t in fo)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Ry(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 Ty(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=sl(t[s]||i[s],o)}return a(r),n.forEach(a),sl(e,o)}function Xu(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=Ry(e);for(const i in t){const o=t[i];o&&(r(i,Ty(e,i,o)),n.push(i))}return n}const Dy={provider:"",aliases:{},not_found:{},...Ku};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,Dy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,fo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,fo))return null}return r}const Nn=Object.create(null);function _y(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function wt(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=_y(e,r))}function Zo(e,r){return Qu(r)?Xu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Py(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function ky(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const s=wt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Gr=!1;function Zu(e){return typeof e=="boolean"&&(Gr=e),Gr}function Wr(e){const r=typeof e=="string"?rn(e,!0,Gr):e;if(r){const n=wt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function ed(e,r){const n=rn(e,!0,Gr);if(!n)return!1;const t=wt(n.provider,n.prefix);return Py(t,n.name,r)}function ll(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Gr&&!r&&!e.prefix){let i=!1;return Qu(e)&&(e.prefix="",Xu(e,(o,a)=>{a&&ed(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=wt(r,n);return!!Zo(t,e)}function Oy(e){return!!Wr(e)}function Ey(e){const r=Wr(e);return r?{...tn,...r}:null}function Ny(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]=wt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function td(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function My(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||td([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ay=0;function Ly(e,r,n){const t=Ay++,i=td.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 ho=Object.create(null);function cl(e,r){ho[e]=r}function po(e){return ho[e]||ho[""]}function zy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var jy={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fy(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 _=Math.floor(Math.random()*w.length);a.push(w[_]),w=w.slice(0,_).concat(w.slice(_+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,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),p(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(h=[]),typeof w=="function"&&h.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",h.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const T=_!=="success";switch(d=d.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?P():b());return}if(p(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",h.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;p();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{p(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,T)=>{D(_,S,T)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function rd(e){const r={...jy,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Fy(r,s,l,(f,d)=>{t(),c&&c(f,d)});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 ea(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 Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=ea({resources:["https://api.iconify.design"].concat(wn)});function ul(e,r){const n=ea(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function By(){return Object.keys(Zn)}function dl(){}const Oi=Object.create(null);function $y(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=rd(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function nd(e,r,n){let t,i;if(typeof e=="string"){const o=po(e);if(!o)return n(void 0,424),dl;i=o.send;const a=$y(e);a&&(t=a.redundancy)}else{const o=ea(e);if(o){t=rd(o);const a=e.resources?e.resources[0]:"",s=po(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),dl):t.query(r,i,n)().abort}const fl="iconify2",Hr="iconify",id=Hr+"-count",hl=Hr+"-version",od=36e5,Gy=168;function go(e,r){try{return e.getItem(r)}catch{}}function ta(e,r,n){try{return e.setItem(r,n),!0}catch{}}function pl(e,r){try{e.removeItem(r)}catch{}}function vo(e,r){return ta(e,id,r.toString())}function mo(e){return parseInt(go(e,id))||0}const At={local:!0,session:!0},ad={local:new Set,session:new Set};let ra=!1;function Wy(e){ra=e}let dn=typeof window>"u"?{}:window;function sd(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ld(e,r){const n=sd(e);if(!n)return;const t=go(n,hl);if(t!==fl){if(t){const s=mo(n);for(let l=0;l<s;l++)pl(n,Hr+l.toString())}ta(n,hl,fl),vo(n,0);return}const i=Math.floor(Date.now()/od)-Gy,o=s=>{const l=Hr+s.toString(),c=go(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{}pl(n,l)}};let a=mo(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,vo(n,a)):ad[e].add(s))}function cd(){if(!ra){Wy(!0);for(const e in At)ld(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=wt(t,i);if(!Zo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Hy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ld(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Uy(e,r){ra||cd();function n(t){let i;if(!At[t]||!(i=sd(t)))return;const o=ad[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=mo(i),!vo(i,a+1))return;const s={cached:Math.floor(Date.now()/od),provider:e.provider,data:r};return ta(i,Hr+a.toString(),JSON.stringify(s))}r.lastModified&&!Hy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function gl(){}function qy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,My(e)}))}function Vy(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=po(n)))return;o.prepare(n,t,i).forEach(s=>{nd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Zo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Uy(e,l)}catch(c){console.error(c)}qy(e)})})}))}const na=(e,r)=>{const n=zy(e,!0,Zu()),t=Ny(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,gl)}),()=>{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(wt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=wt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Vy(l,i[c][u])}),r?Ly(r,t,o):gl},Ky=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}na([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function Yy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function Jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=Yy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=na([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let ud=!1;try{ud=navigator.vendor.indexOf("Apple")===0}catch{}function Xy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(ud||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Qy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Zy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function bo(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(Qy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Zy.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 ex=e=>e==="unset"||e==="undefined"||e==="none";function dd(e,r){const n={...tn,...e},t={...Yu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const v=[],m=p.hFlip,y=p.vFlip;let b=p.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 C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=bo(f,l/c)):(u=a==="auto"?l:a,f=s===null?bo(u,c/l):s==="auto"?c:s);const d={},h=(p,v)=>{ex(v)||(d[p]=v.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const tx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=tx();function rx(e){Mn=e}function nx(){return Mn}function ix(e,r){const n=ei(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 ox(e){return e===404}const ax=(e,r,n)=>{const t=[],i=ix(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 sx(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const lx=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=sx(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;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(ox(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)})},cx={prepare:ax,send:lx};function vl(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let fd="";function ux(e){fd=e}function ml(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+fd}function hd(){cl("",cx),Zu(!0);let e;try{e=window}catch{}if(e){if(cd(),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"||!ll(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;ul(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>vl(n,!0),disableCache:n=>vl(n,!1),iconExists:Oy,getIcon:Ey,listIcons:ky,addIcon:ed,addCollection:ll,calculateSize:bo,buildIcon:dd,loadIcons:na,loadIcon:Ky,addAPIProvider:ul,appendCustomStyle:ux,_api:{getAPIConfig:ei,setAPIModule:cl,sendAPIQuery:nd,setFetch:rx,getFetch:nx,listAPIProviders:By}}}function pd(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 dx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function fx(e){return"data:image/svg+xml,"+dx(e)}function hx(e){return'url("'+fx(e)+'")'}const yo={"background-color":"currentColor"},gd={"background-color":"transparent"},bl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},yl={"-webkit-mask":yo,mask:yo,background:gd};for(const e in yl){const r=yl[e];for(const n in bl)r[e+"-"+n]=bl[n]}function xl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function px(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=pd(i,{...o,width:r.width+"",height:r.height+""}),s=hx(a),l=t.style,c={"--svg":s,width:xl(o.width),height:xl(o.height),...n?yo:gd};for(const u in c)l.setProperty(u,c[u]);return t}let Lr;function gx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function vx(e){return Lr===void 0&&gx(),Lr?Lr.createHTML(e):e}function mx(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=pd(e.body,n);return r.innerHTML=vx(i),r.firstChild}function Sl(e,r){const n=r.icon.data,t=r.customisations,i=dd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=mx(i);break;default:a=px(i,{...tn,...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 wl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function bx(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=Ei(this);ml(s,l),this._state=wl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ei(this),c=this._state;l!==c.inline&&(c.inline=l,ml(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 Ei(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{}Sl(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=al(this);(s.attrMode!==c||Cy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=Jy(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});l.data?this._gotIconData(l):this._state=wl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,al(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Xy(s.data.body,c),f=this._state.inline;Sl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,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=hd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const yx=bx()||hd(),{enableCache:zT,disableCache:jT,iconExists:FT,getIcon:BT,listIcons:$T,addIcon:GT,addCollection:WT,calculateSize:HT,buildIcon:UT,loadIcons:qT,loadIcon:VT,addAPIProvider:KT,_api:YT}=yx,$t=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:$t(t[n],r,n)}):r(t)),vd=(e,r="children")=>{const n=[];return $t(e,t=>n.push(t),r),n},ia=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ia(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),md=e=>/^https?:\/\//.test(e),bd=e=>/^mailto:/i.test(e.trim()),xx=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)},yd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>xx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Sx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((p,v)=>p+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,h=p=>f>l-d&&u<n-1&&f+p>l+d;return e.forEach(p=>{const v=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(v)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[s,l]=I.useState(!0);if(Oo(async()=>{l(!0);try{await Eo(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%"}}),md(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function oa(e=["en","zh"]){const{blocklet:r}=Ft();return I.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=>ht.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=ht.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:ht.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const wx=e=>e.from!=="team-tmpl";function Cx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Oh(e.slice(0,t-1),r.slice(0,i-1)))}function xd({treeNode:e}){const{locale:r}=Me(),{blocklet:n}=Ft(),{defaultLocale:t}=oa(),i=n.environments.find(s=>s.key===ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=se(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 Yt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Yt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(No(o(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}xd.propTypes={treeNode:x.object.isRequired};const Ix=ot(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function Sd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(Ix,{children:g.jsx(Lp,{backend:zp,...i,children:g.jsx(hm,{generateNodeProps:o=>{const a=wx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(xd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Cx,theme:by})})})}Sd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var Rx=vc();const Tx=Gn(Rx);function wd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Me(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),h=I.useMemo(()=>!!u,[u]),p=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=se(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=se((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=se(()=>{f(null),d.inputLocale="",d.localeError=""}),P=se(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=se((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Wc(d.localeList,T),s(T)}),_=se(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Op("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(Yp,{sx:e,value:p,onChange:(S,T)=>{n(T)},children:[g.jsx(qa,{label:y,value:t}),v.map(S=>g.jsx(qa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ae,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ae,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(Yi,{open:h,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Qi,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:_,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(xt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}wd.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 aa=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Cd(e,r,n=5e3){for(const t of aa){const i=Ie(t,e);try{return await Xp.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 Dx({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 Cd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function _x(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await Cd("/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)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function Px(e){return Ie(aa[0],`${e}.svg`)}function kx(e){try{const r=new URL(e);for(const n of aa)if(r.origin===n)return Eh(r.pathname).replace(".svg","");return""}catch{return""}}function Ox(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):No(e)&&(n=kx(e))),{isIconId:r,iconId:n}}const Ex=I.lazy(()=>Lh(()=>import("./index-DlRSxwJY.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}))),Cl=Ve(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Id({icon:e,...r}){const[n,t]=I.useState(!1);return Oo(async()=>{t(!1),await Eo(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}Id.propTypes={icon:x.string.isRequired};function xo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=yc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=s(),p=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Me(),{isIconId:C,iconId:D}=Ox(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Ie(l,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=se(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=se(async Z=>await p.current.getUploader().uploadFile(Z)),$=se(()=>{w(null)}),q=se(()=>{j&&w(m.current)}),J=se(async Z=>{try{if(o==="url"){const V=Px(Z),re=await Nh(V,{width:128,height:128}),ie=await Mh(re,Z);await B(ie)}else _?.(Z)}catch(V){console.error("Failed to pick icon:",V)}$()}),ee=se(Z=>{Z.stopPropagation(),v.current.open(),$()}),X=se(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Cl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ae,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx($c,{style:{fontSize:18}})}),k&&g.jsx(Ah,{title:y("common.upload"),children:g.jsx(Ae,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Id,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:Jp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Yi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Rd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(So,{ref:p,locale:b,apiPath:M,headers:h,imageEditorProps:{},onUploadFinish:X}),g.jsx(So,{ref:v,locale:b,apiPath:M,headers:h,onUploadFinish:X}),g.jsx(Yi,{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(Cl,{size:120,icon:E(e),alt:"Error"})})]})}xo.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 Rd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Me(),D=96,P=se(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);l(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=se(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);l(T),p(S.length===0),b.current&&P()}),{run:_}=xc(async S=>{if(S){u(!0);try{const{icons:T}=await Dx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),Oo(async()=>{if(f)_(f);else{u(!0);try{const S=await _x("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),p(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Nx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(it,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ae,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx($c,{style:{fontSize:18}})})}}}),g.jsx(xt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{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(Mx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),h&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(Sc,{size:20})})]})]})}Rd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Nx=Ve(oe)(({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}})),Mx=Ve(Ae,{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 So({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(I.Suspense,{children:g.jsx(Ex,{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}})})}So.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const Il=24,Rl=48,Tl="add";x.string.isRequired;function sa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Bc(),{t:s,locale:l}=Me(),{localeMap:c,defaultLocale:u}=oa(),f=se(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=se(N=>Wc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),h=I.useRef(()=>{}),p=zt({isRoot:!0,type:Tl,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(p.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Vp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,p.formState[N][p.locale]))},[b,p.locale]);const P=Kp({control:m}),w=P.component,_=P.title,S=P.description,T=P.link,R=P.parent;I.useEffect(()=>{p.formState.title[p.locale]=_},[_]),I.useEffect(()=>{p.formState.description[p.locale]=S},[S]),I.useEffect(()=>{p.formState.link[p.locale]=T},[T]),I.useEffect(()=>{i?.(P)},[P,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[p.locale]:O;if(w)return Ma(U);const te=Yt(k.link)?k.link[p.locale]:k.link;return Ma(Ie(U,te||"/"))}return null},[n,p.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return Ee.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>Ee.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[l]||ae.title}))},[k,n,r,l]),H=se(()=>{p.isRoot=!0,p.locale=u,p.type=Tl,p.linkDisabled=!1,p.formState=f(),y(),C(),h.current=()=>{}}),E=se((N={})=>(p.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(O=>{fg(p.formState[O]).length>1&&(N[O]=p.formState[O])}),Mo(N.role)&&(N.role=void 0),N)),B=se(({parent:N}={},O=()=>{})=>{p.type="add",p.isRoot=!N,b("parent",N?.id),h.current=U=>{O(U)}}),$=se((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:he=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(p.linkDisabled=!0);const Ce=d(N),ze=(ye,_e)=>{wc(ye)?p.formState[_e]=Ce.reduce((le,ve)=>(le[ve]=ye,le),{[u]:ye}):Yt(ye)?p.formState[_e]=Qe(ye):p.formState[_e]={}};be.NAVIGATION_I18N_FIELDS.forEach(ye=>ze(N[ye],ye)),be.NAVIGATION_I18N_FIELDS.forEach(ye=>b(ye,p.formState[ye][p.locale])),b("component",de),b("parent",ae),b("role",he||[]),p.type="edit",p.isRoot=!ae,h.current=ye=>{const _e=zh(ye,["id","title","description","icon","component","link","role"]);O(_e)}}),q=se(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>Il)return s("navigation.form.titleTooLong",{len:Il})}return!0}),J=se(N=>{const O=N?.trim();return O&&O.length>Rl?s("navigation.form.descriptionTooLong",{len:Rl}):!0}),ee=se(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),X=se(async N=>{const O=N?.trim();if(O){if(No(ee(O)))return!0;try{await Eo(O)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=se(N=>{const O=N?.trim();return O?X(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),V=se(N=>{const O=N?.trim();return O?Ee.checkLink(O)?!0:s("navigation.form.invalidLink"):p.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=se(N=>{p.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O][N]||(p.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=se(()=>{const{title:N,link:O}=p.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),G=se(N=>{const O=ie();O===!0?h.current(E(N)):Ot.error(O)}),W=se(N=>{p.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O]=Et(p.formState[O],N)}),i?.(P)}),L=se(N=>{p.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O][N]=p.formState[O][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(G)}),[B,H,$,v,G]),g.jsxs(oe,{...o,children:[g.jsx(wd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:p.locale,localeMap:c,locales:p.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(xo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:p.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:N})=>g.jsx(xo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:p.locale!==u,...N})}),p.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Qi,{fullWidth:!0,margin:"dense",disabled:p.locale!==u&&N.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!p.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:p.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(Cc,{fullWidth:!0,margin:"dense",children:g.jsx(Qp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:p.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(it,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:Tx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Qi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}sa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function la({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Me(),[o,{setTrue:a,setFalse:s}]=Up(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),h=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),p=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),g.jsx(Ic,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(sa,{ref:u,section:r,components:n,rawNavigations:t})})}la.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Td({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Me(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),h=I.useCallback(v=>{u(v),t(o)},[t,o]),p=I.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(Ae,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ae,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{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(Ae,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ae,{disabled:l&&!c,size:"small",color:"error",onClick:p,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}Td.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Ax=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},Lx=(e,r="en",n="en")=>{if(typeof e=="string"){if(md(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(bd(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},rr=({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 $t(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Rc(o.items?.length?o.link:Lx(o.link,r,n),t),_rawLink:o.link}),"items")},zx=e=>$t(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),jx=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},ca=e=>{if(!e)return null;const r={...e};return r.theme=Ax(r.theme),r.navigation=jx(Fx(r.navigation)),r},Fx=(e=[])=>ia(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Dd=(e,r)=>ia(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"),Bx={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"/>'},$x={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 Gx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(v=>h.component===v.name);return{...h,component:p}}),l=jt(),c=I.useRef(null),u=zt({open:!1}),f=se((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ae,{size:"medium",ref:c,children:g.jsx(xe,{icon:Bx,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(jh,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>g.jsx(Fh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:g.jsx(Tc,{...h,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Bh,{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(p=>g.jsx($h,{disablePadding:!0,children:g.jsxs(Zp,{href:Aa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?g.jsx(oe,{component:"img",src:`${Dc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:p.icon||$x,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Aa(p.title,r)})]})},p.id))}),g.jsx(Gh,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Wh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const _d=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])}))}))}),Pd=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}),Wx=["admin","owner"],Hx=e=>e.endsWith(".ip.abtnet.io"),Ux=e=>e.endsWith(".did.abtnet.io"),qx={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:"配置域名"}},Vx=1e3*60*60*24*30,Dl=".well-known/service/admin/domains";function kd({locale:e="en",session:r={}}){const n=r?.user,t=Gc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>Vx}),a=se((d,h={})=>Un(qx,d,e,"en",h)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ie(window.location.origin,Dl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Wx.includes(n.role);return window.location.href.includes(Dl)||t||!Hx(s)&&!Ux(s)?null:g.jsxs(Hh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Uh,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(qh,{sx:{px:"12px !important"},children:[g.jsx(xt,{onClick:c,children:a("skip")}),f&&g.jsx(xt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}kd.propTypes={locale:x.string,session:x.object};var Mi,_l;function Kx(){if(_l)return Mi;_l=1;const e=Vh();return Mi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Mi}var Ai,Pl;function Yx(){if(Pl)return Ai;Pl=1;const e=Kx();return Ai=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(s=>{this._logger.error("socket error",s.error)}),this.onMessage(s=>{this._logger.debug("socket message",s)})}on(o,a,s={}){this.ensureJoinChannel(o,s),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,s){this.emitter.eventNames().forEach(l=>{this.emitter.removeAllListeners(l)}),super.disconnect(o,a,s)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const l=this.channel(o,a);l.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const s=this.channels.find(l=>l.topic===o);s&&(this.remove(s),s.leave().receive("ok",l=>{this._logger.debug("leave success",{topic:o,message:l})}).receive("error",l=>{this._logger.error("leave error",{topic:o,err:l})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),s.off(o))}subscribe(o,a={}){let s=this.channels.find(l=>l.topic===o);return s||(s=this.channel(o,a),s.join().receive("ok",l=>{this._logger.debug("join success",{topic:o,message:l})}).receive("error",l=>{this._logger.error("join error",{topic:o,error:l})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s)}unsubscribe(o){this.ensureLeaveChannel(o)}},Ai}var Li,kl;function Jx(){if(kl)return Li;kl=1;const e=Kh(),{Socket:r}=Yh();return Li=Yx()(r,e),Li}var zi,Ol;function Xx(){return Ol||(Ol=1,zi={WsClient:Jx()}),zi}var Qx=Xx();const ke={};function Zx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ie(r,Dc,e);return new Qx.WsClient(n,{heartbeatIntervalMs:100*1e3})}function eS(e="admin"){return ke[e]||(ke[e]=Zx(e)),ke[e]}const tS=(e="admin")=>{const r=I.use(qn),{session:n}=r??{},t=Le(()=>n.user?.did,[n.user]),i=Jh(t);return Xh(()=>{Object.keys(ke).forEach(o=>{ke[o]?.isConnected()&&ke[o]?.disconnect(),delete ke[o]})}),t?(i&&i!==t&&Object.keys(ke).forEach(o=>{ke[o]&&(ke[o].isConnected()&&ke[o].disconnect(),ke[o].connect())}),!ke[e]&&n.user&&(ke[e]=eS(e),ke[e].connect()),ke[e]):null},rS={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>'},nS={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"/>'},iS={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 oS(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new Qh,aS=e=>!Mo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,sS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},lS=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},cS=async(e,r)=>{const{type:n,did:t}=e;return _c.isSameAddr(n,"did")?await lS(t,r)||Dn.getLink(e):Dn.getLink(e)},uS=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await cS(i,r),{type:a,chainId:s,did:l}=i;return _c.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(""))},dS=e=>Zh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),fS={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 Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Pc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function hS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=se(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),h=se(()=>{const m=a?fS[a]:null;return m?m(l,r.length):null}),p=Le(()=>{const m=d(),y=h();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,h]),v=Le(()=>{if(!e)return null;const m=sS(e);return m?.targetLink?Ie(i,m.targetLink):null},[e,i]);return!a||Mo(s)?null:g.jsxs(g.Fragment,{children:[p," ",v&&g.jsx(Pc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const pS={normal:La,success:rS,info:La,warning:nS,error:iS},gS=cr(np)`
43
+ */const Ku=Object.freeze({left:0,top:0,width:16,height:16}),En=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),tn=Object.freeze({...Ku,...En}),fo=Object.freeze({...tn,body:"",hidden:!1}),yy=Object.freeze({width:null,height:null}),Yu=Object.freeze({...yy,...En});function xy(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 Sy=/[\s,]+/;function wy(e,r){r.split(Sy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Ju={...Yu,preserveAspectRatio:""};function al(e){const r={...Ju},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=xy(n("rotate","")),wy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function Cy(e,r){for(const n in Ju)if(e[n]!==r[n])return!0;return!1}const Ar=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(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&&!Sn(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&&!Sn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Sn(s,n)?null:s}return null},Sn=(e,r)=>e?!!((e.provider===""||e.provider.match(Ar))&&(r&&e.prefix===""||e.prefix.match(Ar))&&e.name.match(Ar)):!1;function Iy(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 sl(e,r){const n=Iy(e,r);for(const t in fo)t in En?t in e&&!(t in n)&&(n[t]=En[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function Ry(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 Ty(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=sl(t[s]||i[s],o)}return a(r),n.forEach(a),sl(e,o)}function Xu(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=Ry(e);for(const i in t){const o=t[i];o&&(r(i,Ty(e,i,o)),n.push(i))}return n}const Dy={provider:"",aliases:{},not_found:{},...Ku};function ki(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Qu(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!ki(e,Dy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Ar)||typeof o.body!="string"||!ki(o,fo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Ar)||typeof a!="string"||!n[a]&&!t[a]||!ki(o,fo))return null}return r}const Nn=Object.create(null);function _y(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function wt(e,r){const n=Nn[e]||(Nn[e]=Object.create(null));return n[r]||(n[r]=_y(e,r))}function Zo(e,r){return Qu(r)?Xu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Py(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function ky(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(Nn)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(Nn[i]||{})).forEach(a=>{const s=wt(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Gr=!1;function Zu(e){return typeof e=="boolean"&&(Gr=e),Gr}function Wr(e){const r=typeof e=="string"?rn(e,!0,Gr):e;if(r){const n=wt(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function ed(e,r){const n=rn(e,!0,Gr);if(!n)return!1;const t=wt(n.provider,n.prefix);return Py(t,n.name,r)}function ll(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Gr&&!r&&!e.prefix){let i=!1;return Qu(e)&&(e.prefix="",Xu(e,(o,a)=>{a&&ed(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Sn({provider:r,prefix:n,name:"a"}))return!1;const t=wt(r,n);return!!Zo(t,e)}function Oy(e){return!!Wr(e)}function Ey(e){const r=Wr(e);return r?{...tn,...r}:null}function Ny(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]=wt(o,a));let u;s in c.icons?u=r.loaded:a===""||c.missing.has(s)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:s};u.push(f)}),r}function td(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function My(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||td([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Ay=0;function Ly(e,r,n){const t=Ay++,i=td.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 ho=Object.create(null);function cl(e,r){ho[e]=r}function po(e){return ho[e]||ho[""]}function zy(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?rn(i,r,n):i;o&&t.push(o)}),t}var jy={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Fy(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 _=Math.floor(Math.random()*w.length);a.push(w[_]),w=w.slice(0,_).concat(w.slice(_+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,f=null,d=[],h=[];typeof t=="function"&&h.push(t);function p(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),p(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(h=[]),typeof w=="function"&&h.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",h.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const T=_!=="success";switch(d=d.filter(R=>R!==w),l){case"pending":break;case"failed":if(T||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(T){u=S,d.length||(a.length?P():b());return}if(p(),C(),!e.random){const R=e.resources.indexOf(w.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",h.forEach(R=>{R(S)})}function P(){if(l!=="pending")return;p();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{p(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,T)=>{D(_,S,T)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function rd(e){const r={...jy,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Fy(r,s,l,(f,d)=>{t(),c&&c(f,d)});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 ea(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 Zn=Object.create(null),xr=["https://api.simplesvg.com","https://api.unisvg.com"],wn=[];for(;xr.length>0;)xr.length===1||Math.random()>.5?wn.push(xr.shift()):wn.push(xr.pop());Zn[""]=ea({resources:["https://api.iconify.design"].concat(wn)});function ul(e,r){const n=ea(r);return n===null?!1:(Zn[e]=n,!0)}function ei(e){return Zn[e]}function By(){return Object.keys(Zn)}function dl(){}const Oi=Object.create(null);function $y(e){if(!Oi[e]){const r=ei(e);if(!r)return;const n=rd(r),t={config:r,redundancy:n};Oi[e]=t}return Oi[e]}function nd(e,r,n){let t,i;if(typeof e=="string"){const o=po(e);if(!o)return n(void 0,424),dl;i=o.send;const a=$y(e);a&&(t=a.redundancy)}else{const o=ea(e);if(o){t=rd(o);const a=e.resources?e.resources[0]:"",s=po(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),dl):t.query(r,i,n)().abort}const fl="iconify2",Hr="iconify",id=Hr+"-count",hl=Hr+"-version",od=36e5,Gy=168;function go(e,r){try{return e.getItem(r)}catch{}}function ta(e,r,n){try{return e.setItem(r,n),!0}catch{}}function pl(e,r){try{e.removeItem(r)}catch{}}function vo(e,r){return ta(e,id,r.toString())}function mo(e){return parseInt(go(e,id))||0}const At={local:!0,session:!0},ad={local:new Set,session:new Set};let ra=!1;function Wy(e){ra=e}let dn=typeof window>"u"?{}:window;function sd(e){const r=e+"Storage";try{if(dn&&dn[r]&&typeof dn[r].length=="number")return dn[r]}catch{}At[e]=!1}function ld(e,r){const n=sd(e);if(!n)return;const t=go(n,hl);if(t!==fl){if(t){const s=mo(n);for(let l=0;l<s;l++)pl(n,Hr+l.toString())}ta(n,hl,fl),vo(n,0);return}const i=Math.floor(Date.now()/od)-Gy,o=s=>{const l=Hr+s.toString(),c=go(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{}pl(n,l)}};let a=mo(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,vo(n,a)):ad[e].add(s))}function cd(){if(!ra){Wy(!0);for(const e in At)ld(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=wt(t,i);if(!Zo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Hy(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)ld(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function Uy(e,r){ra||cd();function n(t){let i;if(!At[t]||!(i=sd(t)))return;const o=ad[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=mo(i),!vo(i,a+1))return;const s={cached:Math.floor(Date.now()/od),provider:e.provider,data:r};return ta(i,Hr+a.toString(),JSON.stringify(s))}r.lastModified&&!Hy(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function gl(){}function qy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,My(e)}))}function Vy(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=po(n)))return;o.prepare(n,t,i).forEach(s=>{nd(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Zo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),Uy(e,l)}catch(c){console.error(c)}qy(e)})})}))}const na=(e,r)=>{const n=zy(e,!0,Zu()),t=Ny(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,gl)}),()=>{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(wt(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(l=>{const{provider:c,prefix:u,name:f}=l,d=wt(c,u),h=d.pendingIcons||(d.pendingIcons=new Set);h.has(f)||(h.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Vy(l,i[c][u])}),r?Ly(r,t,o):gl},Ky=e=>new Promise((r,n)=>{const t=typeof e=="string"?rn(e,!0):e;if(!t){n(e);return}na([t||e],i=>{if(i.length&&t){const o=Wr(t);if(o){r({...tn,...o});return}}n(e)})});function Yy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function Jy(e,r){const n=typeof e=="string"?rn(e,!0,!0):null;if(!n){const o=Yy(e);return{value:e,data:o}}const t=Wr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=na([n],()=>r(e,n,Wr(n)));return{value:e,name:n,loading:i}}function Ei(e){return e.hasAttribute("inline")}let ud=!1;try{ud=navigator.vendor.indexOf("Apple")===0}catch{}function Xy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(ud||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Qy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Zy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function bo(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(Qy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Zy.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 ex=e=>e==="unset"||e==="undefined"||e==="none";function dd(e,r){const n={...tn,...e},t={...Yu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(p=>{const v=[],m=p.hFlip,y=p.vFlip;let b=p.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 C;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:C=i.height/2+i.top,v.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:C=i.width/2+i.left,v.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}b%2===1&&(i.left!==i.top&&(C=i.left,i.left=i.top,i.top=C),i.width!==i.height&&(C=i.width,i.width=i.height,i.height=C)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,s=t.height,l=i.width,c=i.height;let u,f;a===null?(f=s===null?"1em":s==="auto"?c:s,u=bo(f,l/c)):(u=a==="auto"?l:a,f=s===null?bo(u,c/l):s==="auto"?c:s);const d={},h=(p,v)=>{ex(v)||(d[p]=v.toString())};return h("width",u),h("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const tx=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Mn=tx();function rx(e){Mn=e}function nx(){return Mn}function ix(e,r){const n=ei(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 ox(e){return e===404}const ax=(e,r,n)=>{const t=[],i=ix(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 sx(e){if(typeof e=="string"){const r=ei(e);if(r)return r.path}return"/"}const lx=(e,r,n)=>{if(!Mn){n("abort",424);return}let t=sx(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;Mn(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(ox(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)})},cx={prepare:ax,send:lx};function vl(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Ni="data-style";let fd="";function ux(e){fd=e}function ml(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Ni));n||(n=document.createElement("style"),n.setAttribute(Ni,Ni),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+fd}function hd(){cl("",cx),Zu(!0);let e;try{e=window}catch{}if(e){if(cd(),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"||!ll(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;ul(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>vl(n,!0),disableCache:n=>vl(n,!1),iconExists:Oy,getIcon:Ey,listIcons:ky,addIcon:ed,addCollection:ll,calculateSize:bo,buildIcon:dd,loadIcons:na,loadIcon:Ky,addAPIProvider:ul,appendCustomStyle:ux,_api:{getAPIConfig:ei,setAPIModule:cl,sendAPIQuery:nd,setFetch:rx,getFetch:nx,listAPIProviders:By}}}function pd(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 dx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function fx(e){return"data:image/svg+xml,"+dx(e)}function hx(e){return'url("'+fx(e)+'")'}const yo={"background-color":"currentColor"},gd={"background-color":"transparent"},bl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},yl={"-webkit-mask":yo,mask:yo,background:gd};for(const e in yl){const r=yl[e];for(const n in bl)r[e+"-"+n]=bl[n]}function xl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function px(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=pd(i,{...o,width:r.width+"",height:r.height+""}),s=hx(a),l=t.style,c={"--svg":s,width:xl(o.width),height:xl(o.height),...n?yo:gd};for(const u in c)l.setProperty(u,c[u]);return t}let Lr;function gx(){try{Lr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Lr=null}}function vx(e){return Lr===void 0&&gx(),Lr?Lr.createHTML(e):e}function mx(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=pd(e.body,n);return r.innerHTML=vx(i),r.firstChild}function Sl(e,r){const n=r.icon.data,t=r.customisations,i=dd(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=mx(i);break;default:a=px(i,{...tn,...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 wl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function bx(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=Ei(this);ml(s,l),this._state=wl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ei(this),c=this._state;l!==c.inline&&(c.inline=l,ml(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 Ei(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{}Sl(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=al(this);(s.attrMode!==c||Cy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=Jy(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const h={value:c,name:u,data:f};h.data?this._gotIconData(h):d.icon=h});l.data?this._gotIconData(l):this._state=wl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,al(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Xy(s.data.body,c),f=this._state.inline;Sl(this._shadowRoot,this._state={rendered:!0,icon:s,inline:f,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=hd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const yx=bx()||hd(),{enableCache:zT,disableCache:jT,iconExists:FT,getIcon:BT,listIcons:$T,addIcon:GT,addCollection:WT,calculateSize:HT,buildIcon:UT,loadIcons:qT,loadIcon:VT,addAPIProvider:KT,_api:YT}=yx,$t=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:$t(t[n],r,n)}):r(t)),vd=(e,r="children")=>{const n=[];return $t(e,t=>n.push(t),r),n},ia=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ia(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),md=e=>/^https?:\/\//.test(e),bd=e=>/^mailto:/i.test(e.trim()),xx=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)},yd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>xx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},Sx=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((p,v)=>p+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,h=p=>f>l-d&&u<n-1&&f+p>l+d;return e.forEach(p=>{const v=i+(p[a]?.length||0)*o;t&&h(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&h(v)&&(u++,f=0,c[u]=[]),c[u].push({...p,group:!0}),f+=i,p[a]&&p[a].forEach(m=>{t&&h(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=I.useState(!1),[s,l]=I.useState(!0);if(Oo(async()=>{l(!0);try{await Eo(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%"}}),md(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return s?g.jsx(xe,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(xe,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function oa(e=["en","zh"]){const{blocklet:r}=Ft();return I.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=>ht.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=ht.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:ht.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const wx=e=>e.from!=="team-tmpl";function Cx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Oh(e.slice(0,t-1),r.slice(0,i-1)))}function xd({treeNode:e}){const{locale:r}=Me(),{blocklet:n}=Ft(),{defaultLocale:t}=oa(),i=n.environments.find(s=>s.key===ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=se(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 Yt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Yt(l)&&(u=l[r]||l[t]||l.en),g.jsxs(oe,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:c}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:u})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(No(o(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}xd.propTypes={treeNode:x.object.isRequired};const Ix=ot(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function Sd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(Ix,{children:g.jsx(Lp,{backend:zp,...i,children:g.jsx(hm,{generateNodeProps:o=>{const a=wx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(xe,{icon:"ic:round-drag-indicator"}):g.jsx(oe,{sx:{width:16,height:16}}),title:g.jsx(xd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Cx,theme:by})})})}Sd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var Rx=vc();const Tx=Gn(Rx);function wd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Me(),c=I.useRef(),[u,f]=I.useState(null),d=zt({localeList:[],inputLocale:"",localeError:""}),h=I.useMemo(()=>!!u,[u]),p=I.useMemo(()=>o.includes(i)?i:t,[o,i]),v=I.useMemo(()=>d.localeList.filter(S=>!!a[S]),[d.localeList,a]),m=I.useMemo(()=>Object.keys(Et(a,[...d.localeList,t])).map(S=>({title:a[S],value:S})),[d.localeList]),y=I.useMemo(()=>`Default (${a[t]||Object.values(a)?.[0]})`,[a]),b=se(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=se((S="")=>{const T=S?.trim(),R=b(T);return R!==!0?d.localeError=R:d.localeError="",R}),D=se(()=>{f(null),d.inputLocale="",d.localeError=""}),P=se(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=se((S,T)=>{S.preventDefault(),S.stopPropagation(),d.localeList=Wc(d.localeList,T),s(T)}),_=se(S=>{const{value:T}=S.target;C(T),d.inputLocale=T});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Op("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs(Yp,{sx:e,value:p,onChange:(S,T)=>{n(T)},children:[g.jsx(qa,{label:y,value:t}),v.map(S=>g.jsx(qa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(Ae,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:T=>{w(T,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Ae,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(Yi,{open:h,anchorEl:u,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(oe,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(oe,{sx:{mt:1},children:g.jsx(Qi,{required:!0,fullWidth:!0,label:"Locale",value:d.inputLocale,options:m,onChange:_,error:!!d.localeError,helperText:d.localeError||" "})}),g.jsx(oe,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(xt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}wd.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 aa=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Cd(e,r,n=5e3){for(const t of aa){const i=Ie(t,e);try{return await Xp.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 Dx({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 Cd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const fn=new Map;async function _x(e){if(fn.has(e))return fn.get(e);const r=(async()=>{const{data:n}=await Cd("/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)})();fn.set(e,r);try{return await r}catch(n){throw fn.delete(e),n}}function Px(e){return Ie(aa[0],`${e}.svg`)}function kx(e){try{const r=new URL(e);for(const n of aa)if(r.origin===n)return Eh(r.pathname).replace(".svg","");return""}catch{return""}}function Ox(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):No(e)&&(n=kx(e))),{isIconId:r,iconId:n}}const Ex=I.lazy(()=>Lh(()=>import("./index-C3LdZf6o.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}))),Cl=Ve(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function Id({icon:e,...r}){const[n,t]=I.useState(!1);return Oo(async()=>{t(!1),await Eo(e),t(!0)},[e]),e?n?g.jsx(xe,{icon:e,...r}):g.jsx(xe,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(xe,{icon:"material-symbols-light:select-rounded",...r})}Id.propTypes={icon:x.string.isRequired};function xo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=yc(),{blocklet:u}=Ft(),f=Hn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===ht.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),h=s(),p=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Me(),{isIconId:C,iconId:D}=Ox(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:T,...R}=a,k=i.includes("upload"),j=i.includes("select"),M=Ie(l,"/api/media/upload",u.appPid),H=zt({showPopover:!1}),E=se(Z=>{if(Z?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(Z,V).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=se(async Z=>await p.current.getUploader().uploadFile(Z)),$=se(()=>{w(null)}),q=se(()=>{j&&w(m.current)}),J=se(async Z=>{try{if(o==="url"){const V=Px(Z),re=await Nh(V,{width:128,height:128}),ie=await Mh(re,Z);await B(ie)}else _?.(Z)}catch(V){console.error("Failed to pick icon:",V)}$()}),ee=se(Z=>{Z.stopPropagation(),v.current.open(),$()}),X=se(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...T},onClick:j?q:void 0,...R,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Rn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Cl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Rn,{position:"end",children:[g.jsx(Ae,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx($c,{style:{fontSize:18}})}),k&&g.jsx(Ah,{title:y("common.upload"),children:g.jsx(Ae,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(Id,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&g.jsx(oe,{component:Jp,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&g.jsx(Yi,{open:!!P,anchorEl:P,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:$,children:g.jsx(Rd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:$})}),g.jsx(So,{ref:p,locale:b,apiPath:M,headers:h,imageEditorProps:{},onUploadFinish:X}),g.jsx(So,{ref:v,locale:b,apiPath:M,headers:h,onUploadFinish:X}),g.jsx(Yi,{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(Cl,{size:120,icon:E(e),alt:"Error"})})]})}xo.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 Rd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[s,l]=I.useState([]),[c,u]=I.useState(!0),[f,d]=I.useState(n),[h,p]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Me(),D=96,P=se(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,T=(S-1)*D,R=S*D,k=m.current.slice(T,R);l(j=>[...j,...k]),y.current=S,b.current=R<m.current.length,u(!1)},300))}),w=se(S=>{m.current=S,y.current=1,b.current=S.length>D;const T=S.slice(0,D);l(T),p(S.length===0),b.current&&P()}),{run:_}=xc(async S=>{if(S){u(!0);try{const{icons:T}=await Dx({keyword:S});w(T)}catch(T){console.error("Failed to search icons:",T),p(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:k,clientHeight:j}=v.current;(R+j>=k-150||k<=j)&&P()},T=v.current;return T&&(T.addEventListener("scroll",S),S()),()=>{T&&T.removeEventListener("scroll",S)}},[P,c]),Oo(async()=>{if(f)_(f);else{u(!0);try{const S=await _x("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),p(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Nx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(it,{label:C("navigation.form.searchIcons"),placeholder:C("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:S=>d(S.target.value),slotProps:{input:{endAdornment:g.jsx(Ae,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx($c,{style:{fontSize:18}})})}}}),g.jsx(xt,{onClick:o,children:C("common.cancel")})]}),g.jsxs(oe,{children:[s.length>0&&g.jsx(oe,{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(Mx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),h&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(oe,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(oe,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(Sc,{size:20})})]})]})}Rd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Nx=Ve(oe)(({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}})),Mx=Ve(Ae,{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 So({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(I.Suspense,{children:g.jsx(Ex,{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}})})}So.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const Il=24,Rl=48,Tl="add";x.string.isRequired;function sa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Bc(),{t:s,locale:l}=Me(),{localeMap:c,defaultLocale:u}=oa(),f=se(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=se(N=>Wc(Array.from(new Set(be.NAVIGATION_I18N_FIELDS.flatMap(O=>Yt(N[O])?Object.keys(N[O]):[]))),u)),h=I.useRef(()=>{}),p=zt({isRoot:!0,type:Tl,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(p.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Vp({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{be.NAVIGATION_I18N_FIELDS.forEach(N=>b(N,p.formState[N][p.locale]))},[b,p.locale]);const P=Kp({control:m}),w=P.component,_=P.title,S=P.description,T=P.link,R=P.parent;I.useEffect(()=>{p.formState.title[p.locale]=_},[_]),I.useEffect(()=>{p.formState.description[p.locale]=S},[S]),I.useEffect(()=>{p.formState.link[p.locale]=T},[T]),I.useEffect(()=>{i?.(P)},[P,i]);const k=I.useMemo(()=>t.find(O=>w?n.find(te=>te.name===w).did===O.id:O.id===R),[n,t,w,R]),j=I.useMemo(()=>{if(k?.component){const N=n.find(ae=>ae.name===k.component),{link:O}=N||{},U=Yt(O)?O[p.locale]:O;if(w)return Ma(U);const te=Yt(k.link)?k.link[p.locale]:k.link;return Ma(Ie(U,te||"/"))}return null},[n,p.locale,k,w]),M=I.useMemo(()=>{const{component:N}=k||{},O=n.find(ae=>ae.name===N),{navigation:U=[]}=O||{};return Ee.flattenNavigation(U,{transform(ae,de){return de?.section&&(ae.section=ae.section||de.section),ae}}).filter(ae=>ae.link).filter(ae=>Ee.isMatchSection(ae.section,r)).map(ae=>({label:ae.link,title:ae.title[l]||ae.title}))},[k,n,r,l]),H=se(()=>{p.isRoot=!0,p.locale=u,p.type=Tl,p.linkDisabled=!1,p.formState=f(),y(),C(),h.current=()=>{}}),E=se((N={})=>(p.localeList.length>0&&be.NAVIGATION_I18N_FIELDS.forEach(O=>{fg(p.formState[O]).length>1&&(N[O]=p.formState[O])}),Mo(N.role)&&(N.role=void 0),N)),B=se(({parent:N}={},O=()=>{})=>{p.type="add",p.isRoot=!N,b("parent",N?.id),h.current=U=>{O(U)}}),$=se((N={},O=()=>{})=>{const{id:U,icon:te,parent:ae,component:de,role:he=[]}=N;b("id",U),b("icon",te),N.from==="team-tmpl"&&(p.linkDisabled=!0);const Ce=d(N),ze=(ye,_e)=>{wc(ye)?p.formState[_e]=Ce.reduce((le,ve)=>(le[ve]=ye,le),{[u]:ye}):Yt(ye)?p.formState[_e]=Qe(ye):p.formState[_e]={}};be.NAVIGATION_I18N_FIELDS.forEach(ye=>ze(N[ye],ye)),be.NAVIGATION_I18N_FIELDS.forEach(ye=>b(ye,p.formState[ye][p.locale])),b("component",de),b("parent",ae),b("role",he||[]),p.type="edit",p.isRoot=!ae,h.current=ye=>{const _e=zh(ye,["id","title","description","icon","component","link","role"]);O(_e)}}),q=se(N=>{const O=N?.trim();if(r!=="bottomNavigation"){if(!O)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(O.length>Il)return s("navigation.form.titleTooLong",{len:Il})}return!0}),J=se(N=>{const O=N?.trim();return O&&O.length>Rl?s("navigation.form.descriptionTooLong",{len:Rl}):!0}),ee=se(N=>N?.startsWith("/")?new URL(N,window.location.origin).href:N),X=se(async N=>{const O=N?.trim();if(O){if(No(ee(O)))return!0;try{await Eo(O)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=se(N=>{const O=N?.trim();return O?X(O):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),V=se(N=>{const O=N?.trim();return O?Ee.checkLink(O)?!0:s("navigation.form.invalidLink"):p.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=se(N=>{p.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O][N]||(p.formState[O][N]="")}),setTimeout(()=>{C()})}),ie=se(()=>{const{title:N,link:O}=p.formState;if(r!=="bottomNavigation")for(const U of Object.keys(N)){const te=q(N[U]);if(te!==!0)return te}for(const U of Object.keys(O)){const te=V(O[U]);if(te!==!0)return te}return!0}),G=se(N=>{const O=ie();O===!0?h.current(E(N)):Ot.error(O)}),W=se(N=>{p.locale=u,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O]=Et(p.formState[O],N)}),i?.(P)}),L=se(N=>{p.locale=N,be.NAVIGATION_I18N_FIELDS.forEach(O=>{p.formState[O][N]=p.formState[O][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:$,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(G)}),[B,H,$,v,G]),g.jsxs(oe,{...o,children:[g.jsx(wd,{sx:{mb:1},onAdd:L,onChange:re,onRemoveLocale:W,defaultLocale:u,locale:p.locale,localeMap:c,locales:p.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})}),r==="bottomNavigation"?g.jsx(lt,{name:"icon",control:m,rules:{validate:Z},render:({field:N})=>g.jsx(xo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:p.locale!==u,methods:["select"],iconifyShape:"url",...N})}):g.jsx(lt,{name:"icon",control:m,rules:{validate:X},render:({field:N})=>g.jsx(xo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:p.locale!==u,...N})}),p.isRoot&&g.jsx(lt,{name:"component",control:m,render:({field:N})=>g.jsx(Qi,{fullWidth:!0,margin:"dense",disabled:p.locale!==u&&N.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(O=>({title:O.title,value:O.name,description:O.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Et(N,"ref")})}),!p.isRoot&&["header"].includes(r)&&g.jsx(lt,{name:"description",control:m,rules:{validate:J},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:p.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...N})}),g.jsx(lt,{name:"link",control:m,rules:{validate:V},render:({field:N})=>g.jsx(Cc,{fullWidth:!0,margin:"dense",children:g.jsx(Qp,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:p.linkDisabled,isOptionEqualToValue:O=>O.label,options:M,renderInput:O=>g.jsx(it,{...O,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?g.jsx(Rn,{position:"start",sx:{textDecoration:Tx(T||"")?"line-through":""},children:j}):null}}}),renderOption:(O,U)=>g.jsxs(oe,{component:"li",...O,children:[U.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:U.title})]}),margin:"dense",...N,onChange:()=>{},onInputChange:(O,U)=>{N.onChange(U)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(lt,{name:"role",control:m,render:({field:N})=>g.jsx(Qi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(O=>({title:O.title,value:O.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Et(N,"ref")})}),r==="bottomNavigation"&&g.jsx(lt,{name:"title",control:m,rules:{validate:q},render:({field:N})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...N})})]})]})}sa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function la({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Me(),[o,{setTrue:a,setFalse:s}]=Up(),[l,c]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[l];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,l]),d=I.useCallback(()=>{s(),u.current?.reset()},[s]),h=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),p=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:h,edit:p,close:d}),[h,p,d]),g.jsx(Ic,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Tn,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(sa,{ref:u,section:r,components:n,rawNavigations:t})})}la.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function Td({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Me(),l=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=I.useCallback(v=>{u(v),r(o)},[r,o]),d=I.useCallback(v=>{u(v),n(o)},[n,o]),h=I.useCallback(v=>{u(v),t(o)},[t,o]),p=I.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(Ae,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(xe,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:s(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Ae,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(xe,{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(Ae,{size:"small",color:"warning",onClick:h,disabled:c,children:o.visible===!1?g.jsx(xe,{icon:"mdi:eye-off-outline"}):g.jsx(xe,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:s(l&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Ae,{disabled:l&&!c,size:"small",color:"error",onClick:p,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}Td.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Cn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Ax=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},Lx=(e,r="en",n="en")=>{if(typeof e=="string"){if(md(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(bd(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},rr=({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 $t(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:Rc(o.items?.length?o.link:Lx(o.link,r,n),t),_rawLink:o.link}),"items")},zx=e=>$t(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),jx=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},ca=e=>{if(!e)return null;const r={...e};return r.theme=Ax(r.theme),r.navigation=jx(Fx(r.navigation)),r},Fx=(e=[])=>ia(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Dd=(e,r)=>ia(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"),Bx={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"/>'},$x={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 Gx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(h=>h.section==="sessionManager"&&!["/sessionManager"].includes(h.id)).filter(h=>!!(h?.role||[]).includes(e?.user?.role||"guest")).map(h=>{const p=(a?.componentMountPoints||[]).find(v=>h.component===v.name);return{...h,component:p}}),l=jt(),c=I.useRef(null),u=zt({open:!1}),f=se((h=!u.open)=>{u.open=h}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return s.length===0||!e?.user?null:g.jsxs(oe,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Ae,{size:"medium",ref:c,children:g.jsx(xe,{icon:Bx,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(jh,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:h})=>g.jsx(Fh,{onClickAway:p=>{p.preventDefault(),p.stopPropagation(),f(!1)},children:g.jsx(Tc,{...h,timeout:350,children:g.jsxs(Or,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Bh,{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(p=>g.jsx($h,{disablePadding:!0,children:g.jsxs(Zp,{href:Aa(p.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[p?.component?.did?g.jsx(oe,{component:"img",src:`${Dc}/blocklet/logo-bundle/${p.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:p.icon||$x,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Aa(p.title,r)})]})},p.id))}),g.jsx(Gh,{session:e,children:g.jsx(Tn,{variant:"outlined",fullWidth:!0,href:Wh,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const _d=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])}))}))}),Pd=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}),Wx=["admin","owner"],Hx=e=>e.endsWith(".ip.abtnet.io"),Ux=e=>e.endsWith(".did.abtnet.io"),qx={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:"配置域名"}},Vx=1e3*60*60*24*30,Dl=".well-known/service/admin/domains";function kd({locale:e="en",session:r={}}){const n=r?.user,t=Gc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const h=+new Date,p=+new Date(d);return h-p>Vx}),a=se((d,h={})=>Un(qx,d,e,"en",h)),s=I.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),l=I.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=I.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=I.useCallback(()=>{const d=Ie(window.location.origin,Dl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Wx.includes(n.role);return window.location.href.includes(Dl)||t||!Hx(s)&&!Ux(s)?null:g.jsxs(Hh,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Uh,{sx:{padding:"20px !important"},children:[g.jsx(me,{sx:{fontSize:"20px",fontWeight:"500"},children:a(f?"owner.title":"guest.title")}),g.jsx(me,{sx:{marginTop:"20px",fontSize:"14px",color:"text.secondary"},children:a(f?"owner.description":"guest.description")}),f&&g.jsx(oe,{component:"ul",children:l.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs(qh,{sx:{px:"12px !important"},children:[g.jsx(xt,{onClick:c,children:a("skip")}),f&&g.jsx(xt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}kd.propTypes={locale:x.string,session:x.object};var Mi,_l;function Kx(){if(_l)return Mi;_l=1;const e=Vh();return Mi=(r,n=!1)=>{const t=e(["@arcblock/ws",r].join(":"));return{debug:t,warn:t,info:t,trace:n?t:console.error,error:n?t:console.error}},Mi}var Ai,Pl;function Yx(){if(Pl)return Ai;Pl=1;const e=Kx();return Ai=(r,n,t)=>class extends r{constructor(o,a={}){super(o,{transport:t,...a}),this._logger=e("client",a.silent),this.emitter=new n,this.onOpen(()=>{this._logger.debug("socket open",o)}),this.onClose(()=>{this._logger.debug("socket close",o)}),this.onError(s=>{this._logger.error("socket error",s.error)}),this.onMessage(s=>{this._logger.debug("socket message",s)})}on(o,a,s={}){this.ensureJoinChannel(o,s),this.emitter.on(o,a)}off(o,a){a?this.emitter.off(o,a):this.emitter.removeAllListeners(o),this.ensureLeaveChannel(o)}disconnect(o,a,s){this.emitter.eventNames().forEach(l=>{this.emitter.removeAllListeners(l)}),super.disconnect(o,a,s)}ensureJoinChannel(o,a={}){if(this.emitter.listenerCount(o)>0)return;const l=this.channel(o,a);l.join().receive("ok",c=>{this._logger.debug("join success",{topic:o,message:c})}).receive("error",c=>{this._logger.error("join error",{topic:o,error:c})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),l.on(o,({status:c,response:u})=>{c==="ok"?this.emitter.emit(o,u):this._logger.debug("response error",{topic:o,status:c,data:u})})}ensureLeaveChannel(o){if(this.emitter.listenerCount(o)>0)return;const s=this.channels.find(l=>l.topic===o);s&&(this.remove(s),s.leave().receive("ok",l=>{this._logger.debug("leave success",{topic:o,message:l})}).receive("error",l=>{this._logger.error("leave error",{topic:o,err:l})}).receive("timeout",()=>{this._logger.debug("leave timeout",{topic:o})}),s.off(o))}subscribe(o,a={}){let s=this.channels.find(l=>l.topic===o);return s||(s=this.channel(o,a),s.join().receive("ok",l=>{this._logger.debug("join success",{topic:o,message:l})}).receive("error",l=>{this._logger.error("join error",{topic:o,error:l})}).receive("timeout",()=>{this._logger.debug("join timeout",{topic:o})}),s)}unsubscribe(o){this.ensureLeaveChannel(o)}},Ai}var Li,kl;function Jx(){if(kl)return Li;kl=1;const e=Kh(),{Socket:r}=Yh();return Li=Yx()(r,e),Li}var zi,Ol;function Xx(){return Ol||(Ol=1,zi={WsClient:Jx()}),zi}var Qx=Xx();const ke={};function Zx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Ie(r,Dc,e);return new Qx.WsClient(n,{heartbeatIntervalMs:100*1e3})}function eS(e="admin"){return ke[e]||(ke[e]=Zx(e)),ke[e]}const tS=(e="admin")=>{const r=I.use(qn),{session:n}=r??{},t=Le(()=>n.user?.did,[n.user]),i=Jh(t);return Xh(()=>{Object.keys(ke).forEach(o=>{ke[o]?.isConnected()&&ke[o]?.disconnect(),delete ke[o]})}),t?(i&&i!==t&&Object.keys(ke).forEach(o=>{ke[o]&&(ke[o].isConnected()&&ke[o].disconnect(),ke[o].connect())}),!ke[e]&&n.user&&(ke[e]=eS(e),ke[e].connect()),ke[e]):null},rS={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>'},nS={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"/>'},iS={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 oS(){const e=jt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=Hn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const kr=new Qh,aS=e=>!Mo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,sS=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},lS=async(e,r)=>{try{return await kr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},cS=async(e,r)=>{const{type:n,did:t}=e;return _c.isSameAddr(n,"did")?await lS(t,r)||Dn.getLink(e):Dn.getLink(e)},uS=async(e,r,n=!0)=>{const t=Dn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Dn.Link){if(n){const o=await cS(i,r),{type:a,chainId:s,did:l}=i;return _c.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(""))},dS=e=>Zh.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),fS={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 Kt({user:e,color:r=void 0}){const{palette:n}=jt(),t=Vn(Ie(be.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Pc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Kt.displayName="UserLink";function hS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=jt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=Le(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Le(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=se(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Kt,{user:f[0],color:c});const m=f.slice(0,-1),y=f[f.length-1];if(f.length===2)return g.jsxs(g.Fragment,{children:[g.jsx(Kt,{user:m[0],color:c})," and ",g.jsx(Kt,{user:y,color:c})]});const b=f.length>3,C=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[C.map((D,P)=>g.jsxs(Q.Fragment,{children:[g.jsx(Kt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Kt,{user:y,color:c})]})]})}),h=se(()=>{const m=a?fS[a]:null;return m?m(l,r.length):null}),p=Le(()=>{const m=d(),y=h();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,h]),v=Le(()=>{if(!e)return null;const m=sS(e);return m?.targetLink?Ie(i,m.targetLink):null},[e,i]);return!a||Mo(s)?null:g.jsxs(g.Fragment,{children:[p," ",v&&g.jsx(Pc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const pS={normal:La,success:rS,info:La,warning:nS,error:iS},gS=cr(np)`
44
44
  font-size: 20px;
45
45
  `,vS=cr.div`
46
46
  display: flex;