@abtnode/blocklet-services 1.16.26-beta-351de484 → 1.16.26-beta-cca12425
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/dist/assets/{Add-C69qn2wR.js → Add-B1KQFZbB.js} +1 -1
- package/dist/assets/{AddBox-B6Fwg2Rf.js → AddBox-C_rCPKut.js} +1 -1
- package/dist/assets/{Alert-ssp0y7Ib.js → Alert-D7OuAtqq.js} +1 -1
- package/dist/assets/{ArrowDropDown-BP0ud9Hj.js → ArrowDropDown-DDSSUsgw.js} +1 -1
- package/dist/assets/{Avatar-D2tnGRpU.js → Avatar-BKvod5qm.js} +1 -1
- package/dist/assets/{ButtonGroup-BLLuxmvy.js → ButtonGroup-B93e6tqm.js} +1 -1
- package/dist/assets/{CheckCircle-BfaSnFeT.js → CheckCircle-DgHejmJm.js} +1 -1
- package/dist/assets/{ChevronRight-Cy-7I5by.js → ChevronRight-KVhjO69S.js} +1 -1
- package/dist/assets/{CloseOutlined-sn7xb1bx.js → CloseOutlined-BdzvaiT0.js} +1 -1
- package/dist/assets/{Delete-B2AHSgLp.js → Delete-Cmb6a-TW.js} +1 -1
- package/dist/assets/{DeleteOutline-CoZFf1fL.js → DeleteOutline-C_JPQWoC.js} +1 -1
- package/dist/assets/{Done-DIK-gyz7.js → Done-Cqcgj3XK.js} +1 -1
- package/dist/assets/{Download-DTMBVNgK.js → Download-DYDCm5jq.js} +1 -1
- package/dist/assets/{Edit-6i4-SV5e.js → Edit-JQ58DRtF.js} +1 -1
- package/dist/assets/{EditIcon-DR2M6B2a.js → EditIcon-BuHKvSX-.js} +1 -1
- package/dist/assets/{Error-D5jNQIhZ.js → Error-bprXV3Qz.js} +1 -1
- package/dist/assets/{ExpandMore-BlRkbxIp.js → ExpandMore-CMOFmrRl.js} +1 -1
- package/dist/assets/{FilterList-5-9UBP9o.js → FilterList-MfdHX_OT.js} +1 -1
- package/dist/assets/{FormControl-DqRtQrj4.js → FormControl-BrDVvV0w.js} +1 -1
- package/dist/assets/{FormControlLabel-CgWEo7K_.js → FormControlLabel-Bj1raPoa.js} +1 -1
- package/dist/assets/{FormGroup-BmQQZp_5.js → FormGroup-CTmu8GWz.js} +1 -1
- package/dist/assets/{Google-Dqg-7vso.js → Google-B8EaETJY.js} +1 -1
- package/dist/assets/{Grid-BIu6B9VD.js → Grid-BtGjPvuC.js} +1 -1
- package/dist/assets/{Hidden-CyJIFPqO.js → Hidden-DWKJv_Ts.js} +1 -1
- package/dist/assets/{InfoOutlined-BrDpDVIb.js → InfoOutlined-BItr8vqq.js} +1 -1
- package/dist/assets/{InputAdornment-4xRIAUiI.js → InputAdornment-CGuzdfXX.js} +1 -1
- package/dist/assets/{InputLabel-Ci8Zez4U.js → InputLabel-DA3u5GP-.js} +1 -1
- package/dist/assets/{LastPage-u0X1CCrf.js → LastPage-DzK9EKF-.js} +1 -1
- package/dist/assets/{Launch-CPOdFkdd.js → Launch-p5mGEt8g.js} +1 -1
- package/dist/assets/{LaunchOutlined-BFmhp0eE.js → LaunchOutlined-BiGPJuP-.js} +1 -1
- package/dist/assets/{Link-3QVwMQPk.js → Link-C1R9I8T5.js} +1 -1
- package/dist/assets/{ListItemText-BbCA9KKV.js → ListItemText-9kG4LhTP.js} +1 -1
- package/dist/assets/{LockIcon-BH8DxlZk.js → LockIcon-BYVTkf1W.js} +1 -1
- package/dist/assets/{Loop-DH87MBn_.js → Loop-DoUT9kIB.js} +1 -1
- package/dist/assets/{MoreHoriz-BgseW-ge.js → MoreHoriz-B921hlWY.js} +1 -1
- package/dist/assets/{MoreVert-K_1niM7c.js → MoreVert-C4XqRKE4.js} +1 -1
- package/dist/assets/{OpenInNew-CjFvxH6M.js → OpenInNew-DjHvMAdQ.js} +1 -1
- package/dist/assets/{Pagination-DKihrHVe.js → Pagination-BlJxwbJW.js} +1 -1
- package/dist/assets/{PlayArrow-DOP79lp-.js → PlayArrow-D4vxqsKR.js} +1 -1
- package/dist/assets/{RadioGroup-YSjZvhX-.js → RadioGroup-DFQHgpUl.js} +1 -1
- package/dist/assets/{Search-BR5ea3vd.js → Search-BuZJTzDq.js} +1 -1
- package/dist/assets/{Select-CKfMC7P9.js → Select-0rvptrXH.js} +1 -1
- package/dist/assets/{ServerLogo-C8axw3cY.js → ServerLogo-BS1tW7SN.js} +1 -1
- package/dist/assets/{Skeleton-DlvCFRkz.js → Skeleton-BQyN-0sJ.js} +1 -1
- package/dist/assets/{Slider-BR3lL8ok.js → Slider-DaMMponj.js} +1 -1
- package/dist/assets/{Stepper-CQAZ_wrh.js → Stepper-ASzJY9Wh.js} +1 -1
- package/dist/assets/{TableRow-G_vHt3-a.js → TableRow-DQB9jM8W.js} +1 -1
- package/dist/assets/{TextField-DvirKXAG.js → TextField-BHg3uTSC.js} +1 -1
- package/dist/assets/{Toolbar-BwsW1-XD.js → Toolbar-C3gbqZgN.js} +1 -1
- package/dist/assets/{ViewList-DRQAW-9s.js → ViewList-D9nsZOsI.js} +1 -1
- package/dist/assets/{access-control-CjZfkzkf.js → access-control-CZnhbObg.js} +1 -1
- package/dist/assets/{actions-BJosy9X2.js → actions-CFxlQnVb.js} +1 -1
- package/dist/assets/{add-component-core-Bd75KmSE.js → add-component-core-CUisTrXt.js} +1 -1
- package/dist/assets/add-resource-Cg68DwqT.js +1 -0
- package/dist/assets/{addon-BdxxNkJH.js → addon-htB6vNOx.js} +1 -1
- package/dist/assets/{analytics-2367oE4k.js → analytics-D0Q9Rbgs.js} +1 -1
- package/dist/assets/api-DZcbXOwe.js +1 -0
- package/dist/assets/{audit-logs-C9bazLVN.js → audit-logs-DsHwARYT.js} +1 -1
- package/dist/assets/{button-DbDB2qx6.js → button-CtcdFik9.js} +1 -1
- package/dist/assets/{click-to-copy-CZvSRIGN.js → click-to-copy-DJVlTNr8.js} +1 -1
- package/dist/assets/{complete-C8SMtDzc.js → complete-CGMY06_W.js} +1 -1
- package/dist/assets/{component-DAWLQ6nL.js → component-C8WremgG.js} +1 -1
- package/dist/assets/{config-DpteWrvn.js → config-J8uHydLG.js} +1 -1
- package/dist/assets/{config-DY1CerHN.js → config-ggazJABW.js} +1 -1
- package/dist/assets/{config-navigation-DUYmMrZ9.js → config-navigation-COwAaVq0.js} +1 -1
- package/dist/assets/{config-space-B7Cgf5Se.js → config-space-CPyb_eZ-.js} +1 -1
- package/dist/assets/{confirm-pPzim8uI.js → confirm-BjHkE8rM.js} +1 -1
- package/dist/assets/{connect-M2gGxpP6.js → connect-BbzlMR5b.js} +1 -1
- package/dist/assets/{connect-4dSo0Eiu.js → connect-BuLrPUuZ.js} +1 -1
- package/dist/assets/{connect-to-B8kCNKHN.js → connect-to-BQINcy1q.js} +1 -1
- package/dist/assets/{content-layout-6_5eggY7.js → content-layout-af8Tk37j.js} +1 -1
- package/dist/assets/{dashboard-nWvY-y5T.js → dashboard-CMs2secm.js} +3 -3
- package/dist/assets/{did-address-CL3Ygw6p.js → did-address-BTH0hYaF.js} +1 -1
- package/dist/assets/{domain-ngITiwlU.js → domain-CMHk_z2Z.js} +1 -1
- package/dist/assets/{domain-list-D3SCkX5b.js → domain-list-DFffhAi2.js} +1 -1
- package/dist/assets/{exchange-passport-D3hdhtRp.js → exchange-passport-CQ4sTk73.js} +1 -1
- package/dist/assets/{fallback-C7-7MBkn.js → fallback-BCzfpkx_.js} +1 -1
- package/dist/assets/{fuel-Cc2B50AI.js → fuel-DAtablaD.js} +1 -1
- package/dist/assets/{fullpage-Dw6TVBrW.js → fullpage-DY6OHAG0.js} +1 -1
- package/dist/assets/{home-xAHytUWc.js → home-BfnWYBKb.js} +1 -1
- package/dist/assets/{iframe-CjfFUNKJ.js → iframe-Cet_1xjB.js} +1 -1
- package/dist/assets/{index-q83gH7uv.js → index-6HBsHgLl.js} +1 -1
- package/dist/assets/{index-CS4hdKgN.js → index-A5YVryx_.js} +1 -1
- package/dist/assets/{index-C2bRXXcw.js → index-BXCKXS5j.js} +1 -1
- package/dist/assets/{index-MHeXbht_.js → index-BqsMd8kb.js} +221 -221
- package/dist/assets/{index-D9bkjrIm.js → index-Bt4rb2Bc.js} +1 -1
- package/dist/assets/{index-BXDXNTsu.js → index-BxJWfUoy.js} +2 -2
- package/dist/assets/{index-DNO8iFFj.js → index-ByPqHR4r.js} +1 -1
- package/dist/assets/{index-56o2iokr.js → index-C5WzGzSj.js} +1 -1
- package/dist/assets/{index-Coe2L95f.js → index-C9d9WjZ0.js} +1 -1
- package/dist/assets/{index-C7FkvChp.js → index-CHX9AKKy.js} +3 -3
- package/dist/assets/{index-CYMsHjcv.js → index-CKhzUQzq.js} +1 -1
- package/dist/assets/{index-CJpqNyVi.js → index-CZ9EO740.js} +3 -3
- package/dist/assets/{index-5x037-9C.js → index-CgXB8tNh.js} +1 -1
- package/dist/assets/{index-DSr4gSZ6.js → index-Cn1zzQRb.js} +1 -1
- package/dist/assets/{index-Bqkn_aa3.js → index-CnV_HSYC.js} +1 -1
- package/dist/assets/{index-i3hx5_MJ.js → index-D0TsVpOv.js} +1 -1
- package/dist/assets/{index-8MsvtmQl.js → index-DG2_Yw8Q.js} +1 -1
- package/dist/assets/{index-C5wALap9.js → index-DJI8p4CV.js} +1 -1
- package/dist/assets/{index-BWj9cvWK.js → index-DJvJ2Tmc.js} +1 -1
- package/dist/assets/{index-DoFezns_.js → index-DMPZsfun.js} +1 -1
- package/dist/assets/{index-Dwkydwe_.js → index-Dbqss1Fe.js} +1 -1
- package/dist/assets/{index-DlPsSbdP.js → index-DcHRVIKm.js} +1 -1
- package/dist/assets/{index-BmYpFvRB.js → index-DtNxMhKO.js} +1 -1
- package/dist/assets/{index-iaLkEwzP.js → index-DthjsZ09.js} +1 -1
- package/dist/assets/{index-uI5ivd9H.js → index-Dylzk7Aa.js} +1 -1
- package/dist/assets/{index-pr0coJZh.js → index-LSzcGKHj.js} +1 -1
- package/dist/assets/{index-lps3yS0-.js → index-NdCq_QfL.js} +1 -1
- package/dist/assets/{index-BlQH_bza.js → index-e7NHyY1q.js} +1 -1
- package/dist/assets/{index-CYChkNo6.js → index-o-Ihmjeu.js} +1 -1
- package/dist/assets/{index-BpozpbRW.js → index-zxzrHJEP.js} +1 -1
- package/dist/assets/{index.es-BbZKY7XB.js → index.es-BEaw1DFj.js} +1 -1
- package/dist/assets/index.esm-C9zb95qH.js +1 -0
- package/dist/assets/info-outline-rounded-BTpTFmEK.js +57 -0
- package/dist/assets/{invitation-MLAwJ9Ra.js → invitation-3r-X891j.js} +1 -1
- package/dist/assets/{invite-DkO9FeY_.js → invite-CrWjnaC0.js} +1 -1
- package/dist/assets/{issue-passport-C7JZcRZR.js → issue-passport-CCGBLWf8.js} +1 -1
- package/dist/assets/{item-MF9V1-6K.js → item-BNHxZM2p.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-rVwFJx4d.js → jss-plugin-props-sort.esm-CjzdPk2L.js} +1 -1
- package/dist/assets/{launch-result-message-DEcCutu3.js → launch-result-message-D2CQfmUY.js} +1 -1
- package/dist/assets/{layout-DOFQutAQ.js → layout--pblhAfc.js} +1 -1
- package/dist/assets/{list-header-F6N0Lbga.js → list-header-Br5YHewG.js} +1 -1
- package/dist/assets/localization-BwDw74Zq.js +1 -0
- package/dist/assets/{log-_MCoFO-Q.js → log-BJjAfVl8.js} +1 -1
- package/dist/assets/{login-g24bmOOt.js → login-BQQD6meW.js} +1 -1
- package/dist/assets/{login-oauth-callback-IIluZQpi.js → login-oauth-callback-Dmleuitf.js} +1 -1
- package/dist/assets/{logo-uploader-j0OGjkoc.js → logo-uploader-eDNDJkbn.js} +3 -3
- package/dist/assets/{lost-passport-CFNDhKO4.js → lost-passport-BWTuZR78.js} +3 -3
- package/dist/assets/{lottie-sLx_MIFH.js → lottie-VJFQ68oA.js} +1 -1
- package/dist/assets/{notifications-BdAvASdZ.js → notifications-DwecRDR9.js} +1 -1
- package/dist/assets/{overview-Buny86cT.js → overview-BMcMnUtN.js} +1 -1
- package/dist/assets/{page-header-iStgNt-t.js → page-header-EqcdM7n1.js} +1 -1
- package/dist/assets/{permission-DFHjiPOO.js → permission-D9TNO0kT.js} +1 -1
- package/dist/assets/{preferences-CBDwdPlD.js → preferences-CN9EJ9NX.js} +1 -1
- package/dist/assets/publish-resource-D7WXvm6u.js +1 -0
- package/dist/assets/{react-4Vr75H9n.js → react-DP2ngoHF.js} +8 -8
- package/dist/assets/{redux-BwEqkH3a.js → redux-BpyOm6pS.js} +1 -1
- package/dist/assets/{selector-haOpsVEc.js → selector-Dpt9nBq7.js} +1 -1
- package/dist/assets/session-DESbRLD5.js +1 -0
- package/dist/assets/{setup-DMBqOQvQ.js → setup-DFybTsc-.js} +3 -3
- package/dist/assets/{slicedToArray-x22-0sXq.js → slicedToArray-SBrU6gJV.js} +1 -1
- package/dist/assets/{spaces-fv1YlSu4.js → spaces-DNtrZi8N.js} +1 -1
- package/dist/assets/{start-CmsOWeku.js → start-CgH7B6u8.js} +1 -1
- package/dist/assets/{step-actions-AXZRiRyD.js → step-actions-BNn2aM9R.js} +1 -1
- package/dist/assets/{studio-DmUAxFbb.js → studio-8gthozLh.js} +1 -1
- package/dist/assets/{switch-control-Lx0DlzPA.js → switch-control-DO3LxG2v.js} +1 -1
- package/dist/assets/{toUpper-BgobQRvN.js → toUpper-C0A9jQTp.js} +1 -1
- package/dist/assets/{transfer-WMTLv9DH.js → transfer-Blq_vH7z.js} +1 -1
- package/dist/assets/{uniqBy-BnjBhJxf.js → uniqBy-DN9WBw_C.js} +1 -1
- package/dist/assets/{unsubscribe-BFzCxIJM.js → unsubscribe-CkiFEJUY.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CIjBkljS.js → use-blocklet-info-for-connect-did-spaces-Car-GPAS.js} +1 -1
- package/dist/assets/{useAsync-ByTahkQO.js → useAsync-D0lrbkdE.js} +1 -1
- package/dist/assets/{useFormControl-CeAUerJZ.js → useFormControl-b_gcFCyO.js} +1 -1
- package/dist/assets/{useLocalStorage-B_i310mR.js → useLocalStorage-Cvbq9kSP.js} +1 -1
- package/dist/assets/{useSetState-BB4kdpGs.js → useSetState-p_ztAK1J.js} +1 -1
- package/dist/assets/{useSlot-CsiuTStm.js → useSlot-MeMXV443.js} +1 -1
- package/dist/assets/{user-center-sGvXEgY6.js → user-center-B0jK0JhV.js} +1 -1
- package/dist/assets/{user-sessions-BBUW9BFw.js → user-sessions-gd1hKrWX.js} +1 -1
- package/dist/assets/{util-DeMILzW3.js → util-BkBoAuZA.js} +1 -1
- package/dist/assets/{wrap-locale-CeRDb2BZ.js → wrap-locale-BONrbXck.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +25 -25
- package/dist/assets/add-resource-Blgo6VIb.js +0 -1
- package/dist/assets/api-DcYvzDkD.js +0 -1
- package/dist/assets/index.esm-Bx08zGob.js +0 -1
- package/dist/assets/info-outline-rounded-Bfjx6SIO.js +0 -57
- package/dist/assets/localization-BSGMGQL8.js +0 -1
- package/dist/assets/publish-resource-B8njhGLx.js +0 -1
- package/dist/assets/session-BxfJegkk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as z,h as v,f as w,bp as ge,j as o,B as g,A as me,bA as G,T as I,bl as we,K as m,bB as A,bC as ye,D as ke,aA as W,bD as L,bE as Ce,bF as be,bG as ce,bH as Q,c as Pe,bI as Se,bJ as Ie,M as J,S as oe,b5 as pe,bK as Ae,bL as Be,N as Z,bM as xe,b4 as Re,$ as te,o as $,r as V,bN as je,bO as ne,bP as ze,a as ue,bQ as P,bR as Le,bS as Te,bT as Ue,bU as De,n as Fe,m as Ee,bf as Me,bV as _e,bW as Oe,bq as We,bX as $e,bY as He,bZ as Ne,i as Ge,bz as Ve,H as qe}from"./index-MHeXbht_.js";import{H as Qe,F as Ke}from"./index-Dwkydwe_.js";import{f as Xe,g as Je}from"./index-BpozpbRW.js";import{S as Ye,t as T,a as Ze,b as eo,M as oo,C as to,P as no,c as ro,E as ao,D as io,A as so,d as H,I as lo,L as co,e as po,f as xo}from"./info-outline-rounded-Bfjx6SIO.js";import{T as ve}from"./index-56o2iokr.js";import{E as K}from"./index-DlPsSbdP.js";import{E as uo}from"./fallback-C7-7MBkn.js";import{g as fo,w as ho}from"./index-D-XBJ_hS.js";import{u as go}from"./uniqBy-BnjBhJxf.js";import{S as X}from"./index-Coe2L95f.js";import{i as mo}from"./index-BWj9cvWK.js";import{S as bo}from"./Select-CKfMC7P9.js";import{T as jo}from"./TextField-DvirKXAG.js";import{M as vo}from"./InputAdornment-4xRIAUiI.js";import{A as wo}from"./Alert-ssp0y7Ib.js";import{S as yo}from"./FormControlLabel-CgWEo7K_.js";import{U as ko}from"./user-sessions-BBUW9BFw.js";import{L as Co}from"./MoreVert-K_1niM7c.js";import"./index-C2bRXXcw.js";import"./index-BlQH_bza.js";import"./Toolbar-BwsW1-XD.js";import"./Hidden-CyJIFPqO.js";import"./MoreHoriz-BgseW-ge.js";import"./ExpandMore-BlRkbxIp.js";import"./Avatar-D2tnGRpU.js";import"./useSlot-CsiuTStm.js";import"./selector-haOpsVEc.js";import"./OpenInNew-CjFvxH6M.js";import"./CloseOutlined-sn7xb1bx.js";import"./FormControl-DqRtQrj4.js";import"./useFormControl-CeAUerJZ.js";import"./InputLabel-Ci8Zez4U.js";import"./FilterList-5-9UBP9o.js";import"./TableRow-G_vHt3-a.js";import"./Grid-BIu6B9VD.js";import"./FormGroup-BmQQZp_5.js";import"./ListItemText-BbCA9KKV.js";import"./LastPage-u0X1CCrf.js";import"./index-DNO8iFFj.js";import"./redux-BwEqkH3a.js";import"./Search-BR5ea3vd.js";import"./Delete-B2AHSgLp.js";function fe({user:e,isMyself:a=!0,showFullDid:u=!0,switchPassport:x,switchProfile:d,openSettings:s,...h}){const{locale:i}=z(),c=v((j,t={})=>L(T,j,i,"en",t)),n=w(()=>{var j;return(j=(e==null?void 0:e.passports)||[])==null?void 0:j.find(t=>t.name===e.role)},[e==null?void 0:e.passports,e==null?void 0:e.role]),l=ge().breakpoints.down("md");return e?o.jsxs(g,{...h,sx:{position:"relative",...h.sx},children:[o.jsx(me,{src:e==null?void 0:e.avatar,did:e==null?void 0:e.did,size:l?64:80,variant:"circle",shape:"circle",sx:{borderRadius:"100%",backgroundColor:"#fff",position:"relative",overflow:"hidden",mb:1.5,...a?{cursor:"pointer","&:hover":{"&::after":{content:`"${c("switchProfile")}"`}},"&::after":{color:"white",position:"absolute",fontSize:"12px",bottom:0,left:0,right:0,height:"50%",backgroundColor:"rgba(0, 0, 0, 0.3)",display:"flex",justifyContent:"center",alignItems:"center"}}:{}},onClick:a?d:G}),o.jsxs(I,{variant:"h6",sx:{fontWeight:"bold",display:"flex",alignItems:"center",gap:1,fontSize:"24px !important"},children:[e==null?void 0:e.fullName,a?o.jsx(we,{label:(n==null?void 0:n.title)||(e==null?void 0:e.role)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:m.textBase,borderColor:m.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:active":{boxShadow:"none"}},clickable:!0,deleteIcon:o.jsx(A,{icon:ye,color:m.textBase}),onDelete:x,onClick:x}):null]}),o.jsx(ke,{did:e.did,showQrcode:!0,copyable:!0,compact:!u,responsive:!u,locale:i}),a?o.jsx(W,{sx:{borderRadius:2,color:m.textBase,backgroundColor:"white",border:`1px solid ${m.strokeBorderBase}`,position:"absolute",top:0,right:0},disableFocusRipple:!0,onClick:s,children:o.jsx(A,{icon:Ye})}):null]}):null}function Po({data:e,...a}){return o.jsxs(g,{...a,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",...a.sx},children:[o.jsxs(I,{sx:{display:"flex",alignItems:"center",color:m.textBase,fontSize:"14px",gap:1,fontWeight:500},children:[e.icon,e.title]}),o.jsx(I,{sx:{color:m.textSubtitle,whiteSpace:"pre-wrap",fontSize:"14px"},children:e.content})]})}function So({user:e,...a}){const{locale:u}=z(),x=v((h,i={})=>L(T,h,u,"en",i)),d=w(()=>(e==null?void 0:e.sourceProvider)&&Ce[e.sourceProvider]||x("unknown"),[e==null?void 0:e.sourceProvider]),s=[];return s.push({icon:o.jsx(A,{fontSize:16,icon:be}),title:x("email"),content:(e==null?void 0:e.email)||x("emptyField")}),s.push({icon:o.jsx(A,{fontSize:16,icon:Ze}),title:x("lastLoginAt"),content:e!=null&&e.lastLoginAt?o.jsx(ce,{locale:u,value:e==null?void 0:e.lastLoginAt,relativeRange:3*86400*1e3}):x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:eo}),title:x("lastLoginIp"),content:(e==null?void 0:e.lastLoginIp)||x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:oo}),title:x("createdAt"),content:e!=null&&e.createdAt?o.jsx(ce,{locale:u,value:e==null?void 0:e.createdAt}):x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:to}),title:x("registerFrom"),content:d}),o.jsx(g,{...a,sx:{display:"flex",flexDirection:"column",gap:1.5,...a==null?void 0:a.sx},children:s.map(h=>o.jsx(Po,{data:h,sx:{flex:1}},h.title))})}const Io=(e,a)=>{let u;return e==="default"?u=Q.DEFAULT_COLORS["app-passport"]:e==="auto"?u=Q.getNftBGColorFromDid(a):u=Q.getNftBGColor(e),u},Ao=({issuer:e="",title:a="",issuerDid:u="",issuerAvatarUrl:x="",ownerDid:d="",ownerName:s="",ownerAvatarUrl:h="",preferredColor:i="default",revoked:c=!1,isDataUrl:n=!1,width:p="100%",height:l="100%"})=>{const j=Io(i,u),t=Q.getSvg({width:p,height:l,tag:c?"revoked":"",tagVariant:c?"error":"info",color:j,did:d,variant:"app-passport",verifiable:!0,issuer:{name:e,icon:x},header:{name:a,icon:h},extra:{key:"Exp",value:"2123-01-01"}});return n?`data:image/svg+xml;utf8,${encodeURIComponent(t)}`:t},ee=e=>{const{response:a}=e;return a?`Request failed: ${a.status} ${a.statusText}: ${JSON.stringify(a.data)}`:e.message},Bo=e=>Ao({...e,issuerAvatarUrl:Pe(window.location.origin,Se,"/blocklet/logo")});function Ro({user:e,...a}){var c,n;const{locale:u}=z(),x=v((p,l={})=>L(T,p,u,"en",l)),d=ge(),s=w(()=>{const p=((e==null?void 0:e.passports)||[]).map(l=>({...l,revoked:l.status===Ie.REVOKED}));return p.sort((l,j)=>l.revoked===j.revoked?0:l.revoked?1:-1),go(p,"role")},[e==null?void 0:e.passports]),h=w(()=>s==null?void 0:s.find(p=>p.name===e.role),[s,e==null?void 0:e.role]),i=w(()=>{var p,l;return((l=(p=d==null?void 0:d.palette)==null?void 0:p.primary)==null?void 0:l.main)||m.textBase},[(n=(c=d==null?void 0:d.palette)==null?void 0:c.primary)==null?void 0:n.main]);return s.length===0?o.jsx(g,{children:o.jsx(K,{children:x("noPassport")})}):o.jsx(g,{...a,sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(3, 1fr)",md:"repeat(2, 1fr)"},gap:2.5,...a.sx},children:s.map(p=>o.jsx(no,{passport:p,user:e,color:window.blocklet.passportColor,createPassportSvg:Bo,title:h&&h.role===p.role?x("currentPassport"):"",sx:{flexDirection:"column",alignItems:"center",gap:1,".passport-item__display":{width:166,height:166,borderRadius:2,px:2,display:"flex",justifyContent:"center",backgroundColor:m.backgroundsBgComponent,boxShadow:h&&h.role===p.role?`0px 2px 4px 0px ${i}, 0px 1px 2px -1px ${i}, 0px 0px 0px 1px ${i} !important`:"unset"},".passport-item__body":{marginLeft:"0 !important"}}},p.id))})}function he({onTest:e=G,onDelete:a=G,onSave:u=G,onCancel:x=G,type:d="slack",url:s="",edit:h=!1}){const{locale:i}=z(),c=v((r,f={})=>L(T,r,i,"en",f)),n=J({type:d||"slack",url:s||"",edit:h??!1,error:"",loading:!1}),p=v(()=>n.url?mo(n.url)?(n.error="",!0):(n.error=c("common.invalid"),!1):(n.error=c("common.required"),!1)),l=v(()=>{n.edit=!1,n.url=s||"",n.type=d||"slack",n.error="",n.loading=!1,x()}),j=v(async r=>{n.loading=!0,await e(r),n.loading=!1}),t=v(r=>()=>{p()&&r({type:n.type,url:n.url})}),b=w(()=>n.error?o.jsx(I,{component:"span",color:"error",children:n.error}):n.edit?n.loading?o.jsx(oe,{size:16}):o.jsx(W,{size:"small",onClick:t(j),sx:{mr:-1},children:o.jsx(A,{icon:ro})}):null,[n.error,n.edit,n.loading]);return o.jsxs(g,{sx:{display:"flex",gap:1.5,width:"100%",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"}},children:[o.jsxs(bo,{sx:{borderRadius:2,"&.Mui-disabled":{backgroundColor:m.backgroundsBgField}},disabled:!n.edit||n.loading,size:"small",value:n.type,onChange:r=>{n.type=r.target.value},children:[o.jsx(pe,{value:"api",children:c("webhook.url")}),o.jsx(pe,{value:"slack",children:c("webhook.slack")})]}),o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"},children:[o.jsx(jo,{sx:{flex:1,".MuiInputBase-root":{borderRadius:2,"&.Mui-disabled":{backgroundColor:m.backgroundsBgField}}},disabled:!n.edit||n.loading,fullWidth:!0,size:"small",required:!0,value:n.url,onChange:r=>{n.url=r.target.value,p()},error:!!n.error,InputProps:{endAdornment:o.jsx(vo,{position:"end",children:b})}}),o.jsx(g,{sx:{display:"flex",gap:.5},children:n.edit?o.jsxs(o.Fragment,{children:[o.jsx(W,{color:"success",onClick:t((...r)=>{u(...r),n.edit=!1}),sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:Ae})}),o.jsx(W,{color:"error",onClick:l,sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:Be})})]}):o.jsxs(o.Fragment,{children:[o.jsx(W,{onClick:()=>{n.edit=!0},sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:ao})}),o.jsx(W,{color:"error",onClick:()=>{a({type:n.type,url:n.url})},sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:io})})]})})]})]})}function zo({user:e}){var t,b;const{locale:a}=z(),u=v((r,f={})=>L(T,r,a,"en",f)),x=J({showAdd:!1}),d=Z(async()=>await H.user.getUserNotificationConfig(),{refreshDeps:[e],loadingDelay:300}),s=w(()=>{var r;return{wallet:!0,email:!0,phone:!1,...((r=d==null?void 0:d.data)==null?void 0:r.notifications)||{}}},[(t=d==null?void 0:d.data)==null?void 0:t.notifications]),h=w(()=>{var r;return((r=d==null?void 0:d.data)==null?void 0:r.webhooks)||[]},[(b=d==null?void 0:d.data)==null?void 0:b.webhooks]),i=v(async r=>{try{await H.user.saveUserNotificationConfig(r),$.success(u("saveSuccess")),d.run()}catch(f){$.error(ee(f))}}),c=v(async(r,f)=>{await i({notifications:{[r]:f}})}),n=async r=>{try{await H.user.testNotificationWebhook(r),$.success(u("webhookTested"))}catch(f){$.error(ee(f))}},p=v(async r=>{await i({webhooks:h.filter((f,y)=>y!==r)})}),l=v(async(r,f)=>{await i({webhooks:h.map((y,E)=>E===r?f:y)})}),j=v(async r=>{await i({webhooks:[...h,r]}),x.showAdd=!1});return d.error?o.jsx(wo,{severity:"error",children:d.error.message}):d.loading||!d.data?o.jsx(g,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px"},children:o.jsx(oe,{})}):o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:2},children:[o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:[o.jsx(X,{checked:s.wallet,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("walletNotification"),xe(e)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:xe(e)})]})},size:"small",onChange:r=>c("wallet",r.target.checked)}),o.jsx(X,{checked:s.email,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("emailNotification"),(e==null?void 0:e.email)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:e==null?void 0:e.email})]})},size:"small",onChange:r=>c("email",r.target.checked)}),o.jsx(X,{disabled:!0,checked:s.phone,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("phoneNotification"),(e==null?void 0:e.phone)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:e==null?void 0:e.phone})]})},size:"small",onChange:r=>c("phone",r.target.checked)})]}),o.jsx(Re,{}),o.jsxs(yo,{spacing:1.5,useFlexGap:!0,direction:"column",alignItems:"start",children:[h.map((r,f)=>o.jsx(he,{onTest:n,onDelete:()=>p(f),onSave:(...y)=>l(f,...y),type:r.type,url:r.url,edit:!1},`${f}_${r.url}`)),x.showAdd&&o.jsx(he,{onTest:n,onCancel:()=>{x.showAdd=!1},onSave:(...r)=>j(...r),edit:!0},"add"),o.jsx(te,{variant:"outlined",size:"small",sx:{color:m.foregroundsFgBase,borderColor:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutral,"&:hover":{borderColor:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutralHover},py:.5,borderRadius:2},startIcon:o.jsx(A,{icon:so}),onClick:()=>{x.showAdd=!0},children:u("addWebhook")})]})]})}function Lo({configList:e,onSave:a}){const[u,x]=V.useState(e),{locale:d}=z(),s=v((i,c={})=>L(T,i,d,"en",c)),h=v(async(i,c)=>{try{const n=await H.user.saveUserPrivacyConfig({[i]:!c});x(u.map(p=>({...p,value:(n==null?void 0:n[p.key])??p.value}))),$.success(s("saveSuccess")),a()}catch(n){$.error(ee(n))}});return o.jsx(g,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:u.map(i=>o.jsx(X,{checked:!i.value,labelProps:{label:o.jsx(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:s("toPublic",{name:i.name})})},size:"small",onChange:c=>h(i.key,c.target.checked)},i.key))})}function To({item:e}){var r,f,y,E,M;const{confirmApi:a,confirmHolder:u}=je(),x=J({loading:!1}),{locale:d}=z(),s=v((C,B={})=>L(T,C,d,"en",B)),{session:h}=V.useContext(ne),{bindOAuth:i,unbindOAuth:c,setBaseUrl:n,baseUrl:p}=h.useOAuth(),l={[P.AUTH0]:be,[P.APPLE]:Le,[P.GITHUB]:Te,[P.GOOGLE]:Ue},j=w(()=>l[e==null?void 0:e.provider],[e==null?void 0:e.provider]),t=w(()=>ze[e==null?void 0:e.provider]||"unknown",[e==null?void 0:e.provider]),b=v(async()=>{try{x.loading=!0,await new Promise((C,B)=>{var U;if(e!=null&&e._bind)a.open({title:s("thirdPartyLogin.confirmUnbind",{name:t}),content:s("thirdPartyLogin.confirmUnbindDescription",{name:t}),confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),onConfirm(N){c({session:h,connectedAccount:{...De(e,["did","pk"]),showProvider:e.provider,provider:e._rawProvider}}).then(C).catch(B),N()},onCancel:C});else{const N=p,_=window==null?void 0:window.blocklet;let O="/";const Y=Fe(_),D=Ee(_);Y&&(D!=null&&D.appPid)&&((U=h==null?void 0:h.user)!=null&&U.sourceAppPid)&&(O=D.appUrl),n(O),i({session:h,oauthItem:{...e,provider:e._rawProvider}}).then(C).catch(B).finally(()=>{n(N)})}})}catch(C){console.error(`Failed to ${e!=null&&e._bind?"unbind":"bind"} oauth account`,C)}finally{x.loading=!1}});return o.jsxs(o.Fragment,{children:[o.jsxs(Co,{disablePadding:!0,sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsxs(g,{sx:{flex:1,borderRadius:2,border:`1px solid ${m.strokeBorderBase}`,background:m.backgroundsBgField,display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1},children:[o.jsx(A,{icon:j,fontSize:16}),o.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,gap:1},children:t}),o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:.5},children:[((r=e.userInfo)==null?void 0:r.email)||e.did,(f=e.userInfo)!=null&&f.email?o.jsx(ue,{title:o.jsx(o.Fragment,{children:o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(me,{size:36,variant:"circle",shape:"circle",src:(y=e.userInfo)==null?void 0:y.picture,did:e.did}),o.jsxs(g,{children:[o.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(E=e.userInfo)==null?void 0:E.name}),o.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(M=e.userInfo)==null?void 0:M.email})]})]})}),children:o.jsx(A,{icon:lo,color:m.textSubtitle,fontSize:16,style:{cursor:"pointer"}})}):null]})]}),o.jsx(ue,{title:e._mainProvider?s("thirdPartyLogin.mainProviderCantRemove"):"",children:o.jsx(g,{children:o.jsx(te,{variant:"outlined",size:"small",sx:{color:e!=null&&e._bind?m.red:m.foregroundsFgBase,borderColor:e!=null&&e._bind?m.red:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutral,"&:hover":{borderColor:e!=null&&e._bind?m.red:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutralHover},py:.5,borderRadius:2,fontWeight:500},startIcon:x.loading?null:o.jsx(A,{icon:co}),onClick:b,disabled:e._mainProvider,loading:x.loading,children:e!=null&&e._bind?s("thirdPartyLogin.disconnect"):s("thirdPartyLogin.connect")})})})]}),u]})}function Uo({user:e}){const{session:a}=V.useContext(ne),[u,x]=V.useState({}),{getOAuthConfigs:d}=a.useOAuth();Me(async()=>{const i=await d({sourceAppPid:e==null?void 0:e.sourceAppPid});x(i)},[e==null?void 0:e.sourceAppPid]);const s=w(()=>Object.keys(u).map(c=>({...u[c],provider:c})).filter(c=>c.enabled),[u]),h=w(()=>{const i=_e(e);let c=!1,n="",p=Oe(e);const l=i.find(t=>t.provider===P.AUTH0);return l&&(l.id.startsWith("google-oauth2|")&&(i.some(t=>t.provider==="google")||(c=!0,n=P.GOOGLE,p===P.AUTH0&&(p=P.GOOGLE))),l.id.startsWith("appleid|")&&(i.some(t=>t.provider===P.APPLE)||(c=!0,n=P.APPLE,p===P.AUTH0&&(p=P.APPLE))),l.id.startsWith("github|")&&(i.some(t=>t.provider===P.GITHUB)||(c=!0,n=P.GITHUB,p===P.AUTH0&&(p=P.GITHUB)))),s.map(t=>{if(t.provider===P.AUTH0&&c)return null;const b=c&&t.provider===n?i.find(r=>r.provider===P.AUTH0):i.find(r=>r.provider===t.provider);return b?{...t,provider:t.provider,did:b.did,pk:b.pk,userInfo:b.userInfo,_bind:!0,_rawProvider:b.provider,_mainProvider:t.provider===p}:{...t,provider:t.provider,_rawProvider:t.provider,_mainProvider:t.provider===p}}).filter(Boolean).sort((t,b)=>(t==null?void 0:t.order)!==void 0&&(b==null?void 0:b.order)!==void 0?t.order-b.order:(t==null?void 0:t.order)!==void 0?-1:1)},[e==null?void 0:e.connectedAccounts,s]);return o.jsx(We,{dense:!0,sx:{gap:1,display:"flex",flexDirection:"column"},children:h.map(i=>o.jsx(To,{item:i},i==null?void 0:i.provider))})}function Do({user:e,settings:a,onSave:u,...x}){const{locale:d}=z(),s=v((l,j={})=>L(T,l,d,"en",j)),h=w(()=>((a==null?void 0:a.userCenterTabs)||[]).map(j=>({key:j.value,name:j.label,value:j.protected})),[a==null?void 0:a.userCenterTabs]),i=w(()=>{var l;return[{label:s("notificationManagement"),value:"notification",content:o.jsx(zo,{user:e})},{label:s("thirdPartyLogin.title"),value:"thirdPartyLogin",content:o.jsx(Uo,{user:e})},{label:s("privacyManagement"),value:"privacy",content:o.jsx(Lo,{configList:h,onSave:u})},((l=e==null?void 0:e.didSpace)==null?void 0:l.endpoint)&&{label:s("storageManagement"),value:"storage",content:o.jsx(po,{children:o.jsx(xo,{})})},{label:s("sessionManagement"),value:"session",content:o.jsx(ko,{user:e})}].filter(Boolean)},[e,h]),c=J({tab:i[0].value}),n=w(()=>i.find(l=>l.value===c.tab),[c.tab,i]),p=v(l=>{c.tab=l});return n&&o.jsxs(g,{...x,sx:{...x==null?void 0:x.sx,minWidth:{md:500},maxWidth:"100%"},children:[o.jsx(ve,{variant:"card",tabs:i,current:n.value,onChange:p}),o.jsx(g,{mt:2.5,children:n.content})]})}function Fo({children:e,currentTab:a,contentProps:u={},disableAutoRedirect:x=!1,autoPopupSetting:d=!1,hideFooter:s=!1,headerProps:h={},footerProps:i={},userDid:c=void 0,stickySidebar:n=!1}){var D,re,ae,ie,se,le;const{locale:p}=z(),l=v((k,S={})=>L(T,k,p,"en",S)),j=V.useContext(ne),t=j==null?void 0:j.session,b=w(()=>{var R;if(c)return c;const k=window.location.href,S=fo(k);return S!=null&&S.did?Array.isArray(S.did)?S.did[0]:S.did:(R=t==null?void 0:t.user)==null?void 0:R.did},[(D=t==null?void 0:t.user)==null?void 0:D.did,c]),r=w(()=>{var k;return t!=null&&t.user?b===((k=t==null?void 0:t.user)==null?void 0:k.did):!1},[b,(re=t==null?void 0:t.user)==null?void 0:re.did]),f=Z(async()=>{if(await $e(()=>t==null?void 0:t.initialized),r)return t.user;if(b)return H.user.getUserPublicInfo({did:b})},{refreshDeps:[b,r,t==null?void 0:t.initialized,t==null?void 0:t.user]}),y=Z(async()=>f.data&&a?await H.user.getUserPrivacyConfig({did:b}):null,{refreshDeps:[b,f.data,a],loadingDelay:300}),{confirmHolder:E,confirmApi:M}=je({sx:{".MuiDialog-paper":{borderRadius:2,maxWidth:1200},".ux-dialog_title":{fontWeight:600},".ux-dialog_closeButton":{p:1},".MuiDialogActions-root":{display:{xs:"none",md:"flex"}}}}),C=w(()=>{const k=He(window.blocklet);try{return Xe(k)}catch(S){return console.error("Failed to format blocklet info",S,k),k}},[]),B=w(()=>{var R;const k=((R=C==null?void 0:C.navigation)==null?void 0:R.userCenter)||[];return(Je(k,p)||[]).map(F=>{var de;const q=F._rawLink??F.link;return{value:q,label:F.title,url:F.link,protected:((de=y==null?void 0:y.data)==null?void 0:de[q])??!1}})},[C,f.data,y==null?void 0:y.data,p]),U=w(()=>B.find(k=>k.value===a),[B]),N=v(k=>{const S=B.find(R=>R.value===k);S&&(window.location.href=ho(S.url,{did:r?void 0:b}))}),_=w(()=>o.jsx(Do,{user:f.data,settings:{userCenterTabs:B},onSave:async()=>(await y.runAsync(),y.data)}),[f.data]),O=v(()=>{M.open({title:l("settings"),content:_,showCancelButton:!1,confirmButtonText:l("done"),onConfirm:M.close})});Ne(()=>{M.update({content:_})},[_]),Ge(()=>{d&&O()});const Y=w(()=>{var k,S,R;if(f.loading||t.loading)return null;if(f.error){const q={message:((S=(k=f.error.response)==null?void 0:k.data)==null?void 0:S.error)||f.error.message||"error occurred"};return o.jsx(g,{sx:{width:"100%"},children:o.jsx(uo,{error:q})})}return!b&&!f.data?o.jsx(g,{sx:{width:"100%"},children:o.jsxs(g,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1},children:[o.jsx(K,{children:l("viewAfterLogin")}),o.jsx(te,{size:"small",variant:"contained",onClick:()=>t.login(),children:l("loginNow")})]})}):o.jsxs(o.Fragment,{children:[o.jsxs(g,{sx:{flex:1,overflow:"hidden"},children:[(R=f==null?void 0:f.data)!=null&&R.fullName?o.jsx(I,{variant:"h4",sx:{py:1.5,fontWeight:700,display:{xs:"none",md:"block"}},children:f.data.fullName}):null,o.jsx(fe,{isMyself:r,switchPassport:t.switchPassport,switchProfile:t.switchProfile,openSettings:O,user:f.data,showFullDid:!1,sx:{display:{md:"none",xs:"block"},mb:1.5}}),B.length>0&&a?o.jsxs(g,{sx:{overflow:"auto",padding:"1px"},children:[o.jsx(ve,{variant:"line",tabs:B,current:a,onChange:N,sx:{mb:1.5}}),!y.data||y.loading?o.jsx(g,{sx:{height:"100%",minWidth:"160px",minHeight:"160px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(oe,{sx:{color:m.primary100}})}):o.jsx(o.Fragment,{children:U!=null&&U.protected&&!r?o.jsx(g,{children:o.jsx(K,{children:l("underProtected")})}):o.jsx(o.Fragment,{children:e&&o.jsx(g,{...u,children:e})})})]}):null,B.length===0?o.jsx(g,{sx:{display:{xs:r?"none":"block",md:"block"},py:3},children:o.jsx(K,{children:l("emptyContent")})}):null]}),o.jsx(g,{sx:{display:{xs:"none",md:"block"},width:"1px",my:-3,backgroundColor:m.strokeSep}}),o.jsx(g,{sx:{width:{sx:"100%",md:420},maxWidth:"100%",position:"relative"},children:o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:2.5,position:{xs:"static",md:n?"sticky":"static"},top:F=>n?F.spacing(3):"unset"},children:[o.jsx(fe,{isMyself:r,switchPassport:t.switchPassport,switchProfile:t.switchProfile,openSettings:O,user:f.data,sx:{display:{xs:"none",md:"block"}}}),r?o.jsxs(o.Fragment,{children:[o.jsxs(g,{children:[o.jsx(I,{sx:{fontWeight:600,mb:1.5},children:l("myInfo")}),o.jsx(So,{user:f.data})]}),o.jsxs(g,{children:[o.jsx(I,{sx:{fontWeight:600,mb:1.5},children:l("passport")}),o.jsx(Ro,{user:f.data})]})]}):null]})})]})},[f,B,r,U,y,a,n]);return!x&&!a&&((ie=(ae=C==null?void 0:C.navigation)==null?void 0:ae.userCenter)==null?void 0:ie.length)>0?(window.location.replace((le=(se=C==null?void 0:C.navigation)==null?void 0:se.userCenter[0])==null?void 0:le.link),null):o.jsxs(g,{sx:{backgroundColor:m.backgroundsBgSubtitle,minHeight:"100vh",display:"flex",flexDirection:"column"},children:[o.jsx(Qe,{bordered:!0,...h}),o.jsxs(g,{flex:1,sx:{width:"100%",maxWidth:1200,margin:"0 auto",p:3,display:"flex",alignItems:"stretch",flexDirection:{xs:"column",md:"row"},gap:2.5},children:[Y,E]}),s?null:o.jsx(Ke,{bordered:!0,...i})]})}function Pt(){const a=Ve().tab,{t:u}=z();return o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:o.jsx("title",{children:u("pageTitle.userCenter")})}),o.jsx(Fo,{disableAutoRedirect:a==="settings",autoPopupSetting:a==="settings"})]})}export{Pt as default};
|
|
1
|
+
import{u as z,h as v,f as w,bp as ge,j as o,B as g,A as me,bA as G,T as I,bl as we,K as m,bB as A,bC as ye,D as ke,aA as W,bD as L,bE as Ce,bF as be,bG as ce,bH as Q,c as Pe,bI as Se,bJ as Ie,M as J,S as oe,b5 as pe,bK as Ae,bL as Be,N as Z,bM as xe,b4 as Re,$ as te,o as $,r as V,bN as je,bO as ne,bP as ze,a as ue,bQ as P,bR as Le,bS as Te,bT as Ue,bU as De,n as Fe,m as Ee,bf as Me,bV as _e,bW as Oe,bq as We,bX as $e,bY as He,bZ as Ne,i as Ge,bz as Ve,H as qe}from"./index-BqsMd8kb.js";import{H as Qe,F as Ke}from"./index-Dbqss1Fe.js";import{f as Xe,g as Je}from"./index-zxzrHJEP.js";import{S as Ye,t as T,a as Ze,b as eo,M as oo,C as to,P as no,c as ro,E as ao,D as io,A as so,d as H,I as lo,L as co,e as po,f as xo}from"./info-outline-rounded-BTpTFmEK.js";import{T as ve}from"./index-C5WzGzSj.js";import{E as K}from"./index-DcHRVIKm.js";import{E as uo}from"./fallback-BCzfpkx_.js";import{g as fo,w as ho}from"./index-D-XBJ_hS.js";import{u as go}from"./uniqBy-DN9WBw_C.js";import{S as X}from"./index-C9d9WjZ0.js";import{i as mo}from"./index-DJvJ2Tmc.js";import{S as bo}from"./Select-0rvptrXH.js";import{T as jo}from"./TextField-BHg3uTSC.js";import{M as vo}from"./InputAdornment-CGuzdfXX.js";import{A as wo}from"./Alert-D7OuAtqq.js";import{S as yo}from"./FormControlLabel-Bj1raPoa.js";import{U as ko}from"./user-sessions-gd1hKrWX.js";import{L as Co}from"./MoreVert-C4XqRKE4.js";import"./index-BXCKXS5j.js";import"./index-e7NHyY1q.js";import"./Toolbar-C3gbqZgN.js";import"./Hidden-DWKJv_Ts.js";import"./MoreHoriz-B921hlWY.js";import"./ExpandMore-CMOFmrRl.js";import"./Avatar-BKvod5qm.js";import"./useSlot-MeMXV443.js";import"./selector-Dpt9nBq7.js";import"./OpenInNew-DjHvMAdQ.js";import"./CloseOutlined-BdzvaiT0.js";import"./FormControl-BrDVvV0w.js";import"./useFormControl-b_gcFCyO.js";import"./InputLabel-DA3u5GP-.js";import"./FilterList-MfdHX_OT.js";import"./TableRow-DQB9jM8W.js";import"./Grid-BtGjPvuC.js";import"./FormGroup-CTmu8GWz.js";import"./ListItemText-9kG4LhTP.js";import"./LastPage-DzK9EKF-.js";import"./index-ByPqHR4r.js";import"./redux-BpyOm6pS.js";import"./Search-BuZJTzDq.js";import"./Delete-Cmb6a-TW.js";function fe({user:e,isMyself:a=!0,showFullDid:u=!0,switchPassport:x,switchProfile:d,openSettings:s,...h}){const{locale:i}=z(),c=v((j,t={})=>L(T,j,i,"en",t)),n=w(()=>{var j;return(j=(e==null?void 0:e.passports)||[])==null?void 0:j.find(t=>t.name===e.role)},[e==null?void 0:e.passports,e==null?void 0:e.role]),l=ge().breakpoints.down("md");return e?o.jsxs(g,{...h,sx:{position:"relative",...h.sx},children:[o.jsx(me,{src:e==null?void 0:e.avatar,did:e==null?void 0:e.did,size:l?64:80,variant:"circle",shape:"circle",sx:{borderRadius:"100%",backgroundColor:"#fff",position:"relative",overflow:"hidden",mb:1.5,...a?{cursor:"pointer","&:hover":{"&::after":{content:`"${c("switchProfile")}"`}},"&::after":{color:"white",position:"absolute",fontSize:"12px",bottom:0,left:0,right:0,height:"50%",backgroundColor:"rgba(0, 0, 0, 0.3)",display:"flex",justifyContent:"center",alignItems:"center"}}:{}},onClick:a?d:G}),o.jsxs(I,{variant:"h6",sx:{fontWeight:"bold",display:"flex",alignItems:"center",gap:1,fontSize:"24px !important"},children:[e==null?void 0:e.fullName,a?o.jsx(we,{label:(n==null?void 0:n.title)||(e==null?void 0:e.role)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:m.textBase,borderColor:m.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:active":{boxShadow:"none"}},clickable:!0,deleteIcon:o.jsx(A,{icon:ye,color:m.textBase}),onDelete:x,onClick:x}):null]}),o.jsx(ke,{did:e.did,showQrcode:!0,copyable:!0,compact:!u,responsive:!u,locale:i}),a?o.jsx(W,{sx:{borderRadius:2,color:m.textBase,backgroundColor:"white",border:`1px solid ${m.strokeBorderBase}`,position:"absolute",top:0,right:0},disableFocusRipple:!0,onClick:s,children:o.jsx(A,{icon:Ye})}):null]}):null}function Po({data:e,...a}){return o.jsxs(g,{...a,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",...a.sx},children:[o.jsxs(I,{sx:{display:"flex",alignItems:"center",color:m.textBase,fontSize:"14px",gap:1,fontWeight:500},children:[e.icon,e.title]}),o.jsx(I,{sx:{color:m.textSubtitle,whiteSpace:"pre-wrap",fontSize:"14px"},children:e.content})]})}function So({user:e,...a}){const{locale:u}=z(),x=v((h,i={})=>L(T,h,u,"en",i)),d=w(()=>(e==null?void 0:e.sourceProvider)&&Ce[e.sourceProvider]||x("unknown"),[e==null?void 0:e.sourceProvider]),s=[];return s.push({icon:o.jsx(A,{fontSize:16,icon:be}),title:x("email"),content:(e==null?void 0:e.email)||x("emptyField")}),s.push({icon:o.jsx(A,{fontSize:16,icon:Ze}),title:x("lastLoginAt"),content:e!=null&&e.lastLoginAt?o.jsx(ce,{locale:u,value:e==null?void 0:e.lastLoginAt,relativeRange:3*86400*1e3}):x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:eo}),title:x("lastLoginIp"),content:(e==null?void 0:e.lastLoginIp)||x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:oo}),title:x("createdAt"),content:e!=null&&e.createdAt?o.jsx(ce,{locale:u,value:e==null?void 0:e.createdAt}):x("unknown")}),s.push({icon:o.jsx(A,{fontSize:16,icon:to}),title:x("registerFrom"),content:d}),o.jsx(g,{...a,sx:{display:"flex",flexDirection:"column",gap:1.5,...a==null?void 0:a.sx},children:s.map(h=>o.jsx(Po,{data:h,sx:{flex:1}},h.title))})}const Io=(e,a)=>{let u;return e==="default"?u=Q.DEFAULT_COLORS["app-passport"]:e==="auto"?u=Q.getNftBGColorFromDid(a):u=Q.getNftBGColor(e),u},Ao=({issuer:e="",title:a="",issuerDid:u="",issuerAvatarUrl:x="",ownerDid:d="",ownerName:s="",ownerAvatarUrl:h="",preferredColor:i="default",revoked:c=!1,isDataUrl:n=!1,width:p="100%",height:l="100%"})=>{const j=Io(i,u),t=Q.getSvg({width:p,height:l,tag:c?"revoked":"",tagVariant:c?"error":"info",color:j,did:d,variant:"app-passport",verifiable:!0,issuer:{name:e,icon:x},header:{name:a,icon:h},extra:{key:"Exp",value:"2123-01-01"}});return n?`data:image/svg+xml;utf8,${encodeURIComponent(t)}`:t},ee=e=>{const{response:a}=e;return a?`Request failed: ${a.status} ${a.statusText}: ${JSON.stringify(a.data)}`:e.message},Bo=e=>Ao({...e,issuerAvatarUrl:Pe(window.location.origin,Se,"/blocklet/logo")});function Ro({user:e,...a}){var c,n;const{locale:u}=z(),x=v((p,l={})=>L(T,p,u,"en",l)),d=ge(),s=w(()=>{const p=((e==null?void 0:e.passports)||[]).map(l=>({...l,revoked:l.status===Ie.REVOKED}));return p.sort((l,j)=>l.revoked===j.revoked?0:l.revoked?1:-1),go(p,"role")},[e==null?void 0:e.passports]),h=w(()=>s==null?void 0:s.find(p=>p.name===e.role),[s,e==null?void 0:e.role]),i=w(()=>{var p,l;return((l=(p=d==null?void 0:d.palette)==null?void 0:p.primary)==null?void 0:l.main)||m.textBase},[(n=(c=d==null?void 0:d.palette)==null?void 0:c.primary)==null?void 0:n.main]);return s.length===0?o.jsx(g,{children:o.jsx(K,{children:x("noPassport")})}):o.jsx(g,{...a,sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(3, 1fr)",md:"repeat(2, 1fr)"},gap:2.5,...a.sx},children:s.map(p=>o.jsx(no,{passport:p,user:e,color:window.blocklet.passportColor,createPassportSvg:Bo,title:h&&h.role===p.role?x("currentPassport"):"",sx:{flexDirection:"column",alignItems:"center",gap:1,".passport-item__display":{width:166,height:166,borderRadius:2,px:2,display:"flex",justifyContent:"center",backgroundColor:m.backgroundsBgComponent,boxShadow:h&&h.role===p.role?`0px 2px 4px 0px ${i}, 0px 1px 2px -1px ${i}, 0px 0px 0px 1px ${i} !important`:"unset"},".passport-item__body":{marginLeft:"0 !important"}}},p.id))})}function he({onTest:e=G,onDelete:a=G,onSave:u=G,onCancel:x=G,type:d="slack",url:s="",edit:h=!1}){const{locale:i}=z(),c=v((r,f={})=>L(T,r,i,"en",f)),n=J({type:d||"slack",url:s||"",edit:h??!1,error:"",loading:!1}),p=v(()=>n.url?mo(n.url)?(n.error="",!0):(n.error=c("common.invalid"),!1):(n.error=c("common.required"),!1)),l=v(()=>{n.edit=!1,n.url=s||"",n.type=d||"slack",n.error="",n.loading=!1,x()}),j=v(async r=>{n.loading=!0,await e(r),n.loading=!1}),t=v(r=>()=>{p()&&r({type:n.type,url:n.url})}),b=w(()=>n.error?o.jsx(I,{component:"span",color:"error",children:n.error}):n.edit?n.loading?o.jsx(oe,{size:16}):o.jsx(W,{size:"small",onClick:t(j),sx:{mr:-1},children:o.jsx(A,{icon:ro})}):null,[n.error,n.edit,n.loading]);return o.jsxs(g,{sx:{display:"flex",gap:1.5,width:"100%",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"}},children:[o.jsxs(bo,{sx:{borderRadius:2,"&.Mui-disabled":{backgroundColor:m.backgroundsBgField}},disabled:!n.edit||n.loading,size:"small",value:n.type,onChange:r=>{n.type=r.target.value},children:[o.jsx(pe,{value:"api",children:c("webhook.url")}),o.jsx(pe,{value:"slack",children:c("webhook.slack")})]}),o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"},children:[o.jsx(jo,{sx:{flex:1,".MuiInputBase-root":{borderRadius:2,"&.Mui-disabled":{backgroundColor:m.backgroundsBgField}}},disabled:!n.edit||n.loading,fullWidth:!0,size:"small",required:!0,value:n.url,onChange:r=>{n.url=r.target.value,p()},error:!!n.error,InputProps:{endAdornment:o.jsx(vo,{position:"end",children:b})}}),o.jsx(g,{sx:{display:"flex",gap:.5},children:n.edit?o.jsxs(o.Fragment,{children:[o.jsx(W,{color:"success",onClick:t((...r)=>{u(...r),n.edit=!1}),sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:Ae})}),o.jsx(W,{color:"error",onClick:l,sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:Be})})]}):o.jsxs(o.Fragment,{children:[o.jsx(W,{onClick:()=>{n.edit=!0},sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:ao})}),o.jsx(W,{color:"error",onClick:()=>{a({type:n.type,url:n.url})},sx:{borderRadius:2,border:`1px solid ${m.strokeBorderBase}`},children:o.jsx(A,{icon:io})})]})})]})]})}function zo({user:e}){var t,b;const{locale:a}=z(),u=v((r,f={})=>L(T,r,a,"en",f)),x=J({showAdd:!1}),d=Z(async()=>await H.user.getUserNotificationConfig(),{refreshDeps:[e],loadingDelay:300}),s=w(()=>{var r;return{wallet:!0,email:!0,phone:!1,...((r=d==null?void 0:d.data)==null?void 0:r.notifications)||{}}},[(t=d==null?void 0:d.data)==null?void 0:t.notifications]),h=w(()=>{var r;return((r=d==null?void 0:d.data)==null?void 0:r.webhooks)||[]},[(b=d==null?void 0:d.data)==null?void 0:b.webhooks]),i=v(async r=>{try{await H.user.saveUserNotificationConfig(r),$.success(u("saveSuccess")),d.run()}catch(f){$.error(ee(f))}}),c=v(async(r,f)=>{await i({notifications:{[r]:f}})}),n=async r=>{try{await H.user.testNotificationWebhook(r),$.success(u("webhookTested"))}catch(f){$.error(ee(f))}},p=v(async r=>{await i({webhooks:h.filter((f,y)=>y!==r)})}),l=v(async(r,f)=>{await i({webhooks:h.map((y,E)=>E===r?f:y)})}),j=v(async r=>{await i({webhooks:[...h,r]}),x.showAdd=!1});return d.error?o.jsx(wo,{severity:"error",children:d.error.message}):d.loading||!d.data?o.jsx(g,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px"},children:o.jsx(oe,{})}):o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:2},children:[o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:[o.jsx(X,{checked:s.wallet,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("walletNotification"),xe(e)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:xe(e)})]})},size:"small",onChange:r=>c("wallet",r.target.checked)}),o.jsx(X,{checked:s.email,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("emailNotification"),(e==null?void 0:e.email)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:e==null?void 0:e.email})]})},size:"small",onChange:r=>c("email",r.target.checked)}),o.jsx(X,{disabled:!0,checked:s.phone,labelProps:{label:o.jsxs(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:[u("phoneNotification"),(e==null?void 0:e.phone)&&o.jsx(I,{component:"span",color:"text.secondary",fontSize:13,children:e==null?void 0:e.phone})]})},size:"small",onChange:r=>c("phone",r.target.checked)})]}),o.jsx(Re,{}),o.jsxs(yo,{spacing:1.5,useFlexGap:!0,direction:"column",alignItems:"start",children:[h.map((r,f)=>o.jsx(he,{onTest:n,onDelete:()=>p(f),onSave:(...y)=>l(f,...y),type:r.type,url:r.url,edit:!1},`${f}_${r.url}`)),x.showAdd&&o.jsx(he,{onTest:n,onCancel:()=>{x.showAdd=!1},onSave:(...r)=>j(...r),edit:!0},"add"),o.jsx(te,{variant:"outlined",size:"small",sx:{color:m.foregroundsFgBase,borderColor:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutral,"&:hover":{borderColor:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutralHover},py:.5,borderRadius:2},startIcon:o.jsx(A,{icon:so}),onClick:()=>{x.showAdd=!0},children:u("addWebhook")})]})]})}function Lo({configList:e,onSave:a}){const[u,x]=V.useState(e),{locale:d}=z(),s=v((i,c={})=>L(T,i,d,"en",c)),h=v(async(i,c)=>{try{const n=await H.user.saveUserPrivacyConfig({[i]:!c});x(u.map(p=>({...p,value:(n==null?void 0:n[p.key])??p.value}))),$.success(s("saveSuccess")),a()}catch(n){$.error(ee(n))}});return o.jsx(g,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:u.map(i=>o.jsx(X,{checked:!i.value,labelProps:{label:o.jsx(I,{color:"text.primary",sx:{fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:s("toPublic",{name:i.name})})},size:"small",onChange:c=>h(i.key,c.target.checked)},i.key))})}function To({item:e}){var r,f,y,E,M;const{confirmApi:a,confirmHolder:u}=je(),x=J({loading:!1}),{locale:d}=z(),s=v((C,B={})=>L(T,C,d,"en",B)),{session:h}=V.useContext(ne),{bindOAuth:i,unbindOAuth:c,setBaseUrl:n,baseUrl:p}=h.useOAuth(),l={[P.AUTH0]:be,[P.APPLE]:Le,[P.GITHUB]:Te,[P.GOOGLE]:Ue},j=w(()=>l[e==null?void 0:e.provider],[e==null?void 0:e.provider]),t=w(()=>ze[e==null?void 0:e.provider]||"unknown",[e==null?void 0:e.provider]),b=v(async()=>{try{x.loading=!0,await new Promise((C,B)=>{var U;if(e!=null&&e._bind)a.open({title:s("thirdPartyLogin.confirmUnbind",{name:t}),content:s("thirdPartyLogin.confirmUnbindDescription",{name:t}),confirmButtonText:s("common.confirm"),cancelButtonText:s("common.cancel"),onConfirm(N){c({session:h,connectedAccount:{...De(e,["did","pk"]),showProvider:e.provider,provider:e._rawProvider}}).then(C).catch(B),N()},onCancel:C});else{const N=p,_=window==null?void 0:window.blocklet;let O="/";const Y=Fe(_),D=Ee(_);Y&&(D!=null&&D.appPid)&&((U=h==null?void 0:h.user)!=null&&U.sourceAppPid)&&(O=D.appUrl),n(O),i({session:h,oauthItem:{...e,provider:e._rawProvider}}).then(C).catch(B).finally(()=>{n(N)})}})}catch(C){console.error(`Failed to ${e!=null&&e._bind?"unbind":"bind"} oauth account`,C)}finally{x.loading=!1}});return o.jsxs(o.Fragment,{children:[o.jsxs(Co,{disablePadding:!0,sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsxs(g,{sx:{flex:1,borderRadius:2,border:`1px solid ${m.strokeBorderBase}`,background:m.backgroundsBgField,display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1},children:[o.jsx(A,{icon:j,fontSize:16}),o.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,gap:1},children:t}),o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:.5},children:[((r=e.userInfo)==null?void 0:r.email)||e.did,(f=e.userInfo)!=null&&f.email?o.jsx(ue,{title:o.jsx(o.Fragment,{children:o.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(me,{size:36,variant:"circle",shape:"circle",src:(y=e.userInfo)==null?void 0:y.picture,did:e.did}),o.jsxs(g,{children:[o.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(E=e.userInfo)==null?void 0:E.name}),o.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:(M=e.userInfo)==null?void 0:M.email})]})]})}),children:o.jsx(A,{icon:lo,color:m.textSubtitle,fontSize:16,style:{cursor:"pointer"}})}):null]})]}),o.jsx(ue,{title:e._mainProvider?s("thirdPartyLogin.mainProviderCantRemove"):"",children:o.jsx(g,{children:o.jsx(te,{variant:"outlined",size:"small",sx:{color:e!=null&&e._bind?m.red:m.foregroundsFgBase,borderColor:e!=null&&e._bind?m.red:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutral,"&:hover":{borderColor:e!=null&&e._bind?m.red:m.strokeBorderBase,backgroundColor:m.buttonsButtonNeutralHover},py:.5,borderRadius:2,fontWeight:500},startIcon:x.loading?null:o.jsx(A,{icon:co}),onClick:b,disabled:e._mainProvider,loading:x.loading,children:e!=null&&e._bind?s("thirdPartyLogin.disconnect"):s("thirdPartyLogin.connect")})})})]}),u]})}function Uo({user:e}){const{session:a}=V.useContext(ne),[u,x]=V.useState({}),{getOAuthConfigs:d}=a.useOAuth();Me(async()=>{const i=await d({sourceAppPid:e==null?void 0:e.sourceAppPid});x(i)},[e==null?void 0:e.sourceAppPid]);const s=w(()=>Object.keys(u).map(c=>({...u[c],provider:c})).filter(c=>c.enabled),[u]),h=w(()=>{const i=_e(e);let c=!1,n="",p=Oe(e);const l=i.find(t=>t.provider===P.AUTH0);return l&&(l.id.startsWith("google-oauth2|")&&(i.some(t=>t.provider==="google")||(c=!0,n=P.GOOGLE,p===P.AUTH0&&(p=P.GOOGLE))),l.id.startsWith("appleid|")&&(i.some(t=>t.provider===P.APPLE)||(c=!0,n=P.APPLE,p===P.AUTH0&&(p=P.APPLE))),l.id.startsWith("github|")&&(i.some(t=>t.provider===P.GITHUB)||(c=!0,n=P.GITHUB,p===P.AUTH0&&(p=P.GITHUB)))),s.map(t=>{if(t.provider===P.AUTH0&&c)return null;const b=c&&t.provider===n?i.find(r=>r.provider===P.AUTH0):i.find(r=>r.provider===t.provider);return b?{...t,provider:t.provider,did:b.did,pk:b.pk,userInfo:b.userInfo,_bind:!0,_rawProvider:b.provider,_mainProvider:t.provider===p}:{...t,provider:t.provider,_rawProvider:t.provider,_mainProvider:t.provider===p}}).filter(Boolean).sort((t,b)=>(t==null?void 0:t.order)!==void 0&&(b==null?void 0:b.order)!==void 0?t.order-b.order:(t==null?void 0:t.order)!==void 0?-1:1)},[e==null?void 0:e.connectedAccounts,s]);return o.jsx(We,{dense:!0,sx:{gap:1,display:"flex",flexDirection:"column"},children:h.map(i=>o.jsx(To,{item:i},i==null?void 0:i.provider))})}function Do({user:e,settings:a,onSave:u,...x}){const{locale:d}=z(),s=v((l,j={})=>L(T,l,d,"en",j)),h=w(()=>((a==null?void 0:a.userCenterTabs)||[]).map(j=>({key:j.value,name:j.label,value:j.protected})),[a==null?void 0:a.userCenterTabs]),i=w(()=>{var l;return[{label:s("notificationManagement"),value:"notification",content:o.jsx(zo,{user:e})},{label:s("thirdPartyLogin.title"),value:"thirdPartyLogin",content:o.jsx(Uo,{user:e})},{label:s("privacyManagement"),value:"privacy",content:o.jsx(Lo,{configList:h,onSave:u})},((l=e==null?void 0:e.didSpace)==null?void 0:l.endpoint)&&{label:s("storageManagement"),value:"storage",content:o.jsx(po,{children:o.jsx(xo,{})})},{label:s("sessionManagement"),value:"session",content:o.jsx(ko,{user:e})}].filter(Boolean)},[e,h]),c=J({tab:i[0].value}),n=w(()=>i.find(l=>l.value===c.tab),[c.tab,i]),p=v(l=>{c.tab=l});return n&&o.jsxs(g,{...x,sx:{...x==null?void 0:x.sx,minWidth:{md:500},maxWidth:"100%"},children:[o.jsx(ve,{variant:"card",tabs:i,current:n.value,onChange:p}),o.jsx(g,{mt:2.5,children:n.content})]})}function Fo({children:e,currentTab:a,contentProps:u={},disableAutoRedirect:x=!1,autoPopupSetting:d=!1,hideFooter:s=!1,headerProps:h={},footerProps:i={},userDid:c=void 0,stickySidebar:n=!1}){var D,re,ae,ie,se,le;const{locale:p}=z(),l=v((k,S={})=>L(T,k,p,"en",S)),j=V.useContext(ne),t=j==null?void 0:j.session,b=w(()=>{var R;if(c)return c;const k=window.location.href,S=fo(k);return S!=null&&S.did?Array.isArray(S.did)?S.did[0]:S.did:(R=t==null?void 0:t.user)==null?void 0:R.did},[(D=t==null?void 0:t.user)==null?void 0:D.did,c]),r=w(()=>{var k;return t!=null&&t.user?b===((k=t==null?void 0:t.user)==null?void 0:k.did):!1},[b,(re=t==null?void 0:t.user)==null?void 0:re.did]),f=Z(async()=>{if(await $e(()=>t==null?void 0:t.initialized),r)return t.user;if(b)return H.user.getUserPublicInfo({did:b})},{refreshDeps:[b,r,t==null?void 0:t.initialized,t==null?void 0:t.user]}),y=Z(async()=>f.data&&a?await H.user.getUserPrivacyConfig({did:b}):null,{refreshDeps:[b,f.data,a],loadingDelay:300}),{confirmHolder:E,confirmApi:M}=je({sx:{".MuiDialog-paper":{borderRadius:2,maxWidth:1200},".ux-dialog_title":{fontWeight:600},".ux-dialog_closeButton":{p:1},".MuiDialogActions-root":{display:{xs:"none",md:"flex"}}}}),C=w(()=>{const k=He(window.blocklet);try{return Xe(k)}catch(S){return console.error("Failed to format blocklet info",S,k),k}},[]),B=w(()=>{var R;const k=((R=C==null?void 0:C.navigation)==null?void 0:R.userCenter)||[];return(Je(k,p)||[]).map(F=>{var de;const q=F._rawLink??F.link;return{value:q,label:F.title,url:F.link,protected:((de=y==null?void 0:y.data)==null?void 0:de[q])??!1}})},[C,f.data,y==null?void 0:y.data,p]),U=w(()=>B.find(k=>k.value===a),[B]),N=v(k=>{const S=B.find(R=>R.value===k);S&&(window.location.href=ho(S.url,{did:r?void 0:b}))}),_=w(()=>o.jsx(Do,{user:f.data,settings:{userCenterTabs:B},onSave:async()=>(await y.runAsync(),y.data)}),[f.data]),O=v(()=>{M.open({title:l("settings"),content:_,showCancelButton:!1,confirmButtonText:l("done"),onConfirm:M.close})});Ne(()=>{M.update({content:_})},[_]),Ge(()=>{d&&O()});const Y=w(()=>{var k,S,R;if(f.loading||t.loading)return null;if(f.error){const q={message:((S=(k=f.error.response)==null?void 0:k.data)==null?void 0:S.error)||f.error.message||"error occurred"};return o.jsx(g,{sx:{width:"100%"},children:o.jsx(uo,{error:q})})}return!b&&!f.data?o.jsx(g,{sx:{width:"100%"},children:o.jsxs(g,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:1},children:[o.jsx(K,{children:l("viewAfterLogin")}),o.jsx(te,{size:"small",variant:"contained",onClick:()=>t.login(),children:l("loginNow")})]})}):o.jsxs(o.Fragment,{children:[o.jsxs(g,{sx:{flex:1,overflow:"hidden"},children:[(R=f==null?void 0:f.data)!=null&&R.fullName?o.jsx(I,{variant:"h4",sx:{py:1.5,fontWeight:700,display:{xs:"none",md:"block"}},children:f.data.fullName}):null,o.jsx(fe,{isMyself:r,switchPassport:t.switchPassport,switchProfile:t.switchProfile,openSettings:O,user:f.data,showFullDid:!1,sx:{display:{md:"none",xs:"block"},mb:1.5}}),B.length>0&&a?o.jsxs(g,{sx:{overflow:"auto",padding:"1px"},children:[o.jsx(ve,{variant:"line",tabs:B,current:a,onChange:N,sx:{mb:1.5}}),!y.data||y.loading?o.jsx(g,{sx:{height:"100%",minWidth:"160px",minHeight:"160px",display:"flex",justifyContent:"center",alignItems:"center"},children:o.jsx(oe,{sx:{color:m.primary100}})}):o.jsx(o.Fragment,{children:U!=null&&U.protected&&!r?o.jsx(g,{children:o.jsx(K,{children:l("underProtected")})}):o.jsx(o.Fragment,{children:e&&o.jsx(g,{...u,children:e})})})]}):null,B.length===0?o.jsx(g,{sx:{display:{xs:r?"none":"block",md:"block"},py:3},children:o.jsx(K,{children:l("emptyContent")})}):null]}),o.jsx(g,{sx:{display:{xs:"none",md:"block"},width:"1px",my:-3,backgroundColor:m.strokeSep}}),o.jsx(g,{sx:{width:{sx:"100%",md:420},maxWidth:"100%",position:"relative"},children:o.jsxs(g,{sx:{display:"flex",flexDirection:"column",gap:2.5,position:{xs:"static",md:n?"sticky":"static"},top:F=>n?F.spacing(3):"unset"},children:[o.jsx(fe,{isMyself:r,switchPassport:t.switchPassport,switchProfile:t.switchProfile,openSettings:O,user:f.data,sx:{display:{xs:"none",md:"block"}}}),r?o.jsxs(o.Fragment,{children:[o.jsxs(g,{children:[o.jsx(I,{sx:{fontWeight:600,mb:1.5},children:l("myInfo")}),o.jsx(So,{user:f.data})]}),o.jsxs(g,{children:[o.jsx(I,{sx:{fontWeight:600,mb:1.5},children:l("passport")}),o.jsx(Ro,{user:f.data})]})]}):null]})})]})},[f,B,r,U,y,a,n]);return!x&&!a&&((ie=(ae=C==null?void 0:C.navigation)==null?void 0:ae.userCenter)==null?void 0:ie.length)>0?(window.location.replace((le=(se=C==null?void 0:C.navigation)==null?void 0:se.userCenter[0])==null?void 0:le.link),null):o.jsxs(g,{sx:{backgroundColor:m.backgroundsBgSubtitle,minHeight:"100vh",display:"flex",flexDirection:"column"},children:[o.jsx(Qe,{bordered:!0,...h}),o.jsxs(g,{flex:1,sx:{width:"100%",maxWidth:1200,margin:"0 auto",p:3,display:"flex",alignItems:"stretch",flexDirection:{xs:"column",md:"row"},gap:2.5},children:[Y,E]}),s?null:o.jsx(Ke,{bordered:!0,...i})]})}function Pt(){const a=Ve().tab,{t:u}=z();return o.jsxs(o.Fragment,{children:[o.jsx(qe,{children:o.jsx("title",{children:u("pageTitle.userCenter")})}),o.jsx(Fo,{disableAutoRedirect:a==="settings",autoPopupSetting:a==="settings"})]})}export{Pt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as B,j as l,B as g,A as $,T as b,bl as G,K as R,g as q,u as H,bN as J,h as E,N as K,a as U,b as L,bG as k,bD as Y,dK as Q}from"./index-
|
|
1
|
+
import{f as B,j as l,B as g,A as $,T as b,bl as G,K as R,g as q,u as H,bN as J,h as E,N as K,a as U,b as L,bG as k,bD as Y,dK as Q}from"./index-BqsMd8kb.js";import{D as X}from"./index-BXCKXS5j.js";import{U as j,d as F}from"./info-outline-rounded-BTpTFmEK.js";class Z extends Error{constructor(n){super(),this.name="AbortError",this.message=n}}const O=e=>globalThis.DOMException===void 0?new Z(e):new DOMException(e),N=e=>{const n=e.reason===void 0?O("This operation was aborted."):e.reason;return n instanceof Error?n:O(n)};async function ee(e,n,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:i=!0,signal:u}={}){return new Promise((y,C)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof n!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);const r=[],I=[],m=new Map;let c=!1,x=!1,S=!1,A=0,v=0;const D=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),h=t=>{c=!0,x=!0,C(t)};u&&(u.aborted&&h(N(u)),u.addEventListener("abort",()=>{h(N(u))}));const w=async()=>{if(x)return;const t=await D.next(),o=v;if(v++,t.done){if(S=!0,A===0&&!x){if(!i&&I.length>0){h(new AggregateError(I));return}if(x=!0,m.size===0){y(r);return}const a=[];for(const[d,p]of r.entries())m.get(d)!==M&&a.push(p);y(a)}return}A++,(async()=>{try{const a=await t.value;if(x)return;const d=await n(a,o);d===M&&m.set(o,d),r[o]=d,A--,await w()}catch(a){if(i)h(a);else{I.push(a),A--;try{await w()}catch(d){h(d)}}}})()};(async()=>{for(let t=0;t<s;t++){try{await w()}catch(o){h(o);break}if(S||c)break}})()})}const M=Symbol("skip");async function te(e,n){return ee(e,s=>s(),n)}function oe({user:e,sessionUser:n}){const s=B(()=>{var i;return(i=(e==null?void 0:e.passports)||[])==null?void 0:i.find(u=>u.name===n.role)},[e==null?void 0:e.passports,n==null?void 0:n.role]);return l.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx($,{size:40,variant:"circle",shape:"circle",src:n.avatar,did:n.did}),l.jsxs(g,{children:[l.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[l.jsx(b,{sx:{whiteSpace:"normal",wordBreak:"break-all"},children:n.fullName}),l.jsx(G,{label:(s==null?void 0:s.title)||(s==null?void 0:s.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:R.textBase,borderColor:R.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5}})]}),l.jsx(b,{variant:"body2",color:"grey",children:n.email})]})]})}const ne={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},W="Reserved IP",z="ip-region-cache";async function re(e){const n=`https://ipapi.co/${e}/json/`,i=await(await fetch(n)).json();let u="";return i.error?i.reserved&&(u=W):u=[i.country_name,i.region,i.city].filter(Boolean).join("/"),u}async function se(e){const n=`https://api.ip.sb/geoip/${e}`,i=await(await fetch(n)).json();let u="";return i.error?i.reserved&&(u=W):u=[i.country,i.region,i.city].filter(Boolean).join("/"),u}async function ie(e){let n="",s={};try{const i=localStorage.getItem(z);i&&(s=JSON.parse(i))}catch{s={}}if(s[e])n=s[e];else{try{n=await se(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!n)try{n=await re(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(n){const i=Object.keys(s);i.length>100&&delete s[i[0]],s[e]&&delete s[e],s[e]=n,localStorage.setItem(z,JSON.stringify(s))}return n}async function ae(e){return Promise.all(e.map(n=>ie(n)))}const P=e=>new j(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[j.BROWSER.NAME,j.BROWSER.VERSION]]}).getResult();function de({user:e,showAction:n=!0,showUser:s=!0}){const i=q(),{locale:u}=H(),{confirmApi:y,confirmHolder:C}=J(),r=E((t,o={})=>Y(ne,t,u,"en",o)),I=E(async()=>{let t=e==null?void 0:e.userSessions;t||(t=await F.userSession.getUserSessions({did:e.did}));try{const a=t==null?void 0:t.map((f,T)=>[T,f.lastLoginIp]).filter(f=>!!f[1]),d=a==null?void 0:a.map(f=>f[1]),p=await ae(d);for(let f=0;f<p.length;f++){const T=p[f],V=a[f],_=t[V[0]];_.ipRegion=T}}catch(a){console.warn("Failed to convert ip to region"),console.error(a)}const o=new Date().getTime();return Q(t,a=>a.visitorId===i?-1:o-new Date(a.updatedAt).getTime())}),m=K(I),c=B(()=>m.data||[],[m.data]),x=B(()=>c.reduce((t,o)=>(t[o.lastLoginIp]=o.ipRegion,t),{}),[c]),S=E(({visitorId:t})=>{y.open({title:r("logoutThisSession"),content:r("logoutThisSessionConfirm"),confirmButtonText:r("confirm"),cancelButtonText:r("cancel"),onConfirm:async()=>{await F.user.logout({visitorId:t}),m.refresh(),y.close()}})}),A=B(()=>c.filter(o=>o.visitorId!==i),[c]),v=E(()=>{y.open({title:r("logoutAllSession"),content:r("logoutAllSessionConfirm"),confirmButtonText:r("confirm"),cancelButtonText:r("cancel"),onConfirm:async()=>{const t=A.map(o=>()=>F.user.logout({visitorId:o.visitorId}));await te(t,{concurrency:3,stopOnError:!1}),m.refresh(),y.close()}})}),D=[];n&&D.push(l.jsx(U,{title:r("logoutAllTips"),children:l.jsx(L,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:v,disabled:A.length===0,children:r("logoutAll")})},"logoutAll"));const h=B(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),w=[{label:r("platform"),name:"platform",options:{customBodyRenderLite:t=>{var d,p;const o=c[t],a=P(o.ua);return l.jsx(g,{children:[(d=a.os)==null?void 0:d.name,(p=a.os)==null?void 0:p.version].filter(Boolean).join("/")||r("unknown")})}}},{label:r("deviceType"),name:"deviceType",options:{customBodyRenderLite:t=>{var d,p;const o=c[t],a=P(o.ua);return l.jsx(g,{children:[(d=a.browser)==null?void 0:d.name,(p=a.browser)==null?void 0:p.version].filter(Boolean).join("/")||r("unknown")})}}},{label:r("walletOS"),name:"walletOS",options:{customBodyRenderLite:t=>{var a;const o=c[t];return l.jsx(g,{children:((a=o.extra)==null?void 0:a.walletOS)||r("unknown")})}}},s&&{label:r("user"),name:"user",options:{customBodyRenderLite:t=>{const o=c[t];return l.jsx(oe,{sessionUser:o.user,user:e})}}},{label:r("createdAt"),name:"createdAt",options:{customBodyRenderLite:t=>{const o=c[t];return o.createdAt?l.jsx(k,{value:o.createdAt,relativeRange:3*86400*1e3,locale:u}):r("unknown")}}},{label:r("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:t=>{const o=c[t];return o.status==="expired"?r("expired"):l.jsx(k,{value:o.updatedAt,relativeRange:3*86400*1e3,locale:u})}}},{label:r("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:t=>{const o=c[t];return l.jsx(g,{children:x[o.lastLoginIp]?l.jsxs(l.Fragment,{children:[l.jsx(b,{variant:"body2",children:x[o.lastLoginIp]}),l.jsx(b,{variant:"body2",color:"grey",children:o.lastLoginIp||r("unknown")})]}):l.jsx(b,{children:o.lastLoginIp||r("unknown")})})}}},n&&{label:r("actions"),name:"actions",options:{customBodyRenderLite:t=>{const o=c[t];return l.jsx(g,{children:l.jsx(L,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:i===o.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>S({visitorId:o.visitorId}),children:o.status==="expired"?r("remove"):i===o.visitorId?r("currentSession"):r("logout")})})}}}].filter(Boolean);return l.jsxs(g,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[C,l.jsx(X,{locale:u,data:c,columns:w,customButtons:D,options:h,loading:m.loading})]})}export{de as U};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aW as l,e$ as s,f0 as h,aa as P,x as u}from"./index-
|
|
1
|
+
import{aW as l,e$ as s,f0 as h,aa as P,x as u}from"./index-BqsMd8kb.js";const d=s;var c=(e,r)=>d(e)===d(r);const x=l(c),E=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=E(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&x(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aw as _,ax as i,a0 as e,j as r,ay as a}from"./index-
|
|
1
|
+
import{aw as _,ax as i,a0 as e,j as r,ay as a}from"./index-BqsMd8kb.js";const u={en:_(i),ar:()=>e(()=>import("./ar-D80LEtfP.js"),[]).then(t=>_(t.default)),de:()=>e(()=>import("./de-R8SpyfWD.js"),[]).then(t=>_(t.default)),es:()=>e(()=>import("./es-DQJXbL8c.js"),[]).then(t=>_(t.default)),fr:()=>e(()=>import("./fr-ojA_joLk.js"),[]).then(t=>_(t.default)),hi:()=>e(()=>import("./hi-BQAxHgmg.js"),[]).then(t=>_(t.default)),id:()=>e(()=>import("./id-BerMjI8d.js"),[]).then(t=>_(t.default)),ja:()=>e(()=>import("./ja-BO4aqMDb.js"),[]).then(t=>_(t.default)),ko:()=>e(()=>import("./ko-Cv-NiLYG.js"),[]).then(t=>_(t.default)),pt:()=>e(()=>import("./pt-DfarVqto.js"),[]).then(t=>_(t.default)),ru:()=>e(()=>import("./ru-DeqfYyhe.js"),[]).then(t=>_(t.default)),th:()=>e(()=>import("./th-BEfUwHXu.js"),[]).then(t=>_(t.default)),vi:()=>e(()=>import("./vi-CVN1WwF4.js"),[]).then(t=>_(t.default)),"zh-TW":()=>e(()=>import("./zh-tw-kaMajsUI.js"),[]).then(t=>_(t.default)),zh:()=>e(()=>import("./zh-Bgfgr3pp.js"),[]).then(t=>_(t.default))};function E(t){return function(o){return r.jsx(a,{translations:u,children:r.jsx(t,{...o})})}}export{E as w};
|
package/dist/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
padding: 0;
|
|
14
14
|
}
|
|
15
15
|
</style>
|
|
16
|
-
<script type="module" crossorigin src="/.well-known/service/static/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/.well-known/service/static/assets/index-BqsMd8kb.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/.well-known/service/static/assets/index-CCovGSMB.css">
|
|
18
18
|
<link rel="manifest" href="/.well-known/service/static/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/.well-known/service/static/registerSW.js"></script></head>
|
|
19
19
|
|
package/dist/service-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
try{self["workbox:core:7.0.0"]&&_()}catch{}const Q=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},z=Q;class h extends Error{constructor(e,t){const n=z(e,t);super(n),this.name=e,this.details=t}}const j=new Set;function J(s){j.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),X=s=>{for(const e of Object.keys(d))s(e)},x={updateDetails:s=>{X(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function K(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function Y(s,e,t,n){const a=K(e.url,t);if(e.url===a)return s.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,r);for(const c of i){const o=K(c.url,t);if(a===o)return s.match(c,n)}}let m;function Z(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}function F(s){s.then(()=>{})}class ee{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}async function te(){for(const s of j)await s()}const se=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function ne(s){return new Promise(e=>setTimeout(e,s))}function A(s,e){const t=e();return s.waitUntil(t),t}async function ae(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new h("cross-origin-copy-response",{origin:t});const n=s.clone(),a={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},r=e?e(a):a,i=Z()?n.body:await n.blob();return new Response(i,r)}function re(){self.addEventListener("activate",()=>self.clients.claim())}try{self["workbox:precaching:7.0.0"]&&_()}catch{}const ie="__WB_REVISION__";function ce(s){if(!s)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const r=new URL(s,location.href);return{cacheKey:r.href,url:r.href}}const{revision:e,url:t}=s;if(!t)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(!e){const r=new URL(t,location.href);return{cacheKey:r.href,url:r.href}}const n=new URL(t,location.href),a=new URL(t,location.href);return n.searchParams.set(ie,e),{cacheKey:n.href,url:a.href}}class oe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const a=t.originalRequest.url;n?this.notUpdatedURLs.push(a):this.updatedURLs.push(a)}return n}}}class le{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const a=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return a?new Request(a,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:7.0.0"]&&_()}catch{}function b(s){return typeof s=="string"?new Request(s):s}class he{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new ee,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=b(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const a=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const r=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:r,response:i});return i}catch(i){throw a&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:a.clone(),request:r.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=b(e);let n;const{cacheName:a,matchOptions:r}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},r),{cacheName:a});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:a,matchOptions:r,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=b(e);await ne(0);const a=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:se(a.url)});const r=await this._ensureResponseSafeToCache(t);if(!r)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),g=l?await Y(o,a.clone(),["__WB_REVISION__"],c):null;try{await o.put(a,l?r.clone():r)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await te(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:g,newResponse:r.clone(),request:a,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let a=e;for(const r of this.iterateCallbacks("cacheKeyWillBeUsed"))a=b(await r({mode:t,request:a,event:this.event,params:this.params}));this._cacheKeys[n]=a}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield r=>{const i=Object.assign(Object.assign({},r),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const a of this.iterateCallbacks("cacheWillUpdate"))if(t=await a({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class v{constructor(e={}){this.cacheName=x.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,a="params"in e?e.params:void 0,r=new he(this,{event:t,request:n,params:a}),i=this._getResponse(r,n,t),c=this._awaitComplete(i,r,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let a;try{if(a=await this._handle(t,e),!a||a.type==="error")throw new h("no-response",{url:t.url})}catch(r){if(r instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(a=await i({error:r,event:n,request:t}),a)break}if(!a)throw r}for(const r of e.iterateCallbacks("handlerWillRespond"))a=await r({event:n,request:t,response:a});return a}async _awaitComplete(e,t,n,a){let r,i;try{r=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:a,request:n,response:r}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:a,request:n,response:r,error:i}),t.destroy(),i)throw i}}class p extends v{constructor(e={}){e.cacheName=x.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const a=t.params||{};if(this._fallbackToNetwork){const r=a.integrity,i=e.integrity,c=!i||i===r;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||r:void 0})),r&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new h("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new h("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,a]of this.plugins.entries())a!==p.copyRedirectedCacheableResponsesPlugin&&(a===p.defaultPrecacheCacheabilityPlugin&&(e=n),a.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ae(s):s}};class ue{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:x.getPrecacheName(e),plugins:[...t,new le({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:a,url:r}=ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(r)&&this._urlsToCacheKeys.get(r)!==a)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(r),secondEntry:a});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(a)&&this._cacheKeysToIntegrities.get(a)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:r});this._cacheKeysToIntegrities.set(a,n.integrity)}if(this._urlsToCacheKeys.set(r,a),this._urlsToCacheModes.set(r,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")}
|
|
2
|
-
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new oe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),l=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const q=()=>(D||(D=new ue),D);try{self["workbox:routing:7.0.0"]&&_()}catch{}const H="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=H){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class de extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class fe{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=H){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const pe=()=>(w||(w=new fe,w.addFetchListener(),w.addCacheListener()),w);function I(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new de(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return pe().registerRoute(n),n}function ge(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*me(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=ge(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class we extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of me(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ye(s){const e=q(),t=new we(e,s);I(t)}function _e(s){q().precache(s)}function Re(s,e){_e(s),ye(e)}const be=(s,e)=>e.some(t=>s instanceof t);let O,S;function Ce(){return O||(O=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xe(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V=new WeakMap,T=new WeakMap,$=new WeakMap,L=new WeakMap,M=new WeakMap;function Ee(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&V.set(t,s)}).catch(()=>{}),M.set(e,s),e}function De(s){if(T.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});T.set(s,e)}let P={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return T.get(s);if(e==="objectStoreNames")return s.objectStoreNames||$.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Le(s){P=s(P)}function Ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return $.set(n,e.sort?e.sort():[e]),f(n)}:xe().includes(s)?function(...e){return s.apply(U(this),e),f(V.get(this))}:function(...e){return f(s.apply(U(this),e))}}function ke(s){return typeof s=="function"?Ue(s):(s instanceof IDBTransaction&&De(s),be(s,Ce())?new Proxy(s,P):s)}function f(s){if(s instanceof IDBRequest)return Ee(s);if(L.has(s))return L.get(s);const e=ke(s);return e!==s&&(L.set(s,e),M.set(e,s)),e}const U=s=>M.get(s);function Te(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function Pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ve=["get","getKey","getAll","getAllKeys","count"],Ie=["put","add","delete","clear"],k=new Map;function W(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(k.get(e))return k.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Ie.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ve.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return k.set(e,r),r}Le(s=>({...s,get:(e,t,n)=>W(e,t)||s.get(e,t,n),has:(e,t)=>!!W(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.0.0"]&&_()}catch{}const Me="workbox-expiration",y="cache-entries",B=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ne{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(y,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Pe(this._cacheName)}async setTimestamp(e,t){e=B(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(y,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(y,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(y).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&i>=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(y,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+B(e)}async getDb(){return this._db||(this._db=await Te(Me,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ne(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,F(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}class Ae{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:r})=>{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);F(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&J(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}class Oe extends v{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new h("no-response",{url:e.url,error:a});return n}}const Se={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class We extends v{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Se)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new h("no-response",{url:e.url,error:r});return a}}Re(([{"revision":null,"url":"assets/access-control-CjZfkzkf.js"},{"revision":null,"url":"assets/actions-BJosy9X2.js"},{"revision":null,"url":"assets/Add-C69qn2wR.js"},{"revision":null,"url":"assets/add-component-core-Bd75KmSE.js"},{"revision":null,"url":"assets/add-component-core-CxkJY_14.css"},{"revision":null,"url":"assets/add-resource-Blgo6VIb.js"},{"revision":null,"url":"assets/AddBox-B6Fwg2Rf.js"},{"revision":null,"url":"assets/addon-BdxxNkJH.js"},{"revision":null,"url":"assets/Alert-ssp0y7Ib.js"},{"revision":null,"url":"assets/analytics-2367oE4k.js"},{"revision":null,"url":"assets/api-DcYvzDkD.js"},{"revision":null,"url":"assets/ar-B34f4HdK.js"},{"revision":null,"url":"assets/ar-D80LEtfP.js"},{"revision":null,"url":"assets/ArrowDropDown-BP0ud9Hj.js"},{"revision":null,"url":"assets/audit-logs-BCx41NLy.css"},{"revision":null,"url":"assets/audit-logs-C9bazLVN.js"},{"revision":null,"url":"assets/Avatar-D2tnGRpU.js"},{"revision":null,"url":"assets/button-DbDB2qx6.js"},{"revision":null,"url":"assets/ButtonGroup-BLLuxmvy.js"},{"revision":null,"url":"assets/CheckCircle-BfaSnFeT.js"},{"revision":null,"url":"assets/ChevronRight-Cy-7I5by.js"},{"revision":null,"url":"assets/click-to-copy-CZvSRIGN.js"},{"revision":null,"url":"assets/CloseOutlined-sn7xb1bx.js"},{"revision":null,"url":"assets/complete-C8SMtDzc.js"},{"revision":null,"url":"assets/component-DAWLQ6nL.js"},{"revision":null,"url":"assets/config-DpteWrvn.js"},{"revision":null,"url":"assets/config-DY1CerHN.js"},{"revision":null,"url":"assets/config-navigation-DUYmMrZ9.js"},{"revision":null,"url":"assets/config-space-B7Cgf5Se.js"},{"revision":null,"url":"assets/confirm-pPzim8uI.js"},{"revision":null,"url":"assets/connect-4dSo0Eiu.js"},{"revision":null,"url":"assets/connect-M2gGxpP6.js"},{"revision":null,"url":"assets/connect-to-B8kCNKHN.js"},{"revision":null,"url":"assets/content-layout-6_5eggY7.js"},{"revision":null,"url":"assets/dashboard-nWvY-y5T.js"},{"revision":null,"url":"assets/de-CbWSpQPN.js"},{"revision":null,"url":"assets/de-R8SpyfWD.js"},{"revision":null,"url":"assets/Delete-B2AHSgLp.js"},{"revision":null,"url":"assets/DeleteOutline-CoZFf1fL.js"},{"revision":null,"url":"assets/did-address-CL3Ygw6p.js"},{"revision":null,"url":"assets/domain-list-D3SCkX5b.js"},{"revision":null,"url":"assets/domain-ngITiwlU.js"},{"revision":null,"url":"assets/Done-DIK-gyz7.js"},{"revision":null,"url":"assets/Download-DTMBVNgK.js"},{"revision":null,"url":"assets/Edit-6i4-SV5e.js"},{"revision":null,"url":"assets/EditIcon-DR2M6B2a.js"},{"revision":null,"url":"assets/Error-D5jNQIhZ.js"},{"revision":null,"url":"assets/es-D2WPMiOg.js"},{"revision":null,"url":"assets/es-DQJXbL8c.js"},{"revision":null,"url":"assets/exchange-passport-D3hdhtRp.js"},{"revision":null,"url":"assets/ExpandMore-BlRkbxIp.js"},{"revision":null,"url":"assets/fallback-C7-7MBkn.js"},{"revision":null,"url":"assets/FilterList-5-9UBP9o.js"},{"revision":null,"url":"assets/FormControl-DqRtQrj4.js"},{"revision":null,"url":"assets/FormControlLabel-CgWEo7K_.js"},{"revision":null,"url":"assets/FormGroup-BmQQZp_5.js"},{"revision":null,"url":"assets/fr-BU_67rSB.js"},{"revision":null,"url":"assets/fr-ojA_joLk.js"},{"revision":null,"url":"assets/fuel-Cc2B50AI.js"},{"revision":null,"url":"assets/fullpage-Dw6TVBrW.js"},{"revision":null,"url":"assets/Google-Dqg-7vso.js"},{"revision":null,"url":"assets/Grid-BIu6B9VD.js"},{"revision":null,"url":"assets/hi-BQAxHgmg.js"},{"revision":null,"url":"assets/hi-D5wWKqkp.js"},{"revision":null,"url":"assets/Hidden-CyJIFPqO.js"},{"revision":null,"url":"assets/home-xAHytUWc.js"},{"revision":null,"url":"assets/id-BerMjI8d.js"},{"revision":null,"url":"assets/id-Do44PG5N.js"},{"revision":null,"url":"assets/iframe-CjfFUNKJ.js"},{"revision":null,"url":"assets/index-56o2iokr.js"},{"revision":null,"url":"assets/index-5x037-9C.js"},{"revision":null,"url":"assets/index-8MsvtmQl.js"},{"revision":null,"url":"assets/index-BlQH_bza.js"},{"revision":null,"url":"assets/index-BmYpFvRB.js"},{"revision":null,"url":"assets/index-BpozpbRW.js"},{"revision":null,"url":"assets/index-Bqkn_aa3.js"},{"revision":null,"url":"assets/index-BWj9cvWK.js"},{"revision":null,"url":"assets/index-BXDXNTsu.js"},{"revision":null,"url":"assets/index-C2bRXXcw.js"},{"revision":null,"url":"assets/index-C5wALap9.js"},{"revision":null,"url":"assets/index-C7FkvChp.js"},{"revision":null,"url":"assets/index-CCovGSMB.css"},{"revision":null,"url":"assets/index-CJpqNyVi.js"},{"revision":null,"url":"assets/index-Coe2L95f.js"},{"revision":null,"url":"assets/index-CS4hdKgN.js"},{"revision":null,"url":"assets/index-CYChkNo6.js"},{"revision":null,"url":"assets/index-CYMsHjcv.js"},{"revision":null,"url":"assets/index-D-XBJ_hS.js"},{"revision":null,"url":"assets/index-D9bkjrIm.js"},{"revision":null,"url":"assets/index-DlPsSbdP.js"},{"revision":null,"url":"assets/index-DNO8iFFj.js"},{"revision":null,"url":"assets/index-DoFezns_.js"},{"revision":null,"url":"assets/index-DSr4gSZ6.js"},{"revision":null,"url":"assets/index-DTEEl-sV.js"},{"revision":null,"url":"assets/index-DU3JORH0.css"},{"revision":null,"url":"assets/index-Dwkydwe_.js"},{"revision":null,"url":"assets/index-i3hx5_MJ.js"},{"revision":null,"url":"assets/index-iaLkEwzP.js"},{"revision":null,"url":"assets/index-lps3yS0-.js"},{"revision":null,"url":"assets/index-MHeXbht_.js"},{"revision":null,"url":"assets/index-pr0coJZh.js"},{"revision":null,"url":"assets/index-q83gH7uv.js"},{"revision":null,"url":"assets/index-uI5ivd9H.js"},{"revision":null,"url":"assets/index.es-BbZKY7XB.js"},{"revision":null,"url":"assets/index.esm-Bx08zGob.js"},{"revision":null,"url":"assets/info-outline-rounded-Bfjx6SIO.js"},{"revision":null,"url":"assets/InfoOutlined-BrDpDVIb.js"},{"revision":null,"url":"assets/InputAdornment-4xRIAUiI.js"},{"revision":null,"url":"assets/InputLabel-Ci8Zez4U.js"},{"revision":null,"url":"assets/invitation-MLAwJ9Ra.js"},{"revision":null,"url":"assets/invite-DkO9FeY_.js"},{"revision":null,"url":"assets/issue-passport-C7JZcRZR.js"},{"revision":null,"url":"assets/item-MF9V1-6K.js"},{"revision":null,"url":"assets/ja-BO4aqMDb.js"},{"revision":null,"url":"assets/ja-D8qblxbX.js"},{"revision":null,"url":"assets/jss-plugin-props-sort.esm-rVwFJx4d.js"},{"revision":null,"url":"assets/ko-C8eR3MIF.js"},{"revision":null,"url":"assets/ko-Cv-NiLYG.js"},{"revision":null,"url":"assets/LastPage-u0X1CCrf.js"},{"revision":null,"url":"assets/Launch-CPOdFkdd.js"},{"revision":null,"url":"assets/launch-result-message-DEcCutu3.js"},{"revision":null,"url":"assets/LaunchOutlined-BFmhp0eE.js"},{"revision":null,"url":"assets/layout-DOFQutAQ.js"},{"revision":null,"url":"assets/Link-3QVwMQPk.js"},{"revision":null,"url":"assets/list-header-F6N0Lbga.js"},{"revision":null,"url":"assets/ListItemText-BbCA9KKV.js"},{"revision":null,"url":"assets/localization-BSGMGQL8.js"},{"revision":null,"url":"assets/LockIcon-BH8DxlZk.js"},{"revision":null,"url":"assets/log-_MCoFO-Q.js"},{"revision":null,"url":"assets/log-D33dFtt_.css"},{"revision":null,"url":"assets/login-g24bmOOt.js"},{"revision":null,"url":"assets/login-oauth-callback-IIluZQpi.js"},{"revision":null,"url":"assets/logo-uploader-j0OGjkoc.js"},{"revision":null,"url":"assets/Loop-DH87MBn_.js"},{"revision":null,"url":"assets/lost-passport-CFNDhKO4.js"},{"revision":null,"url":"assets/lottie-sLx_MIFH.js"},{"revision":null,"url":"assets/mode-B2dWMeTO.js"},{"revision":null,"url":"assets/MoreHoriz-BgseW-ge.js"},{"revision":null,"url":"assets/MoreVert-K_1niM7c.js"},{"revision":null,"url":"assets/notifications-BdAvASdZ.js"},{"revision":null,"url":"assets/OpenInNew-CjFvxH6M.js"},{"revision":null,"url":"assets/overview-Buny86cT.js"},{"revision":null,"url":"assets/page-header-iStgNt-t.js"},{"revision":null,"url":"assets/Pagination-DKihrHVe.js"},{"revision":null,"url":"assets/permission-DFHjiPOO.js"},{"revision":null,"url":"assets/PlayArrow-DOP79lp-.js"},{"revision":null,"url":"assets/preact.module-B1z5cdvs.js"},{"revision":null,"url":"assets/preferences-CBDwdPlD.js"},{"revision":null,"url":"assets/pt-DfarVqto.js"},{"revision":null,"url":"assets/pt-Dly5Myel.js"},{"revision":null,"url":"assets/publish-resource-B8njhGLx.js"},{"revision":null,"url":"assets/RadioGroup-YSjZvhX-.js"},{"revision":null,"url":"assets/react-4Vr75H9n.js"},{"revision":null,"url":"assets/react-BW7E7-P9.css"},{"revision":null,"url":"assets/redux-BwEqkH3a.js"},{"revision":null,"url":"assets/ru-C9Wh9IKf.js"},{"revision":null,"url":"assets/ru-DeqfYyhe.js"},{"revision":null,"url":"assets/Search-BR5ea3vd.js"},{"revision":null,"url":"assets/Select-CKfMC7P9.js"},{"revision":null,"url":"assets/selector-haOpsVEc.js"},{"revision":null,"url":"assets/ServerLogo-C8axw3cY.js"},{"revision":null,"url":"assets/session-BxfJegkk.js"},{"revision":null,"url":"assets/setup-DMBqOQvQ.js"},{"revision":null,"url":"assets/Skeleton-DlvCFRkz.js"},{"revision":null,"url":"assets/slicedToArray-x22-0sXq.js"},{"revision":null,"url":"assets/Slider-BR3lL8ok.js"},{"revision":null,"url":"assets/spaces-fv1YlSu4.js"},{"revision":null,"url":"assets/start-CmsOWeku.js"},{"revision":null,"url":"assets/step-actions-AXZRiRyD.js"},{"revision":null,"url":"assets/Stepper-CQAZ_wrh.js"},{"revision":null,"url":"assets/studio-DmUAxFbb.js"},{"revision":null,"url":"assets/switch-control-Lx0DlzPA.js"},{"revision":null,"url":"assets/TableRow-G_vHt3-a.js"},{"revision":null,"url":"assets/TextField-DvirKXAG.js"},{"revision":null,"url":"assets/th-B6Z2fc62.js"},{"revision":null,"url":"assets/th-BEfUwHXu.js"},{"revision":null,"url":"assets/Toolbar-BwsW1-XD.js"},{"revision":null,"url":"assets/toUpper-BgobQRvN.js"},{"revision":null,"url":"assets/transfer-WMTLv9DH.js"},{"revision":null,"url":"assets/uniqBy-BnjBhJxf.js"},{"revision":null,"url":"assets/unsubscribe-BFzCxIJM.js"},{"revision":null,"url":"assets/use-blocklet-info-for-connect-did-spaces-CIjBkljS.js"},{"revision":null,"url":"assets/use-passport-id-B-b-_oYF.js"},{"revision":null,"url":"assets/useAsync-ByTahkQO.js"},{"revision":null,"url":"assets/useFormControl-CeAUerJZ.js"},{"revision":null,"url":"assets/useLocalStorage-B_i310mR.js"},{"revision":null,"url":"assets/user-center-sGvXEgY6.js"},{"revision":null,"url":"assets/user-sessions-BBUW9BFw.js"},{"revision":null,"url":"assets/useSetState-BB4kdpGs.js"},{"revision":null,"url":"assets/useSlot-CsiuTStm.js"},{"revision":null,"url":"assets/util-DeMILzW3.js"},{"revision":null,"url":"assets/vi-CVN1WwF4.js"},{"revision":null,"url":"assets/vi-Di0ynKe6.js"},{"revision":null,"url":"assets/ViewList-DRQAW-9s.js"},{"revision":null,"url":"assets/wrap-locale-CeRDb2BZ.js"},{"revision":null,"url":"assets/zh-Bgfgr3pp.js"},{"revision":null,"url":"assets/zh-e04FR-Ps.js"},{"revision":null,"url":"assets/zh-tw-DlepKNg6.js"},{"revision":null,"url":"assets/zh-tw-kaMajsUI.js"},{"revision":"4969c881c1e598eef17ba3329bdd0f3f","url":"index.html"},{"revision":"186b2f1889d7c89ecd30e422ab415c8a","url":"registerSW.js"},{"revision":"07a287e43ae8e959a20d6b367a581667","url":"router-template-styles/styles.css"},{"revision":"ecdddc9b1297e7511cad18529d5cfd89","url":"manifest.webmanifest"}]||[]).filter(s=>s.url!=="/"&&!s.url.includes("index.html")));re();self.addEventListener("activate",()=>{console.log("Service Worker activated")});self.addEventListener("install",s=>{console.log("Service Worker installed"),s.waitUntil(self.skipWaiting())});const G=s=>!!(s.method!=="GET"||s.url.includes("/api")||s.url.includes("__meta__.js")||s.url.includes("__blocklet__.js"));I(s=>{const{request:e}=s;return G(e)?!1:e.url.includes("/static/")},new Oe({cacheName:"static",plugins:[new Ae({maxEntries:200})]}));I(s=>{const{request:e}=s;return G(e)?!1:e.url.includes("/images/")||e.url.includes("/router/-template-styles/")},new We);
|
|
2
|
+
This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new oe;this.strategy.plugins.push(t);for(const[r,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(r),l=new Request(r,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:a}=t;return{updatedURLs:n,notUpdatedURLs:a}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),a=new Set(this._urlsToCacheKeys.values()),r=[];for(const i of n)a.has(i.url)||(await t.delete(i),r.push(i.url));return{deletedURLs:r}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let D;const q=()=>(D||(D=new ue),D);try{self["workbox:routing:7.0.0"]&&_()}catch{}const H="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class R{constructor(e,t,n=H){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class de extends R{constructor(e,t,n){const a=({url:r})=>{const i=e.exec(r.href);if(i&&!(r.origin!==location.origin&&i.index!==0))return i.slice(1)};super(a,t,n)}}class fe{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(a=>{typeof a=="string"&&(a=[a]);const r=new Request(...a);return this.handleRequest({request:r,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const a=n.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:a,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:r})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:r})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:a}){const r=this._routes.get(n.method)||[];for(const i of r){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:a});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=H){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const pe=()=>(w||(w=new fe,w.addFetchListener(),w.addCacheListener()),w);function I(s,e,t){let n;if(typeof s=="string"){const r=new URL(s,location.href),i=({url:c})=>c.href===r.href;n=new R(i,e,t)}else if(s instanceof RegExp)n=new de(s,e,t);else if(typeof s=="function")n=new R(s,e,t);else if(s instanceof R)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return pe().registerRoute(n),n}function ge(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*me(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:a}={}){const r=new URL(s,location.href);r.hash="",yield r.href;const i=ge(r,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(a){const c=a({url:r});for(const o of c)yield o.href}}class we extends R{constructor(e,t){const n=({request:a})=>{const r=e.getURLsToCacheKeys();for(const i of me(a.url,t)){const c=r.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function ye(s){const e=q(),t=new we(e,s);I(t)}function _e(s){q().precache(s)}function Re(s,e){_e(s),ye(e)}const be=(s,e)=>e.some(t=>s instanceof t);let O,S;function Ce(){return O||(O=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function xe(){return S||(S=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V=new WeakMap,T=new WeakMap,$=new WeakMap,L=new WeakMap,M=new WeakMap;function Ee(s){const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("success",r),s.removeEventListener("error",i)},r=()=>{t(f(s.result)),a()},i=()=>{n(s.error),a()};s.addEventListener("success",r),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&V.set(t,s)}).catch(()=>{}),M.set(e,s),e}function De(s){if(T.has(s))return;const e=new Promise((t,n)=>{const a=()=>{s.removeEventListener("complete",r),s.removeEventListener("error",i),s.removeEventListener("abort",i)},r=()=>{t(),a()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),a()};s.addEventListener("complete",r),s.addEventListener("error",i),s.addEventListener("abort",i)});T.set(s,e)}let P={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return T.get(s);if(e==="objectStoreNames")return s.objectStoreNames||$.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function Le(s){P=s(P)}function Ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(U(this),e,...t);return $.set(n,e.sort?e.sort():[e]),f(n)}:xe().includes(s)?function(...e){return s.apply(U(this),e),f(V.get(this))}:function(...e){return f(s.apply(U(this),e))}}function ke(s){return typeof s=="function"?Ue(s):(s instanceof IDBTransaction&&De(s),be(s,Ce())?new Proxy(s,P):s)}function f(s){if(s instanceof IDBRequest)return Ee(s);if(L.has(s))return L.get(s);const e=ke(s);return e!==s&&(L.set(s,e),M.set(e,s)),e}const U=s=>M.get(s);function Te(s,e,{blocked:t,upgrade:n,blocking:a,terminated:r}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{r&&o.addEventListener("close",()=>r()),a&&o.addEventListener("versionchange",l=>a(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function Pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ve=["get","getKey","getAll","getAllKeys","count"],Ie=["put","add","delete","clear"],k=new Map;function W(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(k.get(e))return k.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,a=Ie.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(a||ve.includes(t)))return;const r=async function(i,...c){const o=this.transaction(i,a?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),a&&o.done]))[0]};return k.set(e,r),r}Le(s=>({...s,get:(e,t,n)=>W(e,t)||s.get(e,t,n),has:(e,t)=>!!W(e,t)||s.has(e,t)}));try{self["workbox:expiration:7.0.0"]&&_()}catch{}const Me="workbox-expiration",y="cache-entries",B=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class Ne{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(y,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&Pe(this._cacheName)}async setTimestamp(e,t){e=B(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},r=(await this.getDb()).transaction(y,"readwrite",{durability:"relaxed"});await r.store.put(n),await r.done}async getTimestamp(e){const n=await(await this.getDb()).get(y,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let a=await n.transaction(y).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;a;){const o=a.value;o.cacheName===this._cacheName&&(e&&o.timestamp<e||t&&i>=t?r.push(a.value):i++),a=await a.continue()}const c=[];for(const o of r)await n.delete(y,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+B(e)}async getDb(){return this._db||(this._db=await Te(Me,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class Ke{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new Ne(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const a of t)await n.delete(a,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,F(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t<n:!0}else return!1}async delete(){this._rerunRequested=!1,await this._timestampModel.expireEntries(1/0)}}class Ae{constructor(e={}){this.cachedResponseWillBeUsed=async({event:t,request:n,cacheName:a,cachedResponse:r})=>{if(!r)return null;const i=this._isResponseDateFresh(r),c=this._getCacheExpiration(a);F(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?r:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const a=this._getCacheExpiration(t);await a.updateTimestamp(n.url),await a.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&J(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new Ke(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),a=new Date(t).getTime();return isNaN(a)?null:a}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}class Oe extends v{async _handle(e,t){let n=await t.cacheMatch(e),a;if(!n)try{n=await t.fetchAndCachePut(e)}catch(r){r instanceof Error&&(a=r)}if(!n)throw new h("no-response",{url:e.url,error:a});return n}}const Se={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class We extends v{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(Se)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let a=await t.cacheMatch(e),r;if(!a)try{a=await n}catch(i){i instanceof Error&&(r=i)}if(!a)throw new h("no-response",{url:e.url,error:r});return a}}Re(([{"revision":null,"url":"assets/access-control-CZnhbObg.js"},{"revision":null,"url":"assets/actions-CFxlQnVb.js"},{"revision":null,"url":"assets/Add-B1KQFZbB.js"},{"revision":null,"url":"assets/add-component-core-CUisTrXt.js"},{"revision":null,"url":"assets/add-component-core-CxkJY_14.css"},{"revision":null,"url":"assets/add-resource-Cg68DwqT.js"},{"revision":null,"url":"assets/AddBox-C_rCPKut.js"},{"revision":null,"url":"assets/addon-htB6vNOx.js"},{"revision":null,"url":"assets/Alert-D7OuAtqq.js"},{"revision":null,"url":"assets/analytics-D0Q9Rbgs.js"},{"revision":null,"url":"assets/api-DZcbXOwe.js"},{"revision":null,"url":"assets/ar-B34f4HdK.js"},{"revision":null,"url":"assets/ar-D80LEtfP.js"},{"revision":null,"url":"assets/ArrowDropDown-DDSSUsgw.js"},{"revision":null,"url":"assets/audit-logs-BCx41NLy.css"},{"revision":null,"url":"assets/audit-logs-DsHwARYT.js"},{"revision":null,"url":"assets/Avatar-BKvod5qm.js"},{"revision":null,"url":"assets/button-CtcdFik9.js"},{"revision":null,"url":"assets/ButtonGroup-B93e6tqm.js"},{"revision":null,"url":"assets/CheckCircle-DgHejmJm.js"},{"revision":null,"url":"assets/ChevronRight-KVhjO69S.js"},{"revision":null,"url":"assets/click-to-copy-DJVlTNr8.js"},{"revision":null,"url":"assets/CloseOutlined-BdzvaiT0.js"},{"revision":null,"url":"assets/complete-CGMY06_W.js"},{"revision":null,"url":"assets/component-C8WremgG.js"},{"revision":null,"url":"assets/config-ggazJABW.js"},{"revision":null,"url":"assets/config-J8uHydLG.js"},{"revision":null,"url":"assets/config-navigation-COwAaVq0.js"},{"revision":null,"url":"assets/config-space-CPyb_eZ-.js"},{"revision":null,"url":"assets/confirm-BjHkE8rM.js"},{"revision":null,"url":"assets/connect-BbzlMR5b.js"},{"revision":null,"url":"assets/connect-BuLrPUuZ.js"},{"revision":null,"url":"assets/connect-to-BQINcy1q.js"},{"revision":null,"url":"assets/content-layout-af8Tk37j.js"},{"revision":null,"url":"assets/dashboard-CMs2secm.js"},{"revision":null,"url":"assets/de-CbWSpQPN.js"},{"revision":null,"url":"assets/de-R8SpyfWD.js"},{"revision":null,"url":"assets/Delete-Cmb6a-TW.js"},{"revision":null,"url":"assets/DeleteOutline-C_JPQWoC.js"},{"revision":null,"url":"assets/did-address-BTH0hYaF.js"},{"revision":null,"url":"assets/domain-CMHk_z2Z.js"},{"revision":null,"url":"assets/domain-list-DFffhAi2.js"},{"revision":null,"url":"assets/Done-Cqcgj3XK.js"},{"revision":null,"url":"assets/Download-DYDCm5jq.js"},{"revision":null,"url":"assets/Edit-JQ58DRtF.js"},{"revision":null,"url":"assets/EditIcon-BuHKvSX-.js"},{"revision":null,"url":"assets/Error-bprXV3Qz.js"},{"revision":null,"url":"assets/es-D2WPMiOg.js"},{"revision":null,"url":"assets/es-DQJXbL8c.js"},{"revision":null,"url":"assets/exchange-passport-CQ4sTk73.js"},{"revision":null,"url":"assets/ExpandMore-CMOFmrRl.js"},{"revision":null,"url":"assets/fallback-BCzfpkx_.js"},{"revision":null,"url":"assets/FilterList-MfdHX_OT.js"},{"revision":null,"url":"assets/FormControl-BrDVvV0w.js"},{"revision":null,"url":"assets/FormControlLabel-Bj1raPoa.js"},{"revision":null,"url":"assets/FormGroup-CTmu8GWz.js"},{"revision":null,"url":"assets/fr-BU_67rSB.js"},{"revision":null,"url":"assets/fr-ojA_joLk.js"},{"revision":null,"url":"assets/fuel-DAtablaD.js"},{"revision":null,"url":"assets/fullpage-DY6OHAG0.js"},{"revision":null,"url":"assets/Google-B8EaETJY.js"},{"revision":null,"url":"assets/Grid-BtGjPvuC.js"},{"revision":null,"url":"assets/hi-BQAxHgmg.js"},{"revision":null,"url":"assets/hi-D5wWKqkp.js"},{"revision":null,"url":"assets/Hidden-DWKJv_Ts.js"},{"revision":null,"url":"assets/home-BfnWYBKb.js"},{"revision":null,"url":"assets/id-BerMjI8d.js"},{"revision":null,"url":"assets/id-Do44PG5N.js"},{"revision":null,"url":"assets/iframe-Cet_1xjB.js"},{"revision":null,"url":"assets/index-6HBsHgLl.js"},{"revision":null,"url":"assets/index-A5YVryx_.js"},{"revision":null,"url":"assets/index-BqsMd8kb.js"},{"revision":null,"url":"assets/index-Bt4rb2Bc.js"},{"revision":null,"url":"assets/index-BXCKXS5j.js"},{"revision":null,"url":"assets/index-BxJWfUoy.js"},{"revision":null,"url":"assets/index-ByPqHR4r.js"},{"revision":null,"url":"assets/index-C5WzGzSj.js"},{"revision":null,"url":"assets/index-C9d9WjZ0.js"},{"revision":null,"url":"assets/index-CCovGSMB.css"},{"revision":null,"url":"assets/index-CgXB8tNh.js"},{"revision":null,"url":"assets/index-CHX9AKKy.js"},{"revision":null,"url":"assets/index-CKhzUQzq.js"},{"revision":null,"url":"assets/index-Cn1zzQRb.js"},{"revision":null,"url":"assets/index-CnV_HSYC.js"},{"revision":null,"url":"assets/index-CZ9EO740.js"},{"revision":null,"url":"assets/index-D-XBJ_hS.js"},{"revision":null,"url":"assets/index-D0TsVpOv.js"},{"revision":null,"url":"assets/index-Dbqss1Fe.js"},{"revision":null,"url":"assets/index-DcHRVIKm.js"},{"revision":null,"url":"assets/index-DG2_Yw8Q.js"},{"revision":null,"url":"assets/index-DJI8p4CV.js"},{"revision":null,"url":"assets/index-DJvJ2Tmc.js"},{"revision":null,"url":"assets/index-DMPZsfun.js"},{"revision":null,"url":"assets/index-DTEEl-sV.js"},{"revision":null,"url":"assets/index-DthjsZ09.js"},{"revision":null,"url":"assets/index-DtNxMhKO.js"},{"revision":null,"url":"assets/index-DU3JORH0.css"},{"revision":null,"url":"assets/index-Dylzk7Aa.js"},{"revision":null,"url":"assets/index-e7NHyY1q.js"},{"revision":null,"url":"assets/index-LSzcGKHj.js"},{"revision":null,"url":"assets/index-NdCq_QfL.js"},{"revision":null,"url":"assets/index-o-Ihmjeu.js"},{"revision":null,"url":"assets/index-zxzrHJEP.js"},{"revision":null,"url":"assets/index.es-BEaw1DFj.js"},{"revision":null,"url":"assets/index.esm-C9zb95qH.js"},{"revision":null,"url":"assets/info-outline-rounded-BTpTFmEK.js"},{"revision":null,"url":"assets/InfoOutlined-BItr8vqq.js"},{"revision":null,"url":"assets/InputAdornment-CGuzdfXX.js"},{"revision":null,"url":"assets/InputLabel-DA3u5GP-.js"},{"revision":null,"url":"assets/invitation-3r-X891j.js"},{"revision":null,"url":"assets/invite-CrWjnaC0.js"},{"revision":null,"url":"assets/issue-passport-CCGBLWf8.js"},{"revision":null,"url":"assets/item-BNHxZM2p.js"},{"revision":null,"url":"assets/ja-BO4aqMDb.js"},{"revision":null,"url":"assets/ja-D8qblxbX.js"},{"revision":null,"url":"assets/jss-plugin-props-sort.esm-CjzdPk2L.js"},{"revision":null,"url":"assets/ko-C8eR3MIF.js"},{"revision":null,"url":"assets/ko-Cv-NiLYG.js"},{"revision":null,"url":"assets/LastPage-DzK9EKF-.js"},{"revision":null,"url":"assets/Launch-p5mGEt8g.js"},{"revision":null,"url":"assets/launch-result-message-D2CQfmUY.js"},{"revision":null,"url":"assets/LaunchOutlined-BiGPJuP-.js"},{"revision":null,"url":"assets/layout--pblhAfc.js"},{"revision":null,"url":"assets/Link-C1R9I8T5.js"},{"revision":null,"url":"assets/list-header-Br5YHewG.js"},{"revision":null,"url":"assets/ListItemText-9kG4LhTP.js"},{"revision":null,"url":"assets/localization-BwDw74Zq.js"},{"revision":null,"url":"assets/LockIcon-BYVTkf1W.js"},{"revision":null,"url":"assets/log-BJjAfVl8.js"},{"revision":null,"url":"assets/log-D33dFtt_.css"},{"revision":null,"url":"assets/login-BQQD6meW.js"},{"revision":null,"url":"assets/login-oauth-callback-Dmleuitf.js"},{"revision":null,"url":"assets/logo-uploader-eDNDJkbn.js"},{"revision":null,"url":"assets/Loop-DoUT9kIB.js"},{"revision":null,"url":"assets/lost-passport-BWTuZR78.js"},{"revision":null,"url":"assets/lottie-VJFQ68oA.js"},{"revision":null,"url":"assets/mode-B2dWMeTO.js"},{"revision":null,"url":"assets/MoreHoriz-B921hlWY.js"},{"revision":null,"url":"assets/MoreVert-C4XqRKE4.js"},{"revision":null,"url":"assets/notifications-DwecRDR9.js"},{"revision":null,"url":"assets/OpenInNew-DjHvMAdQ.js"},{"revision":null,"url":"assets/overview-BMcMnUtN.js"},{"revision":null,"url":"assets/page-header-EqcdM7n1.js"},{"revision":null,"url":"assets/Pagination-BlJxwbJW.js"},{"revision":null,"url":"assets/permission-D9TNO0kT.js"},{"revision":null,"url":"assets/PlayArrow-D4vxqsKR.js"},{"revision":null,"url":"assets/preact.module-B1z5cdvs.js"},{"revision":null,"url":"assets/preferences-CN9EJ9NX.js"},{"revision":null,"url":"assets/pt-DfarVqto.js"},{"revision":null,"url":"assets/pt-Dly5Myel.js"},{"revision":null,"url":"assets/publish-resource-D7WXvm6u.js"},{"revision":null,"url":"assets/RadioGroup-DFQHgpUl.js"},{"revision":null,"url":"assets/react-BW7E7-P9.css"},{"revision":null,"url":"assets/react-DP2ngoHF.js"},{"revision":null,"url":"assets/redux-BpyOm6pS.js"},{"revision":null,"url":"assets/ru-C9Wh9IKf.js"},{"revision":null,"url":"assets/ru-DeqfYyhe.js"},{"revision":null,"url":"assets/Search-BuZJTzDq.js"},{"revision":null,"url":"assets/Select-0rvptrXH.js"},{"revision":null,"url":"assets/selector-Dpt9nBq7.js"},{"revision":null,"url":"assets/ServerLogo-BS1tW7SN.js"},{"revision":null,"url":"assets/session-DESbRLD5.js"},{"revision":null,"url":"assets/setup-DFybTsc-.js"},{"revision":null,"url":"assets/Skeleton-BQyN-0sJ.js"},{"revision":null,"url":"assets/slicedToArray-SBrU6gJV.js"},{"revision":null,"url":"assets/Slider-DaMMponj.js"},{"revision":null,"url":"assets/spaces-DNtrZi8N.js"},{"revision":null,"url":"assets/start-CgH7B6u8.js"},{"revision":null,"url":"assets/step-actions-BNn2aM9R.js"},{"revision":null,"url":"assets/Stepper-ASzJY9Wh.js"},{"revision":null,"url":"assets/studio-8gthozLh.js"},{"revision":null,"url":"assets/switch-control-DO3LxG2v.js"},{"revision":null,"url":"assets/TableRow-DQB9jM8W.js"},{"revision":null,"url":"assets/TextField-BHg3uTSC.js"},{"revision":null,"url":"assets/th-B6Z2fc62.js"},{"revision":null,"url":"assets/th-BEfUwHXu.js"},{"revision":null,"url":"assets/Toolbar-C3gbqZgN.js"},{"revision":null,"url":"assets/toUpper-C0A9jQTp.js"},{"revision":null,"url":"assets/transfer-Blq_vH7z.js"},{"revision":null,"url":"assets/uniqBy-DN9WBw_C.js"},{"revision":null,"url":"assets/unsubscribe-CkiFEJUY.js"},{"revision":null,"url":"assets/use-blocklet-info-for-connect-did-spaces-Car-GPAS.js"},{"revision":null,"url":"assets/use-passport-id-B-b-_oYF.js"},{"revision":null,"url":"assets/useAsync-D0lrbkdE.js"},{"revision":null,"url":"assets/useFormControl-b_gcFCyO.js"},{"revision":null,"url":"assets/useLocalStorage-Cvbq9kSP.js"},{"revision":null,"url":"assets/user-center-B0jK0JhV.js"},{"revision":null,"url":"assets/user-sessions-gd1hKrWX.js"},{"revision":null,"url":"assets/useSetState-p_ztAK1J.js"},{"revision":null,"url":"assets/useSlot-MeMXV443.js"},{"revision":null,"url":"assets/util-BkBoAuZA.js"},{"revision":null,"url":"assets/vi-CVN1WwF4.js"},{"revision":null,"url":"assets/vi-Di0ynKe6.js"},{"revision":null,"url":"assets/ViewList-D9nsZOsI.js"},{"revision":null,"url":"assets/wrap-locale-BONrbXck.js"},{"revision":null,"url":"assets/zh-Bgfgr3pp.js"},{"revision":null,"url":"assets/zh-e04FR-Ps.js"},{"revision":null,"url":"assets/zh-tw-DlepKNg6.js"},{"revision":null,"url":"assets/zh-tw-kaMajsUI.js"},{"revision":"11c1a73fcc97b2356dfeeec20ce39684","url":"index.html"},{"revision":"186b2f1889d7c89ecd30e422ab415c8a","url":"registerSW.js"},{"revision":"07a287e43ae8e959a20d6b367a581667","url":"router-template-styles/styles.css"},{"revision":"ecdddc9b1297e7511cad18529d5cfd89","url":"manifest.webmanifest"}]||[]).filter(s=>s.url!=="/"&&!s.url.includes("index.html")));re();self.addEventListener("activate",()=>{console.log("Service Worker activated")});self.addEventListener("install",s=>{console.log("Service Worker installed"),s.waitUntil(self.skipWaiting())});const G=s=>!!(s.method!=="GET"||s.url.includes("/api")||s.url.includes("__meta__.js")||s.url.includes("__blocklet__.js"));I(s=>{const{request:e}=s;return G(e)?!1:e.url.includes("/static/")},new Oe({cacheName:"static",plugins:[new Ae({maxEntries:200})]}));I(s=>{const{request:e}=s;return G(e)?!1:e.url.includes("/images/")||e.url.includes("/router/-template-styles/")},new We);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.26-beta-
|
|
6
|
+
"version": "1.16.26-beta-cca12425",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@abtnode/analytics": "1.16.26-beta-
|
|
37
|
-
"@abtnode/auth": "1.16.26-beta-
|
|
38
|
-
"@abtnode/client": "1.16.26-beta-
|
|
39
|
-
"@abtnode/connect-storage": "1.16.26-beta-
|
|
40
|
-
"@abtnode/constant": "1.16.26-beta-
|
|
41
|
-
"@abtnode/core": "1.16.26-beta-
|
|
42
|
-
"@abtnode/cron": "1.16.26-beta-
|
|
43
|
-
"@abtnode/logger": "1.16.26-beta-
|
|
44
|
-
"@abtnode/models": "1.16.26-beta-
|
|
45
|
-
"@abtnode/router-templates": "1.16.26-beta-
|
|
46
|
-
"@abtnode/util": "1.16.26-beta-
|
|
36
|
+
"@abtnode/analytics": "1.16.26-beta-cca12425",
|
|
37
|
+
"@abtnode/auth": "1.16.26-beta-cca12425",
|
|
38
|
+
"@abtnode/client": "1.16.26-beta-cca12425",
|
|
39
|
+
"@abtnode/connect-storage": "1.16.26-beta-cca12425",
|
|
40
|
+
"@abtnode/constant": "1.16.26-beta-cca12425",
|
|
41
|
+
"@abtnode/core": "1.16.26-beta-cca12425",
|
|
42
|
+
"@abtnode/cron": "1.16.26-beta-cca12425",
|
|
43
|
+
"@abtnode/logger": "1.16.26-beta-cca12425",
|
|
44
|
+
"@abtnode/models": "1.16.26-beta-cca12425",
|
|
45
|
+
"@abtnode/router-templates": "1.16.26-beta-cca12425",
|
|
46
|
+
"@abtnode/util": "1.16.26-beta-cca12425",
|
|
47
47
|
"@arcblock/did": "^1.18.115",
|
|
48
48
|
"@arcblock/did-auth": "1.18.115",
|
|
49
49
|
"@arcblock/did-ext": "^1.18.115",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@arcblock/jwt": "1.18.115",
|
|
53
53
|
"@arcblock/validator": "^1.18.115",
|
|
54
54
|
"@arcblock/ws": "1.18.115",
|
|
55
|
-
"@blocklet/constant": "1.16.26-beta-
|
|
55
|
+
"@blocklet/constant": "1.16.26-beta-cca12425",
|
|
56
56
|
"@blocklet/form-builder": "^0.1.11",
|
|
57
57
|
"@blocklet/form-collector": "^0.1.6",
|
|
58
|
-
"@blocklet/meta": "1.16.26-beta-
|
|
59
|
-
"@blocklet/sdk": "1.16.26-beta-
|
|
58
|
+
"@blocklet/meta": "1.16.26-beta-cca12425",
|
|
59
|
+
"@blocklet/sdk": "1.16.26-beta-cca12425",
|
|
60
60
|
"@did-connect/authenticator": "^2.2.4",
|
|
61
61
|
"@did-connect/relay-adapter-express": "^2.2.4",
|
|
62
62
|
"@ocap/client": "1.18.115",
|
|
@@ -97,15 +97,15 @@
|
|
|
97
97
|
},
|
|
98
98
|
"resolutions": {},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@abtnode/ux": "1.16.26-beta-
|
|
101
|
-
"@arcblock/bridge": "^2.9.
|
|
102
|
-
"@arcblock/did-connect": "^2.9.
|
|
103
|
-
"@arcblock/icons": "^2.9.
|
|
104
|
-
"@arcblock/react-hooks": "^2.9.
|
|
105
|
-
"@arcblock/ux": "^2.9.
|
|
106
|
-
"@blocklet/launcher-layout": "2.3.
|
|
107
|
-
"@blocklet/tracker": "1.16.26-beta-
|
|
108
|
-
"@blocklet/ui-react": "^2.9.
|
|
100
|
+
"@abtnode/ux": "1.16.26-beta-cca12425",
|
|
101
|
+
"@arcblock/bridge": "^2.9.69",
|
|
102
|
+
"@arcblock/did-connect": "^2.9.69",
|
|
103
|
+
"@arcblock/icons": "^2.9.69",
|
|
104
|
+
"@arcblock/react-hooks": "^2.9.69",
|
|
105
|
+
"@arcblock/ux": "^2.9.69",
|
|
106
|
+
"@blocklet/launcher-layout": "2.3.11",
|
|
107
|
+
"@blocklet/tracker": "1.16.26-beta-cca12425",
|
|
108
|
+
"@blocklet/ui-react": "^2.9.69",
|
|
109
109
|
"@emotion/react": "^11.11.3",
|
|
110
110
|
"@emotion/styled": "^11.11.0",
|
|
111
111
|
"@iconify/iconify": "^3.1.1",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
178
178
|
"email": "shijun@arcblock.io"
|
|
179
179
|
},
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "fc2804fa8010d4311f1c74e65fb98d117598df2a"
|
|
181
181
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,ah as P,w as R,bz as j,a4 as D,r as m,c as S,b_ as W,by as O,j as u,ar as _}from"./index-MHeXbht_.js";import{A as k,S as A}from"./add-component-core-Bd75KmSE.js";import"./index-pr0coJZh.js";import"./lottie-sLx_MIFH.js";import"./config-space-B7Cgf5Se.js";import"./Skeleton-DlvCFRkz.js";import"./Hidden-CyJIFPqO.js";import"./spaces-fv1YlSu4.js";import"./index-BWj9cvWK.js";import"./index-D-XBJ_hS.js";import"./api-DcYvzDkD.js";import"./launch-result-message-DEcCutu3.js";import"./page-header-iStgNt-t.js";import"./uniqBy-BnjBhJxf.js";import"./logo-uploader-j0OGjkoc.js";import"./index-D9bkjrIm.js";import"./index-BmYpFvRB.js";import"./EditIcon-DR2M6B2a.js";import"./Done-DIK-gyz7.js";import"./Google-Dqg-7vso.js";import"./TextField-DvirKXAG.js";import"./FormControl-DqRtQrj4.js";import"./useFormControl-CeAUerJZ.js";import"./InputLabel-Ci8Zez4U.js";import"./Select-CKfMC7P9.js";import"./index-5x037-9C.js";import"./TableRow-G_vHt3-a.js";import"./FormControlLabel-CgWEo7K_.js";import"./index-Bqkn_aa3.js";import"./session-BxfJegkk.js";import"./did-address-CL3Ygw6p.js";import"./Link-3QVwMQPk.js";import"./Stepper-CQAZ_wrh.js";import"./item-MF9V1-6K.js";import"./Add-C69qn2wR.js";import"./MoreVert-K_1niM7c.js";import"./Launch-CPOdFkdd.js";import"./DeleteOutline-CoZFf1fL.js";import"./click-to-copy-CZvSRIGN.js";import"./confirm-pPzim8uI.js";import"./Alert-ssp0y7Ib.js";import"./useSlot-CsiuTStm.js";import"./ButtonGroup-BLLuxmvy.js";import"./jss-plugin-props-sort.esm-rVwFJx4d.js";import"./Grid-BIu6B9VD.js";import"./ListItemText-BbCA9KKV.js";import"./util-DeMILzW3.js";import"./connect-to-B8kCNKHN.js";import"./use-blocklet-info-for-connect-did-spaces-CIjBkljS.js";import"./CloseOutlined-sn7xb1bx.js";import"./index-uI5ivd9H.js";import"./ExpandMore-BlRkbxIp.js";import"./content-layout-6_5eggY7.js";import"./ArrowDropDown-BP0ud9Hj.js";import"./useLocalStorage-B_i310mR.js";import"./fallback-C7-7MBkn.js";import"./index-DlPsSbdP.js";import"./Search-BR5ea3vd.js";import"./InputAdornment-4xRIAUiI.js";import"./preact.module-B1z5cdvs.js";function $t(){var l;const{t:d}=x(),{blocklet:r}=P(),[h]=R(),{componentDid:a}=j(),f=D(t=>t.breakpoints.down("md")),w=h.get("mode")==="dialog",e=(l=r==null?void 0:r.meta)==null?void 0:l.did,i=new URL(window.location.href),s=(i.searchParams.get("store")||"").split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[g,C]=m.useState(s.map(t=>({url:t,name:t.replace("https://","")}))),p=i.searchParams.get("resourceType")||"",n=i.searchParams.get("resourceDid")||a;m.useEffect(()=>{(async()=>{try{const t=await Promise.all(s.map(async o=>{const b=S(o,"/api/store.json"),{data:E}=await W.get(b);return{url:o,name:E.name}}));C(t||[])}catch(t){console.error(t)}})()},[s.join(",")]);const y=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:a},"*")};m.useEffect(()=>{const t=O();return e&&t.connect(),()=>{e&&t.isConnected()&&t.disconnect()}},[e]);const c=({inDialog:t=!0}={})=>u.jsx(k,{stores:g,resourceType:p,resourceDid:n,mode:"embed",inDialog:t,storageKey:A(`${p}+${n}`)});return w?u.jsx(_,{className:"resource-dialog",title:d("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&y()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:c()}):c({inDialog:!1})}export{$t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b_ as a}from"./index-MHeXbht_.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|