@abtnode/webapp 1.16.30-beta-cd65989e → 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-DcfqNj9w.js → Add-B6ZIiZST.js} +1 -1
- package/dist/assets/{ArrowDropDown-DYMMZRTO.js → ArrowDropDown-CTOfLnwc.js} +1 -1
- package/dist/assets/{Autocomplete-B3WY_LBb.js → Autocomplete-BRgMnZ52.js} +1 -1
- package/dist/assets/{Breadcrumbs-C3Ukk_Va.js → Breadcrumbs-s9U9zLgF.js} +1 -1
- package/dist/assets/{ButtonGroup-Dyh7V3R_.js → ButtonGroup-3w5LvaA0.js} +1 -1
- package/dist/assets/{CheckCircle-DFyRfRNK.js → CheckCircle-DE_y9vib.js} +1 -1
- package/dist/assets/{ChevronLeft-BP608n3q.js → ChevronLeft-CvWKad8W.js} +1 -1
- package/dist/assets/{ChevronRight-DXthvSJU.js → ChevronRight-93HrdGCM.js} +1 -1
- package/dist/assets/{Close-DRCHgHGm.js → Close-DzKkufzk.js} +1 -1
- package/dist/assets/{Delete-Db11NFpL.js → Delete-DFFe3xyW.js} +1 -1
- package/dist/assets/DeleteOutline-yYcRq6ni.js +1 -0
- package/dist/assets/{Done-8K83c718.js → Done-3-QQ_TOf.js} +1 -1
- package/dist/assets/{Edit-D7NzY4U7.js → Edit-wLc7o2cw.js} +1 -1
- package/dist/assets/{EditIcon-C7JFIq8b.js → EditIcon-BCVTD6hP.js} +1 -1
- package/dist/assets/{ExpandMore-DQZgaGQn.js → ExpandMore-CFYbzpsT.js} +1 -1
- package/dist/assets/{FilterList-FpqscjJw.js → FilterList-FEjK2Fox.js} +1 -1
- package/dist/assets/{Google-kRiNbyHh.js → Google-C9I0SVEJ.js} +1 -1
- package/dist/assets/{Https-s4r-e05W.js → Https-BPSFFlg6.js} +1 -1
- package/dist/assets/{InputAdornment-B5quKKO5.js → InputAdornment-DT4h3g9o.js} +1 -1
- package/dist/assets/{InputLabel-Dh6H4BIb.js → InputLabel-BOR0LpK5.js} +1 -1
- package/dist/assets/{LastPage-DT2e5BXx.js → LastPage-BmNCoOR7.js} +1 -1
- package/dist/assets/{Launch-cwgW1pSn.js → Launch-BN3gZaS3.js} +1 -1
- package/dist/assets/{Link-DEgDwuSo.js → Link-Dxx2K6Ua.js} +1 -1
- package/dist/assets/{LoadingButton-DDckTsBs.js → LoadingButton-DdNqcAhj.js} +1 -1
- package/dist/assets/{LockIcon-DuSbMAm7.js → LockIcon-BB4v3xDA.js} +1 -1
- package/dist/assets/{Loop-ZSIw_P5f.js → Loop-COqhNCYW.js} +1 -1
- package/dist/assets/{MoreHoriz-DAjkNEHz.js → MoreHoriz-IPlU_Vvy.js} +1 -1
- package/dist/assets/{MoreVert-BWsZ-BJo.js → MoreVert-C_-FQbwq.js} +1 -1
- package/dist/assets/{Pagination-BJP77u5l.js → Pagination-BfGbGnHW.js} +1 -1
- package/dist/assets/{Public-DDWrr2XN.js → Public-CcSZDx4-.js} +1 -1
- package/dist/assets/{SchemaReference.es-k9Z767eT.js → SchemaReference.es-DmaLWYOX.js} +1 -1
- package/dist/assets/{Search-SYh-6ZOz.js → Search-CjX0JQkS.js} +1 -1
- package/dist/assets/{Select-BLXgoX9k.js → Select-C44-YCyD.js} +1 -1
- package/dist/assets/{Skeleton-Dyu5Ax0I.js → Skeleton-4s7n7VqF.js} +1 -1
- package/dist/assets/{Slider-B0276czb.js → Slider-C0JALcDq.js} +1 -1
- package/dist/assets/{Stepper-CZPI8cC9.js → Stepper-BRwbb4LL.js} +1 -1
- package/dist/assets/{TextField-DwK_GXoo.js → TextField-BjNW7Bjw.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-DYNoxLKb.js → ToggleButtonGroup-DtqIWzr-.js} +1 -1
- package/dist/assets/{ViewList-BuaOPxVQ.js → ViewList-CHj6lFwi.js} +1 -1
- package/dist/assets/actions-DGcLEhc9.js +11 -0
- package/dist/assets/{actions-CCXhc7Af.js → actions-TtrKwsqz.js} +1 -1
- package/dist/assets/{agreement-zGj-Qfxf.js → agreement-DXIl-xR_.js} +1 -1
- package/dist/assets/api-Rcl-3MyM.js +1 -0
- package/dist/assets/{app-avatar-CHPdyNGu.js → app-avatar-BvOjNwzf.js} +1 -1
- package/dist/assets/{audit-logs-D956eiA3.js → audit-logs-D4-Bez8p.js} +1 -1
- package/dist/assets/blocklet-d8bc_SQ4.js +1 -0
- package/dist/assets/{brace-fold.es-Ceo3WJ-_.js → brace-fold.es-B1LEOxqn.js} +1 -1
- package/dist/assets/{bundle-avatar-BmpkX0gn.js → bundle-avatar-CW4zHZR5.js} +1 -1
- package/dist/assets/{chart-C1MBEatU.js → chart-TIGkq42g.js} +1 -1
- package/dist/assets/{click-to-copy-BE3dtZl9.js → click-to-copy-ZbSHXJko.js} +1 -1
- package/dist/assets/{closebrackets.es-DRptbCUu.js → closebrackets.es-hz2Jou3O.js} +1 -1
- package/dist/assets/{codemirror.es-ZszZWF0R.js → codemirror.es-DRCfXk0r.js} +1 -1
- package/dist/assets/{comment.es-cnLgD8Uc.js → comment.es-BmnkGJwk.js} +1 -1
- package/dist/assets/{config-navigation-BOrH5Hvb.js → config-navigation-DS08ePOc.js} +1 -1
- package/dist/assets/{delete-confirm-DpRBeIKH.js → delete-confirm-CGv3y6py.js} +1 -1
- package/dist/assets/{detail-vJPrtqvp.js → detail-DmU03eC7.js} +3 -3
- package/dist/assets/{dialog.es-CfQUxsPX.js → dialog.es-CSYXNrcw.js} +1 -1
- package/dist/assets/{download-cFw_E2Hj.js → download-CAroNPKK.js} +1 -1
- package/dist/assets/{foldgutter.es-CgkrTV35.js → foldgutter.es-BSRJoBoZ.js} +1 -1
- package/dist/assets/getValidReactChildren-Y-QNoefA.js +1 -0
- package/dist/assets/{hint.es-eNWKZSbN.js → hint.es-DuHUgHT3.js} +1 -1
- package/dist/assets/{hint.es2-BhkzwSZo.js → hint.es2-CLzxOo96.js} +1 -1
- package/dist/assets/{iframe-BIwxy4ip.js → iframe-C3LtsJmK.js} +1 -1
- package/dist/assets/index-3tln4L6C.js +21 -0
- package/dist/assets/{index-CInfPT7W.js → index-8azRnZez.js} +1 -1
- package/dist/assets/{index-Dntt1eil.js → index-BApbAOLy.js} +1 -1
- package/dist/assets/{index-DMFar3I1.js → index-BN-HHDJJ.js} +1 -1
- package/dist/assets/{index-D1PLfduk.js → index-BQmNmoac.js} +1 -1
- package/dist/assets/{index-cvAtg-Od.js → index-BZCt88Kn.js} +14 -14
- package/dist/assets/{index-AgJrAiSK.js → index-BatYQHX2.js} +3 -3
- package/dist/assets/{index-BSMELOgI.js → index-BdL0EBBo.js} +1 -1
- package/dist/assets/{index-Bd4i9E1O.js → index-BfvNFce6.js} +1 -1
- package/dist/assets/{index-Dcdxfmgi.js → index-BrDzj3_R.js} +1 -1
- package/dist/assets/{index-Cd1cCAJE.js → index-C3UQMAkF.js} +1 -1
- package/dist/assets/{index-DBx2-m_Y.js → index-C3q33eZl.js} +1 -1
- package/dist/assets/{index-CrQS5iun.js → index-C4LMPu9u.js} +1 -1
- package/dist/assets/{index-BL7aEYjP.js → index-CJBZPdm6.js} +1 -1
- package/dist/assets/{index-ZSHqTs4i.js → index-CR_2MaC1.js} +1 -1
- package/dist/assets/{index-77OEIYM-.js → index-CUztA_gz.js} +1 -1
- package/dist/assets/{index-D3Cozcmh.js → index-CkbP6S_A.js} +1 -1
- package/dist/assets/{index-KJ30jnaf.js → index-Cmy0GHU-.js} +1 -1
- package/dist/assets/{index-Cw-_inHl.js → index-Ctog4pYE.js} +1 -1
- package/dist/assets/{index-D9Y3tfXV.js → index-CveYHk3t.js} +1 -1
- package/dist/assets/{index-bivCnspX.js → index-D0RT0rzU.js} +1 -1
- package/dist/assets/index-D53ihNsv.js +292 -0
- package/dist/assets/{index-NkzSJ_BT.js → index-D6q9zEjn.js} +5 -5
- package/dist/assets/{index-Dw1w1qL3.js → index-DQo_Dew3.js} +1 -1
- package/dist/assets/{index-Dqs8xtQE.js → index-DTSardYw.js} +1 -1
- package/dist/assets/{index-Dd6xY134.js → index-DfTYGL67.js} +3 -3
- package/dist/assets/index-DnLx-UdH.js +68 -0
- package/dist/assets/{index-DD1cWFOC.js → index-DpVeIVbC.js} +1 -1
- package/dist/assets/{index-BtBRSL1d.js → index-DrdqOXJL.js} +3 -3
- package/dist/assets/{index-wZRHPQoX.js → index-DtsnjFBd.js} +1 -1
- package/dist/assets/{index-C74bQC6L.js → index-Dy-ye0PE.js} +1 -1
- package/dist/assets/{index-Cwi3bFQC.js → index-DzlR4ROA.js} +4 -4
- package/dist/assets/{index-BkdBfB4w.js → index-EKqCJff8.js} +1 -1
- package/dist/assets/{index-Dp2GTeOn.js → index-RRgjvIfT.js} +1 -1
- package/dist/assets/{index-H_NjEuu9.js → index-RrRN76hq.js} +1 -1
- package/dist/assets/{index-C42qq7Ec.js → index-UbiaSDM9.js} +1 -1
- package/dist/assets/{index-DEPFtOhR.js → index-aiikLstk.js} +1 -1
- package/dist/assets/{index-B07CNOuw.js → index-ffNDefbl.js} +1 -1
- package/dist/assets/{index-Dpoqj6Jo.js → index-fiBRRSS-.js} +1 -1
- package/dist/assets/{index-BHeHy1vA.js → index-po1Du4Ca.js} +1 -1
- package/dist/assets/{index-D4xfc6Js.js → index-qSHb4AGp.js} +1 -1
- package/dist/assets/{index-BBKwIw61.js → index-sw48VBzs.js} +1 -1
- package/dist/assets/{index-Bq5tRfCd.js → index-vCyUMIWI.js} +1 -1
- package/dist/assets/{index-CRniQIuD.js → index-x2vTLzR6.js} +1 -1
- package/dist/assets/{index.es-tDltq_DZ.js → index.es-C2y5LgUg.js} +1 -1
- package/dist/assets/{index.esm-DhpdxP8T.js → index.esm-DNLYWMPY.js} +1 -1
- package/dist/assets/{info-addon.es-DMX0vTB2.js → info-addon.es-OU9D4WD4.js} +1 -1
- package/dist/assets/{info.es-C_it_PXd.js → info.es-BYpWwfiq.js} +1 -1
- package/dist/assets/{install-from-url-BCD5VkoR.js → install-from-url-BHRJMyoo.js} +1 -1
- package/dist/assets/{invitation-BumVTtN2.js → invitation-4BcBcG3g.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DubKYq2T.js → is-path-prefix-equal-QODAXh-c.js} +1 -1
- package/dist/assets/{isEqual-BkbmgPj_.js → isEqual-CFOAIOWs.js} +1 -1
- package/dist/assets/{item-DrPKfKmr.js → item-DinHwjuB.js} +1 -1
- package/dist/assets/{javascript.es-DMQy9e7V.js → javascript.es-BZ4hu16-.js} +1 -1
- package/dist/assets/{jump-to-line.es-CnkPzf5y.js → jump-to-line.es-ds6uZCNW.js} +1 -1
- package/dist/assets/{jump.es-C9HLQdHA.js → jump.es-Dow2EsmT.js} +1 -1
- package/dist/assets/{line-4lY_Qb2m.js → line-Cpeu8572.js} +3 -3
- package/dist/assets/{lint.es-C5Vl7JPf.js → lint.es-BumMccTK.js} +1 -1
- package/dist/assets/{lint.es2-Bm4ZHXqa.js → lint.es2-BzVHBAgd.js} +1 -1
- package/dist/assets/{lint.es3-BB9pBVnq.js → lint.es3-ziEStM1n.js} +1 -1
- package/dist/assets/{list-header-BCtVonO4.js → list-header-5GKfEIKg.js} +1 -1
- package/dist/assets/{log-wlfixqXj.js → log-BzeVufdm.js} +1 -1
- package/dist/assets/{lottie-iTUSD55o.js → lottie-Dittdj4N.js} +1 -1
- package/dist/assets/{matchbrackets.es-Bl0t_qCA.js → matchbrackets.es-DqPFoH1c.js} +1 -1
- package/dist/assets/{memory-wEAomQNC.js → memory-CVFS6lDi.js} +1 -1
- package/dist/assets/{mode.es-rKbkm8lU.js → mode.es-tUbE6Sz4.js} +1 -1
- package/dist/assets/{mode.es2-ytsRZP0t.js → mode.es2-DOWb3-oK.js} +1 -1
- package/dist/assets/{mode.es3-DfHDE8XK.js → mode.es3-BcjY2hx8.js} +1 -1
- package/dist/assets/{onlineParser.es-wDu05TUX.js → onlineParser.es-BdeAPFTn.js} +1 -1
- package/dist/assets/{overview-1N_1lpT0.js → overview-D7vbgmTw.js} +1 -1
- package/dist/assets/{react-B4m6RLMM.js → react-Dervdh0W.js} +16 -16
- package/dist/assets/{redux-CxE33JOf.js → redux-C4Q_CSvp.js} +1 -1
- package/dist/assets/{resource-dialog-C-7qKAQl.js → resource-dialog-Byph1CoJ.js} +1 -1
- package/dist/assets/{runtime-5KBAFD-g.js → runtime-7TSih23R.js} +1 -1
- package/dist/assets/{schema-B4kKlOTb.js → schema-Bq2ly-4o.js} +1 -1
- package/dist/assets/sdk-aTAcQDv-.js +1 -0
- package/dist/assets/{search.es-CQuNoVSc.js → search.es-CMLj29wb.js} +1 -1
- package/dist/assets/{searchcursor.es-Bbgmgmrg.js → searchcursor.es-eHb4SABv.js} +1 -1
- package/dist/assets/service-FolPIcUS.js +1 -0
- package/dist/assets/{shorten-label-C_WwZ4ZV.js → shorten-label-BSQEIROA.js} +1 -1
- package/dist/assets/{show-hint.es-tSocwxSB.js → show-hint.es-Bn3zEE4X.js} +1 -1
- package/dist/assets/{slicedToArray-CmalbWCs.js → slicedToArray-ROu8OO6l.js} +1 -1
- package/dist/assets/{spaces-1KfYd8Qs.js → spaces-CKLphlMZ.js} +1 -1
- package/dist/assets/{status-V0qJ0HIh.js → status-6F7XJ5dp.js} +1 -1
- package/dist/assets/{sublime.es-CLH5NL12.js → sublime.es-CYqGOBLs.js} +1 -1
- package/dist/assets/{switch-control-CdkyWsoc.js → switch-control-BxRwCbFm.js} +1 -1
- package/dist/assets/{table-icons-Baq11dUV.js → table-icons-BXeoVsYd.js} +2 -2
- package/dist/assets/{team-Cup7T2o5.js → team-nBwKhOsv.js} +1 -1
- package/dist/assets/{toUpper-Dy6OxPnp.js → toUpper-BBB_TInl.js} +1 -1
- package/dist/assets/{traffic-BL6WX1d5.js → traffic-BgMFjNc5.js} +1 -1
- package/dist/assets/{url-evaluation-DDt3hytj.js → url-evaluation-C7b_jErN.js} +1 -1
- package/dist/assets/{url-join-H8M29juk.js → url-join-LN7aIhdX.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-Z2TSdCJw.js → use-blocklet-info-for-connect-did-spaces-Dw7UZ6Jz.js} +1 -1
- package/dist/assets/{useLocalStorage-6mPZ-rWo.js → useLocalStorage-F8gidp1W.js} +1 -1
- package/dist/assets/{useThemeProps-rDwpoqme.js → useThemeProps-CRpVKi5P.js} +1 -1
- package/dist/assets/{util-DThpIciT.js → util-DjDIVQpP.js} +1 -1
- package/dist/assets/{wait-container-DHDQHqIH.js → wait-container-fwTsXfbb.js} +1 -1
- package/dist/assets/{withStyles-CXCpzdMR.js → withStyles-unQnV9F2.js} +1 -1
- package/dist/assets/{wrap-locale-Kr9QT-Cb.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-CZIY0Jkx.js +0 -1
- package/dist/assets/DeleteOutline-FodRCvrE.js +0 -1
- package/dist/assets/actions-CWKaEmCe.js +0 -11
- package/dist/assets/api-CG6YJvRD.js +0 -1
- package/dist/assets/blocklet-DsP8dvbD.js +0 -1
- package/dist/assets/getValidReactChildren-BAhSJfgG.js +0 -1
- package/dist/assets/index-BReI-Zee.js +0 -68
- package/dist/assets/index-FIMmdaZK.js +0 -21
- package/dist/assets/index-YpvJfazn.js +0 -292
- package/dist/assets/sdk-CV4QPi_Q.js +0 -1
- package/dist/assets/service-Bwn6NSxE.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
|
|
@@ -275,8 +275,8 @@ use chrome, FireFox or Internet Explorer 11`)}var j=safeBufferExports,_e=browser
|
|
|
275
275
|
`).forEach(function(rt){tt=rt.indexOf(":"),_e=rt.substring(0,tt).trim().toLowerCase(),et=rt.substring(tt+1).trim(),!(!_e||j[_e]&&ignoreDuplicateOf[_e])&&(_e==="set-cookie"?j[_e]?j[_e].push(et):j[_e]=[et]:j[_e]=j[_e]?j[_e]+", "+et:et)}),j},$internals=Symbol("internals");function normalizeHeader(a){return a&&String(a).trim().toLowerCase()}function normalizeValue(a){return a===!1||a==null?a:utils$1.isArray(a)?a.map(normalizeValue):String(a)}function parseTokens(a){const j=Object.create(null),_e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let et;for(;et=_e.exec(a);)j[et[1]]=et[2];return j}const isValidHeaderName=a=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());function matchHeaderValue(a,j,_e,et,tt){if(utils$1.isFunction(et))return et.call(this,j,_e);if(tt&&(j=_e),!!utils$1.isString(j)){if(utils$1.isString(et))return j.indexOf(et)!==-1;if(utils$1.isRegExp(et))return et.test(j)}}function formatHeader(a){return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(j,_e,et)=>_e.toUpperCase()+et)}function buildAccessors(a,j){const _e=utils$1.toCamelCase(" "+j);["get","set","has"].forEach(et=>{Object.defineProperty(a,et+_e,{value:function(tt,nt,rt){return this[et].call(this,j,tt,nt,rt)},configurable:!0})})}let AxiosHeaders$1=class{constructor(j){j&&this.set(j)}set(j,_e,et){const tt=this;function nt(it,ot,ut){const st=normalizeHeader(ot);if(!st)throw new Error("header name must be a non-empty string");const ft=utils$1.findKey(tt,st);(!ft||tt[ft]===void 0||ut===!0||ut===void 0&&tt[ft]!==!1)&&(tt[ft||ot]=normalizeValue(it))}const rt=(it,ot)=>utils$1.forEach(it,(ut,st)=>nt(ut,st,ot));if(utils$1.isPlainObject(j)||j instanceof this.constructor)rt(j,_e);else if(utils$1.isString(j)&&(j=j.trim())&&!isValidHeaderName(j))rt(parseHeaders(j),_e);else if(utils$1.isHeaders(j))for(const[it,ot]of j.entries())nt(ot,it,et);else j!=null&&nt(_e,j,et);return this}get(j,_e){if(j=normalizeHeader(j),j){const et=utils$1.findKey(this,j);if(et){const tt=this[et];if(!_e)return tt;if(_e===!0)return parseTokens(tt);if(utils$1.isFunction(_e))return _e.call(this,tt,et);if(utils$1.isRegExp(_e))return _e.exec(tt);throw new TypeError("parser must be boolean|regexp|function")}}}has(j,_e){if(j=normalizeHeader(j),j){const et=utils$1.findKey(this,j);return!!(et&&this[et]!==void 0&&(!_e||matchHeaderValue(this,this[et],et,_e)))}return!1}delete(j,_e){const et=this;let tt=!1;function nt(rt){if(rt=normalizeHeader(rt),rt){const it=utils$1.findKey(et,rt);it&&(!_e||matchHeaderValue(et,et[it],it,_e))&&(delete et[it],tt=!0)}}return utils$1.isArray(j)?j.forEach(nt):nt(j),tt}clear(j){const _e=Object.keys(this);let et=_e.length,tt=!1;for(;et--;){const nt=_e[et];(!j||matchHeaderValue(this,this[nt],nt,j,!0))&&(delete this[nt],tt=!0)}return tt}normalize(j){const _e=this,et={};return utils$1.forEach(this,(tt,nt)=>{const rt=utils$1.findKey(et,nt);if(rt){_e[rt]=normalizeValue(tt),delete _e[nt];return}const it=j?formatHeader(nt):String(nt).trim();it!==nt&&delete _e[nt],_e[it]=normalizeValue(tt),et[it]=!0}),this}concat(...j){return this.constructor.concat(this,...j)}toJSON(j){const _e=Object.create(null);return utils$1.forEach(this,(et,tt)=>{et!=null&&et!==!1&&(_e[tt]=j&&utils$1.isArray(et)?et.join(", "):et)}),_e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([j,_e])=>j+": "+_e).join(`
|
|
276
276
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(j){return j instanceof this?j:new this(j)}static concat(j,..._e){const et=new this(j);return _e.forEach(tt=>et.set(tt)),et}static accessor(j){const et=(this[$internals]=this[$internals]={accessors:{}}).accessors,tt=this.prototype;function nt(rt){const it=normalizeHeader(rt);et[it]||(buildAccessors(tt,rt),et[it]=!0)}return utils$1.isArray(j)?j.forEach(nt):nt(j),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:a},j)=>{let _e=j[0].toUpperCase()+j.slice(1);return{get:()=>a,set(et){this[_e]=et}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(a,j){const _e=this||defaults$1,et=j||_e,tt=AxiosHeaders$1.from(et.headers);let nt=et.data;return utils$1.forEach(a,function(it){nt=it.call(_e,nt,tt.normalize(),j?j.status:void 0)}),tt.normalize(),nt}function isCancel$1(a){return!!(a&&a.__CANCEL__)}function CanceledError$1(a,j,_e){AxiosError$1.call(this,a??"canceled",AxiosError$1.ERR_CANCELED,j,_e),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(a,j,_e){const et=_e.config.validateStatus;!_e.status||!et||et(_e.status)?a(_e):j(new AxiosError$1("Request failed with status code "+_e.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(_e.status/100)-4],_e.config,_e.request,_e))}function parseProtocol(a){const j=/^([-+\w]{1,25})(:?\/\/|:)/.exec(a);return j&&j[1]||""}function speedometer(a,j){a=a||10;const _e=new Array(a),et=new Array(a);let tt=0,nt=0,rt;return j=j!==void 0?j:1e3,function(ot){const ut=Date.now(),st=et[nt];rt||(rt=ut),_e[tt]=ot,et[tt]=ut;let ft=nt,dt=0;for(;ft!==tt;)dt+=_e[ft++],ft=ft%a;if(tt=(tt+1)%a,tt===nt&&(nt=(nt+1)%a),ut-rt<j)return;const ht=st&&ut-st;return ht?Math.round(dt*1e3/ht):void 0}}function throttle(a,j){let _e=0,et=1e3/j,tt,nt;const rt=(ut,st=Date.now())=>{_e=st,tt=null,nt&&(clearTimeout(nt),nt=null),a.apply(null,ut)};return[(...ut)=>{const st=Date.now(),ft=st-_e;ft>=et?rt(ut,st):(tt=ut,nt||(nt=setTimeout(()=>{nt=null,rt(tt)},et-ft)))},()=>tt&&rt(tt)]}const progressEventReducer=(a,j,_e=3)=>{let et=0;const tt=speedometer(50,250);return throttle(nt=>{const rt=nt.loaded,it=nt.lengthComputable?nt.total:void 0,ot=rt-et,ut=tt(ot),st=rt<=it;et=rt;const ft={loaded:rt,total:it,progress:it?rt/it:void 0,bytes:ot,rate:ut||void 0,estimated:ut&&it&&st?(it-rt)/ut:void 0,event:nt,lengthComputable:it!=null,[j?"download":"upload"]:!0};a(ft)},_e)},progressEventDecorator=(a,j)=>{const _e=a!=null;return[et=>j[0]({lengthComputable:_e,total:a,loaded:et}),j[1]]},asyncDecorator=a=>(...j)=>utils$1.asap(()=>a(...j)),isURLSameOrigin=platform.hasStandardBrowserEnv?function a(){const j=/(msie|trident)/i.test(navigator.userAgent),_e=document.createElement("a");let et;function tt(nt){let rt=nt;return j&&(_e.setAttribute("href",rt),rt=_e.href),_e.setAttribute("href",rt),{href:_e.href,protocol:_e.protocol?_e.protocol.replace(/:$/,""):"",host:_e.host,search:_e.search?_e.search.replace(/^\?/,""):"",hash:_e.hash?_e.hash.replace(/^#/,""):"",hostname:_e.hostname,port:_e.port,pathname:_e.pathname.charAt(0)==="/"?_e.pathname:"/"+_e.pathname}}return et=tt(window.location.href),function(rt){const it=utils$1.isString(rt)?tt(rt):rt;return it.protocol===et.protocol&&it.host===et.host}}():function a(){return function(){return!0}}(),cookies=platform.hasStandardBrowserEnv?{write(a,j,_e,et,tt,nt){const rt=[a+"="+encodeURIComponent(j)];utils$1.isNumber(_e)&&rt.push("expires="+new Date(_e).toGMTString()),utils$1.isString(et)&&rt.push("path="+et),utils$1.isString(tt)&&rt.push("domain="+tt),nt===!0&&rt.push("secure"),document.cookie=rt.join("; ")},read(a){const j=document.cookie.match(new RegExp("(^|;\\s*)("+a+")=([^;]*)"));return j?decodeURIComponent(j[3]):null},remove(a){this.write(a,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(a){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a)}function combineURLs(a,j){return j?a.replace(/\/?\/$/,"")+"/"+j.replace(/^\/+/,""):a}function buildFullPath(a,j){return a&&!isAbsoluteURL(j)?combineURLs(a,j):j}const headersToObject=a=>a instanceof AxiosHeaders$1?{...a}:a;function mergeConfig$1(a,j){j=j||{};const _e={};function et(ut,st,ft){return utils$1.isPlainObject(ut)&&utils$1.isPlainObject(st)?utils$1.merge.call({caseless:ft},ut,st):utils$1.isPlainObject(st)?utils$1.merge({},st):utils$1.isArray(st)?st.slice():st}function tt(ut,st,ft){if(utils$1.isUndefined(st)){if(!utils$1.isUndefined(ut))return et(void 0,ut,ft)}else return et(ut,st,ft)}function nt(ut,st){if(!utils$1.isUndefined(st))return et(void 0,st)}function rt(ut,st){if(utils$1.isUndefined(st)){if(!utils$1.isUndefined(ut))return et(void 0,ut)}else return et(void 0,st)}function it(ut,st,ft){if(ft in j)return et(ut,st);if(ft in a)return et(void 0,ut)}const ot={url:nt,method:nt,data:nt,baseURL:rt,transformRequest:rt,transformResponse:rt,paramsSerializer:rt,timeout:rt,timeoutMessage:rt,withCredentials:rt,withXSRFToken:rt,adapter:rt,responseType:rt,xsrfCookieName:rt,xsrfHeaderName:rt,onUploadProgress:rt,onDownloadProgress:rt,decompress:rt,maxContentLength:rt,maxBodyLength:rt,beforeRedirect:rt,transport:rt,httpAgent:rt,httpsAgent:rt,cancelToken:rt,socketPath:rt,responseEncoding:rt,validateStatus:it,headers:(ut,st)=>tt(headersToObject(ut),headersToObject(st),!0)};return utils$1.forEach(Object.keys(Object.assign({},a,j)),function(st){const ft=ot[st]||tt,dt=ft(a[st],j[st],st);utils$1.isUndefined(dt)&&ft!==it||(_e[st]=dt)}),_e}const resolveConfig=a=>{const j=mergeConfig$1({},a);let{data:_e,withXSRFToken:et,xsrfHeaderName:tt,xsrfCookieName:nt,headers:rt,auth:it}=j;j.headers=rt=AxiosHeaders$1.from(rt),j.url=buildURL(buildFullPath(j.baseURL,j.url),a.params,a.paramsSerializer),it&&rt.set("Authorization","Basic "+btoa((it.username||"")+":"+(it.password?unescape(encodeURIComponent(it.password)):"")));let ot;if(utils$1.isFormData(_e)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)rt.setContentType(void 0);else if((ot=rt.getContentType())!==!1){const[ut,...st]=ot?ot.split(";").map(ft=>ft.trim()).filter(Boolean):[];rt.setContentType([ut||"multipart/form-data",...st].join("; "))}}if(platform.hasStandardBrowserEnv&&(et&&utils$1.isFunction(et)&&(et=et(j)),et||et!==!1&&isURLSameOrigin(j.url))){const ut=tt&&nt&&cookies.read(nt);ut&&rt.set(tt,ut)}return j},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(a){return new Promise(function(_e,et){const tt=resolveConfig(a);let nt=tt.data;const rt=AxiosHeaders$1.from(tt.headers).normalize();let{responseType:it,onUploadProgress:ot,onDownloadProgress:ut}=tt,st,ft,dt,ht,mt;function bt(){ht&&ht(),mt&&mt(),tt.cancelToken&&tt.cancelToken.unsubscribe(st),tt.signal&&tt.signal.removeEventListener("abort",st)}let Rt=new XMLHttpRequest;Rt.open(tt.method.toUpperCase(),tt.url,!0),Rt.timeout=tt.timeout;function St(){if(!Rt)return;const Pt=AxiosHeaders$1.from("getAllResponseHeaders"in Rt&&Rt.getAllResponseHeaders()),qt={data:!it||it==="text"||it==="json"?Rt.responseText:Rt.response,status:Rt.status,statusText:Rt.statusText,headers:Pt,config:a,request:Rt};settle(function(Ut){_e(Ut),bt()},function(Ut){et(Ut),bt()},qt),Rt=null}"onloadend"in Rt?Rt.onloadend=St:Rt.onreadystatechange=function(){!Rt||Rt.readyState!==4||Rt.status===0&&!(Rt.responseURL&&Rt.responseURL.indexOf("file:")===0)||setTimeout(St)},Rt.onabort=function(){Rt&&(et(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,a,Rt)),Rt=null)},Rt.onerror=function(){et(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,a,Rt)),Rt=null},Rt.ontimeout=function(){let Lt=tt.timeout?"timeout of "+tt.timeout+"ms exceeded":"timeout exceeded";const qt=tt.transitional||transitionalDefaults;tt.timeoutErrorMessage&&(Lt=tt.timeoutErrorMessage),et(new AxiosError$1(Lt,qt.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,a,Rt)),Rt=null},nt===void 0&&rt.setContentType(null),"setRequestHeader"in Rt&&utils$1.forEach(rt.toJSON(),function(Lt,qt){Rt.setRequestHeader(qt,Lt)}),utils$1.isUndefined(tt.withCredentials)||(Rt.withCredentials=!!tt.withCredentials),it&&it!=="json"&&(Rt.responseType=tt.responseType),ut&&([dt,mt]=progressEventReducer(ut,!0),Rt.addEventListener("progress",dt)),ot&&Rt.upload&&([ft,ht]=progressEventReducer(ot),Rt.upload.addEventListener("progress",ft),Rt.upload.addEventListener("loadend",ht)),(tt.cancelToken||tt.signal)&&(st=Pt=>{Rt&&(et(!Pt||Pt.type?new CanceledError$1(null,a,Rt):Pt),Rt.abort(),Rt=null)},tt.cancelToken&&tt.cancelToken.subscribe(st),tt.signal&&(tt.signal.aborted?st():tt.signal.addEventListener("abort",st)));const Dt=parseProtocol(tt.url);if(Dt&&platform.protocols.indexOf(Dt)===-1){et(new AxiosError$1("Unsupported protocol "+Dt+":",AxiosError$1.ERR_BAD_REQUEST,a));return}Rt.send(nt||null)})},composeSignals=(a,j)=>{let _e=new AbortController,et;const tt=function(ot){if(!et){et=!0,rt();const ut=ot instanceof Error?ot:this.reason;_e.abort(ut instanceof AxiosError$1?ut:new CanceledError$1(ut instanceof Error?ut.message:ut))}};let nt=j&&setTimeout(()=>{tt(new AxiosError$1(`timeout ${j} of ms exceeded`,AxiosError$1.ETIMEDOUT))},j);const rt=()=>{a&&(nt&&clearTimeout(nt),nt=null,a.forEach(ot=>{ot&&(ot.removeEventListener?ot.removeEventListener("abort",tt):ot.unsubscribe(tt))}),a=null)};a.forEach(ot=>ot&&ot.addEventListener&&ot.addEventListener("abort",tt));const{signal:it}=_e;return it.unsubscribe=rt,[it,()=>{nt&&clearTimeout(nt),nt=null}]},streamChunk=function*(a,j){let _e=a.byteLength;if(!j||_e<j){yield a;return}let et=0,tt;for(;et<_e;)tt=et+j,yield a.slice(et,tt),et=tt},readBytes=async function*(a,j,_e){for await(const et of a)yield*streamChunk(ArrayBuffer.isView(et)?et:await _e(String(et)),j)},trackStream=(a,j,_e,et,tt)=>{const nt=readBytes(a,j,tt);let rt=0,it,ot=ut=>{it||(it=!0,et&&et(ut))};return new ReadableStream({async pull(ut){try{const{done:st,value:ft}=await nt.next();if(st){ot(),ut.close();return}let dt=ft.byteLength;if(_e){let ht=rt+=dt;_e(ht)}ut.enqueue(new Uint8Array(ft))}catch(st){throw ot(st),st}},cancel(ut){return ot(ut),nt.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(a=>j=>a.encode(j))(new TextEncoder):async a=>new Uint8Array(await new Response(a).arrayBuffer())),test$1=(a,...j)=>{try{return!!a(...j)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test$1(()=>{let a=!1;const j=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return a=!0,"half"}}).headers.has("Content-Type");return a&&!j}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test$1(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(a=>a.body)};isFetchSupported&&(a=>{["text","arrayBuffer","blob","formData","stream"].forEach(j=>{!resolvers[j]&&(resolvers[j]=utils$1.isFunction(a[j])?_e=>_e[j]():(_e,et)=>{throw new AxiosError$1(`Response type '${j}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,et)})})})(new Response);const getBodyLength=async a=>{if(a==null)return 0;if(utils$1.isBlob(a))return a.size;if(utils$1.isSpecCompliantForm(a))return(await new Request(a).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(a)||utils$1.isArrayBuffer(a))return a.byteLength;if(utils$1.isURLSearchParams(a)&&(a=a+""),utils$1.isString(a))return(await encodeText(a)).byteLength},resolveBodyLength=async(a,j)=>{const _e=utils$1.toFiniteNumber(a.getContentLength());return _e??getBodyLength(j)},fetchAdapter=isFetchSupported&&(async a=>{let{url:j,method:_e,data:et,signal:tt,cancelToken:nt,timeout:rt,onDownloadProgress:it,onUploadProgress:ot,responseType:ut,headers:st,withCredentials:ft="same-origin",fetchOptions:dt}=resolveConfig(a);ut=ut?(ut+"").toLowerCase():"text";let[ht,mt]=tt||nt||rt?composeSignals([tt,nt],rt):[],bt,Rt;const St=()=>{!bt&&setTimeout(()=>{ht&&ht.unsubscribe()}),bt=!0};let Dt;try{if(ot&&supportsRequestStream&&_e!=="get"&&_e!=="head"&&(Dt=await resolveBodyLength(st,et))!==0){let Mt=new Request(j,{method:"POST",body:et,duplex:"half"}),Ut;if(utils$1.isFormData(et)&&(Ut=Mt.headers.get("content-type"))&&st.setContentType(Ut),Mt.body){const[Jt,un]=progressEventDecorator(Dt,progressEventReducer(asyncDecorator(ot)));et=trackStream(Mt.body,DEFAULT_CHUNK_SIZE,Jt,un,encodeText)}}utils$1.isString(ft)||(ft=ft?"include":"omit"),Rt=new Request(j,{...dt,signal:ht,method:_e.toUpperCase(),headers:st.normalize().toJSON(),body:et,duplex:"half",credentials:ft});let Pt=await fetch(Rt);const Lt=supportsResponseStream&&(ut==="stream"||ut==="response");if(supportsResponseStream&&(it||Lt)){const Mt={};["status","statusText","headers"].forEach(dn=>{Mt[dn]=Pt[dn]});const Ut=utils$1.toFiniteNumber(Pt.headers.get("content-length")),[Jt,un]=it&&progressEventDecorator(Ut,progressEventReducer(asyncDecorator(it),!0))||[];Pt=new Response(trackStream(Pt.body,DEFAULT_CHUNK_SIZE,Jt,()=>{un&&un(),Lt&&St()},encodeText),Mt)}ut=ut||"text";let qt=await resolvers[utils$1.findKey(resolvers,ut)||"text"](Pt,a);return!Lt&&St(),mt&&mt(),await new Promise((Mt,Ut)=>{settle(Mt,Ut,{data:qt,headers:AxiosHeaders$1.from(Pt.headers),status:Pt.status,statusText:Pt.statusText,config:a,request:Rt})})}catch(Pt){throw St(),Pt&&Pt.name==="TypeError"&&/fetch/i.test(Pt.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,a,Rt),{cause:Pt.cause||Pt}):AxiosError$1.from(Pt,Pt&&Pt.code,a,Rt)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(a,j)=>{if(a){try{Object.defineProperty(a,"name",{value:j})}catch{}Object.defineProperty(a,"adapterName",{value:j})}});const renderReason=a=>`- ${a}`,isResolvedHandle=a=>utils$1.isFunction(a)||a===null||a===!1,adapters={getAdapter:a=>{a=utils$1.isArray(a)?a:[a];const{length:j}=a;let _e,et;const tt={};for(let nt=0;nt<j;nt++){_e=a[nt];let rt;if(et=_e,!isResolvedHandle(_e)&&(et=knownAdapters[(rt=String(_e)).toLowerCase()],et===void 0))throw new AxiosError$1(`Unknown adapter '${rt}'`);if(et)break;tt[rt||"#"+nt]=et}if(!et){const nt=Object.entries(tt).map(([it,ot])=>`adapter ${it} `+(ot===!1?"is not supported by the environment":"is not available in the build"));let rt=j?nt.length>1?`since :
|
|
277
277
|
`+nt.map(renderReason).join(`
|
|
278
|
-
`):" "+renderReason(nt[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+rt,"ERR_NOT_SUPPORT")}return et},adapters:knownAdapters};function throwIfCancellationRequested(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new CanceledError$1(null,a)}function dispatchRequest(a){return throwIfCancellationRequested(a),a.headers=AxiosHeaders$1.from(a.headers),a.data=transformData.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(a.adapter||defaults$1.adapter)(a).then(function(et){return throwIfCancellationRequested(a),et.data=transformData.call(a,a.transformResponse,et),et.headers=AxiosHeaders$1.from(et.headers),et},function(et){return isCancel$1(et)||(throwIfCancellationRequested(a),et&&et.response&&(et.response.data=transformData.call(a,a.transformResponse,et.response),et.response.headers=AxiosHeaders$1.from(et.response.headers))),Promise.reject(et)})}const VERSION$1="1.7.
|
|
279
|
-
`+nt):et.stack=nt}catch{}}throw et}}_request(j,_e){typeof j=="string"?(_e=_e||{},_e.url=j):_e=j||{},_e=mergeConfig$1(this.defaults,_e);const{transitional:et,paramsSerializer:tt,headers:nt}=_e;et!==void 0&&validator.assertOptions(et,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),tt!=null&&(utils$1.isFunction(tt)?_e.paramsSerializer={serialize:tt}:validator.assertOptions(tt,{encode:validators.function,serialize:validators.function},!0)),_e.method=(_e.method||this.defaults.method||"get").toLowerCase();let rt=nt&&utils$1.merge(nt.common,nt[_e.method]);nt&&utils$1.forEach(["delete","get","head","post","put","patch","common"],mt=>{delete nt[mt]}),_e.headers=AxiosHeaders$1.concat(rt,nt);const it=[];let ot=!0;this.interceptors.request.forEach(function(bt){typeof bt.runWhen=="function"&&bt.runWhen(_e)===!1||(ot=ot&&bt.synchronous,it.unshift(bt.fulfilled,bt.rejected))});const ut=[];this.interceptors.response.forEach(function(bt){ut.push(bt.fulfilled,bt.rejected)});let st,ft=0,dt;if(!ot){const mt=[dispatchRequest.bind(this),void 0];for(mt.unshift.apply(mt,it),mt.push.apply(mt,ut),dt=mt.length,st=Promise.resolve(_e);ft<dt;)st=st.then(mt[ft++],mt[ft++]);return st}dt=it.length;let ht=_e;for(ft=0;ft<dt;){const mt=it[ft++],bt=it[ft++];try{ht=mt(ht)}catch(Rt){bt.call(this,Rt);break}}try{st=dispatchRequest.call(this,ht)}catch(mt){return Promise.reject(mt)}for(ft=0,dt=ut.length;ft<dt;)st=st.then(ut[ft++],ut[ft++]);return st}getUri(j){j=mergeConfig$1(this.defaults,j);const _e=buildFullPath(j.baseURL,j.url);return buildURL(_e,j.params,j.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function a(j){Axios$1.prototype[j]=function(_e,et){return this.request(mergeConfig$1(et||{},{method:j,url:_e,data:(et||{}).data}))}});utils$1.forEach(["post","put","patch"],function a(j){function _e(et){return function(nt,rt,it){return this.request(mergeConfig$1(it||{},{method:j,headers:et?{"Content-Type":"multipart/form-data"}:{},url:nt,data:rt}))}}Axios$1.prototype[j]=_e(),Axios$1.prototype[j+"Form"]=_e(!0)});let CancelToken$1=class Xm{constructor(j){if(typeof j!="function")throw new TypeError("executor must be a function.");let _e;this.promise=new Promise(function(nt){_e=nt});const et=this;this.promise.then(tt=>{if(!et._listeners)return;let nt=et._listeners.length;for(;nt-- >0;)et._listeners[nt](tt);et._listeners=null}),this.promise.then=tt=>{let nt;const rt=new Promise(it=>{et.subscribe(it),nt=it}).then(tt);return rt.cancel=function(){et.unsubscribe(nt)},rt},j(function(nt,rt,it){et.reason||(et.reason=new CanceledError$1(nt,rt,it),_e(et.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(j){if(this.reason){j(this.reason);return}this._listeners?this._listeners.push(j):this._listeners=[j]}unsubscribe(j){if(!this._listeners)return;const _e=this._listeners.indexOf(j);_e!==-1&&this._listeners.splice(_e,1)}static source(){let j;return{token:new Xm(function(tt){j=tt}),cancel:j}}};function spread$1(a){return function(_e){return a.apply(null,_e)}}function isAxiosError$1(a){return utils$1.isObject(a)&&a.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([a,j])=>{HttpStatusCode$1[j]=a});function createInstance(a){const j=new Axios$1(a),_e=bind(Axios$1.prototype.request,j);return utils$1.extend(_e,Axios$1.prototype,j,{allOwnKeys:!0}),utils$1.extend(_e,j,null,{allOwnKeys:!0}),_e.create=function(tt){return createInstance(mergeConfig$1(a,tt))},_e}const axios$4=createInstance(defaults$1);axios$4.Axios=Axios$1;axios$4.CanceledError=CanceledError$1;axios$4.CancelToken=CancelToken$1;axios$4.isCancel=isCancel$1;axios$4.VERSION=VERSION$1;axios$4.toFormData=toFormData$1;axios$4.AxiosError=AxiosError$1;axios$4.Cancel=axios$4.CanceledError;axios$4.all=function a(j){return Promise.all(j)};axios$4.spread=spread$1;axios$4.isAxiosError=isAxiosError$1;axios$4.mergeConfig=mergeConfig$1;axios$4.AxiosHeaders=AxiosHeaders$1;axios$4.formToJSON=a=>formDataToJSON(utils$1.isHTMLForm(a)?new FormData(a):a);axios$4.getAdapter=adapters.getAdapter;axios$4.HttpStatusCode=HttpStatusCode$1;axios$4.default=axios$4;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$4,axios$3=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios$4,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));var __defProp$2$1=Object.defineProperty,__defNormalProp$2=(a,j,_e)=>j in a?__defProp$2$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$2=(a,j,_e)=>(__defNormalProp$2(a,j+"",_e),_e);class AuthService{constructor({api:j}){__publicField$2(this,"api"),this.api=j}async getUserPublicInfo({did:j}){const{data:_e}=await this.api.get("/api/user",{params:{did:j}});return _e}async getUserPrivacyConfig({did:j}){const{data:_e}=await this.api.get("/api/user/privacy/config",{params:{did:j}});return _e}async saveUserPrivacyConfig(j){const{data:_e}=await this.api.post("/api/user/privacy/config",j);return _e}async getUserNotificationConfig(){const{data:j}=await this.api.get("/api/user/notification/config");return j}async saveUserNotificationConfig(j){const{data:_e}=await this.api.post("/api/user/notification/config",j);return _e}async testNotificationWebhook(j){const{data:_e}=await this.api.put("/api/user/notification/webhook",j);return _e}async getProfileUrl({did:j,locale:_e}){const et=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(et,{did:j,locale:_e})}async getProfile(){const{data:j}=await this.api.get("/api/user/profile");return j}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:j}){const{data:_e}=await this.api.put("/api/user/profile",{locale:j});return _e}async logout({visitorId:j}){const{data:_e}=await this.api.post("/api/user/logout",{visitorId:j});return _e}}class TokenService{getSessionToken(){return api$3.get(constant$3.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(j){api$3.set(constant$3.SESSION_TOKEN_STORAGE_KEY,j)}removeSessionToken(){api$3.remove(constant$3.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(j){localStorage.setItem(constant$3.REFRESH_TOKEN_STORAGE_KEY,j)}removeRefreshToken(){localStorage.removeItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}}var __defProp$1$1=Object.defineProperty,__defNormalProp$1=(a,j,_e)=>j in a?__defProp$1$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$1=(a,j,_e)=>(__defNormalProp$1(a,j+"",_e),_e);class UserSessionService{constructor({api:j}){__publicField$1(this,"api"),this.api=j}async getUserSessions({did:j}){const{data:_e}=await this.api.get("/api/user-session",{params:{userDid:j}});return _e}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{async getBlocklet(j,_e=!1){if(!_e&&blockletCache.has(j))return blockletCache.get(j);const et=withQuery(joinURL(j,"__blocklet__.js"),{type:"json",t:Date.now()}),nt=await(await fetch(et)).json();return blockletCache.set(j,nt),nt}async loadBlocklet(){return new Promise((j,_e)=>{if(typeof window>"u"||typeof document>"u"){_e();return}const et=document.createElement("script");let tt="/";window.blocklet&&window.blocklet.prefix&&(tt=window.blocklet.prefix),et.src=withQuery(joinURL(tt,"__blocklet__.js"),{t:Date.now()}),et.onload=()=>{j()},et.onerror=()=>{_e()},document.head.append(et)})}getPrefix(j){var _e;return j?(j==null?void 0:j.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((_e=window.blocklet)==null?void 0:_e.prefix)||"/"}}const version$3="1.16.29",sleep$2=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)}),getBearerToken=a=>`Bearer ${encodeURIComponent(a)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey);async function sleepForLoading(a,j=300){a.metaData.endTime=+new Date;const{startTime:_e,endTime:et}=a.metaData,tt=et-_e;tt<j&&await sleep$2(j-tt),delete a.metaData}const createAxios$1=(a,j)=>{const _e={...a==null?void 0:a.headers,"x-blocklet-js-sdk-version":version$3},et=getVisitorId$1();[void 0,null].includes(et)||(_e["x-blocklet-visitor-id"]=et);const tt=axios$4.create({...a,headers:_e});return j!=null&&j.lazy&&(tt.interceptors.request.use(nt=>(nt.metaData={startTime:+new Date},nt),nt=>Promise.reject(nt)),tt.interceptors.response.use(async nt=>(await sleepForLoading(nt.config,j==null?void 0:j.lazyTime),nt),async nt=>(await sleepForLoading(nt.response.config,j==null?void 0:j.lazyTime),Promise.reject(nt)))),tt};async function renewRefreshToken$1(a){if(!a)throw new Error("Refresh token not found");const j=createAxios$1({baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:getBearerToken(a)}}),{data:_e}=await j.post("/api/did/refreshSession");return _e}function createRequest$1({getSessionToken:a,setSessionToken:j,removeSessionToken:_e,getRefreshToken:et,setRefreshToken:tt,removeRefreshToken:nt,onRefreshTokenError:rt,onRefreshTokenSuccess:it},ot,ut){let st=null;const ft=createAxios$1({timeout:30*1e3,...ot},ut);return ft.interceptors.request.use(async dt=>{if(!api$3.get(constant$3.SESSION_TOKEN_STORAGE_KEY)){const ht=a();ht&&(dt.headers.authorization=getBearerToken(ht))}return st&&await st,dt},dt=>Promise.reject(dt)),ft.interceptors.response.use(dt=>dt,async dt=>{var mt;const ht=dt.config;if(ht.headers={...ht==null?void 0:ht.headers},((mt=dt==null?void 0:dt.response)==null?void 0:mt.status)===401&&!ht._retry){ht._retry=!0;try{st||(st=renewRefreshToken$1(et()));const bt=await st;return j(bt.nextToken),tt(bt.nextRefreshToken),typeof it=="function"&&it(bt),ft(ht)}catch(bt){return _e(),nt(),typeof rt=="function"&&rt(bt),Promise.reject(dt)}finally{st=null}}return Promise.reject(dt)}),ft}var __defProp$3=Object.defineProperty,__defNormalProp$3=(a,j,_e)=>j in a?__defProp$3(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField=(a,j,_e)=>(__defNormalProp$3(a,typeof j!="symbol"?j+"":j,_e),_e);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet");const j=new TokenService,_e=createRequest$1({getSessionToken:j.getSessionToken,setSessionToken:j.setSessionToken,removeSessionToken:j.removeSessionToken,getRefreshToken:j.getRefreshToken,setRefreshToken:j.setRefreshToken,removeRefreshToken:j.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new AuthService({api:_e}),this.userSession=new UserSessionService({api:_e}),this.token=j,this.api=_e,this.blocklet=new BlockletService}}function createAxios$2(a={},j={}){const _e=new TokenService,et=new BlockletService;return a.baseURL===void 0&&(a.baseURL=et.getPrefix()),createRequest$1({getSessionToken:_e.getSessionToken,setSessionToken:_e.setSessionToken,removeSessionToken:_e.removeSessionToken,getRefreshToken:_e.getRefreshToken,setRefreshToken:_e.setRefreshToken,removeRefreshToken:_e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},a,j)}const name="@arcblock/did-connect",version$2="2.10.22",description="Client side library to work with DID Connect by ArcBlock.",keywords=["react","arcblock","component"],author="wangshijun<wangshijun2010@gmail.com>",homepage="https://github.com/ArcBlock/ux#readme",license="Apache-2.0",main="lib/index.js",module$1="lib/index.js",repository={type:"git",url:"git+https://github.com/ArcBlock/ux.git"},scripts={lint:"eslint src tests --ext js --ext jsx","lint:fix":"npm run lint -- --fix",build:"babel --config-file ./babel.config.es.js src --out-dir lib --copy-files --no-copy-ignored",autoexports:"node tools/auto-exports.js",watch:"babel --config-file ./babel.config.es.js src --out-dir lib -w --copy-files --no-copy-ignored",precommit:"CI=1 npm run lint",prepush:"CI=1 npm run lint",prepublish:"npm run build",test:"node tools/jest.js",coverage:"npm run test -- --coverage"},bugs={url:"https://github.com/ArcBlock/ux/issues"},dependencies={"@arcblock/bridge":"^2.10.22","@arcblock/icons":"^2.10.22","@arcblock/react-hooks":"^2.10.22","@arcblock/ws":"^1.18.130","@fontsource/inter":"^5.0.16","@iconify-icons/logos":"^1.2.36","@iconify-icons/material-symbols":"^1.2.58","@iconify/react":"^4.1.1",ahooks:"^3.7.10",axios:"^1.7.2",buffer:"^6.0.3","core-js":"^3.25.5",eventemitter3:"^5.0.1","js-cookie":"^2.2.1","jwt-decode":"^3.1.2",lodash:"^4.17.21","mdi-material-ui":"^7.5.0","p-queue":"^6.6.2","p-wait-for":"^5.0.2","path-to-regexp":"^1.8.0",semver:"^7.5.4",tweetnacl:"^1.0.3","tweetnacl-sealedbox-js":"^1.2.0",ufo:"^1.5.3"},peerDependencies={"@arcblock/ux":"^2.9.79","@blocklet/js-sdk":"^1.16.28-beta-641c9f13","@emotion/react":"^11.10.4","@emotion/styled":"^11.10.4","@mui/material":"^5.15.0",react:"^18.2.0","react-dom":"^18.2.0"},publishConfig={access:"public"},devDependencies={"@babel/cli":"^7.19.3","@babel/core":"^7.19.3","@babel/preset-env":"^7.19.3","@babel/preset-react":"^7.18.6","eslint-plugin-react-hooks":"^4.6.0",glob:"^10.3.3",jest:"^28.1.3"},gitHead="9fff4ecb5be75faeb708d0de193144e199fea46d",pkg={name,version:version$2,description,keywords,author,homepage,license,main,module:module$1,repository,scripts,bugs,dependencies,peerDependencies,publishConfig,devDependencies,gitHead},DEFAULT_TIMEOUT$1=5*60,DEFAULT_WINDOW_TIMEOUT=30*60,AUTH_SERVICE_PREFIX="/.well-known/service",SESSION_TOKEN_STORAGE_KEY="login_token",REFRESH_TOKEN_STORAGE_KEY="refresh_token",RELAY_SOCKET_PREFIX="/.well-known/service",API_DID_PREFIX="/api/did",DEFAULT_NAME="DID Connect",DID_CONNECT_URL_PARAMS_NAME="__did-connect__";class NotOpenError extends Error{constructor(){super("Failed to open popup")}}const{version:version$1}=pkg;function unescape$2(a){return(a+"===".slice((a.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$3(a){return a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const decodeConnectUrl=a=>window.atob(unescape$2(a)),parseTokenFromConnectUrl=a=>{const j=new URL(a),_e=decodeURIComponent(j.searchParams.get("url"));return new URL(_e).searchParams.get("_t_")},getAppId$1=(a,j)=>{var et,tt,nt;let _e=j==null?void 0:j.publisher;if(!_e){if(a!=null&&a.agentDid)return a.agentDid;_e=a==null?void 0:a.publisher}return _e?_e.replace("did:abt:",""):((et=globalThis.blocklet)==null?void 0:et.appPid)||((tt=globalThis.blocklet)==null?void 0:tt.appId)||((nt=globalThis.env)==null?void 0:nt.appId)||""},getConnectedInfo=a=>{var _e;const j={connected_did:a.did||"",connected_pk:a.pk||"",connected_app:getAppId$1(a.appInfo,a.memberAppInfo)};return(_e=a==null?void 0:a.connectedWallet)!=null&&_e.os&&(j.connected_wallet_os=a.connectedWallet.os),j},updateConnectedInfo=(a,j=!1)=>{if(!a)return;j||(a=getConnectedInfo(a));const _e=getCookieOptions({expireInDays:7,returnDomain:!1});isNil$1(a.connected_did)||Cookies.set("connected_did",a.connected_did,_e),isNil$1(a.connected_pk)||Cookies.set("connected_pk",a.connected_pk,_e),isNil$1(a.connected_app)||Cookies.set("connected_app",a.connected_app,_e),a.connected_wallet_os&&Cookies.set("connected_wallet_os",a.connected_wallet_os,_e)},encodeKey=a=>escape$3(Buffer$1$1.from(a).toString("base64")),decodeKey=a=>Uint8Array.from(Buffer$1$1.from(unescape$2(a),"base64")),decrypt$1=(a,j,_e)=>{const et=SealedBox.open(Uint8Array.from(Buffer$1$1.from(a,"base64")),decodeKey(j),decodeKey(_e));return JSON.parse(Buffer$1$1.from(et).toString("utf8"))},parseNextWorkflow=(a,j="_t_")=>{const _e=new URL(a),et={baseUrl:_e.origin,prefix:_e.pathname.replace(/\/auth$/,""),token:_e.searchParams.get(j)||""};if(!et.baseUrl)throw new Error("Invalid next workflow: origin empty");if(!et.token)throw new Error("Invalid next workflow: token not found");return et},getApiErrorMessage=(a,j)=>{var et;let _e=a.message;return a.response&&(_e=((et=a.response)==null?void 0:et.data)||j),_e},createAxios=(a={},{lazy:j=!1,lazyTime:_e=300}={})=>createAxios$2({...a,headers:{...a.headers,"x-did-connect-version":version$1}},{lazy:j,lazyTime:_e}),sleep$1=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)});function getBrowserLang(){if(typeof window>"u")return null;const a=window.navigator.languages&&window.navigator.languages[0]||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||window.navigator.systemLanguage||null;return{"zh-CN":"zh","zh-TW":"zh",zh:"zh",en:"en"}[a]||"en"}async function decodeUrlParams(){const a=window.location.href;try{const j=new URL(a),_e=j.searchParams.get(DID_CONNECT_URL_PARAMS_NAME);if(_e){j.searchParams.delete(DID_CONNECT_URL_PARAMS_NAME);const et=JSON.parse(Buffer$1$1.from(_e,"base64").toString("utf-8"));if(isString$2(et.forceConnected)&&isUndefined$2(et.sourceAppPid)){const nt=await new BlockletSDK().user.getUserPublicInfo({did:et.forceConnected});isUndefined$2(nt==null?void 0:nt.sourceAppPid)||(et.sourceAppPid=nt.sourceAppPid)}return{params:et,url:j.href}}}catch{console.warn("Failed to decode did-connect url params")}return{params:null,url:a}}const openPopup=(a,{width:j=600,height:_e=700,name:et="did-connect:popup"}={})=>{const tt=window.screenX+(window.innerWidth-j)/2,nt=window.screenY+(window.innerHeight-_e)/2,rt=[`left=${tt}`,`top=${nt}`,`width=${j}`,`height=${_e}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],it=window.open("",et,rt.join(","));if(it===null)throw new NotOpenError;return it.location.href=a,it},runPopup=a=>new Promise((j,_e)=>{let et,tt;const nt=({data:rt})=>{if(rt&&rt.type==="authorization_response"){if(rt!=null&&rt.error){console.error(rt.error);return}setTimeout(()=>{var it;(it=a.popup)==null||it.close(),clearTimeout(tt),clearInterval(et),window.removeEventListener("message",nt,!1),j(rt)},a.closeTimeout||0)}};tt=setTimeout(()=>{clearInterval(et),_e(new Error("Timeout")),window.removeEventListener("message",nt,!1)},(a.timeoutInSeconds||DEFAULT_WINDOW_TIMEOUT)*1e3),et=setInterval(()=>{var rt;(rt=a.popup)!=null&&rt.closed&&(clearInterval(et),clearTimeout(tt),window.removeEventListener("message",nt,!1),_e(new Error("Popup closed")))},1e3),window.addEventListener("message",nt)}),keyPair=tweetnacl.box.keyPair();function useSecurity(){const[a,j]=useLocalStorageState("__encKey",{defaultValue:encodeKey(keyPair.publicKey),deserializer:nt=>nt,serializer:nt=>nt}),[_e,et]=useLocalStorageState("__decKey",{defaultValue:encodeKey(keyPair.secretKey),deserializer:nt=>nt,serializer:nt=>nt});return reactExports.useEffect(()=>{localStorage.getItem("__encKey")||j(encodeKey(keyPair.publicKey)),localStorage.getItem("__decKey")||et(encodeKey(keyPair.secretKey))},[]),{encryptKey:a,decryptKey:_e,decrypt:nt=>decrypt$1(nt,a,_e)}}var lodash={exports:{}};/**
|
|
278
|
+
`):" "+renderReason(nt[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+rt,"ERR_NOT_SUPPORT")}return et},adapters:knownAdapters};function throwIfCancellationRequested(a){if(a.cancelToken&&a.cancelToken.throwIfRequested(),a.signal&&a.signal.aborted)throw new CanceledError$1(null,a)}function dispatchRequest(a){return throwIfCancellationRequested(a),a.headers=AxiosHeaders$1.from(a.headers),a.data=transformData.call(a,a.transformRequest),["post","put","patch"].indexOf(a.method)!==-1&&a.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(a.adapter||defaults$1.adapter)(a).then(function(et){return throwIfCancellationRequested(a),et.data=transformData.call(a,a.transformResponse,et),et.headers=AxiosHeaders$1.from(et.headers),et},function(et){return isCancel$1(et)||(throwIfCancellationRequested(a),et&&et.response&&(et.response.data=transformData.call(a,a.transformResponse,et.response),et.response.headers=AxiosHeaders$1.from(et.response.headers))),Promise.reject(et)})}const VERSION$1="1.7.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach((a,j)=>{validators$1[a]=function(et){return typeof et===a||"a"+(j<1?"n ":" ")+a}});const deprecatedWarnings={};validators$1.transitional=function a(j,_e,et){function tt(nt,rt){return"[Axios v"+VERSION$1+"] Transitional option '"+nt+"'"+rt+(et?". "+et:"")}return(nt,rt,it)=>{if(j===!1)throw new AxiosError$1(tt(rt," has been removed"+(_e?" in "+_e:"")),AxiosError$1.ERR_DEPRECATED);return _e&&!deprecatedWarnings[rt]&&(deprecatedWarnings[rt]=!0,console.warn(tt(rt," has been deprecated since v"+_e+" and will be removed in the near future"))),j?j(nt,rt,it):!0}};function assertOptions(a,j,_e){if(typeof a!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const et=Object.keys(a);let tt=et.length;for(;tt-- >0;){const nt=et[tt],rt=j[nt];if(rt){const it=a[nt],ot=it===void 0||rt(it,nt,a);if(ot!==!0)throw new AxiosError$1("option "+nt+" must be "+ot,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(_e!==!0)throw new AxiosError$1("Unknown option "+nt,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(j){this.defaults=j,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(j,_e){try{return await this._request(j,_e)}catch(et){if(et instanceof Error){let tt;Error.captureStackTrace?Error.captureStackTrace(tt={}):tt=new Error;const nt=tt.stack?tt.stack.replace(/^.+\n/,""):"";try{et.stack?nt&&!String(et.stack).endsWith(nt.replace(/^.+\n.+\n/,""))&&(et.stack+=`
|
|
279
|
+
`+nt):et.stack=nt}catch{}}throw et}}_request(j,_e){typeof j=="string"?(_e=_e||{},_e.url=j):_e=j||{},_e=mergeConfig$1(this.defaults,_e);const{transitional:et,paramsSerializer:tt,headers:nt}=_e;et!==void 0&&validator.assertOptions(et,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),tt!=null&&(utils$1.isFunction(tt)?_e.paramsSerializer={serialize:tt}:validator.assertOptions(tt,{encode:validators.function,serialize:validators.function},!0)),_e.method=(_e.method||this.defaults.method||"get").toLowerCase();let rt=nt&&utils$1.merge(nt.common,nt[_e.method]);nt&&utils$1.forEach(["delete","get","head","post","put","patch","common"],mt=>{delete nt[mt]}),_e.headers=AxiosHeaders$1.concat(rt,nt);const it=[];let ot=!0;this.interceptors.request.forEach(function(bt){typeof bt.runWhen=="function"&&bt.runWhen(_e)===!1||(ot=ot&&bt.synchronous,it.unshift(bt.fulfilled,bt.rejected))});const ut=[];this.interceptors.response.forEach(function(bt){ut.push(bt.fulfilled,bt.rejected)});let st,ft=0,dt;if(!ot){const mt=[dispatchRequest.bind(this),void 0];for(mt.unshift.apply(mt,it),mt.push.apply(mt,ut),dt=mt.length,st=Promise.resolve(_e);ft<dt;)st=st.then(mt[ft++],mt[ft++]);return st}dt=it.length;let ht=_e;for(ft=0;ft<dt;){const mt=it[ft++],bt=it[ft++];try{ht=mt(ht)}catch(Rt){bt.call(this,Rt);break}}try{st=dispatchRequest.call(this,ht)}catch(mt){return Promise.reject(mt)}for(ft=0,dt=ut.length;ft<dt;)st=st.then(ut[ft++],ut[ft++]);return st}getUri(j){j=mergeConfig$1(this.defaults,j);const _e=buildFullPath(j.baseURL,j.url);return buildURL(_e,j.params,j.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function a(j){Axios$1.prototype[j]=function(_e,et){return this.request(mergeConfig$1(et||{},{method:j,url:_e,data:(et||{}).data}))}});utils$1.forEach(["post","put","patch"],function a(j){function _e(et){return function(nt,rt,it){return this.request(mergeConfig$1(it||{},{method:j,headers:et?{"Content-Type":"multipart/form-data"}:{},url:nt,data:rt}))}}Axios$1.prototype[j]=_e(),Axios$1.prototype[j+"Form"]=_e(!0)});let CancelToken$1=class Xm{constructor(j){if(typeof j!="function")throw new TypeError("executor must be a function.");let _e;this.promise=new Promise(function(nt){_e=nt});const et=this;this.promise.then(tt=>{if(!et._listeners)return;let nt=et._listeners.length;for(;nt-- >0;)et._listeners[nt](tt);et._listeners=null}),this.promise.then=tt=>{let nt;const rt=new Promise(it=>{et.subscribe(it),nt=it}).then(tt);return rt.cancel=function(){et.unsubscribe(nt)},rt},j(function(nt,rt,it){et.reason||(et.reason=new CanceledError$1(nt,rt,it),_e(et.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(j){if(this.reason){j(this.reason);return}this._listeners?this._listeners.push(j):this._listeners=[j]}unsubscribe(j){if(!this._listeners)return;const _e=this._listeners.indexOf(j);_e!==-1&&this._listeners.splice(_e,1)}static source(){let j;return{token:new Xm(function(tt){j=tt}),cancel:j}}};function spread$1(a){return function(_e){return a.apply(null,_e)}}function isAxiosError$1(a){return utils$1.isObject(a)&&a.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([a,j])=>{HttpStatusCode$1[j]=a});function createInstance(a){const j=new Axios$1(a),_e=bind(Axios$1.prototype.request,j);return utils$1.extend(_e,Axios$1.prototype,j,{allOwnKeys:!0}),utils$1.extend(_e,j,null,{allOwnKeys:!0}),_e.create=function(tt){return createInstance(mergeConfig$1(a,tt))},_e}const axios$4=createInstance(defaults$1);axios$4.Axios=Axios$1;axios$4.CanceledError=CanceledError$1;axios$4.CancelToken=CancelToken$1;axios$4.isCancel=isCancel$1;axios$4.VERSION=VERSION$1;axios$4.toFormData=toFormData$1;axios$4.AxiosError=AxiosError$1;axios$4.Cancel=axios$4.CanceledError;axios$4.all=function a(j){return Promise.all(j)};axios$4.spread=spread$1;axios$4.isAxiosError=isAxiosError$1;axios$4.mergeConfig=mergeConfig$1;axios$4.AxiosHeaders=AxiosHeaders$1;axios$4.formToJSON=a=>formDataToJSON(utils$1.isHTMLForm(a)?new FormData(a):a);axios$4.getAdapter=adapters.getAdapter;axios$4.HttpStatusCode=HttpStatusCode$1;axios$4.default=axios$4;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios$4,axios$3=Object.freeze(Object.defineProperty({__proto__:null,Axios,AxiosError,AxiosHeaders,Cancel,CancelToken,CanceledError,HttpStatusCode,VERSION,all,default:axios$4,formToJSON,getAdapter,isAxiosError,isCancel,mergeConfig,spread,toFormData},Symbol.toStringTag,{value:"Module"}));var __defProp$2$1=Object.defineProperty,__defNormalProp$2=(a,j,_e)=>j in a?__defProp$2$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$2=(a,j,_e)=>(__defNormalProp$2(a,j+"",_e),_e);class AuthService{constructor({api:j}){__publicField$2(this,"api"),this.api=j}async getUserPublicInfo({did:j}){const{data:_e}=await this.api.get("/api/user",{params:{did:j}});return _e}async getUserPrivacyConfig({did:j}){const{data:_e}=await this.api.get("/api/user/privacy/config",{params:{did:j}});return _e}async saveUserPrivacyConfig(j){const{data:_e}=await this.api.post("/api/user/privacy/config",j);return _e}async getUserNotificationConfig(){const{data:j}=await this.api.get("/api/user/notification/config");return j}async saveUserNotificationConfig(j){const{data:_e}=await this.api.post("/api/user/notification/config",j);return _e}async testNotificationWebhook(j){const{data:_e}=await this.api.put("/api/user/notification/webhook",j);return _e}async getProfileUrl({did:j,locale:_e}){const et=`${constant$3.WELLKNOWN_SERVICE_PATH_PREFIX}/user`;return withQuery(et,{did:j,locale:_e})}async getProfile(){const{data:j}=await this.api.get("/api/user/profile");return j}async refreshProfile(){await this.api.put("/api/user/refreshProfile")}async saveProfile({locale:j}){const{data:_e}=await this.api.put("/api/user/profile",{locale:j});return _e}async logout({visitorId:j}){const{data:_e}=await this.api.post("/api/user/logout",{visitorId:j});return _e}}class TokenService{getSessionToken(){return api$3.get(constant$3.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(j){api$3.set(constant$3.SESSION_TOKEN_STORAGE_KEY,j)}removeSessionToken(){api$3.remove(constant$3.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(j){localStorage.setItem(constant$3.REFRESH_TOKEN_STORAGE_KEY,j)}removeRefreshToken(){localStorage.removeItem(constant$3.REFRESH_TOKEN_STORAGE_KEY)}}var __defProp$1$1=Object.defineProperty,__defNormalProp$1=(a,j,_e)=>j in a?__defProp$1$1(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField$1=(a,j,_e)=>(__defNormalProp$1(a,j+"",_e),_e);class UserSessionService{constructor({api:j}){__publicField$1(this,"api"),this.api=j}async getUserSessions({did:j}){const{data:_e}=await this.api.get("/api/user-session",{params:{userDid:j}});return _e}}const blockletCache=new QuickLRU({maxSize:30,maxAge:60*1e3});class BlockletService{async getBlocklet(j,_e=!1){if(!j){if(typeof window>"u"||typeof document>"u")throw new Error("Cannot get blocklet in server side without baseUrl");return window.blocklet}if(!_e&&blockletCache.has(j))return blockletCache.get(j);const et=withQuery(joinURL(j,"__blocklet__.js"),{type:"json",t:Date.now()}),nt=await(await fetch(et)).json();return blockletCache.set(j,nt),nt}async loadBlocklet(){return new Promise((j,_e)=>{if(typeof window>"u"||typeof document>"u"){_e();return}const et=document.createElement("script");let tt="/";window.blocklet&&window.blocklet.prefix&&(tt=window.blocklet.prefix),et.src=withQuery(joinURL(tt,"__blocklet__.js"),{t:Date.now()}),et.onload=()=>{j()},et.onerror=()=>{_e()},document.head.append(et)})}getPrefix(j){var _e;return j?(j==null?void 0:j.prefix)||"/":typeof window>"u"||typeof document>"u"?null:((_e=window.blocklet)==null?void 0:_e.prefix)||"/"}}const version$3="1.16.29",sleep$2=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)}),getBearerToken=a=>`Bearer ${encodeURIComponent(a)}`,visitorIdKey="__visitor_id",getVisitorId$1=()=>localStorage.getItem(visitorIdKey);async function sleepForLoading(a,j=300){a.metaData.endTime=+new Date;const{startTime:_e,endTime:et}=a.metaData,tt=et-_e;tt<j&&await sleep$2(j-tt),delete a.metaData}const createAxios$1=(a,j)=>{const _e={...a==null?void 0:a.headers,"x-blocklet-js-sdk-version":version$3},et=getVisitorId$1();[void 0,null].includes(et)||(_e["x-blocklet-visitor-id"]=et);const tt=axios$4.create({...a,headers:_e});return j!=null&&j.lazy&&(tt.interceptors.request.use(nt=>(nt.metaData={startTime:+new Date},nt),nt=>Promise.reject(nt)),tt.interceptors.response.use(async nt=>(await sleepForLoading(nt.config,j==null?void 0:j.lazyTime),nt),async nt=>(await sleepForLoading(nt.response.config,j==null?void 0:j.lazyTime),Promise.reject(nt)))),tt};async function renewRefreshToken$1(a){if(!a)throw new Error("Refresh token not found");const j=createAxios$1({baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:10*1e3,headers:{authorization:getBearerToken(a)}}),{data:_e}=await j.post("/api/did/refreshSession");return _e}function createRequest$1({getSessionToken:a,setSessionToken:j,removeSessionToken:_e,getRefreshToken:et,setRefreshToken:tt,removeRefreshToken:nt,onRefreshTokenError:rt,onRefreshTokenSuccess:it},ot,ut){let st=null;const ft=createAxios$1({timeout:30*1e3,...ot},ut);return ft.interceptors.request.use(async dt=>{if(!api$3.get(constant$3.SESSION_TOKEN_STORAGE_KEY)){const ht=a();ht&&(dt.headers.authorization=getBearerToken(ht))}return st&&await st,dt},dt=>Promise.reject(dt)),ft.interceptors.response.use(dt=>dt,async dt=>{var mt;const ht=dt.config;if(ht.headers={...ht==null?void 0:ht.headers},((mt=dt==null?void 0:dt.response)==null?void 0:mt.status)===401&&!ht._retry){ht._retry=!0;try{st||(st=renewRefreshToken$1(et()));const bt=await st;return j(bt.nextToken),tt(bt.nextRefreshToken),typeof it=="function"&&it(bt),ft(ht)}catch(bt){return _e(),nt(),typeof rt=="function"&&rt(bt),Promise.reject(dt)}finally{st=null}}return Promise.reject(dt)}),ft}var __defProp$3=Object.defineProperty,__defNormalProp$3=(a,j,_e)=>j in a?__defProp$3(a,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):a[j]=_e,__publicField=(a,j,_e)=>(__defNormalProp$3(a,typeof j!="symbol"?j+"":j,_e),_e);class BlockletSDK{constructor(){__publicField(this,"api"),__publicField(this,"user"),__publicField(this,"userSession"),__publicField(this,"token"),__publicField(this,"blocklet");const j=new TokenService,_e=createRequest$1({getSessionToken:j.getSessionToken,setSessionToken:j.setSessionToken,removeSessionToken:j.removeSessionToken,getRefreshToken:j.getRefreshToken,setRefreshToken:j.setRefreshToken,removeRefreshToken:j.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:constant$3.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new AuthService({api:_e}),this.userSession=new UserSessionService({api:_e}),this.token=j,this.api=_e,this.blocklet=new BlockletService}}function createAxios$2(a={},j={}){const _e=new TokenService,et=new BlockletService;return a.baseURL===void 0&&(a.baseURL=et.getPrefix()),createRequest$1({getSessionToken:_e.getSessionToken,setSessionToken:_e.setSessionToken,removeSessionToken:_e.removeSessionToken,getRefreshToken:_e.getRefreshToken,setRefreshToken:_e.setRefreshToken,removeRefreshToken:_e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},a,j)}const name="@arcblock/did-connect",version$2="2.10.22",description="Client side library to work with DID Connect by ArcBlock.",keywords=["react","arcblock","component"],author="wangshijun<wangshijun2010@gmail.com>",homepage="https://github.com/ArcBlock/ux#readme",license="Apache-2.0",main="lib/index.js",module$1="lib/index.js",repository={type:"git",url:"git+https://github.com/ArcBlock/ux.git"},scripts={lint:"eslint src tests --ext js --ext jsx","lint:fix":"npm run lint -- --fix",build:"babel --config-file ./babel.config.es.js src --out-dir lib --copy-files --no-copy-ignored",autoexports:"node tools/auto-exports.js",watch:"babel --config-file ./babel.config.es.js src --out-dir lib -w --copy-files --no-copy-ignored",precommit:"CI=1 npm run lint",prepush:"CI=1 npm run lint",prepublish:"npm run build",test:"node tools/jest.js",coverage:"npm run test -- --coverage"},bugs={url:"https://github.com/ArcBlock/ux/issues"},dependencies={"@arcblock/bridge":"^2.10.22","@arcblock/icons":"^2.10.22","@arcblock/react-hooks":"^2.10.22","@arcblock/ws":"^1.18.130","@fontsource/inter":"^5.0.16","@iconify-icons/logos":"^1.2.36","@iconify-icons/material-symbols":"^1.2.58","@iconify/react":"^4.1.1",ahooks:"^3.7.10",axios:"^1.7.2",buffer:"^6.0.3","core-js":"^3.25.5",eventemitter3:"^5.0.1","js-cookie":"^2.2.1","jwt-decode":"^3.1.2",lodash:"^4.17.21","mdi-material-ui":"^7.5.0","p-queue":"^6.6.2","p-wait-for":"^5.0.2","path-to-regexp":"^1.8.0",semver:"^7.5.4",tweetnacl:"^1.0.3","tweetnacl-sealedbox-js":"^1.2.0",ufo:"^1.5.3"},peerDependencies={"@arcblock/ux":"^2.9.79","@blocklet/js-sdk":"^1.16.28-beta-641c9f13","@emotion/react":"^11.10.4","@emotion/styled":"^11.10.4","@mui/material":"^5.15.0",react:"^18.2.0","react-dom":"^18.2.0"},publishConfig={access:"public"},devDependencies={"@babel/cli":"^7.19.3","@babel/core":"^7.19.3","@babel/preset-env":"^7.19.3","@babel/preset-react":"^7.18.6","eslint-plugin-react-hooks":"^4.6.0",glob:"^10.3.3",jest:"^28.1.3"},gitHead="9fff4ecb5be75faeb708d0de193144e199fea46d",pkg={name,version:version$2,description,keywords,author,homepage,license,main,module:module$1,repository,scripts,bugs,dependencies,peerDependencies,publishConfig,devDependencies,gitHead},DEFAULT_TIMEOUT$1=5*60,DEFAULT_WINDOW_TIMEOUT=30*60,AUTH_SERVICE_PREFIX="/.well-known/service",SESSION_TOKEN_STORAGE_KEY="login_token",REFRESH_TOKEN_STORAGE_KEY="refresh_token",RELAY_SOCKET_PREFIX="/.well-known/service",API_DID_PREFIX="/api/did",DEFAULT_NAME="DID Connect",DID_CONNECT_URL_PARAMS_NAME="__did-connect__";class NotOpenError extends Error{constructor(){super("Failed to open popup")}}const{version:version$1}=pkg;function unescape$2(a){return(a+"===".slice((a.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/")}function escape$3(a){return a.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const decodeConnectUrl=a=>window.atob(unescape$2(a)),parseTokenFromConnectUrl=a=>{const j=new URL(a),_e=decodeURIComponent(j.searchParams.get("url"));return new URL(_e).searchParams.get("_t_")},getAppId$1=(a,j)=>{var et,tt,nt;let _e=j==null?void 0:j.publisher;if(!_e){if(a!=null&&a.agentDid)return a.agentDid;_e=a==null?void 0:a.publisher}return _e?_e.replace("did:abt:",""):((et=globalThis.blocklet)==null?void 0:et.appPid)||((tt=globalThis.blocklet)==null?void 0:tt.appId)||((nt=globalThis.env)==null?void 0:nt.appId)||""},getConnectedInfo=a=>{var _e;const j={connected_did:a.did||"",connected_pk:a.pk||"",connected_app:getAppId$1(a.appInfo,a.memberAppInfo)};return(_e=a==null?void 0:a.connectedWallet)!=null&&_e.os&&(j.connected_wallet_os=a.connectedWallet.os),j},updateConnectedInfo=(a,j=!1)=>{if(!a)return;j||(a=getConnectedInfo(a));const _e=getCookieOptions({expireInDays:7,returnDomain:!1});isNil$1(a.connected_did)||Cookies.set("connected_did",a.connected_did,_e),isNil$1(a.connected_pk)||Cookies.set("connected_pk",a.connected_pk,_e),isNil$1(a.connected_app)||Cookies.set("connected_app",a.connected_app,_e),a.connected_wallet_os&&Cookies.set("connected_wallet_os",a.connected_wallet_os,_e)},encodeKey=a=>escape$3(Buffer$1$1.from(a).toString("base64")),decodeKey=a=>Uint8Array.from(Buffer$1$1.from(unescape$2(a),"base64")),decrypt$1=(a,j,_e)=>{const et=SealedBox.open(Uint8Array.from(Buffer$1$1.from(a,"base64")),decodeKey(j),decodeKey(_e));return JSON.parse(Buffer$1$1.from(et).toString("utf8"))},parseNextWorkflow=(a,j="_t_")=>{const _e=new URL(a),et={baseUrl:_e.origin,prefix:_e.pathname.replace(/\/auth$/,""),token:_e.searchParams.get(j)||""};if(!et.baseUrl)throw new Error("Invalid next workflow: origin empty");if(!et.token)throw new Error("Invalid next workflow: token not found");return et},getApiErrorMessage=(a,j)=>{var et;let _e=a.message;return a.response&&(_e=((et=a.response)==null?void 0:et.data)||j),_e},createAxios=(a={},{lazy:j=!1,lazyTime:_e=300}={})=>createAxios$2({...a,headers:{...a.headers,"x-did-connect-version":version$1}},{lazy:j,lazyTime:_e}),sleep$1=(a=0)=>new Promise(j=>{setTimeout(()=>{j()},a)});function getBrowserLang(){if(typeof window>"u")return null;const a=window.navigator.languages&&window.navigator.languages[0]||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage||window.navigator.systemLanguage||null;return{"zh-CN":"zh","zh-TW":"zh",zh:"zh",en:"en"}[a]||"en"}async function decodeUrlParams(){const a=window.location.href;try{const j=new URL(a),_e=j.searchParams.get(DID_CONNECT_URL_PARAMS_NAME);if(_e){j.searchParams.delete(DID_CONNECT_URL_PARAMS_NAME);const et=JSON.parse(Buffer$1$1.from(_e,"base64").toString("utf-8"));if(isString$2(et.forceConnected)&&isUndefined$2(et.sourceAppPid)){const nt=await new BlockletSDK().user.getUserPublicInfo({did:et.forceConnected});isUndefined$2(nt==null?void 0:nt.sourceAppPid)||(et.sourceAppPid=nt.sourceAppPid)}return{params:et,url:j.href}}}catch{console.warn("Failed to decode did-connect url params")}return{params:null,url:a}}const openPopup=(a,{width:j=600,height:_e=700,name:et="did-connect:popup"}={})=>{const tt=window.screenX+(window.innerWidth-j)/2,nt=window.screenY+(window.innerHeight-_e)/2,rt=[`left=${tt}`,`top=${nt}`,`width=${j}`,`height=${_e}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],it=window.open("",et,rt.join(","));if(it===null)throw new NotOpenError;return it.location.href=a,it},runPopup=a=>new Promise((j,_e)=>{let et,tt;const nt=({data:rt})=>{if(rt&&rt.type==="authorization_response"){if(rt!=null&&rt.error){console.error(rt.error);return}setTimeout(()=>{var it;(it=a.popup)==null||it.close(),clearTimeout(tt),clearInterval(et),window.removeEventListener("message",nt,!1),j(rt)},a.closeTimeout||0)}};tt=setTimeout(()=>{clearInterval(et),_e(new Error("Timeout")),window.removeEventListener("message",nt,!1)},(a.timeoutInSeconds||DEFAULT_WINDOW_TIMEOUT)*1e3),et=setInterval(()=>{var rt;(rt=a.popup)!=null&&rt.closed&&(clearInterval(et),clearTimeout(tt),window.removeEventListener("message",nt,!1),_e(new Error("Popup closed")))},1e3),window.addEventListener("message",nt)}),keyPair=tweetnacl.box.keyPair();function useSecurity(){const[a,j]=useLocalStorageState("__encKey",{defaultValue:encodeKey(keyPair.publicKey),deserializer:nt=>nt,serializer:nt=>nt}),[_e,et]=useLocalStorageState("__decKey",{defaultValue:encodeKey(keyPair.secretKey),deserializer:nt=>nt,serializer:nt=>nt});return reactExports.useEffect(()=>{localStorage.getItem("__encKey")||j(encodeKey(keyPair.publicKey)),localStorage.getItem("__decKey")||et(encodeKey(keyPair.secretKey))},[]),{encryptKey:a,decryptKey:_e,decrypt:nt=>decrypt$1(nt,a,_e)}}var lodash={exports:{}};/**
|
|
280
280
|
* @license
|
|
281
281
|
* Lodash <https://lodash.com/>
|
|
282
282
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -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-DMFar3I1.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),BlockletList=reactExports.lazy(()=>__vitePreload(()=>import("./index-Cw-_inHl.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-AgJrAiSK.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-FIMmdaZK.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-DD1cWFOC.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-D1PLfduk.js"),__vite__mapDeps([75,76,23,24,10,77]),import.meta.url)),TeamPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dpoqj6Jo.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-vJPrtqvp.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-DBx2-m_Y.js"),[],import.meta.url)),Notifications=reactExports.lazy(()=>__vitePreload(()=>import("./index-BL7aEYjP.js"),__vite__mapDeps([102,1,82,14]),import.meta.url)),IssuePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-CRniQIuD.js"),__vite__mapDeps([103,104,91,105,93,70,106]),import.meta.url)),LostPassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-BtBRSL1d.js"),__vite__mapDeps([107,70,86,54,106,30]),import.meta.url)),ExchangePassport=reactExports.lazy(()=>__vitePreload(()=>import("./index-Dntt1eil.js"),__vite__mapDeps([108,106]),import.meta.url)),BlockletLauncher=reactExports.lazy(()=>__vitePreload(()=>import("./index-wZRHPQoX.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-Bd4i9E1O.js"),__vite__mapDeps([111,91]),import.meta.url)),Invite=reactExports.lazy(()=>__vitePreload(()=>import("./index-C74bQC6L.js"),__vite__mapDeps([112,104,91,105,93,70,106]),import.meta.url)),Console=reactExports.lazy(()=>__vitePreload(()=>import("./index-NkzSJ_BT.js").then(a=>a.a2),__vite__mapDeps([113,114]),import.meta.url)),AnalyticsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-DEPFtOhR.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};
|