@abtnode/webapp 1.16.29-beta-1fb308f8 → 1.16.29-beta-26adf6bb
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/{Add-BEm8ulfI.js → Add-B__xT4sB.js} +1 -1
- package/dist/assets/{ArrowDropDown-3OaPoerb.js → ArrowDropDown-VLne7ccc.js} +1 -1
- package/dist/assets/{Autocomplete-C4_togh8.js → Autocomplete-D9hQZXKP.js} +1 -1
- package/dist/assets/{Breadcrumbs-DLTqMPdx.js → Breadcrumbs-DaKfZKNR.js} +1 -1
- package/dist/assets/{ButtonGroup-DpVPGQtZ.js → ButtonGroup-DKjKDOWS.js} +1 -1
- package/dist/assets/{CheckCircle-Us9aCLov.js → CheckCircle-D24AG6dv.js} +1 -1
- package/dist/assets/{ChevronLeft-btzezyAD.js → ChevronLeft-Ca-Gi_H0.js} +1 -1
- package/dist/assets/{ChevronRight-ryUS-NtQ.js → ChevronRight-D0OlG7KY.js} +1 -1
- package/dist/assets/{Close-wWH8y0qM.js → Close-HMuVHWGT.js} +1 -1
- package/dist/assets/{Delete-MPWwMdcn.js → Delete-D1RDqaZi.js} +1 -1
- package/dist/assets/DeleteOutline-DI8b0xeB.js +1 -0
- package/dist/assets/{Done-vB-sVx5B.js → Done-4kUm4bds.js} +1 -1
- package/dist/assets/{Edit-DnPbFMup.js → Edit-uZUJue62.js} +1 -1
- package/dist/assets/{EditIcon-CWaReSCJ.js → EditIcon-BI_p9xCp.js} +1 -1
- package/dist/assets/{ExpandMore-gvSelbRO.js → ExpandMore-BHsYpUKK.js} +1 -1
- package/dist/assets/{FilterList-O5N3orby.js → FilterList-PDF9S8a9.js} +1 -1
- package/dist/assets/{Google-Dcc3117W.js → Google-D4D8I9sR.js} +1 -1
- package/dist/assets/{Https-BzkVHgKv.js → Https-B4vHJIg9.js} +1 -1
- package/dist/assets/{InputAdornment-BXQrh-Eh.js → InputAdornment-CWRir8bY.js} +1 -1
- package/dist/assets/{InputLabel-C0hP58zr.js → InputLabel-DWHNzKMy.js} +1 -1
- package/dist/assets/{LastPage-ChFfjNWA.js → LastPage-uzFB0_6o.js} +1 -1
- package/dist/assets/{Launch-CIMS_zAn.js → Launch-DBaH-8ib.js} +1 -1
- package/dist/assets/{Link-sIQTJwYN.js → Link-gPnxlUfS.js} +1 -1
- package/dist/assets/{LoadingButton-drC9HAVN.js → LoadingButton-Crpf-Gsb.js} +1 -1
- package/dist/assets/{LockIcon-BfgsRLZd.js → LockIcon-eAAk1Jhy.js} +1 -1
- package/dist/assets/{Loop-DZcA5WXX.js → Loop--S-cRtXc.js} +1 -1
- package/dist/assets/{MoreVert-D4QAjvea.js → MoreVert-BxyKJhuW.js} +1 -1
- package/dist/assets/{Pagination-PROEZlWN.js → Pagination-D7jcwNbF.js} +1 -1
- package/dist/assets/{Public-D2nGfl8H.js → Public-Cu2MymRa.js} +1 -1
- package/dist/assets/{SchemaReference.es-CUloqy0f.js → SchemaReference.es-CwMyq8ec.js} +1 -1
- package/dist/assets/{Search-DyPwa94B.js → Search-CsfCvyCj.js} +1 -1
- package/dist/assets/{Select-Cz2z_MUs.js → Select-BoNi1_kD.js} +1 -1
- package/dist/assets/{Skeleton-CHVKSllC.js → Skeleton-BDA1RcCc.js} +1 -1
- package/dist/assets/{Slider-BPK8-y0g.js → Slider-bbGbMdw9.js} +1 -1
- package/dist/assets/{Stepper-BdiWSQsf.js → Stepper-Cd9yxqw7.js} +1 -1
- package/dist/assets/{TextField-B39sPZXj.js → TextField-CJTsaR61.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BIXfrT7y.js → ToggleButtonGroup-DQxZKKu1.js} +1 -1
- package/dist/assets/{ViewList-BEq9etwt.js → ViewList-CIXYIeee.js} +1 -1
- package/dist/assets/{actions-DpFxNafF.js → actions-87KtVu63.js} +1 -1
- package/dist/assets/{actions-BxLve5Iv.js → actions-DfsSmCM0.js} +1 -1
- package/dist/assets/{agreement-CTjmFwVv.js → agreement-PjXumf9e.js} +1 -1
- package/dist/assets/api-BFKzvnZb.js +1 -0
- package/dist/assets/{app-avatar-DrB31ZQC.js → app-avatar-BEnx22QQ.js} +1 -1
- package/dist/assets/ar-D-8bmv2Q.js +1 -0
- package/dist/assets/{audit-logs-l4WViSqy.js → audit-logs-DACzBEqp.js} +1 -1
- package/dist/assets/blocklet-B2oa0l5B.js +1 -0
- package/dist/assets/{brace-fold.es-KtgYSaN0.js → brace-fold.es-DQgP9ckF.js} +1 -1
- package/dist/assets/{bundle-avatar-CHCKalk3.js → bundle-avatar-RmxwsZQa.js} +1 -1
- package/dist/assets/{chart-DG6Gas-e.js → chart-BFgJ4nI_.js} +1 -1
- package/dist/assets/{click-to-copy-nMxQLC3C.js → click-to-copy-7Me9NdFp.js} +1 -1
- package/dist/assets/{closebrackets.es-COhsaiJl.js → closebrackets.es-CCWX3tME.js} +1 -1
- package/dist/assets/{codemirror.es-n9ktfqME.js → codemirror.es-CHQ3RYjx.js} +1 -1
- package/dist/assets/{comment.es-C8GStSY4.js → comment.es-CsEff5HR.js} +1 -1
- package/dist/assets/{config-navigation-DGey71Nz.js → config-navigation-B4qdgj6W.js} +1 -1
- package/dist/assets/de-BXUm1QYV.js +1 -0
- package/dist/assets/{delete-confirm-C3JC6xgi.js → delete-confirm-D0V2Nyle.js} +1 -1
- package/dist/assets/{detail-DLFDHa_m.js → detail-DyxiW4dq.js} +3 -3
- package/dist/assets/{dialog.es-BEZA_mzs.js → dialog.es-CEFD6dNV.js} +1 -1
- package/dist/assets/{download-B_aZRwb6.js → download-BA9Kv4bx.js} +1 -1
- package/dist/assets/es-CH6tZGrR.js +1 -0
- package/dist/assets/{foldgutter.es-DksQExGg.js → foldgutter.es-D64jbd7B.js} +1 -1
- package/dist/assets/fr-roccVFT3.js +1 -0
- package/dist/assets/getValidReactChildren-DWgwfamf.js +1 -0
- package/dist/assets/hi-VN-lZj6f.js +1 -0
- package/dist/assets/{hint.es-SC09BvEu.js → hint.es-DgpTodKT.js} +1 -1
- package/dist/assets/{hint.es2-BmeoFino.js → hint.es2-DEfUunRw.js} +1 -1
- package/dist/assets/id-C-ovCb8b.js +1 -0
- package/dist/assets/{iframe-BfjEtdnl.js → iframe-DmMhkhv-.js} +1 -1
- package/dist/assets/{index-BnSXB6Ba.js → index-B0COILaQ.js} +1 -1
- package/dist/assets/{index-CI8Tta57.js → index-B1SbHyW5.js} +1 -1
- package/dist/assets/{index-lMNBpZHy.js → index-B4V-mN0B.js} +1 -1
- package/dist/assets/{index-CFTRS-GK.js → index-BEh3RskV.js} +8 -8
- package/dist/assets/{index-BhkEc_3_.js → index-BPuWvx42.js} +1 -1
- package/dist/assets/{index-BCI8WYmT.js → index-B_7moPHD.js} +1 -1
- package/dist/assets/{index-DegEcI_5.js → index-BbvD-ku9.js} +1 -1
- package/dist/assets/{index-Duj01YgO.js → index-BjzrGmqR.js} +3 -3
- package/dist/assets/{index-DC_rWobK.js → index-Blb65RUd.js} +1 -1
- package/dist/assets/{index-B4IAtVFw.js → index-BwmL6hWx.js} +5 -5
- package/dist/assets/{index-De-sQlFC.js → index-C0hII44F.js} +1 -1
- package/dist/assets/{index-MEqFmjFL.js → index-C58qacTd.js} +1 -1
- package/dist/assets/{index-DqgF2ZFL.js → index-CEpV9K4b.js} +1 -1
- package/dist/assets/{index-ChTqVvPW.js → index-CGeCJJCJ.js} +1 -1
- package/dist/assets/index-CLH3ksD7.js +21 -0
- package/dist/assets/{index-xRrM1Elc.js → index-CPi6NfEK.js} +1 -1
- package/dist/assets/{index-DZKqUnTF.js → index-CbPaNvvH.js} +1 -1
- package/dist/assets/index-Ci5TqAoT.js +54 -0
- package/dist/assets/{index-C8aAyTdz.js → index-Cn_FG1ax.js} +1 -1
- package/dist/assets/{index-mfO0z5Js.js → index-D19CmatF.js} +1 -1
- package/dist/assets/{index-hLOtcoN4.js → index-D1dfzI-t.js} +1 -1
- package/dist/assets/{index-BEbWb2qD.js → index-DFMoXqZZ.js} +1 -1
- package/dist/assets/index-DMD3Xl4z.js +150 -0
- package/dist/assets/index-DPpbsWxv.js +309 -0
- package/dist/assets/{index-xEXDGJLW.js → index-DSbUwcxI.js} +3 -3
- package/dist/assets/{index-DJBQ8Jd6.js → index-DT-Rr2m6.js} +1 -1
- package/dist/assets/{index-gukiKQbS.js → index-DVNcCDcO.js} +1 -1
- package/dist/assets/{index-CIHTH8Fr.js → index-DWRkdx6I.js} +1 -1
- package/dist/assets/{index-DrMB4rSY.js → index-DX24Z0Uj.js} +1 -1
- package/dist/assets/{index-Uu4_Hkiy.js → index-DXsxzqj2.js} +1 -1
- package/dist/assets/{index-ByBI4w1s.js → index-DbQJ3ais.js} +1 -1
- package/dist/assets/{index-DUbsQlub.js → index-DcrnW1JH.js} +1 -1
- package/dist/assets/{index-CDMGov97.js → index-DfJBghG7.js} +1 -1
- package/dist/assets/{index-C1aPMf-B.js → index-Di7Zl0N4.js} +1 -1
- package/dist/assets/{index-BECf3fsQ.js → index-DkQkHMJF.js} +1 -1
- package/dist/assets/{index-DUIY0Tgv.js → index-HaETmP78.js} +1 -1
- package/dist/assets/{index-CCFbrgyL.js → index-NWRjCRE6.js} +29 -29
- package/dist/assets/{index-Bqn9PxRk.js → index-TI2qUI_a.js} +1 -1
- package/dist/assets/{index-D88HZi_5.js → index-Udoz8Bem.js} +1 -1
- package/dist/assets/{index-D8GrnpjT.js → index-UwSS4D-y.js} +1 -1
- package/dist/assets/{index-Ba1UsPJJ.js → index-WxTfVFC1.js} +1 -1
- package/dist/assets/{index-gUAIdSaO.js → index-Z7YjOvSs.js} +1 -1
- package/dist/assets/{index-BDZ151O-.js → index-acmUpn3d.js} +1 -1
- package/dist/assets/{index-CesM9WmA.js → index-nD2D9Q59.js} +1 -1
- package/dist/assets/{index.es-lQJT78n5.js → index.es-5gfHT8qt.js} +1 -1
- package/dist/assets/{index.esm-BM1OQakW.js → index.esm-C8MTXtOS.js} +1 -1
- package/dist/assets/{info-addon.es-B2q6ad6s.js → info-addon.es-DHhkZvi_.js} +1 -1
- package/dist/assets/{info.es-BlsqGypj.js → info.es-COi7yoWs.js} +1 -1
- package/dist/assets/{install-from-url-DoW_puMB.js → install-from-url-BYlR-wkR.js} +1 -1
- package/dist/assets/{invitation-CSvGhsgx.js → invitation-DM-UGBW7.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-PKFqxZa9.js → is-path-prefix-equal-D1r7K_TX.js} +1 -1
- package/dist/assets/{isEqual-CQFh5vbv.js → isEqual-DZxlxlpY.js} +1 -1
- package/dist/assets/{item-BvfuUzM0.js → item-DS3f9YHR.js} +1 -1
- package/dist/assets/{ja-BSnhR_mh.js → ja-D-sN9ij0.js} +1 -1
- package/dist/assets/{javascript.es-DFBDGDoQ.js → javascript.es-B32ItMWr.js} +1 -1
- package/dist/assets/{jump-to-line.es-CG-aqWo6.js → jump-to-line.es-lEiCWFex.js} +1 -1
- package/dist/assets/{jump.es-BtNS8u5X.js → jump.es-BWS9VOBG.js} +1 -1
- package/dist/assets/ko-DFpbqZ_Q.js +1 -0
- package/dist/assets/{line-BrH2vlVV.js → line-Cpq5ZDtU.js} +3 -3
- package/dist/assets/{lint.es-Te9r1wG3.js → lint.es-DCipYlTC.js} +1 -1
- package/dist/assets/{lint.es2-C6uKmnCn.js → lint.es2-BAtYSom8.js} +1 -1
- package/dist/assets/{lint.es3-DQ8CkpLh.js → lint.es3-B8lp_2z6.js} +1 -1
- package/dist/assets/{list-header-Y8_IJ-10.js → list-header-C9QJ2chY.js} +1 -1
- package/dist/assets/{log-CXeDf0a3.js → log-ob8D_C18.js} +1 -1
- package/dist/assets/{lottie-CQPB1GeH.js → lottie-B19I2Qmj.js} +1 -1
- package/dist/assets/{matchbrackets.es-BuQooV_h.js → matchbrackets.es-CkLjcl0k.js} +1 -1
- package/dist/assets/{memory-DnSScRbL.js → memory-DspFIQ47.js} +1 -1
- package/dist/assets/{mode.es-BlOm6b_1.js → mode.es-B2vTIzUX.js} +1 -1
- package/dist/assets/{mode.es2-CAFkXiHm.js → mode.es2-BPsPz5JF.js} +1 -1
- package/dist/assets/{mode.es3-DpuueBEx.js → mode.es3-im3XyhYm.js} +1 -1
- package/dist/assets/{onlineParser.es-oTwJVXeJ.js → onlineParser.es-0JyJuoFh.js} +1 -1
- package/dist/assets/{overview-Ss1GAs_I.js → overview-BonG5C1X.js} +1 -1
- package/dist/assets/pt-BXC7UTMq.js +1 -0
- package/dist/assets/{react-C05hypJT.js → react-BEu0IWv-.js} +3 -3
- package/dist/assets/{redux-DQoY5G1e.js → redux-CSH-C8dP.js} +1 -1
- package/dist/assets/{resource-dialog-WDlOSePr.js → resource-dialog-CVqcch9j.js} +1 -1
- package/dist/assets/ru-BbD1NNUC.js +1 -0
- package/dist/assets/{runtime-BkObO5s_.js → runtime-Dj8SiQKo.js} +1 -1
- package/dist/assets/{schema-BY-WXJV5.js → schema-DrNXl34E.js} +2 -2
- package/dist/assets/{search.es-DUBca8v_.js → search.es-qKNJ3reW.js} +1 -1
- package/dist/assets/{searchcursor.es-CfugRLlJ.js → searchcursor.es-BlSV3Q9p.js} +1 -1
- package/dist/assets/service-CXWsxRz4.js +1 -0
- package/dist/assets/{shorten-label-WXMi3uib.js → shorten-label-a0zPFg0c.js} +1 -1
- package/dist/assets/{show-hint.es-CHUAeGZ6.js → show-hint.es-T6yiomop.js} +1 -1
- package/dist/assets/{slicedToArray-BCow5Z5c.js → slicedToArray-DWHLdybN.js} +1 -1
- package/dist/assets/{spaces-CK7hpVPU.js → spaces-BOQNbM_4.js} +1 -1
- package/dist/assets/{sublime.es-CBfTOmDR.js → sublime.es-CHbmwFXX.js} +1 -1
- package/dist/assets/{switch-control-CsvNZTUW.js → switch-control-B4LYohIC.js} +1 -1
- package/dist/assets/{table-icons-CD22QtpD.js → table-icons-C1C8gEVy.js} +2 -2
- package/dist/assets/{tag-bf0aUNMx.js → tag-CyEjUF3o.js} +1 -1
- package/dist/assets/{team-U_gXTJbK.js → team-DZW98gSO.js} +1 -1
- package/dist/assets/th-VkDcmE_T.js +1 -0
- package/dist/assets/{toUpper-DTMCxaDz.js → toUpper-BQRMwur9.js} +1 -1
- package/dist/assets/{traffic-knVUcdxe.js → traffic-DEzUb3Ky.js} +1 -1
- package/dist/assets/{url-evaluation-Dd7vhNbh.js → url-evaluation-CXei2mde.js} +1 -1
- package/dist/assets/{url-join-BrsHZeRr.js → url-join-DtIkGw0l.js} +1 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-BBbwaN9I.js +1 -0
- package/dist/assets/{useLocalStorage-D6n51kY7.js → useLocalStorage-IvmGdRwA.js} +1 -1
- package/dist/assets/{useThemeProps-B8tYkkPR.js → useThemeProps-guTpp8sD.js} +1 -1
- package/dist/assets/{util-DihPJC70.js → util-DNkQeSwC.js} +1 -1
- package/dist/assets/vi-CanFbf1v.js +1 -0
- package/dist/assets/{wait-container-mhRmHAOS.js → wait-container-CYkix1ra.js} +1 -1
- package/dist/assets/{withStyles-m0FTPdbL.js → withStyles-DMG62fi3.js} +1 -1
- package/dist/assets/wrap-locale-RSz7z_Kh.js +1 -0
- package/dist/assets/{zh-XzadN7R3.js → zh-BxXo7x1m.js} +1 -1
- package/dist/assets/zh-tw-Bvqjz2OU.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BbeBknLi.js +0 -1
- package/dist/assets/DeleteOutline-qZMg8d5b.js +0 -1
- package/dist/assets/api-B09XbQm6.js +0 -1
- package/dist/assets/ar-CEz-3AyV.js +0 -1
- package/dist/assets/blocklet-BHnYGnZv.js +0 -1
- package/dist/assets/de-Di4pToxm.js +0 -1
- package/dist/assets/es-CPDKeKrG.js +0 -1
- package/dist/assets/fr-9RG8cAa6.js +0 -1
- package/dist/assets/getValidReactChildren-6dsXDOAM.js +0 -1
- package/dist/assets/hi-DJLNiG5V.js +0 -1
- package/dist/assets/id-TqWAFNjj.js +0 -1
- package/dist/assets/index-BDn9U5Ot.js +0 -21
- package/dist/assets/index-By3aktAK.js +0 -150
- package/dist/assets/index-C40iloMe.js +0 -54
- package/dist/assets/index-DRUswABH.js +0 -309
- package/dist/assets/ko-gjYVLUHm.js +0 -1
- package/dist/assets/pt-B-XCpQDv.js +0 -1
- package/dist/assets/ru-DSPtM6j0.js +0 -1
- package/dist/assets/service-C1VTK2ss.js +0 -1
- package/dist/assets/th-CxPqMbkk.js +0 -1
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-k60EMq_9.js +0 -1
- package/dist/assets/vi-B8erxshV.js +0 -1
- package/dist/assets/wrap-locale-D-5H-sLr.js +0 -1
- package/dist/assets/zh-tw-BTlMDwjI.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as $,P,r as w,f as ge,j as e,C as V,i as ke,u as me,q,t as je,v as ye,D as Ce,B as W,w as ve,m as L,x as Se,y as Be,z as de,A as z,E as we,d as Ae,F as De,H as Te,J as ee,K as Ee,M as T,N as te,O as y,Q as Ie,R as F,S as Le,U as Pe,V as Re}from"./index-
|
|
1
|
+
import{n as $,P,r as w,f as ge,j as e,C as V,i as ke,u as me,q,t as je,v as ye,D as Ce,B as W,w as ve,m as L,x as Se,y as Be,z as de,A as z,E as we,d as Ae,F as De,H as Te,J as ee,K as Ee,M as T,N as te,O as y,Q as Ie,R as F,S as Le,U as Pe,V as Re}from"./index-BEh3RskV.js";import{_ as oe}from"./useLocalStorage-IvmGdRwA.js";import{g as _e,D as Fe}from"./index-nD2D9Q59.js";import{E as Ne}from"./index-Z7YjOvSs.js";import{u as $e,B as se}from"./url-evaluation-CXei2mde.js";import{D as Ue,u as Me,B as ne}from"./actions-DfsSmCM0.js";import{l as le}from"./index-Cn_FG1ax.js";import{W as Oe}from"./tag-CyEjUF3o.js";import{I as We,B as ze}from"./install-from-url-BYlR-wkR.js";import{B as ae}from"./app-avatar-BEnx22QQ.js";import{d as Ve}from"./Add-B__xT4sB.js";import{S as E}from"./index-Udoz8Bem.js";import{T as re}from"./TextField-CJTsaR61.js";import{F as qe,S as Ke}from"./Select-BoNi1_kD.js";import"./FilterList-PDF9S8a9.js";import"./useThemeProps-guTpp8sD.js";import"./Delete-D1RDqaZi.js";import"./InputLabel-DWHNzKMy.js";import"./LastPage-uzFB0_6o.js";import"./index-DFMoXqZZ.js";import"./redux-CSH-C8dP.js";import"./Search-CsfCvyCj.js";import"./MoreVert-BxyKJhuW.js";import"./ButtonGroup-DKjKDOWS.js";import"./getValidReactChildren-DWgwfamf.js";import"./isEqual-DZxlxlpY.js";import"./schema-DrNXl34E.js";import"./index-HaETmP78.js";import"./index-DT-Rr2m6.js";import"./Stepper-Cd9yxqw7.js";import"./ExpandMore-BHsYpUKK.js";function N({blocklet:g,skipAccessibilityCheck:c=!1,...p}){const{t:a}=w.useContext(ge),{urls:C,loading:s,recommendedUrl:m}=$e(g);if(s&&!c)return e.jsx(V,{size:12,...p});const x=c?C[0]:m;return x?e.jsx(He,{...p,children:e.jsx(Qe,{children:e.jsx(ke,{href:x,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})}):a("blocklet.router.noAccessibleUrl")}const Qe=$.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 4px 0;
|
|
4
4
|
`,He=$.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,S as u,j as e,dP as p,dQ as M,dR as S,dS as z,P as o,dv as b,s as m,dT as v}from"./index-
|
|
1
|
+
import{r,S as u,j as e,dP as p,dQ as M,dR as S,dS as z,P as o,dv as b,s as m,dT as v}from"./index-BEh3RskV.js";import{d as E}from"./ExpandMore-BHsYpUKK.js";import{B as O}from"./ButtonGroup-DKjKDOWS.js";function d(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),P=Array.isArray(a)?a.map((n,I)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:I})):a,k=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(T,{variant:h,size:f,color:i,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:k,color:i,...y,"aria-label":"more functions",children:e.jsx(E,{})})]}),e.jsx(A,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(M,{children:e.jsx(S,{onClickAway:B,children:e.jsx(z,{onClick:C,children:P})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:b,menuButtonProps:{}};d.Item=u;const T=m(O)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,f as n,j as t,n as e}from"./index-
|
|
1
|
+
import{r as o,f as n,j as t,n as e}from"./index-BEh3RskV.js";import{R as r}from"./index-D1dfzI-t.js";function i(){const{t:s}=o.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(r,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=e.main``;export{i as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as i,fx as co,ci as ze,fy as lo,ff as lt,O as Z,as as mr,ax as He,m as Ce,eC as uo,d2 as Mr,fz as fo,q as Ne,fA as hr,fB as po,aG as mo,ch as ho,dP as $r,R as xt,dA as On,dD as It,fC as ft,di as Oe,fD as go,fE as yo,fm as Rn,fF as gr,fG as vo,fH as bo,fI as xo,fJ as wo,dz as nr,g as Eo,cP as zr,dG as So,M as jo,bm as De,aO as Cn,S as wt,dH as Ao,fK as yr,at as dt,D as We,B as Se,C as rt,w as vr,J as tt,K as Ge,P as M,fL as Po,k as or,aU as Io,x as Oo,y as Ro,n as _e,fe as Co,f as pt,ad as Ot,U as ke,cc as Ye,A as nt,fM as To,aK as Tn,aL as Dn,b as Ve,d6 as Do,t as _n,F as Ee,a1 as ir,W as br,ce as _o,fN as Nn,aQ as No,aD as Lo,a9 as Bo,cB as qo,a2 as ko,bq as Uo,aZ as Fo,a_ as Ko,Q as Mo}from"./index-CFTRS-GK.js";import{c as $o}from"./index-ChTqVvPW.js";import{d as Et}from"./Add-BEm8ulfI.js";import{d as zo}from"./Loop-DZcA5WXX.js";import{d as Wo}from"./ViewList-BEq9etwt.js";import{L as Vo,S as Ho,d as Ln}from"./list-header-Y8_IJ-10.js";import{D as xr,g as Go}from"./index-CesM9WmA.js";import"./index-BCI8WYmT.js";import{c as Lt,U as Bt,d as Bn}from"./resource-dialog-WDlOSePr.js";import{T as Yo}from"./index-DrMB4rSY.js";import{E as qn}from"./index-gUAIdSaO.js";import"./index-CDMGov97.js";import{l as kn}from"./index-C8aAyTdz.js";import{o as Zo}from"./index-ZG7jWpak.js";import{W as Un}from"./tag-bf0aUNMx.js";import{a as Fe}from"./team-U_gXTJbK.js";import{u as Fn}from"./blocklet-BHnYGnZv.js";import{C as Rt}from"./click-to-copy-nMxQLC3C.js";import{F as ar,S as sr}from"./Select-Cz2z_MUs.js";import{I as cr}from"./InputLabel-C0hP58zr.js";import{T as Kn}from"./TextField-B39sPZXj.js";import{I as lr}from"./index-DJBQ8Jd6.js";import{d as Jo}from"./Delete-MPWwMdcn.js";import{A as Xo}from"./actions-DpFxNafF.js";import{S as Qo}from"./shorten-label-WXMi3uib.js";var wr={};Object.defineProperty(wr,"__esModule",{value:!0});var Mn=wr.default=void 0;ei($);var Qe=i;function ei(e){return e&&e.__esModule?e:{default:e}}function Wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wr(Object(r),!0).forEach(function(n){ti(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ti(e,t,r){return t=ri(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ri(e){var t=ni(e,"string");return typeof t=="symbol"?t:String(t)}function ni(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Er=function(t){return(0,Qe.jsxs)("svg",Vr(Vr({},t),{},{children:[(0,Qe.jsx)("g",{clipPath:"url(#clip0)",children:(0,Qe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,Qe.jsx)("defs",{children:(0,Qe.jsx)("clipPath",{id:"clip0",children:(0,Qe.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Er.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Er.displayName="person";Mn=wr.default=Er;var bt={},oi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),$n="%[a-f0-9]{2}",Hr=new RegExp("("+$n+")|([^%]+?)","gi"),Gr=new RegExp("("+$n+")+","gi");function ur(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ur(r),ur(n))}function ii(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Hr)||[],r=1;r<t.length;r++)e=ur(t,r).join(""),t=e.match(Hr)||[];return e}}function ai(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Gr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ii(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Gr.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var v=a[l];e=e.replace(new RegExp(v,"g"),t[v])}return e}var si=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return ai(e)}},ci=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},li=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),l=0;l<n.length;l++){var v=n[l],b=e[v];(a?t.indexOf(v)!==-1:t(v,b,e))&&(r[v]=b)}return r};(function(e){const t=oi,r=si,n=ci,a=li,l=o=>o==null;function v(o){switch(o.arrayFormat){case"index":return s=>(u,g)=>{const d=u.length;return g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,[S(s,o),"[",d,"]"].join("")]:[...u,[S(s,o),"[",S(d,o),"]=",S(g,o)].join("")]};case"bracket":return s=>(u,g)=>g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,[S(s,o),"[]"].join("")]:[...u,[S(s,o),"[]=",S(g,o)].join("")];case"comma":case"separator":return s=>(u,g)=>g==null||g.length===0?u:u.length===0?[[S(s,o),"=",S(g,o)].join("")]:[[u,S(g,o)].join(o.arrayFormatSeparator)];default:return s=>(u,g)=>g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,S(s,o)]:[...u,[S(s,o),"=",S(g,o)].join("")]}}function b(o){let s;switch(o.arrayFormat){case"index":return(u,g,d)=>{if(s=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!s){d[u]=g;return}d[u]===void 0&&(d[u]={}),d[u][s[1]]=g};case"bracket":return(u,g,d)=>{if(s=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!s){d[u]=g;return}if(d[u]===void 0){d[u]=[g];return}d[u]=[].concat(d[u],g)};case"comma":case"separator":return(u,g,d)=>{const R=typeof g=="string"&&g.includes(o.arrayFormatSeparator),I=typeof g=="string"&&!R&&f(g,o).includes(o.arrayFormatSeparator);g=I?f(g,o):g;const D=R||I?g.split(o.arrayFormatSeparator).map(X=>f(X,o)):g===null?g:f(g,o);d[u]=D};default:return(u,g,d)=>{if(d[u]===void 0){d[u]=g;return}d[u]=[].concat(d[u],g)}}}function y(o){if(typeof o!="string"||o.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function S(o,s){return s.encode?s.strict?t(o):encodeURIComponent(o):o}function f(o,s){return s.decode?r(o):o}function N(o){return Array.isArray(o)?o.sort():typeof o=="object"?N(Object.keys(o)).sort((s,u)=>Number(s)-Number(u)).map(s=>o[s]):o}function j(o){const s=o.indexOf("#");return s!==-1&&(o=o.slice(0,s)),o}function A(o){let s="";const u=o.indexOf("#");return u!==-1&&(s=o.slice(u)),s}function E(o){o=j(o);const s=o.indexOf("?");return s===-1?"":o.slice(s+1)}function x(o,s){return s.parseNumbers&&!Number.isNaN(Number(o))&&typeof o=="string"&&o.trim()!==""?o=Number(o):s.parseBooleans&&o!==null&&(o.toLowerCase()==="true"||o.toLowerCase()==="false")&&(o=o.toLowerCase()==="true"),o}function p(o,s){s=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},s),y(s.arrayFormatSeparator);const u=b(s),g=Object.create(null);if(typeof o!="string"||(o=o.trim().replace(/^[?#&]/,""),!o))return g;for(const d of o.split("&")){if(d==="")continue;let[R,I]=n(s.decode?d.replace(/\+/g," "):d,"=");I=I===void 0?null:["comma","separator"].includes(s.arrayFormat)?I:f(I,s),u(f(R,s),I,g)}for(const d of Object.keys(g)){const R=g[d];if(typeof R=="object"&&R!==null)for(const I of Object.keys(R))R[I]=x(R[I],s);else g[d]=x(R,s)}return s.sort===!1?g:(s.sort===!0?Object.keys(g).sort():Object.keys(g).sort(s.sort)).reduce((d,R)=>{const I=g[R];return I&&typeof I=="object"&&!Array.isArray(I)?d[R]=N(I):d[R]=I,d},Object.create(null))}e.extract=E,e.parse=p,e.stringify=(o,s)=>{if(!o)return"";s=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},s),y(s.arrayFormatSeparator);const u=I=>s.skipNull&&l(o[I])||s.skipEmptyString&&o[I]==="",g=v(s),d={};for(const I of Object.keys(o))u(I)||(d[I]=o[I]);const R=Object.keys(d);return s.sort!==!1&&R.sort(s.sort),R.map(I=>{const D=o[I];return D===void 0?"":D===null?S(I,s):Array.isArray(D)?D.reduce(g(I),[]).join("&"):S(I,s)+"="+S(D,s)}).filter(I=>I.length>0).join("&")},e.parseUrl=(o,s)=>{s=Object.assign({decode:!0},s);const[u,g]=n(o,"#");return Object.assign({url:u.split("?")[0]||"",query:p(E(o),s)},s&&s.parseFragmentIdentifier&&g?{fragmentIdentifier:f(g,s)}:{})},e.stringifyUrl=(o,s)=>{s=Object.assign({encode:!0,strict:!0},s);const u=j(o.url).split("?")[0]||"",g=e.extract(o.url),d=e.parse(g,{sort:!1}),R=Object.assign(d,o.query);let I=e.stringify(R,s);I&&(I=`?${I}`);let D=A(o.url);return o.fragmentIdentifier&&(D=`#${S(o.fragmentIdentifier,s)}`),`${u}${I}${D}`},e.pick=(o,s,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:g,query:d,fragmentIdentifier:R}=e.parseUrl(o,u);return e.stringifyUrl({url:g,query:a(d,s),fragmentIdentifier:R},u)},e.exclude=(o,s,u)=>{const g=Array.isArray(s)?d=>!s.includes(d):(d,R)=>!s(d,R);return e.pick(o,g,u)}})(bt);const st=lo,ui={parseNumbers:!1,parseBooleans:!1},fi={skipNull:!1,skipEmptyString:!1},di=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:l,stringifyOptions:v}=t||{},b=Object.assign(Object.assign({},ui),l),y=Object.assign(Object.assign({},fi),v),S=st.useLocation(),f=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),N=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),j=co(),A=$.useRef(typeof e=="function"?e():e||{}),E=$.useMemo(()=>bt.parse(S.search,b),[S.search]),x=$.useMemo(()=>Object.assign(Object.assign({},A.current),E),[E]);return[x,ze(o=>{const s=typeof o=="function"?o(x):o;j(),f&&f[a]({hash:S.hash,search:bt.stringify(Object.assign(Object.assign({},E),s),y)||"?"},S.state),N&&N({hash:S.hash,search:bt.stringify(Object.assign(Object.assign({},E),s),y)||"?"},{replace:a==="replace",state:S.state})})]},pi=di;let mi=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}};const Yr=e=>globalThis.DOMException===void 0?new mi(e):new DOMException(e),Zr=e=>{const t=e.reason===void 0?Yr("This operation was aborted."):e.reason;return t instanceof Error?t:Yr(t)};async function hi(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:a}={}){return new Promise((l,v)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const b=[],y=[],S=new Map;let f=!1,N=!1,j=!1,A=0,E=0;const x=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),p=s=>{f=!0,N=!0,v(s)};a&&(a.aborted&&p(Zr(a)),a.addEventListener("abort",()=>{p(Zr(a))}));const o=async()=>{if(N)return;const s=await x.next(),u=E;if(E++,s.done){if(j=!0,A===0&&!N){if(!n&&y.length>0){p(new AggregateError(y));return}if(N=!0,S.size===0){l(b);return}const g=[];for(const[d,R]of b.entries())S.get(d)!==Jr&&g.push(R);l(g)}return}A++,(async()=>{try{const g=await s.value;if(N)return;const d=await t(g,u);d===Jr&&S.set(u,d),b[u]=d,A--,await o()}catch(g){if(n)p(g);else{y.push(g),A--;try{await o()}catch(d){p(d)}}}})()};(async()=>{for(let s=0;s<r;s++){try{await o()}catch(u){p(u);break}if(j||f)break}})()})}const Jr=Symbol("skip");async function gi(e,t){return hi(e,r=>r(),t)}function yi({user:e,sessionUser:t}){const r=lt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(a=>a.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return i.jsxs(Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(mr,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),i.jsxs(Z,{sx:{flex:1,overflow:"hidden"},children:[i.jsxs(Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(He,{title:t.fullName,children:i.jsx(Ce,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),i.jsx(uo,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Mr.textBase,borderColor:Mr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),i.jsx(He,{title:t.email,children:i.jsx(Ce,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const vi={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},zn="Reserved IP",Xr="ip-region-cache";async function bi(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=zn):a=[n.country_name,n.region,n.city].filter(Boolean).join("/"),a}async function xi(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=zn):a=[n.country,n.region,n.city].filter(Boolean).join("/"),a}async function wi(e){let t="",r={};try{const n=localStorage.getItem(Xr);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await xi(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await bi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(Xr,JSON.stringify(r))}return t}async function Ei(e){return Promise.all(e.map(t=>wi(t)))}const Qr=e=>new Bt(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Bt.BROWSER.NAME,Bt.BROWSER.VERSION]]}).getResult();function Si({user:e,showAction:t=!0,showUser:r=!0}){const n=fo(),{locale:a}=Ne(),{confirmApi:l,confirmHolder:v}=hr(),b=ze((s,u={})=>po(vi,s,a,"en",u)),y=ze(async()=>{let s=e==null?void 0:e.userSessions;s||(s=await Lt.userSession.getUserSessions({did:e.did}));try{const g=s==null?void 0:s.map((I,D)=>[D,I.lastLoginIp]).filter(I=>!!I[1]),d=g==null?void 0:g.map(I=>I[1]),R=await Ei(d);for(let I=0;I<R.length;I++){const D=R[I],X=g[I],ce=s[X[0]];ce.ipRegion=D}}catch(g){console.warn("Failed to convert ip to region"),console.error(g)}const u=new Date().getTime();return mo(s,g=>g.visitorId===n?-1:u-new Date(g.updatedAt).getTime())}),S=ho(y),f=lt(()=>S.data||[],[S.data]),N=lt(()=>f.reduce((s,u)=>(s[u.lastLoginIp]=u.ipRegion,s),{}),[f]),j=ze(({visitorId:s})=>{l.open({title:b("logoutThisSession"),content:b("logoutThisSessionConfirm"),confirmButtonText:b("confirm"),cancelButtonText:b("cancel"),onConfirm:async()=>{await Lt.user.logout({visitorId:s}),S.refresh(),l.close()}})}),A=lt(()=>f.filter(u=>u.visitorId!==n),[f]),E=ze(()=>{l.open({title:b("logoutAllSession"),content:b("logoutAllSessionConfirm"),confirmButtonText:b("confirm"),cancelButtonText:b("cancel"),onConfirm:async()=>{const s=A.map(u=>()=>Lt.user.logout({visitorId:u.visitorId}));await gi(s,{concurrency:3,stopOnError:!1}),S.refresh(),l.close()}})}),x=[];t&&x.push(i.jsx(He,{title:b("logoutAllTips"),children:i.jsx($r,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:E,disabled:A.length===0,children:b("logoutAll")})},"logoutAll"));const p=lt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),o=[{label:b("platform"),name:"platform",options:{customBodyRenderLite:s=>{var d,R;const u=f[s],g=Qr(u.ua);return i.jsx(Z,{children:[(d=g.os)==null?void 0:d.name,(R=g.os)==null?void 0:R.version].filter(Boolean).join("/")||b("unknown")})}}},{label:b("deviceType"),name:"deviceType",options:{customBodyRenderLite:s=>{var d,R;const u=f[s],g=Qr(u.ua);return i.jsx(Z,{children:[(d=g.browser)==null?void 0:d.name,(R=g.browser)==null?void 0:R.version].filter(Boolean).join("/")||b("unknown")})}}},{label:b("walletOS"),name:"walletOS",options:{customBodyRenderLite:s=>{var g;const u=f[s];return i.jsx(Z,{children:((g=u.extra)==null?void 0:g.walletOS)||b("unknown")})}}},r&&{label:b("user"),name:"user",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{sx:{minWidth:150,maxWidth:250},children:i.jsx(yi,{sessionUser:u.user,user:e})})}}},{label:b("createdAt"),name:"createdAt",options:{customBodyRenderLite:s=>{const u=f[s];return u.createdAt?i.jsx(xt,{value:u.createdAt,relativeRange:3*86400*1e3,locale:a}):b("unknown")}}},{label:b("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:s=>{const u=f[s];return u.status==="expired"?b("expired"):i.jsx(xt,{value:u.updatedAt,relativeRange:3*86400*1e3,locale:a})}}},{label:b("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{children:N[u.lastLoginIp]?i.jsxs(i.Fragment,{children:[i.jsx(Ce,{variant:"body2",children:N[u.lastLoginIp]}),i.jsx(Ce,{variant:"body2",color:"grey",children:u.lastLoginIp||b("unknown")})]}):i.jsx(Ce,{children:u.lastLoginIp||b("unknown")})})}}},t&&{label:b("actions"),name:"actions",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{children:i.jsx($r,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===u.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>j({visitorId:u.visitorId}),children:u.status==="expired"?b("remove"):n===u.visitorId?b("currentSession"):b("logout")})})}}}].filter(Boolean);return i.jsxs(Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[v,i.jsx(xr,{locale:a,data:f,columns:o,customButtons:x,options:p,loading:S.loading})]})}var ue={};Object.defineProperty(ue,"__esModule",{value:!0});ue.isValid=ue.fromJSON=ue.fromRandom=ue.fromAddress=ue.fromPublicKey=ue.fromSecretKey=ue.Wallet=ue.WalletType=void 0;const mt=On,St=It,Ae=kn;ue.WalletType=Ae.DidType;function ot(e,t="default"){const r=(0,Ae.DidType)(t),n=(0,St.getSigner)(r.pk),a=(0,St.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address,hash(l,v=1,b="hex"){return a(l,v,b)},sign(l,v=!0,b="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(v){const y=a(l,1);return n.sign(y,e.sk,b)}return n.sign(l,e.sk,b)},verify(l,v,b=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const y=b?a(l,1):l;return n.verify(y,v,e.pk)},ethHash(l){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(l)},ethSign(l,v=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return v?n.ethSign(n.ethHash(l),(0,mt.toHex)(e.sk)):n.ethSign(l,(0,mt.toHex)(e.sk))},ethVerify(l,v,b=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const y=b?n.ethHash(l):l;return n.ethRecover(y,v)===this.address},toAddress(){return e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ae.DidType.toJSON(r),sk:(0,mt.toHex)(e.sk),pk:(0,mt.toHex)(e.pk),address:this.address}}}}ue.Wallet=ot;function ji(e,t="default"){const r=(0,Ae.DidType)(t),n={sk:e,pk:(0,St.getSigner)(r.pk).getPublicKey(e)};return ot(n,r)}ue.fromSecretKey=ji;function Ai(e,t="default"){return ot({pk:e},(0,Ae.DidType)(t))}ue.fromPublicKey=Ai;function Pi(e){return ot({address:(0,Ae.toAddress)(e)},(0,Ae.toTypeInfo)(e))}ue.fromAddress=Pi;function Ii(e="default"){const t=(0,Ae.DidType)(e),n=(0,St.getSigner)(t.pk).genKeyPair();return ot({sk:n.secretKey,pk:n.publicKey},t)}ue.fromRandom=Ii;function Oi(e){const t=Ae.DidType.fromJSON(e.type);return ot(e,t)}ue.fromJSON=Oi;function Ri(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}ue.isValid=Ri;var qt={exports:{}},kt={},en;function Wn(){if(en)return kt;en=1;function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(o){return typeof o}:e=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e(x)}function t(x,p){if(!(x instanceof p))throw new TypeError("Cannot call a class as a function")}function r(x,p){return p&&(e(p)==="object"||typeof p=="function")?p:n(x)}function n(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function a(x){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},a(x)}function l(x,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(p&&p.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),p&&v(x,p)}function v(x,p){return v=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},v(x,p)}var b={},y,S;function f(x,p,o){o||(o=Error);function s(g,d,R){return typeof p=="string"?p:p(g,d,R)}var u=function(g){l(d,g);function d(R,I,D){var X;return t(this,d),X=r(this,a(d).call(this,s(R,I,D))),X.code=x,X}return d}(o);b[x]=u}function N(x,p){if(Array.isArray(x)){var o=x.length;return x=x.map(function(s){return String(s)}),o>2?"one of ".concat(p," ").concat(x.slice(0,o-1).join(", "),", or ")+x[o-1]:o===2?"one of ".concat(p," ").concat(x[0]," or ").concat(x[1]):"of ".concat(p," ").concat(x[0])}else return"of ".concat(p," ").concat(String(x))}function j(x,p,o){return x.substr(!o||o<0?0:+o,p.length)===p}function A(x,p,o){return(o===void 0||o>x.length)&&(o=x.length),x.substring(o-p.length,o)===p}function E(x,p,o){return typeof o!="number"&&(o=0),o+p.length>x.length?!1:x.indexOf(p,o)!==-1}return f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",function(x,p,o){y===void 0&&(y=fr()),y(typeof x=="string","'name' must be a string");var s;typeof p=="string"&&j(p,"not ")?(s="must not be",p=p.replace(/^not /,"")):s="must be";var u;if(A(x," argument"))u="The ".concat(x," ").concat(s," ").concat(N(p,"type"));else{var g=E(x,".")?"property":"argument";u='The "'.concat(x,'" ').concat(g," ").concat(s," ").concat(N(p,"type"))}return u+=". Received type ".concat(e(o)),u},TypeError),f("ERR_INVALID_ARG_VALUE",function(x,p){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";S===void 0&&(S=ft);var s=S.inspect(p);return s.length>128&&(s="".concat(s.slice(0,128),"...")),"The argument '".concat(x,"' ").concat(o,". Received ").concat(s)},TypeError),f("ERR_INVALID_RETURN_VALUE",function(x,p,o){var s;return o&&o.constructor&&o.constructor.name?s="instance of ".concat(o.constructor.name):s="type ".concat(e(o)),"Expected ".concat(x,' to be returned from the "').concat(p,'"')+" function but got ".concat(s,".")},TypeError),f("ERR_MISSING_ARGS",function(){for(var x=arguments.length,p=new Array(x),o=0;o<x;o++)p[o]=arguments[o];y===void 0&&(y=fr()),y(p.length>0,"At least one arg needs to be specified");var s="The ",u=p.length;switch(p=p.map(function(g){return'"'.concat(g,'"')}),u){case 1:s+="".concat(p[0]," argument");break;case 2:s+="".concat(p[0]," and ").concat(p[1]," arguments");break;default:s+=p.slice(0,u-1).join(", "),s+=", and ".concat(p[u-1]," arguments");break}return"".concat(s," must be specified")},TypeError),kt.codes=b,kt}var Ut,tn;function Ci(){if(tn)return Ut;tn=1;function e(O){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{},U=Object.keys(k);typeof Object.getOwnPropertySymbols=="function"&&(U=U.concat(Object.getOwnPropertySymbols(k).filter(function(z){return Object.getOwnPropertyDescriptor(k,z).enumerable}))),U.forEach(function(z){t(O,z,k[z])})}return O}function t(O,C,k){return C in O?Object.defineProperty(O,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):O[C]=k,O}function r(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}function n(O,C){for(var k=0;k<C.length;k++){var U=C[k];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(O,U.key,U)}}function a(O,C,k){return C&&n(O.prototype,C),k&&n(O,k),O}function l(O,C){return C&&(E(C)==="object"||typeof C=="function")?C:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function b(O,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(C&&C.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),C&&j(O,C)}function y(O){var C=typeof Map=="function"?new Map:void 0;return y=function(U){if(U===null||!N(U))return U;if(typeof U!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C<"u"){if(C.has(U))return C.get(U);C.set(U,z)}function z(){return f(U,arguments,A(this).constructor)}return z.prototype=Object.create(U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),j(z,U)},y(O)}function S(){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}}function f(O,C,k){return S()?f=Reflect.construct:f=function(z,Q,P){var h=[null];h.push.apply(h,Q);var w=Function.bind.apply(z,h),T=new w;return P&&j(T,P.prototype),T},f.apply(null,arguments)}function N(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function j(O,C){return j=Object.setPrototypeOf||function(U,z){return U.__proto__=z,U},j(O,C)}function A(O){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},A(O)}function E(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(k){return typeof k}:E=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},E(O)}var x=ft,p=x.inspect,o=Wn(),s=o.codes.ERR_INVALID_ARG_TYPE;function u(O,C,k){return(k===void 0||k>O.length)&&(k=O.length),O.substring(k-C.length,k)===C}function g(O,C){if(C=Math.floor(C),O.length==0||C==0)return"";var k=O.length*C;for(C=Math.floor(Math.log(C)/Math.log(2));C;)O+=O,C--;return O+=O.substring(0,k-O.length),O}var d="",R="",I="",D="",X={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},ce=10;function fe(O){var C=Object.keys(O),k=Object.create(Object.getPrototypeOf(O));return C.forEach(function(U){k[U]=O[U]}),Object.defineProperty(k,"message",{value:O.message}),k}function oe(O){return p(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(O,C,k){var U="",z="",Q=0,P="",h=!1,w=oe(O),T=w.split(`
|
|
1
|
+
import{r as $,j as i,fx as co,ci as ze,fy as lo,ff as lt,O as Z,as as mr,ax as He,m as Ce,eC as uo,d2 as Mr,fz as fo,q as Ne,fA as hr,fB as po,aG as mo,ch as ho,dP as $r,R as xt,dA as On,dD as It,fC as ft,di as Oe,fD as go,fE as yo,fm as Rn,fF as gr,fG as vo,fH as bo,fI as xo,fJ as wo,dz as nr,g as Eo,cP as zr,dG as So,M as jo,bm as De,aO as Cn,S as wt,dH as Ao,fK as yr,at as dt,D as We,B as Se,C as rt,w as vr,J as tt,K as Ge,P as M,fL as Po,k as or,aU as Io,x as Oo,y as Ro,n as _e,fe as Co,f as pt,ad as Ot,U as ke,cc as Ye,A as nt,fM as To,aK as Tn,aL as Dn,b as Ve,d6 as Do,t as _n,F as Ee,a1 as ir,W as br,ce as _o,fN as Nn,aQ as No,aD as Lo,a9 as Bo,cB as qo,a2 as ko,bq as Uo,aZ as Fo,a_ as Ko,Q as Mo}from"./index-BEh3RskV.js";import{c as $o}from"./index-CGeCJJCJ.js";import{d as Et}from"./Add-B__xT4sB.js";import{d as zo}from"./Loop--S-cRtXc.js";import{d as Wo}from"./ViewList-CIXYIeee.js";import{L as Vo,S as Ho,d as Ln}from"./list-header-C9QJ2chY.js";import{D as xr,g as Go}from"./index-nD2D9Q59.js";import"./index-B_7moPHD.js";import{c as Lt,U as Bt,d as Bn}from"./resource-dialog-CVqcch9j.js";import{T as Yo}from"./index-DX24Z0Uj.js";import{E as qn}from"./index-Z7YjOvSs.js";import"./index-DfJBghG7.js";import{l as kn}from"./index-Cn_FG1ax.js";import{o as Zo}from"./index-ZG7jWpak.js";import{W as Un}from"./tag-CyEjUF3o.js";import{a as Fe}from"./team-DZW98gSO.js";import{u as Fn}from"./blocklet-B2oa0l5B.js";import{C as Rt}from"./click-to-copy-7Me9NdFp.js";import{F as ar,S as sr}from"./Select-BoNi1_kD.js";import{I as cr}from"./InputLabel-DWHNzKMy.js";import{T as Kn}from"./TextField-CJTsaR61.js";import{I as lr}from"./index-DT-Rr2m6.js";import{d as Jo}from"./Delete-D1RDqaZi.js";import{A as Xo}from"./actions-87KtVu63.js";import{S as Qo}from"./shorten-label-a0zPFg0c.js";var wr={};Object.defineProperty(wr,"__esModule",{value:!0});var Mn=wr.default=void 0;ei($);var Qe=i;function ei(e){return e&&e.__esModule?e:{default:e}}function Wr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wr(Object(r),!0).forEach(function(n){ti(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ti(e,t,r){return t=ri(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ri(e){var t=ni(e,"string");return typeof t=="symbol"?t:String(t)}function ni(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Er=function(t){return(0,Qe.jsxs)("svg",Vr(Vr({},t),{},{children:[(0,Qe.jsx)("g",{clipPath:"url(#clip0)",children:(0,Qe.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,Qe.jsx)("defs",{children:(0,Qe.jsx)("clipPath",{id:"clip0",children:(0,Qe.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};Er.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"};Er.displayName="person";Mn=wr.default=Er;var bt={},oi=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),$n="%[a-f0-9]{2}",Hr=new RegExp("("+$n+")|([^%]+?)","gi"),Gr=new RegExp("("+$n+")+","gi");function ur(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],ur(r),ur(n))}function ii(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Hr)||[],r=1;r<t.length;r++)e=ur(t,r).join(""),t=e.match(Hr)||[];return e}}function ai(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Gr.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=ii(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Gr.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),l=0;l<a.length;l++){var v=a[l];e=e.replace(new RegExp(v,"g"),t[v])}return e}var si=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return ai(e)}},ci=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},li=function(e,t){for(var r={},n=Object.keys(e),a=Array.isArray(t),l=0;l<n.length;l++){var v=n[l],b=e[v];(a?t.indexOf(v)!==-1:t(v,b,e))&&(r[v]=b)}return r};(function(e){const t=oi,r=si,n=ci,a=li,l=o=>o==null;function v(o){switch(o.arrayFormat){case"index":return s=>(u,g)=>{const d=u.length;return g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,[S(s,o),"[",d,"]"].join("")]:[...u,[S(s,o),"[",S(d,o),"]=",S(g,o)].join("")]};case"bracket":return s=>(u,g)=>g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,[S(s,o),"[]"].join("")]:[...u,[S(s,o),"[]=",S(g,o)].join("")];case"comma":case"separator":return s=>(u,g)=>g==null||g.length===0?u:u.length===0?[[S(s,o),"=",S(g,o)].join("")]:[[u,S(g,o)].join(o.arrayFormatSeparator)];default:return s=>(u,g)=>g===void 0||o.skipNull&&g===null||o.skipEmptyString&&g===""?u:g===null?[...u,S(s,o)]:[...u,[S(s,o),"=",S(g,o)].join("")]}}function b(o){let s;switch(o.arrayFormat){case"index":return(u,g,d)=>{if(s=/\[(\d*)\]$/.exec(u),u=u.replace(/\[\d*\]$/,""),!s){d[u]=g;return}d[u]===void 0&&(d[u]={}),d[u][s[1]]=g};case"bracket":return(u,g,d)=>{if(s=/(\[\])$/.exec(u),u=u.replace(/\[\]$/,""),!s){d[u]=g;return}if(d[u]===void 0){d[u]=[g];return}d[u]=[].concat(d[u],g)};case"comma":case"separator":return(u,g,d)=>{const R=typeof g=="string"&&g.includes(o.arrayFormatSeparator),I=typeof g=="string"&&!R&&f(g,o).includes(o.arrayFormatSeparator);g=I?f(g,o):g;const D=R||I?g.split(o.arrayFormatSeparator).map(X=>f(X,o)):g===null?g:f(g,o);d[u]=D};default:return(u,g,d)=>{if(d[u]===void 0){d[u]=g;return}d[u]=[].concat(d[u],g)}}}function y(o){if(typeof o!="string"||o.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function S(o,s){return s.encode?s.strict?t(o):encodeURIComponent(o):o}function f(o,s){return s.decode?r(o):o}function N(o){return Array.isArray(o)?o.sort():typeof o=="object"?N(Object.keys(o)).sort((s,u)=>Number(s)-Number(u)).map(s=>o[s]):o}function j(o){const s=o.indexOf("#");return s!==-1&&(o=o.slice(0,s)),o}function A(o){let s="";const u=o.indexOf("#");return u!==-1&&(s=o.slice(u)),s}function E(o){o=j(o);const s=o.indexOf("?");return s===-1?"":o.slice(s+1)}function x(o,s){return s.parseNumbers&&!Number.isNaN(Number(o))&&typeof o=="string"&&o.trim()!==""?o=Number(o):s.parseBooleans&&o!==null&&(o.toLowerCase()==="true"||o.toLowerCase()==="false")&&(o=o.toLowerCase()==="true"),o}function p(o,s){s=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},s),y(s.arrayFormatSeparator);const u=b(s),g=Object.create(null);if(typeof o!="string"||(o=o.trim().replace(/^[?#&]/,""),!o))return g;for(const d of o.split("&")){if(d==="")continue;let[R,I]=n(s.decode?d.replace(/\+/g," "):d,"=");I=I===void 0?null:["comma","separator"].includes(s.arrayFormat)?I:f(I,s),u(f(R,s),I,g)}for(const d of Object.keys(g)){const R=g[d];if(typeof R=="object"&&R!==null)for(const I of Object.keys(R))R[I]=x(R[I],s);else g[d]=x(R,s)}return s.sort===!1?g:(s.sort===!0?Object.keys(g).sort():Object.keys(g).sort(s.sort)).reduce((d,R)=>{const I=g[R];return I&&typeof I=="object"&&!Array.isArray(I)?d[R]=N(I):d[R]=I,d},Object.create(null))}e.extract=E,e.parse=p,e.stringify=(o,s)=>{if(!o)return"";s=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},s),y(s.arrayFormatSeparator);const u=I=>s.skipNull&&l(o[I])||s.skipEmptyString&&o[I]==="",g=v(s),d={};for(const I of Object.keys(o))u(I)||(d[I]=o[I]);const R=Object.keys(d);return s.sort!==!1&&R.sort(s.sort),R.map(I=>{const D=o[I];return D===void 0?"":D===null?S(I,s):Array.isArray(D)?D.reduce(g(I),[]).join("&"):S(I,s)+"="+S(D,s)}).filter(I=>I.length>0).join("&")},e.parseUrl=(o,s)=>{s=Object.assign({decode:!0},s);const[u,g]=n(o,"#");return Object.assign({url:u.split("?")[0]||"",query:p(E(o),s)},s&&s.parseFragmentIdentifier&&g?{fragmentIdentifier:f(g,s)}:{})},e.stringifyUrl=(o,s)=>{s=Object.assign({encode:!0,strict:!0},s);const u=j(o.url).split("?")[0]||"",g=e.extract(o.url),d=e.parse(g,{sort:!1}),R=Object.assign(d,o.query);let I=e.stringify(R,s);I&&(I=`?${I}`);let D=A(o.url);return o.fragmentIdentifier&&(D=`#${S(o.fragmentIdentifier,s)}`),`${u}${I}${D}`},e.pick=(o,s,u)=>{u=Object.assign({parseFragmentIdentifier:!0},u);const{url:g,query:d,fragmentIdentifier:R}=e.parseUrl(o,u);return e.stringifyUrl({url:g,query:a(d,s),fragmentIdentifier:R},u)},e.exclude=(o,s,u)=>{const g=Array.isArray(s)?d=>!s.includes(d):(d,R)=>!s(d,R);return e.pick(o,g,u)}})(bt);const st=lo,ui={parseNumbers:!1,parseBooleans:!1},fi={skipNull:!1,skipEmptyString:!1},di=(e,t)=>{var r,n;const{navigateMode:a="push",parseOptions:l,stringifyOptions:v}=t||{},b=Object.assign(Object.assign({},ui),l),y=Object.assign(Object.assign({},fi),v),S=st.useLocation(),f=(r=st.useHistory)===null||r===void 0?void 0:r.call(st),N=(n=st.useNavigate)===null||n===void 0?void 0:n.call(st),j=co(),A=$.useRef(typeof e=="function"?e():e||{}),E=$.useMemo(()=>bt.parse(S.search,b),[S.search]),x=$.useMemo(()=>Object.assign(Object.assign({},A.current),E),[E]);return[x,ze(o=>{const s=typeof o=="function"?o(x):o;j(),f&&f[a]({hash:S.hash,search:bt.stringify(Object.assign(Object.assign({},E),s),y)||"?"},S.state),N&&N({hash:S.hash,search:bt.stringify(Object.assign(Object.assign({},E),s),y)||"?"},{replace:a==="replace",state:S.state})})]},pi=di;let mi=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}};const Yr=e=>globalThis.DOMException===void 0?new mi(e):new DOMException(e),Zr=e=>{const t=e.reason===void 0?Yr("This operation was aborted."):e.reason;return t instanceof Error?t:Yr(t)};async function hi(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:a}={}){return new Promise((l,v)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const b=[],y=[],S=new Map;let f=!1,N=!1,j=!1,A=0,E=0;const x=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),p=s=>{f=!0,N=!0,v(s)};a&&(a.aborted&&p(Zr(a)),a.addEventListener("abort",()=>{p(Zr(a))}));const o=async()=>{if(N)return;const s=await x.next(),u=E;if(E++,s.done){if(j=!0,A===0&&!N){if(!n&&y.length>0){p(new AggregateError(y));return}if(N=!0,S.size===0){l(b);return}const g=[];for(const[d,R]of b.entries())S.get(d)!==Jr&&g.push(R);l(g)}return}A++,(async()=>{try{const g=await s.value;if(N)return;const d=await t(g,u);d===Jr&&S.set(u,d),b[u]=d,A--,await o()}catch(g){if(n)p(g);else{y.push(g),A--;try{await o()}catch(d){p(d)}}}})()};(async()=>{for(let s=0;s<r;s++){try{await o()}catch(u){p(u);break}if(j||f)break}})()})}const Jr=Symbol("skip");async function gi(e,t){return hi(e,r=>r(),t)}function yi({user:e,sessionUser:t}){const r=lt(()=>{var n;return(n=(e==null?void 0:e.passports)||[])==null?void 0:n.find(a=>a.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return i.jsxs(Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(mr,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),i.jsxs(Z,{sx:{flex:1,overflow:"hidden"},children:[i.jsxs(Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[i.jsx(He,{title:t.fullName,children:i.jsx(Ce,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),i.jsx(uo,{label:(r==null?void 0:r.title)||(r==null?void 0:r.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:Mr.textBase,borderColor:Mr.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),i.jsx(He,{title:t.email,children:i.jsx(Ce,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const vi={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},zn="Reserved IP",Xr="ip-region-cache";async function bi(e){const t=`https://ipapi.co/${e}/json/`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=zn):a=[n.country_name,n.region,n.city].filter(Boolean).join("/"),a}async function xi(e){const t=`https://api.ip.sb/geoip/${e}`,n=await(await fetch(t)).json();let a="";return n.error?n.reserved&&(a=zn):a=[n.country,n.region,n.city].filter(Boolean).join("/"),a}async function wi(e){let t="",r={};try{const n=localStorage.getItem(Xr);n&&(r=JSON.parse(n))}catch{r={}}if(r[e])t=r[e];else{try{t=await xi(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await bi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const n=Object.keys(r);n.length>100&&delete r[n[0]],r[e]&&delete r[e],r[e]=t,localStorage.setItem(Xr,JSON.stringify(r))}return t}async function Ei(e){return Promise.all(e.map(t=>wi(t)))}const Qr=e=>new Bt(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Bt.BROWSER.NAME,Bt.BROWSER.VERSION]]}).getResult();function Si({user:e,showAction:t=!0,showUser:r=!0}){const n=fo(),{locale:a}=Ne(),{confirmApi:l,confirmHolder:v}=hr(),b=ze((s,u={})=>po(vi,s,a,"en",u)),y=ze(async()=>{let s=e==null?void 0:e.userSessions;s||(s=await Lt.userSession.getUserSessions({did:e.did}));try{const g=s==null?void 0:s.map((I,D)=>[D,I.lastLoginIp]).filter(I=>!!I[1]),d=g==null?void 0:g.map(I=>I[1]),R=await Ei(d);for(let I=0;I<R.length;I++){const D=R[I],X=g[I],ce=s[X[0]];ce.ipRegion=D}}catch(g){console.warn("Failed to convert ip to region"),console.error(g)}const u=new Date().getTime();return mo(s,g=>g.visitorId===n?-1:u-new Date(g.updatedAt).getTime())}),S=ho(y),f=lt(()=>S.data||[],[S.data]),N=lt(()=>f.reduce((s,u)=>(s[u.lastLoginIp]=u.ipRegion,s),{}),[f]),j=ze(({visitorId:s})=>{l.open({title:b("logoutThisSession"),content:b("logoutThisSessionConfirm"),confirmButtonText:b("confirm"),cancelButtonText:b("cancel"),onConfirm:async()=>{await Lt.user.logout({visitorId:s}),S.refresh(),l.close()}})}),A=lt(()=>f.filter(u=>u.visitorId!==n),[f]),E=ze(()=>{l.open({title:b("logoutAllSession"),content:b("logoutAllSessionConfirm"),confirmButtonText:b("confirm"),cancelButtonText:b("cancel"),onConfirm:async()=>{const s=A.map(u=>()=>Lt.user.logout({visitorId:u.visitorId}));await gi(s,{concurrency:3,stopOnError:!1}),S.refresh(),l.close()}})}),x=[];t&&x.push(i.jsx(He,{title:b("logoutAllTips"),children:i.jsx($r,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:E,disabled:A.length===0,children:b("logoutAll")})},"logoutAll"));const p=lt(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),o=[{label:b("platform"),name:"platform",options:{customBodyRenderLite:s=>{var d,R;const u=f[s],g=Qr(u.ua);return i.jsx(Z,{children:[(d=g.os)==null?void 0:d.name,(R=g.os)==null?void 0:R.version].filter(Boolean).join("/")||b("unknown")})}}},{label:b("deviceType"),name:"deviceType",options:{customBodyRenderLite:s=>{var d,R;const u=f[s],g=Qr(u.ua);return i.jsx(Z,{children:[(d=g.browser)==null?void 0:d.name,(R=g.browser)==null?void 0:R.version].filter(Boolean).join("/")||b("unknown")})}}},{label:b("walletOS"),name:"walletOS",options:{customBodyRenderLite:s=>{var g;const u=f[s];return i.jsx(Z,{children:((g=u.extra)==null?void 0:g.walletOS)||b("unknown")})}}},r&&{label:b("user"),name:"user",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{sx:{minWidth:150,maxWidth:250},children:i.jsx(yi,{sessionUser:u.user,user:e})})}}},{label:b("createdAt"),name:"createdAt",options:{customBodyRenderLite:s=>{const u=f[s];return u.createdAt?i.jsx(xt,{value:u.createdAt,relativeRange:3*86400*1e3,locale:a}):b("unknown")}}},{label:b("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:s=>{const u=f[s];return u.status==="expired"?b("expired"):i.jsx(xt,{value:u.updatedAt,relativeRange:3*86400*1e3,locale:a})}}},{label:b("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{children:N[u.lastLoginIp]?i.jsxs(i.Fragment,{children:[i.jsx(Ce,{variant:"body2",children:N[u.lastLoginIp]}),i.jsx(Ce,{variant:"body2",color:"grey",children:u.lastLoginIp||b("unknown")})]}):i.jsx(Ce,{children:u.lastLoginIp||b("unknown")})})}}},t&&{label:b("actions"),name:"actions",options:{customBodyRenderLite:s=>{const u=f[s];return i.jsx(Z,{children:i.jsx($r,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:n===u.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>j({visitorId:u.visitorId}),children:u.status==="expired"?b("remove"):n===u.visitorId?b("currentSession"):b("logout")})})}}}].filter(Boolean);return i.jsxs(Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[v,i.jsx(xr,{locale:a,data:f,columns:o,customButtons:x,options:p,loading:S.loading})]})}var ue={};Object.defineProperty(ue,"__esModule",{value:!0});ue.isValid=ue.fromJSON=ue.fromRandom=ue.fromAddress=ue.fromPublicKey=ue.fromSecretKey=ue.Wallet=ue.WalletType=void 0;const mt=On,St=It,Ae=kn;ue.WalletType=Ae.DidType;function ot(e,t="default"){const r=(0,Ae.DidType)(t),n=(0,St.getSigner)(r.pk),a=(0,St.getHasher)(r.hash);return{type:r,secretKey:e.sk,publicKey:e.pk,address:e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address,hash(l,v=1,b="hex"){return a(l,v,b)},sign(l,v=!0,b="hex"){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(v){const y=a(l,1);return n.sign(y,e.sk,b)}return n.sign(l,e.sk,b)},verify(l,v,b=!0){if(!e.pk)throw new Error("Cannot verify data without a publicKey");const y=b?a(l,1):l;return n.verify(y,v,e.pk)},ethHash(l){if(typeof n.ethHash!="function")throw new Error("ethHash is not supported by signer");return n.ethHash(l)},ethSign(l,v=!0){if(!e.sk)throw new Error("Cannot sign data without a secretKey");if(typeof n.ethHash!="function")throw new Error("ethSign is not supported by signer");return v?n.ethSign(n.ethHash(l),(0,mt.toHex)(e.sk)):n.ethSign(l,(0,mt.toHex)(e.sk))},ethVerify(l,v,b=!0){if(typeof n.ethHash!="function")throw new Error("ethVerify is not supported by signer");const y=b?n.ethHash(l):l;return n.ethRecover(y,v)===this.address},toAddress(){return e.pk?(0,Ae.fromPublicKey)(e.pk,r):e.address},toJSON(){return{type:Ae.DidType.toJSON(r),sk:(0,mt.toHex)(e.sk),pk:(0,mt.toHex)(e.pk),address:this.address}}}}ue.Wallet=ot;function ji(e,t="default"){const r=(0,Ae.DidType)(t),n={sk:e,pk:(0,St.getSigner)(r.pk).getPublicKey(e)};return ot(n,r)}ue.fromSecretKey=ji;function Ai(e,t="default"){return ot({pk:e},(0,Ae.DidType)(t))}ue.fromPublicKey=Ai;function Pi(e){return ot({address:(0,Ae.toAddress)(e)},(0,Ae.toTypeInfo)(e))}ue.fromAddress=Pi;function Ii(e="default"){const t=(0,Ae.DidType)(e),n=(0,St.getSigner)(t.pk).genKeyPair();return ot({sk:n.secretKey,pk:n.publicKey},t)}ue.fromRandom=Ii;function Oi(e){const t=Ae.DidType.fromJSON(e.type);return ot(e,t)}ue.fromJSON=Oi;function Ri(e,t=!0){return!(!e||typeof e!="object"||typeof e.verify!="function"||typeof e.toAddress!="function"||typeof e.toJSON!="function"||!e.type||!e.publicKey||t&&(!e.secretKey||typeof e.sign!="function"))}ue.isValid=Ri;var qt={exports:{}},kt={},en;function Wn(){if(en)return kt;en=1;function e(x){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e=function(o){return typeof o}:e=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e(x)}function t(x,p){if(!(x instanceof p))throw new TypeError("Cannot call a class as a function")}function r(x,p){return p&&(e(p)==="object"||typeof p=="function")?p:n(x)}function n(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function a(x){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},a(x)}function l(x,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(p&&p.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),p&&v(x,p)}function v(x,p){return v=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},v(x,p)}var b={},y,S;function f(x,p,o){o||(o=Error);function s(g,d,R){return typeof p=="string"?p:p(g,d,R)}var u=function(g){l(d,g);function d(R,I,D){var X;return t(this,d),X=r(this,a(d).call(this,s(R,I,D))),X.code=x,X}return d}(o);b[x]=u}function N(x,p){if(Array.isArray(x)){var o=x.length;return x=x.map(function(s){return String(s)}),o>2?"one of ".concat(p," ").concat(x.slice(0,o-1).join(", "),", or ")+x[o-1]:o===2?"one of ".concat(p," ").concat(x[0]," or ").concat(x[1]):"of ".concat(p," ").concat(x[0])}else return"of ".concat(p," ").concat(String(x))}function j(x,p,o){return x.substr(!o||o<0?0:+o,p.length)===p}function A(x,p,o){return(o===void 0||o>x.length)&&(o=x.length),x.substring(o-p.length,o)===p}function E(x,p,o){return typeof o!="number"&&(o=0),o+p.length>x.length?!1:x.indexOf(p,o)!==-1}return f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",function(x,p,o){y===void 0&&(y=fr()),y(typeof x=="string","'name' must be a string");var s;typeof p=="string"&&j(p,"not ")?(s="must not be",p=p.replace(/^not /,"")):s="must be";var u;if(A(x," argument"))u="The ".concat(x," ").concat(s," ").concat(N(p,"type"));else{var g=E(x,".")?"property":"argument";u='The "'.concat(x,'" ').concat(g," ").concat(s," ").concat(N(p,"type"))}return u+=". Received type ".concat(e(o)),u},TypeError),f("ERR_INVALID_ARG_VALUE",function(x,p){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";S===void 0&&(S=ft);var s=S.inspect(p);return s.length>128&&(s="".concat(s.slice(0,128),"...")),"The argument '".concat(x,"' ").concat(o,". Received ").concat(s)},TypeError),f("ERR_INVALID_RETURN_VALUE",function(x,p,o){var s;return o&&o.constructor&&o.constructor.name?s="instance of ".concat(o.constructor.name):s="type ".concat(e(o)),"Expected ".concat(x,' to be returned from the "').concat(p,'"')+" function but got ".concat(s,".")},TypeError),f("ERR_MISSING_ARGS",function(){for(var x=arguments.length,p=new Array(x),o=0;o<x;o++)p[o]=arguments[o];y===void 0&&(y=fr()),y(p.length>0,"At least one arg needs to be specified");var s="The ",u=p.length;switch(p=p.map(function(g){return'"'.concat(g,'"')}),u){case 1:s+="".concat(p[0]," argument");break;case 2:s+="".concat(p[0]," and ").concat(p[1]," arguments");break;default:s+=p.slice(0,u-1).join(", "),s+=", and ".concat(p[u-1]," arguments");break}return"".concat(s," must be specified")},TypeError),kt.codes=b,kt}var Ut,tn;function Ci(){if(tn)return Ut;tn=1;function e(O){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{},U=Object.keys(k);typeof Object.getOwnPropertySymbols=="function"&&(U=U.concat(Object.getOwnPropertySymbols(k).filter(function(z){return Object.getOwnPropertyDescriptor(k,z).enumerable}))),U.forEach(function(z){t(O,z,k[z])})}return O}function t(O,C,k){return C in O?Object.defineProperty(O,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):O[C]=k,O}function r(O,C){if(!(O instanceof C))throw new TypeError("Cannot call a class as a function")}function n(O,C){for(var k=0;k<C.length;k++){var U=C[k];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(O,U.key,U)}}function a(O,C,k){return C&&n(O.prototype,C),k&&n(O,k),O}function l(O,C){return C&&(E(C)==="object"||typeof C=="function")?C:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function b(O,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(C&&C.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),C&&j(O,C)}function y(O){var C=typeof Map=="function"?new Map:void 0;return y=function(U){if(U===null||!N(U))return U;if(typeof U!="function")throw new TypeError("Super expression must either be null or a function");if(typeof C<"u"){if(C.has(U))return C.get(U);C.set(U,z)}function z(){return f(U,arguments,A(this).constructor)}return z.prototype=Object.create(U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),j(z,U)},y(O)}function S(){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}}function f(O,C,k){return S()?f=Reflect.construct:f=function(z,Q,P){var h=[null];h.push.apply(h,Q);var w=Function.bind.apply(z,h),T=new w;return P&&j(T,P.prototype),T},f.apply(null,arguments)}function N(O){return Function.toString.call(O).indexOf("[native code]")!==-1}function j(O,C){return j=Object.setPrototypeOf||function(U,z){return U.__proto__=z,U},j(O,C)}function A(O){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(k){return k.__proto__||Object.getPrototypeOf(k)},A(O)}function E(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(k){return typeof k}:E=function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},E(O)}var x=ft,p=x.inspect,o=Wn(),s=o.codes.ERR_INVALID_ARG_TYPE;function u(O,C,k){return(k===void 0||k>O.length)&&(k=O.length),O.substring(k-C.length,k)===C}function g(O,C){if(C=Math.floor(C),O.length==0||C==0)return"";var k=O.length*C;for(C=Math.floor(Math.log(C)/Math.log(2));C;)O+=O,C--;return O+=O.substring(0,k-O.length),O}var d="",R="",I="",D="",X={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},ce=10;function fe(O){var C=Object.keys(O),k=Object.create(Object.getPrototypeOf(O));return C.forEach(function(U){k[U]=O[U]}),Object.defineProperty(k,"message",{value:O.message}),k}function oe(O){return p(O,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(O,C,k){var U="",z="",Q=0,P="",h=!1,w=oe(O),T=w.split(`
|
|
2
2
|
`),q=oe(C).split(`
|
|
3
3
|
`),_=0,V="";if(k==="strictEqual"&&E(O)==="object"&&E(C)==="object"&&O!==null&&C!==null&&(k="strictEqualObject"),T.length===1&&q.length===1&&T[0]!==q[0]){var ae=T[0].length+q[0].length;if(ae<=ce){if((E(O)!=="object"||O===null)&&(E(C)!=="object"||C===null)&&(O!==0||C!==0))return"".concat(X[k],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as i,s as h,O as p,P as o}from"./index-
|
|
1
|
+
import{r as y,j as i,s as h,O as p,P as o}from"./index-BEh3RskV.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(y);var s=i;function v(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(d){return Object.getOwnPropertyDescriptor(e,d).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(n){g(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g(e,t,r){return t=b(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=O(e,"string");return typeof t=="symbol"?t:String(t)}function O(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,s.jsx)("svg",c(c({},t),{},{children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const j=h(p)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,c as ue,u as J,e as Pe,aE as Tr,j as e,F as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,A as le,Q as un,m as O,U as te,ax as pe,C as Y,J as ge,B as G,aQ as zn,K as de,O as ee,f as Dt,R as Bn,aR as Lr,aS as Or,aa as kr,aT as Fr,aU as Nr,aV as Ur,z as Wn,W as mn,T as fn,k as Q,aW as Rt,a as xt,S as ie,b as Je,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as ze,a8 as Kr,d as Gn,M as Gr,b5 as Yr,aD as ut,a9 as mt,a6 as ft,b6 as Vr,a7 as yt,i as Yn,N as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Jr,bb as Zr,D as Vn,w as vt,bc as ei,h as ti,at as pn,bd as ni,be as gn,aj as ri,bf as ii,bg as oi,bh as ai}from"./index-
|
|
1
|
+
import{r as p,c as ue,u as J,e as Pe,aE as Tr,j as e,F as T,aF as ln,aG as Mn,aH as Er,aI as cn,aJ as _t,aK as he,aL as xe,P as u,n as V,q as N,ad as ne,aM as dn,aN as Pr,aO as Ar,aP as Ir,A as le,Q as un,m as O,U as te,ax as pe,C as Y,J as ge,B as G,aQ as zn,K as de,O as ee,f as Dt,R as Bn,aR as Lr,aS as Or,aa as kr,aT as Fr,aU as Nr,aV as Ur,z as Wn,W as mn,T as fn,k as Q,aW as Rt,a as xt,S as ie,b as Je,aX as qn,aY as Hn,aZ as Kn,a_ as $r,a2 as Mr,a$ as zr,b0 as Br,b1 as Wr,b2 as qr,b3 as Hr,b4 as ze,a8 as Kr,d as Gn,M as Gr,b5 as Yr,aD as ut,a9 as mt,a6 as ft,b6 as Vr,a7 as yt,i as Yn,N as Xr,b7 as Qr,b8 as we,b9 as _e,ba as Jr,bb as Zr,D as Vn,w as vt,bc as ei,h as ti,at as pn,bd as ni,be as gn,aj as ri,bf as ii,bg as oi,bh as ai}from"./index-BEh3RskV.js";import{T as si}from"./index-DX24Z0Uj.js";import{d as li}from"./ArrowDropDown-VLne7ccc.js";import{u as Tt,C as re,a as hn}from"./index.esm-C8MTXtOS.js";import{S as Ce}from"./switch-control-B4LYohIC.js";import{d as Xn,i as ci}from"./is-path-prefix-equal-D1r7K_TX.js";import{T as K,F as di}from"./TextField-CJTsaR61.js";import{D as Qn,g as ui}from"./index-nD2D9Q59.js";import{d as Jn}from"./Link-gPnxlUfS.js";import{d as Ae}from"./Delete-D1RDqaZi.js";import{C as Et}from"./delete-confirm-D0V2Nyle.js";import{I as Be}from"./index-DT-Rr2m6.js";import{s as mi}from"./logo-BKA11TRi.js";import{_ as fi}from"./useLocalStorage-IvmGdRwA.js";import{L as pi}from"./LoadingButton-Crpf-Gsb.js";import{C as gi,d as Zn}from"./Public-Cu2MymRa.js";import{d as Pt}from"./Add-B__xT4sB.js";import{a as hi,B as er,D as xn,R as xi,b as yi}from"./url-evaluation-CXei2mde.js";import{d as vi}from"./CheckCircle-D24AG6dv.js";import{d as bi}from"./ExpandMore-BHsYpUKK.js";import{d as ji}from"./ChevronRight-D0OlG7KY.js";import{d as Ci}from"./MoreVert-BxyKJhuW.js";import{d as tr}from"./Edit-uZUJue62.js";import{d as Si,a as nr}from"./Https-B4vHJIg9.js";import{W as $e}from"./tag-CyEjUF3o.js";import{w as wi}from"./withStyles-DMG62fi3.js";import{S as _i}from"./Slider-bbGbMdw9.js";import"./index-DfJBghG7.js";import"./Select-BoNi1_kD.js";import"./InputLabel-DWHNzKMy.js";import"./FilterList-PDF9S8a9.js";import"./useThemeProps-guTpp8sD.js";import"./LastPage-uzFB0_6o.js";import"./index-DFMoXqZZ.js";import"./redux-CSH-C8dP.js";import"./Search-CsfCvyCj.js";import"./index-Z7YjOvSs.js";import"./click-to-copy-7Me9NdFp.js";import"./shorten-label-a0zPFg0c.js";const fe="Dashboard",rr=p.createContext({}),{Provider:Di,Consumer:ds}=rr,yn=[fe,T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP],Ri=(t,n)=>{if(t.name===T.DOMAIN_FOR_DEFAULT_SITE)return-1;if(n.name===T.DOMAIN_FOR_DEFAULT_SITE)return 1;const r=yn.includes(t.name),i=yn.includes(n.name);return r&&i?cn(t.name,n.name):r?-1:i?1:cn(t.name,n.name)},Ti=({sites:t,nodePort:n})=>{const r=window.location.host,o=(t||[]).map(a=>{const{id:l,rules:c=[],corsAllowedOrigins:h=[]}=a;let{domain:d,domainAliases:m}=a;m=m||[],[T.DOMAIN_FOR_IP_SITE,T.DOMAIN_FOR_IP_SITE_REGEXP].includes(d)&&(d=fe,m.find(f=>f.value===r)||m.unshift({protected:!1,value:r}));const g={id:l,name:d,type:"domain",items:[],domainAliases:m,isProtected:a.isProtected,corsAllowedOrigins:h};return(c||[]).forEach(f=>{const{id:y,isProtected:b,from:{pathPrefix:v},to:C}=f;if(C.type===T.ROUTING_RULE_TYPES.BLOCKLET){let R="";Number.parseInt(C.port,10)===Number.parseInt(n,10)?(R="Blocklet Server Dashboard",C.type=T.ROUTING_RULE_TYPES.DAEMON):R=C.did,g.items.push({id:y,name:ln(v||"/"),title:R,type:"rule",isProtected:b,pathPrefix:v,to:C})}else g.items.push({id:y,pathPrefix:v,name:ln(v||"/"),title:"Blocklet Server Dashboard",type:"rule",isProtected:b,to:C})}),g.items=Mn(g.items,f=>f.name),g}).sort(Ri),s=o.reduce((a,l)=>{let{name:c}=l;return c.endsWith(T.BLOCKLET_SITE_GROUP_SUFFIX)&&([c]=c.split(".")),a[c]={...l,rules:l.items},a},{});return{sites:o,siteMap:s}},Ei=({did:t,domain:n,mountPoint:r,siteMap:i,params:o}={})=>{if(!i)return null;const s=i[t];if(!s)return null;const a=n||(s.domainAliases||[])[0];if(!a)return null;let l=r;if(!l){const c=s.rules.filter(h=>!h.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];l=c?c.name:"/"}return _t(a.value,l,o)},Pi=({did:t,mountPoint:n,siteMap:r,params:i}={})=>{if(!r)return[];const o=r[t];if(!o)return[];const s=o.domainAliases||[];if(!s.length)return[];let a=n;if(!a){const l=o.rules.filter(c=>!c.name.startsWith(T.WELLKNOWN_PATH_PREFIX))[0];a=l?l.name:"/"}return s.map(l=>_t(l.value,a,i))},Ai=t=>{const n=t.map(i=>i.domain).filter(i=>![T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE].includes(i));let r=[];return t.forEach(i=>r.push(...i.domainAliases||[])),r=r.map(i=>typeof i=="string"?{value:i,isProtected:!1}:i),{domains:n,domainsAliases:r}};function vn({children:t}){const n=ue(),{info:r}=J(),[i,o]=p.useState([]),[s,a]=p.useState([]),[l,c]=p.useState([]),h=Pe(async()=>{const{sites:S}=await n.getRoutingSites({input:{snapshotHash:""}}),E=S||[];await Promise.all(E.map(async w=>(w.domainAliases=await Tr(w.domainAliases,{getIP:Er}),w)));const L=Ai(E);o(E),a(L.domains),c([window.location.hostname,...L.domains,...L.domainsAliases.map(w=>w.value)])},[r]),d=(S,E)=>{o(L=>L.map(w=>w.id===S?E.domain?E:{...E,domain:w.domain}:w))},m=S=>n.takeRoutingSnapshot({input:{dryRun:!1,message:encodeURIComponent(S)}}),g=async S=>{const E=await n.addRoutingSite({input:S});o(i.concat(E.site))},f=async(S,E)=>{const L=await n.updateRoutingSite({input:{id:S,...E}});if(L.site&&L.site.id){const w=i.findIndex(P=>P.id===L.site.id);w!==-1&&(i.splice(w,1,L.site),o([].concat(i)))}},y=async S=>{await n.deleteRoutingSite({input:{id:S}}),o(i.filter(E=>E.id!==S))},b=async(S,E,L)=>{const w=await n.addDomainAlias({input:{id:S,domainAlias:E,force:L}});d(S,w.site)},v=async(S,E)=>{const L=await n.deleteDomainAlias({input:{id:S,domainAlias:E}});d(S,L.site)},C=async(S,E)=>{const{site:L}=await n.addRoutingRule({input:{id:S,rule:E}});d(S,L)},R=async(S,E)=>{const{site:L}=await n.updateRoutingRule({input:{id:S,rule:E}});d(S,L)},j=async(S,E)=>{const{site:L}=await n.deleteRoutingRule({input:{id:S,ruleId:E}});d(S,L)},x={loading:h.loading,error:h.error,refresh:h.retry,api:n,actions:{addSite:g,updateSite:f,deleteSite:y,addDomainAlias:b,deleteDomainAlias:v,takeSnapshot:m,addRule:C,updateRule:R,deleteRule:j}},{sites:I,siteMap:D}=Ti({sites:i,nodePort:r.port});return x.sites=I,x.siteMap=D,x.domains=s,x.allDomains=l,x.getBlockletUrl=({did:S,domain:E,mountPoint:L,params:w})=>Ei({did:S,domain:E,mountPoint:L,siteMap:x.siteMap,params:w}),x.getBlockletUrls=({did:S,mountPoint:E,params:L})=>Pi({did:S,mountPoint:E,siteMap:x.siteMap,params:L}),e.jsx(Di,{value:{routing:x},children:t})}function ae(){const{routing:t}=p.useContext(rr);return t}function At(t){const n=[T.DOMAIN_FOR_IP_SITE_REGEXP,T.DOMAIN_FOR_DEFAULT_SITE,T.DOMAIN_FOR_IP_SITE];return typeof window<"u"&&typeof window.location<"u"&&n.push(window.location.hostname),n.includes(t)}var It={},Ii=xe;Object.defineProperty(It,"__esModule",{value:!0});var ir=It.default=void 0,Li=Ii(he()),Oi=e;ir=It.default=(0,Li.default)((0,Oi.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");function ki(){return null}function Lt({confirm:t}){const[n,r]=p.useState(null),{t:i}=N(),o=()=>{r(null)},s=async l=>{if(l){let c=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";c==="/"?dn.push(`${l.pathname}`):(c.endsWith("/")&&(c=c.substring(0,c.length-1)),dn.push(`${c}${l.pathname}`)),window.location.reload()}},a=(l,...c)=>{let h=typeof t=="function"?t(l,...c):t;return h?(typeof h=="string"&&(h={description:h}),r({title:i("common.noticeTitle"),description:i("common.leavePageTip"),confirm:i("common.confirm"),cancel:i("common.cancel"),onConfirm:()=>s(l),onCancel:()=>o(),...h}),!1):!0};return e.jsxs(Fi,{children:[e.jsx(ki,{message:a}),n&&e.jsx(ne,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}Lt.propTypes={confirm:u.oneOfType([u.object,u.string,u.func])};Lt.defaultProps={confirm:null};const Fi=V.div`
|
|
2
2
|
margin-bottom: 24px;
|
|
3
3
|
.top-btns-alert {
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|