@abtnode/webapp 1.16.30-beta-e7a90fb2 → 1.16.30
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-nimIss-R.js → Add-B6ZIiZST.js} +1 -1
- package/dist/assets/{ArrowDropDown-SDLo8AU6.js → ArrowDropDown-CTOfLnwc.js} +1 -1
- package/dist/assets/{Autocomplete-mLMpcAAZ.js → Autocomplete-BRgMnZ52.js} +1 -1
- package/dist/assets/{Breadcrumbs-Bt0YLDiP.js → Breadcrumbs-s9U9zLgF.js} +1 -1
- package/dist/assets/{ButtonGroup-BIMC9S6K.js → ButtonGroup-3w5LvaA0.js} +1 -1
- package/dist/assets/{CheckCircle-__Xpcyhc.js → CheckCircle-DE_y9vib.js} +1 -1
- package/dist/assets/{ChevronLeft-DFREsjdS.js → ChevronLeft-CvWKad8W.js} +1 -1
- package/dist/assets/{ChevronRight-SbPIKwoC.js → ChevronRight-93HrdGCM.js} +1 -1
- package/dist/assets/{Close-BpEmkp97.js → Close-DzKkufzk.js} +1 -1
- package/dist/assets/{Delete-B-wviuP1.js → Delete-DFFe3xyW.js} +1 -1
- package/dist/assets/DeleteOutline-yYcRq6ni.js +1 -0
- package/dist/assets/{Done-DEwehpwv.js → Done-3-QQ_TOf.js} +1 -1
- package/dist/assets/{Edit-DK6KZi0P.js → Edit-wLc7o2cw.js} +1 -1
- package/dist/assets/{EditIcon-FDN14b0G.js → EditIcon-BCVTD6hP.js} +1 -1
- package/dist/assets/{ExpandMore-CoMbEsJD.js → ExpandMore-CFYbzpsT.js} +1 -1
- package/dist/assets/{FilterList-BSbt4VER.js → FilterList-FEjK2Fox.js} +1 -1
- package/dist/assets/{Google-DvvB9-RU.js → Google-C9I0SVEJ.js} +1 -1
- package/dist/assets/{Https-CHMUgx6-.js → Https-BPSFFlg6.js} +1 -1
- package/dist/assets/{InputAdornment-C_X3KhDA.js → InputAdornment-DT4h3g9o.js} +1 -1
- package/dist/assets/{InputLabel-qD-ek4kX.js → InputLabel-BOR0LpK5.js} +1 -1
- package/dist/assets/{LastPage-DRexSCl8.js → LastPage-BmNCoOR7.js} +1 -1
- package/dist/assets/{Launch-CXTnJ_ZP.js → Launch-BN3gZaS3.js} +1 -1
- package/dist/assets/{Link-BVKoqsek.js → Link-Dxx2K6Ua.js} +1 -1
- package/dist/assets/{LoadingButton-DHGZB25W.js → LoadingButton-DdNqcAhj.js} +1 -1
- package/dist/assets/{LockIcon-DGE39kAx.js → LockIcon-BB4v3xDA.js} +1 -1
- package/dist/assets/{Loop-DQi2cfGf.js → Loop-COqhNCYW.js} +1 -1
- package/dist/assets/{MoreHoriz-BXgBR7_l.js → MoreHoriz-IPlU_Vvy.js} +1 -1
- package/dist/assets/{MoreVert-xXktVXrB.js → MoreVert-C_-FQbwq.js} +1 -1
- package/dist/assets/{Pagination-DnPfWmf4.js → Pagination-BfGbGnHW.js} +1 -1
- package/dist/assets/{Public-DZG9u5nc.js → Public-CcSZDx4-.js} +1 -1
- package/dist/assets/{SchemaReference.es-DknvTEzi.js → SchemaReference.es-DmaLWYOX.js} +1 -1
- package/dist/assets/{Search-D2g_vALD.js → Search-CjX0JQkS.js} +1 -1
- package/dist/assets/{Select-DEE1eR0K.js → Select-C44-YCyD.js} +1 -1
- package/dist/assets/{Skeleton-m_lkZ6lH.js → Skeleton-4s7n7VqF.js} +1 -1
- package/dist/assets/{Slider-CBmIjsNj.js → Slider-C0JALcDq.js} +1 -1
- package/dist/assets/{Stepper-D4h3SXw3.js → Stepper-BRwbb4LL.js} +1 -1
- package/dist/assets/{TextField-Cml5LlcX.js → TextField-BjNW7Bjw.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-DdMGIkJV.js → ToggleButtonGroup-DtqIWzr-.js} +1 -1
- package/dist/assets/{ViewList-Lg33z4FS.js → ViewList-CHj6lFwi.js} +1 -1
- package/dist/assets/{actions-Rsfuoore.js → actions-DGcLEhc9.js} +1 -1
- package/dist/assets/{actions-CCw2fiQZ.js → actions-TtrKwsqz.js} +1 -1
- package/dist/assets/{agreement-C2LFpgfH.js → agreement-DXIl-xR_.js} +1 -1
- package/dist/assets/api-Rcl-3MyM.js +1 -0
- package/dist/assets/{app-avatar-Z0pI74yn.js → app-avatar-BvOjNwzf.js} +1 -1
- package/dist/assets/{audit-logs-CGjF68d3.js → audit-logs-D4-Bez8p.js} +1 -1
- package/dist/assets/blocklet-d8bc_SQ4.js +1 -0
- package/dist/assets/{brace-fold.es-D-xxO9tk.js → brace-fold.es-B1LEOxqn.js} +1 -1
- package/dist/assets/{bundle-avatar-k-apmNe0.js → bundle-avatar-CW4zHZR5.js} +1 -1
- package/dist/assets/{chart-BHydpm-Q.js → chart-TIGkq42g.js} +1 -1
- package/dist/assets/{click-to-copy--CxmqZHP.js → click-to-copy-ZbSHXJko.js} +1 -1
- package/dist/assets/{closebrackets.es-CV5tiUGf.js → closebrackets.es-hz2Jou3O.js} +1 -1
- package/dist/assets/{codemirror.es-BSwJ_jke.js → codemirror.es-DRCfXk0r.js} +1 -1
- package/dist/assets/{comment.es-CN939E1H.js → comment.es-BmnkGJwk.js} +1 -1
- package/dist/assets/{config-navigation-BKucf5SM.js → config-navigation-DS08ePOc.js} +1 -1
- package/dist/assets/{delete-confirm-DOwYzFRf.js → delete-confirm-CGv3y6py.js} +1 -1
- package/dist/assets/{detail-BBO1G3ZP.js → detail-DmU03eC7.js} +3 -3
- package/dist/assets/{dialog.es-K7-bZIzF.js → dialog.es-CSYXNrcw.js} +1 -1
- package/dist/assets/{download-D88K6-GQ.js → download-CAroNPKK.js} +1 -1
- package/dist/assets/{foldgutter.es-DPSTEVXv.js → foldgutter.es-BSRJoBoZ.js} +1 -1
- package/dist/assets/getValidReactChildren-Y-QNoefA.js +1 -0
- package/dist/assets/{hint.es-DHTbet23.js → hint.es-DuHUgHT3.js} +1 -1
- package/dist/assets/{hint.es2-DaSN5I8T.js → hint.es2-CLzxOo96.js} +1 -1
- package/dist/assets/{iframe-DjGjc5CU.js → iframe-C3LtsJmK.js} +1 -1
- package/dist/assets/index-3tln4L6C.js +21 -0
- package/dist/assets/{index-D3GDvQdK.js → index-8azRnZez.js} +1 -1
- package/dist/assets/{index-TQDBcpeB.js → index-BApbAOLy.js} +1 -1
- package/dist/assets/{index-CF-WslF6.js → index-BN-HHDJJ.js} +1 -1
- package/dist/assets/{index-Daw6hKm4.js → index-BQmNmoac.js} +1 -1
- package/dist/assets/{index-DxgXNSd2.js → index-BZCt88Kn.js} +14 -14
- package/dist/assets/{index-C1KbWOak.js → index-BatYQHX2.js} +3 -3
- package/dist/assets/{index-wB3ekx1K.js → index-BdL0EBBo.js} +1 -1
- package/dist/assets/{index-Blc0lQcO.js → index-BfvNFce6.js} +1 -1
- package/dist/assets/{index-Co3JrBLr.js → index-BrDzj3_R.js} +1 -1
- package/dist/assets/{index-D3_NSRjd.js → index-C3UQMAkF.js} +1 -1
- package/dist/assets/{index-Dx95ER6O.js → index-C3q33eZl.js} +1 -1
- package/dist/assets/{index-CBTLvRHC.js → index-C4LMPu9u.js} +1 -1
- package/dist/assets/{index-BGI6bUJP.js → index-CJBZPdm6.js} +1 -1
- package/dist/assets/{index-DKrhe0Pd.js → index-CR_2MaC1.js} +1 -1
- package/dist/assets/{index-CE0mBRzM.js → index-CUztA_gz.js} +1 -1
- package/dist/assets/{index-ZTQq6T3W.js → index-CkbP6S_A.js} +1 -1
- package/dist/assets/{index-CAo0UcQ2.js → index-Cmy0GHU-.js} +1 -1
- package/dist/assets/{index-D_qCD-1x.js → index-Ctog4pYE.js} +1 -1
- package/dist/assets/{index-6hnZjYIo.js → index-CveYHk3t.js} +1 -1
- package/dist/assets/{index-BGXvULAc.js → index-D0RT0rzU.js} +1 -1
- package/dist/assets/{index-De9X8iTH.js → index-D53ihNsv.js} +1 -1
- package/dist/assets/{index-f7aL1bUo.js → index-D6q9zEjn.js} +5 -5
- package/dist/assets/{index-Cpw6Ga8g.js → index-DQo_Dew3.js} +1 -1
- package/dist/assets/{index-cqDbkK4O.js → index-DTSardYw.js} +1 -1
- package/dist/assets/{index-AO3oCF1x.js → index-DfTYGL67.js} +3 -3
- package/dist/assets/index-DnLx-UdH.js +68 -0
- package/dist/assets/{index-CeV4jn0N.js → index-DpVeIVbC.js} +1 -1
- package/dist/assets/{index-guvEPGrM.js → index-DrdqOXJL.js} +3 -3
- package/dist/assets/{index-DBP_eUf8.js → index-DtsnjFBd.js} +1 -1
- package/dist/assets/{index-C4Q4NeqR.js → index-Dy-ye0PE.js} +1 -1
- package/dist/assets/{index-BHdqgom8.js → index-DzlR4ROA.js} +2 -2
- package/dist/assets/{index-BKhW6tEi.js → index-EKqCJff8.js} +1 -1
- package/dist/assets/{index-o8JHOBc-.js → index-RRgjvIfT.js} +1 -1
- package/dist/assets/{index-mgj182ld.js → index-RrRN76hq.js} +1 -1
- package/dist/assets/{index-Mn9Cn8cU.js → index-UbiaSDM9.js} +1 -1
- package/dist/assets/{index-BsbdXNYr.js → index-aiikLstk.js} +1 -1
- package/dist/assets/{index-CgsfYcwc.js → index-ffNDefbl.js} +1 -1
- package/dist/assets/{index-DGNm6YxS.js → index-fiBRRSS-.js} +1 -1
- package/dist/assets/{index-BPHA36fg.js → index-po1Du4Ca.js} +1 -1
- package/dist/assets/{index-Dj8gJMNb.js → index-qSHb4AGp.js} +1 -1
- package/dist/assets/{index-ChCCjycd.js → index-sw48VBzs.js} +1 -1
- package/dist/assets/{index-DBjm0dlo.js → index-vCyUMIWI.js} +1 -1
- package/dist/assets/{index-D-FCWV-1.js → index-x2vTLzR6.js} +1 -1
- package/dist/assets/{index.es-39a3Nx9Z.js → index.es-C2y5LgUg.js} +1 -1
- package/dist/assets/{index.esm-VCHOqK12.js → index.esm-DNLYWMPY.js} +1 -1
- package/dist/assets/{info-addon.es-BC4uTAVC.js → info-addon.es-OU9D4WD4.js} +1 -1
- package/dist/assets/{info.es-BOB5BDAa.js → info.es-BYpWwfiq.js} +1 -1
- package/dist/assets/{install-from-url-BlpJ_JCL.js → install-from-url-BHRJMyoo.js} +1 -1
- package/dist/assets/{invitation-B9vV54jI.js → invitation-4BcBcG3g.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-5RuRfdDZ.js → is-path-prefix-equal-QODAXh-c.js} +1 -1
- package/dist/assets/{isEqual-BMA5WXPh.js → isEqual-CFOAIOWs.js} +1 -1
- package/dist/assets/{item-BCjdddLT.js → item-DinHwjuB.js} +1 -1
- package/dist/assets/{javascript.es-CKHSRONz.js → javascript.es-BZ4hu16-.js} +1 -1
- package/dist/assets/{jump-to-line.es-BGiUhkkZ.js → jump-to-line.es-ds6uZCNW.js} +1 -1
- package/dist/assets/{jump.es-jlQKmx9y.js → jump.es-Dow2EsmT.js} +1 -1
- package/dist/assets/{line-BQ1AqKfx.js → line-Cpeu8572.js} +3 -3
- package/dist/assets/{lint.es-Ccw618G7.js → lint.es-BumMccTK.js} +1 -1
- package/dist/assets/{lint.es2-EOTuUPIZ.js → lint.es2-BzVHBAgd.js} +1 -1
- package/dist/assets/{lint.es3-DvHlvUn_.js → lint.es3-ziEStM1n.js} +1 -1
- package/dist/assets/{list-header-RtdpLA8N.js → list-header-5GKfEIKg.js} +1 -1
- package/dist/assets/{log-C240GbUG.js → log-BzeVufdm.js} +1 -1
- package/dist/assets/{lottie-DlriAay1.js → lottie-Dittdj4N.js} +1 -1
- package/dist/assets/{matchbrackets.es-C5JsbqKa.js → matchbrackets.es-DqPFoH1c.js} +1 -1
- package/dist/assets/{memory-DmcKHXq0.js → memory-CVFS6lDi.js} +1 -1
- package/dist/assets/{mode.es-mDILARJO.js → mode.es-tUbE6Sz4.js} +1 -1
- package/dist/assets/{mode.es2-BBLB98Wl.js → mode.es2-DOWb3-oK.js} +1 -1
- package/dist/assets/{mode.es3-Bp7C6PMW.js → mode.es3-BcjY2hx8.js} +1 -1
- package/dist/assets/{onlineParser.es-BoSRyIcT.js → onlineParser.es-BdeAPFTn.js} +1 -1
- package/dist/assets/{overview-_Rxbv1NB.js → overview-D7vbgmTw.js} +1 -1
- package/dist/assets/{react-DuJ5ZkKy.js → react-Dervdh0W.js} +3 -3
- package/dist/assets/{redux-B1Qumh5U.js → redux-C4Q_CSvp.js} +1 -1
- package/dist/assets/{resource-dialog-WWRI08PV.js → resource-dialog-Byph1CoJ.js} +1 -1
- package/dist/assets/{runtime-5oxnTidw.js → runtime-7TSih23R.js} +1 -1
- package/dist/assets/{schema-5ne-6Bp4.js → schema-Bq2ly-4o.js} +1 -1
- package/dist/assets/sdk-aTAcQDv-.js +1 -0
- package/dist/assets/{search.es-R2FORdVe.js → search.es-CMLj29wb.js} +1 -1
- package/dist/assets/{searchcursor.es-DO5Jf4gN.js → searchcursor.es-eHb4SABv.js} +1 -1
- package/dist/assets/service-FolPIcUS.js +1 -0
- package/dist/assets/{shorten-label-CZlXdSOl.js → shorten-label-BSQEIROA.js} +1 -1
- package/dist/assets/{show-hint.es-Bx2uNweg.js → show-hint.es-Bn3zEE4X.js} +1 -1
- package/dist/assets/{slicedToArray-Bg3ityWL.js → slicedToArray-ROu8OO6l.js} +1 -1
- package/dist/assets/{spaces-fC9EAj53.js → spaces-CKLphlMZ.js} +1 -1
- package/dist/assets/{status-BXJ91n7W.js → status-6F7XJ5dp.js} +1 -1
- package/dist/assets/{sublime.es-DHZMehLW.js → sublime.es-CYqGOBLs.js} +1 -1
- package/dist/assets/{switch-control-BuiDLx3e.js → switch-control-BxRwCbFm.js} +1 -1
- package/dist/assets/{table-icons-bAAAjGK1.js → table-icons-BXeoVsYd.js} +2 -2
- package/dist/assets/{team-QnBuJ2rq.js → team-nBwKhOsv.js} +1 -1
- package/dist/assets/{toUpper-CFRRtQH6.js → toUpper-BBB_TInl.js} +1 -1
- package/dist/assets/{traffic-CNgUOmfv.js → traffic-BgMFjNc5.js} +1 -1
- package/dist/assets/{url-evaluation-BTdmiGRO.js → url-evaluation-C7b_jErN.js} +1 -1
- package/dist/assets/{url-join-CiWL3EAW.js → url-join-LN7aIhdX.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-CMsH-TzL.js → use-blocklet-info-for-connect-did-spaces-Dw7UZ6Jz.js} +1 -1
- package/dist/assets/{useLocalStorage-D6Ii7-Uk.js → useLocalStorage-F8gidp1W.js} +1 -1
- package/dist/assets/{useThemeProps-BlrL4N8K.js → useThemeProps-CRpVKi5P.js} +1 -1
- package/dist/assets/{util-DSMcrouF.js → util-DjDIVQpP.js} +1 -1
- package/dist/assets/{wait-container-BRhHYdS-.js → wait-container-fwTsXfbb.js} +1 -1
- package/dist/assets/{withStyles-CHrv3QJu.js → withStyles-unQnV9F2.js} +1 -1
- package/dist/assets/{wrap-locale-D-OFTljj.js → wrap-locale-CCm3KObK.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-DU3a7Mie.js +0 -1
- package/dist/assets/DeleteOutline-Dy_sSwNK.js +0 -1
- package/dist/assets/api-_ETsEoGC.js +0 -1
- package/dist/assets/blocklet-D8qZlMLE.js +0 -1
- package/dist/assets/getValidReactChildren-86LVJ_ka.js +0 -1
- package/dist/assets/index-CqrpWUFf.js +0 -21
- package/dist/assets/index-DUXbXc9f.js +0 -68
- package/dist/assets/sdk-Go6IWQIY.js +0 -1
- package/dist/assets/service-VyIQYaE6.js +0 -1
|
@@ -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-BN-HHDJJ.js","./index-BojVbZw0.js","./index-8azRnZez.js","./click-to-copy-ZbSHXJko.js","./withStyles-unQnV9F2.js","./index-Ctog4pYE.js","./useLocalStorage-F8gidp1W.js","./index-DTSardYw.js","./FilterList-FEjK2Fox.js","./useThemeProps-CRpVKi5P.js","./Select-C44-YCyD.js","./Delete-DFFe3xyW.js","./InputLabel-BOR0LpK5.js","./TextField-BjNW7Bjw.js","./LastPage-BmNCoOR7.js","./index-CUztA_gz.js","./redux-C4Q_CSvp.js","./Search-CjX0JQkS.js","./index-po1Du4Ca.js","./MoreVert-C_-FQbwq.js","./status-6F7XJ5dp.js","./url-evaluation-C7b_jErN.js","./actions-DGcLEhc9.js","./ButtonGroup-3w5LvaA0.js","./getValidReactChildren-Y-QNoefA.js","./index-BdL0EBBo.js","./isEqual-CFOAIOWs.js","./install-from-url-BHRJMyoo.js","./schema-Bq2ly-4o.js","./index-C4LMPu9u.js","./Stepper-BRwbb4LL.js","./app-avatar-BvOjNwzf.js","./Add-B6ZIiZST.js","./index-RRgjvIfT.js","./ExpandMore-CFYbzpsT.js","./index-BatYQHX2.js","./index-RrRN76hq.js","./url-join-LN7aIhdX.js","./Skeleton-4s7n7VqF.js","./Close-DzKkufzk.js","./lottie-Dittdj4N.js","./wait-container-fwTsXfbb.js","./Launch-BN3gZaS3.js","./DeleteOutline-yYcRq6ni.js","./spaces-CKLphlMZ.js","./api-Rcl-3MyM.js","./index-3tln4L6C.js","./item-DinHwjuB.js","./index-DQo_Dew3.js","./index-ZG7jWpak.js","./index-CR_2MaC1.js","./InputAdornment-DT4h3g9o.js","./preact.module-DJUF--8d.js","./Done-3-QQ_TOf.js","./delete-confirm-CGv3y6py.js","./shorten-label-BSQEIROA.js","./blocklet-d8bc_SQ4.js","./item-D_j8BgsJ.css","./ArrowDropDown-CTOfLnwc.js","./Breadcrumbs-s9U9zLgF.js","./index-DpVeIVbC.js","./index-Cmy0GHU-.js","./index.esm-DNLYWMPY.js","./switch-control-BxRwCbFm.js","./is-path-prefix-equal-QODAXh-c.js","./Link-Dxx2K6Ua.js","./logo-BKA11TRi.js","./LoadingButton-DdNqcAhj.js","./Public-CcSZDx4-.js","./CheckCircle-DE_y9vib.js","./ChevronRight-93HrdGCM.js","./Edit-wLc7o2cw.js","./Https-BPSFFlg6.js","./Slider-C0JALcDq.js","./index-BQmNmoac.js","./download-CAroNPKK.js","./download-D33dFtt_.css","./index-fiBRRSS-.js","./audit-logs-D4-Bez8p.js","./index-D0RT0rzU.js","./index-D4PP6P2d.css","./Pagination-BfGbGnHW.js","./index-D53ihNsv.js","./index-qSHb4AGp.js","./Loop-COqhNCYW.js","./ViewList-CHj6lFwi.js","./list-header-5GKfEIKg.js","./index-ffNDefbl.js","./resource-dialog-Byph1CoJ.js","./index-C3UQMAkF.js","./index-CkbP6S_A.js","./team-nBwKhOsv.js","./sdk-aTAcQDv-.js","./actions-TtrKwsqz.js","./MoreHoriz-IPlU_Vvy.js","./index-EKqCJff8.js","./EditIcon-BCVTD6hP.js","./LockIcon-BB4v3xDA.js","./Google-C9I0SVEJ.js","./ToggleButtonGroup-DtqIWzr-.js","./detail-DmU03eC7.js","./index-CJBZPdm6.js","./index-x2vTLzR6.js","./invitation-4BcBcG3g.js","./index-CveYHk3t.js","./wrap-locale-CCm3KObK.js","./index-DrdqOXJL.js","./index-BApbAOLy.js","./index-DtsnjFBd.js","./agreement-DXIl-xR_.js","./index-BfvNFce6.js","./index-Dy-ye0PE.js","./index-D6q9zEjn.js","./index-C7igR7se.css","./index-aiikLstk.js","./traffic-BgMFjNc5.js","./iframe-C3LtsJmK.js","./ChevronLeft-CvWKad8W.js","./chart-TIGkq42g.js","./bundle-avatar-CW4zHZR5.js","./memory-CVFS6lDi.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)),Is=(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),Ro=(a,j,_e)=>(Pp(a,j,"access private method"),_e);var Ip=(a,j,_e,et)=>({set _(tt){Uo(a,j,tt,_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 tt in et)if(tt!=="default"&&!(tt in a)){const nt=Object.getOwnPropertyDescriptor(et,tt);nt&&Object.defineProperty(a,tt,nt.get?nt:{enumerable:!0,get:()=>et[tt]})}}}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 tt of document.querySelectorAll('link[rel="modulepreload"]'))et(tt);new MutationObserver(tt=>{for(const nt of tt)if(nt.type==="childList")for(const rt of nt.addedNodes)rt.tagName==="LINK"&&rt.rel==="modulepreload"&&et(rt)}).observe(document,{childList:!0,subtree:!0});function _e(tt){const nt={};return tt.integrity&&(nt.integrity=tt.integrity),tt.referrerPolicy&&(nt.referrerPolicy=tt.referrerPolicy),tt.crossOrigin==="use-credentials"?nt.credentials="include":tt.crossOrigin==="anonymous"?nt.credentials="omit":nt.credentials="same-origin",nt}function et(tt){if(tt.ep)return;tt.ep=!0;const nt=_e(tt);fetch(tt.href,nt)}})();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 tt=Object.getOwnPropertyDescriptor(a,et);Object.defineProperty(_e,et,tt.get?tt:{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
|
|
@@ -2493,4 +2493,4 @@ ${et}
|
|
|
2493
2493
|
${a=>a.scrollable?"":"overflow: hidden"};
|
|
2494
2494
|
}
|
|
2495
2495
|
`;function GlobalSubscriber(){const{t:a}=useLocaleContext(),{session:j}=useSessionContext$1(),{info:_e,refresh:et}=useNodeContext();return useSubscription(constant.TeamEvents.userUpdated,({teamDid:tt,user:nt})=>{tt===_e.did&&nt&&!nt.approved&&j&&j.user&&j.user.did===nt.did&&(toast.warning(a("session.forbidLogin"),{autoHideDuration:10*1e3}),j.logout())}),useSubscription(constant$3.EVENTS.NOTIFICATION_CREATE,tt=>{tt.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()()},tt=async(it,ot,...ut)=>{_e++;const st=(async()=>it(...ut))();ot(st);try{await st}catch{}et()},nt=(it,ot,...ut)=>{j.enqueue(tt.bind(null,it,ot,...ut)),(async()=>(await Promise.resolve(),_e<a&&j.size>0&&j.dequeue()()))()},rt=(it,...ot)=>new Promise(ut=>{nt(it,ut,...ot)});return Object.defineProperties(rt,{activeCount:{get:()=>_e},pendingCount:{get:()=>j.size},clearQueue:{value:()=>{j.clear()}}}),rt};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=`
|
|
2496
|
-
`;browser.homedir=function(){return"/"};(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(ut){return ut&&ut.__esModule?ut:{default:ut}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasMountPoint=a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.getBlockletEngine=void 0;const _e=j(browser),et=constant,tt=ut=>{if(ut===void 0)throw new Error("blocklet meta param is required");const{engine:st}=ut;if(!st)return{interpreter:"node",source:""};if(!Array.isArray(st))return st;const ft=_e.default.platform(),dt=st.find(ht=>ht.platform===ft);if(!dt)throw new Error(`can not find a proper engine interpreter on ${ft}`);return dt};a.getBlockletEngine=tt;const nt=ut=>(ut==null?void 0:ut.group)===et.BlockletGroup.gateway;a.isGatewayBlocklet=nt;const rt=ut=>(ut==null?void 0:ut.group)===et.BlockletGroup.pack;a.isPackBlocklet=rt;const it=ut=>!!(ut!=null&&ut.main)||(0,a.getBlockletEngine)(ut||{}).interpreter==="blocklet";a.hasStartEngine=it;const ot=ut=>((0,a.hasStartEngine)(ut)||((ut==null?void 0:ut.interfaces)||[]).find(st=>st.type===et.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,a.isGatewayBlocklet)(ut)===!1;a.hasMountPoint=ot})(engine);(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(an){return an&&an.__esModule?an:{default:an}};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=Yt;const _e=j(get_1),et=j(uniq_1),tt=require$$6,nt=j(pLimit_1),rt=j(constant$3),it=constant,ot=engine;Object.defineProperty(a,"hasStartEngine",{enumerable:!0,get:function(){return ot.hasStartEngine}}),Object.defineProperty(a,"isGatewayBlocklet",{enumerable:!0,get:function(){return ot.isGatewayBlocklet}}),Object.defineProperty(a,"isPackBlocklet",{enumerable:!0,get:function(){return ot.isPackBlocklet}});const{NODE_SERVICES:ut,SLOT_FOR_IP_DNS_SITE:st,WHO_CAN_ACCESS:ft,WHO_CAN_ACCESS_PREFIX_ROLES:dt}=rt.default,ht=(an,_n=[])=>`${_n.map(Bn=>Bn&&Bn.meta?Bn.meta.did:"").join("/")}${_n.length?"/":""}${an&&an.meta?an.meta.did:""}`;a.getComponentId=ht;const mt=(an,_n=[])=>`${_n.map(Bn=>Bn&&Bn.meta?Bn.meta.name:"").join("/")}${_n.length?"/":""}${an&&an.meta?an.meta.name:""}`;a.getComponentName=mt;const bt=an=>`${an.meta.bundleName}@${an.meta.version}`;a.getComponentBundleId=bt;const Rt=an=>{if(!an)return"";const _n=an.split("/");return _n.pop(),!_n.length||(_n[_n.length-1].startsWith("@")&&_n.pop(),!_n.length)?"":_n.join("/")};a.getParentComponentName=Rt;const St=(an,_n,{parallel:Bn=!1,concurrencyLimit:Dn=5,sync:sn,params:Vt,_parent:Kt,_root:hn,_level:kn=0,_tasks:An,_ancestors:In=[],_limit:qn}={})=>{const Fn=hn||Kt||an,Un=ht(an,In),tr=In.concat(an);if(sn){const Rr=_n(an,{parent:Kt,root:Fn,level:kn,params:Vt,ancestors:In,id:Un});if(an.children)for(const br of an.children)St(br,_n,{sync:sn,params:Rr,_parent:an,_root:Fn,_level:kn+1,_ancestors:tr});return null}if(!Bn)return new Promise(async(Rr,br)=>{try{const ir=await _n(an,{parent:Kt,root:Fn,level:kn,ancestors:In,params:Vt,id:Un});if(an.children)for(const Pr of an.children)await St(Pr,_n,{params:ir,_parent:an,_root:Fn,_level:kn+1,_ancestors:tr});Rr(null)}catch(ir){br(ir)}});const er=qn||(0,nt.default)(Dn),Jn=An||[];if(Jn.push(er(()=>_n(an,{parent:Kt,root:Fn,level:kn,ancestors:In,id:Un}))),an.children)for(const Rr of an.children)St(Rr,_n,{parallel:Bn,_parent:an,_root:Fn,_level:kn+1,_tasks:Jn,_ancestors:tr,_limit:er});return An?null:Promise.all(Jn)};a.forEachBlocklet=St;const Dt=(an,_n)=>St(an,_n,{sync:!0});a.forEachBlockletSync=Dt;const Pt=(an,_n,{parallel:Bn=!1,concurrencyLimit:Dn=5,sync:sn}={})=>{if(sn){if(an.children)for(const hn of an.children)_n(hn);return null}if(!Bn)return new Promise(async(hn,kn)=>{try{if(an.children)for(const An of an.children)await _n(An);hn(null)}catch(An){kn(An)}});const Vt=(0,nt.default)(Dn),Kt=[];if(an.children)for(const hn of an.children)Kt.push(Vt(()=>_n(hn)));return Promise.all(Kt)};a.forEachComponentV2=Pt;const Lt=(an,_n)=>Pt(an,_n,{sync:!0});a.forEachComponentV2Sync=Lt;const qt=(an,_n,Bn)=>St(an,(Dn,sn)=>sn.level===0?{}:_n(Dn,sn),Bn);a.forEachChild=qt;const Mt=(an,_n)=>qt(an,_n,{sync:!0});a.forEachChildSync=Mt;const Ut=(an,_n,{_ancestors:Bn=[],returnAncestors:Dn=!1}={})=>{if(!_n)return null;if(_n(an,{ancestors:Bn}))return Dn?{component:an,ancestors:Bn}:an;for(const sn of an.children||[]){const Vt=Bn.concat(an),Kt=Ut(sn,_n,{_ancestors:Vt,returnAncestors:Dn});if(Kt)return Kt}return null};a.findComponent=Ut;const Jt=(an,_n,{returnAncestors:Bn=!1}={})=>(Array.isArray(_n)&&(_n=_n.join("/")),Ut(an,(Dn,{ancestors:sn})=>{const Vt=ht(Dn,sn);return _n===Vt},{returnAncestors:Bn}));a.findComponentById=Jt;const un=(an,_n)=>{if(!_n)return null;for(const Bn of an.children||[])if(_n(Bn,an))return Bn;return null};a.findComponentV2=un;const dn=(an,_n)=>_n?(Array.isArray(_n)&&(_n=_n.join("/")),un(an,(Bn,Dn)=>{if(_n.includes("/")){const sn=ht(Bn,[Dn]);return _n===sn}return _n===Bn.meta.did})):null;a.findComponentByIdV2=dn;const Gt=(an,_n)=>{if(!_n)return[];const Bn=[];for(const Dn of an.children||[])_n(Dn,an)&&Bn.push(Dn);return Bn};a.filterComponentsV2=Gt;const Ot=an=>!!an&&!!(an.key||an.name)&&!an.secure&&an.shared!==!1&&!it.BLOCKLET_CONFIGURABLE_KEY[an.key||an.name];a.isEnvShareableToClient=Ot;const $t=an=>!!an&&!!(an.key||an.name)&&!an.secure&&!!an.shared&&!it.BLOCKLET_CONFIGURABLE_KEY[an.key||an.name];a.isEnvShareable=$t;const ct=(an,_n)=>{const Bn={};return!an||!_n||(Array.isArray(an.configs)&&an.configs.forEach(({key:Dn,value:sn,secure:Vt})=>{if(!$t({key:Dn,secure:Vt,shared:!0}))return;const Kt=(an.configObj||{})[Dn]||sn,hn=(_n.configs||[]).find(kn=>kn.key===Dn);(!hn||$t(hn)||!hn.value&&!(_n.configObj||{})[hn.key])&&(Bn[Dn]=Kt)}),(an.configs||[]).forEach(({key:Dn,value:sn})=>{[it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(Dn)&&(Bn[it.CHAIN_PROP_MAP[Dn]]=sn)})),Bn};a.getSharedConfigObj=ct;const pt=an=>an.key.startsWith(it.BLOCKLET_PREFERENCE_PREFIX)===!0;a.isPreferenceKey=pt;const xt=(an,_n)=>!!(an.required&&(!an.value&&!_n[an.key]||Object.values(it.CHAIN_PROP_MAP).includes(an.key)&&Object.keys(_n).includes(an.key)&&!_n[an.key])),Et=(an={})=>{const _n=[];return Lt(an,Bn=>{var Vt;if(((Vt=Bn.meta)==null?void 0:Vt.group)===it.BlockletGroup.gateway)return;const Dn=Bn.configs||[],sn=ct(an,Bn);Dn.forEach(Kt=>{xt(Kt,sn)&&_n.push({did:Bn.meta.did,key:Kt.key,description:Kt.description})})}),_n.filter(Bn=>!pt(Bn))};a.getAppMissingConfigs=Et;const wt=(an={},_n={})=>{const Bn=[],Dn=an.configs||[],sn=ct(_n,an);return Dn.forEach(Vt=>{xt(Vt,sn)&&Bn.push({did:an.meta.did,key:Vt.key,description:Vt.description})}),Bn};a.getComponentMissingConfigs=wt;const kt=an=>an.payment?(an.payment.price||[]).map(Bn=>Bn.value||0).every(Bn=>Bn===0):!0;a.isFreeBlocklet=kt;const Tt=an=>!an.payment||!an.payment.componentPrice?!0:!an.payment.componentPrice.length;a.isFreeComponent=Tt;const At=an=>an&&(St(an,_n=>{_n.configs&&(_n.configs=_n.configs.filter(Bn=>!pt(Bn)),_n.configs.forEach(Bn=>{Bn.secure&&(Bn.value=Bn.value?"__encrypted__":"")})),(_n.environments||[]).forEach(Bn=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(Bn.key)&&(Bn.value="__encrypted__")}),(_n.migratedFrom||[]).forEach(Bn=>{Bn.appSk="__encrypted__"}),delete an.configObj,delete an.environmentObj},{sync:!0}),an);a.wipeSensitiveData=At;const vt=an=>{if(!an)return!1;const _n=an.environments.find(Bn=>Bn.key==="BLOCKLET_DELETABLE");return _n?_n.value==="yes":!0};a.isDeletableBlocklet=vt;const It=an=>{let _n=!1;return Dt(an,Bn=>{Bn.meta.group!==it.BlockletGroup.gateway&&(_n=!0)}),_n};a.hasRunnableComponent=It;const rn=(an,_n=!1)=>{if(!an)return"";const{meta:Bn}=an;let Dn;if(!_n&&an.environments){const sn=an.environments.find(Vt=>Vt.key==="BLOCKLET_APP_NAME");sn&&sn.value&&(Dn=sn.value)}return Dn||Bn.title||Bn.name};a.getAppName=rn,a.getDisplayName=rn;const jt=(an,_n=!1)=>{if(!an)return"";const{meta:Bn}=an;let Dn;if(!_n&&an.environments){const sn=an.environments.find(Vt=>Vt.key==="BLOCKLET_APP_DESCRIPTION");sn&&sn.value&&(Dn=sn.value)}return Dn||Bn.description||Bn.name};a.getAppDescription=jt;function Yt(an){var Dn,sn,Vt;const _n=(Vt=(sn=(Dn=an==null?void 0:an.site)==null?void 0:Dn.domainAliases)==null?void 0:sn.sort((Kt,hn)=>{var kn,An,In,qn;return(kn=Kt.accessibility)!=null&&kn.accessible&&((An=hn.accessibility)!=null&&An.accessible)?+Kt.isProtected-+hn.isProtected:+((In=hn.accessibility)==null?void 0:In.accessible)-+((qn=Kt.accessibility)==null?void 0:qn.accessible)}))==null?void 0:Vt.map(Kt=>{var An;const hn=(An=Kt==null?void 0:Kt.domainStatus)!=null&&An.isHttps?"https://":"http://",kn=Kt==null?void 0:Kt.value;return`${hn}${kn}`}).filter(Boolean);return _n==null?void 0:_n[0]}const Wt=an=>{an&&(Dt(an,_n=>{_n.status=(0,it.fromBlockletStatus)(_n.status),_n.source!==void 0&&(_n.source=(0,it.fromBlockletSource)(_n.source))}),an.settings&&(an.settings.children||[]).forEach(_n=>{Dt(_n,Bn=>{Bn.status=(0,it.fromBlockletStatus)(Bn.status),Bn.source!==void 0&&(Bn.source=(0,it.fromBlockletSource)(Bn.source))})}))};a.fixBlockletStatus=Wt;const Xt=an=>{if(!an)return null;const _n=an.meta||an||{},{interfaces:Bn=[]}=_n;return Array.isArray(Bn)?Bn.find(Dn=>Dn.type===it.BLOCKLET_INTERFACE_TYPE_WEB):null};a.findWebInterface=Xt;const mn=an=>{if(!an)return null;const _n=Xt(an),{ports:Bn}=an;return!_n||!Bn?null:Bn[_n.port]};a.findWebInterfacePort=mn;const Tn=(an,_n)=>{const Bn=[_n];_n===ut.AUTH&&Bn.push(ut.AUTH_SERVICE);const Dn=Xt(an);return Dn?(Dn.services||[]).find(sn=>Bn.includes(sn.name)):null};a.findServiceFromMeta=Tn;const zt=an=>{if(!an)return ft.ALL;if((0,_e.default)(an,"settings.whoCanAccess"))return an.settings.whoCanAccess;const _n=Tn(an.meta,ut.AUTH);return(0,_e.default)(_n,"config.whoCanAccess")?_n.config.whoCanAccess:ft.ALL};a.getWhoCanAccess=zt;const Bt=(an,_n)=>{const Bn=(an.configs||[]).find(sn=>sn.key===it.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(Bn)return Bn.value;if(_n&&(0,_e.default)(_n,"settings.whoCanAccess")&&(0,_e.default)(_n,"settings.whoCanAccess")!==ft.ALL)return(0,_e.default)(_n,"settings.whoCanAccess");const Dn=Tn(an.meta,ut.AUTH);return(0,_e.default)(Dn,"config.whoCanAccess")?Dn.config.whoCanAccess:ft.ALL};a.getComponentWhoCanAccess=Bt;const Zt=({request:an,baseUrl:_n})=>{const Bn=an.headers["x-blocklet-did"]||"",Dn=an.headers["x-blocklet-real-did"]||"",sn=an.headers["x-path-prefix"]||"/",Vt=an.headers["x-group-path-prefix"]||"/";let Kt=_n;return Bn!==Dn&&sn!==Vt&&(Kt=(0,tt.joinURL)(Kt,"/").replace(sn,Vt)),Kt};a.getConnectAppUrl=Zt;const Qt=(an,_n)=>{const Bn=(_n||"").includes(":")?":":/\./;return(an||"").replace(st,(_n||"").replace(new RegExp(Bn,"g"),"-"))};a.replaceSlotToIp=Qt;const ln=an=>{const _n=Object.entries(it.CHAIN_INFO_CONFIG).reduce((Bn,Dn)=>{const[sn,[Vt,Kt]]=Dn;return Bn[Vt]=(0,_e.default)(an,sn)||Kt,Bn},{});return _n.type==="ethereum"&&_n.id==="none"&&(_n.id="1"),_n};a.getChainInfo=ln;const En=an=>{const _n=ln({});if(!an)return _n;const Bn=ln(an.configObj);if(Bn.host!=="none")return Bn;let Dn;return Mt(an,sn=>{if(Dn&&Dn.host!=="none")return;const Vt=ln(sn.configObj);Vt.host!=="none"&&(Dn=Vt)}),Dn||_n};a.getBlockletChainInfo=En;const yn=an=>!!(an!=null&&an.controller);a.isExternalBlocklet=yn;const fn=an=>an.whoCanAccess.startsWith(dt)?an.whoCanAccess.substring(dt.length).split(","):[];a.getRolesFromAuthConfig=fn;const xn=an=>{const _n=Array.isArray(an.migratedFrom)?an.migratedFrom.map(Bn=>Bn.appDid):[];return(0,et.default)([an.appDid,an.appPid,..._n].filter(Boolean))};a.getBlockletAppIdList=xn;const wn=an=>{const _n=[];return an&&Dt(an,Bn=>{var sn;(((sn=Bn.meta)==null?void 0:sn.interfaces)||[]).filter(Vt=>Vt.type===it.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(Vt=>{const Kt=Vt.port||{};_n.push({name:Vt.name,protocol:Vt.protocol,port:Number(Kt.external),upstreamPort:Number((Bn.ports||{})[Kt.internal])})})}),_n};a.getBlockletServices=wn;const Sn=an=>[it.BlockletStatus.downloading,it.BlockletStatus.waiting,it.BlockletStatus.starting,it.BlockletStatus.installing,it.BlockletStatus.stopping,it.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(an);a.isInProgress=Sn;const zn=an=>[it.BlockletStatus.added,it.BlockletStatus.waiting,it.BlockletStatus.downloading,it.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(an);a.isBeforeInstalled=zn;const Zn=an=>[it.BlockletStatus.running,"running"].includes(an);a.isRunning=Zn;const vn=an=>[it.BlockletStatus.running,it.BlockletStatus.waiting,it.BlockletStatus.downloading,"running","waiting","downloading"].includes(an);a.isAccessible=vn;const Ln=(an,{type:_n,did:Bn}={type:"",did:""})=>{var Dn,sn,Vt;return an?!(0,ot.hasStartEngine)(an.meta)&&((Vt=(sn=(Dn=an.meta)==null?void 0:Dn.resource)==null?void 0:sn.bundles)==null?void 0:Vt.length)>0&&(an.meta.resource.bundles||[]).some(Kt=>Kt.type===_n&&Kt.did===Bn):!1};a.hasResourceType=Ln,a.default={isFreeBlocklet:kt,isFreeComponent:Tt,forEachBlocklet:St,forEachBlockletSync:Dt,forEachChild:qt,forEachChildSync:Mt,forEachComponentV2:Pt,forEachComponentV2Sync:Lt,isDeletableBlocklet:vt,getSharedConfigObj:ct,getAppMissingConfigs:Et,getComponentMissingConfigs:wt,isEnvShareableToClient:Ot,isEnvShareable:$t,wipeSensitiveData:At,hasRunnableComponent:It,getAppName:rn,getAppDescription:jt,getAppUrl:Yt,getDisplayName:rn,fixBlockletStatus:Wt,findWebInterface:Xt,findWebInterfacePort:mn,findServiceFromMeta:Tn,getWhoCanAccess:zt,getComponentWhoCanAccess:Bt,replaceSlotToIp:Qt,getComponentId:ht,getComponentName:mt,getComponentBundleId:bt,findComponent:Ut,findComponentById:Jt,findComponentV2:un,findComponentByIdV2:dn,filterComponentsV2:Gt,getParentComponentName:Rt,getConnectAppUrl:Zt,getChainInfo:ln,getBlockletChainInfo:En,isExternalBlocklet:yn,isPreferenceKey:pt,getRolesFromAuthConfig:fn,getBlockletServices:wn,isInProgress:Sn,isBeforeInstalled:zn,isRunning:Zn,isAccessible:vn,isGatewayBlocklet:ot.isGatewayBlocklet,isPackBlocklet:ot.isPackBlocklet,hasStartEngine:ot.hasStartEngine,hasResourceType:Ln}})(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),tt=joinURL(_e,`/api/blocklets/${a.did}/blocklet.json`),nt=new URL(joinURL(et,"/launch-blocklet/agreement"));return nt.searchParams.set("blocklet_meta_url",tt),nt.searchParams.set("from",window.location.href),nt.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,tt;j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(tt=(et=_e==null?void 0:_e.meta)==null?void 0:et.capabilities)!=null&&tt.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(tt=>{tt.from.pathPrefix=normalizePathPrefix$1(tt.from.pathPrefix||"/")}),a.site.rules=sortBy$1(a.site.rules,tt=>tt.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,tt=>{tt.runtimeInfo&&(tt.runtimeInfo.startAt=new Date-tt.runtimeInfo.uptime)});else if(j==="merge-old"&&_e){a.site.domainAliases=_e.site.domainAliases,a.appRuntimeInfo=_e.appRuntimeInfo;const tt={};util.forEachBlockletSync(_e,(nt,{id:rt})=>{tt[rt]=nt}),util.forEachBlockletSync(a,(nt,{id:rt})=>{const it=tt[rt];it&&(nt.runtimeInfo=it.runtimeInfo,nt.diskInfo=it.diskInfo,nt.engine=it.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 tt={...et},nt=j.find(rt=>rt.meta.did===et.meta.did);return nt&&_e.forEach(rt=>{tt[rt]=nt[rt]}),tt}):j;function BlockletsProvider({children:a}){const j=useNodeContext(),_e=createClient(),[et,tt]=reactExports.useState(null),[nt,rt]=reactExports.useState(!1),[it,ot]=reactExports.useState([]),[ut,st]=reactExports.useState([]),[ft,dt]=reactExports.useState(!1),ht=(Lt,qt)=>{util.isExternalBlocklet(Lt)?st(qt):ot(qt)},mt=4,bt=async({silent:Lt=!0,retries:qt=mt,updates:Mt,useCache:Ut=!0}={})=>{Lt||rt(!0);try{tt(null);const{blocklets:Jt}=await _e.getBlocklets({input:{useCache:Ut}});for(const Gt of Jt)await fixBlocklet(Gt,{getIP:getIp});const un=Jt.filter(Gt=>!util.isExternalBlocklet(Gt)),dn=Jt.filter(util.isExternalBlocklet);ot(Gt=>mergeBlocklets(Gt,un,Mt)),st(Gt=>mergeBlocklets(Gt,dn,Mt)),rt(!1),dt(!0)}catch(Jt){qt>0?setTimeout(()=>bt({silent:Lt,retries:qt-1,useCache:Ut}),1e3):(rt(!1),tt(Jt))}},Rt=async Lt=>{try{const{blocklet:qt}=await j.api.getBlocklet({input:{did:Lt.meta.did,attachRuntimeInfo:!0}});await fixBlocklet(qt,{getIP:getIp}),ht(qt,Mt=>Mt.some(Ut=>Ut.meta.did===qt.meta.did)?Mt.map(Ut=>Ut.meta.did===qt.meta.did?qt:Ut):[...Mt,qt])}catch(qt){tt(qt)}},St=Lt=>{j.refresh(),Rt(Lt)};reactExports.useEffect(()=>{bt({silent:!1})},[]);const Dt=Lt=>{const qt={};util.forEachBlockletSync(Lt,(Mt,{id:Ut})=>{qt[Ut]=constant.fromBlockletStatus(Mt.status)}),ht(Lt,Mt=>Mt.map(Ut=>(Ut.meta.did===Lt.meta.did&&util.forEachBlockletSync(Ut,(Jt,{id:un})=>{qt[un]&&(Jt.status=qt[un])}),Ut)))};useSubscription(constant.BlockletEvents.added,Lt=>{Lt.status=constant.fromBlockletStatus(Lt.status),ht(Lt,qt=>[...qt,Lt])}),useSubscription(constant.BlockletEvents.removed,Lt=>{j.refresh(),ht(Lt,qt=>qt.filter(Mt=>Mt.meta.did!==Lt.meta.did))}),useSubscription(constant.BlockletEvents.statusChange,Dt),useSubscription(constant.BlockletEvents.installed,St),useSubscription(constant.BlockletEvents.upgraded,St),useSubscription(constant.BlockletEvents.updated,Rt),useSubscription(constant.BlockletEvents.startFailed,Rt);const Pt={loading:nt,error:et,data:it,externalData:ut,refresh:bt,initialized:ft,api:_e};return jsxRuntimeExports.jsx(Provider$2,{value:{blocklets:Pt},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:tt}=new URL(et);return urlEvaluation.isSlpDomain(tt)}catch(tt){return console.error(tt),!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:tt}=useNodeContext(),[nt]=useSearchParams(),rt=createClient(),it=nt.get("launchType"),ot=nt.get("fromLauncher"),ut=nt.get("blocklet_meta_url")||"",st=nt.get("nftId")||"",ft=nt.get("launcherSessionId")||"",dt=nt.get("launcherUrl")||"",ht=new URL(ut).origin,[mt,bt]=reactExports.useState({meta:null,appDid:nt.get("appDid")||null,sessionId:nt.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),Rt=(dn,Gt)=>bt(Ot=>({...Ot,appDid:dn,sessionId:Gt})),St=authorize({user:j.user,launchType:it,nftId:st}),[Dt,Pt]=reactExports.useState(null),[Lt,qt]=reactExports.useState(!0),Mt=reactExports.useMemo(()=>tt?getServerUrl(tt):"",[tt]),Ut=async dn=>{if(!dn)throw new Error("appDid should not be empty");const{blocklet:Gt}=await et.getBlocklet({input:{did:dn,attachConfig:!1}});if(!Gt)return null;const Ot=constant.BlockletStatus[Gt.status],$t=!!st,ct=Ot<constant.BlockletStatus.installed,pt=Ot===constant.BlockletStatus.installed,xt=Ot===constant.BlockletStatus.running;return bt(Et=>({...Et,isInstalled:pt,isRunning:xt,isExternal:$t,isInstalling:ct})),{isInstalled:pt,isRunning:xt,isExternal:$t,isInstalling:ct}},Jt=async()=>{qt(!0);try{if(!ut)throw new Error(_e("common.invalidParam"));const[{meta:dn,isFree:Gt,registryUrl:Ot},{launcherSession:$t,error:ct}]=await Promise.all([et.getBlockletMetaFromUrl({input:{url:ut,checkPrice:!0}}),ft?et.getLauncherSession({input:{launcherSessionId:ft,launcherUrl:dt}}):Promise.resolve({})]);if(ft&&!$t)throw new Error(`Launch session invalid: ${ct}`);if(!dn)throw new Error(_e("LaunchBlockletBlocklet.error.loadMetaFailed"));let pt={};St&&mt.appDid&&(pt=await Ut(mt.appDid)),bt(xt=>({...xt,...pt,meta:dn,isFree:Gt,registryUrl:Ot,launcherSession:$t}))}catch(dn){console.error(dn),Pt(dn.message)}finally{qt(!1)}};reactExports.useEffect(()=>{var dn,Gt,Ot;((dn=j==null?void 0:j.user)==null?void 0:dn.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((Ot=(Gt=j==null?void 0:j.user)==null?void 0:Gt.controller)==null?void 0:Ot.nftId)!==st&&j.logout(),Jt()},[]),reactExports.useEffect(()=>{Lt||!mt.meta||(St?mt.appDid&&Ut(mt.appDid).catch(dn=>{toast.error(dn.message)}):(bt(dn=>({...dn,isInstalled:!1,isRunning:!1,isExternal:!1})),Pt(null)))},[St]);const un={meta:mt.meta,isFree:mt.isFree,appDid:mt.appDid,sessionId:mt.sessionId,isInstalling:mt.isInstalling,isInstalled:mt.isInstalled,isExternal:mt.isExternal,isRunning:mt.isRunning,serverUrl:Mt,storeUrl:mt.registryUrl||ht,blockletMetaUrl:ut,fromLauncher:ot,loading:Lt,error:Dt,api:rt,getBlocklet:Ut,setAppDid:Rt,launcherUrl:dt,launcherSession:mt.launcherSession,launcherSessionId:ft};return jsxRuntimeExports.jsx(Provider$1,{value:un,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:nt}=await axios$1.get(_e);return nt});if(et.loading)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const tt={meta:et.value,error:et.error};return jsxRuntimeExports.jsx(Provider,{value:tt,children:a})}BlockletAppProvider.propTypes={children:PropTypes.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-CF-WslF6.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-D_qCD-1x.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-C1KbWOak.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-CqrpWUFf.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-CeV4jn0N.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-Daw6hKm4.js"),__vite__mapDeps([75,76,23,24,10,77]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DGNm6YxS.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,91,51,25,26,50,21,92,57,3,2,93,94,95,56,96,33,23,24,97,98,99,49,52,100,1,55,72]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-BBO1G3ZP.js"),__vite__mapDeps([101,62,11,20,21,22,6,19,23,24,31,57,92,60]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dx95ER6O.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-BGI6bUJP.js"),__vite__mapDeps([102,1,82,14]),import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-D-FCWV-1.js"),__vite__mapDeps([103,104,91,105,93,70,106]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-guvEPGrM.js"),__vite__mapDeps([107,70,86,54,106,30]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-TQDBcpeB.js"),__vite__mapDeps([108,106]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-DBP_eUf8.js"),__vite__mapDeps([109,36,37,38,39,40,41,110,80,81,46,26,6,28,25,29,67]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Blc0lQcO.js"),__vite__mapDeps([111,91]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-C4Q4NeqR.js"),__vite__mapDeps([112,104,91,105,93,70,106]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-f7aL1bUo.js").then(a=>a.a2),__vite__mapDeps([113,114]),import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BsbdXNYr.js"),__vite__mapDeps([115,62,11,116,117,118,71,10,119,9,13,12,52,7,8,14,15,16,17,18,19,31,120,121,4,6,100,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 tt=getWsClient();return et?tt.connect():tt.isConnected()&&tt.disconnect(),()=>{tt.isConnected()&&tt.disconnect()}},[et]),reactExports.useEffect(()=>{if(_e)return()=>{};const tt=()=>{document.visibilityState==="visible"&&j.refresh()};return document.addEventListener("visibilitychange",tt),()=>{document.removeEventListener("visibilitychange",tt)}},[]),{node:a,session:j}}function ProtectedApp(){var rt;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 it;((it=_e==null?void 0:_e.user)==null?void 0:it.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&_e.logout()},[(rt=_e==null?void 0:_e.user)==null?void 0:rt.role]);const tt=jsxRuntimeExports.jsx(CircularProgress,{});if(j.loading||_e.loading)return jsxRuntimeExports.jsx(Center,{children:tt});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:tt});const nt=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:nt,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$2 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 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,defaultUnit 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,_baseToString as gA,_baseTrim as gB,_castSlice as gC,_charsEndIndex as gD,_stringToArray as gE,validateDomain as gF,require$$6 as gG,axios_1 as gH,CopyButton as gI,isServerless as gJ,getSystemDomains as gK,data$l as gL,isRunning as gM,getTransferAppLink as gN,pick$1 as gO,data$f as gP,data$e as gQ,data$g as gR,_copyArray as gS,usePreviousProps as gT,setRef as gU,ClearIcon as gV,hoistNonReactStatics_cjs as gW,functionPlugin as gX,jssGlobal as gY,jssNested as gZ,camelCase 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,_isIndex as gk,_typeof$2 as gl,Dialog$1 as gm,dialogClasses as gn,DialogContent as go,FocusTrap as gp,DialogActions as gq,TransitionGroup as gr,localizedFormatPlugin as gs,isExtracting as gt,APP_PREFIX as gu,objectAssign$1 as gv,_inheritsLoose$3 as gw,forceReflow as gx,Transition$1 as gy,_baseIndexOf as gz,useTheme as h,jssVendorPrefixer as h0,jssPropsSort as h1,createJss as h2,getDynamicStyles as h3,isNil_1 as h4,omit_1 as h5,withoutTrailingSlash as h6,isString$2 as h7,isAbsoluteUrl$1 as h8,nanoid as h9,isValidClusterSize as hA,extractStatusUrlFromNextWorkflow as hB,pWaitFor$1 as hC,hasRequiredSteps as hD,getStoreList as hE,flatten$4 as hF,trimEnd$1 as hG,useCheckUpdateByUrl as hH,DialogTitle as hI,_baseEach as hJ,_baseAssignValue as hK,throttle$4 as hL,EventEmitter$1 as hM,pTimeout$2 as hN,TimeoutError_1 as hO,debounce$3 as hP,uniq$1 as hQ,Backdrop as hR,omitBy$1 as ha,isNil$1 as hb,isEqual$1 as hc,useEffectWithTarget$1 as hd,__values as he,isString$3 as hf,isFunction$5 as hg,circularProgressClasses$1 as hh,getCircularProgressUtilityClass as hi,collapseClasses$1 as hj,getCollapseUtilityClass as hk,boxClasses as hl,Icon$2 as hm,getIconUtilityClass as hn,iconClasses$1 as ho,getLinearProgressUtilityClass as hp,linearProgressClasses$1 as hq,getMenuUtilityClass as hr,menuClasses$1 as hs,_unsupportedIterableToArray as ht,_setPrototypeOf as hu,_assertThisInitialized$1 as hv,_createClass as hw,require$$1$4 as hx,Check as hy,reactIsExports 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};
|
|
2496
|
+
`;browser.homedir=function(){return"/"};(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(ut){return ut&&ut.__esModule?ut:{default:ut}};Object.defineProperty(a,"__esModule",{value:!0}),a.hasMountPoint=a.hasStartEngine=a.isPackBlocklet=a.isGatewayBlocklet=a.getBlockletEngine=void 0;const _e=j(browser),et=constant,tt=ut=>{if(ut===void 0)throw new Error("blocklet meta param is required");const{engine:st}=ut;if(!st)return{interpreter:"node",source:""};if(!Array.isArray(st))return st;const ft=_e.default.platform(),dt=st.find(ht=>ht.platform===ft);if(!dt)throw new Error(`can not find a proper engine interpreter on ${ft}`);return dt};a.getBlockletEngine=tt;const nt=ut=>(ut==null?void 0:ut.group)===et.BlockletGroup.gateway;a.isGatewayBlocklet=nt;const rt=ut=>(ut==null?void 0:ut.group)===et.BlockletGroup.pack;a.isPackBlocklet=rt;const it=ut=>!!(ut!=null&&ut.main)||(0,a.getBlockletEngine)(ut||{}).interpreter==="blocklet";a.hasStartEngine=it;const ot=ut=>((0,a.hasStartEngine)(ut)||((ut==null?void 0:ut.interfaces)||[]).find(st=>st.type===et.BLOCKLET_INTERFACE_TYPE_WEB))&&(0,a.isGatewayBlocklet)(ut)===!1;a.hasMountPoint=ot})(engine);(function(a){var j=commonjsGlobal&&commonjsGlobal.__importDefault||function(an){return an&&an.__esModule?an:{default:an}};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=Yt;const _e=j(get_1),et=j(uniq_1),tt=require$$6,nt=j(pLimit_1),rt=j(constant$3),it=constant,ot=engine;Object.defineProperty(a,"hasStartEngine",{enumerable:!0,get:function(){return ot.hasStartEngine}}),Object.defineProperty(a,"isGatewayBlocklet",{enumerable:!0,get:function(){return ot.isGatewayBlocklet}}),Object.defineProperty(a,"isPackBlocklet",{enumerable:!0,get:function(){return ot.isPackBlocklet}});const{NODE_SERVICES:ut,SLOT_FOR_IP_DNS_SITE:st,WHO_CAN_ACCESS:ft,WHO_CAN_ACCESS_PREFIX_ROLES:dt}=rt.default,ht=(an,_n=[])=>`${_n.map(Bn=>Bn&&Bn.meta?Bn.meta.did:"").join("/")}${_n.length?"/":""}${an&&an.meta?an.meta.did:""}`;a.getComponentId=ht;const mt=(an,_n=[])=>`${_n.map(Bn=>Bn&&Bn.meta?Bn.meta.name:"").join("/")}${_n.length?"/":""}${an&&an.meta?an.meta.name:""}`;a.getComponentName=mt;const bt=an=>`${an.meta.bundleName}@${an.meta.version}`;a.getComponentBundleId=bt;const Rt=an=>{if(!an)return"";const _n=an.split("/");return _n.pop(),!_n.length||(_n[_n.length-1].startsWith("@")&&_n.pop(),!_n.length)?"":_n.join("/")};a.getParentComponentName=Rt;const St=(an,_n,{parallel:Bn=!1,concurrencyLimit:Dn=5,sync:sn,params:Vt,_parent:Kt,_root:hn,_level:kn=0,_tasks:An,_ancestors:In=[],_limit:qn}={})=>{const Fn=hn||Kt||an,Un=ht(an,In),tr=In.concat(an);if(sn){const Rr=_n(an,{parent:Kt,root:Fn,level:kn,params:Vt,ancestors:In,id:Un});if(an.children)for(const br of an.children)St(br,_n,{sync:sn,params:Rr,_parent:an,_root:Fn,_level:kn+1,_ancestors:tr});return null}if(!Bn)return new Promise(async(Rr,br)=>{try{const ir=await _n(an,{parent:Kt,root:Fn,level:kn,ancestors:In,params:Vt,id:Un});if(an.children)for(const Pr of an.children)await St(Pr,_n,{params:ir,_parent:an,_root:Fn,_level:kn+1,_ancestors:tr});Rr(null)}catch(ir){br(ir)}});const er=qn||(0,nt.default)(Dn),Jn=An||[];if(Jn.push(er(()=>_n(an,{parent:Kt,root:Fn,level:kn,ancestors:In,id:Un}))),an.children)for(const Rr of an.children)St(Rr,_n,{parallel:Bn,_parent:an,_root:Fn,_level:kn+1,_tasks:Jn,_ancestors:tr,_limit:er});return An?null:Promise.all(Jn)};a.forEachBlocklet=St;const Dt=(an,_n)=>St(an,_n,{sync:!0});a.forEachBlockletSync=Dt;const Pt=(an,_n,{parallel:Bn=!1,concurrencyLimit:Dn=5,sync:sn}={})=>{if(sn){if(an.children)for(const hn of an.children)_n(hn);return null}if(!Bn)return new Promise(async(hn,kn)=>{try{if(an.children)for(const An of an.children)await _n(An);hn(null)}catch(An){kn(An)}});const Vt=(0,nt.default)(Dn),Kt=[];if(an.children)for(const hn of an.children)Kt.push(Vt(()=>_n(hn)));return Promise.all(Kt)};a.forEachComponentV2=Pt;const Lt=(an,_n)=>Pt(an,_n,{sync:!0});a.forEachComponentV2Sync=Lt;const qt=(an,_n,Bn)=>St(an,(Dn,sn)=>sn.level===0?{}:_n(Dn,sn),Bn);a.forEachChild=qt;const Mt=(an,_n)=>qt(an,_n,{sync:!0});a.forEachChildSync=Mt;const Ut=(an,_n,{_ancestors:Bn=[],returnAncestors:Dn=!1}={})=>{if(!_n)return null;if(_n(an,{ancestors:Bn}))return Dn?{component:an,ancestors:Bn}:an;for(const sn of an.children||[]){const Vt=Bn.concat(an),Kt=Ut(sn,_n,{_ancestors:Vt,returnAncestors:Dn});if(Kt)return Kt}return null};a.findComponent=Ut;const Jt=(an,_n,{returnAncestors:Bn=!1}={})=>(Array.isArray(_n)&&(_n=_n.join("/")),Ut(an,(Dn,{ancestors:sn})=>{const Vt=ht(Dn,sn);return _n===Vt},{returnAncestors:Bn}));a.findComponentById=Jt;const un=(an,_n)=>{if(!_n)return null;for(const Bn of an.children||[])if(_n(Bn,an))return Bn;return null};a.findComponentV2=un;const dn=(an,_n)=>_n?(Array.isArray(_n)&&(_n=_n.join("/")),un(an,(Bn,Dn)=>{if(_n.includes("/")){const sn=ht(Bn,[Dn]);return _n===sn}return _n===Bn.meta.did})):null;a.findComponentByIdV2=dn;const Gt=(an,_n)=>{if(!_n)return[];const Bn=[];for(const Dn of an.children||[])_n(Dn,an)&&Bn.push(Dn);return Bn};a.filterComponentsV2=Gt;const Ot=an=>!!an&&!!(an.key||an.name)&&!an.secure&&an.shared!==!1&&!it.BLOCKLET_CONFIGURABLE_KEY[an.key||an.name];a.isEnvShareableToClient=Ot;const $t=an=>!!an&&!!(an.key||an.name)&&!an.secure&&!!an.shared&&!it.BLOCKLET_CONFIGURABLE_KEY[an.key||an.name];a.isEnvShareable=$t;const ct=(an,_n)=>{const Bn={};return!an||!_n||(Array.isArray(an.configs)&&an.configs.forEach(({key:Dn,value:sn,secure:Vt})=>{if(!$t({key:Dn,secure:Vt,shared:!0}))return;const Kt=(an.configObj||{})[Dn]||sn,hn=(_n.configs||[]).find(kn=>kn.key===Dn);(!hn||$t(hn)||!hn.value&&!(_n.configObj||{})[hn.key])&&(Bn[Dn]=Kt)}),(an.configs||[]).forEach(({key:Dn,value:sn})=>{[it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_HOST,it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_ID,it.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_CHAIN_TYPE].includes(Dn)&&(Bn[it.CHAIN_PROP_MAP[Dn]]=sn)})),Bn};a.getSharedConfigObj=ct;const pt=an=>an.key.startsWith(it.BLOCKLET_PREFERENCE_PREFIX)===!0;a.isPreferenceKey=pt;const xt=(an,_n)=>!!(an.required&&(!an.value&&!_n[an.key]||Object.values(it.CHAIN_PROP_MAP).includes(an.key)&&Object.keys(_n).includes(an.key)&&!_n[an.key])),Et=(an={})=>{const _n=[];return Lt(an,Bn=>{var Vt;if(((Vt=Bn.meta)==null?void 0:Vt.group)===it.BlockletGroup.gateway)return;const Dn=Bn.configs||[],sn=ct(an,Bn);Dn.forEach(Kt=>{xt(Kt,sn)&&_n.push({did:Bn.meta.did,key:Kt.key,description:Kt.description})})}),_n.filter(Bn=>!pt(Bn))};a.getAppMissingConfigs=Et;const wt=(an={},_n={})=>{const Bn=[],Dn=an.configs||[],sn=ct(_n,an);return Dn.forEach(Vt=>{xt(Vt,sn)&&Bn.push({did:an.meta.did,key:Vt.key,description:Vt.description})}),Bn};a.getComponentMissingConfigs=wt;const kt=an=>an.payment?(an.payment.price||[]).map(Bn=>Bn.value||0).every(Bn=>Bn===0):!0;a.isFreeBlocklet=kt;const Tt=an=>!an.payment||!an.payment.componentPrice?!0:!an.payment.componentPrice.length;a.isFreeComponent=Tt;const At=an=>an&&(St(an,_n=>{_n.configs&&(_n.configs=_n.configs.filter(Bn=>!pt(Bn)),_n.configs.forEach(Bn=>{Bn.secure&&(Bn.value=Bn.value?"__encrypted__":"")})),(_n.environments||[]).forEach(Bn=>{["BLOCKLET_APP_SK","BLOCKLET_APP_PSK"].includes(Bn.key)&&(Bn.value="__encrypted__")}),(_n.migratedFrom||[]).forEach(Bn=>{Bn.appSk="__encrypted__"}),delete an.configObj,delete an.environmentObj},{sync:!0}),an);a.wipeSensitiveData=At;const vt=an=>{if(!an)return!1;const _n=an.environments.find(Bn=>Bn.key==="BLOCKLET_DELETABLE");return _n?_n.value==="yes":!0};a.isDeletableBlocklet=vt;const It=an=>{let _n=!1;return Dt(an,Bn=>{Bn.meta.group!==it.BlockletGroup.gateway&&(_n=!0)}),_n};a.hasRunnableComponent=It;const rn=(an,_n=!1)=>{if(!an)return"";const{meta:Bn}=an;let Dn;if(!_n&&an.environments){const sn=an.environments.find(Vt=>Vt.key==="BLOCKLET_APP_NAME");sn&&sn.value&&(Dn=sn.value)}return Dn||Bn.title||Bn.name};a.getAppName=rn,a.getDisplayName=rn;const jt=(an,_n=!1)=>{if(!an)return"";const{meta:Bn}=an;let Dn;if(!_n&&an.environments){const sn=an.environments.find(Vt=>Vt.key==="BLOCKLET_APP_DESCRIPTION");sn&&sn.value&&(Dn=sn.value)}return Dn||Bn.description||Bn.name};a.getAppDescription=jt;function Yt(an){var Dn,sn,Vt;const _n=(Vt=(sn=(Dn=an==null?void 0:an.site)==null?void 0:Dn.domainAliases)==null?void 0:sn.sort((Kt,hn)=>{var kn,An,In,qn;return(kn=Kt.accessibility)!=null&&kn.accessible&&((An=hn.accessibility)!=null&&An.accessible)?+Kt.isProtected-+hn.isProtected:+((In=hn.accessibility)==null?void 0:In.accessible)-+((qn=Kt.accessibility)==null?void 0:qn.accessible)}))==null?void 0:Vt.map(Kt=>{var An;const hn=(An=Kt==null?void 0:Kt.domainStatus)!=null&&An.isHttps?"https://":"http://",kn=Kt==null?void 0:Kt.value;return`${hn}${kn}`}).filter(Boolean);return _n==null?void 0:_n[0]}const Wt=an=>{an&&(Dt(an,_n=>{_n.status=(0,it.fromBlockletStatus)(_n.status),_n.source!==void 0&&(_n.source=(0,it.fromBlockletSource)(_n.source))}),an.settings&&(an.settings.children||[]).forEach(_n=>{Dt(_n,Bn=>{Bn.status=(0,it.fromBlockletStatus)(Bn.status),Bn.source!==void 0&&(Bn.source=(0,it.fromBlockletSource)(Bn.source))})}))};a.fixBlockletStatus=Wt;const Xt=an=>{if(!an)return null;const _n=an.meta||an||{},{interfaces:Bn=[]}=_n;return Array.isArray(Bn)?Bn.find(Dn=>Dn.type===it.BLOCKLET_INTERFACE_TYPE_WEB):null};a.findWebInterface=Xt;const mn=an=>{if(!an)return null;const _n=Xt(an),{ports:Bn}=an;return!_n||!Bn?null:Bn[_n.port]};a.findWebInterfacePort=mn;const Tn=(an,_n)=>{const Bn=[_n];_n===ut.AUTH&&Bn.push(ut.AUTH_SERVICE);const Dn=Xt(an);return Dn?(Dn.services||[]).find(sn=>Bn.includes(sn.name)):null};a.findServiceFromMeta=Tn;const zt=an=>{if(!an)return ft.ALL;if((0,_e.default)(an,"settings.whoCanAccess"))return an.settings.whoCanAccess;const _n=Tn(an.meta,ut.AUTH);return(0,_e.default)(_n,"config.whoCanAccess")?_n.config.whoCanAccess:ft.ALL};a.getWhoCanAccess=zt;const Bt=(an,_n)=>{const Bn=(an.configs||[]).find(sn=>sn.key===it.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO);if(Bn)return Bn.value;if(_n&&(0,_e.default)(_n,"settings.whoCanAccess")&&(0,_e.default)(_n,"settings.whoCanAccess")!==ft.ALL)return(0,_e.default)(_n,"settings.whoCanAccess");const Dn=Tn(an.meta,ut.AUTH);return(0,_e.default)(Dn,"config.whoCanAccess")?Dn.config.whoCanAccess:ft.ALL};a.getComponentWhoCanAccess=Bt;const Zt=({request:an,baseUrl:_n})=>{const Bn=an.headers["x-blocklet-did"]||"",Dn=an.headers["x-blocklet-real-did"]||"",sn=an.headers["x-path-prefix"]||"/",Vt=an.headers["x-group-path-prefix"]||"/";let Kt=_n;return Bn!==Dn&&sn!==Vt&&(Kt=(0,tt.joinURL)(Kt,"/").replace(sn,Vt)),Kt};a.getConnectAppUrl=Zt;const Qt=(an,_n)=>{const Bn=(_n||"").includes(":")?":":/\./;return(an||"").replace(st,(_n||"").replace(new RegExp(Bn,"g"),"-"))};a.replaceSlotToIp=Qt;const ln=an=>{const _n=Object.entries(it.CHAIN_INFO_CONFIG).reduce((Bn,Dn)=>{const[sn,[Vt,Kt]]=Dn;return Bn[Vt]=(0,_e.default)(an,sn)||Kt,Bn},{});return _n.type==="ethereum"&&_n.id==="none"&&(_n.id="1"),_n};a.getChainInfo=ln;const En=an=>{const _n=ln({});if(!an)return _n;const Bn=ln(an.configObj);if(Bn.host!=="none")return Bn;let Dn;return Mt(an,sn=>{if(Dn&&Dn.host!=="none")return;const Vt=ln(sn.configObj);Vt.host!=="none"&&(Dn=Vt)}),Dn||_n};a.getBlockletChainInfo=En;const yn=an=>!!(an!=null&&an.controller);a.isExternalBlocklet=yn;const fn=an=>an.whoCanAccess.startsWith(dt)?an.whoCanAccess.substring(dt.length).split(","):[];a.getRolesFromAuthConfig=fn;const xn=an=>{const _n=Array.isArray(an.migratedFrom)?an.migratedFrom.map(Bn=>Bn.appDid):[];return(0,et.default)([an.appDid,an.appPid,..._n].filter(Boolean))};a.getBlockletAppIdList=xn;const wn=an=>{const _n=[];return an&&Dt(an,Bn=>{var sn;(((sn=Bn.meta)==null?void 0:sn.interfaces)||[]).filter(Vt=>Vt.type===it.BLOCKLET_INTERFACE_TYPE_SERVICE).forEach(Vt=>{const Kt=Vt.port||{};_n.push({name:Vt.name,protocol:Vt.protocol,port:Number(Kt.external),upstreamPort:Number((Bn.ports||{})[Kt.internal])})})}),_n};a.getBlockletServices=wn;const Sn=an=>[it.BlockletStatus.downloading,it.BlockletStatus.waiting,it.BlockletStatus.starting,it.BlockletStatus.installing,it.BlockletStatus.stopping,it.BlockletStatus.upgrading,"downloading","waiting","starting","installing","extracting","stopping","upgrading","restarting","deleting"].includes(an);a.isInProgress=Sn;const zn=an=>[it.BlockletStatus.added,it.BlockletStatus.waiting,it.BlockletStatus.downloading,it.BlockletStatus.installing,"added","waiting","downloading","installing"].includes(an);a.isBeforeInstalled=zn;const Zn=an=>[it.BlockletStatus.running,"running"].includes(an);a.isRunning=Zn;const vn=an=>[it.BlockletStatus.running,it.BlockletStatus.waiting,it.BlockletStatus.downloading,"running","waiting","downloading"].includes(an);a.isAccessible=vn;const Ln=(an,{type:_n,did:Bn}={type:"",did:""})=>{var Dn,sn,Vt;return an?!(0,ot.hasStartEngine)(an.meta)&&((Vt=(sn=(Dn=an.meta)==null?void 0:Dn.resource)==null?void 0:sn.bundles)==null?void 0:Vt.length)>0&&(an.meta.resource.bundles||[]).some(Kt=>Kt.type===_n&&Kt.did===Bn):!1};a.hasResourceType=Ln,a.default={isFreeBlocklet:kt,isFreeComponent:Tt,forEachBlocklet:St,forEachBlockletSync:Dt,forEachChild:qt,forEachChildSync:Mt,forEachComponentV2:Pt,forEachComponentV2Sync:Lt,isDeletableBlocklet:vt,getSharedConfigObj:ct,getAppMissingConfigs:Et,getComponentMissingConfigs:wt,isEnvShareableToClient:Ot,isEnvShareable:$t,wipeSensitiveData:At,hasRunnableComponent:It,getAppName:rn,getAppDescription:jt,getAppUrl:Yt,getDisplayName:rn,fixBlockletStatus:Wt,findWebInterface:Xt,findWebInterfacePort:mn,findServiceFromMeta:Tn,getWhoCanAccess:zt,getComponentWhoCanAccess:Bt,replaceSlotToIp:Qt,getComponentId:ht,getComponentName:mt,getComponentBundleId:bt,findComponent:Ut,findComponentById:Jt,findComponentV2:un,findComponentByIdV2:dn,filterComponentsV2:Gt,getParentComponentName:Rt,getConnectAppUrl:Zt,getChainInfo:ln,getBlockletChainInfo:En,isExternalBlocklet:yn,isPreferenceKey:pt,getRolesFromAuthConfig:fn,getBlockletServices:wn,isInProgress:Sn,isBeforeInstalled:zn,isRunning:Zn,isAccessible:vn,isGatewayBlocklet:ot.isGatewayBlocklet,isPackBlocklet:ot.isPackBlocklet,hasStartEngine:ot.hasStartEngine,hasResourceType:Ln}})(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),tt=joinURL(_e,`/api/blocklets/${a.did}/blocklet.json`),nt=new URL(joinURL(et,"/launch-blocklet/agreement"));return nt.searchParams.set("blocklet_meta_url",tt),nt.searchParams.set("from",window.location.href),nt.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,tt;j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||j.didSpace===constant.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP||(tt=(et=_e==null?void 0:_e.meta)==null?void 0:et.capabilities)!=null&&tt.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(tt=>{tt.from.pathPrefix=normalizePathPrefix$1(tt.from.pathPrefix||"/")}),a.site.rules=sortBy$1(a.site.rules,tt=>tt.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,tt=>{tt.runtimeInfo&&(tt.runtimeInfo.startAt=new Date-tt.runtimeInfo.uptime)});else if(j==="merge-old"&&_e){a.site.domainAliases=_e.site.domainAliases,a.appRuntimeInfo=_e.appRuntimeInfo;const tt={};util.forEachBlockletSync(_e,(nt,{id:rt})=>{tt[rt]=nt}),util.forEachBlockletSync(a,(nt,{id:rt})=>{const it=tt[rt];it&&(nt.runtimeInfo=it.runtimeInfo,nt.diskInfo=it.diskInfo,nt.engine=it.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 tt={...et},nt=j.find(rt=>rt.meta.did===et.meta.did);return nt&&_e.forEach(rt=>{tt[rt]=nt[rt]}),tt}):j;function BlockletsProvider({children:a}){const j=useNodeContext(),_e=createClient(),[et,tt]=reactExports.useState(null),[nt,rt]=reactExports.useState(!1),[it,ot]=reactExports.useState([]),[ut,st]=reactExports.useState([]),[ft,dt]=reactExports.useState(!1),ht=(Lt,qt)=>{util.isExternalBlocklet(Lt)?st(qt):ot(qt)},mt=4,bt=async({silent:Lt=!0,retries:qt=mt,updates:Mt,useCache:Ut=!0}={})=>{Lt||rt(!0);try{tt(null);const{blocklets:Jt}=await _e.getBlocklets({input:{useCache:Ut}});for(const Gt of Jt)await fixBlocklet(Gt,{getIP:getIp});const un=Jt.filter(Gt=>!util.isExternalBlocklet(Gt)),dn=Jt.filter(util.isExternalBlocklet);ot(Gt=>mergeBlocklets(Gt,un,Mt)),st(Gt=>mergeBlocklets(Gt,dn,Mt)),rt(!1),dt(!0)}catch(Jt){qt>0?setTimeout(()=>bt({silent:Lt,retries:qt-1,useCache:Ut}),1e3):(rt(!1),tt(Jt))}},Rt=async Lt=>{try{const{blocklet:qt}=await j.api.getBlocklet({input:{did:Lt.meta.did,attachRuntimeInfo:!0}});await fixBlocklet(qt,{getIP:getIp}),ht(qt,Mt=>Mt.some(Ut=>Ut.meta.did===qt.meta.did)?Mt.map(Ut=>Ut.meta.did===qt.meta.did?qt:Ut):[...Mt,qt])}catch(qt){tt(qt)}},St=Lt=>{j.refresh(),Rt(Lt)};reactExports.useEffect(()=>{bt({silent:!1})},[]);const Dt=Lt=>{const qt={};util.forEachBlockletSync(Lt,(Mt,{id:Ut})=>{qt[Ut]=constant.fromBlockletStatus(Mt.status)}),ht(Lt,Mt=>Mt.map(Ut=>(Ut.meta.did===Lt.meta.did&&util.forEachBlockletSync(Ut,(Jt,{id:un})=>{qt[un]&&(Jt.status=qt[un])}),Ut)))};useSubscription(constant.BlockletEvents.added,Lt=>{Lt.status=constant.fromBlockletStatus(Lt.status),ht(Lt,qt=>[...qt,Lt])}),useSubscription(constant.BlockletEvents.removed,Lt=>{j.refresh(),ht(Lt,qt=>qt.filter(Mt=>Mt.meta.did!==Lt.meta.did))}),useSubscription(constant.BlockletEvents.statusChange,Dt),useSubscription(constant.BlockletEvents.installed,St),useSubscription(constant.BlockletEvents.upgraded,St),useSubscription(constant.BlockletEvents.updated,Rt),useSubscription(constant.BlockletEvents.startFailed,Rt);const Pt={loading:nt,error:et,data:it,externalData:ut,refresh:bt,initialized:ft,api:_e};return jsxRuntimeExports.jsx(Provider$2,{value:{blocklets:Pt},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:tt}=new URL(et);return urlEvaluation.isSlpDomain(tt)}catch(tt){return console.error(tt),!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:tt}=useNodeContext(),[nt]=useSearchParams(),rt=createClient(),it=nt.get("launchType"),ot=nt.get("fromLauncher"),ut=nt.get("blocklet_meta_url")||"",st=nt.get("nftId")||"",ft=nt.get("launcherSessionId")||"",dt=nt.get("launcherUrl")||"",ht=new URL(ut).origin,[mt,bt]=reactExports.useState({meta:null,appDid:nt.get("appDid")||null,sessionId:nt.get("sessionId")||null,isFree:!0,isExternal:!1,isInstalling:!1,isInstalled:!1,isRunning:!1,launcherSession:null,registryUrl:""}),Rt=(dn,Gt)=>bt(Ot=>({...Ot,appDid:dn,sessionId:Gt})),St=authorize({user:j.user,launchType:it,nftId:st}),[Dt,Pt]=reactExports.useState(null),[Lt,qt]=reactExports.useState(!0),Mt=reactExports.useMemo(()=>tt?getServerUrl(tt):"",[tt]),Ut=async dn=>{if(!dn)throw new Error("appDid should not be empty");const{blocklet:Gt}=await et.getBlocklet({input:{did:dn,attachConfig:!1}});if(!Gt)return null;const Ot=constant.BlockletStatus[Gt.status],$t=!!st,ct=Ot<constant.BlockletStatus.installed,pt=Ot===constant.BlockletStatus.installed,xt=Ot===constant.BlockletStatus.running;return bt(Et=>({...Et,isInstalled:pt,isRunning:xt,isExternal:$t,isInstalling:ct})),{isInstalled:pt,isRunning:xt,isExternal:$t,isInstalling:ct}},Jt=async()=>{qt(!0);try{if(!ut)throw new Error(_e("common.invalidParam"));const[{meta:dn,isFree:Gt,registryUrl:Ot},{launcherSession:$t,error:ct}]=await Promise.all([et.getBlockletMetaFromUrl({input:{url:ut,checkPrice:!0}}),ft?et.getLauncherSession({input:{launcherSessionId:ft,launcherUrl:dt}}):Promise.resolve({})]);if(ft&&!$t)throw new Error(`Launch session invalid: ${ct}`);if(!dn)throw new Error(_e("LaunchBlockletBlocklet.error.loadMetaFailed"));let pt={};St&&mt.appDid&&(pt=await Ut(mt.appDid)),bt(xt=>({...xt,...pt,meta:dn,isFree:Gt,registryUrl:Ot,launcherSession:$t}))}catch(dn){console.error(dn),Pt(dn.message)}finally{qt(!1)}};reactExports.useEffect(()=>{var dn,Gt,Ot;((dn=j==null?void 0:j.user)==null?void 0:dn.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&((Ot=(Gt=j==null?void 0:j.user)==null?void 0:Gt.controller)==null?void 0:Ot.nftId)!==st&&j.logout(),Jt()},[]),reactExports.useEffect(()=>{Lt||!mt.meta||(St?mt.appDid&&Ut(mt.appDid).catch(dn=>{toast.error(dn.message)}):(bt(dn=>({...dn,isInstalled:!1,isRunning:!1,isExternal:!1})),Pt(null)))},[St]);const un={meta:mt.meta,isFree:mt.isFree,appDid:mt.appDid,sessionId:mt.sessionId,isInstalling:mt.isInstalling,isInstalled:mt.isInstalled,isExternal:mt.isExternal,isRunning:mt.isRunning,serverUrl:Mt,storeUrl:mt.registryUrl||ht,blockletMetaUrl:ut,fromLauncher:ot,loading:Lt,error:Dt,api:rt,getBlocklet:Ut,setAppDid:Rt,launcherUrl:dt,launcherSession:mt.launcherSession,launcherSessionId:ft};return jsxRuntimeExports.jsx(Provider$1,{value:un,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:nt}=await axios$1.get(_e);return nt});if(et.loading)return jsxRuntimeExports.jsx(Center,{children:jsxRuntimeExports.jsx(CircularProgress,{})});const tt={meta:et.value,error:et.error};return jsxRuntimeExports.jsx(Provider,{value:tt,children:a})}BlockletAppProvider.propTypes={children:PropTypes.any.isRequired};function useBlockletAppContext(){return reactExports.useContext(BlockletAppContext)}const Dashboard=reactExports.lazy(()=>__vitePreload(()=>import("./index-BN-HHDJJ.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-Ctog4pYE.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-BatYQHX2.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-3tln4L6C.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-DpVeIVbC.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-BQmNmoac.js"),__vite__mapDeps([74,75,23,24,10,76]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-fiBRRSS-.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,90,50,25,26,49,21,91,56,3,2,92,93,94,55,95,33,23,24,96,97,98,48,51,99,1,54,71]),import.meta.url)),BlockletDetail=reactExports.lazy(()=>__vitePreload(()=>import("./detail-DmU03eC7.js"),__vite__mapDeps([100,61,11,20,21,22,6,19,23,24,31,56,91,59]),import.meta.url)),EULAPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-C3q33eZl.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-CJBZPdm6.js"),__vite__mapDeps([101,1,81,14]),import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-x2vTLzR6.js"),__vite__mapDeps([102,103,90,104,92,69,105]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-DrdqOXJL.js"),__vite__mapDeps([106,69,85,53,105,30]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BApbAOLy.js"),__vite__mapDeps([107,105]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-DtsnjFBd.js"),__vite__mapDeps([108,36,37,38,39,40,41,109,79,80,45,26,6,28,25,29,66]),import.meta.url)),NotFoundPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-BfvNFce6.js"),__vite__mapDeps([110,90]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dy-ye0PE.js"),__vite__mapDeps([111,103,90,104,92,69,105]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-D6q9zEjn.js").then(a=>a.a2),__vite__mapDeps([112,113]),import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-aiikLstk.js"),__vite__mapDeps([114,61,11,115,116,117,70,10,118,9,13,12,51,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 tt=getWsClient();return et?tt.connect():tt.isConnected()&&tt.disconnect(),()=>{tt.isConnected()&&tt.disconnect()}},[et]),reactExports.useEffect(()=>{if(_e)return()=>{};const tt=()=>{document.visibilityState==="visible"&&j.refresh()};return document.addEventListener("visibilitychange",tt),()=>{document.removeEventListener("visibilitychange",tt)}},[]),{node:a,session:j}}function ProtectedApp(){var rt;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 it;((it=_e==null?void 0:_e.user)==null?void 0:it.role)===constant$3.SERVER_ROLES.EXTERNAL_BLOCKLET_CONTROLLER&&_e.logout()},[(rt=_e==null?void 0:_e.user)==null?void 0:rt.role]);const tt=jsxRuntimeExports.jsx(CircularProgress,{});if(j.loading||_e.loading)return jsxRuntimeExports.jsx(Center,{children:tt});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:tt});const nt=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:nt,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$2 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 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,defaultUnit 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,_baseToString as gA,_baseTrim as gB,_castSlice as gC,_charsEndIndex as gD,_stringToArray as gE,validateDomain as gF,require$$6 as gG,axios_1 as gH,CopyButton as gI,isServerless as gJ,getSystemDomains as gK,data$l as gL,isRunning as gM,getTransferAppLink as gN,pick$1 as gO,data$f as gP,data$e as gQ,data$g as gR,_copyArray as gS,usePreviousProps as gT,setRef as gU,ClearIcon as gV,hoistNonReactStatics_cjs as gW,functionPlugin as gX,jssGlobal as gY,jssNested as gZ,camelCase 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,_isIndex as gk,_typeof$2 as gl,Dialog$1 as gm,dialogClasses as gn,DialogContent as go,FocusTrap as gp,DialogActions as gq,TransitionGroup as gr,localizedFormatPlugin as gs,isExtracting as gt,APP_PREFIX as gu,objectAssign$1 as gv,_inheritsLoose$3 as gw,forceReflow as gx,Transition$1 as gy,_baseIndexOf as gz,useTheme as h,jssVendorPrefixer as h0,jssPropsSort as h1,createJss as h2,getDynamicStyles as h3,isNil_1 as h4,omit_1 as h5,withoutTrailingSlash as h6,isString$2 as h7,isAbsoluteUrl$1 as h8,nanoid as h9,isValidClusterSize as hA,extractStatusUrlFromNextWorkflow as hB,pWaitFor$1 as hC,hasRequiredSteps as hD,getStoreList as hE,flatten$4 as hF,trimEnd$1 as hG,useCheckUpdateByUrl as hH,DialogTitle as hI,_baseEach as hJ,_baseAssignValue as hK,throttle$4 as hL,EventEmitter$1 as hM,pTimeout$2 as hN,TimeoutError_1 as hO,debounce$3 as hP,uniq$1 as hQ,Backdrop as hR,omitBy$1 as ha,isNil$1 as hb,isEqual$1 as hc,useEffectWithTarget$1 as hd,__values as he,isString$3 as hf,isFunction$5 as hg,circularProgressClasses$1 as hh,getCircularProgressUtilityClass as hi,collapseClasses$1 as hj,getCollapseUtilityClass as hk,boxClasses as hl,Icon$2 as hm,getIconUtilityClass as hn,iconClasses$1 as ho,getLinearProgressUtilityClass as hp,linearProgressClasses$1 as hq,getMenuUtilityClass as hr,menuClasses$1 as hs,_unsupportedIterableToArray as ht,_setPrototypeOf as hu,_assertThisInitialized$1 as hv,_createClass as hw,require$$1$4 as hx,Check as hy,reactIsExports 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 B,j as e,g as m3,bl as U,t as X,m as Y,D as Z,B as R,C as k,x as Ae,K as He,M as n3,P as T,bG as w,n as Q,cb as q,du as z,fO as b3,aZ as le,a_ as Ee,a2 as j,ac as h3,E as v,fP as ce,Q as h,fQ as Ie,N as De,b as ue,aK as de,aL as Je,H as k3,U as w3,aQ as a3,W as K3,cN as f3,fR as Fe,fS as pe,dA as X3,dw as fe,dx as Z3,fT as Ge,fU as me,dz as he,dD as ge,fV as ye,fW as Be,w as Ne,ax as d3,T as Oe,f as Se,J as Te,V as M3}from"./index-
|
|
1
|
+
import{r as B,j as e,g as m3,bl as U,t as X,m as Y,D as Z,B as R,C as k,x as Ae,K as He,M as n3,P as T,bG as w,n as Q,cb as q,du as z,fO as b3,aZ as le,a_ as Ee,a2 as j,ac as h3,E as v,fP as ce,Q as h,fQ as Ie,N as De,b as ue,aK as de,aL as Je,H as k3,U as w3,aQ as a3,W as K3,cN as f3,fR as Fe,fS as pe,dA as X3,dw as fe,dx as Z3,fT as Ge,fU as me,dz as he,dD as ge,fV as ye,fW as Be,w as Ne,ax as d3,T as Oe,f as Se,J as Te,V as M3}from"./index-DzlR4ROA.js";import{d as g3}from"./Add-B6ZIiZST.js";import{S as o3}from"./index-RRgjvIfT.js";import{d as l3}from"./EditIcon-BCVTD6hP.js";import{d as Ce}from"./LockIcon-BB4v3xDA.js";import{L as y3,S as B3,d as xe}from"./list-header-5GKfEIKg.js";import{a as s3}from"./team-nBwKhOsv.js";import{T as _,F as Pe}from"./TextField-BjNW7Bjw.js";import{C as Re}from"./Google-C9I0SVEJ.js";import{u as ve}from"./blocklet-d8bc_SQ4.js";import{E as N3}from"./index-po1Du4Ca.js";import{l as Q3}from"./index-BdL0EBBo.js";import{j as Me}from"./index-DQo_Dew3.js";import{I as Le}from"./InputAdornment-DT4h3g9o.js";import{I as Ve}from"./InputLabel-BOR0LpK5.js";import{T as Ue,a as J3}from"./ToggleButtonGroup-DtqIWzr-.js";import{O as _e}from"./Select-C44-YCyD.js";import"./ExpandMore-CFYbzpsT.js";import"./ButtonGroup-3w5LvaA0.js";import"./getValidReactChildren-Y-QNoefA.js";import"./Search-CjX0JQkS.js";import"./url-evaluation-C7b_jErN.js";import"./isEqual-CFOAIOWs.js";import"./index-ZG7jWpak.js";var O3={};Object.defineProperty(O3,"__esModule",{value:!0});var i3=O3.default=void 0;We(B);var L3=e;function We(n){return n&&n.__esModule?n:{default:n}}function V3(n,o){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(n);o&&(H=H.filter(function(I){return Object.getOwnPropertyDescriptor(n,I).enumerable})),i.push.apply(i,H)}return i}function U3(n){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?V3(Object(i),!0).forEach(function(H){je(n,H,i[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V3(Object(i)).forEach(function(H){Object.defineProperty(n,H,Object.getOwnPropertyDescriptor(i,H))})}return n}function je(n,o,i){return(o=be(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n}function be(n){var o=ke(n,"string");return typeof o=="symbol"?o:o+""}function ke(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var H=i.call(n,o||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}var S3=function(o){return(0,L3.jsx)("svg",U3(U3({},o),{},{children:(0,L3.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};S3.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};S3.displayName="delete";i3=O3.default=S3;var Y3={exports:{}},q3={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(i,H){return i<<H|i>>>32-H},rotr:function(i,H){return i<<32-H|i>>>H},endian:function(i){if(i.constructor==Number)return o.rotl(i,8)&16711935|o.rotl(i,24)&4278255360;for(var H=0;H<i.length;H++)i[H]=o.endian(i[H]);return i},randomBytes:function(i){for(var H=[];i>0;i--)H.push(Math.floor(Math.random()*256));return H},bytesToWords:function(i){for(var H=[],I=0,E=0;I<i.length;I++,E+=8)H[E>>>5]|=i[I]<<24-E%32;return H},wordsToBytes:function(i){for(var H=[],I=0;I<i.length*32;I+=8)H.push(i[I>>>5]>>>24-I%32&255);return H},bytesToHex:function(i){for(var H=[],I=0;I<i.length;I++)H.push((i[I]>>>4).toString(16)),H.push((i[I]&15).toString(16));return H.join("")},hexToBytes:function(i){for(var H=[],I=0;I<i.length;I+=2)H.push(parseInt(i.substr(I,2),16));return H},bytesToBase64:function(i){for(var H=[],I=0;I<i.length;I+=3)for(var E=i[I]<<16|i[I+1]<<8|i[I+2],u=0;u<4;u++)I*8+u*6<=i.length*8?H.push(n.charAt(E>>>6*(3-u)&63)):H.push("=");return H.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var H=[],I=0,E=0;I<i.length;E=++I%4)E!=0&&H.push((n.indexOf(i.charAt(I-1))&Math.pow(2,-2*E+8)-1)<<E*2|n.indexOf(i.charAt(I))>>>6-E*2);return H}};q3.exports=o})();var we=q3.exports,G3={utf8:{stringToBytes:function(n){return G3.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(G3.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i<n.length;i++)o.push(n.charCodeAt(i)&255);return o},bytesToString:function(n){for(var o=[],i=0;i<n.length;i++)o.push(String.fromCharCode(n[i]));return o.join("")}}},_3=G3;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,U as u,j as e,dM as p,dN as I,dO as z,dP as O,P as o,ds as b,s as m,dQ as E}from"./index-
|
|
1
|
+
import{r,U as u,j as e,dM as p,dN as I,dO as z,dP as O,P as o,ds as b,s as m,dQ as E}from"./index-DzlR4ROA.js";import{d as S}from"./ExpandMore-CFYbzpsT.js";import{B as v}from"./ButtonGroup-3w5LvaA0.js";function d(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),P=Array.isArray(a)?a.map((n,M)=>r.isValidElement(n)?n:r.createElement(u,{...n,key:M})):a,k=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(A,{variant:h,size:f,color:i,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:k,color:i,...y,"aria-label":"more functions",children:e.jsx(S,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(I,{children:e.jsx(z,{onClickAway:B,children:e.jsx(O,{onClick:C,children:P})})})})]})}d.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};d.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:b,menuButtonProps:{}};d.Item=u;const A=m(v)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bJ as Vc,j as h,P as E,n as D0,C as bM,r as V,eY as tb,cI as Cc,cN as qb,k as gz,g as rb,J as Qz,cx as Pc,$ as Fc,eZ as jc,dt as Yc,e7 as Ic,e8 as Uc,e_ as Hc,e$ as Kc,m as Qc,X as Jc,aK as $c,aL as Zc,f0 as MA,dw as wz,bb as bA,ds as zA,s as pA}from"./index-
|
|
1
|
+
import{bJ as Vc,j as h,P as E,n as D0,C as bM,r as V,eY as tb,cI as Cc,cN as qb,k as gz,g as rb,J as Qz,cx as Pc,$ as Fc,eZ as jc,dt as Yc,e7 as Ic,e8 as Uc,e_ as Hc,e$ as Kc,m as Qc,X as Jc,aK as $c,aL as Zc,f0 as MA,dw as wz,bb as bA,ds as zA,s as pA}from"./index-DzlR4ROA.js";import{j as OA}from"./url-join-LN7aIhdX.js";import{S as h2}from"./Skeleton-4s7n7VqF.js";import{C as oA}from"./Close-DzKkufzk.js";import{l as cA}from"./lottie-Dittdj4N.js";const AA=Vc([h.jsx("circle",{cx:"12",cy:"19",r:"2"},"0"),h.jsx("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function nb({value:M,size:z,style:O,...o}){return h.jsxs(eA,{style:{width:z,height:z,...O},...o,children:[h.jsx(bM,{variant:"determinate",role:"progressbar",value:100,size:z,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),h.jsx(bM,{variant:"determinate",value:M,role:"progressbar",size:z,thickness:10,"aria-label":"main progress bar"})]})}nb.propTypes={value:E.number.isRequired,size:E.number,style:E.object};nb.defaultProps={size:10,style:{}};const eA=D0.span`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
position: relative;
|
|
4
4
|
> * {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hc as W,r as L,hd as z,ck as R,f6 as N,he as x,hf as P,ci as j,hg as S}from"./index-
|
|
1
|
+
import{hc as W,r as L,hd as z,ck as R,f6 as N,he as x,hf as P,ci as j,hg as S}from"./index-DzlR4ROA.js";var V=function(r,a){return r===void 0&&(r=[]),a===void 0&&(a=[]),W(r,a)},I=function(r,a,n){var e=L.useRef(),u=L.useRef(0);V(a,e.current)||(u.current+=1),e.current=a,z(r,[u.current],n)},J=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),B={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:J?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},E={ctrl:function(r){return r.ctrlKey},shift:function(r){return r.shiftKey},alt:function(r){return r.altKey},meta:function(r){return r.type==="keyup"?B.meta.includes(r.keyCode):r.metaKey}};function G(r){return P(r)||j(r)}function Q(r){var a=Object.keys(E).reduce(function(n,e){return E[e](r)?n+1:n},0);return[16,17,18,91,92].includes(r.keyCode)?a:a+1}function T(r,a,n){var e,u;if(!r.key)return!1;if(j(a))return r.keyCode===a?a:!1;var o=a.split("."),s=0;try{for(var c=x(o),l=c.next();!l.done;l=c.next()){var p=l.value,y=E[p],m=B[p.toLowerCase()];(y&&y(r)||m&&m===r.keyCode)&&s++}}catch(k){e={error:k}}finally{try{l&&!l.done&&(u=c.return)&&u.call(c)}finally{if(e)throw e.error}}return n?s===o.length&&Q(r)===o.length?a:!1:s===o.length?a:!1}function U(r,a){return S(r)?r:G(r)?function(n){return T(n,r,a)}:Array.isArray(r)?function(n){return r.find(function(e){return T(n,e,a)})}:function(){return!!r}}var X=["keydown"];function Z(r,a,n){var e=n||{},u=e.events,o=u===void 0?X:u,s=e.target,c=e.exactMatch,l=c===void 0?!1:c,p=e.useCapture,y=p===void 0?!1:p,m=R(a),k=R(r);I(function(){var b,C,K,t=N(s,window);if(t){var q=function(i){var v,g=U(k.current,l),f=g(i),d=G(f)?f:i.key;if(f)return(v=m.current)===null||v===void 0?void 0:v.call(m,i,d)};try{for(var w=x(o),h=w.next();!h.done;h=w.next()){var H=h.value;(K=t==null?void 0:t.addEventListener)===null||K===void 0||K.call(t,H,q,y)}}catch(i){b={error:i}}finally{try{h&&!h.done&&(C=w.return)&&C.call(w)}finally{if(b)throw b.error}}return function(){var i,v,g;try{for(var f=x(o),d=f.next();!d.done;d=f.next()){var M=d.value;(g=t==null?void 0:t.removeEventListener)===null||g===void 0||g.call(t,M,q,y)}}catch(O){i={error:O}}finally{try{d&&!d.done&&(v=f.return)&&v.call(f)}finally{if(i)throw i.error}}}}},[o],s)}export{Z as u};
|
|
@@ -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-BHdqgom8.js";import{T as me}from"./index-CAo0UcQ2.js";import le from"./traffic-CNgUOmfv.js";import{D as ce}from"./index-cqDbkK4O.js";import{B as ue}from"./app-avatar-Z0pI74yn.js";import{B as de}from"./bundle-avatar-k-apmNe0.js";import{C as pe,M as E}from"./memory-DmcKHXq0.js";import{I as fe}from"./chart-BHydpm-Q.js";import{w as ge}from"./withStyles-CHrv3QJu.js";import{_ as he}from"./useLocalStorage-D6Ii7-Uk.js";import{T as ye,a as ve}from"./ToggleButtonGroup-DdMGIkJV.js";import"./Delete-B-wviuP1.js";import"./iframe-DjGjc5CU.js";import"./ChevronLeft-DFREsjdS.js";import"./ChevronRight-SbPIKwoC.js";import"./Select-DEE1eR0K.js";import"./useThemeProps-BlrL4N8K.js";import"./TextField-Cml5LlcX.js";import"./InputLabel-qD-ek4kX.js";import"./InputAdornment-C_X3KhDA.js";import"./FilterList-BSbt4VER.js";import"./LastPage-DRexSCl8.js";import"./index-CE0mBRzM.js";import"./redux-B1Qumh5U.js";import"./Search-D2g_vALD.js";import"./index-BPHA36fg.js";import"./MoreVert-xXktVXrB.js";import"./getValidReactChildren-86LVJ_ka.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-DzlR4ROA.js";import{T as me}from"./index-Cmy0GHU-.js";import le from"./traffic-BgMFjNc5.js";import{D as ce}from"./index-DTSardYw.js";import{B as ue}from"./app-avatar-BvOjNwzf.js";import{B as de}from"./bundle-avatar-CW4zHZR5.js";import{C as pe,M as E}from"./memory-CVFS6lDi.js";import{I as fe}from"./chart-TIGkq42g.js";import{w as ge}from"./withStyles-unQnV9F2.js";import{_ as he}from"./useLocalStorage-F8gidp1W.js";import{T as ye,a as ve}from"./ToggleButtonGroup-DtqIWzr-.js";import"./Delete-DFFe3xyW.js";import"./iframe-C3LtsJmK.js";import"./ChevronLeft-CvWKad8W.js";import"./ChevronRight-93HrdGCM.js";import"./Select-C44-YCyD.js";import"./useThemeProps-CRpVKi5P.js";import"./TextField-BjNW7Bjw.js";import"./InputLabel-BOR0LpK5.js";import"./InputAdornment-DT4h3g9o.js";import"./FilterList-FEjK2Fox.js";import"./LastPage-BmNCoOR7.js";import"./index-CUztA_gz.js";import"./redux-C4Q_CSvp.js";import"./Search-CjX0JQkS.js";import"./index-po1Du4Ca.js";import"./MoreVert-C_-FQbwq.js";import"./getValidReactChildren-Y-QNoefA.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-DzlR4ROA.js";import{d as gn}from"./ExpandMore-CFYbzpsT.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{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-DzlR4ROA.js";import{T as de}from"./index-Cmy0GHU-.js";import pe from"./audit-logs-D4-Bez8p.js";import{P as ue,M as fe}from"./index-D53ihNsv.js";import ye from"./index-EKqCJff8.js";import{T as ge}from"./team-nBwKhOsv.js";import{E as xe}from"./index-po1Du4Ca.js";import{d as he}from"./Add-B6ZIiZST.js";import{T as N}from"./TextField-BjNW7Bjw.js";import{F as H,S as V}from"./Select-C44-YCyD.js";import{I as Q}from"./InputLabel-BOR0LpK5.js";import{C as W}from"./click-to-copy-ZbSHXJko.js";import{f as ve}from"./index-BojVbZw0.js";import{d as je}from"./Delete-DFFe3xyW.js";import{C as Ce}from"./delete-confirm-CGv3y6py.js";import{d as ke}from"./Edit-wLc7o2cw.js";import"./index-D0RT0rzU.js";import"./useLocalStorage-F8gidp1W.js";import"./Pagination-BfGbGnHW.js";import"./LastPage-BmNCoOR7.js";import"./index-qSHb4AGp.js";import"./Loop-COqhNCYW.js";import"./ViewList-CHj6lFwi.js";import"./list-header-5GKfEIKg.js";import"./Search-CjX0JQkS.js";import"./index-DTSardYw.js";import"./FilterList-FEjK2Fox.js";import"./useThemeProps-CRpVKi5P.js";import"./index-CUztA_gz.js";import"./redux-C4Q_CSvp.js";import"./MoreVert-C_-FQbwq.js";import"./index-ffNDefbl.js";import"./ExpandMore-CFYbzpsT.js";import"./resource-dialog-Byph1CoJ.js";import"./index-C3UQMAkF.js";import"./index-CkbP6S_A.js";import"./index-CR_2MaC1.js";import"./index-BdL0EBBo.js";import"./isEqual-CFOAIOWs.js";import"./index-ZG7jWpak.js";import"./url-evaluation-C7b_jErN.js";import"./blocklet-d8bc_SQ4.js";import"./index-8azRnZez.js";import"./sdk-aTAcQDv-.js";import"./actions-TtrKwsqz.js";import"./MoreHoriz-IPlU_Vvy.js";import"./shorten-label-BSQEIROA.js";import"./index-RRgjvIfT.js";import"./ButtonGroup-3w5LvaA0.js";import"./getValidReactChildren-Y-QNoefA.js";import"./EditIcon-BCVTD6hP.js";import"./LockIcon-BB4v3xDA.js";import"./Google-C9I0SVEJ.js";import"./index-DQo_Dew3.js";import"./InputAdornment-DT4h3g9o.js";import"./ToggleButtonGroup-DtqIWzr-.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{r as d,j as o,s as h,Q as p,P as i}from"./index-
|
|
1
|
+
import{r as d,j as o,s as h,Q as p,P as i}from"./index-DzlR4ROA.js";var a={};Object.defineProperty(a,"__esModule",{value:!0});var f=a.default=void 0;v(d);var c=o;function v(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(y){return Object.getOwnPropertyDescriptor(e,y).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(n){b(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b(e,t,r){return(t=j(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=g(e,"string");return typeof t=="symbol"?t:t+""}function g(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,c.jsx)("svg",u(u({},t),{},{children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.361 2.4a.8.8 0 0 0-.728.469L.873 15.54a.8.8 0 0 0-.072.33V27.393a.8.8 0 0 0 .8.8h28.8a.8.8 0 0 0 .8-.8v-11.52a.8.8 0 0 0-.072-.331L25.37 2.869a.8.8 0 0 0-.728-.47H7.361zm-4.96 14.4v9.792h27.2v-9.799a.814.814 0 0 1-.104.007h-7.098l-2.066 3.1a.8.8 0 0 1-.666.356h-8.064a.8.8 0 0 1-.665-.356L8.87 16.8h-6.47zm26.816-1.6H21.97a.8.8 0 0 0-.665.356l-2.067 3.1h-7.208l-2.066-3.1a.8.8 0 0 0-.666-.356H2.785L7.876 4h16.25l5.09 11.2z",fill:"currentColor"})}))};l.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};l.displayName="empty";f=a.default=l;const O=h(p)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as y}from"./index-
|
|
1
|
+
import{g as y}from"./index-DzlR4ROA.js";var c={};function u(e,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var T=u;u.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};u.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};u.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var i=new Date().getTime();if(e&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},t),this._options.unref&&this._timer.unref(),!0};u.prototype.attempt=function(e,i){this._fn=e,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};u.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};u.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};u.prototype.start=u.prototype.try;u.prototype.errors=function(){return this._errors};u.prototype.attempts=function(){return this._attempts};u.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},i=null,t=0,r=0;r<this._errors.length;r++){var n=this._errors[r],o=n.message,a=(e[o]||0)+1;e[o]=a,a>=t&&(i=n,t=a)}return i};(function(e){var i=T;e.operation=function(t){var r=e.timeouts(t);return new i(r,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)r[n]=t[n];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],a=0;a<r.retries;a++)o.push(this.createTimeout(a,r));return t&&t.forever&&!o.length&&o.push(this.createTimeout(a,r)),o.sort(function(s,m){return s-m}),o},e.createTimeout=function(t,r){var n=r.randomize?Math.random()+1:1,o=Math.round(n*Math.max(r.minTimeout,1)*Math.pow(r.factor,t));return o=Math.min(o,r.maxTimeout),o},e.wrap=function(t,r,n){if(r instanceof Array&&(n=r,r=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var a=0;a<n.length;a++){var s=n[a],m=t[s];t[s]=(function(p){var f=e.operation(r),h=Array.prototype.slice.call(arguments,1),l=h.pop();h.push(function(_){f.retry(_)||(_&&(arguments[0]=f.mainError()),l.apply(this,arguments))}),f.attempt(function(){p.apply(t,h)})}).bind(t,m),t[s].options=r}}})(c);var v=c;const R=y(v);export{R as a,v as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as Te,aL as Ce,j as t,P as U,n as _e,dQ as pa,r as K,bb as ma,Q as m,fc as kn,ez as as,a2 as Ie,C as sn,t as he,v as ha,w as ba,H as be,gM as Ea,E as J,N as je,ac as _a,y as rs,fK as xa,m as zt,gN as ya,at as Sa,aZ as Ne,a_ as is,D as Je,B as ie,x as va,K as Na,M as os,b as ae,bl as ge,bG as cs,cb as Aa,f as xe,bo as Ht,bd as Ve,V as Ta,g as Qe,ch as M,aO as Me,ds as me,a3 as Ca,gO as Ae,f1 as Ra,q as ft,fd as ze,U as ls,ai as et,a8 as Oa,k as at,bH as wa,bI as Ia,ax as Pn,b6 as La,dM as ve,d0 as rt,fM as Ue,gP as ja,gQ as Ma,gR as Da,aS as ka,bt as Pa,bu as Ba,gS as Fa,gz as $a,bA as Ua,b7 as us,bj as Gt,R as Ka,eT as ds,s as za,fi as we,$ as Ha,cO as fs,F as Ga,G as Rt}from"./index-
|
|
1
|
+
import{aK as Te,aL as Ce,j as t,P as U,n as _e,dQ as pa,r as K,bb as ma,Q as m,fc as kn,ez as as,a2 as Ie,C as sn,t as he,v as ha,w as ba,H as be,gM as Ea,E as J,N as je,ac as _a,y as rs,fK as xa,m as zt,gN as ya,at as Sa,aZ as Ne,a_ as is,D as Je,B as ie,x as va,K as Na,M as os,b as ae,bl as ge,bG as cs,cb as Aa,f as xe,bo as Ht,bd as Ve,V as Ta,g as Qe,ch as M,aO as Me,ds as me,a3 as Ca,gO as Ae,f1 as Ra,q as ft,fd as ze,U as ls,ai as et,a8 as Oa,k as at,bH as wa,bI as Ia,ax as Pn,b6 as La,dM as ve,d0 as rt,fM as Ue,gP as ja,gQ as Ma,gR as Da,aS as ka,bt as Pa,bu as Ba,gS as Fa,gz as $a,bA as Ua,b7 as us,bj as Gt,R as Ka,eT as ds,s as za,fi as we,$ as Ha,cO as fs,F as Ga,G as Rt}from"./index-DzlR4ROA.js";import{I as Wa}from"./iframe-C3LtsJmK.js";import{F as qa,R as Va,I as Ya,a as Wt,L as Ot,b as Za,d as Xa}from"./line-Cpeu8572.js";import{d as gs}from"./ChevronRight-93HrdGCM.js";import{d as ps}from"./ExpandMore-CFYbzpsT.js";import{T as an}from"./index-Cmy0GHU-.js";import{B as ms}from"./bundle-avatar-CW4zHZR5.js";import{u as Ja,B as Qa}from"./app-avatar-BvOjNwzf.js";import{i as er}from"./isEqual-CFOAIOWs.js";import{d as tr}from"./Loop-COqhNCYW.js";import{d as nr}from"./Done-3-QQ_TOf.js";import{a as Bn,A as sr}from"./Autocomplete-BRgMnZ52.js";import{T as ne,F as ar}from"./TextField-BjNW7Bjw.js";import{e as rr}from"./mode-B2dWMeTO.js";import{C as ir,d as or}from"./Public-CcSZDx4-.js";import{u as pe}from"./blocklet-d8bc_SQ4.js";import{C as cr}from"./click-to-copy-ZbSHXJko.js";import{a as rn}from"./team-nBwKhOsv.js";import{a as Ke}from"./index-CR_2MaC1.js";import{E as on}from"./index-po1Du4Ca.js";import{u as De,C as ee}from"./index.esm-DNLYWMPY.js";import{F as re}from"./Select-C44-YCyD.js";import{d as lr}from"./Launch-BN3gZaS3.js";import{d as ur}from"./EditIcon-BCVTD6hP.js";import{d as dr}from"./Edit-wLc7o2cw.js";import{d as fr}from"./actions-DGcLEhc9.js";import{u as gr,a as pr,D as mr,H as hr}from"./index-CUztA_gz.js";import{S as ht}from"./switch-control-BxRwCbFm.js";import{K as br}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{S as Er}from"./Slider-C0JALcDq.js";import{D as _r}from"./index-DTSardYw.js";import{I as xr}from"./index-8azRnZez.js";import"./index-CveYHk3t.js";import"./ArrowDropDown-CTOfLnwc.js";import"./ButtonGroup-3w5LvaA0.js";import"./getValidReactChildren-Y-QNoefA.js";import"./index-qSHb4AGp.js";import"./Delete-DFFe3xyW.js";import"./InputLabel-BOR0LpK5.js";import"./url-evaluation-C7b_jErN.js";import"./useLocalStorage-F8gidp1W.js";import"./MoreVert-C_-FQbwq.js";import"./status-6F7XJ5dp.js";import"./redux-C4Q_CSvp.js";import"./FilterList-FEjK2Fox.js";import"./useThemeProps-CRpVKi5P.js";import"./LastPage-BmNCoOR7.js";import"./Search-CjX0JQkS.js";var cn={},yr=Ce;Object.defineProperty(cn,"__esModule",{value:!0});var hs=cn.default=void 0,Sr=yr(Te()),vr=t;hs=cn.default=(0,Sr.default)((0,vr.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var ln={},Nr=Ce;Object.defineProperty(ln,"__esModule",{value:!0});var bs=ln.default=void 0,Ar=Nr(Te()),Tr=t;bs=ln.default=(0,Ar.default)((0,Tr.jsx)("path",{d:"M21 10h-8.35C11.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-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var un={},Cr=Ce;Object.defineProperty(un,"__esModule",{value:!0});var Es=un.default=void 0,Rr=Cr(Te()),Or=t;Es=un.default=(0,Rr.default)((0,Or.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var dn={},wr=Ce;Object.defineProperty(dn,"__esModule",{value:!0});var _s=dn.default=void 0,Ir=wr(Te()),Lr=t;_s=dn.default=(0,Ir.default)((0,Lr.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");function fn({label:e,disabled:n,required:s,initialValue:r,onChange:u,style:c,onSubmit:o,triggers:a,options:i,formatterBeforeSubmit:d,helperText:l,placeholder:y,renderImage:E,renderLabel:h,filterKeys:v,noEmpty:N,...C}){const[w,f]=K.useState(!1),[g,S]=K.useState(!1),[p,x]=ma.useState(""),[R,k]=K.useState(r),[O,_]=K.useState(R),I=K.useMemo(()=>{if(!i)return{};const $={};return i.forEach(b=>{$[b.code]=b}),$},[i]),T=()=>{if(!i)return[];if(!p)return i.map(b=>b.code);const $=new RegExp(p.toLowerCase());return i.filter(b=>{var A;for(let P=0;P<v.length;P++){const z=v[P];if($.test((A=b[z])==null?void 0:A.toLowerCase()))return!0}return!1}).map(b=>b.code)},D=async()=>{S(!0);try{await o(typeof d=="function"?d(O):O)===!1?_(R):N&&!O.length?(_(r),k(r)):(_(O),k(O))}catch{_(R)}finally{S(!1),f(!1)}},F=($,b)=>{if(!Array.isArray(b)){_([]),u([]);return}const A=b.filter(P=>I[P]);if(!A.length){_([]),u([]);return}_(A),u(A)},V=w?t.jsx(sr,{options:i,value:O,onChange:F,inputValue:p,onInputChange:($,b)=>{x(b)},PopperComponent:Mr,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:T,getOptionLabel:$=>{var b;return(b=I[$])==null?void 0:b.name},renderInput:$=>t.jsx(ne,{...$,label:"",placeholder:y}),renderOption:($,b)=>{var P;const A=O.indexOf(b)!==-1;return K.createElement(jr,{component:"li",...$,key:b},E(I[b]||{}),t.jsx(m,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:A?"700":"normal"},children:h(b,I[b])||((P=I[b])==null?void 0:P.name)}),t.jsx(m,{component:kn,sx:{opacity:.5,width:18,height:18},style:{visibility:A?"visible":"hidden"}}))},...C}):t.jsx(m,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:O.filter($=>i.some(b=>b.code===$)).map($=>t.jsx(as,{label:i.find(b=>b.code===$).name,style:{marginRight:8},size:"small"},$))});return t.jsx(qa,{className:"form",style:c,children:t.jsxs(m,{className:"form-item",children:[t.jsxs(m,{className:"form-item-label",children:[e,s&&t.jsx(Va,{})]}),t.jsxs(m,{className:"form-item-body",children:[t.jsx(m,{className:"form-item-input",children:V}),t.jsx(m,{className:"form-item-action",children:w?t.jsxs(t.Fragment,{children:[t.jsx(Ie,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:n||g,size:"large",children:g?t.jsx(sn,{size:24}):t.jsx(nr,{})}),t.jsx(Ie,{"data-cy":"schema-form-item-cancel",onClick:()=>{_(R),f(!1)},disabled:n||g,size:"large",children:t.jsx(kn,{})})]}):t.jsx(Ya,{triggers:a,onEnterEdit:()=>f(!0),disabled:n})})]}),w&&l&&t.jsx(ar,{children:l})]})})}fn.propTypes={style:U.object,onSubmit:U.func,onChange:U.func,label:U.string,initialValue:U.string,required:U.bool,disabled:U.bool,triggers:U.array,options:U.array,helperText:U.string,formatterBeforeSubmit:U.func,placeholder:U.string,renderImage:U.func,filterKeys:U.arrayOf(U.string),noEmpty:U.bool,renderLabel:U.func};fn.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const jr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d,j as o,C as f,A as h,aw as v,cg as C,ch as u,Q as j,bk as I,ad as P,H as k}from"./index-
|
|
1
|
+
import{u as d,j as o,C as f,A as h,aw as v,cg as C,ch as u,Q as j,bk as I,ad as P,H as k}from"./index-DzlR4ROA.js";import{I as R}from"./invitation-4BcBcG3g.js";import"./index-CkbP6S_A.js";import"./index-CveYHk3t.js";import"./sdk-aTAcQDv-.js";import"./CheckCircle-DE_y9vib.js";import"./wrap-locale-CCm3KObK.js";function S(n){const{searchParams:i}=new URL(window.location.href),g=h(),{api:a,session:r}=v(),{info:l}=d(),c=i.get("redirect"),p=i.get("id"),t=C(async()=>{if(!p)return null;const{data:e}=await a.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return e}),m=u(()=>{if(t.error)throw t.error;return t==null?void 0:t.data}),w=u(async(e,x=s=>s)=>{e&&(e.sessionToken&&P(x(e.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const s=decodeURIComponent(c);s.startsWith(k.WELLKNOWN_SERVICE_PATH_PREFIX)?g(s,{replace:!0}):window.location=s}else window.location=window.env.pathPrefix||"/"},50)});return t.loading?o.jsx(f,{}):o.jsx(j,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:o.jsx(R,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:e=>I(e,l),checkFn:a.get,onLoginSuccess:w,passportColor:"default",onLogin:r.login})})}function H(){return d().loading?o.jsx(f,{}):o.jsx(S,{})}export{H as default};
|