@abtnode/webapp 1.16.31-beta-53480e26 → 1.16.31
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-Cgp6UmAg.js → Add-YuGHCX93.js} +1 -1
- package/dist/assets/{ArrowDropDown-BVjtUDnO.js → ArrowDropDown-Dq_r4Xqb.js} +1 -1
- package/dist/assets/{Autocomplete-CX2pOSKy.js → Autocomplete-BVeL1Yo7.js} +1 -1
- package/dist/assets/{Breadcrumbs-CfLdvQuh.js → Breadcrumbs-CMvJXPnU.js} +1 -1
- package/dist/assets/{ButtonGroup-BFB8FBwo.js → ButtonGroup-Dk1mLt3h.js} +1 -1
- package/dist/assets/{CheckCircle-BxN7W-le.js → CheckCircle-Cn-sNTZK.js} +1 -1
- package/dist/assets/{ChevronLeft-Pw3iZqJe.js → ChevronLeft-CGibP5P0.js} +1 -1
- package/dist/assets/{ChevronRight-CmJg2Cw4.js → ChevronRight-DakQosJn.js} +1 -1
- package/dist/assets/{Close-bUHIxhaj.js → Close-DpmK9wKZ.js} +1 -1
- package/dist/assets/{Delete-D_OS9ALf.js → Delete-ukzbwUp3.js} +1 -1
- package/dist/assets/DeleteOutline-DWR_h5F3.js +1 -0
- package/dist/assets/{Done-B3fd1NBv.js → Done-CvSFHISO.js} +1 -1
- package/dist/assets/{Edit-D0kDKp7P.js → Edit-qncNJ4F1.js} +1 -1
- package/dist/assets/{EditIcon-BK0ltKbv.js → EditIcon-BU_hSrvO.js} +1 -1
- package/dist/assets/{ExpandMore-Bf1LLE51.js → ExpandMore-BzXUe6hQ.js} +1 -1
- package/dist/assets/{FilterList-DmnR7V-T.js → FilterList-B3q8z3Ai.js} +1 -1
- package/dist/assets/{Google-DQcXNjwe.js → Google-BFCcXFWg.js} +1 -1
- package/dist/assets/{Https-DOuq786b.js → Https-c9HUx4_F.js} +1 -1
- package/dist/assets/{InputAdornment-B4c5V3Mf.js → InputAdornment-CmItI7-a.js} +1 -1
- package/dist/assets/{InputLabel-BH8ojsN6.js → InputLabel-DiJjRX8c.js} +1 -1
- package/dist/assets/{LastPage-VB_AS_Vh.js → LastPage-BVKCAcZd.js} +1 -1
- package/dist/assets/{Launch-DVaDsXRB.js → Launch-ixFhPrIJ.js} +1 -1
- package/dist/assets/{Link-Cq7wD1in.js → Link-D21zoGLh.js} +1 -1
- package/dist/assets/{LoadingButton-BB0SfI5U.js → LoadingButton-C-VdleqP.js} +1 -1
- package/dist/assets/{LockIcon-ikzn_F6v.js → LockIcon-DWwaclI2.js} +1 -1
- package/dist/assets/{Loop-CoIB6wNF.js → Loop-cNToB-Hw.js} +1 -1
- package/dist/assets/{MoreHoriz-ipAxzckg.js → MoreHoriz-BlJZBfL5.js} +1 -1
- package/dist/assets/{MoreVert-nny3Ft7E.js → MoreVert-72FLA6F7.js} +1 -1
- package/dist/assets/{Pagination-DupWn88M.js → Pagination-BE1Nzv5c.js} +1 -1
- package/dist/assets/{Public-7nhJMjBD.js → Public-DwfXfE3x.js} +1 -1
- package/dist/assets/{SchemaReference.es-BMApSZwQ.js → SchemaReference.es-DSZJxlJs.js} +1 -1
- package/dist/assets/{Search-BUTthfzy.js → Search-DPoHYjEM.js} +1 -1
- package/dist/assets/{Select-BARjOLQh.js → Select-CZslLkS9.js} +1 -1
- package/dist/assets/{Skeleton-TUa0fNMH.js → Skeleton-BRE8g3Nr.js} +1 -1
- package/dist/assets/{Slider-DiT8jKeQ.js → Slider-BXYbXQK6.js} +1 -1
- package/dist/assets/{Stepper-BolhLUn_.js → Stepper-C2cskkxs.js} +1 -1
- package/dist/assets/{TextField-DLzLnEQT.js → TextField-FjVpB8_i.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-cXYZUu5r.js → ToggleButtonGroup-BLKzb8eH.js} +1 -1
- package/dist/assets/{ViewList-DxCKhzhs.js → ViewList-BWR6vvRA.js} +1 -1
- package/dist/assets/{actions-ieXq1D_3.js → actions-DI7j7zyh.js} +1 -1
- package/dist/assets/{actions-DuBtPyY2.js → actions-DMatOIO9.js} +1 -1
- package/dist/assets/{agreement--45MLHN7.js → agreement-CLCrNvvc.js} +1 -1
- package/dist/assets/api-BxXFuqVr.js +1 -0
- package/dist/assets/{app-avatar-2eSD2CPg.js → app-avatar-Dp7pMuua.js} +1 -1
- package/dist/assets/{audit-logs-Dt9lalk3.js → audit-logs-BmIfy96g.js} +1 -1
- package/dist/assets/blocklet-xgPL6JoP.js +1 -0
- package/dist/assets/{brace-fold.es-Cx7Pp8oO.js → brace-fold.es-CjpHnqaJ.js} +1 -1
- package/dist/assets/{bundle-avatar-CstwvF2w.js → bundle-avatar-BOdLBYt_.js} +1 -1
- package/dist/assets/{chart-DEAsbY7p.js → chart-ChpsdZ5w.js} +1 -1
- package/dist/assets/{click-to-copy-Bsaf2xRi.js → click-to-copy-qnXvH47O.js} +1 -1
- package/dist/assets/{closebrackets.es-LDf_Hccp.js → closebrackets.es-BAkyQEkz.js} +1 -1
- package/dist/assets/{codemirror.es-DCD0kuMs.js → codemirror.es-DyYoQOkc.js} +1 -1
- package/dist/assets/{comment.es-RtZGLLrV.js → comment.es-B0snLVGE.js} +1 -1
- package/dist/assets/{config-navigation-_ZUWFkgh.js → config-navigation-qB3p7zP-.js} +1 -1
- package/dist/assets/{delete-confirm-CpfgPoTZ.js → delete-confirm-BG1I5J0u.js} +1 -1
- package/dist/assets/{detail-CGNFghKt.js → detail-DHBrhfaQ.js} +3 -3
- package/dist/assets/{dialog.es-CY4DcxNf.js → dialog.es-C9szbcAW.js} +1 -1
- package/dist/assets/{download-CWVMCLbP.js → download-CIK2Rd3G.js} +1 -1
- package/dist/assets/{foldgutter.es-BZu7SNj_.js → foldgutter.es-B7n9tC8r.js} +1 -1
- package/dist/assets/getValidReactChildren-anMSyFv4.js +1 -0
- package/dist/assets/{hint.es-DdDZBiN1.js → hint.es-CBGKcJ0H.js} +1 -1
- package/dist/assets/{hint.es2-B6S-tUTH.js → hint.es2-9eR9yDN0.js} +1 -1
- package/dist/assets/{iframe-BkaiAX0T.js → iframe-DeTHfFVQ.js} +1 -1
- package/dist/assets/{index-CNLVpIub.js → index-04gl6pO4.js} +1 -1
- package/dist/assets/{index-DojNP9lM.js → index-15yTTSQp.js} +1 -1
- package/dist/assets/{index-juZnKaO5.js → index-3regrC4H.js} +1 -1
- package/dist/assets/{index-BkZfZe7e.js → index-6UQZCJ9z.js} +1 -1
- package/dist/assets/{index-DXkDzCPE.js → index-7aCT4zwx.js} +1 -1
- package/dist/assets/{index-6-px9qAy.js → index-9o5SBOBg.js} +1 -1
- package/dist/assets/{index-D6A1AZLm.js → index-B4nATnEq.js} +2 -2
- package/dist/assets/{index-DqEMTm5N.js → index-BIUglsRs.js} +1 -1
- package/dist/assets/{index-CEIupTjX.js → index-BZQ6Sdlq.js} +1 -1
- package/dist/assets/{index-DwxAoeFn.js → index-BjH9WeIg.js} +5 -5
- package/dist/assets/{index-Cqx1aanX.js → index-BtcEDL3C.js} +1 -1
- package/dist/assets/{index-wpCTocms.js → index-BuNJbfxi.js} +1 -1
- package/dist/assets/{index-DfvPVPq7.js → index-BwAMNnCK.js} +3 -3
- package/dist/assets/{index-PdOAjq0M.js → index-C7m9dmdb.js} +3 -3
- package/dist/assets/{index-C0C9n0GF.js → index-CANtQh-8.js} +1 -1
- package/dist/assets/{index-JFZCWUM3.js → index-CD-UcGPr.js} +1 -1
- package/dist/assets/{index-B_Mci9Ef.js → index-CG4MmDuK.js} +1 -1
- package/dist/assets/{index-0Sgb5oPf.js → index-CJeF5ewa.js} +1 -1
- package/dist/assets/{index-C6PRgT9c.js → index-CLbWUy8O.js} +1 -1
- package/dist/assets/{index-CDfDGgRs.js → index-CUnYmZv8.js} +1 -1
- package/dist/assets/{index-B0m14nWb.js → index-ClNOtPm5.js} +3 -3
- package/dist/assets/{index-CRNV5rSE.js → index-CoOBWTGS.js} +1 -1
- package/dist/assets/{index-D9MRQCOD.js → index-Ct2fXBsa.js} +1 -1
- package/dist/assets/{index-BnYjPpqB.js → index-CupkOe8N.js} +1 -1
- package/dist/assets/{index-BkB6wU5C.js → index-D3y-Mq0t.js} +1 -1
- package/dist/assets/index-D8rh69R2.js +21 -0
- package/dist/assets/{index-BQXrgmCr.js → index-DDRhCg0G.js} +1 -1
- package/dist/assets/{index-Dhhn-NRS.js → index-DJs7uyCT.js} +1 -1
- package/dist/assets/{index-DVSDRPzS.js → index-DNivFScD.js} +1 -1
- package/dist/assets/{index--loYEiKM.js → index-DP0iPBNh.js} +1 -1
- package/dist/assets/{index-DEogVXBk.js → index-DmdQsIN9.js} +1 -1
- package/dist/assets/{index-CPI218vA.js → index-DnBiGZ_C.js} +1 -1
- package/dist/assets/{index-BZAu7qvV.js → index-Dpawm4Ki.js} +2 -2
- package/dist/assets/{index-Cyskc2Kt.js → index-KENXSHGT.js} +1 -1
- package/dist/assets/{index-Bmta40GX.js → index-MRb9RAJK.js} +1 -1
- package/dist/assets/{index-gLfOV5I3.js → index-TFGhlmJg.js} +1 -1
- package/dist/assets/index-TMoSb8Hc.js +68 -0
- package/dist/assets/{index-BD4I6crD.js → index-WbFA75dB.js} +1 -1
- package/dist/assets/{index-CWuN3id6.js → index-l9RwTjEt.js} +1 -1
- package/dist/assets/{index-CiBtNKkh.js → index-oVy0lmae.js} +1 -1
- package/dist/assets/{index-Bv32KhPI.js → index-qm1NSTqx.js} +1 -1
- package/dist/assets/{index-xLDIvbfZ.js → index-vxqr_A7H.js} +1 -1
- package/dist/assets/{index-CDZ9mGf1.js → index-y0r_CDsH.js} +1 -1
- package/dist/assets/{index.es-rNOLQa7L.js → index.es-iY0s9qTe.js} +1 -1
- package/dist/assets/{index.esm-DsLyE9Xu.js → index.esm-Lol3I37E.js} +1 -1
- package/dist/assets/{info-addon.es-BbJL0YX-.js → info-addon.es-U5Ih2Oar.js} +1 -1
- package/dist/assets/{info.es-9ZCzgTD_.js → info.es-B24BQRjf.js} +1 -1
- package/dist/assets/{install-from-url-BBpJ4CMF.js → install-from-url-DrOGJntu.js} +1 -1
- package/dist/assets/{invitation-CikC7uq2.js → invitation-B4r3Uuqv.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-J2hOhmvd.js → is-path-prefix-equal-BsUunwOH.js} +1 -1
- package/dist/assets/{isEqual-Bmi5Bu3B.js → isEqual-DvDsjofF.js} +1 -1
- package/dist/assets/{item-CnEz-3f1.js → item-BQ-lq0dH.js} +1 -1
- package/dist/assets/{javascript.es-BF3qqDhg.js → javascript.es-DmenNz71.js} +1 -1
- package/dist/assets/{jump-to-line.es-BN5G6tY4.js → jump-to-line.es-BT9o4hFe.js} +1 -1
- package/dist/assets/{jump.es-CnQvllfZ.js → jump.es-BJH_IFbo.js} +1 -1
- package/dist/assets/{line-UNVSEb9_.js → line-C7Ytimyk.js} +3 -3
- package/dist/assets/{lint.es-C2AN8ZFv.js → lint.es-BsdVLYYK.js} +1 -1
- package/dist/assets/{lint.es2-C2WqkHvr.js → lint.es2-CT9E8RI5.js} +1 -1
- package/dist/assets/{lint.es3-Fz-_4dtf.js → lint.es3-CjbW7OcU.js} +1 -1
- package/dist/assets/{list-header-DA_lXPf6.js → list-header-C1ycqwNT.js} +1 -1
- package/dist/assets/{log-C8vvn-bO.js → log-CrPoPCZq.js} +1 -1
- package/dist/assets/{lottie-BKBPu1u_.js → lottie-E7kaZ5f2.js} +1 -1
- package/dist/assets/{matchbrackets.es-DO06XhQI.js → matchbrackets.es-Bdv2zR-T.js} +1 -1
- package/dist/assets/{memory-WvEFC3gh.js → memory-Br7PUWs3.js} +1 -1
- package/dist/assets/{mode.es-CRa-no-H.js → mode.es-C0DC5igF.js} +1 -1
- package/dist/assets/{mode.es2-CHXzYyrw.js → mode.es2-BvMpbvGY.js} +1 -1
- package/dist/assets/{mode.es3-DLPMB81l.js → mode.es3-BzN1VyV9.js} +1 -1
- package/dist/assets/{onlineParser.es-B30kjcEV.js → onlineParser.es-DhWzlYWG.js} +1 -1
- package/dist/assets/{overview-CQAvezED.js → overview-RRUNlHLn.js} +1 -1
- package/dist/assets/{react-BaSd4pJ4.js → react-Cw_CkYN1.js} +3 -3
- package/dist/assets/{redux-DM810vAx.js → redux-B9BtMJgi.js} +1 -1
- package/dist/assets/{resource-dialog-2z0a-PF6.js → resource-dialog-0uswwg4x.js} +1 -1
- package/dist/assets/{runtime-CIi4aCkC.js → runtime-C6dWdPqY.js} +1 -1
- package/dist/assets/{schema-DuwsmSM1.js → schema-rBztjvAB.js} +1 -1
- package/dist/assets/sdk-B77IQB17.js +1 -0
- package/dist/assets/{search.es-cqcZ4Cw-.js → search.es-lkmhiqmF.js} +1 -1
- package/dist/assets/{searchcursor.es-B3Ng334L.js → searchcursor.es-CyKx0v-U.js} +1 -1
- package/dist/assets/service-DumyHxMs.js +1 -0
- package/dist/assets/{shorten-label-DkMvii7f.js → shorten-label-MAGXebJW.js} +1 -1
- package/dist/assets/{show-hint.es-Dp6As-xn.js → show-hint.es-DiObn3_W.js} +1 -1
- package/dist/assets/{slicedToArray-CtU0PO29.js → slicedToArray-Cd-fJo2i.js} +1 -1
- package/dist/assets/{spaces-D1jkJ7_l.js → spaces-q5OlP__P.js} +1 -1
- package/dist/assets/{status-rJ7yuno3.js → status-93gUV3__.js} +1 -1
- package/dist/assets/{sublime.es-_V1o9dX1.js → sublime.es-CaUPtnXc.js} +1 -1
- package/dist/assets/{switch-control-CfrXUkfO.js → switch-control-Dd1suGf_.js} +1 -1
- package/dist/assets/{table-icons-Kvp_gs0u.js → table-icons-BuE8hjls.js} +2 -2
- package/dist/assets/{team-Y8ObkRFn.js → team-B75Qqpfx.js} +1 -1
- package/dist/assets/{toUpper-DjqnYte2.js → toUpper-BPjfk0vW.js} +1 -1
- package/dist/assets/{traffic-Co02z8Fi.js → traffic-Dm5MXy9S.js} +1 -1
- package/dist/assets/{url-evaluation-B6AI2aUV.js → url-evaluation-BfNZVzn8.js} +1 -1
- package/dist/assets/{url-join-FDweORaV.js → url-join-uVmSvxHB.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DsZkMmxY.js → use-blocklet-info-for-connect-did-spaces--c0ZcRNe.js} +1 -1
- package/dist/assets/{useLocalStorage-BoA343IZ.js → useLocalStorage-C-9FT6wS.js} +1 -1
- package/dist/assets/{useThemeProps-C9K3QBYc.js → useThemeProps-D2picXH9.js} +1 -1
- package/dist/assets/{util-D5fDZ_8L.js → util-B3g0jIJB.js} +1 -1
- package/dist/assets/{wait-container-f5I4qQ6M.js → wait-container-CS2sL203.js} +1 -1
- package/dist/assets/{withStyles-CenNsZ2i.js → withStyles-D9ls3p7Y.js} +1 -1
- package/dist/assets/{wrap-locale-6M8hS8dV.js → wrap-locale-CJcLTW-n.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-BvZiK55n.js +0 -1
- package/dist/assets/DeleteOutline-DMSjGyRf.js +0 -1
- package/dist/assets/api-DJ02_-Oy.js +0 -1
- package/dist/assets/blocklet-C4NgRaSH.js +0 -1
- package/dist/assets/getValidReactChildren-CLVx1EWM.js +0 -1
- package/dist/assets/index-BJGMWnA_.js +0 -68
- package/dist/assets/index-D0sHKZuS.js +0 -21
- package/dist/assets/sdk-BKOngHkd.js +0 -1
- package/dist/assets/service-Bmw11bED.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as z,j as n,r as d,L as J,P as g,f as H,l as b,Q as m,m as S,d as Y,X as Z,C as ee,t as te,N as y,a as f,H as T,b as x,cT as re,G as v,E as R,p as ne,o as oe,A as se,bg as ie,n as ae}from"./index-BZAu7qvV.js";import{T as me}from"./index-CNLVpIub.js";import le from"./traffic-Co02z8Fi.js";import{D as ce}from"./index-xLDIvbfZ.js";import{B as ue}from"./app-avatar-2eSD2CPg.js";import{B as de}from"./bundle-avatar-CstwvF2w.js";import{C as pe,M as E}from"./memory-WvEFC3gh.js";import{I as fe}from"./chart-DEAsbY7p.js";import{w as ge}from"./withStyles-CenNsZ2i.js";import{_ as he}from"./useLocalStorage-BoA343IZ.js";import{T as ye,a as ve}from"./ToggleButtonGroup-cXYZUu5r.js";import"./Delete-D_OS9ALf.js";import"./iframe-BkaiAX0T.js";import"./ChevronLeft-Pw3iZqJe.js";import"./ChevronRight-CmJg2Cw4.js";import"./Select-BARjOLQh.js";import"./useThemeProps-C9K3QBYc.js";import"./TextField-DLzLnEQT.js";import"./InputLabel-BH8ojsN6.js";import"./InputAdornment-B4c5V3Mf.js";import"./FilterList-DmnR7V-T.js";import"./LastPage-VB_AS_Vh.js";import"./index-Dhhn-NRS.js";import"./redux-DM810vAx.js";import"./Search-BUTthfzy.js";import"./index-BQXrgmCr.js";import"./MoreVert-nny3Ft7E.js";import"./getValidReactChildren-CLVx1EWM.js";function je(){const{api:e,info:r}=z();return n.jsx(le,{client:e,did:r.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var V=M.default=void 0;xe(d);var C=n;function xe(e){return e&&e.__esModule?e:{default:e}}function L(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?L(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,r,i){return(r=Ie(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function Ie(e){var r=Ne(e,"string");return typeof r=="symbol"?r:r+""}function Ne(e,r){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var k=function(r){return(0,C.jsxs)("svg",_(_({},r),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};k.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};k.displayName="server";V=M.default=k;const Pe=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(J);function A(e){const{value:r}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(S,{variant:"body2",color:"textSecondary",children:`${Math.round(r)}%`})})]})}A.propTypes={value:g.number.isRequired};function O({disk:e}){const{t:r}=d.useContext(H),i=[{id:1,className:"used",title:r("system.used"),metric:b(e.used)},{id:2,className:"free",title:r("system.free"),metric:b(e.free)},{id:3,className:"total",title:r("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${r("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(A,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}O.propTypes={disk:g.shape({used:g.number,free:g.number,total:g.number,device:g.string})};O.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function $({initialBlocklets:e}){const{t:r,locale:i}=te(),{api:a}=z(),[u,I]=he("runtime-view-interval",6),j=d.useMemo(()=>{const t=[];return t.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),t.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{y.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&t.push({type:"blocklet",groupId:o.meta.did,groupName:y.getDisplayName(o),id:l,name:y.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),t},[]),[p,N]=d.useState(j),[h,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,G]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,t=>{t.mem.total=t.mem.total||0,t.mem.used=t.mem.total-(t.mem.available||0),F(t),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...t.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...t.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,t=>{if(!t||!t.length){console.error("incorrect blocklets runtime info format",t);return}N(o=>o.map(s=>{const l=t.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=t=>{N(o=>o.filter(s=>s.groupId!==t.meta.did))},B=async t=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:t.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return y.forEachBlockletSync(o,(c,{id:Q,ancestors:X})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:y.getDisplayName(o),id:Q,name:y.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:X})}),l})}catch(o){R.error(o.message)}};f(x.BlockletEvents.removed,w),f(x.BlockletEvents.startFailed,w),f(x.BlockletEvents.statusChange,t=>{if(t.status!=="running"){w(t);return}B(t)}),f(x.BlockletEvents.updated,B),f(x.BlockletEvents.started,B);const W=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(t=>{const o=t.history||[];G({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(t=>{R.error(t.message)})};d.useEffect(()=>{W()},[u]);const q=t=>ne(Number(t||0),{locale:oe(i)}),K=[{label:r("common.group"),name:"groupName",options:{customBodyRenderLite(t){const{type:o,blocklet:s,groupName:l}=p[t];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{type:o,name:s,component:l,ancestors:c}=p[t];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(V,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return q(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(S,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:r("analytics.trend")}),n.jsx(ye,{size:"small",exclusive:!0,value:u,onChange:(t,o)=>I(o),children:[1,3,6,12,24].map(t=>n.jsxs(ve,{value:t,children:[t,"H"]},t))})]}),n.jsxs(v,{mb:4,container:!0,spacing:4,children:[n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...h.cpu,history:P.cpu})},"cpu"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{...h.mem,history:P.mem})},"memory"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{title:`${r("common.memory")} (Daemon)`,used:h.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{title:`${r("common.memory")} (Service)`,instanceCount:h.service.instanceCount||0,used:h.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),h.disks.map(t=>n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(O,{disk:t})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:r("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}$.propTypes={initialBlocklets:g.array.isRequired};function we(){const{data:e,externalData:r,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...r];return n.jsx($,{initialBlocklets:a})}function tt(){const e=se(),{t:r}=d.useContext(H),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:r("common.traffic"),value:"traffic"},{label:r("common.runtime"),value:"runtime"}],I={traffic:je,runtime:we},j=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(S,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:r("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(j)?j:n.jsx(j,{})})]})}const Be=ae.main`
|
|
1
|
+
import{u as z,j as n,r as d,L as J,P as g,f as H,l as b,Q as m,m as S,d as Y,X as Z,C as ee,t as te,N as y,a as f,H as T,b as x,cT as re,G as v,E as R,p as ne,o as oe,A as se,bg as ie,n as ae}from"./index-Dpawm4Ki.js";import{T as me}from"./index-04gl6pO4.js";import le from"./traffic-Dm5MXy9S.js";import{D as ce}from"./index-vxqr_A7H.js";import{B as ue}from"./app-avatar-Dp7pMuua.js";import{B as de}from"./bundle-avatar-BOdLBYt_.js";import{C as pe,M as E}from"./memory-Br7PUWs3.js";import{I as fe}from"./chart-ChpsdZ5w.js";import{w as ge}from"./withStyles-D9ls3p7Y.js";import{_ as he}from"./useLocalStorage-C-9FT6wS.js";import{T as ye,a as ve}from"./ToggleButtonGroup-BLKzb8eH.js";import"./Delete-ukzbwUp3.js";import"./iframe-DeTHfFVQ.js";import"./ChevronLeft-CGibP5P0.js";import"./ChevronRight-DakQosJn.js";import"./Select-CZslLkS9.js";import"./useThemeProps-D2picXH9.js";import"./TextField-FjVpB8_i.js";import"./InputLabel-DiJjRX8c.js";import"./InputAdornment-CmItI7-a.js";import"./FilterList-B3q8z3Ai.js";import"./LastPage-BVKCAcZd.js";import"./index-DJs7uyCT.js";import"./redux-B9BtMJgi.js";import"./Search-DPoHYjEM.js";import"./index-DDRhCg0G.js";import"./MoreVert-72FLA6F7.js";import"./getValidReactChildren-anMSyFv4.js";function je(){const{api:e,info:r}=z();return n.jsx(le,{client:e,did:r.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var V=M.default=void 0;xe(d);var C=n;function xe(e){return e&&e.__esModule?e:{default:e}}function L(e,r){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?L(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,r,i){return(r=Ie(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i,e}function Ie(e){var r=Ne(e,"string");return typeof r=="symbol"?r:r+""}function Ne(e,r){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,r||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var k=function(r){return(0,C.jsxs)("svg",_(_({},r),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};k.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};k.displayName="server";V=M.default=k;const Pe=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(J);function A(e){const{value:r}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(S,{variant:"body2",color:"textSecondary",children:`${Math.round(r)}%`})})]})}A.propTypes={value:g.number.isRequired};function O({disk:e}){const{t:r}=d.useContext(H),i=[{id:1,className:"used",title:r("system.used"),metric:b(e.used)},{id:2,className:"free",title:r("system.free"),metric:b(e.free)},{id:3,className:"total",title:r("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${r("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(A,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}O.propTypes={disk:g.shape({used:g.number,free:g.number,total:g.number,device:g.string})};O.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function $({initialBlocklets:e}){const{t:r,locale:i}=te(),{api:a}=z(),[u,I]=he("runtime-view-interval",6),j=d.useMemo(()=>{const t=[];return t.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),t.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{y.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&t.push({type:"blocklet",groupId:o.meta.did,groupName:y.getDisplayName(o),id:l,name:y.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),t},[]),[p,N]=d.useState(j),[h,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,G]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,t=>{t.mem.total=t.mem.total||0,t.mem.used=t.mem.total-(t.mem.available||0),F(t),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...t.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...t.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,t=>{if(!t||!t.length){console.error("incorrect blocklets runtime info format",t);return}N(o=>o.map(s=>{const l=t.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=t=>{N(o=>o.filter(s=>s.groupId!==t.meta.did))},B=async t=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:t.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return y.forEachBlockletSync(o,(c,{id:Q,ancestors:X})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:y.getDisplayName(o),id:Q,name:y.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:X})}),l})}catch(o){R.error(o.message)}};f(x.BlockletEvents.removed,w),f(x.BlockletEvents.startFailed,w),f(x.BlockletEvents.statusChange,t=>{if(t.status!=="running"){w(t);return}B(t)}),f(x.BlockletEvents.updated,B),f(x.BlockletEvents.started,B);const W=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(t=>{const o=t.history||[];G({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(t=>{R.error(t.message)})};d.useEffect(()=>{W()},[u]);const q=t=>ne(Number(t||0),{locale:oe(i)}),K=[{label:r("common.group"),name:"groupName",options:{customBodyRenderLite(t){const{type:o,blocklet:s,groupName:l}=p[t];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:r("common.name"),name:"name",options:{customBodyRenderLite(t){const{type:o,name:s,component:l,ancestors:c}=p[t];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(V,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return q(o.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(t){const{runtimeInfo:o}=p[t];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(S,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:r("analytics.trend")}),n.jsx(ye,{size:"small",exclusive:!0,value:u,onChange:(t,o)=>I(o),children:[1,3,6,12,24].map(t=>n.jsxs(ve,{value:t,children:[t,"H"]},t))})]}),n.jsxs(v,{mb:4,container:!0,spacing:4,children:[n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...h.cpu,history:P.cpu})},"cpu"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{...h.mem,history:P.mem})},"memory"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{title:`${r("common.memory")} (Daemon)`,used:h.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(E,{title:`${r("common.memory")} (Service)`,instanceCount:h.service.instanceCount||0,used:h.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),h.disks.map(t=>n.jsx(v,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(O,{disk:t})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:r("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}$.propTypes={initialBlocklets:g.array.isRequired};function we(){const{data:e,externalData:r,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...r];return n.jsx($,{initialBlocklets:a})}function tt(){const e=se(),{t:r}=d.useContext(H),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:r("common.traffic"),value:"traffic"},{label:r("common.runtime"),value:"runtime"}],I={traffic:je,runtime:we},j=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(S,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:r("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(j)?j:n.jsx(j,{})})]})}const Be=ae.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aP as Ht,fY as Dt,j as d,cd as ce,fM as G,fZ as et,P as u,f_ as Bt,aO as Ut,ch as Qt,a2 as Vt,dQ as Wt,dO as Zt,f$ as Gt,dN as Jt,d0 as A,a6 as Yt,a7 as Xt,g0 as Kt,Q as P,g1 as en,m as tn,g2 as nn,g3 as on,B as rn,g4 as sn,fK as tt,t as te,g5 as cn,g6 as an,cm as ln,g7 as un,s as M,g8 as fn,g9 as nt,c3 as ot,ga as dn,aA as rt,bT as de,ai as pn,cn as st,gb as hn}from"./index-
|
|
1
|
+
var Ft=Object.defineProperty;var zt=(e,t,n)=>t in e?Ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Q=(e,t,n)=>zt(e,typeof t!="symbol"?t+"":t,n);import{r as S,aP as Ht,fY as Dt,j as d,cd as ce,fM as G,fZ as et,P as u,f_ as Bt,aO as Ut,ch as Qt,a2 as Vt,dQ as Wt,dO as Zt,f$ as Gt,dN as Jt,d0 as A,a6 as Yt,a7 as Xt,g0 as Kt,Q as P,g1 as en,m as tn,g2 as nn,g3 as on,B as rn,g4 as sn,fK as tt,t as te,g5 as cn,g6 as an,cm as ln,g7 as un,s as M,g8 as fn,g9 as nt,c3 as ot,ga as dn,aA as rt,bT as de,ai as pn,cn as st,gb as hn}from"./index-Dpawm4Ki.js";import{d as gn}from"./ExpandMore-BzXUe6hQ.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as S,aL as _,j as e,bl as D,r as p,f as O,m as u,aZ as U,a_ as E,V as F,cb as V,B as $,C as k,bd as K,a6 as Q,a7 as R,O as Z,cc as w,cd as A,ce as L,a8 as I,a5 as P,ax as T,a2 as M,Q as G,at as H,n as J,P as i,o as W,cf as X}from"./index-
|
|
1
|
+
import{aK as S,aL as _,j as e,bl as D,r as p,f as O,m as u,aZ as U,a_ as E,V as F,cb as V,B as $,C as k,bd as K,a6 as Q,a7 as R,O as Z,cc as w,cd as A,ce as L,a8 as I,a5 as P,ax as T,a2 as M,Q as G,at as H,n as J,P as i,o as W,cf as X}from"./index-Dpawm4Ki.js";import{f as Y}from"./index-BojVbZw0.js";import{P as ee}from"./Pagination-BE1Nzv5c.js";import"./LastPage-BVKCAcZd.js";var x={},te=_;Object.defineProperty(x,"__esModule",{value:!0});var g=x.default=void 0,ie=te(S()),ae=e;g=x.default=(0,ie.default)((0,ae.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function h({api:a,paging:o,loading:c,notifications:s,updateNotifications:r,teamDid:j}){const{inService:d}=D(),[m,q]=p.useState(!0),[y,b]=p.useState(!1),{t:n,locale:v}=p.useContext(O),z=async()=>{b(!0);const t=s.filter(l=>l.read===!1).map(l=>l.id).join(",");d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r(),b(!1)},N=async t=>{d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r()},f=m?s:s.filter(t=>t.read===!1),B=s.filter(t=>t.read===!1).length>0,C=t=>e.jsxs("div",{className:"title",children:[t.title," ",e.jsx("span",{className:"time-ago",title:H(t.createdAt,v),children:Y(new Date(t.createdAt),W(v))})]});return e.jsxs(se,{children:[e.jsxs(u,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[n("notification.title"),e.jsxs(u,{component:"span",className:"notification-actions",children:[e.jsx(U,{control:e.jsx(E,{checked:m,onChange:()=>q(!m),name:"showRead",color:"primary"}),label:n("notification.showRead")}),e.jsx(F,{permission:d?"":"mutate_notification",role:d?V:[],children:B&&e.jsxs($,{disabled:y,onClick:z,className:"",children:[y&&e.jsx(k,{size:16,style:{marginRight:"1em"}}),n("notification.markAllAsRead")]})})]})]}),e.jsx(K,{}),e.jsxs(Q,{className:"notification-list",children:[c&&e.jsx(k,{size:[32,20],style:{opacity:"0.8",zIndex:1e4,position:"fixed",top:30,left:"50%",marginLeft:-16}}),f.length===0&&e.jsx(u,{component:"p",variant:"body1",className:"notification-tip",children:n("notification.empty")}),f.length>0&&f.map(t=>t.action?e.jsxs(R,{component:Z,to:t.action,alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id):e.jsxs(R,{alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:C(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>N(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id))]}),!!f.length&&o.pageCount>1&&e.jsx(G,{mt:2,display:"flex",justifyContent:"flex-end",children:e.jsx(ee,{disabled:c,count:o.pageCount,page:o.page,onChange:(t,l)=>{r({page:l})}})})]})}const se=J.div`
|
|
2
2
|
min-height: 60vh;
|
|
3
3
|
|
|
4
4
|
.page-header {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-MRb9RAJK.js","./index-BojVbZw0.js","./index-CUnYmZv8.js","./click-to-copy-qnXvH47O.js","./withStyles-D9ls3p7Y.js","./index-CG4MmDuK.js","./useLocalStorage-C-9FT6wS.js","./index-vxqr_A7H.js","./FilterList-B3q8z3Ai.js","./useThemeProps-D2picXH9.js","./Select-CZslLkS9.js","./Delete-ukzbwUp3.js","./InputLabel-DiJjRX8c.js","./TextField-FjVpB8_i.js","./LastPage-BVKCAcZd.js","./index-DJs7uyCT.js","./redux-B9BtMJgi.js","./Search-DPoHYjEM.js","./index-DDRhCg0G.js","./MoreVert-72FLA6F7.js","./status-93gUV3__.js","./url-evaluation-BfNZVzn8.js","./actions-DI7j7zyh.js","./ButtonGroup-Dk1mLt3h.js","./getValidReactChildren-anMSyFv4.js","./index-BtcEDL3C.js","./isEqual-DvDsjofF.js","./install-from-url-DrOGJntu.js","./schema-rBztjvAB.js","./index-l9RwTjEt.js","./Stepper-C2cskkxs.js","./app-avatar-Dp7pMuua.js","./Add-YuGHCX93.js","./index-CupkOe8N.js","./ExpandMore-BzXUe6hQ.js","./index-C7m9dmdb.js","./index-BuNJbfxi.js","./url-join-uVmSvxHB.js","./Skeleton-BRE8g3Nr.js","./Close-DpmK9wKZ.js","./lottie-E7kaZ5f2.js","./wait-container-CS2sL203.js","./Launch-ixFhPrIJ.js","./DeleteOutline-DWR_h5F3.js","./spaces-q5OlP__P.js","./api-BxXFuqVr.js","./index-D8rh69R2.js","./item-BQ-lq0dH.js","./index-3regrC4H.js","./index-ZG7jWpak.js","./index-TFGhlmJg.js","./InputAdornment-CmItI7-a.js","./preact.module-DJUF--8d.js","./Done-CvSFHISO.js","./delete-confirm-BG1I5J0u.js","./shorten-label-MAGXebJW.js","./blocklet-xgPL6JoP.js","./item-D_j8BgsJ.css","./ArrowDropDown-Dq_r4Xqb.js","./Breadcrumbs-CMvJXPnU.js","./index-CLbWUy8O.js","./index-04gl6pO4.js","./index.esm-Lol3I37E.js","./switch-control-Dd1suGf_.js","./is-path-prefix-equal-BsUunwOH.js","./Link-D21zoGLh.js","./logo-BKA11TRi.js","./LoadingButton-C-VdleqP.js","./Public-DwfXfE3x.js","./CheckCircle-Cn-sNTZK.js","./ChevronRight-DakQosJn.js","./Edit-qncNJ4F1.js","./Https-c9HUx4_F.js","./Slider-BXYbXQK6.js","./index-9o5SBOBg.js","./download-CIK2Rd3G.js","./download-D33dFtt_.css","./index-KENXSHGT.js","./audit-logs-BmIfy96g.js","./index-7aCT4zwx.js","./index-D4PP6P2d.css","./Pagination-BE1Nzv5c.js","./index-WbFA75dB.js","./index-DnBiGZ_C.js","./Loop-cNToB-Hw.js","./ViewList-BWR6vvRA.js","./list-header-C1ycqwNT.js","./index-DP0iPBNh.js","./resource-dialog-0uswwg4x.js","./index-CoOBWTGS.js","./team-B75Qqpfx.js","./sdk-B77IQB17.js","./actions-DMatOIO9.js","./MoreHoriz-BlJZBfL5.js","./index-qm1NSTqx.js","./EditIcon-BU_hSrvO.js","./LockIcon-DWwaclI2.js","./Google-BFCcXFWg.js","./ToggleButtonGroup-BLKzb8eH.js","./detail-DHBrhfaQ.js","./index-DmdQsIN9.js","./index-oVy0lmae.js","./invitation-B4r3Uuqv.js","./index-D3y-Mq0t.js","./wrap-locale-CJcLTW-n.js","./index-ClNOtPm5.js","./index-BIUglsRs.js","./index-6UQZCJ9z.js","./agreement-CLCrNvvc.js","./index-15yTTSQp.js","./index-CJeF5ewa.js","./index-BjH9WeIg.js","./index-C7igR7se.css","./index-DNivFScD.js","./traffic-Dm5MXy9S.js","./iframe-DeTHfFVQ.js","./ChevronLeft-CGibP5P0.js","./chart-ChpsdZ5w.js","./bundle-avatar-BOdLBYt_.js","./memory-Br7PUWs3.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Km=a=>{throw TypeError(a)};var Pp=(a,j,_e)=>j.has(a)||Km("Cannot "+_e);var Wr=(a,j,_e)=>(Pp(a,j,"read from private field"),_e?_e.call(a):j.get(a)),Ms=(a,j,_e)=>j.has(a)?Km("Cannot add the same private member more than once"):j instanceof WeakSet?j.add(a):j.set(a,_e),Uo=(a,j,_e,et)=>(Pp(a,j,"write to private field"),et?et.call(a,_e):j.set(a,_e),_e),So=(a,j,_e)=>(Pp(a,j,"access private method"),_e);var Mp=(a,j,_e,et)=>({set _(nt){Uo(a,j,nt,_e)},get _(){return Wr(a,j,et)}});function _mergeNamespaces(a,j){for(var _e=0;_e<j.length;_e++){const et=j[_e];if(typeof et!="string"&&!Array.isArray(et)){for(const nt in et)if(nt!=="default"&&!(nt in a)){const tt=Object.getOwnPropertyDescriptor(et,nt);tt&&Object.defineProperty(a,nt,tt.get?tt:{enumerable:!0,get:()=>et[nt]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const j=document.createElement("link").relList;if(j&&j.supports&&j.supports("modulepreload"))return;for(const nt of document.querySelectorAll('link[rel="modulepreload"]'))et(nt);new MutationObserver(nt=>{for(const tt of nt)if(tt.type==="childList")for(const it of tt.addedNodes)it.tagName==="LINK"&&it.rel==="modulepreload"&&et(it)}).observe(document,{childList:!0,subtree:!0});function _e(nt){const tt={};return nt.integrity&&(tt.integrity=nt.integrity),nt.referrerPolicy&&(tt.referrerPolicy=nt.referrerPolicy),nt.crossOrigin==="use-credentials"?tt.credentials="include":nt.crossOrigin==="anonymous"?tt.credentials="omit":tt.credentials="same-origin",tt}function et(nt){if(nt.ep)return;nt.ep=!0;const tt=_e(nt);fetch(nt.href,tt)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}function getAugmentedNamespace(a){if(a.__esModule)return a;var j=a.default;if(typeof j=="function"){var _e=function et(){return this instanceof et?Reflect.construct(j,arguments,this.constructor):j.apply(this,arguments)};_e.prototype=j.prototype}else _e={};return Object.defineProperty(_e,"__esModule",{value:!0}),Object.keys(a).forEach(function(et){var nt=Object.getOwnPropertyDescriptor(a,et);Object.defineProperty(_e,et,nt.get?nt:{enumerable:!0,get:function(){return a[et]}})}),_e}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -2487,4 +2487,4 @@ ${et}
|
|
|
2487
2487
|
${a=>a.scrollable?"":"overflow: hidden"};
|
|
2488
2488
|
}
|
|
2489
2489
|
`;function GlobalSubscriber(){const{t:a}=useLocaleContext(),{session:j}=useSessionContext$1(),{info:_e,refresh:et}=useNodeContext();return useSubscription(constant.TeamEvents.userUpdated,({teamDid:nt,user:tt})=>{nt===_e.did&&tt&&!tt.approved&&j&&j.user&&j.user.did===tt.did&&(toast.warning(a("session.forbidLogin"),{autoHideDuration:10*1e3}),j.logout())}),useSubscription(constant$3.EVENTS.NOTIFICATION_CREATE,nt=>{nt.entityType==="node"&&et({silent:!0})}),useSubscription(constant$3.EVENTS.NODE_UPDATED,()=>{et({silent:!0})}),null}var util={},baseUniq=_baseUniq;function uniq(a){return a&&a.length?baseUniq(a):[]}var uniq_1=uniq;const uniq$1=getDefaultExportFromCjs$1(uniq_1),require$$6=getAugmentedNamespace(dist$2);class Node{constructor(j){this.value=j,this.next=void 0}}let Queue$1=class{constructor(){this.clear()}enqueue(j){const _e=new Node(j);this._head?(this._tail.next=_e,this._tail=_e):(this._head=_e,this._tail=_e),this._size++}dequeue(){const j=this._head;if(j)return this._head=this._head.next,this._size--,j.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let j=this._head;for(;j;)yield j.value,j=j.next}};var yoctoQueue=Queue$1;const Queue=yoctoQueue,pLimit=a=>{if(!((Number.isInteger(a)||a===1/0)&&a>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const j=new Queue;let _e=0;const et=()=>{_e--,j.size>0&&j.dequeue()()},nt=async(ut,ft,...pt)=>{_e++;const dt=(async()=>ut(...pt))();ft(dt);try{await dt}catch{}et()},tt=(ut,ft,...pt)=>{j.enqueue(nt.bind(null,ut,ft,...pt)),(async()=>(await Promise.resolve(),_e<a&&j.size>0&&j.dequeue()()))()},it=(ut,...ft)=>new Promise(pt=>{tt(ut,pt,...ft)});return Object.defineProperties(it,{activeCount:{get:()=>_e},pendingCount:{get:()=>j.size},clearQueue:{value:()=>{j.clear()}}}),it};var pLimit_1=pLimit,engine={},browser={};browser.endianness=function(){return"LE"};browser.hostname=function(){return typeof location<"u"?location.hostname:""};browser.loadavg=function(){return[]};browser.uptime=function(){return 0};browser.freemem=function(){return Number.MAX_VALUE};browser.totalmem=function(){return Number.MAX_VALUE};browser.cpus=function(){return[]};browser.type=function(){return"Browser"};browser.release=function(){return typeof navigator<"u"?navigator.appVersion:""};browser.networkInterfaces=browser.getNetworkInterfaces=function(){return{}};browser.arch=function(){return"javascript"};browser.platform=function(){return"browser"};browser.tmpdir=browser.tmpDir=function(){return"/tmp"};browser.EOL=`
|
|
2490
|
-
`;browser.homedir=function(){return"/"};(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(pt){return pt&&pt.__esModule?pt:{default:pt}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasMountPoint=a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.getBlockletEngine=void 0;const _e=j(browser),et=constant,nt=pt=>{if(pt===void 0)throw new Error("blocklet meta param is required");const{engine:dt}=pt;if(!dt)return{interpreter:"node",source:""};if(!Array.isArray(dt))return dt;const mt=_e.default.platform(),Et=dt.find(wt=>wt.platform===mt);if(!Et)throw new Error(`can not find a proper engine interpreter on ${mt}`);return Et};a.getBlockletEngine=nt;const tt=pt=>(pt==null?void 0:pt.group)===et.BlockletGroup.gateway;a.isGatewayBlocklet=tt;const it=pt=>(pt==null?void 0:pt.group)===et.BlockletGroup.pack;a.isPackBlocklet=it;const ut=pt=>!!(pt!=null&&pt.main)||(0,a.getBlockletEngine)(pt||{}).interpreter==="blocklet";a.hasStartEngine=ut;const ft=pt=>((0,a.hasStartEngine)(pt)||((pt==null?void 0:pt.interfaces)||[]).find(dt=>dt.type===et.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,a.isGatewayBlocklet)(pt)===!1;a.hasMountPoint=ft})(engine);(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(pn){return pn&&pn.__esModule?pn:{default:pn}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.isAccessible=a.isRunning=a.isBeforeInstalled=a.isInProgress=a.getBlockletServices=a.getBlockletAppIdList=a.getRolesFromAuthConfig=a.isPreferenceKey=a.isExternalBlocklet=a.getBlockletChainInfo=a.getChainInfo=a.getConnectAppUrl=a.getParentComponentName=a.filterComponentsV2=a.findComponentByIdV2=a.findComponentV2=a.findComponentById=a.findComponent=a.getComponentBundleId=a.getComponentName=a.getComponentId=a.replaceSlotToIp=a.getComponentWhoCanAccess=a.getWhoCanAccess=a.findServiceFromMeta=a.findWebInterfacePort=a.findWebInterface=a.fixBlockletStatus=a.getAppDescription=a.getDisplayName=a.getAppName=a.hasRunnableComponent=a.wipeSensitiveData=a.isEnvShareable=a.isEnvShareableToClient=a.getComponentMissingConfigs=a.getAppMissingConfigs=a.getSharedConfigObj=a.isDeletableBlocklet=a.forEachComponentV2Sync=a.forEachComponentV2=a.forEachChildSync=a.forEachChild=a.forEachBlockletSync=a.forEachBlocklet=a.isFreeComponent=a.isFreeBlocklet=void 0,a.hasResourceType=void 0,a.getAppUrl=Gt;const _e=j(get_1),et=j(uniq_1),nt=require$$6,tt=j(pLimit_1),it=j(constant$3),ut=constant,ft=engine;Object.defineProperty(a,"hasStartEngine",{enumerable:!0,get:function(){return ft.hasStartEngine}}),Object.defineProperty(a,"isGatewayBlocklet",{enumerable:!0,get:function(){return ft.isGatewayBlocklet}}),Object.defineProperty(a,"isPackBlocklet",{enumerable:!0,get:function(){return ft.isPackBlocklet}});const{NODE_SERVICES:pt,SLOT_FOR_IP_DNS_SITE:dt,WHO_CAN_ACCESS:mt,WHO_CAN_ACCESS_PREFIX_ROLES:Et}=it.default,wt=(pn,En=[])=>`${En.map(An=>An&&An.meta?An.meta.did:"").join("/")}${En.length?"/":""}${pn&&pn.meta?pn.meta.did:""}`;a.getComponentId=wt;const St=(pn,En=[])=>`${En.map(An=>An&&An.meta?An.meta.name:"").join("/")}${En.length?"/":""}${pn&&pn.meta?pn.meta.name:""}`;a.getComponentName=St;const Ct=pn=>`${pn.meta.bundleName}@${pn.meta.version}`;a.getComponentBundleId=Ct;const Dt=pn=>{if(!pn)return"";const En=pn.split("/");return En.pop(),!En.length||(En[En.length-1].startsWith("@")&&En.pop(),!En.length)?"":En.join("/")};a.getParentComponentName=Dt;const At=(pn,En,{parallel:An=!1,concurrencyLimit:zn=5,sync:rn,params:Ut,_parent:Zt,_root:hn,_level:wn=0,_tasks:qn,_ancestors:kn=[],_limit:Mn}={})=>{const Kn=hn||Zt||pn,On=wt(pn,kn),jn=kn.concat(pn);if(rn){const Gn=En(pn,{parent:Zt,root:Kn,level:wn,params:Ut,ancestors:kn,id:On});if(pn.children)for(const Ir of pn.children)At(Ir,En,{sync:rn,params:Gn,_parent:pn,_root:Kn,_level:wn+1,_ancestors:jn});return null}if(!An)return new Promise(async(Gn,Ir)=>{try{const Wn=await En(pn,{parent:Zt,root:Kn,level:wn,ancestors:kn,params:Ut,id:On});if(pn.children)for(const Qn of pn.children)await At(Qn,En,{params:Wn,_parent:pn,_root:Kn,_level:wn+1,_ancestors:jn});Gn(null)}catch(Wn){Ir(Wn)}});const cr=Mn||(0,tt.default)(zn),Un=qn||[];if(Un.push(cr(()=>En(pn,{parent:Zt,root:Kn,level:wn,ancestors:kn,id:On}))),pn.children)for(const Gn of pn.children)At(Gn,En,{parallel:An,_parent:pn,_root:Kn,_level:wn+1,_tasks:Un,_ancestors:jn,_limit:cr});return qn?null:Promise.all(Un)};a.forEachBlocklet=At;const Pt=(pn,En)=>At(pn,En,{sync:!0});a.forEachBlockletSync=Pt;const It=(pn,En,{parallel:An=!1,concurrencyLimit:zn=5,sync:rn}={})=>{if(rn){if(pn.children)for(const hn of pn.children)En(hn);return null}if(!An)return new Promise(async(hn,wn)=>{try{if(pn.children)for(const qn of pn.children)await En(qn);hn(null)}catch(qn){wn(qn)}});const Ut=(0,tt.default)(zn),Zt=[];if(pn.children)for(const hn of pn.children)Zt.push(Ut(()=>En(hn)));return Promise.all(Zt)};a.forEachComponentV2=It;const Lt=(pn,En)=>It(pn,En,{sync:!0});a.forEachComponentV2Sync=Lt;const zt=(pn,En,An)=>At(pn,(zn,rn)=>rn.level===0?{}:En(zn,rn),An);a.forEachChild=zt;const Ft=(pn,En)=>zt(pn,En,{sync:!0});a.forEachChildSync=Ft;const Ht=(pn,En,{_ancestors:An=[],returnAncestors:zn=!1}={})=>{if(!En)return null;if(En(pn,{ancestors:An}))return zn?{component:pn,ancestors:An}:pn;for(const rn of pn.children||[]){const Ut=An.concat(pn),Zt=Ht(rn,En,{_ancestors:Ut,returnAncestors:zn});if(Zt)return Zt}return null};a.findComponent=Ht;const Qt=(pn,En,{returnAncestors:An=!1}={})=>(Array.isArray(En)&&(En=En.join("/")),Ht(pn,(zn,{ancestors:rn})=>{const Ut=wt(zn,rn);return En===Ut},{returnAncestors:An}));a.findComponentById=Qt;const tn=(pn,En)=>{if(!En)return null;for(const An of pn.children||[])if(En(An,pn))return An;return null};a.findComponentV2=tn;const mn=(pn,En)=>En?(Array.isArray(En)&&(En=En.join("/")),tn(pn,(An,zn)=>{if(En.includes("/")){const rn=wt(An,[zn]);return En===rn}return En===An.meta.did})):null;a.findComponentByIdV2=mn;const $t=(pn,En)=>{if(!En)return[];const An=[];for(const zn of pn.children||[])En(zn,pn)&&An.push(zn);return An};a.filterComponentsV2=$t;const rt=pn=>!!pn&&!!(pn.key||pn.name)&&!pn.secure&&pn.shared!==!1&&!ut.BLOCKLET_CONFIGURABLE_KEY[pn.key||pn.name];a.isEnvShareableToClient=rt;const st=pn=>!!pn&&!!(pn.key||pn.name)&&!pn.secure&&!!pn.shared&&!ut.BLOCKLET_CONFIGURABLE_KEY[pn.key||pn.name];a.isEnvShareable=st;const ct=(pn,En)=>{const An={};return!pn||!En||(Array.isArray(pn.configs)&&pn.configs.forEach(({key:zn,value:rn,secure:Ut})=>{if(!st({key:zn,secure:Ut,shared:!0}))return;const Zt=(pn.configObj||{})[zn]||rn,hn=(En.configs||[]).find(wn=>wn.key===zn);(!hn||st(hn)||!hn.value&&!(En.configObj||{})[hn.key])&&(An[zn]=Zt)}),(pn.configs||[]).forEach(({key:zn,value:rn})=>{[ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(zn)&&(An[ut.CHAIN_PROP_MAP[zn]]=rn)})),An};a.getSharedConfigObj=ct;const ht=pn=>pn.key.startsWith(ut.BLOCKLET_PREFERENCE_PREFIX)===!0;a.isPreferenceKey=ht;const vt=(pn,En)=>!!(pn.required&&(!pn.value&&!En[pn.key]||Object.values(ut.CHAIN_PROP_MAP).includes(pn.key)&&Object.keys(En).includes(pn.key)&&!En[pn.key])),xt=(pn={})=>{const En=[];return Lt(pn,An=>{var Ut;if(((Ut=An.meta)==null?void 0:Ut.group)===ut.BlockletGroup.gateway)return;const zn=An.configs||[],rn=ct(pn,An);zn.forEach(Zt=>{vt(Zt,rn)&&En.push({did:An.meta.did,key:Zt.key,description:Zt.description})})}),En.filter(An=>!ht(An))};a.getAppMissingConfigs=xt;const Tt=(pn={},En={})=>{const An=[],zn=pn.configs||[],rn=ct(En,pn);return zn.forEach(Ut=>{vt(Ut,rn)&&An.push({did:pn.meta.did,key:Ut.key,description:Ut.description})}),An};a.getComponentMissingConfigs=Tt;const yt=pn=>pn.payment?(pn.payment.price||[]).map(An=>An.value||0).every(An=>An===0):!0;a.isFreeBlocklet=yt;const ot=pn=>!pn.payment||!pn.payment.componentPrice?!0:!pn.payment.componentPrice.length;a.isFreeComponent=ot;const bt=pn=>pn&&(At(pn,En=>{En.configs&&(En.configs=En.configs.filter(An=>!ht(An)),En.configs.forEach(An=>{An.secure&&(An.value=An.value?"__encrypted__":"")})),(En.environments||[]).forEach(An=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(An.key)&&(An.value="__encrypted__")}),(En.migratedFrom||[]).forEach(An=>{An.appSk="__encrypted__"}),delete pn.configObj,delete pn.environmentObj},{sync:!0}),pn);a.wipeSensitiveData=bt;const Mt=pn=>{if(!pn)return!1;const En=pn.environments.find(An=>An.key==="BLOCKLET_DELETABLE");return En?En.value==="yes":!0};a.isDeletableBlocklet=Mt;const Ot=pn=>{let En=!1;return Pt(pn,An=>{An.meta.group!==ut.BlockletGroup.gateway&&(En=!0)}),En};a.hasRunnableComponent=Ot;const Vt=(pn,En=!1)=>{if(!pn)return"";const{meta:An}=pn;let zn;if(!En&&pn.environments){const rn=pn.environments.find(Ut=>Ut.key==="BLOCKLET_APP_NAME");rn&&rn.value&&(zn=rn.value)}return zn||An.title||An.name};a.getAppName=Vt,a.getDisplayName=Vt;const Nt=(pn,En=!1)=>{if(!pn)return"";const{meta:An}=pn;let zn;if(!En&&pn.environments){const rn=pn.environments.find(Ut=>Ut.key==="BLOCKLET_APP_DESCRIPTION");rn&&rn.value&&(zn=rn.value)}return zn||An.description||An.name};a.getAppDescription=Nt;function Gt(pn){var zn,rn,Ut;const En=(Ut=(rn=(zn=pn==null?void 0:pn.site)==null?void 0:zn.domainAliases)==null?void 0:rn.sort((Zt,hn)=>{var wn,qn,kn,Mn;return(wn=Zt.accessibility)!=null&&wn.accessible&&((qn=hn.accessibility)!=null&&qn.accessible)?+Zt.isProtected-+hn.isProtected:+((kn=hn.accessibility)==null?void 0:kn.accessible)-+((Mn=Zt.accessibility)==null?void 0:Mn.accessible)}))==null?void 0:Ut.map(Zt=>{var qn;const hn=(qn=Zt==null?void 0:Zt.domainStatus)!=null&&qn.isHttps?"https://":"http://",wn=Zt==null?void 0:Zt.value;return`${hn}${wn}`}).filter(Boolean);return En==null?void 0:En[0]}const qt=pn=>{pn&&(Pt(pn,En=>{En.status=(0,ut.fromBlockletStatus)(En.status),En.source!==void 0&&(En.source=(0,ut.fromBlockletSource)(En.source))}),pn.settings&&(pn.settings.children||[]).forEach(En=>{Pt(En,An=>{An.status=(0,ut.fromBlockletStatus)(An.status),An.source!==void 0&&(An.source=(0,ut.fromBlockletSource)(An.source))})}))};a.fixBlockletStatus=qt;const nn=pn=>{if(!pn)return null;const En=pn.meta||pn||{},{interfaces:An=[]}=En;return Array.isArray(An)?An.find(zn=>zn.type===ut.BLOCKLET_INTERFACE_TYPE_WEB):null};a.findWebInterface=nn;const fn=pn=>{if(!pn)return null;const En=nn(pn),{ports:An}=pn;return!En||!An?null:An[En.port]};a.findWebInterfacePort=fn;const yn=(pn,En)=>{const An=[En];En===pt.AUTH&&An.push(pt.AUTH_SERVICE);const zn=nn(pn);return zn?(zn.services||[]).find(rn=>An.includes(rn.name)):null};a.findServiceFromMeta=yn;const Jt=pn=>{if(!pn)return mt.ALL;if((0,_e.default)(pn,"settings.whoCanAccess"))return pn.settings.whoCanAccess;const En=yn(pn.meta,pt.AUTH);return(0,_e.default)(En,"config.whoCanAccess")?En.config.whoCanAccess:mt.ALL};a.getWhoCanAccess=Jt;const Bt=(pn,En)=>{const An=(pn.configs||[]).find(rn=>rn.key===ut.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(An)return An.value;if(En&&(0,_e.default)(En,"settings.whoCanAccess")&&(0,_e.default)(En,"settings.whoCanAccess")!==mt.ALL)return(0,_e.default)(En,"settings.whoCanAccess");const zn=yn(pn.meta,pt.AUTH);return(0,_e.default)(zn,"config.whoCanAccess")?zn.config.whoCanAccess:mt.ALL};a.getComponentWhoCanAccess=Bt;const Kt=({request:pn,baseUrl:En})=>{const An=pn.headers["x-blocklet-did"]||"",zn=pn.headers["x-blocklet-real-did"]||"",rn=pn.headers["x-path-prefix"]||"/",Ut=pn.headers["x-group-path-prefix"]||"/";let Zt=En;return An!==zn&&rn!==Ut&&(Zt=(0,nt.joinURL)(Zt,"/").replace(rn,Ut)),Zt};a.getConnectAppUrl=Kt;const un=(pn,En)=>{const An=(En||"").includes(":")?":":/\./;return(pn||"").replace(dt,(En||"").replace(new RegExp(An,"g"),"-"))};a.replaceSlotToIp=un;const sn=pn=>{const En=Object.entries(ut.CHAIN_INFO_CONFIG).reduce((An,zn)=>{const[rn,[Ut,Zt]]=zn;return An[Ut]=(0,_e.default)(pn,rn)||Zt,An},{});return En.type==="ethereum"&&En.id==="none"&&(En.id="1"),En};a.getChainInfo=sn;const vn=pn=>{const En=sn({});if(!pn)return En;const An=sn(pn.configObj);if(An.host!=="none")return An;let zn;return Ft(pn,rn=>{if(zn&&zn.host!=="none")return;const Ut=sn(rn.configObj);Ut.host!=="none"&&(zn=Ut)}),zn||En};a.getBlockletChainInfo=vn;const $n=pn=>!!(pn!=null&&pn.controller);a.isExternalBlocklet=$n;const cn=pn=>pn.whoCanAccess.startsWith(Et)?pn.whoCanAccess.substring(Et.length).split(","):[];a.getRolesFromAuthConfig=cn;const gn=pn=>{const En=Array.isArray(pn.migratedFrom)?pn.migratedFrom.map(An=>An.appDid):[];return(0,et.default)([pn.appDid,pn.appPid,...En].filter(Boolean))};a.getBlockletAppIdList=gn;const Fn=pn=>{const En=[];return pn&&Pt(pn,An=>{var rn;(((rn=An.meta)==null?void 0:rn.interfaces)||[]).filter(Ut=>Ut.type===ut.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(Ut=>{const Zt=Ut.port||{};En.push({name:Ut.name,protocol:Ut.protocol,port:Number(Zt.external),upstreamPort:Number((An.ports||{})[Zt.internal])})})}),En};a.getBlockletServices=Fn;const _n=pn=>[ut.BlockletStatus.downloading,ut.BlockletStatus.waiting,ut.BlockletStatus.starting,ut.BlockletStatus.installing,ut.BlockletStatus.stopping,ut.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(pn);a.isInProgress=_n;const In=pn=>[ut.BlockletStatus.added,ut.BlockletStatus.waiting,ut.BlockletStatus.downloading,ut.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(pn);a.isBeforeInstalled=In;const lr=pn=>[ut.BlockletStatus.running,"running"].includes(pn);a.isRunning=lr;const xn=pn=>[ut.BlockletStatus.running,ut.BlockletStatus.waiting,ut.BlockletStatus.downloading,"running","waiting","downloading"].includes(pn);a.isAccessible=xn;const Sn=(pn,{type:En,did:An}={type:"",did:""})=>{var zn,rn,Ut;return pn?!(0,ft.hasStartEngine)(pn.meta)&&((Ut=(rn=(zn=pn.meta)==null?void 0:zn.resource)==null?void 0:rn.bundles)==null?void 0:Ut.length)>0&&(pn.meta.resource.bundles||[]).some(Zt=>Zt.type===En&&Zt.did===An):!1};a.hasResourceType=Sn,a.default={isFreeBlocklet:yt,isFreeComponent:ot,forEachBlocklet:At,forEachBlockletSync:Pt,forEachChild:zt,forEachChildSync:Ft,forEachComponentV2:It,forEachComponentV2Sync:Lt,isDeletableBlocklet:Mt,getSharedConfigObj:ct,getAppMissingConfigs:xt,getComponentMissingConfigs:Tt,isEnvShareableToClient:rt,isEnvShareable:st,wipeSensitiveData:bt,hasRunnableComponent:Ot,getAppName:Vt,getAppDescription:Nt,getAppUrl:Gt,getDisplayName:Vt,fixBlockletStatus:qt,findWebInterface:nn,findWebInterfacePort:fn,findServiceFromMeta:yn,getWhoCanAccess:Jt,getComponentWhoCanAccess:Bt,replaceSlotToIp:un,getComponentId:wt,getComponentName:St,getComponentBundleId:Ct,findComponent:Ht,findComponentById:Qt,findComponentV2:tn,findComponentByIdV2:mn,filterComponentsV2:$t,getParentComponentName:Dt,getConnectAppUrl:Kt,getChainInfo:sn,getBlockletChainInfo:vn,isExternalBlocklet:$n,isPreferenceKey:ht,getRolesFromAuthConfig:cn,getBlockletServices:Fn,isInProgress:_n,isBeforeInstalled:In,isRunning:lr,isAccessible:xn,isGatewayBlocklet:ft.isGatewayBlocklet,isPackBlocklet:ft.isPackBlocklet,hasStartEngine:ft.hasStartEngine,hasResourceType:Sn}})(util);const getServerUrl=(a,j=!1)=>{const _e=a.routing.adminPath;return j?encodeURIComponent(joinURL(window.location.origin,_e)):joinURL(window.location.origin,_e)},getLaunchAgreementUrl=(a,j,_e)=>{const et=getServerUrl(j),nt=joinURL(_e,`/api/blocklets/${a.did}/blocklet.json`),tt=new URL(joinURL(et,"/launch-blocklet/agreement"));return tt.searchParams.set("blocklet_meta_url",nt),tt.searchParams.set("from",window.location.href),tt.href},ensureDomainAliases=async(a,{getIP:j}={})=>{if(!a||!a.length)return[];if(!j||!a.some(et=>et.value.includes(constant$3.SLOT_FOR_IP_DNS_SITE)))return a;const _e=await j();return _e?a.map(et=>{try{return et.value=util.replaceSlotToIp(et.value,_e),et}catch{return et}}).filter(Boolean):a},getAppCapabilities=a=>{const j={didSpace:null};return util.forEachBlockletSync(a,_e=>{var et,nt;j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(nt=(et=_e==null?void 0:_e.meta)==null?void 0:et.capabilities)!=null&&nt.didSpace&&(j.didSpace=_e.meta.capabilities.didSpace)}),j},fixBlocklet=async(a,{fixRuntime:j=!0,oldBlocklet:_e,getIP:et}={})=>{if(a.site||(a.site={domainAliases:[],rules:[]}),a.site.rules.forEach(nt=>{nt.from.pathPrefix=normalizePathPrefix$1(nt.from.pathPrefix||"/")}),a.site.rules=sortBy$1(a.site.rules,nt=>nt.from.pathPrefix),j===!0)a.site.domainAliases=await ensureDomainAliases(a.site.domainAliases,{getIP:et}),a.appRuntimeInfo&&(a.appRuntimeInfo.startAt=new Date-a.appRuntimeInfo.uptime),util.forEachBlockletSync(a,nt=>{nt.runtimeInfo&&(nt.runtimeInfo.startAt=new Date-nt.runtimeInfo.uptime)});else if(j==="merge-old"&&_e){a.site.domainAliases=_e.site.domainAliases,a.appRuntimeInfo=_e.appRuntimeInfo;const nt={};util.forEachBlockletSync(_e,(tt,{id:it})=>{nt[it]=tt}),util.forEachBlockletSync(a,(tt,{id:it})=>{const ut=nt[it];ut&&(tt.runtimeInfo=ut.runtimeInfo,tt.diskInfo=ut.diskInfo,tt.engine=ut.engine)})}else a.site.domainAliases=[];a.capabilities=getAppCapabilities(a)},DEFAULT_WALLET_TYPE="arcblock",getWalletType=(a,j=!1)=>{let _e;return j?(_e=(a.configs||[]).find(et=>et.key==="BLOCKLET_APP_CHAIN_TYPE"),_e&&_e.value||(_e=(a.environments||[]).find(et=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(et.key)),_e&&_e.value)?_e.value:DEFAULT_WALLET_TYPE):(_e=(a.environments||[]).find(et=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(et.name)),_e&&_e.default?_e.default:DEFAULT_WALLET_TYPE)},isServerless=a=>!isEmpty$2(a==null?void 0:a.controller);let cache=null;const fetch$1=async()=>{const a=window.env.apiPrefix||"/",j=joinURL(a,"/api/dns-resolve?accessible=1");try{return(await axios$4.get(j)).data.address}catch{return null}},getIp=()=>(cache||(cache=fetch$1()),cache),BlockletsContext=reactExports.createContext({}),{Provider:Provider$2,Consumer:Consumer$2}=BlockletsContext,mergeBlocklets=(a,j,_e)=>_e?a.map(et=>{const nt={...et},tt=j.find(it=>it.meta.did===et.meta.did);return tt&&_e.forEach(it=>{nt[it]=tt[it]}),nt}):j;function BlockletsProvider({children:a}){const j=useNodeContext(),_e=createClient(),[et,nt]=reactExports.useState(null),[tt,it]=reactExports.useState(!1),[ut,ft]=reactExports.useState([]),[pt,dt]=reactExports.useState([]),[mt,Et]=reactExports.useState(!1),wt=(Lt,zt)=>{util.isExternalBlocklet(Lt)?dt(zt):ft(zt)},St=4,Ct=async({silent:Lt=!0,retries:zt=St,updates:Ft,useCache:Ht=!0}={})=>{Lt||it(!0);try{nt(null);const{blocklets:Qt}=await _e.getBlocklets({input:{useCache:Ht}});for(const $t of Qt)await fixBlocklet($t,{getIP:getIp});const tn=Qt.filter($t=>!util.isExternalBlocklet($t)),mn=Qt.filter(util.isExternalBlocklet);ft($t=>mergeBlocklets($t,tn,Ft)),dt($t=>mergeBlocklets($t,mn,Ft)),it(!1),Et(!0)}catch(Qt){zt>0?setTimeout(()=>Ct({silent:Lt,retries:zt-1,useCache:Ht}),1e3):(it(!1),nt(Qt))}},Dt=async Lt=>{try{const{blocklet:zt}=await j.api.getBlocklet({input:{did:Lt.meta.did,attachRuntimeInfo:!0}});await fixBlocklet(zt,{getIP:getIp}),wt(zt,Ft=>Ft.some(Ht=>Ht.meta.did===zt.meta.did)?Ft.map(Ht=>Ht.meta.did===zt.meta.did?zt:Ht):[...Ft,zt])}catch(zt){nt(zt)}},At=Lt=>{j.refresh(),Dt(Lt)};reactExports.useEffect(()=>{Ct({silent:!1})},[]);const Pt=Lt=>{const zt={};util.forEachBlockletSync(Lt,(Ft,{id:Ht})=>{zt[Ht]=constant.fromBlockletStatus(Ft.status)}),wt(Lt,Ft=>Ft.map(Ht=>(Ht.meta.did===Lt.meta.did&&util.forEachBlockletSync(Ht,(Qt,{id:tn})=>{zt[tn]&&(Qt.status=zt[tn])}),Ht)))};useSubscription(constant.BlockletEvents.added,Lt=>{Lt.status=constant.fromBlockletStatus(Lt.status),wt(Lt,zt=>[...zt,Lt])}),useSubscription(constant.BlockletEvents.removed,Lt=>{j.refresh(),wt(Lt,zt=>zt.filter(Ft=>Ft.meta.did!==Lt.meta.did))}),useSubscription(constant.BlockletEvents.statusChange,Pt),useSubscription(constant.BlockletEvents.installed,At),useSubscription(constant.BlockletEvents.upgraded,At),useSubscription(constant.BlockletEvents.updated,Dt),useSubscription(constant.BlockletEvents.startFailed,Dt);const It={loading:tt,error:et,data:ut,externalData:pt,refresh:Ct,initialized:mt,api:_e};return jsxRuntimeExports.jsx(Provider$2,{value:{blocklets:It},children:a})}function useBlockletsContext(){const{blocklets:a}=reactExports.useContext(BlockletsContext);return a}const authorize=({user:a,launchType:j,nftId:_e})=>{var et;if(!a)return!1;if(j==="serverless"){if(!_e)throw new Error("nftId is required");return((et=a==null?void 0:a.controller)==null?void 0:et.nftId)===_e}return(a.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=a=>{var j,_e;return a.isGetBlocklet&&((_e=(j=a.runtimeBlocklet)==null?void 0:j.controller)==null?void 0:_e.consumedAt)},getRestoredAccessUrl=async a=>{const j=getBlockletUrls({blocklet:a});let _e="";return _e=j.find(et=>{try{const{hostname:nt}=new URL(et);return urlEvaluation.isSlpDomain(nt)}catch(nt){return console.error(nt),!1}}),_e||(_e=await getAccessibleUrl(j)),_e},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:a}){const{session:j}=useSessionContext$1(),{t:_e}=useLocaleContext(),{api:et,info:nt}=useNodeContext(),[tt]=useSearchParams(),it=createClient(),ut=tt.get("launchType"),ft=tt.get("fromLauncher"),pt=tt.get("blocklet_meta_url")||"",dt=tt.get("nftId")||"",mt=tt.get("launcherSessionId")||"",Et=tt.get("launcherUrl")||"",wt=new URL(pt).origin,[St,Ct]=reactExports.useState({meta:null,appDid:tt.get("appDid")||null,sessionId:tt.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),Dt=(mn,$t)=>Ct(rt=>({...rt,appDid:mn,sessionId:$t})),At=authorize({user:j.user,launchType:ut,nftId:dt}),[Pt,It]=reactExports.useState(null),[Lt,zt]=reactExports.useState(!0),Ft=reactExports.useMemo(()=>nt?getServerUrl(nt):"",[nt]),Ht=async mn=>{if(!mn)throw new Error("appDid should not be empty");const{blocklet:$t}=await et.getBlocklet({input:{did:mn,attachConfig:!1}});if(!$t)return null;const rt=constant.BlockletStatus[$t.status],st=!!dt,ct=rt<constant.BlockletStatus.installed,ht=rt===constant.BlockletStatus.installed,vt=rt===constant.BlockletStatus.running;return Ct(xt=>({...xt,isInstalled:ht,isRunning:vt,isExternal:st,isInstalling:ct})),{isInstalled:ht,isRunning:vt,isExternal:st,isInstalling:ct}},Qt=async()=>{zt(!0);try{if(!pt)throw new Error(_e("common.invalidParam"));const[{meta:mn,isFree:$t,registryUrl:rt},{launcherSession:st,error:ct}]=await Promise.all([et.getBlockletMetaFromUrl({input:{url:pt,checkPrice:!0}}),mt?et.getLauncherSession({input:{launcherSessionId:mt,launcherUrl:Et}}):Promise.resolve({})]);if(mt&&!st)throw new Error(`Launch session invalid: ${ct}`);if(!mn)throw new Error(_e("LaunchBlockletBlocklet.error.loadMetaFailed"));let ht={};At&&St.appDid&&(ht=await Ht(St.appDid)),Ct(vt=>({...vt,...ht,meta:mn,isFree:$t,registryUrl:rt,launcherSession:st}))}catch(mn){console.error(mn),It(mn.message)}finally{zt(!1)}};reactExports.useEffect(()=>{var mn,$t,rt;((mn=j==null?void 0:j.user)==null?void 0:mn.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((rt=($t=j==null?void 0:j.user)==null?void 0:$t.controller)==null?void 0:rt.nftId)!==dt&&j.logout(),Qt()},[]),reactExports.useEffect(()=>{Lt||!St.meta||(At?St.appDid&&Ht(St.appDid).catch(mn=>{toast.error(mn.message)}):(Ct(mn=>({...mn,isInstalled:!1,isRunning:!1,isExternal:!1})),It(null)))},[At]);const tn={meta:St.meta,isFree:St.isFree,appDid:St.appDid,sessionId:St.sessionId,isInstalling:St.isInstalling,isInstalled:St.isInstalled,isExternal:St.isExternal,isRunning:St.isRunning,serverUrl:Ft,storeUrl:St.registryUrl||wt,blockletMetaUrl:pt,fromLauncher:ft,loading:Lt,error:Pt,api:it,getBlocklet:Ht,setAppDid:Dt,launcherUrl:Et,launcherSession:St.launcherSession,launcherSessionId:mt};return jsxRuntimeExports.jsx(Provider$1,{value:tn,children:a})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:a}){const _e=useQuery().get("blocklet_meta_url"),et=_default$2(async()=>{const{data:tt}=await axios$1.get(_e);return tt});if(et.loading)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const nt={meta:et.value,error:et.error};return jsxRuntimeExports.jsx(Provider,{value:nt,children:a})}BlockletAppProvider.propTypes={children:PropTypes.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-Bmta40GX.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-B_Mci9Ef.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,2,30,31,32,33,34]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-PdOAjq0M.js"),__vite__mapDeps([35,36,37,38,39,40,41,6,42,43,44,45,46,13,10,12,26,19,18]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-D0sHKZuS.js"),__vite__mapDeps([47,6,48,49,50,18,17,51,10,52,53,32,13,12,42,54,43,44,55,3,56,57,19,23,24,58,59,60]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-C6PRgT9c.js"),__vite__mapDeps([61,62,11,59,63,64,51,65,13,10,12,7,8,9,14,15,16,17,18,19,66,55,3,56,2,67,6,68,69,32,21,20,70,34,71,72,73,4,74]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-6-px9qAy.js"),__vite__mapDeps([75,76,23,24,10,77]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cyskc2Kt.js"),__vite__mapDeps([78,62,11,79,80,81,18,6,10,12,82,14,83,84,32,85,86,87,17,13,7,8,9,15,16,19,88,34,89,90,51,25,26,50,21,91,57,3,2,92,93,94,56,95,33,23,24,96,97,98,49,52,99,1,55,72]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-CGNFghKt.js"),__vite__mapDeps([100,62,11,20,21,22,6,19,23,24,31,57,91,60]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-CEIupTjX.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-DEogVXBk.js"),__vite__mapDeps([101,1,82,14]),import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CiBtNKkh.js"),__vite__mapDeps([102,103,90,104,92,70,105]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-B0m14nWb.js"),__vite__mapDeps([106,70,86,54,105,30]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DqEMTm5N.js"),__vite__mapDeps([107,105]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-BkZfZe7e.js"),__vite__mapDeps([108,36,37,38,39,40,41,109,80,81,46,26,6,28,25,29,67]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DojNP9lM.js"),__vite__mapDeps([110,90]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-0Sgb5oPf.js"),__vite__mapDeps([111,103,90,104,92,70,105]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-DwxAoeFn.js").then(a=>a.a2),__vite__mapDeps([112,113]),import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DVSDRPzS.js"),__vite__mapDeps([114,62,11,115,116,117,71,10,118,9,13,12,52,7,8,14,15,16,17,18,19,31,119,120,4,6,99,24]),import.meta.url));function useSharedContext(){const a=useNodeContext(),{session:j}=useSessionContext$1(),{wallet:_e}=useBrowser(),et=j.user&&j.user.did;return reactExports.useEffect(()=>{const nt=getWsClient();return et?nt.connect():nt.isConnected()&&nt.disconnect(),()=>{nt.isConnected()&&nt.disconnect()}},[et]),reactExports.useEffect(()=>{if(_e)return()=>{};const nt=()=>{document.visibilityState==="visible"&&j.refresh()};return document.addEventListener("visibilitychange",nt),()=>{document.removeEventListener("visibilitychange",nt)}},[]),{node:a,session:j}}function ProtectedApp(){var it;const{t:a}=useLocaleContext(),{node:j,session:_e}=useSharedContext(),et=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${et.pathname}${et.search}`)},[et]),reactExports.useEffect(()=>{var ut;((ut=_e==null?void 0:_e.user)==null?void 0:ut.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&_e.logout()},[(it=_e==null?void 0:_e.user)==null?void 0:it.role]);const nt=jsxRuntimeExports.jsx(CircularProgress,{});if(j.loading||_e.loading)return jsxRuntimeExports.jsx(Center,{children:nt});if(!j.info.initialized)return getAuthMethod.getServerAuthMethod(j.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(j.info.upgradeSessionId)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!_e.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:nt});const tt=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(NotificationProvider,{children:jsxRuntimeExports.jsxs(BlockletsProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:tt,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${a("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:a("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/logs",element:jsxRuntimeExports.jsx(Navigate,{to:"/logs/abtnode",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:a}){const{node:j,session:_e}=useSharedContext();return j.loading||!_e.initialized&&_e.loading?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):j.info.upgradeSessionId?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):a}function App(){const{changeLocale:a}=useLocaleContext(),j=useQuery();reactExports.useEffect(()=>{const et=j.get("locale");et&&["zh","en"].includes(et)&&a(et)},[]);const _e=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:_e,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const a=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CssBaseline,{}),jsxRuntimeExports.jsx(BrowserRouter,{history,basename:a,children:jsxRuntimeExports.jsx(Root$5,{children:jsxRuntimeExports.jsx(App,{})})})]})}const root=createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(a){console.error("Error during service worker registration:",a)}});export{default_1$n as $,useNavigate as A,ButtonComponent as B,CircularProgress as C,Dialog as D,toast as E,useSearchParams as F,Grid as G,constant$3 as H,ImageIcon as I,useMediaQuery as J,Alert as K,LinearProgress as L,formatError$1 as M,util as N,Link$2 as O,PropTypes as P,Box as Q,isEmpty$2 as R,RelativeTime$1 as S,TagComponent as T,MenuItem$1 as U,Permission as V,WrappedDidAddress as W,Center as X,toString_1 as Y,propTypesExports as Z,_createCompounder as _,useSubscription as a,Menu$1 as a$,lodashExports as a0,api$1 as a1,IconButton as a2,Confirm as a3,makeStyles as a4,ListItemSecondaryAction as a5,List as a6,ListItem as a7,ListItemText as a8,getServerUrl as a9,ErrorFallback as aA,formatRegistryLogoPath as aB,engine as aC,ListItemIcon as aD,ensureDomainAliases as aE,normalizePathPrefix$1 as aF,sortBy$1 as aG,getIp as aH,stringSortHandlerAsc as aI,getAccessUrl as aJ,requireCreateSvgIcon as aK,interopRequireDefaultExports as aL,history as aM,semver$1 as aN,useReactive as aO,useAsyncEffect as aP,sleep as aQ,checkInputByType as aR,Stack$5 as aS,isChrome as aT,_default$2 as aU,axios$1 as aV,shouldCheckDomainStatus as aW,formatMountPoint as aX,_default$5 as aY,FormControlLabel as aZ,Checkbox as a_,useBlockletAppContext as aa,getAuthMethod as ab,ConfirmDialog as ac,setSessionToken as ad,getRestoredAccessUrl as ae,Debug as af,isServerlessBlockletInstalled as ag,getWsClient as ah,useTheme$2 as ai,useQuery as aj,getPathPrefix as ak,HeaderAddon as al,SessionContext as am,Global as an,Routes as ao,Route as ap,Navigate as aq,css$1 as ar,AvatarWithErrorBoundary as as,formatToDatetime as at,getLaunchAgreementUrl as au,axios$4 as av,useSessionContext$1 as aw,Tooltip as ax,getBlockletMetaUrl as ay,ErrorBoundary as az,constant as b,useForkRef as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,CardContent as b3,formatToDate as b4,sortDomains as b5,Collapse as b6,isUrl$1 as b7,__awaiter as b8,__generator as b9,_baseRest as bA,_arrayFilter as bB,last_1 as bC,isArrayLikeObject_1 as bD,default_1$c as bE,isDownloading as bF,withPermission as bG,getBlockletUrl as bH,getBlockletUrlParams as bI,createSvgIcon$1 as bJ,styled$1 as bK,ButtonBase as bL,_extends$2 as bM,emphasize_1 as bN,_objectWithoutPropertiesLoose$1 as bO,generateUtilityClasses as bP,generateUtilityClass as bQ,useDefaultProps as bR,useSlotProps as bS,clsx$1 as bT,composeClasses as bU,rootShouldForwardProp as bV,SwitchBase as bW,capitalize$3 as bX,alpha_1 as bY,createChainedFunction$1 as bZ,useControlled as b_,__spread as ba,React$2 as bb,dayjs$1 as bc,Divider as bd,isCertificateMatch as be,NodeContext as bf,useParams as bg,__assign as bh,__spreadArrays as bi,DidAddressWrapper as bj,createPassportSvg as bk,useNodeContext$1 as bl,getWalletType as bm,__vitePreload as bn,isInstalling as bo,Badge as bp,NavLink$1 as bq,createAppPassportSvg as br,_SetCache as bs,_arrayMap as bt,_baseUnary as bu,_arrayIncludes as bv,_arrayIncludesWith as bw,_cacheHas as bx,_baseFlatten as by,_baseUniq as bz,createClient as c,ownerDocument as c$,useId as c0,merge$1 as c1,toSlotDomain as c2,omit$1 as c3,fixBlocklet as c4,memoize$5 as c5,defaultCheckAccessible as c6,getBlockletUrls as c7,urlEvaluation as c8,ButtonGroupContext as c9,API_DID_PREFIX as cA,AUTH_SERVICE_PREFIX as cB,formatDateTime as cC,getExplorerLink as cD,patchJsxToLocale as cE,flat$1 as cF,en$2 as cG,LocaleProvider as cH,getAugmentedNamespace as cI,Theme as cJ,ReactDOM as cK,global$2 as cL,punycodeExports as cM,commonjsGlobal as cN,copy$1 as cO,dist$4 as cP,Util as cQ,require$$3 as cR,getSessionToken as cS,SvgLogo as cT,hoistStatics as cU,getLogoHash as cV,useEnhancedEffect$1 as cW,debounce$5 as cX,ownerWindow as cY,useRtl as cZ,useEventCallback$1 as c_,ButtonGroupButtonContext as ca,BlockletAdminRoles as cb,ListItemAvatar as cc,Avatar$1 as cd,NotificationTag as ce,useNotificationContext as cf,useRequest as cg,useMemoizedFn as ch,isNumber$2 as ci,__read as cj,useLatest as ck,defaultDayjs as cl,useBrowser as cm,Container$3 as cn,isFunction$8 as co,usePassportId as cp,FullPage as cq,useLaunchBlockletContext as cr,useSecurity as cs,authorize as ct,isNewStoreUrl as cu,getAccessibleUrl as cv,getBlockletLogoUrl as cw,Img as cx,useLocation as cy,useMount as cz,useBlockletsContext as d,private_safeAlpha_1 as d$,colors$1 as d0,useFormControl as d1,formControlState as d2,util$6 as d3,upperFirst$2 as d4,camelCase$2 as d5,ClickToCopy as d6,getGridUtilityClass as d7,gridClasses as d8,Grow as d9,lib$1 as dA,urlExports as dB,cloneDeep_1 as dC,get_1 as dD,DID as dE,isHostComponent as dF,FormControlContext as dG,GlobalStyles as dH,formatMuiErrorMessage$1 as dI,deepmerge$1 as dJ,isMuiElement as dK,slotShouldForwardProp as dL,Button$1 as dM,Paper as dN,ClickAwayListener as dO,MenuList as dP,Popper as dQ,useTheme$3 as dR,GlobalStyles$2 as dS,ThemeProvider$2 as dT,toPropertyKey$3 as dU,createSpacing as dV,createBreakpoints as dW,createTheme$1 as dX,private_safeDarken_1 as dY,private_safeLighten_1 as dZ,private_safeEmphasize_1 as d_,PopoverPaper as da,PopoverRoot as db,getOffsetLeft as dc,getOffsetTop as dd,getPopoverUtilityClass as de,popoverClasses as df,emotionSerialize_esm as dg,emotionUtils_browser_esm as dh,emotionCache_browser_esm as di,emotionReact_browser_esm as dj,reactDomExports as dk,Close as dl,_baseIteratee as dm,isArrayLike_1 as dn,keys_1 as dp,_baseFindIndex as dq,toInteger_1 as dr,noop$7 as ds,isObject$p as dt,cloneDeep$1 as du,padStart_1 as dv,Buffer$3 as dw,lib$2 as dx,upperFirst_1 as dy,pick_1 as dz,_default$1 as e,Hidden as e$,private_safeColorChannel_1 as e0,defaultSxConfig as e1,styleFunctionSx$1 as e2,getOverlayAlpha as e3,hslToRgb_1 as e4,THEME_ID as e5,createTypography as e6,StyledEngineProvider as e7,ThemeProvider$1 as e8,alpha$1 as e9,getChipUtilityClass as eA,buttonClasses as eB,getButtonUtilityClass as eC,checkboxClasses as eD,getCheckboxUtilityClass as eE,formControlLabelClasses as eF,getFormControlLabelUtilityClasses as eG,getListItemTextUtilityClass as eH,listItemTextClasses as eI,getMenuItemUtilityClass as eJ,menuItemClasses as eK,getTooltipUtilityClass as eL,tooltipClasses as eM,lighten_1 as eN,darken_1 as eO,Toolbar as eP,getToolbarUtilityClass as eQ,toolbarClasses$1 as eR,_baseIsEqual as eS,SvgIcon as eT,process$1$1 as eU,urlPathFriendly$1 as eV,useThemeProps as eW,defaultTheme$2 as eX,commonjsRequire as eY,create$4 as eZ,ThemeProvider$4 as e_,createMuiTheme as ea,darken$1 as eb,decomposeColor$1 as ec,duration as ed,easing as ee,emphasize$1 as ef,getContrastRatio$1 as eg,getLuminance$1 as eh,hexToRgb$1 as ei,hslToRgb$1 as ej,keyframes as ek,lighten$1 as el,createMixins as em,recomposeColor$1 as en,responsiveFontSizes as eo,rgbToHex$1 as ep,getUnit as eq,toUnitless as er,getPaperUtilityClass as es,paperClasses$1 as et,getIconButtonUtilityClass as eu,iconButtonClasses as ev,getTypographyUtilityClass as ew,typographyClasses$1 as ex,chipClasses as ey,Chip as ez,LocaleContext as f,Fade as f$,Check$1 as f0,withQuery as f1,createTheme$3 as f2,styled$2 as f3,useTheme$4 as f4,extendSxProp as f5,getTargetElement as f6,useEventListener as f7,useUpdateEffect as f8,__spreadArray as f9,util$5 as fA,shams$1 as fB,hasPropertyDescriptors_1 as fC,defineDataProperty as fD,safeBufferExports as fE,requireBrowser$9 as fF,requireElliptic as fG,requireCryptoBrowserify as fH,ripemd160 as fI,getInviteLink$1 as fJ,SessionContext$1 as fK,getIssuePassportLink as fL,Icon as fM,getTextColor_1 as fN,isProtectedRole as fO,lib$3 as fP,createPassportSvg$2 as fQ,semver as fR,browserExports as fS,require$$0$1 as fT,isAbsoluteUrl as fU,dist$1 as fV,browser$4 as fW,requireObjectWithoutPropertiesLoose as fX,loadIcon as fY,createTheme as fZ,ThemeProvider as f_,_baseOrderBy as fa,isArray_1 as fb,default_1$p as fc,useCreation as fd,parseQuery as fe,useDebounceFn as ff,createRoot as fg,useSize as fh,colors$2 as fi,callBound$2 as fj,callBindExports as fk,normalizePathPrefix_1 as fl,clamp$1 as fm,useIsFocusVisible as fn,extractEventHandlers as fo,resolveProps as fp,debounce_1 as fq,noop_1 as fr,_default$3 as fs,formatTime as ft,RelativeTime as fu,useUpdate as fv,tmp as fw,getVisitorId$2 as fx,useConfirm as fy,translate as fz,getDefaultExportFromCjs$1 as g,jssGlobal as g$,ListItemButton as g0,AUTH_SERVICE_PREFIX$1 as g1,getTranslation as g2,SessionPermission as g3,NAVIGATION_URL as g4,LocaleSelector as g5,SessionUser as g6,default_1$l as g7,ResponsiveHeader as g8,withErrorBoundary as g9,_inheritsLoose$3 as gA,forceReflow as gB,Transition$1 as gC,_baseIndexOf as gD,_baseToString as gE,_baseTrim as gF,_castSlice as gG,_charsEndIndex as gH,_stringToArray as gI,validateDomain as gJ,axios_1 as gK,CopyButton as gL,isServerless as gM,getSystemDomains as gN,data$m as gO,isRunning as gP,getTransferAppLink as gQ,pick$1 as gR,data$g as gS,data$f as gT,data$h as gU,_copyArray as gV,usePreviousProps as gW,setRef as gX,ClearIcon as gY,hoistNonReactStatics_cjs as gZ,functionPlugin as g_,NavMenu as ga,DashboardWrapper as gb,BlockletSDK as gc,useUnmount as gd,identity_1 as ge,_baseForOwn as gf,_baseMap as gg,isString_1 as gh,isPlainObject_1 as gi,default_1$h as gj,browser as gk,uniq_1 as gl,pLimit_1 as gm,require$$6 as gn,_isIndex as go,_typeof$2 as gp,Dialog$1 as gq,dialogClasses as gr,DialogContent as gs,FocusTrap as gt,DialogActions as gu,TransitionGroup as gv,localizedFormatPlugin as gw,isExtracting as gx,APP_PREFIX as gy,objectAssign$1 as gz,useTheme as h,jssNested as h0,camelCase as h1,defaultUnit as h2,jssVendorPrefixer as h3,jssPropsSort as h4,createJss as h5,getDynamicStyles as h6,isNil_1 as h7,omit_1 as h8,withoutTrailingSlash as h9,require$$1$4 as hA,Check as hB,reactIsExports as hC,isValidClusterSize as hD,extractStatusUrlFromNextWorkflow as hE,pWaitFor$1 as hF,hasRequiredSteps as hG,getStoreList as hH,flatten$4 as hI,trimEnd$1 as hJ,useCheckUpdateByUrl as hK,DialogTitle as hL,_baseEach as hM,_baseAssignValue as hN,throttle$4 as hO,pTimeout$2 as hP,TimeoutError_1 as hQ,debounce$3 as hR,uniq$1 as hS,Backdrop as hT,isString$2 as ha,isAbsoluteUrl$1 as hb,nanoid as hc,omitBy$1 as hd,isNil$1 as he,isEqual$1 as hf,useEffectWithTarget$1 as hg,__values as hh,isString$3 as hi,isFunction$5 as hj,circularProgressClasses$1 as hk,getCircularProgressUtilityClass as hl,collapseClasses$1 as hm,getCollapseUtilityClass as hn,boxClasses as ho,Icon$2 as hp,getIconUtilityClass as hq,iconClasses$1 as hr,getLinearProgressUtilityClass as hs,linearProgressClasses$1 as ht,getMenuUtilityClass as hu,menuClasses$1 as hv,_unsupportedIterableToArray as hw,_setPrototypeOf as hx,_assertThisInitialized$1 as hy,_createClass as hz,Link$1 as i,jsxRuntimeExports as j,get$6 as k,filesize as l,Typography as m,newStyled as n,formatLocale as o,prettyMs as p,joinURL as q,reactExports as r,styled as s,useLocaleContext as t,useNodeContext as u,useSessionContext as v,_default as w,DialogContentText as x,DidConnect as y,getWebWalletUrl as z};
|
|
2490
|
+
`;browser.homedir=function(){return"/"};(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(pt){return pt&&pt.__esModule?pt:{default:pt}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasMountPoint=a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.getBlockletEngine=void 0;const _e=j(browser),et=constant,nt=pt=>{if(pt===void 0)throw new Error("blocklet meta param is required");const{engine:dt}=pt;if(!dt)return{interpreter:"node",source:""};if(!Array.isArray(dt))return dt;const mt=_e.default.platform(),Et=dt.find(wt=>wt.platform===mt);if(!Et)throw new Error(`can not find a proper engine interpreter on ${mt}`);return Et};a.getBlockletEngine=nt;const tt=pt=>(pt==null?void 0:pt.group)===et.BlockletGroup.gateway;a.isGatewayBlocklet=tt;const it=pt=>(pt==null?void 0:pt.group)===et.BlockletGroup.pack;a.isPackBlocklet=it;const ut=pt=>!!(pt!=null&&pt.main)||(0,a.getBlockletEngine)(pt||{}).interpreter==="blocklet";a.hasStartEngine=ut;const ft=pt=>((0,a.hasStartEngine)(pt)||((pt==null?void 0:pt.interfaces)||[]).find(dt=>dt.type===et.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,a.isGatewayBlocklet)(pt)===!1;a.hasMountPoint=ft})(engine);(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(pn){return pn&&pn.__esModule?pn:{default:pn}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.isAccessible=a.isRunning=a.isBeforeInstalled=a.isInProgress=a.getBlockletServices=a.getBlockletAppIdList=a.getRolesFromAuthConfig=a.isPreferenceKey=a.isExternalBlocklet=a.getBlockletChainInfo=a.getChainInfo=a.getConnectAppUrl=a.getParentComponentName=a.filterComponentsV2=a.findComponentByIdV2=a.findComponentV2=a.findComponentById=a.findComponent=a.getComponentBundleId=a.getComponentName=a.getComponentId=a.replaceSlotToIp=a.getComponentWhoCanAccess=a.getWhoCanAccess=a.findServiceFromMeta=a.findWebInterfacePort=a.findWebInterface=a.fixBlockletStatus=a.getAppDescription=a.getDisplayName=a.getAppName=a.hasRunnableComponent=a.wipeSensitiveData=a.isEnvShareable=a.isEnvShareableToClient=a.getComponentMissingConfigs=a.getAppMissingConfigs=a.getSharedConfigObj=a.isDeletableBlocklet=a.forEachComponentV2Sync=a.forEachComponentV2=a.forEachChildSync=a.forEachChild=a.forEachBlockletSync=a.forEachBlocklet=a.isFreeComponent=a.isFreeBlocklet=void 0,a.hasResourceType=void 0,a.getAppUrl=Gt;const _e=j(get_1),et=j(uniq_1),nt=require$$6,tt=j(pLimit_1),it=j(constant$3),ut=constant,ft=engine;Object.defineProperty(a,"hasStartEngine",{enumerable:!0,get:function(){return ft.hasStartEngine}}),Object.defineProperty(a,"isGatewayBlocklet",{enumerable:!0,get:function(){return ft.isGatewayBlocklet}}),Object.defineProperty(a,"isPackBlocklet",{enumerable:!0,get:function(){return ft.isPackBlocklet}});const{NODE_SERVICES:pt,SLOT_FOR_IP_DNS_SITE:dt,WHO_CAN_ACCESS:mt,WHO_CAN_ACCESS_PREFIX_ROLES:Et}=it.default,wt=(pn,En=[])=>`${En.map(An=>An&&An.meta?An.meta.did:"").join("/")}${En.length?"/":""}${pn&&pn.meta?pn.meta.did:""}`;a.getComponentId=wt;const St=(pn,En=[])=>`${En.map(An=>An&&An.meta?An.meta.name:"").join("/")}${En.length?"/":""}${pn&&pn.meta?pn.meta.name:""}`;a.getComponentName=St;const Ct=pn=>`${pn.meta.bundleName}@${pn.meta.version}`;a.getComponentBundleId=Ct;const Dt=pn=>{if(!pn)return"";const En=pn.split("/");return En.pop(),!En.length||(En[En.length-1].startsWith("@")&&En.pop(),!En.length)?"":En.join("/")};a.getParentComponentName=Dt;const At=(pn,En,{parallel:An=!1,concurrencyLimit:zn=5,sync:rn,params:Ut,_parent:Zt,_root:hn,_level:wn=0,_tasks:qn,_ancestors:kn=[],_limit:Mn}={})=>{const Kn=hn||Zt||pn,On=wt(pn,kn),jn=kn.concat(pn);if(rn){const Gn=En(pn,{parent:Zt,root:Kn,level:wn,params:Ut,ancestors:kn,id:On});if(pn.children)for(const Ir of pn.children)At(Ir,En,{sync:rn,params:Gn,_parent:pn,_root:Kn,_level:wn+1,_ancestors:jn});return null}if(!An)return new Promise(async(Gn,Ir)=>{try{const Wn=await En(pn,{parent:Zt,root:Kn,level:wn,ancestors:kn,params:Ut,id:On});if(pn.children)for(const Qn of pn.children)await At(Qn,En,{params:Wn,_parent:pn,_root:Kn,_level:wn+1,_ancestors:jn});Gn(null)}catch(Wn){Ir(Wn)}});const cr=Mn||(0,tt.default)(zn),Un=qn||[];if(Un.push(cr(()=>En(pn,{parent:Zt,root:Kn,level:wn,ancestors:kn,id:On}))),pn.children)for(const Gn of pn.children)At(Gn,En,{parallel:An,_parent:pn,_root:Kn,_level:wn+1,_tasks:Un,_ancestors:jn,_limit:cr});return qn?null:Promise.all(Un)};a.forEachBlocklet=At;const Pt=(pn,En)=>At(pn,En,{sync:!0});a.forEachBlockletSync=Pt;const It=(pn,En,{parallel:An=!1,concurrencyLimit:zn=5,sync:rn}={})=>{if(rn){if(pn.children)for(const hn of pn.children)En(hn);return null}if(!An)return new Promise(async(hn,wn)=>{try{if(pn.children)for(const qn of pn.children)await En(qn);hn(null)}catch(qn){wn(qn)}});const Ut=(0,tt.default)(zn),Zt=[];if(pn.children)for(const hn of pn.children)Zt.push(Ut(()=>En(hn)));return Promise.all(Zt)};a.forEachComponentV2=It;const Lt=(pn,En)=>It(pn,En,{sync:!0});a.forEachComponentV2Sync=Lt;const zt=(pn,En,An)=>At(pn,(zn,rn)=>rn.level===0?{}:En(zn,rn),An);a.forEachChild=zt;const Ft=(pn,En)=>zt(pn,En,{sync:!0});a.forEachChildSync=Ft;const Ht=(pn,En,{_ancestors:An=[],returnAncestors:zn=!1}={})=>{if(!En)return null;if(En(pn,{ancestors:An}))return zn?{component:pn,ancestors:An}:pn;for(const rn of pn.children||[]){const Ut=An.concat(pn),Zt=Ht(rn,En,{_ancestors:Ut,returnAncestors:zn});if(Zt)return Zt}return null};a.findComponent=Ht;const Qt=(pn,En,{returnAncestors:An=!1}={})=>(Array.isArray(En)&&(En=En.join("/")),Ht(pn,(zn,{ancestors:rn})=>{const Ut=wt(zn,rn);return En===Ut},{returnAncestors:An}));a.findComponentById=Qt;const tn=(pn,En)=>{if(!En)return null;for(const An of pn.children||[])if(En(An,pn))return An;return null};a.findComponentV2=tn;const mn=(pn,En)=>En?(Array.isArray(En)&&(En=En.join("/")),tn(pn,(An,zn)=>{if(En.includes("/")){const rn=wt(An,[zn]);return En===rn}return En===An.meta.did})):null;a.findComponentByIdV2=mn;const $t=(pn,En)=>{if(!En)return[];const An=[];for(const zn of pn.children||[])En(zn,pn)&&An.push(zn);return An};a.filterComponentsV2=$t;const rt=pn=>!!pn&&!!(pn.key||pn.name)&&!pn.secure&&pn.shared!==!1&&!ut.BLOCKLET_CONFIGURABLE_KEY[pn.key||pn.name];a.isEnvShareableToClient=rt;const st=pn=>!!pn&&!!(pn.key||pn.name)&&!pn.secure&&!!pn.shared&&!ut.BLOCKLET_CONFIGURABLE_KEY[pn.key||pn.name];a.isEnvShareable=st;const ct=(pn,En)=>{const An={};return!pn||!En||(Array.isArray(pn.configs)&&pn.configs.forEach(({key:zn,value:rn,secure:Ut})=>{if(!st({key:zn,secure:Ut,shared:!0}))return;const Zt=(pn.configObj||{})[zn]||rn,hn=(En.configs||[]).find(wn=>wn.key===zn);(!hn||st(hn)||!hn.value&&!(En.configObj||{})[hn.key])&&(An[zn]=Zt)}),(pn.configs||[]).forEach(({key:zn,value:rn})=>{[ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,ut.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(zn)&&(An[ut.CHAIN_PROP_MAP[zn]]=rn)})),An};a.getSharedConfigObj=ct;const ht=pn=>pn.key.startsWith(ut.BLOCKLET_PREFERENCE_PREFIX)===!0;a.isPreferenceKey=ht;const vt=(pn,En)=>!!(pn.required&&(!pn.value&&!En[pn.key]||Object.values(ut.CHAIN_PROP_MAP).includes(pn.key)&&Object.keys(En).includes(pn.key)&&!En[pn.key])),xt=(pn={})=>{const En=[];return Lt(pn,An=>{var Ut;if(((Ut=An.meta)==null?void 0:Ut.group)===ut.BlockletGroup.gateway)return;const zn=An.configs||[],rn=ct(pn,An);zn.forEach(Zt=>{vt(Zt,rn)&&En.push({did:An.meta.did,key:Zt.key,description:Zt.description})})}),En.filter(An=>!ht(An))};a.getAppMissingConfigs=xt;const Tt=(pn={},En={})=>{const An=[],zn=pn.configs||[],rn=ct(En,pn);return zn.forEach(Ut=>{vt(Ut,rn)&&An.push({did:pn.meta.did,key:Ut.key,description:Ut.description})}),An};a.getComponentMissingConfigs=Tt;const yt=pn=>pn.payment?(pn.payment.price||[]).map(An=>An.value||0).every(An=>An===0):!0;a.isFreeBlocklet=yt;const ot=pn=>!pn.payment||!pn.payment.componentPrice?!0:!pn.payment.componentPrice.length;a.isFreeComponent=ot;const bt=pn=>pn&&(At(pn,En=>{En.configs&&(En.configs=En.configs.filter(An=>!ht(An)),En.configs.forEach(An=>{An.secure&&(An.value=An.value?"__encrypted__":"")})),(En.environments||[]).forEach(An=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(An.key)&&(An.value="__encrypted__")}),(En.migratedFrom||[]).forEach(An=>{An.appSk="__encrypted__"}),delete pn.configObj,delete pn.environmentObj},{sync:!0}),pn);a.wipeSensitiveData=bt;const Mt=pn=>{if(!pn)return!1;const En=pn.environments.find(An=>An.key==="BLOCKLET_DELETABLE");return En?En.value==="yes":!0};a.isDeletableBlocklet=Mt;const Ot=pn=>{let En=!1;return Pt(pn,An=>{An.meta.group!==ut.BlockletGroup.gateway&&(En=!0)}),En};a.hasRunnableComponent=Ot;const Vt=(pn,En=!1)=>{if(!pn)return"";const{meta:An}=pn;let zn;if(!En&&pn.environments){const rn=pn.environments.find(Ut=>Ut.key==="BLOCKLET_APP_NAME");rn&&rn.value&&(zn=rn.value)}return zn||An.title||An.name};a.getAppName=Vt,a.getDisplayName=Vt;const Nt=(pn,En=!1)=>{if(!pn)return"";const{meta:An}=pn;let zn;if(!En&&pn.environments){const rn=pn.environments.find(Ut=>Ut.key==="BLOCKLET_APP_DESCRIPTION");rn&&rn.value&&(zn=rn.value)}return zn||An.description||An.name};a.getAppDescription=Nt;function Gt(pn){var zn,rn,Ut;const En=(Ut=(rn=(zn=pn==null?void 0:pn.site)==null?void 0:zn.domainAliases)==null?void 0:rn.sort((Zt,hn)=>{var wn,qn,kn,Mn;return(wn=Zt.accessibility)!=null&&wn.accessible&&((qn=hn.accessibility)!=null&&qn.accessible)?+Zt.isProtected-+hn.isProtected:+((kn=hn.accessibility)==null?void 0:kn.accessible)-+((Mn=Zt.accessibility)==null?void 0:Mn.accessible)}))==null?void 0:Ut.map(Zt=>{var qn;const hn=(qn=Zt==null?void 0:Zt.domainStatus)!=null&&qn.isHttps?"https://":"http://",wn=Zt==null?void 0:Zt.value;return`${hn}${wn}`}).filter(Boolean);return En==null?void 0:En[0]}const qt=pn=>{pn&&(Pt(pn,En=>{En.status=(0,ut.fromBlockletStatus)(En.status),En.source!==void 0&&(En.source=(0,ut.fromBlockletSource)(En.source))}),pn.settings&&(pn.settings.children||[]).forEach(En=>{Pt(En,An=>{An.status=(0,ut.fromBlockletStatus)(An.status),An.source!==void 0&&(An.source=(0,ut.fromBlockletSource)(An.source))})}))};a.fixBlockletStatus=qt;const nn=pn=>{if(!pn)return null;const En=pn.meta||pn||{},{interfaces:An=[]}=En;return Array.isArray(An)?An.find(zn=>zn.type===ut.BLOCKLET_INTERFACE_TYPE_WEB):null};a.findWebInterface=nn;const fn=pn=>{if(!pn)return null;const En=nn(pn),{ports:An}=pn;return!En||!An?null:An[En.port]};a.findWebInterfacePort=fn;const yn=(pn,En)=>{const An=[En];En===pt.AUTH&&An.push(pt.AUTH_SERVICE);const zn=nn(pn);return zn?(zn.services||[]).find(rn=>An.includes(rn.name)):null};a.findServiceFromMeta=yn;const Jt=pn=>{if(!pn)return mt.ALL;if((0,_e.default)(pn,"settings.whoCanAccess"))return pn.settings.whoCanAccess;const En=yn(pn.meta,pt.AUTH);return(0,_e.default)(En,"config.whoCanAccess")?En.config.whoCanAccess:mt.ALL};a.getWhoCanAccess=Jt;const Bt=(pn,En)=>{const An=(pn.configs||[]).find(rn=>rn.key===ut.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(An)return An.value;if(En&&(0,_e.default)(En,"settings.whoCanAccess")&&(0,_e.default)(En,"settings.whoCanAccess")!==mt.ALL)return(0,_e.default)(En,"settings.whoCanAccess");const zn=yn(pn.meta,pt.AUTH);return(0,_e.default)(zn,"config.whoCanAccess")?zn.config.whoCanAccess:mt.ALL};a.getComponentWhoCanAccess=Bt;const Kt=({request:pn,baseUrl:En})=>{const An=pn.headers["x-blocklet-did"]||"",zn=pn.headers["x-blocklet-real-did"]||"",rn=pn.headers["x-path-prefix"]||"/",Ut=pn.headers["x-group-path-prefix"]||"/";let Zt=En;return An!==zn&&rn!==Ut&&(Zt=(0,nt.joinURL)(Zt,"/").replace(rn,Ut)),Zt};a.getConnectAppUrl=Kt;const un=(pn,En)=>{const An=(En||"").includes(":")?":":/\./;return(pn||"").replace(dt,(En||"").replace(new RegExp(An,"g"),"-"))};a.replaceSlotToIp=un;const sn=pn=>{const En=Object.entries(ut.CHAIN_INFO_CONFIG).reduce((An,zn)=>{const[rn,[Ut,Zt]]=zn;return An[Ut]=(0,_e.default)(pn,rn)||Zt,An},{});return En.type==="ethereum"&&En.id==="none"&&(En.id="1"),En};a.getChainInfo=sn;const vn=pn=>{const En=sn({});if(!pn)return En;const An=sn(pn.configObj);if(An.host!=="none")return An;let zn;return Ft(pn,rn=>{if(zn&&zn.host!=="none")return;const Ut=sn(rn.configObj);Ut.host!=="none"&&(zn=Ut)}),zn||En};a.getBlockletChainInfo=vn;const $n=pn=>!!(pn!=null&&pn.controller);a.isExternalBlocklet=$n;const cn=pn=>pn.whoCanAccess.startsWith(Et)?pn.whoCanAccess.substring(Et.length).split(","):[];a.getRolesFromAuthConfig=cn;const gn=pn=>{const En=Array.isArray(pn.migratedFrom)?pn.migratedFrom.map(An=>An.appDid):[];return(0,et.default)([pn.appDid,pn.appPid,...En].filter(Boolean))};a.getBlockletAppIdList=gn;const Fn=pn=>{const En=[];return pn&&Pt(pn,An=>{var rn;(((rn=An.meta)==null?void 0:rn.interfaces)||[]).filter(Ut=>Ut.type===ut.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(Ut=>{const Zt=Ut.port||{};En.push({name:Ut.name,protocol:Ut.protocol,port:Number(Zt.external),upstreamPort:Number((An.ports||{})[Zt.internal])})})}),En};a.getBlockletServices=Fn;const _n=pn=>[ut.BlockletStatus.downloading,ut.BlockletStatus.waiting,ut.BlockletStatus.starting,ut.BlockletStatus.installing,ut.BlockletStatus.stopping,ut.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(pn);a.isInProgress=_n;const In=pn=>[ut.BlockletStatus.added,ut.BlockletStatus.waiting,ut.BlockletStatus.downloading,ut.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(pn);a.isBeforeInstalled=In;const lr=pn=>[ut.BlockletStatus.running,"running"].includes(pn);a.isRunning=lr;const xn=pn=>[ut.BlockletStatus.running,ut.BlockletStatus.waiting,ut.BlockletStatus.downloading,"running","waiting","downloading"].includes(pn);a.isAccessible=xn;const Sn=(pn,{type:En,did:An}={type:"",did:""})=>{var zn,rn,Ut;return pn?!(0,ft.hasStartEngine)(pn.meta)&&((Ut=(rn=(zn=pn.meta)==null?void 0:zn.resource)==null?void 0:rn.bundles)==null?void 0:Ut.length)>0&&(pn.meta.resource.bundles||[]).some(Zt=>Zt.type===En&&Zt.did===An):!1};a.hasResourceType=Sn,a.default={isFreeBlocklet:yt,isFreeComponent:ot,forEachBlocklet:At,forEachBlockletSync:Pt,forEachChild:zt,forEachChildSync:Ft,forEachComponentV2:It,forEachComponentV2Sync:Lt,isDeletableBlocklet:Mt,getSharedConfigObj:ct,getAppMissingConfigs:xt,getComponentMissingConfigs:Tt,isEnvShareableToClient:rt,isEnvShareable:st,wipeSensitiveData:bt,hasRunnableComponent:Ot,getAppName:Vt,getAppDescription:Nt,getAppUrl:Gt,getDisplayName:Vt,fixBlockletStatus:qt,findWebInterface:nn,findWebInterfacePort:fn,findServiceFromMeta:yn,getWhoCanAccess:Jt,getComponentWhoCanAccess:Bt,replaceSlotToIp:un,getComponentId:wt,getComponentName:St,getComponentBundleId:Ct,findComponent:Ht,findComponentById:Qt,findComponentV2:tn,findComponentByIdV2:mn,filterComponentsV2:$t,getParentComponentName:Dt,getConnectAppUrl:Kt,getChainInfo:sn,getBlockletChainInfo:vn,isExternalBlocklet:$n,isPreferenceKey:ht,getRolesFromAuthConfig:cn,getBlockletServices:Fn,isInProgress:_n,isBeforeInstalled:In,isRunning:lr,isAccessible:xn,isGatewayBlocklet:ft.isGatewayBlocklet,isPackBlocklet:ft.isPackBlocklet,hasStartEngine:ft.hasStartEngine,hasResourceType:Sn}})(util);const getServerUrl=(a,j=!1)=>{const _e=a.routing.adminPath;return j?encodeURIComponent(joinURL(window.location.origin,_e)):joinURL(window.location.origin,_e)},getLaunchAgreementUrl=(a,j,_e)=>{const et=getServerUrl(j),nt=joinURL(_e,`/api/blocklets/${a.did}/blocklet.json`),tt=new URL(joinURL(et,"/launch-blocklet/agreement"));return tt.searchParams.set("blocklet_meta_url",nt),tt.searchParams.set("from",window.location.href),tt.href},ensureDomainAliases=async(a,{getIP:j}={})=>{if(!a||!a.length)return[];if(!j||!a.some(et=>et.value.includes(constant$3.SLOT_FOR_IP_DNS_SITE)))return a;const _e=await j();return _e?a.map(et=>{try{return et.value=util.replaceSlotToIp(et.value,_e),et}catch{return et}}).filter(Boolean):a},getAppCapabilities=a=>{const j={didSpace:null};return util.forEachBlockletSync(a,_e=>{var et,nt;j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(nt=(et=_e==null?void 0:_e.meta)==null?void 0:et.capabilities)!=null&&nt.didSpace&&(j.didSpace=_e.meta.capabilities.didSpace)}),j},fixBlocklet=async(a,{fixRuntime:j=!0,oldBlocklet:_e,getIP:et}={})=>{if(a.site||(a.site={domainAliases:[],rules:[]}),a.site.rules.forEach(nt=>{nt.from.pathPrefix=normalizePathPrefix$1(nt.from.pathPrefix||"/")}),a.site.rules=sortBy$1(a.site.rules,nt=>nt.from.pathPrefix),j===!0)a.site.domainAliases=await ensureDomainAliases(a.site.domainAliases,{getIP:et}),a.appRuntimeInfo&&(a.appRuntimeInfo.startAt=new Date-a.appRuntimeInfo.uptime),util.forEachBlockletSync(a,nt=>{nt.runtimeInfo&&(nt.runtimeInfo.startAt=new Date-nt.runtimeInfo.uptime)});else if(j==="merge-old"&&_e){a.site.domainAliases=_e.site.domainAliases,a.appRuntimeInfo=_e.appRuntimeInfo;const nt={};util.forEachBlockletSync(_e,(tt,{id:it})=>{nt[it]=tt}),util.forEachBlockletSync(a,(tt,{id:it})=>{const ut=nt[it];ut&&(tt.runtimeInfo=ut.runtimeInfo,tt.diskInfo=ut.diskInfo,tt.engine=ut.engine)})}else a.site.domainAliases=[];a.capabilities=getAppCapabilities(a)},DEFAULT_WALLET_TYPE="arcblock",getWalletType=(a,j=!1)=>{let _e;return j?(_e=(a.configs||[]).find(et=>et.key==="BLOCKLET_APP_CHAIN_TYPE"),_e&&_e.value||(_e=(a.environments||[]).find(et=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(et.key)),_e&&_e.value)?_e.value:DEFAULT_WALLET_TYPE):(_e=(a.environments||[]).find(et=>["CHAIN_TYPE","BLOCKLET_APP_CHAIN_TYPE"].includes(et.name)),_e&&_e.default?_e.default:DEFAULT_WALLET_TYPE)},isServerless=a=>!isEmpty$2(a==null?void 0:a.controller);let cache=null;const fetch$1=async()=>{const a=window.env.apiPrefix||"/",j=joinURL(a,"/api/dns-resolve?accessible=1");try{return(await axios$4.get(j)).data.address}catch{return null}},getIp=()=>(cache||(cache=fetch$1()),cache),BlockletsContext=reactExports.createContext({}),{Provider:Provider$2,Consumer:Consumer$2}=BlockletsContext,mergeBlocklets=(a,j,_e)=>_e?a.map(et=>{const nt={...et},tt=j.find(it=>it.meta.did===et.meta.did);return tt&&_e.forEach(it=>{nt[it]=tt[it]}),nt}):j;function BlockletsProvider({children:a}){const j=useNodeContext(),_e=createClient(),[et,nt]=reactExports.useState(null),[tt,it]=reactExports.useState(!1),[ut,ft]=reactExports.useState([]),[pt,dt]=reactExports.useState([]),[mt,Et]=reactExports.useState(!1),wt=(Lt,zt)=>{util.isExternalBlocklet(Lt)?dt(zt):ft(zt)},St=4,Ct=async({silent:Lt=!0,retries:zt=St,updates:Ft,useCache:Ht=!0}={})=>{Lt||it(!0);try{nt(null);const{blocklets:Qt}=await _e.getBlocklets({input:{useCache:Ht}});for(const $t of Qt)await fixBlocklet($t,{getIP:getIp});const tn=Qt.filter($t=>!util.isExternalBlocklet($t)),mn=Qt.filter(util.isExternalBlocklet);ft($t=>mergeBlocklets($t,tn,Ft)),dt($t=>mergeBlocklets($t,mn,Ft)),it(!1),Et(!0)}catch(Qt){zt>0?setTimeout(()=>Ct({silent:Lt,retries:zt-1,useCache:Ht}),1e3):(it(!1),nt(Qt))}},Dt=async Lt=>{try{const{blocklet:zt}=await j.api.getBlocklet({input:{did:Lt.meta.did,attachRuntimeInfo:!0}});await fixBlocklet(zt,{getIP:getIp}),wt(zt,Ft=>Ft.some(Ht=>Ht.meta.did===zt.meta.did)?Ft.map(Ht=>Ht.meta.did===zt.meta.did?zt:Ht):[...Ft,zt])}catch(zt){nt(zt)}},At=Lt=>{j.refresh(),Dt(Lt)};reactExports.useEffect(()=>{Ct({silent:!1})},[]);const Pt=Lt=>{const zt={};util.forEachBlockletSync(Lt,(Ft,{id:Ht})=>{zt[Ht]=constant.fromBlockletStatus(Ft.status)}),wt(Lt,Ft=>Ft.map(Ht=>(Ht.meta.did===Lt.meta.did&&util.forEachBlockletSync(Ht,(Qt,{id:tn})=>{zt[tn]&&(Qt.status=zt[tn])}),Ht)))};useSubscription(constant.BlockletEvents.added,Lt=>{Lt.status=constant.fromBlockletStatus(Lt.status),wt(Lt,zt=>[...zt,Lt])}),useSubscription(constant.BlockletEvents.removed,Lt=>{j.refresh(),wt(Lt,zt=>zt.filter(Ft=>Ft.meta.did!==Lt.meta.did))}),useSubscription(constant.BlockletEvents.statusChange,Pt),useSubscription(constant.BlockletEvents.installed,At),useSubscription(constant.BlockletEvents.upgraded,At),useSubscription(constant.BlockletEvents.updated,Dt),useSubscription(constant.BlockletEvents.startFailed,Dt);const It={loading:tt,error:et,data:ut,externalData:pt,refresh:Ct,initialized:mt,api:_e};return jsxRuntimeExports.jsx(Provider$2,{value:{blocklets:It},children:a})}function useBlockletsContext(){const{blocklets:a}=reactExports.useContext(BlockletsContext);return a}const authorize=({user:a,launchType:j,nftId:_e})=>{var et;if(!a)return!1;if(j==="serverless"){if(!_e)throw new Error("nftId is required");return((et=a==null?void 0:a.controller)==null?void 0:et.nftId)===_e}return(a.permissions||[]).includes("mutate_blocklets")},isServerlessBlockletInstalled=a=>{var j,_e;return a.isGetBlocklet&&((_e=(j=a.runtimeBlocklet)==null?void 0:j.controller)==null?void 0:_e.consumedAt)},getRestoredAccessUrl=async a=>{const j=getBlockletUrls({blocklet:a});let _e="";return _e=j.find(et=>{try{const{hostname:nt}=new URL(et);return urlEvaluation.isSlpDomain(nt)}catch(nt){return console.error(nt),!1}}),_e||(_e=await getAccessibleUrl(j)),_e},LaunchBlockletContext=reactExports.createContext({}),{Provider:Provider$1,Consumer:Consumer$1}=LaunchBlockletContext;function LaunchBlockletProvider({children:a}){const{session:j}=useSessionContext$1(),{t:_e}=useLocaleContext(),{api:et,info:nt}=useNodeContext(),[tt]=useSearchParams(),it=createClient(),ut=tt.get("launchType"),ft=tt.get("fromLauncher"),pt=tt.get("blocklet_meta_url")||"",dt=tt.get("nftId")||"",mt=tt.get("launcherSessionId")||"",Et=tt.get("launcherUrl")||"",wt=new URL(pt).origin,[St,Ct]=reactExports.useState({meta:null,appDid:tt.get("appDid")||null,sessionId:tt.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),Dt=(mn,$t)=>Ct(rt=>({...rt,appDid:mn,sessionId:$t})),At=authorize({user:j.user,launchType:ut,nftId:dt}),[Pt,It]=reactExports.useState(null),[Lt,zt]=reactExports.useState(!0),Ft=reactExports.useMemo(()=>nt?getServerUrl(nt):"",[nt]),Ht=async mn=>{if(!mn)throw new Error("appDid should not be empty");const{blocklet:$t}=await et.getBlocklet({input:{did:mn,attachConfig:!1}});if(!$t)return null;const rt=constant.BlockletStatus[$t.status],st=!!dt,ct=rt<constant.BlockletStatus.installed,ht=rt===constant.BlockletStatus.installed,vt=rt===constant.BlockletStatus.running;return Ct(xt=>({...xt,isInstalled:ht,isRunning:vt,isExternal:st,isInstalling:ct})),{isInstalled:ht,isRunning:vt,isExternal:st,isInstalling:ct}},Qt=async()=>{zt(!0);try{if(!pt)throw new Error(_e("common.invalidParam"));const[{meta:mn,isFree:$t,registryUrl:rt},{launcherSession:st,error:ct}]=await Promise.all([et.getBlockletMetaFromUrl({input:{url:pt,checkPrice:!0}}),mt?et.getLauncherSession({input:{launcherSessionId:mt,launcherUrl:Et}}):Promise.resolve({})]);if(mt&&!st)throw new Error(`Launch session invalid: ${ct}`);if(!mn)throw new Error(_e("LaunchBlockletBlocklet.error.loadMetaFailed"));let ht={};At&&St.appDid&&(ht=await Ht(St.appDid)),Ct(vt=>({...vt,...ht,meta:mn,isFree:$t,registryUrl:rt,launcherSession:st}))}catch(mn){console.error(mn),It(mn.message)}finally{zt(!1)}};reactExports.useEffect(()=>{var mn,$t,rt;((mn=j==null?void 0:j.user)==null?void 0:mn.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((rt=($t=j==null?void 0:j.user)==null?void 0:$t.controller)==null?void 0:rt.nftId)!==dt&&j.logout(),Qt()},[]),reactExports.useEffect(()=>{Lt||!St.meta||(At?St.appDid&&Ht(St.appDid).catch(mn=>{toast.error(mn.message)}):(Ct(mn=>({...mn,isInstalled:!1,isRunning:!1,isExternal:!1})),It(null)))},[At]);const tn={meta:St.meta,isFree:St.isFree,appDid:St.appDid,sessionId:St.sessionId,isInstalling:St.isInstalling,isInstalled:St.isInstalled,isExternal:St.isExternal,isRunning:St.isRunning,serverUrl:Ft,storeUrl:St.registryUrl||wt,blockletMetaUrl:pt,fromLauncher:ft,loading:Lt,error:Pt,api:it,getBlocklet:Ht,setAppDid:Dt,launcherUrl:Et,launcherSession:St.launcherSession,launcherSessionId:mt};return jsxRuntimeExports.jsx(Provider$1,{value:tn,children:a})}function useLaunchBlockletContext(){return reactExports.useContext(LaunchBlockletContext)}function useQuery(){return new URLSearchParams(useLocation().search)}const BlockletAppContext=reactExports.createContext(),{Provider,Consumer}=BlockletAppContext;function BlockletAppProvider({children:a}){const _e=useQuery().get("blocklet_meta_url"),et=_default$2(async()=>{const{data:tt}=await axios$1.get(_e);return tt});if(et.loading)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const nt={meta:et.value,error:et.error};return jsxRuntimeExports.jsx(Provider,{value:nt,children:a})}BlockletAppProvider.propTypes={children:PropTypes.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-MRb9RAJK.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-CG4MmDuK.js"),__vite__mapDeps([5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,2,30,31,32,33,34]),import.meta.url)),BlockletRestore=reactExports.lazy(()=>__vitePreload(()=>import("./index-C7m9dmdb.js"),__vite__mapDeps([35,36,37,38,39,40,41,6,42,43,44,45,13,10,12,26,19,18]),import.meta.url)),BlockletStore=reactExports.lazy(()=>__vitePreload(()=>import("./index-D8rh69R2.js"),__vite__mapDeps([46,6,47,48,49,18,17,50,10,51,52,32,13,12,42,53,43,54,3,55,56,19,23,24,57,58,59]),import.meta.url)),Settings=reactExports.lazy(()=>__vitePreload(()=>import("./index-CLbWUy8O.js"),__vite__mapDeps([60,61,11,58,62,63,50,64,13,10,12,7,8,9,14,15,16,17,18,19,65,54,3,55,2,66,6,67,68,32,21,20,69,34,70,71,72,4,73]),import.meta.url)),LogPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-9o5SBOBg.js"),__vite__mapDeps([74,75,23,24,10,76]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-KENXSHGT.js"),__vite__mapDeps([77,61,11,78,79,80,18,6,10,12,81,14,82,83,32,84,85,86,17,13,7,8,9,15,16,19,87,34,88,89,50,25,26,49,21,90,56,3,2,91,92,93,55,94,33,23,24,95,96,97,48,51,98,1,54,71]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-DHBrhfaQ.js"),__vite__mapDeps([99,61,11,20,21,22,6,19,23,24,31,56,90,59]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BZQ6Sdlq.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-DmdQsIN9.js"),__vite__mapDeps([100,1,81,14]),import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-oVy0lmae.js"),__vite__mapDeps([101,102,89,103,91,69,104]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-ClNOtPm5.js"),__vite__mapDeps([105,69,85,53,104,30]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BIUglsRs.js"),__vite__mapDeps([106,104]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-6UQZCJ9z.js"),__vite__mapDeps([107,36,37,38,39,40,41,108,79,80,45,26,6,28,25,29,66]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-15yTTSQp.js"),__vite__mapDeps([109,89]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-CJeF5ewa.js"),__vite__mapDeps([110,102,89,103,91,69,104]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-BjH9WeIg.js").then(a=>a.a2),__vite__mapDeps([111,112]),import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DNivFScD.js"),__vite__mapDeps([113,61,11,114,115,116,70,10,117,9,13,12,51,7,8,14,15,16,17,18,19,31,118,119,4,6,98,24]),import.meta.url));function useSharedContext(){const a=useNodeContext(),{session:j}=useSessionContext$1(),{wallet:_e}=useBrowser(),et=j.user&&j.user.did;return reactExports.useEffect(()=>{const nt=getWsClient();return et?nt.connect():nt.isConnected()&&nt.disconnect(),()=>{nt.isConnected()&&nt.disconnect()}},[et]),reactExports.useEffect(()=>{if(_e)return()=>{};const nt=()=>{document.visibilityState==="visible"&&j.refresh()};return document.addEventListener("visibilitychange",nt),()=>{document.removeEventListener("visibilitychange",nt)}},[]),{node:a,session:j}}function ProtectedApp(){var it;const{t:a}=useLocaleContext(),{node:j,session:_e}=useSharedContext(),et=useLocation();reactExports.useEffect(()=>{window.tracker&&typeof window.tracker.pageView=="function"&&window.tracker.pageView(`${et.pathname}${et.search}`)},[et]),reactExports.useEffect(()=>{var ut;((ut=_e==null?void 0:_e.user)==null?void 0:ut.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&_e.logout()},[(it=_e==null?void 0:_e.user)==null?void 0:it.role]);const nt=jsxRuntimeExports.jsx(CircularProgress,{});if(j.loading||_e.loading)return jsxRuntimeExports.jsx(Center,{children:nt});if(!j.info.initialized)return getAuthMethod.getServerAuthMethod(j.info)==="nft"?jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"verify-owner"}):jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(NodeConnectOwner,{})});if(j.info.upgradeSessionId)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(MaintainProgress,{})});if(!_e.user)return jsxRuntimeExports.jsx(NodeLogin,{loadingEle:nt});const tt=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(NotificationProvider,{children:jsxRuntimeExports.jsxs(BlockletsProvider,{children:[jsxRuntimeExports.jsx(Health,{}),jsxRuntimeExports.jsx(CheckNodeStatus,{}),jsxRuntimeExports.jsx(GlobalSubscriber,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:tt,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:"/dashboard",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Dashboard",children:jsxRuntimeExports.jsx(Dashboard,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.blocklets"),children:jsxRuntimeExports.jsx(BlockletList,{})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/:did/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:"Blocklets",children:jsxRuntimeExports.jsx(BlockletDetail,{})})}),jsxRuntimeExports.jsx(Route,{path:"/settings/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.setting"),children:jsxRuntimeExports.jsx(Settings,{})})}),jsxRuntimeExports.jsx(Route,{path:"/eula",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("setup.steps.eula"),children:jsxRuntimeExports.jsx(EULAPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/store",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.store"),children:jsxRuntimeExports.jsx(BlockletStore,{})})}),jsxRuntimeExports.jsx(Route,{path:"/console",element:jsxRuntimeExports.jsx(DashboardRoute,{title:`GraphQL ${a("common.console")}`,scrollable:!1,fullWidth:!0,children:jsxRuntimeExports.jsx(Console,{})})}),jsxRuntimeExports.jsx(Route,{path:"/notifications",element:jsxRuntimeExports.jsx(DashboardRoute,{children:jsxRuntimeExports.jsx(Notifications,{})})}),jsxRuntimeExports.jsx(Route,{path:"/team/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.team"),children:jsxRuntimeExports.jsx(TeamPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/logs/:name",element:jsxRuntimeExports.jsx(DashboardRoute,{scrollable:!1,fullWidth:!0,title:a("common.logs"),children:jsxRuntimeExports.jsx(LogPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/analytics/:tab",element:jsxRuntimeExports.jsx(DashboardRoute,{fullWidth:!0,title:a("common.analytics"),children:jsxRuntimeExports.jsx(AnalyticsPage,{})})}),jsxRuntimeExports.jsx(Route,{path:"/",element:jsxRuntimeExports.jsx(Navigate,{to:"/dashboard",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/team",element:jsxRuntimeExports.jsx(Navigate,{to:"/team/members",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/analytics",element:jsxRuntimeExports.jsx(Navigate,{to:"/analytics/traffic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/logs",element:jsxRuntimeExports.jsx(Navigate,{to:"/logs/abtnode",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/router",element:jsxRuntimeExports.jsx(Navigate,{to:"/router/rules",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/settings",element:jsxRuntimeExports.jsx(Navigate,{to:"/settings/basic",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace",element:jsxRuntimeExports.jsx(Navigate,{to:"/store",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"/marketplace/:did",element:jsxRuntimeExports.jsx(Navigate,{to:"/store/:did",replace:!0})}),jsxRuntimeExports.jsx(Route,{path:"*",element:jsxRuntimeExports.jsx(NotFoundPage,{})})]})})]})})}function UnprotectedWrapper({children:a}){const{node:j,session:_e}=useSharedContext();return j.loading||!_e.initialized&&_e.loading?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})}):j.info.upgradeSessionId?jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(MaintainProgress,{})}):a}function App(){const{changeLocale:a}=useLocaleContext(),j=useQuery();reactExports.useEffect(()=>{const et=j.get("locale");et&&["zh","en"].includes(et)&&a(et)},[]);const _e=jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:_e,children:jsxRuntimeExports.jsxs(Routes,{children:[jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/issue-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(IssuePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/lost-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LostPassport,{})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(ExchangePassport,{})})}),jsxRuntimeExports.jsx(Route,{path:"/accept-server",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(NodeVerifyOwner,{action:"accept-server"})})}),jsxRuntimeExports.jsx(Route,{path:"/launch-blocklet/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(LaunchBlockletProvider,{children:jsxRuntimeExports.jsx(BlockletLauncher,{})})})}),jsxRuntimeExports.jsx(Route,{path:"/blocklets/restore/*",element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(BlockletAppProvider,{children:jsxRuntimeExports.jsx(BlockletRestore,{})})})}),jsxRuntimeExports.jsx(Route,{path:`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/invite`,element:jsxRuntimeExports.jsx(UnprotectedWrapper,{children:jsxRuntimeExports.jsx(Invite,{})})}),jsxRuntimeExports.jsx(Route,{path:"/*",element:jsxRuntimeExports.jsx(ProtectedApp,{})})]})})}function AppWrapper(){const a=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CssBaseline,{}),jsxRuntimeExports.jsx(BrowserRouter,{history,basename:a,children:jsxRuntimeExports.jsx(Root$5,{children:jsxRuntimeExports.jsx(App,{})})})]})}const root=createRoot(document.getElementById("root"));root.render(jsxRuntimeExports.jsx(AppWrapper,{}));const prefix=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";register(`${prefix}/service-worker.js`.replace(/\/+/g,"/"),{registrationOptions:{scope:prefix},registered(){console.info("Service worker has been registered.")},ready(){console.info("Service worker is active.")},cached(){console.info("Content has been cached for offline use.")},updatefound(){console.info("New content is downloading.")},updated(){console.info("New content is available; please refresh.")},offline(){console.info("No internet connection found. App is running in offline mode.")},error(a){console.error("Error during service worker registration:",a)}});export{default_1$n as $,useNavigate as A,ButtonComponent as B,CircularProgress as C,Dialog as D,toast as E,useSearchParams as F,Grid as G,constant$3 as H,ImageIcon as I,useMediaQuery as J,Alert as K,LinearProgress as L,formatError$1 as M,util as N,Link$2 as O,PropTypes as P,Box as Q,isEmpty$2 as R,RelativeTime$1 as S,TagComponent as T,MenuItem$1 as U,Permission as V,WrappedDidAddress as W,Center as X,toString_1 as Y,propTypesExports as Z,_createCompounder as _,useSubscription as a,Menu$1 as a$,lodashExports as a0,api$1 as a1,IconButton as a2,Confirm as a3,makeStyles as a4,ListItemSecondaryAction as a5,List as a6,ListItem as a7,ListItemText as a8,getServerUrl as a9,ErrorFallback as aA,formatRegistryLogoPath as aB,engine as aC,ListItemIcon as aD,ensureDomainAliases as aE,normalizePathPrefix$1 as aF,sortBy$1 as aG,getIp as aH,stringSortHandlerAsc as aI,getAccessUrl as aJ,requireCreateSvgIcon as aK,interopRequireDefaultExports as aL,history as aM,semver$1 as aN,useReactive as aO,useAsyncEffect as aP,sleep as aQ,checkInputByType as aR,Stack$5 as aS,isChrome as aT,_default$2 as aU,axios$1 as aV,shouldCheckDomainStatus as aW,formatMountPoint as aX,_default$5 as aY,FormControlLabel as aZ,Checkbox as a_,useBlockletAppContext as aa,getAuthMethod as ab,ConfirmDialog as ac,setSessionToken as ad,getRestoredAccessUrl as ae,Debug as af,isServerlessBlockletInstalled as ag,getWsClient as ah,useTheme$2 as ai,useQuery as aj,getPathPrefix as ak,HeaderAddon as al,SessionContext as am,Global as an,Routes as ao,Route as ap,Navigate as aq,css$1 as ar,AvatarWithErrorBoundary as as,formatToDatetime as at,getLaunchAgreementUrl as au,axios$4 as av,useSessionContext$1 as aw,Tooltip as ax,getBlockletMetaUrl as ay,ErrorBoundary as az,constant as b,useForkRef as b$,checkIsWildcardDomain as b0,Popover as b1,Card as b2,CardContent as b3,formatToDate as b4,sortDomains as b5,Collapse as b6,isUrl$1 as b7,__awaiter as b8,__generator as b9,_baseRest as bA,_arrayFilter as bB,last_1 as bC,isArrayLikeObject_1 as bD,default_1$c as bE,isDownloading as bF,withPermission as bG,getBlockletUrl as bH,getBlockletUrlParams as bI,createSvgIcon$1 as bJ,styled$1 as bK,ButtonBase as bL,_extends$2 as bM,emphasize_1 as bN,_objectWithoutPropertiesLoose$1 as bO,generateUtilityClasses as bP,generateUtilityClass as bQ,useDefaultProps as bR,useSlotProps as bS,clsx$1 as bT,composeClasses as bU,rootShouldForwardProp as bV,SwitchBase as bW,capitalize$3 as bX,alpha_1 as bY,createChainedFunction$1 as bZ,useControlled as b_,__spread as ba,React$2 as bb,dayjs$1 as bc,Divider as bd,isCertificateMatch as be,NodeContext as bf,useParams as bg,__assign as bh,__spreadArrays as bi,DidAddressWrapper as bj,createPassportSvg as bk,useNodeContext$1 as bl,getWalletType as bm,__vitePreload as bn,isInstalling as bo,Badge as bp,NavLink$1 as bq,createAppPassportSvg as br,_SetCache as bs,_arrayMap as bt,_baseUnary as bu,_arrayIncludes as bv,_arrayIncludesWith as bw,_cacheHas as bx,_baseFlatten as by,_baseUniq as bz,createClient as c,ownerDocument as c$,useId as c0,merge$1 as c1,toSlotDomain as c2,omit$1 as c3,fixBlocklet as c4,memoize$5 as c5,defaultCheckAccessible as c6,getBlockletUrls as c7,urlEvaluation as c8,ButtonGroupContext as c9,API_DID_PREFIX as cA,AUTH_SERVICE_PREFIX as cB,formatDateTime as cC,getExplorerLink as cD,patchJsxToLocale as cE,flat$1 as cF,en$2 as cG,LocaleProvider as cH,getAugmentedNamespace as cI,Theme as cJ,ReactDOM as cK,global$2 as cL,punycodeExports as cM,commonjsGlobal as cN,copy$1 as cO,dist$4 as cP,Util as cQ,require$$3 as cR,getSessionToken as cS,SvgLogo as cT,hoistStatics as cU,getLogoHash as cV,useEnhancedEffect$1 as cW,debounce$5 as cX,ownerWindow as cY,useRtl as cZ,useEventCallback$1 as c_,ButtonGroupButtonContext as ca,BlockletAdminRoles as cb,ListItemAvatar as cc,Avatar$1 as cd,NotificationTag as ce,useNotificationContext as cf,useRequest as cg,useMemoizedFn as ch,isNumber$2 as ci,__read as cj,useLatest as ck,defaultDayjs as cl,useBrowser as cm,Container$3 as cn,isFunction$8 as co,usePassportId as cp,FullPage as cq,useLaunchBlockletContext as cr,useSecurity as cs,authorize as ct,isNewStoreUrl as cu,getAccessibleUrl as cv,getBlockletLogoUrl as cw,Img as cx,useLocation as cy,useMount as cz,useBlockletsContext as d,private_safeAlpha_1 as d$,colors$1 as d0,useFormControl as d1,formControlState as d2,util$6 as d3,upperFirst$2 as d4,camelCase$2 as d5,ClickToCopy as d6,getGridUtilityClass as d7,gridClasses as d8,Grow as d9,lib$1 as dA,urlExports as dB,cloneDeep_1 as dC,get_1 as dD,DID as dE,isHostComponent as dF,FormControlContext as dG,GlobalStyles as dH,formatMuiErrorMessage$1 as dI,deepmerge$1 as dJ,isMuiElement as dK,slotShouldForwardProp as dL,Button$1 as dM,Paper as dN,ClickAwayListener as dO,MenuList as dP,Popper as dQ,useTheme$3 as dR,GlobalStyles$2 as dS,ThemeProvider$2 as dT,toPropertyKey$3 as dU,createSpacing as dV,createBreakpoints as dW,createTheme$1 as dX,private_safeDarken_1 as dY,private_safeLighten_1 as dZ,private_safeEmphasize_1 as d_,PopoverPaper as da,PopoverRoot as db,getOffsetLeft as dc,getOffsetTop as dd,getPopoverUtilityClass as de,popoverClasses as df,emotionSerialize_esm as dg,emotionUtils_browser_esm as dh,emotionCache_browser_esm as di,emotionReact_browser_esm as dj,reactDomExports as dk,Close as dl,_baseIteratee as dm,isArrayLike_1 as dn,keys_1 as dp,_baseFindIndex as dq,toInteger_1 as dr,noop$7 as ds,isObject$p as dt,cloneDeep$1 as du,padStart_1 as dv,Buffer$3 as dw,lib$2 as dx,upperFirst_1 as dy,pick_1 as dz,_default$1 as e,Hidden as e$,private_safeColorChannel_1 as e0,defaultSxConfig as e1,styleFunctionSx$1 as e2,getOverlayAlpha as e3,hslToRgb_1 as e4,THEME_ID as e5,createTypography as e6,StyledEngineProvider as e7,ThemeProvider$1 as e8,alpha$1 as e9,getChipUtilityClass as eA,buttonClasses as eB,getButtonUtilityClass as eC,checkboxClasses as eD,getCheckboxUtilityClass as eE,formControlLabelClasses as eF,getFormControlLabelUtilityClasses as eG,getListItemTextUtilityClass as eH,listItemTextClasses as eI,getMenuItemUtilityClass as eJ,menuItemClasses as eK,getTooltipUtilityClass as eL,tooltipClasses as eM,lighten_1 as eN,darken_1 as eO,Toolbar as eP,getToolbarUtilityClass as eQ,toolbarClasses$1 as eR,_baseIsEqual as eS,SvgIcon as eT,process$1$1 as eU,urlPathFriendly$1 as eV,useThemeProps as eW,defaultTheme$2 as eX,commonjsRequire as eY,create$4 as eZ,ThemeProvider$4 as e_,createMuiTheme as ea,darken$1 as eb,decomposeColor$1 as ec,duration as ed,easing as ee,emphasize$1 as ef,getContrastRatio$1 as eg,getLuminance$1 as eh,hexToRgb$1 as ei,hslToRgb$1 as ej,keyframes as ek,lighten$1 as el,createMixins as em,recomposeColor$1 as en,responsiveFontSizes as eo,rgbToHex$1 as ep,getUnit as eq,toUnitless as er,getPaperUtilityClass as es,paperClasses$1 as et,getIconButtonUtilityClass as eu,iconButtonClasses as ev,getTypographyUtilityClass as ew,typographyClasses$1 as ex,chipClasses as ey,Chip as ez,LocaleContext as f,Fade as f$,Check$1 as f0,withQuery as f1,createTheme$3 as f2,styled$2 as f3,useTheme$4 as f4,extendSxProp as f5,getTargetElement as f6,useEventListener as f7,useUpdateEffect as f8,__spreadArray as f9,util$5 as fA,shams$1 as fB,hasPropertyDescriptors_1 as fC,defineDataProperty as fD,safeBufferExports as fE,requireBrowser$9 as fF,requireElliptic as fG,requireCryptoBrowserify as fH,ripemd160 as fI,getInviteLink$1 as fJ,SessionContext$1 as fK,getIssuePassportLink as fL,Icon as fM,getTextColor_1 as fN,isProtectedRole as fO,lib$3 as fP,createPassportSvg$2 as fQ,semver as fR,browserExports as fS,require$$0$1 as fT,isAbsoluteUrl as fU,dist$1 as fV,browser$4 as fW,requireObjectWithoutPropertiesLoose as fX,loadIcon as fY,createTheme as fZ,ThemeProvider as f_,_baseOrderBy as fa,isArray_1 as fb,default_1$p as fc,useCreation as fd,parseQuery as fe,useDebounceFn as ff,createRoot as fg,useSize as fh,colors$2 as fi,callBound$2 as fj,callBindExports as fk,normalizePathPrefix_1 as fl,clamp$1 as fm,useIsFocusVisible as fn,extractEventHandlers as fo,resolveProps as fp,debounce_1 as fq,noop_1 as fr,_default$3 as fs,formatTime as ft,RelativeTime as fu,useUpdate as fv,tmp as fw,getVisitorId$2 as fx,useConfirm as fy,translate as fz,getDefaultExportFromCjs$1 as g,jssGlobal as g$,ListItemButton as g0,AUTH_SERVICE_PREFIX$1 as g1,getTranslation as g2,SessionPermission as g3,NAVIGATION_URL as g4,LocaleSelector as g5,SessionUser as g6,default_1$l as g7,ResponsiveHeader as g8,withErrorBoundary as g9,_inheritsLoose$3 as gA,forceReflow as gB,Transition$1 as gC,_baseIndexOf as gD,_baseToString as gE,_baseTrim as gF,_castSlice as gG,_charsEndIndex as gH,_stringToArray as gI,validateDomain as gJ,axios_1 as gK,CopyButton as gL,isServerless as gM,getSystemDomains as gN,data$m as gO,isRunning as gP,getTransferAppLink as gQ,pick$1 as gR,data$g as gS,data$f as gT,data$h as gU,_copyArray as gV,usePreviousProps as gW,setRef as gX,ClearIcon as gY,hoistNonReactStatics_cjs as gZ,functionPlugin as g_,NavMenu as ga,DashboardWrapper as gb,BlockletSDK as gc,useUnmount as gd,identity_1 as ge,_baseForOwn as gf,_baseMap as gg,isString_1 as gh,isPlainObject_1 as gi,default_1$h as gj,browser as gk,uniq_1 as gl,pLimit_1 as gm,require$$6 as gn,_isIndex as go,_typeof$2 as gp,Dialog$1 as gq,dialogClasses as gr,DialogContent as gs,FocusTrap as gt,DialogActions as gu,TransitionGroup as gv,localizedFormatPlugin as gw,isExtracting as gx,APP_PREFIX as gy,objectAssign$1 as gz,useTheme as h,jssNested as h0,camelCase as h1,defaultUnit as h2,jssVendorPrefixer as h3,jssPropsSort as h4,createJss as h5,getDynamicStyles as h6,isNil_1 as h7,omit_1 as h8,withoutTrailingSlash as h9,require$$1$4 as hA,Check as hB,reactIsExports as hC,isValidClusterSize as hD,extractStatusUrlFromNextWorkflow as hE,pWaitFor$1 as hF,hasRequiredSteps as hG,getStoreList as hH,flatten$4 as hI,trimEnd$1 as hJ,useCheckUpdateByUrl as hK,DialogTitle as hL,_baseEach as hM,_baseAssignValue as hN,throttle$4 as hO,pTimeout$2 as hP,TimeoutError_1 as hQ,debounce$3 as hR,uniq$1 as hS,Backdrop as hT,isString$2 as ha,isAbsoluteUrl$1 as hb,nanoid as hc,omitBy$1 as hd,isNil$1 as he,isEqual$1 as hf,useEffectWithTarget$1 as hg,__values as hh,isString$3 as hi,isFunction$5 as hj,circularProgressClasses$1 as hk,getCircularProgressUtilityClass as hl,collapseClasses$1 as hm,getCollapseUtilityClass as hn,boxClasses as ho,Icon$2 as hp,getIconUtilityClass as hq,iconClasses$1 as hr,getLinearProgressUtilityClass as hs,linearProgressClasses$1 as ht,getMenuUtilityClass as hu,menuClasses$1 as hv,_unsupportedIterableToArray as hw,_setPrototypeOf as hx,_assertThisInitialized$1 as hy,_createClass as hz,Link$1 as i,jsxRuntimeExports as j,get$6 as k,filesize as l,Typography as m,newStyled as n,formatLocale as o,prettyMs as p,joinURL as q,reactExports as r,styled as s,useLocaleContext as t,useNodeContext as u,useSessionContext as v,_default as w,DialogContentText as x,DidConnect as y,getWebWalletUrl as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,bh as _,bi as z,aK as J,aL as X,j as e,t as A,c as P,H as b,m as L,U as q,Q as k,B as K,C as w,ac as E,P as j,f as O,D as Y,aZ as ee,a_ as te,n as S,at as I,o as se,u as G,K as ae,M as ne,V as oe,bj as re,A as ce,bg as ie,d as le,bk as me}from"./index-
|
|
1
|
+
import{r as u,bh as _,bi as z,aK as J,aL as X,j as e,t as A,c as P,H as b,m as L,U as q,Q as k,B as K,C as w,ac as E,P as j,f as O,D as Y,aZ as ee,a_ as te,n as S,at as I,o as se,u as G,K as ae,M as ne,V as oe,bj as re,A as ce,bg as ie,d as le,bk as me}from"./index-Dpawm4Ki.js";import{T as de}from"./index-04gl6pO4.js";import pe from"./audit-logs-BmIfy96g.js";import{P as ue,M as fe}from"./index-WbFA75dB.js";import ye from"./index-qm1NSTqx.js";import{T as ge}from"./team-B75Qqpfx.js";import{E as xe}from"./index-DDRhCg0G.js";import{d as he}from"./Add-YuGHCX93.js";import{T as N}from"./TextField-FjVpB8_i.js";import{F as H,S as V}from"./Select-CZslLkS9.js";import{I as Q}from"./InputLabel-DiJjRX8c.js";import{C as W}from"./click-to-copy-qnXvH47O.js";import{f as ve}from"./index-BojVbZw0.js";import{d as je}from"./Delete-ukzbwUp3.js";import{C as Ce}from"./delete-confirm-BG1I5J0u.js";import{d as ke}from"./Edit-qncNJ4F1.js";import"./index-7aCT4zwx.js";import"./useLocalStorage-C-9FT6wS.js";import"./Pagination-BE1Nzv5c.js";import"./LastPage-BVKCAcZd.js";import"./index-DnBiGZ_C.js";import"./Loop-cNToB-Hw.js";import"./ViewList-BWR6vvRA.js";import"./list-header-C1ycqwNT.js";import"./Search-DPoHYjEM.js";import"./index-vxqr_A7H.js";import"./FilterList-B3q8z3Ai.js";import"./useThemeProps-D2picXH9.js";import"./index-DJs7uyCT.js";import"./redux-B9BtMJgi.js";import"./MoreVert-72FLA6F7.js";import"./index-DP0iPBNh.js";import"./ExpandMore-BzXUe6hQ.js";import"./resource-dialog-0uswwg4x.js";import"./index-CoOBWTGS.js";import"./index-TFGhlmJg.js";import"./index-BtcEDL3C.js";import"./isEqual-DvDsjofF.js";import"./index-ZG7jWpak.js";import"./url-evaluation-BfNZVzn8.js";import"./blocklet-xgPL6JoP.js";import"./index-CUnYmZv8.js";import"./sdk-B77IQB17.js";import"./actions-DMatOIO9.js";import"./MoreHoriz-BlJZBfL5.js";import"./shorten-label-MAGXebJW.js";import"./index-CupkOe8N.js";import"./ButtonGroup-Dk1mLt3h.js";import"./getValidReactChildren-anMSyFv4.js";import"./EditIcon-BU_hSrvO.js";import"./LockIcon-DWwaclI2.js";import"./Google-BFCcXFWg.js";import"./index-3regrC4H.js";import"./InputAdornment-CmItI7-a.js";import"./ToggleButtonGroup-BLKzb8eH.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,z(s,[r])),n=t.loading,l=u.useCallback(function(){n||c(function(m){return m+1})},z(s,[n]));return _(_({},t),{retry:l})},R={},Ae=X;Object.defineProperty(R,"__esModule",{value:!0});var Z=R.default=void 0,we=Ae(J()),Ie=e;Z=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=P(),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(N,{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(H,{style:{width:"100%"},variant:"outlined",children:[e.jsx(Q,{children:r("common.passport")}),e.jsx(V,{"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(q,{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(Y,{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(Ne,{children:c("setting.accessKey.saveSecretTip")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(U,{children:[e.jsx(M,{children:"Access Key"}),e.jsx(W,{children:p})]}),e.jsxs(U,{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
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-
|
|
1
|
+
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-Dpawm4Ki.js";import{f as oe}from"./index-BojVbZw0.js";import{I as E}from"./index-CUnYmZv8.js";import{C as I}from"./click-to-copy-qnXvH47O.js";import{w as ie}from"./withStyles-D9ls3p7Y.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
|
|
2
2
|
border-left: 1px solid ${n=>n.theme.typography.color.main};
|
|
3
3
|
padding: 10px 0 10px 16px;
|
|
4
4
|
@media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bP as $,bQ as x,bK as d,bX as e,bW as y,bY as k,eN as C,eO as m,r as M,bR as z,bO as j,bM as l,j as s,bT as R,bU as B,s as T,P as O,aZ as P}from"./index-
|
|
1
|
+
import{bP as $,bQ as x,bK as d,bX as e,bW as y,bY as k,eN as C,eO as m,r as M,bR as z,bO as j,bM as l,j as s,bT as R,bU as B,s as T,P as O,aZ as P}from"./index-Dpawm4Ki.js";function E(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),N=["className","color","edge","size","sx"],D=t=>{const{classes:a,edge:i,size:r,color:p,checked:u,disabled:b}=t,h={root:["root",i&&`edge${e(i)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",b&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(h,E,a);return l({},a,g)},_=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:i}=t;return[a.root,i.edge&&a[`edge${e(i.edge)}`],a[`size${e(i.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),I=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:i}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},i.color!=="default"&&a[`color${e(i.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?C(t.palette[a].main,.62):m(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),U=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),A=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),X=M.forwardRef(function(a,i){const r=z({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:b=!1,size:h="medium",sx:g}=r,f=j(r,N),c=l({},r,{color:u,edge:b,size:h}),n=D(c),w=s.jsx(A,{className:n.thumb,ownerState:c});return s.jsxs(_,{className:R(n.root,p),sx:g,ownerState:c,children:[s.jsx(I,l({type:"checkbox",icon:w,checkedIcon:w,ref:i,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),s.jsx(U,{className:n.track,ownerState:c})]})}),v=T(t=>s.jsx(X,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?s.jsx(P,{control:s.jsx(v,{...a}),...t}):s.jsx(v,{...a})}S.propTypes={labelProps:O.object};S.defaultProps={labelProps:null};export{S,X as a};
|