@abtnode/webapp 1.16.49-beta-20250823-082650-626c1473 → 1.16.49-beta-20250826-112154-8ca981fa
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-CCV2cZO2.js → AdapterDayjs-DSbst3Pb.js} +1 -1
- package/dist/assets/{Add-CyNDL_k-.js → Add-B4h6-Y3a.js} +1 -1
- package/dist/assets/ArrowDropDown-DPp-6zTe.js +1 -0
- package/dist/assets/{Autocomplete-CiCUwFEx.js → Autocomplete-D4qgHPQo.js} +1 -1
- package/dist/assets/{Breadcrumbs-DRGS42Bm.js → Breadcrumbs-wr7_Z9Jk.js} +1 -1
- package/dist/assets/{ButtonGroup-CtdH1HDV.js → ButtonGroup-CruDWUf6.js} +1 -1
- package/dist/assets/{CSSTransition-Fx_rKfN5.js → CSSTransition-DHyzDS3S.js} +1 -1
- package/dist/assets/{CallMerge-eGwHUOxa.js → CallMerge-DDIAfXuh.js} +1 -1
- package/dist/assets/{CardContent-Bm199lLV.js → CardContent-BkHIw2EY.js} +1 -1
- package/dist/assets/{ChevronLeft-ccVGGgwe.js → ChevronLeft-LMOWtQoh.js} +1 -1
- package/dist/assets/{ChevronRight-DkWBbhkk.js → ChevronRight-CYwtPaao.js} +1 -1
- package/dist/assets/{Clear-CiwnL4KG.js → Clear-BM1FBBZl.js} +1 -1
- package/dist/assets/{DeleteOutline-BZsf5LEb.js → DeleteOutline-lLsPbsy_.js} +1 -1
- package/dist/assets/{Done-Ce1yOCQQ.js → Done-D68dtThT.js} +1 -1
- package/dist/assets/{Edit-_KT4-UwT.js → Edit-6kwCK506.js} +1 -1
- package/dist/assets/{ErrorOutline-D_eF69j1.js → ErrorOutline-d8mvVfQG.js} +1 -1
- package/dist/assets/{FilterList-DrLayevh.js → FilterList-DBRn3RJ7.js} +1 -1
- package/dist/assets/{Google-D6kQ3L4a.js → Google-Ch0Lcmyw.js} +1 -1
- package/dist/assets/{HelpOutline-Co_HF89w.js → HelpOutline-CB_V8VHj.js} +1 -1
- package/dist/assets/{Launch-DhM4Sbq_.js → Launch-DQ9Pd0Tu.js} +1 -1
- package/dist/assets/{Link-BLLpsHXK.js → Link-C3jBvdRj.js} +1 -1
- package/dist/assets/{ListItemButton-B85clGhN.js → ListItemButton-KhUkLUks.js} +1 -1
- package/dist/assets/{ListSubheader-DC_9Utyi.js → ListSubheader-CiWrOXPy.js} +1 -1
- package/dist/assets/{LoadingButton-yIi_Wg1h.js → LoadingButton-C5AY54l3.js} +1 -1
- package/dist/assets/{MoreVert-BNRNVzHq.js → MoreVert-LvQsHRvP.js} +1 -1
- package/dist/assets/{OpenInNew-_jBuUUU8.js → OpenInNew-CjwanXX3.js} +1 -1
- package/dist/assets/{Refresh-BQ3py77i.js → Refresh-KmLBerHN.js} +1 -1
- package/dist/assets/{Search-CgNd44j3.js → Search-B3y3I7Bx.js} +1 -1
- package/dist/assets/{Slider-CChimiAQ.js → Slider-D5zhDFVl.js} +1 -1
- package/dist/assets/{Stepper-WISRB160.js → Stepper-DrtkVXGn.js} +1 -1
- package/dist/assets/{Switch-Dls1St8M.js → Switch-jMKoPPEj.js} +1 -1
- package/dist/assets/{TableSearch-Cq2ZjGX2.js → TableSearch-CgxNYXXT.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BhST-iqI.js → ToggleButtonGroup-B7LsHyld.js} +1 -1
- package/dist/assets/{Verified-DcrboFo1.js → Verified-8xtM8E7f.js} +1 -1
- package/dist/assets/{VerifiedUser-cJQh0v4d.js → VerifiedUser-Bk2y4NnA.js} +1 -1
- package/dist/assets/{ViewList-B39g1Cm0.js → ViewList-B3wMEZt_.js} +1 -1
- package/dist/assets/{_createAggregator-BUGIwGBj.js → _createAggregator-BGx_hyA1.js} +1 -1
- package/dist/assets/{actions-AVKWKD8N.js → actions-B6hLI_nf.js} +1 -1
- package/dist/assets/{actions-B9LGsj6w.js → actions-CddJqvRX.js} +1 -1
- package/dist/assets/{agreement-CYwIMY9D.js → agreement-DeuZfmwL.js} +1 -1
- package/dist/assets/api-DYXM52h1.js +1 -0
- package/dist/assets/{appearance-CLKNV9dN.js → appearance-D0kdBw02.js} +1 -1
- package/dist/assets/{audit-logs-BlKGgNve.js → audit-logs-BL9lOS0g.js} +1 -1
- package/dist/assets/{base-chart-BpZuHtvk.js → base-chart-DXDl7cwx.js} +1 -1
- package/dist/assets/{blocklet-Cmt2sJrg.js → blocklet-kdF0d0Qp.js} +1 -1
- package/dist/assets/{chain-DBWSeogE.js → chain-B5MJhwl_.js} +1 -1
- package/dist/assets/{click-to-copy-BHQeGc5Q.js → click-to-copy-DlZXoRgA.js} +1 -1
- package/dist/assets/client-BnO8CaDE.js +1 -0
- package/dist/assets/cloneDeep-BSii9efD.js +1 -0
- package/dist/assets/{collapse-BSEnOmME.js → collapse-3YhIjFRC.js} +1 -1
- package/dist/assets/{config-navigation-B2egvfB5.js → config-navigation-CG3U8Oaq.js} +3 -3
- package/dist/assets/{connect-to-BrpViwa1.js → connect-to-Bz01gbxV.js} +1 -1
- package/dist/assets/{cssMode-C4CfOom7.js → cssMode-BNQLUhin.js} +1 -1
- package/dist/assets/{delete-confirm-5zZBH8yO.js → delete-confirm-Dz660yTH.js} +1 -1
- package/dist/assets/{depsEqual-Chu35bsJ.js → depsEqual-BU0Zfzov.js} +1 -1
- package/dist/assets/{detail-BIG3Wy4a.js → detail-wjh8SSmq.js} +3 -3
- package/dist/assets/{domains-B4KoZUjQ.js → domains-DF82JmAx.js} +1 -1
- package/dist/assets/{download-DdxRq_ET.js → download-uZ39PIN3.js} +1 -1
- package/dist/assets/{edit.svg-Duh18hDj.js → edit.svg-DHEgt4T5.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-KBOD-kTR.js +1 -0
- package/dist/assets/engine-CrVL_aCe.js +1 -0
- package/dist/assets/{freemarker2-B1QPgZkR.js → freemarker2-CJqpFP2F.js} +1 -1
- package/dist/assets/{get-safe-url-BFNXt7rK.js → get-safe-url-BjjSte_r.js} +1 -1
- package/dist/assets/getValidReactChildren-3HCtT0J7.js +1 -0
- package/dist/assets/{graphqlMode-BYxsQfbo.js → graphqlMode-CmZymNXr.js} +2 -2
- package/dist/assets/{handlebars-CF1niWLC.js → handlebars-Spod6KlQ.js} +1 -1
- package/dist/assets/{html-DSDdVfgm.js → html-2zt8tD_A.js} +1 -1
- package/dist/assets/{html-title-FdukYTkz.js → html-title-BISVxbaC.js} +1 -1
- package/dist/assets/{htmlMode-KKRgY6T9.js → htmlMode-16TfNklg.js} +1 -1
- package/dist/assets/{iframe-BBW8YmnC.js → iframe-BQna3Pt_.js} +1 -1
- package/dist/assets/{index-CYNcoZTi.js → index--1yW1BOK.js} +1 -1
- package/dist/assets/{index-MkEIzeFu.js → index-6vVbUeRC.js} +1 -1
- package/dist/assets/{index-Cel1YaQM.js → index-89kUV6fB.js} +1 -1
- package/dist/assets/{index-CEjBwN0B.js → index-98kYGR7t.js} +1 -1
- package/dist/assets/{index-DLpsm2mN.js → index-B0bm6qHZ.js} +1 -1
- package/dist/assets/{index-VvQ0okvj.js → index-BA3wdHPl.js} +2 -2
- package/dist/assets/{index-_ubYroa3.js → index-BF03k2Ax.js} +3 -3
- package/dist/assets/{index-JmWSLUGC.js → index-BG9IsOhp.js} +1 -1
- package/dist/assets/{index-mwTV4nae.js → index-BHMLUWGw.js} +1 -1
- package/dist/assets/{index-Zkn_nLyD.js → index-BJXZRP2y.js} +1 -1
- package/dist/assets/{index-fWrig1cJ.js → index-BPtoIMoq.js} +1 -1
- package/dist/assets/{index-TyxE76Ec.js → index-BV21Rw9W.js} +1 -1
- package/dist/assets/{index-jaPiqxwU.js → index-BfUqHZWc.js} +1 -1
- package/dist/assets/{index-DC4dv6bl.js → index-BqK0_Y7D.js} +1 -1
- package/dist/assets/{index-BOED20oN.js → index-BxkNxMyK.js} +1 -1
- package/dist/assets/{index-BqeIoJWi.js → index-Bz8yCBy3.js} +1 -1
- package/dist/assets/{index-CWP-CUtR.js → index-C-HhEzKZ.js} +24 -24
- package/dist/assets/{index-CZ4vDw6v.js → index-C4WLTDtv.js} +1 -1
- package/dist/assets/{index-DnwZiXgX.js → index-CHEaph75.js} +1 -1
- package/dist/assets/{index-ByEnjz7_.js → index-CKNShJuT.js} +1 -1
- package/dist/assets/{index-BZbJRgwL.js → index-CV8nRA8u.js} +1 -1
- package/dist/assets/{index-X_edenPh.js → index-CWczD9fZ.js} +1 -1
- package/dist/assets/{index-SMQr0-z0.js → index-CYPMnPt9.js} +1 -1
- package/dist/assets/{index-CPobCYA2.js → index-CZOJtrkJ.js} +2 -2
- package/dist/assets/{index-B2aAXlh7.js → index-CfmHj4Fr.js} +1 -1
- package/dist/assets/{index-vG_fevo9.js → index-ChkX2WWr.js} +1 -1
- package/dist/assets/{index-ChiaZhgT.js → index-CmzNfXzP.js} +1 -1
- package/dist/assets/{index-DZRPUI-P.js → index-Codg30Dx.js} +1 -1
- package/dist/assets/{index-BiQgvI4J.js → index-CqGVnG0M.js} +1 -1
- package/dist/assets/{index-D7GSic7V.js → index-D302CC2f.js} +3 -3
- package/dist/assets/{index-BW7huu6e.js → index-DIfZboDN.js} +1 -1
- package/dist/assets/index-DYnIi7EK.js +1 -0
- package/dist/assets/{index-CxEItqDK.js → index-DYz2td3Y.js} +1 -1
- package/dist/assets/{index-C_JR3eYj.js → index-DhdKMm-r.js} +3 -3
- package/dist/assets/{index-yUwivyV4.js → index-DiElCa61.js} +1 -1
- package/dist/assets/{index-Dc39Ep1O.js → index-Dnqtpp1_.js} +1 -1
- package/dist/assets/{index-OYUoLiKD.js → index-JRz2LnLe.js} +1 -1
- package/dist/assets/{index-DoQLBKcD.js → index-LyatycMz.js} +1 -1
- package/dist/assets/{index-VK5O0-Jy.js → index-QXgvuFbn.js} +1 -1
- package/dist/assets/{index-DrMxR7ux.js → index-Re9OtYRi.js} +1 -1
- package/dist/assets/{index-DJ6r2HtS.js → index-Vc1ekAsE.js} +1 -1
- package/dist/assets/{index-YZaa-4Bx.js → index-hFi2ujLY.js} +1 -1
- package/dist/assets/{index-yarj_VFw.js → index-mspSv8aA.js} +1 -1
- package/dist/assets/{index-DYPBcENw.js → index-o8tAgHD5.js} +9 -9
- package/dist/assets/{index-Clrosnuk.js → index-qEAxLPUq.js} +1 -1
- package/dist/assets/{index.esm-CxItsQTJ.js → index.esm-FBjE3h2W.js} +1 -1
- package/dist/assets/{install-from-url-380qd7gt.js → install-from-url-Dj8KHNoU.js} +1 -1
- package/dist/assets/{invitation-DGCfHqGj.js → invitation-D02TgN19.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-m3gGIcl9.js → is-path-prefix-equal-Cgt3NVqw.js} +1 -1
- package/dist/assets/{item-DD_3E6bF.js → item-DsfvuKyA.js} +1 -1
- package/dist/assets/{javascript-CjrPNChY.js → javascript-i5l_OpZv.js} +1 -1
- package/dist/assets/{jsonMode-DXiVGLkr.js → jsonMode-B_y9Y7f4.js} +1 -1
- package/dist/assets/{liquid-D-VmpCyh.js → liquid-DFAbUkgZ.js} +1 -1
- package/dist/assets/{list-header-BCf9pfpu.js → list-header-CGBrwwxP.js} +1 -1
- package/dist/assets/{log-DZjV_8Yh.js → log-ChluFqz7.js} +1 -1
- package/dist/assets/{lottie-react.esm-DiR7wRdT.js → lottie-react.esm-D9g4e0uS.js} +1 -1
- package/dist/assets/{mdx-DAOZ4lMY.js → mdx-D2o3TsGM.js} +1 -1
- package/dist/assets/{memory-BpAl3sVA.js → memory-SxjYPx-h.js} +1 -1
- package/dist/assets/{metric-Dby59eDK.js → metric-CCiJIosR.js} +1 -1
- package/dist/assets/omit-C9V__aYC.js +1 -0
- package/dist/assets/{overview-CcowRwok.js → overview-CriGA2W0.js} +1 -1
- package/dist/assets/{permission-BthIDENf.js → permission-DG4nnLwd.js} +1 -1
- package/dist/assets/{preference-kBYeEwSF.js → preference-AAH5ysUn.js} +3 -3
- package/dist/assets/{python-CdbhBWHz.js → python-CPuFjGso.js} +1 -1
- package/dist/assets/{raf-schd.esm-Dcqswq4F.js → raf-schd.esm-DHvy-PNC.js} +1 -1
- package/dist/assets/{razor-D3uR_CWd.js → razor-50RsUVHI.js} +1 -1
- package/dist/assets/{rotate-session-key-DMSWrzBB.js → rotate-session-key-Cr770JiY.js} +1 -1
- package/dist/assets/{runtime-Bc6mIoVO.js → runtime-uqXKMFBQ.js} +1 -1
- package/dist/assets/schema-HTPq5Xtv.js +1 -0
- package/dist/assets/sdk-C_SRrWJ9.js +1 -0
- package/dist/assets/{service-BwSP32Mz.js → service-CKtPzZF9.js} +1 -1
- package/dist/assets/{shorten-label-B3maSdfu.js → shorten-label-2HLZz3fu.js} +1 -1
- package/dist/assets/{simple-select-DGVn7OCp.js → simple-select-Cld5PcRw.js} +1 -1
- package/dist/assets/{spaces-CRL9ftNo.js → spaces-BuiVc0de.js} +1 -1
- package/dist/assets/{status-CmwFl99i.js → status-BeRo7Q4z.js} +1 -1
- package/dist/assets/{status-B6NUazE3.js → status-C8HQh9dt.js} +1 -1
- package/dist/assets/{switch-control-CQve8WjK.js → switch-control-4POtc8f3.js} +1 -1
- package/dist/assets/{table-icons-BFn_1E3e.js → table-icons-B8R9UES0.js} +1 -1
- package/dist/assets/{team-ejN4nnN3.js → team-n2xFz2t1.js} +1 -1
- package/dist/assets/{toLower-Bvxl8_28.js → toLower-ex_Cy3wy.js} +1 -1
- package/dist/assets/toUpper-Cen4nN2p.js +1 -0
- package/dist/assets/{traffic-BPJ-UAIv.js → traffic-BCka21nM.js} +1 -1
- package/dist/assets/{tsMode-BE9xerv4.js → tsMode-DYWrw_-3.js} +1 -1
- package/dist/assets/{typescript-Bl04Dq2P.js → typescript-TnEuq3h_.js} +1 -1
- package/dist/assets/{url-evaluation-CfntFDAB.js → url-evaluation-DiHmEbVj.js} +1 -1
- package/dist/assets/{url-join-Cbq6GdOd.js → url-join-U9ZbETkY.js} +1 -1
- package/dist/assets/{use-mobile-BSN4bEuW.js → use-mobile-CsTrq8vs.js} +1 -1
- package/dist/assets/{use-mobile-B2yfhcBW.js → use-mobile-T1XgZgYV.js} +1 -1
- package/dist/assets/{useAsync-Bp9zfZcB.js → useAsync-By8N2vZe.js} +1 -1
- package/dist/assets/{useAsyncRetry-B4rCQJf1.js → useAsyncRetry-9br707vK.js} +1 -1
- package/dist/assets/{useLocalStorage-Bp5NtICI.js → useLocalStorage-BdRSQq24.js} +1 -1
- package/dist/assets/{useThemeProps-BBt9_Zlf.js → useThemeProps-qTAusu8D.js} +1 -1
- package/dist/assets/{util-Cx9tbwYF.js → util-BRdkBqvw.js} +1 -1
- package/dist/assets/{wait-container-DuYkXev1.js → wait-container-CieQbYCo.js} +1 -1
- package/dist/assets/{without-wallet-BYcJEzBd.js → without-wallet-D1BnAwMz.js} +1 -1
- package/dist/assets/{wrap-locale-BrkbOfQd.js → wrap-locale-3dv9PAUx.js} +1 -1
- package/dist/assets/{xml-DA354x40.js → xml-Cd7ZqbC-.js} +1 -1
- package/dist/assets/{yaml-BVTWBbvI.js → yaml-Dr98nGaa.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-DBKeGP2I.js +0 -1
- package/dist/assets/api-a-vwp3t3.js +0 -1
- package/dist/assets/client-BhxOC8vI.js +0 -1
- package/dist/assets/cloneDeep-DUzeWN1z.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-Ce-Ac5Zj.js +0 -1
- package/dist/assets/engine-B5ww7WNt.js +0 -1
- package/dist/assets/getValidReactChildren-DBpCDunv.js +0 -1
- package/dist/assets/index-BpKbArXc.js +0 -1
- package/dist/assets/omit-C6T47lE8.js +0 -1
- package/dist/assets/schema-H7H3MB1A.js +0 -1
- package/dist/assets/sdk-CR-wTgx6.js +0 -1
- package/dist/assets/toUpper-j3cZVPNT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as z,bn as I,bo as Ke,m as S,j as e,P as $,r as h,Q as X,R as G,S as Q,U as J,N as l,o as x,n as Re,v as U,C as Se,ad as ce,aV as Y,t as F,g as De,y as E,$ as le,aU as Ie,V as Be,s as P,au as $e,H as Pe,l as Ne,bp as W,W as Le,bq as de,br as pe,bs as me,bt as Ee,J as _e,T as B,bu as ze,az as ie,a4 as re,aR as ae,bk as We,bv as qe,X as Me,Y as Ue,A as Fe,u as He,bm as Oe,d as Ve,bw as Xe}from"./index-
|
|
1
|
+
import{E as z,bn as I,bo as Ke,m as S,j as e,P as $,r as h,Q as X,R as G,S as Q,U as J,N as l,o as x,n as Re,v as U,C as Se,ad as ce,aV as Y,t as F,g as De,y as E,$ as le,aU as Ie,V as Be,s as P,au as $e,H as Pe,l as Ne,bp as W,W as Le,bq as de,br as pe,bs as me,bt as Ee,J as _e,T as B,bu as ze,az as ie,a4 as re,aR as ae,bk as We,bv as qe,X as Me,Y as Ue,A as Fe,u as He,bm as Oe,d as Ve,bw as Xe}from"./index-CZOJtrkJ.js";import{u as Ge,T as Qe}from"./html-title-BISVxbaC.js";import Je from"./audit-logs-BL9lOS0g.js";import{T as ue,M as Ye}from"./index-DYz2td3Y.js";import{r as xe,P as Ze}from"./index-CWczD9fZ.js";import{u as _,T as et}from"./team-n2xFz2t1.js";import{g as tt,H as st}from"./index-Vc1ekAsE.js";import{D as nt}from"./url-evaluation-DiHmEbVj.js";import{E as ot}from"./Edit-6kwCK506.js";import{y as it}from"./index-BHMLUWGw.js";import{A as rt}from"./Add-B4h6-Y3a.js";import{l as H}from"./index-CYPMnPt9.js";import{C as O}from"./click-to-copy-DlZXoRgA.js";import{f as at}from"./index-BojVbZw0.js";import{D as ct}from"./delete-confirm-Dz660yTH.js";import{P as lt}from"./permission-DG4nnLwd.js";import{u as dt}from"./blocklet-kdF0d0Qp.js";import{A as pt}from"./actions-CddJqvRX.js";import{u as fe}from"./use-mobile-CsTrq8vs.js";import{u as mt}from"./useAsyncRetry-9br707vK.js";import"./TableSearch-CgxNYXXT.js";import"./Search-B3y3I7Bx.js";import"./Clear-BM1FBBZl.js";import"./useLocalStorage-BdRSQq24.js";import"./index-CqGVnG0M.js";import"./decode-DPztD6kB.js";import"./shorten-label-2HLZz3fu.js";import"./ViewList-B3wMEZt_.js";import"./use-mobile-T1XgZgYV.js";import"./client-BnO8CaDE.js";import"./AdapterDayjs-DSbst3Pb.js";import"./useThemeProps-qTAusu8D.js";import"./CSSTransition-DHyzDS3S.js";import"./visuallyHidden-Dan1xhjv.js";import"./index-Re9OtYRi.js";import"./Verified-8xtM8E7f.js";import"./DeleteOutline-lLsPbsy_.js";import"./ErrorOutline-d8mvVfQG.js";import"./index-CfmHj4Fr.js";import"./emotion-cache.browser.esm-KBOD-kTR.js";import"./sdk-C_SRrWJ9.js";import"./index-QXgvuFbn.js";import"./ButtonGroup-CruDWUf6.js";import"./getValidReactChildren-3HCtT0J7.js";import"./Google-Ch0Lcmyw.js";import"./cloneDeep-BSii9efD.js";import"./edit.svg-DHEgt4T5.js";import"./list-header-CGBrwwxP.js";import"./chain-B5MJhwl_.js";import"./ToggleButtonGroup-B7LsHyld.js";import"./FilterList-DBRn3RJ7.js";import"./index-98kYGR7t.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BU0Zfzov.js";import"./MoreVert-LvQsHRvP.js";import"./useAsync-By8N2vZe.js";function Z({value:s}){const{t,locale:n}=S(),i=new Date;return new Date(s)<i?e.jsxs("span",{style:{color:"red"},children:[e.jsx($,{value:s,locale:n}),`${t("setting.accessKey.expired",{time:""})}`]}):e.jsx($,{mode:"daysLeft",value:s,locale:n,type:"all"})}Z.propTypes={value:x.string.isRequired};function ee({value:s,onChange:t,...n}){const{t:i}=S(),r=h.useMemo(()=>[{value:"signature",title:i("setting.accessKey.signature"),description:i("setting.accessKey.signatureDesc")},{value:"simple",title:i("setting.accessKey.simple"),description:i("setting.accessKey.simpleDesc")}],[i]);return e.jsxs(X,{style:{width:"100%"},variant:"outlined",...n,children:[e.jsx(G,{children:i("setting.accessKey.authType")}),e.jsx(Q,{value:s,onChange:t,fullWidth:!0,label:i("setting.accessKey.authType"),children:r.map(c=>e.jsx(J,{value:c.value,children:e.jsxs(l,{children:[e.jsx("span",{children:c.title}),e.jsx(l,{sx:{maxWidth:510,fontSize:12,color:"#999",whiteSpace:"normal"},children:c.description})]})},c.value))})]})}ee.propTypes={value:x.string.isRequired,onChange:x.func.isRequired};const te=()=>{const s=z.RBAC_CONFIG.roles.filter(r=>r.passport),{inService:t}=I(),{roles:n}=_(),i=[...s,...t?n:[]];return Ke(i,"name").filter(r=>r.name!==z.ROLES.OWNER)};function he(){const{session:s}=Re(),t=te();return h.useMemo(()=>{if(!s?.user?.role)return[];if(["owner","admin"].includes(s.user.role))return t;const i=t.filter(c=>c.name==="guest");return[...t.filter(c=>c.name!=="guest").filter(c=>s.user.passports.find(f=>f.role===c.name)),...i]},[t,s?.user?.passports,s?.user?.role])}function ge({onCreate:s=()=>{},remark:t=""}){const{api:n}=I(),{teamDid:i}=_(),{t:r}=S(),[c,f]=h.useState(!1),[u,j]=h.useState(null),p=he(),w=()=>{f(!1),j(null)},g=async m=>{const{remark:k,passport:y,authType:o}=m;f(!0);const C=await n.createAccessKey({input:{teamDid:i,remark:k.trim(),passport:y,expireAt:m.expireAt?new Date(m.expireAt).getTime():null,authType:o}}),{data:A}=C;s(A),j(null),f(!1)},d={title:`${r("common.create")} ${r("accessKey")}`,description:(m,k,y)=>e.jsxs(Y,{sx:{gap:3},children:[e.jsx(F,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,margin:"dense",value:m.remark,onChange:o=>{k({...m,remark:o.target.value,__disableConfirm:!m.passport||!o.target.value.trim()}),o.target.value.trim()?y(""):y(r("setting.accessKey.remarkInvalid"))},slotProps:{htmlInput:{"data-cy":"remark-input"}}}),e.jsxs(X,{style:{width:"100%"},variant:"outlined",children:[e.jsx(G,{children:r("setting.accessKey.passport")}),e.jsx(Q,{"data-cy":"create-access-key-select-passport",value:m.passport,onChange:o=>{const C=o.target.value;y(null),k({...m,passport:C,__disableConfirm:!m.remark||!C})},fullWidth:!0,label:r("setting.accessKey.passport"),disabled:c,children:p.map(o=>e.jsx(J,{value:o.name,"data-cy":`create-access-key-passport-option-${o.name}`,children:e.jsxs(l,{children:[e.jsx("span",{children:o.title||o.name}),e.jsx(l,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:o.description})]})},o.name))})]}),e.jsx(ee,{value:m.authType,onChange:o=>{k({...m,authType:o.target.value})}}),e.jsx(ue,{placeholder:r("setting.accessKey.expireTime"),value:m.expireAt,onChange:o=>{k({...m,expireAt:o,__disableConfirm:!m.passport||!m.remark||!o})}})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:t,authType:"signature",__disableConfirm:!t.trim()},onConfirm:g,onCancel:w};return e.jsxs(e.Fragment,{children:[e.jsxs(U,{sx:{color:"common.white"},edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>j(d),className:"rule-action",children:[c?e.jsx(Se,{size:16}):e.jsx(rt,{style:{fontSize:16}}),r("common.create")]}),u&&e.jsx(ce,{title:u.title,description:u.description,confirm:u.confirm,color:u.color,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}ge.propTypes={remark:x.string,onCreate:x.func};function ye({onConfirm:s=()=>{},accessKeyId:t,accessKeySecret:n,hideSecret:i=!0}){const{t:r}=h.useContext(De),[c,f]=h.useState(!1),[u,j]=h.useState(()=>i),p=I(),w=()=>{j(!u)},g=y=>{f(y.target.checked)},d=E(window.location.origin,p?.info?.routing?.adminPath),m=h.useMemo(()=>i?`const Client = require('@blocklet/server-js');
|
|
2
2
|
const ensureServerEndpoint = require('@abtnode/util/lib/ensure-server-endpoint');
|
|
3
3
|
const { joinURL } = require('ufo');
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bd as x}from"./index-
|
|
1
|
+
import{bd as x}from"./index-CZOJtrkJ.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as K,H as q,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eN as Fe,Q as Pe,id as Ye,bj as Te,aU as Ie,V as Ee,dH as we,b3 as Ue,b1 as Ae,C as Xe,f as Qe,e$ as Je,aP as De,W as yt,at as Ze,ie as et,v as Oe,f1 as tt,fn as ye,fH as st,dB as St,s as ie,ag as pe,G as qe,av as vt,ig as Ct,ih as Nt,$ as nt,ii as wt,ij as Rt,ik as Tt,il as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,im as Lt,a4 as kt}from"./index-CPobCYA2.js";import{d as Ft,H as at,g as Pt}from"./index-DJ6r2HtS.js";import{R as _e,S as _t}from"./actions-AVKWKD8N.js";import{B as Bt}from"./index-Clrosnuk.js";import{S as me}from"./shorten-label-B3maSdfu.js";import{v as ot}from"./index-DrMxR7ux.js";import{T as zt}from"./html-title-FdukYTkz.js";import{R as Wt}from"./Refresh-BQ3py77i.js";import{D as Mt,g as Ht}from"./traffic-BPJ-UAIv.js";import{u as Kt}from"./use-mobile-BSN4bEuW.js";import"./FilterList-DrLayevh.js";import"./CSSTransition-Fx_rKfN5.js";import"./emotion-cache.browser.esm-Ce-Ac5Zj.js";import"./index-CEjBwN0B.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-Chu35bsJ.js";import"./index-mwTV4nae.js";import"./TableSearch-Cq2ZjGX2.js";import"./Search-CgNd44j3.js";import"./Clear-CiwnL4KG.js";import"./MoreVert-BNRNVzHq.js";import"./useLocalStorage-Bp5NtICI.js";import"./url-evaluation-CfntFDAB.js";import"./get-safe-url-BFNXt7rK.js";import"./ButtonGroup-CtdH1HDV.js";import"./getValidReactChildren-DBpCDunv.js";import"./permission-BthIDENf.js";import"./index.esm-CxItsQTJ.js";import"./collapse-BSEnOmME.js";import"./blocklet-Cmt2sJrg.js";import"./Switch-Dls1St8M.js";import"./iframe-BBW8YmnC.js";import"./ChevronLeft-ccVGGgwe.js";import"./ChevronRight-DkWBbhkk.js";import"./index-DBii9-f-.js";import"./base-chart-BpZuHtvk.js";import"./index-yUwivyV4.js";import"./AdapterDayjs-CCV2cZO2.js";import"./useThemeProps-BBt9_Zlf.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),qt=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return q.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},U=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw q.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:U,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=K().startOf("day");return t.filter(n=>K(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=K().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){q.error("Please select a date range");return}if(K(f.startDate).isAfter(f.endDate)||!K(f.startDate).isValid()||!K(f.endDate).isValid()){q.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function He({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}He.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,U]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],H=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(H,h.emailSendStatus)||S(M=>({...M,emailSendStatus:H,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,U(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){q.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const H=i.currentTarget,M=H.getBoundingClientRect();P.anchorEl=H,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}U({channel:c});try{const H=await oe(c,o.receiver);await be(1),U({channel:c,result:H}),(typeof H=="boolean"&&H||St(H)&&Object.values(H).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(H){q.error(H.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:H=>R(H,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(He,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(qt,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
1
|
+
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as K,H as q,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eN as Fe,Q as Pe,id as Ye,bj as Te,aU as Ie,V as Ee,dH as we,b3 as Ue,b1 as Ae,C as Xe,f as Qe,e$ as Je,aP as De,W as yt,at as Ze,ie as et,v as Oe,f1 as tt,fn as ye,fH as st,dB as St,s as ie,ag as pe,G as qe,av as vt,ig as Ct,ih as Nt,$ as nt,ii as wt,ij as Rt,ik as Tt,il as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,im as Lt,a4 as kt}from"./index-CZOJtrkJ.js";import{d as Ft,H as at,g as Pt}from"./index-Vc1ekAsE.js";import{R as _e,S as _t}from"./actions-B6hLI_nf.js";import{B as Bt}from"./index-qEAxLPUq.js";import{S as me}from"./shorten-label-2HLZz3fu.js";import{v as ot}from"./index-Re9OtYRi.js";import{T as zt}from"./html-title-BISVxbaC.js";import{R as Wt}from"./Refresh-KmLBerHN.js";import{D as Mt,g as Ht}from"./traffic-BCka21nM.js";import{u as Kt}from"./use-mobile-CsTrq8vs.js";import"./FilterList-DBRn3RJ7.js";import"./CSSTransition-DHyzDS3S.js";import"./emotion-cache.browser.esm-KBOD-kTR.js";import"./index-98kYGR7t.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BU0Zfzov.js";import"./index-BHMLUWGw.js";import"./TableSearch-CgxNYXXT.js";import"./Search-B3y3I7Bx.js";import"./Clear-BM1FBBZl.js";import"./MoreVert-LvQsHRvP.js";import"./useLocalStorage-BdRSQq24.js";import"./url-evaluation-DiHmEbVj.js";import"./get-safe-url-BjjSte_r.js";import"./ButtonGroup-CruDWUf6.js";import"./getValidReactChildren-3HCtT0J7.js";import"./permission-DG4nnLwd.js";import"./index.esm-FBjE3h2W.js";import"./collapse-3YhIjFRC.js";import"./blocklet-kdF0d0Qp.js";import"./Switch-jMKoPPEj.js";import"./iframe-BQna3Pt_.js";import"./ChevronLeft-LMOWtQoh.js";import"./ChevronRight-CYwtPaao.js";import"./index-DBii9-f-.js";import"./base-chart-DXDl7cwx.js";import"./index-DiElCa61.js";import"./AdapterDayjs-DSbst3Pb.js";import"./useThemeProps-qTAusu8D.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),qt=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return q.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},U=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[K(I.dateRange[0]).toISOString(),K(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw q.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:U,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=K().startOf("day");return t.filter(n=>K(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=K().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){q.error("Please select a date range");return}if(K(f.startDate).isAfter(f.endDate)||!K(f.startDate).isValid()||!K(f.endDate).isValid()){q.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[Ue(t[0],n)," - ",Ue(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function He({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}He.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,U]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[K().subtract(1,"month").startOf("day").toDate(),K().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],H=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(H,h.emailSendStatus)||S(M=>({...M,emailSendStatus:H,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,U(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){q.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const H=i.currentTarget,M=H.getBoundingClientRect();P.anchorEl=H,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}U({channel:c});try{const H=await oe(c,o.receiver);await be(1),U({channel:c,result:H}),(typeof H=="boolean"&&H||St(H)&&Object.values(H).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(H){q.error(H.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:H=>R(H,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(He,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(qt,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
2
2
|
td.MuiTableCell-footer {
|
|
3
3
|
border: none !important;
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bX as Ge,bW as Fe,r as h,bY as Ke,j as e,b8 as ee,b_ as $e,cb as J,b$ as Ye,bU as He,cd as qe,aG as he,O as q,bn as A,cq as Ce,H as B,Y as V,bf as E,fB as we,aQ as Be,b as N,i_ as Ve,m as D,gz as Qe,o as m,x as Xe,ax as De,y as fe,al as Ze,g as Je,C as U,T as j,i as et,s as tt,f as st,i$ as X,hW as Z,j0 as ot,N as S,aV as G,E as T,L as nt,p as H,dk as at,az as Se,U as K,aF as $,a9 as Y,a5 as rt,dH as it,gp as ct,a$ as lt,v as pe,w as dt,G as be,Z as Ee,by as xe,B as pt}from"./index-CPobCYA2.js";import{T as ut}from"./html-title-FdukYTkz.js";import{u as L}from"./blocklet-Cmt2sJrg.js";import{u as mt}from"./use-mobile-BSN4bEuW.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-BrpViwa1.js";import"./index-VK5O0-Jy.js";import"./index-BojVbZw0.js";import"./api-a-vwp3t3.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-CRL9ftNo.js";import{v as Rt}from"./index-DrMxR7ux.js";import{E as zt}from"./index-yUwivyV4.js";import{H as vt}from"./HelpOutline-Co_HF89w.js";import{H as Pt}from"./index-DJ6r2HtS.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Ut}from"./actions-AVKWKD8N.js";import{D as Lt}from"./DeleteOutline-BZsf5LEb.js";import{g as ke}from"./get-safe-url-BFNXt7rK.js";import{S as Ot}from"./switch-control-CQve8WjK.js";import{L as je}from"./list-header-BCf9pfpu.js";import"./OpenInNew-_jBuUUU8.js";import"./ButtonGroup-CtdH1HDV.js";import"./getValidReactChildren-DBpCDunv.js";import"./FilterList-DrLayevh.js";import"./CSSTransition-Fx_rKfN5.js";import"./emotion-cache.browser.esm-Ce-Ac5Zj.js";import"./index-CEjBwN0B.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-Chu35bsJ.js";import"./index-mwTV4nae.js";import"./TableSearch-Cq2ZjGX2.js";import"./Search-CgNd44j3.js";import"./Clear-CiwnL4KG.js";import"./MoreVert-BNRNVzHq.js";import"./useLocalStorage-Bp5NtICI.js";import"./url-evaluation-CfntFDAB.js";import"./permission-BthIDENf.js";import"./Switch-Dls1St8M.js";function Mt(t){return Ge("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:s,fontSize:n,classes:o}=t,r={root:["root",s!=="inherit"&&`color${J(s)}`,`fontSize${J(n)}`]};return Ye(r,Mt,o)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.color!=="inherit"&&s[`color${J(n.color)}`],s[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([s])=>({props:{color:s},style:{color:(t.vars||t).palette[s].main}}))]}))),ye=h.forwardRef(function(s,n){const o=Ke({props:s,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=o,p={...o,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Gt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Kt({blockletDid:t,nodeApi:s,spaceGateways:n}){let o=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,o=!0),{...a,name:c}}));return o&&await Promise.all(r.filter(a=>a.did).map(a=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:s}=L(),n=s?.meta?.did,{api:o}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await o.getBlockletSpaceGateways({input:{did:n}});return await Kt({blockletDid:n,nodeApi:o,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:s,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:o}=L(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(s(!0),!o){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:o.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{s(!1)}},1e3);return Be(async()=>{l()},[o?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:s}=Te(),[n,o]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&o(()=>({...c}))},[t]),h.useEffect(()=>{if(s?.length&&Ve(s[0]?.status)){const[c]=s;o(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),n}function Ht({deps:t=[],setLoading:s=()=>{}}={}){const{blocklet:n}=L(),[o,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{s(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{s(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:o}}const Re=h.createContext({}),{Provider:qt,Consumer:Ys}=Re;function ze({children:t}){const{t:s}=D(),{api:n}=A(),{blocklet:o}=L(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:o?.appDid}),u=h.useMemo(()=>wt(o?.environments),[o?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[se,oe]=h.useState(0),{backupSummary:ne}=Ht({deps:[se]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=o?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{oe(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:o.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:o.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:s}=L(),{info:n}=A(),{t:o}=D(),r=Ie({blocklet:s}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(o("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(o("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:s}=L(),{data:n,loading:o}=Ce(()=>t.getBlocklet({input:{did:s?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!s?.meta?.did,refreshDeps:[s?.meta?.did]});return{blocklet:n?.blocklet??null,loading:o}}function Pe({...t}){const{t:s}=h.useContext(Je),{blocklet:n,loading:o}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return o?e.jsx(U,{}):e.jsx(j,{children:s("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:s,backupSummary:n}=O(),o=xt({key:"lg"}),r=h.useRef(null),a=st(),c=h.useCallback(l=>{s(l)},[s]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
|
|
1
|
+
import{bX as Ge,bW as Fe,r as h,bY as Ke,j as e,b8 as ee,b_ as $e,cb as J,b$ as Ye,bU as He,cd as qe,aG as he,O as q,bn as A,cq as Ce,H as B,Y as V,bf as E,fB as we,aQ as Be,b as N,i_ as Ve,m as D,gz as Qe,o as m,x as Xe,ax as De,y as fe,al as Ze,g as Je,C as U,T as j,i as et,s as tt,f as st,i$ as X,hW as Z,j0 as ot,N as S,aV as G,E as T,L as nt,p as H,dk as at,az as Se,U as K,aF as $,a9 as Y,a5 as rt,dH as it,gp as ct,a$ as lt,v as pe,w as dt,G as be,Z as Ee,by as xe,B as pt}from"./index-CZOJtrkJ.js";import{T as ut}from"./html-title-BISVxbaC.js";import{u as L}from"./blocklet-kdF0d0Qp.js";import{u as mt}from"./use-mobile-CsTrq8vs.js";import{c as Ie,d as ft,e as xt,f as gt,g as ue,h as ht,b as St,u as yt,C as bt,D as kt,a as jt}from"./connect-to-Bz01gbxV.js";import"./index-QXgvuFbn.js";import"./index-BojVbZw0.js";import"./api-DYXM52h1.js";import{d as Ct,a as wt,g as Bt,i as Dt,e as ge,f as Et,h as It,j as Tt}from"./spaces-BuiVc0de.js";import{v as Rt}from"./index-Re9OtYRi.js";import{E as zt}from"./index-DiElCa61.js";import{H as vt}from"./HelpOutline-CB_V8VHj.js";import{H as Pt}from"./index-Vc1ekAsE.js";import{x as At}from"./index-DRYJ0xIl.js";import{c as Ut}from"./actions-B6hLI_nf.js";import{D as Lt}from"./DeleteOutline-lLsPbsy_.js";import{g as ke}from"./get-safe-url-BjjSte_r.js";import{S as Ot}from"./switch-control-4POtc8f3.js";import{L as je}from"./list-header-CGBrwwxP.js";import"./OpenInNew-CjwanXX3.js";import"./ButtonGroup-CruDWUf6.js";import"./getValidReactChildren-3HCtT0J7.js";import"./FilterList-DBRn3RJ7.js";import"./CSSTransition-DHyzDS3S.js";import"./emotion-cache.browser.esm-KBOD-kTR.js";import"./index-98kYGR7t.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-BU0Zfzov.js";import"./index-BHMLUWGw.js";import"./TableSearch-CgxNYXXT.js";import"./Search-B3y3I7Bx.js";import"./Clear-BM1FBBZl.js";import"./MoreVert-LvQsHRvP.js";import"./useLocalStorage-BdRSQq24.js";import"./url-evaluation-DiHmEbVj.js";import"./permission-DG4nnLwd.js";import"./Switch-jMKoPPEj.js";function Mt(t){return Ge("MuiIcon",t)}Fe("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nt=t=>{const{color:s,fontSize:n,classes:o}=t,r={root:["root",s!=="inherit"&&`color${J(s)}`,`fontSize${J(n)}`]};return Ye(r,Mt,o)},_t=ee("span",{name:"MuiIcon",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.color!=="inherit"&&s[`color${J(n.color)}`],s[`fontSize${J(n.fontSize)}`]]}})(He(({theme:t})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,variants:[{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:t.typography.pxToRem(20)}},{props:{fontSize:"medium"},style:{fontSize:t.typography.pxToRem(24)}},{props:{fontSize:"large"},style:{fontSize:t.typography.pxToRem(36)}},{props:{color:"action"},style:{color:(t.vars||t).palette.action.active}},{props:{color:"disabled"},style:{color:(t.vars||t).palette.action.disabled}},{props:{color:"inherit"},style:{color:void 0}},...Object.entries(t.palette).filter(qe()).map(([s])=>({props:{color:s},style:{color:(t.vars||t).palette[s].main}}))]}))),ye=h.forwardRef(function(s,n){const o=Ke({props:s,name:"MuiIcon"}),{baseClassName:r="material-icons",className:a,color:c="inherit",component:i="span",fontSize:d="medium",...l}=o,p={...o,baseClassName:r,color:c,component:i,fontSize:d},f=Nt(p);return e.jsx(_t,{as:i,className:$e(r,"notranslate",f.root,a),ownerState:p,"aria-hidden":!0,ref:n,...l})});ye.muiName="Icon";const Wt=he(e.jsx("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"})),Gt=he(e.jsx("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"})),Ft=he(e.jsx("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}));async function Kt({blockletDid:t,nodeApi:s,spaceGateways:n}){let o=!1;const r=await Promise.all(n.map(async a=>{let{name:c}=a;const i=await Ct(a.endpoint);return!q(i)&&i!==c&&(c=i,o=!0),{...a,name:c}}));return o&&await Promise.all(r.filter(a=>a.did).map(a=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function $t({refresh:t}={}){const{blocklet:s}=L(),n=s?.meta?.did,{api:o}=A();return Ce(async()=>{if(!n)return[];const{spaceGateways:r}=await o.getBlockletSpaceGateways({input:{did:n}});return await Kt({blockletDid:n,nodeApi:o,spaceGateways:r})??[]},{refreshDeps:[n,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(V(r)))}})}function Te({deps:t,setLoading:s,backupDate:n}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:o}=L(),[r,a]=h.useState([]),{api:c}=A(),[i,d]=h.useMemo(()=>n?[E(n).startOf("day").toISOString(),E(n).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[n]),l=we(async()=>{try{if(s(!0),!o){a([]);return}const{backups:p}=await c.getBlockletBackups({input:{did:o.meta.did,startTime:i,endTime:d}});a(p??[])}catch(p){console.error(p),B.error(V(p))}finally{s(!1)}},1e3);return Be(async()=>{l()},[o?.meta?.did].concat(t)),{backups:r}}function Yt({appDid:t}){const{backups:s}=Te(),[n,o]=h.useState({message:"",progress:0,completed:!1}),r=A(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&o(()=>({...c}))},[t]),h.useEffect(()=>{if(s?.length&&Ve(s[0]?.status)){const[c]=s;o(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[s]),n}function Ht({deps:t=[],setLoading:s=()=>{}}={}){const{blocklet:n}=L(),[o,r]=h.useState([]),{api:a}=A(),c=h.useCallback(we(async()=>{if(!a||!n?.meta?.did){r([]);return}try{s(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:n.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}});r(Array.isArray(l)?l:[])}catch(i){console.error("Failed to fetch backup summary:",i),B.error(V(i)),r([])}finally{s(!1)}},1e3),[]);return Be(async()=>(await c(),()=>{c.cancel()}),[n?.meta?.did].concat(t)),{backupSummary:o}}const Re=h.createContext({}),{Provider:qt,Consumer:Ys}=Re;function ze({children:t}){const{t:s}=D(),{api:n}=A(),{blocklet:o}=L(),[r,a]=h.useState(null),[c,i]=h.useState(!1),{data:d,loading:l,mutate:p}=$t({refresh:c}),f=Qe(d),x=Yt({appDid:o?.appDid}),u=h.useMemo(()=>wt(o?.environments),[o?.environments]),[k,w]=h.useState(!1),[y,b]=h.useState(0),{backups:te}=Te({deps:[y,r],setLoading:w,backupDate:r}),[se,oe]=h.useState(0),{backupSummary:ne}=Ht({deps:[se]}),[_,M]=h.useState(d?.find(g=>g.endpoint===u)),I=o?.settings?.autoBackup,z=()=>{i(g=>!g)},ae=()=>{oe(g=>g+1)},re=()=>{b(g=>g+1)},F=async g=>{await n.updateAutoBackup({input:{did:o.meta.did,autoBackup:g}})},Q=async()=>{await n.abortBlockletBackup({input:{appPid:o.meta.did}})},ie=async(g,P)=>{try{p(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await n.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:g}}),u!==P&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:P}]}}),M(g),z(),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),p(v=>[...v].filter(W=>W.did!==g.did)),R}},ce=async g=>{g&&(g.endpoint===u&&(await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await F({enabled:!1})),await n.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:g?.did}}),p(P=>{const R=[...P];return R.splice(R.indexOf(g),1),R}),M(g),z())},le=async g=>{await Promise.all([n.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&n.configBlocklet({input:{did:[o.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),z()},C=g=>g?.endpoint===u;return e.jsx(qt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ie,deleteSpaceGateway:ce,updateSpaceGateway:le,refreshSpaceGateways:z,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:f,spaceGatewayIsSelected:C,updateAutoBackup:F,abortBlockletBackup:Q,backupEndpoint:u,backupProgress:x,backups:te,backupSummary:ne,refreshBackupSummary:ae,refreshBackups:re,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}ze.propTypes={children:m.any.isRequired};function O(){return h.useContext(Re)}function ve({...t}){const{blocklet:s}=L(),{info:n}=A(),{t:o}=D(),r=Ie({blocklet:s}),a=Xe(n),{spaceGateways:c,addSpaceGateway:i}=O(),d={checkFn:De.create({baseURL:fe(window.location.origin,Ze())}).get,webWalletUrl:a,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:n.did}},l=async({endpoint:f,name:x,did:u})=>{const k=await Bt(f);if(!await Dt(k)){B.error(o("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(b=>b.endpoint===f)){B.error(o("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:f},f)},p=async({spaceGateway:f})=>{try{await l(f)}catch(x){console.error(x),B.error(V(x))}};return e.jsx(ft,{...t,connectScope:"app",options:d,onSuccess:p})}function Vt(){const{api:t}=A(),{blocklet:s}=L(),{data:n,loading:o}=Ce(()=>t.getBlocklet({input:{did:s?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!s?.meta?.did,refreshDeps:[s?.meta?.did]});return{blocklet:n?.blocklet??null,loading:o}}function Pe({...t}){const{t:s}=h.useContext(Je),{blocklet:n,loading:o}=Vt();if(n?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?et(d):"empty"})]}),a=n.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,n.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,n.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,n.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,n.diskInfo.cache)}];return e.jsx(Qt,{component:"div",...t,children:c.map(i=>e.jsx(Rt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return o?e.jsx(U,{}):e.jsx(j,{children:s("blocklet.diskInfo.empty")})}const Qt=tt(j)``;function Ae(){const{t}=D(),{setBackupDate:s,backupSummary:n}=O(),o=xt({key:"lg"}),r=h.useRef(null),a=st(),c=h.useCallback(l=>{s(l)},[s]),i=h.useMemo(()=>{const l=E().add(1,"day"),p=l.subtract(1,"year"),f=new Map(n.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=p.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(f.get(k)||{date:k,successCount:0,errorCount:0})}return x},[n]),d=h.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:y,errorCount:b}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${y}</div>`,`<div>${t("common.failed")}: ${b}</div>`].join(`
|
|
2
2
|
`)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:X[600]},{min:-9,max:-6,color:X[500]},{min:-6,max:-3,color:X[400]},{min:-3,max:-1,color:X[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:Z[300]},{min:3,max:6,color:Z[400]},{min:6,max:9,color:Z[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:Z[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:ot[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(S,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(S,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(zt,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(S,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:o?2:5,mb:2},children:e.jsxs(G,{direction:o?"column":"row",spacing:o?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:o?"flex-start":"center"},children:[e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(G,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(S,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Xt=ee(({className:t,...s})=>e.jsx(Se,{...s,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Ue({status:t,message:s="",createdAt:n}){const{t:o}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(n,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&o("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(U,{sx:{marginRight:"4px"},size:"12px"}),o("common.progress")]}):i?e.jsx(H,{type:"success",children:o("common.succeeded")}):e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"error",children:o("common.failed")}),e.jsx(Se,{style:{display:"flex",alignItems:"center",flexShrink:0},title:s||a,children:e.jsx(ye,{children:e.jsx(vt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Ue.propTypes={status:m.string.isRequired,message:m.string,createdAt:m.string.isRequired};function Le({metadata:t={}}){const{t:s}=D();if(q(t))return e.jsx(H,{type:"success",children:s("common.succeeded")});const n=t.count||0,o=t.size||0,r=At(o,{iec:!0}),a=e.jsxs(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[s("common.fileCount"),": ",n]}),e.jsxs(j,{variant:"body2",children:[s("common.fileSize"),": ",r]})]});return e.jsxs(S,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(H,{type:"success",children:s("common.succeeded")}),e.jsx(Xt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(ye,{children:e.jsx(at,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}Le.propTypes={metadata:m.object};function Oe(){const{t,locale:s}=D(),{spaceGateways:n,backups:o,backupsLoading:r}=O(),a=h.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:p,createdAt:f}=o[i],x=p===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,u=p===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||n.find(w=>d?.includes(ge(w?.endpoint)))?.name||"Unknown DID Space";return u?e.jsx(nt,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(H,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>q(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=o?.[i]??{},{status:l,message:p,createdAt:f,metadata:x}=d,u=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(f,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!u,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!u;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(U,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(Le,{metadata:x}):e.jsx(Ue,{status:l,message:p,createdAt:f})}}}],[o,n,t]),c=h.useMemo(()=>!o?.length,[o]);return e.jsx(e.Fragment,{children:c?e.jsx(S,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(Pt,{title:"",loading:r,data:o,columns:a,emptyNode:t("storage.spaces.record.emptyData",s),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function Zt(){const{t}=D();return e.jsxs(S,{children:[e.jsxs(S,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(gt,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(ve,{})]}),e.jsxs(S,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(Ae,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Me({spaceGateway:t,onConfirm:s=()=>{},onCancel:n=()=>{}}){const{t:o}=D(),[r,a]=h.useState(!1),[c,i]=h.useState(!1),d=(f,x)=>{f?.preventDefault(),f?.stopPropagation(),a(x)},l=async f=>{try{f?.stopPropagation(),i(!0),await s?.(t),a(!1)}catch(x){console.error(x),B.error(`${o("storage.space.gateway.delete.failed")}: ${V(x)}`)}finally{a(!1),i(!1)}},p=f=>{d(f,!1),n?.(f)};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{color:"red",onClick:f=>d(f,!0),children:[e.jsx($,{style:{minWidth:24,color:"red"},children:e.jsx(Lt,{fontSize:"small"})}),e.jsx(Y,{style:{color:"red"},children:o("common.disconnect")})]}),e.jsx(rt,{title:o("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:o("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:o("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:p,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:o("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Me.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool}).isRequired,onConfirm:m.func,onCancel:m.func};function Ne({spaceGateway:t,selected:s,onDelete:n=()=>{},onConnect:o=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=O(),[d,l]=h.useState(null),{t:p}=D(),[f,x]=h.useState(!1),u=(y,b)=>{y.stopPropagation(),y.preventDefault(),l(b&&y.currentTarget)},k=async y=>{try{x(!0),u(y,!1),await o(t)}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}},w=async y=>{try{x(!0),u(y,!1),await i()}catch(b){console.error(b),B.error(b.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[f||t?.loading?e.jsx(U,{sx:{ml:1},size:"24px"}):e.jsx(it,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:y=>u(y,!0),...c,children:e.jsx(ct,{})}),e.jsxs(lt,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:y=>u(y,!1),children:[e.jsxs(K,{onClick:y=>{u(y,!1),window.open(ke(t.endpoint?Et(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Wt,{fontSize:"small"})}),e.jsx(Y,{children:p("common.open")})]}),e.jsxs(K,{onClick:y=>{u(y,!1),window.open(ke(It(t.endpoint),{allowDomains:null}))},children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Ft,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(K,{onClick:k,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Gt,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(K,{onClick:w,children:[e.jsx($,{style:{minWidth:24},children:e.jsx(Ut,{fontSize:"small"})}),e.jsx(Y,{children:p("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Me,{spaceGateway:t,onConfirm:async()=>{l(null),await n?.(t)},onCancel:()=>l(null)})]})]})}Ne.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool,endpoint:m.string.isRequired,loading:m.bool}).isRequired,selected:m.bool.isRequired,enableSwitchToSpace:m.bool,onDelete:m.func,onConnect:m.func,backupInProgress:m.bool};const Jt=ee(({className:t,...s})=>e.jsx(Se,{...s,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function _e({spaceGateway:t,spaceStatus:s,selected:n,onConnected:o=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=L(),{api:l,info:{did:p}}=A(),{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y}=Ie({blocklet:d}),{backupProgress:b,updateSpaceGateway:te,deleteSpaceGateway:se,refreshBackupSummary:oe,refreshBackups:ne}=O(),[_,M]=h.useState(!1),[I,z]=h.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{z(C=>({...C,open:!1}))}}),ae=n&&!_&&s===ue.DISCONNECTED,re=n&&!_&&!t.loading&&s===ue.CONNECTED,F=n&&_&&s===ue.CONNECTED&&b?.progress>=0,Q=async()=>{try{if(await Tt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),o?.(null,t);return}}catch(C){console.error(C),o?.(C,t);return}z(C=>({...C,open:!0,prefix:fe(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:De.create({baseURL:fe(t.url,"space")}).get,extraParams:{appDid:f,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:y,nodeDid:p,spaceDid:t.did}}))},ie=async(C,g)=>{const P=g(C.endpoint),R=ge(P),v=C.space?g(C.space):{};if(t.did&&R!==t.did){z(We=>({...We,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),o?.(new Error(W),t);return}const de={...t,name:v.name??"DID Space",did:v.did??ge(P),endpoint:P};await te(de),z(W=>({...W,open:!1})),o?.(null,de)},ce=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},le=async()=>{try{await se(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return h.useEffect(()=>{b?.completed?(n&&(b?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):b.message&&a?.(new Error(b?.message),t),b.progress=0,b.message=""),M(!1),oe(),ne()):b.progress&&M(!0)},[b]),e.jsxs(e.Fragment,{children:[e.jsxs(S,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[re&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:ce,children:c("storage.spaces.strategy.backupNow")}),ae&&e.jsx(pe,{className:"action-btn",variant:"outlined",size:"small",onClick:Q,children:c("storage.spaces.disconnected.reconnectNow")}),F&&e.jsx(Jt,{title:b?.message&&e.jsx(S,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:b.message})}),children:e.jsxs(pe,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(U,{variant:"determinate",value:b?.progress,size:14,sx:{mr:1}}),b?.progress,"%"]})}),e.jsx(dt,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ie,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ne,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:n,onDelete:le,onConnect:Q,enableSwitchToSpace:b?.completed||q(b?.message),backupInProgress:F})]})}_e.propTypes={spaceGateway:m.shape({did:m.string.isRequired,name:m.string.isRequired,url:m.string.isRequired,endpoint:m.string.isRequired,protected:m.bool,loading:m.bool}).isRequired,spaceStatus:m.string.isRequired,selected:m.bool.isRequired,onConnected:m.func,onDeleted:m.func,onBackedUp:m.func};function es({...t}){const{t:s}=D();return e.jsxs(S,{...t,children:[e.jsx(S,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("storage.spaces.backup.records")})}),e.jsx(Ae,{}),e.jsx(Oe,{})]})}function ts({...t}){const{t:s}=D(),{autoBackup:n,updateAutoBackup:o}=O(),r=async()=>{try{const a=!n?.enabled;await o({enabled:a}),B.success(s(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Ot,{checked:!!n?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function ss(){const{t}=D(),{spaceGateways:s,spaceGatewaysLoading:n,spaceGatewayIsSelected:o}=O(),r=n&&!s?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(_e,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:p=>p&&l()});return e.jsxs(S,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(S,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(ts,{}),e.jsx(ve,{})]}),e.jsx(S,{sx:{mt:2},children:r?e.jsx(S,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(U,{})}):e.jsx(be,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:s.map(c=>e.jsx(be,{size:{xs:12,md:6},children:e.jsx(ht,{endpoint:c.endpoint,selected:o(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(es,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function os(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=O();return t?e.jsx(Ee,{relative:"parent",children:e.jsx(U,{})}):q(s)?e.jsx(Zt,{}):e.jsx(ss,{})}function ns(){return e.jsx(ze,{children:e.jsx(os,{})})}function as(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:n,hasStorageEndpoint:o,loading:r,storageEndpoint:a}=yt(),c=xe(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ee,{relative:"parent",children:e.jsx(U,{})}):e.jsxs(S,{sx:{maxWidth:"md",position:"relative"},children:[o?e.jsx(bt,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(kt,{}),e.jsx(S,{sx:c,children:e.jsx(jt,{onConnect:n,storageEndpoint:a})})]})}function rs(){const{t}=D();return e.jsxs(St,{children:[e.jsxs(G,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(as,{})]})}function is({navOrientation:t="vertical",...s}){const{t:n,locale:o}=D(),{blocklet:r}=L(),a=mt({key:"md"}),[c,i]=pt(),d=c.get("tab")||"backup",l=a?"horizontal":t,p=xe(()=>{const w=[{label:n("common.backup"),value:"backup"}],y=r?.capabilities?.didSpace;return(y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||y===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:n("common.storage"),value:"storage"}),w},[o,l]),x=xe(()=>({backup:e.jsx(ns,{}),storage:e.jsx(rs,{})}))[d],u=w=>{i(y=>(w==="backup"?y.delete("tab"):y.set("tab",w),y))};if(p.length<=1)return e.jsx(me,{children:x});const k=e.jsx(ut,{tabs:p,current:d,orientation:l,onChange:u,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(S,{...s,children:e.jsxs(G,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(S,{sx:{flexShrink:0},children:e.jsx(je,{left:k})}),e.jsx(S,{sx:{flexGrow:1,minWidth:0},children:e.jsx(me,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(S,{...s,children:[e.jsx(je,{left:k}),e.jsx(me,{sx:{mt:2},children:x})]})}is.propTypes={navOrientation:m.oneOf(["vertical","horizontal"])};const me=ee(S)`
|
|
3
3
|
position: relative;
|
|
4
4
|
min-height: 66vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as xe,j as e,r as R,aV as he,cw as Xt,T as H,az as ye,o as S,m as F,be as et,b8 as Pt,N as j,P as Qe,W as Ie,eN as Et,fH as Ot,by as pi,bq as mi,br as fi,bs as hi,aO as Zt,aP as xi,$ as le,s as ce,bn as N,cq as tt,C as J,X as ks,au as gi,dk as bi,bf as Rs,bg as wi,E as me,H as M,bz as Oe,gi as vi,gj as yi,J as ji,v as V,b as Ci,a3 as Ae,t as te,U as st,a4 as ae,aS as Ke,Y as Ve,I as Is,ad as _t,bd as As,gk as Si,q as Ti,fl as ki,R as Ds,fd as Ps,bi as Es,p as Ri,D as Ii,c4 as Os,aU as Ai,V as Di,F as Pi,dH as Ei,gl as Jt,fF as Oi,gm as _i,S as zi}from"./index-CPobCYA2.js";import{H as zt,g as Li}from"./index-DJ6r2HtS.js";import{T as Mi}from"./html-title-FdukYTkz.js";import{u as X}from"./team-ejN4nnN3.js";import{u as Ni}from"./use-mobile-BSN4bEuW.js";import{v as ze}from"./index-VK5O0-Jy.js";import{w as ge,P as _s}from"./permission-BthIDENf.js";import{C as Fi,a as Bi}from"./Google-D6kQ3L4a.js";import{u as Hi}from"./blocklet-Cmt2sJrg.js";import{A as Lt}from"./Add-CyNDL_k-.js";import{y as Mt}from"./index-mwTV4nae.js";import{e as at}from"./edit.svg-Duh18hDj.js";import{M as zs}from"./TableSearch-Cq2ZjGX2.js";import{L as Ls}from"./list-header-BCf9pfpu.js";import{g as Ui}from"./chain-DBWSeogE.js";import{T as Ms,a as We}from"./ToggleButtonGroup-BhST-iqI.js";const qi=xe(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),Qt=xe(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),Ns=xe(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),dt=xe(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),$i=xe(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),Wi=xe(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),Vi=xe(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),ut=xe(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),nt=t=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},R.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));var Gi="2.0.3",Rt=500,es="user-agent",De="",ts="?",it="function",fe="undefined",Pe="object",It="string",q="browser",ie="cpu",ee="device",Z="engine",K="os",ke="result",w="name",f="type",b="vendor",y="version",$="architecture",Ge="major",g="model",qe="console",D="mobile",E="tablet",z="smarttv",Q="wearable",pt="xr",$e="embedded",Le="inapp",Nt="brands",ve="formFactors",Ft="fullVersionList",Re="platform",Bt="platformVersion",lt="bitness",be="sec-ch-ua",Yi=be+"-full-version-list",Ki=be+"-arch",Xi=be+"-"+lt,Zi=be+"-form-factors",Ji=be+"-"+D,Qi=be+"-"+g,Fs=be+"-"+Re,er=Fs+"-version",Bs=[Nt,Ft,D,g,Re,Bt,$,ve,lt],Xe="Amazon",Se="Apple",ss="ASUS",is="BlackBerry",we="Google",rs="Huawei",os="Lenovo",as="Honor",Ze="LG",mt="Microsoft",ft="Motorola",ht="Nvidia",ns="OnePlus",xt="OPPO",Me="Samsung",ls="Sharp",Ne="Sony",gt="Xiaomi",bt="Zebra",cs="Chrome",ds="Chromium",de="Chromecast",tr="Edge",Fe="Firefox",Be="Opera",wt="Facebook",us="Sogou",Te="Mobile ",He=" Browser",At="Windows",sr=typeof window!==fe,W=sr&&window.navigator?window.navigator:void 0,ue=W&&W.userAgentData?W.userAgentData:void 0,ir=function(t,s){var i={},u=s;if(!rt(s)){u={};for(var n in s)for(var p in s[n])u[p]=s[n][p].concat(u[p]?u[p]:[])}for(var m in t)i[m]=u[m]&&u[m].length%2===0?u[m].concat(t[m]):t[m];return i},ct=function(t){for(var s={},i=0;i<t.length;i++)s[t[i].toUpperCase()]=t[i];return s},Dt=function(t,s){if(typeof t===Pe&&t.length>0){for(var i in t)if(re(t[i])==re(s))return!0;return!1}return _e(t)?re(s).indexOf(re(t))!==-1:!1},rt=function(t,s){for(var i in t)return/^(browser|cpu|device|engine|os)$/.test(i)||(s?rt(t[i]):!1)},_e=function(t){return typeof t===It},vt=function(t){if(t){for(var s=[],i=Ee(/\\?\"/g,t).split(","),u=0;u<i.length;u++)if(i[u].indexOf(";")>-1){var n=Ye(i[u]).split(";v=");s[u]={brand:n[0],version:n[1]}}else s[u]=Ye(i[u]);return s}},re=function(t){return _e(t)?t.toLowerCase():t},yt=function(t){return _e(t)?Ee(/[^\d\.]/g,t).split(".")[0]:void 0},oe=function(t){for(var s in t){var i=t[s];typeof i==Pe&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},Ee=function(t,s){return _e(s)?s.replace(t,De):s},Ue=function(t){return Ee(/\\?\"/g,t)},Ye=function(t,s){if(_e(t))return t=Ee(/^\s\s*/,t),typeof s===fe?t:t.substring(0,Rt)},jt=function(t,s){if(!(!t||!s))for(var i=0,u,n,p,m,o,d;i<s.length&&!o;){var r=s[i],l=s[i+1];for(u=n=0;u<r.length&&!o&&r[u];)if(o=r[u++].exec(t),o)for(p=0;p<l.length;p++)d=o[++n],m=l[p],typeof m===Pe&&m.length>0?m.length===2?typeof m[1]==it?this[m[0]]=m[1].call(this,d):this[m[0]]=m[1]:m.length===3?typeof m[1]===it&&!(m[1].exec&&m[1].test)?this[m[0]]=d?m[1].call(this,d,m[2]):void 0:this[m[0]]=d?d.replace(m[1],m[2]):void 0:m.length===4&&(this[m[0]]=d?m[3].call(this,d.replace(m[1],m[2])):void 0):this[m]=d||void 0;i+=2}},pe=function(t,s){for(var i in s)if(typeof s[i]===Pe&&s[i].length>0){for(var u=0;u<s[i].length;u++)if(Dt(s[i][u],t))return i===ts?void 0:i}else if(Dt(s[i],t))return i===ts?void 0:i;return s.hasOwnProperty("*")?s["*"]:t},ps={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ms={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},fs={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[w,Te+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,y],[/opios[\/ ]+([\w\.]+)/i],[y,[w,Be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[w,Be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[w,Be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[w,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[w,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[w,"Smart "+os+He]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure"+He],y],[/\bfocus\/([\w\.]+)/i],[y,[w,Fe+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[w,Be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[w,Be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[y,[w,Te+Fe]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],y],[/samsungbrowser\/([\w\.]+)/i],[y,[w,Me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[w,us+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,us+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,y],[/(lbbrowser|rekonq)/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,wt],y,[f,Le]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,y,[f,Le]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[w,"GSA"],[f,Le]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[w,"TikTok"],[f,Le]],[/\[(linkedin)app\]/i],[w,[f,Le]],[/(chromium)[\/ ]([-\w\.]+)/i],[w,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[w,cs+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,cs+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[w,"Android"+He]],[/chrome\/([\w\.]+) mobile/i],[y,[w,Te+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[w,Te+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[w,Te+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[w,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[w,Te+Fe],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[w,Fe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[y,/[^\d\.]+./,De]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[$,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[$,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[$,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[$,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[$,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[$,/ower/,De,re]],[/ sun4\w[;\)]/i],[[$,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[$,re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Me],[f,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Me],[f,D]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Se],[f,D]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Se],[f,E]],[/(macintosh);/i],[g,[b,Se]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,ls],[f,D]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,as],[f,E]],[/honor([-\w ]+)[;\)]/i],[g,[b,as],[f,D]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,rs],[f,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,rs],[f,D]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,gt],[f,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,gt],[f,D]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,xt],[f,D]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,pe,{OnePlus:["304","403","203"],"*":xt}],[f,E]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[f,D]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[f,D]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[f,D]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,ft],[f,D]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,ft],[f,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,Ze],[f,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,Ze],[f,D]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,os],[f,E]],[/(nokia) (t[12][01])/i],[b,g,[f,E]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[f,D],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,we],[f,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,we],[f,D]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Ne],[f,D]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Ne],[f,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ns],[f,D]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,Xe],[f,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,Xe],[f,D]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[f,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,is],[f,D]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,ss],[f,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,ss],[f,D]],[/(nexus 9)/i],[g,[b,"HTC"],[f,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[f,D]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,E]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,D]],[/(itel) ((\w+))/i],[[b,re],g,[f,pe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[f,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[f,D]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[f,D]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[f,D]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[f,D]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[f,D]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[f,D]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[f,E]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[f,D]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[f,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[f,D]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[f,E]],[/(surface duo)/i],[g,[b,mt],[f,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[f,D]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,ht],[f,E]],[/(sprint) (\w+)/i],[b,g,[f,D]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,mt],[f,D]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,bt],[f,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,bt],[f,D]],[/smart-tv.+(samsung)/i],[b,[f,z]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Me],[f,z]],[/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[f,z]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Ze],[f,z]],[/(apple) ?tv/i],[b,[g,Se+" TV"],[f,z]],[/crkey.*devicetype\/chromecast/i],[[g,de+" Third Generation"],[b,we],[f,z]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,we],[f,z]],[/fuchsia.*crkey/i],[[g,de+" Nest Hub"],[b,we],[f,z]],[/crkey/i],[[g,de],[b,we],[f,z]],[/(portaltv)/i],[g,[b,wt],[f,z]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,Xe],[f,z]],[/(shield \w+ tv)/i],[g,[b,ht],[f,z]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,ls],[f,z]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Ne],[f,z]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,gt],[f,z]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[f,z]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Ye],[g,Ye],[f,z]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[f,z]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,z]],[/(ouya)/i,/(nintendo) (\w+)/i],[b,g,[f,qe]],[/droid.+; (shield)( bui|\))/i],[g,[b,ht],[f,qe]],[/(playstation \w+)/i],[g,[b,Ne],[f,qe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,mt],[f,qe]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Me],[f,Q]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[f,Q]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,xt],[f,Q]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Se],[f,Q]],[/(opwwe\d{3})/i],[g,[b,ns],[f,Q]],[/(moto 360)/i],[g,[b,ft],[f,Q]],[/(smartwatch 3)/i],[g,[b,Ne],[f,Q]],[/(g watch r)/i],[g,[b,Ze],[f,Q]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,bt],[f,Q]],[/droid.+; (glass) \d/i],[g,[b,we],[f,pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[f,pt]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,wt],[f,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[f,$e]],[/(aeobc)\b/i],[g,[b,Xe],[f,$e]],[/(homepod).+mac os/i],[g,[b,Se],[f,$e]],[/windows iot/i],[[f,$e]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[f,pe,{mobile:"Mobile",xr:"VR","*":E}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,D]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[w,tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,y],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[y,pe,ps]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,pe,ps],[w,At]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[w,de+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[w,de+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[w,de+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[w,de+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[w,de]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[w,y],[/\(bb(10);/i],[y,[w,is]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[w,Fe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[w,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,y],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,y]]},Je=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return oe.call(t.init,[[q,[w,y,Ge,f]],[ie,[$]],[ee,[f,g,b]],[Z,[w,y]],[K,[w,y]]]),oe.call(t.isIgnore,[[q,[y,Ge]],[Z,[y]],[K,[y]]]),oe.call(t.isIgnoreRgx,[[q,/ ?browser$/i],[K,/ ?os$/i]]),oe.call(t.toString,[[q,[w,y]],[ie,[$]],[ee,[b,g]],[Z,[w,y]],[K,[w,y]]]),t}(),rr=function(t,s){var i=Je.init[s],u=Je.isIgnore[s]||0,n=Je.isIgnoreRgx[s]||0,p=Je.toString[s]||0;function m(){oe.call(this,i)}return m.prototype.getItem=function(){return t},m.prototype.withClientHints=function(){return ue?ue.getHighEntropyValues(Bs).then(function(o){return t.setCH(new Hs(o,!1)).parseCH().get()}):t.parseCH().get()},m.prototype.withFeatureCheck=function(){return t.detectFeature().get()},s!=ke&&(m.prototype.is=function(o){var d=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Dt(u,r)&&re(n?Ee(n,this[r]):this[r])==re(n?Ee(n,o):o)){if(d=!0,o!=fe)break}else if(o==fe&&d){d=!d;break}return d},m.prototype.toString=function(){var o=De;for(var d in p)typeof this[p[d]]!==fe&&(o+=(o?" ":De)+this[p[d]]);return o||fe}),ue||(m.prototype.then=function(o){var d=this,r=function(){for(var a in d)d.hasOwnProperty(a)&&(this[a]=d[a])};r.prototype={is:m.prototype.is,toString:m.prototype.toString};var l=new r;return o(l),l}),new m};function Hs(t,s){if(t=t||{},oe.call(this,Bs),s)oe.call(this,[[Nt,vt(t[be])],[Ft,vt(t[Yi])],[D,/\?1/.test(t[Ji])],[g,Ue(t[Qi])],[Re,Ue(t[Fs])],[Bt,Ue(t[er])],[$,Ue(t[Ki])],[ve,vt(t[Zi])],[lt,Ue(t[Xi])]]);else for(var i in t)this.hasOwnProperty(i)&&typeof t[i]!==fe&&(this[i]=t[i])}function hs(t,s,i,u){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,p){return this.data[n]=p,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(W&&W.userAgent==this.ua)switch(this.itemType){case q:W.brave&&typeof W.brave.isBrave==it&&this.set(w,"Brave");break;case ee:!this.get(f)&&ue&&ue[D]&&this.set(f,D),this.get(g)=="Macintosh"&&W&&typeof W.standalone!==fe&&W.maxTouchPoints&&W.maxTouchPoints>2&&this.set(g,"iPad").set(f,E);break;case K:!this.get(w)&&ue&&ue[Re]&&this.set(w,ue[Re]);break;case ke:var n=this.data,p=function(m){return n[m].getItem().detectFeature().get()};this.set(q,p(q)).set(ie,p(ie)).set(ee,p(ee)).set(Z,p(Z)).set(K,p(K))}return this},this.parseUA=function(){return this.itemType!=ke&&jt.call(this.data,this.ua,this.rgxMap),this.itemType==q&&this.set(Ge,yt(this.get(y))),this},this.parseCH=function(){var n=this.uaCH,p=this.rgxMap;switch(this.itemType){case q:case Z:var m=n[Ft]||n[Nt],o;if(m)for(var d in m){var r=m[d].brand||m[d],l=m[d].version;this.itemType==q&&!/not.a.brand/i.test(r)&&(!o||/chrom/i.test(o)&&r!=ds)&&(r=pe(r,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(w,r).set(y,l).set(Ge,yt(l)),o=r),this.itemType==Z&&r==ds&&this.set(y,l)}break;case ie:var a=n[$];a&&(a&&n[lt]=="64"&&(a+="64"),jt.call(this.data,a+";",p));break;case ee:if(n[D]&&this.set(f,D),n[g]&&(this.set(g,n[g]),!this.get(f)||!this.get(b))){var c={};jt.call(c,"droid 9; "+n[g]+")",p),!this.get(f)&&c.type&&this.set(f,c.type),!this.get(b)&&c.vendor&&this.set(b,c.vendor)}if(n[ve]){var h;if(typeof n[ve]!="string")for(var C=0;!h&&C<n[ve].length;)h=pe(n[ve][C++],ms);else h=pe(n[ve],ms);this.set(f,h)}break;case K:var v=n[Re];if(v){var x=n[Bt];v==At&&(x=parseInt(yt(x),10)>=13?"11":"10"),this.set(w,v).set(y,x)}this.get(w)==At&&n[g]=="Xbox"&&this.set(w,"Xbox").set(y,void 0);break;case ke:var T=this.data,I=function(P){return T[P].getItem().setCH(n).parseCH().get()};this.set(q,I(q)).set(ie,I(ie)).set(ee,I(ee)).set(Z,I(Z)).set(K,I(K))}return this},oe.call(this,[["itemType",t],["ua",s],["uaCH",u],["rgxMap",i],["data",rr(this,t)]]),this}function ne(t,s,i){if(typeof t===Pe?(rt(t,!0)?(typeof s===Pe&&(i=s),s=t):(i=t,s=void 0),t=void 0):typeof t===It&&!rt(s,!0)&&(i=s,s=void 0),i&&typeof i.append===it){var u={};i.forEach(function(d,r){u[r]=d}),i=u}if(!(this instanceof ne))return new ne(t,s,i).getResult();var n=typeof t===It?t:i&&i[es]?i[es]:W&&W.userAgent?W.userAgent:De,p=new Hs(i,!0),m=s?ir(fs,s):fs,o=function(d){return d==ke?function(){return new hs(d,n,m,p).set("ua",n).set(q,this.getBrowser()).set(ie,this.getCPU()).set(ee,this.getDevice()).set(Z,this.getEngine()).set(K,this.getOS()).get()}:function(){return new hs(d,n,m[d],p).parseUA().get()}};return oe.call(this,[["getBrowser",o(q)],["getCPU",o(ie)],["getDevice",o(ee)],["getEngine",o(Z)],["getOS",o(K)],["getResult",o(ke)],["getUA",function(){return n}],["setUA",function(d){return _e(d)&&(n=d.length>Rt?Ye(d,Rt):d),this}]]).setUA(n),this}ne.VERSION=Gi;ne.BROWSER=ct([w,y,Ge,f]);ne.CPU=ct([$]);ne.DEVICE=ct([g,b,f,qe,D,z,E,Q,$e]);ne.ENGINE=ne.OS=ct([w,y]);function or(t){return!t||typeof t!="string"?"break-all":t.includes(" ")?"break-word":"break-all"}function Us({logo:t="",name:s="",description:i="",size:u=40,variant:n="rounded",sx:p={},className:m="",logoName:o="",tooltip:d=null}){const r={width:u,height:u,...p},l=typeof s=="string"?s:t,a=e.jsxs(he,{direction:"row",spacing:1,className:`info-card-wrapper ${m}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[t?e.jsx(Xt,{src:t,alt:o??l,variant:n,sx:r}):e.jsx(Xt,{variant:n,sx:r,children:l?.slice(0,1)}),e.jsxs(he,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:or(s),minWidth:{xs:100,sm:140}},children:[e.jsx(H,{variant:"body1",component:"div",sx:{color:"text.primary"},children:s}),i&&e.jsx(H,{variant:"subtitle1",sx:{color:"text.secondary"},children:i})]})]});return d?e.jsx(ye,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:a}):a}Us.propTypes={logo:S.string,name:S.oneOfType([S.string,S.node]).isRequired,description:S.oneOfType([S.string,S.node]),size:S.oneOfType([S.number,S.string]),variant:S.oneOf(["square","rounded","circular"]),sx:S.object,className:S.string,logoName:S.string,tooltip:S.oneOfType([S.string,S.node])};function ar(t){try{if(!t.trim())return{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}};const i=new ne(t).getResult();let u="";const n=t.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(n){const d=n.split("/");d.length>1&&Zt.coerce(d[1])&&(u=Zt.coerce(d[1]).version)}const p=(()=>{const{type:d="",model:r=""}=i.device;return d==="mobile"?{icon:e.jsx(Wi,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(Vi,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx($i,{fontSize:"small"}),text:r||"Desktop"}})(),m=(()=>{const{name:d="",version:r=""}=i.os;return d.toLowerCase().includes("mac")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(qi,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(dt,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),o=(()=>{const{name:d="",version:r=""}=i.browser;return{icon:e.jsx(ut,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:p,os:m,browser:o,...u?{walletVersion:{icon:null,text:u}}:{}}}catch(s){return console.error("Error parsing user agent:",s),{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}}}}function qs({ua:t}){const s=ar(t);return e.jsx(he,{spacing:1,children:Object.entries(s).map(([i,{icon:u,text:n}])=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:u}),e.jsx(H,{variant:"body2",sx:{display:"flex"},children:n})]},i))})}qs.propTypes={ua:S.string.isRequired};const $s=()=>{const{t}=F(),s={$all:t("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:s,formatRoleName:u=>{const n=(u||"").toLowerCase();return n.startsWith("$")?s[n]||n.slice(1):s[n]||n}}},nr=(t,s=!1)=>{const i=s?1:.6;switch(t){case"owner":return`rgba(232, 222, 255, ${i})`;case"admin":return`rgba(227, 242, 253, ${i})`;case"member":return`rgba(232, 245, 233, ${i})`;case"guest":return`rgba(245, 245, 245, ${i})`;default:return`rgba(245, 245, 245, ${i})`}},lr=Pt(Et)(({role:t})=>({backgroundColor:nr(t.toLowerCase()),color:"#000000"})),cr=t=>{switch(t){case"valid":return s=>s.palette.success.light;case"expired":return s=>s.palette.text.disabled;case"revoked":return s=>s.palette.error.light;default:return s=>s.palette.warning.light}},dr=Pt(Et)(({theme:t,status:s})=>({backgroundColor:cr(s)(t),color:"#FFFFFF"}));function Ws({did:t}){return e.jsx(Ie,{size:14,responsive:!1,compact:!0,copyable:!1,did:t})}Ws.propTypes={did:S.string.isRequired};function Vs({timestamp:t,locale:s}){return e.jsx(j,{sx:{minWidth:"100px"},children:e.jsx(Qe,{value:t,locale:s})})}Vs.propTypes={timestamp:S.number.isRequired,locale:S.string.isRequired};function Gs({name:t="",role:s}){const{formatRoleName:i}=$s();return e.jsx(lr,{label:i(t||s),size:"small",role:t||s,sx:{borderRadius:1}})}Gs.propTypes={role:S.string.isRequired,name:S.string};function Ys({status:t}){const{t:s}=F();return e.jsx(dr,{label:s(`team.passport.statusMap.${t}`),size:"small",status:t,sx:{borderRadius:1}})}Ys.propTypes={status:S.string.isRequired};function Ks({source:t}){const{t:s}=F();return t?s(`team.passport.sourceMaps.${t}`):"-"}Ks.propTypes={source:S.string.isRequired};function Xs({user:t,size:s="default",tooltip:i=!1,inService:u=!1}){const{teamDid:n}=X(),p=et.useMemo(()=>Ot(t.avatar,n,u),[t.avatar,n,u]),m=et.useMemo(()=>e.jsx(Ie,{did:t?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[t?.did]),o=pi(()=>({...t,avatar:p}),[t,p]);return s==="small"?e.jsx(Us,{variant:"circular",logo:p,name:e.jsx(H,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:t.fullName||t.email}),...s==="small"?{tooltip:i?e.jsx(Ie,{did:t?.did}):!1,size:24}:{description:m,size:36}}):e.jsx(mi,{user:o,avatarSize:s==="small"?24:36,cardType:hi.Detailed,infoType:fi.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}Xs.propTypes={user:S.object.isRequired,size:S.string,tooltip:S.bool,inService:S.bool};const ur=et.memo(Xs),pr=t=>e.jsx(Ws,{did:t}),Ht=(t,s)=>e.jsx(Gs,{name:t,role:s}),Ut=t=>e.jsx(Ys,{status:t}),Zs=(t,s)=>e.jsx(Vs,{timestamp:t,locale:s}),ot=t=>e.jsx(Ks,{source:t}),qt=(t,s=!1)=>e.jsx(ur,{user:t,inService:s}),mr=t=>e.jsx(qs,{ua:t}),xs="info";function Js({createPassportSvg:t,passport:s,onCancel:i,onSwitchPassport:u=()=>{}}){const{t:n}=F(),p=xi({tab:xs}),m={info:{label:n("common.basicInfo"),value:xs,component:()=>e.jsx(Qs,{passport:s,createPassportSvg:t})},logs:{label:n("common.logs"),value:"logs",component:()=>e.jsx(si,{passport:s})},related:{label:n("team.passport.related"),value:"related",component:()=>e.jsx(ii,{passport:s,onSwitchPassport:u})}},o=Object.values(m).map(({label:l,value:a})=>({label:l,value:a})).filter(l=>l.value==="related"?s.parentDid:!0),d=m[p.tab]||m.info,r=l=>{p.tab=l};return e.jsx(le,{title:n("common.passport"),onClose:i,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(fr,{children:[e.jsx(j,{className:"tabs",children:e.jsx(Mi,{tabs:o,current:p.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(j,{className:"body",children:e.jsx(d.component,{})})]})})}Js.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const fr=ce(j)`
|
|
1
|
+
import{aG as xe,j as e,r as R,aV as he,cw as Xt,T as H,az as ye,o as S,m as F,be as et,b8 as Pt,N as j,P as Qe,W as Ie,eN as Et,fH as Ot,by as pi,bq as mi,br as fi,bs as hi,aO as Zt,aP as xi,$ as le,s as ce,bn as N,cq as tt,C as J,X as ks,au as gi,dk as bi,bf as Rs,bg as wi,E as me,H as M,bz as Oe,gi as vi,gj as yi,J as ji,v as V,b as Ci,a3 as Ae,t as te,U as st,a4 as ae,aS as Ke,Y as Ve,I as Is,ad as _t,bd as As,gk as Si,q as Ti,fl as ki,R as Ds,fd as Ps,bi as Es,p as Ri,D as Ii,c4 as Os,aU as Ai,V as Di,F as Pi,dH as Ei,gl as Jt,fF as Oi,gm as _i,S as zi}from"./index-CZOJtrkJ.js";import{H as zt,g as Li}from"./index-Vc1ekAsE.js";import{T as Mi}from"./html-title-BISVxbaC.js";import{u as X}from"./team-n2xFz2t1.js";import{u as Ni}from"./use-mobile-CsTrq8vs.js";import{v as ze}from"./index-QXgvuFbn.js";import{w as ge,P as _s}from"./permission-DG4nnLwd.js";import{C as Fi,a as Bi}from"./Google-Ch0Lcmyw.js";import{u as Hi}from"./blocklet-kdF0d0Qp.js";import{A as Lt}from"./Add-B4h6-Y3a.js";import{y as Mt}from"./index-BHMLUWGw.js";import{e as at}from"./edit.svg-DHEgt4T5.js";import{M as zs}from"./TableSearch-CgxNYXXT.js";import{L as Ls}from"./list-header-CGBrwwxP.js";import{g as Ui}from"./chain-B5MJhwl_.js";import{T as Ms,a as We}from"./ToggleButtonGroup-B7LsHyld.js";const qi=xe(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),Qt=xe(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),Ns=xe(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),dt=xe(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),$i=xe(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),Wi=xe(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),Vi=xe(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),ut=xe(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),nt=t=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},R.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));var Gi="2.0.3",Rt=500,es="user-agent",De="",ts="?",it="function",fe="undefined",Pe="object",It="string",q="browser",ie="cpu",ee="device",Z="engine",K="os",ke="result",w="name",f="type",b="vendor",y="version",$="architecture",Ge="major",g="model",qe="console",D="mobile",E="tablet",z="smarttv",Q="wearable",pt="xr",$e="embedded",Le="inapp",Nt="brands",ve="formFactors",Ft="fullVersionList",Re="platform",Bt="platformVersion",lt="bitness",be="sec-ch-ua",Yi=be+"-full-version-list",Ki=be+"-arch",Xi=be+"-"+lt,Zi=be+"-form-factors",Ji=be+"-"+D,Qi=be+"-"+g,Fs=be+"-"+Re,er=Fs+"-version",Bs=[Nt,Ft,D,g,Re,Bt,$,ve,lt],Xe="Amazon",Se="Apple",ss="ASUS",is="BlackBerry",we="Google",rs="Huawei",os="Lenovo",as="Honor",Ze="LG",mt="Microsoft",ft="Motorola",ht="Nvidia",ns="OnePlus",xt="OPPO",Me="Samsung",ls="Sharp",Ne="Sony",gt="Xiaomi",bt="Zebra",cs="Chrome",ds="Chromium",de="Chromecast",tr="Edge",Fe="Firefox",Be="Opera",wt="Facebook",us="Sogou",Te="Mobile ",He=" Browser",At="Windows",sr=typeof window!==fe,W=sr&&window.navigator?window.navigator:void 0,ue=W&&W.userAgentData?W.userAgentData:void 0,ir=function(t,s){var i={},u=s;if(!rt(s)){u={};for(var n in s)for(var p in s[n])u[p]=s[n][p].concat(u[p]?u[p]:[])}for(var m in t)i[m]=u[m]&&u[m].length%2===0?u[m].concat(t[m]):t[m];return i},ct=function(t){for(var s={},i=0;i<t.length;i++)s[t[i].toUpperCase()]=t[i];return s},Dt=function(t,s){if(typeof t===Pe&&t.length>0){for(var i in t)if(re(t[i])==re(s))return!0;return!1}return _e(t)?re(s).indexOf(re(t))!==-1:!1},rt=function(t,s){for(var i in t)return/^(browser|cpu|device|engine|os)$/.test(i)||(s?rt(t[i]):!1)},_e=function(t){return typeof t===It},vt=function(t){if(t){for(var s=[],i=Ee(/\\?\"/g,t).split(","),u=0;u<i.length;u++)if(i[u].indexOf(";")>-1){var n=Ye(i[u]).split(";v=");s[u]={brand:n[0],version:n[1]}}else s[u]=Ye(i[u]);return s}},re=function(t){return _e(t)?t.toLowerCase():t},yt=function(t){return _e(t)?Ee(/[^\d\.]/g,t).split(".")[0]:void 0},oe=function(t){for(var s in t){var i=t[s];typeof i==Pe&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},Ee=function(t,s){return _e(s)?s.replace(t,De):s},Ue=function(t){return Ee(/\\?\"/g,t)},Ye=function(t,s){if(_e(t))return t=Ee(/^\s\s*/,t),typeof s===fe?t:t.substring(0,Rt)},jt=function(t,s){if(!(!t||!s))for(var i=0,u,n,p,m,o,d;i<s.length&&!o;){var r=s[i],l=s[i+1];for(u=n=0;u<r.length&&!o&&r[u];)if(o=r[u++].exec(t),o)for(p=0;p<l.length;p++)d=o[++n],m=l[p],typeof m===Pe&&m.length>0?m.length===2?typeof m[1]==it?this[m[0]]=m[1].call(this,d):this[m[0]]=m[1]:m.length===3?typeof m[1]===it&&!(m[1].exec&&m[1].test)?this[m[0]]=d?m[1].call(this,d,m[2]):void 0:this[m[0]]=d?d.replace(m[1],m[2]):void 0:m.length===4&&(this[m[0]]=d?m[3].call(this,d.replace(m[1],m[2])):void 0):this[m]=d||void 0;i+=2}},pe=function(t,s){for(var i in s)if(typeof s[i]===Pe&&s[i].length>0){for(var u=0;u<s[i].length;u++)if(Dt(s[i][u],t))return i===ts?void 0:i}else if(Dt(s[i],t))return i===ts?void 0:i;return s.hasOwnProperty("*")?s["*"]:t},ps={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ms={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},fs={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[w,Te+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,y],[/opios[\/ ]+([\w\.]+)/i],[y,[w,Be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[w,Be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[w,Be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[w,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[w,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[w,"Smart "+os+He]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure"+He],y],[/\bfocus\/([\w\.]+)/i],[y,[w,Fe+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[w,Be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[w,Be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[y,[w,Te+Fe]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],y],[/samsungbrowser\/([\w\.]+)/i],[y,[w,Me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[w,us+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,us+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,y],[/(lbbrowser|rekonq)/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,wt],y,[f,Le]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,y,[f,Le]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[w,"GSA"],[f,Le]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[w,"TikTok"],[f,Le]],[/\[(linkedin)app\]/i],[w,[f,Le]],[/(chromium)[\/ ]([-\w\.]+)/i],[w,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[w,cs+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,cs+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[w,"Android"+He]],[/chrome\/([\w\.]+) mobile/i],[y,[w,Te+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[w,Te+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[w,Te+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[w,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[w,Te+Fe],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[w,Fe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[y,/[^\d\.]+./,De]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[$,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[$,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[$,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[$,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[$,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[$,/ower/,De,re]],[/ sun4\w[;\)]/i],[[$,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[$,re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Me],[f,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Me],[f,D]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Se],[f,D]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Se],[f,E]],[/(macintosh);/i],[g,[b,Se]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,ls],[f,D]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,as],[f,E]],[/honor([-\w ]+)[;\)]/i],[g,[b,as],[f,D]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,rs],[f,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,rs],[f,D]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,gt],[f,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,gt],[f,D]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,xt],[f,D]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,pe,{OnePlus:["304","403","203"],"*":xt}],[f,E]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[f,D]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[f,D]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[f,D]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,ft],[f,D]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,ft],[f,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,Ze],[f,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,Ze],[f,D]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,os],[f,E]],[/(nokia) (t[12][01])/i],[b,g,[f,E]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[f,D],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,we],[f,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,we],[f,D]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Ne],[f,D]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Ne],[f,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ns],[f,D]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,Xe],[f,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,Xe],[f,D]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[f,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,is],[f,D]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,ss],[f,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,ss],[f,D]],[/(nexus 9)/i],[g,[b,"HTC"],[f,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[f,D]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,E]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,D]],[/(itel) ((\w+))/i],[[b,re],g,[f,pe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[f,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[f,D]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[f,D]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[f,D]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[f,D]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[f,D]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[f,D]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[f,E]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[f,D]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[f,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[f,D]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[f,E]],[/(surface duo)/i],[g,[b,mt],[f,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[f,D]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,ht],[f,E]],[/(sprint) (\w+)/i],[b,g,[f,D]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,mt],[f,D]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,bt],[f,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,bt],[f,D]],[/smart-tv.+(samsung)/i],[b,[f,z]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Me],[f,z]],[/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[f,z]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Ze],[f,z]],[/(apple) ?tv/i],[b,[g,Se+" TV"],[f,z]],[/crkey.*devicetype\/chromecast/i],[[g,de+" Third Generation"],[b,we],[f,z]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,we],[f,z]],[/fuchsia.*crkey/i],[[g,de+" Nest Hub"],[b,we],[f,z]],[/crkey/i],[[g,de],[b,we],[f,z]],[/(portaltv)/i],[g,[b,wt],[f,z]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,Xe],[f,z]],[/(shield \w+ tv)/i],[g,[b,ht],[f,z]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,ls],[f,z]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Ne],[f,z]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,gt],[f,z]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[f,z]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Ye],[g,Ye],[f,z]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[f,z]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,z]],[/(ouya)/i,/(nintendo) (\w+)/i],[b,g,[f,qe]],[/droid.+; (shield)( bui|\))/i],[g,[b,ht],[f,qe]],[/(playstation \w+)/i],[g,[b,Ne],[f,qe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,mt],[f,qe]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Me],[f,Q]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[f,Q]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,xt],[f,Q]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Se],[f,Q]],[/(opwwe\d{3})/i],[g,[b,ns],[f,Q]],[/(moto 360)/i],[g,[b,ft],[f,Q]],[/(smartwatch 3)/i],[g,[b,Ne],[f,Q]],[/(g watch r)/i],[g,[b,Ze],[f,Q]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,bt],[f,Q]],[/droid.+; (glass) \d/i],[g,[b,we],[f,pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[f,pt]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,wt],[f,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[f,$e]],[/(aeobc)\b/i],[g,[b,Xe],[f,$e]],[/(homepod).+mac os/i],[g,[b,Se],[f,$e]],[/windows iot/i],[[f,$e]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[f,pe,{mobile:"Mobile",xr:"VR","*":E}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,D]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[w,tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,y],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[y,pe,ps]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,pe,ps],[w,At]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[w,de+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[w,de+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[w,de+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[w,de+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[w,de]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[w,y],[/\(bb(10);/i],[y,[w,is]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[w,Fe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[w,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,y],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,y]]},Je=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return oe.call(t.init,[[q,[w,y,Ge,f]],[ie,[$]],[ee,[f,g,b]],[Z,[w,y]],[K,[w,y]]]),oe.call(t.isIgnore,[[q,[y,Ge]],[Z,[y]],[K,[y]]]),oe.call(t.isIgnoreRgx,[[q,/ ?browser$/i],[K,/ ?os$/i]]),oe.call(t.toString,[[q,[w,y]],[ie,[$]],[ee,[b,g]],[Z,[w,y]],[K,[w,y]]]),t}(),rr=function(t,s){var i=Je.init[s],u=Je.isIgnore[s]||0,n=Je.isIgnoreRgx[s]||0,p=Je.toString[s]||0;function m(){oe.call(this,i)}return m.prototype.getItem=function(){return t},m.prototype.withClientHints=function(){return ue?ue.getHighEntropyValues(Bs).then(function(o){return t.setCH(new Hs(o,!1)).parseCH().get()}):t.parseCH().get()},m.prototype.withFeatureCheck=function(){return t.detectFeature().get()},s!=ke&&(m.prototype.is=function(o){var d=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Dt(u,r)&&re(n?Ee(n,this[r]):this[r])==re(n?Ee(n,o):o)){if(d=!0,o!=fe)break}else if(o==fe&&d){d=!d;break}return d},m.prototype.toString=function(){var o=De;for(var d in p)typeof this[p[d]]!==fe&&(o+=(o?" ":De)+this[p[d]]);return o||fe}),ue||(m.prototype.then=function(o){var d=this,r=function(){for(var a in d)d.hasOwnProperty(a)&&(this[a]=d[a])};r.prototype={is:m.prototype.is,toString:m.prototype.toString};var l=new r;return o(l),l}),new m};function Hs(t,s){if(t=t||{},oe.call(this,Bs),s)oe.call(this,[[Nt,vt(t[be])],[Ft,vt(t[Yi])],[D,/\?1/.test(t[Ji])],[g,Ue(t[Qi])],[Re,Ue(t[Fs])],[Bt,Ue(t[er])],[$,Ue(t[Ki])],[ve,vt(t[Zi])],[lt,Ue(t[Xi])]]);else for(var i in t)this.hasOwnProperty(i)&&typeof t[i]!==fe&&(this[i]=t[i])}function hs(t,s,i,u){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,p){return this.data[n]=p,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(W&&W.userAgent==this.ua)switch(this.itemType){case q:W.brave&&typeof W.brave.isBrave==it&&this.set(w,"Brave");break;case ee:!this.get(f)&&ue&&ue[D]&&this.set(f,D),this.get(g)=="Macintosh"&&W&&typeof W.standalone!==fe&&W.maxTouchPoints&&W.maxTouchPoints>2&&this.set(g,"iPad").set(f,E);break;case K:!this.get(w)&&ue&&ue[Re]&&this.set(w,ue[Re]);break;case ke:var n=this.data,p=function(m){return n[m].getItem().detectFeature().get()};this.set(q,p(q)).set(ie,p(ie)).set(ee,p(ee)).set(Z,p(Z)).set(K,p(K))}return this},this.parseUA=function(){return this.itemType!=ke&&jt.call(this.data,this.ua,this.rgxMap),this.itemType==q&&this.set(Ge,yt(this.get(y))),this},this.parseCH=function(){var n=this.uaCH,p=this.rgxMap;switch(this.itemType){case q:case Z:var m=n[Ft]||n[Nt],o;if(m)for(var d in m){var r=m[d].brand||m[d],l=m[d].version;this.itemType==q&&!/not.a.brand/i.test(r)&&(!o||/chrom/i.test(o)&&r!=ds)&&(r=pe(r,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(w,r).set(y,l).set(Ge,yt(l)),o=r),this.itemType==Z&&r==ds&&this.set(y,l)}break;case ie:var a=n[$];a&&(a&&n[lt]=="64"&&(a+="64"),jt.call(this.data,a+";",p));break;case ee:if(n[D]&&this.set(f,D),n[g]&&(this.set(g,n[g]),!this.get(f)||!this.get(b))){var c={};jt.call(c,"droid 9; "+n[g]+")",p),!this.get(f)&&c.type&&this.set(f,c.type),!this.get(b)&&c.vendor&&this.set(b,c.vendor)}if(n[ve]){var h;if(typeof n[ve]!="string")for(var C=0;!h&&C<n[ve].length;)h=pe(n[ve][C++],ms);else h=pe(n[ve],ms);this.set(f,h)}break;case K:var v=n[Re];if(v){var x=n[Bt];v==At&&(x=parseInt(yt(x),10)>=13?"11":"10"),this.set(w,v).set(y,x)}this.get(w)==At&&n[g]=="Xbox"&&this.set(w,"Xbox").set(y,void 0);break;case ke:var T=this.data,I=function(P){return T[P].getItem().setCH(n).parseCH().get()};this.set(q,I(q)).set(ie,I(ie)).set(ee,I(ee)).set(Z,I(Z)).set(K,I(K))}return this},oe.call(this,[["itemType",t],["ua",s],["uaCH",u],["rgxMap",i],["data",rr(this,t)]]),this}function ne(t,s,i){if(typeof t===Pe?(rt(t,!0)?(typeof s===Pe&&(i=s),s=t):(i=t,s=void 0),t=void 0):typeof t===It&&!rt(s,!0)&&(i=s,s=void 0),i&&typeof i.append===it){var u={};i.forEach(function(d,r){u[r]=d}),i=u}if(!(this instanceof ne))return new ne(t,s,i).getResult();var n=typeof t===It?t:i&&i[es]?i[es]:W&&W.userAgent?W.userAgent:De,p=new Hs(i,!0),m=s?ir(fs,s):fs,o=function(d){return d==ke?function(){return new hs(d,n,m,p).set("ua",n).set(q,this.getBrowser()).set(ie,this.getCPU()).set(ee,this.getDevice()).set(Z,this.getEngine()).set(K,this.getOS()).get()}:function(){return new hs(d,n,m[d],p).parseUA().get()}};return oe.call(this,[["getBrowser",o(q)],["getCPU",o(ie)],["getDevice",o(ee)],["getEngine",o(Z)],["getOS",o(K)],["getResult",o(ke)],["getUA",function(){return n}],["setUA",function(d){return _e(d)&&(n=d.length>Rt?Ye(d,Rt):d),this}]]).setUA(n),this}ne.VERSION=Gi;ne.BROWSER=ct([w,y,Ge,f]);ne.CPU=ct([$]);ne.DEVICE=ct([g,b,f,qe,D,z,E,Q,$e]);ne.ENGINE=ne.OS=ct([w,y]);function or(t){return!t||typeof t!="string"?"break-all":t.includes(" ")?"break-word":"break-all"}function Us({logo:t="",name:s="",description:i="",size:u=40,variant:n="rounded",sx:p={},className:m="",logoName:o="",tooltip:d=null}){const r={width:u,height:u,...p},l=typeof s=="string"?s:t,a=e.jsxs(he,{direction:"row",spacing:1,className:`info-card-wrapper ${m}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[t?e.jsx(Xt,{src:t,alt:o??l,variant:n,sx:r}):e.jsx(Xt,{variant:n,sx:r,children:l?.slice(0,1)}),e.jsxs(he,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:or(s),minWidth:{xs:100,sm:140}},children:[e.jsx(H,{variant:"body1",component:"div",sx:{color:"text.primary"},children:s}),i&&e.jsx(H,{variant:"subtitle1",sx:{color:"text.secondary"},children:i})]})]});return d?e.jsx(ye,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:a}):a}Us.propTypes={logo:S.string,name:S.oneOfType([S.string,S.node]).isRequired,description:S.oneOfType([S.string,S.node]),size:S.oneOfType([S.number,S.string]),variant:S.oneOf(["square","rounded","circular"]),sx:S.object,className:S.string,logoName:S.string,tooltip:S.oneOfType([S.string,S.node])};function ar(t){try{if(!t.trim())return{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}};const i=new ne(t).getResult();let u="";const n=t.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(n){const d=n.split("/");d.length>1&&Zt.coerce(d[1])&&(u=Zt.coerce(d[1]).version)}const p=(()=>{const{type:d="",model:r=""}=i.device;return d==="mobile"?{icon:e.jsx(Wi,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(Vi,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx($i,{fontSize:"small"}),text:r||"Desktop"}})(),m=(()=>{const{name:d="",version:r=""}=i.os;return d.toLowerCase().includes("mac")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(qi,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(dt,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),o=(()=>{const{name:d="",version:r=""}=i.browser;return{icon:e.jsx(ut,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:p,os:m,browser:o,...u?{walletVersion:{icon:null,text:u}}:{}}}catch(s){return console.error("Error parsing user agent:",s),{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}}}}function qs({ua:t}){const s=ar(t);return e.jsx(he,{spacing:1,children:Object.entries(s).map(([i,{icon:u,text:n}])=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:u}),e.jsx(H,{variant:"body2",sx:{display:"flex"},children:n})]},i))})}qs.propTypes={ua:S.string.isRequired};const $s=()=>{const{t}=F(),s={$all:t("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:s,formatRoleName:u=>{const n=(u||"").toLowerCase();return n.startsWith("$")?s[n]||n.slice(1):s[n]||n}}},nr=(t,s=!1)=>{const i=s?1:.6;switch(t){case"owner":return`rgba(232, 222, 255, ${i})`;case"admin":return`rgba(227, 242, 253, ${i})`;case"member":return`rgba(232, 245, 233, ${i})`;case"guest":return`rgba(245, 245, 245, ${i})`;default:return`rgba(245, 245, 245, ${i})`}},lr=Pt(Et)(({role:t})=>({backgroundColor:nr(t.toLowerCase()),color:"#000000"})),cr=t=>{switch(t){case"valid":return s=>s.palette.success.light;case"expired":return s=>s.palette.text.disabled;case"revoked":return s=>s.palette.error.light;default:return s=>s.palette.warning.light}},dr=Pt(Et)(({theme:t,status:s})=>({backgroundColor:cr(s)(t),color:"#FFFFFF"}));function Ws({did:t}){return e.jsx(Ie,{size:14,responsive:!1,compact:!0,copyable:!1,did:t})}Ws.propTypes={did:S.string.isRequired};function Vs({timestamp:t,locale:s}){return e.jsx(j,{sx:{minWidth:"100px"},children:e.jsx(Qe,{value:t,locale:s})})}Vs.propTypes={timestamp:S.number.isRequired,locale:S.string.isRequired};function Gs({name:t="",role:s}){const{formatRoleName:i}=$s();return e.jsx(lr,{label:i(t||s),size:"small",role:t||s,sx:{borderRadius:1}})}Gs.propTypes={role:S.string.isRequired,name:S.string};function Ys({status:t}){const{t:s}=F();return e.jsx(dr,{label:s(`team.passport.statusMap.${t}`),size:"small",status:t,sx:{borderRadius:1}})}Ys.propTypes={status:S.string.isRequired};function Ks({source:t}){const{t:s}=F();return t?s(`team.passport.sourceMaps.${t}`):"-"}Ks.propTypes={source:S.string.isRequired};function Xs({user:t,size:s="default",tooltip:i=!1,inService:u=!1}){const{teamDid:n}=X(),p=et.useMemo(()=>Ot(t.avatar,n,u),[t.avatar,n,u]),m=et.useMemo(()=>e.jsx(Ie,{did:t?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[t?.did]),o=pi(()=>({...t,avatar:p}),[t,p]);return s==="small"?e.jsx(Us,{variant:"circular",logo:p,name:e.jsx(H,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:t.fullName||t.email}),...s==="small"?{tooltip:i?e.jsx(Ie,{did:t?.did}):!1,size:24}:{description:m,size:36}}):e.jsx(mi,{user:o,avatarSize:s==="small"?24:36,cardType:hi.Detailed,infoType:fi.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}Xs.propTypes={user:S.object.isRequired,size:S.string,tooltip:S.bool,inService:S.bool};const ur=et.memo(Xs),pr=t=>e.jsx(Ws,{did:t}),Ht=(t,s)=>e.jsx(Gs,{name:t,role:s}),Ut=t=>e.jsx(Ys,{status:t}),Zs=(t,s)=>e.jsx(Vs,{timestamp:t,locale:s}),ot=t=>e.jsx(Ks,{source:t}),qt=(t,s=!1)=>e.jsx(ur,{user:t,inService:s}),mr=t=>e.jsx(qs,{ua:t}),xs="info";function Js({createPassportSvg:t,passport:s,onCancel:i,onSwitchPassport:u=()=>{}}){const{t:n}=F(),p=xi({tab:xs}),m={info:{label:n("common.basicInfo"),value:xs,component:()=>e.jsx(Qs,{passport:s,createPassportSvg:t})},logs:{label:n("common.logs"),value:"logs",component:()=>e.jsx(si,{passport:s})},related:{label:n("team.passport.related"),value:"related",component:()=>e.jsx(ii,{passport:s,onSwitchPassport:u})}},o=Object.values(m).map(({label:l,value:a})=>({label:l,value:a})).filter(l=>l.value==="related"?s.parentDid:!0),d=m[p.tab]||m.info,r=l=>{p.tab=l};return e.jsx(le,{title:n("common.passport"),onClose:i,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(fr,{children:[e.jsx(j,{className:"tabs",children:e.jsx(Mi,{tabs:o,current:p.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(j,{className:"body",children:e.jsx(d.component,{})})]})})}Js.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const fr=ce(j)`
|
|
2
2
|
margin-top: -16px;
|
|
3
3
|
|
|
4
4
|
.tabs {
|