@abtnode/webapp 1.16.45-beta-20250625-103530-e1f5b0b8 → 1.16.45-beta-20250627-075343-5af3ad9a
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-E4yM52LP.js → AdapterDayjs-WnXfrwG8.js} +1 -1
- package/dist/assets/{Add-D2TQfh7X.js → Add-ClFw4Dnq.js} +1 -1
- package/dist/assets/{ArrowDropDown-CBIRS7SW.js → ArrowDropDown-B-z5TNuh.js} +1 -1
- package/dist/assets/{Autocomplete-0XS5VLQn.js → Autocomplete-Dn9blQmP.js} +1 -1
- package/dist/assets/{Breadcrumbs-DCvbP9kf.js → Breadcrumbs-B0YoukvK.js} +1 -1
- package/dist/assets/{ButtonGroup-BRc5Mvfz.js → ButtonGroup-BrCuoPMx.js} +1 -1
- package/dist/assets/{CSSTransition-DjFeDehe.js → CSSTransition-DyO7mCpS.js} +1 -1
- package/dist/assets/{CallMerge-C385zQmP.js → CallMerge-CExHqb6s.js} +1 -1
- package/dist/assets/{CardContent-Dh0x7KhT.js → CardContent-ponMszq2.js} +1 -1
- package/dist/assets/{ChevronLeft-wJPPsN4a.js → ChevronLeft-C_FjrhWT.js} +1 -1
- package/dist/assets/{ChevronRight-CDUMkHbB.js → ChevronRight-C3Djwe6Q.js} +1 -1
- package/dist/assets/{Clear-mjEuyGV9.js → Clear-tcJv2g6U.js} +1 -1
- package/dist/assets/{Close-sGCryJEQ.js → Close-CMiVzKm3.js} +1 -1
- package/dist/assets/{Community-Bq6V3Mk4.js → Community-gplY8wfW.js} +1 -1
- package/dist/assets/{Delete-C10UTDTa.js → Delete-vq0xV4m5.js} +1 -1
- package/dist/assets/{DeleteOutline-DQOyLpQF.js → DeleteOutline-uICQncS-.js} +1 -1
- package/dist/assets/{Done-DBcGlcYy.js → Done-BFO7tVAe.js} +1 -1
- package/dist/assets/{Edit-bCJZHM02.js → Edit-Cy7H9XRh.js} +1 -1
- package/dist/assets/{ErrorOutline-B_WZTMrs.js → ErrorOutline-jp9UMRon.js} +1 -1
- package/dist/assets/{HelpOutline-p6D5-C25.js → HelpOutline-D7cgnTBl.js} +1 -1
- package/dist/assets/{Holiday-C-8T9pp5.js → Holiday-CRgOW0vy.js} +1 -1
- package/dist/assets/{Launch-BiPqX7Sl.js → Launch-DpU-CLIS.js} +1 -1
- package/dist/assets/{Link-CxSgUcmR.js → Link-8raCv9wv.js} +1 -1
- package/dist/assets/{ListItemButton-CTRWl4wH.js → ListItemButton-CTTpzKD1.js} +1 -1
- package/dist/assets/{ListSubheader-Bu9Ik2IZ.js → ListSubheader-DcCd9d8k.js} +1 -1
- package/dist/assets/{LoadingButton-C6i2W4lv.js → LoadingButton-ClbjkcHM.js} +1 -1
- package/dist/assets/{LockIcon-bxMdIquI.js → LockIcon-mm84bgIc.js} +1 -1
- package/dist/assets/{Meeting-BVrVyyy4.js → Meeting-CPKZMx1H.js} +1 -1
- package/dist/assets/{MoreHoriz-CcxbIhaP.js → MoreHoriz-DAtcBD-9.js} +1 -1
- package/dist/assets/{MoreVert-DKgaskjs.js → MoreVert-CEjQfu0K.js} +1 -1
- package/dist/assets/{OffSick-DKCRzD7f.js → OffSick-BUNd7ouW.js} +1 -1
- package/dist/assets/{OpenInNew-5_4x5etb.js → OpenInNew-2n62FKFZ.js} +1 -1
- package/dist/assets/{Public-COK1L07u.js → Public-CHhJjIAi.js} +1 -1
- package/dist/assets/{Refresh-C0seUUWd.js → Refresh-BAgv0sMT.js} +1 -1
- package/dist/assets/{SchemaReference.es-CzIRQDzg.js → SchemaReference.es-o3PMozx_.js} +1 -1
- package/dist/assets/{Search-DwP9rMAv.js → Search-DVnChAqf.js} +1 -1
- package/dist/assets/{Slider-BzRBSnPk.js → Slider-BrIHm-eU.js} +1 -1
- package/dist/assets/{Stepper-DfRVqYtc.js → Stepper-Vvl_tjzl.js} +1 -1
- package/dist/assets/{Switch-D_mpzogT.js → Switch-CVCvuqvb.js} +1 -1
- package/dist/assets/{TableRow-DOao2Ax-.js → TableRow-Cc4t6Du4.js} +1 -1
- package/dist/assets/{TableSearch-Dft7-3wK.js → TableSearch-BLF8cfXo.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BUu4D5L7.js → ToggleButtonGroup-kN-Ox0Ve.js} +1 -1
- package/dist/assets/{Verified-BSzKS7xS.js → Verified-B06y23xT.js} +1 -1
- package/dist/assets/{VerifiedUser-BqOD-Fqo.js → VerifiedUser-BqzMhYik.js} +1 -1
- package/dist/assets/{ViewColumn-D1D834qi.js → ViewColumn-DPG1LzJR.js} +1 -1
- package/dist/assets/{ViewList-cWPNtvI-.js → ViewList-DmKQCu8a.js} +1 -1
- package/dist/assets/{WorkingRemotely-0VGV80ew.js → WorkingRemotely-CpfTuPvc.js} +1 -1
- package/dist/assets/{_createAggregator-CMxDsGJ3.js → _createAggregator-Gs8KSpWa.js} +1 -1
- package/dist/assets/{actions-BcIVTnAX.js → actions-BiWifybs.js} +1 -1
- package/dist/assets/{actions-zzCHS6pi.js → actions-CLAOJycQ.js} +1 -1
- package/dist/assets/{agreement-DInxmYjI.js → agreement-DcZ6KgNg.js} +1 -1
- package/dist/assets/api-DNdeNTPy.js +1 -0
- package/dist/assets/appearance-Bl29K6v5.js +1 -0
- package/dist/assets/{audit-logs-Bgk4Ic5f.js → audit-logs-DuExXKbR.js} +1 -1
- package/dist/assets/{base-chart-NtFlfL_c.js → base-chart-ekFash8m.js} +1 -1
- package/dist/assets/{blocklet-Bc_ClD86.js → blocklet-Cfh-Xrih.js} +1 -1
- package/dist/assets/{brace-fold.es-BC_qbUU6.js → brace-fold.es-D4DmIvCt.js} +1 -1
- package/dist/assets/{chain-JM3VbMj6.js → chain-DU2c_k4h.js} +1 -1
- package/dist/assets/{click-to-copy-w2kJfNpC.js → click-to-copy-dfoyY_lM.js} +1 -1
- package/dist/assets/cloneDeep-cRbxO7zx.js +1 -0
- package/dist/assets/{closebrackets.es-GLataU8s.js → closebrackets.es-CQUNg-Pn.js} +1 -1
- package/dist/assets/{codemirror.es-CPacOghE.js → codemirror.es-ByZ_m-CY.js} +1 -1
- package/dist/assets/{collapse-Cs0TSeLZ.js → collapse-CR_PBgme.js} +1 -1
- package/dist/assets/{comment.es-BPrKqMcg.js → comment.es-BwPvE6E1.js} +1 -1
- package/dist/assets/{config-navigation-G5mNaiwU.js → config-navigation-lZcf32HC.js} +3 -3
- package/dist/assets/{connect-to-D1igV5DJ.js → connect-to-Bmy3u_bk.js} +1 -1
- package/dist/assets/{delete-confirm-CUccptOs.js → delete-confirm-C75lI5W7.js} +1 -1
- package/dist/assets/{detail-CIyPI2Zg.js → detail-CXHfmx0j.js} +3 -3
- package/dist/assets/{dialog.es-DPX8MF2x.js → dialog.es-CeOH4OgU.js} +1 -1
- package/dist/assets/{domains-B-XWBCV-.js → domains-RJq5LjW1.js} +1 -1
- package/dist/assets/{download-AyvGrGas.js → download-Cm9MnB1L.js} +1 -1
- package/dist/assets/emotion-react.browser.esm-DdBaOgtK.js +1 -0
- package/dist/assets/{foldgutter.es-Cn2HJ_R6.js → foldgutter.es-IJZjNq_B.js} +1 -1
- package/dist/assets/{get-safe-url-D2r1Jp8K.js → get-safe-url-CtuFSgMF.js} +1 -1
- package/dist/assets/{get-safe-url-qdss-omj.js → get-safe-url-yal5CMKC.js} +1 -1
- package/dist/assets/getValidReactChildren-CTJ99Du6.js +1 -0
- package/dist/assets/{hint.es-B0_E7oDV.js → hint.es-BjGBkW4x.js} +1 -1
- package/dist/assets/{hint.es2-CkA5Ojxm.js → hint.es2-B5zzitgD.js} +1 -1
- package/dist/assets/{iframe-Bnxo1dLZ.js → iframe-D7RblVkl.js} +1 -1
- package/dist/assets/{index-CCMSBvIe.js → index-B090kNMk.js} +1 -1
- package/dist/assets/{index-BUkVq1KR.js → index-B9Zj0MjA.js} +1 -1
- package/dist/assets/{index-BpIOZERe.js → index-BG5KLOZK.js} +1 -1
- package/dist/assets/{index-DOSme2iX.js → index-BU6w7RS4.js} +1 -1
- package/dist/assets/{index-B0_gMilI.js → index-BUiQz1Ab.js} +1 -1
- package/dist/assets/{index-BbGn7XFj.js → index-BjmLysO9.js} +1 -1
- package/dist/assets/{index-caqtONTv.js → index-Bn8vq2pI.js} +1 -1
- package/dist/assets/{index-dpCkDSbC.js → index-Bt5kVv-q.js} +1 -1
- package/dist/assets/{index-BArACHO5.js → index-BvMV51AL.js} +1 -1
- package/dist/assets/{index-Clc-dEl9.js → index-ByyRbNAi.js} +1 -1
- package/dist/assets/{index-Ck_YBWqK.js → index-C2a0z7LQ.js} +1 -1
- package/dist/assets/{index-ClfS6Wq6.js → index-C7UfoPX9.js} +1 -1
- package/dist/assets/{index-dEt78fXN.js → index-CIF0Gh0t.js} +1 -1
- package/dist/assets/{index-DW9Xv_7D.js → index-CNLT3Byh.js} +1 -1
- package/dist/assets/{index-CBfZNY0Z.js → index-CZeyzgj-.js} +3 -3
- package/dist/assets/{index-DpRMSDR-.js → index-CbI1JhKK.js} +1 -1
- package/dist/assets/{index-CdBw0Rvc.js → index-Cful1BDq.js} +1 -1
- package/dist/assets/{index-m9ErtPu_.js → index-Cn3hRzDh.js} +1 -1
- package/dist/assets/{index-B7FSbWm9.js → index-CovWC1Ok.js} +1 -1
- package/dist/assets/{index-DHEWoODL.js → index-Cpypikxn.js} +1 -1
- package/dist/assets/{index-Ce8dbaep.js → index-Csg8wVIe.js} +5 -5
- package/dist/assets/{index-BO8b-WlO.js → index-D5QEcVRM.js} +1 -1
- package/dist/assets/{index-D0dXqFdL.js → index-DAxdABYr.js} +1 -1
- package/dist/assets/{index-pk3XQI9A.js → index-DNrbJzny.js} +1 -1
- package/dist/assets/{index-blT9Z9Gx.js → index-DWd3cILy.js} +1 -1
- package/dist/assets/{index-Dmeb7V2o.js → index-DWdh-5Vi.js} +1 -1
- package/dist/assets/{index-D64bGcCD.js → index-DfJ_-35A.js} +1 -1
- package/dist/assets/{index-BnzUPpMN.js → index-DiPveja-.js} +1 -1
- package/dist/assets/index-DkKy0xHs.js +1 -0
- package/dist/assets/{index-D4DyTQbM.js → index-Don7IqNm.js} +1 -1
- package/dist/assets/{index-DjE3WLlJ.js → index-DvpErIn0.js} +1 -1
- package/dist/assets/{index-CQdblJIx.js → index-DyR416TT.js} +1 -1
- package/dist/assets/{index-B-mcVa4K.js → index-Hpi3ZYHE.js} +1 -1
- package/dist/assets/{index-BAhGYMnX.js → index-LJwDNnEV.js} +1 -1
- package/dist/assets/{index-BxXndJkQ.js → index-MjSkHF60.js} +1 -1
- package/dist/assets/{index-DctpXRMA.js → index-RRSzDDKO.js} +1 -1
- package/dist/assets/{index-CrLXqIb7.js → index-T0AaJV4t.js} +1 -1
- package/dist/assets/{index-DkmCetRt.js → index-eLfUdELN.js} +4 -4
- package/dist/assets/{index-BQY1ZvsJ.js → index-i3F5skqc.js} +1 -1
- package/dist/assets/{index-Ce3dTL3G.js → index-kVMWdWEQ.js} +3 -3
- package/dist/assets/{index-CeFoMPWZ.js → index-n8eW2eUk.js} +1 -1
- package/dist/assets/{index-BJSZStMQ.js → index-ok_zOsNR.js} +1 -1
- package/dist/assets/{index-E7rLoRQ5.js → index-po-3yvwP.js} +1 -1
- package/dist/assets/{index-D40Co5qF.js → index-qtvsfy9m.js} +1 -1
- package/dist/assets/{index-IQhHZWUm.js → index-rOyQ4oq0.js} +3 -3
- package/dist/assets/{index-BIZ-Ixy-.js → index-wWirgvea.js} +1 -1
- package/dist/assets/{index-CzBg2DcB.js → index-xvfMzmUf.js} +3 -3
- package/dist/assets/{index.esm-DTgyrZjY.js → index.esm-CyA4TSTB.js} +1 -1
- package/dist/assets/{info-addon.es-3NJa6KtA.js → info-addon.es-DYDUbMc0.js} +1 -1
- package/dist/assets/{info.es-D-2edHpl.js → info.es-SnfQfB84.js} +1 -1
- package/dist/assets/{install-from-url-BUkOwP2l.js → install-from-url-B_tn4zT0.js} +1 -1
- package/dist/assets/{invitation-481ssj-o.js → invitation-DGj_iHMa.js} +1 -1
- package/dist/assets/is-path-prefix-equal-BdZ-5GQE.js +1 -0
- package/dist/assets/{item-RbokiK1S.js → item-W0sW0e2J.js} +1 -1
- package/dist/assets/{javascript.es-CS98pEs7.js → javascript.es-FaWFEwiB.js} +1 -1
- package/dist/assets/{jump-to-line.es-Cdsa1EQo.js → jump-to-line.es-DhOjo0qe.js} +1 -1
- package/dist/assets/{jump.es-pKJs0PcZ.js → jump.es-CbK7sUVy.js} +1 -1
- package/dist/assets/{lint.es-DeuR4cvW.js → lint.es-CPxhlsdI.js} +1 -1
- package/dist/assets/{lint.es2-C7vsGpeF.js → lint.es2-CajKeHM1.js} +1 -1
- package/dist/assets/{lint.es3-0afVfh7y.js → lint.es3-DncWZVuk.js} +1 -1
- package/dist/assets/{list-header-DWRXNIum.js → list-header-BwiAnrHh.js} +1 -1
- package/dist/assets/{log-Rnj_l_kW.js → log-DC5woQxD.js} +1 -1
- package/dist/assets/{lottie-react.esm-DNImM5G_.js → lottie-react.esm-CiVS9iF1.js} +1 -1
- package/dist/assets/{matchbrackets.es-BJaiUavw.js → matchbrackets.es-3u1E0SjP.js} +1 -1
- package/dist/assets/{memory-2Fu8FiJD.js → memory-BG-8wVy5.js} +1 -1
- package/dist/assets/{metric-kljbRSzj.js → metric-DLRnt0HL.js} +1 -1
- package/dist/assets/{mode.es-C79BwdHS.js → mode.es-y9n6K8Wh.js} +1 -1
- package/dist/assets/{mode.es2-BIOYicG_.js → mode.es2-DzPRH9Dr.js} +1 -1
- package/dist/assets/{mode.es3-YEJDAVOM.js → mode.es3-DesMEGf5.js} +1 -1
- package/dist/assets/omit-B1nPtgSw.js +1 -0
- package/dist/assets/{onlineParser.es-kcMv2bES.js → onlineParser.es-DqXm5fI3.js} +1 -1
- package/dist/assets/{overview-aa6AEDWe.js → overview-CVGZvFnz.js} +1 -1
- package/dist/assets/{permission-DqA1Itpd.js → permission-DMmPrvTU.js} +1 -1
- package/dist/assets/{preference-Dt8qKNft.js → preference-FLLBxRmn.js} +3 -3
- package/dist/assets/{raf-schd.esm-C9R6qVVJ.js → raf-schd.esm-DATKMJvw.js} +1 -1
- package/dist/assets/refType-CP2EoBf5.js +1 -0
- package/dist/assets/{resource-dialog-CwBd61wu.js → resource-dialog-BA4pjpzF.js} +4 -4
- package/dist/assets/{runtime-URfV7tzy.js → runtime-qkvvlzxp.js} +1 -1
- package/dist/assets/sdk-mtatgQHh.js +1 -0
- package/dist/assets/{search.es-DvQtO2_U.js → search.es-BF28CwLe.js} +1 -1
- package/dist/assets/{searchcursor.es-DJzC0uAr.js → searchcursor.es-BrcoUXZs.js} +1 -1
- package/dist/assets/{service-BzIEeoYC.js → service-BN0pdzsl.js} +1 -1
- package/dist/assets/{shorten-label-DT6MTw_Y.js → shorten-label-Bb8Ef88h.js} +1 -1
- package/dist/assets/{show-hint.es-BmWjOG2q.js → show-hint.es-Uh6-hazt.js} +1 -1
- package/dist/assets/{simple-select-nLAqpT5F.js → simple-select-Dt_avuAZ.js} +1 -1
- package/dist/assets/{spaces-DsmO0L1O.js → spaces-BAC7141S.js} +1 -1
- package/dist/assets/{status-CUeSClwm.js → status-Bbke970Q.js} +1 -1
- package/dist/assets/{status-v3mesVji.js → status-CGAf0ln2.js} +1 -1
- package/dist/assets/{sublime.es-CLNRcVpg.js → sublime.es-Dzbai708.js} +1 -1
- package/dist/assets/{switch-control-govDdBhh.js → switch-control-BcUld3eb.js} +1 -1
- package/dist/assets/{table-icons-CZpYFKPQ.js → table-icons-DssnPJ3-.js} +1 -1
- package/dist/assets/{team-CkCCW1aD.js → team-C-5j3X8Z.js} +1 -1
- package/dist/assets/{toLower-DpWKFPAZ.js → toLower-Br-47zMX.js} +1 -1
- package/dist/assets/toUpper-DIsk8TJ0.js +1 -0
- package/dist/assets/{traffic-WLACfpsK.js → traffic-BYGx66ZI.js} +1 -1
- package/dist/assets/{url-evaluation-BWYsY9n8.js → url-evaluation-B5D3amtB.js} +1 -1
- package/dist/assets/{url-join-DmZTNNym.js → url-join-ZuF96vgy.js} +1 -1
- package/dist/assets/{use-mobile-BEQS_2hb.js → use-mobile-BCdpyHTg.js} +1 -1
- package/dist/assets/{use-mobile-BrO2MDso.js → use-mobile-C5Ab5U18.js} +1 -1
- package/dist/assets/{useAsync-RS3fE03r.js → useAsync-C2S2Uzjt.js} +1 -1
- package/dist/assets/{useAsyncRetry-CqTGYIbd.js → useAsyncRetry-DqY2ZlcJ.js} +1 -1
- package/dist/assets/{useLocalStorage-BYncjTWP.js → useLocalStorage-BtSS0rMI.js} +1 -1
- package/dist/assets/{useThemeProps-DBY5yQQ5.js → useThemeProps-Cg4_LVK8.js} +1 -1
- package/dist/assets/{util-Bic844-w.js → util-Cwo8Y390.js} +1 -1
- package/dist/assets/{wait-container-BAiPD7CZ.js → wait-container-DS9bARf7.js} +1 -1
- package/dist/assets/{withStyles-CoizY6JC.js → withStyles-aTWZwqC1.js} +1 -1
- package/dist/assets/{without-wallet-J6nBTF9O.js → without-wallet-DuCaXACL.js} +1 -1
- package/dist/assets/{wrap-locale-yCE4rNok.js → wrap-locale-NF8Ck1Ih.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-D5wEK6Va.js +0 -1
- package/dist/assets/appearance-CxHyHWPt.js +0 -1
- package/dist/assets/cloneDeep-DuGt6vnv.js +0 -1
- package/dist/assets/emotion-react.browser.esm-CQDycQuU.js +0 -1
- package/dist/assets/getValidReactChildren-CY2W7jdq.js +0 -1
- package/dist/assets/index-L_Yodacf.js +0 -1
- package/dist/assets/is-path-prefix-equal-K8f_bIrg.js +0 -1
- package/dist/assets/omit-CD2nIiw-.js +0 -1
- package/dist/assets/refType-BrGyx1l3.js +0 -1
- package/dist/assets/sdk-BC4LVkFc.js +0 -1
- package/dist/assets/toUpper-kboku50i.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{hN as Oc,f8 as Ec,bP as el,bQ as Nc,bN as Mc,bO as Lc,bS as tl,d3 as vn,km as Ac,d8 as et,j$ as kc,hY as zc,hX as Bc,kn as Fc,hR as Gc,fo as jc,F as Pe,ij as Wc,aH as Hc,x as It,m as Ye,a2 as ze,aU as Cr,r as I,j as R,c8 as sr,J as $c,fU as Uc,ej as Vc,k4 as qc,fm as Yt,a0 as rl,ko as Kc,fd as $t,bm as $e,bZ as U,d6 as Yc,P as E,bi as $,b$ as pr,i8 as Xc,kp as Jc,kq as Qc,kr as Zc,ks as ed,kt as td,ku as rd,kv as nd,kw as id,kx as od,b9 as pt,N as ne,aI as Ie,aj as ad,b as xt,cv as ge,be as Si,ff as At,k as je,a5 as He,b6 as ti,ep as on,ky as ld,dq as yi,br as nl,H as Ci,kz as sd,kA as cd,t as Nt,g1 as ri,aC as dd,bC as ud,aV as il,gW as ol,fX as al,C as fd,kB as uo,O as pd,fT as hd,A as rr,Q as ll,kC as gd,fL as vd,D as md,B as bd,n as Sd,kD as yd,G as fo,dx as Ln,dg as po,i3 as sl,d5 as Cd,eb as Zr,am as xd,kE as wd,gX as Id,a6 as cl,Z as ho,bD as Rd,e_ as go,S as Dd,U as vo,V as mo,gF as Td,fj as Je}from"./index-DkmCetRt.js";import{r as _d}from"./omit-CD2nIiw-.js";import{r as Pd}from"./cloneDeep-DuGt6vnv.js";import{p as Od}from"./index-pk3XQI9A.js";import{c as Ed,u as Nd}from"./_createAggregator-CMxDsGJ3.js";import{u as Rt}from"./blocklet-Bc_ClD86.js";import{r as Md,h as Ld,i as bo,j as Ad,k as So,e as kd,H as zd}from"./index-E7rLoRQ5.js";import{r as Bd,a as Fd,b as Gd,c as jd,d as Wd,e as Hd,f as $d,g as Ud,h as Vd,i as qd,u as q,j as re,w as an,k as dl,l as hr,m as ul,n as Kd,o as Yd,p as Dt,q as ni}from"./raf-schd.esm-C9R6qVVJ.js";import{I as yt,H as Xd,D as Jd,F as Qd}from"./resource-dialog-CwBd61wu.js";import{u as fl,b as Zd}from"./team-CkCCW1aD.js";import{b as eu}from"./actions-zzCHS6pi.js";import{u as tu,a as ru,C as nt}from"./index.esm-DTgyrZjY.js";import{S as ii}from"./simple-select-nLAqpT5F.js";import{a as nu,b as yo}from"./index-CQdblJIx.js";import{d as pl}from"./Clear-mjEuyGV9.js";import{d as iu}from"./ArrowDropDown-CBIRS7SW.js";import{a as ou}from"./api-D5wEK6Va.js";import{A as au}from"./Autocomplete-0XS5VLQn.js";import{b as Co,c as lu,a as su,e as cu}from"./ViewColumn-D1D834qi.js";import{I as du}from"./iframe-Bnxo1dLZ.js";import{B as An}from"./ButtonGroup-BRc5Mvfz.js";import{L as xo}from"./LoadingButton-C6i2W4lv.js";import"./TableRow-DOao2Ax-.js";import"./useThemeProps-DBY5yQQ5.js";import"./emotion-react.browser.esm-CQDycQuU.js";import"./Search-DwP9rMAv.js";import"./Delete-C10UTDTa.js";import"./index-BAhGYMnX.js";import"./MoreVert-DKgaskjs.js";import"./TableSearch-Dft7-3wK.js";import"./index-BUkVq1KR.js";import"./use-mobile-BEQS_2hb.js";import"./ListItemButton-CTRWl4wH.js";import"./index-CCMSBvIe.js";import"./index-dpCkDSbC.js";import"./Switch-D_mpzogT.js";import"./url-evaluation-BWYsY9n8.js";import"./index-D64bGcCD.js";import"./OpenInNew-5_4x5etb.js";import"./index-BJHGOv7L.js";import"./index-BojVbZw0.js";import"./HelpOutline-p6D5-C25.js";import"./index-Dmeb7V2o.js";import"./useLocalStorage-BYncjTWP.js";import"./get-safe-url-D2r1Jp8K.js";import"./permission-DqA1Itpd.js";import"./ListSubheader-Bu9Ik2IZ.js";import"./getValidReactChildren-CY2W7jdq.js";function uu(e,r){return Oc(r,function(n){return e[n]})}function fu(e){return e==null?[]:uu(e,Ec(e))}var pu=Ed(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"}));var gu=el(function(e){var r=Nc(e);return r=typeof r=="function"?r:void 0,Mc(Lc(e,1,tl,!0),void 0,r)});const vu=Object.freeze(Object.defineProperty({__proto__:null,default:gu},Symbol.toStringTag,{value:"Module"}));var hl=el(function(e,r){return tl(e)?eu(e,r):[]}),_e={};const mu=vn(vu),bu=vn(Ac),Su=vn(hu);(function(e){var r=et&&et.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ae,e.deepWalk=O,e.isMatchSection=w,e.nestNavigationList=de,e.filterNavigation=ue,e.cleanOrphanNavigation=le,e.joinLink=M,e.flattenNavigation=z,e.splitNavigationBySection=oe;const n=Pe,t=r(mu),i=r(kc),o=r(zc),a=r(bu),l=r(_d),s=r(Pd),c=Wc,d=r(Od),u=r(Bc),f=r(Fc),p=r(Gc),h=r(Su),g=Hc,v=jc;Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return v.checkLink}});const m="header",b="/",S="/",T="/";function O(B,W=()=>{},{key:A="children",order:x="first"}={}){function D(L,{index:G=0,parent:V=null,level:Z=0}={}){Array.isArray(L)?L.forEach((te,he)=>{D(te,{index:he,parent:V,level:Z+1})}):L&&(x==="first"&&W(L,V,{index:G,level:Z}),D(L[A],{parent:L,level:Z}),x==="last"&&W(L,V,{index:G,level:Z}))}D(B)}function w(B,W){return W===m&&(0,a.default)(B)?!0:Array.isArray(B)?B.includes(W):B===W}function P(B){try{return JSON.parse(B)}catch{return B}}function C(B){return B.map(W=>{const A={...W};return A.role&&(A.role=P(A.role)),A.section&&(A.section=P(A.section)),A.title&&(A.title=P(A.title)),A.description&&(A.description=P(A.description)),A.link&&(A.link=P(A.link)),A})}function _(B="/",W=""){if((0,u.default)(W||""))return W;const A=d.default.join(B,W||S);return A.length>1&&A.endsWith("/")?A.slice(0,A.length-1):A}function y(B,W,{strict:A=!0}={}){let x=B,D=W;return A||(x=x||"/",D=D||"/"),(0,f.default)(x)&&(0,p.default)(D)&&(0,v.checkLink)(D)?Object.keys(x).reduce((L,G)=>(L[G]=_(x[G],D),L),{}):(0,p.default)(x)&&(0,v.checkLink)(x)&&(0,f.default)(D)?Object.keys(D).reduce((L,G)=>(L[G]=_(x,D[G]),L),{}):(0,p.default)(x)&&(0,p.default)(D)?(0,v.checkLink)(x)||(0,v.checkLink)(D)?_(x,D):D:(0,f.default)(x)&&(0,f.default)(D)?[...new Set([...Object.keys(x),...Object.keys(D)])].reduce((G,V)=>(G[V]=_(x[V],D[V]),G),{}):D}function M(B,W){const A=(0,s.default)(B);return O(A,(x,D)=>{const L=x.component||x.child;if(L){const G=W.find(V=>V.name===L);G&&(x.link=y(G.link,x.link,{strict:!1}))}else D&&(x.link=y(D.link,x.link))},{key:"items"}),A}function z(B=[],{depth:W=1,transform:A=x=>x}={}){const x=(0,s.default)(B),D=[];return O(x,(L,G,{level:V})=>{if(V>=W){const{items:Z=[]}=L;if(Z&&Array.isArray(Z)&&Z.length>0){delete L.items;const te=Z.map(he=>A(he,L));if(G)G.items.push(...te);else{const he=A((0,l.default)(L,["items"]),G);D.push(he,...te)}}else if(V===1){const te=A((0,l.default)(L,["items"]),G);D.push(te)}}else V===1&&D.push(L)},{key:"items",order:"last"}),D}function j(B){if(B.section!=="bottomNavigation")return B;const W={...B};return n.NAVIGATION_I18N_FIELDS.forEach(A=>{const x=W[A];typeof x=="string"&&(W[A]={en:x})}),W}function H(B={}){const W=[];function A(D,L={}){var ie,pe,Xe,Tt,Fr,Gr;const G=[],{children:V=[],meta:Z={}}=D,te=(0,s.default)((Z==null?void 0:Z.navigation)||[]);(0,g.hasStartEngine)(Z)&&((pe=(ie=D.meta)==null?void 0:ie.capabilities)==null?void 0:pe.navigation)!==!1&&G.push(...te);const he=L.name||"",Ve=L.mountPoint||b,fe=D===B?"":Z.name||"",Te=D===B?"":D.mountPoint||b;for(const xe of V){if(!(0,g.hasStartEngine)(xe.meta))continue;const Mn=xe.meta.name,Dc=xe.mountPoint,Tc=[he,fe,Mn].filter(Boolean).join("."),_c=xe.meta.navigation||[],Pc=(0,c.joinURL)(Ve,Te,Dc);((Tt=(Xe=xe.meta)==null?void 0:Xe.capabilities)==null?void 0:Tt.navigation)!==!1&&W.push({did:xe.meta.did,name:Tc,link:Pc,title:xe.meta.title||"",navigation:_c.map(qe=>({section:m,...qe}))});const _t=te.find(qe=>qe.component?qe.component===Mn:!1);if(_t){if(!_t.link)if(xe.meta.navigation&&xe.meta.navigation.length>0){const qe=A(xe,{mountPoint:Te,name:fe});qe.length>0&&(_t.items=_t.items??[],_t.items.push(...qe))}else _t.link=S}else if(((Gr=(Fr=xe.meta)==null?void 0:Fr.capabilities)==null?void 0:Gr.navigation)!==!1){const qe=A(xe,{mountPoint:Te,name:fe}),jr={title:xe.meta.title,component:Mn,id:xe.meta.did};qe.length>0?(jr.items=qe,jr.link=void 0):jr.link=S,G.push(jr)}}return G}return{navigationList:A(B),components:W}}function Y(B){const W=(0,s.default)(B).filter(A=>A.id);return O(W,(A,x)=>{if(A.items&&A.items.length){for(let D=A.items.length-1;D>=0;D--)A.items[D].id||A.items.splice(D,1);A.items.length===0&&A.component&&(A.link=A.link||S)}x&&(A.parent=x.id,A.id=[x.id,A.id].join(T)),A.from=A.from||"yaml",A.visible=A.visible??!0},{key:"items"}),W}function K(B,W=2){const A=(0,s.default)(B),x=z(A,{depth:W,transform:(D,L)=>(L&&(D._parent||(D._parent=L.id,L.component||(D.link=y(L.link,D.link))),D.section=D.section||L.section||[m],D.visible=D.visible??L.visible,L.role&&(D.role=D.role||L.role)),D.component=[L.component,D.component].filter(Boolean).join("."),D)});return O(x,D=>{D.items&&D.items.length>0&&D.items.reduceRight((L,G)=>{if(G._parent){const V=D.items.findIndex(Z=>Z.id===G._parent);V>=0&&D.items.splice(V,1),delete G._parent}return null},null)},{key:"items"}),x}function J(B,W){return W&&Array.isArray(B.items)?B.items.filter(A=>(0,a.default)(A.section)?w(B.section,W):!!w(A.section,W)).map(A=>({...A,section:W})):[]}function oe(B){const W=(0,s.default)(B),A=[];for(const x of W){let G=function(V,Z){const te=J(V,Z);L.push({...D,section:Z,items:te})};const D=(0,s.default)((0,l.default)(x,["items"])),L=[];if(Array.isArray(x.section))for(const V of x.section)G(x,V);else if(x.section){const{section:V}=x;G(x,V)}else if(x.items&&x.items.length>0){const V=x.items.reduce((te,he)=>{const{section:Ve=[m]}=he||{};return te.push(...Ve),te},[]),Z=[...new Set(V)];for(const te of Z)G(x,te)}else L.push({...x,section:m});A.push(...L)}return A}function de(B=[]){const W=(0,s.default)(B);return W.reduceRight((A,x,D)=>{if(x.parent){const L=W.find(G=>x.section&&G.section?G.section===x.section&&G.id===x.parent:G.id===x.parent);L&&(L.items||(L.items=[]),L.items=[x,...L.items]),W.splice(D,1)}return null},null),W}function ue(B,W=[]){const A=de(B);return O(A,D=>{if(D!=null&&D.component&&(W.some(L=>L.name===D.component)||(D.visible=!1)),D.items&&D.items.length)for(let L=D.items.length-1;L>=0;L--)D.items[L].visible===!1&&D.items.splice(L,1)},{key:"items"}),A.filter(D=>{var L;return!(D.visible===!1||D.items&&Array.isArray(D.items)&&D.items.length>0&&((L=D.items)!=null&&L.every(G=>G.visible===!1)))})}function le(B){return B.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ee=B=>{const[W,A]=(0,h.default)(B,x=>x.id==="/team");return[...W,...A]};e.sortRootNavigation=ee;const X=B=>{const[,W]=(0,h.default)(B,A=>{var D;const x=typeof A.title=="string"?A.title:(D=A.title)==null?void 0:D.en;return A.id==="/team"&&x==="Access"||A.id==="/dashboard"&&x==="Blocklet"});return W};e.cleanOldNavigationHistory=X;function ae(B={},W={}){var fe,Te;const{beforeProcess:A=ie=>ie}=W,{navigationList:x,components:D}=H(B);(fe=B==null?void 0:B.settings)!=null&&fe.navigations&&(Array.isArray(B.settings.navigations)?B.settings.navigations=[...B.settings.navigations].filter(ie=>!((ie==null?void 0:ie.parent)==="/team"&&ie.from==="team-tmpl")):B.settings.navigations=[]);const L=C(X(((Te=B==null?void 0:B.settings)==null?void 0:Te.navigations)||[])).map(j),G=K(A(x)),V=Y(G),te=oe(V).reduce((ie,pe)=>["bottom","social","sessionManager","userCenter"].includes(pe.section)&&pe.items&&pe.items.length>0?(ie.push(...pe.items.map(Tt=>{const{section:Fr}=pe,Gr=y(pe.link,Tt.link),xe=[pe.component,Tt.component].filter(Boolean).join(".");return{...Tt,section:Fr,link:Gr,component:xe,parent:""}})),ie):(ie.push(pe),ie),[]),he=z(te,{transform(ie,pe){let{component:Xe}=ie;return pe!=null&&pe.component&&(Xe=[pe.component,ie.component].filter(Boolean).join(".")),j({...ie,component:Xe})}});return{navigationList:(0,t.default)(L,he,(ie,pe)=>{const Xe=["id","section"];return(0,i.default)((0,o.default)(ie,Xe),(0,o.default)(pe,Xe))}),components:D,builtinList:he}}})(_e);const gl=I.createContext(null),wo="/",yu="header",Io={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:`${Pe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Pe.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:`${Pe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:It(Pe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function kn(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:It(Pe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Cu=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),xu=(e,r)=>{const n=_e.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Cu("/team",e("navigation.blockletService"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),it("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ro({name:e}){return R.jsx(Vc,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function wu({children:e}){const{blocklet:r,actions:n}=Rt(),{t}=Ye(),{navigationList:i,components:o,builtinList:a}=_e.parseNavigation(r,{beforeProcess(w){const P=ze(w);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Io,C)&&Io[C].forEach(_=>{P.some(y=>y.id===_.id)||P.push(_)})}),xu(t,P)}}),l=Cr({rawNavigation:ze(i),activeSection:yu,components:o}),s=I.useMemo(()=>_e.nestNavigationList(ze(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=_e.filterNavigation(ze(l.rawNavigation),o);return _e.joinLink(w,o)},[o,l.rawNavigation]),d=I.useCallback(w=>{if(!w.id)return"";const P=_e.flattenNavigation(_e.joinLink(s,o)),C=P.find(_=>_.id===w.id);if(C!=null&&C.component){if(!o.some(_=>_.name===C.component))return R.jsx(Ro,{name:C.component})}else if(C.parent){const _=P.find(y=>y.id===C.parent);if(_!=null&&_.component&&!o.some(y=>y.name===_.component))return R.jsx(Ro,{name:_.component})}return C==null?void 0:C.link},[s,o]),u=I.useCallback(w=>{l.activeSection=w},[l]),f=I.useCallback(w=>{const P=[];_e.deepWalk(w,(_,y)=>{const M={...sr(_,["children","expand"]),parent:y==null?void 0:y.id};P.push(M)});const C=ze(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const y=P.find(M=>kn(M,_));return y?!_e.isMatchSection(y.section,l.activeSection):!0});l.rawNavigation=[...C,...P]},[l]),p=I.useCallback((w=[])=>{const P=ze(l.rawNavigation).map(C=>{const _=w.find(y=>kn({...y,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=P},[l]),h=I.useCallback((w,P=wo)=>w.map(_=>{const y=o.find(H=>H.name===_.component),M=(y==null?void 0:y.link)||P,z=_.items||[],{link:j}=_;return{title:_.title,description:_.description,subtitle:d(_),link:j,icon:_.icon,children:h(z,j||wo),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:M}}),[o,d]),g=I.useCallback(w=>{p([w])},[p]),v=I.useCallback(w=>{const P=l.rawNavigation.filter(C=>C.id===w||C.parent===w).map(C=>C.id);l.rawNavigation=ze(l.rawNavigation).filter(C=>!P.includes(C.id))},[l]),m=I.useCallback((w={},P=-1)=>{const C={...w,id:$c.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],y=_.filter(M=>M.section===l.activeSection);if(P<0||P>y.length-1)_.push(C);else{const M=y[P],z=_.findIndex(j=>kn(j,M));_.splice(z,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(w=>{const C=ze(s).filter(_=>_e.isMatchSection(_.section,w));return h(C)},[s,h]),S=I.useCallback(async w=>{const C=w.map(_=>Uc(_,qc)).map(_=>{const y={..._};return y.role&&Array.isArray(y.role)&&(y.role=JSON.stringify(y.role)),y.section&&Array.isArray(y.section)&&(y.section=JSON.stringify(y.section)),y.title&&y.title instanceof Object&&(y.title=JSON.stringify(y.title)),y.description&&y.description instanceof Object&&(y.description=JSON.stringify(y.description)),y.link&&y.link instanceof Object&&(y.link=JSON.stringify(y.link)),y});await n.configNavigations(C)},[n]),T=I.useCallback(async()=>{await S([]),l.rawNavigation=ze(a)},[S,l,a]),O=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:d,updateActiveSection:u,updateNavigationItem:g,delNavigationItem:v,addNavigationItem:m,updateNavigationTree:f,getNavigation:b,saveNavigationList:S,resetNavigation:T}),[l,c,o,d,u,g,v,m,f,b,S,T]);return R.jsx(gl.Provider,{value:O,children:e})}function vl(){const e=I.useContext(gl);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var rt={},ml="Expected a function",Do=NaN,Iu="[object Symbol]",Ru=/^\s+|\s+$/g,Du=/^[-+]0x[0-9a-f]+$/i,Tu=/^0b[01]+$/i,_u=/^0o[0-7]+$/i,Pu=parseInt,Ou=typeof et=="object"&&et&&et.Object===Object&&et,Eu=typeof self=="object"&&self&&self.Object===Object&&self,Nu=Ou||Eu||Function("return this")(),Mu=Object.prototype,Lu=Mu.toString,Au=Math.max,ku=Math.min,zn=function(){return Nu.Date.now()};function zu(e,r,n){var t,i,o,a,l,s,c=0,d=!1,u=!1,f=!0;if(typeof e!="function")throw new TypeError(ml);r=To(r)||0,ln(n)&&(d=!!n.leading,u="maxWait"in n,o=u?Au(To(n.maxWait)||0,r):o,f="trailing"in n?!!n.trailing:f);function p(w){var P=t,C=i;return t=i=void 0,c=w,a=e.apply(C,P),a}function h(w){return c=w,l=setTimeout(m,r),d?p(w):a}function g(w){var P=w-s,C=w-c,_=r-P;return u?ku(_,o-C):_}function v(w){var P=w-s,C=w-c;return s===void 0||P>=r||P<0||u&&C>=o}function m(){var w=zn();if(v(w))return b(w);l=setTimeout(m,g(w))}function b(w){return l=void 0,f&&t?p(w):(t=i=void 0,a)}function S(){l!==void 0&&clearTimeout(l),c=0,t=s=i=l=void 0}function T(){return l===void 0?a:b(zn())}function O(){var w=zn(),P=v(w);if(t=arguments,i=this,s=w,P){if(l===void 0)return h(s);if(u)return l=setTimeout(m,r),p(s)}return l===void 0&&(l=setTimeout(m,r)),a}return O.cancel=S,O.flush=T,O}function Bu(e,r,n){var t=!0,i=!0;if(typeof e!="function")throw new TypeError(ml);return ln(n)&&(t="leading"in n?!!n.leading:t,i="trailing"in n?!!n.trailing:i),zu(e,r,{leading:t,maxWait:r,trailing:i})}function ln(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function Fu(e){return!!e&&typeof e=="object"}function Gu(e){return typeof e=="symbol"||Fu(e)&&Lu.call(e)==Iu}function To(e){if(typeof e=="number")return e;if(Gu(e))return Do;if(ln(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=ln(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ru,"");var n=Tu.test(e);return n||_u.test(e)?Pu(e.slice(2),n?2:8):Du.test(e)?Do:+e}var ju=Bu,mn={exports:{}},nr={exports:{}};(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?nr.exports=function(){return performance.now()}:typeof Yt<"u"&&Yt!==null&&Yt.hrtime?(nr.exports=function(){return(e()-i)/1e6},r=Yt.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=Yt.uptime()*1e9,i=t-o):Date.now?(nr.exports=function(){return Date.now()-n},n=Date.now()):(nr.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(et);var Wu=nr.exports,Hu=Wu,tt=typeof window>"u"?et:window,Wr=["moz","webkit"],kt="AnimationFrame",Bt=tt["request"+kt],gr=tt["cancel"+kt]||tt["cancelRequest"+kt];for(var Xt=0;!Bt&&Xt<Wr.length;Xt++)Bt=tt[Wr[Xt]+"Request"+kt],gr=tt[Wr[Xt]+"Cancel"+kt]||tt[Wr[Xt]+"CancelRequest"+kt];if(!Bt||!gr){var Bn=0,_o=0,gt=[],$u=1e3/60;Bt=function(e){if(gt.length===0){var r=Hu(),n=Math.max(0,$u-(r-Bn));Bn=n+r,setTimeout(function(){var t=gt.slice(0);gt.length=0;for(var i=0;i<t.length;i++)if(!t[i].cancelled)try{t[i].callback(Bn)}catch(o){setTimeout(function(){throw o},0)}},Math.round(n))}return gt.push({handle:++_o,callback:e,cancelled:!1}),_o},gr=function(e){for(var r=0;r<gt.length;r++)gt[r].handle===e&&(gt[r].cancelled=!0)}}mn.exports=function(e){return Bt.call(tt,e)};mn.exports.cancel=function(){gr.apply(tt,arguments)};mn.exports.polyfill=function(e){e||(e=tt),e.requestAnimationFrame=Bt,e.cancelAnimationFrame=gr};var Uu=mn.exports,xi={};Object.defineProperty(xi,"__esModule",{value:!0});xi.default=Vu;function Vu(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.noop=qu;xr.intBetween=Ku;xr.getCoords=Yu;function qu(){}function Ku(e,r,n){return Math.floor(Math.min(r,Math.max(e,n)))}function Yu(e){return e.type==="touchmove"?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}Object.defineProperty(rt,"__esModule",{value:!0});var Xu=rt.createHorizontalStrength=Sl,Ju=rt.createVerticalStrength=yl,Qu=rt.createScrollingComponent=wl,Zu=rt.default=hf;rt.defaultVerticalStrength=rt.defaultHorizontalStrength=void 0;var cr=af(I),Jt=wr(rl),ef=$t,tf=wr(ju),Po=wr(Uu),rf=wr(xi),nf=Md,of=wr(Kc),Hr=xr;function wr(e){return e&&e.__esModule?e:{default:e}}function af(e){if(e&&e.__esModule)return e;var r={};if(e!=null){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};t.get||t.set?Object.defineProperty(r,n,t):r[n]=e[n]}}return r.default=e,r}function en(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?en=function(n){return typeof n}:en=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},en(e)}function sn(){return sn=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},sn.apply(this,arguments)}function lf(e,r){if(e==null)return{};var n=sf(e,r),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function sf(e,r){if(e==null)return{};var n={},t=Object.keys(e),i,o;for(o=0;o<t.length;o++)i=t[o],!(r.indexOf(i)>=0)&&(n[i]=e[i]);return n}function cf(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function df(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function uf(e,r,n){return r&&df(e.prototype,r),e}function ff(e,r){return r&&(en(r)==="object"||typeof r=="function")?r:ir(e)}function oi(e){return oi=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oi(e)}function pf(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ai(e,r)}function ai(e,r){return ai=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},ai(e,r)}function ir(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var bl=150;function Sl(e){return function(n,t){var i=n.x,o=n.w,a=n.y,l=n.h,s=Math.min(o/2,e),c=t.x>=i&&t.x<=i+o,d=c&&t.y>=a&&t.y<=a+l;if(d){if(t.x<i+s)return(t.x-i-s)/s;if(t.x>i+o-s)return-(i+o-t.x-s)/s}return 0}}function yl(e){return function(n,t){var i=n.y,o=n.h,a=n.x,l=n.w,s=Math.min(o/2,e),c=t.y>=i&&t.y<=i+o,d=c&&t.x>=a&&t.x<=a+l;if(d){if(t.y<i+s)return(t.y-i-s)/s;if(t.y>i+o-s)return-(i+o-t.y-s)/s}return 0}}var Cl=Sl(bl);rt.defaultHorizontalStrength=Cl;var xl=yl(bl);rt.defaultVerticalStrength=xl;function wl(e){var r=function(n){pf(t,n);function t(i,o){var a;return cf(this,t),a=ff(this,oi(t).call(this,i,o)),Qt(ir(ir(a)),"updateScrolling",(0,tf.default)(function(l){var s=a.container.getBoundingClientRect(),c=s.left,d=s.top,u=s.width,f=s.height,p={x:c,y:d,w:u,h:f},h=(0,Hr.getCoords)(l),g=a.props,v=g.horizontalStrength,m=g.verticalStrength;a.scaleX=v(p,h),a.scaleY=m(p,h),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),Qt(ir(ir(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=cr.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return uf(t,[{key:"componentDidMount",value:function(){var o=this;this.container=(0,ef.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 a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return o.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 o=this.props.dragDropManager,a=o.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(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 o=this,a=0,l=function s(){var c=o.scaleX,d=o.scaleY,u=o.container,f=o.props,p=f.strengthMultiplier,h=f.onScrollChange;if(p===0||c+d===0){o.stopScrolling();return}if(a+=1,a%2){var g=u.scrollLeft,v=u.scrollTop,m=u.scrollWidth,b=u.scrollHeight,S=u.clientWidth,T=u.clientHeight,O=c?u.scrollLeft=(0,Hr.intBetween)(0,m-S,g+c*p):g,w=d?u.scrollTop=(0,Hr.intBetween)(0,b-T,v+d*p):v;h(O,w)}o.frame=(0,Po.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Po.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var o=this.props;o.strengthMultiplier,o.verticalStrength,o.horizontalStrength,o.onScrollChange;var a=lf(o,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return cr.default.createElement(e,sn({ref:this.wrappedInstance},a))}}]),t}(cr.Component);return Qt(r,"displayName","Scrolling(".concat((0,rf.default)(e),")")),Qt(r,"propTypes",{dragDropManager:Jt.default.object.isRequired,onScrollChange:Jt.default.func,verticalStrength:Jt.default.func,horizontalStrength:Jt.default.func,strengthMultiplier:Jt.default.number}),Qt(r,"defaultProps",{onScrollChange:Hr.noop,verticalStrength:xl,horizontalStrength:Cl,strengthMultiplier:30}),(0,of.default)(r,e)}function hf(e){var r=wl(e);return function(n){return cr.default.createElement(nf.DragDropContextConsumer,null,function(t){var i=t.dragDropManager;return i===void 0?null:cr.default.createElement(r,sn({},n,{dragDropManager:i}))})}}var gf=Bd();const ve=$e(gf);var vf=Fd();const Se=$e(vf);var mf=Gd();const Le=$e(mf);var bf=jd();const Ae=$e(bf);var Sf=Wd();const k=$e(Sf);var yf=Hd();const ke=$e(yf);var Cf=$d();const N=$e(Cf);function Il(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Rl(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Dl(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}}Il.__suppressDeprecationWarning=!0;Rl.__suppressDeprecationWarning=!0;Dl.__suppressDeprecationWarning=!0;function Ir(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-kVMWdWEQ.js","./index-eLfUdELN.js","./index-Cp6LwWOU.css","./url-join-ZuF96vgy.js","./index-DNrbJzny.js","./_createAggregator-Gs8KSpWa.js","./index-ok_zOsNR.js","./resource-dialog-BA4pjpzF.js","./index-DyR416TT.js","./index-LJwDNnEV.js","./index-B9Zj0MjA.js","./use-mobile-BCdpyHTg.js","./ListItemButton-CTTpzKD1.js","./index-B090kNMk.js","./emotion-react.browser.esm-DdBaOgtK.js","./index-Bt5kVv-q.js","./Switch-CVCvuqvb.js","./index-po-3yvwP.js","./TableRow-Cc4t6Du4.js","./useThemeProps-Cg4_LVK8.js","./ViewColumn-DPG1LzJR.js","./Search-DVnChAqf.js","./Clear-tcJv2g6U.js","./Delete-vq0xV4m5.js","./MoreVert-CEjQfu0K.js","./TableSearch-BLF8cfXo.js","./url-evaluation-B5D3amtB.js","./index-DfJ_-35A.js","./OpenInNew-2n62FKFZ.js","./index-BJHGOv7L.js","./index-BojVbZw0.js","./HelpOutline-D7cgnTBl.js","./index-DWdh-5Vi.js","./ButtonGroup-BrCuoPMx.js","./getValidReactChildren-CTJ99Du6.js","./toUpper-DIsk8TJ0.js","./index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{hN as Oc,f8 as Ec,bP as el,bQ as Nc,bN as Mc,bO as Lc,bS as tl,d3 as vn,km as Ac,d8 as et,j$ as kc,hY as zc,hX as Bc,kn as Fc,hR as Gc,fo as jc,F as Pe,ij as Wc,aH as Hc,x as It,m as Ye,a2 as ze,aU as Cr,r as I,j as R,c8 as sr,J as $c,fU as Uc,ej as Vc,k4 as qc,fm as Yt,a0 as rl,ko as Kc,fd as $t,bm as $e,bZ as U,d6 as Yc,P as E,bi as $,b$ as pr,i8 as Xc,kp as Jc,kq as Qc,kr as Zc,ks as ed,kt as td,ku as rd,kv as nd,kw as id,kx as od,b9 as pt,N as ne,aI as Ie,aj as ad,b as xt,cv as ge,be as Si,ff as At,k as je,a5 as He,b6 as ti,ep as on,ky as ld,dq as yi,br as nl,H as Ci,kz as sd,kA as cd,t as Nt,g1 as ri,aC as dd,bC as ud,aV as il,gW as ol,fX as al,C as fd,kB as uo,O as pd,fT as hd,A as rr,Q as ll,kC as gd,fL as vd,D as md,B as bd,n as Sd,kD as yd,G as fo,dx as Ln,dg as po,i3 as sl,d5 as Cd,eb as Zr,am as xd,kE as wd,gX as Id,a6 as cl,Z as ho,bD as Rd,e_ as go,S as Dd,U as vo,V as mo,gF as Td,fj as Je}from"./index-eLfUdELN.js";import{r as _d}from"./omit-B1nPtgSw.js";import{r as Pd}from"./cloneDeep-cRbxO7zx.js";import{p as Od}from"./index-DNrbJzny.js";import{c as Ed,u as Nd}from"./_createAggregator-Gs8KSpWa.js";import{u as Rt}from"./blocklet-Cfh-Xrih.js";import{r as Md,h as Ld,i as bo,j as Ad,k as So,e as kd,H as zd}from"./index-po-3yvwP.js";import{r as Bd,a as Fd,b as Gd,c as jd,d as Wd,e as Hd,f as $d,g as Ud,h as Vd,i as qd,u as q,j as re,w as an,k as dl,l as hr,m as ul,n as Kd,o as Yd,p as Dt,q as ni}from"./raf-schd.esm-DATKMJvw.js";import{I as yt,H as Xd,D as Jd,F as Qd}from"./resource-dialog-BA4pjpzF.js";import{u as fl,b as Zd}from"./team-C-5j3X8Z.js";import{b as eu}from"./actions-CLAOJycQ.js";import{u as tu,a as ru,C as nt}from"./index.esm-CyA4TSTB.js";import{S as ii}from"./simple-select-Dt_avuAZ.js";import{a as nu,b as yo}from"./index-DyR416TT.js";import{d as pl}from"./Clear-tcJv2g6U.js";import{d as iu}from"./ArrowDropDown-B-z5TNuh.js";import{a as ou}from"./api-DNdeNTPy.js";import{A as au}from"./Autocomplete-Dn9blQmP.js";import{b as Co,c as lu,a as su,e as cu}from"./ViewColumn-DPG1LzJR.js";import{I as du}from"./iframe-D7RblVkl.js";import{B as An}from"./ButtonGroup-BrCuoPMx.js";import{L as xo}from"./LoadingButton-ClbjkcHM.js";import"./TableRow-Cc4t6Du4.js";import"./useThemeProps-Cg4_LVK8.js";import"./emotion-react.browser.esm-DdBaOgtK.js";import"./Search-DVnChAqf.js";import"./Delete-vq0xV4m5.js";import"./index-LJwDNnEV.js";import"./MoreVert-CEjQfu0K.js";import"./TableSearch-BLF8cfXo.js";import"./index-B9Zj0MjA.js";import"./use-mobile-BCdpyHTg.js";import"./ListItemButton-CTTpzKD1.js";import"./index-B090kNMk.js";import"./index-Bt5kVv-q.js";import"./Switch-CVCvuqvb.js";import"./url-evaluation-B5D3amtB.js";import"./index-DfJ_-35A.js";import"./OpenInNew-2n62FKFZ.js";import"./index-BJHGOv7L.js";import"./index-BojVbZw0.js";import"./HelpOutline-D7cgnTBl.js";import"./index-DWdh-5Vi.js";import"./useLocalStorage-BtSS0rMI.js";import"./get-safe-url-CtuFSgMF.js";import"./permission-DMmPrvTU.js";import"./ListSubheader-DcCd9d8k.js";import"./getValidReactChildren-CTJ99Du6.js";function uu(e,r){return Oc(r,function(n){return e[n]})}function fu(e){return e==null?[]:uu(e,Ec(e))}var pu=Ed(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});const hu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"}));var gu=el(function(e){var r=Nc(e);return r=typeof r=="function"?r:void 0,Mc(Lc(e,1,tl,!0),void 0,r)});const vu=Object.freeze(Object.defineProperty({__proto__:null,default:gu},Symbol.toStringTag,{value:"Module"}));var hl=el(function(e,r){return tl(e)?eu(e,r):[]}),_e={};const mu=vn(vu),bu=vn(Ac),Su=vn(hu);(function(e){var r=et&&et.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.sortRootNavigation=e.cleanOldNavigationHistory=e.checkLink=void 0,e.parseNavigation=ae,e.deepWalk=O,e.isMatchSection=w,e.nestNavigationList=de,e.filterNavigation=ue,e.cleanOrphanNavigation=le,e.joinLink=M,e.flattenNavigation=z,e.splitNavigationBySection=oe;const n=Pe,t=r(mu),i=r(kc),o=r(zc),a=r(bu),l=r(_d),s=r(Pd),c=Wc,d=r(Od),u=r(Bc),f=r(Fc),p=r(Gc),h=r(Su),g=Hc,v=jc;Object.defineProperty(e,"checkLink",{enumerable:!0,get:function(){return v.checkLink}});const m="header",b="/",S="/",T="/";function O(B,W=()=>{},{key:A="children",order:x="first"}={}){function D(L,{index:G=0,parent:V=null,level:Z=0}={}){Array.isArray(L)?L.forEach((te,he)=>{D(te,{index:he,parent:V,level:Z+1})}):L&&(x==="first"&&W(L,V,{index:G,level:Z}),D(L[A],{parent:L,level:Z}),x==="last"&&W(L,V,{index:G,level:Z}))}D(B)}function w(B,W){return W===m&&(0,a.default)(B)?!0:Array.isArray(B)?B.includes(W):B===W}function P(B){try{return JSON.parse(B)}catch{return B}}function C(B){return B.map(W=>{const A={...W};return A.role&&(A.role=P(A.role)),A.section&&(A.section=P(A.section)),A.title&&(A.title=P(A.title)),A.description&&(A.description=P(A.description)),A.link&&(A.link=P(A.link)),A})}function _(B="/",W=""){if((0,u.default)(W||""))return W;const A=d.default.join(B,W||S);return A.length>1&&A.endsWith("/")?A.slice(0,A.length-1):A}function y(B,W,{strict:A=!0}={}){let x=B,D=W;return A||(x=x||"/",D=D||"/"),(0,f.default)(x)&&(0,p.default)(D)&&(0,v.checkLink)(D)?Object.keys(x).reduce((L,G)=>(L[G]=_(x[G],D),L),{}):(0,p.default)(x)&&(0,v.checkLink)(x)&&(0,f.default)(D)?Object.keys(D).reduce((L,G)=>(L[G]=_(x,D[G]),L),{}):(0,p.default)(x)&&(0,p.default)(D)?(0,v.checkLink)(x)||(0,v.checkLink)(D)?_(x,D):D:(0,f.default)(x)&&(0,f.default)(D)?[...new Set([...Object.keys(x),...Object.keys(D)])].reduce((G,V)=>(G[V]=_(x[V],D[V]),G),{}):D}function M(B,W){const A=(0,s.default)(B);return O(A,(x,D)=>{const L=x.component||x.child;if(L){const G=W.find(V=>V.name===L);G&&(x.link=y(G.link,x.link,{strict:!1}))}else D&&(x.link=y(D.link,x.link))},{key:"items"}),A}function z(B=[],{depth:W=1,transform:A=x=>x}={}){const x=(0,s.default)(B),D=[];return O(x,(L,G,{level:V})=>{if(V>=W){const{items:Z=[]}=L;if(Z&&Array.isArray(Z)&&Z.length>0){delete L.items;const te=Z.map(he=>A(he,L));if(G)G.items.push(...te);else{const he=A((0,l.default)(L,["items"]),G);D.push(he,...te)}}else if(V===1){const te=A((0,l.default)(L,["items"]),G);D.push(te)}}else V===1&&D.push(L)},{key:"items",order:"last"}),D}function j(B){if(B.section!=="bottomNavigation")return B;const W={...B};return n.NAVIGATION_I18N_FIELDS.forEach(A=>{const x=W[A];typeof x=="string"&&(W[A]={en:x})}),W}function H(B={}){const W=[];function A(D,L={}){var ie,pe,Xe,Tt,Fr,Gr;const G=[],{children:V=[],meta:Z={}}=D,te=(0,s.default)((Z==null?void 0:Z.navigation)||[]);(0,g.hasStartEngine)(Z)&&((pe=(ie=D.meta)==null?void 0:ie.capabilities)==null?void 0:pe.navigation)!==!1&&G.push(...te);const he=L.name||"",Ve=L.mountPoint||b,fe=D===B?"":Z.name||"",Te=D===B?"":D.mountPoint||b;for(const xe of V){if(!(0,g.hasStartEngine)(xe.meta))continue;const Mn=xe.meta.name,Dc=xe.mountPoint,Tc=[he,fe,Mn].filter(Boolean).join("."),_c=xe.meta.navigation||[],Pc=(0,c.joinURL)(Ve,Te,Dc);((Tt=(Xe=xe.meta)==null?void 0:Xe.capabilities)==null?void 0:Tt.navigation)!==!1&&W.push({did:xe.meta.did,name:Tc,link:Pc,title:xe.meta.title||"",navigation:_c.map(qe=>({section:m,...qe}))});const _t=te.find(qe=>qe.component?qe.component===Mn:!1);if(_t){if(!_t.link)if(xe.meta.navigation&&xe.meta.navigation.length>0){const qe=A(xe,{mountPoint:Te,name:fe});qe.length>0&&(_t.items=_t.items??[],_t.items.push(...qe))}else _t.link=S}else if(((Gr=(Fr=xe.meta)==null?void 0:Fr.capabilities)==null?void 0:Gr.navigation)!==!1){const qe=A(xe,{mountPoint:Te,name:fe}),jr={title:xe.meta.title,component:Mn,id:xe.meta.did};qe.length>0?(jr.items=qe,jr.link=void 0):jr.link=S,G.push(jr)}}return G}return{navigationList:A(B),components:W}}function Y(B){const W=(0,s.default)(B).filter(A=>A.id);return O(W,(A,x)=>{if(A.items&&A.items.length){for(let D=A.items.length-1;D>=0;D--)A.items[D].id||A.items.splice(D,1);A.items.length===0&&A.component&&(A.link=A.link||S)}x&&(A.parent=x.id,A.id=[x.id,A.id].join(T)),A.from=A.from||"yaml",A.visible=A.visible??!0},{key:"items"}),W}function K(B,W=2){const A=(0,s.default)(B),x=z(A,{depth:W,transform:(D,L)=>(L&&(D._parent||(D._parent=L.id,L.component||(D.link=y(L.link,D.link))),D.section=D.section||L.section||[m],D.visible=D.visible??L.visible,L.role&&(D.role=D.role||L.role)),D.component=[L.component,D.component].filter(Boolean).join("."),D)});return O(x,D=>{D.items&&D.items.length>0&&D.items.reduceRight((L,G)=>{if(G._parent){const V=D.items.findIndex(Z=>Z.id===G._parent);V>=0&&D.items.splice(V,1),delete G._parent}return null},null)},{key:"items"}),x}function J(B,W){return W&&Array.isArray(B.items)?B.items.filter(A=>(0,a.default)(A.section)?w(B.section,W):!!w(A.section,W)).map(A=>({...A,section:W})):[]}function oe(B){const W=(0,s.default)(B),A=[];for(const x of W){let G=function(V,Z){const te=J(V,Z);L.push({...D,section:Z,items:te})};const D=(0,s.default)((0,l.default)(x,["items"])),L=[];if(Array.isArray(x.section))for(const V of x.section)G(x,V);else if(x.section){const{section:V}=x;G(x,V)}else if(x.items&&x.items.length>0){const V=x.items.reduce((te,he)=>{const{section:Ve=[m]}=he||{};return te.push(...Ve),te},[]),Z=[...new Set(V)];for(const te of Z)G(x,te)}else L.push({...x,section:m});A.push(...L)}return A}function de(B=[]){const W=(0,s.default)(B);return W.reduceRight((A,x,D)=>{if(x.parent){const L=W.find(G=>x.section&&G.section?G.section===x.section&&G.id===x.parent:G.id===x.parent);L&&(L.items||(L.items=[]),L.items=[x,...L.items]),W.splice(D,1)}return null},null),W}function ue(B,W=[]){const A=de(B);return O(A,D=>{if(D!=null&&D.component&&(W.some(L=>L.name===D.component)||(D.visible=!1)),D.items&&D.items.length)for(let L=D.items.length-1;L>=0;L--)D.items[L].visible===!1&&D.items.splice(L,1)},{key:"items"}),A.filter(D=>{var L;return!(D.visible===!1||D.items&&Array.isArray(D.items)&&D.items.length>0&&((L=D.items)!=null&&L.every(G=>G.visible===!1)))})}function le(B){return B.map(W=>W.items&&Array.isArray(W.items)&&W.items.length===1&&["header","footer","",void 0,null].includes(W.section)?W.items[0]:W)}const ee=B=>{const[W,A]=(0,h.default)(B,x=>x.id==="/team");return[...W,...A]};e.sortRootNavigation=ee;const X=B=>{const[,W]=(0,h.default)(B,A=>{var D;const x=typeof A.title=="string"?A.title:(D=A.title)==null?void 0:D.en;return A.id==="/team"&&x==="Access"||A.id==="/dashboard"&&x==="Blocklet"});return W};e.cleanOldNavigationHistory=X;function ae(B={},W={}){var fe,Te;const{beforeProcess:A=ie=>ie}=W,{navigationList:x,components:D}=H(B);(fe=B==null?void 0:B.settings)!=null&&fe.navigations&&(Array.isArray(B.settings.navigations)?B.settings.navigations=[...B.settings.navigations].filter(ie=>!((ie==null?void 0:ie.parent)==="/team"&&ie.from==="team-tmpl")):B.settings.navigations=[]);const L=C(X(((Te=B==null?void 0:B.settings)==null?void 0:Te.navigations)||[])).map(j),G=K(A(x)),V=Y(G),te=oe(V).reduce((ie,pe)=>["bottom","social","sessionManager","userCenter"].includes(pe.section)&&pe.items&&pe.items.length>0?(ie.push(...pe.items.map(Tt=>{const{section:Fr}=pe,Gr=y(pe.link,Tt.link),xe=[pe.component,Tt.component].filter(Boolean).join(".");return{...Tt,section:Fr,link:Gr,component:xe,parent:""}})),ie):(ie.push(pe),ie),[]),he=z(te,{transform(ie,pe){let{component:Xe}=ie;return pe!=null&&pe.component&&(Xe=[pe.component,ie.component].filter(Boolean).join(".")),j({...ie,component:Xe})}});return{navigationList:(0,t.default)(L,he,(ie,pe)=>{const Xe=["id","section"];return(0,i.default)((0,o.default)(ie,Xe),(0,o.default)(pe,Xe))}),components:D,builtinList:he}}})(_e);const gl=I.createContext(null),wo="/",yu="header",Io={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:`${Pe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${Pe.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:`${Pe.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:It(Pe.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]}]};function kn(e,r){return e.section&&r.section?e.section===r.section&&e.id===r.id:e.id===r.id}const it=(e,r,n,t,i=!0)=>({id:e,from:"team-tmpl",title:r,icon:n,link:It(Pe.WELLKNOWN_SERVICE_PATH_PREFIX,t),visible:i}),Cu=(e,r,n)=>({id:e,from:"team-tmpl",title:r,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),xu=(e,r)=>{const n=_e.cleanOldNavigationHistory(r);return n.findIndex(i=>i.id==="/team")===-1&&n.unshift(Cu("/team",e("navigation.blockletService"),[it("dashboard",e("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),it("did-connect",e("navigation.didConnect"),"tabler:users","/admin/did-connect"),it("website",e("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),it("operation",e("navigation.operations"),"grommet-icons:configure","/admin/operations"),it("integration",e("navigation.integration"),"hugeicons:webhook","/admin/integrations"),it("developer",e("navigation.developer"),"heroicons:command-line","/admin/developers"),it("did-spaces",e("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),it("studio",e("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function Ro({name:e}){return R.jsx(Vc,{label:`Uninstalled: ${e}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function wu({children:e}){const{blocklet:r,actions:n}=Rt(),{t}=Ye(),{navigationList:i,components:o,builtinList:a}=_e.parseNavigation(r,{beforeProcess(w){const P=ze(w);return["dashboard","userCenter"].forEach(C=>{Object.prototype.hasOwnProperty.call(Io,C)&&Io[C].forEach(_=>{P.some(y=>y.id===_.id)||P.push(_)})}),xu(t,P)}}),l=Cr({rawNavigation:ze(i),activeSection:yu,components:o}),s=I.useMemo(()=>_e.nestNavigationList(ze(l.rawNavigation)),[l.rawNavigation]),c=I.useMemo(()=>{const w=_e.filterNavigation(ze(l.rawNavigation),o);return _e.joinLink(w,o)},[o,l.rawNavigation]),d=I.useCallback(w=>{if(!w.id)return"";const P=_e.flattenNavigation(_e.joinLink(s,o)),C=P.find(_=>_.id===w.id);if(C!=null&&C.component){if(!o.some(_=>_.name===C.component))return R.jsx(Ro,{name:C.component})}else if(C.parent){const _=P.find(y=>y.id===C.parent);if(_!=null&&_.component&&!o.some(y=>y.name===_.component))return R.jsx(Ro,{name:_.component})}return C==null?void 0:C.link},[s,o]),u=I.useCallback(w=>{l.activeSection=w},[l]),f=I.useCallback(w=>{const P=[];_e.deepWalk(w,(_,y)=>{const M={...sr(_,["children","expand"]),parent:y==null?void 0:y.id};P.push(M)});const C=ze(l.rawNavigation).filter(_=>{if(!l.activeSection)return!1;const y=P.find(M=>kn(M,_));return y?!_e.isMatchSection(y.section,l.activeSection):!0});l.rawNavigation=[...C,...P]},[l]),p=I.useCallback((w=[])=>{const P=ze(l.rawNavigation).map(C=>{const _=w.find(y=>kn({...y,section:l.activeSection},C));return _?{...C,..._}:C});l.rawNavigation=P},[l]),h=I.useCallback((w,P=wo)=>w.map(_=>{const y=o.find(H=>H.name===_.component),M=(y==null?void 0:y.link)||P,z=_.items||[],{link:j}=_;return{title:_.title,description:_.description,subtitle:d(_),link:j,icon:_.icon,children:h(z,j||wo),section:_.section,visible:_.visible,parent:_.parent,component:_.component,id:_.id,role:_.role,from:_.from,__base:M}}),[o,d]),g=I.useCallback(w=>{p([w])},[p]),v=I.useCallback(w=>{const P=l.rawNavigation.filter(C=>C.id===w||C.parent===w).map(C=>C.id);l.rawNavigation=ze(l.rawNavigation).filter(C=>!P.includes(C.id))},[l]),m=I.useCallback((w={},P=-1)=>{const C={...w,id:$c.nanoid(),section:l.activeSection,visible:!0},_=[...l.rawNavigation],y=_.filter(M=>M.section===l.activeSection);if(P<0||P>y.length-1)_.push(C);else{const M=y[P],z=_.findIndex(j=>kn(j,M));_.splice(z,0,C)}return l.rawNavigation=_,C},[l]),b=I.useCallback(w=>{const C=ze(s).filter(_=>_e.isMatchSection(_.section,w));return h(C)},[s,h]),S=I.useCallback(async w=>{const C=w.map(_=>Uc(_,qc)).map(_=>{const y={..._};return y.role&&Array.isArray(y.role)&&(y.role=JSON.stringify(y.role)),y.section&&Array.isArray(y.section)&&(y.section=JSON.stringify(y.section)),y.title&&y.title instanceof Object&&(y.title=JSON.stringify(y.title)),y.description&&y.description instanceof Object&&(y.description=JSON.stringify(y.description)),y.link&&y.link instanceof Object&&(y.link=JSON.stringify(y.link)),y});await n.configNavigations(C)},[n]),T=I.useCallback(async()=>{await S([]),l.rawNavigation=ze(a)},[S,l,a]),O=I.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:d,updateActiveSection:u,updateNavigationItem:g,delNavigationItem:v,addNavigationItem:m,updateNavigationTree:f,getNavigation:b,saveNavigationList:S,resetNavigation:T}),[l,c,o,d,u,g,v,m,f,b,S,T]);return R.jsx(gl.Provider,{value:O,children:e})}function vl(){const e=I.useContext(gl);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}var rt={},ml="Expected a function",Do=NaN,Iu="[object Symbol]",Ru=/^\s+|\s+$/g,Du=/^[-+]0x[0-9a-f]+$/i,Tu=/^0b[01]+$/i,_u=/^0o[0-7]+$/i,Pu=parseInt,Ou=typeof et=="object"&&et&&et.Object===Object&&et,Eu=typeof self=="object"&&self&&self.Object===Object&&self,Nu=Ou||Eu||Function("return this")(),Mu=Object.prototype,Lu=Mu.toString,Au=Math.max,ku=Math.min,zn=function(){return Nu.Date.now()};function zu(e,r,n){var t,i,o,a,l,s,c=0,d=!1,u=!1,f=!0;if(typeof e!="function")throw new TypeError(ml);r=To(r)||0,ln(n)&&(d=!!n.leading,u="maxWait"in n,o=u?Au(To(n.maxWait)||0,r):o,f="trailing"in n?!!n.trailing:f);function p(w){var P=t,C=i;return t=i=void 0,c=w,a=e.apply(C,P),a}function h(w){return c=w,l=setTimeout(m,r),d?p(w):a}function g(w){var P=w-s,C=w-c,_=r-P;return u?ku(_,o-C):_}function v(w){var P=w-s,C=w-c;return s===void 0||P>=r||P<0||u&&C>=o}function m(){var w=zn();if(v(w))return b(w);l=setTimeout(m,g(w))}function b(w){return l=void 0,f&&t?p(w):(t=i=void 0,a)}function S(){l!==void 0&&clearTimeout(l),c=0,t=s=i=l=void 0}function T(){return l===void 0?a:b(zn())}function O(){var w=zn(),P=v(w);if(t=arguments,i=this,s=w,P){if(l===void 0)return h(s);if(u)return l=setTimeout(m,r),p(s)}return l===void 0&&(l=setTimeout(m,r)),a}return O.cancel=S,O.flush=T,O}function Bu(e,r,n){var t=!0,i=!0;if(typeof e!="function")throw new TypeError(ml);return ln(n)&&(t="leading"in n?!!n.leading:t,i="trailing"in n?!!n.trailing:i),zu(e,r,{leading:t,maxWait:r,trailing:i})}function ln(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function Fu(e){return!!e&&typeof e=="object"}function Gu(e){return typeof e=="symbol"||Fu(e)&&Lu.call(e)==Iu}function To(e){if(typeof e=="number")return e;if(Gu(e))return Do;if(ln(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=ln(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=e.replace(Ru,"");var n=Tu.test(e);return n||_u.test(e)?Pu(e.slice(2),n?2:8):Du.test(e)?Do:+e}var ju=Bu,mn={exports:{}},nr={exports:{}};(function(){var e,r,n,t,i,o;typeof performance<"u"&&performance!==null&&performance.now?nr.exports=function(){return performance.now()}:typeof Yt<"u"&&Yt!==null&&Yt.hrtime?(nr.exports=function(){return(e()-i)/1e6},r=Yt.hrtime,e=function(){var a;return a=r(),a[0]*1e9+a[1]},t=e(),o=Yt.uptime()*1e9,i=t-o):Date.now?(nr.exports=function(){return Date.now()-n},n=Date.now()):(nr.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(et);var Wu=nr.exports,Hu=Wu,tt=typeof window>"u"?et:window,Wr=["moz","webkit"],kt="AnimationFrame",Bt=tt["request"+kt],gr=tt["cancel"+kt]||tt["cancelRequest"+kt];for(var Xt=0;!Bt&&Xt<Wr.length;Xt++)Bt=tt[Wr[Xt]+"Request"+kt],gr=tt[Wr[Xt]+"Cancel"+kt]||tt[Wr[Xt]+"CancelRequest"+kt];if(!Bt||!gr){var Bn=0,_o=0,gt=[],$u=1e3/60;Bt=function(e){if(gt.length===0){var r=Hu(),n=Math.max(0,$u-(r-Bn));Bn=n+r,setTimeout(function(){var t=gt.slice(0);gt.length=0;for(var i=0;i<t.length;i++)if(!t[i].cancelled)try{t[i].callback(Bn)}catch(o){setTimeout(function(){throw o},0)}},Math.round(n))}return gt.push({handle:++_o,callback:e,cancelled:!1}),_o},gr=function(e){for(var r=0;r<gt.length;r++)gt[r].handle===e&&(gt[r].cancelled=!0)}}mn.exports=function(e){return Bt.call(tt,e)};mn.exports.cancel=function(){gr.apply(tt,arguments)};mn.exports.polyfill=function(e){e||(e=tt),e.requestAnimationFrame=Bt,e.cancelAnimationFrame=gr};var Uu=mn.exports,xi={};Object.defineProperty(xi,"__esModule",{value:!0});xi.default=Vu;function Vu(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.noop=qu;xr.intBetween=Ku;xr.getCoords=Yu;function qu(){}function Ku(e,r,n){return Math.floor(Math.min(r,Math.max(e,n)))}function Yu(e){return e.type==="touchmove"?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}Object.defineProperty(rt,"__esModule",{value:!0});var Xu=rt.createHorizontalStrength=Sl,Ju=rt.createVerticalStrength=yl,Qu=rt.createScrollingComponent=wl,Zu=rt.default=hf;rt.defaultVerticalStrength=rt.defaultHorizontalStrength=void 0;var cr=af(I),Jt=wr(rl),ef=$t,tf=wr(ju),Po=wr(Uu),rf=wr(xi),nf=Md,of=wr(Kc),Hr=xr;function wr(e){return e&&e.__esModule?e:{default:e}}function af(e){if(e&&e.__esModule)return e;var r={};if(e!=null){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};t.get||t.set?Object.defineProperty(r,n,t):r[n]=e[n]}}return r.default=e,r}function en(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?en=function(n){return typeof n}:en=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},en(e)}function sn(){return sn=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},sn.apply(this,arguments)}function lf(e,r){if(e==null)return{};var n=sf(e,r),t,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)t=o[i],!(r.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function sf(e,r){if(e==null)return{};var n={},t=Object.keys(e),i,o;for(o=0;o<t.length;o++)i=t[o],!(r.indexOf(i)>=0)&&(n[i]=e[i]);return n}function cf(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function df(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function uf(e,r,n){return r&&df(e.prototype,r),e}function ff(e,r){return r&&(en(r)==="object"||typeof r=="function")?r:ir(e)}function oi(e){return oi=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},oi(e)}function pf(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ai(e,r)}function ai(e,r){return ai=Object.setPrototypeOf||function(t,i){return t.__proto__=i,t},ai(e,r)}function ir(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var bl=150;function Sl(e){return function(n,t){var i=n.x,o=n.w,a=n.y,l=n.h,s=Math.min(o/2,e),c=t.x>=i&&t.x<=i+o,d=c&&t.y>=a&&t.y<=a+l;if(d){if(t.x<i+s)return(t.x-i-s)/s;if(t.x>i+o-s)return-(i+o-t.x-s)/s}return 0}}function yl(e){return function(n,t){var i=n.y,o=n.h,a=n.x,l=n.w,s=Math.min(o/2,e),c=t.y>=i&&t.y<=i+o,d=c&&t.x>=a&&t.x<=a+l;if(d){if(t.y<i+s)return(t.y-i-s)/s;if(t.y>i+o-s)return-(i+o-t.y-s)/s}return 0}}var Cl=Sl(bl);rt.defaultHorizontalStrength=Cl;var xl=yl(bl);rt.defaultVerticalStrength=xl;function wl(e){var r=function(n){pf(t,n);function t(i,o){var a;return cf(this,t),a=ff(this,oi(t).call(this,i,o)),Qt(ir(ir(a)),"updateScrolling",(0,tf.default)(function(l){var s=a.container.getBoundingClientRect(),c=s.left,d=s.top,u=s.width,f=s.height,p={x:c,y:d,w:u,h:f},h=(0,Hr.getCoords)(l),g=a.props,v=g.horizontalStrength,m=g.verticalStrength;a.scaleX=v(p,h),a.scaleY=m(p,h),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),Qt(ir(ir(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=cr.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return uf(t,[{key:"componentDidMount",value:function(){var o=this;this.container=(0,ef.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 a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return o.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 o=this.props.dragDropManager,a=o.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(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 o=this,a=0,l=function s(){var c=o.scaleX,d=o.scaleY,u=o.container,f=o.props,p=f.strengthMultiplier,h=f.onScrollChange;if(p===0||c+d===0){o.stopScrolling();return}if(a+=1,a%2){var g=u.scrollLeft,v=u.scrollTop,m=u.scrollWidth,b=u.scrollHeight,S=u.clientWidth,T=u.clientHeight,O=c?u.scrollLeft=(0,Hr.intBetween)(0,m-S,g+c*p):g,w=d?u.scrollTop=(0,Hr.intBetween)(0,b-T,v+d*p):v;h(O,w)}o.frame=(0,Po.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Po.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var o=this.props;o.strengthMultiplier,o.verticalStrength,o.horizontalStrength,o.onScrollChange;var a=lf(o,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return cr.default.createElement(e,sn({ref:this.wrappedInstance},a))}}]),t}(cr.Component);return Qt(r,"displayName","Scrolling(".concat((0,rf.default)(e),")")),Qt(r,"propTypes",{dragDropManager:Jt.default.object.isRequired,onScrollChange:Jt.default.func,verticalStrength:Jt.default.func,horizontalStrength:Jt.default.func,strengthMultiplier:Jt.default.number}),Qt(r,"defaultProps",{onScrollChange:Hr.noop,verticalStrength:xl,horizontalStrength:Cl,strengthMultiplier:30}),(0,of.default)(r,e)}function hf(e){var r=wl(e);return function(n){return cr.default.createElement(nf.DragDropContextConsumer,null,function(t){var i=t.dragDropManager;return i===void 0?null:cr.default.createElement(r,sn({},n,{dragDropManager:i}))})}}var gf=Bd();const ve=$e(gf);var vf=Fd();const Se=$e(vf);var mf=Gd();const Le=$e(mf);var bf=jd();const Ae=$e(bf);var Sf=Wd();const k=$e(Sf);var yf=Hd();const ke=$e(yf);var Cf=$d();const N=$e(Cf);function Il(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function Rl(e){function r(n){var t=this.constructor.getDerivedStateFromProps(e,n);return t??null}this.setState(r.bind(this))}function Dl(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}}Il.__suppressDeprecationWarning=!0;Rl.__suppressDeprecationWarning=!0;Dl.__suppressDeprecationWarning=!0;function Ir(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?`
|
|
@@ -16,7 +16,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStat
|
|
|
16
16
|
`+i:"")+`
|
|
17
17
|
|
|
18
18
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
19
|
-
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=Jl,r.componentWillReceiveProps=Ql),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=Zl;var l=r.componentDidUpdate;r.componentDidUpdate=function(c,d,u){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;l.call(this,c,d,f)}}return e}function es(e){var r=e.targetIndex,n=e.node,t=e.currentIndex,i=e.getNodeKey,o=e.path,a=o===void 0?[]:o,l=e.lowerSiblingCounts,s=l===void 0?[]:l,c=e.ignoreCollapsed,d=c===void 0?!0:c,u=e.isPseudoRoot,f=u===void 0?!1:u,p=f?[]:[].concat(se(a),[i({node:n,treeIndex:t})]);if(t===r)return{node:n,lowerSiblingCounts:s,path:p};if(!n.children||d&&n.expanded!==!0)return{nextIndex:t+1};for(var h=t+1,g=n.children.length,v=0;v<g;v+=1){var m=es({ignoreCollapsed:d,getNodeKey:i,targetIndex:r,node:n.children[v],currentIndex:h,lowerSiblingCounts:[].concat(se(s),[g-v-1]),path:p});if(m.node)return m;h=m.nextIndex}return{nextIndex:h}}function Oi(e){var r=e.node,n=e.ignoreCollapsed,t=n===void 0?!0:n;return es({getNodeKey:function(){},ignoreCollapsed:t,node:r,currentIndex:0,targetIndex:-1}).nextIndex-1}function ts(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,l=e.parentNode,s=l===void 0?null:l,c=e.currentIndex,d=e.path,u=d===void 0?[]:d,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=o?[]:[].concat(se(u),[n({node:a,treeIndex:c})]),g=o?null:{node:a,parentNode:s,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var v=r(g);if(v===!1)return!1}if(!a.children||a.expanded!==!0&&t&&!o)return c;var m=c,b=a.children.length;if(typeof a.children!="function"){for(var S=0;S<b;S+=1)if(m=ts({callback:r,getNodeKey:n,ignoreCollapsed:t,node:a.children[S],parentNode:o?null:a,currentIndex:m+1,lowerSiblingCounts:[].concat(se(p),[b-S-1]),path:h}),m===!1)return!1}return m}function rs(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,l=e.parentNode,s=l===void 0?null:l,c=e.currentIndex,d=e.path,u=d===void 0?[]:d,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=Q({},a),g=o?[]:[].concat(se(u),[n({node:h,treeIndex:c})]),v={node:h,parentNode:s,path:g,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&t&&!o)return{treeIndex:c,node:r(v)};var m=c,b=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(S,T){var O=rs({callback:r,getNodeKey:n,ignoreCollapsed:t,node:S,parentNode:o?null:h,currentIndex:m+1,lowerSiblingCounts:[].concat(se(p),[b-T-1]),path:g});return m=O.treeIndex,O.node})),{node:r(v),treeIndex:m}}function ns(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;!r||r.length<1||ts({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function kp(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;return!r||r.length<1?[]:rs({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function zp(e){var r=e.treeData,n=e.expanded,t=n===void 0?!0:n;return kp({treeData:r,callback:function(o){var a=o.node;return Q(Q({},a),{},{expanded:t})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function lr(e){var r=e.treeData,n=e.path,t=e.newNode,i=e.getNodeKey,o=e.ignoreCollapsed,a=o===void 0?!0:o,l="RESULT_MISS",s=function d(u){var f=u.isPseudoRoot,p=f===void 0?!1:f,h=u.node,g=u.currentTreeIndex,v=u.pathIndex;if(!p&&i({node:h,treeIndex:g})!==n[v])return l;if(v>=n.length-1)return typeof t=="function"?t({node:h,treeIndex:g}):t;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var m=g+1,b=0;b<h.children.length;b+=1){var S=d({node:h.children[b],currentTreeIndex:m,pathIndex:v+1});if(S!==l)return S?Q(Q({},h),{},{children:[].concat(se(h.children.slice(0,b)),[S],se(h.children.slice(b+1)))}):Q(Q({},h),{},{children:[].concat(se(h.children.slice(0,b)),se(h.children.slice(b+1)))});m+=1+Oi({node:h.children[b],ignoreCollapsed:a})}return l},c=s({node:{children:r},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===l)throw new Error("No node found at the given path.");return c.children}function Bp(e){var r=e.treeData,n=e.path,t=e.getNodeKey,i=e.ignoreCollapsed,o=i===void 0?!0:i,a=null,l=null,s=lr({treeData:r,path:n,getNodeKey:t,ignoreCollapsed:o,newNode:function(d){var u=d.node,f=d.treeIndex;return a=u,l=f,null}});return{treeData:s,node:a,treeIndex:l}}function is(e){var r=e.targetDepth,n=e.minimumTreeIndex,t=e.newNode,i=e.ignoreCollapsed,o=e.expandParent,a=e.isPseudoRoot,l=a===void 0?!1:a,s=e.isLastChild,c=e.node,d=e.currentIndex,u=e.currentDepth,f=e.getNodeKey,p=e.path,h=p===void 0?[]:p,g=function(Y){return l?[]:[].concat(se(h),[f({node:Y,treeIndex:d})])};if(d>=n-1||s&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var v=o?{expanded:!0}:{},m=Q(Q(Q({},c),v),{},{children:c.children?[t].concat(se(c.children)):[t]});return{node:m,nextIndex:d+2,insertedTreeIndex:d+1,parentPath:g(m),parentNode:l?null:m}}if(u>=r-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!l)return{node:c,nextIndex:d+1};for(var b=d+1,S=null,T=null,O=0;O<c.children.length;O+=1){if(b>=n){S=b,T=O;break}b+=1+Oi({node:c.children[O],ignoreCollapsed:i})}if(T===null){if(b<n&&!s)return{node:c,nextIndex:b};S=b,T=c.children.length}var w=Q(Q({},c),{},{children:[].concat(se(c.children.slice(0,T)),[t],se(c.children.slice(T)))});return{node:w,nextIndex:b,insertedTreeIndex:S,parentPath:g(w),parentNode:l?null:w}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!l)return{node:c,nextIndex:d+1};var P=null,C=null,_=null,y=d+1,M=c.children;typeof M!="function"&&(M=M.map(function(H,Y){if(P!==null)return H;var K=is({targetDepth:r,minimumTreeIndex:n,newNode:t,ignoreCollapsed:i,expandParent:o,isLastChild:s&&Y===M.length-1,node:H,currentIndex:y,currentDepth:u+1,getNodeKey:f,path:[]});return"insertedTreeIndex"in K&&(P=K.insertedTreeIndex,_=K.parentNode,C=K.parentPath),y=K.nextIndex,K.node}));var z=Q(Q({},c),{},{children:M}),j={node:z,nextIndex:y};return P!==null&&(j.insertedTreeIndex=P,j.parentPath=[].concat(se(g(z)),se(C)),j.parentNode=_),j}function os(e){var r=e.treeData,n=e.depth,t=e.minimumTreeIndex,i=e.newNode,o=e.getNodeKey,a=o===void 0?function(){}:o,l=e.ignoreCollapsed,s=l===void 0?!0:l,c=e.expandParent,d=c===void 0?!1:c;if(!r&&n===0)return{treeData:[i],treeIndex:0,path:[a({node:i,treeIndex:0})],parentNode:null};var u=is({targetDepth:n,minimumTreeIndex:t,newNode:i,ignoreCollapsed:s,expandParent:d,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:r},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in u))throw new Error("No suitable position found to insert.");var f=u.insertedTreeIndex;return{treeData:u.node.children,treeIndex:f,path:[].concat(se(u.parentPath),[a({node:i,treeIndex:f})]),parentNode:u.parentNode}}function Fp(e){var r=e.treeData,n=e.getNodeKey,t=e.ignoreCollapsed,i=t===void 0?!0:t;if(!r||r.length<1)return[];var o=[];return ns({treeData:r,getNodeKey:n,ignoreCollapsed:i,callback:function(l){o.push(l)}}),o}function as(e,r){return!!e.children&&typeof e.children!="function"&&e.children.some(function(n){return n===r||as(n,r)})}function ls(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?typeof e.children=="function"?r+1:e.children.reduce(function(n,t){return Math.max(n,ls(t,r+1))},r):r}function Gp(e){var r=e.getNodeKey,n=e.treeData,t=e.searchQuery,i=e.searchMethod,o=e.searchFocusOffset,a=e.expandAllMatchPaths,l=a===void 0?!1:a,s=e.expandFocusMatchPaths,c=s===void 0?!0:s,d=0,u=function p(h){var g=h.isPseudoRoot,v=g===void 0?!1:g,m=h.node,b=h.currentIndex,S=h.path,T=S===void 0?[]:S,O=[],w=!1,P=!1,C=v?[]:[].concat(se(T),[r({node:m,treeIndex:b})]),_=v?null:{path:C,treeIndex:b},y=m.children&&typeof m.children!="function"&&m.children.length>0;!v&&i(Q(Q({},_),{},{node:m,searchQuery:t}))&&(d===o&&(P=!0),d+=1,w=!0);var M=b,z=Q({},m);return y&&(z.children=z.children.map(function(j){var H=p({node:j,currentIndex:M+1,path:C});return H.node.expanded?M=H.treeIndex:M+=1,(H.matches.length>0||H.hasFocusMatch)&&(O=[].concat(se(O),se(H.matches)),H.hasFocusMatch&&(P=!0),(l&&H.matches.length>0||(l||c)&&H.hasFocusMatch)&&(z.expanded=!0)),H.node})),!v&&!z.expanded&&(O=O.map(function(j){return Q(Q({},j),{},{treeIndex:null})})),w&&(O=[Q(Q({},_),{},{node:z})].concat(se(O))),{node:O.length>0?z:m,matches:O,hasFocusMatch:P,treeIndex:M}},f=u({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:f.matches,treeData:f.node.children}}function Oe(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.filter(Boolean).join(" ")}function jp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Ei=function(e){Sn(n,e);var r=jp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.scaffoldBlockPxWidth,a=i.toggleChildrenVisibility,l=i.connectDragPreview,s=i.connectDragSource,c=i.isDragging,d=i.canDrop,u=i.canDrag,f=i.node,p=i.title,h=i.subtitle,g=i.draggedNode,v=i.path,m=i.treeIndex,b=i.isSearchMatch,S=i.isSearchFocus,T=i.buttons,O=i.className,w=i.style,P=i.didDrop;i.treeId,i.isOver,i.parentNode;var C=i.rowDirection,_=Pi(i,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),y=p||f.title,M=h||f.subtitle,z=C==="rtl"?"rst__rtl":null,j;u&&(typeof f.children=="function"&&f.expanded?j=$.createElement("div",{className:"rst__loadingHandle"},$.createElement("div",{className:"rst__loadingCircle"},se(new Array(12)).map(function(J,oe){return $.createElement("div",{key:oe,className:Oe("rst__loadingCirclePoint",z)})}))):j=s($.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var H=g&&as(g,f),Y=!P&&c,K={left:-.5*o};return C==="rtl"&&(K={right:-.5*o}),$.createElement("div",st({style:{height:"100%"}},_),a&&f.children&&(f.children.length>0||typeof f.children=="function")&&$.createElement("div",null,$.createElement("button",{type:"button","aria-label":f.expanded?"Collapse":"Expand",className:Oe(f.expanded?"rst__collapseButton":"rst__expandButton",z),style:K,onClick:function(){return a({node:f,path:v,treeIndex:m})}}),f.expanded&&!c&&$.createElement("div",{style:{width:o},className:Oe("rst__lineChildren",z)})),$.createElement("div",{className:Oe("rst__rowWrapper",z)},l($.createElement("div",{className:Oe("rst__row",Y&&"rst__rowLandingPad",Y&&!d&&"rst__rowCancelPad",b&&"rst__rowSearchMatch",S&&"rst__rowSearchFocus",z,O),style:Q({opacity:H?.5:1},w)},j,$.createElement("div",{className:Oe("rst__rowContents",!u&&"rst__rowContentsDragDisabled",z)},$.createElement("div",{className:Oe("rst__rowLabel",z)},$.createElement("span",{className:Oe("rst__rowTitle",f.subtitle&&"rst__rowTitleWithSubtitle")},typeof y=="function"?y({node:f,path:v,treeIndex:m}):y),M&&$.createElement("span",{className:"rst__rowSubtitle"},typeof M=="function"?M({node:f,path:v,treeIndex:m}):M)),$.createElement("div",{className:"rst__rowToolbar"},T.map(function(J,oe){return $.createElement("div",{key:oe,className:"rst__toolbarButton"},J)})))))))}}]),n}(I.Component);Ei.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Ei.propTypes={node:E.shape({}).isRequired,title:E.oneOfType([E.func,E.node]),subtitle:E.oneOfType([E.func,E.node]),path:E.arrayOf(E.oneOfType([E.string,E.number])).isRequired,treeIndex:E.number.isRequired,treeId:E.string.isRequired,isSearchMatch:E.bool,isSearchFocus:E.bool,canDrag:E.bool,scaffoldBlockPxWidth:E.number.isRequired,toggleChildrenVisibility:E.func,buttons:E.arrayOf(E.node),className:E.string,style:E.shape({}),connectDragPreview:E.func.isRequired,connectDragSource:E.func.isRequired,parentNode:E.shape({}),isDragging:E.bool.isRequired,didDrop:E.bool.isRequired,draggedNode:E.shape({}),isOver:E.bool.isRequired,canDrop:E.bool,rowDirection:E.string};var Ni=function(r){var n=r.isOver,t=r.canDrop;return $.createElement("div",{className:Oe("rst__placeholder",t&&"rst__placeholderLandingPad",t&&!n&&"rst__placeholderCancelPad")})};Ni.defaultProps={isOver:!1,canDrop:!1};Ni.propTypes={isOver:E.bool,canDrop:E.bool};function Wp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Mi=function(e){Sn(n,e);var r=Wp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.listIndex,l=i.swapFrom,s=i.swapLength,c=i.swapDepth,d=i.scaffoldBlockPxWidth,u=i.lowerSiblingCounts,f=i.connectDropTarget,p=i.isOver,h=i.draggedNode,g=i.canDrop,v=i.treeIndex;i.treeId,i.getPrevRow,i.node,i.path;var m=i.rowDirection,b=Pi(i,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),S=m==="rtl"?"rst__rtl":null,T=u.length,O=[];u.forEach(function(P,C){var _="";if(P>0?a===0?_="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":C===T-1?_="rst__lineHalfHorizontalRight rst__lineFullVertical":_="rst__lineFullVertical":a===0?_="rst__lineHalfHorizontalRight":C===T-1&&(_="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),O.push($.createElement("div",{key:"pre_".concat(1+C),style:{width:d},className:Oe("rst__lineBlock",_,S)})),v!==a&&C===c){var y="";a===l+s-1?y="rst__highlightBottomLeftCorner":v===l?y="rst__highlightTopLeftCorner":y="rst__highlightLineVertical";var M;m==="rtl"?M={width:d,right:d*C}:M={width:d,left:d*C},O.push($.createElement("div",{key:C,style:M,className:Oe("rst__absoluteLineBlock",y,S)}))}});var w;return m==="rtl"?w={right:d*T}:w={left:d*T},f($.createElement("div",st({},b,{className:Oe("rst__node",S)}),O,$.createElement("div",{className:"rst__nodeContent",style:w},I.Children.map(o,function(P){return I.cloneElement(P,{isOver:p,canDrop:g,draggedNode:h})}))))}}]),n}(I.Component);Mi.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};Mi.propTypes={treeIndex:E.number.isRequired,treeId:E.string.isRequired,swapFrom:E.number,swapDepth:E.number,swapLength:E.number,scaffoldBlockPxWidth:E.number.isRequired,lowerSiblingCounts:E.arrayOf(E.number).isRequired,listIndex:E.number.isRequired,children:E.node.isRequired,connectDropTarget:E.func.isRequired,isOver:E.bool.isRequired,canDrop:E.bool,draggedNode:E.shape({}),getPrevRow:E.func.isRequired,node:E.shape({}).isRequired,path:E.arrayOf(E.oneOfType([E.string,E.number])).isRequired,rowDirection:E.string};function Hp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Li=function(e){Sn(n,e);var r=Hp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.connectDropTarget;i.treeId,i.drop;var l=Pi(i,["children","connectDropTarget","treeId","drop"]);return a($.createElement("div",null,I.Children.map(o,function(s){return I.cloneElement(s,Q({},l))})))}}]),n}(I.Component);Li.defaultProps={canDrop:!1,draggedNode:null};Li.propTypes={children:E.node.isRequired,connectDropTarget:E.func.isRequired,isOver:E.bool.isRequired,canDrop:E.bool,draggedNode:E.shape({}),treeId:E.string.isRequired,drop:E.func.isRequired};function $p(e){var r=e.treeIndex;return r}function ss(e){return typeof e=="string"?e:e===null||zt(e)!=="object"||!e.props||!e.props.children||typeof e.props.children!="string"&&zt(e.props.children)!=="object"?"":typeof e.props.children=="string"?e.props.children:e.props.children.map(function(r){return ss(r)}).join("")}function fa(e,r,n,t,i){return typeof n[e]=="function"?String(n[e]({node:n,path:t,treeIndex:i})).indexOf(r)>-1:zt(n[e])==="object"?ss(n[e]).indexOf(r)>-1:n[e]&&String(n[e]).indexOf(r)>-1}function Up(e){var r=e.node,n=e.path,t=e.treeIndex,i=e.searchQuery;return fa("title",i,r,n,t)||fa("subtitle",i,r,n,t)}var Ai=function(r){var n=[],t=[],i=null;return function(o){var a=Object.keys(o).sort(),l=a.map(function(s){return o[s]});return(l.length!==n.length||l.some(function(s,c){return s!==n[c]})||a.some(function(s,c){return s!==t[c]}))&&(n=l,t=a,i=r(o)),i}},ci=Ai(os),Vp=Ai(Fp),qp=Ai(Oi),Kp=function(){function e(r){Dr(this,e),this.treeRef=r}return Tr(e,[{key:"getTargetDepth",value:function(n,t,i){var o=0,a=n.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),o=Math.min(l.length,n.path.length)}var c,d=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(d=0,i){var u=$t.findDOMNode(i).getBoundingClientRect(),f=t.getSourceClientOffset().x-u.left;c=Math.round(f/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*t.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,d+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var g=t.getItem().node,v=ls(g);h=Math.max(0,Math.min(h,this.maxDepth-v-1))}return h}},{key:"canDrop",value:function(n,t){if(!t.isOver())return!1;var i=n.getPrevRow(),o=i?i.path:[],a=i?i.node:{},l=this.getTargetDepth(n,t,null);if(l>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=t.getItem(),c=s.node,d=ci({treeData:this.treeData,newNode:c,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:d.path,nextParent:d.parentNode,nextTreeIndex:d.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var t=this,i={beginDrag:function(l){return t.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){t.endDrag(s.getDropResult())},isDragging:function(l,s){var c=s.getItem().node,d=l.node;return d===c}};function o(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Ad(this.dndType,i,o)(n)}},{key:"wrapTarget",value:function(n){var t=this,i={drop:function(l,s,c){var d={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:t.treeId,minimumTreeIndex:l.treeIndex,depth:t.getTargetDepth(l,s,c)};return t.drop(d),d},hover:function(l,s,c){var d=t.getTargetDepth(l,s,c),u=s.getItem().node,f=l.node!==u||d!==l.path.length-1;f&&(cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.dragHover({node:u,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:d})}))},canDrop:this.canDrop.bind(this)};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return So(this.dndType,i,o)(n)}},{key:"wrapPlaceholder",value:function(n){var t=this,i={drop:function(l,s){var c=s.getItem(),d=c.node,u=c.path,f=c.treeIndex,p={node:d,path:u,treeIndex:f,treeId:t.treeId,minimumTreeIndex:0,depth:0};return t.drop(p),p}};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return So(this.dndType,i,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),e}();function Yp(e,r,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=[].concat(se(e.slice(0,r)),se(e.slice(r+t)));return[].concat(se(i.slice(0,n)),se(e.slice(r,r+t)),se(i.slice(n)))}function Xp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var pa=1,Hn=function(r){var n=Q(Q({},r),{},{style:Q(Q({},r.theme.style),r.style),innerStyle:Q(Q({},r.theme.innerStyle),r.innerStyle),reactVirtualizedListProps:Q(Q({},r.theme.reactVirtualizedListProps),r.reactVirtualizedListProps)}),t={nodeContentRenderer:Ei,placeholderRenderer:Ni,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:Mi};return Object.keys(t).forEach(function(i){r[i]===null&&(n[i]=typeof r.theme[i]<"u"?r.theme[i]:t[i])}),n},Cn=function(e){Sn(n,e);var r=Xp(n);function n(t){var i;Dr(this,n),i=r.call(this,t);var o=Hn(t),a=o.dndType,l=o.nodeContentRenderer,s=o.treeNodeRenderer,c=o.isVirtualized,d=o.slideRegionSize;return i.dndManager=new Kp(Ze(i)),i.treeId="rst__".concat(pa),pa+=1,i.dndType=a||i.treeId,i.nodeContentRenderer=i.dndManager.wrapSource(l),i.treePlaceholderRenderer=i.dndManager.wrapPlaceholder(Li),i.treeNodeRenderer=i.dndManager.wrapTarget(s),c&&(i.scrollZoneVirtualList=(Qu||Zu)(Ll),i.vStrength=Ju(d),i.hStrength=Xu(d)),i.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},i.toggleChildrenVisibility=i.toggleChildrenVisibility.bind(Ze(i)),i.moveNode=i.moveNode.bind(Ze(i)),i.startDrag=i.startDrag.bind(Ze(i)),i.dragHover=i.dragHover.bind(Ze(i)),i.endDrag=i.endDrag.bind(Ze(i)),i.drop=i.drop.bind(Ze(i)),i.handleDndMonitorChange=i.handleDndMonitorChange.bind(Ze(i)),i}return Tr(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var i=n.search(this.props,this.state,!0,!0,!1);this.setState(i),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(i,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(i){return Vp({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:i})}},{key:"handleDndMonitorChange",value:function(){var i=this.props.dragDropManager.getMonitor();!i.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(i){var o=i.node,a=i.path,l=this.state.instanceProps,s=lr({treeData:l.treeData,path:a,newNode:function(d){var u=d.node;return Q(Q({},u),{},{expanded:!u.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(i){var o=i.node,a=i.path,l=i.treeIndex,s=i.depth,c=i.minimumTreeIndex,d=os({treeData:this.state.draggingTreeData,newNode:o,depth:s,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),u=d.treeData,f=d.treeIndex,p=d.path,h=d.parentNode;this.props.onChange(u),this.props.onMoveNode({treeData:u,node:o,treeIndex:f,path:p,nextPath:p,nextTreeIndex:f,prevPath:a,prevTreeIndex:l,nextParentNode:h})}},{key:"startDrag",value:function(i){var o=this,a=i.path;this.setState(function(l){var s=Bp({treeData:l.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=s.treeData,d=s.node,u=s.treeIndex;return{draggingTreeData:c,draggedNode:d,draggedDepth:a.length-1,draggedMinimumTreeIndex:u,dragging:!0}})}},{key:"dragHover",value:function(i){var o=this,a=i.node,l=i.depth,s=i.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(c){var d=c.draggingTreeData,u=c.instanceProps,f=d||u.treeData,p=ci({treeData:f,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),g=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:lr({treeData:f,path:g.slice(0,-1),newNode:function(m){var b=m.node;return Q(Q({},b),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(i){var o=this,a=this.state.instanceProps,l=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!i)l();else if(i.treeId!==this.treeId){var s=i.node,c=i.path,d=i.treeIndex,u=this.props.shouldCopyOnOutsideDrop;typeof u=="function"&&(u=u({node:s,prevTreeIndex:d,prevPath:c}));var f=this.state.draggingTreeData||a.treeData;u&&(f=lr({treeData:a.treeData,path:c,newNode:function(h){var g=h.node;return Q({},g)},getNodeKey:this.props.getNodeKey})),this.props.onChange(f),this.props.onMoveNode({treeData:f,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:d})}}},{key:"drop",value:function(i){this.moveNode(i)}},{key:"canNodeHaveChildren",value:function(i){var o=this.props.canNodeHaveChildren;return o?o(i):!0}},{key:"renderRow",value:function(i,o){var a=o.listIndex,l=o.style,s=o.getPrevRow,c=o.matchKeys,d=o.swapFrom,u=o.swapDepth,f=o.swapLength,p=i.node,h=i.parentNode,g=i.path,v=i.lowerSiblingCounts,m=i.treeIndex,b=Hn(this.props),S=b.canDrag,T=b.generateNodeProps,O=b.scaffoldBlockPxWidth,w=b.searchFocusOffset,P=b.rowDirection,C=this.treeNodeRenderer,_=this.nodeContentRenderer,y=g[g.length-1],M=y in c,z=M&&c[y]===w,j={node:p,parentNode:h,path:g,lowerSiblingCounts:v,treeIndex:m,isSearchMatch:M,isSearchFocus:z},H=T?T(j):{},Y=typeof S!="function"?S:S(j),K={treeIndex:m,scaffoldBlockPxWidth:O,node:p,path:g,treeId:this.treeId,rowDirection:P};return $.createElement(C,st({style:l,key:y,listIndex:a,getPrevRow:s,lowerSiblingCounts:v,swapFrom:d,swapLength:f,swapDepth:u},K),$.createElement(_,st({parentNode:h,isSearchMatch:M,isSearchFocus:z,canDrag:Y,toggleChildrenVisibility:this.toggleChildrenVisibility},K,H)))}},{key:"render",value:function(){var i=this,o=Hn(this.props),a=o.dragDropManager,l=o.style,s=o.className,c=o.innerStyle,d=o.rowHeight,u=o.isVirtualized,f=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,g=o.rowDirection,v=this.state,m=v.searchMatches,b=v.searchFocusTreeIndex,S=v.draggedNode,T=v.draggedDepth,O=v.draggedMinimumTreeIndex,w=v.instanceProps,P=this.state.draggingTreeData||w.treeData,C=g==="rtl"?"rst__rtl":null,_,y=null,M=null;if(S&&O!==null){var z=ci({treeData:P,newNode:S,depth:T,minimumTreeIndex:O,expandParent:!0,getNodeKey:h}),j=O;y=z.treeIndex,M=1+qp({node:S}),_=Yp(this.getRows(z.treeData),y,j,M)}else _=this.getRows(P);var H={};m.forEach(function(le,ee){var X=le.path;H[X[X.length-1]]=ee});var Y=b!==null?{scrollToIndex:b}:{},K=l,J;if(_.length<1){var oe=this.treePlaceholderRenderer,de=f;J=$.createElement(oe,{treeId:this.treeId,drop:this.drop},$.createElement(de,null))}else if(u){K=Q({height:"100%"},K);var ue=this.scrollZoneVirtualList;J=$.createElement(El,null,function(le){var ee=le.height,X=le.width;return $.createElement(ue,st({},Y,{dragDropManager:a,verticalStrength:i.vStrength,horizontalStrength:i.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:X,onScroll:function(B){var W=B.scrollTop;i.scrollTop=W},height:ee,style:c,rowCount:_.length,estimatedRowSize:typeof d!="function"?d:void 0,rowHeight:typeof d!="function"?d:function(ae){var B=ae.index;return d({index:B,treeIndex:B,node:_[B].node,path:_[B].path})},rowRenderer:function(B){var W=B.index,A=B.style;return i.renderRow(_[W],{listIndex:W,style:A,getPrevRow:function(){return _[W-1]||null},matchKeys:H,swapFrom:y,swapDepth:T,swapLength:M})}},p))})}else J=_.map(function(le,ee){return i.renderRow(le,{listIndex:ee,style:{height:typeof d!="function"?d:d({index:ee,treeIndex:ee,node:le.node,path:le.path})},getPrevRow:function(){return _[ee-1]||null},matchKeys:H,swapFrom:y,swapDepth:T,swapLength:M})});return $.createElement("div",{className:Oe("rst__tree",s,C),style:K},J)}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.instanceProps,l={},s=bo(a.treeData,i.treeData);return a.treeData=i.treeData,s?bo(a.searchQuery,i.searchQuery)?a.searchFocusOffset!==i.searchFocusOffset&&Object.assign(l,n.search(i,o,!0,!0,!0)):Object.assign(l,n.search(i,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,n.loadLazyChildren(i,o),Object.assign(l,n.search(i,o,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=i.searchQuery,a.searchFocusOffset=i.searchFocusOffset,l.instanceProps=Q(Q({},a),l.instanceProps),l}},{key:"search",value:function(i,o,a,l,s){var c=i.onChange,d=i.getNodeKey,u=i.searchFinishCallback,f=i.searchQuery,p=i.searchMethod,h=i.searchFocusOffset,g=i.onlyExpandSearchedNodes,v=o.instanceProps;if(!f&&!p)return u&&u([]),{searchMatches:[]};var m={instanceProps:{}},b=Gp({getNodeKey:d,treeData:g?zp({treeData:v.treeData,expanded:!1}):v.treeData,searchQuery:f,searchMethod:p||Up,searchFocusOffset:h,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),S=b.treeData,T=b.matches;l&&(m.instanceProps.ignoreOneTreeUpdate=!0,c(S)),u&&u(T);var O=null;return a&&h!==null&&h<T.length&&(O=T[h].treeIndex),m.searchMatches=T,m.searchFocusTreeIndex=O,m}},{key:"loadLazyChildren",value:function(i,o){var a=o.instanceProps;ns({treeData:a.treeData,getNodeKey:i.getNodeKey,callback:function(s){var c=s.node,d=s.path,u=s.lowerSiblingCounts,f=s.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||i.loadCollapsedLazyChildren)&&c.children({node:c,path:d,lowerSiblingCounts:u,treeIndex:f,done:function(h){return i.onChange(lr({treeData:a.treeData,path:d,newNode:function(v){var m=v.node;return m===c?Q(Q({},m),{},{children:h}):m},getNodeKey:i.getNodeKey}))}})}})}}]),n}(I.Component);Cn.propTypes={dragDropManager:E.shape({getMonitor:E.func}).isRequired,treeData:E.arrayOf(E.object).isRequired,style:E.shape({}),className:E.string,innerStyle:E.shape({}),rowHeight:E.oneOfType([E.number,E.func]),slideRegionSize:E.number,reactVirtualizedListProps:E.shape({}),scaffoldBlockPxWidth:E.number,maxDepth:E.number,searchMethod:E.func,searchQuery:E.any,searchFocusOffset:E.number,searchFinishCallback:E.func,generateNodeProps:E.func,isVirtualized:E.bool,treeNodeRenderer:E.func,nodeContentRenderer:E.func,placeholderRenderer:E.func,theme:E.shape({style:E.shape({}),innerStyle:E.shape({}),reactVirtualizedListProps:E.shape({}),scaffoldBlockPxWidth:E.number,slideRegionSize:E.number,rowHeight:E.oneOfType([E.number,E.func]),treeNodeRenderer:E.func,nodeContentRenderer:E.func,placeholderRenderer:E.func}),getNodeKey:E.func,onChange:E.func.isRequired,onMoveNode:E.func,canDrag:E.oneOfType([E.func,E.bool]),canDrop:E.func,canNodeHaveChildren:E.func,shouldCopyOnOutsideDrop:E.oneOfType([E.func,E.bool]),onVisibilityToggle:E.func,dndType:E.string,onDragStateChanged:E.func,onlyExpandSearchedNodes:E.bool,rowDirection:E.string};Cn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:$p,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};Ap(Cn);var Jp=function(r){return $.createElement(Ld.Consumer,null,function(n){var t=n.dragDropManager;return t===void 0?null:$.createElement(Cn,st({},r,{dragDropManager:t}))})},cs={exports:{}};function Qp(e,r){if(e==null)return{};var n,t,i=pr(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $n(e){return e&&Xc(e)==="object"&&e.constructor===Object}function ds(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},t=n.clone?U({},e):e;return $n(e)&&$n(r)&&Object.keys(r).forEach(function(i){i!=="__proto__"&&($n(r[i])&&i in e?t[i]=ds(e[i],r[i],n):t[i]=r[i])}),t}function us(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.baseClasses,n=e.newClasses;if(e.Component,!n)return r;var t=U({},r);return Object.keys(n).forEach(function(i){n[i]&&(t[i]="".concat(r[i]," ").concat(n[i]))}),t}var Lt={set:function(r,n,t,i){var o=r.get(n);o||(o=new Map,r.set(n,o)),o.set(t,i)},get:function(r,n,t){var i=r.get(n);return i?i.get(t):void 0},delete:function(r,n,t){var i=r.get(n);i.delete(t)}},Zp=$.createContext(null);function eh(){var e=$.useContext(Zp);return e}var th=typeof Symbol=="function"&&Symbol.for;const rh=th?Symbol.for("mui.nested"):"__THEME_NESTED__";var nh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function ih(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.disableGlobal,n=r===void 0?!1:r,t=e.productionPrefix,i=t===void 0?"jss":t,o=e.seed,a=o===void 0?"":o,l=a===""?"":"".concat(a,"-"),s=0,c=function(){return s+=1,s};return function(d,u){var f=u.options.name;if(f&&f.indexOf("Mui")===0&&!u.options.link&&!n){if(nh.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var p="".concat(l).concat(f,"-").concat(d.key);return!u.options.theme[rh]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(l).concat(i).concat(c())}}function oh(){return{plugins:[Jc(),Qc(),Zc(),ed(),td(),typeof window>"u"?null:rd(),nd()]}}var ah=id(oh()),lh=ih(),sh=new Map,ch={disableGeneration:!1,generateClassName:lh,jss:ah,sheetsCache:null,sheetsManager:sh,sheetsRegistry:null},dh=$.createContext(ch),ha=-1e9;function uh(){return ha+=1,ha}var fh={};function ph(e){var r=typeof e=="function";return{create:function(t,i){var o;try{o=r?e(t):e}catch(s){throw s}if(!i||!t.overrides||!t.overrides[i])return o;var a=t.overrides[i],l=U({},o);return Object.keys(a).forEach(function(s){l[s]=ds(l[s],a[s])}),l},options:{}}}function hh(e,r,n){var t=e.state,i=e.stylesOptions;if(i.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,o=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,o=!0),o&&(t.cacheClasses.value=us({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:n})),t.cacheClasses.value}function gh(e,r){var n=e.state,t=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var l=Lt.get(i.sheetsManager,o,t);l||(l={refs:0,staticSheet:null,dynamicStyles:null},Lt.set(i.sheetsManager,o,t,l));var s=U({},o.options,i,{theme:t,flip:typeof i.flip=="boolean"?i.flip:t.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var c=i.sheetsRegistry;if(l.refs===0){var d;i.sheetsCache&&(d=Lt.get(i.sheetsCache,o,t));var u=o.create(t,a);d||(d=i.jss.createStyleSheet(u,U({link:!1},s)),d.attach(),i.sheetsCache&&Lt.set(i.sheetsCache,o,t,d)),c&&c.add(d),l.staticSheet=d,l.dynamicStyles=od(u)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,U({link:!0},s));f.update(r),f.attach(),n.dynamicSheet=f,n.classes=us({baseClasses:l.staticSheet.classes,newClasses:f.classes}),c&&c.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function vh(e,r){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(r)}function mh(e){var r=e.state,n=e.theme,t=e.stylesOptions,i=e.stylesCreator;if(!t.disableGeneration){var o=Lt.get(t.sheetsManager,i,n);o.refs-=1;var a=t.sheetsRegistry;o.refs===0&&(Lt.delete(t.sheetsManager,i,n),t.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),r.dynamicSheet&&(t.jss.removeStyleSheet(r.dynamicSheet),a&&a.remove(r.dynamicSheet))}}function bh(e,r){var n=$.useRef([]),t,i=$.useMemo(function(){return{}},r);n.current!==i&&(n.current=i,t=e()),$.useEffect(function(){return function(){t&&t()}},[i])}function Sh(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.name,t=r.classNamePrefix,i=r.Component,o=r.defaultTheme,a=o===void 0?fh:o,l=Qp(r,["name","classNamePrefix","Component","defaultTheme"]),s=ph(e),c=n||t||"makeStyles";s.options={index:uh(),name:n,meta:c,classNamePrefix:c};var d=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=eh()||a,h=U({},$.useContext(dh),l),g=$.useRef(),v=$.useRef();bh(function(){var b={name:n,state:{},stylesCreator:s,stylesOptions:h,theme:p};return gh(b,f),v.current=!1,g.current=b,function(){mh(b)}},[p,s]),$.useEffect(function(){v.current&&vh(g.current,f),v.current=!0});var m=hh(g.current,f.classes,i);return m};return d}const yh=Object.freeze(Object.defineProperty({__proto__:null,default:Sh},Symbol.toStringTag,{value:"Module"})),Ch=vn(yh);(function(e,r){(function(n,t){e.exports=t()})(typeof self<"u"?self:et,function(){return function(n){function t(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=n,t.c=i,t.d=function(o,a,l){t.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:l})},t.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(a,"a",a),a},t.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},t.p="",t(t.s=3)}([function(n,t){n.exports=I},function(n,t){n.exports=rl},function(n,t){n.exports=Ch},function(n,t,i){function o(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(4),l=o(a),s=i(6),c=o(s);t.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,t,i){function o(b){return b&&b.__esModule?b:{default:b}}function a(b,S){return!!b.children&&typeof b.children!="function"&&b.children.some(function(T){return T===S||a(T,S)})}function l(b){var S=b.scaffoldBlockPxWidth,T=b.connectDragPreview,O=b.connectDragSource,w=b.isDragging,P=b.canDrop,C=b.canDrag,_=b.node,y=b.title,M=b.draggedNode,z=b.path,j=b.treeIndex,H=b.isSearchMatch,Y=b.isSearchFocus,K=b.icons,J=b.buttons,oe=b.className,de=b.style,ue=b.didDrop,le=b.lowerSiblingCounts,ee=b.listIndex,X=b.swapFrom,ae=b.swapLength,B=b.swapDepth,W=b.onItemClick,A=m(),x=y||_.title,D=M&&a(M,_),L=!ue&&w,G=[];le.forEach(function(Z,te){if(te>0&&(G.push(d.default.createElement("div",{className:A.lineBlock,key:"pre_"+(1+te),style:{width:S}})),j!==ee&&te===B)){var he="";he=ee===X+ae-1?A.highlightBottomLeftCorner:j===X?A.highlightTopLeftCorner:A.highlightLineVertical,G.push(d.default.createElement("div",{className:A.absoluteLineBlock+" "+he,key:"highlight_"+(1+te),style:{left:S*te,width:S}}))}});var V=d.default.createElement("div",{className:A.contentNode},T(d.default.createElement("div",{className:A.row+(_.active?" "+A.activeRow:"")+(L?" "+A.rowLandingPad:"")+(w?" "+A.rowLandingPadDisable:"")+(L&&!P?" "+A.rowCancelPad:"")+(H?" "+A.rowSearchMatch:"")+(Y?" "+A.rowSearchFocus:"")+(C?"":" "+A.rowWrapperDragDisabled)+(oe?" "+oe:""),onClick:function(){return W?W(s({},_,{index:j})):null},style:s({opacity:D?.5:1},de)},_.type==="divider"?d.default.createElement("div",{className:A.divider}):d.default.createElement(c.Fragment,null,G,d.default.createElement("div",{className:A.rowIcon},K),d.default.createElement("div",{className:A.rowLabel},typeof x=="string"?d.default.createElement("span",{className:A.rowTitle},x):typeof x=="function"?x({node:_,path:z,treeIndex:j}):x),d.default.createElement("div",{className:A.rowToolbar},J)))));return C?O(V,{dropEffect:"copy"}):V}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(b){for(var S=1;S<arguments.length;S++){var T=arguments[S];for(var O in T)Object.prototype.hasOwnProperty.call(T,O)&&(b[O]=T[O])}return b},c=i(0),d=o(c),u=i(1),f=o(u),p=i(2),h=o(p),g=i(5),v=o(g),m=(0,h.default)(v.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:f.default.node,canDrag:f.default.bool,canDrop:f.default.bool,className:f.default.string,connectDragPreview:f.default.func.isRequired,connectDragSource:f.default.func.isRequired,didDrop:f.default.bool.isRequired,draggedNode:f.default.shape({}),icons:f.default.node,isDragging:f.default.bool.isRequired,isOver:f.default.bool.isRequired,isSearchFocus:f.default.bool,isSearchMatch:f.default.bool,listIndex:f.default.number.isRequired,lowerSiblingCounts:f.default.arrayOf(f.default.number).isRequired,node:f.default.shape({}).isRequired,parentNode:f.default.shape({}),path:f.default.arrayOf(f.default.oneOfType([f.default.string,f.default.number])).isRequired,rowDirection:f.default.string.isRequired,scaffoldBlockPxWidth:f.default.number.isRequired,style:f.default.shape({}),swapDepth:f.default.number,swapFrom:f.default.number,swapLength:f.default.number,title:f.default.oneOfType([f.default.func,f.default.node]),toggleChildrenVisibility:f.default.func,treeId:f.default.string.isRequired,treeIndex:f.default.number.isRequired},t.default=l},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,t,i){function o(v){return v&&v.__esModule?v:{default:v}}function a(v){var m=v.children,b=v.listIndex,S=v.swapFrom,T=v.swapLength,O=v.swapDepth,w=v.lowerSiblingCounts,P=v.connectDropTarget,C=v.isOver,_=v.draggedNode,y=v.canDrop,M=g();return P(s.default.createElement("div",{className:M.node},l.Children.map(m,function(z){return(0,l.cloneElement)(z,{canDrop:y,draggedNode:_,isOver:C,listIndex:b,lowerSiblingCounts:w,swapDepth:O,swapFrom:S,swapLength:T})})))}Object.defineProperty(t,"__esModule",{value:!0});var l=i(0),s=o(l),c=i(1),d=o(c),u=i(2),f=o(u),p=i(7),h=o(p),g=(0,f.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:d.default.bool,children:d.default.node.isRequired,connectDropTarget:d.default.func.isRequired,draggedNode:d.default.shape({}),getPrevRow:d.default.func.isRequired,isOver:d.default.bool.isRequired,listIndex:d.default.number.isRequired,lowerSiblingCounts:d.default.arrayOf(d.default.number).isRequired,node:d.default.shape({}).isRequired,path:d.default.arrayOf(d.default.oneOfType([d.default.string,d.default.number])).isRequired,rowDirection:d.default.string.isRequired,scaffoldBlockPxWidth:d.default.number.isRequired,swapDepth:d.default.number,swapFrom:d.default.number,swapLength:d.default.number,treeId:d.default.string.isRequired,treeIndex:d.default.number.isRequired},t.default=a},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{node:{display:"flex"}}}}])})})(cs);var xh=cs.exports;const wh=$e(xh),Ih=e=>e.from!=="team-tmpl";function Rh({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ad(e.slice(0,t-1),r.slice(0,i-1)))}function fs({treeNode:e}){const{locale:r}=Ye(),{blocklet:n}=Rt(),t=n.environments.find(a=>a.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a!=null&&a.startsWith("/"))try{return new URL(a,t==null?void 0:t.value).href}catch{console.error("Failed to parse url",{url:a,origin:t==null?void 0:t.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return At(a)&&(s=a[r]),!I.isValidElement(l)&&At(l)&&(c=l[r]),R.jsxs(ne,{display:"flex",alignItems:"center",children:[R.jsx(je,{variant:"subtitle1",fontSize:16,children:s}),l&&R.jsx(je,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:c})]})}return R.jsxs(R.Fragment,{children:[e.icon&&(Si(i(e.icon))?R.jsx(yt,{size:16,style:{marginRight:4},icon:i(e.icon)}):R.jsx(Ie,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}fs.propTypes={treeNode:E.object.isRequired};const Dh=pt(ne)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function ki({treeData:e,setTreeData:r,renderActions:n}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),R.jsx(Dh,{children:R.jsx(kd,{backend:zd,...i,children:R.jsx(Jp,{generateNodeProps:o=>{const a=Ih(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?R.jsx(Ie,{icon:"ic:round-drag-indicator"}):R.jsx(ne,{width:16,height:16}),title:R.jsx(fs,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Rh,theme:wh})})})}ki.propTypes={treeData:E.object.isRequired,setTreeData:E.func,renderActions:E.func};ki.defaultProps={setTreeData:()=>{},renderActions:()=>{}};const rn="en";function zi({sx:e,onAdd:r,onChange:n,locale:t,locales:i,localeMap:o,onRemoveLocale:a}){const{t:l}=Ye(),s=I.useRef(),[c,d]=I.useState(null),u=Cr({localeList:[],inputLocale:"",localeError:""}),f=I.useMemo(()=>!!c,[c]),p=I.useMemo(()=>i.includes(t)?t:rn,[i,t]),h=I.useMemo(()=>Object.keys(sr(o,[...u.localeList,rn])).map(w=>({title:o[w],value:w})),[u.localeList]),g=I.useMemo(()=>{var P;return`Default (${o[rn]||((P=Object.values(o))==null?void 0:P[0])})`},[o]);I.useEffect(()=>{u.localeList=[...i]},[i,u]),Nd("enter",()=>{setTimeout(()=>{b()})},{target:s});function v(w){return w?w==="en"||u.localeList.includes(w)?l("navigation.form.localeExists",{value:w}):!0:l("common.requiredErrorText",{name:"Locale"})}function m(w=""){const P=w==null?void 0:w.trim(),C=v(P);return C!==!0?u.localeError=C:u.localeError="",C}function b(){var C;const w=(C=u.inputLocale)==null?void 0:C.trim();m(w)===!0&&(S(),u.localeList.push(w),r(w))}function S(){d(null),u.inputLocale="",u.localeError=""}function T(w,P){w.preventDefault(),w.stopPropagation(),u.localeList=hl(u.localeList,P),a(P)}function O(w){const{value:P}=w.target;m(P),u.inputLocale=P}return R.jsxs(R.Fragment,{children:[R.jsxs(nu,{sx:e,value:p,onChange:(w,P)=>{n(P)},children:[R.jsx(yo,{label:g,value:"en"}),u.localeList.map(w=>R.jsx(yo,{sx:{position:"relative"},label:R.jsxs(R.Fragment,{children:[o[w],R.jsx(He,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:P=>{T(P,w)},children:R.jsx(Ie,{icon:"mdi:close",height:14})})]}),value:w},w)),R.jsx(He,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:w=>{d(w.currentTarget)},children:R.jsx(Ie,{icon:"mdi:plus"})})]}),R.jsx(ti,{open:f,anchorEl:c,onClose:S,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:R.jsxs(ne,{sx:{p:2,width:"270px"},children:[R.jsx(je,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),R.jsx(ne,{mt:1,children:R.jsx(ii,{required:!0,fullWidth:!0,label:"Locale",value:u.inputLocale,options:h,onChange:O,error:!!u.localeError,helperText:u.localeError||" "})}),R.jsx(ne,{display:"flex",justifyContent:"flex-end",children:R.jsx(on,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}zi.propTypes={sx:E.any,onAdd:E.func,onChange:E.func,onRemoveLocale:E.func,locale:E.string,localeMap:E.object,locales:E.array};zi.defaultProps={sx:null,onAdd:()=>{},onChange:()=>{},onRemoveLocale:()=>{},locale:rn,localeMap:{},locales:[]};const Bi=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ps(e,r,n=5e3){for(const t of Bi){const i=It(t,e);try{return await ou.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 Th({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 ps("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const Vr=new Map;async function _h(e){if(Vr.has(e))return Vr.get(e);const r=(async()=>{var i;const{data:n}=await ps("/collection",{prefix:e}),t=new Set;return(i=n.uncategorized)==null||i.forEach(o=>t.add(`${e}:${o}`)),Object.values(n.categories??{}).forEach(o=>{o.forEach(a=>t.add(`${e}:${a}`))}),Array.from(t)})();Vr.set(e,r);try{return await r}catch(n){throw Vr.delete(e),n}}function Ph(e){return It(Bi[0],`${e}.svg`)}function Oh(e){try{const r=new URL(e);for(const n of Bi)if(r.origin===n)return ld(r.pathname).replace(".svg","");return""}catch{return""}}function Eh(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Si(e)&&(n=Oh(e))),{isIconId:r,iconId:n}}const Nh=I.lazy(()=>ud(()=>import("./index-Ce3dTL3G.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url).then(e=>({default:e.Uploader}))),ga=yi(yt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function hs({icon:e,...r}){const[n,t]=I.useState(!1);return il(async()=>{t(!1),await ol(e),t(!0)},[e]),e?n?R.jsx(Ie,{icon:e,...r}):R.jsx(Ie,{color:"#f06f6e",icon:"ic:baseline-error",...r}):R.jsx(Ie,{icon:"material-symbols-light:select-rounded",...r})}hs.propTypes={icon:E.string.isRequired};function di({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){var ee;const{getSessionInHeader:l,prefix:s,inService:c}=nl(),{blocklet:d}=Rt(),u=Ci(X=>X.breakpoints.down("md")),f=d.environments.find(X=>X.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),g=I.useRef(null),v=I.useRef(null),{t:m,locale:b}=Ye(),{isIconId:S,iconId:T}=Eh(e),[O,w]=I.useState(null),{onChange:P,onBlur:C,sx:_,...y}=a,M=i.includes("upload"),z=i.includes("select"),j=It(s,"/api/media/upload",d.appPid),H=Cr({showPopover:!1}),Y=ge(X=>{if(X!=null&&X.startsWith("/"))try{const ae=c?window.location.origin:f==null?void 0:f.value;return new URL(X,ae).href}catch{console.error("Failed to resolve url: ",X)}return X},[f==null?void 0:f.value,c]),K=ge(async X=>await h.current.getUploader().uploadFile(X)),J=ge(()=>{w(null)}),oe=ge(()=>{z&&w(v.current)}),de=ge(async X=>{try{if(o==="url"){const ae=Ph(X),B=await sd(ae,{width:128,height:128}),W=await cd(B,X);await K(W)}else P==null||P(X)}catch(ae){console.error("Failed to pick icon:",ae)}J()}),ue=ge(X=>{X.stopPropagation(),g.current.open(),J()}),le=ge(X=>{var ae;(ae=a==null?void 0:a.onChange)==null||ae.call(a,X.data.url)});return R.jsxs(R.Fragment,{children:[R.jsx(Nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:z?oe:void 0,...y,label:n,placeholder:t,InputProps:{ref:v,readOnly:!0,startAdornment:R.jsx(ri,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:R.jsx(ga,{size:28,icon:Y(e),alt:"Error"})}),endAdornment:R.jsxs(ri,{position:"end",children:[R.jsx(He,{sx:{visibility:e?"visible":"hidden"},onClick:X=>{X.stopPropagation(),P("")},children:R.jsx(pl,{style:{fontSize:18}})}),M&&R.jsx(dd,{title:m("common.upload"),children:R.jsx(He,{disableFocusRipple:!1,disableRipple:!1,onClick:ue,children:R.jsx(hs,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),z&&R.jsx(ne,{component:iu,sx:{mr:"-6px",fontSize:24,transform:O?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}),z&&R.jsx(ti,{open:!!O,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...u&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:J,children:R.jsx(gs,{label:n,placeholder:t,value:S?T:"",sx:{width:((ee=v.current)==null?void 0:ee.offsetWidth)??"auto"},onPick:de,onClose:J})}),R.jsx(ui,{ref:h,locale:b,apiPath:j,headers:p,imageEditorProps:{},onUploadFinish:le}),R.jsx(ui,{ref:g,locale:b,apiPath:j,headers:p,onUploadFinish:le}),R.jsx(ti,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:v.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:R.jsx(ga,{size:120,icon:Y(e),alt:"Error"})})]})}di.propTypes={value:E.string.isRequired,label:E.any,placeholder:E.any,helperText:E.string,methods:E.arrayOf(E.oneOf(["select","upload"])),iconifyShape:E.oneOf(["id","url"])};function gs({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,d]=I.useState(!0),[u,f]=I.useState(n),[p,h]=I.useState(!1),g=I.useRef(null),v=I.useRef([]),m=I.useRef(1),b=I.useRef(!0),{t:S}=Ye(),T=96,O=ge(()=>{!b.current||c||(d(!0),setTimeout(()=>{const C=m.current+1,_=(C-1)*T,y=C*T,M=v.current.slice(_,y);s(z=>[...z,...M]),m.current=C,b.current=y<v.current.length,d(!1)},300))}),w=ge(C=>{v.current=C,m.current=1,b.current=C.length>T;const _=C.slice(0,T);s(_),h(C.length===0),b.current&&O()}),{run:P}=al(async C=>{if(C){d(!0);try{const{icons:_}=await Th({keyword:C});w(_)}catch(_){console.error("Failed to search icons:",_),h(!0)}finally{d(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:y,scrollHeight:M,clientHeight:z}=g.current;(y+z>=M-150||M<=z)&&O()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[O,c]),il(async()=>{if(u)P(u);else{d(!0);try{const C=await _h("mdi-light");w(C)}catch(C){console.error("Failed to fetch default icons:",C),h(!0)}finally{d(!1)}}},[u,P,w]),R.jsxs(Mh,{ref:g,sx:t,...a,children:[R.jsxs(ne,{className:"icon-picker-input",children:[R.jsx(Nt,{label:S("navigation.form.searchIcons"),placeholder:S("navigation.form.searchIconsPlaceholder"),size:"small",value:u,sx:{flexGrow:1},autoFocus:!0,onChange:C=>f(C.target.value),InputProps:{endAdornment:R.jsx(He,{sx:{visibility:u?"visible":"hidden"},onClick:()=>f(""),children:R.jsx(pl,{style:{fontSize:18}})})}}),R.jsx(on,{onClick:o,children:S("common.cancel")})]}),R.jsxs(ne,{children:[l.length>0&&R.jsx(ne,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>R.jsx(Lh,{$active:n===C,onClick:()=>{i(C)},children:R.jsx(Ie,{icon:C,width:"32",height:"32"})},C))}),p&&R.jsx(ne,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:R.jsx(ne,{sx:{textAlign:"center"},children:"No matching results"})}),c&&R.jsx(ne,{sx:{p:2,display:"flex",justifyContent:"center"},children:R.jsx(fd,{size:20})})]})]})}gs.propTypes={label:E.any,placeholder:E.any,value:E.string,sx:E.object,onPick:E.func.isRequired,onClose:E.func.isRequired};const Mh=yi(ne)(({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}})),Lh=yi(He,{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}})),ui=I.forwardRef(({locale:e,apiPath:r,headers:n,imageEditorProps:t={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:i},o)=>R.jsx(I.Suspense,{children:R.jsx(Nh,{locale:e,ref:o,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>i==null?void 0:i(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:t,apiPathProps:{uploader:r,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:n}})}));ui.propTypes={locale:E.string,apiPath:E.string,headers:E.object,imageEditorProps:E.object,onUploadFinish:E.func};const va=24,ma=48,ba="add",Be="en",Sa={title:{[Be]:""},description:{[Be]:""},link:{[Be]:""}};function ya(e){return hl(Array.from(new Set(Pe.NAVIGATION_I18N_FIELDS.flatMap(r=>At(e[r])?Object.keys(e[r]):[]))),Be)}E.string.isRequired;const xn=I.forwardRef(function({section:r,components:n,rawNavigations:t,onChange:i,...o},a){const{roles:l}=fl(),{t:s,locale:c}=Ye(),{blocklet:d}=Rt(),u=I.useMemo(()=>{const x=d.environments.find(L=>L.key==="BLOCKLET_APP_LANGUAGES");return(x?x.value.split(","):["en","zh"]).filter(L=>xt.SUPPORTED_LANGUAGES[L]).reduce((L,G)=>(L[G]=xt.SUPPORTED_LANGUAGES[G].nativeName,L),{})},[d.environments]),f=I.useRef(()=>{}),p=Cr({isRoot:!0,type:ba,linkDisabled:!1,locale:Be,formState:ze(Sa),get localeList(){return ya(p.formState)}}),{handleSubmit:h,control:g,reset:v,setValue:m,clearErrors:b,formState:{errors:S}}=tu({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Pe.NAVIGATION_I18N_FIELDS.forEach(x=>m(x,p.formState[x][p.locale]))},[m,p.locale]);const T=ru({control:g}),O=T.component,w=T.title,P=T.description,C=T.link,_=T.parent;I.useEffect(()=>{p.formState.title[p.locale]=w},[w]),I.useEffect(()=>{p.formState.description[p.locale]=P},[P]),I.useEffect(()=>{p.formState.link[p.locale]=C},[C]),I.useEffect(()=>{i==null||i(T)},[T,i]);const y=I.useMemo(()=>t.find(D=>O?n.find(G=>G.name===O).did===D.id:D.id===_),[n,t,O,_]),M=I.useMemo(()=>{if(y!=null&&y.component){const x=n.find(V=>V.name===y.component),{link:D}=x||{},L=At(D)?D[p.locale]:D;if(O)return uo(L);const G=At(y.link)?y.link[p.locale]:y.link;return uo(It(L,G||"/"))}return null},[n,p.locale,y,O]),z=I.useMemo(()=>{const{component:x}=y||{},D=n.find(V=>V.name===x),{navigation:L=[]}=D||{};return _e.flattenNavigation(L,{transform(V,Z){return Z!=null&&Z.section&&(V.section=V.section||Z.section),V}}).filter(V=>V.link).filter(V=>_e.isMatchSection(V.section,r)).map(V=>({label:V.link,title:V.title[c]||V.title}))},[y,n,r,c]),j=I.useCallback(()=>{p.isRoot=!0,p.locale=Be,p.type=ba,p.linkDisabled=!1,p.formState=ze(Sa),v(),b(),f.current=()=>{}},[b,v,p]),H=I.useCallback((x={})=>(p.localeList.length>0&&Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{fu(p.formState[D]).length>1&&(x[D]=p.formState[D])}),pd(x.role)&&(x.role=void 0),x),[p.localeList,p.formState]),Y=I.useCallback(({parent:x}={},D=()=>{})=>{p.type="add",p.isRoot=!x,m("parent",x==null?void 0:x.id),f.current=L=>{D(L)}},[m,p]),K=I.useCallback((x={},D=()=>{})=>{const{id:L,icon:G,parent:V,component:Z,role:te=[]}=x;m("id",L),m("icon",G),x.from==="team-tmpl"&&(p.linkDisabled=!0);const he=ya(x),Ve=(fe,Te)=>{vd(fe)?p.formState[Te]=he.reduce((ie,pe)=>(ie[pe]=fe,ie),{[Be]:fe}):At(fe)?p.formState[Te]=ze(fe):p.formState[Te]={}};Pe.NAVIGATION_I18N_FIELDS.forEach(fe=>Ve(x[fe],fe)),Pe.NAVIGATION_I18N_FIELDS.forEach(fe=>m(fe,p.formState[fe][p.locale])),m("component",Z),m("parent",V),m("role",te||[]),p.type="edit",p.isRoot=!V,f.current=fe=>{const Te=hd(fe,["id","title","description","icon","component","link","role"]);D(Te)}},[m,p]);function J(x){const D=x==null?void 0:x.trim();if(r!=="bottomNavigation"){if(!D)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(D.length>va)return s("navigation.form.titleTooLong",{len:va})}return!0}function oe(x){const D=x==null?void 0:x.trim();return D&&D.length>ma?s("navigation.form.descriptionTooLong",{len:ma}):!0}const de=ge(x=>x!=null&&x.startsWith("/")?new URL(x,window.location.origin).href:x);async function ue(x){const D=x==null?void 0:x.trim();if(D){if(Si(de(D)))return!0;try{await ol(D)}catch{return s("navigation.form.invalidIcon")}}return!0}function le(x){const D=x==null?void 0:x.trim();return D?ue(D):s("common.requiredErrorText",{name:s("navigation.form.icon")})}function ee(x){const D=x==null?void 0:x.trim();return D?_e.checkLink(D)?!0:s("navigation.form.invalidLink"):p.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}const X=I.useCallback(x=>{p.locale=x,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D][x]||(p.formState[D][x]="")}),setTimeout(()=>{b()})},[b,p]),ae=I.useCallback(()=>{const{title:x,link:D}=p.formState;if(r!=="bottomNavigation")for(const L of Object.keys(x)){const G=J(x[L]);if(G!==!0)return G}for(const L of Object.keys(D)){const G=ee(D[L]);if(G!==!0)return G}return!0},[r,p.formState]),B=I.useCallback(x=>{const D=ae();D===!0?f.current(H(x)):rr.error(D)},[ae,H]),W=I.useCallback(x=>{p.locale=Be,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D]=sr(p.formState[D],x)}),i==null||i(T)},[p,T,i]),A=I.useCallback(x=>{p.locale=x,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D][x]=p.formState[D][Be]}),i==null||i(T),setTimeout(()=>{b()})},[b,p,T,i]);return I.useImperativeHandle(a,()=>({add:Y,edit:K,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(B)}),[Y,j,K,h,B]),R.jsxs(ne,{...o,children:[R.jsx(zi,{sx:{mb:1},onAdd:A,onChange:X,onRemoveLocale:W,locale:p.locale,localeMap:u,locales:p.localeList}),R.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&R.jsx(nt,{name:"title",control:g,rules:{validate:J},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.title)!=null&&D.message),helperText:((L=S==null?void 0:S.title)==null?void 0:L.message)||" ",...x})}}),r==="bottomNavigation"?R.jsx(nt,{name:"icon",control:g,rules:{validate:le},render:({field:x})=>{var D,L;return R.jsx(di,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((D=S==null?void 0:S.icon)!=null&&D.message),helperText:(L=S==null?void 0:S.icon)==null?void 0:L.message,disabled:p.locale!==Be,methods:["select"],iconifyShape:"url",...x})}}):R.jsx(nt,{name:"icon",control:g,rules:{validate:ue},render:({field:x})=>{var D,L;return R.jsx(di,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((D=S==null?void 0:S.icon)!=null&&D.message),helperText:(L=S==null?void 0:S.icon)==null?void 0:L.message,disabled:p.locale!==Be,...x})}}),p.isRoot&&R.jsx(nt,{name:"component",control:g,render:({field:x})=>{var D,L;return R.jsx(ii,{fullWidth:!0,margin:"dense",disabled:p.locale!==Be&&x.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(G=>({title:G.title,value:G.name,description:G.link})),error:!!((D=S==null?void 0:S.component)!=null&&D.message),helperText:((L=S==null?void 0:S.component)==null?void 0:L.message)||" ",...sr(x,"ref")})}}),!p.isRoot&&["header"].includes(r)&&R.jsx(nt,{name:"description",control:g,rules:{validate:oe},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.description)!=null&&D.message),helperText:((L=S==null?void 0:S.description)==null?void 0:L.message)||" ",...x})}}),R.jsx(nt,{name:"link",control:g,rules:{validate:ee},render:({field:x})=>R.jsx(ll,{fullWidth:!0,margin:"dense",children:R.jsx(au,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:p.linkDisabled,isOptionEqualToValue:D=>D.label,options:z,renderInput:D=>{var L,G;return R.jsx(Nt,{...D,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!((L=S==null?void 0:S.link)!=null&&L.message),helperText:((G=S==null?void 0:S.link)==null?void 0:G.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:M?R.jsx(ri,{position:"start",sx:{textDecoration:gd(C||"")?"line-through":""},children:M}):null}})},renderOption:(D,L)=>R.jsxs(ne,{component:"li",...D,children:[L.label,R.jsx(je,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:L.title})]}),margin:"dense",...x,onChange:()=>{},onInputChange:(D,L)=>{x.onChange(L)}})})}),["dashboard","sessionManager"].includes(r)&&R.jsx(nt,{name:"role",control:g,render:({field:x})=>{var D,L;return R.jsx(ii,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:l.map(G=>({title:G.title,value:G.name})),error:!!((D=S==null?void 0:S.role)!=null&&D.message),helperText:((L=S==null?void 0:S.role)==null?void 0:L.message)||" ",...sr(x,"ref")})}}),r==="bottomNavigation"&&R.jsx(nt,{name:"title",control:g,rules:{validate:J},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.title)!=null&&D.message),helperText:((L=S==null?void 0:S.title)==null?void 0:L.message)||" ",...x})}})]})]})});xn.propTypes={section:E.string,components:E.array,rawNavigations:E.array,onChange:E.func};xn.defaultProps={section:"",components:[],rawNavigations:[],onChange:()=>{}};const wn=I.forwardRef(function({section:r,components:n,rawNavigations:t},i){const{t:o}=Ye(),[a,{setTrue:l,setFalse:s}]=Zd(!1),[c,d]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:o("common.create"),edit:o("common.edit")}[c];return m?`${m} ${o("navigation.navigation")}`:"--"},[o,c]),p=I.useCallback(()=>{var v;s(),(v=u.current)==null||v.reset()},[s]),h=I.useCallback((v={},m=()=>{})=>{var b;d("add"),(b=u.current)==null||b.add(v,S=>m(p,S)),l()},[l,p]),g=I.useCallback((v={},m=()=>{})=>{var b;d("edit"),(b=u.current)==null||b.edit(v,S=>m(p,S)),l()},[l,p]);return I.useImperativeHandle(i,()=>({add:h,edit:g,close:p}),[h,g,p]),R.jsx(md,{open:a,title:f,keepMounted:!0,onClose:p,sx:{".MuiDialogContent-root":{pt:0}},actions:R.jsx(bd,{color:"primary",variant:"contained",onClick:()=>{var v;return(v=u.current)==null?void 0:v.submit()},children:o("common.confirm")}),children:R.jsx(xn,{ref:u,section:r,components:n,rawNavigations:t})})});wn.propTypes={section:E.string,components:E.array,rawNavigations:E.array};wn.defaultProps={section:"",components:[],rawNavigations:[]};function Fi({className:e,add:r,edit:n,toggle:t,del:i,data:o,section:a}){const{t:l}=Ye(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function d(g){g.preventDefault(),g.stopPropagation()}const u=I.useCallback(g=>{d(g),r(o)},[r,o]),f=I.useCallback(g=>{d(g),n(o)},[n,o]),p=I.useCallback(g=>{d(g),t(o)},[t,o]),h=I.useCallback(g=>{d(g),i(o)},[i,o]);return R.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&R.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:R.jsx(He,{size:"small",color:"success",onClick:u,disabled:c,children:R.jsx(Ie,{icon:"mdi:plus-box-outline"})})}),R.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:R.jsx(He,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:R.jsx(Ie,{icon:"mdi:pencil-outline"})})}),R.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:R.jsx(He,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?R.jsx(Ie,{icon:"mdi:eye-off-outline"}):R.jsx(Ie,{icon:"mdi:eye-outline"})})}),R.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:R.jsx(He,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:R.jsx(Ie,{icon:"mdi:delete"})})})]})}Fi.propTypes={data:E.object.isRequired,className:E.string,add:E.func,edit:E.func,toggle:E.func,del:E.func,section:E.string};Fi.defaultProps={className:"",add:()=>{},edit:()=>{},toggle:()=>{},del:()=>{},section:""};function vs(e,r){return e?r===e.nodeName?!0:vs(e.parentNode,r):!1}function Ah({...e}){const r=n=>{vs(n.target,"A")&&n.preventDefault()};return R.jsx("div",{onClick:r,...e})}function Gi({className:e,navigation:r}){var s,c,d,u;const{blocklet:n}=Rt(),t=yd({blocklet:n,square:!0}),i=(c=(s=n==null?void 0:n.environments)==null?void 0:s.find(f=>f.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER))==null?void 0:c.value,o=(u=(d=n==null?void 0:n.environments)==null?void 0:d.find(f=>f.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR))==null?void 0:u.value,a=i||o?{owner:i,year:o}:void 0,l={appId:n.appDid,appLogo:t,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:r,copyright:a};return R.jsx(Ah,{children:R.jsxs(ne,{className:e,children:[R.jsx(Xd,{meta:l,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),R.jsx(ne,{children:R.jsx(Jd,{meta:l,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},showDomainWarningDialog:!1,children:R.jsx(fo,{container:!0,spacing:2,children:new Array(6).fill().map((f,p)=>R.jsxs(fo,{item:!0,xs:4,children:[R.jsx(Ln,{animation:!1,variant:"rectangular",width:"100%",height:120}),R.jsxs(ne,{sx:{pt:.5},children:[R.jsx(Ln,{animation:!1}),R.jsx(Ln,{width:"60%",animation:!1})]})]},p))})})}),R.jsx(Qd,{meta:l,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})}Gi.propTypes={className:E.string,navigation:E.array};Gi.defaultProps={className:"",navigation:[]};const kh=Sd(Gi)`
|
|
19
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(r.componentWillMount=Jl,r.componentWillReceiveProps=Ql),typeof r.getSnapshotBeforeUpdate=="function"){if(typeof r.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=Zl;var l=r.componentDidUpdate;r.componentDidUpdate=function(c,d,u){var f=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;l.call(this,c,d,f)}}return e}function es(e){var r=e.targetIndex,n=e.node,t=e.currentIndex,i=e.getNodeKey,o=e.path,a=o===void 0?[]:o,l=e.lowerSiblingCounts,s=l===void 0?[]:l,c=e.ignoreCollapsed,d=c===void 0?!0:c,u=e.isPseudoRoot,f=u===void 0?!1:u,p=f?[]:[].concat(se(a),[i({node:n,treeIndex:t})]);if(t===r)return{node:n,lowerSiblingCounts:s,path:p};if(!n.children||d&&n.expanded!==!0)return{nextIndex:t+1};for(var h=t+1,g=n.children.length,v=0;v<g;v+=1){var m=es({ignoreCollapsed:d,getNodeKey:i,targetIndex:r,node:n.children[v],currentIndex:h,lowerSiblingCounts:[].concat(se(s),[g-v-1]),path:p});if(m.node)return m;h=m.nextIndex}return{nextIndex:h}}function Oi(e){var r=e.node,n=e.ignoreCollapsed,t=n===void 0?!0:n;return es({getNodeKey:function(){},ignoreCollapsed:t,node:r,currentIndex:0,targetIndex:-1}).nextIndex-1}function ts(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,l=e.parentNode,s=l===void 0?null:l,c=e.currentIndex,d=e.path,u=d===void 0?[]:d,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=o?[]:[].concat(se(u),[n({node:a,treeIndex:c})]),g=o?null:{node:a,parentNode:s,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var v=r(g);if(v===!1)return!1}if(!a.children||a.expanded!==!0&&t&&!o)return c;var m=c,b=a.children.length;if(typeof a.children!="function"){for(var S=0;S<b;S+=1)if(m=ts({callback:r,getNodeKey:n,ignoreCollapsed:t,node:a.children[S],parentNode:o?null:a,currentIndex:m+1,lowerSiblingCounts:[].concat(se(p),[b-S-1]),path:h}),m===!1)return!1}return m}function rs(e){var r=e.callback,n=e.getNodeKey,t=e.ignoreCollapsed,i=e.isPseudoRoot,o=i===void 0?!1:i,a=e.node,l=e.parentNode,s=l===void 0?null:l,c=e.currentIndex,d=e.path,u=d===void 0?[]:d,f=e.lowerSiblingCounts,p=f===void 0?[]:f,h=Q({},a),g=o?[]:[].concat(se(u),[n({node:h,treeIndex:c})]),v={node:h,parentNode:s,path:g,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&t&&!o)return{treeIndex:c,node:r(v)};var m=c,b=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(S,T){var O=rs({callback:r,getNodeKey:n,ignoreCollapsed:t,node:S,parentNode:o?null:h,currentIndex:m+1,lowerSiblingCounts:[].concat(se(p),[b-T-1]),path:g});return m=O.treeIndex,O.node})),{node:r(v),treeIndex:m}}function ns(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;!r||r.length<1||ts({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function kp(e){var r=e.treeData,n=e.getNodeKey,t=e.callback,i=e.ignoreCollapsed,o=i===void 0?!0:i;return!r||r.length<1?[]:rs({callback:t,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:r},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function zp(e){var r=e.treeData,n=e.expanded,t=n===void 0?!0:n;return kp({treeData:r,callback:function(o){var a=o.node;return Q(Q({},a),{},{expanded:t})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function lr(e){var r=e.treeData,n=e.path,t=e.newNode,i=e.getNodeKey,o=e.ignoreCollapsed,a=o===void 0?!0:o,l="RESULT_MISS",s=function d(u){var f=u.isPseudoRoot,p=f===void 0?!1:f,h=u.node,g=u.currentTreeIndex,v=u.pathIndex;if(!p&&i({node:h,treeIndex:g})!==n[v])return l;if(v>=n.length-1)return typeof t=="function"?t({node:h,treeIndex:g}):t;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var m=g+1,b=0;b<h.children.length;b+=1){var S=d({node:h.children[b],currentTreeIndex:m,pathIndex:v+1});if(S!==l)return S?Q(Q({},h),{},{children:[].concat(se(h.children.slice(0,b)),[S],se(h.children.slice(b+1)))}):Q(Q({},h),{},{children:[].concat(se(h.children.slice(0,b)),se(h.children.slice(b+1)))});m+=1+Oi({node:h.children[b],ignoreCollapsed:a})}return l},c=s({node:{children:r},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===l)throw new Error("No node found at the given path.");return c.children}function Bp(e){var r=e.treeData,n=e.path,t=e.getNodeKey,i=e.ignoreCollapsed,o=i===void 0?!0:i,a=null,l=null,s=lr({treeData:r,path:n,getNodeKey:t,ignoreCollapsed:o,newNode:function(d){var u=d.node,f=d.treeIndex;return a=u,l=f,null}});return{treeData:s,node:a,treeIndex:l}}function is(e){var r=e.targetDepth,n=e.minimumTreeIndex,t=e.newNode,i=e.ignoreCollapsed,o=e.expandParent,a=e.isPseudoRoot,l=a===void 0?!1:a,s=e.isLastChild,c=e.node,d=e.currentIndex,u=e.currentDepth,f=e.getNodeKey,p=e.path,h=p===void 0?[]:p,g=function(Y){return l?[]:[].concat(se(h),[f({node:Y,treeIndex:d})])};if(d>=n-1||s&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var v=o?{expanded:!0}:{},m=Q(Q(Q({},c),v),{},{children:c.children?[t].concat(se(c.children)):[t]});return{node:m,nextIndex:d+2,insertedTreeIndex:d+1,parentPath:g(m),parentNode:l?null:m}}if(u>=r-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!l)return{node:c,nextIndex:d+1};for(var b=d+1,S=null,T=null,O=0;O<c.children.length;O+=1){if(b>=n){S=b,T=O;break}b+=1+Oi({node:c.children[O],ignoreCollapsed:i})}if(T===null){if(b<n&&!s)return{node:c,nextIndex:b};S=b,T=c.children.length}var w=Q(Q({},c),{},{children:[].concat(se(c.children.slice(0,T)),[t],se(c.children.slice(T)))});return{node:w,nextIndex:b,insertedTreeIndex:S,parentPath:g(w),parentNode:l?null:w}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&i&&!l)return{node:c,nextIndex:d+1};var P=null,C=null,_=null,y=d+1,M=c.children;typeof M!="function"&&(M=M.map(function(H,Y){if(P!==null)return H;var K=is({targetDepth:r,minimumTreeIndex:n,newNode:t,ignoreCollapsed:i,expandParent:o,isLastChild:s&&Y===M.length-1,node:H,currentIndex:y,currentDepth:u+1,getNodeKey:f,path:[]});return"insertedTreeIndex"in K&&(P=K.insertedTreeIndex,_=K.parentNode,C=K.parentPath),y=K.nextIndex,K.node}));var z=Q(Q({},c),{},{children:M}),j={node:z,nextIndex:y};return P!==null&&(j.insertedTreeIndex=P,j.parentPath=[].concat(se(g(z)),se(C)),j.parentNode=_),j}function os(e){var r=e.treeData,n=e.depth,t=e.minimumTreeIndex,i=e.newNode,o=e.getNodeKey,a=o===void 0?function(){}:o,l=e.ignoreCollapsed,s=l===void 0?!0:l,c=e.expandParent,d=c===void 0?!1:c;if(!r&&n===0)return{treeData:[i],treeIndex:0,path:[a({node:i,treeIndex:0})],parentNode:null};var u=is({targetDepth:n,minimumTreeIndex:t,newNode:i,ignoreCollapsed:s,expandParent:d,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:r},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in u))throw new Error("No suitable position found to insert.");var f=u.insertedTreeIndex;return{treeData:u.node.children,treeIndex:f,path:[].concat(se(u.parentPath),[a({node:i,treeIndex:f})]),parentNode:u.parentNode}}function Fp(e){var r=e.treeData,n=e.getNodeKey,t=e.ignoreCollapsed,i=t===void 0?!0:t;if(!r||r.length<1)return[];var o=[];return ns({treeData:r,getNodeKey:n,ignoreCollapsed:i,callback:function(l){o.push(l)}}),o}function as(e,r){return!!e.children&&typeof e.children!="function"&&e.children.some(function(n){return n===r||as(n,r)})}function ls(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?typeof e.children=="function"?r+1:e.children.reduce(function(n,t){return Math.max(n,ls(t,r+1))},r):r}function Gp(e){var r=e.getNodeKey,n=e.treeData,t=e.searchQuery,i=e.searchMethod,o=e.searchFocusOffset,a=e.expandAllMatchPaths,l=a===void 0?!1:a,s=e.expandFocusMatchPaths,c=s===void 0?!0:s,d=0,u=function p(h){var g=h.isPseudoRoot,v=g===void 0?!1:g,m=h.node,b=h.currentIndex,S=h.path,T=S===void 0?[]:S,O=[],w=!1,P=!1,C=v?[]:[].concat(se(T),[r({node:m,treeIndex:b})]),_=v?null:{path:C,treeIndex:b},y=m.children&&typeof m.children!="function"&&m.children.length>0;!v&&i(Q(Q({},_),{},{node:m,searchQuery:t}))&&(d===o&&(P=!0),d+=1,w=!0);var M=b,z=Q({},m);return y&&(z.children=z.children.map(function(j){var H=p({node:j,currentIndex:M+1,path:C});return H.node.expanded?M=H.treeIndex:M+=1,(H.matches.length>0||H.hasFocusMatch)&&(O=[].concat(se(O),se(H.matches)),H.hasFocusMatch&&(P=!0),(l&&H.matches.length>0||(l||c)&&H.hasFocusMatch)&&(z.expanded=!0)),H.node})),!v&&!z.expanded&&(O=O.map(function(j){return Q(Q({},j),{},{treeIndex:null})})),w&&(O=[Q(Q({},_),{},{node:z})].concat(se(O))),{node:O.length>0?z:m,matches:O,hasFocusMatch:P,treeIndex:M}},f=u({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:f.matches,treeData:f.node.children}}function Oe(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.filter(Boolean).join(" ")}function jp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Ei=function(e){Sn(n,e);var r=jp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.scaffoldBlockPxWidth,a=i.toggleChildrenVisibility,l=i.connectDragPreview,s=i.connectDragSource,c=i.isDragging,d=i.canDrop,u=i.canDrag,f=i.node,p=i.title,h=i.subtitle,g=i.draggedNode,v=i.path,m=i.treeIndex,b=i.isSearchMatch,S=i.isSearchFocus,T=i.buttons,O=i.className,w=i.style,P=i.didDrop;i.treeId,i.isOver,i.parentNode;var C=i.rowDirection,_=Pi(i,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),y=p||f.title,M=h||f.subtitle,z=C==="rtl"?"rst__rtl":null,j;u&&(typeof f.children=="function"&&f.expanded?j=$.createElement("div",{className:"rst__loadingHandle"},$.createElement("div",{className:"rst__loadingCircle"},se(new Array(12)).map(function(J,oe){return $.createElement("div",{key:oe,className:Oe("rst__loadingCirclePoint",z)})}))):j=s($.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var H=g&&as(g,f),Y=!P&&c,K={left:-.5*o};return C==="rtl"&&(K={right:-.5*o}),$.createElement("div",st({style:{height:"100%"}},_),a&&f.children&&(f.children.length>0||typeof f.children=="function")&&$.createElement("div",null,$.createElement("button",{type:"button","aria-label":f.expanded?"Collapse":"Expand",className:Oe(f.expanded?"rst__collapseButton":"rst__expandButton",z),style:K,onClick:function(){return a({node:f,path:v,treeIndex:m})}}),f.expanded&&!c&&$.createElement("div",{style:{width:o},className:Oe("rst__lineChildren",z)})),$.createElement("div",{className:Oe("rst__rowWrapper",z)},l($.createElement("div",{className:Oe("rst__row",Y&&"rst__rowLandingPad",Y&&!d&&"rst__rowCancelPad",b&&"rst__rowSearchMatch",S&&"rst__rowSearchFocus",z,O),style:Q({opacity:H?.5:1},w)},j,$.createElement("div",{className:Oe("rst__rowContents",!u&&"rst__rowContentsDragDisabled",z)},$.createElement("div",{className:Oe("rst__rowLabel",z)},$.createElement("span",{className:Oe("rst__rowTitle",f.subtitle&&"rst__rowTitleWithSubtitle")},typeof y=="function"?y({node:f,path:v,treeIndex:m}):y),M&&$.createElement("span",{className:"rst__rowSubtitle"},typeof M=="function"?M({node:f,path:v,treeIndex:m}):M)),$.createElement("div",{className:"rst__rowToolbar"},T.map(function(J,oe){return $.createElement("div",{key:oe,className:"rst__toolbarButton"},J)})))))))}}]),n}(I.Component);Ei.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};Ei.propTypes={node:E.shape({}).isRequired,title:E.oneOfType([E.func,E.node]),subtitle:E.oneOfType([E.func,E.node]),path:E.arrayOf(E.oneOfType([E.string,E.number])).isRequired,treeIndex:E.number.isRequired,treeId:E.string.isRequired,isSearchMatch:E.bool,isSearchFocus:E.bool,canDrag:E.bool,scaffoldBlockPxWidth:E.number.isRequired,toggleChildrenVisibility:E.func,buttons:E.arrayOf(E.node),className:E.string,style:E.shape({}),connectDragPreview:E.func.isRequired,connectDragSource:E.func.isRequired,parentNode:E.shape({}),isDragging:E.bool.isRequired,didDrop:E.bool.isRequired,draggedNode:E.shape({}),isOver:E.bool.isRequired,canDrop:E.bool,rowDirection:E.string};var Ni=function(r){var n=r.isOver,t=r.canDrop;return $.createElement("div",{className:Oe("rst__placeholder",t&&"rst__placeholderLandingPad",t&&!n&&"rst__placeholderCancelPad")})};Ni.defaultProps={isOver:!1,canDrop:!1};Ni.propTypes={isOver:E.bool,canDrop:E.bool};function Wp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Mi=function(e){Sn(n,e);var r=Wp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.listIndex,l=i.swapFrom,s=i.swapLength,c=i.swapDepth,d=i.scaffoldBlockPxWidth,u=i.lowerSiblingCounts,f=i.connectDropTarget,p=i.isOver,h=i.draggedNode,g=i.canDrop,v=i.treeIndex;i.treeId,i.getPrevRow,i.node,i.path;var m=i.rowDirection,b=Pi(i,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),S=m==="rtl"?"rst__rtl":null,T=u.length,O=[];u.forEach(function(P,C){var _="";if(P>0?a===0?_="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":C===T-1?_="rst__lineHalfHorizontalRight rst__lineFullVertical":_="rst__lineFullVertical":a===0?_="rst__lineHalfHorizontalRight":C===T-1&&(_="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),O.push($.createElement("div",{key:"pre_".concat(1+C),style:{width:d},className:Oe("rst__lineBlock",_,S)})),v!==a&&C===c){var y="";a===l+s-1?y="rst__highlightBottomLeftCorner":v===l?y="rst__highlightTopLeftCorner":y="rst__highlightLineVertical";var M;m==="rtl"?M={width:d,right:d*C}:M={width:d,left:d*C},O.push($.createElement("div",{key:C,style:M,className:Oe("rst__absoluteLineBlock",y,S)}))}});var w;return m==="rtl"?w={right:d*T}:w={left:d*T},f($.createElement("div",st({},b,{className:Oe("rst__node",S)}),O,$.createElement("div",{className:"rst__nodeContent",style:w},I.Children.map(o,function(P){return I.cloneElement(P,{isOver:p,canDrop:g,draggedNode:h})}))))}}]),n}(I.Component);Mi.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};Mi.propTypes={treeIndex:E.number.isRequired,treeId:E.string.isRequired,swapFrom:E.number,swapDepth:E.number,swapLength:E.number,scaffoldBlockPxWidth:E.number.isRequired,lowerSiblingCounts:E.arrayOf(E.number).isRequired,listIndex:E.number.isRequired,children:E.node.isRequired,connectDropTarget:E.func.isRequired,isOver:E.bool.isRequired,canDrop:E.bool,draggedNode:E.shape({}),getPrevRow:E.func.isRequired,node:E.shape({}).isRequired,path:E.arrayOf(E.oneOfType([E.string,E.number])).isRequired,rowDirection:E.string};function Hp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var Li=function(e){Sn(n,e);var r=Hp(n);function n(){return Dr(this,n),r.apply(this,arguments)}return Tr(n,[{key:"render",value:function(){var i=this.props,o=i.children,a=i.connectDropTarget;i.treeId,i.drop;var l=Pi(i,["children","connectDropTarget","treeId","drop"]);return a($.createElement("div",null,I.Children.map(o,function(s){return I.cloneElement(s,Q({},l))})))}}]),n}(I.Component);Li.defaultProps={canDrop:!1,draggedNode:null};Li.propTypes={children:E.node.isRequired,connectDropTarget:E.func.isRequired,isOver:E.bool.isRequired,canDrop:E.bool,draggedNode:E.shape({}),treeId:E.string.isRequired,drop:E.func.isRequired};function $p(e){var r=e.treeIndex;return r}function ss(e){return typeof e=="string"?e:e===null||zt(e)!=="object"||!e.props||!e.props.children||typeof e.props.children!="string"&&zt(e.props.children)!=="object"?"":typeof e.props.children=="string"?e.props.children:e.props.children.map(function(r){return ss(r)}).join("")}function fa(e,r,n,t,i){return typeof n[e]=="function"?String(n[e]({node:n,path:t,treeIndex:i})).indexOf(r)>-1:zt(n[e])==="object"?ss(n[e]).indexOf(r)>-1:n[e]&&String(n[e]).indexOf(r)>-1}function Up(e){var r=e.node,n=e.path,t=e.treeIndex,i=e.searchQuery;return fa("title",i,r,n,t)||fa("subtitle",i,r,n,t)}var Ai=function(r){var n=[],t=[],i=null;return function(o){var a=Object.keys(o).sort(),l=a.map(function(s){return o[s]});return(l.length!==n.length||l.some(function(s,c){return s!==n[c]})||a.some(function(s,c){return s!==t[c]}))&&(n=l,t=a,i=r(o)),i}},ci=Ai(os),Vp=Ai(Fp),qp=Ai(Oi),Kp=function(){function e(r){Dr(this,e),this.treeRef=r}return Tr(e,[{key:"getTargetDepth",value:function(n,t,i){var o=0,a=n.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),o=Math.min(l.length,n.path.length)}var c,d=(t.getItem().path||[]).length;if(t.getItem().treeId!==this.treeId)if(d=0,i){var u=$t.findDOMNode(i).getBoundingClientRect(),f=t.getSourceClientOffset().x-u.left;c=Math.round(f/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*t.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,d+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var g=t.getItem().node,v=ls(g);h=Math.max(0,Math.min(h,this.maxDepth-v-1))}return h}},{key:"canDrop",value:function(n,t){if(!t.isOver())return!1;var i=n.getPrevRow(),o=i?i.path:[],a=i?i.node:{},l=this.getTargetDepth(n,t,null);if(l>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=t.getItem(),c=s.node,d=ci({treeData:this.treeData,newNode:c,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:t.getItem().path,prevParent:t.getItem().parentNode,prevTreeIndex:t.getItem().treeIndex,nextPath:d.path,nextParent:d.parentNode,nextTreeIndex:d.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var t=this,i={beginDrag:function(l){return t.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){t.endDrag(s.getDropResult())},isDragging:function(l,s){var c=s.getItem().node,d=l.node;return d===c}};function o(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Ad(this.dndType,i,o)(n)}},{key:"wrapTarget",value:function(n){var t=this,i={drop:function(l,s,c){var d={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:t.treeId,minimumTreeIndex:l.treeIndex,depth:t.getTargetDepth(l,s,c)};return t.drop(d),d},hover:function(l,s,c){var d=t.getTargetDepth(l,s,c),u=s.getItem().node,f=l.node!==u||d!==l.path.length-1;f&&(cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.dragHover({node:u,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:d})}))},canDrop:this.canDrop.bind(this)};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return So(this.dndType,i,o)(n)}},{key:"wrapPlaceholder",value:function(n){var t=this,i={drop:function(l,s){var c=s.getItem(),d=c.node,u=c.path,f=c.treeIndex,p={node:d,path:u,treeIndex:f,treeId:t.treeId,minimumTreeIndex:0,depth:0};return t.drop(p),p}};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return So(this.dndType,i,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),e}();function Yp(e,r,n){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=[].concat(se(e.slice(0,r)),se(e.slice(r+t)));return[].concat(se(i.slice(0,n)),se(e.slice(r,r+t)),se(i.slice(n)))}function Xp(e){function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Ke(e),t;if(r()){var i=Ke(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return yn(this,t)}}var pa=1,Hn=function(r){var n=Q(Q({},r),{},{style:Q(Q({},r.theme.style),r.style),innerStyle:Q(Q({},r.theme.innerStyle),r.innerStyle),reactVirtualizedListProps:Q(Q({},r.theme.reactVirtualizedListProps),r.reactVirtualizedListProps)}),t={nodeContentRenderer:Ei,placeholderRenderer:Ni,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:Mi};return Object.keys(t).forEach(function(i){r[i]===null&&(n[i]=typeof r.theme[i]<"u"?r.theme[i]:t[i])}),n},Cn=function(e){Sn(n,e);var r=Xp(n);function n(t){var i;Dr(this,n),i=r.call(this,t);var o=Hn(t),a=o.dndType,l=o.nodeContentRenderer,s=o.treeNodeRenderer,c=o.isVirtualized,d=o.slideRegionSize;return i.dndManager=new Kp(Ze(i)),i.treeId="rst__".concat(pa),pa+=1,i.dndType=a||i.treeId,i.nodeContentRenderer=i.dndManager.wrapSource(l),i.treePlaceholderRenderer=i.dndManager.wrapPlaceholder(Li),i.treeNodeRenderer=i.dndManager.wrapTarget(s),c&&(i.scrollZoneVirtualList=(Qu||Zu)(Ll),i.vStrength=Ju(d),i.hStrength=Xu(d)),i.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},i.toggleChildrenVisibility=i.toggleChildrenVisibility.bind(Ze(i)),i.moveNode=i.moveNode.bind(Ze(i)),i.startDrag=i.startDrag.bind(Ze(i)),i.dragHover=i.dragHover.bind(Ze(i)),i.endDrag=i.endDrag.bind(Ze(i)),i.drop=i.drop.bind(Ze(i)),i.handleDndMonitorChange=i.handleDndMonitorChange.bind(Ze(i)),i}return Tr(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var i=n.search(this.props,this.state,!0,!0,!1);this.setState(i),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(i,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(i){return Vp({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:i})}},{key:"handleDndMonitorChange",value:function(){var i=this.props.dragDropManager.getMonitor();!i.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(i){var o=i.node,a=i.path,l=this.state.instanceProps,s=lr({treeData:l.treeData,path:a,newNode:function(d){var u=d.node;return Q(Q({},u),{},{expanded:!u.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(i){var o=i.node,a=i.path,l=i.treeIndex,s=i.depth,c=i.minimumTreeIndex,d=os({treeData:this.state.draggingTreeData,newNode:o,depth:s,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),u=d.treeData,f=d.treeIndex,p=d.path,h=d.parentNode;this.props.onChange(u),this.props.onMoveNode({treeData:u,node:o,treeIndex:f,path:p,nextPath:p,nextTreeIndex:f,prevPath:a,prevTreeIndex:l,nextParentNode:h})}},{key:"startDrag",value:function(i){var o=this,a=i.path;this.setState(function(l){var s=Bp({treeData:l.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=s.treeData,d=s.node,u=s.treeIndex;return{draggingTreeData:c,draggedNode:d,draggedDepth:a.length-1,draggedMinimumTreeIndex:u,dragging:!0}})}},{key:"dragHover",value:function(i){var o=this,a=i.node,l=i.depth,s=i.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(c){var d=c.draggingTreeData,u=c.instanceProps,f=d||u.treeData,p=ci({treeData:f,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),g=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:lr({treeData:f,path:g.slice(0,-1),newNode:function(m){var b=m.node;return Q(Q({},b),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(i){var o=this,a=this.state.instanceProps,l=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!i)l();else if(i.treeId!==this.treeId){var s=i.node,c=i.path,d=i.treeIndex,u=this.props.shouldCopyOnOutsideDrop;typeof u=="function"&&(u=u({node:s,prevTreeIndex:d,prevPath:c}));var f=this.state.draggingTreeData||a.treeData;u&&(f=lr({treeData:a.treeData,path:c,newNode:function(h){var g=h.node;return Q({},g)},getNodeKey:this.props.getNodeKey})),this.props.onChange(f),this.props.onMoveNode({treeData:f,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:d})}}},{key:"drop",value:function(i){this.moveNode(i)}},{key:"canNodeHaveChildren",value:function(i){var o=this.props.canNodeHaveChildren;return o?o(i):!0}},{key:"renderRow",value:function(i,o){var a=o.listIndex,l=o.style,s=o.getPrevRow,c=o.matchKeys,d=o.swapFrom,u=o.swapDepth,f=o.swapLength,p=i.node,h=i.parentNode,g=i.path,v=i.lowerSiblingCounts,m=i.treeIndex,b=Hn(this.props),S=b.canDrag,T=b.generateNodeProps,O=b.scaffoldBlockPxWidth,w=b.searchFocusOffset,P=b.rowDirection,C=this.treeNodeRenderer,_=this.nodeContentRenderer,y=g[g.length-1],M=y in c,z=M&&c[y]===w,j={node:p,parentNode:h,path:g,lowerSiblingCounts:v,treeIndex:m,isSearchMatch:M,isSearchFocus:z},H=T?T(j):{},Y=typeof S!="function"?S:S(j),K={treeIndex:m,scaffoldBlockPxWidth:O,node:p,path:g,treeId:this.treeId,rowDirection:P};return $.createElement(C,st({style:l,key:y,listIndex:a,getPrevRow:s,lowerSiblingCounts:v,swapFrom:d,swapLength:f,swapDepth:u},K),$.createElement(_,st({parentNode:h,isSearchMatch:M,isSearchFocus:z,canDrag:Y,toggleChildrenVisibility:this.toggleChildrenVisibility},K,H)))}},{key:"render",value:function(){var i=this,o=Hn(this.props),a=o.dragDropManager,l=o.style,s=o.className,c=o.innerStyle,d=o.rowHeight,u=o.isVirtualized,f=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,g=o.rowDirection,v=this.state,m=v.searchMatches,b=v.searchFocusTreeIndex,S=v.draggedNode,T=v.draggedDepth,O=v.draggedMinimumTreeIndex,w=v.instanceProps,P=this.state.draggingTreeData||w.treeData,C=g==="rtl"?"rst__rtl":null,_,y=null,M=null;if(S&&O!==null){var z=ci({treeData:P,newNode:S,depth:T,minimumTreeIndex:O,expandParent:!0,getNodeKey:h}),j=O;y=z.treeIndex,M=1+qp({node:S}),_=Yp(this.getRows(z.treeData),y,j,M)}else _=this.getRows(P);var H={};m.forEach(function(le,ee){var X=le.path;H[X[X.length-1]]=ee});var Y=b!==null?{scrollToIndex:b}:{},K=l,J;if(_.length<1){var oe=this.treePlaceholderRenderer,de=f;J=$.createElement(oe,{treeId:this.treeId,drop:this.drop},$.createElement(de,null))}else if(u){K=Q({height:"100%"},K);var ue=this.scrollZoneVirtualList;J=$.createElement(El,null,function(le){var ee=le.height,X=le.width;return $.createElement(ue,st({},Y,{dragDropManager:a,verticalStrength:i.vStrength,horizontalStrength:i.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:X,onScroll:function(B){var W=B.scrollTop;i.scrollTop=W},height:ee,style:c,rowCount:_.length,estimatedRowSize:typeof d!="function"?d:void 0,rowHeight:typeof d!="function"?d:function(ae){var B=ae.index;return d({index:B,treeIndex:B,node:_[B].node,path:_[B].path})},rowRenderer:function(B){var W=B.index,A=B.style;return i.renderRow(_[W],{listIndex:W,style:A,getPrevRow:function(){return _[W-1]||null},matchKeys:H,swapFrom:y,swapDepth:T,swapLength:M})}},p))})}else J=_.map(function(le,ee){return i.renderRow(le,{listIndex:ee,style:{height:typeof d!="function"?d:d({index:ee,treeIndex:ee,node:le.node,path:le.path})},getPrevRow:function(){return _[ee-1]||null},matchKeys:H,swapFrom:y,swapDepth:T,swapLength:M})});return $.createElement("div",{className:Oe("rst__tree",s,C),style:K},J)}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.instanceProps,l={},s=bo(a.treeData,i.treeData);return a.treeData=i.treeData,s?bo(a.searchQuery,i.searchQuery)?a.searchFocusOffset!==i.searchFocusOffset&&Object.assign(l,n.search(i,o,!0,!0,!0)):Object.assign(l,n.search(i,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,n.loadLazyChildren(i,o),Object.assign(l,n.search(i,o,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=i.searchQuery,a.searchFocusOffset=i.searchFocusOffset,l.instanceProps=Q(Q({},a),l.instanceProps),l}},{key:"search",value:function(i,o,a,l,s){var c=i.onChange,d=i.getNodeKey,u=i.searchFinishCallback,f=i.searchQuery,p=i.searchMethod,h=i.searchFocusOffset,g=i.onlyExpandSearchedNodes,v=o.instanceProps;if(!f&&!p)return u&&u([]),{searchMatches:[]};var m={instanceProps:{}},b=Gp({getNodeKey:d,treeData:g?zp({treeData:v.treeData,expanded:!1}):v.treeData,searchQuery:f,searchMethod:p||Up,searchFocusOffset:h,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),S=b.treeData,T=b.matches;l&&(m.instanceProps.ignoreOneTreeUpdate=!0,c(S)),u&&u(T);var O=null;return a&&h!==null&&h<T.length&&(O=T[h].treeIndex),m.searchMatches=T,m.searchFocusTreeIndex=O,m}},{key:"loadLazyChildren",value:function(i,o){var a=o.instanceProps;ns({treeData:a.treeData,getNodeKey:i.getNodeKey,callback:function(s){var c=s.node,d=s.path,u=s.lowerSiblingCounts,f=s.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||i.loadCollapsedLazyChildren)&&c.children({node:c,path:d,lowerSiblingCounts:u,treeIndex:f,done:function(h){return i.onChange(lr({treeData:a.treeData,path:d,newNode:function(v){var m=v.node;return m===c?Q(Q({},m),{},{children:h}):m},getNodeKey:i.getNodeKey}))}})}})}}]),n}(I.Component);Cn.propTypes={dragDropManager:E.shape({getMonitor:E.func}).isRequired,treeData:E.arrayOf(E.object).isRequired,style:E.shape({}),className:E.string,innerStyle:E.shape({}),rowHeight:E.oneOfType([E.number,E.func]),slideRegionSize:E.number,reactVirtualizedListProps:E.shape({}),scaffoldBlockPxWidth:E.number,maxDepth:E.number,searchMethod:E.func,searchQuery:E.any,searchFocusOffset:E.number,searchFinishCallback:E.func,generateNodeProps:E.func,isVirtualized:E.bool,treeNodeRenderer:E.func,nodeContentRenderer:E.func,placeholderRenderer:E.func,theme:E.shape({style:E.shape({}),innerStyle:E.shape({}),reactVirtualizedListProps:E.shape({}),scaffoldBlockPxWidth:E.number,slideRegionSize:E.number,rowHeight:E.oneOfType([E.number,E.func]),treeNodeRenderer:E.func,nodeContentRenderer:E.func,placeholderRenderer:E.func}),getNodeKey:E.func,onChange:E.func.isRequired,onMoveNode:E.func,canDrag:E.oneOfType([E.func,E.bool]),canDrop:E.func,canNodeHaveChildren:E.func,shouldCopyOnOutsideDrop:E.oneOfType([E.func,E.bool]),onVisibilityToggle:E.func,dndType:E.string,onDragStateChanged:E.func,onlyExpandSearchedNodes:E.bool,rowDirection:E.string};Cn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:$p,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};Ap(Cn);var Jp=function(r){return $.createElement(Ld.Consumer,null,function(n){var t=n.dragDropManager;return t===void 0?null:$.createElement(Cn,st({},r,{dragDropManager:t}))})},cs={exports:{}};function Qp(e,r){if(e==null)return{};var n,t,i=pr(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)n=o[t],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $n(e){return e&&Xc(e)==="object"&&e.constructor===Object}function ds(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},t=n.clone?U({},e):e;return $n(e)&&$n(r)&&Object.keys(r).forEach(function(i){i!=="__proto__"&&($n(r[i])&&i in e?t[i]=ds(e[i],r[i],n):t[i]=r[i])}),t}function us(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.baseClasses,n=e.newClasses;if(e.Component,!n)return r;var t=U({},r);return Object.keys(n).forEach(function(i){n[i]&&(t[i]="".concat(r[i]," ").concat(n[i]))}),t}var Lt={set:function(r,n,t,i){var o=r.get(n);o||(o=new Map,r.set(n,o)),o.set(t,i)},get:function(r,n,t){var i=r.get(n);return i?i.get(t):void 0},delete:function(r,n,t){var i=r.get(n);i.delete(t)}},Zp=$.createContext(null);function eh(){var e=$.useContext(Zp);return e}var th=typeof Symbol=="function"&&Symbol.for;const rh=th?Symbol.for("mui.nested"):"__THEME_NESTED__";var nh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function ih(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.disableGlobal,n=r===void 0?!1:r,t=e.productionPrefix,i=t===void 0?"jss":t,o=e.seed,a=o===void 0?"":o,l=a===""?"":"".concat(a,"-"),s=0,c=function(){return s+=1,s};return function(d,u){var f=u.options.name;if(f&&f.indexOf("Mui")===0&&!u.options.link&&!n){if(nh.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var p="".concat(l).concat(f,"-").concat(d.key);return!u.options.theme[rh]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(l).concat(i).concat(c())}}function oh(){return{plugins:[Jc(),Qc(),Zc(),ed(),td(),typeof window>"u"?null:rd(),nd()]}}var ah=id(oh()),lh=ih(),sh=new Map,ch={disableGeneration:!1,generateClassName:lh,jss:ah,sheetsCache:null,sheetsManager:sh,sheetsRegistry:null},dh=$.createContext(ch),ha=-1e9;function uh(){return ha+=1,ha}var fh={};function ph(e){var r=typeof e=="function";return{create:function(t,i){var o;try{o=r?e(t):e}catch(s){throw s}if(!i||!t.overrides||!t.overrides[i])return o;var a=t.overrides[i],l=U({},o);return Object.keys(a).forEach(function(s){l[s]=ds(l[s],a[s])}),l},options:{}}}function hh(e,r,n){var t=e.state,i=e.stylesOptions;if(i.disableGeneration)return r||{};t.cacheClasses||(t.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return t.classes!==t.cacheClasses.lastJSS&&(t.cacheClasses.lastJSS=t.classes,o=!0),r!==t.cacheClasses.lastProp&&(t.cacheClasses.lastProp=r,o=!0),o&&(t.cacheClasses.value=us({baseClasses:t.cacheClasses.lastJSS,newClasses:r,Component:n})),t.cacheClasses.value}function gh(e,r){var n=e.state,t=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var l=Lt.get(i.sheetsManager,o,t);l||(l={refs:0,staticSheet:null,dynamicStyles:null},Lt.set(i.sheetsManager,o,t,l));var s=U({},o.options,i,{theme:t,flip:typeof i.flip=="boolean"?i.flip:t.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var c=i.sheetsRegistry;if(l.refs===0){var d;i.sheetsCache&&(d=Lt.get(i.sheetsCache,o,t));var u=o.create(t,a);d||(d=i.jss.createStyleSheet(u,U({link:!1},s)),d.attach(),i.sheetsCache&&Lt.set(i.sheetsCache,o,t,d)),c&&c.add(d),l.staticSheet=d,l.dynamicStyles=od(u)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,U({link:!0},s));f.update(r),f.attach(),n.dynamicSheet=f,n.classes=us({baseClasses:l.staticSheet.classes,newClasses:f.classes}),c&&c.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function vh(e,r){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(r)}function mh(e){var r=e.state,n=e.theme,t=e.stylesOptions,i=e.stylesCreator;if(!t.disableGeneration){var o=Lt.get(t.sheetsManager,i,n);o.refs-=1;var a=t.sheetsRegistry;o.refs===0&&(Lt.delete(t.sheetsManager,i,n),t.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),r.dynamicSheet&&(t.jss.removeStyleSheet(r.dynamicSheet),a&&a.remove(r.dynamicSheet))}}function bh(e,r){var n=$.useRef([]),t,i=$.useMemo(function(){return{}},r);n.current!==i&&(n.current=i,t=e()),$.useEffect(function(){return function(){t&&t()}},[i])}function Sh(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.name,t=r.classNamePrefix,i=r.Component,o=r.defaultTheme,a=o===void 0?fh:o,l=Qp(r,["name","classNamePrefix","Component","defaultTheme"]),s=ph(e),c=n||t||"makeStyles";s.options={index:uh(),name:n,meta:c,classNamePrefix:c};var d=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=eh()||a,h=U({},$.useContext(dh),l),g=$.useRef(),v=$.useRef();bh(function(){var b={name:n,state:{},stylesCreator:s,stylesOptions:h,theme:p};return gh(b,f),v.current=!1,g.current=b,function(){mh(b)}},[p,s]),$.useEffect(function(){v.current&&vh(g.current,f),v.current=!0});var m=hh(g.current,f.classes,i);return m};return d}const yh=Object.freeze(Object.defineProperty({__proto__:null,default:Sh},Symbol.toStringTag,{value:"Module"})),Ch=vn(yh);(function(e,r){(function(n,t){e.exports=t()})(typeof self<"u"?self:et,function(){return function(n){function t(o){if(i[o])return i[o].exports;var a=i[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};return t.m=n,t.c=i,t.d=function(o,a,l){t.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:l})},t.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(a,"a",a),a},t.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},t.p="",t(t.s=3)}([function(n,t){n.exports=I},function(n,t){n.exports=rl},function(n,t){n.exports=Ch},function(n,t,i){function o(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(t,"__esModule",{value:!0});var a=i(4),l=o(a),s=i(6),c=o(s);t.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,t,i){function o(b){return b&&b.__esModule?b:{default:b}}function a(b,S){return!!b.children&&typeof b.children!="function"&&b.children.some(function(T){return T===S||a(T,S)})}function l(b){var S=b.scaffoldBlockPxWidth,T=b.connectDragPreview,O=b.connectDragSource,w=b.isDragging,P=b.canDrop,C=b.canDrag,_=b.node,y=b.title,M=b.draggedNode,z=b.path,j=b.treeIndex,H=b.isSearchMatch,Y=b.isSearchFocus,K=b.icons,J=b.buttons,oe=b.className,de=b.style,ue=b.didDrop,le=b.lowerSiblingCounts,ee=b.listIndex,X=b.swapFrom,ae=b.swapLength,B=b.swapDepth,W=b.onItemClick,A=m(),x=y||_.title,D=M&&a(M,_),L=!ue&&w,G=[];le.forEach(function(Z,te){if(te>0&&(G.push(d.default.createElement("div",{className:A.lineBlock,key:"pre_"+(1+te),style:{width:S}})),j!==ee&&te===B)){var he="";he=ee===X+ae-1?A.highlightBottomLeftCorner:j===X?A.highlightTopLeftCorner:A.highlightLineVertical,G.push(d.default.createElement("div",{className:A.absoluteLineBlock+" "+he,key:"highlight_"+(1+te),style:{left:S*te,width:S}}))}});var V=d.default.createElement("div",{className:A.contentNode},T(d.default.createElement("div",{className:A.row+(_.active?" "+A.activeRow:"")+(L?" "+A.rowLandingPad:"")+(w?" "+A.rowLandingPadDisable:"")+(L&&!P?" "+A.rowCancelPad:"")+(H?" "+A.rowSearchMatch:"")+(Y?" "+A.rowSearchFocus:"")+(C?"":" "+A.rowWrapperDragDisabled)+(oe?" "+oe:""),onClick:function(){return W?W(s({},_,{index:j})):null},style:s({opacity:D?.5:1},de)},_.type==="divider"?d.default.createElement("div",{className:A.divider}):d.default.createElement(c.Fragment,null,G,d.default.createElement("div",{className:A.rowIcon},K),d.default.createElement("div",{className:A.rowLabel},typeof x=="string"?d.default.createElement("span",{className:A.rowTitle},x):typeof x=="function"?x({node:_,path:z,treeIndex:j}):x),d.default.createElement("div",{className:A.rowToolbar},J)))));return C?O(V,{dropEffect:"copy"}):V}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(b){for(var S=1;S<arguments.length;S++){var T=arguments[S];for(var O in T)Object.prototype.hasOwnProperty.call(T,O)&&(b[O]=T[O])}return b},c=i(0),d=o(c),u=i(1),f=o(u),p=i(2),h=o(p),g=i(5),v=o(g),m=(0,h.default)(v.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:f.default.node,canDrag:f.default.bool,canDrop:f.default.bool,className:f.default.string,connectDragPreview:f.default.func.isRequired,connectDragSource:f.default.func.isRequired,didDrop:f.default.bool.isRequired,draggedNode:f.default.shape({}),icons:f.default.node,isDragging:f.default.bool.isRequired,isOver:f.default.bool.isRequired,isSearchFocus:f.default.bool,isSearchMatch:f.default.bool,listIndex:f.default.number.isRequired,lowerSiblingCounts:f.default.arrayOf(f.default.number).isRequired,node:f.default.shape({}).isRequired,parentNode:f.default.shape({}),path:f.default.arrayOf(f.default.oneOfType([f.default.string,f.default.number])).isRequired,rowDirection:f.default.string.isRequired,scaffoldBlockPxWidth:f.default.number.isRequired,style:f.default.shape({}),swapDepth:f.default.number,swapFrom:f.default.number,swapLength:f.default.number,title:f.default.oneOfType([f.default.func,f.default.node]),toggleChildrenVisibility:f.default.func,treeId:f.default.string.isRequired,treeIndex:f.default.number.isRequired},t.default=l},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,t,i){function o(v){return v&&v.__esModule?v:{default:v}}function a(v){var m=v.children,b=v.listIndex,S=v.swapFrom,T=v.swapLength,O=v.swapDepth,w=v.lowerSiblingCounts,P=v.connectDropTarget,C=v.isOver,_=v.draggedNode,y=v.canDrop,M=g();return P(s.default.createElement("div",{className:M.node},l.Children.map(m,function(z){return(0,l.cloneElement)(z,{canDrop:y,draggedNode:_,isOver:C,listIndex:b,lowerSiblingCounts:w,swapDepth:O,swapFrom:S,swapLength:T})})))}Object.defineProperty(t,"__esModule",{value:!0});var l=i(0),s=o(l),c=i(1),d=o(c),u=i(2),f=o(u),p=i(7),h=o(p),g=(0,f.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:d.default.bool,children:d.default.node.isRequired,connectDropTarget:d.default.func.isRequired,draggedNode:d.default.shape({}),getPrevRow:d.default.func.isRequired,isOver:d.default.bool.isRequired,listIndex:d.default.number.isRequired,lowerSiblingCounts:d.default.arrayOf(d.default.number).isRequired,node:d.default.shape({}).isRequired,path:d.default.arrayOf(d.default.oneOfType([d.default.string,d.default.number])).isRequired,rowDirection:d.default.string.isRequired,scaffoldBlockPxWidth:d.default.number.isRequired,swapDepth:d.default.number,swapFrom:d.default.number,swapLength:d.default.number,treeId:d.default.string.isRequired,treeIndex:d.default.number.isRequired},t.default=a},function(n,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{node:{display:"flex"}}}}])})})(cs);var xh=cs.exports;const wh=$e(xh),Ih=e=>e.from!=="team-tmpl";function Rh({prevPath:e,nextPath:r,node:n}){if(n.from==="team-tmpl")return!1;const t=e.length,i=r.length;return!!(t===i&&ad(e.slice(0,t-1),r.slice(0,i-1)))}function fs({treeNode:e}){const{locale:r}=Ye(),{blocklet:n}=Rt(),t=n.environments.find(a=>a.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),i=ge(a=>{if(a!=null&&a.startsWith("/"))try{return new URL(a,t==null?void 0:t.value).href}catch{console.error("Failed to parse url",{url:a,origin:t==null?void 0:t.value})}return a});function o(){const{title:a,subtitle:l}=e;let s=a,c=l;return At(a)&&(s=a[r]),!I.isValidElement(l)&&At(l)&&(c=l[r]),R.jsxs(ne,{display:"flex",alignItems:"center",children:[R.jsx(je,{variant:"subtitle1",fontSize:16,children:s}),l&&R.jsx(je,{variant:"body2",color:"gray",ml:1.5,lineHeight:1,children:c})]})}return R.jsxs(R.Fragment,{children:[e.icon&&(Si(i(e.icon))?R.jsx(yt,{size:16,style:{marginRight:4},icon:i(e.icon)}):R.jsx(Ie,{size:16,style:{marginRight:4},icon:e.icon})),o()]})}fs.propTypes={treeNode:E.object.isRequired};const Dh=pt(ne)(({theme:e})=>({"& .MuiNodeContent-row":{backgroundColor:e.palette.background.default}}));function ki({treeData:e,setTreeData:r,renderActions:n}){const t=e.map(o=>({...o,expanded:!0})),i={};return typeof window<"u"&&(i.context=window),R.jsx(Dh,{children:R.jsx(kd,{backend:zd,...i,children:R.jsx(Jp,{generateNodeProps:o=>{const a=Ih(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?R.jsx(Ie,{icon:"ic:round-drag-indicator"}):R.jsx(ne,{width:16,height:16}),title:R.jsx(fs,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:t,onChange:r,canDrop:Rh,theme:wh})})})}ki.propTypes={treeData:E.object.isRequired,setTreeData:E.func,renderActions:E.func};ki.defaultProps={setTreeData:()=>{},renderActions:()=>{}};const rn="en";function zi({sx:e,onAdd:r,onChange:n,locale:t,locales:i,localeMap:o,onRemoveLocale:a}){const{t:l}=Ye(),s=I.useRef(),[c,d]=I.useState(null),u=Cr({localeList:[],inputLocale:"",localeError:""}),f=I.useMemo(()=>!!c,[c]),p=I.useMemo(()=>i.includes(t)?t:rn,[i,t]),h=I.useMemo(()=>Object.keys(sr(o,[...u.localeList,rn])).map(w=>({title:o[w],value:w})),[u.localeList]),g=I.useMemo(()=>{var P;return`Default (${o[rn]||((P=Object.values(o))==null?void 0:P[0])})`},[o]);I.useEffect(()=>{u.localeList=[...i]},[i,u]),Nd("enter",()=>{setTimeout(()=>{b()})},{target:s});function v(w){return w?w==="en"||u.localeList.includes(w)?l("navigation.form.localeExists",{value:w}):!0:l("common.requiredErrorText",{name:"Locale"})}function m(w=""){const P=w==null?void 0:w.trim(),C=v(P);return C!==!0?u.localeError=C:u.localeError="",C}function b(){var C;const w=(C=u.inputLocale)==null?void 0:C.trim();m(w)===!0&&(S(),u.localeList.push(w),r(w))}function S(){d(null),u.inputLocale="",u.localeError=""}function T(w,P){w.preventDefault(),w.stopPropagation(),u.localeList=hl(u.localeList,P),a(P)}function O(w){const{value:P}=w.target;m(P),u.inputLocale=P}return R.jsxs(R.Fragment,{children:[R.jsxs(nu,{sx:e,value:p,onChange:(w,P)=>{n(P)},children:[R.jsx(yo,{label:g,value:"en"}),u.localeList.map(w=>R.jsx(yo,{sx:{position:"relative"},label:R.jsxs(R.Fragment,{children:[o[w],R.jsx(He,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:P=>{T(P,w)},children:R.jsx(Ie,{icon:"mdi:close",height:14})})]}),value:w},w)),R.jsx(He,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:w=>{d(w.currentTarget)},children:R.jsx(Ie,{icon:"mdi:plus"})})]}),R.jsx(ti,{open:f,anchorEl:c,onClose:S,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:R.jsxs(ne,{sx:{p:2,width:"270px"},children:[R.jsx(je,{variant:"subtitle2",children:l("navigation.form.localePlaceholder")}),R.jsx(ne,{mt:1,children:R.jsx(ii,{required:!0,fullWidth:!0,label:"Locale",value:u.inputLocale,options:h,onChange:O,error:!!u.localeError,helperText:u.localeError||" "})}),R.jsx(ne,{display:"flex",justifyContent:"flex-end",children:R.jsx(on,{size:"small",variant:"contained",onClick:b,children:l("common.confirm")})})]})})]})}zi.propTypes={sx:E.any,onAdd:E.func,onChange:E.func,onRemoveLocale:E.func,locale:E.string,localeMap:E.object,locales:E.array};zi.defaultProps={sx:null,onAdd:()=>{},onChange:()=>{},onRemoveLocale:()=>{},locale:rn,localeMap:{},locales:[]};const Bi=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function ps(e,r,n=5e3){for(const t of Bi){const i=It(t,e);try{return await ou.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 Th({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 ps("/search",{query:`${o} palette=${t}`||e,start:n,limit:r,...i&&{prefix:i}});return a}const Vr=new Map;async function _h(e){if(Vr.has(e))return Vr.get(e);const r=(async()=>{var i;const{data:n}=await ps("/collection",{prefix:e}),t=new Set;return(i=n.uncategorized)==null||i.forEach(o=>t.add(`${e}:${o}`)),Object.values(n.categories??{}).forEach(o=>{o.forEach(a=>t.add(`${e}:${a}`))}),Array.from(t)})();Vr.set(e,r);try{return await r}catch(n){throw Vr.delete(e),n}}function Ph(e){return It(Bi[0],`${e}.svg`)}function Oh(e){try{const r=new URL(e);for(const n of Bi)if(r.origin===n)return ld(r.pathname).replace(".svg","");return""}catch{return""}}function Eh(e){let r=!0,n=e;return e&&(e.startsWith("/")?(r=!1,n=""):Si(e)&&(n=Oh(e))),{isIconId:r,iconId:n}}const Nh=I.lazy(()=>ud(()=>import("./index-kVMWdWEQ.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url).then(e=>({default:e.Uploader}))),ga=yi(yt)(({theme:e})=>({"&&":{color:e.palette.text.primary},"> img":{filter:e.palette.mode==="dark"?"invert(1)":"none"}}));function hs({icon:e,...r}){const[n,t]=I.useState(!1);return il(async()=>{t(!1),await ol(e),t(!0)},[e]),e?n?R.jsx(Ie,{icon:e,...r}):R.jsx(Ie,{color:"#f06f6e",icon:"ic:baseline-error",...r}):R.jsx(Ie,{icon:"material-symbols-light:select-rounded",...r})}hs.propTypes={icon:E.string.isRequired};function di({value:e,helperText:r,label:n,placeholder:t,methods:i=["select"],iconifyShape:o="id",...a}){var ee;const{getSessionInHeader:l,prefix:s,inService:c}=nl(),{blocklet:d}=Rt(),u=Ci(X=>X.breakpoints.down("md")),f=d.environments.find(X=>X.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=I.useRef(null),g=I.useRef(null),v=I.useRef(null),{t:m,locale:b}=Ye(),{isIconId:S,iconId:T}=Eh(e),[O,w]=I.useState(null),{onChange:P,onBlur:C,sx:_,...y}=a,M=i.includes("upload"),z=i.includes("select"),j=It(s,"/api/media/upload",d.appPid),H=Cr({showPopover:!1}),Y=ge(X=>{if(X!=null&&X.startsWith("/"))try{const ae=c?window.location.origin:f==null?void 0:f.value;return new URL(X,ae).href}catch{console.error("Failed to resolve url: ",X)}return X},[f==null?void 0:f.value,c]),K=ge(async X=>await h.current.getUploader().uploadFile(X)),J=ge(()=>{w(null)}),oe=ge(()=>{z&&w(v.current)}),de=ge(async X=>{try{if(o==="url"){const ae=Ph(X),B=await sd(ae,{width:128,height:128}),W=await cd(B,X);await K(W)}else P==null||P(X)}catch(ae){console.error("Failed to pick icon:",ae)}J()}),ue=ge(X=>{X.stopPropagation(),g.current.open(),J()}),le=ge(X=>{var ae;(ae=a==null?void 0:a.onChange)==null||ae.call(a,X.data.url)});return R.jsxs(R.Fragment,{children:[R.jsx(Nt,{helperText:r,value:e,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},..._},onClick:z?oe:void 0,...y,label:n,placeholder:t,InputProps:{ref:v,readOnly:!0,startAdornment:R.jsx(ri,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{e&&(H.showPopover=!0)},onMouseLeave:()=>{H.showPopover=!1},children:R.jsx(ga,{size:28,icon:Y(e),alt:"Error"})}),endAdornment:R.jsxs(ri,{position:"end",children:[R.jsx(He,{sx:{visibility:e?"visible":"hidden"},onClick:X=>{X.stopPropagation(),P("")},children:R.jsx(pl,{style:{fontSize:18}})}),M&&R.jsx(dd,{title:m("common.upload"),children:R.jsx(He,{disableFocusRipple:!1,disableRipple:!1,onClick:ue,children:R.jsx(hs,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),z&&R.jsx(ne,{component:iu,sx:{mr:"-6px",fontSize:24,transform:O?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}),z&&R.jsx(ti,{open:!!O,anchorEl:O,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...u&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:J,children:R.jsx(gs,{label:n,placeholder:t,value:S?T:"",sx:{width:((ee=v.current)==null?void 0:ee.offsetWidth)??"auto"},onPick:de,onClose:J})}),R.jsx(ui,{ref:h,locale:b,apiPath:j,headers:p,imageEditorProps:{},onUploadFinish:le}),R.jsx(ui,{ref:g,locale:b,apiPath:j,headers:p,onUploadFinish:le}),R.jsx(ti,{sx:{pointerEvents:"none"},open:H.showPopover,anchorEl:v.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{H.showPopover=!1},disableRestoreFocus:!0,children:R.jsx(ga,{size:120,icon:Y(e),alt:"Error"})})]})}di.propTypes={value:E.string.isRequired,label:E.any,placeholder:E.any,helperText:E.string,methods:E.arrayOf(E.oneOf(["select","upload"])),iconifyShape:E.oneOf(["id","url"])};function gs({label:e,placeholder:r,value:n="",sx:t,onPick:i,onClose:o,...a}){const[l,s]=I.useState([]),[c,d]=I.useState(!0),[u,f]=I.useState(n),[p,h]=I.useState(!1),g=I.useRef(null),v=I.useRef([]),m=I.useRef(1),b=I.useRef(!0),{t:S}=Ye(),T=96,O=ge(()=>{!b.current||c||(d(!0),setTimeout(()=>{const C=m.current+1,_=(C-1)*T,y=C*T,M=v.current.slice(_,y);s(z=>[...z,...M]),m.current=C,b.current=y<v.current.length,d(!1)},300))}),w=ge(C=>{v.current=C,m.current=1,b.current=C.length>T;const _=C.slice(0,T);s(_),h(C.length===0),b.current&&O()}),{run:P}=al(async C=>{if(C){d(!0);try{const{icons:_}=await Th({keyword:C});w(_)}catch(_){console.error("Failed to search icons:",_),h(!0)}finally{d(!1)}}},{wait:300,trailing:!0});return I.useEffect(()=>{const C=()=>{if(!g.current)return;const{scrollTop:y,scrollHeight:M,clientHeight:z}=g.current;(y+z>=M-150||M<=z)&&O()},_=g.current;return _&&(_.addEventListener("scroll",C),C()),()=>{_&&_.removeEventListener("scroll",C)}},[O,c]),il(async()=>{if(u)P(u);else{d(!0);try{const C=await _h("mdi-light");w(C)}catch(C){console.error("Failed to fetch default icons:",C),h(!0)}finally{d(!1)}}},[u,P,w]),R.jsxs(Mh,{ref:g,sx:t,...a,children:[R.jsxs(ne,{className:"icon-picker-input",children:[R.jsx(Nt,{label:S("navigation.form.searchIcons"),placeholder:S("navigation.form.searchIconsPlaceholder"),size:"small",value:u,sx:{flexGrow:1},autoFocus:!0,onChange:C=>f(C.target.value),InputProps:{endAdornment:R.jsx(He,{sx:{visibility:u?"visible":"hidden"},onClick:()=>f(""),children:R.jsx(pl,{style:{fontSize:18}})})}}),R.jsx(on,{onClick:o,children:S("common.cancel")})]}),R.jsxs(ne,{children:[l.length>0&&R.jsx(ne,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(C=>R.jsx(Lh,{$active:n===C,onClick:()=>{i(C)},children:R.jsx(Ie,{icon:C,width:"32",height:"32"})},C))}),p&&R.jsx(ne,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:R.jsx(ne,{sx:{textAlign:"center"},children:"No matching results"})}),c&&R.jsx(ne,{sx:{p:2,display:"flex",justifyContent:"center"},children:R.jsx(fd,{size:20})})]})]})}gs.propTypes={label:E.any,placeholder:E.any,value:E.string,sx:E.object,onPick:E.func.isRequired,onClose:E.func.isRequired};const Mh=yi(ne)(({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}})),Lh=yi(He,{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}})),ui=I.forwardRef(({locale:e,apiPath:r,headers:n,imageEditorProps:t={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:i},o)=>R.jsx(I.Suspense,{children:R.jsx(Nh,{locale:e,ref:o,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>i==null?void 0:i(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:t,apiPathProps:{uploader:r,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:n}})}));ui.propTypes={locale:E.string,apiPath:E.string,headers:E.object,imageEditorProps:E.object,onUploadFinish:E.func};const va=24,ma=48,ba="add",Be="en",Sa={title:{[Be]:""},description:{[Be]:""},link:{[Be]:""}};function ya(e){return hl(Array.from(new Set(Pe.NAVIGATION_I18N_FIELDS.flatMap(r=>At(e[r])?Object.keys(e[r]):[]))),Be)}E.string.isRequired;const xn=I.forwardRef(function({section:r,components:n,rawNavigations:t,onChange:i,...o},a){const{roles:l}=fl(),{t:s,locale:c}=Ye(),{blocklet:d}=Rt(),u=I.useMemo(()=>{const x=d.environments.find(L=>L.key==="BLOCKLET_APP_LANGUAGES");return(x?x.value.split(","):["en","zh"]).filter(L=>xt.SUPPORTED_LANGUAGES[L]).reduce((L,G)=>(L[G]=xt.SUPPORTED_LANGUAGES[G].nativeName,L),{})},[d.environments]),f=I.useRef(()=>{}),p=Cr({isRoot:!0,type:ba,linkDisabled:!1,locale:Be,formState:ze(Sa),get localeList(){return ya(p.formState)}}),{handleSubmit:h,control:g,reset:v,setValue:m,clearErrors:b,formState:{errors:S}}=tu({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});I.useEffect(()=>{Pe.NAVIGATION_I18N_FIELDS.forEach(x=>m(x,p.formState[x][p.locale]))},[m,p.locale]);const T=ru({control:g}),O=T.component,w=T.title,P=T.description,C=T.link,_=T.parent;I.useEffect(()=>{p.formState.title[p.locale]=w},[w]),I.useEffect(()=>{p.formState.description[p.locale]=P},[P]),I.useEffect(()=>{p.formState.link[p.locale]=C},[C]),I.useEffect(()=>{i==null||i(T)},[T,i]);const y=I.useMemo(()=>t.find(D=>O?n.find(G=>G.name===O).did===D.id:D.id===_),[n,t,O,_]),M=I.useMemo(()=>{if(y!=null&&y.component){const x=n.find(V=>V.name===y.component),{link:D}=x||{},L=At(D)?D[p.locale]:D;if(O)return uo(L);const G=At(y.link)?y.link[p.locale]:y.link;return uo(It(L,G||"/"))}return null},[n,p.locale,y,O]),z=I.useMemo(()=>{const{component:x}=y||{},D=n.find(V=>V.name===x),{navigation:L=[]}=D||{};return _e.flattenNavigation(L,{transform(V,Z){return Z!=null&&Z.section&&(V.section=V.section||Z.section),V}}).filter(V=>V.link).filter(V=>_e.isMatchSection(V.section,r)).map(V=>({label:V.link,title:V.title[c]||V.title}))},[y,n,r,c]),j=I.useCallback(()=>{p.isRoot=!0,p.locale=Be,p.type=ba,p.linkDisabled=!1,p.formState=ze(Sa),v(),b(),f.current=()=>{}},[b,v,p]),H=I.useCallback((x={})=>(p.localeList.length>0&&Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{fu(p.formState[D]).length>1&&(x[D]=p.formState[D])}),pd(x.role)&&(x.role=void 0),x),[p.localeList,p.formState]),Y=I.useCallback(({parent:x}={},D=()=>{})=>{p.type="add",p.isRoot=!x,m("parent",x==null?void 0:x.id),f.current=L=>{D(L)}},[m,p]),K=I.useCallback((x={},D=()=>{})=>{const{id:L,icon:G,parent:V,component:Z,role:te=[]}=x;m("id",L),m("icon",G),x.from==="team-tmpl"&&(p.linkDisabled=!0);const he=ya(x),Ve=(fe,Te)=>{vd(fe)?p.formState[Te]=he.reduce((ie,pe)=>(ie[pe]=fe,ie),{[Be]:fe}):At(fe)?p.formState[Te]=ze(fe):p.formState[Te]={}};Pe.NAVIGATION_I18N_FIELDS.forEach(fe=>Ve(x[fe],fe)),Pe.NAVIGATION_I18N_FIELDS.forEach(fe=>m(fe,p.formState[fe][p.locale])),m("component",Z),m("parent",V),m("role",te||[]),p.type="edit",p.isRoot=!V,f.current=fe=>{const Te=hd(fe,["id","title","description","icon","component","link","role"]);D(Te)}},[m,p]);function J(x){const D=x==null?void 0:x.trim();if(r!=="bottomNavigation"){if(!D)return s("common.requiredErrorText",{name:s("navigation.form.title")});if(D.length>va)return s("navigation.form.titleTooLong",{len:va})}return!0}function oe(x){const D=x==null?void 0:x.trim();return D&&D.length>ma?s("navigation.form.descriptionTooLong",{len:ma}):!0}const de=ge(x=>x!=null&&x.startsWith("/")?new URL(x,window.location.origin).href:x);async function ue(x){const D=x==null?void 0:x.trim();if(D){if(Si(de(D)))return!0;try{await ol(D)}catch{return s("navigation.form.invalidIcon")}}return!0}function le(x){const D=x==null?void 0:x.trim();return D?ue(D):s("common.requiredErrorText",{name:s("navigation.form.icon")})}function ee(x){const D=x==null?void 0:x.trim();return D?_e.checkLink(D)?!0:s("navigation.form.invalidLink"):p.isRoot?!0:s("common.requiredErrorText",{name:s("navigation.form.link")})}const X=I.useCallback(x=>{p.locale=x,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D][x]||(p.formState[D][x]="")}),setTimeout(()=>{b()})},[b,p]),ae=I.useCallback(()=>{const{title:x,link:D}=p.formState;if(r!=="bottomNavigation")for(const L of Object.keys(x)){const G=J(x[L]);if(G!==!0)return G}for(const L of Object.keys(D)){const G=ee(D[L]);if(G!==!0)return G}return!0},[r,p.formState]),B=I.useCallback(x=>{const D=ae();D===!0?f.current(H(x)):rr.error(D)},[ae,H]),W=I.useCallback(x=>{p.locale=Be,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D]=sr(p.formState[D],x)}),i==null||i(T)},[p,T,i]),A=I.useCallback(x=>{p.locale=x,Pe.NAVIGATION_I18N_FIELDS.forEach(D=>{p.formState[D][x]=p.formState[D][Be]}),i==null||i(T),setTimeout(()=>{b()})},[b,p,T,i]);return I.useImperativeHandle(a,()=>({add:Y,edit:K,resetImmediate:()=>j(),reset:()=>setTimeout(()=>j(),0),submit:h(B)}),[Y,j,K,h,B]),R.jsxs(ne,{...o,children:[R.jsx(zi,{sx:{mb:1},onAdd:A,onChange:X,onRemoveLocale:W,locale:p.locale,localeMap:u,locales:p.localeList}),R.jsxs("form",{noValidate:!0,autoComplete:"off",children:[r!=="bottomNavigation"&&R.jsx(nt,{name:"title",control:g,rules:{validate:J},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.title)!=null&&D.message),helperText:((L=S==null?void 0:S.title)==null?void 0:L.message)||" ",...x})}}),r==="bottomNavigation"?R.jsx(nt,{name:"icon",control:g,rules:{validate:le},render:({field:x})=>{var D,L;return R.jsx(di,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((D=S==null?void 0:S.icon)!=null&&D.message),helperText:(L=S==null?void 0:S.icon)==null?void 0:L.message,disabled:p.locale!==Be,methods:["select"],iconifyShape:"url",...x})}}):R.jsx(nt,{name:"icon",control:g,rules:{validate:ue},render:({field:x})=>{var D,L;return R.jsx(di,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.iconPlaceholder"),label:s("navigation.form.icon"),error:!!((D=S==null?void 0:S.icon)!=null&&D.message),helperText:(L=S==null?void 0:S.icon)==null?void 0:L.message,disabled:p.locale!==Be,...x})}}),p.isRoot&&R.jsx(nt,{name:"component",control:g,render:({field:x})=>{var D,L;return R.jsx(ii,{fullWidth:!0,margin:"dense",disabled:p.locale!==Be&&x.value,label:s("navigation.form.component"),placeholer:s("navigation.form.componentPlaceholder"),options:n.map(G=>({title:G.title,value:G.name,description:G.link})),error:!!((D=S==null?void 0:S.component)!=null&&D.message),helperText:((L=S==null?void 0:S.component)==null?void 0:L.message)||" ",...sr(x,"ref")})}}),!p.isRoot&&["header"].includes(r)&&R.jsx(nt,{name:"description",control:g,rules:{validate:oe},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.descriptionPlaceholder"),label:s("navigation.form.description"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.description)!=null&&D.message),helperText:((L=S==null?void 0:S.description)==null?void 0:L.message)||" ",...x})}}),R.jsx(nt,{name:"link",control:g,rules:{validate:ee},render:({field:x})=>R.jsx(ll,{fullWidth:!0,margin:"dense",children:R.jsx(au,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:p.linkDisabled,isOptionEqualToValue:D=>D.label,options:z,renderInput:D=>{var L,G;return R.jsx(Nt,{...D,placeholder:s("navigation.form.linkPlaceholder"),label:s("navigation.form.link"),error:!!((L=S==null?void 0:S.link)!=null&&L.message),helperText:((G=S==null?void 0:S.link)==null?void 0:G.message)||"/abc/bcd or /abc or https://arcblock.io",InputProps:{startAdornment:M?R.jsx(ri,{position:"start",sx:{textDecoration:gd(C||"")?"line-through":""},children:M}):null}})},renderOption:(D,L)=>R.jsxs(ne,{component:"li",...D,children:[L.label,R.jsx(je,{marginLeft:1,component:"span",variant:"body2",color:"text.secondary",children:L.title})]}),margin:"dense",...x,onChange:()=>{},onInputChange:(D,L)=>{x.onChange(L)}})})}),["dashboard","sessionManager"].includes(r)&&R.jsx(nt,{name:"role",control:g,render:({field:x})=>{var D,L;return R.jsx(ii,{fullWidth:!0,multiple:!0,margin:"dense",label:s("navigation.form.role"),placeholer:s("navigation.form.rolePlaceholder"),options:l.map(G=>({title:G.title,value:G.name})),error:!!((D=S==null?void 0:S.role)!=null&&D.message),helperText:((L=S==null?void 0:S.role)==null?void 0:L.message)||" ",...sr(x,"ref")})}}),r==="bottomNavigation"&&R.jsx(nt,{name:"title",control:g,rules:{validate:J},render:({field:x})=>{var D,L;return R.jsx(Nt,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:s("navigation.form.titlePlaceholder"),label:s("navigation.form.title"),disabled:p.isEdit,error:!!((D=S==null?void 0:S.title)!=null&&D.message),helperText:((L=S==null?void 0:S.title)==null?void 0:L.message)||" ",...x})}})]})]})});xn.propTypes={section:E.string,components:E.array,rawNavigations:E.array,onChange:E.func};xn.defaultProps={section:"",components:[],rawNavigations:[],onChange:()=>{}};const wn=I.forwardRef(function({section:r,components:n,rawNavigations:t},i){const{t:o}=Ye(),[a,{setTrue:l,setFalse:s}]=Zd(!1),[c,d]=I.useState("add"),u=I.useRef(null),f=I.useMemo(()=>{const m={add:o("common.create"),edit:o("common.edit")}[c];return m?`${m} ${o("navigation.navigation")}`:"--"},[o,c]),p=I.useCallback(()=>{var v;s(),(v=u.current)==null||v.reset()},[s]),h=I.useCallback((v={},m=()=>{})=>{var b;d("add"),(b=u.current)==null||b.add(v,S=>m(p,S)),l()},[l,p]),g=I.useCallback((v={},m=()=>{})=>{var b;d("edit"),(b=u.current)==null||b.edit(v,S=>m(p,S)),l()},[l,p]);return I.useImperativeHandle(i,()=>({add:h,edit:g,close:p}),[h,g,p]),R.jsx(md,{open:a,title:f,keepMounted:!0,onClose:p,sx:{".MuiDialogContent-root":{pt:0}},actions:R.jsx(bd,{color:"primary",variant:"contained",onClick:()=>{var v;return(v=u.current)==null?void 0:v.submit()},children:o("common.confirm")}),children:R.jsx(xn,{ref:u,section:r,components:n,rawNavigations:t})})});wn.propTypes={section:E.string,components:E.array,rawNavigations:E.array};wn.defaultProps={section:"",components:[],rawNavigations:[]};function Fi({className:e,add:r,edit:n,toggle:t,del:i,data:o,section:a}){const{t:l}=Ye(),s=["yaml","team-tmpl"].includes(o.from),c=I.isValidElement(o.subtitle);function d(g){g.preventDefault(),g.stopPropagation()}const u=I.useCallback(g=>{d(g),r(o)},[r,o]),f=I.useCallback(g=>{d(g),n(o)},[n,o]),p=I.useCallback(g=>{d(g),t(o)},[t,o]),h=I.useCallback(g=>{d(g),i(o)},[i,o]);return R.jsxs("div",{className:e,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&R.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:R.jsx(He,{size:"small",color:"success",onClick:u,disabled:c,children:R.jsx(Ie,{icon:"mdi:plus-box-outline"})})}),R.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:R.jsx(He,{size:"small",color:"primary",onClick:f,disabled:c||o.from==="team-tmpl",children:R.jsx(Ie,{icon:"mdi:pencil-outline"})})}),R.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:R.jsx(He,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?R.jsx(Ie,{icon:"mdi:eye-off-outline"}):R.jsx(Ie,{icon:"mdi:eye-outline"})})}),R.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:R.jsx(He,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:R.jsx(Ie,{icon:"mdi:delete"})})})]})}Fi.propTypes={data:E.object.isRequired,className:E.string,add:E.func,edit:E.func,toggle:E.func,del:E.func,section:E.string};Fi.defaultProps={className:"",add:()=>{},edit:()=>{},toggle:()=>{},del:()=>{},section:""};function vs(e,r){return e?r===e.nodeName?!0:vs(e.parentNode,r):!1}function Ah({...e}){const r=n=>{vs(n.target,"A")&&n.preventDefault()};return R.jsx("div",{onClick:r,...e})}function Gi({className:e,navigation:r}){var s,c,d,u;const{blocklet:n}=Rt(),t=yd({blocklet:n,square:!0}),i=(c=(s=n==null?void 0:n.environments)==null?void 0:s.find(f=>f.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER))==null?void 0:c.value,o=(u=(d=n==null?void 0:n.environments)==null?void 0:d.find(f=>f.key===xt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR))==null?void 0:u.value,a=i||o?{owner:i,year:o}:void 0,l={appId:n.appDid,appLogo:t,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:r,copyright:a};return R.jsx(Ah,{children:R.jsxs(ne,{className:e,children:[R.jsx(Xd,{meta:l,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),R.jsx(ne,{children:R.jsx(Jd,{meta:l,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},showDomainWarningDialog:!1,children:R.jsx(fo,{container:!0,spacing:2,children:new Array(6).fill().map((f,p)=>R.jsxs(fo,{item:!0,xs:4,children:[R.jsx(Ln,{animation:!1,variant:"rectangular",width:"100%",height:120}),R.jsxs(ne,{sx:{pt:.5},children:[R.jsx(Ln,{animation:!1}),R.jsx(Ln,{width:"60%",animation:!1})]})]},p))})})}),R.jsx(Qd,{meta:l,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})}Gi.propTypes={className:E.string,navigation:E.array};Gi.defaultProps={className:"",navigation:[]};const kh=Sd(Gi)`
|
|
20
20
|
.dashboard {
|
|
21
21
|
height: auto !important;
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,br as B,aV as v,j as s,a0 as R,O as b,A as x,b as I,a4 as U,m as D,N as S,k as C,P as u,a5 as F,a6 as _,Z as E,J as T,w as $,aA as W,x as k,ao as A}from"./index-
|
|
1
|
+
import{r as g,br as B,aV as v,j as s,a0 as R,O as b,A as x,b as I,a4 as U,m as D,N as S,k as C,P as u,a5 as F,a6 as _,Z as E,J as T,w as $,aA as W,x as k,ao as A}from"./index-eLfUdELN.js";import{D as G,a as z,b as K}from"./index-DfJ_-35A.js";import"./index-DWdh-5Vi.js";import"./index-BojVbZw0.js";import{b as H,c as Z,d as J}from"./spaces-BAC7141S.js";import{u as w}from"./blocklet-Cfh-Xrih.js";import{d as V}from"./DeleteOutline-uICQncS-.js";import"./api-DNdeNTPy.js";function Y(){const[e,r]=g.useState(null),{blocklet:t}=w();return g.useEffect(()=>{r(H(t))},[t]),{storageEndpoint:e}}const N=g.createContext({}),{Provider:M,Consumer:pe}=N;function L({children:e}){const[r,t]=g.useState(!1),[o,a]=g.useState(null),{blocklet:c,actions:{refreshBlocklet:f}}=w(),{storageEndpoint:l}=Y(),{api:m}=B();v(async()=>{try{if(t(!0),b(l)){a(null);return}const p=await Z(l);a(p)}catch(p){console.error(p),x.error(p.message)}finally{t(!1)}},[l]);const n=()=>{a(null),f()},d=async p=>{a(p),await i(p.endpoint),f()},i=async p=>{await m.configBlocklet({input:{did:[c.meta.did],configs:[{key:I.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:p}]}}),f()};g.useEffect(()=>{async function p(){if(!o)return;const h=await J(o.endpoint,o.name),q=U(o,{name:h});a(q)}p()},[]);const y=!!(l&&o);return s.jsx(M,{value:{loading:r,spaceGateway:o,deleteSpaceGateway:n,updateSpaceGateway:d,storageEndpoint:l,settingStorageEndpoint:i,hasStorageEndpoint:y},children:e})}L.propTypes={children:R.node.isRequired};L.defaultProps={};function Q(){return g.useContext(N)}function X(){const{t:e}=D();return s.jsx(S,{children:s.jsxs(S,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[s.jsx(G,{style:{width:250,height:250}}),s.jsx(C,{marginTop:"24px",children:e("storage.spaces.connect.providerForStorage")})]})})}X.propTypes={};function j({spaceGateway:e,onDeleteSpace:r}){const{t}=D(),[o,a]=g.useState(!1),[c,f]=g.useState(!1),l=(n,d)=>{n==null||n.stopPropagation(),a(d)},m=async n=>{try{n==null||n.stopPropagation(),f(!0),await r(e),a(!1)}catch(d){console.error(d),x.error(`${t("storage.spaces.gateway.delete.failed")}: ${E(d)}`)}finally{f(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx(F,{size:"small",onClick:n=>l(n,!0),children:s.jsx(V,{})}),s.jsx(_,{title:t("storage.spaces.gateway.delete.title"),open:o,confirmButton:{text:t("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:t("common.cancel"),props:{size:"small",variant:"outlined"}},onConfirm:m,onCancel:n=>l(n,!1),children:s.jsx(C,{sx:{wordWrap:"break-word"},children:t("storage.spaces.gateway.delete.descForStorage",{name:`${e==null?void 0:e.name}`})})})]})}j.propTypes={onDeleteSpace:u.func,spaceGateway:u.shape({name:u.string.isRequired,url:u.string.isRequired,protected:u.bool}).isRequired};j.defaultProps={onDeleteSpace:()=>{}};function P({spaceGateway:e,onDisconnect:r}){const{t}=D(),o=async()=>{try{await r(),x.success(t("storage.spaces.gateway.delete.succeeded",{name:e.name?`(${e.name})`:""}))}catch(a){console.error(a),x.error(E(a))}};return s.jsx(j,{spaceGateway:e,onDeleteSpace:o})}P.propTypes={spaceGateway:u.shape({did:u.string.isRequired,name:u.string.isRequired,url:u.string.isRequired,endpoint:u.string.isRequired}).isRequired,onDisconnect:u.func};P.defaultProps={onDisconnect:()=>{}};function le(){const{t:e}=D(),{spaceGateway:r,settingStorageEndpoint:t}=Q();return s.jsxs(S,{display:"flex",flexDirection:"column",children:[s.jsx(S,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:s.jsx(C,{fontSize:"1rem",fontWeight:"bold",children:e("storage.spaces.connected.title")})}),s.jsx(S,{children:s.jsx(z,{sx:{marginTop:2},endpoint:r.endpoint,selected:!0,action:o=>s.jsx(P,{...o,onDisconnect:()=>t(null)})})})]})}function ee({blocklet:e}){var m,n,d;if(b(e))return{};const{appDid:r}=e,t=T.getAppName(e),o=T.getAppDescription(e),a=(d=(n=(m=e==null?void 0:e.site)==null?void 0:m.domainAliases)==null?void 0:n.sort((i,y)=>i.accessibility.accessible&&y.accessibility.accessible?+i.isProtected-+y.isProtected:+y.accessibility.accessible-+i.accessibility.accessible))==null?void 0:d.map(i=>{var h;const y=(h=i==null?void 0:i.domainStatus)!=null&&h.isHttps?"https://":"http://",p=i==null?void 0:i.value;return`${y}${p}`}).filter(Boolean),c=a==null?void 0:a[0],f=I.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,l=window.location.href;return{appDid:r,appName:t,appDescription:o,appUrl:c,scopes:f,referrer:l,isReady:!!c}}function O({onConnect:e,...r}){const{blocklet:t}=w(),{info:o}=B(),{t:a}=D(),c=ee({blocklet:t}),f=$(o),l={checkFn:W.create({baseURL:k(window.location.origin,A())}).get,webWalletUrl:f,extraParams:{appPid:t.appPid,appDid:c.appDid,appName:c.appName,appDescription:c.appDescription,appUrl:c.appUrl,referrer:c.referrer,scopes:c.scopes,nodeDid:o.did}},m=async({spaceGateway:n})=>{try{await e(n),x.success(a("storage.spaces.connectedWithName",{name:n.name}))}catch(d){console.error(d),x.error(E(d))}};return s.jsx(K,{...r,options:l,onSuccess:m})}O.propTypes={onConnect:R.func};O.defaultProps={onConnect:()=>{}};export{le as C,X as D,O as a,L as b,ee as c,Q as u};
|