@abtnode/webapp 1.17.6-beta-20251216-081847-bf91c4db → 1.17.6-beta-20251216-223535-283b9ffe
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.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-BJDMOH87.js → AdapterDayjs-D4d-PrqS.js} +7 -7
- package/dist/assets/{Add-CwfzHL2f.js → Add-BSsB0LgV.js} +1 -1
- package/dist/assets/ArrowDropDown-CNKThDMg.js +1 -0
- package/dist/assets/{Autocomplete-DTfKu22k.js → Autocomplete-fQULCEh3.js} +1 -1
- package/dist/assets/{Breadcrumbs-CI3uNLPY.js → Breadcrumbs-BYVgLpiJ.js} +1 -1
- package/dist/assets/{ButtonGroup-CE8Yme-Z.js → ButtonGroup-DgPN2-YM.js} +1 -1
- package/dist/assets/{CSSTransition-Cq_0t7dk.js → CSSTransition-DYtKv9e9.js} +1 -1
- package/dist/assets/{CallMerge-BpBCpBS4.js → CallMerge-v67_Z3SC.js} +1 -1
- package/dist/assets/{CardContent-VIJU2wwZ.js → CardContent-BYECX7XP.js} +1 -1
- package/dist/assets/{ChevronLeft-DDZiF24z.js → ChevronLeft-CfyGnxyr.js} +1 -1
- package/dist/assets/{ChevronRight-iPKgmmla.js → ChevronRight-C4O2fZlw.js} +1 -1
- package/dist/assets/{Clear-lc-87cdU.js → Clear-CybwA2Jd.js} +1 -1
- package/dist/assets/{Delete-Depf4F2y.js → Delete-ytwLYNdm.js} +1 -1
- package/dist/assets/{DeleteOutline-CCoXF09b.js → DeleteOutline-CjxNIx7X.js} +1 -1
- package/dist/assets/{Done-KOQXZtlD.js → Done-BqFmWa1U.js} +1 -1
- package/dist/assets/{Edit-BWqfJBJ6.js → Edit-DNmNGF17.js} +1 -1
- package/dist/assets/{ErrorOutline-B7Ps-w5c.js → ErrorOutline-BlyorQPQ.js} +1 -1
- package/dist/assets/{FilterList-BGhEWkST.js → FilterList-DD3VXN0o.js} +1 -1
- package/dist/assets/{Google-B-6SbnBW.js → Google-Bp60YdGj.js} +1 -1
- package/dist/assets/{HelpOutline-VHuGbaF6.js → HelpOutline-kE6mcJHh.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-6ORbckfg.js → KeyboardArrowDown-5IVXxFq-.js} +1 -1
- package/dist/assets/{Launch-BeO2pbYn.js → Launch-Dnww4ldq.js} +1 -1
- package/dist/assets/{Link-pkcRdxt0.js → Link-DkJ5JSUR.js} +1 -1
- package/dist/assets/{ListItemButton-BUXqqfVc.js → ListItemButton-Cmz2lNmj.js} +1 -1
- package/dist/assets/{ListSubheader-DzDc9oA3.js → ListSubheader-CE5Bsi9j.js} +1 -1
- package/dist/assets/{LoadingButton-DuEza0fz.js → LoadingButton-CyiIDt4W.js} +1 -1
- package/dist/assets/{MoreVert-DXy5wrMx.js → MoreVert-C-gNfdF4.js} +1 -1
- package/dist/assets/{OpenInNew-O9EysXQn.js → OpenInNew-Dw9F5-j0.js} +1 -1
- package/dist/assets/{Refresh-BT6pxoXK.js → Refresh-CZ4VLHgc.js} +1 -1
- package/dist/assets/{Replay-CBq27_EQ.js → Replay-BJq8nepA.js} +1 -1
- package/dist/assets/{Search-edKoOPH1.js → Search-Cc0L1P8Y.js} +1 -1
- package/dist/assets/{Stepper-rWMUaF_2.js → Stepper-DMJHwAtc.js} +1 -1
- package/dist/assets/{TableSearch-B1H-6-fg.js → TableSearch-DIxp58MQ.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-C_82EW2F.js → ToggleButtonGroup-D0GUjsDr.js} +1 -1
- package/dist/assets/{UnfoldMore-COp9hgN2.js → UnfoldMore-CxNKo0Ry.js} +1 -1
- package/dist/assets/{Verified-CDQAXply.js → Verified-Bmj6wp69.js} +1 -1
- package/dist/assets/{VerifiedUser-DK9YGdyH.js → VerifiedUser-U4nx-WO7.js} +1 -1
- package/dist/assets/{ViewList-BbsCfkWP.js → ViewList-CFmOfqSL.js} +1 -1
- package/dist/assets/{_createAggregator-Dw9ehKUs.js → _createAggregator-BNHjiP2Z.js} +1 -1
- package/dist/assets/{actions-B3lOcEVi.js → actions-DxhW-s_8.js} +1 -1
- package/dist/assets/{actions-D6D1nZGR.js → actions-LmskFz0e.js} +1 -1
- package/dist/assets/{agreement-BJafEhuZ.js → agreement-Cw-Y24RV.js} +1 -1
- package/dist/assets/api-CM8nEaeN.js +1 -0
- package/dist/assets/{appearance-DHyuFSLh.js → appearance-B_sAL_Xy.js} +1 -1
- package/dist/assets/{audit-logs-9W-SjlpY.js → audit-logs-DrYw8YX2.js} +1 -1
- package/dist/assets/{base-chart-CQIo67AL.js → base-chart-Cnjgjyps.js} +1 -1
- package/dist/assets/{blocklet-c-fcHcMv.js → blocklet-CAtl3NS9.js} +1 -1
- package/dist/assets/{chain-DggQDLgW.js → chain-CLyDSq6m.js} +1 -1
- package/dist/assets/{click-to-copy-CUoB1qVU.js → click-to-copy-B4kD-azC.js} +1 -1
- package/dist/assets/cloneDeep-B7ITWJEe.js +1 -0
- package/dist/assets/{config-navigation-0EI4c1lJ.js → config-navigation-EBUlfuPd.js} +3 -3
- package/dist/assets/connect-to-BBTYSJcL.js +29 -0
- package/dist/assets/{cssMode-BsY3xqt4.js → cssMode-Bt9MhaWE.js} +1 -1
- package/dist/assets/{delete-confirm-BuKtLpww.js → delete-confirm-BW9rRHcw.js} +1 -1
- package/dist/assets/{depsEqual-CDIkAeqx.js → depsEqual-CZmuZV4u.js} +1 -1
- package/dist/assets/{detail-DEbKzuLV.js → detail-NaPLCibZ.js} +3 -3
- package/dist/assets/{domains-lG_9thiv.js → domains-CRVaOfFE.js} +2 -2
- package/dist/assets/{download-Z-lPT0_Q.js → download-Q0QwEx4s.js} +1 -1
- package/dist/assets/{edit.svg-BNlNDOgE.js → edit.svg-BwRgVxi0.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-OrWbvjn-.js +1 -0
- package/dist/assets/engine-CyztVVgp.js +1 -0
- package/dist/assets/{freemarker2-C5pjFwAf.js → freemarker2-tDqLNl-2.js} +1 -1
- package/dist/assets/{get-safe-url-DMzSWw8A.js → get-safe-url-2iJX7eF-.js} +1 -1
- package/dist/assets/getValidReactChildren-BaHtQCbY.js +1 -0
- package/dist/assets/{graphqlMode-DQJwvpqC.js → graphqlMode-BlUbMfzr.js} +2 -2
- package/dist/assets/{handlebars-AtbuPgIu.js → handlebars-9eJ84UTg.js} +1 -1
- package/dist/assets/{html-BZ4Y9llP.js → html-D6df9rSg.js} +1 -1
- package/dist/assets/{html-title-ZIT73gw4.js → html-title-lLYk44sN.js} +1 -1
- package/dist/assets/{htmlMode-CaNYTMy1.js → htmlMode-LE_hT0Km.js} +1 -1
- package/dist/assets/{iframe-BeX_RqP4.js → iframe-BeIjzVA5.js} +1 -1
- package/dist/assets/{index-tUPbUUvJ.js → index-20VJ2Oit.js} +1 -1
- package/dist/assets/{index-CjAXuazv.js → index-2yC9CX7x.js} +1 -1
- package/dist/assets/{index-BE354x55.js → index-B5BIzAQO.js} +1 -1
- package/dist/assets/{index-C0fIFyuA.js → index-B9nSfr01.js} +3 -3
- package/dist/assets/{index-Cihue4u0.js → index-BKiW1GO2.js} +1 -1
- package/dist/assets/{index-C3en75nR.js → index-BLPxMqb5.js} +1 -1
- package/dist/assets/{index-DvylVaG5.js → index-BPTVdEku.js} +1 -1
- package/dist/assets/{index-5clu8qhD.js → index-BfBO-AOR.js} +1 -1
- package/dist/assets/{index-CfCMnLvt.js → index-BhijUvdW.js} +1 -1
- package/dist/assets/{index-Dgm3J-5y.js → index-BjV7y4g4.js} +1 -1
- package/dist/assets/{index-Bx58QoYR.js → index-Bk9ooLXT.js} +1 -1
- package/dist/assets/{index-BSjBv3t4.js → index-Bnk9byas.js} +4 -4
- package/dist/assets/index-BtepVdqB.js +1 -0
- package/dist/assets/{index-CNAqYYKs.js → index-C88tq6i-.js} +1 -1
- package/dist/assets/{index-CwvGvnvI.js → index-C8LJNLE1.js} +1 -1
- package/dist/assets/{index-_wUNu-iB.js → index-CNTV-HhI.js} +1 -1
- package/dist/assets/{index-CYG5tlBe.js → index-CPcBs23J.js} +1 -1
- package/dist/assets/{index-DBPZHeTe.js → index-CUC9gaVs.js} +1 -1
- package/dist/assets/{index-CZlU7cPx.js → index-CZuf0REe.js} +1 -1
- package/dist/assets/{index-CLwXTEVs.js → index-C_HV1TNt.js} +3 -3
- package/dist/assets/{index-DKnP8AX5.js → index-Cd1hBQ_9.js} +1 -1
- package/dist/assets/{index-CnSanU-5.js → index-CfIM04Ha.js} +2 -2
- package/dist/assets/{index-C8Gu9f5N.js → index-Cu2YPuaF.js} +1 -1
- package/dist/assets/{index-BtplxQ7P.js → index-CxNALWK-.js} +1 -1
- package/dist/assets/{index-B7tB7lMU.js → index-D1_GavIJ.js} +1 -1
- package/dist/assets/{index-CSHkmzNN.js → index-D6nTf7SK.js} +18 -18
- package/dist/assets/{index-Bi94s6DF.js → index-D6qulFBc.js} +1 -1
- package/dist/assets/{index-JpjTsddL.js → index-DLeyjgnC.js} +1 -1
- package/dist/assets/{index-Bya-MYDK.js → index-D_bACieO.js} +1 -1
- package/dist/assets/{index-DOuT_eWr.js → index-Dcu0Ced5.js} +1 -1
- package/dist/assets/{index-CWU4hC_i.js → index-DdUmpiCp.js} +3 -3
- package/dist/assets/{index-D8iAEh5P.js → index-DlsopR7t.js} +1 -1
- package/dist/assets/{index-CyYCs6Na.js → index-DmEIktUl.js} +114 -116
- package/dist/assets/{index-_ylGel7X.js → index-DqqrHhsp.js} +1 -1
- package/dist/assets/{index-DH-JWbgS.js → index-DsPQ5RNh.js} +1 -1
- package/dist/assets/{index-ZHthb_a5.js → index-I7yLA1Ov.js} +1 -1
- package/dist/assets/{index-hkRM3sJd.js → index-IxMsTtHL.js} +1 -1
- package/dist/assets/index-Mpmy1dYW.js +375 -0
- package/dist/assets/{index-CiR3wNRT.js → index-P7FcdKFO.js} +1 -1
- package/dist/assets/{index-FBWsHUHc.js → index-UQ3D2bKL.js} +4 -4
- package/dist/assets/{index-sJeutPoU.js → index-WvfzGhKH.js} +1 -1
- package/dist/assets/{index-qDXgq7vV.js → index-YqJm1wxK.js} +9 -9
- package/dist/assets/{index-CJF8E7TC.js → index-cmzW_NwI.js} +1 -1
- package/dist/assets/{index-CffUOfeg.js → index-jxWF1-Uj.js} +8 -8
- package/dist/assets/{index-BGKWLg7d.js → index-ojNpFmwB.js} +1 -1
- package/dist/assets/{index.esm-XgmtgzU6.js → index.esm-JPVKYAuW.js} +1 -1
- package/dist/assets/{install-from-url-CGtgqRyi.js → install-from-url-a0384hu9.js} +1 -1
- package/dist/assets/{invitation-C_eNuh8O.js → invitation-CdbygWIR.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-BspuX_I9.js → is-path-prefix-equal-BK7rdpKT.js} +1 -1
- package/dist/assets/{item-wxO3KmF4.js → item-C3UkBhG5.js} +1 -1
- package/dist/assets/{javascript-CKDwawbm.js → javascript-DkE91zSZ.js} +1 -1
- package/dist/assets/{jsonMode-BP0R9CmR.js → jsonMode-CBrNM7_M.js} +1 -1
- package/dist/assets/{liquid-4UI0Zois.js → liquid-CnsOwi8j.js} +1 -1
- package/dist/assets/{list-header-C9_FZEk7.js → list-header-C7PJrzvN.js} +1 -1
- package/dist/assets/{lock.svg-tfWudiuy.js → lock.svg-Rm7SZx1d.js} +1 -1
- package/dist/assets/{log-CF_IJCaQ.js → log-DEFMVzdt.js} +1 -1
- package/dist/assets/{lottie-react.esm-BvFBsF4l.js → lottie-react.esm-B-ezAxOL.js} +1 -1
- package/dist/assets/{mdx-O8RIyVTG.js → mdx-CZIaKyUY.js} +1 -1
- package/dist/assets/{memory-CoHOdYyC.js → memory-i6finnCy.js} +1 -1
- package/dist/assets/{metric-8WMIjcND.js → metric-CihRbocA.js} +1 -1
- package/dist/assets/omit-CzDjJ0V8.js +1 -0
- package/dist/assets/{overview-KMBUCZti.js → overview-BKE4gv-F.js} +1 -1
- package/dist/assets/{permission-3nsQS0Bo.js → permission-DlhGxFII.js} +1 -1
- package/dist/assets/{preference-DvLBp1_G.js → preference-BtrpCLMm.js} +3 -3
- package/dist/assets/{python-CCp746AY.js → python-DJYt3n7B.js} +1 -1
- package/dist/assets/{raf-schd.esm-BNZAb83s.js → raf-schd.esm-D8v9lZx_.js} +1 -1
- package/dist/assets/{razor-YJwBLn7z.js → razor-hMRIDDQT.js} +1 -1
- package/dist/assets/{rotate-session-key-D_IS-WkQ.js → rotate-session-key-WBI1WJWo.js} +1 -1
- package/dist/assets/{runtime-Dxp6bWyV.js → runtime-Bc-gjnta.js} +1 -1
- package/dist/assets/schema-HU2ZEH5u.js +1 -0
- package/dist/assets/sdk-46pKrnQg.js +1 -0
- package/dist/assets/{service-BwsotI3l.js → service-C3is7e0x.js} +1 -1
- package/dist/assets/{shorten-label-DJxU7eGt.js → shorten-label-DL-itFUz.js} +1 -1
- package/dist/assets/{simple-select-DTAtG4Ai.js → simple-select-BAsjOjPA.js} +1 -1
- package/dist/assets/{spaces-z72qxe5O.js → spaces-Djmw0nt4.js} +1 -1
- package/dist/assets/{status-3LMMJunc.js → status-D2Drllod.js} +1 -1
- package/dist/assets/{status-Cj3yOznG.js → status-D7ZlLl4T.js} +1 -1
- package/dist/assets/{switch-control-DBzGlbkg.js → switch-control-BBA1I68_.js} +1 -1
- package/dist/assets/{table-icons-C-h4FDAF.js → table-icons-CqagwqOY.js} +1 -1
- package/dist/assets/{team-BgfMEJL2.js → team-D2Gv3KS6.js} +1 -1
- package/dist/assets/{toLower-BHBBXNv2.js → toLower-CreXzxO2.js} +1 -1
- package/dist/assets/toUpper-Crz2bdSG.js +1 -0
- package/dist/assets/{traffic-D-uRzuea.js → traffic-lQhdhL0g.js} +1 -1
- package/dist/assets/{tsMode-CeRn61xO.js → tsMode-B0t-i9QO.js} +1 -1
- package/dist/assets/{typescript-DoL6n85S.js → typescript-BWstSdq7.js} +1 -1
- package/dist/assets/{url-evaluation-B3eRUARy.js → url-evaluation-xPcTMwue.js} +1 -1
- package/dist/assets/{url-join-CfCMzD0L.js → url-join-DaMo7uyz.js} +1 -1
- package/dist/assets/{use-mobile-CHK2BJEL.js → use-mobile-DAmtuic1.js} +1 -1
- package/dist/assets/{use-mobile-DW1xADqf.js → use-mobile-DqI6fEdw.js} +1 -1
- package/dist/assets/{useAsync-DHJaMqFP.js → useAsync-8DzECKWt.js} +1 -1
- package/dist/assets/{useAsyncRetry-DE25r2jb.js → useAsyncRetry-CndpIWJk.js} +1 -1
- package/dist/assets/{useLocalStorage-BrmzkzdD.js → useLocalStorage-BL64yJ27.js} +1 -1
- package/dist/assets/useThemeProps-URhp63Pk.js +1 -0
- package/dist/assets/{util-yYX5V34t.js → util-Cx7Tm9SQ.js} +1 -1
- package/dist/assets/{wait-container-DXBOHjPe.js → wait-container-BAd15_CC.js} +1 -1
- package/dist/assets/{without-wallet-BNsRjeI5.js → without-wallet-C_iBTPyr.js} +1 -1
- package/dist/assets/wrap-locale-DIHRO_br.js +1 -0
- package/dist/assets/{xml-ZZLcLPO2.js → xml-HxQqV2ss.js} +1 -1
- package/dist/assets/{yaml-3xc0kMOl.js → yaml-pWyAJblD.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-BRCFiDo5.js +0 -1
- package/dist/assets/api-CzO1JAlF.js +0 -1
- package/dist/assets/cloneDeep-CF0rc6VO.js +0 -1
- package/dist/assets/connect-to-DYsYwfyz.js +0 -29
- package/dist/assets/emotion-cache.browser.esm-DcciVh-V.js +0 -1
- package/dist/assets/engine-DHbDpbO8.js +0 -1
- package/dist/assets/getValidReactChildren-C2YiZOfP.js +0 -1
- package/dist/assets/index-AQr2b_V7.js +0 -376
- package/dist/assets/index-C7FK1qLV.js +0 -1
- package/dist/assets/omit-DbDS-rZP.js +0 -1
- package/dist/assets/schema-DAPWQjet.js +0 -1
- package/dist/assets/sdk-Dbin21P4.js +0 -1
- package/dist/assets/toUpper-C6xfv6tZ.js +0 -1
- package/dist/assets/useThemeProps-Chclx8ny.js +0 -1
- package/dist/assets/wrap-locale-Crvlfq9n.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{c1 as Kf,c0 as Yf,r as I,c2 as Jf,eT as Xf,j as g,b9 as ct,c4 as st,c5 as Qf,hH as Zf,hI as ep,gF as tp,du as rp,hJ as np,dv as ip,bR as lc,bS as op,bP as ap,bQ as sp,bU as cc,dy as Wn,hK as lp,eD as cp,dG as up,hv as dp,gZ as fp,dF as pp,gW as uc,hL as hp,gJ as gp,fp as vp,eE as mp,hi as bp,V as Le,a3 as tt,y as Re,aP as Ft,c8 as Mt,i as yp,fa as xp,aH as ye,b as Ge,eO as Sp,hB as wp,dx as Dr,ez as br,di as dc,dC as Cp,hM as Ip,dB as fc,be as Hn,dO as or,hN as F,e_ as K,eH as Rp,hO as Xr,bf as Q,o as x,dM as Un,aQ as _o,hP as Po,cB as rr,aD as xe,K as oe,ag as Tp,aT as ae,ba as ko,dD as Xt,T as me,a4 as ze,b2 as qi,bB as wt,hQ as Dp,bo as pc,E as qn,hR as _p,hS as Pp,t as lt,fn as Dn,O as kp,bs as Xe,fd as hc,C as gc,bK as Op,hT as Oa,M as Oo,f9 as Ep,f6 as vc,H as Nt,P as mc,$ as bc,v as _n,hU as yc,f as Bt,dL as Np,bz as Mp,gN as xc,dJ as Nr,a7 as Ap,a8 as Lp,hV as Ea,hW as Sc,hX as zp,hY as jp,hZ as Vn,fe as Fp,gg as Bp,gh as Gp,gm as Kn,bE as je,h_ as $p,he as Wp,h$ as Hp,i0 as Up,gS as qp,i1 as Pn,i2 as wc,L as Cc,z as Yn,i3 as Na,i4 as Ic,i5 as Vi,i6 as Vp,i7 as Kp,s as dr,i8 as Yp,f5 as Jp,cA as Rc,i9 as Xp,bH as Qp,ia as Zp,dI as Ze,D as eh,X as th,cw as rh,ib as nh,b0 as ih,bh as Ma,R as kn,a9 as Aa,ic as oh,id as ah,ie as sh,ig as lh,ih as Tc,ii as ch,aB as Dc,f0 as _c,ij as Eo,ik as uh,hr as Pc,il as dh,b6 as fh,cF as Qt,im as ph,cU as hh,io as gh,d3 as vh,G as La,dq as di,eI as za,dN as mh,ip as bh,a5 as kc,Y as ja,iq as Fa,Q as yh,S as Ba}from"./index-CyYCs6Na.js";import{r as xh}from"./omit-DbDS-rZP.js";import{r as Sh}from"./cloneDeep-CF0rc6VO.js";import{r as wh}from"./index-D8iAEh5P.js";import{c as Ch,u as Ih}from"./_createAggregator-Dw9ehKUs.js";import{u as Gt}from"./blocklet-c-fcHcMv.js";import{H as Rh,G as Th,M as Dh,N as _h,O as Ga,K as Ph,L as kh}from"./index-_ylGel7X.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as Oh,f as Oc,u as de,g as ie,r as Gr,w as On,h as Ec,i as $t,j as Nc,k as Eh,l as Nh,o as Ki}from"./raf-schd.esm-BNZAb83s.js";import{_ as A,b as $a,c as Mh,a as Ah,d as Lh}from"./redux-DfszZyTl.js";import{_ as zh}from"./typeof-QjJsDpFa.js";import{u as Mc,b as jh}from"./team-BgfMEJL2.js";import{b as Fh}from"./actions-D6D1nZGR.js";import{u as Bh,a as Gh,C as ft}from"./index.esm-XgmtgzU6.js";import{S as Yi}from"./simple-select-DTAtG4Ai.js";import{b as $h,a as Wa}from"./html-title-ZIT73gw4.js";import{C as Ac}from"./Clear-lc-87cdU.js";import{A as Wh}from"./ArrowDropDown-BRCFiDo5.js";import{a as Hh}from"./api-CzO1JAlF.js";import{A as Uh}from"./Autocomplete-DTfKu22k.js";import{L as qh}from"./ListItemButton-BUXqqfVc.js";import{u as Lc}from"./use-mobile-CHK2BJEL.js";import{u as Vh}from"./index-Bya-MYDK.js";import{d as Kh}from"./KeyboardArrowDown-6ORbckfg.js";import{S as Yh}from"./Search-edKoOPH1.js";import{A as Jh}from"./Add-CwfzHL2f.js";import{O as Xh}from"./OpenInNew-O9EysXQn.js";import{t as Qh}from"./index-DOuT_eWr.js";import{I as Zh}from"./iframe-BeX_RqP4.js";import{B as fi}from"./ButtonGroup-CE8Yme-Z.js";import{L as Ha}from"./LoadingButton-DuEza0fz.js";import"./depsEqual-CDIkAeqx.js";import"./url-evaluation-B3eRUARy.js";import"./useLocalStorage-BrmzkzdD.js";import"./MoreVert-DXy5wrMx.js";import"./DeleteOutline-CCoXF09b.js";import"./get-safe-url-DMzSWw8A.js";import"./permission-3nsQS0Bo.js";import"./ListSubheader-DzDc9oA3.js";import"./getValidReactChildren-C2YiZOfP.js";function eg(e){return Kf("MuiListItemAvatar",e)}Yf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const tg=e=>{const{alignItems:r,classes:n}=e;return Qf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},eg,n)},rg=ct("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}}]}),Ua=I.forwardRef(function(r,n){const t=Jf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Xf),s={...t,alignItems:a.alignItems},l=tg(s);return g.jsx(rg,{className:st(l.root,i),ownerState:s,ref:n,...o})});var ng=Zf(function(){return ep?sessionStorage:void 0});function ig(e,r){return tp(r,function(n){return e[n]})}function og(e){return e==null?[]:ig(e,rp(e))}var ag=np.isFinite;function qa(e){return typeof e=="number"&&ag(e)}function sg(e){return typeof e=="number"&&e==ip(e)}var lg=Ch(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const cg=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"}));var ug=lc(function(e){var r=op(e);return r=typeof r=="function"?r:void 0,ap(sp(e,1,cc,!0),void 0,r)});const dg=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"}));var zc=lc(function(e,r){return cc(e)?Fh(e,r):[]}),yr={};const fg=Wn(dg),pg=Wn(lp),hg=Wn(cg);var Va;function gg(){return Va||(Va=1,function(e){var r=yr&&yr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=_,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=cp(),t=up(),i=r(fg),o=r(dp),a=r(fp),s=r(pg),l=r(pp),c=r(xh),u=r(Sh),f=bp(),d=r(wh()),p=r(uc()),h=r(hp),v=r(gp),m=r(hg),y=vp(),b=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const C="header",D="/",P="/",w="/";function _($,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:fe=0}={}){Array.isArray(V)?V.forEach((ve,Ce)=>{j(ve,{index:Ce,parent:se,level:fe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:fe}),j(V[k],{parent:V,level:fe}),N==="last"&&W(V,se,{index:te,level:fe}))}j($)}function S($,W){return W===C&&(0,s.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function R($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const k={...W};return k.role&&(k.role=R(k.role)),k.section&&(k.section=R(k.section)),k.title&&(k.title=R(k.title)),k.description&&(k.description=R(k.description)),k.link&&(k.link=R(k.link)),k})}function O($="/",W=""){if((0,p.default)(W||""))return W;const k=d.default.join($,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L($,W,{strict:k=!0}={}){let N=$,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M($,W){const k=(0,u.default)($);return _(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H($=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)($),j=[];return _(N,(V,te,{level:se})=>{if(se>=W){const{items:fe=[]}=V;if(fe&&Array.isArray(fe)&&fe.length>0){delete V.items;const ve=fe.map(Ce=>k(Ce,V));if(te)te.items.push(...ve);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...ve)}}else if(se===1){const ve=k((0,c.default)(V,["items"]),te);j.push(ve)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B($={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:fe={}}=j,ve=(0,u.default)(fe?.navigation||[]);(0,y.hasStartEngine)(fe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...ve);const Ce=V.name||"",Se=V.mountPoint||D,_e=j===$?"":fe.name||"",Fe=j===$?"":j.mountPoint||D;for(const Pe of se){if(!(0,y.hasStartEngine)(Pe.meta))continue;const pe=Pe.meta.name,be=Pe.mountPoint,ut=[Ce,_e,pe].filter(Boolean).join("."),mr=Pe.meta.navigation||[],ui=(0,f.joinURL)(Se,Fe,be);Pe.meta?.capabilities?.navigation!==!1&&W.push({did:Pe.meta.did,name:ut,link:ui,title:Pe.meta.title||"",navigation:mr.map(Ke=>({section:C,...Ke}))});const dt=ve.find(Ke=>Ke.component?Ke.component===pe:!1);if(dt){if(!dt.link)if(Pe.meta.navigation&&Pe.meta.navigation.length>0){const Ke=k(Pe,{mountPoint:Fe,name:_e});Ke.length>0&&(dt.items=dt.items??[],dt.items.push(...Ke))}else dt.link=P}else if(Pe.meta?.capabilities?.navigation!==!1){const Ke=k(Pe,{mountPoint:Fe,name:_e}),ln={title:Pe.meta.title,component:pe,id:Pe.meta.did};Ke.length>0?(ln.items=Ke,ln.link=void 0):ln.link=P,te.push(ln)}}return te}return{navigationList:k($),components:W}}function G($){const W=(0,u.default)($).filter(k=>k.id);return _(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U($,W=2){const k=(0,u.default)($),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[C],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return _(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(fe=>fe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J($,W){return W&&Array.isArray($.items)?$.items.filter(k=>(0,s.default)(k.section)?S($.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee($){const W=(0,u.default)($),k=[];for(const N of W){let te=function(se,fe){const ve=J(se,fe);V.push({...j,section:fe,items:ve})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((ve,Ce)=>{const{section:Se=[C]}=Ce||{};return ve.push(...Se),ve},[]),fe=[...new Set(se)];for(const ve of fe)te(N,ve)}else V.push({...N,section:C});k.push(...V)}return k}function X($=[]){const W=(0,u.default)($);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z($,W=[]){const k=X($);return _(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q($){return $.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 re=$=>{const[W,k]=(0,m.default)($,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=re;const ne=$=>{const[,W]=(0,m.default)($,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ne;function ue($={},W={}){const{beforeProcess:k=pe=>pe}=W,{navigationList:N,components:j}=B($),V=new Map;N.forEach(pe=>{pe.items?.forEach(be=>{V.set((0,f.joinURL)(pe.id,be.id),be)})});const te=(0,l.default)($,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(pe=>!(pe.from==="team-tmpl"&&se.includes(pe?.parent))).map(pe=>{if(pe.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(pe,"private")){const be=V.get(pe.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(pe.private=be.private)}return!te&&pe.section==="userCenter"&&pe.id==="/userCenter/orgs"?null:pe}).filter(Boolean):$.settings.navigations=[]);const fe=T(ne($?.settings?.navigations||[])).map(E),ve=U(k(N)),Ce=G(ve),_e=ee(Ce).reduce((pe,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(pe.push(...be.items.map(mr=>{const{section:ui}=be,dt=L(be.link,mr.link),Ke=[be.component,mr.component].filter(Boolean).join(".");return{...mr,section:ui,link:dt,component:Ke,parent:""}})),pe):(pe.push(be),pe),[]),Fe=H(_e,{transform(pe,be){let{component:ut}=pe;return be?.component&&(ut=[be.component,pe.component].filter(Boolean).join(".")),E({...pe,component:ut})}});return{navigationList:(0,i.default)(fe,Fe,(pe,be)=>{const ut=["id","section"];return(0,o.default)((0,a.default)(pe,ut),(0,a.default)(be,ut))}),components:j,builtinList:Fe}}}(yr)),yr}var Ne=gg();const jc=I.createContext(null),Ka="/",vg="header",Ya={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ja=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),mg=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===Ge.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===Ge.NAV_GROUP_SERVICES)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SERVICES,e("navigation.services"),[it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),it("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===Ge.NAV_GROUP_SYSTEM)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SYSTEM,e("navigation.system"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function Xa({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function bg({children:e}){const{blocklet:r,actions:n}=Gt(),{t}=Le(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(w){const _=tt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ya,S)&&Ya[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!_.some(O=>O.id===R.id)&&_.push(R)})}),mg(t,_)}}),s=Ft({rawNavigation:tt(i),activeSection:vg,components:o}),l=I.useMemo(()=>Ne.sortRootNavigation(Ne.nestNavigationList(tt(s.rawNavigation))),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ne.filterNavigation(tt(s.rawNavigation),o);return Ne.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ne.flattenNavigation(Ne.joinLink(l,o)),S=_.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Xa,{name:S.component})}else if(S.parent){const R=_.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Xa,{name:R.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ne.deepWalk(w,(R,T)=>{const O={...Mt(R,["children","expand"]),parent:T?.id};_.push(O)});const S=tt(s.rawNavigation).filter(R=>{if(!s.activeSection)return!1;const T=_.find(O=>pi(O,R));return T?!Ne.isMatchSection(T.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),p=I.useCallback((w=[])=>{const _=tt(s.rawNavigation).map(S=>{const R=w.find(T=>pi({...T,section:s.activeSection},S));return R?{...S,...R}:S});s.rawNavigation=_},[s]),h=I.useCallback((w,_=Ka)=>w.map(R=>{const O=o.find(H=>H.name===R.component)?.link||_,L=R.items||[],{link:M}=R;return{title:R.title,description:R.description,subtitle:u(R),link:M,icon:R.icon,children:h(L,M||Ka),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:O}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=tt(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:yp.nanoid(),section:s.activeSection,visible:!0},R=[...s.rawNavigation],T=R.filter(O=>O.section===s.activeSection);if(_<0||_>T.length-1)R.push(S);else{const O=T[_],L=R.findIndex(M=>pi(M,O));R.splice(L,0,S)}return s.rawNavigation=R,S},[s]),b=I.useCallback(w=>{const S=tt(l).filter(R=>Ne.isMatchSection(R.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(R=>xp(R,wp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const _=a.filter(R=>Ne.isMatchSection(R.section,w)),S=s.rawNavigation.filter(R=>!Ne.isMatchSection(R.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=tt(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(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Qe={},hi,Qa;function yg(){if(Qa)return hi;Qa=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 Dr=="object"&&Dr&&Dr.Object===Object&&Dr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var R,T,O,L,M,H,E=0,B=!1,G=!1,U=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,O=G?p(P(S.maxWait)||0,_):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=R,N=T;return R=T=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,_),B?J(W):L}function X(W){var k=W-H,N=W-E,j=_-k;return G?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=_||k<0||G&&N>=O}function q(){var W=v();if(Z(W))return re(W);M=setTimeout(q,X(W))}function re(W){return M=void 0,U&&R?J(W):(R=T=void 0,L)}function ne(){M!==void 0&&clearTimeout(M),E=0,R=H=T=M=void 0}function ue(){return M===void 0?L:re(v())}function $(){var W=v(),k=Z(W);if(R=arguments,T=this,H=W,k){if(M===void 0)return ee(H);if(G)return M=setTimeout(q,_),J(H)}return M===void 0&&(M=setTimeout(q,_)),L}return $.cancel=ne,$.flush=ue,$}function y(w,_,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,_,{leading:R,maxWait:_,trailing:T})}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 xr={exports:{}},Pt={exports:{}},xg=Pt.exports,Za;function Sg(){return Za||(Za=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Pt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(Pt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(Pt.exports=function(){return Date.now()-n},n=Date.now()):(Pt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(xg)),Pt.exports}var es;function wg(){if(es)return xr.exports;es=1;for(var e=Sg(),r=typeof window>"u"?Dr: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(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return xr.exports=function(f){return i.call(r,f)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},xr.exports}var cn={},ts;function Cg(){if(ts)return cn;ts=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return cn}var Ht={},rs;function Ig(){if(rs)return Ht;rs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return Ht}var ns;function Rg(){if(ns)return Qe;ns=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.createHorizontalStrength=R,Qe.createVerticalStrength=T,Qe.createScrollingComponent=M,Qe.default=H,Qe.defaultVerticalStrength=Qe.defaultHorizontalStrength=void 0;var e=u(dc()),r=c(fc()),n=Cp(),t=c(yg()),i=c(wg()),o=c(Cg()),a=Rh,s=c(Ip()),l=Ig();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 G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};U.get||U.set?Object.defineProperty(B,G,U):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var U in G)Object.prototype.hasOwnProperty.call(G,U)&&(E[U]=G[U])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&(G[U]=E[U])}return G}function h(E,B){if(E==null)return{};var G={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var U=B[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,G){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(G){return G.__proto__||Object.getPrototypeOf(G)},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(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function R(E){return function(G,U){var J=G.x,ee=G.w,X=G.y,Z=G.h,q=Math.min(ee/2,E),re=U.x>=J&&U.x<=J+ee,ne=re&&U.y>=X&&U.y<=X+Z;if(ne){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function T(E){return function(G,U){var J=G.y,ee=G.h,X=G.x,Z=G.w,q=Math.min(ee/2,E),re=U.y>=J&&U.y<=J+ee,ne=re&&U.x>=X&&U.x<=X+Z;if(ne){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=R(S);Qe.defaultHorizontalStrength=O;var L=T(S);Qe.defaultVerticalStrength=L;function M(E){var B=function(G){D(U,G);function U(J,ee){var X;return v(this,U),X=b(this,C(U).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),re=q.left,ne=q.top,ue=q.width,$=q.height,W={x:re,y:ne,w:ue,h:$},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!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(U,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var 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 q(){var re=ee.scaleX,ne=ee.scaleY,ue=ee.container,$=ee.props,W=$.strengthMultiplier,k=$.onScrollChange;if(W===0||re+ne===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,fe=ue.clientHeight,ve=re?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+re*W):N,Ce=ne?ue.scrollTop=(0,l.intBetween)(0,te-fe,j+ne*W):j;k(ve,Ce)}ee.frame=(0,i.default)(q)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),U}(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:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Qe}var xn=Rg();const Tg=Hn(xn);var Dg=Th();const is=Hn(Dg);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;function Qr(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-B9nSfr01.js","./index-DmEIktUl.js","./index-DGkT7afN.css","./url-join-DaMo7uyz.js","./index-DlsopR7t.js","./_createAggregator-BNHjiP2Z.js","./depsEqual-CZmuZV4u.js","./index-20VJ2Oit.js","./index-DRYJ0xIl.js","./toUpper-Crz2bdSG.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c1 as Kf,c0 as Yf,r as I,c2 as Jf,eT as Xf,j as g,b9 as ct,c4 as st,c5 as Qf,hz as Zf,hA as ep,gx as tp,du as rp,hB as np,dv as ip,bR as lc,bS as op,bP as ap,bQ as sp,bU as cc,dy as Wn,hC as lp,eD as cp,dG as up,hn as dp,gR as fp,dF as pp,gO as uc,hD as hp,gB as gp,fp as vp,eE as mp,ha as bp,V as Le,a3 as tt,y as Re,aP as Ft,c8 as Mt,i as yp,fa as xp,aH as ye,b as Ge,eO as Sp,ht as wp,dx as Dr,ez as br,di as dc,dC as Cp,hE as Ip,dB as fc,be as Hn,dO as or,hF as F,e_ as K,eH as Rp,hG as Xr,bf as Q,o as x,dM as Un,aQ as _o,hH as Po,cB as rr,aD as xe,K as oe,ag as Tp,aT as ae,ba as ko,dD as Xt,T as me,a4 as ze,b2 as qi,bB as wt,hI as Dp,bo as pc,E as qn,hJ as _p,hK as Pp,t as lt,fn as Dn,O as kp,bs as Xe,fd as hc,C as gc,bK as Op,hL as Oa,M as Oo,f9 as Ep,f6 as vc,H as Nt,P as mc,$ as bc,v as _n,hM as yc,f as Bt,dL as Np,bz as Mp,gF as xc,dJ as Nr,a7 as Ap,a8 as Lp,hN as Ea,hO as Sc,hP as zp,hQ as jp,hR as Vn,fe as Fp,g8 as Bp,g9 as Gp,ge as Kn,bE as je,hS as $p,h6 as Wp,hT as Hp,hU as Up,gK as qp,hV as Pn,hW as wc,L as Cc,z as Yn,hX as Na,hY as Ic,hZ as Vi,h_ as Vp,h$ as Kp,s as dr,i0 as Yp,f5 as Jp,cA as Rc,i1 as Xp,bH as Qp,i2 as Zp,dI as Ze,D as eh,X as th,cw as rh,i3 as nh,b0 as ih,bh as Ma,R as kn,a9 as Aa,i4 as oh,i5 as ah,i6 as sh,i7 as lh,i8 as Tc,i9 as ch,aB as Dc,f0 as _c,ia as Eo,ib as uh,hj as Pc,ic as dh,b6 as fh,cF as Qt,id as ph,cU as hh,ie as gh,d3 as vh,G as La,dq as di,eI as za,dN as mh,ig as bh,a5 as kc,Y as ja,ih as Fa,Q as yh,S as Ba}from"./index-DmEIktUl.js";import{r as xh}from"./omit-CzDjJ0V8.js";import{r as Sh}from"./cloneDeep-B7ITWJEe.js";import{r as wh}from"./index-DlsopR7t.js";import{c as Ch,u as Ih}from"./_createAggregator-BNHjiP2Z.js";import{u as Gt}from"./blocklet-CAtl3NS9.js";import{H as Rh,G as Th,M as Dh,N as _h,O as Ga,K as Ph,L as kh}from"./index-DqqrHhsp.js";import{_ as we,a as Ie,b as Ue,c as qe,d as Ve,e as Oh,f as Oc,u as de,g as ie,r as Gr,w as On,h as Ec,i as $t,j as Nc,k as Eh,l as Nh,o as Ki}from"./raf-schd.esm-D8v9lZx_.js";import{_ as A,b as $a,c as Mh,a as Ah,d as Lh}from"./redux-DfszZyTl.js";import{_ as zh}from"./typeof-QjJsDpFa.js";import{u as Mc,b as jh}from"./team-D2Gv3KS6.js";import{b as Fh}from"./actions-LmskFz0e.js";import{u as Bh,a as Gh,C as ft}from"./index.esm-JPVKYAuW.js";import{S as Yi}from"./simple-select-BAsjOjPA.js";import{b as $h,a as Wa}from"./html-title-lLYk44sN.js";import{C as Ac}from"./Clear-CybwA2Jd.js";import{A as Wh}from"./ArrowDropDown-CNKThDMg.js";import{a as Hh}from"./api-CM8nEaeN.js";import{A as Uh}from"./Autocomplete-fQULCEh3.js";import{L as qh}from"./ListItemButton-Cmz2lNmj.js";import{u as Lc}from"./use-mobile-DAmtuic1.js";import{u as Vh}from"./index-D_bACieO.js";import{d as Kh}from"./KeyboardArrowDown-5IVXxFq-.js";import{S as Yh}from"./Search-Cc0L1P8Y.js";import{A as Jh}from"./Add-BSsB0LgV.js";import{O as Xh}from"./OpenInNew-Dw9F5-j0.js";import{t as Qh}from"./index-Dcu0Ced5.js";import{I as Zh}from"./iframe-BeIjzVA5.js";import{B as fi}from"./ButtonGroup-DgPN2-YM.js";import{L as Ha}from"./LoadingButton-CyiIDt4W.js";import"./depsEqual-CZmuZV4u.js";import"./url-evaluation-xPcTMwue.js";import"./useLocalStorage-BL64yJ27.js";import"./MoreVert-C-gNfdF4.js";import"./DeleteOutline-CjxNIx7X.js";import"./get-safe-url-2iJX7eF-.js";import"./permission-DlhGxFII.js";import"./ListSubheader-CE5Bsi9j.js";import"./getValidReactChildren-BaHtQCbY.js";function eg(e){return Kf("MuiListItemAvatar",e)}Yf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const tg=e=>{const{alignItems:r,classes:n}=e;return Qf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},eg,n)},rg=ct("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}}]}),Ua=I.forwardRef(function(r,n){const t=Jf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=I.useContext(Xf),s={...t,alignItems:a.alignItems},l=tg(s);return g.jsx(rg,{className:st(l.root,i),ownerState:s,ref:n,...o})});var ng=Zf(function(){return ep?sessionStorage:void 0});function ig(e,r){return tp(r,function(n){return e[n]})}function og(e){return e==null?[]:ig(e,rp(e))}var ag=np.isFinite;function qa(e){return typeof e=="number"&&ag(e)}function sg(e){return typeof e=="number"&&e==ip(e)}var lg=Ch(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const cg=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"}));var ug=lc(function(e){var r=op(e);return r=typeof r=="function"?r:void 0,ap(sp(e,1,cc,!0),void 0,r)});const dg=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"}));var zc=lc(function(e,r){return cc(e)?Fh(e,r):[]}),yr={};const fg=Wn(dg),pg=Wn(lp),hg=Wn(cg);var Va;function gg(){return Va||(Va=1,function(e){var r=yr&&yr.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ue,e.deepWalk=_,e.isMatchSection=S,e.nestNavigationList=X,e.filterNavigation=Z,e.cleanOrphanNavigation=q,e.joinLink=M,e.flattenNavigation=H,e.splitNavigationBySection=ee;const n=cp(),t=up(),i=r(fg),o=r(dp),a=r(fp),s=r(pg),l=r(pp),c=r(xh),u=r(Sh),f=bp(),d=r(wh()),p=r(uc()),h=r(hp),v=r(gp),m=r(hg),y=vp(),b=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return b.checkLink}});const C="header",D="/",P="/",w="/";function _($,W=()=>{},{key:k="children",order:N="first"}={}){function j(V,{index:te=0,parent:se=null,level:fe=0}={}){Array.isArray(V)?V.forEach((ve,Ce)=>{j(ve,{index:Ce,parent:se,level:fe+1})}):V&&(N==="first"&&W(V,se,{index:te,level:fe}),j(V[k],{parent:V,level:fe}),N==="last"&&W(V,se,{index:te,level:fe}))}j($)}function S($,W){return W===C&&(0,s.default)($)?!0:Array.isArray($)?$.includes(W):$===W}function R($){try{return JSON.parse($)}catch{return $}}function T($){return $.map(W=>{const k={...W};return k.role&&(k.role=R(k.role)),k.section&&(k.section=R(k.section)),k.title&&(k.title=R(k.title)),k.description&&(k.description=R(k.description)),k.link&&(k.link=R(k.link)),k})}function O($="/",W=""){if((0,p.default)(W||""))return W;const k=d.default.join($,W||P);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function L($,W,{strict:k=!0}={}){let N=$,j=W;return k||(N=N||"/",j=j||"/"),(0,h.default)(N)&&(0,v.default)(j)&&(0,b.checkLink)(j)?Object.keys(N).reduce((V,te)=>(V[te]=O(N[te],j),V),{}):(0,v.default)(N)&&(0,b.checkLink)(N)&&(0,h.default)(j)?Object.keys(j).reduce((V,te)=>(V[te]=O(N,j[te]),V),{}):(0,v.default)(N)&&(0,v.default)(j)?(0,b.checkLink)(N)||(0,b.checkLink)(j)?O(N,j):j:(0,h.default)(N)&&(0,h.default)(j)?[...new Set([...Object.keys(N),...Object.keys(j)])].reduce((te,se)=>(te[se]=O(N[se],j[se]),te),{}):j}function M($,W){const k=(0,u.default)($);return _(k,(N,j)=>{const V=N.component||N.child;if(V){const te=W.find(se=>se.name===V);te&&(N.link=L(te.link,N.link,{strict:!1}))}else j&&(N.link=L(j.link,N.link))},{key:"items"}),k}function H($=[],{depth:W=1,transform:k=N=>N}={}){const N=(0,u.default)($),j=[];return _(N,(V,te,{level:se})=>{if(se>=W){const{items:fe=[]}=V;if(fe&&Array.isArray(fe)&&fe.length>0){delete V.items;const ve=fe.map(Ce=>k(Ce,V));if(te)te.items.push(...ve);else{const Ce=k((0,c.default)(V,["items"]),te);j.push(Ce,...ve)}}else if(se===1){const ve=k((0,c.default)(V,["items"]),te);j.push(ve)}}else se===1&&j.push(V)},{key:"items",order:"last"}),j}function E($){if($.section!=="bottomNavigation")return $;const W={...$};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const N=W[k];typeof N=="string"&&(W[k]={en:N})}),W}function B($={}){const W=[];function k(j,V={}){const te=[],{children:se=[],meta:fe={}}=j,ve=(0,u.default)(fe?.navigation||[]);(0,y.hasStartEngine)(fe)&&j.meta?.capabilities?.navigation!==!1&&te.push(...ve);const Ce=V.name||"",Se=V.mountPoint||D,_e=j===$?"":fe.name||"",Fe=j===$?"":j.mountPoint||D;for(const Pe of se){if(!(0,y.hasStartEngine)(Pe.meta))continue;const pe=Pe.meta.name,be=Pe.mountPoint,ut=[Ce,_e,pe].filter(Boolean).join("."),mr=Pe.meta.navigation||[],ui=(0,f.joinURL)(Se,Fe,be);Pe.meta?.capabilities?.navigation!==!1&&W.push({did:Pe.meta.did,name:ut,link:ui,title:Pe.meta.title||"",navigation:mr.map(Ke=>({section:C,...Ke}))});const dt=ve.find(Ke=>Ke.component?Ke.component===pe:!1);if(dt){if(!dt.link)if(Pe.meta.navigation&&Pe.meta.navigation.length>0){const Ke=k(Pe,{mountPoint:Fe,name:_e});Ke.length>0&&(dt.items=dt.items??[],dt.items.push(...Ke))}else dt.link=P}else if(Pe.meta?.capabilities?.navigation!==!1){const Ke=k(Pe,{mountPoint:Fe,name:_e}),ln={title:Pe.meta.title,component:pe,id:Pe.meta.did};Ke.length>0?(ln.items=Ke,ln.link=void 0):ln.link=P,te.push(ln)}}return te}return{navigationList:k($),components:W}}function G($){const W=(0,u.default)($).filter(k=>k.id);return _(W,(k,N)=>{if(k.items&&k.items.length){for(let j=k.items.length-1;j>=0;j--)k.items[j].id||k.items.splice(j,1);k.items.length===0&&k.component&&(k.link=k.link||P)}N&&(k.parent=N.id,k.id=[N.id,k.id].join(w)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),W}function U($,W=2){const k=(0,u.default)($),N=H(k,{depth:W,transform:(j,V)=>(V&&(j._parent||(j._parent=V.id,V.component||(j.link=L(V.link,j.link))),j.section=j.section||V.section||[C],j.visible=j.visible??V.visible,V.role&&(j.role=j.role||V.role)),j.component=[V.component,j.component].filter(Boolean).join("."),j)});return _(N,j=>{j.items&&j.items.length>0&&j.items.reduceRight((V,te)=>{if(te._parent){const se=j.items.findIndex(fe=>fe.id===te._parent);se>=0&&j.items.splice(se,1),delete te._parent}return null},null)},{key:"items"}),N}function J($,W){return W&&Array.isArray($.items)?$.items.filter(k=>(0,s.default)(k.section)?S($.section,W):!!S(k.section,W)).map(k=>({...k,section:W})):[]}function ee($){const W=(0,u.default)($),k=[];for(const N of W){let te=function(se,fe){const ve=J(se,fe);V.push({...j,section:fe,items:ve})};const j=(0,u.default)((0,c.default)(N,["items"])),V=[];if(Array.isArray(N.section))for(const se of N.section)te(N,se);else if(N.section){const{section:se}=N;te(N,se)}else if(N.items&&N.items.length>0){const se=N.items.reduce((ve,Ce)=>{const{section:Se=[C]}=Ce||{};return ve.push(...Se),ve},[]),fe=[...new Set(se)];for(const ve of fe)te(N,ve)}else V.push({...N,section:C});k.push(...V)}return k}function X($=[]){const W=(0,u.default)($);return W.reduceRight((k,N,j)=>{if(N.parent){const V=W.find(te=>N.section&&te.section?te.section===N.section&&te.id===N.parent:te.id===N.parent);V&&(V.items||(V.items=[]),V.items=[N,...V.items]),W.splice(j,1)}return null},null),W}function Z($,W=[]){const k=X($);return _(k,j=>{if(j?.component&&(W.some(V=>V.name===j.component)||(j.visible=!1)),j.items&&j.items.length)for(let V=j.items.length-1;V>=0;V--)j.items[V].visible===!1&&j.items.splice(V,1)},{key:"items"}),k.filter(j=>!(j.visible===!1||j.items&&Array.isArray(j.items)&&j.items.length>0&&j.items?.every(V=>V.visible===!1)))}function q($){return $.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 re=$=>{const[W,k]=(0,m.default)($,V=>V.id===t.NAV_GROUP_SYSTEM),[N,j]=(0,m.default)(k,V=>V.id===t.NAV_GROUP_SERVICES);return[...W,...N,...j]};e.sortRootNavigation=re;const ne=$=>{const[,W]=(0,m.default)($,k=>{const N=typeof k.title=="string"?k.title:k.title?.en;return k.id===t.NAV_GROUP_TEAM||k.id==="/dashboard"&&N==="Blocklet"});return W};e.cleanOldNavigationHistory=ne;function ue($={},W={}){const{beforeProcess:k=pe=>pe}=W,{navigationList:N,components:j}=B($),V=new Map;N.forEach(pe=>{pe.items?.forEach(be=>{V.set((0,f.joinURL)(pe.id,be.id),be)})});const te=(0,l.default)($,"settings.org.enabled",!1),se=[t.NAV_GROUP_TEAM,t.NAV_GROUP_SYSTEM,t.NAV_GROUP_SERVICES];$?.settings?.navigations&&(Array.isArray($.settings.navigations)?$.settings.navigations=[...$.settings.navigations].filter(pe=>!(pe.from==="team-tmpl"&&se.includes(pe?.parent))).map(pe=>{if(pe.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(pe,"private")){const be=V.get(pe.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(pe.private=be.private)}return!te&&pe.section==="userCenter"&&pe.id==="/userCenter/orgs"?null:pe}).filter(Boolean):$.settings.navigations=[]);const fe=T(ne($?.settings?.navigations||[])).map(E),ve=U(k(N)),Ce=G(ve),_e=ee(Ce).reduce((pe,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(pe.push(...be.items.map(mr=>{const{section:ui}=be,dt=L(be.link,mr.link),Ke=[be.component,mr.component].filter(Boolean).join(".");return{...mr,section:ui,link:dt,component:Ke,parent:""}})),pe):(pe.push(be),pe),[]),Fe=H(_e,{transform(pe,be){let{component:ut}=pe;return be?.component&&(ut=[be.component,pe.component].filter(Boolean).join(".")),E({...pe,component:ut})}});return{navigationList:(0,i.default)(fe,Fe,(pe,be)=>{const ut=["id","section"];return(0,o.default)((0,a.default)(pe,ut),(0,a.default)(be,ut))}),components:j,builtinList:Fe}}}(yr)),yr}var Ne=gg();const jc=I.createContext(null),Ka="/",vg="header",Ya={userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Follow",zh:"关注"},icon:"ant-design:user-outlined",link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Ja=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),mg=(e,r)=>{const n=Ne.cleanOldNavigationHistory(r),t=n.findIndex(a=>a.id===Ge.NAV_GROUP_TEAM);return t>=0&&n.splice(t,1),n.findIndex(a=>a.id===Ge.NAV_GROUP_SERVICES)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SERVICES,e("navigation.services"),[it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("notification",e("navigation.notification"),"ant-design:bell-outlined","/admin/notification"),it("aigne",e("navigation.aigne"),"hugeicons:artificial-intelligence-04","/admin/aigne"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n.findIndex(a=>a.id===Ge.NAV_GROUP_SYSTEM)===-1&&n.unshift(Ja(Ge.NAV_GROUP_SYSTEM,e("navigation.system"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations")])),n};function Xa({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function bg({children:e}){const{blocklet:r,actions:n}=Gt(),{t}=Le(),{navigationList:i,components:o,builtinList:a}=Ne.parseNavigation(r,{beforeProcess(w){const _=tt(w);return["dashboard","userCenter"].forEach(S=>{Object.prototype.hasOwnProperty.call(Ya,S)&&Ya[S].forEach(R=>{(R.shouldDisplay&&typeof R.shouldDisplay=="function"?R.shouldDisplay:()=>!0)(r)&&!_.some(O=>O.id===R.id)&&_.push(R)})}),mg(t,_)}}),s=Ft({rawNavigation:tt(i),activeSection:vg,components:o}),l=I.useMemo(()=>Ne.sortRootNavigation(Ne.nestNavigationList(tt(s.rawNavigation))),[s.rawNavigation]),c=I.useMemo(()=>{const w=Ne.filterNavigation(tt(s.rawNavigation),o);return Ne.joinLink(w,o)},[o,s.rawNavigation]),u=I.useCallback(w=>{if(!w.id)return"";const _=Ne.flattenNavigation(Ne.joinLink(l,o)),S=_.find(R=>R.id===w.id);if(S?.component){if(!o.some(R=>R.name===S.component))return g.jsx(Xa,{name:S.component})}else if(S.parent){const R=_.find(T=>T.id===S.parent);if(R?.component&&!o.some(T=>T.name===R.component))return g.jsx(Xa,{name:R.component})}return S?.link},[l,o]),f=I.useCallback(w=>{s.activeSection=w},[s]),d=I.useCallback(w=>{const _=[];Ne.deepWalk(w,(R,T)=>{const O={...Mt(R,["children","expand"]),parent:T?.id};_.push(O)});const S=tt(s.rawNavigation).filter(R=>{if(!s.activeSection)return!1;const T=_.find(O=>pi(O,R));return T?!Ne.isMatchSection(T.section,s.activeSection):!0});s.rawNavigation=[...S,..._]},[s]),p=I.useCallback((w=[])=>{const _=tt(s.rawNavigation).map(S=>{const R=w.find(T=>pi({...T,section:s.activeSection},S));return R?{...S,...R}:S});s.rawNavigation=_},[s]),h=I.useCallback((w,_=Ka)=>w.map(R=>{const O=o.find(H=>H.name===R.component)?.link||_,L=R.items||[],{link:M}=R;return{title:R.title,description:R.description,subtitle:u(R),link:M,icon:R.icon,children:h(L,M||Ka),section:R.section,visible:R.visible,parent:R.parent,component:R.component,id:R.id,role:R.role,from:R.from,__base:O}}),[o,u]),v=I.useCallback(w=>{p([w])},[p]),m=I.useCallback(w=>{const _=s.rawNavigation.filter(S=>S.id===w||S.parent===w).map(S=>S.id);s.rawNavigation=tt(s.rawNavigation).filter(S=>!_.includes(S.id))},[s]),y=I.useCallback((w={},_=-1)=>{const S={...w,id:yp.nanoid(),section:s.activeSection,visible:!0},R=[...s.rawNavigation],T=R.filter(O=>O.section===s.activeSection);if(_<0||_>T.length-1)R.push(S);else{const O=T[_],L=R.findIndex(M=>pi(M,O));R.splice(L,0,S)}return s.rawNavigation=R,S},[s]),b=I.useCallback(w=>{const S=tt(l).filter(R=>Ne.isMatchSection(R.section,w));return h(S)},[l,h]),C=I.useCallback(async w=>{const S=w.map(R=>xp(R,wp)).map(R=>{const T={...R};return T.role&&Array.isArray(T.role)&&(T.role=JSON.stringify(T.role)),T.section&&Array.isArray(T.section)&&(T.section=JSON.stringify(T.section)),T.title&&T.title instanceof Object&&(T.title=JSON.stringify(T.title)),T.description&&T.description instanceof Object&&(T.description=JSON.stringify(T.description)),T.link&&T.link instanceof Object&&(T.link=JSON.stringify(T.link)),T});await n.configNavigations(S)},[n]),D=I.useCallback(async w=>{if(w){const _=a.filter(R=>Ne.isMatchSection(R.section,w)),S=s.rawNavigation.filter(R=>!Ne.isMatchSection(R.section,w));await C(S),s.rawNavigation=[...S,..._]}else await C([]),s.rawNavigation=tt(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(jc.Provider,{value:P,children:e})}function Fc(){const e=I.useContext(jc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Qe={},hi,Qa;function yg(){if(Qa)return hi;Qa=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 Dr=="object"&&Dr&&Dr.Object===Object&&Dr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=l||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(w,_,S){var R,T,O,L,M,H,E=0,B=!1,G=!1,U=!0;if(typeof w!="function")throw new TypeError(e);_=P(_)||0,b(S)&&(B=!!S.leading,G="maxWait"in S,O=G?p(P(S.maxWait)||0,_):O,U="trailing"in S?!!S.trailing:U);function J(W){var k=R,N=T;return R=T=void 0,E=W,L=w.apply(N,k),L}function ee(W){return E=W,M=setTimeout(q,_),B?J(W):L}function X(W){var k=W-H,N=W-E,j=_-k;return G?h(j,O-N):j}function Z(W){var k=W-H,N=W-E;return H===void 0||k>=_||k<0||G&&N>=O}function q(){var W=v();if(Z(W))return re(W);M=setTimeout(q,X(W))}function re(W){return M=void 0,U&&R?J(W):(R=T=void 0,L)}function ne(){M!==void 0&&clearTimeout(M),E=0,R=H=T=M=void 0}function ue(){return M===void 0?L:re(v())}function $(){var W=v(),k=Z(W);if(R=arguments,T=this,H=W,k){if(M===void 0)return ee(H);if(G)return M=setTimeout(q,_),J(H)}return M===void 0&&(M=setTimeout(q,_)),L}return $.cancel=ne,$.flush=ue,$}function y(w,_,S){var R=!0,T=!0;if(typeof w!="function")throw new TypeError(e);return b(S)&&(R="leading"in S?!!S.leading:R,T="trailing"in S?!!S.trailing:T),m(w,_,{leading:R,maxWait:_,trailing:T})}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 xr={exports:{}},Pt={exports:{}},xg=Pt.exports,Za;function Sg(){return Za||(Za=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Pt.exports=function(){return performance.now()}:typeof br<"u"&&br!==null&&br.hrtime?(Pt.exports=function(){return(e()-i)/1e6},r=br.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=br.uptime()*1e9,i=t-o):Date.now?(Pt.exports=function(){return Date.now()-n},n=Date.now()):(Pt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(xg)),Pt.exports}var es;function wg(){if(es)return xr.exports;es=1;for(var e=Sg(),r=typeof window>"u"?Dr: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(),p=Math.max(0,u-(d-s));s=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(s)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++l,callback:f,cancelled:!1}),l},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return xr.exports=function(f){return i.call(r,f)},xr.exports.cancel=function(){o.apply(r,arguments)},xr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},xr.exports}var cn={},ts;function Cg(){if(ts)return cn;ts=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return cn}var Ht={},rs;function Ig(){if(rs)return Ht;rs=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.noop=e,Ht.intBetween=r,Ht.getCoords=n;function e(){}function r(t,i,o){return Math.floor(Math.min(i,Math.max(t,o)))}function n(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}return Ht}var ns;function Rg(){if(ns)return Qe;ns=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.createHorizontalStrength=R,Qe.createVerticalStrength=T,Qe.createScrollingComponent=M,Qe.default=H,Qe.defaultVerticalStrength=Qe.defaultHorizontalStrength=void 0;var e=u(dc()),r=c(fc()),n=Cp(),t=c(yg()),i=c(wg()),o=c(Cg()),a=Rh,s=c(Ip()),l=Ig();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 G in E)if(Object.prototype.hasOwnProperty.call(E,G)){var U=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(E,G):{};U.get||U.set?Object.defineProperty(B,G,U):B[G]=E[G]}}return B.default=E,B}function f(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(G){return typeof G}:f=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},f(E)}function d(){return d=Object.assign||function(E){for(var B=1;B<arguments.length;B++){var G=arguments[B];for(var U in G)Object.prototype.hasOwnProperty.call(G,U)&&(E[U]=G[U])}return E},d.apply(this,arguments)}function p(E,B){if(E==null)return{};var G=h(E,B),U,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(E);for(J=0;J<ee.length;J++)U=ee[J],!(B.indexOf(U)>=0)&&Object.prototype.propertyIsEnumerable.call(E,U)&&(G[U]=E[U])}return G}function h(E,B){if(E==null)return{};var G={},U=Object.keys(E),J,ee;for(ee=0;ee<U.length;ee++)J=U[ee],!(B.indexOf(J)>=0)&&(G[J]=E[J]);return G}function v(E,B){if(!(E instanceof B))throw new TypeError("Cannot call a class as a function")}function m(E,B){for(var G=0;G<B.length;G++){var U=B[G];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(E,U.key,U)}}function y(E,B,G){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(G){return G.__proto__||Object.getPrototypeOf(G)},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(U,J){return U.__proto__=J,U},P(E,B)}function w(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}function _(E,B,G){return B in E?Object.defineProperty(E,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):E[B]=G,E}var S=150;function R(E){return function(G,U){var J=G.x,ee=G.w,X=G.y,Z=G.h,q=Math.min(ee/2,E),re=U.x>=J&&U.x<=J+ee,ne=re&&U.y>=X&&U.y<=X+Z;if(ne){if(U.x<J+q)return(U.x-J-q)/q;if(U.x>J+ee-q)return-(J+ee-U.x-q)/q}return 0}}function T(E){return function(G,U){var J=G.y,ee=G.h,X=G.x,Z=G.w,q=Math.min(ee/2,E),re=U.y>=J&&U.y<=J+ee,ne=re&&U.x>=X&&U.x<=X+Z;if(ne){if(U.y<J+q)return(U.y-J-q)/q;if(U.y>J+ee-q)return-(J+ee-U.y-q)/q}return 0}}var O=R(S);Qe.defaultHorizontalStrength=O;var L=T(S);Qe.defaultVerticalStrength=L;function M(E){var B=function(G){D(U,G);function U(J,ee){var X;return v(this,U),X=b(this,C(U).call(this,J,ee)),_(w(w(X)),"updateScrolling",(0,t.default)(function(Z){var q=X.container.getBoundingClientRect(),re=q.left,ne=q.top,ue=q.width,$=q.height,W={x:re,y:ne,w:ue,h:$},k=(0,l.getCoords)(Z),N=X.props,j=N.horizontalStrength,V=N.verticalStrength;X.scaleX=j(W,k),X.scaleY=V(W,k),!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(U,[{key:"componentDidMount",value:function(){var ee=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var 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 q(){var re=ee.scaleX,ne=ee.scaleY,ue=ee.container,$=ee.props,W=$.strengthMultiplier,k=$.onScrollChange;if(W===0||re+ne===0){ee.stopScrolling();return}if(X+=1,X%2){var N=ue.scrollLeft,j=ue.scrollTop,V=ue.scrollWidth,te=ue.scrollHeight,se=ue.clientWidth,fe=ue.clientHeight,ve=re?ue.scrollLeft=(0,l.intBetween)(0,V-se,N+re*W):N,Ce=ne?ue.scrollTop=(0,l.intBetween)(0,te-fe,j+ne*W):j;k(ve,Ce)}ee.frame=(0,i.default)(q)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var ee=this.props;ee.strengthMultiplier,ee.verticalStrength,ee.horizontalStrength,ee.onScrollChange;var X=p(ee,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(E,d({ref:this.wrappedInstance},X))}}]),U}(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:L,horizontalStrength:O,strengthMultiplier:30}),(0,s.default)(B,E)}function H(E){var B=M(E);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(U){var J=U.dragDropManager;return J===void 0?null:e.default.createElement(B,d({},G,{dragDropManager:J}))})}}return Qe}var xn=Rg();const Tg=Hn(xn);var Dg=Th();const is=Hn(Dg);function Bc(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Gc(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function $c(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}}Bc.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;$c.__suppressDeprecationWarning=!0;function Qr(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 $u=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nn=Object.freeze({...$u,...Mn}),lo=Object.freeze({...nn,body:"",hidden:!1}),dy=Object.freeze({width:null,height:null}),Wu=Object.freeze({...dy,...Mn});function fy(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 py=/[\s,]+/;function hy(e,r){r.split(py).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function il(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=fy(n("rotate","")),hy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function gy(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,on=(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&&!Cn(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&&!Cn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Cn(s,n)?null:s}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function vy(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 ol(e,r){const n=vy(e,r);for(const t in lo)t in Mn?t in e&&!(t in n)&&(n[t]=Mn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function my(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 by(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=ol(t[s]||i[s],o)}return a(r),n.forEach(a),ol(e,o)}function Uu(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=my(e);for(const i in t){const o=t[i];o&&(r(i,by(e,i,o)),n.push(i))}return n}const yy={provider:"",aliases:{},not_found:{},...$u};function Oi(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"||!Oi(e,yy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!Oi(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(zr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,lo))return null}return r}const An=Object.create(null);function xy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function It(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=xy(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Sy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function wy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(An)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(An[i]||{})).forEach(a=>{const s=It(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function Vu(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?on(e,!0,Hr):e;if(r){const n=It(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=on(e,!0,Hr);if(!n)return!1;const t=It(n.provider,n.prefix);return Sy(t,n.name,r)}function al(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=It(r,n);return!!Jo(t,e)}function Cy(e){return!!Ur(e)}function Iy(e){const r=Ur(e);return r?{...nn,...r}:null}function Ry(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]=It(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 Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ty(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||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Dy=0;function _y(e,r,n){const t=Dy++,i=Yu.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 co=Object.create(null);function sl(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Py(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?on(i,r,n):i;o&&t.push(o)}),t}var ky={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oy(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=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const R=_!=="success";switch(d=d.filter(T=>T!==w),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(R){u=S,d.length||(a.length?P():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",p.forEach(T=>{T(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,R)=>{D(_,S,R)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function Ju(e){const r={...ky,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Oy(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 Xo(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 ti=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?In.push(wr.shift()):In.push(wr.pop());ti[""]=Xo({resources:["https://api.iconify.design"].concat(In)});function ll(e,r){const n=Xo(r);return n===null?!1:(ti[e]=n,!0)}function ri(e){return ti[e]}function Ey(){return Object.keys(ti)}function cl(){}const Ei=Object.create(null);function Ny(e){if(!Ei[e]){const r=ri(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),cl;i=o.send;const a=Ny(e);a&&(t=a.redundancy)}else{const o=Xo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",s=uo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),cl):t.query(r,i,n)().abort}const ul="iconify2",qr="iconify",Qu=qr+"-count",dl=qr+"-version",Zu=36e5,My=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function fl(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Qo(e,Qu,r.toString())}function ho(e){return parseInt(fo(e,Qu))||0}const zt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function Ay(e){Zo=e}let pn=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(pn&&pn[r]&&typeof pn[r].length=="number")return pn[r]}catch{}zt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=fo(n,dl);if(t!==ul){if(t){const s=ho(n);for(let l=0;l<s;l++)fl(n,qr+l.toString())}Qo(n,dl,ul),po(n,0);return}const i=Math.floor(Date.now()/Zu)-My,o=s=>{const l=qr+s.toString(),c=fo(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{}fl(n,l)}};let a=ho(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,po(n,a)):ed[e].add(s))}function nd(){if(!Zo){Ay(!0);for(const e in zt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=It(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ly(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in zt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function zy(e,r){Zo||nd();function n(t){let i;if(!zt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const s={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Qo(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!Ly(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function pl(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ty(e)}))}function Fy(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=uo(n)))return;o.prepare(n,t,i).forEach(s=>{Xu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),zy(e,l)}catch(c){console.error(c)}jy(e)})})}))}const ea=(e,r)=>{const n=Py(e,!0,Vu()),t=Ry(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,pl)}),()=>{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(It(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=It(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Fy(l,i[c][u])}),r?_y(r,t,o):pl},By=e=>new Promise((r,n)=>{const t=typeof e=="string"?on(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...nn,...o});return}}n(e)})});function Gy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function $y(e,r){const n=typeof e=="string"?on(e,!0,!0):null;if(!n){const o=Gy(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function Wy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Hy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function go(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(Hy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Uy.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 qy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...nn,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let 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=go(f,l/c)):(u=a==="auto"?l:a,f=s===null?go(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{qy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Vy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Vy();function Ky(e){Ln=e}function Yy(){return Ln}function Jy(e,r){const n=ri(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 Xy(e){return e===404}const Qy=(e,r,n)=>{const t=[],i=Jy(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 Zy(e){if(typeof e=="string"){const r=ri(e);if(r)return r.path}return"/"}const ex=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Zy(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;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Xy(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)})},tx={prepare:Qy,send:ex};function hl(e,r){switch(e){case"local":case"session":zt[e]=r;break;case"all":for(const n in zt)zt[n]=r;break}}const Mi="data-style";let ad="";function rx(e){ad=e}function gl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Mi));n||(n=document.createElement("style"),n.setAttribute(Mi,Mi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function sd(){sl("",tx),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!al(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;ll(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>hl(n,!0),disableCache:n=>hl(n,!1),iconExists:Cy,getIcon:Iy,listIcons:wy,addIcon:Ku,addCollection:al,calculateSize:go,buildIcon:od,loadIcons:ea,loadIcon:By,addAPIProvider:ll,appendCustomStyle:rx,_api:{getAPIConfig:ri,setAPIModule:sl,sendAPIQuery:Xu,setFetch:Ky,getFetch:Yy,listAPIProviders:Ey}}}function ld(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 nx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ix(e){return"data:image/svg+xml,"+nx(e)}function ox(e){return'url("'+ix(e)+'")'}const vo={"background-color":"currentColor"},cd={"background-color":"transparent"},vl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ml={"-webkit-mask":vo,mask:vo,background:cd};for(const e in ml){const r=ml[e];for(const n in vl)r[e+"-"+n]=vl[n]}function bl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ax(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ld(i,{...o,width:r.width+"",height:r.height+""}),s=ox(a),l=t.style,c={"--svg":s,width:bl(o.width),height:bl(o.height),...n?vo:cd};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function sx(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function lx(e){return jr===void 0&&sx(),jr?jr.createHTML(e):e}function cx(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=ld(e.body,n);return r.innerHTML=lx(i),r.firstChild}function yl(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=cx(i);break;default:a=ax(i,{...nn,...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 xl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ux(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=Ni(this);gl(s,l),this._state=xl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ni(this),c=this._state;l!==c.inline&&(c.inline=l,gl(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 Ni(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{}yl(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=il(this);(s.attrMode!==c||gy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=$y(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=xl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,il(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Wy(s.data.body,c),f=this._state.inline;yl(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=sd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const dx=ux()||sd(),{enableCache:RT,disableCache:TT,iconExists:DT,getIcon:_T,listIcons:PT,addIcon:kT,addCollection:OT,calculateSize:ET,buildIcon:NT,loadIcons:MT,loadIcon:AT,addAPIProvider:LT,_api:zT}=dx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),fx=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)},pd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>fx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},px=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function rt({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(_o(async()=>{l(!0);try{await Po(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%"}}),dd(e))return g.jsx(rr,{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(rr,{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(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ra(e=["en","zh"]){const{blocklet:r}=Gt();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=>Ge.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=Ge.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:Ge.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const hx=e=>e.from!=="team-tmpl";function gx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function hd({treeNode:e}){const{locale:r}=Le(),{blocklet:n}=Gt(),{defaultLocale:t}=ra(),i=n.environments.find(s=>s.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=ae(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 Xt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Xt(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&&(ko(o(e.icon))?g.jsx(rt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}hd.propTypes={treeNode:x.object.isRequired};const vx=ct(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(vx,{children:g.jsx(Ph,{backend:kh,...i,children:g.jsx(om,{generateNodeProps:o=>{const a=hx(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(hd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:gx,theme:uy})})})}gd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var mx=uc();const bx=Hn(mx);function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Le(),c=I.useRef(),[u,f]=I.useState(null),d=Ft({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=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(Mt(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=ae(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=ae((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?d.localeError=T:d.localeError="",T}),D=ae(()=>{f(null),d.inputLocale="",d.localeError=""}),P=ae(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=ae((S,R)=>{S.preventDefault(),S.stopPropagation(),d.localeList=zc(d.localeList,R),s(R)}),_=ae(S=>{const{value:R}=S.target;C(R),d.inputLocale=R});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Ih("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs($h,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx(Wa,{label:y,value:t}),v.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(ze,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(ze,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:p,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(Yi,{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(wt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}vd.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 na=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of na){const i=Re(t,e);try{return await Hh.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 yx({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function xx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();hn.set(e,r);try{return await r}catch(n){throw hn.delete(e),n}}function Sx(e){return Re(na[0],`${e}.svg`)}function wx(e){try{const r=new URL(e);for(const n of na)if(r.origin===n)return Dp(r.pathname).replace(".svg","");return""}catch{return""}}function Cx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=wx(e))),{isIconId:r,iconId:n}}const Ix=I.lazy(()=>Op(()=>import("./index-C0fIFyuA.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}))),Sl=Xe(rt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return _o(async()=>{t(!1),await Po(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})}bd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=pc(),{blocklet:u}=Gt(),f=qn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Le(),{isIconId:C,iconId:D}=Cx(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:R,...T}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Ft({showPopover:!1}),E=ae(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=ae(async Z=>await h.current.getUploader().uploadFile(Z)),G=ae(()=>{w(null)}),U=ae(()=>{L&&w(m.current)}),J=ae(async Z=>{try{if(o==="url"){const q=Sx(Z),re=await _p(q,{width:128,height:128}),ne=await Pp(re,Z);await B(ne)}else _?.(Z)}catch(q){console.error("Failed to pick icon:",q)}G()}),ee=ae(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=ae(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(lt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:L?U:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Dn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Sl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(ze,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx(Ac,{style:{fontSize:18}})}),O&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(ze,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(oe,{component:Wh,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(qi,{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:G,children:g.jsx(yd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(qi,{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(Sl,{size:120,icon:E(e),alt:"Error"})})]})}mo.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 yd({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),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Le(),D=96,P=ae(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,O=m.current.slice(R,T);l(L=>[...L,...O]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=ae(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);l(R),h(S.length===0),b.current&&P()}),{run:_}=hc(async S=>{if(S){u(!0);try{const{icons:R}=await yx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:O,clientHeight:L}=v.current;(T+L>=O-150||O<=L)&&P()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[P,c]),_o(async()=>{if(f)_(f);else{u(!0);try{const S=await xx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Rx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(lt,{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(ze,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Ac,{style:{fontSize:18}})})}}}),g.jsx(wt,{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(Tx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&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(gc,{size:20})})]})]})}yd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Rx=Xe(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}})),Tx=Xe(ze,{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 bo({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(Ix,{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}})})}bo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const wl=24,Cl=48,Il="add";x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:s,locale:l}=Le(),{localeMap:c,defaultLocale:u}=ra(),f=ae(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=ae(k=>zc(Array.from(new Set(ye.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=I.useRef(()=>{}),h=Ft({isRoot:!0,type:Il,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Bh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{ye.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=Gh({control:m}),w=P.component,_=P.title,S=P.description,R=P.link,T=P.parent;I.useEffect(()=>{h.formState.title[h.locale]=_},[_]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(P)},[P,i]);const O=I.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===T),[n,t,w,T]),L=I.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return Oa(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return Oa(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=I.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ne.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ne.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=ae(()=>{h.isRoot=!0,h.locale=u,h.type=Il,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=ae((k={})=>(h.localeList.length>0&&ye.NAVIGATION_I18N_FIELDS.forEach(N=>{og(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Oo(k.role)&&(k.role=void 0),k)),B=ae(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),G=ae((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:fe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const ve=d(k),Ce=(Se,_e)=>{vc(Se)?h.formState[_e]=ve.reduce((Fe,Pe)=>(Fe[Pe]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[_e]=tt(Se):h.formState[_e]={}};ye.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),ye.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",fe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const _e=Ep(Se,["id","title","description","icon","component","link","role"]);N(_e)}}),U=ae(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>wl)return s("navigation.form.titleTooLong",{len:wl})}return!0}),J=ae(k=>{const N=k?.trim();return N&&N.length>Cl?s("navigation.form.descriptionTooLong",{len:Cl}):!0}),ee=ae(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=ae(async k=>{const N=k?.trim();if(N){if(ko(ee(N)))return!0;try{await Po(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=ae(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=ae(k=>{const N=k?.trim();return N?Ne.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{C()})}),ne=ae(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=ae(k=>{const N=ne();N===!0?p.current(E(k)):Nt.error(N)}),$=ae(k=>{h.locale=u,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=Mt(h.formState[N],k)}),i?.(P)}),W=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,G,v,ue]),g.jsxs(oe,{...o,children:[g.jsx(vd,{sx:{mb:1},onAdd:W,onChange:re,onRemoveLocale:$,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(ft,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(mo,{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:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(ft,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(mo,{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:h.locale!==u,...k})}),h.isRoot&&g.jsx(ft,{name:"component",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Mt(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(ft,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...k})}),g.jsx(ft,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Uh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(lt,{...N,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:L?g.jsx(Dn,{position:"start",sx:{textDecoration:bx(R||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(oe,{component:"li",...N,children:[j.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(ft,{name:"role",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Mt(k,"ref")})}),r==="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})})]})]})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function oa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Le(),[o,{setTrue:a,setFalse:s}]=jh(),[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]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(bc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(_n,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ia,{ref:u,section:r,components:n,rawNavigations:t})})}oa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function xd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Le(),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]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=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(ze,{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(ze,{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(ze,{size:"small",color:"warning",onClick:p,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(ze,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}xd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Rn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Dx=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},_x=(e,r="en",n="en")=>{if(typeof e=="string"){if(dd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(fd(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:yc(o.items?.length?o.link:_x(o.link,r,n),t),_rawLink:o.link}),"items")},Px=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),kx=e=>{if(!e?.length)return null;const r=Px(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},aa=e=>{if(!e)return null;const r={...e};return r.theme=Dx(r.theme),r.navigation=kx(Ox(r.navigation)),r},Ox=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Sd=(e,r)=>ta(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"),Ex={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"/>'},Nx={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 Mx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=Bt(),c=I.useRef(null),u=Ft({open:!1}),f=ae((p=!u.open)=>{u.open=p}),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(ze,{size:"medium",ref:c,children:g.jsx(xe,{icon:Ex,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Np,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Mp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(xc,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ap,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(qh,{href:Ea(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${Sc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Nx,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ea(h.title,r)})]})},h.id))}),g.jsx(zp,{session:e,children:g.jsx(_n,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=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])}))}))}),Cd=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}),Ax=["admin","owner"],Lx=e=>e.endsWith(".ip.abtnet.io"),zx=e=>e.endsWith(".did.abtnet.io"),jx={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:"配置域名"}},Fx=1e3*60*60*24*30,Rl=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Fx}),a=ae((d,p={})=>Vn(jx,d,e,"en",p)),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=Re(window.location.origin,Rl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ax.includes(n.role);return window.location.href.includes(Rl)||t||!Lx(s)&&!zx(s)?null:g.jsxs(Fp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Bp,{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(Gp,{sx:{px:"12px !important"},children:[g.jsx(wt,{onClick:c,children:a("skip")}),f&&g.jsx(wt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:x.string,session:x.object};const Ee={};function Bx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Sc,e);return new Hp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Gx(e="admin"){return Ee[e]||(Ee[e]=Bx(e)),Ee[e]}const $x=(e="admin")=>{const r=I.use(Kn),{session:n}=r??{},t=je(()=>n.user?.did,[n.user]),i=$p(t);return Wp(()=>{Object.keys(Ee).forEach(o=>{Ee[o]?.isConnected()&&Ee[o]?.disconnect(),delete Ee[o]})}),t?(i&&i!==t&&Object.keys(Ee).forEach(o=>{Ee[o]&&(Ee[o].isConnected()&&Ee[o].disconnect(),Ee[o].connect())}),!Ee[e]&&n.user&&(Ee[e]=Gx(e),Ee[e].connect()),Ee[e]):null},Wx={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>'},Hx={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"/>'},Ux={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 qx(){const e=Bt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Er=new Up,Vx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Kx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Yx=async(e,r)=>{try{return await Er.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Jx=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await Yx(t,r)||Pn.getLink(e):Pn.getLink(e)},Xx=async(e,r,n=!0)=>{const t=Pn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Pn.Link){if(n){const o=await Jx(i,r),{type:a,chainId:s,did:l}=i;return wc.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(""))},Qx=e=>qp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Zx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=Bt(),t=Yn(Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function eS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Bt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=je(()=>{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=je(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ae(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Jt,{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(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{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(Jt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=ae(()=>{const m=a?Zx[a]:null;return m?m(l,r.length):null}),h=je(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=je(()=>{if(!e)return null;const m=Kx(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Oo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Cc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const tS={normal:Na,success:Wx,info:Na,warning:Hx,error:Ux},rS=dr(Jp)`
|
|
43
|
+
*/const $u=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),nn=Object.freeze({...$u,...Mn}),lo=Object.freeze({...nn,body:"",hidden:!1}),dy=Object.freeze({width:null,height:null}),Wu=Object.freeze({...dy,...Mn});function fy(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 py=/[\s,]+/;function hy(e,r){r.split(py).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Hu={...Wu,preserveAspectRatio:""};function il(e){const r={...Hu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=fy(n("rotate","")),hy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function gy(e,r){for(const n in Hu)if(e[n]!==r[n])return!0;return!1}const zr=/^[a-z0-9]+(-[a-z0-9]+)*$/,on=(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&&!Cn(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&&!Cn(s)?null:s}if(n&&t===""){const s={provider:t,prefix:"",name:o};return r&&!Cn(s,n)?null:s}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(zr))&&(r&&e.prefix===""||e.prefix.match(zr))&&e.name.match(zr)):!1;function vy(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 ol(e,r){const n=vy(e,r);for(const t in lo)t in Mn?t in e&&!(t in n)&&(n[t]=Mn[t]):t in r?n[t]=r[t]:t in e&&(n[t]=e[t]);return n}function my(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 by(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=ol(t[s]||i[s],o)}return a(r),n.forEach(a),ol(e,o)}function Uu(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=my(e);for(const i in t){const o=t[i];o&&(r(i,by(e,i,o)),n.push(i))}return n}const yy={provider:"",aliases:{},not_found:{},...$u};function Oi(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"||!Oi(e,yy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(zr)||typeof o.body!="string"||!Oi(o,lo))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(zr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,lo))return null}return r}const An=Object.create(null);function xy(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function It(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=xy(e,r))}function Jo(e,r){return qu(r)?Uu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function Sy(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function wy(e,r){let n=[];return(typeof e=="string"?[e]:Object.keys(An)).forEach(i=>{(typeof i=="string"&&typeof r=="string"?[r]:Object.keys(An[i]||{})).forEach(a=>{const s=It(i,a);n=n.concat(Object.keys(s.icons).map(l=>(i!==""?"@"+i+":":"")+a+":"+l))})}),n}let Hr=!1;function Vu(e){return typeof e=="boolean"&&(Hr=e),Hr}function Ur(e){const r=typeof e=="string"?on(e,!0,Hr):e;if(r){const n=It(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Ku(e,r){const n=on(e,!0,Hr);if(!n)return!1;const t=It(n.provider,n.prefix);return Sy(t,n.name,r)}function al(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Hr&&!r&&!e.prefix){let i=!1;return qu(e)&&(e.prefix="",Uu(e,(o,a)=>{a&&Ku(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=It(r,n);return!!Jo(t,e)}function Cy(e){return!!Ur(e)}function Iy(e){const r=Ur(e);return r?{...nn,...r}:null}function Ry(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]=It(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 Yu(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Ty(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||Yu([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Dy=0;function _y(e,r,n){const t=Dy++,i=Yu.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 co=Object.create(null);function sl(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Py(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?on(i,r,n):i;o&&t.push(o)}),t}var ky={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oy(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=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){l==="pending"&&(l="aborted"),h(),d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function m(w,_){_&&(p=[]),typeof w=="function"&&p.push(w)}function y(){return{startTime:s,payload:r,status:l,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){l="failed",p.forEach(w=>{w(void 0,u)})}function C(){d.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),d=[]}function D(w,_,S){const R=_!=="success";switch(d=d.filter(T=>T!==w),l){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){u=S,b();return}if(R){u=S,d.length||(a.length?P():b());return}if(h(),C(),!e.random){const T=e.resources.indexOf(w.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",p.forEach(T=>{T(S)})}function P(){if(l!=="pending")return;h();const w=a.shift();if(w===void 0){if(d.length){f=setTimeout(()=>{h(),l==="pending"&&(C(),b())},e.timeout);return}b();return}const _={status:"pending",resource:w,callback:(S,R)=>{D(_,S,R)}};d.push(_),c++,f=setTimeout(P,e.rotate),n(w,r,_.callback)}return setTimeout(P),y}function Ju(e){const r={...ky,...e};let n=[];function t(){n=n.filter(s=>s().status==="pending")}function i(s,l,c){const u=Oy(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 Xo(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 ti=Object.create(null),wr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;wr.length>0;)wr.length===1||Math.random()>.5?In.push(wr.shift()):In.push(wr.pop());ti[""]=Xo({resources:["https://api.iconify.design"].concat(In)});function ll(e,r){const n=Xo(r);return n===null?!1:(ti[e]=n,!0)}function ri(e){return ti[e]}function Ey(){return Object.keys(ti)}function cl(){}const Ei=Object.create(null);function Ny(e){if(!Ei[e]){const r=ri(e);if(!r)return;const n=Ju(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Xu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),cl;i=o.send;const a=Ny(e);a&&(t=a.redundancy)}else{const o=Xo(e);if(o){t=Ju(o);const a=e.resources?e.resources[0]:"",s=uo(a);s&&(i=s.send)}}return!t||!i?(n(void 0,424),cl):t.query(r,i,n)().abort}const ul="iconify2",qr="iconify",Qu=qr+"-count",dl=qr+"-version",Zu=36e5,My=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Qo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function fl(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Qo(e,Qu,r.toString())}function ho(e){return parseInt(fo(e,Qu))||0}const zt={local:!0,session:!0},ed={local:new Set,session:new Set};let Zo=!1;function Ay(e){Zo=e}let pn=typeof window>"u"?{}:window;function td(e){const r=e+"Storage";try{if(pn&&pn[r]&&typeof pn[r].length=="number")return pn[r]}catch{}zt[e]=!1}function rd(e,r){const n=td(e);if(!n)return;const t=fo(n,dl);if(t!==ul){if(t){const s=ho(n);for(let l=0;l<s;l++)fl(n,qr+l.toString())}Qo(n,dl,ul),po(n,0);return}const i=Math.floor(Date.now()/Zu)-My,o=s=>{const l=qr+s.toString(),c=fo(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{}fl(n,l)}};let a=ho(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,po(n,a)):ed[e].add(s))}function nd(){if(!Zo){Ay(!0);for(const e in zt)rd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=It(t,i);if(!Jo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ly(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in zt)rd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function zy(e,r){Zo||nd();function n(t){let i;if(!zt[t]||!(i=td(t)))return;const o=ed[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const s={cached:Math.floor(Date.now()/Zu),provider:e.provider,data:r};return Qo(i,qr+a.toString(),JSON.stringify(s))}r.lastModified&&!Ly(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function pl(){}function jy(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ty(e)}))}function Fy(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=uo(n)))return;o.prepare(n,t,i).forEach(s=>{Xu(n,s,l=>{if(typeof l!="object")s.icons.forEach(c=>{e.missing.add(c)});else try{const c=Jo(e,l);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),zy(e,l)}catch(c){console.error(c)}jy(e)})})}))}const ea=(e,r)=>{const n=Py(e,!0,Vu()),t=Ry(n);if(!t.pending.length){let l=!0;return r&&setTimeout(()=>{l&&r(t.loaded,t.missing,t.pending,pl)}),()=>{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(It(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=It(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(l=>{const{provider:c,prefix:u}=l;i[c][u].length&&Fy(l,i[c][u])}),r?_y(r,t,o):pl},By=e=>new Promise((r,n)=>{const t=typeof e=="string"?on(e,!0):e;if(!t){n(e);return}ea([t||e],i=>{if(i.length&&t){const o=Ur(t);if(o){r({...nn,...o});return}}n(e)})});function Gy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function $y(e,r){const n=typeof e=="string"?on(e,!0,!0):null;if(!n){const o=Gy(e);return{value:e,data:o}}const t=Ur(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ea([n],()=>r(e,n,Ur(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let id=!1;try{id=navigator.vendor.indexOf("Apple")===0}catch{}function Wy(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(id||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Hy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Uy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function go(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(Hy);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Uy.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 qy=e=>e==="unset"||e==="undefined"||e==="none";function od(e,r){const n={...nn,...e},t={...Wu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let 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=go(f,l/c)):(u=a==="auto"?l:a,f=s===null?go(u,c/l):s==="auto"?c:s);const d={},p=(h,v)=>{qy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+c.toString(),{attributes:d,body:o}}const Vy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Vy();function Ky(e){Ln=e}function Yy(){return Ln}function Jy(e,r){const n=ri(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 Xy(e){return e===404}const Qy=(e,r,n)=>{const t=[],i=Jy(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 Zy(e){if(typeof e=="string"){const r=ri(e);if(r)return r.path}return"/"}const ex=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Zy(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;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Xy(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)})},tx={prepare:Qy,send:ex};function hl(e,r){switch(e){case"local":case"session":zt[e]=r;break;case"all":for(const n in zt)zt[n]=r;break}}const Mi="data-style";let ad="";function rx(e){ad=e}function gl(e,r){let n=Array.from(e.childNodes).find(t=>t.hasAttribute&&t.hasAttribute(Mi));n||(n=document.createElement("style"),n.setAttribute(Mi,Mi),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(r?"-0.125em":"0")+"}span,svg{display:block}"+ad}function sd(){sl("",tx),Vu(!0);let e;try{e=window}catch{}if(e){if(nd(),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"||!al(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;ll(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>hl(n,!0),disableCache:n=>hl(n,!1),iconExists:Cy,getIcon:Iy,listIcons:wy,addIcon:Ku,addCollection:al,calculateSize:go,buildIcon:od,loadIcons:ea,loadIcon:By,addAPIProvider:ll,appendCustomStyle:rx,_api:{getAPIConfig:ri,setAPIModule:sl,sendAPIQuery:Xu,setFetch:Ky,getFetch:Yy,listAPIProviders:Ey}}}function ld(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 nx(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ix(e){return"data:image/svg+xml,"+nx(e)}function ox(e){return'url("'+ix(e)+'")'}const vo={"background-color":"currentColor"},cd={"background-color":"transparent"},vl={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ml={"-webkit-mask":vo,mask:vo,background:cd};for(const e in ml){const r=ml[e];for(const n in vl)r[e+"-"+n]=vl[n]}function bl(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function ax(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=ld(i,{...o,width:r.width+"",height:r.height+""}),s=ox(a),l=t.style,c={"--svg":s,width:bl(o.width),height:bl(o.height),...n?vo:cd};for(const u in c)l.setProperty(u,c[u]);return t}let jr;function sx(){try{jr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{jr=null}}function lx(e){return jr===void 0&&sx(),jr?jr.createHTML(e):e}function cx(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=ld(e.body,n);return r.innerHTML=lx(i),r.firstChild}function yl(e,r){const n=r.icon.data,t=r.customisations,i=od(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=cx(i);break;default:a=ax(i,{...nn,...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 xl(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function ux(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=Ni(this);gl(s,l),this._state=xl({value:""},l),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(s){if(s==="inline"){const l=Ni(this),c=this._state;l!==c.inline&&(c.inline=l,gl(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 Ni(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{}yl(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=il(this);(s.attrMode!==c||gy(s.customisations,u))&&this._renderIcon(s.icon,u,c)}_iconChanged(s){const l=$y(s,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});l.data?this._gotIconData(l):this._state=xl(l,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,il(this),this.getAttribute("mode"))}_renderIcon(s,l,c){const u=Wy(s.data.body,c),f=this._state.inline;yl(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=sd();for(const s in a)o[s]=o.prototype[s]=a[s];return r.define(e,o),o}const dx=ux()||sd(),{enableCache:RT,disableCache:TT,iconExists:DT,getIcon:_T,listIcons:PT,addIcon:kT,addCollection:OT,calculateSize:ET,buildIcon:NT,loadIcons:MT,loadIcon:AT,addAPIProvider:LT,_api:zT}=dx,Wt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Wt(t[n],r,n)}):r(t)),ud=(e,r="children")=>{const n=[];return Wt(e,t=>n.push(t),r),n},ta=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ta(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),dd=e=>/^https?:\/\//.test(e),fd=e=>/^mailto:/i.test(e.trim()),fx=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)},pd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>fx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},px=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,s=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),l=Math.ceil(s/n),c=[[]];let u=0,f=0;const d=l*.2,p=h=>f>l-d&&u<n-1&&f+h>l+d;return e.forEach(h=>{const v=i+(h[a]?.length||0)*o;t&&p(i)&&(u++,f=0,c[u]=[]),!t&&f>0&&p(v)&&(u++,f=0,c[u]=[]),c[u].push({...h,group:!0}),f+=i,h[a]&&h[a].forEach(m=>{t&&p(o)&&(u++,f=0,c[u]=[]),c[u].push({...m,group:!1}),f+=o})}),c};function rt({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(_o(async()=>{l(!0);try{await Po(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%"}}),dd(e))return g.jsx(rr,{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(rr,{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(rr,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}function ra(e=["en","zh"]){const{blocklet:r}=Gt();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=>Ge.SUPPORTED_LANGUAGES[c]),s=a.reduce((c,u)=>(c[u]=Ge.SUPPORTED_LANGUAGES[u].nativeName,c),{}),l=a.map(c=>({code:c,name:Ge.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:i,localeMap:s,defaultLocale:o,languages:l}},[r.environments,e])}const hx=e=>e.from!=="team-tmpl";function gx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function hd({treeNode:e}){const{locale:r}=Le(),{blocklet:n}=Gt(),{defaultLocale:t}=ra(),i=n.environments.find(s=>s.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=ae(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 Xt(s)&&(c=s[r]||s[t]||s.en),!I.isValidElement(l)&&Xt(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&&(ko(o(e.icon))?g.jsx(rt,{size:16,style:{marginRight:4},icon:o(e.icon)}):g.jsx(xe,{size:16,style:{marginRight:4},icon:e.icon})),a()]})}hd.propTypes={treeNode:x.object.isRequired};const vx=ct(oe)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function gd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(vx,{children:g.jsx(Ph,{backend:kh,...i,children:g.jsx(om,{generateNodeProps:o=>{const a=hx(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(hd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:gx,theme:uy})})})}gd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var mx=uc();const bx=Hn(mx);function vd({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},defaultLocale:t="en",locale:i="",locales:o=[],localeMap:a={},onRemoveLocale:s=()=>{}}){const{t:l}=Le(),c=I.useRef(),[u,f]=I.useState(null),d=Ft({localeList:[],inputLocale:"",localeError:""}),p=I.useMemo(()=>!!u,[u]),h=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(Mt(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=ae(S=>S?S===t||d.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})),C=ae((S="")=>{const R=S?.trim(),T=b(R);return T!==!0?d.localeError=T:d.localeError="",T}),D=ae(()=>{f(null),d.inputLocale="",d.localeError=""}),P=ae(()=>{const S=d.inputLocale?.trim();C(S)===!0&&(D(),d.localeList.push(S),r(S))}),w=ae((S,R)=>{S.preventDefault(),S.stopPropagation(),d.localeList=zc(d.localeList,R),s(R)}),_=ae(S=>{const{value:R}=S.target;C(R),d.inputLocale=R});return I.useEffect(()=>{d.localeList=[...o]},[o,d]),Ih("enter",()=>{setTimeout(()=>{P()})},{target:c}),g.jsxs(g.Fragment,{children:[g.jsxs($h,{sx:e,value:h,onChange:(S,R)=>{n(R)},children:[g.jsx(Wa,{label:y,value:t}),v.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[a[S],g.jsx(ze,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:R=>{w(R,S)},children:g.jsx(xe,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(ze,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{f(S.currentTarget)},children:g.jsx(xe,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:p,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(Yi,{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(wt,{size:"small",variant:"contained",onClick:P,children:l("common.confirm")})})]})})]})}vd.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 na=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function md(e,r,n=5e3){for(const t of na){const i=Re(t,e);try{return await Hh.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 yx({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 md("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function xx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await md("/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)})();hn.set(e,r);try{return await r}catch(n){throw hn.delete(e),n}}function Sx(e){return Re(na[0],`${e}.svg`)}function wx(e){try{const r=new URL(e);for(const n of na)if(r.origin===n)return Dp(r.pathname).replace(".svg","");return""}catch{return""}}function Cx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=wx(e))),{isIconId:r,iconId:n}}const Ix=I.lazy(()=>Op(()=>import("./index-B9nSfr01.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}))),Sl=Xe(rt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function bd({icon:e,...r}){const[n,t]=I.useState(!1);return _o(async()=>{t(!1),await Po(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})}bd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:s,prefix:l,inService:c}=pc(),{blocklet:u}=Gt(),f=qn(Z=>Z.breakpoints.down("md")),d=u.environments.find(Z=>Z.key===Ge.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=s(),h=I.useRef(null),v=I.useRef(null),m=I.useRef(null),{t:y,locale:b}=Le(),{isIconId:C,iconId:D}=Cx(e),[P,w]=I.useState(null),{onChange:_,onBlur:S,sx:R,...T}=a,O=i.includes("upload"),L=i.includes("select"),M=Re(l,"/api/media/upload",u.appPid),H=Ft({showPopover:!1}),E=ae(Z=>{if(Z?.startsWith("/"))try{const q=c?window.location.origin:d?.value;return new URL(Z,q).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[d?.value,c]),B=ae(async Z=>await h.current.getUploader().uploadFile(Z)),G=ae(()=>{w(null)}),U=ae(()=>{L&&w(m.current)}),J=ae(async Z=>{try{if(o==="url"){const q=Sx(Z),re=await _p(q,{width:128,height:128}),ne=await Pp(re,Z);await B(ne)}else _?.(Z)}catch(q){console.error("Failed to pick icon:",q)}G()}),ee=ae(Z=>{Z.stopPropagation(),v.current.open(),G()}),X=ae(Z=>{a?.onChange?.(Z.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(lt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...R},onClick:L?U:void 0,...T,label:n,placeholder:t,slotProps:{input:{ref:m,readOnly:!0,startAdornment:g.jsx(Dn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:g.jsx(Sl,{size:28,icon:E(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(ze,{sx:{visibility:e?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),_("")},children:g.jsx(Ac,{style:{fontSize:18}})}),O&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(ze,{disableFocusRipple:!1,disableRipple:!1,onClick:ee,children:g.jsx(bd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),L&&g.jsx(oe,{component:Wh,sx:{mr:"-6px",fontSize:24,transform:P?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),L&&g.jsx(qi,{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:G,children:g.jsx(yd,{label:n,placeholder:t,value:C?D:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:M,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:M,headers:p,onUploadFinish:X}),g.jsx(qi,{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(Sl,{size:120,icon:E(e),alt:"Error"})})]})}mo.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 yd({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),[p,h]=I.useState(!1),v=I.useRef(null),m=I.useRef([]),y=I.useRef(1),b=I.useRef(!0),{t:C}=Le(),D=96,P=ae(()=>{!b.current||c||(u(!0),setTimeout(()=>{const S=y.current+1,R=(S-1)*D,T=S*D,O=m.current.slice(R,T);l(L=>[...L,...O]),y.current=S,b.current=T<m.current.length,u(!1)},300))}),w=ae(S=>{m.current=S,y.current=1,b.current=S.length>D;const R=S.slice(0,D);l(R),h(S.length===0),b.current&&P()}),{run:_}=hc(async S=>{if(S){u(!0);try{const{icons:R}=await yx({keyword:S});w(R)}catch(R){console.error("Failed to search icons:",R),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const S=()=>{if(!v.current)return;const{scrollTop:T,scrollHeight:O,clientHeight:L}=v.current;(T+L>=O-150||O<=L)&&P()},R=v.current;return R&&(R.addEventListener("scroll",S),S()),()=>{R&&R.removeEventListener("scroll",S)}},[P,c]),_o(async()=>{if(f)_(f);else{u(!0);try{const S=await xx("mdi-light");w(S)}catch(S){console.error("Failed to fetch default icons:",S),h(!0)}finally{u(!1)}}},[f,_,w]),g.jsxs(Rx,{ref:v,sx:t,...a,children:[g.jsxs(oe,{className:"icon-picker-input",children:[g.jsx(lt,{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(ze,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Ac,{style:{fontSize:18}})})}}}),g.jsx(wt,{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(Tx,{$active:n===S,onClick:()=>{i(S)},children:g.jsx(xe,{icon:S,width:"32",height:"32"})},S))}),p&&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(gc,{size:20})})]})]})}yd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const Rx=Xe(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}})),Tx=Xe(ze,{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 bo({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(Ix,{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}})})}bo.propTypes={ref:x.any,locale:x.string,apiPath:x.string,headers:x.object,imageEditorProps:x.object,onUploadFinish:x.func};const wl=24,Cl=48,Il="add";x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Mc(),{t:s,locale:l}=Le(),{localeMap:c,defaultLocale:u}=ra(),f=ae(()=>({title:{[u]:""},description:{[u]:""},link:{[u]:""}})),d=ae(k=>zc(Array.from(new Set(ye.NAVIGATION_I18N_FIELDS.flatMap(N=>Xt(k[N])?Object.keys(k[N]):[]))),u)),p=I.useRef(()=>{}),h=Ft({isRoot:!0,type:Il,linkDisabled:!1,locale:u,formState:f(),get localeList(){return d(h.formState)}}),{handleSubmit:v,control:m,reset:y,setValue:b,clearErrors:C,formState:{errors:D}}=Bh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{ye.NAVIGATION_I18N_FIELDS.forEach(k=>b(k,h.formState[k][h.locale]))},[b,h.locale]);const P=Gh({control:m}),w=P.component,_=P.title,S=P.description,R=P.link,T=P.parent;I.useEffect(()=>{h.formState.title[h.locale]=_},[_]),I.useEffect(()=>{h.formState.description[h.locale]=S},[S]),I.useEffect(()=>{h.formState.link[h.locale]=R},[R]),I.useEffect(()=>{i?.(P)},[P,i]);const O=I.useMemo(()=>t.find(N=>w?n.find(V=>V.name===w).did===N.id:N.id===T),[n,t,w,T]),L=I.useMemo(()=>{if(O?.component){const k=n.find(te=>te.name===O.component),{link:N}=k||{},j=Xt(N)?N[h.locale]:N;if(w)return Oa(j);const V=Xt(O.link)?O.link[h.locale]:O.link;return Oa(Re(j,V||"/"))}return null},[n,h.locale,O,w]),M=I.useMemo(()=>{const{component:k}=O||{},N=n.find(te=>te.name===k),{navigation:j=[]}=N||{};return Ne.flattenNavigation(j,{transform(te,se){return se?.section&&(te.section=te.section||se.section),te}}).filter(te=>te.link).filter(te=>Ne.isMatchSection(te.section,r)).map(te=>({label:te.link,title:te.title[l]||te.title}))},[O,n,r,l]),H=ae(()=>{h.isRoot=!0,h.locale=u,h.type=Il,h.linkDisabled=!1,h.formState=f(),y(),C(),p.current=()=>{}}),E=ae((k={})=>(h.localeList.length>0&&ye.NAVIGATION_I18N_FIELDS.forEach(N=>{og(h.formState[N]).length>1&&(k[N]=h.formState[N])}),Oo(k.role)&&(k.role=void 0),k)),B=ae(({parent:k}={},N=()=>{})=>{h.type="add",h.isRoot=!k,b("parent",k?.id),p.current=j=>{N(j)}}),G=ae((k={},N=()=>{})=>{const{id:j,icon:V,parent:te,component:se,role:fe=[]}=k;b("id",j),b("icon",V),k.from==="team-tmpl"&&(h.linkDisabled=!0);const ve=d(k),Ce=(Se,_e)=>{vc(Se)?h.formState[_e]=ve.reduce((Fe,Pe)=>(Fe[Pe]=Se,Fe),{[u]:Se}):Xt(Se)?h.formState[_e]=tt(Se):h.formState[_e]={}};ye.NAVIGATION_I18N_FIELDS.forEach(Se=>Ce(k[Se],Se)),ye.NAVIGATION_I18N_FIELDS.forEach(Se=>b(Se,h.formState[Se][h.locale])),b("component",se),b("parent",te),b("role",fe||[]),h.type="edit",h.isRoot=!te,p.current=Se=>{const _e=Ep(Se,["id","title","description","icon","component","link","role"]);N(_e)}}),U=ae(k=>{const N=k?.trim();if(r!=="bottomNavigation"){if(!N)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(N.length>wl)return s("navigation.form.titleTooLong",{len:wl})}return!0}),J=ae(k=>{const N=k?.trim();return N&&N.length>Cl?s("navigation.form.descriptionTooLong",{len:Cl}):!0}),ee=ae(k=>k?.startsWith("/")?new URL(k,window.location.origin).href:k),X=ae(async k=>{const N=k?.trim();if(N){if(ko(ee(N)))return!0;try{await Po(N)}catch{return s("navigation.form.invalidIcon")}}return!0}),Z=ae(k=>{const N=k?.trim();return N?X(N):s("common.requiredErrorText",{name:s("navigation.form.icon")})}),q=ae(k=>{const N=k?.trim();return N?Ne.checkLink(N)?!0:s("navigation.form.invalidLink"):h.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}),re=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]||(h.formState[N][k]="")}),setTimeout(()=>{C()})}),ne=ae(()=>{const{title:k,link:N}=h.formState;if(r!=="bottomNavigation")for(const j of Object.keys(k)){const V=U(k[j]);if(V!==!0)return V}for(const j of Object.keys(N)){const V=q(N[j]);if(V!==!0)return V}return!0}),ue=ae(k=>{const N=ne();N===!0?p.current(E(k)):Nt.error(N)}),$=ae(k=>{h.locale=u,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N]=Mt(h.formState[N],k)}),i?.(P)}),W=ae(k=>{h.locale=k,ye.NAVIGATION_I18N_FIELDS.forEach(N=>{h.formState[N][k]=h.formState[N][u]}),i?.(P),setTimeout(()=>{C()})});return I.useImperativeHandle(e,()=>({add:B,edit:G,resetImmediate:()=>H(),reset:()=>setTimeout(()=>H(),0),submit:v(ue)}),[B,H,G,v,ue]),g.jsxs(oe,{...o,children:[g.jsx(vd,{sx:{mb:1},onAdd:W,onChange:re,onRemoveLocale:$,defaultLocale:u,locale:h.locale,localeMap:c,locales:h.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})}),r==="bottomNavigation"?g.jsx(ft,{name:"icon",control:m,rules:{validate:Z},render:({field:k})=>g.jsx(mo,{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:h.locale!==u,methods:["select"],iconifyShape:"url",...k})}):g.jsx(ft,{name:"icon",control:m,rules:{validate:X},render:({field:k})=>g.jsx(mo,{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:h.locale!==u,...k})}),h.isRoot&&g.jsx(ft,{name:"component",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:h.locale!==u&&k.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(N=>({title:N.title,value:N.name,description:N.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Mt(k,"ref")})}),!h.isRoot&&["header"].includes(r)&&g.jsx(ft,{name:"description",control:m,rules:{validate:J},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...k})}),g.jsx(ft,{name:"link",control:m,rules:{validate:q},render:({field:k})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Uh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:N=>N.label,options:M,renderInput:N=>g.jsx(lt,{...N,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:L?g.jsx(Dn,{position:"start",sx:{textDecoration:bx(R||"")?"line-through":""},children:L}):null}}}),renderOption:(N,j)=>g.jsxs(oe,{component:"li",...N,children:[j.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:j.title})]}),margin:"dense",...k,onChange:()=>{},onInputChange:(N,j)=>{k.onChange(j)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(ft,{name:"role",control:m,render:({field:k})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:a.map(N=>({title:N.title,value:N.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Mt(k,"ref")})}),r==="bottomNavigation"&&g.jsx(ft,{name:"title",control:m,rules:{validate:U},render:({field:k})=>g.jsx(lt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...k})})]})]})}ia.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array,onChange:x.func};function oa({ref:e=null,section:r="",components:n=[],rawNavigations:t=[]}){const{t:i}=Le(),[o,{setTrue:a,setFalse:s}]=jh(),[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]),p=I.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=I.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return I.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(bc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(_n,{color:"primary",variant:"contained",onClick:()=>u.current?.submit(),children:i("common.confirm")}),children:g.jsx(ia,{ref:u,section:r,components:n,rawNavigations:t})})}oa.propTypes={ref:x.any,section:x.string,components:x.array,rawNavigations:x.array};function xd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:s}=Le(),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]),p=I.useCallback(v=>{u(v),t(o)},[t,o]),h=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(ze,{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(ze,{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(ze,{size:"small",color:"warning",onClick:p,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(ze,{disabled:l&&!c,size:"small",color:"error",onClick:h,children:g.jsx(xe,{icon:"mdi:delete"})})})]})}xd.propTypes={data:x.object.isRequired,className:x.string,add:x.func,edit:x.func,toggle:x.func,del:x.func,section:x.string};const Rn=window?.blocklet?.groupPrefix||window?.blocklet?.prefix||"/",Dx=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},_x=(e,r="en",n="en")=>{if(typeof e=="string"){if(dd(e)){const i=new URL(e);return i.searchParams.set("locale",r),i.href}if(fd(e))return e;const t=new URL(e,window.location.origin);return t.searchParams.set("locale",r),t.pathname+t.search}return typeof e=="object"?e[r]||e[n]||e.en:e},ir=({navigation:e,locale:r,defaultLocale:n,section:t="header"})=>{if(!e?.length)return e;const i=(o,a)=>o&&typeof o=="object"?o[a]||o[n]||o.en:o;return Wt(e,o=>({...o,title:i(o.title,r),description:i(o.description,r),link:yc(o.items?.length?o.link:_x(o.link,r,n),t),_rawLink:o.link}),"items")},Px=e=>Wt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),kx=e=>{if(!e?.length)return null;const r=Px(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},aa=e=>{if(!e)return null;const r={...e};return r.theme=Dx(r.theme),r.navigation=kx(Ox(r.navigation)),r},Ox=(e=[])=>ta(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),Sd=(e,r)=>ta(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"),Ex={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"/>'},Nx={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 Mx({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},s=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),l=Bt(),c=I.useRef(null),u=Ft({open:!1}),f=ae((p=!u.open)=>{u.open=p}),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(ze,{size:"medium",ref:c,children:g.jsx(xe,{icon:Ex,fontSize:n,style:{transform:"scale(1.08)"}})}),g.jsx(Np,{open:u.open,anchorEl:c.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:p})=>g.jsx(Mp,{onClickAway:h=>{h.preventDefault(),h.stopPropagation(),f(!1)},children:g.jsx(xc,{...p,timeout:350,children:g.jsxs(Nr,{variant:"outlined",sx:{borderRadius:1.5,width:350,maxWidth:"90vw",p:2},children:[g.jsx(Ap,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:s.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(qh,{href:Ea(h.link,r),sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:1,"&:hover":{backgroundColor:"action.hover"}},children:[h?.component?.did?g.jsx(oe,{component:"img",src:`${Sc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(xe,{fontSize:50,icon:h.icon||Nx,color:l.palette.text.secondary}),g.jsx(me,{sx:{fontSize:"12px",color:"text.primary",textAlign:"center",lineHeight:"normal"},children:Ea(h.title,r)})]})},h.id))}),g.jsx(zp,{session:e,children:g.jsx(_n,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const wd=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])}))}))}),Cd=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}),Ax=["admin","owner"],Lx=e=>e.endsWith(".ip.abtnet.io"),zx=e=>e.endsWith(".did.abtnet.io"),jx={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:"配置域名"}},Fx=1e3*60*60*24*30,Rl=".well-known/service/admin/domains";function Id({locale:e="en",session:r={}}){const n=r?.user,t=Lc(),[i,o]=I.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Fx}),a=ae((d,p={})=>Vn(jx,d,e,"en",p)),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=Re(window.location.origin,Rl);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ax.includes(n.role);return window.location.href.includes(Rl)||t||!Lx(s)&&!zx(s)?null:g.jsxs(Fp,{open:i,disableEscapeKeyDown:!0,fullWidth:!0,maxWidth:"sm",onClose:()=>o(!1),children:[g.jsxs(Bp,{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(Gp,{sx:{px:"12px !important"},children:[g.jsx(wt,{onClick:c,children:a("skip")}),f&&g.jsx(wt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Id.propTypes={locale:x.string,session:x.object};const Ee={};function Bx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=Re(r,Sc,e);return new Hp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function Gx(e="admin"){return Ee[e]||(Ee[e]=Bx(e)),Ee[e]}const $x=(e="admin")=>{const r=I.use(Kn),{session:n}=r??{},t=je(()=>n.user?.did,[n.user]),i=$p(t);return Wp(()=>{Object.keys(Ee).forEach(o=>{Ee[o]?.isConnected()&&Ee[o]?.disconnect(),delete Ee[o]})}),t?(i&&i!==t&&Object.keys(Ee).forEach(o=>{Ee[o]&&(Ee[o].isConnected()&&Ee[o].disconnect(),Ee[o].connect())}),!Ee[e]&&n.user&&(Ee[e]=Gx(e),Ee[e].connect()),Ee[e]):null},Wx={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>'},Hx={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"/>'},Ux={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 qx(){const e=Bt();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Er=new Up,Vx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Kx=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},Yx=async(e,r)=>{try{return await Er.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Jx=async(e,r)=>{const{type:n,did:t}=e;return wc.isSameAddr(n,"did")?await Yx(t,r)||Pn.getLink(e):Pn.getLink(e)},Xx=async(e,r,n=!0)=>{const t=Pn.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof Pn.Link){if(n){const o=await Jx(i,r),{type:a,chainId:s,did:l}=i;return wc.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(""))},Qx=e=>qp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Zx={comment:(e,r)=>r&&r>1?g.jsxs(g.Fragment,{children:["left ",r," comments on your ",e]}):g.jsxs(g.Fragment,{children:["commented on your ",e]}),like:e=>g.jsxs(g.Fragment,{children:["liked your ",e]}),follow:()=>g.jsx(g.Fragment,{children:"followed you"}),tips:e=>g.jsxs(g.Fragment,{children:["gave tips to your ",e]}),mention:e=>g.jsxs(g.Fragment,{children:["mentioned you in ",e]}),assign:()=>g.jsx(g.Fragment,{children:"assigned you a task"})};function Jt({user:e,color:r=void 0}){const{palette:n}=Bt(),t=Yn(Re(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Cc,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Jt.displayName="UserLink";function eS({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Bt(),{type:a,target:s}=e||{},{type:l}=s||{},{linkColor:c=o.text.primary}=t||{},u=je(()=>{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=je(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=ae(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Jt,{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(Jt,{user:m[0],color:c})," and ",g.jsx(Jt,{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(Jt,{user:D,color:c}),P<C.length-1?", ":""]},D.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Jt,{user:y,color:c})]})]})}),p=ae(()=>{const m=a?Zx[a]:null;return m?m(l,r.length):null}),h=je(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,l,f,d,p]),v=je(()=>{if(!e)return null;const m=Kx(e);return m?.targetLink?Re(i,m.targetLink):null},[e,i]);return!a||Oo(s)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Cc,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:s.name})]})}const tS={normal:Na,success:Wx,info:Na,warning:Hx,error:Ux},rS=dr(Jp)`
|
|
44
44
|
font-size: 20px;
|
|
45
45
|
`,nS=dr.div`
|
|
46
46
|
display: flex;
|