@abtnode/webapp 1.16.27-beta-43ab3adf → 1.16.28-beta-23b06b63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-BlWdL5hq.js → Add-BxRt9WAM.js} +1 -1
- package/dist/assets/{ArrowDropDown-BRSuKRSZ.js → ArrowDropDown-BDCD7rfw.js} +1 -1
- package/dist/assets/{Autocomplete-DzQAgmMV.js → Autocomplete-mKcnfw_W.js} +1 -1
- package/dist/assets/Breadcrumbs-BTPbI2mY.js +1 -0
- package/dist/assets/{ButtonGroup-CqHbqvIj.js → ButtonGroup-B4i-HvgZ.js} +1 -1
- package/dist/assets/{CheckCircle-CSPlY_20.js → CheckCircle-DO-RcLP9.js} +1 -1
- package/dist/assets/{ChevronLeft-zlmw0JTD.js → ChevronLeft-DF7lcjk8.js} +1 -1
- package/dist/assets/{ChevronRight-hhdO2z__.js → ChevronRight-CFOkpNut.js} +1 -1
- package/dist/assets/{Close-BfNzQHXc.js → Close-TuMd444H.js} +1 -1
- package/dist/assets/Delete-DDy4lv2l.js +1 -0
- package/dist/assets/{DeleteOutline-mQ8p8X2l.js → DeleteOutline-5zk5MLVr.js} +1 -1
- package/dist/assets/{Done-1q2rveFh.js → Done-DZAunZvS.js} +1 -1
- package/dist/assets/{Edit-BowBuCq8.js → Edit-CGEHojUC.js} +1 -1
- package/dist/assets/{EditIcon-nFgXy_Ap.js → EditIcon-BylMjCE4.js} +1 -1
- package/dist/assets/{FilterList-CFsrQPpD.js → FilterList-dxewgEr3.js} +5 -5
- package/dist/assets/{Google-Dm0Bt78U.js → Google-C7F2Ljnc.js} +4 -4
- package/dist/assets/{Https-CspPw1QL.js → Https-Bv4vNlzR.js} +1 -1
- package/dist/assets/{InfoOutlined-DD-Zg0Tj.js → InfoOutlined-BcGJkJJl.js} +1 -1
- package/dist/assets/{InputAdornment-Dy1fA12v.js → InputAdornment-CELCg_HF.js} +1 -1
- package/dist/assets/{InputLabel-BXQy_ZSg.js → InputLabel-Cag35T0N.js} +1 -1
- package/dist/assets/{LastPage-C7awZPyV.js → LastPage-CHLGEMPh.js} +1 -1
- package/dist/assets/{Launch-Eb8N22dN.js → Launch-COxUNu4j.js} +1 -1
- package/dist/assets/{Link-euuV_LRf.js → Link-BkQX3hDp.js} +1 -1
- package/dist/assets/{LoadingButton-DVHwr9De.js → LoadingButton-BeuL1wF-.js} +1 -1
- package/dist/assets/{LockIcon-Ca85OyYH.js → LockIcon-D_Uy157g.js} +1 -1
- package/dist/assets/{Loop-vUb_fmsc.js → Loop-Be9bzVMj.js} +1 -1
- package/dist/assets/{MoreVert-gaCnI5Xf.js → MoreVert-DCY4R0I6.js} +1 -1
- package/dist/assets/{Pagination-DfzcotPN.js → Pagination-B8Go1A0z.js} +1 -1
- package/dist/assets/{Public-BEijyP_7.js → Public-XvGsN53V.js} +1 -1
- package/dist/assets/{SchemaReference.es-ncoplB18.js → SchemaReference.es-CnykePQs.js} +1 -1
- package/dist/assets/{Search-Cz2kpFbT.js → Search-DbENMUmJ.js} +1 -1
- package/dist/assets/{Select-D6ACs1xY.js → Select-BDtCsGy7.js} +2 -2
- package/dist/assets/{Skeleton-DWKEXisW.js → Skeleton-D9CMhdYr.js} +4 -4
- package/dist/assets/{Slider-DKraNvrD.js → Slider-zMdqR1_D.js} +1 -1
- package/dist/assets/{Stepper-CZFVEfLi.js → Stepper-Df_RHJ43.js} +1 -1
- package/dist/assets/{TextField-DRrSIaR4.js → TextField-PSikz4cm.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CBvNwQed.js → ToggleButtonGroup-Bnx6aryv.js} +1 -1
- package/dist/assets/{ViewList-CxKdhgAh.js → ViewList-B9miFzh4.js} +1 -1
- package/dist/assets/{actions-QLA3pt8S.js → actions-BRgdN5cj.js} +1 -1
- package/dist/assets/actions-D5ZCmrTM.js +11 -0
- package/dist/assets/{agreement-Bd_YDn4J.js → agreement-hUkyT-rU.js} +9 -9
- package/dist/assets/api-D8MiIqQL.js +1 -0
- package/dist/assets/app-avatar-CxghIswG.js +1 -0
- package/dist/assets/{ar-DqmJV4p8.js → ar-DXpJw3XU.js} +1 -1
- package/dist/assets/{audit-logs-DwuYsIhc.js → audit-logs-Cj79FN7v.js} +1 -1
- package/dist/assets/{brace-fold.es-DBcYme5k.js → brace-fold.es-D8DT3AwS.js} +1 -1
- package/dist/assets/{bundle-avatar-4GKn5oRs.js → bundle-avatar-DsCsmlpx.js} +1 -1
- package/dist/assets/chart-CD97eKtM.js +35 -0
- package/dist/assets/{click-to-copy-BJBKnF7C.js → click-to-copy-BUpbo6bk.js} +1 -1
- package/dist/assets/{closebrackets.es-CLLTB-Rw.js → closebrackets.es-6cHaiFAL.js} +1 -1
- package/dist/assets/{codemirror.es-DiBSlxeg.js → codemirror.es-fM7kqYGL.js} +1 -1
- package/dist/assets/{comment.es-DTp5sWbp.js → comment.es-ug3wJMDP.js} +1 -1
- package/dist/assets/{config-navigation-Dh_BXFIi.js → config-navigation-BCwYgsZE.js} +2 -2
- package/dist/assets/{de-CHOUObJ5.js → de-CWxlIdre.js} +1 -1
- package/dist/assets/{delete-confirm-CNU7dJ17.js → delete-confirm-D2bWY0RH.js} +1 -1
- package/dist/assets/detail-C1AiJgJr.js +58 -0
- package/dist/assets/{dialog.es-D1H3OJaa.js → dialog.es-COYIW3n4.js} +1 -1
- package/dist/assets/{download-Htx7YW1G.js → download-Dr-5p0Eo.js} +1 -1
- package/dist/assets/{es-aZ4oYeVs.js → es-BmrvDK07.js} +1 -1
- package/dist/assets/{foldgutter.es-C2ROsMEX.js → foldgutter.es-C-4TReDS.js} +1 -1
- package/dist/assets/{fr-Bi9vptGI.js → fr-B7SxgRy3.js} +1 -1
- package/dist/assets/getValidReactChildren-8XnhSvA9.js +1 -0
- package/dist/assets/{hi-BXYjfUTP.js → hi-BRRtNIB_.js} +1 -1
- package/dist/assets/{hint.es-QDCU5iC6.js → hint.es-D-HPm2KF.js} +1 -1
- package/dist/assets/{hint.es2-BteAZTtw.js → hint.es2-RMq3iMHV.js} +1 -1
- package/dist/assets/{id-VVXvzjmO.js → id-D6-Qi7Q1.js} +1 -1
- package/dist/assets/{iframe-CIfJru42.js → iframe-CZCbAGTG.js} +1 -1
- package/dist/assets/index-3VaCz9mt.js +58 -0
- package/dist/assets/{index-BZvR35Hj.js → index-ANhJ54Qu.js} +1 -1
- package/dist/assets/{index-D1-aBvtW.js → index-B-DkREsH.js} +1 -1
- package/dist/assets/index-B5LCLWLI.js +262 -0
- package/dist/assets/{index-DBlH-4qz.js → index-B6qhr4Vv.js} +212 -211
- package/dist/assets/{index-BsU6rGWy.js → index-BIT8HWlC.js} +5 -5
- package/dist/assets/{index-f3gCWa9h.js → index-BIi9UAUe.js} +2 -2
- package/dist/assets/index-BLP6cSf-.js +1 -0
- package/dist/assets/{index-DddM0S9V.js → index-BR6wAIPR.js} +16 -16
- package/dist/assets/{index-C01qpSwK.js → index-BViEd1Qy.js} +1 -1
- package/dist/assets/{index-CTyxnc1Q.js → index-BWDq0v0v.js} +6 -6
- package/dist/assets/{index-GQiNlTaJ.js → index-B_hJh8p2.js} +1 -1
- package/dist/assets/{index-DEBI0lGj.js → index-BdfhWOrS.js} +1 -1
- package/dist/assets/index-BeUBkDTf.js +80 -0
- package/dist/assets/{index-8fCm2Jic.js → index-Bgy25Yn1.js} +1 -1
- package/dist/assets/{index-B2x_NkGk.js → index-Boh9o_k5.js} +1 -1
- package/dist/assets/index-Bq_hHWAs.js +16 -0
- package/dist/assets/{index-BrX8n3kg.js → index-By0wVBLr.js} +1 -1
- package/dist/assets/{index-DNRVE0NP.js → index-C-KUrp7f.js} +4 -4
- package/dist/assets/{index-CN4-jpgI.js → index-C9crSSRz.js} +9 -9
- package/dist/assets/{index-DFCC9v5j.js → index-CIFB0zK6.js} +57 -57
- package/dist/assets/index-CLjGBj9p.js +21 -0
- package/dist/assets/{index-RLS72NCQ.js → index-CfEdAej2.js} +3 -3
- package/dist/assets/index-Cl-qWd1J.js +54 -0
- package/dist/assets/index-CqR2D9OX.js +11 -0
- package/dist/assets/{index-Mdw0srMB.js → index-CqReN4T9.js} +2 -2
- package/dist/assets/{index-D4Db9ftV.js → index-Cqjpq5LF.js} +1 -1
- package/dist/assets/{index-BFmN77vD.js → index-Cs9Skmx2.js} +1 -1
- package/dist/assets/index-CzRGlzNy.js +530 -0
- package/dist/assets/{index-DnYXtUxe.js → index-D5672HTm.js} +1 -1
- package/dist/assets/{index-DBd7rWWn.js → index-D7ku2TbR.js} +1 -1
- package/dist/assets/{index-rJLRm37D.js → index-DFgkZLyi.js} +1 -1
- package/dist/assets/{index-B6H1TQgD.js → index-DWB-NUab.js} +7 -7
- package/dist/assets/{index-uyaXmUh9.js → index-DiW4LiJk.js} +11 -11
- package/dist/assets/index-DtPnnuqa.js +85 -0
- package/dist/assets/{index-rfYAdo12.js → index-G8t_K0Nh.js} +1 -1
- package/dist/assets/{index-2dK67bGl.js → index-Mhb4iWrQ.js} +3 -3
- package/dist/assets/{index-Hkok7PnJ.js → index-SNuwf_Y1.js} +4 -4
- package/dist/assets/{index-CpNJmBAT.js → index-Y-bwPY_P.js} +1 -1
- package/dist/assets/{index-C39X5nSU.js → index-hV9d7GzX.js} +1 -1
- package/dist/assets/{index--hCEdE0S.js → index-huf_vvxX.js} +1 -1
- package/dist/assets/{index-BNasUWiN.js → index-neNekbhs.js} +4 -4
- package/dist/assets/index-oNZ-9nMm.js +11 -0
- package/dist/assets/{index.es-BU-QQy1a.js → index.es-CCaw5_ry.js} +1 -1
- package/dist/assets/{index.esm-UN3QaGsN.js → index.esm-Dh5y71gJ.js} +1 -1
- package/dist/assets/{info-addon.es-30ukilBE.js → info-addon.es-C41XU5oD.js} +1 -1
- package/dist/assets/{info.es-2lPs4qsI.js → info.es-DH9xH_89.js} +1 -1
- package/dist/assets/install-from-url-C-r4nFEl.js +1 -0
- package/dist/assets/{invitation-BpNMGSxV.js → invitation-DAmBegDM.js} +6 -6
- package/dist/assets/{isEqual-C9LQO0Wo.js → isEqual-DyC_2mMM.js} +1 -1
- package/dist/assets/{item-CE4vGuWF.js → item-DTFWXAzg.js} +13 -13
- package/dist/assets/{ja-DqJiajLu.js → ja--dtwu5Xy.js} +1 -1
- package/dist/assets/{javascript.es-C13fQY0O.js → javascript.es-BNAO-PTr.js} +1 -1
- package/dist/assets/{jump-to-line.es-BqUFIspc.js → jump-to-line.es-BgSBJjpn.js} +1 -1
- package/dist/assets/{jump.es-E5FdtiiP.js → jump.es-C8STSrV8.js} +1 -1
- package/dist/assets/{ko-DQKmtlbI.js → ko-DpRJDWhF.js} +1 -1
- package/dist/assets/{line-ODorkEX8.js → line-3blIv37C.js} +4 -4
- package/dist/assets/{lint.es-CmOxC0-j.js → lint.es-C9oc6jbS.js} +1 -1
- package/dist/assets/{lint.es2-f8EXNnrq.js → lint.es2-B3G36s6A.js} +1 -1
- package/dist/assets/{lint.es3-BxgO4Daf.js → lint.es3-Bjrk4lMs.js} +1 -1
- package/dist/assets/{list-header-DF2AUmaz.js → list-header-Ft6n4kyL.js} +1 -1
- package/dist/assets/{log-CNVd8L59.js → log-CA5Bfm_H.js} +2 -2
- package/dist/assets/{lottie-BuomNMnt.js → lottie-Djo2tbD7.js} +1 -1
- package/dist/assets/{matchbrackets.es-Dhn5dtU-.js → matchbrackets.es-yNyePD2j.js} +1 -1
- package/dist/assets/{memory-BSkx1Ub2.js → memory-COJcMqTu.js} +1 -1
- package/dist/assets/{mode.es-BfudmPy3.js → mode.es-ul4Y9zvq.js} +1 -1
- package/dist/assets/{mode.es2-DvlBoAjR.js → mode.es2-4D-VJI99.js} +1 -1
- package/dist/assets/{mode.es3-JiFk1pWJ.js → mode.es3-DnIPUjSA.js} +1 -1
- package/dist/assets/{onlineParser.es-BSW2adyc.js → onlineParser.es-DI_N_VZ6.js} +1 -1
- package/dist/assets/overview-CpWhs8pb.js +23 -0
- package/dist/assets/{pt-si0ACe2m.js → pt-BxA88dKG.js} +1 -1
- package/dist/assets/{react-DwbfLI7Z.js → react-B-cs_65i.js} +22 -22
- package/dist/assets/{redux-Bu4pculE.js → redux-DJbvHHJc.js} +1 -1
- package/dist/assets/{resource-dialog-BL8JdZuL.js → resource-dialog-Dwu2vad3.js} +2 -2
- package/dist/assets/{ru-B36cpSA6.js → ru-C9WJaQoQ.js} +1 -1
- package/dist/assets/runtime-DlE-mVl3.js +1 -0
- package/dist/assets/{search.es-yd0fhcZk.js → search.es-DEvV0pC4.js} +1 -1
- package/dist/assets/{searchcursor.es-Dy_G_QZQ.js → searchcursor.es-CbJjnyZ6.js} +1 -1
- package/dist/assets/service-CmT6d4X_.js +1 -0
- package/dist/assets/{show-hint.es-BbqPLgHC.js → show-hint.es-BAvfzA33.js} +1 -1
- package/dist/assets/{slicedToArray-CUj4BDqr.js → slicedToArray-DXz7P6Jc.js} +3 -3
- package/dist/assets/spaces-C_MVXqkk.js +1 -0
- package/dist/assets/{sublime.es-Bu1xK-a6.js → sublime.es-DEVL-EBh.js} +1 -1
- package/dist/assets/{switch-control-Oh1i031K.js → switch-control-CoAFfWfN.js} +1 -1
- package/dist/assets/{table-icons-gSPlUUro.js → table-icons-D2RHWn5N.js} +10 -10
- package/dist/assets/{tag-tXL4aJpc.js → tag-CibAXXt2.js} +1 -1
- package/dist/assets/team-hCJdZoCR.js +1 -0
- package/dist/assets/{th-Dtc8_3Sk.js → th-z7LSYRZi.js} +1 -1
- package/dist/assets/toUpper-DN83jaGL.js +1 -0
- package/dist/assets/{traffic-C7SAOKwi.js → traffic-CpCVERHX.js} +5 -5
- package/dist/assets/url-evaluation-CpLQCS2C.js +7 -0
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-ADtRY_BA.js +1 -0
- package/dist/assets/{useLocalStorage-Den65TTd.js → useLocalStorage-Dhldbzlz.js} +1 -1
- package/dist/assets/util-BSjBcY1Q.js +1 -0
- package/dist/assets/{vi-DpH7bkpR.js → vi-CAtyUyNW.js} +1 -1
- package/dist/assets/{wait-container-CnNsD3cH.js → wait-container-CrBtw_vv.js} +4 -4
- package/dist/assets/withStyles-BhZN297l.js +1 -0
- package/dist/assets/wrap-locale-CA8TyTj3.js +1 -0
- package/dist/assets/{zh-Dizc5DZz.js → zh-BVBeddUa.js} +1 -1
- package/dist/assets/{zh-tw-Cb93tcSH.js → zh-tw-CoStw7dd.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Breadcrumbs-BQD6r-rf.js +0 -1
- package/dist/assets/Delete-HYXbanP_.js +0 -1
- package/dist/assets/actions-jzQJLd83.js +0 -11
- package/dist/assets/api-sSit_7Kw.js +0 -1
- package/dist/assets/app-avatar-DH3uT_Nr.js +0 -1
- package/dist/assets/chart-BhmgRFRd.js +0 -35
- package/dist/assets/detail-CESxJL-2.js +0 -58
- package/dist/assets/getValidReactChildren-BXQ8AiZt.js +0 -1
- package/dist/assets/index-BcsyQdON.js +0 -11
- package/dist/assets/index-Bh-DJU8Z.js +0 -16
- package/dist/assets/index-Bm4qa0nV.js +0 -80
- package/dist/assets/index-Bu9Gdw_x.js +0 -1
- package/dist/assets/index-C2H71CT1.js +0 -21
- package/dist/assets/index-CJRh33cD.js +0 -85
- package/dist/assets/index-CgLCDu24.js +0 -530
- package/dist/assets/index-DI-gzmKu.js +0 -58
- package/dist/assets/index-DQZaP4Az.js +0 -54
- package/dist/assets/index-DWTs3F9i.js +0 -11
- package/dist/assets/index-Dz5x-Zd5.js +0 -262
- package/dist/assets/install-from-url-BQJWpTKl.js +0 -1
- package/dist/assets/overview-CXRCvckQ.js +0 -23
- package/dist/assets/runtime-KfScM6FA.js +0 -1
- package/dist/assets/service-BUuflGft.js +0 -1
- package/dist/assets/spaces-DbeGuVPF.js +0 -1
- package/dist/assets/team-B2Py-5R-.js +0 -1
- package/dist/assets/toUpper-fPzt0_fA.js +0 -1
- package/dist/assets/url-evaluation-OWrig3n8.js +0 -7
- package/dist/assets/use-blocklet-info-for-connect-did-spaces-tLVaGUOx.js +0 -1
- package/dist/assets/util-BjsuBWBH.js +0 -1
- package/dist/assets/withStyles-fo91W1eJ.js +0 -1
- package/dist/assets/wrap-locale-BSXKmMbJ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bS as z,j as t,bT as d,bU as T,bV as l,bW as I,bX as P,bY as _,bZ as A,m as E,r as p,b_ as N,b$ as U,c0 as L,c1 as W}from"./index-DBlH-4qz.js";const H=z(t.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),O=["slots","slotProps"],V=d(T)(({theme:e})=>l({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":l({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":l({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:I(e.palette.grey[200],.12)}:{backgroundColor:I(e.palette.grey[600],.12)})})),q=d(H)({width:24,height:16});function X(e){const{slots:s={},slotProps:n={}}=e,a=P(e,O),r=e;return t.jsx("li",{children:t.jsx(V,l({focusRipple:!0},a,{ownerState:r,children:t.jsx(q,l({as:s.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}function Y(e){return A("MuiBreadcrumbs",e)}const Z=_("MuiBreadcrumbs",["root","ol","li","separator"]),D=Z,F=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],G=e=>{const{classes:s}=e;return W({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Y,s)},J=d(E,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,s)=>[{[`& .${D.li}`]:s.li},s.root]})({}),K=d("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,s)=>s.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Q=d("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,s)=>s.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function ee(e,s,n,a){return e.reduce((r,u,c)=>(c<e.length-1?r=r.concat(u,t.jsx(Q,{"aria-hidden":!0,className:s,ownerState:a,children:n},`separator-${c}`)):r.push(u),r),[])}const se=p.forwardRef(function(s,n){const a=N({props:s,name:"MuiBreadcrumbs"}),{children:r,className:u,component:c="nav",slots:h={},slotProps:v={},expandText:B="Show path",itemsAfterCollapse:m=1,itemsBeforeCollapse:g=1,maxItems:x=8,separator:y="/"}=a,M=P(a,F),[S,$]=p.useState(!1),i=l({},a,{component:c,expanded:S,expandText:B,itemsAfterCollapse:m,itemsBeforeCollapse:g,maxItems:x,separator:y}),b=G(i),k=U({elementType:h.CollapsedIcon,externalSlotProps:v.collapsedIcon,ownerState:i}),R=p.useRef(null),w=o=>{const C=()=>{$(!0);const j=R.current.querySelector("a[href],button,[tabindex]");j&&j.focus()};return g+m>=o.length?o:[...o.slice(0,g),t.jsx(X,{"aria-label":B,slots:{CollapsedIcon:h.CollapsedIcon},slotProps:{collapsedIcon:k},onClick:C},"ellipsis"),...o.slice(o.length-m,o.length)]},f=p.Children.toArray(r).filter(o=>p.isValidElement(o)).map((o,C)=>t.jsx("li",{className:b.li,children:o},`child-${C}`));return t.jsx(J,l({ref:n,component:c,color:"text.secondary",className:L(b.root,u),ownerState:i},M,{children:t.jsx(K,{className:b.ol,ref:R,ownerState:i,children:ee(S||x&&f.length<=x?f:w(f),b.separator,y,i)})}))}),re=se;export{re as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bZ as w,bY as x,bT as v,bV as a,r as b,b_ as h,bX as F,dc as C,dd as G,j as t,c0 as y,c1 as M,bS as u,aL as R,aM as _}from"./index-DBlH-4qz.js";function g(o){return w("MuiFormGroup",o)}const j=x("MuiFormGroup",["root","row","error"]),I=j,D=["className","row"],S=o=>{const{classes:r,row:s,error:e}=o;return M({root:["root",s&&"row",e&&"error"]},g,r)},L=v("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(o,r)=>{const{ownerState:s}=o;return[r.root,s.row&&r.row]}})(({ownerState:o})=>a({display:"flex",flexDirection:"column",flexWrap:"wrap"},o.row&&{flexDirection:"row"})),K=b.forwardRef(function(r,s){const e=h({props:r,name:"MuiFormGroup"}),{className:n,row:i=!1}=e,p=F(e,D),m=C(),d=G({props:e,muiFormControl:m,states:["error"]}),c=a({},e,{row:i,error:d.error}),f=S(c);return t.jsx(L,a({className:y(f.root,n),ownerState:c,ref:s},p))}),N=K,P=u(t.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),H=u(t.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");var l={},z=_;Object.defineProperty(l,"__esModule",{value:!0});var A=l.default=void 0,U=z(R()),q=t;A=l.default=(0,U.default)((0,q.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");export{l as D,N as F,P as K,H as a,A as d,I as f,g};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{bx as Ie,by as Oe,bz as Ue,bA as Te,bB as qe,bC as ze,bD as Ne,bE as ke,bF as He,g as Fe,bG as Ge,bH as Ve,bI as We,r as v,j as a,P as y,a2 as Ke,aL as b,aM as R,bJ as Xe,n as Ye,z as Je,bm as Qe,f as pe,bK as re,b as k,bL as Ze,N as et,bM as M,a3 as tt,a_ as at,aP as nt,O as rt,be as st,U as ot,aE as it,C as se,aa as ct,ae as oe,B as lt,F as ie,M as ut,m as T,aY as ce,bN as dt,A as le,ab as mt,aO as pt,K as ft,bO as vt,bP as ht,bQ as gt}from"./index-DBlH-4qz.js";import{_ as _t}from"./useLocalStorage-Den65TTd.js";import{d as xt}from"./MoreVert-gaCnI5Xf.js";import{d as jt}from"./Delete-HYXbanP_.js";import{B as yt}from"./ButtonGroup-CqHbqvIj.js";import{R as St,b as ue,u as Dt}from"./url-evaluation-OWrig3n8.js";var bt=Ie,Rt=Te,Ct=qe,$t=Oe,Lt=Ue,wt=ze,Bt=200;function Mt(e,r,o,c){var s=-1,u=Rt,g=!0,_=e.length,d=[],i=r.length;if(!_)return d;o&&(r=$t(r,Lt(o))),c?(u=Ct,g=!1):r.length>=Bt&&(u=wt,g=!1,r=new bt(r));e:for(;++s<_;){var p=e[s],f=o==null?p:o(p);if(p=c||p!==0?p:0,g&&f===f){for(var C=i;C--;)if(r[C]===f)continue e;d.push(p)}else u(r,f,c)||d.push(p)}return d}var Pt=Mt,At=Pt,Et=Ne,de=ke;function It(e,r,o){var c=e.length;if(c<2)return c?de(e[0]):[];for(var s=-1,u=Array(c);++s<c;)for(var g=e[s],_=-1;++_<c;)_!=s&&(u[s]=At(u[s]||g,e[_],r,o));return de(Et(u,1),r,o)}var Ot=It,Ut=Ge,Tt=He,qt=Ot,zt=We,Nt=Ve,kt=Tt(function(e){var r=Nt(e);return r=typeof r=="function"?r:void 0,qt(Ut(e,zt),void 0,r)}),Ht=kt;const Ft=Fe(Ht),fe=v.createContext({});function ve({children:e,type:r}){const[o,c]=v.useState([]),s=v.useRef([]),u=d=>{if(!s.current.includes(d)){const i=[...s.current,d];c(i),s.current=i}},g=d=>{if(s.current.includes(d)){const i=s.current.filter(p=>p!==d);c(i),s.current=i}},_=d=>{const i=o.filter(f=>d.find(C=>C===f));Ft(i,o).forEach(f=>g(f))};return a.jsx(fe.Provider,{value:{type:r,deletingBlocklets:o,addDeletingDid:u,removeDeletingDid:g,matchDeletingDid:_},children:e})}ve.propTypes={type:y.string,children:y.node.isRequired};ve.defaultProps={type:"blocklets"};function Sa(){return v.useContext(fe)}const Gt=(e,r)=>{if(!e)return"";if(!r)return e;const o=new URL(e),c=new URLSearchParams(o.searchParams),s=new URL(Ke(o.origin,r));return s.search=c.toString(),s.toString()};var H={},Vt=R;Object.defineProperty(H,"__esModule",{value:!0});var he=H.default=void 0,Wt=Vt(b()),Kt=a;he=H.default=(0,Wt.default)((0,Kt.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow");var F={},Xt=R;Object.defineProperty(F,"__esModule",{value:!0});var ge=F.default=void 0,Yt=Xt(b()),Jt=a;ge=F.default=(0,Yt.default)((0,Jt.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var G={},Qt=R;Object.defineProperty(G,"__esModule",{value:!0});var _e=G.default=void 0,Zt=Qt(b()),ea=a;_e=G.default=(0,Zt.default)((0,ea.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var V={},ta=R;Object.defineProperty(V,"__esModule",{value:!0});var xe=V.default=void 0,aa=ta(b()),na=a;xe=V.default=(0,aa.default)((0,na.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var W={},ra=R;Object.defineProperty(W,"__esModule",{value:!0});var je=W.default=void 0,sa=ra(b()),oa=a;je=W.default=(0,sa.default)((0,oa.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var K={},ia=R;Object.defineProperty(K,"__esModule",{value:!0});var ye=K.default=void 0,ca=ia(b()),la=a;ye=K.default=(0,ca.default)((0,la.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var X={},ua=R;Object.defineProperty(X,"__esModule",{value:!0});var Se=X.default=void 0,da=ua(b()),ma=a;Se=X.default=(0,da.default)((0,ma.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Y={},pa=R;Object.defineProperty(Y,"__esModule",{value:!0});var De=Y.default=void 0,fa=pa(b()),va=a;De=Y.default=(0,fa.default)((0,va.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");const j={Start:he,Stop:ge,Restart:_e,Reload:xe,Remove:jt,Config:je,Log:ye,Group:Se,Cancel:De,Dashboard:Xe};function J({blocklet:e,onStart:r,onComplete:o,variant:c,hasPermission:s,getComponentUrl:u,useBlockletUrlEvaluation:g,..._}){const d=Je(),i=Qe(),[p,f]=v.useState(null),[C,Q]=v.useState(null),[P,A]=v.useState(!1),[m,q]=v.useState(null),{t:n}=v.useContext(pe),[be]=_t("skip-blocklet-setup",!1),{loading:Re,recommendedUrl:Ce}=g(e),Z=re(e.status),[z,ee]=v.useState(!1);v.useEffect(()=>{var l,S;if(!(e!=null&&e.controller))return;ee(((S=(l=e==null?void 0:e.controller)==null?void 0:l.status)==null?void 0:S.value)===k.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var D,$,L;try{const h=await i.api.getLauncherSession({input:{launcherSessionId:(D=e==null?void 0:e.controller)==null?void 0:D.launcherSessionId,launcherUrl:($=e==null?void 0:e.controller)==null?void 0:$.launcherUrl}});if(h!=null&&h.error){console.error("get launcher session failed",h.error);return}ee([ie.LAUNCH_SESSION_STATUS.expired,ie.LAUNCH_SESSION_STATUS.terminated].includes((L=h==null?void 0:h.launcherSession)==null?void 0:L.status))}catch(h){console.error("call getLauncherSession error",h)}})()},[]);const{inService:N}=i,$e=()=>{const t=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),l=u==null?void 0:u({mountPoint:t,blocklet:e});window.open(Gt(l,".well-known/service/admin"))},E=(t,l,S=!1)=>async()=>{const D=async I=>{var U;r({action:t,blocklet:e}),A(!0),Q(t);let O=!1;try{if(t==="remove")await l(I);else if(t==="start"){if(!dt(e)){le.error(n("blocklet.noComponent"));return}if(!N&&!be&&!((U=e.settings)!=null&&U.initialized)&&e.mode!==k.BLOCKLET_MODES.DEVELOPMENT){const x=mt(i.info),ne=new URL(Ce);ne.searchParams.set("serverUrl",x),window.open(ne.href),o({action:t,blocklet:e});return}const w=e.children.filter(x=>!re(x.status)&&x.status!=="running").map(x=>x.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else if(["stop","restart","reload"].includes(t)){const w=e.children.filter(x=>x.status==="running").map(x=>x.meta.did),B={did:e.meta.did,componentDids:w};await l({input:B})}else{const w={did:e.meta.did};await l({input:w})}t==="remove"?O=!0:await pt(1e3),t==="reload"&&le.success(n("blocklet.reloadSuccess")),q(null),o({action:t,blocklet:e})}catch(w){const B=`Blocklet ${t} failed: ${ft(w)}`;throw o({action:t,blocklet:e,error:new Error(B)}),new Error(B)}finally{O||A(!1)}},$=()=>{A(!1),q(null)},L=ut(e,!0),h=e.mode===k.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(T,{component:"div",children:a.jsx(T,{gutterBottom:!0,children:n("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(I,O)=>a.jsxs(T,{component:"div",children:[a.jsx(T,{gutterBottom:!0,children:n("blocklet.action.removeApplicationDescription")}),a.jsxs(St,{name:"removeType",value:I.removeType,onChange:U=>O({...I,removeType:U.target.value}),children:[a.jsx(ce,{value:"backup",control:a.jsx(ue,{}),label:n("blocklet.action.removeApplicationAfterBackup")}),a.jsx(ce,{value:"complete",control:a.jsx(ue,{}),label:n("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ee={stop:{title:`${n("common.stop")} ${L}`,description:n("blocklet.action.stopDescription"),confirm:n("blocklet.action.confirmStop"),cancel:n("common.cancel"),onConfirm:D,onCancel:$},restart:{title:`${n("common.restart")} ${L}`,description:n("blocklet.action.restartDescription"),confirm:n("blocklet.action.confirmRestart"),cancel:n("common.cancel"),onConfirm:D,onCancel:$},remove:{title:`${n("common.remove")} ${L}`,confirm:n("blocklet.action.confirmRemove"),cancel:n("common.cancel"),onConfirm:D,onCancel:$,...h},cancelDownload:{title:`${n("common.cancel")}`,description:n("blocklet.action.cancelDownloadDescription",{name:L}),confirm:n("common.confirm"),cancel:n("common.cancel"),onConfirm:D,onCancel:$}};S?q(Ee[t]):await D()},Le=!!p,we=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(t.currentTarget)},Be=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}f(null)},te=async(t,l)=>{try{l.stopPropagation(),l.preventDefault()}catch{}if(typeof t.handler=="function")try{A(!0),Q(t.action),await t.handler()}catch(S){console.error(`Blocklet ${t.name} failed: `,S)}finally{A(!1),f(null)}else f(null)},Me=!N&&Ze(e)?{action:"remove",icon:j.Remove,name:n("common.remove"),handler:E("remove",async({removeType:t})=>{t==="backup"&&await i.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await i.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:Z}:null,Pe={action:"remove",icon:({sx:t,...l})=>a.jsx(j.Cancel,{sx:{...t,paddingRight:"2px",zoom:.95},...l}),name:n("common.cancel"),handler:E("cancelDownload",i.api.cancelDownloadBlocklet,!0)},Ae=et(e),ae=[{action:"start",icon:j.Start,name:n("common.start"),handler:E("start",i.api.startBlocklet),disabled:z||e.children.every(t=>t.status==="running")||M(e.status)||Re||Z},{action:"stop",icon:j.Stop,name:n("common.stop"),handler:E("stop",i.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:j.Restart,name:n("common.restart"),handler:E("restart",i.api.restartBlocklet,!0),disabled:z||e.status!=="running"},M(e.status)?Pe:Me,{separator:!0},N?null:{action:"dashboard",icon:({style:t,...l})=>a.jsx(j.Dashboard,{...l,style:{...t,width:"26px",height:"26px",paddingRight:"3px"}}),name:n("sidebar.dashboard"),handler:$e,disabled:z||e.status!=="running"},{separator:!0},{onlyInMenu:!0,action:"config",icon:j.Config,name:n("common.config"),handler:()=>{d(`/blocklets/${e.meta.did}/configuration`)},disabled:M(e.status)},{onlyInMenu:!0,action:"team",icon:j.Group,name:n("common.manageTeam"),handler:()=>{d(`/blocklets/${e.meta.did}/members`)},disabled:M(e.status)},{onlyInMenu:!0,action:"log",icon:j.Log,name:n("common.log"),handler:()=>{d(`/logs/blocklet-${e.meta.did}`)},disabled:M(e.status)}].filter(Boolean);return c==="menu"?a.jsxs(me,{"data-cy":"blocklet-actions",children:[a.jsx(tt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:we,size:"small",disabled:!s||!M(e.status)&&P,children:a.jsx(xt,{})}),a.jsxs(at,{id:"actions-menu",anchorEl:p,keepMounted:!0,open:Le,onClose:Be,PaperProps:{},children:[Ae.length>0&&a.jsxs(nt,{style:{maxWidth:"400px"},severity:"error",children:[n("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(rt,{to:`/blocklets/${e.meta.did}/components`,children:n("blocklet.config.gotoFix")})]}),ae.map((t,l)=>t.separator?a.jsx(st,{},`separator-${l}`):a.jsxs(ot,{dense:!0,onClick:S=>te(t,S),disabled:P||t.disabled,"data-cy":`${t.action}-blocklet`,children:[a.jsx(it,{style:{minWidth:24},children:C===t.action&&P?a.jsx(se,{size:16,sx:{marginRight:1}}):a.jsx(t.icon,{fontSize:"small"})}),a.jsx(ct,{primary:t.name})]},t.name))]}),m&&a.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):a.jsxs(me,{"data-cy":"blocklet-actions",..._,children:[a.jsx(yt,{children:ae.filter(t=>!t.separator&&!t.onlyInMenu).map(t=>a.jsxs(lt,{title:t.name,"data-cy":`${t.action}-blocklet`,onClick:()=>te(t),disabled:!!t.disabled||P,children:[C===t.action&&P?a.jsx(se,{size:16,sx:{marginRight:1}}):a.jsx(t.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:t.name})]},t.name))}),m&&a.jsx(oe,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}J.propTypes={getComponentUrl:y.func,blocklet:y.object.isRequired,onStart:y.func.isRequired,onComplete:y.func.isRequired,variant:y.oneOf(["menu","group"]),hasPermission:y.bool,useBlockletUrlEvaluation:y.func};J.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const me=Ye.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
|
|
5
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
6
|
-
.MuiButton-root {
|
|
7
|
-
padding: 4px;
|
|
8
|
-
font-size: 10px;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
`;function Da({...e}){const{locale:r}=v.useContext(pe),o=vt(J,"mutate_blocklets"),c=({mountPoint:s,blocklet:u})=>ht({blocklet:u,mountPoint:s,params:gt(u,r)});return a.jsx(o,{...e,getComponentUrl:c,useBlockletUrlEvaluation:Dt})}export{Da as B,ve as D,G as R,Pt as _,ge as a,j as b,he as c,Se as d,_e as e,Sa as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aw as a}from"./index-DBlH-4qz.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bm as A,b as L,a2 as u,d4 as B,br as y,P as t,j as m,cn as P}from"./index-DBlH-4qz.js";const d=(n,r)=>{var a;let s="?v=";return r?s+=B(r):s+=`${(a=n==null?void 0:n.meta)==null?void 0:a.version}${y(n==null?void 0:n.status)?"~":""}`,s};function T({blocklet:n}){var O,g,p,v;const{inService:r}=A(),s=(O=((n==null?void 0:n.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:O.value,a=(g=((n==null?void 0:n.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:g.value,o=(p=((n==null?void 0:n.environments)||[]).find(e=>e.key===L.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:p.value,i=((v=window.env)==null?void 0:v.apiPrefix)||"/",_=u(i,`/blocklet/logo/${r?"":n.meta.did}`,d(n,s)),f=u(i,`/blocklet/logo-rect/${r?"":n.meta.did}`,d(n,a)),C=u(i,`/blocklet/logo-favicon/${r?"":n.meta.did}`,d(n,o));return{logoUrl:_,rectLogoUrl:f,faviconUrl:C}}function E({blocklet:n,style:r,size:s,...a}){const{logoUrl:o}=T({blocklet:n}),{variant:i}=a;return m.jsx(P,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},r),...a,children:m.jsx("img",{src:o,alt:"",style:{width:s}})})}E.propTypes={blocklet:t.object.isRequired,style:t.object,size:t.oneOfType([t.number,t.string])};E.defaultProps={style:{},size:40};export{E as B,T as u};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import{j as u,b2 as H,m as L,Q,P as a,n as V,b1 as Z,r as j,cw as G,fn as J}from"./index-DBlH-4qz.js";function z(t,e,n,s){return parseFloat((e-s*e/t+n).toFixed(2))}function K(t){[...t.querySelectorAll("*")].forEach(e=>t.removeChild(e))}function U(t){return t.value}function C(t,e){const n=document.createElementNS("http://www.w3.org/2000/svg",t);for(const s in e)n.setAttribute(s,e[s]);return n}function _(t,e,n){if(K(t),e.length<=1)return;n=n||{},typeof e[0]=="number"&&(e=e.map(o=>({value:o})));const{onmousemove:s}=n,{onmouseout:d}=n,R="interactive"in n?n.interactive:!!s,f=n.spotRadius||2,i=f*2,A=n.cursorWidth||2,r=parseFloat(t.attributes["stroke-width"].value),F=n.fetch||U,p=e.map(o=>F(o)),y=parseFloat(t.attributes.width.value)-i*2,x=parseFloat(t.attributes.height.value),S=x-r*2-i,g=Math.max(...p)===0?1:Math.max(...p),l=-1e3,w=p.length-1,N=y/w,k=[],W=z(g,S,r+f,p[0]);let E=`M${i} ${W}`;p.forEach((o,m)=>{const c=m*N+i,h=z(g,S,r+f,o);k.push(Object.assign({},e[m],{index:m,x:c,y:h})),E+=` L ${c} ${h}`});const M=C("path",{class:"sparkline--line",d:E,fill:"none"}),O=`${E} V ${x} L ${i} ${x} Z`,X=C("path",{class:"sparkline--fill",d:O,stroke:"none"});if(t.appendChild(X),t.appendChild(M),!R)return;const b=C("line",{class:"sparkline--cursor",x1:l,x2:l,y1:0,y2:x,"stroke-width":A}),$=C("circle",{class:"sparkline--spot",cx:l,cy:l,r:f});t.appendChild(b),t.appendChild($);const T=C("rect",{width:t.attributes.width.value,height:t.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});t.appendChild(T),T.addEventListener("mouseout",o=>{b.setAttribute("x1",l),b.setAttribute("x2",l),$.setAttribute("cx",l),d&&d(o)}),T.addEventListener("mousemove",o=>{const m=o.offsetX;let c=k.find(B=>B.x>=m);c||(c=k[w]);const h=k[k.indexOf(c)-1];let v,I;h?(I=h.x+(c.x-h.x)/2,v=m>=I?c:h):v=c;const{x:P}=v,{y:Y}=v;$.setAttribute("cx",P),$.setAttribute("cy",Y),b.setAttribute("x1",P),b.setAttribute("x2",P),s&&s(o,v)})}function q({style:t,title:e,value:n,graph:s,description:d}){return u.jsx(tt,{children:u.jsxs(H,{style:{...t},children:[u.jsx(L,{sx:{fontSize:14},color:"text.secondary",children:e}),u.jsx(L,{variant:"h5",component:"div",mt:1,children:n}),s,!!d&&u.jsx(Q,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:d})]})})}q.propTypes={style:a.object,title:a.node,value:a.node,graph:a.node,description:a.any};q.defaultProps={style:{},title:null,value:null,graph:null,description:null};const tt=V(Z)`
|
|
2
|
-
.card-content {
|
|
3
|
-
height: 150px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.card-sparkline {
|
|
7
|
-
flex: 2;
|
|
8
|
-
display: flex;
|
|
9
|
-
position: relative;
|
|
10
|
-
*[hidden] {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
.sparkline {
|
|
15
|
-
stroke: ${t=>t.theme.palette.primary.main};
|
|
16
|
-
fill: ${t=>t.theme.palette.primary.main}1A;
|
|
17
|
-
}
|
|
18
|
-
.tooltip {
|
|
19
|
-
position: absolute;
|
|
20
|
-
background: rgba(0, 0, 0, 0.7);
|
|
21
|
-
color: #fff;
|
|
22
|
-
padding: 2px 5px;
|
|
23
|
-
font-size: 12px;
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
z-index: 9999;
|
|
26
|
-
}
|
|
27
|
-
.sparkline--cursor {
|
|
28
|
-
stroke: orange;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.sparkline--spot {
|
|
32
|
-
fill: red;
|
|
33
|
-
stroke: red;
|
|
34
|
-
}
|
|
35
|
-
`;function D({id:t,title:e,current:n,description:s,data:d,dateFn:R,valueFn:f}){const i=j.useRef(null),A=j.useRef(null),r=G({style:{top:0,left:0},hidden:!0,textContent:""}),[F,p]=j.useState(null),y=J(F),x={onmousemove(S,g){const{date:l,value:w}=g;r.textContent=`${R(l)}: ${f(w)}`,r.style.top=-30,r.style.left=80,r.hidden=!1},onmouseout(){r.hidden=!0}};return j.useEffect(()=>{setTimeout(()=>{p(document.querySelector(`.${t}`)),setTimeout(()=>{i.current&&_(i.current,d||[],x)},400)})},[d]),u.jsx(q,{title:e,value:n,graph:u.jsxs("div",{className:`card-sparkline ${t}`,style:{marginTop:16},children:[u.jsx("svg",{ref:i,className:"sparkline",width:(y==null?void 0:y.width)||100,height:30,strokeWidth:"2"}),u.jsx("span",{className:"tooltip",ref:A,hidden:r.hidden,style:{...r.style},children:r.textContent})]}),description:s})}D.propTypes={id:a.string.isRequired,title:a.string.isRequired,current:a.any.isRequired,description:a.any,data:a.array,dateFn:a.func,valueFn:a.func};D.defaultProps={description:null,data:[],dateFn:t=>t,valueFn:t=>t};export{q as I,D as a};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const __vite__fileDeps=["./overview-CXRCvckQ.js","./index-DBlH-4qz.js","./index-D7K8de1w.css","./index-GQiNlTaJ.js","./team-B2Py-5R-.js","./url-evaluation-OWrig3n8.js","./Delete-HYXbanP_.js","./tag-tXL4aJpc.js","./Add-BlWdL5hq.js","./LockIcon-Ca85OyYH.js","./index-f3gCWa9h.js","./Https-CspPw1QL.js","./InfoOutlined-DD-Zg0Tj.js","./index-BZvR35Hj.js","./api-sSit_7Kw.js","./util-BjsuBWBH.js","./TextField-DRrSIaR4.js","./Select-D6ACs1xY.js","./InputLabel-BXQy_ZSg.js","./LoadingButton-DVHwr9De.js","./actions-QLA3pt8S.js","./index-Dz5x-Zd5.js","./iframe-CIfJru42.js","./line-ODorkEX8.js","./Done-1q2rveFh.js","./EditIcon-nFgXy_Ap.js","./ArrowDropDown-BRSuKRSZ.js","./ButtonGroup-CqHbqvIj.js","./getValidReactChildren-BXQ8AiZt.js","./index-rJLRm37D.js","./ChevronRight-hhdO2z__.js","./index-C01qpSwK.js","./bundle-avatar-4GKn5oRs.js","./app-avatar-DH3uT_Nr.js","./isEqual-C9LQO0Wo.js","./Loop-vUb_fmsc.js","./Autocomplete-DzQAgmMV.js","./mode-B2dWMeTO.js","./Public-BEijyP_7.js","./click-to-copy-BJBKnF7C.js","./index-DEBI0lGj.js","./index.esm-UN3QaGsN.js","./Launch-Eb8N22dN.js","./Edit-BowBuCq8.js","./actions-jzQJLd83.js","./useLocalStorage-Den65TTd.js","./MoreVert-gaCnI5Xf.js","./index-BsU6rGWy.js","./redux-Bu4pculE.js","./switch-control-Oh1i031K.js","./Slider-DKraNvrD.js","./index-BNasUWiN.js","./FilterList-CFsrQPpD.js","./LastPage-C7awZPyV.js","./Search-Cz2kpFbT.js","./index-BrX8n3kg.js","./index-DU3JORH0.css","./config-navigation-Dh_BXFIi.js","./slicedToArray-CUj4BDqr.js","./index--hCEdE0S.js","./InputAdornment-Dy1fA12v.js","./index-B6H1TQgD.js","./Skeleton-DWKEXisW.js","./audit-logs-DwuYsIhc.js","./index-BFmN77vD.js","./index-D4PP6P2d.css","./Pagination-DfzcotPN.js","./index-CTyxnc1Q.js","./index-Bh-DJU8Z.js","./list-header-DF2AUmaz.js","./Google-Dm0Bt78U.js","./index-8fCm2Jic.js","./index-2dK67bGl.js","./ToggleButtonGroup-CBvNwQed.js","./index-uyaXmUh9.js","./ViewList-CxKdhgAh.js","./resource-dialog-BL8JdZuL.js","./index-D1-aBvtW.js","./service-BUuflGft.js","./table-icons-gSPlUUro.js","./ChevronLeft-zlmw0JTD.js","./DeleteOutline-mQ8p8X2l.js","./memoize-one.esm-BdPwpGay.js","./index-CgLCDu24.js","./agreement-Bd_YDn4J.js","./Link-euuV_LRf.js","./item-CE4vGuWF.js","./preact.module-B1z5cdvs.js","./delete-confirm-CNU7dJ17.js","./item-CxkJY_14.css","./index-DnYXtUxe.js","./Close-BfNzQHXc.js","./lottie-BuomNMnt.js","./toUpper-fPzt0_fA.js","./spaces-DbeGuVPF.js","./install-from-url-BQJWpTKl.js","./Stepper-CZFVEfLi.js","./use-blocklet-info-for-connect-did-spaces-tLVaGUOx.js","./Breadcrumbs-BQD6r-rf.js","./log-CNVd8L59.js","./download-Htx7YW1G.js","./download-D33dFtt_.css","./runtime-KfScM6FA.js","./memory-BSkx1Ub2.js","./chart-BhmgRFRd.js","./traffic-C7SAOKwi.js","./index-DQZaP4Az.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
-
import{q as Te,t as qt,bm as M,r as m,F as V,j as p,J as Ye,Q as te,B as Ze,x as Ht,bn as Kt,M as Ae,A as O,K as ie,bo as Qt,a0 as Be,bp as ce,b as ye,P as Wt,bh as et,bq as P,z as Jt,u as Xt,br as de,N as Yt,bs as Zt,bt as en,bu as Fe,X as Ue,C as Ve,O as tn,bv as nn,m as pe,V as on,n as sn,bw as rn}from"./index-DBlH-4qz.js";import{T as cn}from"./index-C01qpSwK.js";import{B as an}from"./url-evaluation-OWrig3n8.js";import{D as ln,B as un}from"./actions-jzQJLd83.js";import{B as fn}from"./app-avatar-DH3uT_Nr.js";import{u as R,B as dn,a as pn,T as hn}from"./team-B2Py-5R-.js";import{a as mn,b as gn}from"./spaces-DbeGuVPF.js";import{B as yn}from"./Breadcrumbs-BQD6r-rf.js";/**
|
|
3
|
-
* (c) Iconify
|
|
4
|
-
*
|
|
5
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
6
|
-
* files at https://github.com/iconify/iconify
|
|
7
|
-
*
|
|
8
|
-
* Licensed under MIT.
|
|
9
|
-
*
|
|
10
|
-
* @license MIT
|
|
11
|
-
* @version 3.1.1
|
|
12
|
-
*/const tt=Object.freeze({left:0,top:0,width:16,height:16}),ne=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),K=Object.freeze({...tt,...ne}),be=Object.freeze({...K,body:"",hidden:!1});function bn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function ze(e,t){const n=bn(e,t);for(const o in be)o in ne?o in e&&!(o in n)&&(n[o]=ne[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function vn(e,t){const n=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function r(i){if(n[i])return s[i]=[];if(!(i in s)){s[i]=null;const c=o[i]&&o[i].parent,a=c&&r(c);a&&(s[i]=[c].concat(a))}return s[i]}return(t||Object.keys(n).concat(Object.keys(o))).forEach(r),s}function xn(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let r={};function i(c){r=ze(o[c]||s[c],r)}return i(t),n.forEach(i),ze(e,r)}function nt(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const o=vn(e);for(const s in o){const r=o[s];r&&(t(s,xn(e,s,r)),n.push(s))}return n}const z=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(e,t,n,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),a=s.pop(),l={provider:s.length>0?s[0]:o,prefix:a,name:c};return t&&!Z(l)?null:l}const r=s[0],i=r.split("-");if(i.length>1){const c={provider:o,prefix:i.shift(),name:i.join("-")};return t&&!Z(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:r};return t&&!Z(c,n)?null:c}return null},Z=(e,t)=>e?!!((e.provider===""||e.provider.match(z))&&(t&&e.prefix===""||e.prefix.match(z))&&e.name.match(z)):!1,Sn={provider:"",aliases:{},not_found:{},...tt};function he(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ot(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!he(e,Sn))return null;const n=t.icons;for(const s in n){const r=n[s];if(!s.match(z)||typeof r.body!="string"||!he(r,be))return null}const o=t.aliases||Object.create(null);for(const s in o){const r=o[s],i=r.parent;if(!s.match(z)||typeof i!="string"||!n[i]&&!o[i]||!he(r,be))return null}return t}const oe=Object.create(null);function wn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function T(e,t){const n=oe[e]||(oe[e]=Object.create(null));return n[t]||(n[t]=wn(e,t))}function je(e,t){return ot(t)?nt(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function kn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function In(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(oe)).forEach(s=>{(typeof s=="string"&&typeof t=="string"?[t]:Object.keys(oe[s]||{})).forEach(i=>{const c=T(s,i);n=n.concat(Object.keys(c.icons).map(a=>(s!==""?"@"+s+":":"")+i+":"+a))})}),n}let q=!1;function Cn(e){return typeof e=="boolean"&&(q=e),q}function Q(e){const t=typeof e=="string"?F(e,!0,q):e;if(t){const n=T(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function st(e,t){const n=F(e,!0,q);if(!n)return!1;const o=T(n.provider,n.prefix);return kn(o,n.name,t)}function rt(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let s=!1;return ot(e)&&(e.prefix="",nt(e,(r,i)=>{i&&st(r,i)&&(s=!0)})),s}const n=e.prefix;if(!Z({provider:t,prefix:n,name:"a"}))return!1;const o=T(t,n);return!!je(o,e)}function En(e){return!!Q(e)}function Pn(e){const t=Q(e);return t?{...K,...t}:null}const it=Object.freeze({width:null,height:null}),ct=Object.freeze({...it,...ne}),_n=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Tn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ve(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(_n);if(o===null||!o.length)return e;const s=[];let r=o.shift(),i=Tn.test(r);for(;;){if(i){const c=parseFloat(r);isNaN(c)?s.push(r):s.push(Math.ceil(c*t*n)/n)}else s.push(r);if(r=o.shift(),r===void 0)return s.join("");i=!i}}const An=e=>e==="unset"||e==="undefined"||e==="none";function ae(e,t){const n={...K,...e},o={...ct,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,o].forEach(v=>{const x=[],C=v.hFlip,S=v.vFlip;let w=v.rotate;C?S?w+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):S&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let k;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:k=s.height/2+s.top,x.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:k=s.width/2+s.left,x.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}w%2===1&&(s.left!==s.top&&(k=s.left,s.left=s.top,s.top=k),s.width!==s.height&&(k=s.width,s.width=s.height,s.height=k)),x.length&&(r='<g transform="'+x.join(" ")+'">'+r+"</g>")});const i=o.width,c=o.height,a=s.width,l=s.height;let u,d;i===null?(d=c===null?"1em":c==="auto"?l:c,u=ve(d,a/l)):(u=i==="auto"?a:i,d=c===null?ve(u,l/a):c==="auto"?l:c);const f={},y=(v,x)=>{An(x)||(f[v]=x.toString())};return y("width",u),y("height",d),f.viewBox=s.left.toString()+" "+s.top.toString()+" "+a.toString()+" "+l.toString(),{attributes:f,body:r}}const Bn=/\sid="(\S+)"/g,jn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let On=0;function at(e,t=jn){const n=[];let o;for(;o=Bn.exec(e);)n.push(o[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(r=>{const i=typeof t=="function"?t(r):t+(On++).toString(),c=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const D={local:!0,session:!0},lt={local:new Set,session:new Set};let Oe=!1;function Dn(e){Oe=e}const $e="iconify2",H="iconify",ut=H+"-count",Ge=H+"-version",ft=36e5,Ln=168;function xe(e,t){try{return e.getItem(t)}catch{}}function De(e,t,n){try{return e.setItem(t,n),!0}catch{}}function qe(e,t){try{e.removeItem(t)}catch{}}function Se(e,t){return De(e,ut,t.toString())}function we(e){return parseInt(xe(e,ut))||0}let X=typeof window>"u"?{}:window;function dt(e){const t=e+"Storage";try{if(X&&X[t]&&typeof X[t].length=="number")return X[t]}catch{}D[e]=!1}function pt(e,t){const n=dt(e);if(!n)return;const o=xe(n,Ge);if(o!==$e){if(o){const c=we(n);for(let a=0;a<c;a++)qe(n,H+a.toString())}De(n,Ge,$e),Se(n,0);return}const s=Math.floor(Date.now()/ft)-Ln,r=c=>{const a=H+c.toString(),l=xe(n,a);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>s&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,c))return!0}catch{}qe(n,a)}};let i=we(n);for(let c=i-1;c>=0;c--)r(c)||(c===i-1?(i--,Se(n,i)):lt[e].add(c))}function ht(){if(!Oe){Dn(!0);for(const e in D)pt(e,t=>{const n=t.data,o=t.provider,s=n.prefix,r=T(o,s);if(!je(r,n).length)return!1;const i=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,i):i,!0})}}function mt(e,t){switch(e){case"local":case"session":D[e]=t;break;case"all":for(const n in D)D[n]=t;break}}const ke=Object.create(null);function gt(e,t){ke[e]=t}function Ie(e){return ke[e]||ke[""]}function Le(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const le=Object.create(null),U=["https://api.simplesvg.com","https://api.unisvg.com"],ee=[];for(;U.length>0;)U.length===1||Math.random()>.5?ee.push(U.shift()):ee.push(U.pop());le[""]=Le({resources:["https://api.iconify.design"].concat(ee)});function yt(e,t){const n=Le(t);return n===null?!1:(le[e]=n,!0)}function ue(e){return le[e]}function Mn(){return Object.keys(le)}const Nn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let se=Nn();function Rn(e){se=e}function Fn(){return se}function Un(e,t){const n=ue(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let s=0;n.resources.forEach(i=>{s=Math.max(s,i.length)});const r=t+".json?icons=";o=n.maxURL-s-n.path.length-r.length}return o}function Vn(e){return e===404}const zn=(e,t,n)=>{const o=[],s=Un(e,t),r="icons";let i={type:r,provider:e,prefix:t,icons:[]},c=0;return n.forEach((a,l)=>{c+=a.length+1,c>=s&&l>0&&(o.push(i),i={type:r,provider:e,prefix:t,icons:[]},c=a.length),i.icons.push(a)}),o.push(i),o};function $n(e){if(typeof e=="string"){const t=ue(e);if(t)return t.path}return"/"}const Gn=(e,t,n)=>{if(!se){n("abort",424);return}let o=$n(t.provider);switch(t.type){case"icons":{const r=t.prefix,c=t.icons.join(","),a=new URLSearchParams({icons:c});o+=r+".json?"+a.toString();break}case"custom":{const r=t.uri;o+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let s=503;se(e+o).then(r=>{const i=r.status;if(i!==200){setTimeout(()=>{n(Vn(i)?"abort":"next",i)});return}return s=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",s)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",s)})},qn={prepare:zn,send:Gn};function Hn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,r)=>s.provider!==r.provider?s.provider.localeCompare(r.provider):s.prefix!==r.prefix?s.prefix.localeCompare(r.prefix):s.name.localeCompare(r.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const r=s.provider,i=s.prefix,c=s.name,a=n[r]||(n[r]=Object.create(null)),l=a[i]||(a[i]=T(r,i));let u;c in l.icons?u=t.loaded:i===""||l.missing.has(c)?u=t.missing:u=t.pending;const d={provider:r,prefix:i,name:c};u.push(d)}),t}function bt(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function Kn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,s=e.prefix;t.forEach(r=>{const i=r.icons,c=i.pending.length;i.pending=i.pending.filter(a=>{if(a.prefix!==s)return!0;const l=a.name;if(e.icons[l])i.loaded.push({provider:o,prefix:s,name:l});else if(e.missing.has(l))i.missing.push({provider:o,prefix:s,name:l});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||bt([e],r.id),r.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),r.abort))})}))}let Qn=0;function Wn(e,t,n){const o=Qn++,s=bt.bind(null,n,o);if(!t.pending.length)return s;const r={id:o,icons:t,callback:e,abort:s};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(r)}),s}function Jn(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const r=typeof s=="string"?F(s,t,n):s;r&&o.push(r)}),o}var Xn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Yn(e,t,n,o){const s=e.resources.length,r=e.random?Math.floor(Math.random()*s):e.index;let i;if(e.random){let g=e.resources.slice(0);for(i=[];g.length>1;){const I=Math.floor(Math.random()*g.length);i.push(g[I]),g=g.slice(0,I).concat(g.slice(I+1))}i=i.concat(g)}else i=e.resources.slice(r).concat(e.resources.slice(0,r));const c=Date.now();let a="pending",l=0,u,d=null,f=[],y=[];typeof o=="function"&&y.push(o);function v(){d&&(clearTimeout(d),d=null)}function x(){a==="pending"&&(a="aborted"),v(),f.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),f=[]}function C(g,I){I&&(y=[]),typeof g=="function"&&y.push(g)}function S(){return{startTime:c,payload:t,status:a,queriesSent:l,queriesPending:f.length,subscribe:C,abort:x}}function w(){a="failed",y.forEach(g=>{g(void 0,u)})}function k(){f.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),f=[]}function B(g,I,b){const _=I!=="success";switch(f=f.filter(E=>E!==g),a){case"pending":break;case"failed":if(_||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=b,w();return}if(_){u=b,f.length||(i.length?j():w());return}if(v(),k(),!e.random){const E=e.resources.indexOf(g.resource);E!==-1&&E!==e.index&&(e.index=E)}a="completed",y.forEach(E=>{E(b)})}function j(){if(a!=="pending")return;v();const g=i.shift();if(g===void 0){if(f.length){d=setTimeout(()=>{v(),a==="pending"&&(k(),w())},e.timeout);return}w();return}const I={status:"pending",resource:g,callback:(b,_)=>{B(I,b,_)}};f.push(I),l++,d=setTimeout(j,e.rotate),n(g,t,I.callback)}return setTimeout(j),S}function vt(e){const t={...Xn,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function s(c,a,l){const u=Yn(t,c,a,(d,f)=>{o(),l&&l(d,f)});return n.push(u),u}function r(c){return n.find(a=>c(a))||null}return{query:s,find:r,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function He(){}const me=Object.create(null);function Zn(e){if(!me[e]){const t=ue(e);if(!t)return;const n=vt(t),o={config:t,redundancy:n};me[e]=o}return me[e]}function xt(e,t,n){let o,s;if(typeof e=="string"){const r=Ie(e);if(!r)return n(void 0,424),He;s=r.send;const i=Zn(e);i&&(o=i.redundancy)}else{const r=Le(e);if(r){o=vt(r);const i=e.resources?e.resources[0]:"",c=Ie(i);c&&(s=c.send)}}return!o||!s?(n(void 0,424),He):o.query(t,s,n)().abort}function eo(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in D)pt(o,s=>{const r=s.data;return s.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}function to(e,t){Oe||ht();function n(o){let s;if(!D[o]||!(s=dt(o)))return;const r=lt[o];let i;if(r.size)r.delete(i=Array.from(r).shift());else if(i=we(s),!Se(s,i+1))return;const c={cached:Math.floor(Date.now()/ft),provider:e.provider,data:t};return De(s,H+i.toString(),JSON.stringify(c))}t.lastModified&&!eo(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Ke(){}function no(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Kn(e)}))}function oo(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,s=e.iconsToLoad;delete e.iconsToLoad;let r;if(!s||!(r=Ie(n)))return;r.prepare(n,o,s).forEach(c=>{xt(n,c,a=>{if(typeof a!="object")c.icons.forEach(l=>{e.missing.add(l)});else try{const l=je(e,a);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),to(e,a)}catch(l){console.error(l)}no(e)})})}))}const so=e=>{const n=T(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},Me=(e,t)=>{const n=Jn(e,!0,Cn()),o=Hn(n);if(!o.pending.length){let a=!0;return t&&setTimeout(()=>{a&&t(o.loaded,o.missing,o.pending,Ke)}),()=>{a=!1}}const s=Object.create(null),r=[];let i,c;return o.pending.forEach(a=>{const{provider:l,prefix:u}=a;if(u===c&&l===i)return;i=l,c=u,r.push(T(l,u));const d=s[l]||(s[l]=Object.create(null));d[u]||(d[u]=[])}),o.pending.forEach(a=>{const{provider:l,prefix:u,name:d}=a,f=T(l,u),y=f.pendingIcons||(f.pendingIcons=new Set);y.has(d)||(y.add(d),s[l][u].push(d))}),r.forEach(a=>{const{provider:l,prefix:u}=a;s[l][u].length&&oo(a,s[l][u])}),t?Wn(t,o,r):Ke},ro=e=>new Promise((t,n)=>{const o=typeof e=="string"?F(e,!0):e;if(!o){n(e);return}Me([o||e],s=>{if(s.length&&o){const r=Q(o);if(r){t({...K,...r});return}}n(e)})});function St(e,t){const n={...e};for(const o in t){const s=t[o],r=typeof s;o in it?(s===null||s&&(r==="string"||r==="number"))&&(n[o]=s):r===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const fe={...ct,inline:!1},ge="iconify",Ce="iconify-inline",A="iconifyData"+Date.now();let L=[];function W(e){for(let t=0;t<L.length;t++){const n=L[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function wt(e,t=!1){let n=W(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},L.push(n),n)}function io(){if(document.documentElement)return wt(document.documentElement);L.push({node:()=>document.documentElement})}function co(e){L=L.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function J(){return L}function ao(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let $=null;const lo={childList:!0,subtree:!0,attributes:!0};function kt(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,$&&$(e)}))}function uo(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let o=0;o<t.length;o++){const s=t[o];if(s.addedNodes&&s.addedNodes.length>0||s.type==="attributes"&&s.target[A]!==void 0){n.paused||kt(e);return}}}function It(e,t){e.observer.instance.observe(t,lo)}function re(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(uo.bind(null,e)),It(e,n),t.paused||kt(e))}function Qe(){J().forEach(re)}function Ct(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function fo(e){const t=$!==null;if($!==e&&($=e,t&&J().forEach(Ct)),t){Qe();return}ao(Qe)}function Ee(e){(e?[e]:J()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function po(e){if(e){const t=W(e);t&&Ee(t)}else Ee()}function Pe(e){(e?[e]:J()).forEach(t=>{if(!t.observer){re(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const o=typeof t.node=="function"?t.node():t.node;if(o)n.instance?It(t,o):re(t);else return}})}function ho(e){if(e){const t=W(e);t&&Pe(t)}else Pe()}function Et(e,t=!1){const n=wt(e,t);return re(n),n}function Pt(e){const t=W(e);t&&(Ct(t),co(e))}function mo(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,o=t.customisations;for(const s in fe)if(n[s]!==o[s])return!0;return!1}function go(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r=r/s,r%1===0?o(r):0)}}return t}const yo=/[\s,]+/;function bo(e,t){t.split(yo).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const vo=["width","height"],xo=["inline","hFlip","vFlip"];function So(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function wo(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&F(t,!0);if(!n)return null;const o={...fe,inline:e.classList&&e.classList.contains(Ce)};vo.forEach(c=>{const a=e.getAttribute("data-"+c);a&&(o[c]=a)});const s=e.getAttribute("data-rotate");typeof s=="string"&&(o.rotate=go(s));const r=e.getAttribute("data-flip");typeof r=="string"&&bo(o,r),xo.forEach(c=>{const a="data-"+c,l=So(e.getAttribute(a),a);typeof l=="boolean"&&(o[c]=l)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:o,mode:i}}const ko="svg."+ge+", i."+ge+", span."+ge+", i."+Ce+", span."+Ce;function Io(e){const t=[];return e.querySelectorAll(ko).forEach(n=>{const o=n[A]||n.tagName.toLowerCase()!=="svg"?wo(n):null;o&&t.push({node:n,props:o})}),t}function _t(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let G;function Co(){try{G=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{G=null}}function Eo(e){return G===void 0&&Co(),G?G.createHTML(e):e}function Tt(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function At(e,t,n,o){const s=e.classList;if(o){const i=o.classList;Array.from(i).forEach(c=>{s.add(c)})}const r=[];return t.forEach(i=>{s.contains(i)?n.has(i)&&r.push(i):(s.add(i),r.push(i))}),n.forEach(i=>{t.has(i)||s.remove(i)}),r}function Bt(e,t,n){const o=e.style;(n||[]).forEach(r=>{o.removeProperty(r)});const s=[];for(const r in t)o.getPropertyValue(r)||(s.push(r),o.setProperty(r,t[r]));return s}function jt(e,t,n){let o;try{o=document.createElement("span")}catch{return e}const s=t.customisations,r=ae(n,s),i=e[A],c=_t(at(r.body),{"aria-hidden":"true",role:"img",...r.attributes});o.innerHTML=Eo(c);const a=o.childNodes[0],l=e.attributes;for(let v=0;v<l.length;v++){const x=l.item(v),C=x.name;C!=="class"&&!a.hasAttribute(C)&&a.setAttribute(C,x.value)}const u=Tt(t.icon),d=At(a,u,new Set(i&&i.addedClasses),e),f=Bt(a,s.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),y={...t,status:"loaded",addedClasses:d,addedStyles:f};return a[A]=y,e.parentNode&&e.parentNode.replaceChild(a,e),a}function Po(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _o(e){return"data:image/svg+xml,"+Po(e)}function To(e){return'url("'+_o(e)+'")'}const Ao={display:"inline-block"},_e={"background-color":"currentColor"},Ot={"background-color":"transparent"},We={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Je={"-webkit-mask":_e,mask:_e,background:Ot};for(const e in Je){const t=Je[e];for(const n in We)t[e+"-"+n]=We[n]}function Xe(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Bo(e,t,n,o){const s=t.customisations,r=ae(n,s),i=r.attributes,c=e[A],a=_t(r.body,{...i,width:n.width+"",height:n.height+""}),l=Tt(t.icon),u=At(e,l,new Set(c&&c.addedClasses)),f={"--svg":To(a),width:Xe(i.width),height:Xe(i.height),...Ao,...o?_e:Ot};s.inline&&(f["vertical-align"]="-0.125em");const y=Bt(e,f,c&&c.addedStyles),v={...t,status:"loaded",addedClasses:u,addedStyles:y};return e[A]=v,e}let Y=!1;function jo(){Y||(Y=!0,setTimeout(()=>{Y&&(Y=!1,N())}))}function N(e,t=!1){const n=Object.create(null);function o(s,r){const{provider:i,prefix:c,name:a}=s,l=T(i,c),u=l.icons[a];if(u)return{status:"loaded",icon:u};if(l.missing.has(a))return{status:"missing"};if(r&&!so(s)){const d=n[i]||(n[i]=Object.create(null));(d[c]||(d[c]=new Set)).add(a)}return{status:"loading"}}(e?[e]:J()).forEach(s=>{const r=typeof s.node=="function"?s.node():s.node;if(!r||!r.querySelectorAll)return;let i=!1,c=!1;function a(l,u,d){if(c||(c=!0,Ee(s)),l.tagName.toUpperCase()!=="SVG"){const f=u.mode,y=f==="mask"||(f==="bg"?!1:f==="style"?d.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){Bo(l,u,{...K,...d},y);return}}jt(l,u,d)}Io(r).forEach(({node:l,props:u})=>{const d=l[A];if(!d){const{status:y,icon:v}=o(u.icon,!0);if(v){a(l,u,v);return}i=i||y==="loading",l[A]={...u,status:y};return}let f;if(mo(d,u)){if(f=o(u.icon,d.name!==u.name),!f.icon){i=i||f.status==="loading",Object.assign(d,{...u,status:f.status});return}}else{if(d.status!=="loading")return;if(f=o(u.icon,!1),!f.icon){d.status=f.status;return}}a(l,u,f.icon)}),s.temporary&&!i?Pt(r):t&&i?Et(r,!0):c&&s.observer&&Pe(s)});for(const s in n){const r=n[s];for(const i in r){const c=r[i];Me(Array.from(c).map(a=>({provider:s,prefix:i,name:a})),jo)}}}function Oo(e){const t=W(e);t?N(t):N({node:e,temporary:!0},!0)}function Dt(e,t,n=!1){const o=Q(e);if(!o)return null;const s=F(e),r=St(fe,t||{}),i=jt(document.createElement("span"),{name:e,icon:s,customisations:r},o);return n?i.outerHTML:i}function Do(){return"3.1.1"}function Lo(e,t){return Dt(e,t,!1)}function Mo(e,t){return Dt(e,t,!0)}function No(e,t){const n=Q(e);if(!n)return null;const o=St(fe,t||{});return ae(n,o)}function Ro(e){e?Oo(e):N()}if(typeof document<"u"&&typeof window<"u"){io();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!rt(o))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{fo(N),N()})}function Fo(e,t){mt(e,t!==!1)}function Uo(e){mt(e,!0)}gt("",qn);if(typeof document<"u"&&typeof window<"u"){ht();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const o="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;yt(n,s)||console.error(o)}catch{console.error(o)}}}}const Vo={getAPIConfig:ue,setAPIModule:gt,sendAPIQuery:xt,setFetch:Rn,getFetch:Fn,listAPIProviders:Mn},zo={_api:Vo,addAPIProvider:yt,loadIcons:Me,loadIcon:ro,iconExists:En,getIcon:Pn,listIcons:In,addIcon:st,addCollection:rt,replaceIDs:at,calculateSize:ve,buildIcon:ae,getVersion:Do,renderSVG:Lo,renderHTML:Mo,renderIcon:No,scan:Ro,observe:Et,stopObserving:Pt,pauseObserver:po,resumeObserver:ho,enableCache:Fo,disableCache:Uo};try{self.Iconify===void 0&&(self.Iconify=zo)}catch{}const $o=e=>{const t={};let n=null;return Qt(e,o=>{t[o.meta.bundleDid]?n=Ae(o,!0):o.meta.bundleDid&&(t[o.meta.bundleDid]=!0)}),n},Go=(e,t,n)=>{var r;const{hostname:o,href:s}=e;if(!t)return s;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(o);if(!c)return s;const a=c[0],u=((((r=t.site)==null?void 0:r.domainAliases)||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(V.DEFAULT_DID_DOMAIN))||"").replace(`.${V.DEFAULT_DID_DOMAIN}`,"");return u?s.replace(o,`${u}-${a}.${V.DEFAULT_IP_DOMAIN_SUFFIX}`):s}return s.replace(t.meta.bundleDid,t.appPid)};function Lt(){const{t:e}=Te(),{api:t}=qt(),{blocklet:n}=R(),{inService:o}=M(),[s,r]=m.useState(!1),[i,c]=m.useState(5),a=n&&n.structVersion!==V.APP_STRUCT_VERSION,l=()=>{try{if(n.status==="running"){O.error(e("blocklet.migrate.tip.running"));return}const f=$o(n);if(f){O.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}r(!0)}catch(f){O.error(ie(f))}},u=()=>{const f=Go(window.location,n,o);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(y=>y-1)},1e3)},d=()=>r(!1);return[a&&p.jsxs(Ye,{type:"warning",style:{margin:"12px 0"},children:[p.jsxs(te,{display:"flex",alignItems:"center",children:[p.jsx(Ze,{variant:"contained",size:"small",color:"primary",onClick:()=>l(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),p.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>p.jsx(te,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&p.jsx(Ht,{popup:!0,open:s,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:u,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Kt(n,!0),title:Ae(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:d},"connect")]}Lt.propTypes={};async function qo({blockletDid:e,nodeApi:t,spaceGateways:n}){let o=!1;const s=await Promise.all(n.map(async r=>{let{name:i}=r;const c=await mn(r.endpoint);return!Be.isEmpty(c)&&c!==i&&(i=c,o=!0),{...r,name:i}}));return o&&await Promise.all(s.filter(r=>r.did).map(r=>t.updateBlockletSpaceGateway({input:{did:e,where:{did:r.did},spaceGateway:{...r}}}))),s}function Ho({setLoading:e,refresh:t}={}){var a;const{blocklet:n,actions:{refreshBlocklet:o}}=R(),s=(a=n==null?void 0:n.meta)==null?void 0:a.did,[r,i]=m.useState([]),{api:c}=M();return ce(async()=>{try{if(!s){i([]);return}e==null||e(!0);const{spaceGateways:l}=await c.getBlockletSpaceGateways({input:{did:s}}),u=await qo({blockletDid:s,nodeApi:c,spaceGateways:l});i(u??[])}catch(l){console.error(l),O.error(ie(l))}finally{e==null||e(!1)}},[s,o,t]),{spaceGateways:r}}function Mt({deps:e,setLoading:t}={deps:[],setLoading:()=>{}}){var c;const{blocklet:n}=R(),[o,s]=m.useState([]),{api:r}=M(),i=Be.debounce(async()=>{try{if(t(!0),!n){s([]);return}const{backups:a}=await r.getBlockletBackups({input:{did:n.meta.did}});s(a??[])}catch(a){console.error(a),O.error(ie(a))}finally{t(!1)}},2e3);return ce(async()=>{i()},[(c=n==null?void 0:n.meta)==null?void 0:c.did].concat(e)),{backups:o}}function Ko({appDid:e}){const{backups:t}=Mt(),[n,o]=m.useState({message:"",progress:0,completed:!1}),s=M(),{ws:{useSubscription:r}}=s;return r(ye.BlockletEvents.backupProgress,i=>{e===(i==null?void 0:i.appDid)&&o(()=>({...i}))},[e]),m.useEffect(()=>{var i;if(t!=null&&t.length&&Be.isNull((i=t[0])==null?void 0:i.status)){const[c]=t;o(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[t]),n}function Qo({deps:e}={deps:[]}){var r;const{blocklet:t}=R(),{api:n}=M(),[o,s]=m.useState(null);return ce(async()=>{var i;if((i=t==null?void 0:t.meta)!=null&&i.did){const{autoBackup:c}=await n.getAutoBackup({input:{did:t.meta.did}});s(c)}},[(r=t==null?void 0:t.meta)==null?void 0:r.did].concat(e)),o}function Wo({deps:e}={deps:[]}){var r;const{blocklet:t}=R(),{api:n}=M(),[o,s]=m.useState(null);return ce(async()=>{var i;if((i=t==null?void 0:t.meta)!=null&&i.did){const{autoCheckUpdate:c}=await n.getAutoCheckUpdate({input:{did:t.meta.did}});s(c)}},[(r=t==null?void 0:t.meta)==null?void 0:r.did].concat(e)),o}const Nt=m.createContext({}),{Provider:Jo,Consumer:Ss}=Nt;function Ne({children:e}){const{t}=Te(),{api:n}=M(),{blocklet:o}=R(),[s,r]=m.useState(!1),[i,c]=m.useState(!1),{spaceGateways:a}=Ho({refresh:i,setLoading:r}),l=Ko({appDid:o==null?void 0:o.appDid}),[u,d]=m.useState(!1),f=m.useMemo(()=>gn(o==null?void 0:o.environments),[o,i,u]),[y,v]=m.useState(!1),{backups:x}=Mt({deps:[l],setLoading:v}),[C,S]=m.useState(a==null?void 0:a.find(h=>h.endpoint===f)),[w,k]=m.useState(!1),B=Qo({deps:[w]}),[j,g]=m.useState(!1),I=Wo({deps:[j]}),b=()=>{c(h=>!h)},_=()=>{d(h=>!h)},E=()=>{k(h=>!h)},Rt=()=>{g(h=>!h)},Ft=async(h,Re)=>{a.push({...h,loading:!0}),await n.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:h}}),f!==Re&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:ye.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:Re}]}}),b(),S(h)},Ut=async h=>{h&&(await n.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:h==null?void 0:h.did}}),b(),S(h))},Vt=async h=>{await n.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:h.did},spaceGateway:h}}),f!==h.endpoint&&await n.configBlocklet({input:{did:[o.meta.did],configs:[{key:ye.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:h.endpoint}]}}),O.success(t("storage.spaces.connectedWithName",{name:(h==null?void 0:h.name)??"DID Spaces"})),b()},zt=h=>(h==null?void 0:h.endpoint)===f,$t=async h=>{await n.updateAutoBackup({input:{did:o.meta.did,autoBackup:h}}),E()},Gt=async h=>{await n.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:h}}),Rt()};return p.jsx(Jo,{value:{spaceGateways:a,selectedSpaceGateway:C,addSpaceGateway:Ft,deleteSpaceGateway:Ut,updateSpaceGateway:Vt,refreshSpaceGateways:b,spaceGatewaysLoading:s,spaceGatewayIsSelected:zt,updateAutoBackup:$t,updateAutoCheckUpdate:Gt,autoCheckUpdate:I,backupEndpoint:f,backupProgress:l,backups:x,backupsLoading:y,refreshBackupEndpoint:_,autoBackup:B},children:e})}Ne.propTypes={children:Wt.any.isRequired};Ne.defaultProps={};function ws(){return m.useContext(Nt)}const Xo=m.lazy(()=>P(()=>import("./overview-CXRCvckQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)),Yo=m.lazy(()=>P(()=>import("./index-Dz5x-Zd5.js"),__vite__mapDeps([21,1,2,22,23,24,25,26,27,28,16,17,18,29,30,31,6,32,33,34,35,36,37,38,4,39,40,10,41,42,43,44,45,46,5,7,47,48,49,50,51,52,53,54,3,55,56]),import.meta.url)),Zo=m.lazy(()=>P(()=>import("./config-navigation-Dh_BXFIi.js"),__vite__mapDeps([57,1,2,47,48,58,34,44,45,46,6,27,28,5,7,41,59,17,18,16,31,4,60,36,61,33,62,19]),import.meta.url)),es=m.lazy(()=>P(()=>import("./audit-logs-DwuYsIhc.js"),__vite__mapDeps([63,1,2,64,65,10,45,17,18,66,53]),import.meta.url)),ts=m.lazy(()=>P(()=>import("./index-CTyxnc1Q.js"),__vite__mapDeps([67,1,2,8,68,27,28,25,9,69,54,16,17,18,4,70,10,71,34,72,60,73]),import.meta.url)),ns=m.lazy(()=>P(()=>import("./index-uyaXmUh9.js").then(e=>e.i),__vite__mapDeps([74,1,2,29,8,35,75,69,54,16,17,18,51,52,6,53,47,48,10,46,61,76,77,31,40,7,4,39,3,20]),import.meta.url)),os=m.lazy(()=>P(()=>import("./service-BUuflGft.js"),__vite__mapDeps([78,1,2,79,52,17,6,18,16,53,58,54,44,45,46,27,28,5,7,80,43,30,81,48,62,60,31,82,8,26]),import.meta.url)),ss=m.lazy(()=>P(()=>import("./index-CgLCDu24.js"),__vite__mapDeps([83,1,2,8,23,24,25,26,27,28,16,17,18,29,84,64,65,10,44,45,46,6,5,7,49,40,43,31,79,52,53,58,54,80,30,81,48,62,60,82,39,85,86,72,87,42,88,89,90,91,92,93,4,94,14,70,95,3,96,15,12,97,77,68,9,32,20,33,98]),import.meta.url)),rs=m.lazy(()=>P(()=>import("./log-CNVd8L59.js"),__vite__mapDeps([99,1,2,45,100,27,28,17,101]),import.meta.url)),is=m.lazy(()=>P(()=>import("./runtime-KfScM6FA.js"),__vite__mapDeps([102,1,2,51,52,17,6,18,16,53,47,48,54,10,46,4,103,104,32]),import.meta.url)),cs=m.lazy(()=>P(()=>import("./traffic-C7SAOKwi.js"),__vite__mapDeps([105,1,2,22,80,30,17,104,16,18,60]),import.meta.url)),as=m.lazy(()=>P(()=>import("./index-DQZaP4Az.js"),__vite__mapDeps([106,1,2,4,68,27,28,14,97,77,94,16,17,18,3,49,40,46,81,37,51,52,6,53,47,48,54,10,31,5,7,44,45,33,98]),import.meta.url)),ls=({children:e})=>e;function us(){var g,I;const e=Jt(),{tab:t="overview"}=et(),{did:n,blocklet:o,error:s,client:r,actions:{setBlocklet:i,refreshBlocklet:c}}=pn(),{refresh:a}=Xt(),{t:l}=Te(),u=m.useCallback(()=>p.jsx(es,{scope:n}),[n]),d=((g=o==null?void 0:o.environments.find(b=>b.key==="BLOCKLET_APP_URL"))==null?void 0:g.value)||window.location.origin,f=b=>rn(b,d),y=b=>{e(`/blocklets/${n}/${b}`)},v=b=>{b&&i(b),c()},x=!o||de(o.status)?[]:Yt(o);let C=null;const S=[{label:l("common.overview"),value:"overview"},{breadcrumbsLabel:l("common.components"),label:p.jsx(Zt,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!x.length,children:l("common.components")}),value:"components"}];if(s)C=p.jsxs(p.Fragment,{children:[p.jsx(Ye,{type:"error",variant:"icon",children:ie(s)}),p.jsx(Ze,{onClick:()=>c(),children:p.jsx("span",{style:{textDecoration:"underline"},children:l("common.retry")})})]});else if(o){const b={overview:p.jsx(Xo,{}),configuration:Yo,navigation:Zo,services:os,members:p.jsx(ns,{type:"blocklet",createPassportSvg:f}),passports:ts,components:ss,"audit-logs":u,logs:rs,runtime:p.jsx(is,{}),traffic:p.jsx(cs,{client:r,did:n}),storage:p.jsx(as,{})};t==="configuration"&&de(o.status)&&y("overview"),de(o.status)||(S.push({label:l("common.members"),value:"members"}),S.push({label:l("common.passport"),value:"passports"}),S.push({label:l("common.configuration"),value:"configuration"})),S.push({label:l("common.auditLogs"),value:"audit-logs"}),o&&((I=o.children)!=null&&I.length)&&o.structVersion===V.APP_STRUCT_VERSION&&S.push({label:l("common.logs"),value:"logs"}),S.push({label:l("common.configNavigation"),value:"navigation"}),S.push({label:l("common.runtime"),value:"runtime"}),S.push({label:l("common.traffic"),value:"traffic"}),S.push({label:l("common.storage"),value:"storage"}),en(o).length&&S.splice(2,0,{label:l("blocklet.services"),value:"services"});const E=b[t]||b.overview;C=p.jsxs(ln,{type:"components",children:[!Fe(o)&&p.jsx(cn,{tabs:S,current:t,onChange:y,scrollButtons:"auto"}),p.jsx("div",{className:"page-content",children:p.jsx(m.Suspense,{fallback:p.jsx(Ue,{relative:"parent",children:p.jsx(Ve,{})}),children:m.isValidElement(E)?E:p.jsx(E,{blocklet:o,onUpdate:v,createPassportSvg:f})})})]})}else C=p.jsx(Ue,{relative:"parent",children:p.jsx(Ve,{})});const w=()=>{},k=({action:b,error:_})=>{if(_){O.error(_.message);return}b==="remove"?(a(),e("/blocklets")):c()},B=S.find(b=>b.value===t),j=o?hn:ls;return p.jsx(j,{teamDid:n,children:p.jsxs(ds,{children:[p.jsxs(yn,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[p.jsx(tn,{color:"textSecondary",to:"/blocklets",children:l("common.blocklets")}),p.jsx(nn,{to:`/blocklets/${n}/overview`,style:b=>b?{color:"inherit"}:{},children:l("common.detail")}),p.jsx(pe,{color:"textSecondary",children:B?B.breadcrumbsLabel||B.label:""})]}),p.jsxs(pe,{component:"div",className:"page-header",children:[p.jsxs(pe,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[o?p.jsx(fn,{blocklet:o,style:{marginRight:16}}):null,o?p.jsxs(te,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[p.jsx(te,{children:Ae(o)}),(o==null?void 0:o.status)!=="unknown"&&p.jsx(an,{size:"12px",status:o.status,source:o.source,progress:o.progress})]}):`${l("common.blocklet")} ${l("common.detail")}`]}),p.jsx(on,{permission:"mutate_blocklets",children:!!o&&!Fe(o)&&p.jsx(un,{className:"page-actions",blocklet:o,onStart:w,onComplete:k,variant:"group"})})]}),p.jsx(Lt,{}),C]})})}function fs(){const{did:e}=et();return e?p.jsx(dn,{did:e,children:p.jsx(Ne,{children:p.jsx(us,{})})}):null}const ds=sn.main`
|
|
13
|
-
.page-header {
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
align-items: center;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
gap: 16px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.page-title {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
|
|
25
|
-
.page-link {
|
|
26
|
-
font-size: 15px;
|
|
27
|
-
margin-top: 8px;
|
|
28
|
-
margin-left: 8px;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.page-content {
|
|
33
|
-
margin-top: 16px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
37
|
-
.page-header {
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
align-items: flex-start;
|
|
40
|
-
.page-actions,
|
|
41
|
-
.MuiButtonGroup-root {
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
.MuiButtonGroup-root {
|
|
45
|
-
.MuiButtonBase-root {
|
|
46
|
-
flex: 1;
|
|
47
|
-
}
|
|
48
|
-
.blocklet-action-text {
|
|
49
|
-
display: none;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.page-title {
|
|
55
|
-
margin-bottom: 15px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
`,ks=Object.freeze(Object.defineProperty({__proto__:null,default:fs},Symbol.toStringTag,{value:"Module"}));export{ks as d,ws as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r}from"./index-DBlH-4qz.js";function a(t){return r.Children.toArray(t).filter(e=>r.isValidElement(e))}export{a as g};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{u as C,j as o,C as P,ax as F,cK as U,z as b,q as W,cD as D,r,aT as _,k as d,a2 as x,al as k,af as E,x as K,aw as O,y as $,bl as q,n as z}from"./index-DBlH-4qz.js";import{I as M}from"./invitation-BpNMGSxV.js";import"./index-Mdw0srMB.js";import"./index-BrX8n3kg.js";import"./CheckCircle-CSPlY_20.js";import"./wrap-locale-BSXKmMbJ.js";function A(v){const{api:i,session:f}=F(),{info:s}=C(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:R,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",R),u.searchParams.set("inviteId",h);const{data:j}=await i.get(u.href);e=j}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),y=r.useCallback(()=>{w(!0)},[]),I=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(P,{});const L=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},T=()=>{w(!1)};return o.jsxs(B,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(K,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:O.create({baseURL:s.launcher.url}).get,onSuccess:L,onClose:T,checkTimeout:5*60*1e3,webWalletUrl:$(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(M,{...v,getDataFn:I,createPassportSvg:e=>q(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?y:null})]})}const B=z.div`
|
|
2
|
-
width: 100vw;
|
|
3
|
-
height: 100%;
|
|
4
|
-
min-height: 100vh;
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
align-items: center;
|
|
8
|
-
background-color: #f6f8fa;
|
|
9
|
-
overflow: auto;
|
|
10
|
-
padding: 20px;
|
|
11
|
-
`;function Y(){return C().loading?o.jsx(P,{}):o.jsx(A,{})}export{Y as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r,U as u,j as e,dV as p,b5 as M,dW as b,dX as z,dY as E,P as o,dE as O,s as m,dZ as S}from"./index-DBlH-4qz.js";import{B as v}from"./ButtonGroup-CqHbqvIj.js";function d(s){const{size:f,color:a,menu:i,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),k=Array.isArray(i)?i.map((n,I)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:I})):i,B=()=>{c(n=>!n)},C=n=>{t.current&&t.current.contains(n.target)||c(!1)},P=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:a,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:a,children:l}),e.jsx(p,{onClick:B,color:a,...y,"aria-label":"more functions",children:e.jsx(M,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(b,{children:e.jsx(z,{onClickAway:C,children:e.jsx(E,{onClick:P,children:k})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:O,menuButtonProps:{}};d.Item=u;const A=m(v)`
|
|
2
|
-
> .MuiButtonBase-root:last-of-type {
|
|
3
|
-
min-width: 2em;
|
|
4
|
-
padding-left: 0;
|
|
5
|
-
padding-right: 0;
|
|
6
|
-
}
|
|
7
|
-
`,L=m(S)`
|
|
8
|
-
z-index: ${s=>s.theme.zIndex.tooltip};
|
|
9
|
-
.MuiList-root {
|
|
10
|
-
padding: 4px 0;
|
|
11
|
-
}
|
|
12
|
-
.MuiListItem-root {
|
|
13
|
-
padding-top: 4px;
|
|
14
|
-
padding-bottom: 4px;
|
|
15
|
-
}
|
|
16
|
-
`;export{d as S};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import{n as N,P as L,r as w,f as ke,j as e,C as V,i as je,u as de,q,t as ye,v as Ce,D as ve,B as W,w as Se,m as I,x as Be,y as we,z as pe,A as z,E as Ae,d as Te,F as De,H as Ee,J as ee,K as Ie,M as O,N as te,O as oe,Q as y,R as Le,S as _,U as Pe,V as Re,X as _e}from"./index-DBlH-4qz.js";import{_ as se}from"./useLocalStorage-Den65TTd.js";import{g as Fe,D as Ne}from"./index-BNasUWiN.js";import{E as $e}from"./index-f3gCWa9h.js";import{u as Ue,B as ne}from"./url-evaluation-OWrig3n8.js";import{D as Me,u as Oe,B as le}from"./actions-jzQJLd83.js";import{l as ae}from"./index-8fCm2Jic.js";import{W as We}from"./tag-tXL4aJpc.js";import{I as ze,B as Ve}from"./install-from-url-BQJWpTKl.js";import{B as re}from"./app-avatar-DH3uT_Nr.js";import{d as qe}from"./Add-BlWdL5hq.js";import{S as D}from"./index-Bh-DJU8Z.js";import{T as ie}from"./TextField-DRrSIaR4.js";import{F as Ke,S as Qe}from"./Select-D6ACs1xY.js";import"./FilterList-CFsrQPpD.js";import"./Delete-HYXbanP_.js";import"./InputLabel-BXQy_ZSg.js";import"./LastPage-C7awZPyV.js";import"./index-BsU6rGWy.js";import"./redux-Bu4pculE.js";import"./Search-Cz2kpFbT.js";import"./MoreVert-gaCnI5Xf.js";import"./ButtonGroup-CqHbqvIj.js";import"./getValidReactChildren-BXQ8AiZt.js";import"./isEqual-C9LQO0Wo.js";import"./index-GQiNlTaJ.js";import"./Stepper-CZFVEfLi.js";function F({blocklet:g,skipAccessibilityCheck:c=!1,...p}){const{t:a}=w.useContext(ke),{urls:C,loading:s,recommendedUrl:m}=Ue(g);if(s&&!c)return e.jsx(V,{size:12,...p});const x=c?C[0]:m;return x?e.jsx(He,{...p,children:e.jsx(Xe,{children:e.jsx(je,{href:x,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})}):a("blocklet.router.noAccessibleUrl")}const Xe=N.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
margin: 4px 0;
|
|
4
|
-
`,He=N.div`
|
|
5
|
-
.blocklet-interface {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: flex-start;
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
|
|
11
|
-
img {
|
|
12
|
-
margin-right: 4px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`;F.propTypes={blocklet:L.object.isRequired,skipAccessibilityCheck:L.bool};F.defaultProps={skipAccessibilityCheck:!1};const ce={title:/^.{3,40}$/,description:/^.{3,160}$/};function K({onCancel:g,onSuccess:c}){const{info:p}=de(),{t:a}=q(),{api:C}=ye(),[s,m]=Ce({loading:!1,title:"",titleError:"",description:"",descriptionError:"",isConnectOpen:!1}),x=()=>{m({loading:!0,isConnectOpen:!0})},b=d=>{m({loading:!1,isConnectOpen:!1}),c(d)},v=()=>{m({loading:!1,isConnectOpen:!1})},k=d=>{const{value:n,name:r}=d.target;m({[`${r}Error`]:n&&!ce[r].test(n)?a(`blocklet.${r}ValidationError`):""})},S=d=>{const{value:n,name:r}=d.target,u=`${r}Error`;s[u]?m({[r]:n,[u]:n&&!ce[r].test(n)?a(`blocklet.${r}ValidationError`):""}):m({[r]:n})};return e.jsxs(e.Fragment,{children:[e.jsx(ve,{title:a("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:()=>g(),showCloseButton:!0,open:!0,actions:e.jsxs(e.Fragment,{children:[e.jsx(W,{onClick:d=>{d.stopPropagation(),g()},color:"inherit",children:a("common.cancel")}),e.jsxs(W,{onClick:d=>{d.stopPropagation(),x()},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:s.loading||s.titleError||s.descriptionError||!s.title||!s.description,style:{marginLeft:8},children:[s.loading&&e.jsx(V,{size:16}),a("common.create")]})]}),children:e.jsx(Se,{component:"div",children:e.jsxs(I,{component:"div",children:[e.jsx(ie,{style:{marginBottom:24},label:`Blocklet ${a("common.title")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,name:"title",value:s.title,onBlur:k,onChange:S,error:!!s.titleError,helperText:s.titleError,disabled:s.loading}),e.jsx(ie,{label:`Blocklet ${a("common.description")}`,autoComplete:"off",variant:"outlined",fullWidth:!0,name:"description",value:s.description,onBlur:k,onChange:S,error:!!s.descriptionError,helperText:s.descriptionError,disabled:s.loading})]})})}),e.jsx(Be,{popup:!0,open:s.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:C.get,checkTimeout:5*60*1e3,webWalletUrl:we(p),onSuccess:b,extraParams:{title:s.title,description:s.description},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:v})]})}K.propTypes={onCancel:L.func.isRequired,onSuccess:L.func.isRequired};K.defaultProps={};function Q({onCreate:g}){const c=pe(),{t:p}=q(),[a,C]=w.useState(""),[s,m]=w.useState(""),[x,b]=w.useState(null),[v,k]=w.useState(null),S=()=>{b(null)},d=()=>{b({onCancel:()=>{S(),b(null)},onSuccess:()=>{S()}})},n=()=>{k({onCancel:()=>{k(null)},onSuccess:(...j)=>{k(null),g(...j)}})},r=()=>{const j=new URL("http://localhost");j.searchParams.set("restoreFrom","server"),j.searchParams.set("serverUrl",window.location.href),c(`/blocklets/restore${j.search}`)},u=()=>{c("/blocklets/restore")};return e.jsxs(e.Fragment,{children:[e.jsxs(D,{onClick:()=>c("/store"),menuButtonProps:{"data-cy":"open-install-menu"},menu:[e.jsx(D.Item,{"data-cy":"open-install-form",onClick:()=>d(),children:p("blocklet.installFromUrl")},"1"),e.jsx(D.Item,{"data-cy":"open-create-form",onClick:()=>n(),children:p("blocklet.installFromCreate")},"2"),e.jsx(D.Item,{"data-cy":"open-install-from-spaces",onClick:()=>u(),children:p("blocklet.restoreFromSpaces.title")},"3"),e.jsx(D.Item,{"data-cy":"open-install-from-spaces",onClick:()=>r(),children:p("blocklet.installFromDiskBackup")},"3")].filter(Boolean),children:[e.jsx(qe,{}),p("blocklet.installFromMarket")]}),!!a&&e.jsx(z,{variant:"error",message:a,onClose:()=>C("")}),!!s&&e.jsx(z,{variant:"success",duration:3e3,message:s,onClose:()=>m("")}),x&&e.jsx(ze,{onCancel:x.onCancel,onSuccess:x.onSuccess}),v&&e.jsx(K,{onCancel:v.onCancel,onSuccess:v.onSuccess})]})}Q.propTypes={onCreate:L.func};Q.defaultProps={onCreate:()=>{}};const E="internal",me="external";function wt(){return e.jsx(Me,{children:e.jsx(Je,{})})}function Je(){const g=pe(),c=de(),[p,a]=Ae(),{data:C,externalData:s,error:m,refresh:x,loading:b}=Te(),{deletingBlocklets:v,addDeletingDid:k,removeDeletingDid:S,matchDeletingDid:d}=Oe(),{t:n,locale:r}=q(),[u,j]=w.useState(p.get("searchText")),[ue]=se("show-external-blocklet-actions",!1),fe=[{id:E,name:n("blocklet.internal")},{id:me,name:n("blocklet.external")}],[A,xe]=se("blocklet-type-filter",E),X=A===E?C:s,he=(c==null?void 0:c.info.mode)!==De.NODE_MODES.SERVERLESS;d(X.map(l=>l.meta.did));const H=({action:l,blocklet:R})=>{l==="remove"&&k(R.meta.did)},J=l=>{if(l.error){z.error(l.error.message),l.action==="remove"&&S(l.blocklet.meta.did);return}l.action==="remove"&&c.refresh({silent:!0})},G=Ee(l=>l.breakpoints.up("md"));let P=null;const $=X||[];if(m)P=e.jsx(ee,{type:"error",variant:"icon",children:e.jsxs("div",{children:[Ie(m),e.jsx(W,{onClick:()=>x({silent:!1}),children:e.jsx("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:n("common.retry")})})]})});else if($.length>0||b){const l=["installedAt","startedAt","stoppedAt","createdAt"],R=o=>{if(o.status==="starting")return new Date("2199").getTime();if(o.status==="running"){if(o.appRuntimeInfo)return o.appRuntimeInfo.startAt;if(o.startedAt)return o.startedAt.getTime()}return 0};let f=$.map(o=>(l.forEach(t=>{if(o[t]){const h=new Date(o[t]);o[t]=h}}),o)).sort((o,t)=>{const h=R(o);return R(t)-h});u&&(f=f.filter(o=>{var i;const t=O(o)||"",h=((i=o.site)==null?void 0:i.domainAliases)||[],B=ae.isValid(u)?ae.toAddress(u):u,T=u.trim().toLocaleLowerCase();return o.appDid===B||o.appPid===B||t.toLocaleLowerCase().includes(T)||h.some(M=>{var Z;return(Z=M.value)==null?void 0:Z.toLocaleLowerCase().includes(T)})}));const U=Fe("blocklets-list");U.searchText&&!u&&j(U.searchText);const ge=[{label:n("common.name"),name:"meta.title",options:{customBodyRenderLite(o){const t=f[o],h=te(t).length>0?"components":"overview";return e.jsx(oe,{to:`/blocklets/${t.meta.did}/${h}`,className:"blocklet-name-wrapper",children:e.jsxs(I,{component:"strong",variant:"body1",className:"blocklet-name",children:[e.jsx(re,{blocklet:t,style:{marginRight:8}}),e.jsxs(y,{children:[e.jsx(y,{children:O(t)}),e.jsxs(y,{children:[e.jsx(Ve,{mode:t.mode||""}),!Le(t.controller)&&e.jsx(We,{type:"primary",children:n("blocklet.external")})]})]})]})},t.meta.did)}}},A===E?{label:n("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite(o){const t=f[o];return e.jsx(F,{blocklet:t},t.meta.did)}}}:null,{label:n("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(o){const t=f[o];return t.status==="running"&&t.appRuntimeInfo?e.jsx(_,{value:t.appRuntimeInfo.startAt,locale:r},t.meta.did):""}}},{label:n("common.installedAt"),name:"installedAt",options:{customBodyRenderLite(o){const t=f[o];return t.installedAt?e.jsx(_,{value:t.installedAt.getTime(),locale:r},t.meta.did):t.createdAt?e.jsx(_,{value:t.createdAt.getTime(),locale:r},t.meta.did):""}}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRenderLite(o){const t=f[o];return e.jsx(_,{value:t.updatedAt,locale:r},t.meta.did)}}},{label:n("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite(o){const t=f[o];return e.jsx(ne,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:v.includes(t.meta.did)?"deleting":t.status,source:t.source,progress:t.progress},t.meta.did)}}},A===E||ue?{label:n("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite(o){const t=f[o];return e.jsx(le,{blocklet:t,variant:"menu",onStart:H,onComplete:J},t.meta.did)}}}:null].filter(Boolean),Y={};G||(Y.TableBody=function(t){if(b)return e.jsx(_e,{relative:"parent",children:e.jsx(V,{})});const{page:h,rowsPerPage:B}=t,T=f.slice(h*B,(h+1)*B);return T.length?e.jsx("div",{children:T.map(i=>{const M=te(i).length>0?"components":"overview";return e.jsxs(y,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(re,{className:"blocklet__avatar",blocklet:i,size:G?40:60}),e.jsxs(oe,{className:"blocklet__content",to:`/blocklets/${i.meta.did}/${M}`,children:[e.jsxs(y,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e.jsx(I,{component:"strong",variant:"body1",className:"blocklet__name",children:O(i,!0)}),e.jsx(le,{blocklet:i,variant:"menu",onStart:H,onComplete:J},i.meta.did)]}),e.jsxs(I,{component:"small",className:"blocklet__addons",children:[e.jsx(y,{display:"flex",alignItems:"center",children:e.jsx(F,{blocklet:i,style:{marginLeft:16,fontSize:14}})}),e.jsx(ne,{"status-blocklet-did":i.meta.did,status:i.status,source:i.source,progress:i.progress},i.meta.did)]})]})]})})}):e.jsx($e,{children:n("common.empty")})}),P=e.jsx(Ge,{children:e.jsx(Ne,{loading:b,className:"blocklet-list",title:e.jsx(y,{display:"flex",alignItems:"center",children:n("blocklet.index.tableTitle")}),locale:r,data:f,columns:ge,durable:"blocklets-list",options:{download:!1,filter:!1,print:!1,searchPlaceholder:n("common.search"),searchAlwaysOpen:!1,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:o=>{j(o),a({searchText:o??""})},customSearch:()=>!0,...U,searchText:u},components:Y})})}else $.length===0&&(P=e.jsx(ee,{type:"warning",variant:"icon",children:n("blocklet.index.noBlocklet")}));const be=s&&s.length>0;return e.jsxs(Ye,{children:[e.jsxs(I,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[e.jsxs(y,{display:"flex",alignItems:"center",children:[n("common.blocklets"),(be||A===me)&&e.jsx(Ke,{sx:{ml:1},children:e.jsx(Qe,{value:A,onChange:l=>xe(l.target.value),size:"small",children:fe.map(l=>e.jsx(Pe,{value:l.id,children:n(l.name)},l.id))})})]}),e.jsx(Re,{permission:"mutate_blocklets",children:he&&e.jsx(Q,{onCreate:l=>{g(`/blocklets/${l.appDid}/components`)}})})]}),P]})}const Ge=N.div`
|
|
16
|
-
.blocklet-item--mobile {
|
|
17
|
-
padding: 16px 0;
|
|
18
|
-
}
|
|
19
|
-
`,Ye=N.main`
|
|
20
|
-
.page-header {
|
|
21
|
-
display: flex;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.blocklet-list {
|
|
27
|
-
.blocklet-item--mobile {
|
|
28
|
-
.blocklet__avatar {
|
|
29
|
-
margin-right: -60px;
|
|
30
|
-
}
|
|
31
|
-
.blocklet__content {
|
|
32
|
-
padding-left: 68px;
|
|
33
|
-
flex: 1;
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
z-index: 1;
|
|
37
|
-
}
|
|
38
|
-
.blocklet__name {
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
text-decoration: none;
|
|
41
|
-
white-space: normal;
|
|
42
|
-
word-break: break-all;
|
|
43
|
-
}
|
|
44
|
-
.blocklet__addons {
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
margin-top: 5px;
|
|
48
|
-
margin-bottom: -10px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.blocklet-name-wrapper {
|
|
52
|
-
display: flex;
|
|
53
|
-
flex-direction: row;
|
|
54
|
-
align-items: center;
|
|
55
|
-
justify-content: flex-start;
|
|
56
|
-
}
|
|
57
|
-
.blocklet-name {
|
|
58
|
-
font-weight: bold;
|
|
59
|
-
text-decoration: underline;
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
white-space: normal;
|
|
63
|
-
word-break: break-all;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.blocklet-interface {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
justify-content: flex-start;
|
|
70
|
-
|
|
71
|
-
img {
|
|
72
|
-
margin-right: 4px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.MuiToolbar-root {
|
|
77
|
-
display: flex;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
`;export{Je as BlockletList,wt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as d,j as o,C as f,z as h,ax as v,cq as C,cr as u,Q as j,bl as I,af as P,F as R}from"./index-DBlH-4qz.js";import{I as S}from"./invitation-BpNMGSxV.js";import"./index-Mdw0srMB.js";import"./index-BrX8n3kg.js";import"./CheckCircle-CSPlY_20.js";import"./wrap-locale-BSXKmMbJ.js";function k(n){const{searchParams:i}=new URL(window.location.href),l=h(),{api:a,session:r}=v(),{info:g}=d(),c=i.get("redirect"),p=i.get("id"),s=C(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(s.error)throw s.error;return s==null?void 0:s.data}),x=u(async(e,w=t=>t)=>{e&&(e.sessionToken&&P(w(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const t=decodeURIComponent(c);t.startsWith(R.WELLKNOWN_SERVICE_PATH_PREFIX)?l(t,{replace:!0}):window.location=t}else window.location=window.env.pathPrefix||"/"},50)});return s.loading?o.jsx(f,{}):o.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,g),checkFn:a.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function W(){return d().loading?o.jsx(f,{}):o.jsx(k,{})}export{W as default};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{ak as Y,z as A,r as p,a as J,b as X,P as x,q as j,u as P,y as Z,av as _,M as ee,j as t,x as $,aw as te,a2 as S,m as R,D as N,ax as se,ay as oe,V as q,az as re,B as M,C as O,aA as ne,A as W,K as z,aB as ae,aC as le,aD as ie,F as ce,i as ue,n as K,ab as de,a5 as pe,a8 as he,a9 as fe,aE as me,aa as ge,Q as xe}from"./index-DBlH-4qz.js";import{_ as D}from"./useLocalStorage-Den65TTd.js";import{c as be,C as ye,A as ke,D as Se,B as je,S as V,a as Pe,b as we}from"./item-CE4vGuWF.js";import{d as ve}from"./ArrowDropDown-BRSuKRSZ.js";import{B as Re}from"./Breadcrumbs-BQD6r-rf.js";import"./index-2dK67bGl.js";import"./index-f3gCWa9h.js";import"./Search-Cz2kpFbT.js";import"./index-DEBI0lGj.js";import"./Select-D6ACs1xY.js";import"./InputAdornment-Dy1fA12v.js";import"./preact.module-B1z5cdvs.js";import"./Add-BlWdL5hq.js";import"./TextField-DRrSIaR4.js";import"./InputLabel-BXQy_ZSg.js";import"./Launch-Eb8N22dN.js";import"./Done-1q2rveFh.js";import"./DeleteOutline-mQ8p8X2l.js";import"./delete-confirm-CNU7dJ17.js";import"./click-to-copy-BJBKnF7C.js";import"./MoreVert-gaCnI5Xf.js";import"./ButtonGroup-CqHbqvIj.js";import"./getValidReactChildren-BXQ8AiZt.js";function Ce(e){const n=Y(),c=A(),[s,o]=D(`sid:blocklet:purchase:${e}`),[i,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},l=!!(n.get("assetDid")&&s&&n.get("sid")===s);return J(X.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:i,hasPurchased:l,session:h,setSession:a,doRedirect:d}}function B({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:i}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),l=Z(i),r=_(e,i,s),m=v=>{v!==u&&h(v)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},y=(v,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=ee({meta:e});if(u==="purchase"&&a===2)return t.jsx($,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:te.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:l,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(R,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(R,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=N;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:y,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(ye,{action:u,onNext:b,onSelect:m})})})}B.propTypes={...be,storeUrl:x.string.isRequired,handlePaySuccess:x.func};B.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function E({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),i=A(),{info:u}=P(),{api:h}=se(),a=oe(e)===!1,[d,l]=p.useState(!1),{hasPurchased:r}=Ce(e.did),[m,b]=p.useState(!1),[y]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),v=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=k=>{k.preventDefault(),k.stopPropagation();try{if(l(!0),a){b(!0);return}if(y){f(!0);return}if(!a){const C=_(e,u,c);window.location.href=C;return}}catch(C){W.error(z(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{l(!1)}},H=()=>{l(!1),b(!1)},Q=k=>{l(!1),f(!1),i(`/blocklets/${k.appDid}/components`)},G=()=>{l(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ke,{children:t.jsx(q,{permission:"mutate_blocklets",children:k=>t.jsx(re,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(M,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!k),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(O,{size:16,style:{marginRight:3}}),g]}):v},e.did)})})}),(r||m)&&t.jsx(B,{method:"launch",meta:e,mode:"both",onCancel:H,storeUrl:c}),w&&t.jsx($,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Q,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ne(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:G})]})}E.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};E.defaultProps={isResource:!1};const De=(e,n,c)=>{const s=de(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},F=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function U({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const i=n;if(i.startsWith("http")&&e.logo)o=S(i,ie(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const l=new URL(o);l.searchParams.set("v",e.version||+new Date),o=l.href}catch{}const u=(s==null?void 0:s.info.mode)!==ce.NODE_MODES.SERVERLESS,h=l=>l.currentTarget.contains(l.target)?!0:(l.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:i};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(E,{isResource:!e.group,...a})})),t.jsx(ue,{href:De(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(Le,{title:F({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:F({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}U.propTypes={blocklet:x.object.isRequired,endpoint:x.string};U.defaultProps={endpoint:""};function T({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),i=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,l=(r=i==null?void 0:i.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ae,{FallbackComponent:le,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(Se,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(U,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:l})})})}T.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};T.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Le=K(je)`
|
|
2
|
-
.ms-highlight {
|
|
3
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
-
}
|
|
5
|
-
`,Be=pe(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),I=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[i,u]=p.useState(!1),[h,a]=p.useState(!1),[d,l]=p.useState(-1),r=Be(),[m,b]=D(V),y=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),l(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),W.error(`${o("store.blockletRegistry.changeFailed")} ${z(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(q,{permission:"mutate_node",children:f=>t.jsx(M,{disabled:!f,classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(ve,{}),children:t.jsx(R,{color:"secondary",children:s.blockletRegistryList[y].name})})}),t.jsx(N,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(he,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(fe,{button:!0,disabled:i,selected:y===g,"data-cy":"store-switch",onClick:()=>{if(!i){if(g===y){a(!1);return}w(g)}},children:[d===g&&i&&t.jsx(me,{className:r.iconRoot,children:t.jsx(O,{size:16})}),t.jsx(ge,{children:t.jsx(Pe,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(we,{disabled:i,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});I.propTypes={onChange:x.func,onDelete:x.func};I.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=I;function st(){const{t:e}=j(),{info:n}=P(),[c]=D(V),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[i,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},l=p.useRef(null);return t.jsxs(Ue,{children:[t.jsxs(Re,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(R,{color:"textPrimary",children:e("common.store")}),t.jsx(Ee,{ref:l,onChange:r=>u(r),onDelete:r=>{var m;i===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(xe,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(R,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(T,{className:"blocklet-list",handleSearchSelect:d,storeUrl:i})]})}const Ue=K.main`
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.store-header {
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
margin-bottom: 32px !important;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.page-header {
|
|
13
|
-
margin-bottom: 16px !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
.blocklet-list {
|
|
17
|
-
aside:hover {
|
|
18
|
-
height: calc(100vh - 235px);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;export{st as default};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import{r as u,bi as _,bj as B,aL as Z,aM as J,j as e,q as A,c as N,F as b,m as L,U,Q as k,B as K,C as w,ae as E,P as j,f as O,D as X,aY as ee,aZ as te,n as S,au as I,o as se,u as G,aP as ae,K as ne,V as oe,bk as re,z as ce,bh as ie,d as le,bl as me}from"./index-DBlH-4qz.js";import{T as de}from"./index-C01qpSwK.js";import pe from"./audit-logs-DwuYsIhc.js";import{P as ue,M as fe}from"./index-uyaXmUh9.js";import ye from"./index-CTyxnc1Q.js";import{T as ge}from"./team-B2Py-5R-.js";import{E as xe}from"./index-f3gCWa9h.js";import{d as he}from"./Add-BlWdL5hq.js";import{T as P}from"./TextField-DRrSIaR4.js";import{F as V,S as H}from"./Select-D6ACs1xY.js";import{I as Q}from"./InputLabel-BXQy_ZSg.js";import{C as W}from"./click-to-copy-BJBKnF7C.js";import{f as ve}from"./index-D9k2I5J1.js";import{d as je}from"./Delete-HYXbanP_.js";import{C as Ce}from"./delete-confirm-CNU7dJ17.js";import{d as ke}from"./Edit-BowBuCq8.js";import"./index-BFmN77vD.js";import"./useLocalStorage-Den65TTd.js";import"./Pagination-DfzcotPN.js";import"./LastPage-C7awZPyV.js";import"./index-rJLRm37D.js";import"./Loop-vUb_fmsc.js";import"./ViewList-CxKdhgAh.js";import"./list-header-DF2AUmaz.js";import"./Search-Cz2kpFbT.js";import"./index-BNasUWiN.js";import"./FilterList-CFsrQPpD.js";import"./index-BsU6rGWy.js";import"./redux-Bu4pculE.js";import"./MoreVert-gaCnI5Xf.js";import"./index-B6H1TQgD.js";import"./resource-dialog-BL8JdZuL.js";import"./index-D1-aBvtW.js";import"./index-DEBI0lGj.js";import"./tag-tXL4aJpc.js";import"./index-GQiNlTaJ.js";import"./actions-QLA3pt8S.js";import"./index-Bh-DJU8Z.js";import"./ButtonGroup-CqHbqvIj.js";import"./getValidReactChildren-BXQ8AiZt.js";import"./EditIcon-nFgXy_Ap.js";import"./LockIcon-Ca85OyYH.js";import"./Google-Dm0Bt78U.js";import"./index-8fCm2Jic.js";import"./isEqual-C9LQO0Wo.js";import"./index-2dK67bGl.js";import"./InputAdornment-Dy1fA12v.js";import"./ToggleButtonGroup-CBvNwQed.js";function be(){var o=u.useRef(!1),s=u.useCallback(function(){return o.current},[]);return u.useEffect(function(){return o.current=!0,function(){o.current=!1}},[]),s}function Ke(o,s,p){s===void 0&&(s=[]),p===void 0&&(p={loading:!1});var r=u.useRef(0),c=be(),t=u.useState(p),n=t[0],l=t[1],m=u.useCallback(function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var y=++r.current;return n.loading||l(function(g){return _(_({},g),{loading:!0})}),o.apply(void 0,a).then(function(g){return c()&&y===r.current&&l({value:g,loading:!1}),g},function(g){return c()&&y===r.current&&l({error:g,loading:!1}),g})},s);return[n,m]}function Se(o,s){s===void 0&&(s=[]);var p=Ke(o,s,{loading:!0}),r=p[0],c=p[1];return u.useEffect(function(){c()},[c]),r}var _e=function(o,s){s===void 0&&(s=[]);var p=u.useState(0),r=p[0],c=p[1],t=Se(o,B(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},B(s,[n]));return _(_({},t),{retry:l})},R={},Ae=J;Object.defineProperty(R,"__esModule",{value:!0});var Y=R.default=void 0,we=Ae(Z()),Ie=e;Y=R.default=(0,we.default)((0,Ie.jsx)("path",{d:"M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"}),"VpnKey");function T(o){const{remark:s,onCreate:p}=o,{t:r}=A(),[c,t]=u.useState(!1),[n,l]=u.useState(null),m=N(),a=b.RBAC_CONFIG.roles.filter(x=>x.passport&&x.name!==b.ROLES.OWNER),f=()=>{t(!1),l(null)},y=async x=>{const{remark:h,passport:d}=x;t(!0);const i=await m.createAccessKey({input:{remark:h.trim(),passport:d}}),{data:C}=i;p(C),l(null),t(!1)},g={title:`${r("common.create")} ${r("common.accessKey")}`,description:(x,h,d)=>e.jsxs(L,{component:"div",children:[e.jsx(P,{label:r("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",inputProps:{"data-cy":"remark-input"},fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:x.remark,onChange:i=>{h({...x,remark:i.target.value,__disableConfirm:!x.passport||!i.target.value.trim()}),i.target.value.trim()?d(""):d(r("setting.accessKey.remarkInvalid"))}}),e.jsxs(V,{style:{width:"100%"},variant:"outlined",children:[e.jsx(Q,{children:r("common.passport")}),e.jsx(H,{"data-cy":"create-access-key-select-passport",value:x.passport,onChange:i=>{const C=i.target.value;d(null),h({...x,passport:C,__disableConfirm:!x.remark||!C})},fullWidth:!0,label:r("common.passport"),disabled:c,children:a.map(i=>e.jsx(U,{value:i.name,"data-cy":`create-access-key-passport-option-${i.name}`,children:e.jsxs(k,{children:[e.jsx("span",{children:i.title||i.name}),e.jsx(k,{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify",children:i.description})]})},i.name))})]})]}),confirm:r("common.confirm"),cancel:r("common.cancel"),color:"primary",params:{remark:s,__disableConfirm:!s.trim()},onConfirm:y,onCancel:f};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:()=>l(g),className:"rule-action",children:[c?e.jsx(w,{size:16}):e.jsx(he,{style:{fontSize:16}}),r("common.create")]}),n&&e.jsx(E,{title:n.title,description:n.description,confirm:n.confirm,color:n.color,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})]})}T.propTypes={remark:j.string,onCreate:j.func};T.defaultProps={onCreate:()=>{},remark:""};function $(o){const{onConfirm:s,accessKeyId:p,accessKeySecret:r}=o,{t:c}=u.useContext(O),[t,n]=u.useState(!1),[l,m]=u.useState(!0),a=()=>{m(!l)},f=y=>{n(y.target.checked)};return e.jsxs(X,{title:c("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:s,showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(K,{disabled:!t,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:c("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Pe,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(q,{children:[e.jsx(M,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(q,{children:[e.jsx(M,{children:"Access Secret"}),l?e.jsx(K,{"data-cy":"show-secret-btn",color:"primary",onClick:a,children:c("setting.accessKey.showSecret")}):e.jsx(W,{children:r})]}),e.jsx("div",{children:e.jsx(ee,{value:"end",disabled:l,control:e.jsx(te,{checked:t,onChange:f}),label:c("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}$.propTypes={accessKeyId:j.string.isRequired,accessKeySecret:j.string.isRequired,onConfirm:j.func};$.defaultProps={onConfirm:()=>{}};const M=S.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: space-between;
|
|
4
|
-
align-items: center;
|
|
5
|
-
font-size: 16px;
|
|
6
|
-
margin-bottom: 8px;
|
|
7
|
-
`,q=S.div`
|
|
8
|
-
margin-bottom: 24px;
|
|
9
|
-
`,Pe=S.div`
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
`;function D(o){const{t:s,locale:p}=A(),[r,c]=u.useState(!1),[t,n]=u.useState(null),{accessKeyId:l,time:m,remark:a,onDelete:f=()=>{}}=o,y=N(),g=()=>{c(!1),n(null)},x=async()=>{c(!0);try{await y.deleteAccessKey({input:{accessKeyId:l}}),f()}catch(i){console.error(i)}finally{c(!1),n(null)}},h=i=>({key:`<b>${l}</b>`,name:`<b>${a}</b>`,time:I(i,p),timeAge:ve(new Date(i),se(p))}),d={keyName:a,title:s("setting.accessKey.title"),description:m?`${s("setting.accessKey.description",h(m))}`:`${s("setting.accessKey.descriptionNoTime",{key:`<b>${l}</b>`,name:`<b>${a}</b>`})}`,confirmPlaceholder:s("setting.accessKey.confirm_desc",{name:a}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:x,onCancel:g};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",onClick:()=>n(d),size:"small",className:"rule-action",color:"error",children:[r?e.jsx(w,{size:16}):e.jsx(je,{style:{fontSize:16}}),s("common.delete")]}),t&&e.jsx(Ce,{keyName:t.keyName,title:t.title,description:t.description,confirmPlaceholder:t.confirmPlaceholder,confirm:t.confirm,cancel:t.cancel,params:t.params,onConfirm:t.onConfirm,onCancel:t.onCancel})]})}D.propTypes={accessKeyId:j.string.isRequired,time:j.string.isRequired,remark:j.string.isRequired,onDelete:j.func};D.defaultProps={onDelete:()=>{}};function F(o){const{accessKeyId:s,remark:p,onUpdate:r,passport:c}=o,{t}=A(),[n,l]=u.useState(!1),[m,a]=u.useState(null),f=N(),y=b.RBAC_CONFIG.roles.filter(d=>d.passport&&d.name!==b.ROLES.OWNER),g=()=>{l(!1),a(null)},x=async d=>{const{accessKeyId:i,remark:C,passport:v}=d;l(!0),await f.updateAccessKey({input:{accessKeyId:i,remark:C.trim(),passport:v}}),r(),a(null),l(!1)},h={title:`${t("common.update")} ${t("common.accessKey")}`,description:(d,i,C)=>e.jsxs(L,{component:"div",children:[e.jsx(P,{label:t("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",value:d.accessKeyId,disabled:!0}),e.jsx(P,{label:t("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},value:d.remark,onChange:v=>{i({...d,remark:v.target.value,__disableConfirm:!v.target.value.trim()}),v.target.value.trim()?C(""):C(t("setting.accessKey.remarkInvalid"))}}),e.jsxs(V,{style:{width:"100%"},variant:"outlined",children:[e.jsx(Q,{children:t("common.passport")}),e.jsx(H,{"data-cy":"update-access-key-select-passport",value:d.passport,onChange:v=>{const z=v.target.value;C(null),i({...d,passport:z,__disableConfirm:!d.remark||!z})},fullWidth:!0,label:t("common.passport"),disabled:n,children:y.map(v=>e.jsx(U,{value:v.name,"data-cy":`update-access-key-passport-option-${v.name}`,children:e.jsx("span",{children:v.title||v.name})},v.name))})]})]}),confirm:t("common.confirm"),cancel:t("common.cancel"),color:"primary",params:{accessKeyId:s,remark:p,passport:c},onConfirm:x,onCancel:g};return e.jsxs(e.Fragment,{children:[e.jsxs(K,{edge:"end",onClick:()=>a(h),size:"small",className:"rule-action",color:"primary",children:[n?e.jsx(w,{size:16}):e.jsx(ke,{style:{fontSize:16}}),t("common.update")]}),m&&e.jsx(E,{title:m.title,description:m.description,confirm:m.confirm,color:m.color,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}F.propTypes={accessKeyId:j.string.isRequired,remark:j.string,passport:j.string,onUpdate:j.func};F.defaultProps={onUpdate:()=>{},remark:"",passport:""};function Ne(){const{t:o,locale:s}=u.useContext(O),{api:p}=G(),[r,c]=u.useState({}),t=_e(async()=>{const a=await p.getAccessKeys(),{list:f}=a;return f}),n=t.value||[],{loading:l,error:m}=t;return!n.length&&l?e.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:e.jsx(w,{})}):!n.length&&m?e.jsx(ae,{severity:"error",children:ne(m)}):e.jsxs("div",{children:[e.jsxs(k,{mb:1,textAlign:"right",children:[e.jsx(oe,{permission:"mutate_node",children:e.jsx(T,{onCreate:a=>{const{accessKeyId:f,accessKeySecret:y}=a;c({show:!0,accessKeyId:f,accessKeySecret:y})}})}),r.show&&e.jsx($,{onConfirm:()=>{t.retry(),c({show:!1})},...r})]}),!n.length&&e.jsx(k,{mt:8,children:e.jsx(xe,{children:o("common.noData")})}),!!n.length&&e.jsx(Le,{children:n.map(a=>{const f=a.remark||"N/A",y=b.RBAC_CONFIG.roles.find(g=>g.name===a.passport);return e.jsxs("div",{className:"access-key-item",children:[e.jsxs("div",{className:"access-key-item_info-warpper",children:[e.jsx("div",{className:"access-key-item_icon",children:e.jsx(Y,{})}),e.jsxs("div",{className:"access-key-item_info",children:[e.jsx(k,{fontWeight:700,children:f}),e.jsx(k,{minWidth:0,children:e.jsx(re,{showDidLogo:!1,children:a.accessKeyId})}),e.jsxs("div",{children:["Created at ",I(a.createdAt,s)]}),e.jsxs("div",{children:["Created by ",a.createdBy]}),a.updatedBy&&e.jsxs("div",{children:["Updated by ",a.updatedBy]}),a.lastUsedAt&&e.jsxs("div",{children:["Last used at ",I(a.lastUsedAt,s)]}),e.jsx("div",{className:"access-key-item_passport",children:e.jsx(ue,{passport:{title:y?y.title:a.passport}})})]})]}),e.jsxs("div",{className:"access-key-item_actions",children:[e.jsx(F,{...a,onUpdate:t.retry}),e.jsx(D,{accessKeyId:a.accessKeyId,time:a.lastUsedAt,remark:a.remark||"N/A",onDelete:t.retry})]})]})})})]})}const Le=S.div`
|
|
13
|
-
border: 1px solid
|
|
14
|
-
${({theme:o})=>o.palette.grey[300]};
|
|
15
|
-
border-radius: 8px;
|
|
16
|
-
|
|
17
|
-
.access-key-item {
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
padding: 16px 32px;
|
|
21
|
-
.access-key-item_info-warpper {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-grow: 1;
|
|
24
|
-
.access-key-item_icon {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
color: ${({theme:o})=>o.palette.grey[400]};
|
|
28
|
-
svg {
|
|
29
|
-
font-size: 44px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.access-key-item_info {
|
|
33
|
-
flex: 1;
|
|
34
|
-
max-width: 400px;
|
|
35
|
-
padding-left: 44px;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.access-key-item_actions {
|
|
39
|
-
display: flex;
|
|
40
|
-
justify-content: flex-end;
|
|
41
|
-
align-items: center;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.access-key-item_passport span {
|
|
45
|
-
margin-top: 4px;
|
|
46
|
-
padding: 2px 12px;
|
|
47
|
-
font-size: 12px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
.access-key-item + .access-key-item {
|
|
51
|
-
border-top: 1px solid
|
|
52
|
-
${({theme:o})=>o.palette.grey[300]}};
|
|
53
|
-
}
|
|
54
|
-
${({theme:o})=>o.breakpoints.down("md")} {
|
|
55
|
-
.access-key-item {
|
|
56
|
-
padding: 16px;
|
|
57
|
-
.access-key-item_info-warpper {
|
|
58
|
-
min-width: 0;
|
|
59
|
-
.access-key-item_icon {
|
|
60
|
-
svg {
|
|
61
|
-
font-size: 24px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.access-key-item_info {
|
|
65
|
-
max-width: 100%;
|
|
66
|
-
padding-left: 16px;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
.access-key-item_actions {
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
`;function wt(){const o=ce(),{t:s}=A(),{info:p}=G(),{tab:r="members"}=ie(),c=h=>me(h,p),{data:t}=le(),n=u.useCallback(h=>{const d=t.find(i=>[i.meta.did,i.appDid,i.appPid].includes(h));return d?d.meta.title:"Server"},[t]),l=u.useCallback(()=>e.jsx(pe,{showScope:!0,scopeFormatter:n}),[n]),m=u.useCallback(()=>e.jsx(fe,{type:"server",createPassportSvg:c}),[]),a=p.did,f=h=>{o(`/team/${h}`)},y={members:{label:s("common.members"),value:"members",component:m},passports:{label:s("common.passport"),value:"passports",component:ye},"access-keys":{label:s("common.accessKey"),value:"access-keys",component:Ne},"audit-logs":{label:s("common.auditLogs"),value:"audit-logs",component:l}},g=Object.values(y).map(({label:h,value:d})=>({label:h,value:d})),x=y[r]||y.member;return e.jsx(ge,{teamDid:a,children:e.jsxs(Re,{children:[e.jsx(L,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:s("common.team")}),e.jsx(de,{tabs:g,current:r,onChange:f,scrollButtons:"auto"}),e.jsx("div",{className:"page-content",children:e.jsx(x.component,{createPassportSvg:c})})]})})}const Re=S.main`
|
|
76
|
-
.page-header {
|
|
77
|
-
display: flex;
|
|
78
|
-
justify-content: space-between;
|
|
79
|
-
align-items: center;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.page-content {
|
|
83
|
-
margin-top: 24px;
|
|
84
|
-
}
|
|
85
|
-
`;export{wt as default};
|