@abtnode/blocklet-services 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/api/index.js +0 -3
- package/api/libs/jwt.js +5 -1
- package/api/routes/federated.js +9 -163
- package/api/routes/openembed.js +4 -2
- package/api/routes/user-session.js +29 -13
- package/api/routes/user.js +26 -7
- package/dist/assets/{Add-BQ57PY_a.js → Add-DV9cHTiI.js} +1 -1
- package/dist/assets/{AddBox-DiQsIzo9.js → AddBox-DjGRetT1.js} +1 -1
- package/dist/assets/{Alert-smpImqp0.js → Alert-BriK3hjA.js} +1 -1
- package/dist/assets/{ArrowDropDown-CSr70fBb.js → ArrowDropDown-DX29Pf8V.js} +1 -1
- package/dist/assets/{Avatar-C9lcmTAE.js → Avatar-CpQhQmV4.js} +1 -1
- package/dist/assets/{ButtonGroup-Cj4y31z5.js → ButtonGroup-BPdi_2z2.js} +1 -1
- package/dist/assets/{CheckCircle-BvPlu31O.js → CheckCircle-DwkE-k6U.js} +1 -1
- package/dist/assets/{ChevronRight-WucQQYYR.js → ChevronRight-BHXal2s_.js} +1 -1
- package/dist/assets/{Close-CbUjGQb5.js → Close-BtG4tyUL.js} +1 -1
- package/dist/assets/{CloseOutlined-CA8ATDOK.js → CloseOutlined-CYZb8eDz.js} +1 -1
- package/dist/assets/{Delete-DMiA4kv4.js → Delete-rvy-F0hT.js} +1 -1
- package/dist/assets/{DeleteOutline-BtczblDR.js → DeleteOutline-C36lJe42.js} +1 -1
- package/dist/assets/{Done-Bbviheoa.js → Done-n1c-sUsw.js} +1 -1
- package/dist/assets/{Download-CWRpb79U.js → Download-DuCZFVPl.js} +1 -1
- package/dist/assets/{Edit-CPH5rsyf.js → Edit-BrAk9NBL.js} +1 -1
- package/dist/assets/{EditIcon-Dzqx6EGV.js → EditIcon-CPgYqcwg.js} +1 -1
- package/dist/assets/{Error-BehVhT4L.js → Error-g7gK9Wfp.js} +1 -1
- package/dist/assets/{ExpandMore-BLPbGEUk.js → ExpandMore-DpLFPsWa.js} +1 -1
- package/dist/assets/{FilterList-dGVsmxZ3.js → FilterList-BpmYd7MC.js} +5 -5
- package/dist/assets/FormControl-Dq6XW9kS.js +1 -0
- package/dist/assets/FormControlLabel-CQnpTkDU.js +1 -0
- package/dist/assets/FormGroup-C8sAhYQk.js +1 -0
- package/dist/assets/{Google-CgL8P0c3.js → Google-C3cw6Unp.js} +4 -4
- package/dist/assets/Hidden-c0nvbE8_.js +1 -0
- package/dist/assets/{InfoOutlined-738pp2yB.js → InfoOutlined-DEt-KJ8v.js} +1 -1
- package/dist/assets/{InputAdornment-BkdyuJyy.js → InputAdornment-Dr1oU3Hs.js} +1 -1
- package/dist/assets/{InputLabel--WV9lBJk.js → InputLabel-DYr7To9X.js} +1 -1
- package/dist/assets/{LastPage-DsSBN78H.js → LastPage-DV14H4DC.js} +1 -1
- package/dist/assets/{Launch-CSUzNHYL.js → Launch-DSSRxyd1.js} +1 -1
- package/dist/assets/{LaunchOutlined-C2aTle2O.js → LaunchOutlined-DOGa7uCZ.js} +1 -1
- package/dist/assets/{Link-CFWQfHB5.js → Link-BzeSWqDp.js} +1 -1
- package/dist/assets/{ListItemText-54aRex6i.js → ListItemText-BWMpM4cA.js} +1 -1
- package/dist/assets/{LoadingButton-Ddk75wr7.js → LoadingButton-IrsPdnhT.js} +1 -1
- package/dist/assets/{LockIcon-BKdiP0Z8.js → LockIcon-Cx_TySkG.js} +1 -1
- package/dist/assets/{Loop-CrVxeM7o.js → Loop-CSmyyk97.js} +1 -1
- package/dist/assets/{MoreHoriz-DCig5-7z.js → MoreHoriz-B_IgZ_Tw.js} +1 -1
- package/dist/assets/{MoreVert-D0MHc_oA.js → MoreVert-BQD92YJp.js} +1 -1
- package/dist/assets/{OpenInNew-o94JN74y.js → OpenInNew-Ba4HupG6.js} +1 -1
- package/dist/assets/{Pagination-BoZ8uk_n.js → Pagination-g_z2fX8D.js} +2 -2
- package/dist/assets/{PlayArrow-BKJw1eVI.js → PlayArrow-CvyM0yMY.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-UwK_E8FG.js → QuestionMarkCircle-B_wELYAO.js} +1 -1
- package/dist/assets/{RadioGroup-DpVC0gNI.js → RadioGroup-BSqtRWJR.js} +1 -1
- package/dist/assets/{Search-BkeqStVj.js → Search-D_9DtKpx.js} +1 -1
- package/dist/assets/{Select-B2Prj2qE.js → Select-CMM8MR9i.js} +1 -1
- package/dist/assets/{ServerLogo-7k2IFEWK.js → ServerLogo-Ds39xok2.js} +1 -1
- package/dist/assets/{Skeleton-lGeaUybJ.js → Skeleton-d-rA8WB_.js} +4 -4
- package/dist/assets/{Slider-CTDjrGVx.js → Slider-Cv9IlmAx.js} +1 -1
- package/dist/assets/{Stepper-DUoEJ9pB.js → Stepper-X4KYPIVJ.js} +1 -1
- package/dist/assets/{TextField-Bc5irjLS.js → TextField-BYelVRF_.js} +1 -1
- package/dist/assets/Toolbar-DI2YKZS2.js +1 -0
- package/dist/assets/{ViewList-B20ISrFd.js → ViewList-DWZsPuDR.js} +1 -1
- package/dist/assets/access-control-Deg0Ez_v.js +13 -0
- package/dist/assets/actions-Dv2KmWA_.js +1 -0
- package/dist/assets/{add-component-core-Dk4Djy0q.js → add-component-core-CGy2QLvt.js} +1 -1
- package/dist/assets/add-resource-B2YCggbD.js +1 -0
- package/dist/assets/addon-B-L0-6EM.js +31 -0
- package/dist/assets/{analytics-DcwZo_gP.js → analytics-B3U8I3AQ.js} +7 -7
- package/dist/assets/api-DJ1sjN9o.js +1 -0
- package/dist/assets/ar-lTVP4T3d.js +1 -0
- package/dist/assets/audit-logs-Dt1zBSaX.js +58 -0
- package/dist/assets/{button-rv9kaUKM.js → button-BotQVFjI.js} +1 -1
- package/dist/assets/click-to-copy-C932KUDy.js +1 -0
- package/dist/assets/{complete-CCkwZPzb.js → complete-BfHgp0O7.js} +3 -3
- package/dist/assets/{component-Dp7lcidX.js → component-BziFLYA3.js} +1 -1
- package/dist/assets/config-BcfULTik.js +32 -0
- package/dist/assets/{config-BIMZ5MEe.js → config-BqLTd80Y.js} +1 -1
- package/dist/assets/{config-navigation-XWDrsLV_.js → config-navigation-1U4iVdBl.js} +1 -1
- package/dist/assets/confirm-BWW215hi.js +7 -0
- package/dist/assets/{connect-DtIwAPOk.js → connect-CfBbqaTr.js} +1 -1
- package/dist/assets/connect-DC7BGJJv.js +1 -0
- package/dist/assets/connect-to-CHo6hM6n.js +54 -0
- package/dist/assets/{content-layout-Cpg-pb6u.js → content-layout-BP4bsvx7.js} +1 -1
- package/dist/assets/{dashboard-Cy3erg8C.js → dashboard-BWG8DtF1.js} +9 -9
- package/dist/assets/de-B3TxaybY.js +1 -0
- package/dist/assets/{did-address-5rmeRrux.js → did-address-TSZ5XRBj.js} +1 -1
- package/dist/assets/domain-B0bCdxTC.js +9 -0
- package/dist/assets/domain-list-A5SqLbLS.js +15 -0
- package/dist/assets/es-BY0KMFme.js +1 -0
- package/dist/assets/exchange-passport-CBjbwwA6.js +1 -0
- package/dist/assets/{fallback-DeSV2xkv.js → fallback-Dz8ZuYD5.js} +1 -1
- package/dist/assets/{format-error-B_0jV3Iv.js → format-error-DQS9AwZv.js} +2 -2
- package/dist/assets/fr-BiVZLeXU.js +1 -0
- package/dist/assets/fuel-BP12PtJ1.js +32 -0
- package/dist/assets/{fullpage-Boy5j04D.js → fullpage-DXFbt1Ve.js} +1 -1
- package/dist/assets/hi-B_LrkIOS.js +1 -0
- package/dist/assets/{home-Glfkn8kh.js → home-Cx9PAId-.js} +1 -1
- package/dist/assets/id-jBXPD1he.js +1 -0
- package/dist/assets/{iframe-D3bH5x3R.js → iframe-CO-VEhes.js} +1 -1
- package/dist/assets/{index-Cw-oSGcD.js → index--YUaVsoq.js} +22 -22
- package/dist/assets/index-46Rvg-Bo.js +1 -0
- package/dist/assets/{index-p55mr8Rd.js → index-B0wa_Sca.js} +1 -1
- package/dist/assets/{index-_qSOGZvF.js → index-B22_1WOD.js} +1 -1
- package/dist/assets/{index-cmxabTfW.js → index-B5Pm_bPi.js} +1 -1
- package/dist/assets/{index-B1p1iylt.js → index-BJDKEH0b.js} +7 -7
- package/dist/assets/{index-CFuGWzVi.js → index-BSHfXuRt.js} +7 -7
- package/dist/assets/index-BcFOSrVl.js +68 -0
- package/dist/assets/{index-BwG-tanp.js → index-BmHPL-9s.js} +5 -5
- package/dist/assets/{index-LywoNrgL.js → index-BqmsKa7O.js} +1 -1
- package/dist/assets/{index-Bj_zBfXt.js → index-BsjCwHmK.js} +1 -1
- package/dist/assets/{index-DiqZp89K.js → index-Bwzls06Y.js} +1 -1
- package/dist/assets/{index-btzBjGHI.js → index-ByYl1QnH.js} +1 -1
- package/dist/assets/{index-DwpJFq5g.js → index-CFQwbx1S.js} +1 -1
- package/dist/assets/{index-BdYDooUk.js → index-COZKzHiS.js} +1 -1
- package/dist/assets/{index-B3keHk0l.js → index-CQU16qpp.js} +1 -1
- package/dist/assets/{index-Cvh50s_t.js → index-CTFO1wAr.js} +12 -12
- package/dist/assets/{index-Bjf6Qdid.js → index-CaLGv6xG.js} +5 -5
- package/dist/assets/{index-BpIS7xUe.js → index-ChpB_Xok.js} +1 -1
- package/dist/assets/{index-C0TcPNfP.js → index-CndSwPzI.js} +2 -2
- package/dist/assets/{index-CufrwE5d.js → index-D-GkMvG_.js} +1 -1
- package/dist/assets/{index-CHZh3BHq.js → index-D5PXuh6o.js} +4 -4
- package/dist/assets/{index-D5X58lJY.js → index-DCMTEGgZ.js} +1 -1
- package/dist/assets/{index-BJalpuBM.js → index-DU7LqWjQ.js} +1 -1
- package/dist/assets/{index-D_o4YQXA.js → index-D_u35EkG.js} +9 -9
- package/dist/assets/{index-Dsb2xjqK.js → index-DtAm5Ed6.js} +1 -1
- package/dist/assets/index-Du6azec5.js +4 -0
- package/dist/assets/{index-D8LJCIGN.js → index-MoRwjSwP.js} +1 -1
- package/dist/assets/{index-CbrpFuSe.js → index-TTSckhl8.js} +1 -1
- package/dist/assets/{index-mLiByM5-.js → index-VIHj0M7P.js} +1 -1
- package/dist/assets/{index-Bbkb50i_.js → index-ozDSMBYi.js} +2 -2
- package/dist/assets/{index-DYBY6iT_.js → index-zQvc8SIq.js} +1 -1
- package/dist/assets/{index.es-DdWEvNQE.js → index.es-CYl4P_xg.js} +2 -2
- package/dist/assets/{index.esm-DD6j9Hbp.js → index.esm-DDyWFyUp.js} +1 -1
- package/dist/assets/{invitation-DUyIwrZO.js → invitation-YCFRX3K4.js} +6 -6
- package/dist/assets/invite-BVqEvYi7.js +10 -0
- package/dist/assets/issue-passport-Bt2ICeaH.js +1 -0
- package/dist/assets/{item-BkNGiSLA.js → item-DmDrPoAj.js} +1 -1
- package/dist/assets/ja-DKiHQ6DE.js +1 -0
- package/dist/assets/{jss-plugin-props-sort.esm-BalOwz5A.js → jss-plugin-props-sort.esm-B9z92TrV.js} +1 -1
- package/dist/assets/ko-BBYyf1yM.js +1 -0
- package/dist/assets/{launch-result-message-B4GHaPTO.js → launch-result-message-DpNOYW9u.js} +1 -1
- package/dist/assets/{layout-X3oLtCG6.js → layout-D41GSjev.js} +2 -2
- package/dist/assets/list-header-cw9lRKSX.js +57 -0
- package/dist/assets/localization-9mzelGR9.js +1 -0
- package/dist/assets/{log-B_OHDjFH.js → log-DVDRYSeA.js} +1 -1
- package/dist/assets/login-BLIQel5D.js +1 -0
- package/dist/assets/{login-oauth-callback-JqaH9yWq.js → login-oauth-callback--4mls_Fw.js} +1 -1
- package/dist/assets/{logo-uploader-DSVH1NS6.js → logo-uploader-CHBeSau3.js} +5 -5
- package/dist/assets/{lost-passport-CnuoHm2j.js → lost-passport-6PNRRlCd.js} +4 -4
- package/dist/assets/{lottie-D-0y0bjd.js → lottie-C16LOHrZ.js} +1 -1
- package/dist/assets/notifications-DHYTuxQt.js +62 -0
- package/dist/assets/{open-window-BenM6KVD.js → open-window-CEqHc-YI.js} +1 -1
- package/dist/assets/overview-jW78KQ6d.js +12 -0
- package/dist/assets/page-header-Bjl7D46v.js +31 -0
- package/dist/assets/{permission-CbOj_2Bp.js → permission-BK9x4qjQ.js} +1 -1
- package/dist/assets/{preferences-BMFF2n9d.js → preferences-4fQh6PBV.js} +1 -1
- package/dist/assets/pt-DI2MIkSi.js +1 -0
- package/dist/assets/publish-resource-RsLy3V3l.js +1 -0
- package/dist/assets/{react-VdzYFMYW.js → react-DCoycSH4.js} +16 -16
- package/dist/assets/{redux-_iDVOyi8.js → redux-Xix6UYN5.js} +1 -1
- package/dist/assets/resource-dialog-CMS1eEc0.js +57 -0
- package/dist/assets/ru-B2L3CRQ4.js +1 -0
- package/dist/assets/sdk-B75CkXUw.js +1 -0
- package/dist/assets/{selector-DKnQRsyi.js → selector-BcHp8r2b.js} +3 -3
- package/dist/assets/session-AqfK0jLG.js +1 -0
- package/dist/assets/setup-DXuWRjLR.js +19 -0
- package/dist/assets/{shorten-label-uDRMuqOz.js → shorten-label-DZ5n7VkB.js} +1 -1
- package/dist/assets/{slicedToArray-CyVkNUew.js → slicedToArray-DiN6EoYj.js} +2 -2
- package/dist/assets/{spaces-BCq3rAVa.js → spaces-DBKeHx91.js} +1 -1
- package/dist/assets/start-C4mLiamV.js +187 -0
- package/dist/assets/step-actions-NyA7AGpj.js +31 -0
- package/dist/assets/studio-CC7YQ-9Q.js +6 -0
- package/dist/assets/switch-control-VH3u6pwk.js +13 -0
- package/dist/assets/th-CfNBHHtU.js +1 -0
- package/dist/assets/{toUpper-CuGm8bjT.js → toUpper-D8eon-dl.js} +1 -1
- package/dist/assets/{transfer-DIBgSbnS.js → transfer-Dp36g86n.js} +2 -2
- package/dist/assets/{uniqBy-B-B5GbKo.js → uniqBy-Cev3lMnU.js} +1 -1
- package/dist/assets/unsubscribe-Be0k3pAZ.js +1 -0
- package/dist/assets/{url-join-DxMZuH7a.js → url-join-B-UX0vQK.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-l_qg8Xo8.js → use-blocklet-info-for-connect-did-spaces-DF1lby8c.js} +1 -1
- package/dist/assets/use-mobile-BLqjm-5m.js +1 -0
- package/dist/assets/{useAsync-CNA6CF-4.js → useAsync-PE3W-DLW.js} +1 -1
- package/dist/assets/{useFormControl-CLJPjR4P.js → useFormControl-DMGx-jdt.js} +1 -1
- package/dist/assets/{useLocalStorage-B61hus9l.js → useLocalStorage-eP0cInBT.js} +1 -1
- package/dist/assets/{useSetState-De5jz-QS.js → useSetState-DEVLe2Fz.js} +1 -1
- package/dist/assets/useSlot-BrU8y60n.js +1 -0
- package/dist/assets/{useSlotProps-dq2Kfslt.js → useSlotProps-fP10cTIP.js} +1 -1
- package/dist/assets/useThemeProps-C59Glnbx.js +1 -0
- package/dist/assets/user-center-CkHZ_2ui.js +1 -0
- package/dist/assets/{user-sessions-CvhKLriy.js → user-sessions-C8nlOE7U.js} +1 -1
- package/dist/assets/{util-CTNXgq32.js → util-yXMDVjHb.js} +1 -1
- package/dist/assets/vi-DbzhnofW.js +1 -0
- package/dist/assets/{wrap-locale-DVbyvIny.js → wrap-locale-DL11xPuS.js} +1 -1
- package/dist/assets/zh-FO0C29Rb.js +1 -0
- package/dist/assets/zh-tw-cyWwf75a.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +29 -29
- package/dist/assets/FormControl-Us_liKuz.js +0 -1
- package/dist/assets/FormControlLabel-DJAqgLGE.js +0 -1
- package/dist/assets/FormGroup-BbGcDOoo.js +0 -1
- package/dist/assets/Hidden-Cq8zZFLO.js +0 -1
- package/dist/assets/Toolbar-CA_h5A9p.js +0 -1
- package/dist/assets/access-control-BMXRpHl-.js +0 -13
- package/dist/assets/actions-DwpIAZdn.js +0 -1
- package/dist/assets/add-resource-DhwEgLRb.js +0 -1
- package/dist/assets/addon-CO3ovexo.js +0 -31
- package/dist/assets/api-B0Ezcc20.js +0 -1
- package/dist/assets/ar-BOQhQYjx.js +0 -1
- package/dist/assets/audit-logs-ch5QueX3.js +0 -58
- package/dist/assets/click-to-copy-C4ONmU_N.js +0 -1
- package/dist/assets/config-DISpOS3J.js +0 -32
- package/dist/assets/confirm-D8z1ysLZ.js +0 -7
- package/dist/assets/connect-B1DBc-KL.js +0 -1
- package/dist/assets/connect-to-DNz_WDCc.js +0 -54
- package/dist/assets/de-t1rC40NN.js +0 -1
- package/dist/assets/domain-C7LHxI47.js +0 -9
- package/dist/assets/domain-list-kQLBhEmi.js +0 -15
- package/dist/assets/es-DfbI4mbP.js +0 -1
- package/dist/assets/exchange-passport-CfGXESIE.js +0 -1
- package/dist/assets/fr-_U79lUBj.js +0 -1
- package/dist/assets/fuel-aBXBwM_I.js +0 -32
- package/dist/assets/hi-Di6UaHUZ.js +0 -1
- package/dist/assets/id-CuP-z2YS.js +0 -1
- package/dist/assets/index-DLyTsUFY.js +0 -1
- package/dist/assets/index-DP5184vb.js +0 -4
- package/dist/assets/index-autg6hcy.js +0 -68
- package/dist/assets/invite-C45s_16j.js +0 -10
- package/dist/assets/issue-passport-INxc0I1O.js +0 -1
- package/dist/assets/ja-CsYEjFuw.js +0 -1
- package/dist/assets/ko-DwcGU2RJ.js +0 -1
- package/dist/assets/list-header-B_qD9r7c.js +0 -57
- package/dist/assets/localization-DFhPI3Pr.js +0 -1
- package/dist/assets/login-Cxzlnsxp.js +0 -1
- package/dist/assets/notifications-CRyumC-4.js +0 -62
- package/dist/assets/overview-DkODBI7U.js +0 -12
- package/dist/assets/page-header-CaBVBbM_.js +0 -31
- package/dist/assets/pt-DF-luAxv.js +0 -1
- package/dist/assets/publish-resource-DBzB0PV8.js +0 -1
- package/dist/assets/resource-dialog-CGv7gFVK.js +0 -57
- package/dist/assets/ru-DKnB6G3S.js +0 -1
- package/dist/assets/sdk-BsyaEhx5.js +0 -1
- package/dist/assets/session-WfO9rlPi.js +0 -1
- package/dist/assets/setup-DalefKUl.js +0 -19
- package/dist/assets/start-Dwly_ww8.js +0 -187
- package/dist/assets/step-actions-Bvy2nc4B.js +0 -31
- package/dist/assets/studio-mK-vbf-F.js +0 -6
- package/dist/assets/switch-control-Dmb8A7P7.js +0 -13
- package/dist/assets/th-Dna3ZHAu.js +0 -1
- package/dist/assets/unsubscribe-Q__XsG0-.js +0 -1
- package/dist/assets/use-mobile-Om7xgadW.js +0 -1
- package/dist/assets/useSlot-BdDJZvLo.js +0 -1
- package/dist/assets/useThemeProps-CeQMvkv6.js +0 -1
- package/dist/assets/user-center-CI62TMfu.js +0 -1
- package/dist/assets/vi-tHyNmIs-.js +0 -1
- package/dist/assets/zh-CZ75v_KR.js +0 -1
- package/dist/assets/zh-tw-BDv-O3sb.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-
|
|
2
|
-
import{r as x,aE as Zn,aF as Jn,aG as Nt,aH as K,aI as er,aJ as tr,aK as ge,aL as Pn,aM as vt,j as c,aN as nr,aO as ho,X as k,Y as z,P as m,Z as Ze,e as Je,aP as ye,a0 as Mt,a7 as B,a9 as Z,aQ as Ne,aC as Ut,aR as vo,L as Bt,aS as yt,aT as yo,m as te,a1 as he,F as $,T as G,s as J,aU as xo,aV as bo,c as ke,aW as jo,aX as xt,u as Q,aY as wo,B as D,J as So,aZ as _o,a as He,a_ as Co,a$ as Oo,b0 as Po,b1 as Io,b2 as Eo,b3 as Ro,b4 as To,b5 as Lo,b6 as Do,b7 as rr,b8 as Ao,b9 as $o,ba as No,bb as or,bc as sr,bd as ir,$ as et,be as ar,bf as ce,bg as me,bh as kt,bi as cr,bj as Mo,ae as qe,ai as Uo,bk as Bo,bl as ko,bm as zo,ah as Fo,bn as Vo,bo as Ho,aj as Ee,bp as qo,aB as Wo,C as We,bq as Ko,br as Go,bs as _e,bt as lr,bu as Qo,ac as In,a6 as Xo,aa as Yo,ad as Zo,af as Jo,bv as ze,a5 as Me,bw as es,H as ts,a2 as F,bx as ns,ao as rs,R as En}from"./index-Bjf6Qdid.js";import{T as os}from"./index-btzBjGHI.js";import{_ as Rn}from"./useLocalStorage-B61hus9l.js";import{d as ss}from"./MoreVert-D0MHc_oA.js";import{C as Tn}from"./confirm-D8z1ysLZ.js";import{d as is}from"./Delete-DMiA4kv4.js";import{d as as,u as cs}from"./PlayArrow-BKJw1eVI.js";import{A as ur}from"./Alert-smpImqp0.js";import{L as ls,a as dr}from"./ListItemText-54aRex6i.js";import{B as us}from"./ButtonGroup-Cj4y31z5.js";import{R as ds,a as Ln}from"./RadioGroup-DpVC0gNI.js";import{F as bt,C as fs}from"./FormControlLabel-DJAqgLGE.js";import{f as zt}from"./format-error-B_0jV3Iv.js";import{A as fr}from"./Avatar-C9lcmTAE.js";import{u as ps}from"./session-WfO9rlPi.js";import{D as ms,_ as pr,P as gs}from"./permission-CbOj_2Bp.js";import{T as mr,b as hs}from"./index-CufrwE5d.js";import{L as gr}from"./Link-CFWQfHB5.js";import{_ as hr}from"./useSetState-De5jz-QS.js";import{E as vs}from"./fallback-DeSV2xkv.js";import{u as ys}from"./index-D_o4YQXA.js";import{L as xs,D as bs}from"./index-Bbkb50i_.js";const vr=e=>{const t=x.useRef({});return x.useEffect(()=>{t.current=e}),t.current};function js(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=vr({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:e,u=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:u}}function ws(e){return Jn("MuiBadge",e)}const re=Zn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Ss=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],ut=10,dt=4,_s=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${K(n.vertical)}${K(n.horizontal)}`,`anchorOrigin${K(n.vertical)}${K(n.horizontal)}${K(o)}`,`overlap${K(o)}`,t!=="default"&&`color${K(t)}`]};return nr(a,ws,s)},Cs=Nt("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Os=Nt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${K(n.anchorOrigin.vertical)}${K(n.anchorOrigin.horizontal)}${K(n.overlap)}`],n.color!=="default"&&t[`color${K(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:ut*2,lineHeight:1,padding:"0 6px",height:ut*2,borderRadius:ut,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:dt,height:dt*2,minWidth:dt*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),yr=x.forwardRef(function(t,n){var r,o,i,s,a,l;const u=er({props:t,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:f,component:p,components:v={},componentsProps:b={},children:h,overlap:j="rectangular",color:I="default",invisible:g=!1,max:_=99,badgeContent:w,slots:O,slotProps:S,showZero:R=!1,variant:C="standard"}=u,P=tr(u,Ss),{badgeContent:E,invisible:T,max:ne,displayValue:M}=js({max:_,invisible:g,badgeContent:w,showZero:R}),be=vr({anchorOrigin:d,color:I,overlap:j,variant:C,badgeContent:w}),je=T||E==null&&C!=="dot",{color:it=I,overlap:at=j,anchorOrigin:ct=d,variant:ie=C}=je?be:u,y=ie!=="dot"?M:void 0,L=ge({},u,{badgeContent:E,invisible:je,max:ne,displayValue:y,showZero:R,anchorOrigin:ct,color:it,overlap:at,variant:ie}),V=_s(L),H=(r=(o=O==null?void 0:O.root)!=null?o:v.Root)!=null?r:Cs,X=(i=(s=O==null?void 0:O.badge)!=null?s:v.Badge)!=null?i:Os,q=(a=S==null?void 0:S.root)!=null?a:b.root,N=(l=S==null?void 0:S.badge)!=null?l:b.badge,lt=Pn({elementType:H,externalSlotProps:q,externalForwardedProps:P,additionalProps:{ref:n,as:p},ownerState:L,className:vt(q==null?void 0:q.className,V.root,f)}),de=Pn({elementType:X,externalSlotProps:N,ownerState:L,className:vt(V.badge,N==null?void 0:N.className)});return c.jsxs(H,ge({},lt,{children:[h,c.jsx(X,ge({},de,{children:y}))]}))});function Ps(e){return Jn("MuiListItemAvatar",e)}Zn("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Is=["className"],Es=e=>{const{alignItems:t,classes:n}=e;return nr({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Ps,n)},Rs=Nt("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>ge({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),Ts=x.forwardRef(function(t,n){const r=er({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=tr(r,Is),s=x.useContext(ho),a=ge({},r,{alignItems:s.alignItems}),l=Es(a);return c.jsx(Rs,ge({className:vt(l.root,o),ownerState:a,ref:n},i))});var Ft={},Ls=z;Object.defineProperty(Ft,"__esModule",{value:!0});var xr=Ft.default=void 0,Ds=Ls(k()),As=c;xr=Ft.default=(0,Ds.default)((0,As.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Vt={},$s=z;Object.defineProperty(Vt,"__esModule",{value:!0});var br=Vt.default=void 0,Ns=$s(k()),Ms=c;br=Vt.default=(0,Ns.default)((0,Ms.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Ht={},Us=z;Object.defineProperty(Ht,"__esModule",{value:!0});var jr=Ht.default=void 0,Bs=Us(k()),ks=c;jr=Ht.default=(0,Bs.default)((0,ks.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var qt={},zs=z;Object.defineProperty(qt,"__esModule",{value:!0});var wr=qt.default=void 0,Fs=zs(k()),Vs=c;wr=qt.default=(0,Fs.default)((0,Vs.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Wt={},Hs=z;Object.defineProperty(Wt,"__esModule",{value:!0});var Sr=Wt.default=void 0,qs=Hs(k()),Ws=c;Sr=Wt.default=(0,qs.default)((0,Ws.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Kt={},Ks=z;Object.defineProperty(Kt,"__esModule",{value:!0});var _r=Kt.default=void 0,Gs=Ks(k()),Qs=c;_r=Kt.default=(0,Gs.default)((0,Qs.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Gt={},Xs=z;Object.defineProperty(Gt,"__esModule",{value:!0});var Cr=Gt.default=void 0,Ys=Xs(k()),Zs=c;Cr=Gt.default=(0,Ys.default)((0,Zs.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});var Or=Qt.default=void 0;Js(x);var Dn=c;function Js(e){return e&&e.__esModule?e:{default:e}}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?An(Object(n),!0).forEach(function(r){ei(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ei(e,t,n){return(t=ti(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ti(e){var t=ni(e,"string");return typeof t=="symbol"?t:t+""}function ni(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=function(t){return(0,Dn.jsx)("svg",$n($n({},t),{},{children:(0,Dn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33 8.207A11.52 11.52 0 0 1 23.504 26.34H8.496A11.52 11.52 0 0 1 9.33 8.207zM16 3.52a14.08 14.08 0 0 0-8.76 25.102c.226.18.506.278.796.278h15.928c.29 0 .57-.098.797-.278A14.08 14.08 0 0 0 16 3.52zm5.883 10.072a1.28 1.28 0 0 0-1.81-1.81l-2.205 2.205a4.124 4.124 0 1 0 1.81 1.81l2.205-2.205zm-7.447 4.073a1.564 1.564 0 1 1 3.128 0 1.564 1.564 0 0 1-3.129 0z",fill:"currentColor"})}))};Xt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Xt.displayName="dashboard";Or=Qt.default=Xt;var Yt={},ri=z;Object.defineProperty(Yt,"__esModule",{value:!0});var Pr=Yt.default=void 0,oi=ri(k()),si=c;Pr=Yt.default=(0,oi.default)((0,si.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const pe={Start:as,Stop:xr,Restart:br,Reload:jr,Remove:is,Config:wr,Log:Sr,Group:_r,Cancel:Cr,Dashboard:Or,Overview:Pr},ii="internal",ai="external";function Zt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:s,...a}){const l=Je(),u=ye(),[d,f]=x.useState(null),[p,v]=x.useState(null),[b,h]=x.useState(!1),[j,I]=x.useState(null),{t:g}=x.useContext(Mt),[_]=Rn("skip-blocklet-setup",!1),{loading:w,recommendedUrl:O}=s(e),[S]=Rn("blocklet-type-filter",ii),R=B.isInProgress(e.status),[C,P]=x.useState(!1);x.useEffect(()=>{var L,V;if(!(e!=null&&e.controller))return;P(((V=(L=e==null?void 0:e.controller)==null?void 0:L.status)==null?void 0:V.value)===Z.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var H,X,q;try{const N=await u.api.getLauncherSession({input:{launcherSessionId:(H=e==null?void 0:e.controller)==null?void 0:H.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(N!=null&&N.error){console.error("get launcher session failed",N.error);return}P([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((q=N==null?void 0:N.launcherSession)==null?void 0:q.status))}catch(N){console.error("call getLauncherSession error",N)}})()},[]);const{inService:E}=u,T=(y,L,V=!1)=>async()=>{const H=async de=>{var $e;t({action:y,blocklet:e}),h(!0),v(y);let Ae=!1;try{if(y==="remove")await L(de);else if(y==="start"){if(!B.hasRunnableComponent(e)){J.error(g("blocklet.noComponent"));return}if(!E&&!_&&!(($e=e.settings)!=null&&$e.initialized)&&e.mode!==Z.BLOCKLET_MODES.DEVELOPMENT){const Y=xo(u.info),On=new URL(O);On.searchParams.set("serverUrl",Y),window.open(On.href),n({action:y,blocklet:e});return}const ae=e.children.filter(Y=>!B.isInProgress(Y.status)&&Y.status!=="running").map(Y=>Y.meta.did),fe={did:e.meta.did,componentDids:ae};await L({input:fe})}else if(["stop","restart","reload"].includes(y)){const ae=e.children.filter(Y=>Y.status==="running").map(Y=>Y.meta.did),fe={did:e.meta.did,componentDids:ae};await L({input:fe})}else{const ae={did:e.meta.did};await L({input:ae})}y==="remove"?Ae=!0:await bo(1e3),y==="reload"&&J.success(g("blocklet.reloadSuccess")),I(null),n({action:y,blocklet:e})}catch(ae){const fe=`Blocklet ${y} failed: ${zt(ae)}`;throw n({action:y,blocklet:e,error:new Error(fe)}),new Error(fe)}finally{Ae||h(!1)}},X=()=>{h(!1),I(null)},q=B.getDisplayName(e,!0),N=e.mode===Z.BLOCKLET_MODES.DEVELOPMENT?{description:()=>c.jsx(G,{component:"div",children:c.jsx(G,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(de,Ae)=>c.jsxs(G,{component:"div",children:[c.jsx(G,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")}),c.jsxs(ds,{name:"removeType",value:de.removeType,onChange:$e=>Ae({...de,removeType:$e.target.value}),children:[c.jsx(bt,{value:"backup",control:c.jsx(Ln,{}),label:g("blocklet.action.removeApplicationAfterBackup")}),c.jsx(bt,{value:"complete",control:c.jsx(Ln,{}),label:g("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},lt={stop:{title:`${g("common.stop")} ${q}`,description:g("blocklet.action.stopDescription"),confirm:g("blocklet.action.confirmStop"),cancel:g("common.cancel"),onConfirm:H,onCancel:X},restart:{title:`${g("common.restart")} ${q}`,description:g("blocklet.action.restartDescription"),confirm:g("blocklet.action.confirmRestart"),cancel:g("common.cancel"),onConfirm:H,onCancel:X},remove:{title:`${g("common.remove")} ${q}`,confirm:g("blocklet.action.confirmRemove"),cancel:g("common.cancel"),onConfirm:H,onCancel:X,...N},cancelDownload:{title:`${g("common.cancel")}`,description:g("blocklet.action.cancelDownloadDescription",{name:q}),confirm:g("common.confirm"),cancel:g("common.cancel"),onConfirm:H,onCancel:X}};V?I(lt[y]):await H()},ne=!!d,M=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}f(y.currentTarget)},be=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}f(null)},je=async(y,L)=>{try{L.stopPropagation(),L.preventDefault()}catch{}if(typeof y.handler=="function")try{h(!0),v(y.action),await y.handler()}catch(V){console.error(`Blocklet ${y.name} failed: `,V)}finally{h(!1),f(null)}else f(null)},it=!E&&B.isDeletableBlocklet(e)?{action:"remove",icon:pe.Remove,name:g("common.remove"),handler:T("remove",async({removeType:y})=>{y==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:R}:null,at={action:"remove",icon:({sx:y,...L})=>c.jsx(pe.Cancel,{sx:{...y,paddingRight:"2px",zoom:.95},...L}),name:g("common.cancel"),handler:T("cancelDownload",u.api.cancelDownloadBlocklet,!0)},ct=B.getAppMissingConfigs(e);let ie=[{action:"start",icon:pe.Start,name:g("common.start"),handler:T("start",u.api.startBlocklet),disabled:C||e.children.every(y=>y.status==="running")||Ne(e.status)||w||R},{action:"stop",icon:pe.Stop,name:g("common.stop"),handler:T("stop",u.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:pe.Restart,name:g("common.restart"),handler:T("restart",u.api.restartBlocklet,!0),disabled:C||e.status!=="running"},Ne(e.status)?at:it,{separator:!0},E?null:{onlyInMenu:!0,action:"overview",icon:pe.Overview,name:g("common.overview"),handler:()=>{l(`/blocklets/${e.meta.did}/overview`)},disabled:Ne(e.status)}].filter(Boolean);return S===ai&&(ie=ie.filter(y=>y.onlyInMenu)),r==="menu"?c.jsxs(Nn,{"data-cy":"blocklet-actions",children:[c.jsx(Ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:M,size:"small",disabled:!o||!Ne(e.status)&&b,children:c.jsx(ss,{})}),c.jsxs(vo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:ne,onClose:be,PaperProps:{},children:[ct.length>0&&c.jsxs(ur,{style:{maxWidth:"400px"},severity:"error",children:[g("blocklet.config.missingRequired"),c.jsx("br",{}),c.jsx(Bt,{to:`/blocklets/${e.meta.did}/components`,children:g("blocklet.config.gotoFix")})]}),ie.map((y,L)=>y.separator?c.jsx(yt,{},`separator-${L}`):c.jsxs(yo,{dense:!0,onClick:V=>je(y,V),disabled:b||y.disabled,"data-cy":`${y.action}-blocklet`,children:[c.jsx(ls,{style:{minWidth:24},children:p===y.action&&b?c.jsx(te,{size:16,sx:{marginRight:1}}):c.jsx(y.icon,{fontSize:"small"})}),c.jsx(dr,{primary:y.name})]},y.name))]}),j&&c.jsx(Tn,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})]}):c.jsxs(Nn,{"data-cy":"blocklet-actions",...a,children:[c.jsx(us,{children:ie.filter(y=>!y.separator&&!y.onlyInMenu).map(y=>c.jsxs(he,{title:y.name,"data-cy":`${y.action}-blocklet`,onClick:()=>je(y),disabled:!!y.disabled||b,children:[p===y.action&&b?c.jsx(te,{size:16,sx:{marginRight:1}}):c.jsx(y.icon,{}),c.jsx("span",{className:"blocklet-action-text",children:y.name})]},y.name))}),j&&c.jsx(Tn,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})]})}Zt.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};Zt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Nn=Ze.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-jW78KQ6d.js","assets/index-CaLGv6xG.js","assets/index-D8NuaJ66.css","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/index-B22_1WOD.js","assets/index-D-GkMvG_.js","assets/did-address-TSZ5XRBj.js","assets/Link-BzeSWqDp.js","assets/domain-list-A5SqLbLS.js","assets/Add-DV9cHTiI.js","assets/ExpandMore-DpLFPsWa.js","assets/LockIcon-Cx_TySkG.js","assets/index-B5Pm_bPi.js","assets/permission-BK9x4qjQ.js","assets/useAsync-PE3W-DLW.js","assets/session-AqfK0jLG.js","assets/confirm-BWW215hi.js","assets/format-error-DQS9AwZv.js","assets/Alert-BriK3hjA.js","assets/useSlot-BrU8y60n.js","assets/useSetState-DEVLe2Fz.js","assets/use-mobile-BLqjm-5m.js","assets/InfoOutlined-DEt-KJ8v.js","assets/OpenInNew-Ba4HupG6.js","assets/index-CFQwbx1S.js","assets/api-DJ1sjN9o.js","assets/util-yXMDVjHb.js","assets/TextField-BYelVRF_.js","assets/FormControl-Dq6XW9kS.js","assets/useFormControl-DMGx-jdt.js","assets/InputLabel-DYr7To9X.js","assets/Select-CMM8MR9i.js","assets/LoadingButton-IrsPdnhT.js","assets/useThemeProps-C59Glnbx.js","assets/Delete-rvy-F0hT.js","assets/actions-Dv2KmWA_.js","assets/MoreHoriz-B_IgZ_Tw.js","assets/ListItemText-BWMpM4cA.js","assets/index-ByYl1QnH.js","assets/useLocalStorage-eP0cInBT.js","assets/MoreVert-BQD92YJp.js","assets/PlayArrow-CvyM0yMY.js","assets/ButtonGroup-BPdi_2z2.js","assets/RadioGroup-BSqtRWJR.js","assets/FormControlLabel-CQnpTkDU.js","assets/FormGroup-C8sAhYQk.js","assets/Avatar-CpQhQmV4.js","assets/fallback-Dz8ZuYD5.js","assets/index-D_u35EkG.js","assets/Toolbar-DI2YKZS2.js","assets/Hidden-c0nvbE8_.js","assets/index-ozDSMBYi.js","assets/selector-BcHp8r2b.js","assets/index--YUaVsoq.js","assets/index-MoRwjSwP.js","assets/Loop-CSmyyk97.js","assets/ViewList-DWZsPuDR.js","assets/list-header-cw9lRKSX.js","assets/Search-D_9DtKpx.js","assets/index-COZKzHiS.js","assets/FilterList-BpmYd7MC.js","assets/toPropertyKey-PLuKRk1e.js","assets/LastPage-DV14H4DC.js","assets/index-BqmsKa7O.js","assets/redux-Xix6UYN5.js","assets/index-BSHfXuRt.js","assets/resource-dialog-CMS1eEc0.js","assets/CloseOutlined-CYZb8eDz.js","assets/index-ChpB_Xok.js","assets/user-sessions-C8nlOE7U.js","assets/click-to-copy-C932KUDy.js","assets/sdk-B75CkXUw.js","assets/index-HqFqdQ4r.js","assets/shorten-label-DZ5n7VkB.js","assets/index-BJDKEH0b.js","assets/index-CndSwPzI.js","assets/EditIcon-CPgYqcwg.js","assets/Google-C3cw6Unp.js","assets/InputAdornment-Dr1oU3Hs.js","assets/index-CTFO1wAr.js","assets/iframe-CO-VEhes.js","assets/Edit-BrAk9NBL.js","assets/Done-n1c-sUsw.js","assets/logo-uploader-CHBeSau3.js","assets/ArrowDropDown-DX29Pf8V.js","assets/ChevronRight-BHXal2s_.js","assets/index.esm-DDyWFyUp.js","assets/mode-B2dWMeTO.js","assets/Launch-DSSRxyd1.js","assets/config-BqLTd80Y.js","assets/switch-control-VH3u6pwk.js","assets/Slider-Cv9IlmAx.js","assets/index-CQU16qpp.js","assets/index-VIHj0M7P.js","assets/index-foZCwT8M.css","assets/audit-logs-Dt1zBSaX.js","assets/index-BsjCwHmK.js","assets/index-D4PP6P2d.css","assets/Pagination-g_z2fX8D.js","assets/index-DCMTEGgZ.js","assets/log-DVDRYSeA.js","assets/Download-DuCZFVPl.js","assets/log-D33dFtt_.css","assets/index-D5PXuh6o.js","assets/AddBox-DjGRetT1.js","assets/Error-g7gK9Wfp.js","assets/QuestionMarkCircle-B_wELYAO.js","assets/useSlotProps-fP10cTIP.js","assets/DeleteOutline-C36lJe42.js","assets/item-DmDrPoAj.js","assets/jss-plugin-props-sort.esm-B9z92TrV.js","assets/Stepper-X4KYPIVJ.js","assets/config-navigation-1U4iVdBl.js","assets/slicedToArray-DiN6EoYj.js","assets/index-DtAm5Ed6.js","assets/index-B0wa_Sca.js","assets/Skeleton-d-rA8WB_.js","assets/index-BcFOSrVl.js","assets/use-blocklet-info-for-connect-did-spaces-DF1lby8c.js","assets/spaces-DBKeHx91.js","assets/component-BziFLYA3.js","assets/index-TTSckhl8.js","assets/toUpper-D8eon-dl.js","assets/add-component-core-CGy2QLvt.js","assets/lottie-C16LOHrZ.js","assets/index-DU7LqWjQ.js","assets/url-join-B-UX0vQK.js","assets/launch-result-message-DpNOYW9u.js","assets/Close-BtG4tyUL.js","assets/page-header-Bjl7D46v.js","assets/uniqBy-Cev3lMnU.js","assets/index-46Rvg-Bo.js","assets/connect-to-CHo6hM6n.js","assets/content-layout-BP4bsvx7.js","assets/preact.module-DJUF--8d.js","assets/add-component-core-D_j8BgsJ.css","assets/analytics-B3U8I3AQ.js","assets/LaunchOutlined-DOGa7uCZ.js","assets/notifications-DHYTuxQt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as x,aF as Yn,aG as Jn,aH as Nt,aI as W,aJ as er,aK as tr,aL as ge,aM as Pn,aN as vt,j as c,aO as nr,aP as ho,Z as B,$ as z,P as m,a0 as Ye,e as Je,aQ as ye,a2 as Mt,a9 as k,ab as Y,aR as Ne,aD as Ut,aS as vo,L as kt,aT as yt,aU as yo,n as te,a3 as he,G as $,T as G,t as J,aV as xo,aW as bo,c as Be,aX as jo,aY as xt,u as Q,aZ as wo,B as D,K as So,a_ as _o,a as He,a$ as Co,b0 as Oo,b1 as Po,b2 as Io,b3 as Eo,b4 as Ro,b5 as To,b6 as Lo,b7 as Do,b8 as rr,b9 as Ao,ba as $o,bb as No,bc as or,bd as sr,be as ir,a1 as et,bf as ar,bg as ce,bh as me,bi as Bt,bj as cr,bk as Mo,ag as qe,ak as Uo,bl as ko,bm as Bo,bn as zo,aj as Fo,bo as Vo,bp as Ho,al as Ee,bq as qo,aC as Ko,C as Ke,br as Wo,bs as Go,bt as _e,bu as lr,bv as Qo,ae as In,a8 as Xo,ac as Zo,af as Yo,ah as Jo,bw as ze,a7 as Me,bx as es,H as ts,a4 as F,by as ns,aq as rs,V as En}from"./index-CaLGv6xG.js";import{T as os}from"./index-ByYl1QnH.js";import{_ as Rn}from"./useLocalStorage-eP0cInBT.js";import{d as ss}from"./MoreVert-BQD92YJp.js";import{C as Tn}from"./confirm-BWW215hi.js";import{d as is}from"./Delete-rvy-F0hT.js";import{d as as,u as cs}from"./PlayArrow-CvyM0yMY.js";import{A as ur}from"./Alert-BriK3hjA.js";import{L as ls,a as dr}from"./ListItemText-BWMpM4cA.js";import{B as us}from"./ButtonGroup-BPdi_2z2.js";import{R as ds,a as Ln}from"./RadioGroup-BSqtRWJR.js";import{F as bt,C as fs}from"./FormControlLabel-CQnpTkDU.js";import{f as zt}from"./format-error-DQS9AwZv.js";import{A as fr}from"./Avatar-CpQhQmV4.js";import{u as ps}from"./session-AqfK0jLG.js";import{D as ms,_ as pr,P as gs}from"./permission-BK9x4qjQ.js";import{T as mr,b as hs}from"./index-D-GkMvG_.js";import{L as gr}from"./Link-BzeSWqDp.js";import{_ as hr}from"./useSetState-DEVLe2Fz.js";import{E as vs}from"./fallback-Dz8ZuYD5.js";import{u as ys}from"./index-D_u35EkG.js";import{L as xs,D as bs}from"./index-ozDSMBYi.js";const vr=e=>{const t=x.useRef({});return x.useEffect(()=>{t.current=e}),t.current};function js(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=vr({badgeContent:t,max:r});let s=n;n===!1&&t===0&&!o&&(s=!0);const{badgeContent:a,max:l=r}=s?i:e,u=a&&Number(a)>l?`${l}+`:a;return{badgeContent:a,invisible:s,max:l,displayValue:u}}function ws(e){return Jn("MuiBadge",e)}const re=Yn("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),Ss=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],ut=10,dt=4,_s=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:s={}}=e,a={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${W(n.vertical)}${W(n.horizontal)}`,`anchorOrigin${W(n.vertical)}${W(n.horizontal)}${W(o)}`,`overlap${W(o)}`,t!=="default"&&`color${W(t)}`]};return nr(a,ws,s)},Cs=Nt("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),Os=Nt("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${W(n.anchorOrigin.vertical)}${W(n.anchorOrigin.horizontal)}${W(n.overlap)}`],n.color!=="default"&&t[`color${W(n.color)}`],n.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:ut*2,lineHeight:1,padding:"0 6px",height:ut*2,borderRadius:ut,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r,o;return((r=e.vars)!=null?r:e).palette[n].main&&((o=e.vars)!=null?o:e).palette[n].contrastText}).map(n=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText}})),{props:{variant:"dot"},style:{borderRadius:dt,height:dt*2,minWidth:dt*2,padding:0}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="right"&&n.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="top"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:n})=>n.anchorOrigin.vertical==="bottom"&&n.anchorOrigin.horizontal==="left"&&n.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${re.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),yr=x.forwardRef(function(t,n){var r,o,i,s,a,l;const u=er({props:t,name:"MuiBadge"}),{anchorOrigin:d={vertical:"top",horizontal:"right"},className:f,component:p,components:v={},componentsProps:b={},children:h,overlap:j="rectangular",color:I="default",invisible:g=!1,max:_=99,badgeContent:w,slots:O,slotProps:S,showZero:R=!1,variant:C="standard"}=u,P=tr(u,Ss),{badgeContent:E,invisible:T,max:ne,displayValue:M}=js({max:_,invisible:g,badgeContent:w,showZero:R}),be=vr({anchorOrigin:d,color:I,overlap:j,variant:C,badgeContent:w}),je=T||E==null&&C!=="dot",{color:it=I,overlap:at=j,anchorOrigin:ct=d,variant:ie=C}=je?be:u,y=ie!=="dot"?M:void 0,L=ge({},u,{badgeContent:E,invisible:je,max:ne,displayValue:y,showZero:R,anchorOrigin:ct,color:it,overlap:at,variant:ie}),V=_s(L),H=(r=(o=O==null?void 0:O.root)!=null?o:v.Root)!=null?r:Cs,X=(i=(s=O==null?void 0:O.badge)!=null?s:v.Badge)!=null?i:Os,q=(a=S==null?void 0:S.root)!=null?a:b.root,N=(l=S==null?void 0:S.badge)!=null?l:b.badge,lt=Pn({elementType:H,externalSlotProps:q,externalForwardedProps:P,additionalProps:{ref:n,as:p},ownerState:L,className:vt(q==null?void 0:q.className,V.root,f)}),de=Pn({elementType:X,externalSlotProps:N,ownerState:L,className:vt(V.badge,N==null?void 0:N.className)});return c.jsxs(H,ge({},lt,{children:[h,c.jsx(X,ge({},de,{children:y}))]}))});function Ps(e){return Jn("MuiListItemAvatar",e)}Yn("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Is=["className"],Es=e=>{const{alignItems:t,classes:n}=e;return nr({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Ps,n)},Rs=Nt("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({ownerState:e})=>ge({minWidth:56,flexShrink:0},e.alignItems==="flex-start"&&{marginTop:8})),Ts=x.forwardRef(function(t,n){const r=er({props:t,name:"MuiListItemAvatar"}),{className:o}=r,i=tr(r,Is),s=x.useContext(ho),a=ge({},r,{alignItems:s.alignItems}),l=Es(a);return c.jsx(Rs,ge({className:vt(l.root,o),ownerState:a,ref:n},i))});var Ft={},Ls=z;Object.defineProperty(Ft,"__esModule",{value:!0});var xr=Ft.default=void 0,Ds=Ls(B()),As=c;xr=Ft.default=(0,Ds.default)((0,As.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Vt={},$s=z;Object.defineProperty(Vt,"__esModule",{value:!0});var br=Vt.default=void 0,Ns=$s(B()),Ms=c;br=Vt.default=(0,Ns.default)((0,Ms.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var Ht={},Us=z;Object.defineProperty(Ht,"__esModule",{value:!0});var jr=Ht.default=void 0,ks=Us(B()),Bs=c;jr=Ht.default=(0,ks.default)((0,Bs.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var qt={},zs=z;Object.defineProperty(qt,"__esModule",{value:!0});var wr=qt.default=void 0,Fs=zs(B()),Vs=c;wr=qt.default=(0,Fs.default)((0,Vs.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var Kt={},Hs=z;Object.defineProperty(Kt,"__esModule",{value:!0});var Sr=Kt.default=void 0,qs=Hs(B()),Ks=c;Sr=Kt.default=(0,qs.default)((0,Ks.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var Wt={},Ws=z;Object.defineProperty(Wt,"__esModule",{value:!0});var _r=Wt.default=void 0,Gs=Ws(B()),Qs=c;_r=Wt.default=(0,Gs.default)((0,Qs.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var Gt={},Xs=z;Object.defineProperty(Gt,"__esModule",{value:!0});var Cr=Gt.default=void 0,Zs=Xs(B()),Ys=c;Cr=Gt.default=(0,Zs.default)((0,Ys.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});var Or=Qt.default=void 0;Js(x);var Dn=c;function Js(e){return e&&e.__esModule?e:{default:e}}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?An(Object(n),!0).forEach(function(r){ei(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ei(e,t,n){return(t=ti(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ti(e){var t=ni(e,"string");return typeof t=="symbol"?t:t+""}function ni(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xt=function(t){return(0,Dn.jsx)("svg",$n($n({},t),{},{children:(0,Dn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33 8.207A11.52 11.52 0 0 1 23.504 26.34H8.496A11.52 11.52 0 0 1 9.33 8.207zM16 3.52a14.08 14.08 0 0 0-8.76 25.102c.226.18.506.278.796.278h15.928c.29 0 .57-.098.797-.278A14.08 14.08 0 0 0 16 3.52zm5.883 10.072a1.28 1.28 0 0 0-1.81-1.81l-2.205 2.205a4.124 4.124 0 1 0 1.81 1.81l2.205-2.205zm-7.447 4.073a1.564 1.564 0 1 1 3.128 0 1.564 1.564 0 0 1-3.129 0z",fill:"currentColor"})}))};Xt.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};Xt.displayName="dashboard";Or=Qt.default=Xt;var Zt={},ri=z;Object.defineProperty(Zt,"__esModule",{value:!0});var Pr=Zt.default=void 0,oi=ri(B()),si=c;Pr=Zt.default=(0,oi.default)((0,si.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const pe={Start:as,Stop:xr,Restart:br,Reload:jr,Remove:is,Config:wr,Log:Sr,Group:_r,Cancel:Cr,Dashboard:Or,Overview:Pr},ii="internal",ai="external";function Yt({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:s,...a}){const l=Je(),u=ye(),[d,f]=x.useState(null),[p,v]=x.useState(null),[b,h]=x.useState(!1),[j,I]=x.useState(null),{t:g}=x.useContext(Mt),[_]=Rn("skip-blocklet-setup",!1),{loading:w,recommendedUrl:O}=s(e),[S]=Rn("blocklet-type-filter",ii),R=k.isInProgress(e.status),[C,P]=x.useState(!1);x.useEffect(()=>{var L,V;if(!(e!=null&&e.controller))return;P(((V=(L=e==null?void 0:e.controller)==null?void 0:L.status)==null?void 0:V.value)===Y.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var H,X,q;try{const N=await u.api.getLauncherSession({input:{launcherSessionId:(H=e==null?void 0:e.controller)==null?void 0:H.launcherSessionId,launcherUrl:(X=e==null?void 0:e.controller)==null?void 0:X.launcherUrl}});if(N!=null&&N.error){console.error("get launcher session failed",N.error);return}P([$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((q=N==null?void 0:N.launcherSession)==null?void 0:q.status))}catch(N){console.error("call getLauncherSession error",N)}})()},[]);const{inService:E}=u,T=(y,L,V=!1)=>async()=>{const H=async de=>{var $e;t({action:y,blocklet:e}),h(!0),v(y);let Ae=!1;try{if(y==="remove")await L(de);else if(y==="start"){if(!k.hasRunnableComponent(e)){J.error(g("blocklet.noComponent"));return}if(!E&&!_&&!(($e=e.settings)!=null&&$e.initialized)&&e.mode!==Y.BLOCKLET_MODES.DEVELOPMENT){const Z=xo(u.info),On=new URL(O);On.searchParams.set("serverUrl",Z),window.open(On.href),n({action:y,blocklet:e});return}const ae=e.children.filter(Z=>!k.isInProgress(Z.status)&&Z.status!=="running").map(Z=>Z.meta.did),fe={did:e.meta.did,componentDids:ae};await L({input:fe})}else if(["stop","restart","reload"].includes(y)){const ae=e.children.filter(Z=>Z.status==="running").map(Z=>Z.meta.did),fe={did:e.meta.did,componentDids:ae};await L({input:fe})}else{const ae={did:e.meta.did};await L({input:ae})}y==="remove"?Ae=!0:await bo(1e3),y==="reload"&&J.success(g("blocklet.reloadSuccess")),I(null),n({action:y,blocklet:e})}catch(ae){const fe=`Blocklet ${y} failed: ${zt(ae)}`;throw n({action:y,blocklet:e,error:new Error(fe)}),new Error(fe)}finally{Ae||h(!1)}},X=()=>{h(!1),I(null)},q=k.getDisplayName(e,!0),N=e.mode===Y.BLOCKLET_MODES.DEVELOPMENT?{description:()=>c.jsx(G,{component:"div",children:c.jsx(G,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(de,Ae)=>c.jsxs(G,{component:"div",children:[c.jsx(G,{gutterBottom:!0,children:g("blocklet.action.removeApplicationDescription")}),c.jsxs(ds,{name:"removeType",value:de.removeType,onChange:$e=>Ae({...de,removeType:$e.target.value}),children:[c.jsx(bt,{value:"backup",control:c.jsx(Ln,{}),label:g("blocklet.action.removeApplicationAfterBackup")}),c.jsx(bt,{value:"complete",control:c.jsx(Ln,{}),label:g("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},lt={stop:{title:`${g("common.stop")} ${q}`,description:g("blocklet.action.stopDescription"),confirm:g("blocklet.action.confirmStop"),cancel:g("common.cancel"),onConfirm:H,onCancel:X},restart:{title:`${g("common.restart")} ${q}`,description:g("blocklet.action.restartDescription"),confirm:g("blocklet.action.confirmRestart"),cancel:g("common.cancel"),onConfirm:H,onCancel:X},remove:{title:`${g("common.remove")} ${q}`,confirm:g("blocklet.action.confirmRemove"),cancel:g("common.cancel"),onConfirm:H,onCancel:X,...N},cancelDownload:{title:`${g("common.cancel")}`,description:g("blocklet.action.cancelDownloadDescription",{name:q}),confirm:g("common.confirm"),cancel:g("common.cancel"),onConfirm:H,onCancel:X}};V?I(lt[y]):await H()},ne=!!d,M=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}f(y.currentTarget)},be=y=>{try{y.stopPropagation(),y.preventDefault()}catch{}f(null)},je=async(y,L)=>{try{L.stopPropagation(),L.preventDefault()}catch{}if(typeof y.handler=="function")try{h(!0),v(y.action),await y.handler()}catch(V){console.error(`Blocklet ${y.name} failed: `,V)}finally{h(!1),f(null)}else f(null)},it=!E&&k.isDeletableBlocklet(e)?{action:"remove",icon:pe.Remove,name:g("common.remove"),handler:T("remove",async({removeType:y})=>{y==="backup"&&await u.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await u.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:R}:null,at={action:"remove",icon:({sx:y,...L})=>c.jsx(pe.Cancel,{sx:{...y,paddingRight:"2px",zoom:.95},...L}),name:g("common.cancel"),handler:T("cancelDownload",u.api.cancelDownloadBlocklet,!0)},ct=k.getAppMissingConfigs(e);let ie=[{action:"start",icon:pe.Start,name:g("common.start"),handler:T("start",u.api.startBlocklet),disabled:C||e.children.every(y=>y.status==="running")||Ne(e.status)||w||R},{action:"stop",icon:pe.Stop,name:g("common.stop"),handler:T("stop",u.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",icon:pe.Restart,name:g("common.restart"),handler:T("restart",u.api.restartBlocklet,!0),disabled:C||e.status!=="running"},Ne(e.status)?at:it,{separator:!0},E?null:{onlyInMenu:!0,action:"overview",icon:pe.Overview,name:g("common.overview"),handler:()=>{l(`/blocklets/${e.meta.did}/overview`)},disabled:Ne(e.status)}].filter(Boolean);return S===ai&&(ie=ie.filter(y=>y.onlyInMenu)),r==="menu"?c.jsxs(Nn,{"data-cy":"blocklet-actions",children:[c.jsx(Ut,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:M,size:"small",disabled:!o||!Ne(e.status)&&b,children:c.jsx(ss,{})}),c.jsxs(vo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:ne,onClose:be,PaperProps:{},children:[ct.length>0&&c.jsxs(ur,{style:{maxWidth:"400px"},severity:"error",children:[g("blocklet.config.missingRequired"),c.jsx("br",{}),c.jsx(kt,{to:`/blocklets/${e.meta.did}/components`,children:g("blocklet.config.gotoFix")})]}),ie.map((y,L)=>y.separator?c.jsx(yt,{},`separator-${L}`):c.jsxs(yo,{dense:!0,onClick:V=>je(y,V),disabled:b||y.disabled,"data-cy":`${y.action}-blocklet`,children:[c.jsx(ls,{style:{minWidth:24},children:p===y.action&&b?c.jsx(te,{size:16,sx:{marginRight:1}}):c.jsx(y.icon,{fontSize:"small"})}),c.jsx(dr,{primary:y.name})]},y.name))]}),j&&c.jsx(Tn,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})]}):c.jsxs(Nn,{"data-cy":"blocklet-actions",...a,children:[c.jsx(us,{children:ie.filter(y=>!y.separator&&!y.onlyInMenu).map(y=>c.jsxs(he,{title:y.name,"data-cy":`${y.action}-blocklet`,onClick:()=>je(y),disabled:!!y.disabled||b,children:[p===y.action&&b?c.jsx(te,{size:16,sx:{marginRight:1}}):c.jsx(y.icon,{}),c.jsx("span",{className:"blocklet-action-text",children:y.name})]},y.name))}),j&&c.jsx(Tn,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})]})}Yt.propTypes={getComponentUrl:m.func,blocklet:m.object.isRequired,onStart:m.func.isRequired,onComplete:m.func.isRequired,variant:m.oneOf(["menu","group"]),hasPermission:m.bool,useBlockletUrlEvaluation:m.func};Yt.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Nn=Ye.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import{r as x,aE as Zn,aF as Jn,aG as Nt,aH as K,aI as er,aJ as tr,aK as ge,aL a
|
|
|
9
9
|
font-size: 10px;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`,ft=(e,t)=>{var r;let n="?v=";return t?n+=jo(t):n+=`${(r=e==null?void 0:e.meta)==null?void 0:r.version}${xt(e==null?void 0:e.status)?"~":""}`,n};function ci({blocklet:e}){var u,d,f,p;const{inService:t}=ye(),n=(u=((e==null?void 0:e.environments)||[]).find(v=>v.key===
|
|
12
|
+
`,ft=(e,t)=>{var r;let n="?v=";return t?n+=jo(t):n+=`${(r=e==null?void 0:e.meta)==null?void 0:r.version}${xt(e==null?void 0:e.status)?"~":""}`,n};function ci({blocklet:e}){var u,d,f,p;const{inService:t}=ye(),n=(u=((e==null?void 0:e.environments)||[]).find(v=>v.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:u.value,r=(d=((e==null?void 0:e.environments)||[]).find(v=>v.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:d.value,o=(f=((e==null?void 0:e.environments)||[]).find(v=>v.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_FAVICON))==null?void 0:f.value,i=((p=window.env)==null?void 0:p.apiPrefix)||"/",s=`${Be(i,`/blocklet/logo/${t?"":e.meta.did}`)}${ft(e,n)}`,a=`${Be(i,`/blocklet/logo-rect/${t?"":e.meta.did}`)}${ft(e,r)}`,l=`${Be(i,`/blocklet/logo-favicon/${t?"":e.meta.did}`)}${ft(e,o)}`;return{logoUrl:s,rectLogoUrl:a,faviconUrl:l}}function Jt({blocklet:e,style:t,size:n,...r}){const{logoUrl:o}=ci({blocklet:e}),{variant:i}=r;return c.jsx(fr,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:n,height:n,borderRadius:10},t),...r,children:c.jsx("img",{src:o,alt:"",style:{width:n}})})}Jt.propTypes={blocklet:m.object.isRequired,style:m.object,size:m.oneOfType([m.number,m.string])};Jt.defaultProps={style:{},size:40};const li=e=>{const t={};let n=null;return k.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=k.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},ui=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const a=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!a)return o;const l=a[0],d=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(f=>f.value).filter(Boolean).find(f=>f.endsWith($.DEFAULT_DID_DOMAIN))||"").replace(`.${$.DEFAULT_DID_DOMAIN}`,"");return d?o.replace(r,`${d}-${l}.${$.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Ir(){const{t:e}=Q(),{api:t}=ps(),{blocklet:n}=wo(),{inService:r}=ye(),[o,i]=x.useState(!1),[s,a]=x.useState(5),l=n&&n.structVersion!==$.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){J.error(e("blocklet.migrate.tip.running"));return}const p=li(n);if(p){J.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){J.error(zt(p))}},d=()=>{const p=ui(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),a(5),setInterval(()=>{a(v=>v-1)},1e3)},f=()=>i(!1);return[l&&c.jsxs(ur,{severity:"warning",style:{margin:"12px 0"},children:[c.jsxs(D,{display:"flex",alignItems:"center",children:[c.jsx(he,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),c.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>c.jsx(D,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&c.jsx(So,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:_o(n,!0),title:k.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:f},"connect")]}Ir.propTypes={};function en({children:e,style:t,...n}){return c.jsx(mr,{style:t,...n,children:e})}en.propTypes={children:m.any.isRequired,style:m.object};en.defaultProps={style:{}};const U={yellow:"#FFCF71",grey:"#888888"};function tn({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:s}=x.useContext(Mt),a={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},l={added:U.grey,waiting:U.yellow,downloading:U.yellow,extracting:U.yellow,downloaded:U.grey,installing:U.yellow,installed:U.grey,starting:U.yellow,running:"success",stopping:U.yellow,stopped:U.grey,error:"error",upgrading:U.yellow,restarting:U.yellow,corrupted:"error",deleting:U.yellow,resource:"primary"},u=k.isInProgress(t),d=e&&t==="stopped"?"resource":t,f=s(`blocklet.status.${d}`);return n==="dot"?c.jsx(He,{title:s("blocklet.statusTip",{status:f}),children:c.jsx(ms,{color:l[d],...i})}):c.jsxs(en,{type:a[d],...i,children:[u&&c.jsx(te,{size:12,color:"inherit",style:{marginRight:5}}),f,d==="downloading"&&o?c.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}tn.propTypes={status:m.string.isRequired,variant:m.oneOf(["dot","tag"]),source:m.string,progress:m.number,isResource:m.bool};tn.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};var di=Co,fi=Io,pi=Eo,mi=Oo,gi=Po,hi=Ro,vi=200;function yi(e,t,n,r){var o=-1,i=fi,s=!0,a=e.length,l=[],u=t.length;if(!a)return l;n&&(t=mi(t,gi(n))),r?(i=pi,s=!1):t.length>=vi&&(i=hi,s=!1,t=new di(t));e:for(;++o<a;){var d=e[o],f=n==null?d:n(d);if(d=r||d!==0?d:0,s&&f===f){for(var p=u;p--;)if(t[p]===f)continue e;l.push(d)}else i(t,f,r)||l.push(d)}return l}var xi=yi,bi=xi,ji=To,Mn=Lo;function wi(e,t,n){var r=e.length;if(r<2)return r?Mn(e[0]):[];for(var o=-1,i=Array(r);++o<r;)for(var s=e[o],a=-1;++a<r;)a!=o&&(i[o]=bi(i[o]||s,e[a],t,n));return Mn(ji(i,1),t,n)}var Si=wi,_i=Ao,Ci=Do,Oi=Si,Pi=No,Ii=$o,Ei=Ci(function(e){var t=Ii(e);return t=typeof t=="function"?t:void 0,Oi(_i(e,Pi),void 0,t)}),Ri=Ei;const Ti=rr(Ri),Er=x.createContext({});function nn({children:e,type:t}){const[n,r]=x.useState([]),o=x.useRef([]),i=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},s=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},a=l=>{const u=n.filter(f=>l.find(p=>p===f));Ti(u,n).forEach(f=>s(f))};return c.jsx(Er.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:s,matchDeletingDid:a},children:e})}nn.propTypes={type:m.string,children:m.node.isRequired};nn.defaultProps={type:"blocklets"};function Al(){return x.useContext(Er)}function A(e,t,n){return or.call(t,"css")?c.jsx(sr,ir(e,t),n):c.jsx(e,t,n)}function pt(e,t,n){return or.call(t,"css")?c.jsxs(sr,ir(e,t),n):c.jsxs(e,t,n)}/**
|
|
13
13
|
* (c) Iconify
|
|
14
14
|
*
|
|
15
15
|
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
@@ -19,7 +19,7 @@ import{r as x,aE as Zn,aF as Jn,aG as Nt,aH as K,aI as er,aJ as tr,aK as ge,aL a
|
|
|
19
19
|
*
|
|
20
20
|
* @license MIT
|
|
21
21
|
* @version 3.1.1
|
|
22
|
-
*/const Rr=Object.freeze({left:0,top:0,width:16,height:16}),Ke=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Re=Object.freeze({...Rr,...Ke}),jt=Object.freeze({...Re,body:"",hidden:!1});function Li(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Un(e,t){const n=Li(e,t);for(const r in jt)r in Ke?r in e&&!(r in n)&&(n[r]=Ke[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Di(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=r[s]&&r[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function Ai(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=Un(r[a]||o[a],i)}return s(t),n.forEach(s),Un(e,i)}function $i(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=Di(e);for(const o in r){const i=r[o];i&&(t(o,Ai(e,o,i)),n.push(o))}return n}const Ce=/^[a-z0-9]+(-[a-z0-9]+)*$/,xe=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:a};return t&&!Fe(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Fe(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!Fe(a,n)?null:a}return null},Fe=(e,t)=>e?!!((e.provider===""||e.provider.match(Ce))&&(t&&e.prefix===""||e.prefix.match(Ce))&&e.name.match(Ce)):!1,Ni={provider:"",aliases:{},not_found:{},...Rr};function mt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Mi(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!mt(e,Ni))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Ce)||typeof i.body!="string"||!mt(i,jt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],s=i.parent;if(!o.match(Ce)||typeof s!="string"||!n[s]&&!r[s]||!mt(i,jt))return null}return t}const Ge=Object.create(null);function Ui(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ee(e,t){const n=Ge[e]||(Ge[e]=Object.create(null));return n[t]||(n[t]=Ui(e,t))}function rn(e,t){return Mi(t)?$i(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Bi(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function ki(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ge)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ge[o]||{})).forEach(s=>{const a=ee(o,s);n=n.concat(Object.keys(a.icons).map(l=>(o!==""?"@"+o+":":"")+s+":"+l))})}),n}let on=!1;function zi(e){return on}function Te(e){const t=typeof e=="string"?xe(e,!0,on):e;if(t){const n=ee(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Fi(e,t){const n=xe(e,!0,on);if(!n)return!1;const r=ee(n.provider,n.prefix);return Bi(r,n.name,t)}function Tr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Fe({provider:t,prefix:n,name:"a"}))return!1;const r=ee(t,n);return!!rn(r,e)}function Vi(e){return!!Te(e)}function Hi(e){const t=Te(e);return t?{...Re,...t}:null}const Lr=Object.freeze({width:null,height:null}),Dr=Object.freeze({...Lr,...Ke}),qi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Wi=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function wt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(qi);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Wi.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}const Ki=e=>e==="unset"||e==="undefined"||e==="none";function tt(e,t){const n={...Re,...e},r={...Dr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(b=>{const h=[],j=b.hFlip,I=b.vFlip;let g=b.rotate;j?I?g+=2:(h.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),h.push("scale(-1 1)"),o.top=o.left=0):I&&(h.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),h.push("scale(1 -1)"),o.top=o.left=0);let _;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:_=o.height/2+o.top,h.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:h.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,h.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}g%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),h.length&&(i='<g transform="'+h.join(" ")+'">'+i+"</g>")});const s=r.width,a=r.height,l=o.width,u=o.height;let d,f;s===null?(f=a===null?"1em":a==="auto"?u:a,d=wt(f,l/u)):(d=s==="auto"?l:s,f=a===null?wt(d,u/l):a==="auto"?u:a);const p={},v=(b,h)=>{Ki(h)||(p[b]=h.toString())};return v("width",d),v("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const Gi=/\sid="(\S+)"/g,Qi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Xi=0;function Ar(e,t=Qi){const n=[];let r;for(;r=Gi.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const s=typeof t=="function"?t(i):t+(Xi++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const le={local:!0,session:!0},$r={local:new Set,session:new Set};let sn=!1;function Yi(e){sn=e}const Bn="iconify2",Ie="iconify",Nr=Ie+"-count",kn=Ie+"-version",Mr=36e5,Zi=168;function St(e,t){try{return e.getItem(t)}catch{}}function an(e,t,n){try{return e.setItem(t,n),!0}catch{}}function zn(e,t){try{e.removeItem(t)}catch{}}function _t(e,t){return an(e,Nr,t.toString())}function Ct(e){return parseInt(St(e,Nr))||0}let Ue=typeof window>"u"?{}:window;function Ur(e){const t=e+"Storage";try{if(Ue&&Ue[t]&&typeof Ue[t].length=="number")return Ue[t]}catch{}le[e]=!1}function Br(e,t){const n=Ur(e);if(!n)return;const r=St(n,kn);if(r!==Bn){if(r){const a=Ct(n);for(let l=0;l<a;l++)zn(n,Ie+l.toString())}an(n,kn,Bn),_t(n,0);return}const o=Math.floor(Date.now()/Mr)-Zi,i=a=>{const l=Ie+a.toString(),u=St(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,a))return!0}catch{}zn(n,l)}};let s=Ct(n);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,_t(n,s)):$r[e].add(a))}function kr(){if(!sn){Yi(!0);for(const e in le)Br(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=ee(r,o);if(!rn(i,n).length)return!1;const s=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function zr(e,t){switch(e){case"local":case"session":le[e]=t;break;case"all":for(const n in le)le[n]=t;break}}const Ot=Object.create(null);function Fr(e,t){Ot[e]=t}function Pt(e){return Ot[e]||Ot[""]}function cn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const nt=Object.create(null),we=["https://api.simplesvg.com","https://api.unisvg.com"],Ve=[];for(;we.length>0;)we.length===1||Math.random()>.5?Ve.push(we.shift()):Ve.push(we.pop());nt[""]=cn({resources:["https://api.iconify.design"].concat(Ve)});function Vr(e,t){const n=cn(t);return n===null?!1:(nt[e]=n,!0)}function rt(e){return nt[e]}function Ji(){return Object.keys(nt)}const ea=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Qe=ea();function ta(e){Qe=e}function na(){return Qe}function ra(e,t){const n=rt(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function oa(e){return e===404}const sa=(e,t,n)=>{const r=[],o=ra(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function ia(e){if(typeof e=="string"){const t=rt(e);if(t)return t.path}return"/"}const aa=(e,t,n)=>{if(!Qe){n("abort",424);return}let r=ia(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;Qe(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(oa(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},ca={prepare:sa,send:aa};function la(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,a=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[s]||(l[s]=ee(i,s));let d;a in u.icons?d=t.loaded:s===""||u.missing.has(a)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:a};d.push(f)}),t}function Hr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function ua(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Hr([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let da=0;function fa(e,t,n){const r=da++,o=Hr.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function pa(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?xe(o,t,n):o;i&&r.push(i)}),r}var ma={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ga(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const R=Math.floor(Math.random()*S.length);s.push(S[R]),S=S.slice(0,R).concat(S.slice(R+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,d,f=null,p=[],v=[];typeof r=="function"&&v.push(r);function b(){f&&(clearTimeout(f),f=null)}function h(){l==="pending"&&(l="aborted"),b(),p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function j(S,R){R&&(v=[]),typeof S=="function"&&v.push(S)}function I(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:j,abort:h}}function g(){l="failed",v.forEach(S=>{S(void 0,d)})}function _(){p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function w(S,R,C){const P=R!=="success";switch(p=p.filter(E=>E!==S),l){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(R==="abort"){d=C,g();return}if(P){d=C,p.length||(s.length?O():g());return}if(b(),_(),!e.random){const E=e.resources.indexOf(S.resource);E!==-1&&E!==e.index&&(e.index=E)}l="completed",v.forEach(E=>{E(C)})}function O(){if(l!=="pending")return;b();const S=s.shift();if(S===void 0){if(p.length){f=setTimeout(()=>{b(),l==="pending"&&(_(),g())},e.timeout);return}g();return}const R={status:"pending",resource:S,callback:(C,P)=>{w(R,C,P)}};p.push(R),u++,f=setTimeout(O,e.rotate),n(S,t,R.callback)}return setTimeout(O),I}function qr(e){const t={...ma,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,l,u){const d=ga(t,a,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(a){return n.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Fn(){}const gt=Object.create(null);function ha(e){if(!gt[e]){const t=rt(e);if(!t)return;const n=qr(t),r={config:t,redundancy:n};gt[e]=r}return gt[e]}function Wr(e,t,n){let r,o;if(typeof e=="string"){const i=Pt(e);if(!i)return n(void 0,424),Fn;o=i.send;const s=ha(e);s&&(r=s.redundancy)}else{const i=cn(e);if(i){r=qr(i);const s=e.resources?e.resources[0]:"",a=Pt(s);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Fn):r.query(t,o,n)().abort}function va(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in le)Br(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function ya(e,t){sn||kr();function n(r){let o;if(!le[r]||!(o=Ur(r)))return;const i=$r[r];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=Ct(o),!_t(o,s+1))return;const a={cached:Math.floor(Date.now()/Mr),provider:e.provider,data:t};return an(o,Ie+s.toString(),JSON.stringify(a))}t.lastModified&&!va(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Vn(){}function xa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ua(e)}))}function ba(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=Pt(n)))return;i.prepare(n,r,o).forEach(a=>{Wr(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{e.missing.add(u)});else try{const u=rn(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),ya(e,l)}catch(u){console.error(u)}xa(e)})})}))}const ja=e=>{const n=ee(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},ln=(e,t)=>{const n=pa(e,!0,zi()),r=la(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Vn)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===a&&u===s)return;s=u,a=d,i.push(ee(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=ee(u,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(f)||(v.add(f),o[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&ba(l,o[u][d])}),t?fa(t,r,i):Vn},wa=e=>new Promise((t,n)=>{const r=typeof e=="string"?xe(e,!0):e;if(!r){n(e);return}ln([r||e],o=>{if(o.length&&r){const i=Te(r);if(i){t({...Re,...i});return}}n(e)})});function Kr(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Lr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ot={...Dr,inline:!1},ht="iconify",It="iconify-inline",se="iconifyData"+Date.now();let ue=[];function Le(e){for(let t=0;t<ue.length;t++){const n=ue[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Gr(e,t=!1){let n=Le(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ue.push(n),n)}function Sa(){if(document.documentElement)return Gr(document.documentElement);ue.push({node:()=>document.documentElement})}function _a(e){ue=ue.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function De(){return ue}function Ca(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Oe=null;const Oa={childList:!0,subtree:!0,attributes:!0};function Qr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Oe&&Oe(e)}))}function Pa(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[se]!==void 0){n.paused||Qr(e);return}}}function Xr(e,t){e.observer.instance.observe(t,Oa)}function Xe(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Pa.bind(null,e)),Xr(e,n),t.paused||Qr(e))}function Hn(){De().forEach(Xe)}function Yr(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ia(e){const t=Oe!==null;if(Oe!==e&&(Oe=e,t&&De().forEach(Yr)),t){Hn();return}Ca(Hn)}function Et(e){(e?[e]:De()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Ea(e){if(e){const t=Le(e);t&&Et(t)}else Et()}function Rt(e){(e?[e]:De()).forEach(t=>{if(!t.observer){Xe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?Xr(t,r):Xe(t);else return}})}function Ra(e){if(e){const t=Le(e);t&&Rt(t)}else Rt()}function Zr(e,t=!1){const n=Gr(e,t);return Xe(n),n}function Jr(e){const t=Le(e);t&&(Yr(t),_a(e))}function Ta(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ot)if(n[o]!==r[o])return!0;return!1}function La(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const Da=/[\s,]+/;function Aa(e,t){t.split(Da).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $a=["width","height"],Na=["inline","hFlip","vFlip"];function Ma(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Ua(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&xe(t,!0);if(!n)return null;const r={...ot,inline:e.classList&&e.classList.contains(It)};$a.forEach(a=>{const l=e.getAttribute("data-"+a);l&&(r[a]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=La(o));const i=e.getAttribute("data-flip");typeof i=="string"&&Aa(r,i),Na.forEach(a=>{const l="data-"+a,u=Ma(e.getAttribute(l),l);typeof u=="boolean"&&(r[a]=u)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:s}}const Ba="svg."+ht+", i."+ht+", span."+ht+", i."+It+", span."+It;function ka(e){const t=[];return e.querySelectorAll(Ba).forEach(n=>{const r=n[se]||n.tagName.toLowerCase()!=="svg"?Ua(n):null;r&&t.push({node:n,props:r})}),t}function eo(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Pe;function za(){try{Pe=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Pe=null}}function Fa(e){return Pe===void 0&&za(),Pe?Pe.createHTML(e):e}function to(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function no(e,t,n,r){const o=e.classList;if(r){const s=r.classList;Array.from(s).forEach(a=>{o.add(a)})}const i=[];return t.forEach(s=>{o.contains(s)?n.has(s)&&i.push(s):(o.add(s),i.push(s))}),n.forEach(s=>{t.has(s)||o.remove(s)}),i}function ro(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function oo(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=tt(n,o),s=e[se],a=eo(Ar(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=Fa(a);const l=r.childNodes[0],u=e.attributes;for(let b=0;b<u.length;b++){const h=u.item(b),j=h.name;j!=="class"&&!l.hasAttribute(j)&&l.setAttribute(j,h.value)}const d=to(t.icon),f=no(l,d,new Set(s&&s.addedClasses),e),p=ro(l,o.inline?{"vertical-align":"-0.125em"}:{},s&&s.addedStyles),v={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[se]=v,e.parentNode&&e.parentNode.replaceChild(l,e),l}function Va(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ha(e){return"data:image/svg+xml,"+Va(e)}function qa(e){return'url("'+Ha(e)+'")'}const Wa={display:"inline-block"},Tt={"background-color":"currentColor"},so={"background-color":"transparent"},qn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Wn={"-webkit-mask":Tt,mask:Tt,background:so};for(const e in Wn){const t=Wn[e];for(const n in qn)t[e+"-"+n]=qn[n]}function Kn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Ka(e,t,n,r){const o=t.customisations,i=tt(n,o),s=i.attributes,a=e[se],l=eo(i.body,{...s,width:n.width+"",height:n.height+""}),u=to(t.icon),d=no(e,u,new Set(a&&a.addedClasses)),p={"--svg":qa(l),width:Kn(s.width),height:Kn(s.height),...Wa,...r?Tt:so};o.inline&&(p["vertical-align"]="-0.125em");const v=ro(e,p,a&&a.addedStyles),b={...t,status:"loaded",addedClasses:d,addedStyles:v};return e[se]=b,e}let Be=!1;function Ga(){Be||(Be=!0,setTimeout(()=>{Be&&(Be=!1,ve())}))}function ve(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:s,prefix:a,name:l}=o,u=ee(s,a),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!ja(o)){const f=n[s]||(n[s]=Object.create(null));(f[a]||(f[a]=new Set)).add(l)}return{status:"loading"}}(e?[e]:De()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let s=!1,a=!1;function l(u,d,f){if(a||(a=!0,Et(o)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,v=p==="mask"||(p==="bg"?!1:p==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof v=="boolean"){Ka(u,d,{...Re,...f},v);return}}oo(u,d,f)}ka(i).forEach(({node:u,props:d})=>{const f=u[se];if(!f){const{status:v,icon:b}=r(d.icon,!0);if(b){l(u,d,b);return}s=s||v==="loading",u[se]={...d,status:v};return}let p;if(Ta(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){s=s||p.status==="loading",Object.assign(f,{...d,status:p.status});return}}else{if(f.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){f.status=p.status;return}}l(u,d,p.icon)}),o.temporary&&!s?Jr(i):t&&s?Zr(i,!0):a&&o.observer&&Rt(o)});for(const o in n){const i=n[o];for(const s in i){const a=i[s];ln(Array.from(a).map(l=>({provider:o,prefix:s,name:l})),Ga)}}}function Qa(e){const t=Le(e);t?ve(t):ve({node:e,temporary:!0},!0)}function io(e,t,n=!1){const r=Te(e);if(!r)return null;const o=xe(e),i=Kr(ot,t||{}),s=oo(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?s.outerHTML:s}function Xa(){return"3.1.1"}function Ya(e,t){return io(e,t,!1)}function Za(e,t){return io(e,t,!0)}function Ja(e,t){const n=Te(e);if(!n)return null;const r=Kr(ot,t||{});return tt(n,r)}function ec(e){e?Qa(e):ve()}if(typeof document<"u"&&typeof window<"u"){Sa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Tr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ia(ve),ve()})}function tc(e,t){zr(e,t!==!1)}function nc(e){zr(e,!0)}Fr("",ca);if(typeof document<"u"&&typeof window<"u"){kr();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;Vr(n,o)||console.error(r)}catch{console.error(r)}}}}const rc={getAPIConfig:rt,setAPIModule:Fr,sendAPIQuery:Wr,setFetch:ta,getFetch:na,listAPIProviders:Ji},oc={_api:rc,addAPIProvider:Vr,loadIcons:ln,loadIcon:wa,iconExists:Vi,getIcon:Hi,listIcons:ki,addIcon:Fi,addCollection:Tr,replaceIDs:Ar,calculateSize:wt,buildIcon:tt,getVersion:Xa,renderSVG:Ya,renderHTML:Za,renderIcon:Ja,scan:ec,observe:Zr,stopObserving:Jr,pauseObserver:Ea,resumeObserver:Ra,enableCache:tc,disableCache:nc};try{self.Iconify===void 0&&(self.Iconify=oc)}catch{}var un={},sc=z;Object.defineProperty(un,"__esModule",{value:!0});var ao=un.default=void 0,ic=sc(k()),ac=c;ao=un.default=(0,ic.default)((0,ac.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function dn({infos:e}){const{t}=Q(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
|
|
22
|
+
*/const Rr=Object.freeze({left:0,top:0,width:16,height:16}),We=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Re=Object.freeze({...Rr,...We}),jt=Object.freeze({...Re,body:"",hidden:!1});function Li(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Un(e,t){const n=Li(e,t);for(const r in jt)r in We?r in e&&!(r in n)&&(n[r]=We[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Di(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(s){if(n[s])return o[s]=[];if(!(s in o)){o[s]=null;const a=r[s]&&r[s].parent,l=a&&i(a);l&&(o[s]=[a].concat(l))}return o[s]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function Ai(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function s(a){i=Un(r[a]||o[a],i)}return s(t),n.forEach(s),Un(e,i)}function $i(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=Di(e);for(const o in r){const i=r[o];i&&(t(o,Ai(e,o,i)),n.push(o))}return n}const Ce=/^[a-z0-9]+(-[a-z0-9]+)*$/,xe=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:a};return t&&!Fe(u)?null:u}const i=o[0],s=i.split("-");if(s.length>1){const a={provider:r,prefix:s.shift(),name:s.join("-")};return t&&!Fe(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:i};return t&&!Fe(a,n)?null:a}return null},Fe=(e,t)=>e?!!((e.provider===""||e.provider.match(Ce))&&(t&&e.prefix===""||e.prefix.match(Ce))&&e.name.match(Ce)):!1,Ni={provider:"",aliases:{},not_found:{},...Rr};function mt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Mi(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!mt(e,Ni))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Ce)||typeof i.body!="string"||!mt(i,jt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],s=i.parent;if(!o.match(Ce)||typeof s!="string"||!n[s]&&!r[s]||!mt(i,jt))return null}return t}const Ge=Object.create(null);function Ui(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ee(e,t){const n=Ge[e]||(Ge[e]=Object.create(null));return n[t]||(n[t]=Ui(e,t))}function rn(e,t){return Mi(t)?$i(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ki(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function Bi(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ge)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(Ge[o]||{})).forEach(s=>{const a=ee(o,s);n=n.concat(Object.keys(a.icons).map(l=>(o!==""?"@"+o+":":"")+s+":"+l))})}),n}let on=!1;function zi(e){return on}function Te(e){const t=typeof e=="string"?xe(e,!0,on):e;if(t){const n=ee(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Fi(e,t){const n=xe(e,!0,on);if(!n)return!1;const r=ee(n.provider,n.prefix);return ki(r,n.name,t)}function Tr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Fe({provider:t,prefix:n,name:"a"}))return!1;const r=ee(t,n);return!!rn(r,e)}function Vi(e){return!!Te(e)}function Hi(e){const t=Te(e);return t?{...Re,...t}:null}const Lr=Object.freeze({width:null,height:null}),Dr=Object.freeze({...Lr,...We}),qi=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ki=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function wt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(qi);if(r===null||!r.length)return e;const o=[];let i=r.shift(),s=Ki.test(i);for(;;){if(s){const a=parseFloat(i);isNaN(a)?o.push(i):o.push(Math.ceil(a*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");s=!s}}const Wi=e=>e==="unset"||e==="undefined"||e==="none";function tt(e,t){const n={...Re,...e},r={...Dr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(b=>{const h=[],j=b.hFlip,I=b.vFlip;let g=b.rotate;j?I?g+=2:(h.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),h.push("scale(-1 1)"),o.top=o.left=0):I&&(h.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),h.push("scale(1 -1)"),o.top=o.left=0);let _;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:_=o.height/2+o.top,h.unshift("rotate(90 "+_.toString()+" "+_.toString()+")");break;case 2:h.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:_=o.width/2+o.left,h.unshift("rotate(-90 "+_.toString()+" "+_.toString()+")");break}g%2===1&&(o.left!==o.top&&(_=o.left,o.left=o.top,o.top=_),o.width!==o.height&&(_=o.width,o.width=o.height,o.height=_)),h.length&&(i='<g transform="'+h.join(" ")+'">'+i+"</g>")});const s=r.width,a=r.height,l=o.width,u=o.height;let d,f;s===null?(f=a===null?"1em":a==="auto"?u:a,d=wt(f,l/u)):(d=s==="auto"?l:s,f=a===null?wt(d,u/l):a==="auto"?u:a);const p={},v=(b,h)=>{Wi(h)||(p[b]=h.toString())};return v("width",d),v("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const Gi=/\sid="(\S+)"/g,Qi="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Xi=0;function Ar(e,t=Qi){const n=[];let r;for(;r=Gi.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const s=typeof t=="function"?t(i):t+(Xi++).toString(),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const le={local:!0,session:!0},$r={local:new Set,session:new Set};let sn=!1;function Zi(e){sn=e}const kn="iconify2",Ie="iconify",Nr=Ie+"-count",Bn=Ie+"-version",Mr=36e5,Yi=168;function St(e,t){try{return e.getItem(t)}catch{}}function an(e,t,n){try{return e.setItem(t,n),!0}catch{}}function zn(e,t){try{e.removeItem(t)}catch{}}function _t(e,t){return an(e,Nr,t.toString())}function Ct(e){return parseInt(St(e,Nr))||0}let Ue=typeof window>"u"?{}:window;function Ur(e){const t=e+"Storage";try{if(Ue&&Ue[t]&&typeof Ue[t].length=="number")return Ue[t]}catch{}le[e]=!1}function kr(e,t){const n=Ur(e);if(!n)return;const r=St(n,Bn);if(r!==kn){if(r){const a=Ct(n);for(let l=0;l<a;l++)zn(n,Ie+l.toString())}an(n,Bn,kn),_t(n,0);return}const o=Math.floor(Date.now()/Mr)-Yi,i=a=>{const l=Ie+a.toString(),u=St(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>o&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,a))return!0}catch{}zn(n,l)}};let s=Ct(n);for(let a=s-1;a>=0;a--)i(a)||(a===s-1?(s--,_t(n,s)):$r[e].add(a))}function Br(){if(!sn){Zi(!0);for(const e in le)kr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=ee(r,o);if(!rn(i,n).length)return!1;const s=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,s):s,!0})}}function zr(e,t){switch(e){case"local":case"session":le[e]=t;break;case"all":for(const n in le)le[n]=t;break}}const Ot=Object.create(null);function Fr(e,t){Ot[e]=t}function Pt(e){return Ot[e]||Ot[""]}function cn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const nt=Object.create(null),we=["https://api.simplesvg.com","https://api.unisvg.com"],Ve=[];for(;we.length>0;)we.length===1||Math.random()>.5?Ve.push(we.shift()):Ve.push(we.pop());nt[""]=cn({resources:["https://api.iconify.design"].concat(Ve)});function Vr(e,t){const n=cn(t);return n===null?!1:(nt[e]=n,!0)}function rt(e){return nt[e]}function Ji(){return Object.keys(nt)}const ea=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Qe=ea();function ta(e){Qe=e}function na(){return Qe}function ra(e,t){const n=rt(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(s=>{o=Math.max(o,s.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function oa(e){return e===404}const sa=(e,t,n)=>{const r=[],o=ra(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},a=0;return n.forEach((l,u)=>{a+=l.length+1,a>=o&&u>0&&(r.push(s),s={type:i,provider:e,prefix:t,icons:[]},a=l.length),s.icons.push(l)}),r.push(s),r};function ia(e){if(typeof e=="string"){const t=rt(e);if(t)return t.path}return"/"}const aa=(e,t,n)=>{if(!Qe){n("abort",424);return}let r=ia(t.provider);switch(t.type){case"icons":{const i=t.prefix,a=t.icons.join(","),l=new URLSearchParams({icons:a});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;Qe(e+r).then(i=>{const s=i.status;if(s!==200){setTimeout(()=>{n(oa(s)?"abort":"next",s)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},ca={prepare:sa,send:aa};function la(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,s=o.prefix,a=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[s]||(l[s]=ee(i,s));let d;a in u.icons?d=t.loaded:s===""||u.missing.has(a)?d=t.missing:d=t.pending;const f={provider:i,prefix:s,name:a};d.push(f)}),t}function Hr(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function ua(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const s=i.icons,a=s.pending.length;s.pending=s.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])s.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))s.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),s.pending.length!==a&&(n||Hr([e],i.id),i.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),i.abort))})}))}let da=0;function fa(e,t,n){const r=da++,o=Hr.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(s=>{(s.loaderCallbacks||(s.loaderCallbacks=[])).push(i)}),o}function pa(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?xe(o,t,n):o;i&&r.push(i)}),r}var ma={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ga(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let s;if(e.random){let S=e.resources.slice(0);for(s=[];S.length>1;){const R=Math.floor(Math.random()*S.length);s.push(S[R]),S=S.slice(0,R).concat(S.slice(R+1))}s=s.concat(S)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const a=Date.now();let l="pending",u=0,d,f=null,p=[],v=[];typeof r=="function"&&v.push(r);function b(){f&&(clearTimeout(f),f=null)}function h(){l==="pending"&&(l="aborted"),b(),p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function j(S,R){R&&(v=[]),typeof S=="function"&&v.push(S)}function I(){return{startTime:a,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:j,abort:h}}function g(){l="failed",v.forEach(S=>{S(void 0,d)})}function _(){p.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),p=[]}function w(S,R,C){const P=R!=="success";switch(p=p.filter(E=>E!==S),l){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(R==="abort"){d=C,g();return}if(P){d=C,p.length||(s.length?O():g());return}if(b(),_(),!e.random){const E=e.resources.indexOf(S.resource);E!==-1&&E!==e.index&&(e.index=E)}l="completed",v.forEach(E=>{E(C)})}function O(){if(l!=="pending")return;b();const S=s.shift();if(S===void 0){if(p.length){f=setTimeout(()=>{b(),l==="pending"&&(_(),g())},e.timeout);return}g();return}const R={status:"pending",resource:S,callback:(C,P)=>{w(R,C,P)}};p.push(R),u++,f=setTimeout(O,e.rotate),n(S,t,R.callback)}return setTimeout(O),I}function qr(e){const t={...ma,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,l,u){const d=ga(t,a,l,(f,p)=>{r(),u&&u(f,p)});return n.push(d),d}function i(a){return n.find(l=>a(l))||null}return{query:o,find:i,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function Fn(){}const gt=Object.create(null);function ha(e){if(!gt[e]){const t=rt(e);if(!t)return;const n=qr(t),r={config:t,redundancy:n};gt[e]=r}return gt[e]}function Kr(e,t,n){let r,o;if(typeof e=="string"){const i=Pt(e);if(!i)return n(void 0,424),Fn;o=i.send;const s=ha(e);s&&(r=s.redundancy)}else{const i=cn(e);if(i){r=qr(i);const s=e.resources?e.resources[0]:"",a=Pt(s);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Fn):r.query(t,o,n)().abort}function va(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in le)kr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function ya(e,t){sn||Br();function n(r){let o;if(!le[r]||!(o=Ur(r)))return;const i=$r[r];let s;if(i.size)i.delete(s=Array.from(i).shift());else if(s=Ct(o),!_t(o,s+1))return;const a={cached:Math.floor(Date.now()/Mr),provider:e.provider,data:t};return an(o,Ie+s.toString(),JSON.stringify(a))}t.lastModified&&!va(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Vn(){}function xa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,ua(e)}))}function ba(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=Pt(n)))return;i.prepare(n,r,o).forEach(a=>{Kr(n,a,l=>{if(typeof l!="object")a.icons.forEach(u=>{e.missing.add(u)});else try{const u=rn(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(f=>{d.delete(f)}),ya(e,l)}catch(u){console.error(u)}xa(e)})})}))}const ja=e=>{const n=ee(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},ln=(e,t)=>{const n=pa(e,!0,zi()),r=la(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Vn)}),()=>{l=!1}}const o=Object.create(null),i=[];let s,a;return r.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===a&&u===s)return;s=u,a=d,i.push(ee(u,d));const f=o[u]||(o[u]=Object.create(null));f[d]||(f[d]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:d,name:f}=l,p=ee(u,d),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(f)||(v.add(f),o[u][d].push(f))}),i.forEach(l=>{const{provider:u,prefix:d}=l;o[u][d].length&&ba(l,o[u][d])}),t?fa(t,r,i):Vn},wa=e=>new Promise((t,n)=>{const r=typeof e=="string"?xe(e,!0):e;if(!r){n(e);return}ln([r||e],o=>{if(o.length&&r){const i=Te(r);if(i){t({...Re,...i});return}}n(e)})});function Wr(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Lr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const ot={...Dr,inline:!1},ht="iconify",It="iconify-inline",se="iconifyData"+Date.now();let ue=[];function Le(e){for(let t=0;t<ue.length;t++){const n=ue[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Gr(e,t=!1){let n=Le(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ue.push(n),n)}function Sa(){if(document.documentElement)return Gr(document.documentElement);ue.push({node:()=>document.documentElement})}function _a(e){ue=ue.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function De(){return ue}function Ca(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Oe=null;const Oa={childList:!0,subtree:!0,attributes:!0};function Qr(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Oe&&Oe(e)}))}function Pa(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[se]!==void 0){n.paused||Qr(e);return}}}function Xr(e,t){e.observer.instance.observe(t,Oa)}function Xe(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Pa.bind(null,e)),Xr(e,n),t.paused||Qr(e))}function Hn(){De().forEach(Xe)}function Zr(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ia(e){const t=Oe!==null;if(Oe!==e&&(Oe=e,t&&De().forEach(Zr)),t){Hn();return}Ca(Hn)}function Et(e){(e?[e]:De()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function Ea(e){if(e){const t=Le(e);t&&Et(t)}else Et()}function Rt(e){(e?[e]:De()).forEach(t=>{if(!t.observer){Xe(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?Xr(t,r):Xe(t);else return}})}function Ra(e){if(e){const t=Le(e);t&&Rt(t)}else Rt()}function Yr(e,t=!1){const n=Gr(e,t);return Xe(n),n}function Jr(e){const t=Le(e);t&&(Zr(t),_a(e))}function Ta(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in ot)if(n[o]!==r[o])return!0;return!1}function La(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const Da=/[\s,]+/;function Aa(e,t){t.split(Da).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const $a=["width","height"],Na=["inline","hFlip","vFlip"];function Ma(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function Ua(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&xe(t,!0);if(!n)return null;const r={...ot,inline:e.classList&&e.classList.contains(It)};$a.forEach(a=>{const l=e.getAttribute("data-"+a);l&&(r[a]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=La(o));const i=e.getAttribute("data-flip");typeof i=="string"&&Aa(r,i),Na.forEach(a=>{const l="data-"+a,u=Ma(e.getAttribute(l),l);typeof u=="boolean"&&(r[a]=u)});const s=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:s}}const ka="svg."+ht+", i."+ht+", span."+ht+", i."+It+", span."+It;function Ba(e){const t=[];return e.querySelectorAll(ka).forEach(n=>{const r=n[se]||n.tagName.toLowerCase()!=="svg"?Ua(n):null;r&&t.push({node:n,props:r})}),t}function eo(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Pe;function za(){try{Pe=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Pe=null}}function Fa(e){return Pe===void 0&&za(),Pe?Pe.createHTML(e):e}function to(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function no(e,t,n,r){const o=e.classList;if(r){const s=r.classList;Array.from(s).forEach(a=>{o.add(a)})}const i=[];return t.forEach(s=>{o.contains(s)?n.has(s)&&i.push(s):(o.add(s),i.push(s))}),n.forEach(s=>{t.has(s)||o.remove(s)}),i}function ro(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function oo(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=tt(n,o),s=e[se],a=eo(Ar(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=Fa(a);const l=r.childNodes[0],u=e.attributes;for(let b=0;b<u.length;b++){const h=u.item(b),j=h.name;j!=="class"&&!l.hasAttribute(j)&&l.setAttribute(j,h.value)}const d=to(t.icon),f=no(l,d,new Set(s&&s.addedClasses),e),p=ro(l,o.inline?{"vertical-align":"-0.125em"}:{},s&&s.addedStyles),v={...t,status:"loaded",addedClasses:f,addedStyles:p};return l[se]=v,e.parentNode&&e.parentNode.replaceChild(l,e),l}function Va(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ha(e){return"data:image/svg+xml,"+Va(e)}function qa(e){return'url("'+Ha(e)+'")'}const Ka={display:"inline-block"},Tt={"background-color":"currentColor"},so={"background-color":"transparent"},qn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Kn={"-webkit-mask":Tt,mask:Tt,background:so};for(const e in Kn){const t=Kn[e];for(const n in qn)t[e+"-"+n]=qn[n]}function Wn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Wa(e,t,n,r){const o=t.customisations,i=tt(n,o),s=i.attributes,a=e[se],l=eo(i.body,{...s,width:n.width+"",height:n.height+""}),u=to(t.icon),d=no(e,u,new Set(a&&a.addedClasses)),p={"--svg":qa(l),width:Wn(s.width),height:Wn(s.height),...Ka,...r?Tt:so};o.inline&&(p["vertical-align"]="-0.125em");const v=ro(e,p,a&&a.addedStyles),b={...t,status:"loaded",addedClasses:d,addedStyles:v};return e[se]=b,e}let ke=!1;function Ga(){ke||(ke=!0,setTimeout(()=>{ke&&(ke=!1,ve())}))}function ve(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:s,prefix:a,name:l}=o,u=ee(s,a),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(i&&!ja(o)){const f=n[s]||(n[s]=Object.create(null));(f[a]||(f[a]=new Set)).add(l)}return{status:"loading"}}(e?[e]:De()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let s=!1,a=!1;function l(u,d,f){if(a||(a=!0,Et(o)),u.tagName.toUpperCase()!=="SVG"){const p=d.mode,v=p==="mask"||(p==="bg"?!1:p==="style"?f.body.indexOf("currentColor")!==-1:null);if(typeof v=="boolean"){Wa(u,d,{...Re,...f},v);return}}oo(u,d,f)}Ba(i).forEach(({node:u,props:d})=>{const f=u[se];if(!f){const{status:v,icon:b}=r(d.icon,!0);if(b){l(u,d,b);return}s=s||v==="loading",u[se]={...d,status:v};return}let p;if(Ta(f,d)){if(p=r(d.icon,f.name!==d.name),!p.icon){s=s||p.status==="loading",Object.assign(f,{...d,status:p.status});return}}else{if(f.status!=="loading")return;if(p=r(d.icon,!1),!p.icon){f.status=p.status;return}}l(u,d,p.icon)}),o.temporary&&!s?Jr(i):t&&s?Yr(i,!0):a&&o.observer&&Rt(o)});for(const o in n){const i=n[o];for(const s in i){const a=i[s];ln(Array.from(a).map(l=>({provider:o,prefix:s,name:l})),Ga)}}}function Qa(e){const t=Le(e);t?ve(t):ve({node:e,temporary:!0},!0)}function io(e,t,n=!1){const r=Te(e);if(!r)return null;const o=xe(e),i=Wr(ot,t||{}),s=oo(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?s.outerHTML:s}function Xa(){return"3.1.1"}function Za(e,t){return io(e,t,!1)}function Ya(e,t){return io(e,t,!0)}function Ja(e,t){const n=Te(e);if(!n)return null;const r=Wr(ot,t||{});return tt(n,r)}function ec(e){e?Qa(e):ve()}if(typeof document<"u"&&typeof window<"u"){Sa();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Tr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ia(ve),ve()})}function tc(e,t){zr(e,t!==!1)}function nc(e){zr(e,!0)}Fr("",ca);if(typeof document<"u"&&typeof window<"u"){Br();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;Vr(n,o)||console.error(r)}catch{console.error(r)}}}}const rc={getAPIConfig:rt,setAPIModule:Fr,sendAPIQuery:Kr,setFetch:ta,getFetch:na,listAPIProviders:Ji},oc={_api:rc,addAPIProvider:Vr,loadIcons:ln,loadIcon:wa,iconExists:Vi,getIcon:Hi,listIcons:Bi,addIcon:Fi,addCollection:Tr,replaceIDs:Ar,calculateSize:wt,buildIcon:tt,getVersion:Xa,renderSVG:Za,renderHTML:Ya,renderIcon:Ja,scan:ec,observe:Yr,stopObserving:Jr,pauseObserver:Ea,resumeObserver:Ra,enableCache:tc,disableCache:nc};try{self.Iconify===void 0&&(self.Iconify=oc)}catch{}var un={},sc=z;Object.defineProperty(un,"__esModule",{value:!0});var ao=un.default=void 0,ic=sc(B()),ac=c;ao=un.default=(0,ic.default)((0,ac.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function dn({infos:e}){const{t}=Q(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
|
|
23
23
|
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
24
24
|
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ import{r as x,aE as Zn,aF as Jn,aG as Nt,aH as K,aI as er,aJ as tr,aK as ge,aL a
|
|
|
29
29
|
${r}
|
|
30
30
|
* Page: ${window.location.href}
|
|
31
31
|
-->
|
|
32
|
-
`),A(D,{sx:{mx:{xs:0,md:2}},children:A(gr,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}dn.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};dn.defaultProps={infos:[]};var cc={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},lc={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const Lt=new Map,uc=(e,t)=>{Lt.set(e,t)},dc=(e="en_US")=>Lt.get(e)||Lt.get("en_US");var co={registerLang:uc,getLang:dc},fc=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const pc=fc,{getLang:Se}=co,mc=(e,t)=>t===1?e:`${e}s`,gc=1e-7;var hc=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const n=Se(t.locale),r=[],o=(a,l)=>{const u=Math.floor(a*10**l+gc);return(Math.round(u)/10**l).toFixed(l)},i=(a,l,u)=>{if((r.length===0||!t.colonNotation)&&a===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=n[l]||Se("en_US")[l],{short:f}=n[l]||Se("en_US")[l];let p=(u||a||"0").toString(),v,b;if(t.colonNotation){v=r.length>0?":":"",b="";const h=p.includes(".")?p.split(".")[0].length:p.length,j=r.length>0?2:1;p="0".repeat(Math.max(0,j-h))+p}else v="",t.locale==="zh_CN"?Object.values(s).filter(h=>h>0).length>1?!s.days&&!s.hours&&s.minutes&&t.compact?b=d:b=f:s.minutes?b=d:b=f:b=t.verbose?` ${mc(d,a)}`:f;r.push(v+p+b)},s=pc(e);if(i(Math.trunc(s.days/365),"year"),i(s.days%365,"day"),i(s.hours,"hour"),i(s.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(i(s.seconds,"second"),t.formatSubMilliseconds)i(s.milliseconds,"millisecond"),i(s.microseconds,"microsecond"),i(s.nanoseconds,"nanosecond");else{const a=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=a>=1?Math.round(a):Math.ceil(a),d=l?a.toFixed(l):u;i(Number.parseFloat(d,10),"millisecond",d)}else{const a=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=o(a,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");i(Number.parseFloat(d,10),"second",d)}if(r.length===0){const a=(n.millisecond||Se("en_US").millisecond).long,l=(n.millisecond||Se("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${a}`:l}`:`0${t.verbose?` ${a}s`:l}`}if(t.compact)return r[0];if(typeof t.unitCount=="number"){const a=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(a)}return t.colonNotation?r.join(""):r.join(" ")};const vc=cc,yc=lc,{registerLang:fn}=co,lo=hc;fn("en_US",vc);fn("zh_CN",yc);lo.registerLang=fn;var xc=lo;const Ye=rr(xc);var pn={},bc=z;Object.defineProperty(pn,"__esModule",{value:!0});var Dt=pn.default=void 0,jc=bc(k()),Gn=c;Dt=pn.default=(0,jc.default)([(0,Gn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Gn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function oe({children:e}){return et(n=>n.breakpoints.down("md"))?c.jsx(He,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:c.jsx(D,{sx:{display:"flex",alignItems:"center",gap:1},children:c.jsx(Dt,{fontSize:"small"})})}):c.jsxs(D,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(Dt,{fontSize:"small"}),e]})}oe.propTypes={children:m.node.isRequired};const wc="https://launcher.arcblock.io/",Sc=30*24*60*60*1e3;function mn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var O,S,R,C,P,E;const{t:i,locale:s}=Q(),a=ye(),[l,u]=hr({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),f=et(T=>T.breakpoints.down("md")),{sx:p={},...v}=o,b=f?"mobile":"desktop",h=pr(async()=>{const[T,ne]=await Promise.all([a.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),ar({launcherUrl:e||wc,nftDid:n,launcherSessionId:r,locale:s})]);if(T!=null&&T.error)throw new Error(T.error);return{launcherSession:T.launcherSession,subscriptionURL:ne}},[s]);if(h.loading)return c.jsx(ce,{label:c.jsxs(oe,{children:[!f&&i("expiration.desktop.loading"),c.jsx(te,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const j=T=>{u({popoverAnchorEl:T.currentTarget})},I=()=>{u({popoverAnchorEl:null})},g=(O=h.value)==null?void 0:O.launcherSession;let _="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((R=(S=h.value)==null?void 0:S.launcherSession)==null?void 0:R.status)&&(_="error");let w=null;if(g.expirationDate&&!g.subscription){const T=me(g.expirationDate).diff(me(),"ms");w=i(`expiration.${b}.tips.${_}`,{validity:Ye(T,{locale:kt(s),compact:!0,verbose:!0})}),T>0&&T<=Sc&&(_="warning")}return c.jsxs(c.Fragment,{children:[c.jsx(ce,{label:c.jsx(oe,{children:w||((P=(C=g==null?void 0:g.subscription)==null?void 0:C.product)==null?void 0:P.name)||i("common.subscription")}),color:_,variant:_!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:j}),c.jsx(cr,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(E=h.value)==null?void 0:E.subscriptionURL})})]})}mn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};mn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const _c=30*24*60*60*1e3,Cc="https://launcher.arcblock.io/";function gn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var S,R,C,P,E,T,ne;const{t:i,locale:s}=Q(),[a,l]=hr({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=et(M=>M.breakpoints.down("md")),f=ye(),{sx:p={},...v}=o,b=d?"mobile":"desktop",h=pr(async()=>{const[M,be]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),ar({launcherUrl:e||Cc,nftDid:n,launcherSessionId:r,locale:s})]);if(M!=null&&M.error)throw new Error(M.error);return{launcherSession:M.launcherSession,subscriptionURL:be}},[s]);if(h.loading)return c.jsx(ce,{label:c.jsxs(oe,{children:[!d&&i("expiration.desktop.loading"),c.jsx(te,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const j=(R=(S=h.value)==null?void 0:S.launcherSession)==null?void 0:R.expirationDate,I=me(j).isBefore(me()),g=me(j).diff(me(),"ms");let _="success";g<=_c&&(_="warning"),I&&(_="error");const w=M=>{l({popoverAnchorEl:M.currentTarget})},O=()=>{l({popoverAnchorEl:null})};return c.jsxs(c.Fragment,{children:[((P=(C=h.value)==null?void 0:C.launcherSession)==null?void 0:P.subscription)&&c.jsx(ce,{label:c.jsx(oe,{children:i("expiration.desktop.nextInvoice",{date:Mo(j,s)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:w}),!((T=(E=h.value)==null?void 0:E.launcherSession)!=null&&T.subscription)&&c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.tips.${_}`,{validity:Ye(g,{locale:kt(s),compact:!0,verbose:!0})})}),color:_,variant:_!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:w}),c.jsx(cr,{id:"popover-info",open:!!a.popoverAnchorEl,anchorEl:a.popoverAnchorEl,onClose:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(ne=h.value)==null?void 0:ne.subscriptionURL})})]})}gn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};gn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var hn={},Oc=z;Object.defineProperty(hn,"__esModule",{value:!0});var uo=hn.default=void 0,Pc=Oc(k()),Ic=c;uo=hn.default=(0,Pc.default)((0,Ic.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var vn={},Ec=z;Object.defineProperty(vn,"__esModule",{value:!0});var fo=vn.default=void 0,Rc=Ec(k()),Tc=c;fo=vn.default=(0,Rc.default)((0,Tc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var At=yn.default=void 0;Lc(x);var Qn=c;function Lc(e){return e&&e.__esModule?e:{default:e}}function Xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xn(Object(n),!0).forEach(function(r){Dc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dc(e,t,n){return(t=Ac(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ac(e){var t=$c(e,"string");return typeof t=="symbol"?t:t+""}function $c(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=function(t){return(0,Qn.jsx)("svg",Yn(Yn({},t),{},{children:(0,Qn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.251 2.5c-2.576-.006-4.747 2.1-4.766 4.506v5.784c0 .793-.084 1.778-.58 2.71h12.19c-.496-.932-.58-1.917-.58-2.711V7.01c-.035-2.403-2.21-4.502-4.797-4.508L9.25 2.5zM17.015 7v5.789c0 .79.1 1.562.53 2.219l.287.438c.436.664-.033 1.554-.817 1.554H2.985c-.785 0-1.255-.89-.818-1.554l.287-.438c.43-.657.53-1.428.53-2.218V7c.024-3.291 2.927-6.008 6.27-6l1.467.003c3.344.008 6.254 2.706 6.294 5.998zM11.06 18.06A1.5 1.5 0 0 0 11.5 17H13a3 3 0 0 1-6 0h1.5a1.5 1.5 0 0 0 2.56 1.06z",fill:"currentColor"})}))};xn.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};xn.displayName="notification";At=yn.default=xn;function po({status:e,...t}){const n={warning:"warning",error:"error",info:"primary"};return!e||e==="info"||e==="success"?null:c.jsx(mr,{type:n[e],style:{borderRadius:5,border:"1px solid #ccc"},...t,children:e})}po.propTypes={status:m.string.isRequired};function bn({value:e,...t}){const{t:n,locale:r}=Q();if(!e)return"-";const o={locale:kt(r),compact:!0},i=new Date(e).getTime(),s=Date.now();if(i>s){const l=Ye(i-s,o);return c.jsx(He,{title:qe(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.afterTime",{time:l})})})}const a=Ye(s-i,o);return c.jsx(He,{title:qe(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.timeAgo",{time:a})})})}bn.propTypes={value:m.any};bn.defaultProps={value:""};function Nc(e,t){const n=x.useRef(t);x.useEffect(()=>{const r=o=>n.current(o.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e])}function Mc(){window.dispatchEvent(new CustomEvent("checkUpdate"))}function $l(e){const t=Je(),{t:n}=Q(),r=()=>{const o=new URLSearchParams(window.location.search);o.get("checkUpdate")&&(o.delete("checkUpdate"),t(o.toString()),e(),J.success(n("notification.checkingForUpdates")))};x.useEffect(r,[]),Nc("checkUpdate",r)}function jn({onHide:e,api:t,notifications:n,updateNotifications:r,viewAllUrl:o,teamDid:i}){const{inService:s}=ye(),{t:a,locale:l}=x.useContext(Mt),[u,d]=x.useState(!0),[f,p]=x.useState(!1),v=Je(),b=Uo();let h=u?n:n.filter(w=>w.read===!1);h=h.slice(0,5);const j=n.filter(w=>w.read===!1).length>0,I=async()=>{p(!0);const w=n.filter(O=>O.read===!1).map(O=>O.id).join(",");s?await t.readBlockletNotifications({input:{id:w,teamDid:i}}):await t.readNotifications({input:{id:w}}),r(),p(!1)},g=(w,O)=>{O.read||(s?t.readBlockletNotifications({input:{id:O.id,teamDid:i}}).then(()=>r()):t.readNotifications({input:{id:O.id}}).then(()=>r())),e(w),v(o)},_=(w,O)=>{w.preventDefault(),w.stopPropagation(),v(O),Mc()};return c.jsxs(Uc,{children:[c.jsxs(G,{component:"h3",variant:"h6",className:"notification-header",children:[a("notification.title"),c.jsx(he,{component:Bt,to:o,"data-cy":"view-all-notifications-btn",onClick:e,children:a("notification.viewAll")})]}),c.jsx(yt,{}),c.jsxs(Bo,{className:"notification-list",style:{maxHeight:"calc(100vh - 200px)",overflow:"auto"},children:[h.length===0&&c.jsx(G,{component:"p",variant:"body1",className:"notification-tip",children:a("notification.empty")}),h.length>0&&h.map(w=>c.jsxs(xs,{alignItems:"flex-start",disabled:w.read,onClick:O=>g(O,w),children:[c.jsx(Ts,{className:"list-item-avatar",children:c.jsxs(c.Fragment,{children:[c.jsx(fr,{children:w.entityType.substr(0,1).toUpperCase()}),c.jsx(po,{className:"notification-tag",status:w.severity})]})}),c.jsx(dr,{primary:w.title,secondary:c.jsxs(D,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsx(G,{component:"span",sx:{overflow:"hidden","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",display:"-webkit-box","text-overflow":"ellipsis"},children:w.description}),c.jsxs(D,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[c.jsx(bn,{value:w.createdAt,locale:l,style:{color:b.palette.text.secondary,fontSize:"0.875rem",marginTop:"4px"}}),w.action&&!w.read?c.jsx(he,{color:"primary",variant:"outlined",onPointerDown:O=>{O.stopPropagation(),O.preventDefault()},onClick:O=>_(O,w.action),"data-cy":"check-for-updates",children:a("notification.proceed")}):null]})]})})]},w.id))]}),c.jsx(yt,{}),c.jsxs(G,{component:"div",className:"notification-footer",children:[c.jsx(bt,{control:c.jsx(fs,{checked:u,onChange:()=>d(!u),name:"showRead",color:"primary"}),label:a("notification.showRead")}),c.jsx(gs,{permission:s?"":"mutate_notification",role:s?ko:[],children:j&&c.jsxs(he,{disabled:f,onClick:I,className:"",children:[f&&c.jsx(te,{size:16,style:{marginRight:"1em"}}),a("notification.markAllAsRead")]})})]})]})}const Uc=Ze.div`
|
|
32
|
+
`),A(D,{sx:{mx:{xs:0,md:2}},children:A(gr,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}dn.propTypes={infos:m.arrayOf(m.shape({label:m.string,value:m.string}))};dn.defaultProps={infos:[]};var cc={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}},lc={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}};const Lt=new Map,uc=(e,t)=>{Lt.set(e,t)},dc=(e="en_US")=>Lt.get(e)||Lt.get("en_US");var co={registerLang:uc,getLang:dc},fc=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}};const pc=fc,{getLang:Se}=co,mc=(e,t)=>t===1?e:`${e}s`,gc=1e-7;var hc=(e,t={})=>{if(!Number.isFinite(e))throw new TypeError("Expected a finite number");t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);const n=Se(t.locale),r=[],o=(a,l)=>{const u=Math.floor(a*10**l+gc);return(Math.round(u)/10**l).toFixed(l)},i=(a,l,u)=>{if((r.length===0||!t.colonNotation)&&a===0&&!(t.colonNotation&&l==="minute"))return;const{long:d}=n[l]||Se("en_US")[l],{short:f}=n[l]||Se("en_US")[l];let p=(u||a||"0").toString(),v,b;if(t.colonNotation){v=r.length>0?":":"",b="";const h=p.includes(".")?p.split(".")[0].length:p.length,j=r.length>0?2:1;p="0".repeat(Math.max(0,j-h))+p}else v="",t.locale==="zh_CN"?Object.values(s).filter(h=>h>0).length>1?!s.days&&!s.hours&&s.minutes&&t.compact?b=d:b=f:s.minutes?b=d:b=f:b=t.verbose?` ${mc(d,a)}`:f;r.push(v+p+b)},s=pc(e);if(i(Math.trunc(s.days/365),"year"),i(s.days%365,"day"),i(s.hours,"hour"),i(s.minutes,"minute"),t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3)if(i(s.seconds,"second"),t.formatSubMilliseconds)i(s.milliseconds,"millisecond"),i(s.microseconds,"microsecond"),i(s.nanoseconds,"nanosecond");else{const a=s.milliseconds+s.microseconds/1e3+s.nanoseconds/1e6,l=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,u=a>=1?Math.round(a):Math.ceil(a),d=l?a.toFixed(l):u;i(Number.parseFloat(d,10),"millisecond",d)}else{const a=e/1e3%60,l=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,u=o(a,l),d=t.keepDecimalsOnWholeSeconds?u:u.replace(/\.0+$/,"");i(Number.parseFloat(d,10),"second",d)}if(r.length===0){const a=(n.millisecond||Se("en_US").millisecond).long,l=(n.millisecond||Se("en_US").millisecond).short;return t.locale==="zh_CN"?`0${t.verbose?`${a}`:l}`:`0${t.verbose?` ${a}s`:l}`}if(t.compact)return r[0];if(typeof t.unitCount=="number"){const a=t.colonNotation?"":" ";return r.slice(0,Math.max(t.unitCount,1)).join(a)}return t.colonNotation?r.join(""):r.join(" ")};const vc=cc,yc=lc,{registerLang:fn}=co,lo=hc;fn("en_US",vc);fn("zh_CN",yc);lo.registerLang=fn;var xc=lo;const Ze=rr(xc);var pn={},bc=z;Object.defineProperty(pn,"__esModule",{value:!0});var Dt=pn.default=void 0,jc=bc(B()),Gn=c;Dt=pn.default=(0,jc.default)([(0,Gn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Gn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function oe({children:e}){return et(n=>n.breakpoints.down("md"))?c.jsx(He,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:c.jsx(D,{sx:{display:"flex",alignItems:"center",gap:1},children:c.jsx(Dt,{fontSize:"small"})})}):c.jsxs(D,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(Dt,{fontSize:"small"}),e]})}oe.propTypes={children:m.node.isRequired};const wc="https://launcher.arcblock.io/",Sc=30*24*60*60*1e3;function mn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var O,S,R,C,P,E;const{t:i,locale:s}=Q(),a=ye(),[l,u]=hr({safeIframeRef:null,popoverAnchorEl:null}),d=x.useRef(null),f=et(T=>T.breakpoints.down("md")),{sx:p={},...v}=o,b=f?"mobile":"desktop",h=pr(async()=>{const[T,ne]=await Promise.all([a.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),ar({launcherUrl:e||wc,nftDid:n,launcherSessionId:r,locale:s})]);if(T!=null&&T.error)throw new Error(T.error);return{launcherSession:T.launcherSession,subscriptionURL:ne}},[s]);if(h.loading)return c.jsx(ce,{label:c.jsxs(oe,{children:[!f&&i("expiration.desktop.loading"),c.jsx(te,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const j=T=>{u({popoverAnchorEl:T.currentTarget})},I=()=>{u({popoverAnchorEl:null})},g=(O=h.value)==null?void 0:O.launcherSession;let _="success";[$.LAUNCH_SESSION_STATUS.overdue,$.LAUNCH_SESSION_STATUS.canceled,$.LAUNCH_SESSION_STATUS.terminated].includes((R=(S=h.value)==null?void 0:S.launcherSession)==null?void 0:R.status)&&(_="error");let w=null;if(g.expirationDate&&!g.subscription){const T=me(g.expirationDate).diff(me(),"ms");w=i(`expiration.${b}.tips.${_}`,{validity:Ze(T,{locale:Bt(s),compact:!0,verbose:!0})}),T>0&&T<=Sc&&(_="warning")}return c.jsxs(c.Fragment,{children:[c.jsx(ce,{label:c.jsx(oe,{children:w||((P=(C=g==null?void 0:g.subscription)==null?void 0:C.product)==null?void 0:P.name)||i("common.subscription")}),color:_,variant:_!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:j}),c.jsx(cr,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:d,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(E=h.value)==null?void 0:E.subscriptionURL})})]})}mn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};mn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const _c=30*24*60*60*1e3,Cc="https://launcher.arcblock.io/";function gn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var S,R,C,P,E,T,ne;const{t:i,locale:s}=Q(),[a,l]=hr({safeIframeRef:null,popoverAnchorEl:null}),u=x.useRef(null),d=et(M=>M.breakpoints.down("md")),f=ye(),{sx:p={},...v}=o,b=d?"mobile":"desktop",h=pr(async()=>{const[M,be]=await Promise.all([f.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),ar({launcherUrl:e||Cc,nftDid:n,launcherSessionId:r,locale:s})]);if(M!=null&&M.error)throw new Error(M.error);return{launcherSession:M.launcherSession,subscriptionURL:be}},[s]);if(h.loading)return c.jsx(ce,{label:c.jsxs(oe,{children:[!d&&i("expiration.desktop.loading"),c.jsx(te,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(h.error)return console.error(h.error),c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>h.retry()});const j=(R=(S=h.value)==null?void 0:S.launcherSession)==null?void 0:R.expirationDate,I=me(j).isBefore(me()),g=me(j).diff(me(),"ms");let _="success";g<=_c&&(_="warning"),I&&(_="error");const w=M=>{l({popoverAnchorEl:M.currentTarget})},O=()=>{l({popoverAnchorEl:null})};return c.jsxs(c.Fragment,{children:[((P=(C=h.value)==null?void 0:C.launcherSession)==null?void 0:P.subscription)&&c.jsx(ce,{label:c.jsx(oe,{children:i("expiration.desktop.nextInvoice",{date:Mo(j,s)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:w}),!((T=(E=h.value)==null?void 0:E.launcherSession)!=null&&T.subscription)&&c.jsx(ce,{label:c.jsx(oe,{children:i(`expiration.${b}.tips.${_}`,{validity:Ze(g,{locale:Bt(s),compact:!0,verbose:!0})})}),color:_,variant:_!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:w}),c.jsx(cr,{id:"popover-info",open:!!a.popoverAnchorEl,anchorEl:a.popoverAnchorEl,onClose:O,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:c.jsx("iframe",{ref:u,title:i("common.subscription"),width:"360px",height:"600px",style:{border:0},src:(ne=h.value)==null?void 0:ne.subscriptionURL})})]})}gn.propTypes={chainHost:m.string.isRequired,nftId:m.string,launcherSessionId:m.string,sx:m.object,retention:m.number,launcherUrl:m.string.isRequired};gn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var hn={},Oc=z;Object.defineProperty(hn,"__esModule",{value:!0});var uo=hn.default=void 0,Pc=Oc(B()),Ic=c;uo=hn.default=(0,Pc.default)((0,Ic.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var vn={},Ec=z;Object.defineProperty(vn,"__esModule",{value:!0});var fo=vn.default=void 0,Rc=Ec(B()),Tc=c;fo=vn.default=(0,Rc.default)((0,Tc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");var yn={};Object.defineProperty(yn,"__esModule",{value:!0});var At=yn.default=void 0;Lc(x);var Qn=c;function Lc(e){return e&&e.__esModule?e:{default:e}}function Xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xn(Object(n),!0).forEach(function(r){Dc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dc(e,t,n){return(t=Ac(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ac(e){var t=$c(e,"string");return typeof t=="symbol"?t:t+""}function $c(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=function(t){return(0,Qn.jsx)("svg",Zn(Zn({},t),{},{children:(0,Qn.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.251 2.5c-2.576-.006-4.747 2.1-4.766 4.506v5.784c0 .793-.084 1.778-.58 2.71h12.19c-.496-.932-.58-1.917-.58-2.711V7.01c-.035-2.403-2.21-4.502-4.797-4.508L9.25 2.5zM17.015 7v5.789c0 .79.1 1.562.53 2.219l.287.438c.436.664-.033 1.554-.817 1.554H2.985c-.785 0-1.255-.89-.818-1.554l.287-.438c.43-.657.53-1.428.53-2.218V7c.024-3.291 2.927-6.008 6.27-6l1.467.003c3.344.008 6.254 2.706 6.294 5.998zM11.06 18.06A1.5 1.5 0 0 0 11.5 17H13a3 3 0 0 1-6 0h1.5a1.5 1.5 0 0 0 2.56 1.06z",fill:"currentColor"})}))};xn.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};xn.displayName="notification";At=yn.default=xn;function po({status:e,...t}){const n={warning:"warning",error:"error",info:"primary"};return!e||e==="info"||e==="success"?null:c.jsx(mr,{type:n[e],style:{borderRadius:5,border:"1px solid #ccc"},...t,children:e})}po.propTypes={status:m.string.isRequired};function bn({value:e,...t}){const{t:n,locale:r}=Q();if(!e)return"-";const o={locale:Bt(r),compact:!0},i=new Date(e).getTime(),s=Date.now();if(i>s){const l=Ze(i-s,o);return c.jsx(He,{title:qe(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.afterTime",{time:l})})})}const a=Ze(s-i,o);return c.jsx(He,{title:qe(e,r),placement:"top-end",enterTouchDelay:0,children:c.jsx("span",{...t,children:n("common.timeAgo",{time:a})})})}bn.propTypes={value:m.any};bn.defaultProps={value:""};function Nc(e,t){const n=x.useRef(t);x.useEffect(()=>{const r=o=>n.current(o.detail);return window.addEventListener(e,r),()=>window.removeEventListener(e,r)},[e])}function Mc(){window.dispatchEvent(new CustomEvent("checkUpdate"))}function $l(e){const t=Je(),{t:n}=Q(),r=()=>{const o=new URLSearchParams(window.location.search);o.get("checkUpdate")&&(o.delete("checkUpdate"),t(o.toString()),e(),J.success(n("notification.checkingForUpdates")))};x.useEffect(r,[]),Nc("checkUpdate",r)}function jn({onHide:e,api:t,notifications:n,updateNotifications:r,viewAllUrl:o,teamDid:i}){const{inService:s}=ye(),{t:a,locale:l}=x.useContext(Mt),[u,d]=x.useState(!0),[f,p]=x.useState(!1),v=Je(),b=Uo();let h=u?n:n.filter(w=>w.read===!1);h=h.slice(0,5);const j=n.filter(w=>w.read===!1).length>0,I=async()=>{p(!0);const w=n.filter(O=>O.read===!1).map(O=>O.id).join(",");s?await t.readBlockletNotifications({input:{id:w,teamDid:i}}):await t.readNotifications({input:{id:w}}),r(),p(!1)},g=(w,O)=>{O.read||(s?t.readBlockletNotifications({input:{id:O.id,teamDid:i}}).then(()=>r()):t.readNotifications({input:{id:O.id}}).then(()=>r())),e(w),v(o)},_=(w,O)=>{w.preventDefault(),w.stopPropagation(),v(O),Mc()};return c.jsxs(Uc,{children:[c.jsxs(G,{component:"h3",variant:"h6",className:"notification-header",children:[a("notification.title"),c.jsx(he,{component:kt,to:o,"data-cy":"view-all-notifications-btn",onClick:e,children:a("notification.viewAll")})]}),c.jsx(yt,{}),c.jsxs(ko,{className:"notification-list",style:{maxHeight:"calc(100vh - 200px)",overflow:"auto"},children:[h.length===0&&c.jsx(G,{component:"p",variant:"body1",className:"notification-tip",children:a("notification.empty")}),h.length>0&&h.map(w=>c.jsxs(xs,{alignItems:"flex-start",disabled:w.read,onClick:O=>g(O,w),children:[c.jsx(Ts,{className:"list-item-avatar",children:c.jsxs(c.Fragment,{children:[c.jsx(fr,{children:w.entityType.substr(0,1).toUpperCase()}),c.jsx(po,{className:"notification-tag",status:w.severity})]})}),c.jsx(dr,{primary:w.title,secondary:c.jsxs(D,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c.jsx(G,{component:"span",sx:{overflow:"hidden","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",display:"-webkit-box","text-overflow":"ellipsis"},children:w.description}),c.jsxs(D,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[c.jsx(bn,{value:w.createdAt,locale:l,style:{color:b.palette.text.secondary,fontSize:"0.875rem",marginTop:"4px"}}),w.action&&!w.read?c.jsx(he,{color:"primary",variant:"outlined",onPointerDown:O=>{O.stopPropagation(),O.preventDefault()},onClick:O=>_(O,w.action),"data-cy":"check-for-updates",children:a("notification.proceed")}):null]})]})})]},w.id))]}),c.jsx(yt,{}),c.jsxs(G,{component:"div",className:"notification-footer",children:[c.jsx(bt,{control:c.jsx(fs,{checked:u,onChange:()=>d(!u),name:"showRead",color:"primary"}),label:a("notification.showRead")}),c.jsx(gs,{permission:s?"":"mutate_notification",role:s?Bo:[],children:j&&c.jsxs(he,{disabled:f,onClick:I,className:"",children:[f&&c.jsx(te,{size:16,style:{marginRight:"1em"}}),a("notification.markAllAsRead")]})})]})]})}const Uc=Ye.div`
|
|
33
33
|
width: 420px;
|
|
34
34
|
|
|
35
35
|
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
@@ -72,7 +72,7 @@ ${r}
|
|
|
72
72
|
background: ${e=>e.theme.palette.primary.light};
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`;jn.propTypes={onHide:m.func,api:m.shape({readNotifications:m.func.isRequired,readBlockletNotifications:m.func.isRequired}).isRequired,notifications:m.arrayOf(m.shape({id:m.string,read:m.bool,entityType:m.string,title:m.string,createdAt:m.string,description:m.string}).isRequired).isRequired,updateNotifications:m.func.isRequired,viewAllUrl:m.string.isRequired,teamDid:m.string};jn.defaultProps={onHide:()=>{},teamDid:""};function wn({api:e,notifications:t,updateNotifications:n,viewAllUrl:r,teamDid:o}){const[i,s]=x.useState(!1),a=x.useRef(null),l=()=>{s(f=>!f)},u=f=>{a.current&&a.current.contains(f.target)||s(!1)},d=t.filter(f=>f.read===!1).length;return c.jsxs("div",{className:"notification-addon",children:[c.jsx(Ut,{ref:a,"aria-controls":"notify-list-grow","aria-haspopup":"true","data-cy":"toggle-notification-btn",onClick:l,children:d>0?c.jsx(yr,{badgeContent:d,max:99,color:"primary",children:c.jsx(At,{style:{width:"auto",height:24}})}):c.jsx(At,{style:{width:"auto",height:24}})}),i&&c.jsx(zo,{open:!0,anchorEl:a.current,disablePortal:!0,placement:"bottom-end",children:c.jsx(Fo,{id:"notify-list-grow",children:c.jsx(Vo,{onClickAway:u,children:c.jsx("div",{children:c.jsx(jn,{notifications:t,updateNotifications:n,api:e,viewAllUrl:r,onHide:u,teamDid:o})})})})})]})}wn.propTypes={notifications:m.arrayOf(m.object),viewAllUrl:m.string.isRequired,api:m.object.isRequired,updateNotifications:m.func.isRequired,teamDid:m.string};wn.defaultProps={notifications:[],teamDid:""};const
|
|
75
|
+
`;jn.propTypes={onHide:m.func,api:m.shape({readNotifications:m.func.isRequired,readBlockletNotifications:m.func.isRequired}).isRequired,notifications:m.arrayOf(m.shape({id:m.string,read:m.bool,entityType:m.string,title:m.string,createdAt:m.string,description:m.string}).isRequired).isRequired,updateNotifications:m.func.isRequired,viewAllUrl:m.string.isRequired,teamDid:m.string};jn.defaultProps={onHide:()=>{},teamDid:""};function wn({api:e,notifications:t,updateNotifications:n,viewAllUrl:r,teamDid:o}){const[i,s]=x.useState(!1),a=x.useRef(null),l=()=>{s(f=>!f)},u=f=>{a.current&&a.current.contains(f.target)||s(!1)},d=t.filter(f=>f.read===!1).length;return c.jsxs("div",{className:"notification-addon",children:[c.jsx(Ut,{ref:a,"aria-controls":"notify-list-grow","aria-haspopup":"true","data-cy":"toggle-notification-btn",onClick:l,children:d>0?c.jsx(yr,{badgeContent:d,max:99,color:"primary",children:c.jsx(At,{style:{width:"auto",height:24}})}):c.jsx(At,{style:{width:"auto",height:24}})}),i&&c.jsx(zo,{open:!0,anchorEl:a.current,disablePortal:!0,placement:"bottom-end",children:c.jsx(Fo,{id:"notify-list-grow",children:c.jsx(Vo,{onClickAway:u,children:c.jsx("div",{children:c.jsx(jn,{notifications:t,updateNotifications:n,api:e,viewAllUrl:r,onHide:u,teamDid:o})})})})})]})}wn.propTypes={notifications:m.arrayOf(m.object),viewAllUrl:m.string.isRequired,api:m.object.isRequired,updateNotifications:m.func.isRequired,teamDid:m.string};wn.defaultProps={notifications:[],teamDid:""};const kc=`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/notifications`;function Sn(){const{did:e}=window.env,{api:t,data:n,refresh:r}=Ho();return c.jsx(wn,{api:t,viewAllUrl:kc,notifications:n||[],updateNotifications:r,teamDid:e})}Sn.propTypes={};Sn.defaultProps={};function Bc(){const{inFullPage:e,toggleFullPage:t}=ys();return A(Ut,{onClick:t,children:e?A(fo,{sx:{transform:"scale(1.3)"}}):A(uo,{sx:{transform:"scale(1.3)"}})})}function _n({children:e}){var h;const{t}=Q(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:s}=Ee(),{info:a}=qo(),l=Ko(),u=et(j=>j.breakpoints.down("md")),{appId:d,version:f}=i,p=[{label:"App ID",value:d},{label:"App Version",value:f},{label:"App Bundle Name",value:(h=s==null?void 0:s.meta)==null?void 0:h.bundleName},{label:"Server Id",value:a.did},{label:"Server Version",value:a.version}],v=j=>{var g,_,w,O;const I=Array.isArray(j)?j:[j];if(I.unshift(A(Sn,{})),u||I.unshift(A(Bc,{})),s){const S={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Go(s)?I.unshift(A(mn,{chainHost:(g=s==null?void 0:s.controller)==null?void 0:g.chainHost,nftId:(_=s==null?void 0:s.controller)==null?void 0:_.nftId,launcherSessionId:(w=s==null?void 0:s.controller)==null?void 0:w.launcherSessionId,launcherUrl:(O=s==null?void 0:s.controller)==null?void 0:O.launcherUrl,sx:S})):a.ownerNft&&a.launcher&&I.unshift(A(gn,{chainHost:a.launcher.chainHost,launcherUrl:a.launcher.url,nftId:a.ownerNft.did,launcherSessionId:a.ownerNft.launcherSessionId,sx:S}))}return I},b={};return u&&(b.logo=null),pt(zc,{legacy:!1,fullWidth:!0,headerAddons:v,headerProps:b,isMobile:u,footerProps:{addon:A(dn,{infos:p})},children:[!s&&n&&A(Ke,{relative:"parent",children:A(te,{})}),!s&&r&&pt(Ke,{relative:"parent",children:[pt(D,{display:"flex",alignItems:"center",children:[A(ao,{color:"error",sx:{marginRight:1}}),zt(r)]}),A(he,{onClick:()=>o(),children:A("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!s&&A(D,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:A(Wo,{FallbackComponent:vs,resetKeys:[l.pathname],children:e})})]})}_n.propTypes={children:m.any};_n.defaultProps={children:null};const zc=Ye(bs)`
|
|
76
76
|
div.dashboard-content {
|
|
77
77
|
padding: 0;
|
|
78
78
|
}
|
|
@@ -95,7 +95,7 @@ ${r}
|
|
|
95
95
|
.far {
|
|
96
96
|
line-height: ${e=>e.size}px;
|
|
97
97
|
}
|
|
98
|
-
`,Hc=mo(x.forwardRef((e,t)=>c.jsx(Cn,{...e,forwardedRef:t})),{name:"Icon",alternative:"SVG icons"}),$t={error:{icon:"exclamation-circle",color:_e.error.main,borderColor:"#e35b54",backgroundColor:"rgba(227, 91, 84, 0.2)"},warning:{icon:"exclamation-triangle",color:_e.warning.main,borderColor:"#f7d040",backgroundColor:"rgba(247, 208, 64, 0.2)"},success:{icon:"check-circle",color:_e.success.main,borderColor:"#89ddd9",backgroundColor:"rgba(137, 221, 217, 0.2)"},tip:{icon:"info-circle",color:_e.grey[500],borderColor:"#222222",backgroundColor:"#EEEEEE"}};function st(e){const t=Qo(e,st,["style"]),{type:n,children:r,style:o,className:i,variant:s,...a}=t,{icon:l,color:u,backgroundColor:d,borderColor:f}=$t[n]||$t.success,p=Object.assign({color:hs[500],backgroundColor:s==="border"?d:"transparent",borderLeft:s==="border"?`5px solid ${f}`:"none"},o);return c.jsxs(
|
|
98
|
+
`,Hc=mo(x.forwardRef((e,t)=>c.jsx(Cn,{...e,forwardedRef:t})),{name:"Icon",alternative:"SVG icons"}),$t={error:{icon:"exclamation-circle",color:_e.error.main,borderColor:"#e35b54",backgroundColor:"rgba(227, 91, 84, 0.2)"},warning:{icon:"exclamation-triangle",color:_e.warning.main,borderColor:"#f7d040",backgroundColor:"rgba(247, 208, 64, 0.2)"},success:{icon:"check-circle",color:_e.success.main,borderColor:"#89ddd9",backgroundColor:"rgba(137, 221, 217, 0.2)"},tip:{icon:"info-circle",color:_e.grey[500],borderColor:"#222222",backgroundColor:"#EEEEEE"}};function st(e){const t=Qo(e,st,["style"]),{type:n,children:r,style:o,className:i,variant:s,...a}=t,{icon:l,color:u,backgroundColor:d,borderColor:f}=$t[n]||$t.success,p=Object.assign({color:hs[500],backgroundColor:s==="border"?d:"transparent",borderLeft:s==="border"?`5px solid ${f}`:"none"},o);return c.jsxs(Kc,{...a,className:`alert alert--${n} alert--${s} ${i}`.trim(),style:p,children:[s==="icon"&&c.jsx(Hc,{className:"alert-icon",name:l,size:24,style:{color:u}}),c.jsx(G,{component:"div",className:"alert-content",children:r})]})}st.propTypes={type:m.oneOf(Object.keys($t)),children:m.any.isRequired,className:m.string,style:m.oneOfType([m.object,m.string]),variant:m.oneOf(["border","icon"])};st.defaultProps={type:"tip",className:"",style:"{}",variant:"border"};const qc=mo(st,{name:"Alert",alternative:"@mui/material/Alert"}),Kc=lr("div")`
|
|
99
99
|
display: flex;
|
|
100
100
|
align-items: center;
|
|
101
101
|
font-size: 16px;
|
|
@@ -116,7 +116,7 @@ ${r}
|
|
|
116
116
|
display: flex;
|
|
117
117
|
flex-direction: column;
|
|
118
118
|
}
|
|
119
|
-
`;function
|
|
119
|
+
`;function Wc(){const{t:e,locale:t}=Q(),{blocklet:n,launcherSession:r}=Ee(),[o,i]=cs({subscriptionURL:"#"});if(x.useEffect(()=>{var l,u;In(n,r)&&Xo({launcherSessionId:(l=n==null?void 0:n.controller)==null?void 0:l.launcherSessionId,launcherUrl:(u=n==null?void 0:n.controller)==null?void 0:u.launcherUrl,locale:t}).then(d=>{i({subscriptionURL:d})}).catch(d=>{console.error("get subscription url error:",d)})},[n,r]),!n||!r||!Zo(n)||r.status===$.LAUNCH_SESSION_STATUS.installed)return"";let s=null,a="";return In(n,r)?(s=c.jsx(gr,{href:o.subscriptionURL,children:e("blocklet.manageSubscription")}),a=e("blocklet.suspendedCausedByExpired",{deadline:qe(r==null?void 0:r.reservedUntil,t)})):Yo(n,r)&&(s=c.jsx(kt,{to:Be($.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/storage"),children:e("common.backup")}),a=e("blocklet.suspendedCausedByTerminated",{canceledAt:qe(r==null?void 0:r.terminatedAt,t),deadline:Jo(r==null?void 0:r.terminatedAt,t)})),c.jsxs(D,{component:qc,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[a,c.jsx(G,{component:"span",sx:{marginLeft:"4px"},children:s})]})}const go=x.createContext({});function Nl(){return x.useContext(go)}const{Provider:Gc,Consumer:Ml}=go,{did:K,appId:Qc}=window.env;function Xc({children:e}){var S,R;const{t,locale:n}=Q(),{blocklet:r}=Ee(),[o,i]=x.useState([]),[s,a]=x.useState([]),[l,u]=x.useState([]),d=k.getDisplayName(r),f=((S=((r==null?void 0:r.environments)||[]).find(C=>C.key===Y.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:S.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],v=(r==null?void 0:r.trustedFactories)||[],b=(r==null?void 0:r.enablePassportIssuance)!==!1,h=async()=>{try{const C=await Me.doBatchQuery({getRoles:{input:{teamDid:K}},getPermissions:{input:{teamDid:K}},getInvitations:{input:{teamDid:K}}});a((C.getRoles.roles||[]).filter(P=>!$.RBAC_CONFIG.roles.some(E=>E.name===P.name&&(!E.passport||E.ci))).map(P=>(P.hasDescription=!!P.description,P.hasDescription||(P.description=t("team.passport.description",{teamName:d,title:P.title})),P))),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){J.error(C.message)}},j=({did:C}={})=>{const P={teamDid:K,user:{did:C}};return Me.getUser({input:P})},I=({query:C,paging:P}={})=>{const E={teamDid:K};return P&&(E.paging=P),C&&(E.query=C),E.sort={lastLoginAt:-1},Me.getUsers({input:E})},g=()=>Me.getUsersCountPerRole({input:{teamDid:K}}),_=()=>h();x.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&h()},[(R=r==null?void 0:r.meta)==null?void 0:R.did]),x.useEffect(()=>{a(C=>C.map(P=>(P.hasDescription||(P.description=t("team.passport.description",{teamName:d,title:P.title})),{...P})))},[t,n]);const w=C=>{C.teamDid===K&&h()};ze(Y.TeamEvents.userAdded,w,[K]),ze(Y.TeamEvents.userRemoved,w,[K]),ze(Y.TeamEvents.userUpdated,w,[K]);const O={teamDid:K,teamIssuerDid:Qc,teamName:d,invitations:o,roles:s,permissions:l,trustedPassports:p,trustedFactories:v,isNodeTeam:!1,enablePassportIssuance:b,refresh:_,passportColor:f,endpoint:window.location.origin,blocklet:r,api:{getUser:j,getUsers:I,getUsersCountPerRole:g}};return c.jsx(Gc,{value:O,children:e})}const Zc=x.lazy(()=>F(()=>import("./overview-jW78KQ6d.js"),__vite__mapDeps([0,1,2,3,4,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,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]))),Yc=x.lazy(()=>F(()=>import("./index--YUaVsoq.js"),__vite__mapDeps([53,1,2,54,9,55,56,57,58,27,28,29,30,31,59,60,33,61,44,45,37,38,62,49,63,64,34,12,40,65,47,48,50,51,52,10,46,19,66,23,67,21,7,68,69,6,13,14,15,70,17,18,4,16,71,72,35,36,73,39,41,42,43,5,20]))),Jc=x.lazy(()=>F(()=>import("./index-BJDKEH0b.js"),__vite__mapDeps([74,1,2,9,75,10,42,76,11,57,58,27,28,29,30,31,13,14,15,16,17,18,19,44,77,12,6,7,5,20,78,38,39,40,34,41,37,43,45,46,47,48,49,50,51,52]))),el=x.lazy(()=>F(()=>import("./index-CTFO1wAr.js"),__vite__mapDeps([79,1,2,80,81,82,83,54,76,84,42,27,28,29,30,31,85,46,19,10,38,55,86,18,87,13,14,15,16,17,20,70,44,68,12,88,89,37,63,64,61,90,3,91,59,60,33,45,62,49,58,34,40,4,92,93,39,41,43,5,7,47,48,50,51,52,94]))),tl=x.lazy(()=>F(()=>import("./audit-logs-Dt1zBSaX.js"),__vite__mapDeps([95,1,2,96,97,12,5,39,28,29,30,31,98,62,99,38,40,16,17,18,19,34,41,37,42,43,44,45,46,15,13,14,7,20,47,48,49,50,51,52]))),nl=x.lazy(()=>F(()=>import("./log-DVDRYSeA.js"),__vite__mapDeps([100,1,2,39,42,101,28,29,31,102]))),rl=x.lazy(()=>F(()=>import("./index-D5PXuh6o.js"),__vite__mapDeps([103,1,2,9,104,34,105,59,60,33,61,44,29,28,45,30,37,31,27,38,62,49,63,64,58,12,40,5,16,17,18,19,15,6,7,85,46,73,101,106,20,54,72,25,93,10,23,107,108,109,88,82,70,42,110,84,78,68,96,97,99,111,43]))),ol=x.lazy(()=>F(()=>import("./config-navigation-1U4iVdBl.js"),__vite__mapDeps([112,1,2,63,64,61,113,110,86,31,28,29,18,19,114,115,30,37,27,38,78,65,47,48,49,50,51,40,52,10,46,116,17,42,32,33,39,16,34,41,43,44,45,15,13,14,5,7,20]))),sl=x.lazy(()=>F(()=>import("./index-BcFOSrVl.js"),__vite__mapDeps([117,1,2,75,10,42,25,118,67,119,93,17,27,28,29,30,31,18,19,4,6,7,90,68,44,36,108,37,87,5,59,60,33,61,45,38,62,49,63,64,58,34,12,40]))),il=x.lazy(()=>F(()=>import("./component-BziFLYA3.js"),__vite__mapDeps([120,1,2,9,81,82,83,54,76,84,42,27,28,29,30,31,12,90,68,44,13,14,15,38,60,33,61,45,37,62,49,64,58,121,85,46,19,108,104,113,110,116,78,122,70,34,18,17,123,124,125,119,93,25,126,50,127,128,129,130,131,77,96,97,114,4,6,7,111,109,40,88,73,16,26,132,118,67,75,10,133,39,47,134,135,11,22,43,41,35,36,5,20,48,51,52]))),al=x.lazy(()=>F(()=>import("./analytics-B3U8I3AQ.js"),__vite__mapDeps([136,1,2,38,13,14,15,80,137,121,61,85,46,19,64,40,37,28,29,31,18,17,33,107,27,30,78,59,60,44,45,62,49,63,58,34,12,39,16,41,42,43,5,7,20,47,48,50,51,52]))),cl=x.lazy(()=>F(()=>import("./notifications-DHYTuxQt.js"),__vite__mapDeps([138,1,2,13,14,15,44,29,40,46,19,37,98,62,38,39,16,17,18,34,41,42,43,45,5,7,20,47,48,49,50,51,52])));function ll(){var h,j;const e=Je(),{tab:t="overview"}=ns(),{blocklet:n,actions:{refreshBlocklet:r}}=Ee(),{t:o}=Q(),i=(h=n==null?void 0:n.meta)==null?void 0:h.did,s=I=>{e(`${$.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${I}`)},a=()=>{r()},l=!n||xt(n.status)?[]:k.getAppMissingConfigs(n),u=[{label:o("common.overview"),value:"overview"},{label:c.jsx(yr,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:o("common.components")}),value:"components"}];xt(n==null?void 0:n.status)||u.push({label:o("common.configuration"),value:"configuration"}),u.push({label:o("common.auditLogs"),value:"audit-logs"}),n&&((j=n.children)!=null&&j.length)&&n.structVersion===$.APP_STRUCT_VERSION&&u.push({label:o("common.logs"),value:"logs"}),u.push({label:o("common.configNavigation"),value:"navigation"}),u.push({label:o("common.storage"),value:"storage"});const d=c.jsx(tl,{scope:i,categories:["blocklet","team","security","certificates","gateway"]});ze($.EVENTS.NOTIFICATION_BLOCKLET_CREATE,I=>{const{severity:g,title:_,description:w}=I||{};g==="error"?J.error(w||_):J.success(w||_)});const f={overview:c.jsx(Zc,{}),members:c.jsx(D,{mt:-5,children:c.jsx(Yc,{type:"blocklet",createPassportSvg:En})}),passports:c.jsx(D,{mt:-4.5,children:c.jsx(Jc,{createPassportSvg:En})}),components:il,configuration:c.jsx(el,{blocklet:n,onUpdate:a}),"audit-logs":d,logs:nl,navigation:ol,storage:c.jsx(sl,{}),analytics:c.jsx(D,{mt:-5,children:c.jsx(al,{})}),publish:c.jsx(D,{mt:-3,children:c.jsx(rl,{})}),notifications:c.jsx(cl,{})},p=f[t]||f.overview,v=!["members","passports","analytics","publish","notifications"].includes(t),b=n?c.jsxs(nn,{type:"components",children:[v&&c.jsx(D,{pt:3,children:c.jsx(os,{tabs:u,current:t,onChange:s,scrollButtons:"auto"})}),c.jsx("div",{className:"page-content",children:c.jsx(x.Suspense,{fallback:c.jsx(Ke,{relative:"parent",children:c.jsx(te,{})}),children:x.isValidElement(p)?p:c.jsx(p,{blocklet:n})})})]}):c.jsx(Ke,{relative:"parent",children:c.jsx(te,{})});return c.jsx(rs,{children:c.jsx(Xc,{children:c.jsx(_n,{children:c.jsxs(dl,{children:[v&&c.jsxs(D,{component:"div",className:"page-header",children:[c.jsxs(G,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[n?c.jsx(Jt,{blocklet:n,style:{marginRight:16}}):null,n?c.jsxs(D,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[c.jsx(D,{children:k.getDisplayName(n)}),(n==null?void 0:n.status)!=="unknown"&&c.jsx(tn,{size:"12px",status:n.status,source:n.source,progress:n.progress})]}):`${o("common.blocklet")} ${o("common.detail")}`]}),n?c.jsx(Yt,{className:"page-actions",hasPermission:!0,blocklet:n,onStart:()=>{},onComplete:({error:I}={})=>{I&&J.error(I.message)},variant:"group"}):null]}),c.jsx(Ir,{}),c.jsx(Wc,{}),b]})})})})}function ul(){var r;const{blocklet:e}=Ee(),{t}=Q(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return x.useEffect(()=>{const o=es();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),c.jsxs(c.Fragment,{children:[c.jsx(ts,{children:c.jsx("title",{children:t("pageTitle.dashboard")})}),c.jsx(ll,{})]})}const dl=Ye.main`
|
|
120
120
|
.page-header {
|
|
121
121
|
display: flex;
|
|
122
122
|
justify-content: space-between;
|
|
@@ -162,4 +162,4 @@ ${r}
|
|
|
162
162
|
margin-bottom: 15px;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
`,Ul=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"}));export{tn as B,Ts as L,po as N,bn as R,en as W,xi as _,yr as a,ci as b,_r as c,ao as d,Jt as e,vr as f,Vt as g,pe as h,xr as i,Al as j,br as k,$l as l,Ul as m,
|
|
165
|
+
`,Ul=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"}));export{tn as B,Ts as L,po as N,bn as R,en as W,xi as _,yr as a,ci as b,_r as c,ao as d,Jt as e,vr as f,Vt as g,pe as h,xr as i,Al as j,br as k,$l as l,Ul as m,Ze as p,Nl as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={auth:{noPermission:{title:"Keine Erlaubnis",description:"Du bist nicht der Administrator des Blocklets"}},login:{reLogin:"Verbinden",description:"Du musst deine DIDs Wallet verbinden, um auf {name} zuzugreifen",already:"Du bist verbunden als",connectWallet:"Verbinde das DID Wallet",closeWindow:"Fenster schließen",accessLimit:{title:"Seitenzugriff eingeschränkt",description:"Diese Seite erfordert die folgenden Pässe zum Zugriff, verbinden Sie sich bitte mit dem Portemonnaie, um den entsprechenden Pass zu ändern oder zu beantragen.",alreadyHavePassport:"Habe bereits den Reisepass",connectWithPassport:"Verbinde mit diesem Reisepass",buyPassport:"Kaufen Sie einen Reisepass"},switchDid:{title:"Wechseln Sie das DID Wallet",scan:"Scannen Sie den folgenden QR-Code, um den Account zu wechseln",confirm:"Bestätige den Wechsel in deiner DID-Wallet",success:"Erfolgreich umgeschaltet"},switchSpecifiedDid:{title:"Wechsle DID Wallet",scan:"Du musst die DID zu {did} wechseln, um die folgenden Aktionen abzuschließen.",confirm:"Bestätigen Sie den Wechsel in Ihrer DID-Brieftasche",success:"Erfolgreich gewechselt"},connect:{title:"Verbinde DID Wallet",scan:"Verbinden Sie Ihre DID-Brieftasche, um auf diese Anwendung zuzugreifen",confirm:"Bestätigen Sie in Ihrer DID-Geldbörse",success:"Sie sind erfolgreich verbunden"},needManualClose:"Anmeldung erfolgreich. Wenn sich dieses Fenster nicht automatisch schließt, bitte schließen.",connectWithPassport:"Verbinde dich mit diesem Reisepass",invalidRedirectUrl:"Ungültige Weiterleitungs-URL"},studio:{home:"Studio",preferences:"Präferenzaufbau",localization:"Lokalisierung"},blocklet:{startApplication:"Starte Anwendung",startDescription:"Bereit, {name} zu starten",start:"Start",starting:"Starten...",open:"Öffnen",suspended:"Anwendung ausgesetzt",manageSubscription:"Abonnement verwalten",suspendedCausedByExpired:"Diese Anwendung wurde aufgrund abgelaufener Bezahlung vorübergehend gestoppt. Bitte erneuern Sie vor {deadline}, um fortzufahren. Erfolgt in der angegebenen Frist keine Erneuerung, kann sie nicht mehr erneuert oder fortgesetzt werden.",suspendedCausedByTerminated:"Die Anwendung wurde aufgrund der am {canceledAt} gekündigten Subscription beendet und die Daten werden bis zum {deadline} vorgehalten. Bevor die Daten gelöscht werden, können Sie die Daten in DID Spaces sichern.",terminated:"Anwendung beendet"},setup:{steps:{connect:"Verbinden",didSpace:"DID Spaces",config:"Konfiguration",domain:"Domain",access:"Zugangskontrolle",fuel:"Kraftstoff",complete:"Komplett",introduction:"Einführung",selectNodeDesc:"Wähle Blocklet Server aus",launchAppDesc:"Blocklet auf Server installieren",setupAppDesc:"Setup Blocklet",launched:"Vervollständigen"},connect:{title:"Verbinde mit Anwendung",scan:"Verbinden Sie Ihre DID Wallet, um das Benutzerprofil und die Eigentümerrechte des Blocklets bereitzustellen. Anschließend können Sie die App konfigurieren und starten.",confirm:"Bestätigen Sie in Ihrer DID-Brieftasche",success:"Sie sind erfolgreich verbunden"},domain:{addTitle:"Fügen Sie einen neuen Domänennamen hinzu (Optional)",title:"Domain Einstellung",subTitle:"Legen Sie eine benutzerdefinierte Domain für die Anwendung fest",label:"Bitte geben Sie einen gültigen Domainnamen an",tipStart:"Bitte stellen Sie sicher",tipEnd:"Hat Punkt zum aktuellen Server",cannotResolve:"{domain} kann nicht aufgelöst werden, bitte überprüfen Sie Ihre DNS-Konfiguration.",checkingResolvable:"Überprüfe den Domain-Status...",addingCert:"Zertifikat wird erstellt...",addingDomain:"Domain wird hinzugefügt...",recordType:"Datentyp",recordValue:"Aufzeichnungswert",skipStart:"Du kannst",skip:"Überspringe die benutzerdefinierte Domaineinstellung",skipEnd:"und verwenden Sie die Standarddomäne, um auf die Anwendung zuzugreifen",genCertSuccess:"Das {domain}-Zertifikat wurde erfolgreich ausgestellt",genCertFailed:"Fehler beim Ausstellen des Zertifikats für {domain}: {message}",genCertFailedForNFTDomain:"NFT-Domain erfolgreich hinzugefügt, aber das HTTPS-Zertifikat konnte nicht generiert werden. Bitte versuche es später erneut.",resolvedAddressError:"{domain} zeigt nicht auf die gleiche IP-Adresse wie {curDomain}",invalidDNSReminder:"{error}. Sie können jedoch weiterhin die Domain hinzufügen, aber eine automatische Zertifikatserstellung ist nicht verfügbar.",continueAdd:"Weiter hinzufügen"},didSpace:{title:"Konfigurieren Sie DID Spaces",subTitle:"Bitte schließen Sie den folgenden Verbindungsvorgang ab, um Anwendungsdaten in DID Spaces zu speichern.",tips:"Tipps",description:"Konfigurieren Sie die DID Spaces Instanzadresse und speichern Sie die Anwendungsdaten in DID Spaces nach einer erfolgreichen Verbindung",label:"Bitte wählen Sie den DID Spaces-Dienst",connected:"Sie haben erfolgreich eine Verbindung mit DID Spaces hergestellt",connect:"Verbinden Sie jetzt",reconnect:"Verbinden",addressCannotEmpty:"Die Adresse darf nicht leer sein",addressNotValid:"{url} ist keine gültige Adresse.",authorize:{title:"Verbinde {appName} mit DID Spaces",scan:"Verwenden Sie Ihre DID-Geldbörse, um den QR-Code unten zu scannen und der App {appName} den Zugriff auf DID-Räume zu ermöglichen",success:"Erfolgreich verbunden"}},config:{title:"Konfiguration",subTitle:"Andere Konfigurationselemente (Sie müssen auch die folgenden Elemente festlegen)"},complete:{title:"Alles ist bereit",failedTitle:"Fehler beim Starten des Blocklets",backToServer:"Zurück zum Blocklet Server",notRunning:"Blocklet konnte beim ersten Versuch nicht gestartet werden, bitte erneut versuchen"},fuel:{title:"Kraftstoff zum Starten erforderlich",tipStart:"Schlitz",tipEnd:"Für diese Anwendung ist eine Guthaben erforderlich, damit die Anwendung ordnungsgemäß funktionieren kann. Die Gelder werden in der Anwendungsbrieftasche gespeichert und können für Transaktionsgebühren verwendet werden. Sie können Ihr Guthaben jederzeit abheben, wenn Sie die App nicht mehr verwenden.",addressTitle:"Anwendungskonto",addressTip:"Befüllen Sie die Anwendung mit einer DID Wallet",need:"Brauchen",current:"Aktuell",fuelApp:"Anwendung mit Treibstoff versorgen"},title:"Aufbau",next:"Nächster",previous:"Vorherige",continue:"Weiter",skip:"Überspringen",startNow:"Starte jetzt",confirm:"Bestätigen",cancel:"Abbrechen"},user:{walletNotification:"DID Wallet Benachrichtigung",emailNotification:"E-Mail-Benachrichtigung",smsNotification:"SMS-Benachrichtigung",addWebhook:"Neuen Webhook hinzufügen"},pageTitle:{login:"Anmelden",dashboard:"Blocklet-Dashboard",userCenter:"Benutzerzentrum",invite:"Einladen",issuePassport:"Reisepass ausstellen",lostPassort:"Verloren Reisepass"}};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,D as p,L as d,P as r}from"./index-
|
|
1
|
+
import{j as s,D as p,L as d,P as r}from"./index-CaLGv6xG.js";import{L as l}from"./Link-BzeSWqDp.js";function a({did:o,href:t,external:n,avatarProps:f,...i}){const e=s.jsx(p,{did:o,...i});return t?n?s.jsx(l,{target:"_blank",href:t,underline:"hover",children:e}):s.jsx(d,{to:t,children:e}):e}a.propTypes={did:r.string.isRequired,to:r.string,href:r.string,avatarProps:r.object,external:r.bool};a.defaultProps={to:"",href:"",avatarProps:{},external:!1};export{a as W};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{j as i,r,a2 as P,al as C,a9 as T,fy as B,a6 as h,B as a,P as f,a0 as w}from"./index-CaLGv6xG.js";import{D as E,a as b,A as I}from"./domain-list-A5SqLbLS.js";import{P as A}from"./page-header-Bjl7D46v.js";import{_ as L}from"./useSetState-DEVLe2Fz.js";import{S as d}from"./button-BotQVFjI.js";import{S as W}from"./layout-D41GSjev.js";import{S as _}from"./step-actions-NyA7AGpj.js";import"./Add-DV9cHTiI.js";import"./ExpandMore-DpLFPsWa.js";import"./LockIcon-Cx_TySkG.js";import"./index-B5Pm_bPi.js";import"./did-address-TSZ5XRBj.js";import"./Link-BzeSWqDp.js";import"./permission-BK9x4qjQ.js";import"./useAsync-PE3W-DLW.js";import"./session-AqfK0jLG.js";import"./confirm-BWW215hi.js";import"./format-error-DQS9AwZv.js";import"./Alert-BriK3hjA.js";import"./useSlot-BrU8y60n.js";import"./use-mobile-BLqjm-5m.js";import"./InfoOutlined-DEt-KJ8v.js";import"./OpenInNew-Ba4HupG6.js";import"./index-CFQwbx1S.js";import"./api-DJ1sjN9o.js";import"./index-B22_1WOD.js";import"./util-yXMDVjHb.js";import"./TextField-BYelVRF_.js";import"./FormControl-Dq6XW9kS.js";import"./useFormControl-DMGx-jdt.js";import"./InputLabel-DYr7To9X.js";import"./Select-CMM8MR9i.js";import"./LoadingButton-IrsPdnhT.js";import"./useThemeProps-C59Glnbx.js";import"./Delete-rvy-F0hT.js";import"./actions-Dv2KmWA_.js";import"./MoreHoriz-B_IgZ_Tw.js";import"./ListItemText-BWMpM4cA.js";import"./content-layout-BP4bsvx7.js";function p({onNext:s,onPrevious:D}){var u,x;const{t:o}=r.useContext(P),[S,l]=r.useState(!1),{blocklet:e}=C(),[c,j]=r.useState(""),y=(((e==null?void 0:e.site)||{}).domainAliases||[]).map(t=>T.replaceSlotToIp(t.value,c)),[n,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),v=(x=(u=e.environments)==null?void 0:u.find(t=>t.key==="BLOCKLET_APP_PK"))==null?void 0:x.value,g=y.find(t=>B.isDidDomain(t));return r.useEffect(()=>{h.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{j(t.address||"")}).catch(t=>{console.error(t.message)})},[]),i.jsxs(z,{children:[i.jsx("div",{className:"header",children:i.jsx(A,{title:o("setup.domain.title"),subTitle:o("setup.domain.subTitle"),onClickBack:D})}),i.jsxs(a,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[i.jsxs(a,{children:[i.jsxs(a,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:[i.jsx(a,{display:"inline",children:o("setup.domain.skipStart")}),i.jsx(d,{variant:"text",size:"small",disabled:!!n.addDomainState.text,onClick:()=>s(),style:{paddingTop:0},children:i.jsx("span",{style:{textDecoration:"underline"},children:o("setup.domain.skip")})}),i.jsx(a,{display:"inline",children:o("setup.domain.skipEnd")})]}),i.jsx(a,{sx:{marginTop:"12px"},children:i.jsx(b,{listOnly:!0,inSetup:!0})})]}),i.jsxs(a,{children:[i.jsx(a,{fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o("setup.domain.addTitle")}),i.jsx(I,{autoFocus:!1,appPk:v,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,sx:{marginTop:"12px"},cnameDomain:g,currentIp:c,inBlockletSetup:!0,shouldCheckDomain:!0,resolveDomain:t=>h.get(`/dns-resolve?hostname=${t}`),onInputDomain:t=>{m({domain:t.domain,type:t.type}),l(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const k={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};m(k),s()},onError:l})]})]}),i.jsx(_,{mt:8,disabled:!!n.addDomainState.text,blocklet:e,onStartNow:()=>s("complete"),children:n.domain?i.jsx(d,{variant:"contained",loading:!!n.addDomainState.text,disabled:S||!!n.addDomainState.text||!n.domain,onClick:()=>s(),children:n.addDomainState.text||o("setup.next")}):i.jsx(d,{variant:"contained",disabled:!!n.addDomainState.text,onClick:()=>s(),children:o("setup.skip")})})]})}function Pt(s){return i.jsx(E,{children:i.jsx(p,{...s})})}p.propTypes={onNext:f.func,onPrevious:f.func};p.defaultProps={onNext:()=>{},onPrevious:()=>{}};const z=w(W)`
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow-y: hidden;
|
|
4
|
+
.form {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
word-break: break-all;
|
|
8
|
+
}
|
|
9
|
+
`;export{Pt as default};
|