@abtnode/webapp 1.16.53-beta-20251009-103017-c7694a7e → 1.16.53-beta-20251010-233105-b0ddacda
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-DovOOpck.js → AdapterDayjs-DQepVz3x.js} +1 -1
- package/dist/assets/{Add-DyTieGiH.js → Add-CQt7mq1G.js} +1 -1
- package/dist/assets/ArrowDropDown-aNeHE2A2.js +1 -0
- package/dist/assets/{Autocomplete-DeRVpEU5.js → Autocomplete-Bf1Ho3Hd.js} +1 -1
- package/dist/assets/{Breadcrumbs-BnYzoMmu.js → Breadcrumbs-CPilcW9u.js} +1 -1
- package/dist/assets/{ButtonGroup-CzZQ8Npu.js → ButtonGroup-9zvLC_k0.js} +1 -1
- package/dist/assets/{CSSTransition-CjXLkGon.js → CSSTransition-dwX1-RMJ.js} +1 -1
- package/dist/assets/{CallMerge-DmrftrOd.js → CallMerge-BYCLcH5E.js} +1 -1
- package/dist/assets/{CardContent-CpM-_HeI.js → CardContent-C22npYBc.js} +1 -1
- package/dist/assets/{ChevronLeft-CcsCSRKu.js → ChevronLeft-Bmmo6bzu.js} +1 -1
- package/dist/assets/{ChevronRight-o-pKt_xW.js → ChevronRight-X_FMXVA4.js} +1 -1
- package/dist/assets/{Clear-DbuaJOFI.js → Clear-B-e33dNn.js} +1 -1
- package/dist/assets/{DeleteOutline-D-kT-jdx.js → DeleteOutline-CIuy8JMu.js} +1 -1
- package/dist/assets/{Done-C2ulOvk7.js → Done-yHCWLz6K.js} +1 -1
- package/dist/assets/{Edit-DWhNMMIZ.js → Edit-CLiO2h_l.js} +1 -1
- package/dist/assets/{ErrorOutline-B0ozV6sd.js → ErrorOutline-B_qBOUnI.js} +1 -1
- package/dist/assets/{FilterList-CQA7G7Vn.js → FilterList-BOMn8eqm.js} +1 -1
- package/dist/assets/{Google-CdFzL70-.js → Google-KOeLJ7n-.js} +1 -1
- package/dist/assets/{HelpOutline-aMigqk6S.js → HelpOutline-BXdmHwaP.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-Ccl83jb_.js → KeyboardArrowDown-CdK82Qsb.js} +1 -1
- package/dist/assets/{Launch-DR4ser43.js → Launch-cxvym2iP.js} +1 -1
- package/dist/assets/{Link-8FWBk0pv.js → Link-DKb1MvxW.js} +1 -1
- package/dist/assets/{ListItemButton-xoowqbX5.js → ListItemButton-E5H4lrRx.js} +1 -1
- package/dist/assets/{ListSubheader-Tf0tPSi7.js → ListSubheader-FJVGwx1O.js} +1 -1
- package/dist/assets/{LoadingButton-DdsR40-y.js → LoadingButton-C7IcO9Nb.js} +1 -1
- package/dist/assets/{MoreVert-CDZKGaWW.js → MoreVert-bx--E19j.js} +1 -1
- package/dist/assets/{OpenInNew-5dmOmuOP.js → OpenInNew-BdVhgoOc.js} +1 -1
- package/dist/assets/{Refresh-6wYRerOp.js → Refresh-mYLoMEkT.js} +1 -1
- package/dist/assets/{Search-CYv1OPLx.js → Search-Dm2dt-Sr.js} +1 -1
- package/dist/assets/{Stepper-BdbxyKvR.js → Stepper-B1wBWjZo.js} +1 -1
- package/dist/assets/{Switch-CJCk9M4e.js → Switch-CE03jZ_8.js} +1 -1
- package/dist/assets/{TableSearch-DEuaLdIb.js → TableSearch-Bj41g7St.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CJvpk2kD.js → ToggleButtonGroup-BEjde42R.js} +1 -1
- package/dist/assets/{UnfoldMore-I9efh077.js → UnfoldMore-zrMTJNOp.js} +1 -1
- package/dist/assets/{Verified-B6ag8nG6.js → Verified-B-cFyGP0.js} +1 -1
- package/dist/assets/{VerifiedUser-ueCIxEYY.js → VerifiedUser-aSWRZr_Y.js} +1 -1
- package/dist/assets/{ViewList-STBCUXtD.js → ViewList-BbDrtZvr.js} +1 -1
- package/dist/assets/{_createAggregator-Cnz_HrZy.js → _createAggregator-OKIbDBKF.js} +1 -1
- package/dist/assets/{actions-0xA8jgJe.js → actions-BBls_wa0.js} +1 -1
- package/dist/assets/{actions-i2UahyAp.js → actions-DaOidt88.js} +1 -1
- package/dist/assets/{agreement-DoAGWhqk.js → agreement-B9tSzjmL.js} +1 -1
- package/dist/assets/api-r-_fEWsI.js +1 -0
- package/dist/assets/{appearance-BLnd4o8Y.js → appearance-BOeNpo6Y.js} +1 -1
- package/dist/assets/{audit-logs-D__bx07h.js → audit-logs-Bdg8Eitt.js} +1 -1
- package/dist/assets/{base-chart-Dr8SHE0h.js → base-chart-D7y6qq9u.js} +1 -1
- package/dist/assets/{blocklet-Ddfm_VL2.js → blocklet-C67aFvl7.js} +1 -1
- package/dist/assets/{chain-CdexttSs.js → chain-se1xvUDC.js} +1 -1
- package/dist/assets/{click-to-copy-D6M1fnDc.js → click-to-copy-D50kkiW4.js} +1 -1
- package/dist/assets/client-Dj0WAiOq.js +1 -0
- package/dist/assets/cloneDeep-Dqj81-8-.js +1 -0
- package/dist/assets/{collapse-D2q_m0jc.js → collapse-UPIFGGD9.js} +1 -1
- package/dist/assets/{config-navigation-B6vV0qs8.js → config-navigation-CutTRHe-.js} +3 -3
- package/dist/assets/{connect-to-Co7U9qsv.js → connect-to-Dz9eH_td.js} +1 -1
- package/dist/assets/{cssMode-C5uxwgRY.js → cssMode-73_XXe8t.js} +1 -1
- package/dist/assets/{delete-confirm-C1ZQ29Q4.js → delete-confirm-cbt-tN11.js} +1 -1
- package/dist/assets/{depsEqual-DQDFZSyD.js → depsEqual-BaUhqVSn.js} +1 -1
- package/dist/assets/{detail-a5SJkzSR.js → detail-BR9P1Yx6.js} +3 -3
- package/dist/assets/{domains-BRe4M7bx.js → domains-BDMd9S2d.js} +1 -1
- package/dist/assets/{download-Cwb05ySd.js → download-Oh1d5P58.js} +1 -1
- package/dist/assets/{edit.svg-DCbVw9zw.js → edit.svg-BHG50OdM.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-B4ZmPeHk.js +1 -0
- package/dist/assets/engine-BWGbIQAy.js +1 -0
- package/dist/assets/{freemarker2-DVpsezSy.js → freemarker2-BQ02ePgw.js} +1 -1
- package/dist/assets/{get-safe-url-BjFdr4OL.js → get-safe-url-CteWIr5a.js} +1 -1
- package/dist/assets/getValidReactChildren-DDB1J2y7.js +1 -0
- package/dist/assets/{graphqlMode-ChKOq_KJ.js → graphqlMode-BTvp4HDh.js} +2 -2
- package/dist/assets/{handlebars-BU9OFTYI.js → handlebars-DPMLBiwS.js} +1 -1
- package/dist/assets/{html-UexVD9vB.js → html-iuKRS8o1.js} +1 -1
- package/dist/assets/{html-title-C4Q1l9hV.js → html-title-vsl-TT26.js} +1 -1
- package/dist/assets/{htmlMode-TJopYsor.js → htmlMode-CvGrTtxZ.js} +1 -1
- package/dist/assets/{iframe-DMkrJLov.js → iframe-Dl-yNrp9.js} +1 -1
- package/dist/assets/{index-CB7PBjDX.js → index-2UXtfcoT.js} +3 -3
- package/dist/assets/{index-bK6g80kL.js → index-8DgiLFWe.js} +1 -1
- package/dist/assets/{index-Bi1dCbDw.js → index-AKf23glP.js} +1 -1
- package/dist/assets/{index-SQHqCeph.js → index-B28OSLEk.js} +1 -1
- package/dist/assets/{index-B7EJvfHM.js → index-B2jTgxcq.js} +1 -1
- package/dist/assets/{index-DkJyV264.js → index-B5Z2178w.js} +3 -3
- package/dist/assets/{index-CwdwMEyK.js → index-BDFC1sP1.js} +1 -1
- package/dist/assets/{index-BS0sLGRz.js → index-BGSPRFxN.js} +1 -1
- package/dist/assets/{index-CaUe3dMj.js → index-BIIfr0Cp.js} +1 -1
- package/dist/assets/{index-DfwECgSx.js → index-BOBzLa1k.js} +1 -1
- package/dist/assets/{index-1ecJNhOT.js → index-BP0DWBRY.js} +1 -1
- package/dist/assets/{index-Cie1Z-Am.js → index-BYQEC6o1.js} +1 -1
- package/dist/assets/index-BkGL3dW2.js +375 -0
- package/dist/assets/{index-D_kWYNJi.js → index-BtY4M62T.js} +3 -3
- package/dist/assets/{index-CjedGlyf.js → index-BvVI7Mxo.js} +1 -1
- package/dist/assets/{index-CFWi7Q8M.js → index-BxxgnmFX.js} +1 -1
- package/dist/assets/{index-b3XeYmTe.js → index-BzM5LY8-.js} +1 -1
- package/dist/assets/{index-wNvsBj9G.js → index-C-1MOEs6.js} +1 -1
- package/dist/assets/{index-CsmIWfmp.js → index-C31TKs2j.js} +1 -1
- package/dist/assets/{index-DGSsefUZ.js → index-C7egXf_h.js} +3 -3
- package/dist/assets/{index-DtIh1vFa.js → index-CC45e4UO.js} +1 -1
- package/dist/assets/{index-Do106lNr.js → index-CFw_f03A.js} +1 -1
- package/dist/assets/{index-C7AJ9wZq.js → index-CHmcCDqZ.js} +1 -1
- package/dist/assets/{index--oO30Jkn.js → index-CRZ7_NI2.js} +1 -1
- package/dist/assets/{index-CnTj486q.js → index-CgJV4oal.js} +1 -1
- package/dist/assets/{index-D0uKz0V_.js → index-Cisz7h7X.js} +1 -1
- package/dist/assets/{index-BlH5R4ip.js → index-ClSpNPOh.js} +1 -1
- package/dist/assets/{index-T209NFxy.js → index-ClxIMfsM.js} +1 -1
- package/dist/assets/{index-CIUZoemD.js → index-CpuUG8Z1.js} +1 -1
- package/dist/assets/{index-DdqV6Ziy.js → index-Cwp0FKW3.js} +2 -2
- package/dist/assets/{index-H-jmtxXo.js → index-D9p6b5Uq.js} +1 -1
- package/dist/assets/index-DVAwbdhJ.js +1 -0
- package/dist/assets/{index-DAqbo3x1.js → index-DWy1kjL1.js} +1 -1
- package/dist/assets/{index-CbZ9HAj8.js → index-D_jr-SDL.js} +1 -1
- package/dist/assets/{index-BTulqglm.js → index-DbXGWrH9.js} +9 -9
- package/dist/assets/{index-Xej91YkM.js → index-DfEAejxd.js} +1 -1
- package/dist/assets/{index-C3SQ4eIT.js → index-DfPrMmoZ.js} +1 -1
- package/dist/assets/{index-BYbMJbBQ.js → index-DnNVPfHo.js} +1 -1
- package/dist/assets/{index-BRdnv7Wp.js → index-DnZwjPBr.js} +1 -1
- package/dist/assets/{index-DWPS9ieq.js → index-DsOZQCxX.js} +2 -2
- package/dist/assets/{index-hCRLdd4Q.js → index-Dxww66F8.js} +1 -1
- package/dist/assets/{index-SpGv84ec.js → index-GerkFFyW.js} +3 -3
- package/dist/assets/{index-Di3fMIen.js → index-W1Jg0zqO.js} +1 -1
- package/dist/assets/{index-uisuBluj.js → index-eYZIsLRo.js} +1 -1
- package/dist/assets/{index-B4kOKoNV.js → index-oHwXuk_n.js} +1 -1
- package/dist/assets/{index-CNPrEh7K.js → index-rrAKD-3O.js} +1 -1
- package/dist/assets/{index.esm-Lk0YHlgv.js → index.esm-DkqB0mnE.js} +1 -1
- package/dist/assets/{install-from-url-BRio3aeH.js → install-from-url-DOR8ZaEG.js} +1 -1
- package/dist/assets/{invitation-CqYyE8ME.js → invitation-BOK3Xmtg.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-CC7-GVaa.js → is-path-prefix-equal-Cl2onSKX.js} +1 -1
- package/dist/assets/{item-BxAxNpJk.js → item-BQYMoVUI.js} +1 -1
- package/dist/assets/{javascript-ChDh5iSe.js → javascript-BaLTUeT9.js} +1 -1
- package/dist/assets/{jsonMode-_2nbeNvy.js → jsonMode-P_9C43Nc.js} +1 -1
- package/dist/assets/{liquid-B4GHkAyg.js → liquid-amkaEf3E.js} +1 -1
- package/dist/assets/{list-header-Cb1uRm5G.js → list-header-DAiEDwhs.js} +1 -1
- package/dist/assets/{lock.svg-BH7_YT0q.js → lock.svg-CNAb9wZc.js} +1 -1
- package/dist/assets/{log-6_0GK9Sf.js → log-1_m4xF_N.js} +1 -1
- package/dist/assets/{lottie-react.esm-DmwbnPOn.js → lottie-react.esm-BmVAhuIy.js} +1 -1
- package/dist/assets/{mdx-B_wFriqY.js → mdx-Bd0pfo5p.js} +1 -1
- package/dist/assets/{memory-sDoTeyx0.js → memory-UJLIVuot.js} +1 -1
- package/dist/assets/{metric-BKabdyQk.js → metric-DNUD7jbr.js} +1 -1
- package/dist/assets/omit-DVVVCRDp.js +1 -0
- package/dist/assets/{overview-aAlDPd4Q.js → overview-DqrKT2dL.js} +1 -1
- package/dist/assets/{permission-crhdqXhd.js → permission-ycsOOBwp.js} +1 -1
- package/dist/assets/{preference-BNQQaSX0.js → preference-BhfekBAB.js} +3 -3
- package/dist/assets/{python-BtYeLxMR.js → python-B5XVaf0B.js} +1 -1
- package/dist/assets/{raf-schd.esm-K0lox3Rf.js → raf-schd.esm-yET3NUrL.js} +1 -1
- package/dist/assets/{razor-B4KFVo2j.js → razor-TLp_5QYQ.js} +1 -1
- package/dist/assets/{rotate-session-key-DTg7AVbr.js → rotate-session-key-B90qT4kq.js} +1 -1
- package/dist/assets/{runtime-De89eo0q.js → runtime-D_DvOf5h.js} +1 -1
- package/dist/assets/schema-Db5OWlWL.js +1 -0
- package/dist/assets/sdk-BZ4-wJ5p.js +1 -0
- package/dist/assets/{service-DLCTpVab.js → service-DjmXGMON.js} +1 -1
- package/dist/assets/{shorten-label-B1hTVv56.js → shorten-label-BOfK6p4p.js} +1 -1
- package/dist/assets/{simple-select-Cdud---B.js → simple-select-BZu6cCw3.js} +1 -1
- package/dist/assets/{spaces-Du4ytYyE.js → spaces-CNd41sir.js} +1 -1
- package/dist/assets/{status-BM8-Rpzz.js → status-C32bwmXC.js} +1 -1
- package/dist/assets/{status-DYjJgZF9.js → status-DnBUY_P3.js} +1 -1
- package/dist/assets/{switch-control-HQMK5p78.js → switch-control-Ce2o9ffJ.js} +1 -1
- package/dist/assets/{table-icons-DPEJ6Pbc.js → table-icons-BYT0kQuz.js} +1 -1
- package/dist/assets/{team-ouIwaQum.js → team-CxcPF7A7.js} +1 -1
- package/dist/assets/{toLower-3JDTZiHY.js → toLower-DJOalyNw.js} +1 -1
- package/dist/assets/toUpper-B5TzdczN.js +1 -0
- package/dist/assets/{traffic-DQX3XpFH.js → traffic-C17ygInL.js} +1 -1
- package/dist/assets/{tsMode-DdJdi-Cl.js → tsMode-YA-whx9N.js} +1 -1
- package/dist/assets/{typescript-BRTY57X5.js → typescript-Balm-M-7.js} +1 -1
- package/dist/assets/{url-evaluation-4RA6nhhV.js → url-evaluation-w8X_lgzG.js} +1 -1
- package/dist/assets/{url-join-s-abjyAU.js → url-join-3aXvW59g.js} +1 -1
- package/dist/assets/{use-mobile-9H63c6Kz.js → use-mobile-BxUSznYk.js} +1 -1
- package/dist/assets/{use-mobile-CNA5itNx.js → use-mobile-IHqsUzt1.js} +1 -1
- package/dist/assets/{useAsync-B0Ca_r2m.js → useAsync-Bkh8Rg6Z.js} +1 -1
- package/dist/assets/{useAsyncRetry-CtsBX_BZ.js → useAsyncRetry-CwoOKXPC.js} +1 -1
- package/dist/assets/{useLocalStorage-T0_FQRxp.js → useLocalStorage-DZYDHTFQ.js} +1 -1
- package/dist/assets/{useThemeProps-EahRu2x5.js → useThemeProps-Bs1lG48z.js} +1 -1
- package/dist/assets/{util-CUni4mda.js → util-CC0K7Xya.js} +1 -1
- package/dist/assets/{wait-container-xOI954wH.js → wait-container-DeaT7Cuc.js} +1 -1
- package/dist/assets/{without-wallet-DOZiTpC3.js → without-wallet-B5UEEmrQ.js} +1 -1
- package/dist/assets/{wrap-locale-Des5gfRA.js → wrap-locale-gBhiwBoM.js} +1 -1
- package/dist/assets/{xml-B19Uai7I.js → xml-CZ5H3llM.js} +1 -1
- package/dist/assets/{yaml-D5iuUIms.js → yaml-CL1tqltg.js} +1 -1
- package/dist/assets/{zh-CJ0qBy8e.js → zh-CZLHYA5h.js} +1 -1
- package/dist/assets/{zh-tw-Cs-zRk58.js → zh-tw-B-qWW0q8.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-BFKf-Ws9.js +0 -1
- package/dist/assets/api-BLz72Lsh.js +0 -1
- package/dist/assets/client-wk4MeJIg.js +0 -1
- package/dist/assets/cloneDeep-C1r6zWUN.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CgS-LeII.js +0 -1
- package/dist/assets/engine-DHL9Z21k.js +0 -1
- package/dist/assets/getValidReactChildren-BImmvw4C.js +0 -1
- package/dist/assets/index-CgWUU7yZ.js +0 -1
- package/dist/assets/index-TglI0woB.js +0 -375
- package/dist/assets/omit-Cd7qywqq.js +0 -1
- package/dist/assets/schema-CjV-LIXx.js +0 -1
- package/dist/assets/sdk-DZ3OhIyg.js +0 -1
- package/dist/assets/toUpper-Cmpm1h81.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{bY as Yf,bX as Jf,r as C,bZ as Xf,eT as Qf,j as g,b8 as ot,b$ as nt,c0 as Zf,hD as ep,hE as tp,gB as rp,dt as np,hF as ip,du as op,bM as cc,bN as ap,bK as lp,bL as sp,bP as uc,dx as Wn,hG as cp,eD as up,hr as dp,gY as fp,dE as pp,gV as dc,hH as hp,gF as gp,fp as vp,eE as mp,he as bp,n as Ee,a2 as We,z as je,aH as xe,aP as jt,c3 as Et,i as yp,fa as xp,eO as Sp,hu as wp,dw as Tr,ez as mr,dh as fc,dB as Cp,hI as Ip,dA as pc,bd as Hn,dO as ir,hJ as $,e_ as K,eH as Rp,hK as Jr,be as Z,o as x,dM as Un,aQ as Po,hL as _o,cx as er,aD as ye,M as ie,af as Tp,b as Lt,cs as fe,b9 as ko,dC as tr,T as me,a3 as Oe,b1 as qi,dI as yt,hM as Dp,bn as hc,F as qn,hN as Pp,hO as _p,v as it,fm as Dn,ay as kp,de as Ke,fc as gc,C as vc,bF as Op,hP as Oa,N as Oo,f9 as Ep,H as kt,P as mc,f6 as bc,$ as yc,w as Pn,hQ as xc,f as Ft,dL as Np,bv as Mp,gJ as Sc,dJ as Er,a6 as Ap,a7 as Lp,hR as Ea,hS as wc,hT as zp,hU as jp,fQ as Vn,fd as Fp,gb as Bp,gc as $p,gi as Kn,hV as Gp,gO as Wp,hW as _n,hX as Cc,bz as Me,L as Ic,A as Eo,hY as Na,hZ as Rc,h_ as Vi,h$ as Hp,i0 as Up,s as ur,i1 as qp,f5 as Vp,cw as Tc,i2 as Kp,bC as Yp,i3 as Jp,dH as He,D as Xp,V as Qp,B as Zp,cr as eh,i4 as th,a$ as rh,bg as Ma,R as kn,a8 as Aa,i5 as nh,i6 as ih,i7 as oh,i8 as ah,i9 as Dc,ia as lh,aB as Pc,f0 as _c,ib as No,ic as sh,hn as kc,id as ch,b5 as uh,cB as Jt,ie as dh,cQ as fh,ig as ph,G as La,dp as di,eI as za,dN as hh,ih as gh,a4 as Oc,X as ja,ii as Fa,Q as vh,S as Ba}from"./index-DGSsefUZ.js";import{r as mh}from"./omit-Cd7qywqq.js";import{r as bh}from"./cloneDeep-C1r6zWUN.js";import{r as yh}from"./index-Bi1dCbDw.js";import{c as xh,u as Sh}from"./_createAggregator-Cnz_HrZy.js";import{u as Bt}from"./blocklet-Ddfm_VL2.js";import{H as wh,G as Ch,M as Ih,N as Rh,O as $a,K as Th,L as Dh}from"./index-CNPrEh7K.js";import{_ as Se,a as we,b as Fe,c as Be,d as $e,e as Ph,f as Ec,u as de,g as re,r as Br,w as On,h as Nc,i as $t,j as Mc,k as _h,l as kh,o as Ki}from"./raf-schd.esm-K0lox3Rf.js";import{_ as M,b as Ga,c as Oh,a as Eh,d as Nh}from"./redux-DfszZyTl.js";import{_ as Mh}from"./typeof-QjJsDpFa.js";import{u as Ac,b as Ah}from"./team-ouIwaQum.js";import{b as Lh}from"./actions-0xA8jgJe.js";import{u as zh,a as jh,C as st}from"./index.esm-Lk0YHlgv.js";import{S as Yi}from"./simple-select-Cdud---B.js";import{b as Fh,a as Wa}from"./html-title-C4Q1l9hV.js";import{C as Lc}from"./Clear-DbuaJOFI.js";import{A as Bh}from"./ArrowDropDown-BFKf-Ws9.js";import{a as $h}from"./api-BLz72Lsh.js";import{A as Gh}from"./Autocomplete-DeRVpEU5.js";import{L as Wh}from"./ListItemButton-xoowqbX5.js";import{u as zc}from"./use-mobile-CNA5itNx.js";import{e as Dr}from"./client-wk4MeJIg.js";import{u as Hh}from"./index-DtIh1vFa.js";import{d as Uh}from"./KeyboardArrowDown-Ccl83jb_.js";import{S as qh}from"./Search-CYv1OPLx.js";import{A as Vh}from"./Add-DyTieGiH.js";import{O as Kh}from"./OpenInNew-5dmOmuOP.js";import{I as Yh}from"./iframe-DMkrJLov.js";import{B as fi}from"./ButtonGroup-CzZQ8Npu.js";import{L as Ha}from"./LoadingButton-DdsR40-y.js";import"./depsEqual-DQDFZSyD.js";import"./url-evaluation-4RA6nhhV.js";import"./useLocalStorage-T0_FQRxp.js";import"./MoreVert-CDZKGaWW.js";import"./get-safe-url-BjFdr4OL.js";import"./permission-crhdqXhd.js";import"./ListSubheader-Tf0tPSi7.js";import"./getValidReactChildren-BImmvw4C.js";function Jh(e){return Yf("MuiListItemAvatar",e)}Jf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Xh=e=>{const{alignItems:r,classes:n}=e;return Zf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Jh,n)},Qh=ot("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ua=C.forwardRef(function(r,n){const t=Xf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(Qf),l={...t,alignItems:a.alignItems},s=Xh(l);return g.jsx(Qh,{className:nt(s.root,i),ownerState:l,ref:n,...o})});var Zh=ep(function(){return tp?sessionStorage:void 0});function eg(e,r){return rp(r,function(n){return e[n]})}function tg(e){return e==null?[]:eg(e,np(e))}var rg=ip.isFinite;function qa(e){return typeof e=="number"&&rg(e)}function ng(e){return typeof e=="number"&&e==op(e)}var ig=xh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const og=Object.freeze(Object.defineProperty({__proto__:null,default:ig},Symbol.toStringTag,{value:"Module"}));var ag=cc(function(e){var r=ap(e);return r=typeof r=="function"?r:void 0,lp(sp(e,1,uc,!0),void 0,r)});const lg=Object.freeze(Object.defineProperty({__proto__:null,default:ag},Symbol.toStringTag,{value:"Module"}));var jc=cc(function(e,r){return uc(e)?Lh(e,r):[]}),br={};const sg=Wn(lg),cg=Wn(cp),ug=Wn(og);var Va;function dg(){return Va||(Va=1,function(e){var r=br&&br.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ne,e.deepWalk=S,e.isMatchSection=P,e.nestNavigationList=Q,e.filterNavigation=X,e.cleanOrphanNavigation=ee,e.joinLink=F,e.flattenNavigation=N,e.splitNavigationBySection=J;const n=up(),t=r(sg),i=r(dp),o=r(fp),a=r(cg),l=r(pp),s=r(mh),c=r(bh),u=bp(),f=r(yh()),d=r(dc()),p=r(hp),h=r(gp),v=r(ug),m=vp(),y=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",I="/",T="/",_="/";function S(W,O=()=>{},{key:k="children",order:B="first"}={}){function z(U,{index:oe=0,parent:ce=null,level:ue=0}={}){Array.isArray(U)?U.forEach((he,pe)=>{z(he,{index:pe,parent:ce,level:ue+1})}):U&&(B==="first"&&O(U,ce,{index:oe,level:ue}),z(U[k],{parent:U,level:ue}),B==="last"&&O(U,ce,{index:oe,level:ue}))}z(W)}function P(W,O){return O===b&&(0,a.default)(W)?!0:Array.isArray(W)?W.includes(O):W===O}function w(W){try{return JSON.parse(W)}catch{return W}}function D(W){return W.map(O=>{const k={...O};return k.role&&(k.role=w(k.role)),k.section&&(k.section=w(k.section)),k.title&&(k.title=w(k.title)),k.description&&(k.description=w(k.description)),k.link&&(k.link=w(k.link)),k})}function R(W="/",O=""){if((0,d.default)(O||""))return O;const k=f.default.join(W,O||T);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function E(W,O,{strict:k=!0}={}){let B=W,z=O;return k||(B=B||"/",z=z||"/"),(0,p.default)(B)&&(0,h.default)(z)&&(0,y.checkLink)(z)?Object.keys(B).reduce((U,oe)=>(U[oe]=R(B[oe],z),U),{}):(0,h.default)(B)&&(0,y.checkLink)(B)&&(0,p.default)(z)?Object.keys(z).reduce((U,oe)=>(U[oe]=R(B,z[oe]),U),{}):(0,h.default)(B)&&(0,h.default)(z)?(0,y.checkLink)(B)||(0,y.checkLink)(z)?R(B,z):z:(0,p.default)(B)&&(0,p.default)(z)?[...new Set([...Object.keys(B),...Object.keys(z)])].reduce((oe,ce)=>(oe[ce]=R(B[ce],z[ce]),oe),{}):z}function F(W,O){const k=(0,c.default)(W);return S(k,(B,z)=>{const U=B.component||B.child;if(U){const oe=O.find(ce=>ce.name===U);oe&&(B.link=E(oe.link,B.link,{strict:!1}))}else z&&(B.link=E(z.link,B.link))},{key:"items"}),k}function N(W=[],{depth:O=1,transform:k=B=>B}={}){const B=(0,c.default)(W),z=[];return S(B,(U,oe,{level:ce})=>{if(ce>=O){const{items:ue=[]}=U;if(ue&&Array.isArray(ue)&&ue.length>0){delete U.items;const he=ue.map(pe=>k(pe,U));if(oe)oe.items.push(...he);else{const pe=k((0,s.default)(U,["items"]),oe);z.push(pe,...he)}}else if(ce===1){const he=k((0,s.default)(U,["items"]),oe);z.push(he)}}else ce===1&&z.push(U)},{key:"items",order:"last"}),z}function H(W){if(W.section!=="bottomNavigation")return W;const O={...W};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const B=O[k];typeof B=="string"&&(O[k]={en:B})}),O}function L(W={}){const O=[];function k(z,U={}){const oe=[],{children:ce=[],meta:ue={}}=z,he=(0,c.default)(ue?.navigation||[]);(0,m.hasStartEngine)(ue)&&z.meta?.capabilities?.navigation!==!1&&oe.push(...he);const pe=U.name||"",Re=U.mountPoint||I,Ye=z===W?"":ue.name||"",Ge=z===W?"":z.mountPoint||I;for(const ae of ce){if(!(0,m.hasStartEngine)(ae.meta))continue;const be=ae.meta.name,at=ae.mountPoint,vr=[pe,Ye,be].filter(Boolean).join("."),ci=ae.meta.navigation||[],ui=(0,u.joinURL)(Re,Ge,at);ae.meta?.capabilities?.navigation!==!1&&O.push({did:ae.meta.did,name:vr,link:ui,title:ae.meta.title||"",navigation:ci.map(Qe=>({section:b,...Qe}))});const lt=he.find(Qe=>Qe.component?Qe.component===be:!1);if(lt){if(!lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Qe=k(ae,{mountPoint:Ge,name:Ye});Qe.length>0&&(lt.items=lt.items??[],lt.items.push(...Qe))}else lt.link=T}else if(ae.meta?.capabilities?.navigation!==!1){const Qe=k(ae,{mountPoint:Ge,name:Ye}),ln={title:ae.meta.title,component:be,id:ae.meta.did};Qe.length>0?(ln.items=Qe,ln.link=void 0):ln.link=T,oe.push(ln)}}return oe}return{navigationList:k(W),components:O}}function A(W){const O=(0,c.default)(W).filter(k=>k.id);return S(O,(k,B)=>{if(k.items&&k.items.length){for(let z=k.items.length-1;z>=0;z--)k.items[z].id||k.items.splice(z,1);k.items.length===0&&k.component&&(k.link=k.link||T)}B&&(k.parent=B.id,k.id=[B.id,k.id].join(_)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),O}function G(W,O=2){const k=(0,c.default)(W),B=N(k,{depth:O,transform:(z,U)=>(U&&(z._parent||(z._parent=U.id,U.component||(z.link=E(U.link,z.link))),z.section=z.section||U.section||[b],z.visible=z.visible??U.visible,U.role&&(z.role=z.role||U.role)),z.component=[U.component,z.component].filter(Boolean).join("."),z)});return S(B,z=>{z.items&&z.items.length>0&&z.items.reduceRight((U,oe)=>{if(oe._parent){const ce=z.items.findIndex(ue=>ue.id===oe._parent);ce>=0&&z.items.splice(ce,1),delete oe._parent}return null},null)},{key:"items"}),B}function q(W,O){return O&&Array.isArray(W.items)?W.items.filter(k=>(0,a.default)(k.section)?P(W.section,O):!!P(k.section,O)).map(k=>({...k,section:O})):[]}function J(W){const O=(0,c.default)(W),k=[];for(const B of O){let oe=function(ce,ue){const he=q(ce,ue);U.push({...z,section:ue,items:he})};const z=(0,c.default)((0,s.default)(B,["items"])),U=[];if(Array.isArray(B.section))for(const ce of B.section)oe(B,ce);else if(B.section){const{section:ce}=B;oe(B,ce)}else if(B.items&&B.items.length>0){const ce=B.items.reduce((he,pe)=>{const{section:Re=[b]}=pe||{};return he.push(...Re),he},[]),ue=[...new Set(ce)];for(const he of ue)oe(B,he)}else U.push({...B,section:b});k.push(...U)}return k}function Q(W=[]){const O=(0,c.default)(W);return O.reduceRight((k,B,z)=>{if(B.parent){const U=O.find(oe=>B.section&&oe.section?oe.section===B.section&&oe.id===B.parent:oe.id===B.parent);U&&(U.items||(U.items=[]),U.items=[B,...U.items]),O.splice(z,1)}return null},null),O}function X(W,O=[]){const k=Q(W);return S(k,z=>{if(z?.component&&(O.some(U=>U.name===z.component)||(z.visible=!1)),z.items&&z.items.length)for(let U=z.items.length-1;U>=0;U--)z.items[U].visible===!1&&z.items.splice(U,1)},{key:"items"}),k.filter(z=>!(z.visible===!1||z.items&&Array.isArray(z.items)&&z.items.length>0&&z.items?.every(U=>U.visible===!1)))}function ee(W){return W.map(O=>O.items&&Array.isArray(O.items)&&O.items.length===1&&["header","footer","",void 0,null].includes(O.section)?O.items[0]:O)}const V=W=>{const[O,k]=(0,v.default)(W,B=>B.id==="/team");return[...O,...k]};e.sortRootNavigation=V;const te=W=>{const[,O]=(0,v.default)(W,k=>{const B=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&B==="Access"||k.id==="/dashboard"&&B==="Blocklet"});return O};e.cleanOldNavigationHistory=te;function ne(W={},O={}){const{beforeProcess:k=ae=>ae}=O,{navigationList:B,components:z}=L(W),U=new Map;B.forEach(ae=>{ae.items?.forEach(be=>{U.set((0,u.joinURL)(ae.id,be.id),be)})});const oe=(0,l.default)(W,"settings.org.enabled",!1);W?.settings?.navigations&&(Array.isArray(W.settings.navigations)?W.settings.navigations=[...W.settings.navigations].filter(ae=>!(ae?.parent==="/team"&&ae.from==="team-tmpl")).map(ae=>{if(ae.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ae,"private")){const be=U.get(ae.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(ae.private=be.private)}return!oe&&ae.section==="userCenter"&&ae.id==="/userCenter/orgs"?null:ae}).filter(Boolean):W.settings.navigations=[]);const ce=D(te(W?.settings?.navigations||[])).map(H),ue=G(k(B)),he=A(ue),Re=J(he).reduce((ae,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ae.push(...be.items.map(vr=>{const{section:ci}=be,ui=E(be.link,vr.link),lt=[be.component,vr.component].filter(Boolean).join(".");return{...vr,section:ci,link:ui,component:lt,parent:""}})),ae):(ae.push(be),ae),[]),Ye=N(Re,{transform(ae,be){let{component:at}=ae;return be?.component&&(at=[be.component,ae.component].filter(Boolean).join(".")),H({...ae,component:at})}});return{navigationList:(0,t.default)(ce,Ye,(ae,be)=>{const at=["id","section"];return(0,i.default)((0,o.default)(ae,at),(0,o.default)(be,at))}),components:z,builtinList:Ye}}}(br)),br}var _e=dg();const Fc=C.createContext(null),Ka="/",fg="header",Ya={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),pg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),hg=(e,r)=>{const n=_e.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(pg("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ja({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function gg({children:e}){const{blocklet:r,actions:n}=Bt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=_e.parseNavigation(r,{beforeProcess(S){const P=We(S);return["dashboard","userCenter"].forEach(w=>{Object.prototype.hasOwnProperty.call(Ya,w)&&Ya[w].forEach(D=>{(D.shouldDisplay&&typeof D.shouldDisplay=="function"?D.shouldDisplay:()=>!0)(r)&&!P.some(E=>E.id===D.id)&&P.push(D)})}),hg(t,P)}}),l=jt({rawNavigation:We(i),activeSection:fg,components:o}),s=C.useMemo(()=>_e.nestNavigationList(We(l.rawNavigation)),[l.rawNavigation]),c=C.useMemo(()=>{const S=_e.filterNavigation(We(l.rawNavigation),o);return _e.joinLink(S,o)},[o,l.rawNavigation]),u=C.useCallback(S=>{if(!S.id)return"";const P=_e.flattenNavigation(_e.joinLink(s,o)),w=P.find(D=>D.id===S.id);if(w?.component){if(!o.some(D=>D.name===w.component))return g.jsx(Ja,{name:w.component})}else if(w.parent){const D=P.find(R=>R.id===w.parent);if(D?.component&&!o.some(R=>R.name===D.component))return g.jsx(Ja,{name:D.component})}return w?.link},[s,o]),f=C.useCallback(S=>{l.activeSection=S},[l]),d=C.useCallback(S=>{const P=[];_e.deepWalk(S,(D,R)=>{const E={...Et(D,["children","expand"]),parent:R?.id};P.push(E)});const w=We(l.rawNavigation).filter(D=>{if(!l.activeSection)return!1;const R=P.find(E=>pi(E,D));return R?!_e.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...w,...P]},[l]),p=C.useCallback((S=[])=>{const P=We(l.rawNavigation).map(w=>{const D=S.find(R=>pi({...R,section:l.activeSection},w));return D?{...w,...D}:w});l.rawNavigation=P},[l]),h=C.useCallback((S,P=Ka)=>S.map(D=>{const E=o.find(H=>H.name===D.component)?.link||P,F=D.items||[],{link:N}=D;return{title:D.title,description:D.description,subtitle:u(D),link:N,icon:D.icon,children:h(F,N||Ka),section:D.section,visible:D.visible,parent:D.parent,component:D.component,id:D.id,role:D.role,from:D.from,__base:E}}),[o,u]),v=C.useCallback(S=>{p([S])},[p]),m=C.useCallback(S=>{const P=l.rawNavigation.filter(w=>w.id===S||w.parent===S).map(w=>w.id);l.rawNavigation=We(l.rawNavigation).filter(w=>!P.includes(w.id))},[l]),y=C.useCallback((S={},P=-1)=>{const w={...S,id:yp.nanoid(),section:l.activeSection,visible:!0},D=[...l.rawNavigation],R=D.filter(E=>E.section===l.activeSection);if(P<0||P>R.length-1)D.push(w);else{const E=R[P],F=D.findIndex(N=>pi(N,E));D.splice(F,0,w)}return l.rawNavigation=D,w},[l]),b=C.useCallback(S=>{const w=We(s).filter(D=>_e.isMatchSection(D.section,S));return h(w)},[s,h]),I=C.useCallback(async S=>{const w=S.map(D=>xp(D,wp)).map(D=>{const R={...D};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(w)},[n]),T=C.useCallback(async S=>{if(S){const P=a.filter(D=>_e.isMatchSection(D.section,S)),w=l.rawNavigation.filter(D=>!_e.isMatchSection(D.section,S));await I(w),l.rawNavigation=[...w,...P]}else await I([]),l.rawNavigation=We(a)},[I,l,a]),_=C.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:I,resetNavigation:T}),[l,c,o,u,f,v,m,y,d,b,I,T]);return g.jsx(Fc.Provider,{value:_,children:e})}function Bc(){const e=C.useContext(Fc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Je={},hi,Xa;function vg(){if(Xa)return hi;Xa=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Tr=="object"&&Tr&&Tr.Object===Object&&Tr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(S,P,w){var D,R,E,F,N,H,L=0,A=!1,G=!1,q=!0;if(typeof S!="function")throw new TypeError(e);P=_(P)||0,b(w)&&(A=!!w.leading,G="maxWait"in w,E=G?p(_(w.maxWait)||0,P):E,q="trailing"in w?!!w.trailing:q);function J(k){var B=D,z=R;return D=R=void 0,L=k,F=S.apply(z,B),F}function Q(k){return L=k,N=setTimeout(V,P),A?J(k):F}function X(k){var B=k-H,z=k-L,U=P-B;return G?h(U,E-z):U}function ee(k){var B=k-H,z=k-L;return H===void 0||B>=P||B<0||G&&z>=E}function V(){var k=v();if(ee(k))return te(k);N=setTimeout(V,X(k))}function te(k){return N=void 0,q&&D?J(k):(D=R=void 0,F)}function ne(){N!==void 0&&clearTimeout(N),L=0,D=H=R=N=void 0}function W(){return N===void 0?F:te(v())}function O(){var k=v(),B=ee(k);if(D=arguments,R=this,H=k,B){if(N===void 0)return Q(H);if(G)return N=setTimeout(V,P),J(H)}return N===void 0&&(N=setTimeout(V,P)),F}return O.cancel=ne,O.flush=W,O}function y(S,P,w){var D=!0,R=!0;if(typeof S!="function")throw new TypeError(e);return b(w)&&(D="leading"in w?!!w.leading:D,R="trailing"in w?!!w.trailing:R),m(S,P,{leading:D,maxWait:P,trailing:R})}function b(S){var P=typeof S;return!!S&&(P=="object"||P=="function")}function I(S){return!!S&&typeof S=="object"}function T(S){return typeof S=="symbol"||I(S)&&d.call(S)==n}function _(S){if(typeof S=="number")return S;if(T(S))return r;if(b(S)){var P=typeof S.valueOf=="function"?S.valueOf():S;S=b(P)?P+"":P}if(typeof S!="string")return S===0?S:+S;S=S.replace(t,"");var w=o.test(S);return w||a.test(S)?l(S.slice(2),w?2:8):i.test(S)?r:+S}return hi=y,hi}var yr={exports:{}},Tt={exports:{}},mg=Tt.exports,Qa;function bg(){return Qa||(Qa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof mr<"u"&&mr!==null&&mr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=mr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=mr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(mg)),Tt.exports}var Za;function yg(){if(Za)return yr.exports;Za=1;for(var e=bg(),r=typeof window>"u"?Tr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return yr.exports=function(f){return i.call(r,f)},yr.exports.cancel=function(){o.apply(r,arguments)},yr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},yr.exports}var sn={},el;function xg(){if(el)return sn;el=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var Wt={},tl;function Sg(){if(tl)return Wt;tl=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.noop=e,Wt.intBetween=r,Wt.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 Wt}var rl;function wg(){if(rl)return Je;rl=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.createHorizontalStrength=D,Je.createVerticalStrength=R,Je.createScrollingComponent=N,Je.default=H,Je.defaultVerticalStrength=Je.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(pc()),n=Cp(),t=c(vg()),i=c(yg()),o=c(xg()),a=wh,l=c(Ip()),s=Sg();function c(L){return L&&L.__esModule?L:{default:L}}function u(L){if(L&&L.__esModule)return L;var A={};if(L!=null){for(var G in L)if(Object.prototype.hasOwnProperty.call(L,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(L,G):{};q.get||q.set?Object.defineProperty(A,G,q):A[G]=L[G]}}return A.default=L,A}function f(L){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(L)}function d(){return d=Object.assign||function(L){for(var A=1;A<arguments.length;A++){var G=arguments[A];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(L[q]=G[q])}return L},d.apply(this,arguments)}function p(L,A){if(L==null)return{};var G=h(L,A),q,J;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(L);for(J=0;J<Q.length;J++)q=Q[J],!(A.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(L,q)&&(G[q]=L[q])}return G}function h(L,A){if(L==null)return{};var G={},q=Object.keys(L),J,Q;for(Q=0;Q<q.length;Q++)J=q[Q],!(A.indexOf(J)>=0)&&(G[J]=L[J]);return G}function v(L,A){if(!(L instanceof A))throw new TypeError("Cannot call a class as a function")}function m(L,A){for(var G=0;G<A.length;G++){var q=A[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(L,q.key,q)}}function y(L,A,G){return A&&m(L.prototype,A),L}function b(L,A){return A&&(f(A)==="object"||typeof A=="function")?A:S(L)}function I(L){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},I(L)}function T(L,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(A&&A.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),A&&_(L,A)}function _(L,A){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(L,A)}function S(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}function P(L,A,G){return A in L?Object.defineProperty(L,A,{value:G,enumerable:!0,configurable:!0,writable:!0}):L[A]=G,L}var w=150;function D(L){return function(G,q){var J=G.x,Q=G.w,X=G.y,ee=G.h,V=Math.min(Q/2,L),te=q.x>=J&&q.x<=J+Q,ne=te&&q.y>=X&&q.y<=X+ee;if(ne){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+Q-V)return-(J+Q-q.x-V)/V}return 0}}function R(L){return function(G,q){var J=G.y,Q=G.h,X=G.x,ee=G.w,V=Math.min(Q/2,L),te=q.y>=J&&q.y<=J+Q,ne=te&&q.x>=X&&q.x<=X+ee;if(ne){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+Q-V)return-(J+Q-q.y-V)/V}return 0}}var E=D(w);Je.defaultHorizontalStrength=E;var F=R(w);Je.defaultVerticalStrength=F;function N(L){var A=function(G){T(q,G);function q(J,Q){var X;return v(this,q),X=b(this,I(q).call(this,J,Q)),P(S(S(X)),"updateScrolling",(0,t.default)(function(ee){var V=X.container.getBoundingClientRect(),te=V.left,ne=V.top,W=V.width,O=V.height,k={x:te,y:ne,w:W,h:O},B=(0,s.getCoords)(ee),z=X.props,U=z.horizontalStrength,oe=z.verticalStrength;X.scaleX=U(k,B),X.scaleY=oe(k,B),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(S(S(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var Q=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 Q.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 Q=this.props.dragDropManager,X=Q.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 Q=this,X=0,ee=function V(){var te=Q.scaleX,ne=Q.scaleY,W=Q.container,O=Q.props,k=O.strengthMultiplier,B=O.onScrollChange;if(k===0||te+ne===0){Q.stopScrolling();return}if(X+=1,X%2){var z=W.scrollLeft,U=W.scrollTop,oe=W.scrollWidth,ce=W.scrollHeight,ue=W.clientWidth,he=W.clientHeight,pe=te?W.scrollLeft=(0,s.intBetween)(0,oe-ue,z+te*k):z,Re=ne?W.scrollTop=(0,s.intBetween)(0,ce-he,U+ne*k):U;B(pe,Re)}Q.frame=(0,i.default)(V)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var Q=this.props;Q.strengthMultiplier,Q.verticalStrength,Q.horizontalStrength,Q.onScrollChange;var X=p(Q,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(L,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(A,"displayName","Scrolling(".concat((0,o.default)(L),")")),P(A,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(A,"defaultProps",{onScrollChange:s.noop,verticalStrength:F,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(A,L)}function H(L){var A=N(L);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(A,d({},G,{dragDropManager:J}))})}}return Je}var xn=wg();const Cg=Hn(xn);var Ig=Ch();const nl=Hn(Ig);function $c(){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 Wc(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}}$c.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;Wc.__suppressDeprecationWarning=!0;function Xr(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-B5Z2178w.js","./index-C7egXf_h.js","./index-DGkT7afN.css","./url-join-3aXvW59g.js","./index-AKf23glP.js","./_createAggregator-OKIbDBKF.js","./depsEqual-BaUhqVSn.js","./index-DnZwjPBr.js","./index-DRYJ0xIl.js","./toUpper-B5TzdczN.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bY as Yf,bX as Jf,r as C,bZ as Xf,eT as Qf,j as g,b8 as ot,b$ as nt,c0 as Zf,hD as ep,hE as tp,gA as rp,dt as np,hF as ip,du as op,bM as cc,bN as ap,bK as lp,bL as sp,bP as uc,dx as Wn,hG as cp,eD as up,hr as dp,gX as fp,dE as pp,gU as dc,hH as hp,gE as gp,fp as vp,eE as mp,he as bp,n as Ee,a2 as We,z as je,aH as xe,aP as jt,c3 as Et,i as yp,fa as xp,eO as Sp,hu as wp,dw as Tr,ez as mr,dh as fc,dB as Cp,hI as Ip,dA as pc,bd as Hn,dO as ir,hJ as $,e_ as K,eH as Rp,hK as Jr,be as Z,o as x,dM as Un,aQ as Po,hL as _o,cx as er,aD as ye,M as ie,af as Tp,b as Lt,cs as fe,b9 as ko,dC as tr,T as me,a3 as Oe,b1 as qi,dI as yt,hM as Dp,bn as hc,F as qn,hN as Pp,hO as _p,v as it,fm as Dn,ay as kp,de as Ke,fc as gc,C as vc,bF as Op,hP as Oa,N as Oo,f9 as Ep,H as kt,P as mc,f6 as bc,$ as yc,w as Pn,hQ as xc,f as Ft,dL as Np,bv as Mp,gI as Sc,dJ as Er,a6 as Ap,a7 as Lp,hR as Ea,hS as wc,hT as zp,hU as jp,fQ as Vn,fd as Fp,gb as Bp,gc as $p,gi as Kn,hV as Gp,gN as Wp,hW as _n,hX as Cc,bz as Me,L as Ic,A as Eo,hY as Na,hZ as Rc,h_ as Vi,h$ as Hp,i0 as Up,s as ur,i1 as qp,f5 as Vp,cw as Tc,i2 as Kp,bC as Yp,i3 as Jp,dH as He,D as Xp,V as Qp,B as Zp,cr as eh,i4 as th,a$ as rh,bg as Ma,R as kn,a8 as Aa,i5 as nh,i6 as ih,i7 as oh,i8 as ah,i9 as Dc,ia as lh,aB as Pc,f0 as _c,ib as No,ic as sh,hn as kc,id as ch,b5 as uh,cB as Jt,ie as dh,cQ as fh,ig as ph,G as La,dp as di,eI as za,dN as hh,ih as gh,a4 as Oc,X as ja,ii as Fa,Q as vh,S as Ba}from"./index-C7egXf_h.js";import{r as mh}from"./omit-DVVVCRDp.js";import{r as bh}from"./cloneDeep-Dqj81-8-.js";import{r as yh}from"./index-AKf23glP.js";import{c as xh,u as Sh}from"./_createAggregator-OKIbDBKF.js";import{u as Bt}from"./blocklet-C67aFvl7.js";import{H as wh,G as Ch,M as Ih,N as Rh,O as $a,K as Th,L as Dh}from"./index-rrAKD-3O.js";import{_ as Se,a as we,b as Fe,c as Be,d as $e,e as Ph,f as Ec,u as de,g as re,r as Br,w as On,h as Nc,i as $t,j as Mc,k as _h,l as kh,o as Ki}from"./raf-schd.esm-yET3NUrL.js";import{_ as M,b as Ga,c as Oh,a as Eh,d as Nh}from"./redux-DfszZyTl.js";import{_ as Mh}from"./typeof-QjJsDpFa.js";import{u as Ac,b as Ah}from"./team-CxcPF7A7.js";import{b as Lh}from"./actions-BBls_wa0.js";import{u as zh,a as jh,C as st}from"./index.esm-DkqB0mnE.js";import{S as Yi}from"./simple-select-BZu6cCw3.js";import{b as Fh,a as Wa}from"./html-title-vsl-TT26.js";import{C as Lc}from"./Clear-B-e33dNn.js";import{A as Bh}from"./ArrowDropDown-aNeHE2A2.js";import{a as $h}from"./api-r-_fEWsI.js";import{A as Gh}from"./Autocomplete-Bf1Ho3Hd.js";import{L as Wh}from"./ListItemButton-E5H4lrRx.js";import{u as zc}from"./use-mobile-IHqsUzt1.js";import{e as Dr}from"./client-Dj0WAiOq.js";import{u as Hh}from"./index-CC45e4UO.js";import{d as Uh}from"./KeyboardArrowDown-CdK82Qsb.js";import{S as qh}from"./Search-Dm2dt-Sr.js";import{A as Vh}from"./Add-CQt7mq1G.js";import{O as Kh}from"./OpenInNew-BdVhgoOc.js";import{I as Yh}from"./iframe-Dl-yNrp9.js";import{B as fi}from"./ButtonGroup-9zvLC_k0.js";import{L as Ha}from"./LoadingButton-C7IcO9Nb.js";import"./depsEqual-BaUhqVSn.js";import"./url-evaluation-w8X_lgzG.js";import"./useLocalStorage-DZYDHTFQ.js";import"./MoreVert-bx--E19j.js";import"./get-safe-url-CteWIr5a.js";import"./permission-ycsOOBwp.js";import"./ListSubheader-FJVGwx1O.js";import"./getValidReactChildren-DDB1J2y7.js";function Jh(e){return Yf("MuiListItemAvatar",e)}Jf("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Xh=e=>{const{alignItems:r,classes:n}=e;return Zf({root:["root",r==="flex-start"&&"alignItemsFlexStart"]},Jh,n)},Qh=ot("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.alignItems==="flex-start"&&r.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),Ua=C.forwardRef(function(r,n){const t=Xf({props:r,name:"MuiListItemAvatar"}),{className:i,...o}=t,a=C.useContext(Qf),l={...t,alignItems:a.alignItems},s=Xh(l);return g.jsx(Qh,{className:nt(s.root,i),ownerState:l,ref:n,...o})});var Zh=ep(function(){return tp?sessionStorage:void 0});function eg(e,r){return rp(r,function(n){return e[n]})}function tg(e){return e==null?[]:eg(e,np(e))}var rg=ip.isFinite;function qa(e){return typeof e=="number"&&rg(e)}function ng(e){return typeof e=="number"&&e==op(e)}var ig=xh(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const og=Object.freeze(Object.defineProperty({__proto__:null,default:ig},Symbol.toStringTag,{value:"Module"}));var ag=cc(function(e){var r=ap(e);return r=typeof r=="function"?r:void 0,lp(sp(e,1,uc,!0),void 0,r)});const lg=Object.freeze(Object.defineProperty({__proto__:null,default:ag},Symbol.toStringTag,{value:"Module"}));var jc=cc(function(e,r){return uc(e)?Lh(e,r):[]}),br={};const sg=Wn(lg),cg=Wn(cp),ug=Wn(og);var Va;function dg(){return Va||(Va=1,function(e){var r=br&&br.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ne,e.deepWalk=S,e.isMatchSection=P,e.nestNavigationList=Q,e.filterNavigation=X,e.cleanOrphanNavigation=ee,e.joinLink=F,e.flattenNavigation=N,e.splitNavigationBySection=J;const n=up(),t=r(sg),i=r(dp),o=r(fp),a=r(cg),l=r(pp),s=r(mh),c=r(bh),u=bp(),f=r(yh()),d=r(dc()),p=r(hp),h=r(gp),v=r(ug),m=vp(),y=mp();Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return y.checkLink}});const b="header",I="/",T="/",_="/";function S(W,O=()=>{},{key:k="children",order:B="first"}={}){function z(U,{index:oe=0,parent:ce=null,level:ue=0}={}){Array.isArray(U)?U.forEach((he,pe)=>{z(he,{index:pe,parent:ce,level:ue+1})}):U&&(B==="first"&&O(U,ce,{index:oe,level:ue}),z(U[k],{parent:U,level:ue}),B==="last"&&O(U,ce,{index:oe,level:ue}))}z(W)}function P(W,O){return O===b&&(0,a.default)(W)?!0:Array.isArray(W)?W.includes(O):W===O}function w(W){try{return JSON.parse(W)}catch{return W}}function D(W){return W.map(O=>{const k={...O};return k.role&&(k.role=w(k.role)),k.section&&(k.section=w(k.section)),k.title&&(k.title=w(k.title)),k.description&&(k.description=w(k.description)),k.link&&(k.link=w(k.link)),k})}function R(W="/",O=""){if((0,d.default)(O||""))return O;const k=f.default.join(W,O||T);return k.length>1&&k.endsWith("/")?k.slice(0,k.length-1):k}function E(W,O,{strict:k=!0}={}){let B=W,z=O;return k||(B=B||"/",z=z||"/"),(0,p.default)(B)&&(0,h.default)(z)&&(0,y.checkLink)(z)?Object.keys(B).reduce((U,oe)=>(U[oe]=R(B[oe],z),U),{}):(0,h.default)(B)&&(0,y.checkLink)(B)&&(0,p.default)(z)?Object.keys(z).reduce((U,oe)=>(U[oe]=R(B,z[oe]),U),{}):(0,h.default)(B)&&(0,h.default)(z)?(0,y.checkLink)(B)||(0,y.checkLink)(z)?R(B,z):z:(0,p.default)(B)&&(0,p.default)(z)?[...new Set([...Object.keys(B),...Object.keys(z)])].reduce((oe,ce)=>(oe[ce]=R(B[ce],z[ce]),oe),{}):z}function F(W,O){const k=(0,c.default)(W);return S(k,(B,z)=>{const U=B.component||B.child;if(U){const oe=O.find(ce=>ce.name===U);oe&&(B.link=E(oe.link,B.link,{strict:!1}))}else z&&(B.link=E(z.link,B.link))},{key:"items"}),k}function N(W=[],{depth:O=1,transform:k=B=>B}={}){const B=(0,c.default)(W),z=[];return S(B,(U,oe,{level:ce})=>{if(ce>=O){const{items:ue=[]}=U;if(ue&&Array.isArray(ue)&&ue.length>0){delete U.items;const he=ue.map(pe=>k(pe,U));if(oe)oe.items.push(...he);else{const pe=k((0,s.default)(U,["items"]),oe);z.push(pe,...he)}}else if(ce===1){const he=k((0,s.default)(U,["items"]),oe);z.push(he)}}else ce===1&&z.push(U)},{key:"items",order:"last"}),z}function H(W){if(W.section!=="bottomNavigation")return W;const O={...W};return n.NAVIGATION_I18N_FIELDS.forEach(k=>{const B=O[k];typeof B=="string"&&(O[k]={en:B})}),O}function L(W={}){const O=[];function k(z,U={}){const oe=[],{children:ce=[],meta:ue={}}=z,he=(0,c.default)(ue?.navigation||[]);(0,m.hasStartEngine)(ue)&&z.meta?.capabilities?.navigation!==!1&&oe.push(...he);const pe=U.name||"",Re=U.mountPoint||I,Ye=z===W?"":ue.name||"",Ge=z===W?"":z.mountPoint||I;for(const ae of ce){if(!(0,m.hasStartEngine)(ae.meta))continue;const be=ae.meta.name,at=ae.mountPoint,vr=[pe,Ye,be].filter(Boolean).join("."),ci=ae.meta.navigation||[],ui=(0,u.joinURL)(Re,Ge,at);ae.meta?.capabilities?.navigation!==!1&&O.push({did:ae.meta.did,name:vr,link:ui,title:ae.meta.title||"",navigation:ci.map(Qe=>({section:b,...Qe}))});const lt=he.find(Qe=>Qe.component?Qe.component===be:!1);if(lt){if(!lt.link)if(ae.meta.navigation&&ae.meta.navigation.length>0){const Qe=k(ae,{mountPoint:Ge,name:Ye});Qe.length>0&&(lt.items=lt.items??[],lt.items.push(...Qe))}else lt.link=T}else if(ae.meta?.capabilities?.navigation!==!1){const Qe=k(ae,{mountPoint:Ge,name:Ye}),ln={title:ae.meta.title,component:be,id:ae.meta.did};Qe.length>0?(ln.items=Qe,ln.link=void 0):ln.link=T,oe.push(ln)}}return oe}return{navigationList:k(W),components:O}}function A(W){const O=(0,c.default)(W).filter(k=>k.id);return S(O,(k,B)=>{if(k.items&&k.items.length){for(let z=k.items.length-1;z>=0;z--)k.items[z].id||k.items.splice(z,1);k.items.length===0&&k.component&&(k.link=k.link||T)}B&&(k.parent=B.id,k.id=[B.id,k.id].join(_)),k.from=k.from||"yaml",k.visible=k.visible??!0},{key:"items"}),O}function G(W,O=2){const k=(0,c.default)(W),B=N(k,{depth:O,transform:(z,U)=>(U&&(z._parent||(z._parent=U.id,U.component||(z.link=E(U.link,z.link))),z.section=z.section||U.section||[b],z.visible=z.visible??U.visible,U.role&&(z.role=z.role||U.role)),z.component=[U.component,z.component].filter(Boolean).join("."),z)});return S(B,z=>{z.items&&z.items.length>0&&z.items.reduceRight((U,oe)=>{if(oe._parent){const ce=z.items.findIndex(ue=>ue.id===oe._parent);ce>=0&&z.items.splice(ce,1),delete oe._parent}return null},null)},{key:"items"}),B}function q(W,O){return O&&Array.isArray(W.items)?W.items.filter(k=>(0,a.default)(k.section)?P(W.section,O):!!P(k.section,O)).map(k=>({...k,section:O})):[]}function J(W){const O=(0,c.default)(W),k=[];for(const B of O){let oe=function(ce,ue){const he=q(ce,ue);U.push({...z,section:ue,items:he})};const z=(0,c.default)((0,s.default)(B,["items"])),U=[];if(Array.isArray(B.section))for(const ce of B.section)oe(B,ce);else if(B.section){const{section:ce}=B;oe(B,ce)}else if(B.items&&B.items.length>0){const ce=B.items.reduce((he,pe)=>{const{section:Re=[b]}=pe||{};return he.push(...Re),he},[]),ue=[...new Set(ce)];for(const he of ue)oe(B,he)}else U.push({...B,section:b});k.push(...U)}return k}function Q(W=[]){const O=(0,c.default)(W);return O.reduceRight((k,B,z)=>{if(B.parent){const U=O.find(oe=>B.section&&oe.section?oe.section===B.section&&oe.id===B.parent:oe.id===B.parent);U&&(U.items||(U.items=[]),U.items=[B,...U.items]),O.splice(z,1)}return null},null),O}function X(W,O=[]){const k=Q(W);return S(k,z=>{if(z?.component&&(O.some(U=>U.name===z.component)||(z.visible=!1)),z.items&&z.items.length)for(let U=z.items.length-1;U>=0;U--)z.items[U].visible===!1&&z.items.splice(U,1)},{key:"items"}),k.filter(z=>!(z.visible===!1||z.items&&Array.isArray(z.items)&&z.items.length>0&&z.items?.every(U=>U.visible===!1)))}function ee(W){return W.map(O=>O.items&&Array.isArray(O.items)&&O.items.length===1&&["header","footer","",void 0,null].includes(O.section)?O.items[0]:O)}const V=W=>{const[O,k]=(0,v.default)(W,B=>B.id==="/team");return[...O,...k]};e.sortRootNavigation=V;const te=W=>{const[,O]=(0,v.default)(W,k=>{const B=typeof k.title=="string"?k.title:k.title?.en;return k.id==="/team"&&B==="Access"||k.id==="/dashboard"&&B==="Blocklet"});return O};e.cleanOldNavigationHistory=te;function ne(W={},O={}){const{beforeProcess:k=ae=>ae}=O,{navigationList:B,components:z}=L(W),U=new Map;B.forEach(ae=>{ae.items?.forEach(be=>{U.set((0,u.joinURL)(ae.id,be.id),be)})});const oe=(0,l.default)(W,"settings.org.enabled",!1);W?.settings?.navigations&&(Array.isArray(W.settings.navigations)?W.settings.navigations=[...W.settings.navigations].filter(ae=>!(ae?.parent==="/team"&&ae.from==="team-tmpl")).map(ae=>{if(ae.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ae,"private")){const be=U.get(ae.id);be&&Object.prototype.hasOwnProperty.call(be,"private")&&(ae.private=be.private)}return!oe&&ae.section==="userCenter"&&ae.id==="/userCenter/orgs"?null:ae}).filter(Boolean):W.settings.navigations=[]);const ce=D(te(W?.settings?.navigations||[])).map(H),ue=G(k(B)),he=A(ue),Re=J(he).reduce((ae,be)=>["bottom","social","sessionManager","userCenter"].includes(be.section)&&be.items&&be.items.length>0?(ae.push(...be.items.map(vr=>{const{section:ci}=be,ui=E(be.link,vr.link),lt=[be.component,vr.component].filter(Boolean).join(".");return{...vr,section:ci,link:ui,component:lt,parent:""}})),ae):(ae.push(be),ae),[]),Ye=N(Re,{transform(ae,be){let{component:at}=ae;return be?.component&&(at=[be.component,ae.component].filter(Boolean).join(".")),H({...ae,component:at})}});return{navigationList:(0,t.default)(ce,Ye,(ae,be)=>{const at=["id","section"];return(0,i.default)((0,o.default)(ae,at),(0,o.default)(be,at))}),components:z,builtinList:Ye}}}(br)),br}var _e=dg();const Fc=C.createContext(null),Ka="/",fg="header",Ya={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${xe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:e=>e.settings?.org?.enabled}]};function pi(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const ct=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),pg=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),hg=(e,r)=>{const n=_e.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(pg("/team",e("navigation.blockletService"),[ct("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),ct("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),ct("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),ct("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),ct("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),ct("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),ct("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),ct("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ja({name:e}){return g.jsx(Sp,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function gg({children:e}){const{blocklet:r,actions:n}=Bt(),{t}=Ee(),{navigationList:i,components:o,builtinList:a}=_e.parseNavigation(r,{beforeProcess(S){const P=We(S);return["dashboard","userCenter"].forEach(w=>{Object.prototype.hasOwnProperty.call(Ya,w)&&Ya[w].forEach(D=>{(D.shouldDisplay&&typeof D.shouldDisplay=="function"?D.shouldDisplay:()=>!0)(r)&&!P.some(E=>E.id===D.id)&&P.push(D)})}),hg(t,P)}}),l=jt({rawNavigation:We(i),activeSection:fg,components:o}),s=C.useMemo(()=>_e.nestNavigationList(We(l.rawNavigation)),[l.rawNavigation]),c=C.useMemo(()=>{const S=_e.filterNavigation(We(l.rawNavigation),o);return _e.joinLink(S,o)},[o,l.rawNavigation]),u=C.useCallback(S=>{if(!S.id)return"";const P=_e.flattenNavigation(_e.joinLink(s,o)),w=P.find(D=>D.id===S.id);if(w?.component){if(!o.some(D=>D.name===w.component))return g.jsx(Ja,{name:w.component})}else if(w.parent){const D=P.find(R=>R.id===w.parent);if(D?.component&&!o.some(R=>R.name===D.component))return g.jsx(Ja,{name:D.component})}return w?.link},[s,o]),f=C.useCallback(S=>{l.activeSection=S},[l]),d=C.useCallback(S=>{const P=[];_e.deepWalk(S,(D,R)=>{const E={...Et(D,["children","expand"]),parent:R?.id};P.push(E)});const w=We(l.rawNavigation).filter(D=>{if(!l.activeSection)return!1;const R=P.find(E=>pi(E,D));return R?!_e.isMatchSection(R.section,l.activeSection):!0});l.rawNavigation=[...w,...P]},[l]),p=C.useCallback((S=[])=>{const P=We(l.rawNavigation).map(w=>{const D=S.find(R=>pi({...R,section:l.activeSection},w));return D?{...w,...D}:w});l.rawNavigation=P},[l]),h=C.useCallback((S,P=Ka)=>S.map(D=>{const E=o.find(H=>H.name===D.component)?.link||P,F=D.items||[],{link:N}=D;return{title:D.title,description:D.description,subtitle:u(D),link:N,icon:D.icon,children:h(F,N||Ka),section:D.section,visible:D.visible,parent:D.parent,component:D.component,id:D.id,role:D.role,from:D.from,__base:E}}),[o,u]),v=C.useCallback(S=>{p([S])},[p]),m=C.useCallback(S=>{const P=l.rawNavigation.filter(w=>w.id===S||w.parent===S).map(w=>w.id);l.rawNavigation=We(l.rawNavigation).filter(w=>!P.includes(w.id))},[l]),y=C.useCallback((S={},P=-1)=>{const w={...S,id:yp.nanoid(),section:l.activeSection,visible:!0},D=[...l.rawNavigation],R=D.filter(E=>E.section===l.activeSection);if(P<0||P>R.length-1)D.push(w);else{const E=R[P],F=D.findIndex(N=>pi(N,E));D.splice(F,0,w)}return l.rawNavigation=D,w},[l]),b=C.useCallback(S=>{const w=We(s).filter(D=>_e.isMatchSection(D.section,S));return h(w)},[s,h]),I=C.useCallback(async S=>{const w=S.map(D=>xp(D,wp)).map(D=>{const R={...D};return R.role&&Array.isArray(R.role)&&(R.role=JSON.stringify(R.role)),R.section&&Array.isArray(R.section)&&(R.section=JSON.stringify(R.section)),R.title&&R.title instanceof Object&&(R.title=JSON.stringify(R.title)),R.description&&R.description instanceof Object&&(R.description=JSON.stringify(R.description)),R.link&&R.link instanceof Object&&(R.link=JSON.stringify(R.link)),R});await n.configNavigations(w)},[n]),T=C.useCallback(async S=>{if(S){const P=a.filter(D=>_e.isMatchSection(D.section,S)),w=l.rawNavigation.filter(D=>!_e.isMatchSection(D.section,S));await I(w),l.rawNavigation=[...w,...P]}else await I([]),l.rawNavigation=We(a)},[I,l,a]),_=C.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:u,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:m,addNavigationItem:y,updateNavigationTree:d,getNavigation:b,saveNavigationList:I,resetNavigation:T}),[l,c,o,u,f,v,m,y,d,b,I,T]);return g.jsx(Fc.Provider,{value:_,children:e})}function Bc(){const e=C.useContext(Fc);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var Je={},hi,Xa;function vg(){if(Xa)return hi;Xa=1;var e="Expected a function",r=NaN,n="[object Symbol]",t=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Tr=="object"&&Tr&&Tr.Object===Object&&Tr,c=typeof self=="object"&&self&&self.Object===Object&&self,u=s||c||Function("return this")(),f=Object.prototype,d=f.toString,p=Math.max,h=Math.min,v=function(){return u.Date.now()};function m(S,P,w){var D,R,E,F,N,H,L=0,A=!1,G=!1,q=!0;if(typeof S!="function")throw new TypeError(e);P=_(P)||0,b(w)&&(A=!!w.leading,G="maxWait"in w,E=G?p(_(w.maxWait)||0,P):E,q="trailing"in w?!!w.trailing:q);function J(k){var B=D,z=R;return D=R=void 0,L=k,F=S.apply(z,B),F}function Q(k){return L=k,N=setTimeout(V,P),A?J(k):F}function X(k){var B=k-H,z=k-L,U=P-B;return G?h(U,E-z):U}function ee(k){var B=k-H,z=k-L;return H===void 0||B>=P||B<0||G&&z>=E}function V(){var k=v();if(ee(k))return te(k);N=setTimeout(V,X(k))}function te(k){return N=void 0,q&&D?J(k):(D=R=void 0,F)}function ne(){N!==void 0&&clearTimeout(N),L=0,D=H=R=N=void 0}function W(){return N===void 0?F:te(v())}function O(){var k=v(),B=ee(k);if(D=arguments,R=this,H=k,B){if(N===void 0)return Q(H);if(G)return N=setTimeout(V,P),J(H)}return N===void 0&&(N=setTimeout(V,P)),F}return O.cancel=ne,O.flush=W,O}function y(S,P,w){var D=!0,R=!0;if(typeof S!="function")throw new TypeError(e);return b(w)&&(D="leading"in w?!!w.leading:D,R="trailing"in w?!!w.trailing:R),m(S,P,{leading:D,maxWait:P,trailing:R})}function b(S){var P=typeof S;return!!S&&(P=="object"||P=="function")}function I(S){return!!S&&typeof S=="object"}function T(S){return typeof S=="symbol"||I(S)&&d.call(S)==n}function _(S){if(typeof S=="number")return S;if(T(S))return r;if(b(S)){var P=typeof S.valueOf=="function"?S.valueOf():S;S=b(P)?P+"":P}if(typeof S!="string")return S===0?S:+S;S=S.replace(t,"");var w=o.test(S);return w||a.test(S)?l(S.slice(2),w?2:8):i.test(S)?r:+S}return hi=y,hi}var yr={exports:{}},Tt={exports:{}},mg=Tt.exports,Qa;function bg(){return Qa||(Qa=1,(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?Tt.exports=function(){return performance.now()}:typeof mr<"u"&&mr!==null&&mr.hrtime?(Tt.exports=function(){return(e()-i)/1e6},r=mr.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=mr.uptime()*1e9,i=t-o):Date.now?(Tt.exports=function(){return Date.now()-n},n=Date.now()):(Tt.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(mg)),Tt.exports}var Za;function yg(){if(Za)return yr.exports;Za=1;for(var e=bg(),r=typeof window>"u"?Tr:window,n=["moz","webkit"],t="AnimationFrame",i=r["request"+t],o=r["cancel"+t]||r["cancelRequest"+t],a=0;!i&&a<n.length;a++)i=r[n[a]+"Request"+t],o=r[n[a]+"Cancel"+t]||r[n[a]+"CancelRequest"+t];if(!i||!o){var l=0,s=0,c=[],u=1e3/60;i=function(f){if(c.length===0){var d=e(),p=Math.max(0,u-(d-l));l=p+d,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(m){setTimeout(function(){throw m},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var d=0;d<c.length;d++)c[d].handle===f&&(c[d].cancelled=!0)}}return yr.exports=function(f){return i.call(r,f)},yr.exports.cancel=function(){o.apply(r,arguments)},yr.exports.polyfill=function(f){f||(f=r),f.requestAnimationFrame=i,f.cancelAnimationFrame=o},yr.exports}var sn={},el;function xg(){if(el)return sn;el=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.default=e;function e(r){return r.displayName||r.name||(typeof r=="string"&&r.length>0?r:"Unknown")}return sn}var Wt={},tl;function Sg(){if(tl)return Wt;tl=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.noop=e,Wt.intBetween=r,Wt.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 Wt}var rl;function wg(){if(rl)return Je;rl=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.createHorizontalStrength=D,Je.createVerticalStrength=R,Je.createScrollingComponent=N,Je.default=H,Je.defaultVerticalStrength=Je.defaultHorizontalStrength=void 0;var e=u(fc()),r=c(pc()),n=Cp(),t=c(vg()),i=c(yg()),o=c(xg()),a=wh,l=c(Ip()),s=Sg();function c(L){return L&&L.__esModule?L:{default:L}}function u(L){if(L&&L.__esModule)return L;var A={};if(L!=null){for(var G in L)if(Object.prototype.hasOwnProperty.call(L,G)){var q=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(L,G):{};q.get||q.set?Object.defineProperty(A,G,q):A[G]=L[G]}}return A.default=L,A}function f(L){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(L)}function d(){return d=Object.assign||function(L){for(var A=1;A<arguments.length;A++){var G=arguments[A];for(var q in G)Object.prototype.hasOwnProperty.call(G,q)&&(L[q]=G[q])}return L},d.apply(this,arguments)}function p(L,A){if(L==null)return{};var G=h(L,A),q,J;if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(L);for(J=0;J<Q.length;J++)q=Q[J],!(A.indexOf(q)>=0)&&Object.prototype.propertyIsEnumerable.call(L,q)&&(G[q]=L[q])}return G}function h(L,A){if(L==null)return{};var G={},q=Object.keys(L),J,Q;for(Q=0;Q<q.length;Q++)J=q[Q],!(A.indexOf(J)>=0)&&(G[J]=L[J]);return G}function v(L,A){if(!(L instanceof A))throw new TypeError("Cannot call a class as a function")}function m(L,A){for(var G=0;G<A.length;G++){var q=A[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(L,q.key,q)}}function y(L,A,G){return A&&m(L.prototype,A),L}function b(L,A){return A&&(f(A)==="object"||typeof A=="function")?A:S(L)}function I(L){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(G){return G.__proto__||Object.getPrototypeOf(G)},I(L)}function T(L,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(A&&A.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),A&&_(L,A)}function _(L,A){return _=Object.setPrototypeOf||function(q,J){return q.__proto__=J,q},_(L,A)}function S(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}function P(L,A,G){return A in L?Object.defineProperty(L,A,{value:G,enumerable:!0,configurable:!0,writable:!0}):L[A]=G,L}var w=150;function D(L){return function(G,q){var J=G.x,Q=G.w,X=G.y,ee=G.h,V=Math.min(Q/2,L),te=q.x>=J&&q.x<=J+Q,ne=te&&q.y>=X&&q.y<=X+ee;if(ne){if(q.x<J+V)return(q.x-J-V)/V;if(q.x>J+Q-V)return-(J+Q-q.x-V)/V}return 0}}function R(L){return function(G,q){var J=G.y,Q=G.h,X=G.x,ee=G.w,V=Math.min(Q/2,L),te=q.y>=J&&q.y<=J+Q,ne=te&&q.x>=X&&q.x<=X+ee;if(ne){if(q.y<J+V)return(q.y-J-V)/V;if(q.y>J+Q-V)return-(J+Q-q.y-V)/V}return 0}}var E=D(w);Je.defaultHorizontalStrength=E;var F=R(w);Je.defaultVerticalStrength=F;function N(L){var A=function(G){T(q,G);function q(J,Q){var X;return v(this,q),X=b(this,I(q).call(this,J,Q)),P(S(S(X)),"updateScrolling",(0,t.default)(function(ee){var V=X.container.getBoundingClientRect(),te=V.left,ne=V.top,W=V.width,O=V.height,k={x:te,y:ne,w:W,h:O},B=(0,s.getCoords)(ee),z=X.props,U=z.horizontalStrength,oe=z.verticalStrength;X.scaleX=U(k,B),X.scaleY=oe(k,B),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),P(S(S(X)),"handleEvent",function(ee){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(ee))}),X.wrappedInstance=e.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return y(q,[{key:"componentDidMount",value:function(){var Q=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 Q.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 Q=this.props.dragDropManager,X=Q.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 Q=this,X=0,ee=function V(){var te=Q.scaleX,ne=Q.scaleY,W=Q.container,O=Q.props,k=O.strengthMultiplier,B=O.onScrollChange;if(k===0||te+ne===0){Q.stopScrolling();return}if(X+=1,X%2){var z=W.scrollLeft,U=W.scrollTop,oe=W.scrollWidth,ce=W.scrollHeight,ue=W.clientWidth,he=W.clientHeight,pe=te?W.scrollLeft=(0,s.intBetween)(0,oe-ue,z+te*k):z,Re=ne?W.scrollTop=(0,s.intBetween)(0,ce-he,U+ne*k):U;B(pe,Re)}Q.frame=(0,i.default)(V)};ee()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(i.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var Q=this.props;Q.strengthMultiplier,Q.verticalStrength,Q.horizontalStrength,Q.onScrollChange;var X=p(Q,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return e.default.createElement(L,d({ref:this.wrappedInstance},X))}}]),q}(e.Component);return P(A,"displayName","Scrolling(".concat((0,o.default)(L),")")),P(A,"propTypes",{dragDropManager:r.default.object.isRequired,onScrollChange:r.default.func,verticalStrength:r.default.func,horizontalStrength:r.default.func,strengthMultiplier:r.default.number}),P(A,"defaultProps",{onScrollChange:s.noop,verticalStrength:F,horizontalStrength:E,strengthMultiplier:30}),(0,l.default)(A,L)}function H(L){var A=N(L);return function(G){return e.default.createElement(a.DragDropContextConsumer,null,function(q){var J=q.dragDropManager;return J===void 0?null:e.default.createElement(A,d({},G,{dragDropManager:J}))})}}return Je}var xn=wg();const Cg=Hn(xn);var Ig=Ch();const nl=Hn(Ig);function $c(){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 Wc(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}}$c.__suppressDeprecationWarning=!0;Gc.__suppressDeprecationWarning=!0;Wc.__suppressDeprecationWarning=!0;function Xr(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 Wu=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rn=Object.freeze({...Wu,...Mn}),so=Object.freeze({...rn,body:"",hidden:!1}),sy=Object.freeze({width:null,height:null}),Hu=Object.freeze({...sy,...Mn});function cy(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 uy=/[\s,]+/;function dy(e,r){r.split(uy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Uu={...Hu,preserveAspectRatio:""};function ns(e){const r={...Uu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=cy(n("rotate","")),dy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function fy(e,r){for(const n in Uu)if(e[n]!==r[n])return!0;return!1}const Lr=/^[a-z0-9]+(-[a-z0-9]+)*$/,nn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Cn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Cn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Cn(l,n)?null:l}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(Lr))&&(r&&e.prefix===""||e.prefix.match(Lr))&&e.name.match(Lr)):!1;function py(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 is(e,r){const n=py(e,r);for(const t in so)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 hy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function gy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=is(t[l]||i[l],o)}return a(r),n.forEach(a),is(e,o)}function qu(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=hy(e);for(const i in t){const o=t[i];o&&(r(i,gy(e,i,o)),n.push(i))}return n}const vy={provider:"",aliases:{},not_found:{},...Wu};function Oi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Vu(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,vy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Lr)||typeof o.body!="string"||!Oi(o,so))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Lr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,so))return null}return r}const An=Object.create(null);function my(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=my(e,r))}function Xo(e,r){return Vu(r)?qu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function by(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function yy(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 l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let Wr=!1;function Ku(e){return typeof e=="boolean"&&(Wr=e),Wr}function Hr(e){const r=typeof e=="string"?nn(e,!0,Wr):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Yu(e,r){const n=nn(e,!0,Wr);if(!n)return!1;const t=St(n.provider,n.prefix);return by(t,n.name,r)}function os(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Wr&&!r&&!e.prefix){let i=!1;return Vu(e)&&(e.prefix="",qu(e,(o,a)=>{a&&Yu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Xo(t,e)}function xy(e){return!!Hr(e)}function Sy(e){const r=Hr(e);return r?{...rn,...r}:null}function wy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Ju(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Cy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Ju([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Iy=0;function Ry(e,r,n){const t=Iy++,i=Ju.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 as(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Ty(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?nn(i,r,n):i;o&&t.push(o)}),t}var Dy={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Py(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 S=e.resources.slice(0);for(a=[];S.length>1;){const P=Math.floor(Math.random()*S.length);a.push(S[P]),S=S.slice(0,P).concat(S.slice(P+1))}a=a.concat(S)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){s==="pending"&&(s="aborted"),h(),d.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),d=[]}function m(S,P){P&&(p=[]),typeof S=="function"&&p.push(S)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(S=>{S(void 0,u)})}function I(){d.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),d=[]}function T(S,P,w){const D=P!=="success";switch(d=d.filter(R=>R!==S),s){case"pending":break;case"failed":if(D||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=w,b();return}if(D){u=w,d.length||(a.length?_():b());return}if(h(),I(),!e.random){const R=e.resources.indexOf(S.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(w)})}function _(){if(s!=="pending")return;h();const S=a.shift();if(S===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(I(),b())},e.timeout);return}b();return}const P={status:"pending",resource:S,callback:(w,D)=>{T(P,w,D)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(S,r,P.callback)}return setTimeout(_),y}function Xu(e){const r={...Dy,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Py(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ei=Object.create(null),Sr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;Sr.length>0;)Sr.length===1||Math.random()>.5?In.push(Sr.shift()):In.push(Sr.pop());ei[""]=Qo({resources:["https://api.iconify.design"].concat(In)});function ls(e,r){const n=Qo(r);return n===null?!1:(ei[e]=n,!0)}function ti(e){return ei[e]}function _y(){return Object.keys(ei)}function ss(){}const Ei=Object.create(null);function ky(e){if(!Ei[e]){const r=ti(e);if(!r)return;const n=Xu(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Qu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),ss;i=o.send;const a=ky(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Xu(o);const a=e.resources?e.resources[0]:"",l=uo(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ss):t.query(r,i,n)().abort}const cs="iconify2",Ur="iconify",Zu=Ur+"-count",us=Ur+"-version",ed=36e5,Oy=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Zo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ds(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Zo(e,Zu,r.toString())}function ho(e){return parseInt(fo(e,Zu))||0}const At={local:!0,session:!0},td={local:new Set,session:new Set};let ea=!1;function Ey(e){ea=e}let fn=typeof window>"u"?{}:window;function rd(e){const r=e+"Storage";try{if(fn&&fn[r]&&typeof fn[r].length=="number")return fn[r]}catch{}At[e]=!1}function nd(e,r){const n=rd(e);if(!n)return;const t=fo(n,us);if(t!==cs){if(t){const l=ho(n);for(let s=0;s<l;s++)ds(n,Ur+s.toString())}Zo(n,us,cs),po(n,0);return}const i=Math.floor(Date.now()/ed)-Oy,o=l=>{const s=Ur+l.toString(),c=fo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}ds(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,po(n,a)):td[e].add(l))}function id(){if(!ea){Ey(!0);for(const e in At)nd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Xo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ny(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)nd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function My(e,r){ea||id();function n(t){let i;if(!At[t]||!(i=rd(t)))return;const o=td[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const l={cached:Math.floor(Date.now()/ed),provider:e.provider,data:r};return Zo(i,Ur+a.toString(),JSON.stringify(l))}r.lastModified&&!Ny(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function fs(){}function Ay(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Cy(e)}))}function Ly(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(l=>{Qu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Xo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),My(e,s)}catch(c){console.error(c)}Ay(e)})})}))}const ta=(e,r)=>{const n=Ty(e,!0,Ku()),t=wy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,fs)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=St(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ly(s,i[c][u])}),r?Ry(r,t,o):fs},zy=e=>new Promise((r,n)=>{const t=typeof e=="string"?nn(e,!0):e;if(!t){n(e);return}ta([t||e],i=>{if(i.length&&t){const o=Hr(t);if(o){r({...rn,...o});return}}n(e)})});function jy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function Fy(e,r){const n=typeof e=="string"?nn(e,!0,!0):null;if(!n){const o=jy(e);return{value:e,data:o}}const t=Hr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ta([n],()=>r(e,n,Hr(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let od=!1;try{od=navigator.vendor.indexOf("Apple")===0}catch{}function By(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(od||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const $y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[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($y);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const Wy=e=>e==="unset"||e==="undefined"||e==="none";function ad(e,r){const n={...rn,...e},t={...Hu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=go(f,s/c)):(u=a==="auto"?s:a,f=l===null?go(u,c/s):l==="auto"?c:l);const d={},p=(h,v)=>{Wy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Hy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Hy();function Uy(e){Ln=e}function qy(){return Ln}function Vy(e,r){const n=ti(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 Ky(e){return e===404}const Yy=(e,r,n)=>{const t=[],i=Vy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Jy(e){if(typeof e=="string"){const r=ti(e);if(r)return r.path}return"/"}const Xy=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Jy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Ky(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)})},Qy={prepare:Yy,send:Xy};function ps(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Mi="data-style";let ld="";function Zy(e){ld=e}function hs(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}"+ld}function sd(){as("",Qy),Ku(!0);let e;try{e=window}catch{}if(e){if(id(),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"||!os(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;ls(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>ps(n,!0),disableCache:n=>ps(n,!1),iconExists:xy,getIcon:Sy,listIcons:yy,addIcon:Yu,addCollection:os,calculateSize:go,buildIcon:ad,loadIcons:ta,loadIcon:zy,addAPIProvider:ls,appendCustomStyle:Zy,_api:{getAPIConfig:ti,setAPIModule:as,sendAPIQuery:Qu,setFetch:Uy,getFetch:qy,listAPIProviders:_y}}}function cd(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function ex(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tx(e){return"data:image/svg+xml,"+ex(e)}function rx(e){return'url("'+tx(e)+'")'}const vo={"background-color":"currentColor"},ud={"background-color":"transparent"},gs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},vs={"-webkit-mask":vo,mask:vo,background:ud};for(const e in vs){const r=vs[e];for(const n in gs)r[e+"-"+n]=gs[n]}function ms(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function nx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=cd(i,{...o,width:r.width+"",height:r.height+""}),l=rx(a),s=t.style,c={"--svg":l,width:ms(o.width),height:ms(o.height),...n?vo:ud};for(const u in c)s.setProperty(u,c[u]);return t}let zr;function ix(){try{zr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{zr=null}}function ox(e){return zr===void 0&&ix(),zr?zr.createHTML(e):e}function ax(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=cd(e.body,n);return r.innerHTML=ox(i),r.firstChild}function bs(e,r){const n=r.icon.data,t=r.customisations,i=ad(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ax(i);break;default:a=nx(i,{...rn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function ys(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function lx(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ni(this);hs(l,s),this._state=ys({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ni(this),c=this._state;s!==c.inline&&(c.inline=s,hs(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ni(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}bs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=ns(this);(l.attrMode!==c||fy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=Fy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=ys(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,ns(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=By(l.data.body,c),f=this._state.inline;bs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=sd();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const sx=lx()||sd(),{enableCache:ST,disableCache:wT,iconExists:CT,getIcon:IT,listIcons:RT,addIcon:TT,addCollection:DT,calculateSize:PT,buildIcon:_T,loadIcons:kT,loadIcon:OT,addAPIProvider:ET,_api:NT}=sx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),dd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ra=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ra(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),fd=e=>/^https?:\/\//.test(e),pd=e=>/^mailto:/i.test(e.trim()),cx=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)},hd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>cx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},ux=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const 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 Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=C.useState(!1),[l,s]=C.useState(!0);if(Po(async()=>{s(!0);try{await _o(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),fd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const dx=e=>e.from!=="team-tmpl";function fx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function gd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Bt(),t=n.environments.find(a=>a.key===Lt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=fe(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return tr(a)&&(s=a[r]),!C.isValidElement(l)&&tr(l)&&(c=l[r]),g.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(ko(i(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:i(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}gd.propTypes={treeNode:x.object.isRequired};const px=ot(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function vd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(px,{children:g.jsx(Th,{backend:Dh,...i,children:g.jsx(rm,{generateNodeProps:o=>{const a=dx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(ie,{sx:{width:16,height:16}}),title:g.jsx(gd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:fx,theme:ly})})})}vd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var hx=dc();const gx=Hn(hx),pn="en";function md({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=pn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=C.useRef(),[c,u]=C.useState(null),f=jt({localeList:[],inputLocale:"",localeError:""}),d=C.useMemo(()=>!!c,[c]),p=C.useMemo(()=>i.includes(t)?t:pn,[i,t]),h=C.useMemo(()=>Object.keys(Et(o,[...f.localeList,pn])).map(S=>({title:o[S],value:S})),[f.localeList]),v=C.useMemo(()=>`Default (${o[pn]||Object.values(o)?.[0]})`,[o]);C.useEffect(()=>{f.localeList=[...i]},[i,f]),Sh("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(S){return S?S==="en"||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(S=""){const P=S?.trim(),w=m(P);return w!==!0?f.localeError=w:f.localeError="",w}function b(){const S=f.inputLocale?.trim();y(S)===!0&&(I(),f.localeList.push(S),r(S))}function I(){u(null),f.inputLocale="",f.localeError=""}function T(S,P){S.preventDefault(),S.stopPropagation(),f.localeList=jc(f.localeList,P),a(P)}function _(S){const{value:P}=S.target;y(P),f.inputLocale=P}return g.jsxs(g.Fragment,{children:[g.jsxs(Fh,{sx:e,value:p,onChange:(S,P)=>{n(P)},children:[g.jsx(Wa,{label:v,value:"en"}),f.localeList.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[o[S],g.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:P=>{T(P,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{u(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:d,anchorEl:c,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(ie,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(ie,{sx:{mt:1},children:g.jsx(Yi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:h,onChange:_,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}md.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,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 bd(e,r,n=5e3){for(const t of na){const i=je(t,e);try{return await $h.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 vx({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 bd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function mx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await bd("/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 bx(e){return je(na[0],`${e}.svg`)}function yx(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 xx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=yx(e))),{isIconId:r,iconId:n}}const Sx=C.lazy(()=>Op(()=>import("./index-DkJyV264.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}))),xs=Ke(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function yd({icon:e,...r}){const[n,t]=C.useState(!1);return Po(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}yd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=hc(),{blocklet:u}=Bt(),f=qn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===Lt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:y,locale:b}=Ee(),{isIconId:I,iconId:T}=xx(e),[_,S]=C.useState(null),{onChange:P,onBlur:w,sx:D,...R}=a,E=i.includes("upload"),F=i.includes("select"),N=je(s,"/api/media/upload",u.appPid),H=jt({showPopover:!1}),L=fe(ee=>{if(ee?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(ee,V).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),A=fe(async ee=>await h.current.getUploader().uploadFile(ee)),G=fe(()=>{S(null)}),q=fe(()=>{F&&S(m.current)}),J=fe(async ee=>{try{if(o==="url"){const V=bx(ee),te=await Pp(V,{width:128,height:128}),ne=await _p(te,ee);await A(ne)}else P?.(ee)}catch(V){console.error("Failed to pick icon:",V)}G()}),Q=fe(ee=>{ee.stopPropagation(),v.current.open(),G()}),X=fe(ee=>{a?.onChange?.(ee.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...D},onClick:F?q:void 0,...R,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(xs,{size:28,icon:L(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),P("")},children:g.jsx(Lc,{style:{fontSize:18}})}),E&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:Q,children:g.jsx(yd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),F&&g.jsx(ie,{component:Bh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),F&&g.jsx(qi,{open:!!_,anchorEl:_,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(xd,{label:n,placeholder:t,value:I?T:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:N,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(xs,{size:120,icon:L(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 xd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=C.useState([]),[c,u]=C.useState(!0),[f,d]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),y=C.useRef(1),b=C.useRef(!0),{t:I}=Ee(),T=96,_=fe(()=>{!b.current||c||(u(!0),setTimeout(()=>{const w=y.current+1,D=(w-1)*T,R=w*T,E=m.current.slice(D,R);s(F=>[...F,...E]),y.current=w,b.current=R<m.current.length,u(!1)},300))}),S=fe(w=>{m.current=w,y.current=1,b.current=w.length>T;const D=w.slice(0,T);s(D),h(w.length===0),b.current&&_()}),{run:P}=gc(async w=>{if(w){u(!0);try{const{icons:D}=await vx({keyword:w});S(D)}catch(D){console.error("Failed to search icons:",D),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const w=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:F}=v.current;(R+F>=E-150||E<=F)&&_()},D=v.current;return D&&(D.addEventListener("scroll",w),w()),()=>{D&&D.removeEventListener("scroll",w)}},[_,c]),Po(async()=>{if(f)P(f);else{u(!0);try{const w=await mx("mdi-light");S(w)}catch(w){console.error("Failed to fetch default icons:",w),h(!0)}finally{u(!1)}}},[f,P,S]),g.jsxs(wx,{ref:v,sx:t,...a,children:[g.jsxs(ie,{className:"icon-picker-input",children:[g.jsx(it,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:w=>d(w.target.value),slotProps:{input:{endAdornment:g.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Lc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:I("common.cancel")})]}),g.jsxs(ie,{children:[l.length>0&&g.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(w=>g.jsx(Cx,{$active:n===w,onClick:()=>{i(w)},children:g.jsx(ye,{icon:w,width:"32",height:"32"})},w))}),p&&g.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(vc,{size:20})})]})]})}xd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const wx=Ke(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Cx=Ke(Oe,{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(C.Suspense,{children:g.jsx(Sx,{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 Ss=24,ws=48,Cs="add",Ue="en",Is={title:{[Ue]:""},description:{[Ue]:""},link:{[Ue]:""}};function Rs(e){return jc(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(r=>tr(e[r])?Object.keys(e[r]):[]))),Ue)}x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ac(),{t:l,locale:s}=Ee(),{blocklet:c}=Bt(),u=C.useMemo(()=>{const O=c.environments.find(B=>B.key==="BLOCKLET_APP_LANGUAGES");return(O?O.value.split(","):["en","zh"]).filter(B=>Lt.SUPPORTED_LANGUAGES[B]).reduce((B,z)=>(B[z]=Lt.SUPPORTED_LANGUAGES[z].nativeName,B),{})},[c.environments]),f=C.useRef(()=>{}),d=jt({isRoot:!0,type:Cs,linkDisabled:!1,locale:Ue,formState:We(Is),get localeList(){return Rs(d.formState)}}),{handleSubmit:p,control:h,reset:v,setValue:m,clearErrors:y,formState:{errors:b}}=zh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(O=>m(O,d.formState[O][d.locale]))},[m,d.locale]);const I=jh({control:h}),T=I.component,_=I.title,S=I.description,P=I.link,w=I.parent;C.useEffect(()=>{d.formState.title[d.locale]=_},[_]),C.useEffect(()=>{d.formState.description[d.locale]=S},[S]),C.useEffect(()=>{d.formState.link[d.locale]=P},[P]),C.useEffect(()=>{i?.(I)},[I,i]);const D=C.useMemo(()=>t.find(k=>T?n.find(z=>z.name===T).did===k.id:k.id===w),[n,t,T,w]),R=C.useMemo(()=>{if(D?.component){const O=n.find(U=>U.name===D.component),{link:k}=O||{},B=tr(k)?k[d.locale]:k;if(T)return Oa(B);const z=tr(D.link)?D.link[d.locale]:D.link;return Oa(je(B,z||"/"))}return null},[n,d.locale,D,T]),E=C.useMemo(()=>{const{component:O}=D||{},k=n.find(U=>U.name===O),{navigation:B=[]}=k||{};return _e.flattenNavigation(B,{transform(U,oe){return oe?.section&&(U.section=U.section||oe.section),U}}).filter(U=>U.link).filter(U=>_e.isMatchSection(U.section,r)).map(U=>({label:U.link,title:U.title[s]||U.title}))},[D,n,r,s]),F=C.useCallback(()=>{d.isRoot=!0,d.locale=Ue,d.type=Cs,d.linkDisabled=!1,d.formState=We(Is),v(),y(),f.current=()=>{}},[y,v,d]),N=C.useCallback((O={})=>(d.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(k=>{tg(d.formState[k]).length>1&&(O[k]=d.formState[k])}),Oo(O.role)&&(O.role=void 0),O),[d.localeList,d.formState]),H=C.useCallback(({parent:O}={},k=()=>{})=>{d.type="add",d.isRoot=!O,m("parent",O?.id),f.current=B=>{k(B)}},[m,d]),L=C.useCallback((O={},k=()=>{})=>{const{id:B,icon:z,parent:U,component:oe,role:ce=[]}=O;m("id",B),m("icon",z),O.from==="team-tmpl"&&(d.linkDisabled=!0);const ue=Rs(O),he=(pe,Re)=>{bc(pe)?d.formState[Re]=ue.reduce((Ye,Ge)=>(Ye[Ge]=pe,Ye),{[Ue]:pe}):tr(pe)?d.formState[Re]=We(pe):d.formState[Re]={}};xe.NAVIGATION_I18N_FIELDS.forEach(pe=>he(O[pe],pe)),xe.NAVIGATION_I18N_FIELDS.forEach(pe=>m(pe,d.formState[pe][d.locale])),m("component",oe),m("parent",U),m("role",ce||[]),d.type="edit",d.isRoot=!U,f.current=pe=>{const Re=Ep(pe,["id","title","description","icon","component","link","role"]);k(Re)}},[m,d]);function A(O){const k=O?.trim();if(r!=="bottomNavigation"){if(!k)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(k.length>Ss)return l("navigation.form.titleTooLong",{len:Ss})}return!0}function G(O){const k=O?.trim();return k&&k.length>ws?l("navigation.form.descriptionTooLong",{len:ws}):!0}const q=fe(O=>O?.startsWith("/")?new URL(O,window.location.origin).href:O);async function J(O){const k=O?.trim();if(k){if(ko(q(k)))return!0;try{await _o(k)}catch{return l("navigation.form.invalidIcon")}}return!0}function Q(O){const k=O?.trim();return k?J(k):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(O){const k=O?.trim();return k?_e.checkLink(k)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=C.useCallback(O=>{d.locale=O,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k][O]||(d.formState[k][O]="")}),setTimeout(()=>{y()})},[y,d]),V=C.useCallback(()=>{const{title:O,link:k}=d.formState;if(r!=="bottomNavigation")for(const B of Object.keys(O)){const z=A(O[B]);if(z!==!0)return z}for(const B of Object.keys(k)){const z=X(k[B]);if(z!==!0)return z}return!0},[r,d.formState]),te=C.useCallback(O=>{const k=V();k===!0?f.current(N(O)):kt.error(k)},[V,N]),ne=C.useCallback(O=>{d.locale=Ue,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k]=Et(d.formState[k],O)}),i?.(I)},[d,I,i]),W=C.useCallback(O=>{d.locale=O,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k][O]=d.formState[k][Ue]}),i?.(I),setTimeout(()=>{y()})},[y,d,I,i]);return C.useImperativeHandle(e,()=>({add:H,edit:L,resetImmediate:()=>F(),reset:()=>setTimeout(()=>F(),0),submit:p(te)}),[H,F,L,p,te]),g.jsxs(ie,{...o,children:[g.jsx(md,{sx:{mb:1},onAdd:W,onChange:ee,onRemoveLocale:ne,locale:d.locale,localeMap:u,locales:d.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(st,{name:"title",control:h,rules:{validate:A},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...O})}),r==="bottomNavigation"?g.jsx(st,{name:"icon",control:h,rules:{validate:Q},render:({field:O})=>g.jsx(mo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==Ue,methods:["select"],iconifyShape:"url",...O})}):g.jsx(st,{name:"icon",control:h,rules:{validate:J},render:({field:O})=>g.jsx(mo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==Ue,...O})}),d.isRoot&&g.jsx(st,{name:"component",control:h,render:({field:O})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:d.locale!==Ue&&O.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(k=>({title:k.title,value:k.name,description:k.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Et(O,"ref")})}),!d.isRoot&&["header"].includes(r)&&g.jsx(st,{name:"description",control:h,rules:{validate:G},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...O})}),g.jsx(st,{name:"link",control:h,rules:{validate:X},render:({field:O})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Gh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:k=>k.label,options:E,renderInput:k=>g.jsx(it,{...k,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?g.jsx(Dn,{position:"start",sx:{textDecoration:gx(P||"")?"line-through":""},children:R}):null}}}),renderOption:(k,B)=>g.jsxs(ie,{component:"li",...k,children:[B.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:B.title})]}),margin:"dense",...O,onChange:()=>{},onInputChange:(k,B)=>{O.onChange(B)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(st,{name:"role",control:h,render:({field:O})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(k=>({title:k.title,value:k.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Et(O,"ref")})}),r==="bottomNavigation"&&g.jsx(st,{name:"title",control:h,rules:{validate:A},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...O})})]})]})}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}=Ee(),[o,{setTrue:a,setFalse:l}]=Ah(),[s,c]=C.useState("add"),u=C.useRef(null),f=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=C.useCallback(()=>{l(),u.current?.reset()},[l]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(yc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Pn,{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 Sd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=C.useCallback(v=>{u(v),r(o)},[r,o]),d=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Oe,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Sd.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||"/",Ix=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},Rx=(e,r="en")=>{if(typeof e=="string"){if(fd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(pd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},nr=(e,r="en",n="header")=>{if(!e?.length)return e;const t=(i,o)=>i&&typeof i=="object"?i[o]||i?.en||i?.zh:i;return Gt(e,i=>({...i,title:t(i.title,r),description:t(i.description,r),link:xc(i.items?.length?i.link:Rx(i.link,r),n),_rawLink:i.link}),"items")},Tx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Dx=e=>{if(!e?.length)return null;const r=Tx(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=Ix(r.theme),r.navigation=Dx(Px(r.navigation)),r},Px=(e=[])=>ra(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),wd=(e,r)=>ra(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"),_x={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"/>'},kx={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 Ox({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=Ft(),c=C.useRef(null),u=jt({open:!1}),f=fe((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:g.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Oe,{size:"medium",ref:c,children:g.jsx(ye,{icon:_x,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(Sc,{...p,timeout:350,children:g.jsxs(Er,{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:l.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(Wh,{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(ie,{component:"img",src:`${wc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||kx,color:s.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(Pn,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const Cd=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])}))}))}),Id=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}),Ex=["admin","owner"],Nx=e=>e.endsWith(".ip.abtnet.io"),Mx=e=>e.endsWith(".did.abtnet.io"),Ax={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:"配置域名"}},Lx=1e3*60*60*24*30,Ts=".well-known/service/admin/domains";function Rd({locale:e="en",session:r={}}){const n=r?.user,t=zc(),[i,o]=C.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Lx}),a=fe((d,p={})=>Vn(Ax,d,e,"en",p)),l=C.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const d=je(window.location.origin,Ts);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ex.includes(n.role);return window.location.href.includes(Ts)||t||!Nx(l)&&!Mx(l)?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(ie,{component:"ul",children:s.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs($p,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),f&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Rd.propTypes={locale:x.string,session:x.object};const Ot={};function zx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=je(r,wc,e);return new Gp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function jx(e="admin"){return Ot[e]||(Ot[e]=zx(e)),Ot[e]}const Fx=(e="admin")=>{const r=C.use(Kn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=jx(e),Ot[e].connect()),Ot[e]},Bx={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>'},$x={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"/>'},Gx={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 Wx(){const e=Ft();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Hx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Ux=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},qx=async(e,r)=>{try{return await Dr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Vx=async(e,r)=>{const{type:n,did:t}=e;return Cc.isSameAddr(n,"did")?await qx(t,r)||_n.getLink(e):_n.getLink(e)},Kx=async(e,r,n=!0)=>{const t=_n.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof _n.Link){if(n){const o=await Vx(i,r),{type:a,chainId:l,did:s}=i;return Cc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Yx=e=>Wp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Jx={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 Yt({user:e,color:r=void 0}){const{palette:n}=Ft(),t=Eo(je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Ic,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Yt.displayName="UserLink";function Xx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Ft(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=fe(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Yt,{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(Yt,{user:m[0],color:c})," and ",g.jsx(Yt,{user:y,color:c})]});const b=f.length>3,I=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((T,_)=>g.jsxs(Z.Fragment,{children:[g.jsx(Yt,{user:T,color:c}),_<I.length-1?", ":""]},T.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Yt,{user:y,color:c})]})]})}),p=fe(()=>{const m=a?Jx[a]:null;return m?m(s,r.length):null}),h=Me(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),v=Me(()=>{if(!e)return null;const m=Ux(e);return m?.targetLink?je(i,m.targetLink):null},[e,i]);return!a||Oo(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Ic,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Qx={normal:Na,success:Bx,info:Na,warning:$x,error:Gx},Zx=ur(Vp)`
|
|
43
|
+
*/const Wu=Object.freeze({left:0,top:0,width:16,height:16}),Mn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rn=Object.freeze({...Wu,...Mn}),so=Object.freeze({...rn,body:"",hidden:!1}),sy=Object.freeze({width:null,height:null}),Hu=Object.freeze({...sy,...Mn});function cy(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 uy=/[\s,]+/;function dy(e,r){r.split(uy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Uu={...Hu,preserveAspectRatio:""};function ns(e){const r={...Uu},n=(t,i)=>e.getAttribute(t)||i;return r.width=n("width",null),r.height=n("height",null),r.rotate=cy(n("rotate","")),dy(r,n("flip","")),r.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),r}function fy(e,r){for(const n in Uu)if(e[n]!==r[n])return!0;return!1}const Lr=/^[a-z0-9]+(-[a-z0-9]+)*$/,nn=(e,r,n,t="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;t=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const l=i.pop(),s=i.pop(),c={provider:i.length>0?i[0]:t,prefix:s,name:l};return r&&!Cn(c)?null:c}const o=i[0],a=o.split("-");if(a.length>1){const l={provider:t,prefix:a.shift(),name:a.join("-")};return r&&!Cn(l)?null:l}if(n&&t===""){const l={provider:t,prefix:"",name:o};return r&&!Cn(l,n)?null:l}return null},Cn=(e,r)=>e?!!((e.provider===""||e.provider.match(Lr))&&(r&&e.prefix===""||e.prefix.match(Lr))&&e.name.match(Lr)):!1;function py(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 is(e,r){const n=py(e,r);for(const t in so)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 hy(e,r){const n=e.icons,t=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const l=t[a]&&t[a].parent,s=l&&o(l);s&&(i[a]=[l].concat(s))}return i[a]}return Object.keys(n).concat(Object.keys(t)).forEach(o),i}function gy(e,r,n){const t=e.icons,i=e.aliases||Object.create(null);let o={};function a(l){o=is(t[l]||i[l],o)}return a(r),n.forEach(a),is(e,o)}function qu(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=hy(e);for(const i in t){const o=t[i];o&&(r(i,gy(e,i,o)),n.push(i))}return n}const vy={provider:"",aliases:{},not_found:{},...Wu};function Oi(e,r){for(const n in r)if(n in e&&typeof e[n]!=typeof r[n])return!1;return!0}function Vu(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,vy))return null;const n=r.icons;for(const i in n){const o=n[i];if(!i.match(Lr)||typeof o.body!="string"||!Oi(o,so))return null}const t=r.aliases||Object.create(null);for(const i in t){const o=t[i],a=o.parent;if(!i.match(Lr)||typeof a!="string"||!n[a]&&!t[a]||!Oi(o,so))return null}return r}const An=Object.create(null);function my(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function St(e,r){const n=An[e]||(An[e]=Object.create(null));return n[r]||(n[r]=my(e,r))}function Xo(e,r){return Vu(r)?qu(r,(n,t)=>{t?e.icons[n]=t:e.missing.add(n)}):[]}function by(e,r,n){try{if(typeof n.body=="string")return e.icons[r]={...n},!0}catch{}return!1}function yy(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 l=St(i,a);n=n.concat(Object.keys(l.icons).map(s=>(i!==""?"@"+i+":":"")+a+":"+s))})}),n}let Wr=!1;function Ku(e){return typeof e=="boolean"&&(Wr=e),Wr}function Hr(e){const r=typeof e=="string"?nn(e,!0,Wr):e;if(r){const n=St(r.provider,r.prefix),t=r.name;return n.icons[t]||(n.missing.has(t)?null:void 0)}}function Yu(e,r){const n=nn(e,!0,Wr);if(!n)return!1;const t=St(n.provider,n.prefix);return by(t,n.name,r)}function os(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),Wr&&!r&&!e.prefix){let i=!1;return Vu(e)&&(e.prefix="",qu(e,(o,a)=>{a&&Yu(o,a)&&(i=!0)})),i}const n=e.prefix;if(!Cn({provider:r,prefix:n,name:"a"}))return!1;const t=St(r,n);return!!Xo(t,e)}function xy(e){return!!Hr(e)}function Sy(e){const r=Hr(e);return r?{...rn,...r}:null}function wy(e){const r={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let t={provider:"",prefix:"",name:""};return e.forEach(i=>{if(t.name===i.name&&t.prefix===i.prefix&&t.provider===i.provider)return;t=i;const o=i.provider,a=i.prefix,l=i.name,s=n[o]||(n[o]=Object.create(null)),c=s[a]||(s[a]=St(o,a));let u;l in c.icons?u=r.loaded:a===""||c.missing.has(l)?u=r.missing:u=r.pending;const f={provider:o,prefix:a,name:l};u.push(f)}),r}function Ju(e,r){e.forEach(n=>{const t=n.loaderCallbacks;t&&(n.loaderCallbacks=t.filter(i=>i.id!==r))})}function Cy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let n=!1;const t=e.provider,i=e.prefix;r.forEach(o=>{const a=o.icons,l=a.pending.length;a.pending=a.pending.filter(s=>{if(s.prefix!==i)return!0;const c=s.name;if(e.icons[c])a.loaded.push({provider:t,prefix:i,name:c});else if(e.missing.has(c))a.missing.push({provider:t,prefix:i,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Ju([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let Iy=0;function Ry(e,r,n){const t=Iy++,i=Ju.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 as(e,r){co[e]=r}function uo(e){return co[e]||co[""]}function Ty(e,r=!0,n=!1){const t=[];return e.forEach(i=>{const o=typeof i=="string"?nn(i,r,n):i;o&&t.push(o)}),t}var Dy={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Py(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 S=e.resources.slice(0);for(a=[];S.length>1;){const P=Math.floor(Math.random()*S.length);a.push(S[P]),S=S.slice(0,P).concat(S.slice(P+1))}a=a.concat(S)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const l=Date.now();let s="pending",c=0,u,f=null,d=[],p=[];typeof t=="function"&&p.push(t);function h(){f&&(clearTimeout(f),f=null)}function v(){s==="pending"&&(s="aborted"),h(),d.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),d=[]}function m(S,P){P&&(p=[]),typeof S=="function"&&p.push(S)}function y(){return{startTime:l,payload:r,status:s,queriesSent:c,queriesPending:d.length,subscribe:m,abort:v}}function b(){s="failed",p.forEach(S=>{S(void 0,u)})}function I(){d.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),d=[]}function T(S,P,w){const D=P!=="success";switch(d=d.filter(R=>R!==S),s){case"pending":break;case"failed":if(D||!e.dataAfterTimeout)return;break;default:return}if(P==="abort"){u=w,b();return}if(D){u=w,d.length||(a.length?_():b());return}if(h(),I(),!e.random){const R=e.resources.indexOf(S.resource);R!==-1&&R!==e.index&&(e.index=R)}s="completed",p.forEach(R=>{R(w)})}function _(){if(s!=="pending")return;h();const S=a.shift();if(S===void 0){if(d.length){f=setTimeout(()=>{h(),s==="pending"&&(I(),b())},e.timeout);return}b();return}const P={status:"pending",resource:S,callback:(w,D)=>{T(P,w,D)}};d.push(P),c++,f=setTimeout(_,e.rotate),n(S,r,P.callback)}return setTimeout(_),y}function Xu(e){const r={...Dy,...e};let n=[];function t(){n=n.filter(l=>l().status==="pending")}function i(l,s,c){const u=Py(r,l,s,(f,d)=>{t(),c&&c(f,d)});return n.push(u),u}function o(l){return n.find(s=>l(s))||null}return{query:i,find:o,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:t}}function Qo(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ei=Object.create(null),Sr=["https://api.simplesvg.com","https://api.unisvg.com"],In=[];for(;Sr.length>0;)Sr.length===1||Math.random()>.5?In.push(Sr.shift()):In.push(Sr.pop());ei[""]=Qo({resources:["https://api.iconify.design"].concat(In)});function ls(e,r){const n=Qo(r);return n===null?!1:(ei[e]=n,!0)}function ti(e){return ei[e]}function _y(){return Object.keys(ei)}function ss(){}const Ei=Object.create(null);function ky(e){if(!Ei[e]){const r=ti(e);if(!r)return;const n=Xu(r),t={config:r,redundancy:n};Ei[e]=t}return Ei[e]}function Qu(e,r,n){let t,i;if(typeof e=="string"){const o=uo(e);if(!o)return n(void 0,424),ss;i=o.send;const a=ky(e);a&&(t=a.redundancy)}else{const o=Qo(e);if(o){t=Xu(o);const a=e.resources?e.resources[0]:"",l=uo(a);l&&(i=l.send)}}return!t||!i?(n(void 0,424),ss):t.query(r,i,n)().abort}const cs="iconify2",Ur="iconify",Zu=Ur+"-count",us=Ur+"-version",ed=36e5,Oy=168;function fo(e,r){try{return e.getItem(r)}catch{}}function Zo(e,r,n){try{return e.setItem(r,n),!0}catch{}}function ds(e,r){try{e.removeItem(r)}catch{}}function po(e,r){return Zo(e,Zu,r.toString())}function ho(e){return parseInt(fo(e,Zu))||0}const At={local:!0,session:!0},td={local:new Set,session:new Set};let ea=!1;function Ey(e){ea=e}let fn=typeof window>"u"?{}:window;function rd(e){const r=e+"Storage";try{if(fn&&fn[r]&&typeof fn[r].length=="number")return fn[r]}catch{}At[e]=!1}function nd(e,r){const n=rd(e);if(!n)return;const t=fo(n,us);if(t!==cs){if(t){const l=ho(n);for(let s=0;s<l;s++)ds(n,Ur+s.toString())}Zo(n,us,cs),po(n,0);return}const i=Math.floor(Date.now()/ed)-Oy,o=l=>{const s=Ur+l.toString(),c=fo(n,s);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>i&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&r(u,l))return!0}catch{}ds(n,s)}};let a=ho(n);for(let l=a-1;l>=0;l--)o(l)||(l===a-1?(a--,po(n,a)):td[e].add(l))}function id(){if(!ea){Ey(!0);for(const e in At)nd(e,r=>{const n=r.data,t=r.provider,i=n.prefix,o=St(t,i);if(!Xo(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function Ny(e,r){const n=e.lastModifiedCached;if(n&&n>=r)return n===r;if(e.lastModifiedCached=r,n)for(const t in At)nd(t,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===r});return!0}function My(e,r){ea||id();function n(t){let i;if(!At[t]||!(i=rd(t)))return;const o=td[t];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=ho(i),!po(i,a+1))return;const l={cached:Math.floor(Date.now()/ed),provider:e.provider,data:r};return Zo(i,Ur+a.toString(),JSON.stringify(l))}r.lastModified&&!Ny(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),n("local")||n("session"))}function fs(){}function Ay(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Cy(e)}))}function Ly(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(l=>{Qu(n,l,s=>{if(typeof s!="object")l.icons.forEach(c=>{e.missing.add(c)});else try{const c=Xo(e,s);if(!c.length)return;const u=e.pendingIcons;u&&c.forEach(f=>{u.delete(f)}),My(e,s)}catch(c){console.error(c)}Ay(e)})})}))}const ta=(e,r)=>{const n=Ty(e,!0,Ku()),t=wy(n);if(!t.pending.length){let s=!0;return r&&setTimeout(()=>{s&&r(t.loaded,t.missing,t.pending,fs)}),()=>{s=!1}}const i=Object.create(null),o=[];let a,l;return t.pending.forEach(s=>{const{provider:c,prefix:u}=s;if(u===l&&c===a)return;a=c,l=u,o.push(St(c,u));const f=i[c]||(i[c]=Object.create(null));f[u]||(f[u]=[])}),t.pending.forEach(s=>{const{provider:c,prefix:u,name:f}=s,d=St(c,u),p=d.pendingIcons||(d.pendingIcons=new Set);p.has(f)||(p.add(f),i[c][u].push(f))}),o.forEach(s=>{const{provider:c,prefix:u}=s;i[c][u].length&&Ly(s,i[c][u])}),r?Ry(r,t,o):fs},zy=e=>new Promise((r,n)=>{const t=typeof e=="string"?nn(e,!0):e;if(!t){n(e);return}ta([t||e],i=>{if(i.length&&t){const o=Hr(t);if(o){r({...rn,...o});return}}n(e)})});function jy(e){try{const r=typeof e=="string"?JSON.parse(e):e;if(typeof r.body=="string")return{...r}}catch{}}function Fy(e,r){const n=typeof e=="string"?nn(e,!0,!0):null;if(!n){const o=jy(e);return{value:e,data:o}}const t=Hr(n);if(t!==void 0||!n.prefix)return{value:e,name:n,data:t};const i=ta([n],()=>r(e,n,Hr(n)));return{value:e,name:n,loading:i}}function Ni(e){return e.hasAttribute("inline")}let od=!1;try{od=navigator.vendor.indexOf("Apple")===0}catch{}function By(e,r){switch(r){case"svg":case"bg":case"mask":return r}return r!=="style"&&(od||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const $y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Gy=/^-?[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($y);if(t===null||!t.length)return e;const i=[];let o=t.shift(),a=Gy.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?i.push(o):i.push(Math.ceil(l*r*n)/n)}else i.push(o);if(o=t.shift(),o===void 0)return i.join("");a=!a}}const Wy=e=>e==="unset"||e==="undefined"||e==="none";function ad(e,r){const n={...rn,...e},t={...Hu,...r},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,t].forEach(h=>{const v=[],m=h.hFlip,y=h.vFlip;let b=h.rotate;m?y?b+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):y&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=i.height/2+i.top,v.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:I=i.width/2+i.left,v.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(i.left!==i.top&&(I=i.left,i.left=i.top,i.top=I),i.width!==i.height&&(I=i.width,i.width=i.height,i.height=I)),v.length&&(o='<g transform="'+v.join(" ")+'">'+o+"</g>")});const a=t.width,l=t.height,s=i.width,c=i.height;let u,f;a===null?(f=l===null?"1em":l==="auto"?c:l,u=go(f,s/c)):(u=a==="auto"?s:a,f=l===null?go(u,c/s):l==="auto"?c:l);const d={},p=(h,v)=>{Wy(v)||(d[h]=v.toString())};return p("width",u),p("height",f),d.viewBox=i.left.toString()+" "+i.top.toString()+" "+s.toString()+" "+c.toString(),{attributes:d,body:o}}const Hy=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ln=Hy();function Uy(e){Ln=e}function qy(){return Ln}function Vy(e,r){const n=ti(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 Ky(e){return e===404}const Yy=(e,r,n)=>{const t=[],i=Vy(e,r),o="icons";let a={type:o,provider:e,prefix:r,icons:[]},l=0;return n.forEach((s,c)=>{l+=s.length+1,l>=i&&c>0&&(t.push(a),a={type:o,provider:e,prefix:r,icons:[]},l=s.length),a.icons.push(s)}),t.push(a),t};function Jy(e){if(typeof e=="string"){const r=ti(e);if(r)return r.path}return"/"}const Xy=(e,r,n)=>{if(!Ln){n("abort",424);return}let t=Jy(r.provider);switch(r.type){case"icons":{const o=r.prefix,l=r.icons.join(","),s=new URLSearchParams({icons:l});t+=o+".json?"+s.toString();break}case"custom":{const o=r.uri;t+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;Ln(e+t).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(Ky(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)})},Qy={prepare:Yy,send:Xy};function ps(e,r){switch(e){case"local":case"session":At[e]=r;break;case"all":for(const n in At)At[n]=r;break}}const Mi="data-style";let ld="";function Zy(e){ld=e}function hs(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}"+ld}function sd(){as("",Qy),Ku(!0);let e;try{e=window}catch{}if(e){if(id(),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"||!os(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;ls(t,o)||console.error(i)}catch{console.error(i)}}}}return{enableCache:n=>ps(n,!0),disableCache:n=>ps(n,!1),iconExists:xy,getIcon:Sy,listIcons:yy,addIcon:Yu,addCollection:os,calculateSize:go,buildIcon:ad,loadIcons:ta,loadIcon:zy,addAPIProvider:ls,appendCustomStyle:Zy,_api:{getAPIConfig:ti,setAPIModule:as,sendAPIQuery:Qu,setFetch:Uy,getFetch:qy,listAPIProviders:_y}}}function cd(e,r){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in r)n+=" "+t+'="'+r[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function ex(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function tx(e){return"data:image/svg+xml,"+ex(e)}function rx(e){return'url("'+tx(e)+'")'}const vo={"background-color":"currentColor"},ud={"background-color":"transparent"},gs={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},vs={"-webkit-mask":vo,mask:vo,background:ud};for(const e in vs){const r=vs[e];for(const n in gs)r[e+"-"+n]=gs[n]}function ms(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function nx(e,r,n){const t=document.createElement("span");let i=e.body;i.indexOf("<a")!==-1&&(i+="<!-- "+Date.now()+" -->");const o=e.attributes,a=cd(i,{...o,width:r.width+"",height:r.height+""}),l=rx(a),s=t.style,c={"--svg":l,width:ms(o.width),height:ms(o.height),...n?vo:ud};for(const u in c)s.setProperty(u,c[u]);return t}let zr;function ix(){try{zr=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{zr=null}}function ox(e){return zr===void 0&&ix(),zr?zr.createHTML(e):e}function ax(e){const r=document.createElement("span"),n=e.attributes;let t="";n.width||(t="width: inherit;"),n.height||(t+="height: inherit;"),t&&(n.style=t);const i=cd(e.body,n);return r.innerHTML=ox(i),r.firstChild}function bs(e,r){const n=r.icon.data,t=r.customisations,i=ad(n,t);t.preserveAspectRatio&&(i.attributes.preserveAspectRatio=t.preserveAspectRatio);const o=r.renderedMode;let a;switch(o){case"svg":a=ax(i);break;default:a=nx(i,{...rn,...n},o==="mask")}const l=Array.from(e.childNodes).find(s=>{const c=s.tagName&&s.tagName.toUpperCase();return c==="SPAN"||c==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):e.replaceChild(a,l):e.appendChild(a)}function ys(e,r,n){const t=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:r,icon:e,lastRender:t}}function lx(e="iconify-icon"){let r,n;try{r=window.customElements,n=window.HTMLElement}catch{return}if(!r||!n)return;const t=r.get(e);if(t)return t;const i=["icon","mode","inline","width","height","rotate","flip"],o=class extends n{_shadowRoot;_state;_checkQueued=!1;constructor(){super();const l=this._shadowRoot=this.attachShadow({mode:"open"}),s=Ni(this);hs(l,s),this._state=ys({value:""},s),this._queueCheck()}static get observedAttributes(){return i.slice(0)}attributeChangedCallback(l){if(l==="inline"){const s=Ni(this),c=this._state;s!==c.inline&&(c.inline=s,hs(this._shadowRoot,s))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Ni(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const s=this._shadowRoot;if(l.renderedMode==="svg")try{s.lastChild.setCurrentTime(0);return}catch{}bs(s,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,s=this.getAttribute("icon");if(s!==l.icon.value){this._iconChanged(s);return}if(!l.rendered)return;const c=this.getAttribute("mode"),u=ns(this);(l.attrMode!==c||fy(l.customisations,u))&&this._renderIcon(l.icon,u,c)}_iconChanged(l){const s=Fy(l,(c,u,f)=>{const d=this._state;if(d.rendered||this.getAttribute("icon")!==c)return;const p={value:c,name:u,data:f};p.data?this._gotIconData(p):d.icon=p});s.data?this._gotIconData(s):this._state=ys(s,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,ns(this),this.getAttribute("mode"))}_renderIcon(l,s,c){const u=By(l.data.body,c),f=this._state.inline;bs(this._shadowRoot,this._state={rendered:!0,icon:l,inline:f,customisations:s,attrMode:c,renderedMode:u})}};i.forEach(l=>{l in o.prototype||Object.defineProperty(o.prototype,l,{get:function(){return this.getAttribute(l)},set:function(s){s!==null?this.setAttribute(l,s):this.removeAttribute(l)}})});const a=sd();for(const l in a)o[l]=o.prototype[l]=a[l];return r.define(e,o),o}const sx=lx()||sd(),{enableCache:ST,disableCache:wT,iconExists:CT,getIcon:IT,listIcons:RT,addIcon:TT,addCollection:DT,calculateSize:PT,buildIcon:_T,loadIcons:kT,loadIcon:OT,addAPIProvider:ET,_api:NT}=sx,Gt=(e,r,n="children")=>e.map(t=>Array.isArray(t[n])?r({...t,[n]:Gt(t[n],r,n)}):r(t)),dd=(e,r="children")=>{const n=[];return Gt(e,t=>n.push(t),r),n},ra=(e,r,n="children")=>e.map(t=>({...t})).filter(t=>{const i=t[n];if(Array.isArray(i)){const a=ra(i,r,n);t[n]=a?.length?a:void 0}const o={filteredChildren:t[n],isLeaf:!i?.length};return r(t,o)}),fd=e=>/^https?:\/\//.test(e),pd=e=>/^mailto:/i.test(e.trim()),cx=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)},hd=(e=[])=>{const r=e.map((n,t)=>({path:n,index:t})).filter(n=>cx(n.path));return r?.length?r.slice(1).reduce((n,t)=>n.path.length>=t.path.length?n:t,r[0]).index:-1},ux=(e,r={})=>{const{columns:n=1,breakInside:t=!1,groupHeight:i=48,itemHeight:o=24,childrenKey:a="items"}=r,l=e.reduce((h,v)=>h+i+(v[a]?.length||0)*o,0),s=Math.ceil(l/n),c=[[]];let u=0,f=0;const d=s*.2,p=h=>f>s-d&&u<n-1&&f+h>s+d;return e.forEach(h=>{const 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 Ze({icon:e,size:r=void 0,sx:n={},...t}){const i=[...Array.isArray(n)?n:[n]];r&&i.push({width:r,height:r});const[o,a]=C.useState(!1),[l,s]=C.useState(!0);if(Po(async()=>{s(!0);try{await _o(e),a(!0)}catch{a(!1)}s(!1)},[e]),t.variant||i.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),fd(e))return g.jsx(er,{component:"span",...t,src:e,sx:i});const c=r?.6*r+4:0;return l?g.jsx(ye,{icon:"codicon:blank",height:c||void 0}):o?g.jsx(er,{component:"span",...t,sx:i,children:g.jsx(ye,{icon:e,height:c||void 0})}):e&&typeof e=="string"?(i.push({"&.MuiAvatar-root":{display:"inline-flex",...r&&{fontSize:r-2}}}),g.jsx(er,{component:"span",...t,sx:i,children:Array.from(e)[0]})):null}const dx=e=>e.from!=="team-tmpl";function fx({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&Tp(e.slice(0,t-1),r.slice(0,i-1)))}function gd({treeNode:e}){const{locale:r}=Ee(),{blocklet:n}=Bt(),t=n.environments.find(a=>a.key===Lt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=fe(a=>{if(a?.startsWith("/"))try{return new URL(a,t?.value).href}catch{console.error("Failed to parse url",{url:a,origin:t?.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return tr(a)&&(s=a[r]),!C.isValidElement(l)&&tr(l)&&(c=l[r]),g.jsxs(ie,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(me,{variant:"subtitle1",sx:{fontSize:16},children:s}),l&&g.jsx(me,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:c})]})}return g.jsxs(g.Fragment,{children:[e.icon&&(ko(i(e.icon))?g.jsx(Ze,{size:16,style:{marginRight:4},icon:i(e.icon)}):g.jsx(ye,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}gd.propTypes={treeNode:x.object.isRequired};const px=ot(ie)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function vd({treeData:e,setTreeData:r=()=>{},renderActions:n=()=>{}}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),g.jsx(px,{children:g.jsx(Th,{backend:Dh,...i,children:g.jsx(rm,{generateNodeProps:o=>{const a=dx(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?g.jsx(ye,{icon:"ic:round-drag-indicator"}):g.jsx(ie,{sx:{width:16,height:16}}),title:g.jsx(gd,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:fx,theme:ly})})})}vd.propTypes={treeData:x.object.isRequired,setTreeData:x.func,renderActions:x.func};var hx=dc();const gx=Hn(hx),pn="en";function md({sx:e=null,onAdd:r=()=>{},onChange:n=()=>{},locale:t=pn,locales:i=[],localeMap:o={},onRemoveLocale:a=()=>{}}){const{t:l}=Ee(),s=C.useRef(),[c,u]=C.useState(null),f=jt({localeList:[],inputLocale:"",localeError:""}),d=C.useMemo(()=>!!c,[c]),p=C.useMemo(()=>i.includes(t)?t:pn,[i,t]),h=C.useMemo(()=>Object.keys(Et(o,[...f.localeList,pn])).map(S=>({title:o[S],value:S})),[f.localeList]),v=C.useMemo(()=>`Default (${o[pn]||Object.values(o)?.[0]})`,[o]);C.useEffect(()=>{f.localeList=[...i]},[i,f]),Sh("enter",()=>{setTimeout(()=>{b()})},{target:s});function m(S){return S?S==="en"||f.localeList.includes(S)?l("navigation.form.localeExists",{value:S}):!0:l("common.requiredErrorText",{name:"Locale"})}function y(S=""){const P=S?.trim(),w=m(P);return w!==!0?f.localeError=w:f.localeError="",w}function b(){const S=f.inputLocale?.trim();y(S)===!0&&(I(),f.localeList.push(S),r(S))}function I(){u(null),f.inputLocale="",f.localeError=""}function T(S,P){S.preventDefault(),S.stopPropagation(),f.localeList=jc(f.localeList,P),a(P)}function _(S){const{value:P}=S.target;y(P),f.inputLocale=P}return g.jsxs(g.Fragment,{children:[g.jsxs(Fh,{sx:e,value:p,onChange:(S,P)=>{n(P)},children:[g.jsx(Wa,{label:v,value:"en"}),f.localeList.map(S=>g.jsx(Wa,{sx:{position:"relative"},label:g.jsxs(g.Fragment,{children:[o[S],g.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:P=>{T(P,S)},children:g.jsx(ye,{icon:"mdi:close",height:14})})]}),value:S},S)),g.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:S=>{u(S.currentTarget)},children:g.jsx(ye,{icon:"mdi:plus"})})]}),g.jsx(qi,{open:d,anchorEl:c,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsxs(ie,{sx:{p:2,width:"270px"},children:[g.jsx(me,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),g.jsx(ie,{sx:{mt:1},children:g.jsx(Yi,{required:!0,fullWidth:!0,label:"Locale",value:f.inputLocale,options:h,onChange:_,error:!!f.localeError,helperText:f.localeError||" "})}),g.jsx(ie,{sx:{display:"flex",justifyContent:"flex-end"},children:g.jsx(yt,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}md.propTypes={sx:x.any,onAdd:x.func,onChange:x.func,onRemoveLocale:x.func,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 bd(e,r,n=5e3){for(const t of na){const i=je(t,e);try{return await $h.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 vx({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 bd("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const hn=new Map;async function mx(e){if(hn.has(e))return hn.get(e);const r=(async()=>{const{data:n}=await bd("/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 bx(e){return je(na[0],`${e}.svg`)}function yx(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 xx(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):ko(e)&&(n=yx(e))),{isIconId:r,iconId:n}}const Sx=C.lazy(()=>Op(()=>import("./index-B5Z2178w.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}))),xs=Ke(Ze)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function yd({icon:e,...r}){const[n,t]=C.useState(!1);return Po(async()=>{t(!1),await _o(e),t(!0)},[e]),e?n?g.jsx(ye,{icon:e,...r}):g.jsx(ye,{color:"#f06f6e",icon:"ic:baseline-error",...r}):g.jsx(ye,{icon:"material-symbols-light:select-rounded",...r})}yd.propTypes={icon:x.string.isRequired};function mo({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=hc(),{blocklet:u}=Bt(),f=qn(ee=>ee.breakpoints.down("md")),d=u.environments.find(ee=>ee.key===Lt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=C.useRef(null),v=C.useRef(null),m=C.useRef(null),{t:y,locale:b}=Ee(),{isIconId:I,iconId:T}=xx(e),[_,S]=C.useState(null),{onChange:P,onBlur:w,sx:D,...R}=a,E=i.includes("upload"),F=i.includes("select"),N=je(s,"/api/media/upload",u.appPid),H=jt({showPopover:!1}),L=fe(ee=>{if(ee?.startsWith("/"))try{const V=c?window.location.origin:d?.value;return new URL(ee,V).href}catch{console.error("Failed to resolve url: ",ee)}return ee},[d?.value,c]),A=fe(async ee=>await h.current.getUploader().uploadFile(ee)),G=fe(()=>{S(null)}),q=fe(()=>{F&&S(m.current)}),J=fe(async ee=>{try{if(o==="url"){const V=bx(ee),te=await Pp(V,{width:128,height:128}),ne=await _p(te,ee);await A(ne)}else P?.(ee)}catch(V){console.error("Failed to pick icon:",V)}G()}),Q=fe(ee=>{ee.stopPropagation(),v.current.open(),G()}),X=fe(ee=>{a?.onChange?.(ee.data.url)});return g.jsxs(g.Fragment,{children:[g.jsx(it,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...D},onClick:F?q:void 0,...R,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(xs,{size:28,icon:L(e),alt:"Error"})}),endAdornment:g.jsxs(Dn,{position:"end",children:[g.jsx(Oe,{sx:{visibility:e?"visible":"hidden"},onClick:ee=>{ee.stopPropagation(),P("")},children:g.jsx(Lc,{style:{fontSize:18}})}),E&&g.jsx(kp,{title:y("common.upload"),children:g.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:Q,children:g.jsx(yd,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),F&&g.jsx(ie,{component:Bh,sx:{mr:"-6px",fontSize:24,transform:_?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),F&&g.jsx(qi,{open:!!_,anchorEl:_,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(xd,{label:n,placeholder:t,value:I?T:"",sx:{width:m.current?.offsetWidth??"auto"},onPick:J,onClose:G})}),g.jsx(bo,{ref:h,locale:b,apiPath:N,headers:p,imageEditorProps:{},onUploadFinish:X}),g.jsx(bo,{ref:v,locale:b,apiPath:N,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(xs,{size:120,icon:L(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 xd({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=C.useState([]),[c,u]=C.useState(!0),[f,d]=C.useState(n),[p,h]=C.useState(!1),v=C.useRef(null),m=C.useRef([]),y=C.useRef(1),b=C.useRef(!0),{t:I}=Ee(),T=96,_=fe(()=>{!b.current||c||(u(!0),setTimeout(()=>{const w=y.current+1,D=(w-1)*T,R=w*T,E=m.current.slice(D,R);s(F=>[...F,...E]),y.current=w,b.current=R<m.current.length,u(!1)},300))}),S=fe(w=>{m.current=w,y.current=1,b.current=w.length>T;const D=w.slice(0,T);s(D),h(w.length===0),b.current&&_()}),{run:P}=gc(async w=>{if(w){u(!0);try{const{icons:D}=await vx({keyword:w});S(D)}catch(D){console.error("Failed to search icons:",D),h(!0)}finally{u(!1)}}},{wait:300,trailing:!0});return C.useEffect(()=>{const w=()=>{if(!v.current)return;const{scrollTop:R,scrollHeight:E,clientHeight:F}=v.current;(R+F>=E-150||E<=F)&&_()},D=v.current;return D&&(D.addEventListener("scroll",w),w()),()=>{D&&D.removeEventListener("scroll",w)}},[_,c]),Po(async()=>{if(f)P(f);else{u(!0);try{const w=await mx("mdi-light");S(w)}catch(w){console.error("Failed to fetch default icons:",w),h(!0)}finally{u(!1)}}},[f,P,S]),g.jsxs(wx,{ref:v,sx:t,...a,children:[g.jsxs(ie,{className:"icon-picker-input",children:[g.jsx(it,{label:I("navigation.form.searchIcons"),placeholder:I("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:w=>d(w.target.value),slotProps:{input:{endAdornment:g.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>d(""),children:g.jsx(Lc,{style:{fontSize:18}})})}}}),g.jsx(yt,{onClick:o,children:I("common.cancel")})]}),g.jsxs(ie,{children:[l.length>0&&g.jsx(ie,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(w=>g.jsx(Cx,{$active:n===w,onClick:()=>{i(w)},children:g.jsx(ye,{icon:w,width:"32",height:"32"})},w))}),p&&g.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:g.jsx(ie,{sx:{textAlign:"center"},children:"No matching results"})}),c&&g.jsx(ie,{sx:{p:2,display:"flex",justifyContent:"center"},children:g.jsx(vc,{size:20})})]})]})}xd.propTypes={label:x.any,placeholder:x.any,value:x.string,sx:x.object,onPick:x.func.isRequired,onClose:x.func.isRequired};const wx=Ke(ie)(({theme:e})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[e.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:e.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),paddingLeft:e.spacing(2),paddingRight:e.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:e.spacing(1),top:0,zIndex:1,backgroundColor:e.palette.background.paper}})),Cx=Ke(Oe,{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(C.Suspense,{children:g.jsx(Sx,{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 Ss=24,ws=48,Cs="add",Ue="en",Is={title:{[Ue]:""},description:{[Ue]:""},link:{[Ue]:""}};function Rs(e){return jc(Array.from(new Set(xe.NAVIGATION_I18N_FIELDS.flatMap(r=>tr(e[r])?Object.keys(e[r]):[]))),Ue)}x.string.isRequired;function ia({ref:e=null,section:r="",components:n=[],rawNavigations:t=[],onChange:i=()=>{},...o}){const{roles:a}=Ac(),{t:l,locale:s}=Ee(),{blocklet:c}=Bt(),u=C.useMemo(()=>{const O=c.environments.find(B=>B.key==="BLOCKLET_APP_LANGUAGES");return(O?O.value.split(","):["en","zh"]).filter(B=>Lt.SUPPORTED_LANGUAGES[B]).reduce((B,z)=>(B[z]=Lt.SUPPORTED_LANGUAGES[z].nativeName,B),{})},[c.environments]),f=C.useRef(()=>{}),d=jt({isRoot:!0,type:Cs,linkDisabled:!1,locale:Ue,formState:We(Is),get localeList(){return Rs(d.formState)}}),{handleSubmit:p,control:h,reset:v,setValue:m,clearErrors:y,formState:{errors:b}}=zh({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});C.useEffect(()=>{xe.NAVIGATION_I18N_FIELDS.forEach(O=>m(O,d.formState[O][d.locale]))},[m,d.locale]);const I=jh({control:h}),T=I.component,_=I.title,S=I.description,P=I.link,w=I.parent;C.useEffect(()=>{d.formState.title[d.locale]=_},[_]),C.useEffect(()=>{d.formState.description[d.locale]=S},[S]),C.useEffect(()=>{d.formState.link[d.locale]=P},[P]),C.useEffect(()=>{i?.(I)},[I,i]);const D=C.useMemo(()=>t.find(k=>T?n.find(z=>z.name===T).did===k.id:k.id===w),[n,t,T,w]),R=C.useMemo(()=>{if(D?.component){const O=n.find(U=>U.name===D.component),{link:k}=O||{},B=tr(k)?k[d.locale]:k;if(T)return Oa(B);const z=tr(D.link)?D.link[d.locale]:D.link;return Oa(je(B,z||"/"))}return null},[n,d.locale,D,T]),E=C.useMemo(()=>{const{component:O}=D||{},k=n.find(U=>U.name===O),{navigation:B=[]}=k||{};return _e.flattenNavigation(B,{transform(U,oe){return oe?.section&&(U.section=U.section||oe.section),U}}).filter(U=>U.link).filter(U=>_e.isMatchSection(U.section,r)).map(U=>({label:U.link,title:U.title[s]||U.title}))},[D,n,r,s]),F=C.useCallback(()=>{d.isRoot=!0,d.locale=Ue,d.type=Cs,d.linkDisabled=!1,d.formState=We(Is),v(),y(),f.current=()=>{}},[y,v,d]),N=C.useCallback((O={})=>(d.localeList.length>0&&xe.NAVIGATION_I18N_FIELDS.forEach(k=>{tg(d.formState[k]).length>1&&(O[k]=d.formState[k])}),Oo(O.role)&&(O.role=void 0),O),[d.localeList,d.formState]),H=C.useCallback(({parent:O}={},k=()=>{})=>{d.type="add",d.isRoot=!O,m("parent",O?.id),f.current=B=>{k(B)}},[m,d]),L=C.useCallback((O={},k=()=>{})=>{const{id:B,icon:z,parent:U,component:oe,role:ce=[]}=O;m("id",B),m("icon",z),O.from==="team-tmpl"&&(d.linkDisabled=!0);const ue=Rs(O),he=(pe,Re)=>{bc(pe)?d.formState[Re]=ue.reduce((Ye,Ge)=>(Ye[Ge]=pe,Ye),{[Ue]:pe}):tr(pe)?d.formState[Re]=We(pe):d.formState[Re]={}};xe.NAVIGATION_I18N_FIELDS.forEach(pe=>he(O[pe],pe)),xe.NAVIGATION_I18N_FIELDS.forEach(pe=>m(pe,d.formState[pe][d.locale])),m("component",oe),m("parent",U),m("role",ce||[]),d.type="edit",d.isRoot=!U,f.current=pe=>{const Re=Ep(pe,["id","title","description","icon","component","link","role"]);k(Re)}},[m,d]);function A(O){const k=O?.trim();if(r!=="bottomNavigation"){if(!k)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(k.length>Ss)return l("navigation.form.titleTooLong",{len:Ss})}return!0}function G(O){const k=O?.trim();return k&&k.length>ws?l("navigation.form.descriptionTooLong",{len:ws}):!0}const q=fe(O=>O?.startsWith("/")?new URL(O,window.location.origin).href:O);async function J(O){const k=O?.trim();if(k){if(ko(q(k)))return!0;try{await _o(k)}catch{return l("navigation.form.invalidIcon")}}return!0}function Q(O){const k=O?.trim();return k?J(k):l("common.requiredErrorText",{name:l("navigation.form.icon")})}function X(O){const k=O?.trim();return k?_e.checkLink(k)?!0:l("navigation.form.invalidLink"):d.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}const ee=C.useCallback(O=>{d.locale=O,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k][O]||(d.formState[k][O]="")}),setTimeout(()=>{y()})},[y,d]),V=C.useCallback(()=>{const{title:O,link:k}=d.formState;if(r!=="bottomNavigation")for(const B of Object.keys(O)){const z=A(O[B]);if(z!==!0)return z}for(const B of Object.keys(k)){const z=X(k[B]);if(z!==!0)return z}return!0},[r,d.formState]),te=C.useCallback(O=>{const k=V();k===!0?f.current(N(O)):kt.error(k)},[V,N]),ne=C.useCallback(O=>{d.locale=Ue,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k]=Et(d.formState[k],O)}),i?.(I)},[d,I,i]),W=C.useCallback(O=>{d.locale=O,xe.NAVIGATION_I18N_FIELDS.forEach(k=>{d.formState[k][O]=d.formState[k][Ue]}),i?.(I),setTimeout(()=>{y()})},[y,d,I,i]);return C.useImperativeHandle(e,()=>({add:H,edit:L,resetImmediate:()=>F(),reset:()=>setTimeout(()=>F(),0),submit:p(te)}),[H,F,L,p,te]),g.jsxs(ie,{...o,children:[g.jsx(md,{sx:{mb:1},onAdd:W,onChange:ee,onRemoveLocale:ne,locale:d.locale,localeMap:u,locales:d.localeList}),g.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&g.jsx(st,{name:"title",control:h,rules:{validate:A},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...O})}),r==="bottomNavigation"?g.jsx(st,{name:"icon",control:h,rules:{validate:Q},render:({field:O})=>g.jsx(mo,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==Ue,methods:["select"],iconifyShape:"url",...O})}):g.jsx(st,{name:"icon",control:h,rules:{validate:J},render:({field:O})=>g.jsx(mo,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!b?.icon?.message,helperText:b?.icon?.message,disabled:d.locale!==Ue,...O})}),d.isRoot&&g.jsx(st,{name:"component",control:h,render:({field:O})=>g.jsx(Yi,{fullWidth:!0,margin:"dense",disabled:d.locale!==Ue&&O.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(k=>({title:k.title,value:k.name,description:k.link})),error:!!b?.component?.message,helperText:b?.component?.message||" ",...Et(O,"ref")})}),!d.isRoot&&["header"].includes(r)&&g.jsx(st,{name:"description",control:h,rules:{validate:G},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:d.isEdit,error:!!b?.description?.message,helperText:b?.description?.message||" ",...O})}),g.jsx(st,{name:"link",control:h,rules:{validate:X},render:({field:O})=>g.jsx(mc,{fullWidth:!0,margin:"dense",children:g.jsx(Gh,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:d.linkDisabled,isOptionEqualToValue:k=>k.label,options:E,renderInput:k=>g.jsx(it,{...k,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!b?.link?.message,helperText:b?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:R?g.jsx(Dn,{position:"start",sx:{textDecoration:gx(P||"")?"line-through":""},children:R}):null}}}),renderOption:(k,B)=>g.jsxs(ie,{component:"li",...k,children:[B.label,g.jsx(me,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:B.title})]}),margin:"dense",...O,onChange:()=>{},onInputChange:(k,B)=>{O.onChange(B)}})})}),["dashboard","sessionManager"].includes(r)&&g.jsx(st,{name:"role",control:h,render:({field:O})=>g.jsx(Yi,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(k=>({title:k.title,value:k.name})),error:!!b?.role?.message,helperText:b?.role?.message||" ",...Et(O,"ref")})}),r==="bottomNavigation"&&g.jsx(st,{name:"title",control:h,rules:{validate:A},render:({field:O})=>g.jsx(it,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:d.isEdit,error:!!b?.title?.message,helperText:b?.title?.message||" ",...O})})]})]})}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}=Ee(),[o,{setTrue:a,setFalse:l}]=Ah(),[s,c]=C.useState("add"),u=C.useRef(null),f=C.useMemo(()=>{const m={add:i("common.create"),edit:i("common.edit")}[s];return m?`${m} ${i("navigation.navigation")}`:"--"},[i,s]),d=C.useCallback(()=>{l(),u.current?.reset()},[l]),p=C.useCallback((v={},m=()=>{})=>{c("add"),u.current?.add(v,y=>m(d,y)),a()},[a,d]),h=C.useCallback((v={},m=()=>{})=>{c("edit"),u.current?.edit(v,y=>m(d,y)),a()},[a,d]);return C.useImperativeHandle(e,()=>({add:p,edit:h,close:d}),[p,h,d]),g.jsx(yc,{open:o,title:f,keepMounted:!0,onClose:d,sx:{".MuiDialogContent-root":{pt:0}},actions:g.jsx(Pn,{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 Sd({className:e="",add:r=()=>{},edit:n=()=>{},toggle:t=()=>{},del:i=()=>{},data:o,section:a=""}){const{t:l}=Ee(),s=["yaml","team-tmpl"].includes(o.from),c=C.isValidElement(o.subtitle);function u(v){v.preventDefault(),v.stopPropagation()}const f=C.useCallback(v=>{u(v),r(o)},[r,o]),d=C.useCallback(v=>{u(v),n(o)},[n,o]),p=C.useCallback(v=>{u(v),t(o)},[t,o]),h=C.useCallback(v=>{u(v),i(o)},[i,o]);return g.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&g.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:g.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:g.jsx(ye,{icon:"mdi:plus-box-outline"})})}),g.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:g.jsx(Oe,{size:"small",color:"primary",onClick:d,disabled:c||o.from==="team-tmpl",children:g.jsx(ye,{icon:"mdi:pencil-outline"})})}),g.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:g.jsx(Oe,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?g.jsx(ye,{icon:"mdi:eye-off-outline"}):g.jsx(ye,{icon:"mdi:eye-outline"})})}),g.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:g.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:g.jsx(ye,{icon:"mdi:delete"})})})]})}Sd.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||"/",Ix=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},Rx=(e,r="en")=>{if(typeof e=="string"){if(fd(e)){const t=new URL(e);return t.searchParams.set("locale",r),t.href}if(pd(e))return e;const n=new URL(e,window.location.origin);return n.searchParams.set("locale",r),n.pathname+n.search}return typeof e=="object"?e[r]||e?.en||e?.zh:e},nr=(e,r="en",n="header")=>{if(!e?.length)return e;const t=(i,o)=>i&&typeof i=="object"?i[o]||i?.en||i?.zh:i;return Gt(e,i=>({...i,title:t(i.title,r),description:t(i.description,r),link:xc(i.items?.length?i.link:Rx(i.link,r),n),_rawLink:i.link}),"items")},Tx=e=>Gt(e,r=>r.role?{...r,role:Array.isArray(r.role)?r.role:[r.role]}:r,"items"),Dx=e=>{if(!e?.length)return null;const r=Tx(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=Ix(r.theme),r.navigation=Dx(Px(r.navigation)),r},Px=(e=[])=>ra(e,(r,n)=>!!r.link||n.filteredChildren?.length,"items"),wd=(e,r)=>ra(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"),_x={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"/>'},kx={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 Ox({session:e,locale:r="zh",size:n=24,popperType:t="click",sx:i,...o}){const a=window?.blocklet||{},l=(a.navigation||[]).filter(p=>p.section==="sessionManager"&&!["/sessionManager"].includes(p.id)).filter(p=>!!(p?.role||[]).includes(e?.user?.role||"guest")).map(p=>{const h=(a?.componentMountPoints||[]).find(v=>p.component===v.name);return{...p,component:h}}),s=Ft(),c=C.useRef(null),u=jt({open:!1}),f=fe((p=!u.open)=>{u.open=p}),d=t==="hover"?{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1)}:{onClick:()=>f()};return l.length===0||!e?.user?null:g.jsxs(ie,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",...i},...o,...d,children:[g.jsx(Oe,{size:"medium",ref:c,children:g.jsx(ye,{icon:_x,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(Sc,{...p,timeout:350,children:g.jsxs(Er,{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:l.map(h=>g.jsx(Lp,{disablePadding:!0,children:g.jsxs(Wh,{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(ie,{component:"img",src:`${wc}/blocklet/logo-bundle/${h.component.did}`,sx:{borderRadius:1,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):g.jsx(ye,{fontSize:50,icon:h.icon||kx,color:s.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(Pn,{variant:"outlined",fullWidth:!0,href:jp,sx:{mt:1},children:r==="zh"?"管理":"Manage"})})]})})})})]})}const Cd=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])}))}))}),Id=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}),Ex=["admin","owner"],Nx=e=>e.endsWith(".ip.abtnet.io"),Mx=e=>e.endsWith(".did.abtnet.io"),Ax={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:"配置域名"}},Lx=1e3*60*60*24*30,Ts=".well-known/service/admin/domains";function Rd({locale:e="en",session:r={}}){const n=r?.user,t=zc(),[i,o]=C.useState(()=>{const d=window.localStorage.getItem("domain-warning-skip");if(!d)return!0;const p=+new Date,h=+new Date(d);return p-h>Lx}),a=fe((d,p={})=>Vn(Ax,d,e,"en",p)),l=C.useMemo(()=>{try{const{hostname:d}=new URL(window.location.href);return d}catch{return""}},[]),s=C.useMemo(()=>[a("owner.benefits1"),a("owner.benefits2"),a("owner.benefits3"),a("owner.benefits4"),a("owner.benefits5")],[a]),c=C.useCallback(()=>{window.localStorage.setItem("domain-warning-skip",new Date().toISOString()),o(!1)},[]),u=C.useCallback(()=>{const d=je(window.location.origin,Ts);d.startsWith("http")&&window.open(d,"_blank"),o(!1)},[]),f=n?.role&&Ex.includes(n.role);return window.location.href.includes(Ts)||t||!Nx(l)&&!Mx(l)?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(ie,{component:"ul",children:s.map(d=>g.jsx(me,{component:"li",sx:{fontSize:"14px",color:"text.secondary"},children:d},d))})]}),g.jsxs($p,{sx:{px:"12px !important"},children:[g.jsx(yt,{onClick:c,children:a("skip")}),f&&g.jsx(yt,{variant:"contained",onClick:u,children:a("bindDomain")})]})]})}Rd.propTypes={locale:x.string,session:x.object};const Ot={};function zx(e="admin"){let r="/";!window?.blocklet&&window?.env?.apiPrefix&&(r=window.env.apiPrefix);const n=je(r,wc,e);return new Gp.WsClient(n,{heartbeatIntervalMs:100*1e3})}function jx(e="admin"){return Ot[e]||(Ot[e]=zx(e)),Ot[e]}const Fx=(e="admin")=>{const r=C.use(Kn),{session:n}=r??{};return!Ot[e]&&n.user&&(Ot[e]=jx(e),Ot[e].connect()),Ot[e]},Bx={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>'},$x={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"/>'},Gx={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 Wx(){const e=Ft();return[...e.breakpoints.keys].reverse().reduce((r,n)=>{const t=qn(e.breakpoints.up(n));return!r&&t?n:r},null)||"xs"}const Hx=e=>!Oo(e.activity)&&!!e.activity?.type&&!!e.activity?.actor,Ux=e=>{if(!e)return null;const{meta:r,target:n}=e;return{metaLink:r?.id,targetLink:n?.id}},qx=async(e,r)=>{try{return await Dr.user.getProfileUrl({did:e,locale:r})}catch(n){console.error(n);return}},Vx=async(e,r)=>{const{type:n,did:t}=e;return Cc.isSameAddr(n,"did")?await qx(t,r)||_n.getLink(e):_n.getLink(e)},Kx=async(e,r,n=!0)=>{const t=_n.toTextList(e);return await Promise.all(t.map(async i=>{if(i instanceof _n.Link){if(n){const o=await Vx(i,r),{type:a,chainId:l,did:s}=i;return Cc.isSameAddr(a,"dapp")?`<em class="dapp" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`:o?`<a target="_blank" rel="noopener noreferrer" class="link" href="${o}">${i.text}</a>`:`<em class="common" data-type="${a}" data-chain-id="${l}" data-did="${s}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))},Yx=e=>Wp.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Jx={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 Yt({user:e,color:r=void 0}){const{palette:n}=Ft(),t=Eo(je(xe.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),i=r||n.text.primary;return g.jsx(Ic,{href:t,color:i,target:"_blank",onClick:o=>{o.customPreventRedirect=!0},sx:{fontWeight:600,textDecoration:"none","&:hover":{cursor:"pointer"}},children:e.fullName||"System"})}Yt.displayName="UserLink";function Xx({activity:e,users:r,actors:n,extra:t={},mountPoint:i=""}){const{palette:o}=Ft(),{type:a,target:l}=e||{},{type:s}=l||{},{linkColor:c=o.text.primary}=t||{},u=Me(()=>{if(!Array.isArray(r))return new Map;const m=new Map;return r.forEach(y=>{y?.did&&!m.has(y.did)&&m.set(y.did,y)}),m},[r]),f=Me(()=>Array.isArray(n)?n.map(m=>m?u.get(m)||{did:m,fullName:"System"}:null).filter(Boolean):[],[n,u]),d=fe(()=>{if(!Array.isArray(f)||f.length===0)return null;if(f.length===1)return g.jsx(Yt,{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(Yt,{user:m[0],color:c})," and ",g.jsx(Yt,{user:y,color:c})]});const b=f.length>3,I=b?f.slice(0,2):m;return g.jsxs(g.Fragment,{children:[I.map((T,_)=>g.jsxs(Z.Fragment,{children:[g.jsx(Yt,{user:T,color:c}),_<I.length-1?", ":""]},T.did)),b?`, and ${f.length-2} others`:g.jsxs(g.Fragment,{children:[", and ",g.jsx(Yt,{user:y,color:c})]})]})}),p=fe(()=>{const m=a?Jx[a]:null;return m?m(s,r.length):null}),h=Me(()=>{const m=d(),y=p();return!m||!y?null:g.jsxs(g.Fragment,{children:[m," ",y]})},[a,s,f,d,p]),v=Me(()=>{if(!e)return null;const m=Ux(e);return m?.targetLink?je(i,m.targetLink):null},[e,i]);return!a||Oo(l)?null:g.jsxs(g.Fragment,{children:[h," ",v&&g.jsx(Ic,{href:v,color:c,target:"_blank",sx:{textDecoration:"none"},onClick:m=>{m.customPreventRedirect=!0},children:l.name})]})}const Qx={normal:Na,success:Bx,info:Na,warning:$x,error:Gx},Zx=ur(Vp)`
|
|
44
44
|
font-size: 20px;
|
|
45
45
|
`,eS=ur.div`
|
|
46
46
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as c6,j as r,r as t,bn as U1,aQ as l6,N as $,H as R,a1 as u6,b as O1,_ as H1,f8 as e1,f as b1,F as p6,cr as k1,b9 as t1,iL as R1,n as M,cs as M1,fQ as V1,iM as C6,z as x,fd as d6,gb as h6,a3 as T1,bz as G,dp as j1,M as S,L as J,iN as N1,aV as m6,dG as f6,aO as k,de as g6,A as N,ay as J1,
|
|
1
|
+
import{aF as c6,j as r,r as t,bn as U1,aQ as l6,N as $,H as R,a1 as u6,b as O1,_ as H1,f8 as e1,f as b1,F as p6,cr as k1,b9 as t1,iL as R1,n as M,cs as M1,fQ as V1,iM as C6,z as x,fd as d6,gb as h6,a3 as T1,bz as G,dp as j1,M as S,L as J,iN as N1,aV as m6,dG as f6,aO as k,de as g6,A as N,ay as J1,gG as E6,f6 as A6,I as x6,dC as D6,T as b,$ as y6,D as w6,v as S6,w as l1,C as I6,iO as u1,x as B6,hj as F6,dI as L6,gu as v6,a4 as U6,X as n1,o as B,i as p1,y as O6,aw as H6,ak as b6}from"./index-C7egXf_h.js";import{v as C1}from"./index-C-1MOEs6.js";import{f as k6}from"./index-BojVbZw0.js";import{b as R6,c as M6,d as V6}from"./spaces-CNd41sir.js";import{u as a1}from"./blocklet-C67aFvl7.js";import{D as T6}from"./DeleteOutline-CIuy8JMu.js";import{O as Z1}from"./OpenInNew-BdVhgoOc.js";import{x as j6}from"./index-DRYJ0xIl.js";import{H as N6}from"./HelpOutline-BXdmHwaP.js";import"./api-r-_fEWsI.js";const J6=c6(r.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function Z6(){const[e,n]=t.useState(null),{blocklet:a}=a1();return t.useEffect(()=>{n(R6(a))},[a]),{storageEndpoint:e}}const P1=t.createContext({}),{Provider:P6,Consumer:He}=P1;function Q6({children:e}){const[n,a]=t.useState(!1),[s,o]=t.useState(null),{blocklet:i,actions:{refreshBlocklet:u}}=a1(),{storageEndpoint:c}=Z6(),{api:p}=U1();l6(async()=>{try{if(a(!0),$(c)){o(null);return}const d=await M6(c);o(d)}catch(d){console.error(d),R.error(d.message)}finally{a(!1)}},[c]);const l=()=>{o(null),u()},C=async d=>{o(d),await m(d.endpoint),u()},m=async d=>{await p.configBlocklet({input:{did:[i.meta.did],configs:[{key:O1.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:d}]}}),u()};t.useEffect(()=>{async function d(){if(!s)return;const E=await V6(s.endpoint,s.name),w=u6(s,{name:E});o(w)}d()},[]);const f=!!(c&&s);return r.jsx(P6,{value:{loading:n,spaceGateway:s,deleteSpaceGateway:l,updateSpaceGateway:C,storageEndpoint:c,settingStorageEndpoint:m,hasStorageEndpoint:f},children:e})}Q6.propTypes={children:H1.node.isRequired};function G6(){return t.useContext(P1)}const Z=e1({});function X6({key:e}={key:"md"}){const n=b1();return p6(n.breakpoints.down(e))}var A=(e=>(e[e.NETWORK_ERROR=1001]="NETWORK_ERROR",e[e.UNAUTHORIZED=1002]="UNAUTHORIZED",e[e.EXPIRED=1003]="EXPIRED",e[e.PAST_DUE=1004]="PAST_DUE",e[e.INVALID=1005]="INVALID",e[e.UNIT_LIMIT=1006]="UNIT_LIMIT",e[e.CORS_BLOCKED=1007]="CORS_BLOCKED",e[e.INCOMPATIBLE=1008]="INCOMPATIBLE",e))(A||{}),Q1=(e=>(e.DEFAULT="default",e.SUCCEEDED="succeeded",e.FAILED="failed",e.PENDING="pending",e))(Q1||{}),v=(e=>(e.APP_DISCONNECTED="app-disconnected",e.APP_RESTORE="app-restore",e.APP_BACKUP="app-backup",e.APP_CONNECTED="app-connected",e.APP_OBJECTS_SYNC="app-objects-sync",e))(v||{});function z6({endpoint:e,deps:n=[]}){return k1(async()=>{if(!t1(e))return;const{headers:a}=await Z.head(e,{timeout:1e3*30,params:{withExtras:!0}}),[s,o,i,u,c,p,l,C,m,f]=[a["x-space-name"],a["x-subscription-id"],a["x-listable"]==="true",a["x-readable"]==="true",a["x-writeable"]==="true",a["x-space-version"],a["x-space-owner-did"],a["x-space-is-available"],a["x-error-code"],a["x-is-site-admin"]],d=s?decodeURIComponent(s):"";if(C===void 0||m===void 0){const E=i&&u&&c;return{version:p,name:d,subscriptionId:o,ownerDid:l||"",isAvailable:E,errorCode:E?0:A.UNAUTHORIZED,isSiteAdmin:f==="true"}}return{version:p,name:d,subscriptionId:o,ownerDid:l,isAvailable:C==="true",errorCode:parseInt(m,10),isSiteAdmin:f==="true"}},{refreshDeps:[e].concat(n),onError(a){console.error(a)}})}const K6=R1.flatten({common:{cancel:"Cancel",confirm:"Confirm",delete:"Delete",error:"Error",open:"Open",unknown:"Unknown",invalidUrl:"Invalid url: {url}",upgrade:"Upgrade",viewMore:"View More"},storage:{spaces:{authorize:{title:"Connect {appName} to DID Spaces",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} to connect to DID Spaces",success:"Connected successfully"},connect:{reconnect:"Reconnect Now",useSpaceGateway:"Connect using the DID Spaces gateway",useWallet:"Connect to DID Spaces",howToGetGatewayUrl:"How to get the url of did spaces",providerForStorage:"Please connect your DID Spaces"},connected:{title:"Connected DID Spaces",tag:"Connected"},disconnected:{tag:"Disconnected"},error:{tag:"Need Attention",blockedByCors:"Access blocked by CORS",unreachable:"DID Space is unreachable",expired:"DID Spaces has expired, click this link to re-subscribe",pastDue:"DID Spaces has unpaid bills, click this link to complete payment",invalid:"DID Spaces subscription anomaly, click this link to check",unitLimit:"DID Spaces free quota has been used up, click this link to pay for the upgrade",cors:`The connection request may fail due to CORS restrictions:
|
|
2
2
|
1. Please contact the DID Space administrator to verify the relevant configuration.
|
|
3
3
|
2. If you are the administrator, click the link below to view the detailed setup guide and resolve the issue.`,networkError:"DID Space is currently unreachable due to potential server issues, network problems, or maintenance. Please click the link to visit the homepage and check its status.",incompatible:`The current connection of DID Spaces version ({spaceVersion}) is not compatible with the component version ({expectVersion}). Please contact the administrator for adjustments.
|
|
4
4
|
If you are the administrator, you can click the link below to take action.`},gateway:{add:{invalidUrl:"Invalid DID Spaces gateway url",label:"Enter the url of the DID Spaces",title:"Add DID Spaces"}},provideNFT:{title:"Please show the DID Spaces NFT for {appName}",scan:"Use your DID Wallet to scan the QR code below to allow the app {appName} show DID Spaces NFT",success:"Connected successfully"},helperText:{fixCorsError:"Fixing CORS Errors When Connecting to DID Spaces"}}},auditLog:{backup:{description:"A backup operation was completed {relativeTime}"},restore:{description:"A restore operation was completed {relativeTime}"},connected:{description:"A connection was established {relativeTime}"},disconnected:{description:"The connection was disconnected {relativeTime}"},objectsSync:{description:"{totalCount} objects ({size}) were synchronized {relativeTime}"}}}),Y6=R1.flatten({common:{cancel:"取消",confirm:"确认",delete:"删除",error:"错误",open:"打开",unknown:"未知",invalidUrl:"无效的 url: {url}",upgrade:"升级",viewMore:"查看更多"},storage:{spaces:{authorize:{title:"连接 {appName} 至 DID Spaces",scan:"使用你的 DID Wallet 扫描下面的二维码以允许应用 {appName} 连接至 DID Spaces",success:"连接成功"},connect:{reconnect:"立即重连",useSpaceGateway:"使用 DID Spaces 网关连接",useWallet:"连接至 DID Spaces",howToGetGatewayUrl:"如何获取 DID Spaces 的网关地址",providerForStorage:"请连接您的 DID Spaces"},connected:{title:"已连接的 DID Spaces",tag:"已连接"},disconnected:{tag:"连接已断开"},error:{tag:"需要关注",blockedByCors:"因 CORS 限制,访问被阻止",unreachable:"DID Space 无法访问",expired:"DID Spaces 已过期,点击此链接重新订阅",pastDue:"DID Spaces 有未支付账单,点击此链接完成支付",invalid:"DID Spaces 订阅异常,点击此链接检查",unitLimit:"DID Spaces 免费额度已用完,点击此链接付费升级",cors:`连接请求可能因 CORS 限制而失败:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as et}from"./index-
|
|
1
|
+
import{m as et}from"./index-DbXGWrH9.js";import"./index-C7egXf_h.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as h,j as e,ac as j,M as o,V as g,T as _,v as b,o as n}from"./index-
|
|
1
|
+
import{n as h,j as e,ac as j,M as o,V as g,T as _,v as b,o as n}from"./index-C7egXf_h.js";import{C as T}from"./click-to-copy-D50kkiW4.js";function v({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=h(),i={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(g,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(T,{"data-cy":"click-copy",children:t})]}),e.jsx(_,{component:"div",children:e.jsx(b,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(j,{title:i.title,description:i.description,confirm:i.confirm,cancel:i.cancel,params:i.params,onConfirm:i.onConfirm,onCancel:i.onCancel})}v.propTypes={title:n.any.isRequired,keyName:n.any.isRequired,description:n.any.isRequired,confirmPlaceholder:n.any.isRequired,cancel:n.string,confirm:n.string,params:n.object,onCancel:n.func,onConfirm:n.func.isRequired};export{v as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eJ as r}from"./index-
|
|
1
|
+
import{eJ as r}from"./index-C7egXf_h.js";var f=function(i,o){return i===void 0&&(i=[]),o===void 0&&(o=[]),r(i,o)};export{f as d};
|