@abtnode/blocklet-services 1.16.47-beta-20250721-130532-61549a96 → 1.16.47-beta-20250724-080141-d80ab374
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 +3 -0
- package/api/libs/image.js +5 -1
- package/api/routes/access-key.js +59 -0
- package/api/routes/oauth/client.js +9 -0
- package/api/services/auth/session.js +14 -11
- package/api/util/attach-shared-utils.js +11 -8
- package/dist/assets/{AdapterDayjs-Dc_cn1Wv.js → AdapterDayjs-DJ-f1i8A.js} +1 -1
- package/dist/assets/{Google-BYGsR9Bd.js → Google-BvsSmJCS.js} +3 -3
- package/dist/assets/{access-control-oCszV5zC.js → access-control-DgyeLhBf.js} +1 -1
- package/dist/assets/actions-CRUvIBLz.js +1 -0
- package/dist/assets/{add-component-core-GYYnyhPI.js → add-component-core-CshRctcL.js} +29 -29
- package/dist/assets/add-resource-C6AR_ENP.js +1 -0
- package/dist/assets/{addon-m7dEcFSm.js → addon-Cioeq7ZM.js} +1 -1
- package/dist/assets/{advanced-BhS7b_np.js → advanced-DF-eCD_V.js} +3 -3
- package/dist/assets/aigne-DPVDIAAv.js +10 -0
- package/dist/assets/api-BfIB6faS.js +1 -0
- package/dist/assets/appearance-CL1LSpJB.js +1 -0
- package/dist/assets/ar-CcCysAXs.js +7 -0
- package/dist/assets/ar-VhkYkk5Z.js +1 -0
- package/dist/assets/{arrow-down.svg-6steA5un.js → arrow-down.svg-B9dO_KDq.js} +1 -1
- package/dist/assets/{audit-logs-gbfUafHi.js → audit-logs-EC_F2BOT.js} +2 -2
- package/dist/assets/{authorize-Bfey1QAy.js → authorize-DgLJOPDK.js} +1 -1
- package/dist/assets/{base-chart-u6OIGONc.js → base-chart-2nBOSo9s.js} +1 -1
- package/dist/assets/{base32-DBDFptL1.js → base32-TX5fATAF.js} +1 -1
- package/dist/assets/branding-7KMxNl9d.js +44 -0
- package/dist/assets/{branding-itFeNCQ6.js → branding-B6_aWuFR.js} +2 -2
- package/dist/assets/{bundle-avatar-DkLBEfff.js → bundle-avatar-BPnP6pIL.js} +1 -1
- package/dist/assets/button-CEiQto3g.js +1 -0
- package/dist/assets/{click-to-copy-m7BzOuWH.js → click-to-copy-BqGY_Kr7.js} +1 -1
- package/dist/assets/{cloneDeep-BpNWeRQ9.js → cloneDeep-CKVXBkcT.js} +1 -1
- package/dist/assets/{collapse-DfvukfIl.js → collapse-jk2ONGPl.js} +1 -1
- package/dist/assets/{complete-B4B7REuC.js → complete-zgzlWGY3.js} +4 -4
- package/dist/assets/{component-DMzCzNlm.js → component-BiE6SG5y.js} +63 -63
- package/dist/assets/{config-D-z5vAfP.js → config-Bra9VdE1.js} +2 -2
- package/dist/assets/config-CPpGYWww.js +28 -0
- package/dist/assets/{config-D3XTFUmZ.js → config-W_iStCFi.js} +1 -1
- package/dist/assets/{config-navigation-CfGhB5-E.js → config-navigation-D63aLfma.js} +9 -9
- package/dist/assets/config-space-DFnzGBOV.js +1 -0
- package/dist/assets/{confirm-B4BzkG04.js → confirm-5JMMSGdh.js} +1 -1
- package/dist/assets/{connect-JlblxSAY.js → connect-55nmllvA.js} +1 -1
- package/dist/assets/connect-Cph9RbRv.js +1 -0
- package/dist/assets/connect-to-CvyIrlXc.js +1 -0
- package/dist/assets/{content-layout-BaDbLmL5.js → content-layout-Mn94hzXe.js} +1 -1
- package/dist/assets/{createClass-g8bSPTyV.js → createClass-Ig9AWyIK.js} +1 -1
- package/dist/assets/{dashboard-CBpVHcLw.js → dashboard-BXgUTFa6.js} +8 -8
- package/dist/assets/de-BTXwRUYy.js +7 -0
- package/dist/assets/de-BYci0FoU.js +1 -0
- package/dist/assets/{delete-confirm-DhfRzwF1.js → delete-confirm-saPgrAIL.js} +1 -1
- package/dist/assets/{did-address-CdYAzzjR.js → did-address-D4l1uYd1.js} +1 -1
- package/dist/assets/domain-ClY1yq1j.js +9 -0
- package/dist/assets/domain-action-card-Ds6lQa7Z.js +28 -0
- package/dist/assets/domains-C_XAIIRT.js +1 -0
- package/dist/assets/{dot-OPeVWPUi.js → dot-BOuza8rS.js} +1 -1
- package/dist/assets/{email-BTKvn_fl.js → email-D07y9XJo.js} +1 -1
- package/dist/assets/empty-DhZfJeme.js +1 -0
- package/dist/assets/{empty-spinner-C6wgiyAQ.js → empty-spinner-D_3bEG2p.js} +1 -1
- package/dist/assets/engine-Bm7Qp-7f.js +1 -0
- package/dist/assets/es-1PoIOrwC.js +1 -0
- package/dist/assets/es-DCyLy_vM.js +9 -0
- package/dist/assets/{exchange-passport-B-9fNsX9.js → exchange-passport-B0LodWCE.js} +1 -1
- package/dist/assets/{form-BX4g8soo.js → form-D55muuDj.js} +1 -1
- package/dist/assets/form-text-input-BHd2ybwR.js +11 -0
- package/dist/assets/form-wrapper-DuJOKczF.js +99 -0
- package/dist/assets/fr-CNGOyo0v.js +7 -0
- package/dist/assets/fr-m47FzEWr.js +1 -0
- package/dist/assets/{fuel-DYTqXaPb.js → fuel-CYEtfdZk.js} +1 -1
- package/dist/assets/gen-access-key-BDWXKS6s.js +1 -0
- package/dist/assets/gen-simple-access-key-C-Aym19M.js +1 -0
- package/dist/assets/get-safe-url-CZlaSf1L.js +1 -0
- package/dist/assets/hi-Dcj1EDTy.js +1 -0
- package/dist/assets/hi-DsFnKfzk.js +5 -0
- package/dist/assets/{home-BL8xoBlc.js → home-CAJwSYRb.js} +1 -1
- package/dist/assets/id-CsK9Cnbo.js +7 -0
- package/dist/assets/id-UvUReF_3.js +1 -0
- package/dist/assets/{iframe-BTaRNGRY.js → iframe-DCdtoFjc.js} +1 -1
- package/dist/assets/{index-lf4wyjkd.js → index-1WiLWIAu.js} +6 -6
- package/dist/assets/index-B0pGy8t9.js +55 -0
- package/dist/assets/{index-D3qROm47.js → index-B36DERG2.js} +1 -1
- package/dist/assets/{index-BC395sak.js → index-B5_zLKFf.js} +1 -1
- package/dist/assets/index-BCWYWGPf.js +124 -0
- package/dist/assets/{index-CgCJ2qDh.js → index-BGoUXEmc.js} +88 -88
- package/dist/assets/{index-DseoFU10.js → index-BL2NEiva.js} +1 -1
- package/dist/assets/index-BSJbc4Ic.js +1 -0
- package/dist/assets/{index-DjKmasIZ.js → index-B_CAM-3t.js} +2 -2
- package/dist/assets/{index-Dy8syryD.js → index-BmCyA4MW.js} +3 -3
- package/dist/assets/index-Bzde7Bh8.js +113 -0
- package/dist/assets/{index-DyH1BrER.js → index-C7DDH7Uf.js} +10 -10
- package/dist/assets/{index-EIX4798q.js → index-C80MI1u_.js} +1 -1
- package/dist/assets/index-C8T12jiJ.js +1 -0
- package/dist/assets/{index-BaBIefeb.js → index-CGngFFes.js} +1 -1
- package/dist/assets/{index-CW67obch.js → index-CRFxmuV0.js} +1 -1
- package/dist/assets/index-CZXuMAQy.js +242 -0
- package/dist/assets/index-Ce_ilge5.js +271 -0
- package/dist/assets/index-CtENECgD.js +11 -0
- package/dist/assets/index-Cycplgtw.js +4 -0
- package/dist/assets/{index-DUnVGFh6.js → index-CzttGWll.js} +1 -1
- package/dist/assets/{index-BUJ5QfC4.js → index-D2MS4PNu.js} +6 -6
- package/dist/assets/{index-C-AuC2Mk.js → index-D3pV4Lj0.js} +1 -1
- package/dist/assets/{index-DcwzA8G_.js → index-DLHMwUmK.js} +1 -1
- package/dist/assets/{index-LvmCZD51.js → index-DpP3MEz0.js} +3 -3
- package/dist/assets/{index-D6kePAD5.js → index-DwEMr0X-.js} +6 -6
- package/dist/assets/{index-Cbxz8oHT.js → index-ElG08lIx.js} +1 -1
- package/dist/assets/{index-cCGBx0sL.js → index-Ft5IyfHH.js} +10 -10
- package/dist/assets/{index-D_5DFMMK.js → index-JVicMopH.js} +1 -1
- package/dist/assets/{index-SrN5SE_r.js → index-NVKZ_ZUS.js} +1 -1
- package/dist/assets/{index-Bo2cFOuR.js → index-UTcxT75j.js} +1 -1
- package/dist/assets/index-iY8rmPEZ.js +7 -0
- package/dist/assets/{invitation-CC5hPf7T.js → invitation-BEd7MxhL.js} +3 -3
- package/dist/assets/{invite-CreQ98MA.js → invite-C2gqMFFc.js} +1 -1
- package/dist/assets/isURL-sHTYO46x.js +2 -0
- package/dist/assets/{issue-passport-CIYcm6iB.js → issue-passport-ZvHPiNMo.js} +1 -1
- package/dist/assets/item-BlUr7rKO.js +1 -0
- package/dist/assets/ja-Cw02X6OV.js +1 -0
- package/dist/assets/ja-bb6qPt27.js +9 -0
- package/dist/assets/ko-DZSgmgs9.js +1 -0
- package/dist/assets/ko-DxiDEd1I.js +9 -0
- package/dist/assets/{landing-page-DOi_4Ca6.js → landing-page-CTjTjqyj.js} +1 -1
- package/dist/assets/{launch-result-message-Dwnqr8Lq.js → launch-result-message-3VxQH2Cy.js} +1 -1
- package/dist/assets/{layout-CIen07bA.js → layout-YAJmqZE8.js} +1 -1
- package/dist/assets/list-Bty_q29b.js +2 -0
- package/dist/assets/{list-B8ZhwNC1.js → list-Y-a4PO0u.js} +2 -2
- package/dist/assets/{list-header-CGX6Hi0X.js → list-header-DLhxtl5g.js} +1 -1
- package/dist/assets/localization-Bd37mWlD.js +1 -0
- package/dist/assets/{log-C9DU0cCG.js → log-B9tZ4qc6.js} +1 -1
- package/dist/assets/logger-MT1V7vOw.js +1 -0
- package/dist/assets/login-D-903-kb.js +1 -0
- package/dist/assets/{login-oauth-callback-C2SqP1bW.js → login-oauth-callback-B8e--CGo.js} +1 -1
- package/dist/assets/logo-uploader-BDvl-p1h.js +30 -0
- package/dist/assets/lost-passport-C-bcfQGt.js +168 -0
- package/dist/assets/observability-hUM5rYTW.js +1 -0
- package/dist/assets/{omit-CxEI1_wm.js → omit-CXy6Rymi.js} +1 -1
- package/dist/assets/{open-window-RuAUils2.js → open-window-BeKV58_Y.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-DhK6jNNQ.js → over-due-invoice-payment-YS7NZYQD.js} +1 -1
- package/dist/assets/{overview-BVSh5o7h.js → overview-re3EXfMP.js} +3 -3
- package/dist/assets/{page-header-BycH8S9r.js → page-header-DMbjH45Q.js} +1 -1
- package/dist/assets/{passport-item-D7sQ_FxN.js → passport-item-8olNdxYA.js} +1 -1
- package/dist/assets/{permission-C79TpiNV.js → permission-D-kAjshH.js} +1 -1
- package/dist/assets/playground-wmO_IQQj.js +1 -0
- package/dist/assets/preferences-Blutv5lP.js +1 -0
- package/dist/assets/profile-embed-BOKrgfV5.js +1 -0
- package/dist/assets/pt-Yj5llJx7.js +5 -0
- package/dist/assets/pt-fKCXneeH.js +1 -0
- package/dist/assets/publish-resource-D_O5YA9z.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-DwkY3sYg.js → react-beautiful-dnd.esm-D2jtRKWT.js} +1 -1
- package/dist/assets/{react-stripe.esm-BGPt6Wk8.js → react-stripe.esm-OZTdjjoB.js} +1 -1
- package/dist/assets/required-BE3i31mZ.js +6 -0
- package/dist/assets/ru-D59vFs72.js +1 -0
- package/dist/assets/ru-DaVu35Yr.js +5 -0
- package/dist/assets/runtime-BPzGyz-O.js +1 -0
- package/dist/assets/{sanitize-DSvGhymV.js → sanitize-DTRB99ZZ.js} +1 -1
- package/dist/assets/sdk-C6BkT6-0.js +1 -0
- package/dist/assets/section-dVgXR9AT.js +40 -0
- package/dist/assets/{security-BwF3YzTL.js → security-DnTqhJwZ.js} +4 -4
- package/dist/assets/session-ulvrJT-t.js +1 -0
- package/dist/assets/setup-DhVk3qh7.js +30 -0
- package/dist/assets/{shorten-label-BKNhALWt.js → shorten-label--tw3nR45.js} +1 -1
- package/dist/assets/{simple-select-DiucBfFO.js → simple-select-6w3ryEQx.js} +1 -1
- package/dist/assets/{spaces-D2uHzDSf.js → spaces-wJwcbibW.js} +1 -1
- package/dist/assets/{start-CCbI2h7_.js → start-DpiGz6e_.js} +1 -1
- package/dist/assets/{starting-progress-C2KBufhS.js → starting-progress-DQSw_Bxk.js} +1 -1
- package/dist/assets/status-T58XBbiV.js +1 -0
- package/dist/assets/{step-actions-C6aMtUZh.js → step-actions-DIkPOD9c.js} +1 -1
- package/dist/assets/{studio-B-QwZrdc.js → studio-BYS275wi.js} +1 -1
- package/dist/assets/{switch-control-88oLMAWm.js → switch-control-BuqCLgsC.js} +1 -1
- package/dist/assets/{table-tips-ZIxKRomr.js → table-tips-DQHiKZsk.js} +1 -1
- package/dist/assets/team-BESj-ofA.js +146 -0
- package/dist/assets/th-CmipfeuV.js +1 -0
- package/dist/assets/th-DEoqTEHf.js +5 -0
- package/dist/assets/traffic-Ck4_JTUO.js +1 -0
- package/dist/assets/{transfer-DWvn8JDa.js → transfer-D9h-sDAW.js} +2 -2
- package/dist/assets/{unsubscribe-DPIGic1H.js → unsubscribe-xEh30JTV.js} +1 -1
- package/dist/assets/{use-mobile-BhzP2Rp3.js → use-mobile-CiJJ-F32.js} +1 -1
- package/dist/assets/{use-mobile-BtGrkCtZ.js → use-mobile-DXb1p_2Q.js} +1 -1
- package/dist/assets/use-promise-window-open-I4QIABtm.js +1 -0
- package/dist/assets/{use-server-logo-BFuFRBQG.js → use-server-logo-BoNyOffw.js} +1 -1
- package/dist/assets/use-window-close-0exfy1za.js +2 -0
- package/dist/assets/{useAsync-DGzYJlYv.js → useAsync-NmGtaPYZ.js} +1 -1
- package/dist/assets/{useAsync-DcK0UTnz.js → useAsync-kpO9-9ye.js} +1 -1
- package/dist/assets/{useLocalStorage-BRPtTalQ.js → useLocalStorage-oSchpz1c.js} +1 -1
- package/dist/assets/user-center-yL13yU5N.js +126 -0
- package/dist/assets/{user-sessions-C2LvHnd6.js → user-sessions-7gxEZAmB.js} +1 -1
- package/dist/assets/{util-DtXj9fc3.js → util-D52ViY5P.js} +1 -1
- package/dist/assets/{util-BGfTex9R.js → util-H8b0otwY.js} +1 -1
- package/dist/assets/{vendor-arcblock-B78OG6SS.js → vendor-arcblock-C7W5M07l.js} +1 -1
- package/dist/assets/{vendor-hooks-HB6DqcLv.js → vendor-hooks-0NQwJuRY.js} +2 -2
- package/dist/assets/{vendor-mui-core-DWYIngcn.js → vendor-mui-core-CiGwt5P_.js} +2 -2
- package/dist/assets/{vendor-mui-x-nEbm5eNb.js → vendor-mui-x-CXaju64L.js} +1 -1
- package/dist/assets/{vendor-utils-J7aLFpEq.js → vendor-utils-DAj75QpF.js} +1 -1
- package/dist/assets/{vendor-ux-Dln42oC3.js → vendor-ux-CF8ziO7Y.js} +81 -80
- package/dist/assets/vi-D7Q19sbd.js +5 -0
- package/dist/assets/vi-DpNkWLxz.js +1 -0
- package/dist/assets/wait-connect-Cll9F6lE.js +1 -0
- package/dist/assets/wrap-locale-CsXU2piR.js +1 -0
- package/dist/assets/zh-BChkzbvC.js +1 -0
- package/dist/assets/{zh-C3O8IIjK.js → zh-BrUcq0vn.js} +1 -1
- package/dist/assets/zh-DkzyaEBh.js +10 -0
- package/dist/assets/zh-tw-BNjyxfNh.js +9 -0
- package/dist/assets/zh-tw-CjDPzOCU.js +1 -0
- package/dist/images/aigne-hub.jpg +0 -0
- package/dist/images/anthropic.png +0 -0
- package/dist/images/bedrock.png +0 -0
- package/dist/images/deepseek.png +0 -0
- package/dist/images/gemini.png +0 -0
- package/dist/images/ollama.png +0 -0
- package/dist/images/open-router.png +0 -0
- package/dist/images/openai.png +0 -0
- package/dist/images/xai.png +0 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/package.json +47 -47
- package/dist/assets/actions-CeSIZN0M.js +0 -1
- package/dist/assets/add-resource-vcL8WXJK.js +0 -1
- package/dist/assets/api-BV16dSSm.js +0 -1
- package/dist/assets/appearance-BF-F41U0.js +0 -1
- package/dist/assets/ar-C5ipiHf8.js +0 -7
- package/dist/assets/ar-DCQblmBa.js +0 -1
- package/dist/assets/branding-Co1T-6R4.js +0 -54
- package/dist/assets/button-Cnj6R5bV.js +0 -1
- package/dist/assets/config-space-a6OXiuM7.js +0 -1
- package/dist/assets/connect-B-9mXcqo.js +0 -1
- package/dist/assets/connect-to-BL3HAXmC.js +0 -1
- package/dist/assets/de-D2XMSiJO.js +0 -7
- package/dist/assets/de-qK31O6-T.js +0 -1
- package/dist/assets/domain-action-card-B-0EUHm9.js +0 -28
- package/dist/assets/domain-q2p-uq0P.js +0 -9
- package/dist/assets/domains-BvFskQMv.js +0 -1
- package/dist/assets/engine-DHKpyPwC.js +0 -1
- package/dist/assets/es-BbK8BUZe.js +0 -9
- package/dist/assets/es-if48ykIx.js +0 -1
- package/dist/assets/fr-BGG_0fyt.js +0 -7
- package/dist/assets/fr-CgLauWUq.js +0 -1
- package/dist/assets/gen-access-key-DVBJadXn.js +0 -2
- package/dist/assets/get-safe-url-Ce6hawV-.js +0 -1
- package/dist/assets/hi-Xr6quGTW.js +0 -1
- package/dist/assets/hi-u6UuLwjV.js +0 -5
- package/dist/assets/id-C2MXmMK4.js +0 -1
- package/dist/assets/id-CIzxbBpP.js +0 -7
- package/dist/assets/index-5klv_mrK.js +0 -4
- package/dist/assets/index-B9-tuTku.js +0 -242
- package/dist/assets/index-B9GdL3BM.js +0 -124
- package/dist/assets/index-BVPDkm__.js +0 -1
- package/dist/assets/index-C_CqbmyE.js +0 -7
- package/dist/assets/index-CeczUnUx.js +0 -284
- package/dist/assets/index-CgRDnxac.js +0 -55
- package/dist/assets/index-D8X_0Jj0.js +0 -1
- package/dist/assets/index-gkhmzgqt.js +0 -113
- package/dist/assets/index-n78OcMXJ.js +0 -11
- package/dist/assets/item-C8OCvu8j.js +0 -1
- package/dist/assets/ja-Cfsi5Ugj.js +0 -9
- package/dist/assets/ja-YE6rPAFZ.js +0 -1
- package/dist/assets/ko-D-4Akfw8.js +0 -1
- package/dist/assets/ko-DXnv35ZL.js +0 -9
- package/dist/assets/list-DZy6xsmU.js +0 -2
- package/dist/assets/localization-CKs8paiI.js +0 -1
- package/dist/assets/logger-BAwrOeMG.js +0 -1
- package/dist/assets/login-Bnu0F5eS.js +0 -1
- package/dist/assets/logo-uploader-DgG1moIj.js +0 -133
- package/dist/assets/lost-passport-DtNgA2rm.js +0 -168
- package/dist/assets/preferences-DfEKF75U.js +0 -1
- package/dist/assets/profile-embed-LKUTgx9A.js +0 -1
- package/dist/assets/pt-BWEktz2b.js +0 -1
- package/dist/assets/pt-bwAs6AHq.js +0 -5
- package/dist/assets/publish-resource-BzjWpXe-.js +0 -1
- package/dist/assets/ru-BdE3cdVi.js +0 -5
- package/dist/assets/ru-CivYXtU3.js +0 -1
- package/dist/assets/runtime-Sobb0AXT.js +0 -1
- package/dist/assets/sdk-DzqJHXyQ.js +0 -1
- package/dist/assets/section-BqJWD2MT.js +0 -41
- package/dist/assets/session-BV5HR2vD.js +0 -1
- package/dist/assets/setup-Bll35TpG.js +0 -30
- package/dist/assets/status-fhCB_pM_.js +0 -1
- package/dist/assets/team-DplrCM_m.js +0 -147
- package/dist/assets/th-BtarXxEz.js +0 -5
- package/dist/assets/th-DmB7Kg4h.js +0 -1
- package/dist/assets/traffic-BU5sjdLg.js +0 -1
- package/dist/assets/user-center-D4QgyhnU.js +0 -126
- package/dist/assets/vi-BMiy6Nrg.js +0 -1
- package/dist/assets/vi-CkIA1NEb.js +0 -5
- package/dist/assets/wrap-locale-BylAyLRV.js +0 -1
- package/dist/assets/zh-Ch3TJh3i.js +0 -10
- package/dist/assets/zh-CubVjUHy.js +0 -1
- package/dist/assets/zh-tw-Bza_uiUD.js +0 -9
- package/dist/assets/zh-tw-oBCLhAEX.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./vendor-react-Dvs43sk9.js";import{j as C,bA as w}from"./vendor-mui-core-CiGwt5P_.js";import{a as x,Q as G}from"./vendor-utils-DAj75QpF.js";import{a1 as u,U as B,R as k}from"./index-BGoUXEmc.js";import{j as A}from"./vendor-hooks-0NQwJuRY.js";import{H as L}from"./vendor-ux-CF8ziO7Y.js";import{g as P,a as h,b as N}from"./spaces-wJwcbibW.js";function T(){const[r,c]=e.useState(null),{blocklet:a}=u();return e.useEffect(()=>{c(P(a))},[a]),{storageEndpoint:r}}const l=e.createContext({}),{Provider:_,Consumer:U}=l;function b({children:r}){const[c,a]=e.useState(!1),[o,n]=e.useState(null),{blocklet:f,actions:{refreshBlocklet:i}}=u(),{storageEndpoint:s}=T(),{api:d}=B();A(async()=>{try{if(a(!0),x(s)){n(null);return}const t=await h(s);n(t)}catch(t){console.error(t),L.error(t.message)}finally{a(!1)}},[s]);const m=()=>{n(null),i()},E=async t=>{n(t),await p(t.endpoint),i()},p=async t=>{await d.configBlocklet({input:{did:[f.meta.did],configs:[{key:k.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:t}]}}),i()};e.useEffect(()=>{async function t(){if(!o)return;const g=await N(o.endpoint,o.name),S=G(o,{name:g});n(S)}t()},[]);const y=!!(s&&o);return C.jsx(_,{value:{loading:c,spaceGateway:o,deleteSpaceGateway:m,updateSpaceGateway:E,storageEndpoint:s,settingStorageEndpoint:p,hasStorageEndpoint:y},children:r})}b.propTypes={children:w.node.isRequired};function q(){return e.useContext(l)}export{b as C,q as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r}from"./vendor-react-Dvs43sk9.js";import{D as x,J as b,j as t,bB as z,$ as F,bC as J,aX as L,R as N,a6 as O,at as Q,Y as X,W as o}from"./vendor-mui-core-
|
|
1
|
+
import{r}from"./vendor-react-Dvs43sk9.js";import{D as x,J as b,j as t,bB as z,$ as F,bC as J,aX as L,R as N,a6 as O,at as Q,Y as X,W as o}from"./vendor-mui-core-CiGwt5P_.js";import{T as Y,n as y}from"./vendor-ux-CF8ziO7Y.js";import"./index-BGoUXEmc.js";import{f as G}from"./index-DBs9Ljax.js";function H(){const e=x();return{minWidth:b(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}}function I({title:e,description:s,showCancel:l=!0,showConfirm:C=!0,cancel:j="",confirm:k="Confirm",color:D="error",params:w={},onCancel:S=()=>{},onConfirm:T,loading:c=!1,displayError:E=!0,children:P=void 0,...R}){const[a,W]=r.useState(w),[$,d]=r.useState(!0),[m,p]=r.useState(!1),[u,f]=r.useState(""),{t:v}=Y(),B=x(),h=async n=>{if(typeof n=="function"){p(!0);try{if(await n(a)===!1)return;d(!1)}catch(i){f(G(i)),console.error(i)}finally{p(!1)}}else d(!1)},q=typeof e=="function"?e():e,M=typeof s=="function"?s(a,W,f):s,A=b(B.breakpoints.down("md")),_=n=>{n.stopPropagation()},{minWidth:g}=H();return t.jsxs(K,{onClick:_,fullScreen:A,open:$,style:{minWidth:g},...R,children:[t.jsx(z,{children:q}),t.jsxs(F,{style:{minWidth:g},children:[t.jsx(J,{component:"div",children:M}),!!u&&E&&t.jsx(L,{severity:"error",style:{width:"100%",marginTop:8},children:u}),P]}),t.jsxs(N,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[l&&t.jsx(y,{onClick:n=>{n.stopPropagation(),h(S)},color:"inherit","data-cy":"cancel-confirm-dialog",children:j||v("common.cancel")}),C&&t.jsxs(y,{onClick:n=>{n.stopPropagation(),h(T)},color:D,disabled:a.__disableConfirm||m||c,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(m||c)&&t.jsx(O,{size:16,sx:{mr:1}}),k]})]})]})}I.propTypes={title:o.any.isRequired,description:o.any.isRequired,showCancel:o.bool,showConfirm:o.bool,cancel:o.string,color:o.string,confirm:o.string,params:o.object,onCancel:o.func,onConfirm:o.func.isRequired,loading:o.bool,displayError:o.bool,children:o.any};const K=Q(X)`
|
|
2
2
|
.delete-actions .Mui-disabled {
|
|
3
3
|
color: ${({theme:e})=>`${e.palette.text.primary} !important`};
|
|
4
4
|
box-shadow: none;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o,a6 as x,T as v,s as g,W as
|
|
1
|
+
import{j as o,a6 as x,T as v,s as g,W as w}from"./vendor-mui-core-CiGwt5P_.js";import{r as k}from"./vendor-react-Dvs43sk9.js";import{C as j,n as A}from"./vendor-utils-DAj75QpF.js";import{u as E}from"./useAsync-NmGtaPYZ.js";import{a as I,Z as R,R as p,_ as T,s as C,v as P}from"./index-BGoUXEmc.js";import{T as L,p as M,H as S}from"./vendor-ux-CF8ziO7Y.js";import{o as l}from"./vendor-arcblock-C7W5M07l.js";import"./useAsync-kpO9-9ye.js";import"./vendor-hooks-0NQwJuRY.js";import"./lottie-web-4koyQiv_.js";function U({children:d}){const{t:a,locale:m}=L(),{api:i,session:r}=I(),{encryptKey:f,decrypt:y}=R(),s=k.useMemo(()=>{if(!r.user)return!1;const{sourceProvider:e,connectedAccounts:n=[]}=r.user,c=n.every(h=>h.provider===p.LOGIN_PROVIDER.EMAIL);return e===p.LOGIN_PROVIDER.EMAIL&&c},[r.user]),t=E(async()=>{if(s)return null;const e=new URL(window.location.href);e.pathname=j(window?.env?.apiPrefix??"/","/api/did/setup/token"),e.searchParams.set("_ek_",f);const{data:n}=await i.get(e.href);return n},[s]),u=async e=>{const n=Array.isArray(e)?e.find(c=>c.sessionToken):e;n.sessionToken&&C(y(n.sessionToken));try{await r.refresh()}catch(c){S.error(c.message)}};return!s&&(!t.value||t.loading||r.loading)?o.jsx(l,{relative:"parent",children:o.jsx(x,{})}):!s&&t.error?o.jsx(l,{relative:"parent",children:o.jsx(v,{children:t.error.message})}):r.user&&!s?d:o.jsx(_,{popup:!0,open:!0,hideCloseButton:!0,action:s?"bind-wallet":"pre-setup",checkFn:i.get,checkTimeout:10*60*1e3,webWalletUrl:M(),onSuccess:u,locale:m,messages:{title:a("setup.connect.title"),scan:a("setup.connect.scan"),confirm:a("setup.connect.confirm"),success:a("setup.connect.success")},customItems:s?[o.jsx(T,{behavior:"only-new",action:"connect",createMode:"connect",onSuccess:u,onError:A,dense:!0},"passkey")]:[],extraParams:s?{previousUserDid:r.user?.did,visitorId:t.value?.visitorId,skipMigrateAccount:!0,isService:!0}:{setup:!0,nw:t.value.url}})}U.propTypes={children:w.any.isRequired};const _=g(P)`
|
|
2
2
|
.action-info-desc {
|
|
3
3
|
padding: 0 72px;
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as X,j as o,ak as u,J as Z,a6 as Y,ae as ee,Q as ne}from"./vendor-mui-core-CiGwt5P_.js";import{i as oe,u as se,r as L,L as te}from"./vendor-react-Dvs43sk9.js";import{a as re,Z as ae,N as ce,c as ie,a4 as E,H as S,T as le,g as de}from"./index-BGoUXEmc.js";import{a as pe,b as k,h as me,m as ue}from"./vendor-hooks-0NQwJuRY.js";import{o as fe}from"./vendor-arcblock-C7W5M07l.js";import{T as ge,c as he,q as we,H as x}from"./vendor-ux-CF8ziO7Y.js";import{u as ke}from"./use-passport-id-B-b-_oYF.js";import{b as xe,c as ve,J as Te,C as _e,A as be,O as Ce,P as Ie}from"./vendor-utils-DAj75QpF.js";import{g as U}from"./get-safe-url-CZlaSf1L.js";import{K as ye}from"./landing-page-CTjTjqyj.js";import{d}from"./logger-MT1V7vOw.js";import"./lottie-web-4koyQiv_.js";const Pe={primary:{light:"#51A2FF"}},j="authorization_response",De=de(),Le="blocklet:onLogin",f=new BroadcastChannel(Le);function We(){const{getPassportId:R}=ke(),{session:M,connectApi:N}=re(),{t:a,locale:O}=ge(),A=oe(),[i]=se(),{encrypt:F}=ae(),B=X(),v=he();let p={};try{p=JSON.parse(decodeURIComponent(ce(i.get("params"))))}catch(n){console.error("parse connect params failed",n)}xe(i.get("popup"));const{action:m="login",passkeyBehavior:H="both",extraParams:l={},messages:J,...g}=p;L.useEffect(()=>{l.inviter&&window.localStorage.setItem("inviter",l.inviter)},[l.inviter]);const c=i.get("redirect"),T=i.get("opener"),h=i.get("_ek_");l.passportId=R(),m==="login"&&ve(g.forceConnected)&&(g.forceConnected=!1);const w=n=>h?F(JSON.stringify(n),h):n,_=L.useMemo(()=>c||!window.opener?"redirect":"popup",[c]),b=async n=>{const e=await De.federated.getTrustedDomains();if(!T){e.forEach(s=>{window.opener.postMessage(n,Ce(s)),window.opener.postMessage(n,Ie(s))});return}const t=new URL(T);if(!e.includes(t.hostname))throw x.error(a("login.invalidOpenerUrl")),new Error("Invalid login caller");window.opener.postMessage(n,t.origin)},C=({encrypted:n=!0,...e},t,s)=>{d("connect page onSuccess",{encrypted:n,result:e,options:s}),n&&(e.sessionToken&&(e.sessionToken=t(e.sessionToken)),e.refreshToken&&(e.refreshToken=t(e.refreshToken)),e.visitorId&&(e.visitorId=t(e.visitorId)),d("connect page onSuccess decrypt",{result:e})),e.visitorId&&localStorage.setItem("__visitor_id",e.visitorId);const P={type:j,response:e,options:s};({redirect:()=>{d("connect page onSuccess redirect",e),setTimeout(()=>{if(c){const D=decodeURIComponent(c),r=E(D);h&&r.searchParams.set("encrypted",!0),e.sessionToken&&r.searchParams.set("sessionToken",w(e.sessionToken)),e.refreshToken&&r.searchParams.set("refreshToken",w(e.refreshToken)),e.visitorId&&r.searchParams.set("visitorId",w(e.visitorId)),s?.connected_did&&r.searchParams.set("connected_did",s.connected_did),s?.connected_pk&&r.searchParams.set("connected_pk",s.connected_pk),s?.connected_app&&r.searchParams.set("connected_app",s.connected_app),s?.connected_wallet_os&&r.searchParams.set("connected_wallet_os",s.connected_wallet_os),s?.saveConnect&&r.searchParams.set("saveConnect",s.saveConnect),f.postMessage({...be(e,["sessionToken","refreshToken","visitorId"])}),le(D)?window.location.replace(U(r.href,{allowDomains:null})):A(`${r.pathname}${r.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:async()=>{d("connect page onSuccess popup",P),await b(P),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[_]()},W=n=>{const e={type:j,error:n.message,errorDescription:n.message};d("connect page onError",{res:e}),{redirect:()=>{x.error(n.message)},popup:()=>{b(e)}}[_]()},z=pe(()=>{if(m!=="login")return null;const n=window.blocklet?.trustedFactories||[];return n?.length>0?o.jsxs(u,{children:[a("exchangePassport.tooltip1"),o.jsx(u,{component:te,reloadDocument:!0,to:Te(_e(ie.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport"),{redirect:c||"/"}),sx:{color:Pe.primary.light,"&:hover":{textDecoration:"underline dashed"}},children:a("exchangePassport.tooltip2")},"exchange-passport"),o.jsx(u,{component:"ul",sx:{pl:1.5},children:n.map(e=>o.jsx(u,{component:"li",children:e},e))})]}):null},[m]),K=k(async()=>{if(!c)return!0;let n;try{n=new URL(c)}catch{return!1}let e;try{e=new URL(p?.baseUrl)}catch{try{e=new URL(p?.prefix)}catch(t){console.error("baseUrl and prefix are both invalid",t)}}if(e){let t=[];if(e.origin===window.location.origin?t=window.blocklet.domainAliases||[]:t=(await we(e.origin))?.domainAliases||[],!t.includes(n.hostname))return x.error(a("login.invalidRedirectUrl")),!1}return!0}),I=k(()=>{const n=decodeURIComponent(c),e=E(n);window.location.replace(U(e.href,{allowDomains:null}))}),Q=!0,$=!0,q=Z(n=>n.breakpoints.down("lg")),y=k(async()=>{await K()&&Q&&(window.temporaryDIDConnectOnSuccess=(e,t)=>{C(e,t,{saveConnect:!0})},setTimeout(()=>{N.open({locale:O,action:m,passkeyBehavior:H,extraParams:l,...g,className:"connect",popup:!0,messages:J||{title:a("login.connect.title"),scan:a("login.connect.scan"),confirm:a("login.connect.confirm"),success:a("login.connect.success")},extraContent:z,useSocket:!0,allowWallet:["1","true",void 0,null].includes(globalThis.blocklet?.DID_CONNECT_ALLOW_WALLET),onSuccess:C,onError:W,hideCloseButton:$})}))});if(me(()=>{y(),f.addEventListener("message",I)}),ue(()=>{delete window.temporaryDIDConnectOnSuccess,f.removeEventListener("message",I),f.close()}),M.loading)return o.jsxs(o.Fragment,{children:[o.jsx(S,{children:o.jsx("title",{children:"DID Connect"})}),o.jsx(fe,{children:o.jsx(Y,{})})]});const G=globalThis.blocklet.appName,V=globalThis.blocklet.appDescription;return o.jsxs(o.Fragment,{children:[o.jsx(S,{children:o.jsxs("title",{children:[globalThis.blocklet.appName," | DID Connect"]})}),q&&!v.arcSphere?o.jsx(ee,{styles:{"& .did-connect__container-dialog > .MuiBackdrop-root":{backgroundColor:`${B.palette.background.default} !important`}}}):o.jsx(ye,{did:globalThis.blocklet.appPid,title:G,description:V,actions:v.arcSphere?null:o.jsx(ne,{variant:"contained",disableElevation:!0,color:"primary",size:"large",onClick:y,children:a("login.login")})})]})}export{We as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as h}from"./vendor-react-Dvs43sk9.js";import{T as x,L as S,H as f}from"./vendor-ux-CF8ziO7Y.js";import{D as w,a as R,b}from"./index-BmCyA4MW.js";import{f as y,R as I,a1 as T,U as E,aI as U,aJ as P}from"./index-BGoUXEmc.js";import{j as t,ak as m,T as g,I as q,bW as B,W as r,bA as W}from"./vendor-mui-core-CiGwt5P_.js";import"./index-B36DERG2.js";import"./index-BojVbZw0.js";import{u as A}from"./config-space-DFnzGBOV.js";import{f as D}from"./index-DBs9Ljax.js";import{a as F,D as N,C as O}from"./vendor-utils-DAj75QpF.js";import"./api-BfIB6faS.js";function V(){const{t:e}=x();return t.jsx(m,{children:t.jsxs(m,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center"},children:[t.jsx(w,{style:{width:250,height:250}}),t.jsx(g,{sx:{marginTop:"24px"},children:e("storage.spaces.connect.providerForStorage")})]})})}function j({spaceGateway:e,onDeleteSpace:c=()=>{}}){const{t:n}=x(),[a,l]=h.useState(!1),[o,d]=h.useState(!1),u=(s,p)=>{s?.stopPropagation(),l(p)},i=async s=>{try{s?.stopPropagation(),d(!0),await c(e),l(!1)}catch(p){console.error(p),f.error(`${n("storage.spaces.gateway.delete.failed")}: ${D(p)}`)}finally{d(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(q,{size:"small",onClick:s=>u(s,!0),children:t.jsx(B,{})}),t.jsx(S,{title:n("storage.spaces.gateway.delete.title"),open:a,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:o}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined"}},onConfirm:i,onCancel:s=>u(s,!1),children:t.jsx(g,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForStorage",{name:`${e?.name}`})})})]})}j.propTypes={onDeleteSpace:r.func,spaceGateway:r.shape({name:r.string.isRequired,url:r.string.isRequired,protected:r.bool}).isRequired};function C({spaceGateway:e,onDisconnect:c=()=>{}}){const{t:n}=x(),a=async()=>{try{await c(),f.success(n("storage.spaces.gateway.delete.succeeded",{name:e.name?`(${e.name})`:""}))}catch(l){console.error(l),f.error(D(l))}};return t.jsx(j,{spaceGateway:e,onDeleteSpace:a})}C.propTypes={spaceGateway:r.shape({did:r.string.isRequired,name:r.string.isRequired,url:r.string.isRequired,endpoint:r.string.isRequired}).isRequired,onDisconnect:r.func};function X(){const{t:e}=x(),{spaceGateway:c,settingStorageEndpoint:n}=A();return t.jsxs(m,{sx:{display:"flex",flexDirection:"column"},children:[t.jsx(m,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:t.jsx(g,{sx:{fontSize:"1rem",fontWeight:"bold"},children:e("storage.spaces.connected.title")})}),t.jsx(m,{children:t.jsx(R,{sx:{marginTop:2},endpoint:c.endpoint,selected:!0,action:a=>t.jsx(C,{...a,onDisconnect:()=>n(null)})})})]})}function $({blocklet:e}){if(F(e))return{};const{appDid:c}=e,n=y.getAppName(e),a=y.getAppDescription(e),o=e?.site?.domainAliases?.sort((i,s)=>i.accessibility.accessible&&s.accessibility.accessible?+i.isProtected-+s.isProtected:+s.accessibility.accessible-+i.accessibility.accessible)?.map(i=>{const s=i?.domainStatus?.isHttps?"https://":"http://",p=i?.value;return`${s}${p}`}).filter(Boolean)?.[0],d=I.DID_SPACES.AUTHORIZE.DEFAULT_SCOPE,u=window.location.href;return{appDid:c,appName:n,appDescription:a,appUrl:o,scopes:d,referrer:u,isReady:!!o}}function v({onConnect:e=()=>{},...c}){const{blocklet:n}=T(),{info:a}=E(),{t:l}=x(),o=$({blocklet:n}),d=U(a),u={checkFn:N.create({baseURL:O(window.location.origin,P())}).get,webWalletUrl:d,extraParams:{appPid:n.appPid,appDid:o.appDid,appName:o.appName,appDescription:o.appDescription,appUrl:o.appUrl,referrer:o.referrer,scopes:o.scopes,nodeDid:a.did}},i=async({spaceGateway:s})=>{try{await e(s),f.success(l("storage.spaces.connectedWithName",{name:s.name}))}catch(p){console.error(p),f.error(D(p))}};return t.jsx(b,{...c,options:u,onSuccess:i})}v.propTypes={onConnect:W.func};export{X as C,V as D,v as a,$ as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,at as i,W as o}from"./vendor-mui-core-
|
|
1
|
+
import{j as n,at as i,W as o}from"./vendor-mui-core-CiGwt5P_.js";function p({children:e,...t}){return n.jsx(d,{...t,children:e})}p.propTypes={children:o.any.isRequired};const d=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cg as u,ch as c}from"./vendor-mui-core-CiGwt5P_.js";import{N as f,W as s}from"./vendor-ux-CF8ziO7Y.js";function n(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function y(e,t){if(e){if(typeof e=="string")return n(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function b(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},i(e)}function _(e,t){if(t&&(f(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}function O(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}export{O as _,d as a,b,_ as c,i as d,n as e,y as f};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-
|
|
2
|
-
import{b as Yt,n as ft,H as $,T as B,ar as en,as as po,F as ho,a0 as mo,I as go,E as xo,h as bo,C as yo,_}from"./vendor-ux-Dln42oC3.js";import{j as a,W as S,aZ as vo,cL as So,cP as wo,c9 as jo,cQ as Co,cR as Eo,cN as ko,cS as Io,cT as _o,cU as Do,I as pt,aQ as Lo,aR as To,aX as ht,a3 as Ao,M as Po,aO as Ro,a6 as V,aP as Mo,bg as Oo,at as Oe,T as re,bp as No,b6 as Et,bq as kt,ak as E,D as mt,J as ue,ah as Ne,ao as Uo,cV as $o,aj as Bo,cW as tn,cX as nn,cY as on,a$ as Ee,am as De,cZ as It,U as G,aN as rn,bU as Fo,c_ as zo,c$ as Ho,Q as Vo,d0 as qo}from"./vendor-mui-core-DWYIngcn.js";import{r as y,L as sn,i as an,g as Wo,k as Ko,j as Go}from"./vendor-react-Dvs43sk9.js";import{O as Ue,f as M,M as He,a9 as Ve,c as P,N as _t,b8 as Qo,af as Zo,Z as Xo,$ as Jo,b9 as Yo,ba as cn,ad as Y,bb as ln,aE as er,bc as tr,K as nr,aU as or,aV as rr,bd as sr,aW as ir,be as ar,bf as cr,a8 as lr,bg as qe,bh as ur,bi as dr,aT as fr,m as de,X as pr,k as hr,a0 as mr,a as gr,n as Dt,bj as Lt,i as xr,l as br,r as yr,p as ne,o as vr,q as Sr,P as wr,D as jr,H as Cr,ax as Er,aq as kr,bk as Ir,ay as _r,d as Tt,t as Dr}from"./index-CgCJ2qDh.js";import{a5 as Lr,C as se,J as Tr}from"./vendor-utils-J7aLFpEq.js";import{o as Le}from"./vendor-arcblock-B78OG6SS.js";import{u as At}from"./useLocalStorage-BRPtTalQ.js";import{f as gt}from"./index-DBs9Ljax.js";import{C as Pt}from"./confirm-B4BzkG04.js";import{g as Rt}from"./get-safe-url-Ce6hawV-.js";import{u as un}from"./session-BV5HR2vD.js";import{a as Te,l as Ar}from"./vendor-hooks-HB6DqcLv.js";import{k as Pr,c as Rr,M as Mr,b as Or,T as Nr,N as Ur}from"./team-DplrCM_m.js";import{u as dn,D as $r}from"./dot-OPeVWPUi.js";import{u as fn}from"./useSetState-DFuQZPPV.js";import{u as Br,d as Fr}from"./index-cCGBx0sL.js";import{O as zr}from"./over-due-invoice-payment-DhK6jNNQ.js";import{u as Hr}from"./use-mobile-BtGrkCtZ.js";const pn=y.createContext({});function hn({children:e,type:t="blocklets"}){const[n,o]=y.useState([]),r=y.useRef([]),s=l=>{if(!r.current.includes(l)){const u=[...r.current,l];o(u),r.current=u}},i=l=>{if(r.current.includes(l)){const u=r.current.filter(d=>d!==l);o(u),r.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Lr(u,n).forEach(p=>i(p))};return a.jsx(pn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:i,matchDeletingDid:c},children:e})}hn.propTypes={type:S.string,children:S.node.isRequired};function za(){return y.useContext(pn)}const Vr=e=>y.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})),J={Start:vo,Stop:So,Restart:wo,Reload:Do,Remove:jo,Config:_o,Log:Io,Group:ko,Cancel:Co,Dashboard:Vr,Overview:Eo},qr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),o=new URLSearchParams(n.searchParams),r=new URL(se(n.origin,t));return r.search=o.toString(),r.toString()},Wr="internal",Kr="external";function mn({blocklet:e,onStart:t,onComplete:n,variant:o="menu",hasPermission:r=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:i=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=Ue(),[u,d]=y.useState(null),[p,f]=y.useState(null),[b,g]=y.useState(!1),[m,j]=y.useState(null),{t:h}=y.useContext(Yt),[w]=At("skip-blocklet-setup",!1),{loading:C,recommendedUrl:D}=i(e),[k]=At("blocklet-type-filter",Wr),v=M.isInProgress(e.status),[T,F]=y.useState(!1);y.useEffect(()=>{if(!e?.controller)return;F(e?.controller?.status?.value===He.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const I=await l.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(I?.error){console.error("get launcher session failed",I.error);return}F([P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(I?.launcherSession?.status))}catch(I){console.error("call getLauncherSession error",I)}})()},[]);const{inService:z}=l,R=(x,I,W=!1)=>async()=>{const K=async ye=>{t({action:x,blocklet:e}),g(!0),f(x);let ve=!1;try{if(x==="remove")await I(ye);else if(x==="start"){if(!M.hasRunnableComponent(e)){$.error(h("blocklet.noComponent"));return}if(!z&&!w&&!e.settings?.initialized&&e.mode!==He.BLOCKLET_MODES.DEVELOPMENT){if(!D||!_t(D)){$.error(h("blocklet.gotoVisitError"));return}const O=Qo(l.info),Ct=new URL(D);Ct.searchParams.set("serverUrl",O),window.open(Rt(Ct.href,{allowDomains:null})),n({action:x,blocklet:e});return}const U=e.children.filter(O=>!M.isInProgress(O.status)&&O.status!=="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await I({input:X})}else if(["stop","restart","reload"].includes(x)){const U=e.children.filter(O=>O.status==="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await I({input:X})}else{const U={did:e.meta.did};await I({input:U})}x==="remove"?ve=!0:await Zo(1e3),x==="reload"&&$.success(h("blocklet.reloadSuccess")),j(null),n({action:x,blocklet:e})}catch(U){const X=`Blocklet ${x} failed: ${gt(U)}`;throw n({action:x,blocklet:e,error:new Error(X)}),new Error(X)}finally{ve||g(!1)}},xe=()=>{g(!1),j(null)},be=M.getDisplayName(e,!0),uo=e.mode===He.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(re,{component:"div",children:a.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(ye,ve)=>a.jsxs(re,{component:"div",children:[a.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")}),a.jsxs(No,{name:"removeType",value:ye.removeType,onChange:U=>ve({...ye,removeType:U.target.value}),children:[a.jsx(Et,{value:"backup",control:a.jsx(kt,{}),label:h("blocklet.action.removeApplicationAfterBackup")}),a.jsx(Et,{value:"complete",control:a.jsx(kt,{}),label:h("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},fo={stop:{title:`${h("common.stop")} ${be}`,description:h("blocklet.action.stopDescription"),confirm:h("blocklet.action.confirmStop"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe},restart:{title:`${h("common.restart")} ${be}`,description:h("blocklet.action.restartDescription"),confirm:h("blocklet.action.confirmRestart"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe},remove:{title:`${h("common.remove")} ${be}`,confirm:h("blocklet.action.confirmRemove"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe,...uo},cancelDownload:{title:`${h("common.cancel")}`,description:h("blocklet.action.cancelDownloadDescription",{name:be}),confirm:h("common.confirm"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe}};W?j(fo[x]):await K()},oo=!!u,ro=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}d(x.currentTarget)},so=x=>{try{x.stopPropagation(),x.preventDefault()}catch{}d(null)},jt=async(x,I)=>{try{I.stopPropagation(),I.preventDefault()}catch{}if(typeof x.handler=="function")try{g(!0),f(x.action),await x.handler()}catch(W){console.error(`Blocklet ${x.name} failed: `,W)}finally{g(!1),d(null)}else d(null)},io=!z&&M.isDeletableBlocklet(e)?{action:"remove",icon:J.Remove,name:h("common.remove"),handler:R("remove",async({removeType:x})=>{x==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,ao={action:"remove",icon:({sx:x,...I})=>a.jsx(J.Cancel,{sx:{...x,paddingRight:"2px",zoom:.95},...I}),name:h("common.cancel"),handler:R("cancelDownload",l.api.cancelDownloadBlocklet,!0)},co=M.getAppMissingConfigs(e),lo=()=>{const x=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),I=s?.({mountPoint:x,blocklet:e});if(!I||!_t(I)){$.error(h("blocklet.gotoVisitError"));return}const W=e?.site?.domainAliases;window.open(Rt(qr(I,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:W?.map(K=>K.value)}))};let ge=[{action:"start",icon:J.Start,inExternal:!0,name:h("common.start"),handler:R("start",l.api.startBlocklet),disabled:T||e.children.every(x=>x.status==="running")||Ve(e.status)||C||v},{action:"stop",icon:J.Stop,inExternal:!0,name:h("common.stop"),handler:R("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:J.Restart,name:h("common.restart"),handler:R("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},Ve(e.status)?ao:io,{separator:!0},z?null:{action:"dashboard",icon:({style:x,...I})=>a.jsx(J.Dashboard,{...I,style:{...x,width:"26px",height:"26px",paddingRight:"3px"}}),name:h("sidebar.dashboard"),handler:lo}].filter(Boolean);return k===Kr&&(ge=ge.filter(x=>x.inExternal)),o==="menu"?a.jsxs(Mt,{"data-cy":"blocklet-actions",children:[a.jsx(pt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:ro,size:"small",disabled:!r||!Ve(e.status)&&b,children:a.jsx(Lo,{})}),a.jsxs(To,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:oo,onClose:so,PaperProps:{},children:[co.length>0&&a.jsxs(ht,{style:{maxWidth:"400px"},severity:"error",children:[h("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(sn,{to:`/blocklets/${e.meta.did}/components`,children:h("blocklet.config.gotoFix")})]}),ge.map((x,I)=>x.separator?a.jsx(Ao,{},`separator-${I}`):a.jsxs(Po,{dense:!0,onClick:W=>jt(x,W),disabled:b||x.disabled,"data-cy":`${x.action}-blocklet`,children:[a.jsx(Ro,{style:{minWidth:24},children:p===x.action&&b?a.jsx(V,{size:16,sx:{marginRight:1}}):a.jsx(x.icon,{fontSize:"small"})}),a.jsx(Mo,{primary:x.name})]},x.name))]}),m&&a.jsx(Pt,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):a.jsxs(Mt,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Oo,{children:ge.filter(x=>!x.separator&&!x.onlyInMenu).map(x=>a.jsxs(ft,{title:x.name,"data-cy":`${x.action}-blocklet`,onClick:()=>jt(x),disabled:!!x.disabled||b,children:[p===x.action&&b?a.jsx(V,{size:16,sx:{marginRight:1}}):a.jsx(x.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:x.name})]},x.name))}),m&&a.jsx(Pt,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}mn.propTypes={getComponentUrl:S.func,blocklet:S.object.isRequired,onStart:S.func.isRequired,onComplete:S.func.isRequired,variant:S.oneOf(["menu","group"]),hasPermission:S.bool,useBlockletUrlEvaluation:S.func};const Mt=Oe.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-B9tZ4qc6.js","assets/vendor-mui-core-CiGwt5P_.js","assets/vendor-react-Dvs43sk9.js","assets/useLocalStorage-oSchpz1c.js","assets/vendor-ux-CF8ziO7Y.js","assets/vendor-utils-DAj75QpF.js","assets/vendor-hooks-0NQwJuRY.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/index-BGoUXEmc.js","assets/vendor-arcblock-C7W5M07l.js","assets/index-DrVXX4fX.css","assets/bundle-avatar-BPnP6pIL.js","assets/log-1sZ_L4eJ.css","assets/index-Ce_ilge5.js","assets/index-DLHMwUmK.js","assets/user-sessions-7gxEZAmB.js","assets/index-UTcxT75j.js","assets/did-address-D4l1uYd1.js","assets/team-BESj-ofA.js","assets/session-ulvrJT-t.js","assets/isURL-sHTYO46x.js","assets/permission-D-kAjshH.js","assets/click-to-copy-BqGY_Kr7.js","assets/index-BL2NEiva.js","assets/arrow-down.svg-B9dO_KDq.js","assets/vendor-mui-x-CXaju64L.js","assets/AdapterDayjs-DJ-f1i8A.js","assets/index-DBs9Ljax.js","assets/useAsync-NmGtaPYZ.js","assets/useAsync-kpO9-9ye.js","assets/index-C80MI1u_.js","assets/confirm-5JMMSGdh.js","assets/index-CzttGWll.js","assets/util-D52ViY5P.js","assets/base32-TX5fATAF.js","assets/sdk-C6BkT6-0.js","assets/actions-CRUvIBLz.js","assets/shorten-label--tw3nR45.js","assets/get-safe-url-CZlaSf1L.js","assets/dot-BOuza8rS.js","assets/useSetState-DFuQZPPV.js","assets/index-Ft5IyfHH.js","assets/over-due-invoice-payment-YS7NZYQD.js","assets/use-mobile-DXb1p_2Q.js","assets/index-iY8rmPEZ.js","assets/use-mobile-CiJJ-F32.js","assets/index.esm-JPZAjt0x.js","assets/table-tips-DQHiKZsk.js","assets/index-CZXuMAQy.js","assets/empty-spinner-D_3bEG2p.js","assets/list-header-DLhxtl5g.js","assets/question-mark-circle.svg-B4stD6SS.js","assets/engine-Bm7Qp-7f.js","assets/api-BfIB6faS.js","assets/react-beautiful-dnd.esm-D2jtRKWT.js","assets/raf-schd.esm-CHNehTG3.js","assets/use-promise-window-open-I4QIABtm.js","assets/wait-connect-Cll9F6lE.js","assets/item-BlUr7rKO.js","assets/delete-confirm-saPgrAIL.js","assets/index-NVKZ_ZUS.js","assets/index-CRFxmuV0.js","assets/index-gnjjKJuC.css","assets/index-CGngFFes.js","assets/overview-re3EXfMP.js","assets/keyboard-arrow-down-rounded-8U0_i9QO.js","assets/index-BojVbZw0.js","assets/status-T58XBbiV.js","assets/omit-CXy6Rymi.js","assets/spaces-wJwcbibW.js","assets/domains-C_XAIIRT.js","assets/domain-action-card-Ds6lQa7Z.js","assets/util-H8b0otwY.js","assets/index-C7DDH7Uf.js","assets/passport-item-8olNdxYA.js","assets/index-B36DERG2.js","assets/Google-BvsSmJCS.js","assets/cloneDeep-CKVXBkcT.js","assets/edit.svg-DycWG9v3.js","assets/lock.svg-COUP8tyO.js","assets/appearance-CL1LSpJB.js","assets/audit-logs-EC_F2BOT.js","assets/index-Bzde7Bh8.js","assets/section-dVgXR9AT.js","assets/required-BE3i31mZ.js","assets/collapse-jk2ONGPl.js","assets/list-Y-a4PO0u.js","assets/server-logo-notext.svg-CKQB0tIp.js","assets/traffic-Ck4_JTUO.js","assets/iframe-DCdtoFjc.js","assets/index-ElG08lIx.js","assets/base-chart-2nBOSo9s.js","assets/index-D3pV4Lj0.js","assets/config-navigation-D63aLfma.js","assets/index-BPy8_fa2.js","assets/createClass-Ig9AWyIK.js","assets/simple-select-6w3ryEQx.js","assets/index-1WiLWIAu.js","assets/index-B_CAM-3t.js","assets/index-BmCyA4MW.js","assets/index-DRYJ0xIl.js","assets/connect-to-CvyIrlXc.js","assets/config-space-DFnzGBOV.js","assets/switch-control-BuqCLgsC.js","assets/index-B0pGy8t9.js","assets/github-icon-CH2zo-td.js","assets/index-JVicMopH.js","assets/security-DnTqhJwZ.js","assets/config-W_iStCFi.js","assets/branding-7KMxNl9d.js","assets/sanitize-DTRB99ZZ.js","assets/form-text-input-BHd2ybwR.js","assets/form-wrapper-DuJOKczF.js","assets/logo-uploader-BDvl-p1h.js","assets/advanced-DF-eCD_V.js","assets/runtime-BPzGyz-O.js","assets/index-DwEMr0X-.js","assets/list-Bty_q29b.js","assets/index-BSJbc4Ic.js","assets/config-CPpGYWww.js","assets/empty-DhZfJeme.js","assets/observability-hUM5rYTW.js","assets/playground-wmO_IQQj.js","assets/component-BiE6SG5y.js","assets/add-component-core-CshRctcL.js","assets/launch-result-message-3VxQH2Cy.js","assets/page-header-DMbjH45Q.js","assets/index-CtENECgD.js","assets/content-layout-Mn94hzXe.js","assets/search-4YYphs0l.js","assets/add-component-core-G0iZE90Q.css","assets/index-B5_zLKFf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{b as Yt,n as ft,H as $,T as B,as as en,at as po,F as ho,a1 as mo,J as go,E as xo,h as bo,I as yo,_}from"./vendor-ux-CF8ziO7Y.js";import{j as a,W as S,aZ as vo,cM as So,cQ as wo,ca as jo,cR as Co,cS as Eo,cO as Io,cT as _o,cU as ko,cV as Do,I as pt,aQ as To,aR as Lo,aX as ht,a3 as Ao,M as Po,aO as Ro,a6 as H,aP as Mo,bg as Oo,at as Oe,T as re,bp as No,b6 as Et,bq as It,ak as E,D as mt,J as ue,ah as Ne,ao as Uo,cW as $o,aj as Bo,cX as tn,cY as nn,cZ as on,a$ as Ee,am as De,c_ as _t,U as G,aN as rn,bZ as Fo,c$ as zo,d0 as Vo,Q as Ho,d1 as qo}from"./vendor-mui-core-CiGwt5P_.js";import{r as x,L as sn,i as an,g as Wo,k as Ko,j as Go}from"./vendor-react-Dvs43sk9.js";import{U as Ue,f as M,R as Ve,a9 as He,c as P,T as kt,be as Qo,af as Zo,a1 as Xo,v as Jo,bf as Yo,bg as cn,ad as Y,bh as ln,aK as er,bi as tr,Q as nr,a_ as or,a$ as rr,bj as sr,b0 as ir,bk as ar,bl as cr,a8 as lr,bm as qe,bn as ur,bo as dr,aZ as fr,m as de,$ as pr,k as hr,a3 as mr,a as gr,n as Dt,bp as Tt,i as xr,l as br,r as yr,p as ne,o as vr,q as Sr,P as wr,E as jr,H as Cr,ap as Er,at as Ir,bq as _r,aq as kr,d as Lt,t as Dr}from"./index-BGoUXEmc.js";import{a5 as Tr,C as se,J as Lr}from"./vendor-utils-DAj75QpF.js";import{o as Te}from"./vendor-arcblock-C7W5M07l.js";import{u as At}from"./useLocalStorage-oSchpz1c.js";import{f as gt}from"./index-DBs9Ljax.js";import{C as Pt}from"./confirm-5JMMSGdh.js";import{g as Rt}from"./get-safe-url-CZlaSf1L.js";import{u as un}from"./session-ulvrJT-t.js";import{a as Le,l as Ar}from"./vendor-hooks-0NQwJuRY.js";import{k as Pr,c as Rr,M as Mr,b as Or,T as Nr,N as Ur}from"./team-BESj-ofA.js";import{u as dn,D as $r}from"./dot-BOuza8rS.js";import{u as fn}from"./useSetState-DFuQZPPV.js";import{u as Br,d as Fr}from"./index-Ft5IyfHH.js";import{O as zr}from"./over-due-invoice-payment-YS7NZYQD.js";import{u as Vr}from"./use-mobile-DXb1p_2Q.js";const pn=x.createContext({});function hn({children:e,type:t="blocklets"}){const[n,o]=x.useState([]),r=x.useRef([]),s=l=>{if(!r.current.includes(l)){const u=[...r.current,l];o(u),r.current=u}},i=l=>{if(r.current.includes(l)){const u=r.current.filter(d=>d!==l);o(u),r.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Tr(u,n).forEach(p=>i(p))};return a.jsx(pn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:i,matchDeletingDid:c},children:e})}hn.propTypes={type:S.string,children:S.node.isRequired};function qa(){return x.useContext(pn)}const Hr=e=>x.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})),J={Start:vo,Stop:So,Restart:wo,Reload:Do,Remove:jo,Config:ko,Log:_o,Group:Io,Cancel:Co,Dashboard:Hr,Overview:Eo},qr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),o=new URLSearchParams(n.searchParams),r=new URL(se(n.origin,t));return r.search=o.toString(),r.toString()},Wr="internal",Kr="external";function mn({blocklet:e,onStart:t,onComplete:n,variant:o="menu",hasPermission:r=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:i=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=Ue(),[u,d]=x.useState(null),[p,f]=x.useState(null),[y,g]=x.useState(!1),[m,j]=x.useState(null),{t:h}=x.useContext(Yt),[w]=At("skip-blocklet-setup",!1),{loading:C,recommendedUrl:D}=i(e),[I]=At("blocklet-type-filter",Wr),v=M.isInProgress(e.status),[L,F]=x.useState(!1);x.useEffect(()=>{if(!e?.controller)return;F(e?.controller?.status?.value===Ve.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const k=await l.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(k?.error){console.error("get launcher session failed",k.error);return}F([P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(k?.launcherSession?.status))}catch(k){console.error("call getLauncherSession error",k)}})()},[]);const{inService:z}=l,R=(b,k,W=!1)=>async()=>{const K=async ye=>{t({action:b,blocklet:e}),g(!0),f(b);let ve=!1;try{if(b==="remove")await k(ye);else if(b==="start"){if(!M.hasRunnableComponent(e)){$.error(h("blocklet.noComponent"));return}if(!z&&!w&&!e.settings?.initialized&&e.mode!==Ve.BLOCKLET_MODES.DEVELOPMENT){if(!D||!kt(D)){$.error(h("blocklet.gotoVisitError"));return}const O=Qo(l.info),Ct=new URL(D);Ct.searchParams.set("serverUrl",O),window.open(Rt(Ct.href,{allowDomains:null})),n({action:b,blocklet:e});return}const U=e.children.filter(O=>!M.isInProgress(O.status)&&O.status!=="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await k({input:X})}else if(["stop","restart","reload"].includes(b)){const U=e.children.filter(O=>O.status==="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await k({input:X})}else{const U={did:e.meta.did};await k({input:U})}b==="remove"?ve=!0:await Zo(1e3),b==="reload"&&$.success(h("blocklet.reloadSuccess")),j(null),n({action:b,blocklet:e})}catch(U){const X=`Blocklet ${b} failed: ${gt(U)}`;throw n({action:b,blocklet:e,error:new Error(X)}),new Error(X)}finally{ve||g(!1)}},xe=()=>{g(!1),j(null)},be=M.getDisplayName(e,!0),uo=e.mode===Ve.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(re,{component:"div",children:a.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(ye,ve)=>a.jsxs(re,{component:"div",children:[a.jsx(re,{gutterBottom:!0,children:h("blocklet.action.removeApplicationDescription")}),a.jsxs(No,{name:"removeType",value:ye.removeType,onChange:U=>ve({...ye,removeType:U.target.value}),children:[a.jsx(Et,{value:"backup",control:a.jsx(It,{}),label:h("blocklet.action.removeApplicationAfterBackup")}),a.jsx(Et,{value:"complete",control:a.jsx(It,{}),label:h("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},fo={stop:{title:`${h("common.stop")} ${be}`,description:h("blocklet.action.stopDescription"),confirm:h("blocklet.action.confirmStop"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe},restart:{title:`${h("common.restart")} ${be}`,description:h("blocklet.action.restartDescription"),confirm:h("blocklet.action.confirmRestart"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe},remove:{title:`${h("common.remove")} ${be}`,confirm:h("blocklet.action.confirmRemove"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe,...uo},cancelDownload:{title:`${h("common.cancel")}`,description:h("blocklet.action.cancelDownloadDescription",{name:be}),confirm:h("common.confirm"),cancel:h("common.cancel"),onConfirm:K,onCancel:xe}};W?j(fo[b]):await K()},oo=!!u,ro=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(b.currentTarget)},so=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(null)},jt=async(b,k)=>{try{k.stopPropagation(),k.preventDefault()}catch{}if(typeof b.handler=="function")try{g(!0),f(b.action),await b.handler()}catch(W){console.error(`Blocklet ${b.name} failed: `,W)}finally{g(!1),d(null)}else d(null)},io=!z&&M.isDeletableBlocklet(e)?{action:"remove",icon:J.Remove,name:h("common.remove"),handler:R("remove",async({removeType:b})=>{b==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:v}:null,ao={action:"remove",icon:({sx:b,...k})=>a.jsx(J.Cancel,{sx:{...b,paddingRight:"2px",zoom:.95},...k}),name:h("common.cancel"),handler:R("cancelDownload",l.api.cancelDownloadBlocklet,!0)},co=M.getAppMissingConfigs(e),lo=()=>{const b=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),k=s?.({mountPoint:b,blocklet:e});if(!k||!kt(k)){$.error(h("blocklet.gotoVisitError"));return}const W=e?.site?.domainAliases;window.open(Rt(qr(k,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:W?.map(K=>K.value)}))};let ge=[{action:"start",icon:J.Start,inExternal:!0,name:h("common.start"),handler:R("start",l.api.startBlocklet),disabled:L||e.children.every(b=>b.status==="running")||He(e.status)||C||v},{action:"stop",icon:J.Stop,inExternal:!0,name:h("common.stop"),handler:R("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:J.Restart,name:h("common.restart"),handler:R("restart",l.api.restartBlocklet,!0),disabled:L||e.status!=="running"},He(e.status)?ao:io,{separator:!0},z?null:{action:"dashboard",icon:({style:b,...k})=>a.jsx(J.Dashboard,{...k,style:{...b,width:"26px",height:"26px",paddingRight:"3px"}}),name:h("sidebar.dashboard"),handler:lo}].filter(Boolean);return I===Kr&&(ge=ge.filter(b=>b.inExternal)),o==="menu"?a.jsxs(Mt,{"data-cy":"blocklet-actions",children:[a.jsx(pt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:ro,size:"small",disabled:!r||!He(e.status)&&y,children:a.jsx(To,{})}),a.jsxs(Lo,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:oo,onClose:so,PaperProps:{},children:[co.length>0&&a.jsxs(ht,{style:{maxWidth:"400px"},severity:"error",children:[h("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(sn,{to:`/blocklets/${e.meta.did}/components`,children:h("blocklet.config.gotoFix")})]}),ge.map((b,k)=>b.separator?a.jsx(Ao,{},`separator-${k}`):a.jsxs(Po,{dense:!0,onClick:W=>jt(b,W),disabled:y||b.disabled,"data-cy":`${b.action}-blocklet`,children:[a.jsx(Ro,{style:{minWidth:24},children:p===b.action&&y?a.jsx(H,{size:16,sx:{marginRight:1}}):a.jsx(b.icon,{fontSize:"small"})}),a.jsx(Mo,{primary:b.name})]},b.name))]}),m&&a.jsx(Pt,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]}):a.jsxs(Mt,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Oo,{children:ge.filter(b=>!b.separator&&!b.onlyInMenu).map(b=>a.jsxs(ft,{title:b.name,"data-cy":`${b.action}-blocklet`,onClick:()=>jt(b),disabled:!!b.disabled||y,children:[p===b.action&&y?a.jsx(H,{size:16,sx:{marginRight:1}}):a.jsx(b.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:b.name})]},b.name))}),m&&a.jsx(Pt,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}mn.propTypes={getComponentUrl:S.func,blocklet:S.object.isRequired,onStart:S.func.isRequired,onComplete:S.func.isRequired,variant:S.oneOf(["menu","group"]),hasPermission:S.bool,useBlockletUrlEvaluation:S.func};const Mt=Oe.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import{b as Yt,n as ft,H as $,T as B,ar as en,as as po,F as ho,a0 as mo,I as go,
|
|
|
9
9
|
font-size: 10px;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
`,Ot=
|
|
12
|
+
`,Ot=x.memo(mn),Gr=e=>{const t={};let n=null;return M.forEachBlockletSync(e,o=>{t[o.meta.bundleDid]?n=M.getDisplayName(o,!0):o.meta.bundleDid&&(t[o.meta.bundleDid]=!0)}),n},Qr=(e,t,n)=>{const{hostname:o,href:r}=e;if(!t)return r;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(o);if(!i)return r;const c=i[0],u=((t.site?.domainAliases||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(P.DEFAULT_DID_DOMAIN))||"").replace(`.${P.DEFAULT_DID_DOMAIN}`,"");return u?r.replace(o,`${u}-${c}.${P.DEFAULT_IP_DOMAIN_SUFFIX}`):r}return r.replace(t.meta.bundleDid,t.appPid)};function Zr(){const{t:e}=B(),{api:t}=un(),{blocklet:n}=Xo(),{inService:o}=Ue(),[r,s]=x.useState(!1),[i,c]=x.useState(5),l=n&&n.structVersion!==P.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){$.error(e("blocklet.migrate.tip.running"));return}const f=Gr(n);if(f){$.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){$.error(gt(f))}},d=()=>{const f=Qr(window.location,n,o);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(y=>y-1)},1e3)},p=()=>s(!1);return[l&&a.jsxs(ht,{severity:"warning",style:{margin:"12px 0"},children:[a.jsxs(E,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(ft,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),a.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>a.jsx(E,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&a.jsx(Jo,{popup:!0,open:r,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:Yo(n,!0),title:M.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}function Xr(){const e=mt();return[...e.breakpoints.keys].reverse().reduce((n,o)=>{const r=ue(e.breakpoints.up(o));return!n&&r?o:n},null)||"xs"}function Jr(e){return a.jsx(Ne,{...e,children:a.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Yr(e){return a.jsx(Ne,{...e,children:a.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function es(e){return a.jsx(Ne,{...e,children:a.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function ts(e){return a.jsx(Ne,{...e,children:a.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Se={fontSize:20,marginInlineEnd:8},ns={success:a.jsx(Jr,{style:Se}),warning:a.jsx(Yr,{style:Se}),error:a.jsx(es,{style:Se}),info:a.jsx(ts,{style:Se})},os={xl:"400px",lg:"400px",md:"400px",sm:"300px"};function gn({keyId:e,notification:t={},viewAllUrl:n,content:o=null},r){const s=mt(),i=ns[t.severity],{closeSnackbar:c}=en(),l=()=>c(e),u=an(),d=()=>{c(e),u(n)},p=Le(()=>Pr(t),[t]),f=Le(()=>t?.activity,[t]),y=Rr({activity:f,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:s.palette.primary.main,userDid:t?.receivers?.[0]?.did}}),g=Xr();return a.jsxs(E,{component:po,ref:r,sx:[{...s.typography.body2,display:"flex",backgroundColor:s.palette.background.default,color:"#fff",alignItems:"center",pl:2.5,pr:2,py:.75,borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",width:os[g]},t.severity==="success"?{backgroundColor:`${Uo[600]} !important`}:{},t.severity==="error"?{backgroundColor:`${s.palette.error.dark} !important`}:{},t.severity==="info"?{backgroundColor:`${s.palette.primary.main} !important`}:{},t.severity==="warning"?{backgroundColor:`${$o[700]} !important`}:{}],children:[a.jsxs(E,{sx:{display:"flex",alignItems:"center",py:1,flex:1},children:[i,a.jsx(ss,{onClick:d,sx:{flex:1},children:a.jsx(E,{children:p?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"title",children:y}),f.meta?a.jsx(Mr,{meta:f.meta,type:f.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"title",children:t.title}),o||a.jsx("span",{className:"desc",children:t.description})]})})})]}),a.jsx(E,{sx:{display:"flex",alignItems:"center",ml:"auto",mr:-1,width:44},children:a.jsx(pt,{"aria-label":"close",color:"inherit",onClick:l,size:"large",children:a.jsx(E,{component:Bo,sx:{fontSize:20}})},"close")})]})}const rs=x.forwardRef(gn);gn.propTypes={viewAllUrl:S.string.isRequired,keyId:S.number.isRequired,notification:S.object.isRequired,content:S.node};const ss=Oe.div`
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
@@ -29,7 +29,7 @@ import{b as Yt,n as ft,H as $,T as B,ar as en,as as po,F as ho,a0 as mo,I as go,
|
|
|
29
29
|
-webkit-box-orient: vertical;
|
|
30
30
|
word-break: break-word;
|
|
31
31
|
}
|
|
32
|
-
`;var
|
|
32
|
+
`;var T=function(t,n,o){return tn.call(n,"css")?a.jsx(nn,on(t,n),o):a.jsx(t,n,o)},we=function(t,n,o){return tn.call(n,"css")?a.jsxs(nn,on(t,n),o):a.jsxs(t,n,o)};/**
|
|
33
33
|
* (c) Iconify
|
|
34
34
|
*
|
|
35
35
|
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
@@ -39,7 +39,7 @@ import{b as Yt,n as ft,H as $,T as B,ar as en,as as po,F as ho,a0 as mo,I as go,
|
|
|
39
39
|
*
|
|
40
40
|
* @license MIT
|
|
41
41
|
* @version 3.1.1
|
|
42
|
-
*/const xn=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fe=Object.freeze({...xn,...Ae}),tt=Object.freeze({...fe,body:"",hidden:!1});function is(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Nt(e,t){const n=is(e,t);for(const o in tt)o in Ae?o in e&&!(o in n)&&(n[o]=Ae[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function as(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function s(i){if(n[i])return r[i]=[];if(!(i in r)){r[i]=null;const c=o[i]&&o[i].parent,l=c&&s(c);l&&(r[i]=[c].concat(l))}return r[i]}return Object.keys(n).concat(Object.keys(o)).forEach(s),r}function cs(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let s={};function i(c){s=Nt(o[c]||r[c],s)}return i(t),n.forEach(i),Nt(e,s)}function ls(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=as(e);for(const r in o){const s=o[r];s&&(t(r,cs(e,r,s)),n.push(r))}return n}const ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,te=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const c=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:o,prefix:l,name:c};return t&&!ke(u)?null:u}const s=r[0],i=s.split("-");if(i.length>1){const c={provider:o,prefix:i.shift(),name:i.join("-")};return t&&!ke(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:s};return t&&!ke(c,n)?null:c}return null},ke=(e,t)=>e?!!((e.provider===""||e.provider.match(ie))&&(t&&e.prefix===""||e.prefix.match(ie))&&e.name.match(ie)):!1,us={provider:"",aliases:{},not_found:{},...xn};function We(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ds(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!We(e,us))return null;const n=t.icons;for(const r in n){const s=n[r];if(!r.match(ie)||typeof s.body!="string"||!We(s,tt))return null}const o=t.aliases||Object.create(null);for(const r in o){const s=o[r],i=s.parent;if(!r.match(ie)||typeof i!="string"||!n[i]&&!o[i]||!We(s,tt))return null}return t}const Pe=Object.create(null);function fs(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function N(e,t){const n=Pe[e]||(Pe[e]=Object.create(null));return n[t]||(n[t]=fs(e,t))}function xt(e,t){return ds(t)?ls(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ps(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function hs(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Pe)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Pe[r]||{})).forEach(i=>{const c=N(r,i);n=n.concat(Object.keys(c.icons).map(l=>(r!==""?"@"+r+":":"")+i+":"+l))})}),n}let bt=!1;function ms(e){return bt}function pe(e){const t=typeof e=="string"?te(e,!0,bt):e;if(t){const n=N(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function gs(e,t){const n=te(e,!0,bt);if(!n)return!1;const o=N(n.provider,n.prefix);return ps(o,n.name,t)}function bn(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!ke({provider:t,prefix:n,name:"a"}))return!1;const o=N(t,n);return!!xt(o,e)}function xs(e){return!!pe(e)}function bs(e){const t=pe(e);return t?{...fe,...t}:null}const yn=Object.freeze({width:null,height:null}),vn=Object.freeze({...yn,...Ae}),ys=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(ys);if(o===null||!o.length)return e;const r=[];let s=o.shift(),i=vs.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?r.push(s):r.push(Math.ceil(c*t*n)/n)}else r.push(s);if(s=o.shift(),s===void 0)return r.join("");i=!i}}const Ss=e=>e==="unset"||e==="undefined"||e==="none";function $e(e,t){const n={...fe,...e},o={...vn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,o].forEach(g=>{const m=[],j=g.hFlip,h=g.vFlip;let w=g.rotate;j?h?w+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):h&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=r.height/2+r.top,m.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:C=r.width/2+r.left,m.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(r.left!==r.top&&(C=r.left,r.left=r.top,r.top=C),r.width!==r.height&&(C=r.width,r.width=r.height,r.height=C)),m.length&&(s='<g transform="'+m.join(" ")+'">'+s+"</g>")});const i=o.width,c=o.height,l=r.width,u=r.height;let d,p;i===null?(p=c===null?"1em":c==="auto"?u:c,d=nt(p,l/u)):(d=i==="auto"?l:i,p=c===null?nt(d,u/l):c==="auto"?u:c);const f={},b=(g,m)=>{Ss(m)||(f[g]=m.toString())};return b("width",d),b("height",p),f.viewBox=r.left.toString()+" "+r.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:s}}const ws=/\sid="(\S+)"/g,js="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Cs=0;function Sn(e,t=js){const n=[];let o;for(;o=ws.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(Cs++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Q={local:!0,session:!0},wn={local:new Set,session:new Set};let yt=!1;function Es(e){yt=e}const Ut="iconify2",le="iconify",jn=le+"-count",$t=le+"-version",Cn=36e5,ks=168;function ot(e,t){try{return e.getItem(t)}catch{}}function vt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Bt(e,t){try{e.removeItem(t)}catch{}}function rt(e,t){return vt(e,jn,t.toString())}function st(e){return parseInt(ot(e,jn))||0}let je=typeof window>"u"?{}:window;function En(e){const t=e+"Storage";try{if(je&&je[t]&&typeof je[t].length=="number")return je[t]}catch{}Q[e]=!1}function kn(e,t){const n=En(e);if(!n)return;const o=ot(n,$t);if(o!==Ut){if(o){const c=st(n);for(let l=0;l<c;l++)Bt(n,le+l.toString())}vt(n,$t,Ut),rt(n,0);return}const r=Math.floor(Date.now()/Cn)-ks,s=c=>{const l=le+c.toString(),u=ot(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>r&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Bt(n,l)}};let i=st(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,rt(n,i)):wn[e].add(c))}function In(){if(!yt){Es(!0);for(const e in Q)kn(e,t=>{const n=t.data,o=t.provider,r=n.prefix,s=N(o,r);if(!xt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function _n(e,t){switch(e){case"local":case"session":Q[e]=t;break;case"all":for(const n in Q)Q[n]=t;break}}const it=Object.create(null);function Dn(e,t){it[e]=t}function at(e){return it[e]||it[""]}function St(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 Be=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],Ie=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?Ie.push(oe.shift()):Ie.push(oe.pop());Be[""]=St({resources:["https://api.iconify.design"].concat(Ie)});function Ln(e,t){const n=St(t);return n===null?!1:(Be[e]=n,!0)}function Fe(e){return Be[e]}function Is(){return Object.keys(Be)}const _s=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Re=_s();function Ds(e){Re=e}function Ls(){return Re}function Ts(e,t){const n=Fe(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(i=>{r=Math.max(r,i.length)});const s=t+".json?icons=";o=n.maxURL-r-n.path.length-s.length}return o}function As(e){return e===404}const Ps=(e,t,n)=>{const o=[],r=Ts(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=r&&u>0&&(o.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),o.push(i),o};function Rs(e){if(typeof e=="string"){const t=Fe(e);if(t)return t.path}return"/"}const Ms=(e,t,n)=>{if(!Re){n("abort",424);return}let o=Rs(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});o+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;o+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let r=503;Re(e+o).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(As(i)?"abort":"next",i)});return}return r=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",r)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",r)})},Os={prepare:Ps,send:Ms};function Ns(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,s)=>r.provider!==s.provider?r.provider.localeCompare(s.provider):r.prefix!==s.prefix?r.prefix.localeCompare(s.prefix):r.name.localeCompare(s.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const s=r.provider,i=r.prefix,c=r.name,l=n[s]||(n[s]=Object.create(null)),u=l[i]||(l[i]=N(s,i));let d;c in u.icons?d=t.loaded:i===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:s,prefix:i,name:c};d.push(p)}),t}function Tn(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Us(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==r)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))i.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||Tn([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let $s=0;function Bs(e,t,n){const o=$s++,r=Tn.bind(null,n,o);if(!t.pending.length)return r;const s={id:o,icons:t,callback:e,abort:r};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),r}function Fs(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const s=typeof r=="string"?te(r,t,n):r;s&&o.push(s)}),o}var zs={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Hs(e,t,n,o){const r=e.resources.length,s=e.random?Math.floor(Math.random()*r):e.index;let i;if(e.random){let v=e.resources.slice(0);for(i=[];v.length>1;){const T=Math.floor(Math.random()*v.length);i.push(v[T]),v=v.slice(0,T).concat(v.slice(T+1))}i=i.concat(v)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",u=0,d,p=null,f=[],b=[];typeof o=="function"&&b.push(o);function g(){p&&(clearTimeout(p),p=null)}function m(){l==="pending"&&(l="aborted"),g(),f.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),f=[]}function j(v,T){T&&(b=[]),typeof v=="function"&&b.push(v)}function h(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:j,abort:m}}function w(){l="failed",b.forEach(v=>{v(void 0,d)})}function C(){f.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),f=[]}function D(v,T,F){const z=T!=="success";switch(f=f.filter(R=>R!==v),l){case"pending":break;case"failed":if(z||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){d=F,w();return}if(z){d=F,f.length||(i.length?k():w());return}if(g(),C(),!e.random){const R=e.resources.indexOf(v.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",b.forEach(R=>{R(F)})}function k(){if(l!=="pending")return;g();const v=i.shift();if(v===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(C(),w())},e.timeout);return}w();return}const T={status:"pending",resource:v,callback:(F,z)=>{D(T,F,z)}};f.push(T),u++,p=setTimeout(k,e.rotate),n(v,t,T.callback)}return setTimeout(k),h}function An(e){const t={...zs,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function r(c,l,u){const d=Hs(t,c,l,(p,f)=>{o(),u&&u(p,f)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:r,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function Ft(){}const Ke=Object.create(null);function Vs(e){if(!Ke[e]){const t=Fe(e);if(!t)return;const n=An(t),o={config:t,redundancy:n};Ke[e]=o}return Ke[e]}function Pn(e,t,n){let o,r;if(typeof e=="string"){const s=at(e);if(!s)return n(void 0,424),Ft;r=s.send;const i=Vs(e);i&&(o=i.redundancy)}else{const s=St(e);if(s){o=An(s);const i=e.resources?e.resources[0]:"",c=at(i);c&&(r=c.send)}}return!o||!r?(n(void 0,424),Ft):o.query(t,r,n)().abort}function qs(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in Q)kn(o,r=>{const s=r.data;return r.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Ws(e,t){yt||In();function n(o){let r;if(!Q[o]||!(r=En(o)))return;const s=wn[o];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=st(r),!rt(r,i+1))return;const c={cached:Math.floor(Date.now()/Cn),provider:e.provider,data:t};return vt(r,le+i.toString(),JSON.stringify(c))}t.lastModified&&!qs(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function zt(){}function Ks(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Us(e)}))}function Gs(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let s;if(!r||!(s=at(n)))return;s.prepare(n,o,r).forEach(c=>{Pn(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=xt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),Ws(e,l)}catch(u){console.error(u)}Ks(e)})})}))}const Qs=e=>{const n=N(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},wt=(e,t)=>{const n=Fs(e,!0,ms()),o=Ns(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,zt)}),()=>{l=!1}}const r=Object.create(null),s=[];let i,c;return o.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===i)return;i=u,c=d,s.push(N(u,d));const p=r[u]||(r[u]=Object.create(null));p[d]||(p[d]=[])}),o.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=N(u,d),b=f.pendingIcons||(f.pendingIcons=new Set);b.has(p)||(b.add(p),r[u][d].push(p))}),s.forEach(l=>{const{provider:u,prefix:d}=l;r[u][d].length&&Gs(l,r[u][d])}),t?Bs(t,o,s):zt},Zs=e=>new Promise((t,n)=>{const o=typeof e=="string"?te(e,!0):e;if(!o){n(e);return}wt([o||e],r=>{if(r.length&&o){const s=pe(o);if(s){t({...fe,...s});return}}n(e)})});function Rn(e,t){const n={...e};for(const o in t){const r=t[o],s=typeof r;o in yn?(r===null||r&&(s==="string"||s==="number"))&&(n[o]=r):s===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const ze={...vn,inline:!1},Ge="iconify",ct="iconify-inline",q="iconifyData"+Date.now();let Z=[];function he(e){for(let t=0;t<Z.length;t++){const n=Z[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Mn(e,t=!1){let n=he(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},Z.push(n),n)}function Xs(){if(document.documentElement)return Mn(document.documentElement);Z.push({node:()=>document.documentElement})}function Js(e){Z=Z.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function me(){return Z}function Ys(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ae=null;const ei={childList:!0,subtree:!0,attributes:!0};function On(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ae&&ae(e)}))}function ti(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let o=0;o<t.length;o++){const r=t[o];if(r.addedNodes&&r.addedNodes.length>0||r.type==="attributes"&&r.target[q]!==void 0){n.paused||On(e);return}}}function Nn(e,t){e.observer.instance.observe(t,ei)}function Me(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(ti.bind(null,e)),Nn(e,n),t.paused||On(e))}function Ht(){me().forEach(Me)}function Un(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 ni(e){const t=ae!==null;if(ae!==e&&(ae=e,t&&me().forEach(Un)),t){Ht();return}Ys(Ht)}function lt(e){(e?[e]:me()).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 oi(e){if(e){const t=he(e);t&<(t)}else lt()}function ut(e){(e?[e]:me()).forEach(t=>{if(!t.observer){Me(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const o=typeof t.node=="function"?t.node():t.node;if(o)n.instance?Nn(t,o):Me(t);else return}})}function ri(e){if(e){const t=he(e);t&&ut(t)}else ut()}function $n(e,t=!1){const n=Mn(e,t);return Me(n),n}function Bn(e){const t=he(e);t&&(Un(t),Js(e))}function si(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,o=t.customisations;for(const r in ze)if(n[r]!==o[r])return!0;return!1}function ii(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/r,s%1===0?o(s):0)}}return t}const ai=/[\s,]+/;function ci(e,t){t.split(ai).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const li=["width","height"],ui=["inline","hFlip","vFlip"];function di(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function fi(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&te(t,!0);if(!n)return null;const o={...ze,inline:e.classList&&e.classList.contains(ct)};li.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(o[c]=l)});const r=e.getAttribute("data-rotate");typeof r=="string"&&(o.rotate=ii(r));const s=e.getAttribute("data-flip");typeof s=="string"&&ci(o,s),ui.forEach(c=>{const l="data-"+c,u=di(e.getAttribute(l),l);typeof u=="boolean"&&(o[c]=u)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:o,mode:i}}const pi="svg."+Ge+", i."+Ge+", span."+Ge+", i."+ct+", span."+ct;function hi(e){const t=[];return e.querySelectorAll(pi).forEach(n=>{const o=n[q]||n.tagName.toLowerCase()!=="svg"?fi(n):null;o&&t.push({node:n,props:o})}),t}function Fn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let ce;function mi(){try{ce=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ce=null}}function gi(e){return ce===void 0&&mi(),ce?ce.createHTML(e):e}function zn(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Hn(e,t,n,o){const r=e.classList;if(o){const i=o.classList;Array.from(i).forEach(c=>{r.add(c)})}const s=[];return t.forEach(i=>{r.contains(i)?n.has(i)&&s.push(i):(r.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||r.remove(i)}),s}function Vn(e,t,n){const o=e.style;(n||[]).forEach(s=>{o.removeProperty(s)});const r=[];for(const s in t)o.getPropertyValue(s)||(r.push(s),o.setProperty(s,t[s]));return r}function qn(e,t,n){let o;try{o=document.createElement("span")}catch{return e}const r=t.customisations,s=$e(n,r),i=e[q],c=Fn(Sn(s.body),{"aria-hidden":"true",role:"img",...s.attributes});o.innerHTML=gi(c);const l=o.childNodes[0],u=e.attributes;for(let g=0;g<u.length;g++){const m=u.item(g),j=m.name;j!=="class"&&!l.hasAttribute(j)&&l.setAttribute(j,m.value)}const d=zn(t.icon),p=Hn(l,d,new Set(i&&i.addedClasses),e),f=Vn(l,r.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),b={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[q]=b,e.parentNode&&e.parentNode.replaceChild(l,e),l}function xi(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function bi(e){return"data:image/svg+xml,"+xi(e)}function yi(e){return'url("'+bi(e)+'")'}const vi={display:"inline-block"},dt={"background-color":"currentColor"},Wn={"background-color":"transparent"},Vt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qt={"-webkit-mask":dt,mask:dt,background:Wn};for(const e in qt){const t=qt[e];for(const n in Vt)t[e+"-"+n]=Vt[n]}function Wt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Si(e,t,n,o){const r=t.customisations,s=$e(n,r),i=s.attributes,c=e[q],l=Fn(s.body,{...i,width:n.width+"",height:n.height+""}),u=zn(t.icon),d=Hn(e,u,new Set(c&&c.addedClasses)),f={"--svg":yi(l),width:Wt(i.width),height:Wt(i.height),...vi,...o?dt:Wn};r.inline&&(f["vertical-align"]="-0.125em");const b=Vn(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:d,addedStyles:b};return e[q]=g,e}let Ce=!1;function wi(){Ce||(Ce=!0,setTimeout(()=>{Ce&&(Ce=!1,ee())}))}function ee(e,t=!1){const n=Object.create(null);function o(r,s){const{provider:i,prefix:c,name:l}=r,u=N(i,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(s&&!Qs(r)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:me()).forEach(r=>{const s=typeof r.node=="function"?r.node():r.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(u,d,p){if(c||(c=!0,lt(r)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,b=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof b=="boolean"){Si(u,d,{...fe,...p},b);return}}qn(u,d,p)}hi(s).forEach(({node:u,props:d})=>{const p=u[q];if(!p){const{status:b,icon:g}=o(d.icon,!0);if(g){l(u,d,g);return}i=i||b==="loading",u[q]={...d,status:b};return}let f;if(si(p,d)){if(f=o(d.icon,p.name!==d.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=o(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),r.temporary&&!i?Bn(s):t&&i?$n(s,!0):c&&r.observer&&ut(r)});for(const r in n){const s=n[r];for(const i in s){const c=s[i];wt(Array.from(c).map(l=>({provider:r,prefix:i,name:l})),wi)}}}function ji(e){const t=he(e);t?ee(t):ee({node:e,temporary:!0},!0)}function Kn(e,t,n=!1){const o=pe(e);if(!o)return null;const r=te(e),s=Rn(ze,t||{}),i=qn(document.createElement("span"),{name:e,icon:r,customisations:s},o);return n?i.outerHTML:i}function Ci(){return"3.1.1"}function Ei(e,t){return Kn(e,t,!1)}function ki(e,t){return Kn(e,t,!0)}function Ii(e,t){const n=pe(e);if(!n)return null;const o=Rn(ze,t||{});return $e(n,o)}function _i(e){e?ji(e):ee()}if(typeof document<"u"&&typeof window<"u"){Xs();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!bn(o))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ni(ee),ee()})}function Di(e,t){_n(e,t!==!1)}function Li(e){_n(e,!0)}Dn("",Os);if(typeof document<"u"&&typeof window<"u"){In();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Ln(n,r)||console.error(o)}catch{console.error(o)}}}}const Ti={getAPIConfig:Fe,setAPIModule:Dn,sendAPIQuery:Pn,setFetch:Ds,getFetch:Ls,listAPIProviders:Is},Ai={_api:Ti,addAPIProvider:Ln,loadIcons:wt,loadIcon:Zs,iconExists:xs,getIcon:bs,listIcons:hs,addIcon:gs,addCollection:bn,replaceIDs:Sn,calculateSize:nt,buildIcon:$e,getVersion:Ci,renderSVG:Ei,renderHTML:ki,renderIcon:Ii,scan:_i,observe:$n,stopObserving:Bn,pauseObserver:oi,resumeObserver:ri,enableCache:Di,disableCache:Li};try{self.Iconify===void 0&&(self.Iconify=Ai)}catch{}function Gn({infos:e=[]}){const{t}=B(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(r=>{n.searchParams.set(r.label,r.value)});const o=e.map(r=>`* ${r.label}: ${r.value}`).join(`
|
|
42
|
+
*/const xn=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fe=Object.freeze({...xn,...Ae}),tt=Object.freeze({...fe,body:"",hidden:!1});function is(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Nt(e,t){const n=is(e,t);for(const o in tt)o in Ae?o in e&&!(o in n)&&(n[o]=Ae[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function as(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function s(i){if(n[i])return r[i]=[];if(!(i in r)){r[i]=null;const c=o[i]&&o[i].parent,l=c&&s(c);l&&(r[i]=[c].concat(l))}return r[i]}return Object.keys(n).concat(Object.keys(o)).forEach(s),r}function cs(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let s={};function i(c){s=Nt(o[c]||r[c],s)}return i(t),n.forEach(i),Nt(e,s)}function ls(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=as(e);for(const r in o){const s=o[r];s&&(t(r,cs(e,r,s)),n.push(r))}return n}const ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,te=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const c=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:o,prefix:l,name:c};return t&&!Ie(u)?null:u}const s=r[0],i=s.split("-");if(i.length>1){const c={provider:o,prefix:i.shift(),name:i.join("-")};return t&&!Ie(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:s};return t&&!Ie(c,n)?null:c}return null},Ie=(e,t)=>e?!!((e.provider===""||e.provider.match(ie))&&(t&&e.prefix===""||e.prefix.match(ie))&&e.name.match(ie)):!1,us={provider:"",aliases:{},not_found:{},...xn};function We(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ds(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!We(e,us))return null;const n=t.icons;for(const r in n){const s=n[r];if(!r.match(ie)||typeof s.body!="string"||!We(s,tt))return null}const o=t.aliases||Object.create(null);for(const r in o){const s=o[r],i=s.parent;if(!r.match(ie)||typeof i!="string"||!n[i]&&!o[i]||!We(s,tt))return null}return t}const Pe=Object.create(null);function fs(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function N(e,t){const n=Pe[e]||(Pe[e]=Object.create(null));return n[t]||(n[t]=fs(e,t))}function xt(e,t){return ds(t)?ls(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ps(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function hs(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Pe)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Pe[r]||{})).forEach(i=>{const c=N(r,i);n=n.concat(Object.keys(c.icons).map(l=>(r!==""?"@"+r+":":"")+i+":"+l))})}),n}let bt=!1;function ms(e){return bt}function pe(e){const t=typeof e=="string"?te(e,!0,bt):e;if(t){const n=N(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function gs(e,t){const n=te(e,!0,bt);if(!n)return!1;const o=N(n.provider,n.prefix);return ps(o,n.name,t)}function bn(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Ie({provider:t,prefix:n,name:"a"}))return!1;const o=N(t,n);return!!xt(o,e)}function xs(e){return!!pe(e)}function bs(e){const t=pe(e);return t?{...fe,...t}:null}const yn=Object.freeze({width:null,height:null}),vn=Object.freeze({...yn,...Ae}),ys=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function nt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(ys);if(o===null||!o.length)return e;const r=[];let s=o.shift(),i=vs.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?r.push(s):r.push(Math.ceil(c*t*n)/n)}else r.push(s);if(s=o.shift(),s===void 0)return r.join("");i=!i}}const Ss=e=>e==="unset"||e==="undefined"||e==="none";function $e(e,t){const n={...fe,...e},o={...vn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,o].forEach(g=>{const m=[],j=g.hFlip,h=g.vFlip;let w=g.rotate;j?h?w+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):h&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let C;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:C=r.height/2+r.top,m.unshift("rotate(90 "+C.toString()+" "+C.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:C=r.width/2+r.left,m.unshift("rotate(-90 "+C.toString()+" "+C.toString()+")");break}w%2===1&&(r.left!==r.top&&(C=r.left,r.left=r.top,r.top=C),r.width!==r.height&&(C=r.width,r.width=r.height,r.height=C)),m.length&&(s='<g transform="'+m.join(" ")+'">'+s+"</g>")});const i=o.width,c=o.height,l=r.width,u=r.height;let d,p;i===null?(p=c===null?"1em":c==="auto"?u:c,d=nt(p,l/u)):(d=i==="auto"?l:i,p=c===null?nt(d,u/l):c==="auto"?u:c);const f={},y=(g,m)=>{Ss(m)||(f[g]=m.toString())};return y("width",d),y("height",p),f.viewBox=r.left.toString()+" "+r.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:s}}const ws=/\sid="(\S+)"/g,js="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Cs=0;function Sn(e,t=js){const n=[];let o;for(;o=ws.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(Cs++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Q={local:!0,session:!0},wn={local:new Set,session:new Set};let yt=!1;function Es(e){yt=e}const Ut="iconify2",le="iconify",jn=le+"-count",$t=le+"-version",Cn=36e5,Is=168;function ot(e,t){try{return e.getItem(t)}catch{}}function vt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Bt(e,t){try{e.removeItem(t)}catch{}}function rt(e,t){return vt(e,jn,t.toString())}function st(e){return parseInt(ot(e,jn))||0}let je=typeof window>"u"?{}:window;function En(e){const t=e+"Storage";try{if(je&&je[t]&&typeof je[t].length=="number")return je[t]}catch{}Q[e]=!1}function In(e,t){const n=En(e);if(!n)return;const o=ot(n,$t);if(o!==Ut){if(o){const c=st(n);for(let l=0;l<c;l++)Bt(n,le+l.toString())}vt(n,$t,Ut),rt(n,0);return}const r=Math.floor(Date.now()/Cn)-Is,s=c=>{const l=le+c.toString(),u=ot(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>r&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Bt(n,l)}};let i=st(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,rt(n,i)):wn[e].add(c))}function _n(){if(!yt){Es(!0);for(const e in Q)In(e,t=>{const n=t.data,o=t.provider,r=n.prefix,s=N(o,r);if(!xt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function kn(e,t){switch(e){case"local":case"session":Q[e]=t;break;case"all":for(const n in Q)Q[n]=t;break}}const it=Object.create(null);function Dn(e,t){it[e]=t}function at(e){return it[e]||it[""]}function St(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 Be=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],_e=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?_e.push(oe.shift()):_e.push(oe.pop());Be[""]=St({resources:["https://api.iconify.design"].concat(_e)});function Tn(e,t){const n=St(t);return n===null?!1:(Be[e]=n,!0)}function Fe(e){return Be[e]}function _s(){return Object.keys(Be)}const ks=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Re=ks();function Ds(e){Re=e}function Ts(){return Re}function Ls(e,t){const n=Fe(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(i=>{r=Math.max(r,i.length)});const s=t+".json?icons=";o=n.maxURL-r-n.path.length-s.length}return o}function As(e){return e===404}const Ps=(e,t,n)=>{const o=[],r=Ls(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=r&&u>0&&(o.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),o.push(i),o};function Rs(e){if(typeof e=="string"){const t=Fe(e);if(t)return t.path}return"/"}const Ms=(e,t,n)=>{if(!Re){n("abort",424);return}let o=Rs(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});o+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;o+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let r=503;Re(e+o).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(As(i)?"abort":"next",i)});return}return r=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",r)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",r)})},Os={prepare:Ps,send:Ms};function Ns(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,s)=>r.provider!==s.provider?r.provider.localeCompare(s.provider):r.prefix!==s.prefix?r.prefix.localeCompare(s.prefix):r.name.localeCompare(s.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const s=r.provider,i=r.prefix,c=r.name,l=n[s]||(n[s]=Object.create(null)),u=l[i]||(l[i]=N(s,i));let d;c in u.icons?d=t.loaded:i===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:s,prefix:i,name:c};d.push(p)}),t}function Ln(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Us(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==r)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))i.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||Ln([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let $s=0;function Bs(e,t,n){const o=$s++,r=Ln.bind(null,n,o);if(!t.pending.length)return r;const s={id:o,icons:t,callback:e,abort:r};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),r}function Fs(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const s=typeof r=="string"?te(r,t,n):r;s&&o.push(s)}),o}var zs={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Vs(e,t,n,o){const r=e.resources.length,s=e.random?Math.floor(Math.random()*r):e.index;let i;if(e.random){let v=e.resources.slice(0);for(i=[];v.length>1;){const L=Math.floor(Math.random()*v.length);i.push(v[L]),v=v.slice(0,L).concat(v.slice(L+1))}i=i.concat(v)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",u=0,d,p=null,f=[],y=[];typeof o=="function"&&y.push(o);function g(){p&&(clearTimeout(p),p=null)}function m(){l==="pending"&&(l="aborted"),g(),f.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),f=[]}function j(v,L){L&&(y=[]),typeof v=="function"&&y.push(v)}function h(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:j,abort:m}}function w(){l="failed",y.forEach(v=>{v(void 0,d)})}function C(){f.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),f=[]}function D(v,L,F){const z=L!=="success";switch(f=f.filter(R=>R!==v),l){case"pending":break;case"failed":if(z||!e.dataAfterTimeout)return;break;default:return}if(L==="abort"){d=F,w();return}if(z){d=F,f.length||(i.length?I():w());return}if(g(),C(),!e.random){const R=e.resources.indexOf(v.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",y.forEach(R=>{R(F)})}function I(){if(l!=="pending")return;g();const v=i.shift();if(v===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(C(),w())},e.timeout);return}w();return}const L={status:"pending",resource:v,callback:(F,z)=>{D(L,F,z)}};f.push(L),u++,p=setTimeout(I,e.rotate),n(v,t,L.callback)}return setTimeout(I),h}function An(e){const t={...zs,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function r(c,l,u){const d=Vs(t,c,l,(p,f)=>{o(),u&&u(p,f)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:r,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function Ft(){}const Ke=Object.create(null);function Hs(e){if(!Ke[e]){const t=Fe(e);if(!t)return;const n=An(t),o={config:t,redundancy:n};Ke[e]=o}return Ke[e]}function Pn(e,t,n){let o,r;if(typeof e=="string"){const s=at(e);if(!s)return n(void 0,424),Ft;r=s.send;const i=Hs(e);i&&(o=i.redundancy)}else{const s=St(e);if(s){o=An(s);const i=e.resources?e.resources[0]:"",c=at(i);c&&(r=c.send)}}return!o||!r?(n(void 0,424),Ft):o.query(t,r,n)().abort}function qs(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in Q)In(o,r=>{const s=r.data;return r.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Ws(e,t){yt||_n();function n(o){let r;if(!Q[o]||!(r=En(o)))return;const s=wn[o];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=st(r),!rt(r,i+1))return;const c={cached:Math.floor(Date.now()/Cn),provider:e.provider,data:t};return vt(r,le+i.toString(),JSON.stringify(c))}t.lastModified&&!qs(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function zt(){}function Ks(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Us(e)}))}function Gs(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let s;if(!r||!(s=at(n)))return;s.prepare(n,o,r).forEach(c=>{Pn(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=xt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),Ws(e,l)}catch(u){console.error(u)}Ks(e)})})}))}const Qs=e=>{const n=N(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},wt=(e,t)=>{const n=Fs(e,!0,ms()),o=Ns(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,zt)}),()=>{l=!1}}const r=Object.create(null),s=[];let i,c;return o.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===i)return;i=u,c=d,s.push(N(u,d));const p=r[u]||(r[u]=Object.create(null));p[d]||(p[d]=[])}),o.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=N(u,d),y=f.pendingIcons||(f.pendingIcons=new Set);y.has(p)||(y.add(p),r[u][d].push(p))}),s.forEach(l=>{const{provider:u,prefix:d}=l;r[u][d].length&&Gs(l,r[u][d])}),t?Bs(t,o,s):zt},Zs=e=>new Promise((t,n)=>{const o=typeof e=="string"?te(e,!0):e;if(!o){n(e);return}wt([o||e],r=>{if(r.length&&o){const s=pe(o);if(s){t({...fe,...s});return}}n(e)})});function Rn(e,t){const n={...e};for(const o in t){const r=t[o],s=typeof r;o in yn?(r===null||r&&(s==="string"||s==="number"))&&(n[o]=r):s===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const ze={...vn,inline:!1},Ge="iconify",ct="iconify-inline",q="iconifyData"+Date.now();let Z=[];function he(e){for(let t=0;t<Z.length;t++){const n=Z[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function Mn(e,t=!1){let n=he(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},Z.push(n),n)}function Xs(){if(document.documentElement)return Mn(document.documentElement);Z.push({node:()=>document.documentElement})}function Js(e){Z=Z.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function me(){return Z}function Ys(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ae=null;const ei={childList:!0,subtree:!0,attributes:!0};function On(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ae&&ae(e)}))}function ti(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let o=0;o<t.length;o++){const r=t[o];if(r.addedNodes&&r.addedNodes.length>0||r.type==="attributes"&&r.target[q]!==void 0){n.paused||On(e);return}}}function Nn(e,t){e.observer.instance.observe(t,ei)}function Me(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(ti.bind(null,e)),Nn(e,n),t.paused||On(e))}function Vt(){me().forEach(Me)}function Un(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 ni(e){const t=ae!==null;if(ae!==e&&(ae=e,t&&me().forEach(Un)),t){Vt();return}Ys(Vt)}function lt(e){(e?[e]:me()).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 oi(e){if(e){const t=he(e);t&<(t)}else lt()}function ut(e){(e?[e]:me()).forEach(t=>{if(!t.observer){Me(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const o=typeof t.node=="function"?t.node():t.node;if(o)n.instance?Nn(t,o):Me(t);else return}})}function ri(e){if(e){const t=he(e);t&&ut(t)}else ut()}function $n(e,t=!1){const n=Mn(e,t);return Me(n),n}function Bn(e){const t=he(e);t&&(Un(t),Js(e))}function si(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,o=t.customisations;for(const r in ze)if(n[r]!==o[r])return!0;return!1}function ii(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/r,s%1===0?o(s):0)}}return t}const ai=/[\s,]+/;function ci(e,t){t.split(ai).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const li=["width","height"],ui=["inline","hFlip","vFlip"];function di(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function fi(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&te(t,!0);if(!n)return null;const o={...ze,inline:e.classList&&e.classList.contains(ct)};li.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(o[c]=l)});const r=e.getAttribute("data-rotate");typeof r=="string"&&(o.rotate=ii(r));const s=e.getAttribute("data-flip");typeof s=="string"&&ci(o,s),ui.forEach(c=>{const l="data-"+c,u=di(e.getAttribute(l),l);typeof u=="boolean"&&(o[c]=u)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:o,mode:i}}const pi="svg."+Ge+", i."+Ge+", span."+Ge+", i."+ct+", span."+ct;function hi(e){const t=[];return e.querySelectorAll(pi).forEach(n=>{const o=n[q]||n.tagName.toLowerCase()!=="svg"?fi(n):null;o&&t.push({node:n,props:o})}),t}function Fn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let ce;function mi(){try{ce=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ce=null}}function gi(e){return ce===void 0&&mi(),ce?ce.createHTML(e):e}function zn(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Vn(e,t,n,o){const r=e.classList;if(o){const i=o.classList;Array.from(i).forEach(c=>{r.add(c)})}const s=[];return t.forEach(i=>{r.contains(i)?n.has(i)&&s.push(i):(r.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||r.remove(i)}),s}function Hn(e,t,n){const o=e.style;(n||[]).forEach(s=>{o.removeProperty(s)});const r=[];for(const s in t)o.getPropertyValue(s)||(r.push(s),o.setProperty(s,t[s]));return r}function qn(e,t,n){let o;try{o=document.createElement("span")}catch{return e}const r=t.customisations,s=$e(n,r),i=e[q],c=Fn(Sn(s.body),{"aria-hidden":"true",role:"img",...s.attributes});o.innerHTML=gi(c);const l=o.childNodes[0],u=e.attributes;for(let g=0;g<u.length;g++){const m=u.item(g),j=m.name;j!=="class"&&!l.hasAttribute(j)&&l.setAttribute(j,m.value)}const d=zn(t.icon),p=Vn(l,d,new Set(i&&i.addedClasses),e),f=Hn(l,r.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),y={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[q]=y,e.parentNode&&e.parentNode.replaceChild(l,e),l}function xi(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function bi(e){return"data:image/svg+xml,"+xi(e)}function yi(e){return'url("'+bi(e)+'")'}const vi={display:"inline-block"},dt={"background-color":"currentColor"},Wn={"background-color":"transparent"},Ht={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qt={"-webkit-mask":dt,mask:dt,background:Wn};for(const e in qt){const t=qt[e];for(const n in Ht)t[e+"-"+n]=Ht[n]}function Wt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Si(e,t,n,o){const r=t.customisations,s=$e(n,r),i=s.attributes,c=e[q],l=Fn(s.body,{...i,width:n.width+"",height:n.height+""}),u=zn(t.icon),d=Vn(e,u,new Set(c&&c.addedClasses)),f={"--svg":yi(l),width:Wt(i.width),height:Wt(i.height),...vi,...o?dt:Wn};r.inline&&(f["vertical-align"]="-0.125em");const y=Hn(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:d,addedStyles:y};return e[q]=g,e}let Ce=!1;function wi(){Ce||(Ce=!0,setTimeout(()=>{Ce&&(Ce=!1,ee())}))}function ee(e,t=!1){const n=Object.create(null);function o(r,s){const{provider:i,prefix:c,name:l}=r,u=N(i,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(s&&!Qs(r)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:me()).forEach(r=>{const s=typeof r.node=="function"?r.node():r.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(u,d,p){if(c||(c=!0,lt(r)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,y=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof y=="boolean"){Si(u,d,{...fe,...p},y);return}}qn(u,d,p)}hi(s).forEach(({node:u,props:d})=>{const p=u[q];if(!p){const{status:y,icon:g}=o(d.icon,!0);if(g){l(u,d,g);return}i=i||y==="loading",u[q]={...d,status:y};return}let f;if(si(p,d)){if(f=o(d.icon,p.name!==d.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=o(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),r.temporary&&!i?Bn(s):t&&i?$n(s,!0):c&&r.observer&&ut(r)});for(const r in n){const s=n[r];for(const i in s){const c=s[i];wt(Array.from(c).map(l=>({provider:r,prefix:i,name:l})),wi)}}}function ji(e){const t=he(e);t?ee(t):ee({node:e,temporary:!0},!0)}function Kn(e,t,n=!1){const o=pe(e);if(!o)return null;const r=te(e),s=Rn(ze,t||{}),i=qn(document.createElement("span"),{name:e,icon:r,customisations:s},o);return n?i.outerHTML:i}function Ci(){return"3.1.1"}function Ei(e,t){return Kn(e,t,!1)}function Ii(e,t){return Kn(e,t,!0)}function _i(e,t){const n=pe(e);if(!n)return null;const o=Rn(ze,t||{});return $e(n,o)}function ki(e){e?ji(e):ee()}if(typeof document<"u"&&typeof window<"u"){Xs();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!bn(o))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ni(ee),ee()})}function Di(e,t){kn(e,t!==!1)}function Ti(e){kn(e,!0)}Dn("",Os);if(typeof document<"u"&&typeof window<"u"){_n();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Tn(n,r)||console.error(o)}catch{console.error(o)}}}}const Li={getAPIConfig:Fe,setAPIModule:Dn,sendAPIQuery:Pn,setFetch:Ds,getFetch:Ts,listAPIProviders:_s},Ai={_api:Li,addAPIProvider:Tn,loadIcons:wt,loadIcon:Zs,iconExists:xs,getIcon:bs,listIcons:hs,addIcon:gs,addCollection:bn,replaceIDs:Sn,calculateSize:nt,buildIcon:$e,getVersion:Ci,renderSVG:Ei,renderHTML:Ii,renderIcon:_i,scan:ki,observe:$n,stopObserving:Bn,pauseObserver:oi,resumeObserver:ri,enableCache:Di,disableCache:Ti};try{self.Iconify===void 0&&(self.Iconify=Ai)}catch{}function Gn({infos:e=[]}){const{t}=B(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(r=>{n.searchParams.set(r.label,r.value)});const o=e.map(r=>`* ${r.label}: ${r.value}`).join(`
|
|
43
43
|
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
44
44
|
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ import{b as Yt,n as ft,H as $,T as B,ar as en,as as po,F as ho,a0 as mo,I as go,
|
|
|
49
49
|
${o}
|
|
50
50
|
* Page: ${window.location.href}
|
|
51
51
|
-->
|
|
52
|
-
`),L(E,{sx:{mx:{xs:0,md:2}},children:L(Ee,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Gn.propTypes={infos:S.arrayOf(S.shape({label:S.string,value:S.string}))};var Qe,Kt;function Pi(){return Kt||(Kt=1,Qe={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"}}),Qe}var Ze,Gt;function Ri(){return Gt||(Gt=1,Ze={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),Ze}var Xe,Qt;function Qn(){if(Qt)return Xe;Qt=1;const e=new Map;return Xe={registerLang:(o,r)=>{e.set(o,r)},getLang:(o="en_US")=>e.get(o)||e.get("en_US")},Xe}var Je,Zt;function Mi(){return Zt||(Zt=1,Je=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}}),Je}var Ye,Xt;function Oi(){if(Xt)return Ye;Xt=1;const e=Mi(),{getLang:t}=Qn(),n=(r,s)=>s===1?r:`${r}s`,o=1e-7;return Ye=(r,s={})=>{if(!Number.isFinite(r))throw new TypeError("Expected a finite number");s.colonNotation&&(s.compact=!1,s.formatSubMilliseconds=!1,s.separateMilliseconds=!1,s.verbose=!1),s.compact&&(s.secondsDecimalDigits=0,s.millisecondsDecimalDigits=0);const i=t(s.locale),c=[],l=(p,f)=>{const b=Math.floor(p*10**f+o);return(Math.round(b)/10**f).toFixed(f)},u=(p,f,b)=>{if((c.length===0||!s.colonNotation)&&p===0&&!(s.colonNotation&&f==="minute"))return;const{long:g}=i[f]||t("en_US")[f],{short:m}=i[f]||t("en_US")[f];let j=(b||p||"0").toString(),h,w;if(s.colonNotation){h=c.length>0?":":"",w="";const C=j.includes(".")?j.split(".")[0].length:j.length,D=c.length>0?2:1;j="0".repeat(Math.max(0,D-C))+j}else h="",s.locale==="zh_CN"?Object.values(d).filter(C=>C>0).length>1?!d.days&&!d.hours&&d.minutes&&s.compact?w=g:w=m:d.minutes?w=g:w=m:w=s.verbose?` ${n(g,p)}`:m;c.push(h+j+w)},d=e(r);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),s.separateMilliseconds||s.formatSubMilliseconds||!s.colonNotation&&r<1e3)if(u(d.seconds,"second"),s.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const p=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,f=typeof s.millisecondsDecimalDigits=="number"?s.millisecondsDecimalDigits:0,b=p>=1?Math.round(p):Math.ceil(p),g=f?p.toFixed(f):b;u(Number.parseFloat(g,10),"millisecond",g)}else{const p=r/1e3%60,f=typeof s.secondsDecimalDigits=="number"?s.secondsDecimalDigits:1,b=l(p,f),g=s.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");u(Number.parseFloat(g,10),"second",g)}if(c.length===0){const p=(i.millisecond||t("en_US").millisecond).long,f=(i.millisecond||t("en_US").millisecond).short;return s.locale==="zh_CN"?`0${s.verbose?`${p}`:f}`:`0${s.verbose?` ${p}s`:f}`}if(s.compact)return c[0];if(typeof s.unitCount=="number"){const p=s.colonNotation?"":" ";return c.slice(0,Math.max(s.unitCount,1)).join(p)}return s.colonNotation?c.join(""):c.join(" ")},Ye}var et,Jt;function Ni(){if(Jt)return et;Jt=1;const e=Pi(),t=Ri(),{registerLang:n}=Qn(),o=Oi();return n("en_US",e),n("zh_CN",t),o.registerLang=n,et=o,et}var Ui=Ni();const Zn=Wo(Ui);function H({children:e}){return ue(n=>n.breakpoints.down("md"))?a.jsx(De,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:a.jsx(E,{sx:{display:"flex",alignItems:"center",gap:1},children:a.jsx(It,{fontSize:"small"})})}):a.jsxs(E,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(It,{fontSize:"small"}),e]})}H.propTypes={children:S.node.isRequired};const $i="https://launcher.arcblock.io/",Bi=30*24*60*60*1e3;function Xn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",retention:r=0,sx:s={},...i}){const{t:c,locale:l}=B(),u=Ue(),[d,p]=fn({safeIframeRef:null,popoverAnchorEl:null}),f=y.useRef(null),b=mt(),g=ue(v=>v.breakpoints.down("md")),m=g?"mobile":"desktop",j=dn(async()=>{const[v,T]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:o,launcherUrl:e}}),cn({launcherUrl:e||$i,nftDid:n,launcherSessionId:o,locale:l,theme:b.palette.mode})]);if(v?.error)throw new Error(v.error);return{launcherSession:v.launcherSession,subscriptionURL:T}},[l]);if(j.loading)return a.jsx(G,{label:a.jsxs(H,{children:[!g&&c("expiration.desktop.loading"),a.jsx(V,{size:16})]}),variant:"success",sx:{cursor:"pointer",...s},...i,retention:r});if(j.error)return console.error(j.error),a.jsx(G,{label:a.jsx(H,{children:c(`expiration.${m}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...s},...i,retention:r,onClick:()=>j.retry()});const h=v=>{p({popoverAnchorEl:v.currentTarget})},w=()=>{p({popoverAnchorEl:null})},C=j.value?.launcherSession;let D="success";[P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(j.value?.launcherSession?.status)&&(D="error");let k=null;if(C.expirationDate&&!C.subscription){const v=Y(C.expirationDate).diff(Y(),"ms");k=c(`expiration.${m}.tips.${D}`,{validity:Zn(v,{locale:ln(l),compact:!0,verbose:!0})}),v>0&&v<=Bi&&(D="warning")}return a.jsxs(a.Fragment,{children:[a.jsx(G,{label:a.jsx(H,{children:k||C?.subscription?.product?.name||c("common.subscription")}),color:D,variant:D!=="success"?"contained":"outlined",sx:{cursor:"pointer",...s},...i,retention:r,onClick:h}),a.jsx(rn,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(E,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:a.jsx("iframe",{ref:f,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:j.value?.subscriptionURL})})})]})}Xn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};const Fi=30*24*60*60*1e3,zi="https://launcher.arcblock.io/";function Jn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",sx:r={},retention:s=0,...i}){const{t:c,locale:l}=B(),[u,d]=fn({safeIframeRef:null,popoverAnchorEl:null}),p=y.useRef(null),f=ue(v=>v.breakpoints.down("md")),b=Ue(),g=f?"mobile":"desktop",m=dn(async()=>{const[v,T]=await Promise.all([b.api.getLauncherSession({input:{launcherSessionId:o||n,launcherUrl:e}}),cn({launcherUrl:e||zi,nftDid:n,launcherSessionId:o,locale:l})]);if(v?.error)throw new Error(v.error);return{launcherSession:v.launcherSession,subscriptionURL:T}},[l]);if(m.loading)return a.jsx(G,{label:a.jsxs(H,{children:[!f&&c("expiration.desktop.loading"),a.jsx(V,{size:16})]}),variant:"success",sx:{cursor:"pointer",...r},...i,retention:s});if(m.error)return console.error(m.error),a.jsx(G,{label:a.jsx(H,{children:c(`expiration.${g}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...r},...i,retention:s,onClick:()=>m.retry()});const j=m.value?.launcherSession?.expirationDate,h=Y(j).isBefore(Y()),w=Y(j).diff(Y(),"ms");let C="success";w<=Fi&&(C="warning"),h&&(C="error");const D=v=>{d({popoverAnchorEl:v.currentTarget})},k=()=>{d({popoverAnchorEl:null})};return a.jsxs(a.Fragment,{children:[m.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(H,{children:c("expiration.desktop.nextInvoice",{date:er(j,l)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:D}),!m.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(H,{children:c(`expiration.${g}.tips.${C}`,{validity:Zn(w,{locale:ln(l),compact:!0,verbose:!0})})}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:D}),a.jsx(rn,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:k,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:a.jsx("iframe",{ref:p,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0},src:m.value?.subscriptionURL})})})]})}Jn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};function Yn({meta:e={},fallbackUrl:t=qe,invalidPathFallback:n=null,headerAddons:o=void 0,sessionManagerProps:r={showRole:!0,onLogout:()=>{window.location.href=qe}},links:s=[],showDomainWarningDialog:i=!0,...c}){tr();const l=y.use(nr)?.session?.user,u=l?.role,{locale:d}=B()||{},p=y.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return or(w)}catch(C){return console.error("Failed to format blocklet info",C,w),w}},[e]),{localizedNav:f,flattened:b,matchedIndex:g}=y.useMemo(()=>{let w=rr(p?.navigation?.dashboard,d)||[];w=sr(w,u),w=ir(w,k=>{let v=null;return k.icon&&(k.icon.startsWith("http")||k.icon.startsWith("data:")?v=a.jsx(ho,{src:k.icon}):v=a.jsx("iconify-icon",{height:"100%",width:"100%",icon:k.icon})),{id:k.id,title:k.title,url:k.link,icon:v,external:!0,children:k.items}},"items");const C=ar(w).filter(k=>!!k.url),D=cr(C.map(k=>k.url));return D!==-1&&(C[D].active=!0),{localizedNav:w,flattened:C,matchedIndex:D}},[p,d,u]),m=typeof s=="function"?s(f):[...f,...s],j=lr({meta:e});if(y.useLayoutEffect(()=>{l&&!b?.length&&t&&(window.location.href=t)},[t]),y.useLayoutEffect(()=>{l&&b?.length&&g===-1&&n&&n()},[n,b,g]),!p.appName)return null;const{appName:h}=p;return a.jsx(Br,{title:h,fullWidth:!0,sidebarWidth:128,legacy:!1,links:m,...c,headerProps:{homeLink:qe,logo:a.jsx("img",{src:j,alt:"logo"}),addons:a.jsx(ur,{formattedBlocklet:p,addons:o,sessionManagerProps:r,showDomainWarningDialog:i}),...c.headerProps}})}Yn.propTypes={meta:fr,fallbackUrl:S.string,invalidPathFallback:S.func,headerAddons:S.oneOfType([S.func,S.node]),sessionManagerProps:dr,links:S.oneOfType([S.array,S.func]),showDomainWarningDialog:S.bool};const Hi={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function eo({children:e,style:t={},...n}){return a.jsx(mo,{style:t,...n,children:e})}eo.propTypes={children:S.any.isRequired,style:S.object};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},_e={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},Vi={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function qi({isResource:e=!1,status:t,variant:n="tag",progress:o=0,...r}){const{t:s}=y.useContext(Yt),i=M.isInProgress(t),c=e&&t==="stopped"?"resource":t,l=s(`blocklet.status.${c}`);return n==="pin"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsxs(E,{...r,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:[a.jsx(E,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:_e[c]}}),a.jsx(E,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:_e[c]}})]})}):n==="dot"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsx($r,{color:_e[c],...r})}):a.jsxs(eo,{type:Vi[c],...r,children:[i&&a.jsx(V,{size:12,color:"inherit",style:{marginRight:5}}),l,c==="downloading"&&o?a.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}qi.propTypes={status:S.string.isRequired,variant:S.oneOf(["dot","tag","pin"]),source:S.string,progress:S.number,isResource:S.bool};function Wi(){const{inFullPage:e,toggleFullPage:t}=Fr();return L(pt,{onClick:t,children:e?L(zo,{sx:{transform:"scale(1.3)"}}):L(Ho,{sx:{transform:"scale(1.3)"}})})}function to({children:e=null}){const{t}=B(),{loading:n,error:o,actions:{refreshBlocklet:r},env:s,blocklet:i}=de(),{info:c}=pr(),l=Ko(),u=ue(j=>j.breakpoints.down("md")),{appId:d,version:p}=s,f=[{label:"App ID",value:d},{label:"App Version",value:p},{label:"App Bundle Name",value:i?.meta?.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],b=j=>{const h=Array.isArray(j)?j:[j];if(u||h.unshift(L(Wi,{})),i){const w={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};mr(i)?h.unshift(L(Xn,{chainHost:i?.controller?.chainHost,nftId:i?.controller?.nftId,launcherSessionId:i?.controller?.launcherSessionId,launcherUrl:i?.controller?.launcherUrl,sx:w})):c.ownerNft&&c.launcher&&h.unshift(L(Jn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:w}))}return h},g=Or({blocklet:i}),m={logo:g?L("img",{src:g,alt:"logo"}):null,brandAddon:L(E,{children:i&&we(E,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[L(De,{title:M.isRunning(i?.status)?void 0:t(`blocklet.status.${i?.status}`),children:L(E,{sx:{bgcolor:_e[i?.status],width:8,height:8,borderRadius:"50%"}})}),L(E,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.getDisplayName(i)}),L(E,{component:go,icon:Hi,sx:{color:"text.secondary"}})]})})};return we(Ki,{legacy:!1,fullWidth:!0,headerAddons:b,headerProps:m,footerProps:{addon:L(Gn,{infos:f})},children:[!i&&n&&L(Le,{relative:"parent",children:L(V,{})}),!i&&o&&we(Le,{relative:"parent",children:[we(E,{sx:{display:"flex",alignItems:"center"},children:[L(Fo,{color:"error",sx:{marginRight:1}}),gt(o)]}),L(ft,{onClick:()=>r(),children:L("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!i&&L(E,{sx:{flex:1,padding:u?2:3,display:"flex",flexDirection:"column"},children:L(xo,{FallbackComponent:hr,resetKeys:[l.pathname],children:e})})]})}to.propTypes={children:S.any};const Ki=Oe(Yn)`
|
|
52
|
+
`),T(E,{sx:{mx:{xs:0,md:2}},children:T(Ee,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Gn.propTypes={infos:S.arrayOf(S.shape({label:S.string,value:S.string}))};var Qe,Kt;function Pi(){return Kt||(Kt=1,Qe={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"}}),Qe}var Ze,Gt;function Ri(){return Gt||(Gt=1,Ze={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),Ze}var Xe,Qt;function Qn(){if(Qt)return Xe;Qt=1;const e=new Map;return Xe={registerLang:(o,r)=>{e.set(o,r)},getLang:(o="en_US")=>e.get(o)||e.get("en_US")},Xe}var Je,Zt;function Mi(){return Zt||(Zt=1,Je=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}}),Je}var Ye,Xt;function Oi(){if(Xt)return Ye;Xt=1;const e=Mi(),{getLang:t}=Qn(),n=(r,s)=>s===1?r:`${r}s`,o=1e-7;return Ye=(r,s={})=>{if(!Number.isFinite(r))throw new TypeError("Expected a finite number");s.colonNotation&&(s.compact=!1,s.formatSubMilliseconds=!1,s.separateMilliseconds=!1,s.verbose=!1),s.compact&&(s.secondsDecimalDigits=0,s.millisecondsDecimalDigits=0);const i=t(s.locale),c=[],l=(p,f)=>{const y=Math.floor(p*10**f+o);return(Math.round(y)/10**f).toFixed(f)},u=(p,f,y)=>{if((c.length===0||!s.colonNotation)&&p===0&&!(s.colonNotation&&f==="minute"))return;const{long:g}=i[f]||t("en_US")[f],{short:m}=i[f]||t("en_US")[f];let j=(y||p||"0").toString(),h,w;if(s.colonNotation){h=c.length>0?":":"",w="";const C=j.includes(".")?j.split(".")[0].length:j.length,D=c.length>0?2:1;j="0".repeat(Math.max(0,D-C))+j}else h="",s.locale==="zh_CN"?Object.values(d).filter(C=>C>0).length>1?!d.days&&!d.hours&&d.minutes&&s.compact?w=g:w=m:d.minutes?w=g:w=m:w=s.verbose?` ${n(g,p)}`:m;c.push(h+j+w)},d=e(r);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),s.separateMilliseconds||s.formatSubMilliseconds||!s.colonNotation&&r<1e3)if(u(d.seconds,"second"),s.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const p=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,f=typeof s.millisecondsDecimalDigits=="number"?s.millisecondsDecimalDigits:0,y=p>=1?Math.round(p):Math.ceil(p),g=f?p.toFixed(f):y;u(Number.parseFloat(g,10),"millisecond",g)}else{const p=r/1e3%60,f=typeof s.secondsDecimalDigits=="number"?s.secondsDecimalDigits:1,y=l(p,f),g=s.keepDecimalsOnWholeSeconds?y:y.replace(/\.0+$/,"");u(Number.parseFloat(g,10),"second",g)}if(c.length===0){const p=(i.millisecond||t("en_US").millisecond).long,f=(i.millisecond||t("en_US").millisecond).short;return s.locale==="zh_CN"?`0${s.verbose?`${p}`:f}`:`0${s.verbose?` ${p}s`:f}`}if(s.compact)return c[0];if(typeof s.unitCount=="number"){const p=s.colonNotation?"":" ";return c.slice(0,Math.max(s.unitCount,1)).join(p)}return s.colonNotation?c.join(""):c.join(" ")},Ye}var et,Jt;function Ni(){if(Jt)return et;Jt=1;const e=Pi(),t=Ri(),{registerLang:n}=Qn(),o=Oi();return n("en_US",e),n("zh_CN",t),o.registerLang=n,et=o,et}var Ui=Ni();const Zn=Wo(Ui);function V({children:e}){return ue(n=>n.breakpoints.down("md"))?a.jsx(De,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:a.jsx(E,{sx:{display:"flex",alignItems:"center",gap:1},children:a.jsx(_t,{fontSize:"small"})})}):a.jsxs(E,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(_t,{fontSize:"small"}),e]})}V.propTypes={children:S.node.isRequired};const $i="https://launcher.arcblock.io/",Bi=30*24*60*60*1e3;function Xn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",retention:r=0,sx:s={},...i}){const{t:c,locale:l}=B(),u=Ue(),[d,p]=fn({safeIframeRef:null,popoverAnchorEl:null}),f=x.useRef(null),y=mt(),g=ue(v=>v.breakpoints.down("md")),m=g?"mobile":"desktop",j=dn(async()=>{const[v,L]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:o,launcherUrl:e}}),cn({launcherUrl:e||$i,nftDid:n,launcherSessionId:o,locale:l,theme:y.palette.mode})]);if(v?.error)throw new Error(v.error);return{launcherSession:v.launcherSession,subscriptionURL:L}},[l]);if(j.loading)return a.jsx(G,{label:a.jsxs(V,{children:[!g&&c("expiration.desktop.loading"),a.jsx(H,{size:16})]}),variant:"success",sx:{cursor:"pointer",...s},...i,retention:r});if(j.error)return console.error(j.error),a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${m}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...s},...i,retention:r,onClick:()=>j.retry()});const h=v=>{p({popoverAnchorEl:v.currentTarget})},w=()=>{p({popoverAnchorEl:null})},C=j.value?.launcherSession;let D="success";[P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(j.value?.launcherSession?.status)&&(D="error");let I=null;if(C.expirationDate&&!C.subscription){const v=Y(C.expirationDate).diff(Y(),"ms");I=c(`expiration.${m}.tips.${D}`,{validity:Zn(v,{locale:ln(l),compact:!0,verbose:!0})}),v>0&&v<=Bi&&(D="warning")}return a.jsxs(a.Fragment,{children:[a.jsx(G,{label:a.jsx(V,{children:I||C?.subscription?.product?.name||c("common.subscription")}),color:D,variant:D!=="success"?"contained":"outlined",sx:{cursor:"pointer",...s},...i,retention:r,onClick:h}),a.jsx(rn,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(E,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:a.jsx("iframe",{ref:f,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:j.value?.subscriptionURL})})})]})}Xn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};const Fi=30*24*60*60*1e3,zi="https://launcher.arcblock.io/";function Jn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",sx:r={},retention:s=0,...i}){const{t:c,locale:l}=B(),[u,d]=fn({safeIframeRef:null,popoverAnchorEl:null}),p=x.useRef(null),f=ue(v=>v.breakpoints.down("md")),y=Ue(),g=f?"mobile":"desktop",m=dn(async()=>{const[v,L]=await Promise.all([y.api.getLauncherSession({input:{launcherSessionId:o||n,launcherUrl:e}}),cn({launcherUrl:e||zi,nftDid:n,launcherSessionId:o,locale:l})]);if(v?.error)throw new Error(v.error);return{launcherSession:v.launcherSession,subscriptionURL:L}},[l]);if(m.loading)return a.jsx(G,{label:a.jsxs(V,{children:[!f&&c("expiration.desktop.loading"),a.jsx(H,{size:16})]}),variant:"success",sx:{cursor:"pointer",...r},...i,retention:s});if(m.error)return console.error(m.error),a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${g}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...r},...i,retention:s,onClick:()=>m.retry()});const j=m.value?.launcherSession?.expirationDate,h=Y(j).isBefore(Y()),w=Y(j).diff(Y(),"ms");let C="success";w<=Fi&&(C="warning"),h&&(C="error");const D=v=>{d({popoverAnchorEl:v.currentTarget})},I=()=>{d({popoverAnchorEl:null})};return a.jsxs(a.Fragment,{children:[m.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(V,{children:c("expiration.desktop.nextInvoice",{date:er(j,l)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:D}),!m.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${g}.tips.${C}`,{validity:Zn(w,{locale:ln(l),compact:!0,verbose:!0})})}),color:C,variant:C!=="success"?"contained":"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:D}),a.jsx(rn,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:I,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:a.jsx("iframe",{ref:p,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0},src:m.value?.subscriptionURL})})})]})}Jn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};function Yn({meta:e={},fallbackUrl:t=qe,invalidPathFallback:n=null,headerAddons:o=void 0,sessionManagerProps:r={showRole:!0,onLogout:()=>{window.location.href=qe}},links:s=[],showDomainWarningDialog:i=!0,...c}){tr();const l=x.use(nr)?.session?.user,u=l?.role,{locale:d}=B()||{},p=x.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return or(w)}catch(C){return console.error("Failed to format blocklet info",C,w),w}},[e]),{localizedNav:f,flattened:y,matchedIndex:g}=x.useMemo(()=>{let w=rr(p?.navigation?.dashboard,d)||[];w=sr(w,u),w=ir(w,I=>{let v=null;return I.icon&&(I.icon.startsWith("http")||I.icon.startsWith("data:")?v=a.jsx(ho,{src:I.icon}):v=a.jsx("iconify-icon",{height:"100%",width:"100%",icon:I.icon})),{id:I.id,title:I.title,url:I.link,icon:v,external:!0,children:I.items}},"items");const C=ar(w).filter(I=>!!I.url),D=cr(C.map(I=>I.url));return D!==-1&&(C[D].active=!0),{localizedNav:w,flattened:C,matchedIndex:D}},[p,d,u]),m=typeof s=="function"?s(f):[...f,...s],j=lr({meta:e});if(x.useLayoutEffect(()=>{l&&!y?.length&&t&&(window.location.href=t)},[t]),x.useLayoutEffect(()=>{l&&y?.length&&g===-1&&n&&n()},[n,y,g]),!p.appName)return null;const{appName:h}=p;return a.jsx(Br,{title:h,fullWidth:!0,sidebarWidth:128,legacy:!1,links:m,...c,headerProps:{homeLink:qe,logo:a.jsx("img",{src:j,alt:"logo"}),addons:a.jsx(ur,{formattedBlocklet:p,addons:o,sessionManagerProps:r,showDomainWarningDialog:i}),...c.headerProps}})}Yn.propTypes={meta:fr,fallbackUrl:S.string,invalidPathFallback:S.func,headerAddons:S.oneOfType([S.func,S.node]),sessionManagerProps:dr,links:S.oneOfType([S.array,S.func]),showDomainWarningDialog:S.bool};const Vi={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function eo({children:e,style:t={},...n}){return a.jsx(mo,{style:t,...n,children:e})}eo.propTypes={children:S.any.isRequired,style:S.object};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},ke={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},Hi={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function qi({isResource:e=!1,status:t,variant:n="tag",progress:o=0,...r}){const{t:s}=x.useContext(Yt),i=M.isInProgress(t),c=e&&t==="stopped"?"resource":t,l=s(`blocklet.status.${c}`);return n==="pin"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsxs(E,{...r,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:[a.jsx(E,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:ke[c]}}),a.jsx(E,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:ke[c]}})]})}):n==="dot"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsx($r,{color:ke[c],...r})}):a.jsxs(eo,{type:Hi[c],...r,children:[i&&a.jsx(H,{size:12,color:"inherit",style:{marginRight:5}}),l,c==="downloading"&&o?a.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}qi.propTypes={status:S.string.isRequired,variant:S.oneOf(["dot","tag","pin"]),source:S.string,progress:S.number,isResource:S.bool};function Wi(){const{inFullPage:e,toggleFullPage:t}=Fr();return T(pt,{onClick:t,children:e?T(zo,{sx:{transform:"scale(1.3)"}}):T(Vo,{sx:{transform:"scale(1.3)"}})})}function to({children:e=null}){const{t}=B(),{loading:n,error:o,actions:{refreshBlocklet:r},env:s,blocklet:i}=de(),{info:c}=pr(),l=Ko(),u=ue(j=>j.breakpoints.down("md")),{appId:d,version:p}=s,f=[{label:"App ID",value:d},{label:"App Version",value:p},{label:"App Bundle Name",value:i?.meta?.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],y=j=>{const h=Array.isArray(j)?j:[j];if(u||h.unshift(T(Wi,{})),i){const w={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};mr(i)?h.unshift(T(Xn,{chainHost:i?.controller?.chainHost,nftId:i?.controller?.nftId,launcherSessionId:i?.controller?.launcherSessionId,launcherUrl:i?.controller?.launcherUrl,sx:w})):c.ownerNft&&c.launcher&&h.unshift(T(Jn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:w}))}return h},g=Or({blocklet:i}),m={logo:g?T("img",{src:g,alt:"logo"}):null,brandAddon:T(E,{children:i&&we(E,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[T(De,{title:M.isRunning(i?.status)?void 0:t(`blocklet.status.${i?.status}`),children:T(E,{sx:{bgcolor:ke[i?.status],width:8,height:8,borderRadius:"50%"}})}),T(E,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.getDisplayName(i)}),T(E,{component:go,icon:Vi,sx:{color:"text.secondary"}})]})})};return we(Ki,{legacy:!1,fullWidth:!0,headerAddons:y,headerProps:m,footerProps:{addon:T(Gn,{infos:f})},children:[!i&&n&&T(Te,{relative:"parent",children:T(H,{})}),!i&&o&&we(Te,{relative:"parent",children:[we(E,{sx:{display:"flex",alignItems:"center"},children:[T(Fo,{color:"error",sx:{marginRight:1}}),gt(o)]}),T(ft,{onClick:()=>r(),children:T("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!i&&T(E,{sx:{flex:1,padding:u?2:3,display:"flex",flexDirection:"column"},children:T(xo,{FallbackComponent:hr,resetKeys:[l.pathname],children:e})})]})}to.propTypes={children:S.any};const Ki=Oe(Yn)`
|
|
53
53
|
div.dashboard-content {
|
|
54
54
|
padding: 0;
|
|
55
55
|
}
|
|
@@ -61,7 +61,7 @@ ${o}
|
|
|
61
61
|
.header-brand-addon {
|
|
62
62
|
display: block;
|
|
63
63
|
}
|
|
64
|
-
`;function Gi(){const{t:e,locale:t}=B(),{blocklet:n,launcherSession:o,refreshSubscription:r}=de(),{connectApi:s,session:i,api:c}=gr(),[l,u]=y.useState(!1),[d,p]=y.useState(""),[f,b]=Ar({subscriptionURL:"#"});if(y.useEffect(()=>{(Dt(n,o)||Lt(o))&&xr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(h=>{b({subscriptionURL:h})}).catch(h=>{console.error("get subscription url error:",h)})},[n,o]),y.useEffect(()=>{if(n.controller?.launcherUrl){const h=se(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(h).then(w=>w.json()).then(w=>{const C=w.componentMountPoints?.find(k=>k.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,D=se(n.controller.launcherUrl,C);p(D)})}},[n.controller?.launcherUrl]),!n||!o)return"";let g=null,m="",j="error";return br(o)?(g=yr(o)?a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):a.jsx(Vo,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),m=e("blocklet.suspendedCausedByPastDue",{deadline:ne(o?.reservedUntil,t)})):Lt(o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),m=e("blocklet.willBeSuspendedSoon",{deadline:ne((o?.subscription?.cancel_at||0)*1e3,t)}),j="warning"):Dt(n,o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),m=e("blocklet.suspendedCausedByExpired",{deadline:ne(o?.reservedUntil,t),canceledAt:ne((o?.subscription?.canceled_at||0)*1e3,t)})):vr(n,o)&&(g=a.jsx(sn,{to:se(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),m=e("blocklet.suspendedCausedByTerminated",{canceledAt:ne(o?.terminatedAt,t),deadline:Sr(o?.terminatedAt,t)})),m?a.jsxs(a.Fragment,{children:[a.jsxs(ht,{severity:j,sx:{mb:1},children:[m,a.jsx(re,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:g})]}),l&&d&&o&&a.jsx(wr,{session:i,connect:s,baseUrl:d,authToken:o.subscription.authToken,children:a.jsx(zr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:o.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),r(),u(!1)}})})]}):null}const Qi=y.lazy(()=>_(()=>import("./log-C9DU0cCG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Zi=y.lazy(()=>_(()=>import("./index-CeczUnUx.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,3,38,39,40,41,42,43]))),Xi=y.lazy(()=>_(()=>import("./index-C_CqbmyE.js"),__vite__mapDeps([44,4,2,1,5,6,7,8,15,9,10,11,19,20,45,46,31,27,36,47]))),Ji=y.lazy(()=>_(()=>import("./index-B9-tuTku.js"),__vite__mapDeps([48,2,1,9,4,5,6,7,8,10,11,31,27,20,18,49,12,37,50,22,51,40,52,53,25,54,55,56,57,38,58,59,60,61]))),Yi=y.lazy(()=>_(()=>import("./overview-BVSh5o7h.js"),__vite__mapDeps([62,1,2,4,5,6,7,8,63,64,9,10,11,30,39,29,19,20,18,65,66,67,53,3,27,31,38,40,41,42,43]))),ea=y.lazy(()=>_(()=>import("./domains-BvFskQMv.js"),__vite__mapDeps([68,2,4,1,5,6,7,8,9,10,11,69,40,21,20,39,29,31,27,36,57,22,28,30,70,52]))),ta=y.lazy(()=>_(()=>import("./index-DyH1BrER.js"),__vite__mapDeps([71,2,6,5,1,4,7,8,9,10,11,18,19,20,72,15,33,34,45,73,21,74,75,76,31,27,50,40,77]))),na=y.lazy(()=>_(()=>import("./appearance-BF-F41U0.js"),__vite__mapDeps([78,5,2,9,1,4,6,7,8,10,11,45]))),oa=y.lazy(()=>_(()=>import("./audit-logs-gbfUafHi.js"),__vite__mapDeps([79,4,2,1,5,6,7,8,9,10,11,33,34,3,59,60,37,61,19,20]))),ra=y.lazy(()=>_(()=>import("./index-gkhmzgqt.js"),__vite__mapDeps([80,2,1,5,4,6,7,8,9,10,11,46,19,20,81,82,37,30,83,84,12,15,33,34,18,85,39,29,86,87,27,88,89,25,26,45]))),sa=y.lazy(()=>_(()=>import("./config-navigation-CfGhB5-E.js"),__vite__mapDeps([90,2,1,4,5,6,7,8,9,10,11,66,75,91,92,46,93,19,20,53,94,54,55,86,27,3,31,38,39,29,40,41,42,43]))),ia=y.lazy(()=>_(()=>import("./index-DjKmasIZ.js"),__vite__mapDeps([95,1,2,6,5,9,4,7,8,10,11,45,96,97,64,73,53,98,99,67,27,30,89,38,100,58,50]))),aa=y.lazy(()=>_(()=>import("./index-CgRDnxac.js"),__vite__mapDeps([101,4,2,1,5,6,7,8,9,10,11,102,46,100,58,81,63,30,34,103,45]))),ca=y.lazy(()=>_(()=>import("./security-BwF3YzTL.js"),__vite__mapDeps([104,4,2,1,5,6,7,8,9,10,11,46,93,19,20,105,45]))),la=y.lazy(()=>_(()=>import("./branding-Co1T-6R4.js"),__vite__mapDeps([106,2,1,4,5,6,7,8,9,10,11,107,66,91,108,76,21,20,19,81]))),ua=y.lazy(()=>_(()=>import("./advanced-BhS7b_np.js"),__vite__mapDeps([109,2,1,9,4,5,6,7,8,10,11,21,20,31,27,40,81,22,19,30,18,65,66]))),da=y.lazy(()=>_(()=>import("./traffic-BU5sjdLg.js").then(e=>e.t),__vite__mapDeps([85,2,9,1,4,5,6,7,8,10,11,39,29,86,87,27,88,89,25,26]))),fa=y.lazy(()=>_(()=>import("./runtime-Sobb0AXT.js"),__vite__mapDeps([110,2,1,4,5,6,7,8,9,10,11,97,88,89,12,3,27,31,38,20,19,39,29,40,41,42,43]))),pa=y.lazy(()=>_(()=>import("./index-D6kePAD5.js"),__vite__mapDeps([111,2,1,4,5,6,7,8,27,15,9,10,11,72,18,33,34,19,20,23,24,25,26,31,22,64,57,21,12,36,45,47]))),ha=y.lazy(()=>_(()=>import("./list-DZy6xsmU.js"),__vite__mapDeps([112,2,4,1,5,6,7,8,15,9,10,11,39,29,17,19,20,46,23,24,25,26,49,22,57,31,27,72,18,33,34,36,47,45]))),ma=y.lazy(()=>_(()=>import("./index-D8X_0Jj0.js"),__vite__mapDeps([113,2,4,1,5,6,7,8,9,10,11,53,47,45,19,20]))),ga=y.lazy(()=>_(()=>import("./component-DMzCzNlm.js"),__vite__mapDeps([114,1,2,5,4,6,7,8,9,10,11,27,100,58,21,20,87,92,25,55,107,66,91,22,73,115,56,57,31,38,18,116,117,52,99,67,53,108,118,74,75,82,59,60,3,30,70,45,119,98,96,97,64,120,121,77,86,12,36,19,39,29,40,41,42,43]))),xa=y.lazy(()=>_(()=>import("./index-BC395sak.js"),__vite__mapDeps([122,1,2,4,5,6,7,8,9,10,11]))),ba=se(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),ya=e=>{const{enqueueSnackbar:t}=en(),n=y.useCallback(o=>Tr(ba,{id:o.id,severity:o.severity||"all",componentDid:o.source==="system"?"system":o.componentDid||"all"}),[]);Ir(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,o=>{const r=n(o),{severity:s,description:i}=o||{},c=["error","warning"].includes(s)||o.sticky;o.source==="system"&&t(i,{variant:s,autoHideDuration:c?null:5e3,content:l=>a.jsx(rs,{viewAllUrl:r,keyId:l,notification:o,content:a.jsx(Ur,{notification:o,minimal:!0,rows:0})})})},[],"user")};function no({blocklet:e,isAdmin:t}){return t?a.jsx(ra,{blocklet:e}):a.jsx(Dr,{status:403})}no.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const va=e=>{const{t}=B(),{blocklet:n,actions:{refreshBlocklet:o},client:r,did:s}=de(),i=n?.meta?.did,c=!n||_r(n.status)?[]:M.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:a.jsx(qo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"},{label:t("oauth.client.tab"),value:"oauth"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advancedConfig"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"},{label:t("common.mcpServers"),value:"mcp-servers"}],developers:[{label:t("common.logs"),value:"logs",show:n?.children?.length&&n.structVersion===P.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:Yi,components:ga,members:a.jsx(Zi,{type:"blocklet",createPassportSvg:Tt}),passports:a.jsx(ta,{createPassportSvg:Tt}),settings:a.jsx(aa,{orientation:"vertical"}),security:a.jsx(ca,{}),"did-spaces":a.jsx(ia,{navOrientation:"horizontal"}),domains:ea,branding:a.jsx(la,{blocklet:n,onUpdate:o}),theming:a.jsx(na,{}),navigation:sa,sitemap:a.jsx(yo,{children:t("common.comingSoon")}),notifications:a.jsx(no,{blocklet:n,isAdmin:e}),"audit-logs":a.jsx(oa,{scope:i,categories:["blocklet","team","security","certificates","gateway"]}),analytics:a.jsx(da,{client:r,did:s}),advanced:a.jsx(ua,{blocklet:n,onUpdate:o}),webhooks:a.jsx(Xi,{}),"access-keys":a.jsx(pa,{}),"mcp-servers":a.jsx(ma,{}),logs:Qi,performance:a.jsx(fa,{client:r,did:s}),docs:xa,publish:a.jsx(Ji,{}),oauth:a.jsx(ha,{})};return{tabGroups:l,renders:u}};function Sa(){const e=an(),{tab:t="overview",subtab:n}=Go(),{blocklet:o,refreshFlag:r}=de(),{session:s}=un(),i=Te(()=>s?.user?.did,[s]),c=Hr(),l=Te(()=>s.user?.role&&Er.includes(s.user.role),[s]);ya(i);const{tabGroups:u,renders:d}=va(l),p=h=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${h}`)},f=(u[t]||[]).filter(h=>h.show===void 0||h.show),b=(f||[]).find(h=>h.value===n)?.value||f?.[0]?.value||t,g=d[b]||d.overview,m=["overview"].includes(t),j=o?a.jsxs(hn,{type:"components",children:[f.length>0&&a.jsxs(E,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[a.jsx(bo,{tabs:f,current:b,onChange:p,scrollButtons:"auto"}),m&&!c&&a.jsx(E,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:a.jsx(E,{component:"div",className:"page-header",children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:h}={})=>{h&&$.error(h.message)},variant:"group"}):null})})]}),a.jsx(E,{className:"page-content",children:a.jsx(y.Suspense,{fallback:a.jsx(Le,{relative:"parent",children:a.jsx(V,{})}),children:y.isValidElement(g)?g:a.jsx(g,{blocklet:o})})})]}):a.jsx(Le,{relative:"parent",children:a.jsx(V,{})});return a.jsx(kr,{children:a.jsx(Nr,{children:a.jsx(to,{children:a.jsxs(ja,{children:[c&&m&&a.jsx(E,{component:"div",className:"page-header",sx:{mb:2},children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:h}={})=>{h&&$.error(h.message)},variant:"group"}):null}),a.jsx(Zr,{}),a.jsx(Gi,{}),j]})},`${r}`)})})}function wa(){const{blocklet:e}=de(),{t}=B(),n=e?.meta?.did;return y.useEffect(()=>{const o=jr();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),a.jsxs(a.Fragment,{children:[a.jsx(Cr,{children:a.jsx("title",{children:t("pageTitle.dashboard")})}),a.jsx(Sa,{})]})}const ja=Oe.main`
|
|
64
|
+
`;function Gi(){const{t:e,locale:t}=B(),{blocklet:n,launcherSession:o,refreshSubscription:r}=de(),{connectApi:s,session:i,api:c}=gr(),[l,u]=x.useState(!1),[d,p]=x.useState(""),[f,y]=Ar({subscriptionURL:"#"});if(x.useEffect(()=>{(Dt(n,o)||Tt(o))&&xr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(h=>{y({subscriptionURL:h})}).catch(h=>{console.error("get subscription url error:",h)})},[n,o]),x.useEffect(()=>{if(n.controller?.launcherUrl){const h=se(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(h).then(w=>w.json()).then(w=>{const C=w.componentMountPoints?.find(I=>I.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,D=se(n.controller.launcherUrl,C);p(D)})}},[n.controller?.launcherUrl]),!n||!o)return"";let g=null,m="",j="error";return br(o)?(g=yr(o)?a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):a.jsx(Ho,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),m=e("blocklet.suspendedCausedByPastDue",{deadline:ne(o?.reservedUntil,t)})):Tt(o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),m=e("blocklet.willBeSuspendedSoon",{deadline:ne((o?.subscription?.cancel_at||0)*1e3,t)}),j="warning"):Dt(n,o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),m=e("blocklet.suspendedCausedByExpired",{deadline:ne(o?.reservedUntil,t),canceledAt:ne((o?.subscription?.canceled_at||0)*1e3,t)})):vr(n,o)&&(g=a.jsx(sn,{to:se(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),m=e("blocklet.suspendedCausedByTerminated",{canceledAt:ne(o?.terminatedAt,t),deadline:Sr(o?.terminatedAt,t)})),m?a.jsxs(a.Fragment,{children:[a.jsxs(ht,{severity:j,sx:{mb:1},children:[m,a.jsx(re,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:g})]}),l&&d&&o&&a.jsx(wr,{session:i,connect:s,baseUrl:d,authToken:o.subscription.authToken,children:a.jsx(zr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:o.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),r(),u(!1)}})})]}):null}const Qi=x.lazy(()=>_(()=>import("./log-B9tZ4qc6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Zi=x.lazy(()=>_(()=>import("./index-Ce_ilge5.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,3,39,40,41,42,43,44]))),Xi=x.lazy(()=>_(()=>import("./index-iY8rmPEZ.js"),__vite__mapDeps([45,4,2,1,5,6,7,8,15,9,10,11,19,20,21,46,47,32,28,37,48]))),Ji=x.lazy(()=>_(()=>import("./index-CZXuMAQy.js"),__vite__mapDeps([49,2,1,9,4,5,6,7,8,10,11,32,28,20,18,50,12,38,51,23,52,41,53,54,26,55,56,57,39,58,59,60,61,62,63,64]))),Yi=x.lazy(()=>_(()=>import("./overview-re3EXfMP.js"),__vite__mapDeps([65,1,2,4,5,6,7,8,66,67,9,10,11,31,40,30,19,20,21,18,68,69,70,54,3,28,32,39,41,42,43,44]))),ea=x.lazy(()=>_(()=>import("./domains-C_XAIIRT.js"),__vite__mapDeps([71,2,4,1,5,6,7,8,9,10,11,72,41,22,20,40,30,32,28,37,60,23,29,31,73,53]))),ta=x.lazy(()=>_(()=>import("./index-C7DDH7Uf.js"),__vite__mapDeps([74,2,6,5,1,4,7,8,9,10,11,18,19,20,21,75,15,34,35,46,76,22,77,78,79,32,28,51,41,80]))),na=x.lazy(()=>_(()=>import("./appearance-CL1LSpJB.js"),__vite__mapDeps([81,5,2,9,1,4,6,7,8,10,11,46]))),oa=x.lazy(()=>_(()=>import("./audit-logs-EC_F2BOT.js"),__vite__mapDeps([82,4,2,1,5,6,7,8,9,10,11,34,35,3,62,63,38,64,19,20,21]))),ra=x.lazy(()=>_(()=>import("./index-Bzde7Bh8.js"),__vite__mapDeps([83,2,1,5,4,6,7,8,9,10,11,47,21,84,85,86,38,31,87,88,12,19,20,15,34,35,18,89,40,30,90,91,28,92,93,26,27,46]))),sa=x.lazy(()=>_(()=>import("./config-navigation-D63aLfma.js"),__vite__mapDeps([94,2,1,4,5,6,7,8,9,10,11,69,78,95,96,47,97,19,20,21,54,98,55,56,90,28,3,32,39,40,30,41,42,43,44]))),ia=x.lazy(()=>_(()=>import("./index-B_CAM-3t.js"),__vite__mapDeps([99,1,2,6,5,9,4,7,8,10,11,46,100,101,67,76,54,102,103,70,28,31,93,39,104,61,51]))),aa=x.lazy(()=>_(()=>import("./index-B0pGy8t9.js"),__vite__mapDeps([105,4,2,1,5,6,7,8,9,10,11,106,47,104,61,84,85,66,31,35,107,46]))),ca=x.lazy(()=>_(()=>import("./security-DnTqhJwZ.js"),__vite__mapDeps([108,4,2,1,5,6,7,8,9,10,11,47,97,19,20,21,109,46]))),la=x.lazy(()=>_(()=>import("./branding-7KMxNl9d.js"),__vite__mapDeps([110,2,1,4,5,6,7,8,9,10,11,111,69,95,112,85,113,79,22,20,19,21,114,84]))),ua=x.lazy(()=>_(()=>import("./advanced-DF-eCD_V.js"),__vite__mapDeps([115,2,1,9,4,5,6,7,8,10,11,22,20,32,28,41,84,85,23,19,21,31,18,68,69]))),da=x.lazy(()=>_(()=>import("./traffic-Ck4_JTUO.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,4,5,6,7,8,10,11,40,30,90,91,28,92,93,26,27]))),fa=x.lazy(()=>_(()=>import("./runtime-BPzGyz-O.js"),__vite__mapDeps([116,2,1,4,5,6,7,8,9,10,11,101,92,93,12,3,28,32,39,20,19,21,40,30,41,42,43,44]))),pa=x.lazy(()=>_(()=>import("./index-DwEMr0X-.js"),__vite__mapDeps([117,2,1,4,5,6,7,8,28,15,9,10,11,75,18,34,35,19,20,21,24,25,26,27,32,23,67,60,22,12,37,46,48]))),ha=x.lazy(()=>_(()=>import("./list-Bty_q29b.js"),__vite__mapDeps([118,2,4,1,5,6,7,8,15,9,10,11,40,30,17,19,20,21,47,24,25,26,27,50,23,60,32,28,75,18,34,35,37,48,46]))),ma=x.lazy(()=>_(()=>import("./index-BSJbc4Ic.js"),__vite__mapDeps([119,2,4,1,5,6,7,8,9,10,11,54,48,46,19,20,21]))),ga=x.lazy(()=>_(()=>import("./config-CPpGYWww.js"),__vite__mapDeps([120,2,1,6,5,21,9,4,7,8,10,11,84,85,113,112,79,57,39,58,95,121,28]))),xa=x.lazy(()=>_(()=>import("./observability-hUM5rYTW.js"),__vite__mapDeps([122,1,2]))),ba=x.lazy(()=>_(()=>import("./playground-wmO_IQQj.js"),__vite__mapDeps([123,1,2]))),ya=x.lazy(()=>_(()=>import("./component-BiE6SG5y.js"),__vite__mapDeps([124,1,2,5,4,6,7,8,9,10,11,28,104,61,22,20,91,96,26,56,111,69,95,23,76,125,59,60,32,39,18,57,126,127,53,103,70,54,85,128,77,78,113,114,86,62,63,121,3,31,73,46,129,102,100,101,67,130,131,80,90,12,37,19,21,40,30,41,42,43,44]))),va=x.lazy(()=>_(()=>import("./index-B5_zLKFf.js"),__vite__mapDeps([132,1,2,4,5,6,7,8,9,10,11]))),Sa=se(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),wa=e=>{const{enqueueSnackbar:t}=en(),n=x.useCallback(o=>Lr(Sa,{id:o.id,severity:o.severity||"all",componentDid:o.source==="system"?"system":o.componentDid||"all"}),[]);_r(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,o=>{const r=n(o),{severity:s,description:i}=o||{},c=["error","warning"].includes(s)||o.sticky;o.source==="system"&&t(i,{variant:s,autoHideDuration:c?null:5e3,content:l=>a.jsx(rs,{viewAllUrl:r,keyId:l,notification:o,content:a.jsx(Ur,{notification:o,minimal:!0,rows:0})})})},[],"user")};function no({blocklet:e,isAdmin:t}){return t?a.jsx(ra,{blocklet:e}):a.jsx(Dr,{status:403})}no.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const ja=e=>{const{t}=B(),{blocklet:n,actions:{refreshBlocklet:o},client:r,did:s}=de(),i=n?.meta?.did,c=!n||kr(n.status)?[]:M.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:a.jsx(qo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"},{label:t("oauth.client.tab"),value:"oauth"}],aigne:[{label:t("setup.aigne.config"),value:"aigne-config"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advancedConfig"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"},{label:t("common.mcpServers"),value:"mcp-servers"}],developers:[{label:t("common.logs"),value:"logs",show:n?.children?.length&&n.structVersion===P.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:Yi,components:ya,members:a.jsx(Zi,{type:"blocklet",createPassportSvg:Lt}),passports:a.jsx(ta,{createPassportSvg:Lt}),settings:a.jsx(aa,{orientation:"vertical"}),security:a.jsx(ca,{}),"did-spaces":a.jsx(ia,{navOrientation:"horizontal"}),domains:ea,branding:a.jsx(la,{blocklet:n,onUpdate:o}),theming:a.jsx(na,{}),navigation:sa,sitemap:a.jsx(yo,{children:t("common.comingSoon")}),notifications:a.jsx(no,{blocklet:n,isAdmin:e}),"audit-logs":a.jsx(oa,{scope:i,categories:["blocklet","team","security","certificates","gateway"]}),analytics:a.jsx(da,{client:r,did:s}),advanced:a.jsx(ua,{blocklet:n,onUpdate:o}),webhooks:a.jsx(Xi,{}),"access-keys":a.jsx(pa,{}),"mcp-servers":a.jsx(ma,{}),logs:Qi,performance:a.jsx(fa,{client:r,did:s}),docs:va,publish:a.jsx(Ji,{}),oauth:a.jsx(ha,{}),"aigne-config":a.jsx(E,{sx:{maxWidth:1536},children:a.jsx(ga,{})}),"aigne-observability":a.jsx(xa,{}),"aigne-playground":a.jsx(ba,{})};return{tabGroups:l,renders:u}};function Ca(){const e=an(),{tab:t="overview",subtab:n}=Go(),{blocklet:o,refreshFlag:r}=de(),{session:s}=un(),i=Le(()=>s?.user?.did,[s]),c=Vr(),l=Le(()=>s.user?.role&&Er.includes(s.user.role),[s]);wa(i);const{tabGroups:u,renders:d}=ja(l),p=h=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${h}`)},f=(u[t]||[]).filter(h=>h.show===void 0||h.show),y=(f||[]).find(h=>h.value===n)?.value||f?.[0]?.value||t,g=d[y]||d.overview,m=["overview"].includes(t),j=o?a.jsxs(hn,{type:"components",children:[f.length>0&&a.jsxs(E,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[a.jsx(bo,{tabs:f,current:y,onChange:p,scrollButtons:"auto"}),m&&!c&&a.jsx(E,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:a.jsx(E,{component:"div",className:"page-header",children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:h}={})=>{h&&$.error(h.message)},variant:"group"}):null})})]}),a.jsx(E,{className:"page-content",children:a.jsx(x.Suspense,{fallback:a.jsx(Te,{relative:"parent",children:a.jsx(H,{})}),children:x.isValidElement(g)?g:a.jsx(g,{blocklet:o})})})]}):a.jsx(Te,{relative:"parent",children:a.jsx(H,{})});return a.jsx(Ir,{children:a.jsx(Nr,{children:a.jsx(to,{children:a.jsxs(Ia,{children:[c&&m&&a.jsx(E,{component:"div",className:"page-header",sx:{mb:2},children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:h}={})=>{h&&$.error(h.message)},variant:"group"}):null}),a.jsx(Zr,{}),a.jsx(Gi,{}),j]})},`${r}`)})})}function Ea(){const{blocklet:e}=de(),{t}=B(),n=e?.meta?.did;return x.useEffect(()=>{const o=jr();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),a.jsxs(a.Fragment,{children:[a.jsx(Cr,{children:a.jsx("title",{children:t("pageTitle.dashboard")})}),a.jsx(Ca,{})]})}const Ia=Oe.main`
|
|
65
65
|
.page-header {
|
|
66
66
|
display: flex;
|
|
67
67
|
justify-content: space-between;
|
|
@@ -103,4 +103,4 @@ ${o}
|
|
|
103
103
|
margin-bottom: 15px;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,Wa=Object.freeze(Object.defineProperty({__proto__:null,default:Ea},Symbol.toStringTag,{value:"Module"}));export{qi as B,Yn as F,eo as W,J as b,Wa as d,Zn as p,qa as u};
|