@abtnode/blocklet-services 1.16.49-beta-20250819-084933-3bcbd851 → 1.16.49-beta-20250822-070545-6d3344cc
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/libs/connect/session.js +4 -4
- package/api/routes/env.js +0 -1
- package/api/services/analytics/index.js +8 -5
- package/api/services/auth/connect/connect-to-did-spaces-for-user.js +5 -5
- package/api/services/auth/connect/migrate-app-to-struct-v2.js +1 -1
- package/api/state/profile.js +1 -1
- package/api/util/blocklet-utils.js +2 -2
- package/dist/assets/{AdapterDayjs-DQyL5DVQ.js → AdapterDayjs-VDBijwaM.js} +1 -1
- package/dist/assets/{Google-C3EYOLRU.js → Google-Sm1AunGv.js} +1 -1
- package/dist/assets/{access-control-CuUB1GoU.js → access-control-VF0jIUag.js} +1 -1
- package/dist/assets/{actions-DnpJX6lQ.js → actions-Bf4UKTeu.js} +1 -1
- package/dist/assets/{add-component-core-JXDWXmkX.js → add-component-core-DPxKUwJB.js} +7 -7
- package/dist/assets/add-resource-DuOqQFR-.js +1 -0
- package/dist/assets/{addon-D99FdIJX.js → addon-CosTdlat.js} +1 -1
- package/dist/assets/{advanced-CGlqr3Vl.js → advanced-B9TR0x_M.js} +2 -2
- package/dist/assets/{aigne-DceTN7Rt.js → aigne-C7JPp9u1.js} +1 -1
- package/dist/assets/api-IUmhrtIY.js +1 -0
- package/dist/assets/{appearance-fnwZybsp.js → appearance-Byekpih2.js} +1 -1
- package/dist/assets/{ar-B5ZCU4Ws.js → ar-fE5SSTrt.js} +1 -1
- package/dist/assets/{arrow-down.svg-BcoTeNyX.js → arrow-down.svg-lBR1lfm2.js} +1 -1
- package/dist/assets/{audit-logs-Dzq32Y_L.js → audit-logs-BTyQcfWp.js} +2 -2
- package/dist/assets/authorize-BbCQomqp.js +1 -0
- package/dist/assets/{base-chart-CBzZ3RX9.js → base-chart-DZz4r8-E.js} +1 -1
- package/dist/assets/base32-D7JDMggs.js +1 -0
- package/dist/assets/bind-account-B-fdpRuH.js +1 -0
- package/dist/assets/{branding-BgclUoWJ.js → branding-Bp4tsvug.js} +5 -5
- package/dist/assets/branding-CXO5C9Lb.js +1 -0
- package/dist/assets/{branding-g04aJopG.js → branding-DKOBu_eV.js} +2 -2
- package/dist/assets/{bundle-avatar-VT8FLC3N.js → bundle-avatar-FLzOZWlh.js} +1 -1
- package/dist/assets/button-DEDR-8Tu.js +1 -0
- package/dist/assets/{click-to-copy-LMYjlbUz.js → click-to-copy-CVpUD4ji.js} +1 -1
- package/dist/assets/{cloneDeep-KmDjD-jP.js → cloneDeep-DqaMBldf.js} +1 -1
- package/dist/assets/{collapse-XWrflTSv.js → collapse-C-BNkgS6.js} +1 -1
- package/dist/assets/{complete-BnL-RLHX.js → complete-CnjLDP7N.js} +2 -2
- package/dist/assets/{component-B20Ffd5t.js → component-Dogt0tzj.js} +3 -3
- package/dist/assets/{config-DRsQLuMp.js → config-B5Y8LOpp.js} +3 -3
- package/dist/assets/{config-BV0yp1Ym.js → config-BxiVjVAu.js} +1 -1
- package/dist/assets/{config-CJHA8pSh.js → config-gL555Qh4.js} +2 -2
- package/dist/assets/{config-navigation-CR3DV4xf.js → config-navigation-CveewaP3.js} +11 -11
- package/dist/assets/{config-space-BzTYceTE.js → config-space-h6V3UKMc.js} +1 -1
- package/dist/assets/confirm-C9tgdTJT.js +7 -0
- package/dist/assets/{connect-Dvl9nMFJ.js → connect-CYT-S8fi.js} +1 -1
- package/dist/assets/{connect-BaSUwW0G.js → connect-Cx2VNYgu.js} +1 -1
- package/dist/assets/connect-to-DiEQlFbF.js +1 -0
- package/dist/assets/{content-layout-yAb710pQ.js → content-layout-DoBqUAz1.js} +1 -1
- package/dist/assets/createClass-D9kGlylC.js +1 -0
- package/dist/assets/{dashboard-CuNuXf3l.js → dashboard-D1d9MQbs.js} +6 -6
- package/dist/assets/{de-Bt2QRaGQ.js → de-Byq6SyWJ.js} +1 -1
- package/dist/assets/{delete-confirm-DTjAa9xG.js → delete-confirm-XVeEePxy.js} +1 -1
- package/dist/assets/{did-address-CY4nLJqm.js → did-address-CcsL3-Qm.js} +1 -1
- package/dist/assets/{domain-C8-oT2Wp.js → domain-CV6OAKYE.js} +1 -1
- package/dist/assets/domain-action-card-BXYZu_pS.js +28 -0
- package/dist/assets/domains-DrF1lJas.js +1 -0
- package/dist/assets/{email-BXcDoVMA.js → email-CniDyVLQ.js} +3 -3
- package/dist/assets/{empty-spinner-CvzdEO93.js → empty-spinner-BMVhld2Z.js} +1 -1
- package/dist/assets/engine-hsJUTQxh.js +1 -0
- package/dist/assets/{es-RcHRYKIM.js → es-Q8J1CCMS.js} +1 -1
- package/dist/assets/{exchange-passport-BJ2cvp1M.js → exchange-passport-BnNDAYeY.js} +1 -1
- package/dist/assets/{form-Df41zlMi.js → form-BndJ7ZnS.js} +2 -2
- package/dist/assets/{form-text-input-DHhw6HI1.js → form-text-input-DJPCEDjA.js} +1 -1
- package/dist/assets/{form-wrapper-DihET07L.js → form-wrapper-CHYdE4By.js} +1 -1
- package/dist/assets/{fr-CQKeqjRX.js → fr-8njRrvuV.js} +1 -1
- package/dist/assets/{fuel-D_lR2dCI.js → fuel-BTh7B67H.js} +1 -1
- package/dist/assets/gen-access-key-CbaepD9-.js +1 -0
- package/dist/assets/gen-simple-access-key-mJK0zx1B.js +1 -0
- package/dist/assets/get-safe-url-Bpq2IOGY.js +1 -0
- package/dist/assets/hdkey-BpKJbkt5.js +62 -0
- package/dist/assets/hi-JUTdfcRr.js +5 -0
- package/dist/assets/{home-YcebrtVr.js → home-BwLLSjzW.js} +1 -1
- package/dist/assets/{id-B2v2gNB3.js → id-CrtgRPeX.js} +1 -1
- package/dist/assets/iframe-CbjzikLk.js +1 -0
- package/dist/assets/index-0VNYJQln.js +271 -0
- package/dist/assets/{index-COzISRvj.js → index-B5t6TkeL.js} +9 -9
- package/dist/assets/{index-Pzk7QDI_.js → index-B9sHaKla.js} +1 -1
- package/dist/assets/{index-I45i29I1.js → index-BFQdM_lT.js} +1 -1
- package/dist/assets/index-BH6jQqKY.js +55 -0
- package/dist/assets/{index-C2CNlq3a.js → index-BIfpX-Mq.js} +1 -1
- package/dist/assets/index-BKiTWpo1.js +6 -0
- package/dist/assets/{index-DtDUB9t6.js → index-BY2dcTa4.js} +1 -1
- package/dist/assets/{index-yRvJst1p.js → index-Bk02VaQE.js} +10 -10
- package/dist/assets/index-BtHQU9Nx.js +30 -0
- package/dist/assets/{index-BbOvyzfE.js → index-BtkFo6d6.js} +1 -1
- package/dist/assets/{index-BusluHY3.js → index-BxU3q403.js} +12 -12
- package/dist/assets/{index-CV12n3b0.js → index-Bzij4iIk.js} +1 -1
- package/dist/assets/{index-DYgvuymH.js → index-C-DpXzH8.js} +1 -1
- package/dist/assets/index-C4e0bu4c.js +124 -0
- package/dist/assets/{index-Bx4IaUHc.js → index-Ca4b_pCt.js} +6 -6
- package/dist/assets/{index-Bv7qQ-8a.js → index-Cd2DJL-w.js} +1 -1
- package/dist/assets/index-CjfYhb8W.js +1 -0
- package/dist/assets/index-CuQBOJqN.js +1022 -0
- package/dist/assets/index-DEu06Btv.js +1 -0
- package/dist/assets/index-DQmcrxe_.js +1 -0
- package/dist/assets/{index-DHaiY3PI.js → index-DT3k66ox.js} +1 -1
- package/dist/assets/{index-BNm1HXpF.js → index-DzSOofQf.js} +11 -11
- package/dist/assets/{index-CX5AEYFR.js → index-DzqNo2lD.js} +1 -1
- package/dist/assets/index-JixySlIT.js +7 -0
- package/dist/assets/{index-DeQPqRmy.js → index-SbRD4xbu.js} +2 -2
- package/dist/assets/{index-D4wH7CER.js → index-ew1if2W6.js} +6 -6
- package/dist/assets/index-hXRVhE3g.js +113 -0
- package/dist/assets/{index-DQ3_Wuxe.js → index-pAv7g5o_.js} +1 -1
- package/dist/assets/{index-Q_U4JZ73.js → index-yi4PlkyH.js} +1 -1
- package/dist/assets/{invitation-Cic0zA9s.js → invitation-CsvJMPo7.js} +3 -3
- package/dist/assets/{invite-EVcEzrIF.js → invite-DEEX5t_7.js} +1 -1
- package/dist/assets/{isURL-BZcSl4qG.js → isURL-Cuto2_sB.js} +2 -2
- package/dist/assets/{issue-passport-B3O3mNxG.js → issue-passport-BuT9-mlQ.js} +1 -1
- package/dist/assets/{item-BJ_EimT6.js → item-CEYjCEHD.js} +1 -1
- package/dist/assets/{ja-BweNHYYv.js → ja-BDFhRccP.js} +1 -1
- package/dist/assets/{ko-BrUV9qyv.js → ko-Dde62QRb.js} +1 -1
- package/dist/assets/landing-page-CbZO5p-X.js +1 -0
- package/dist/assets/{launch-result-message-CFuQ3Maq.js → launch-result-message-BhJWVXUs.js} +1 -1
- package/dist/assets/{layout-DTue3JyF.js → layout-BOMMbsdq.js} +1 -1
- package/dist/assets/list-CIIZmkmF.js +4 -0
- package/dist/assets/list-CcfeNfGu.js +103 -0
- package/dist/assets/{list-header-bAafK8zK.js → list-header-BQx81X9X.js} +1 -1
- package/dist/assets/localization-DNJagVoT.js +1 -0
- package/dist/assets/{log-DiR01oV7.js → log-CHaoSWXc.js} +1 -1
- package/dist/assets/logger-yrkSQn8c.js +1 -0
- package/dist/assets/login-C0FSm4ep.js +1 -0
- package/dist/assets/{login-oauth-callback-D2Bc3xAH.js → login-oauth-callback-DJxlMwXZ.js} +1 -1
- package/dist/assets/{logo-uploader-BayOewpo.js → logo-uploader-C0ihL7E6.js} +2 -2
- package/dist/assets/{lost-passport-flvvhlNS.js → lost-passport-BoAvHfI_.js} +2 -2
- package/dist/assets/{observability-DUV9CYIA.js → observability-F2NkCkza.js} +1 -1
- package/dist/assets/{omit-DdJriebF.js → omit-BM-5z5qE.js} +1 -1
- package/dist/assets/{open-window-Cj2XU2ZE.js → open-window-BNY_OfK6.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-DveCusKe.js → over-due-invoice-payment-DXbfRbJ6.js} +1 -1
- package/dist/assets/{overview-BCygf-5_.js → overview-DpF1loGs.js} +2 -2
- package/dist/assets/{page-header-BtdOLX8d.js → page-header-CSMnIoYZ.js} +1 -1
- package/dist/assets/passport-item-VXkf3FVk.js +1 -0
- package/dist/assets/{permission-BPBzp1tm.js → permission-DeQz9qFD.js} +1 -1
- package/dist/assets/{playground-Doy13-fN.js → playground-CTvnZW2L.js} +1 -1
- package/dist/assets/preferences-C7TivEto.js +1 -0
- package/dist/assets/profile-embed-Dzt59MHT.js +1 -0
- package/dist/assets/pt-C4nfuExm.js +5 -0
- package/dist/assets/publish-resource-BSY6p0as.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-DR1a-vn2.js → react-beautiful-dnd.esm-CYy644iX.js} +1 -1
- package/dist/assets/{react-stripe.esm-DJ2wjb7C.js → react-stripe.esm-CLg1-THR.js} +1 -1
- package/dist/assets/{required-2qxcR9JF.js → required-CobBjKC9.js} +1 -1
- package/dist/assets/ru-B4GtNlEa.js +5 -0
- package/dist/assets/runtime-B01d8fEk.js +1 -0
- package/dist/assets/{sanitize-t-NsAK4g.js → sanitize-NVxeYIWy.js} +1 -1
- package/dist/assets/sdk-ZTxfQBV1.js +1 -0
- package/dist/assets/{section-D4T7FV6C.js → section-Dq8SB7lh.js} +1 -1
- package/dist/assets/{security-BAcM8QUq.js → security-sVehajDA.js} +3 -3
- package/dist/assets/session-Bk6ebojT.js +1 -0
- package/dist/assets/{setup-Cs_D4O1K.js → setup-B9yaqoQM.js} +1 -1
- package/dist/assets/{shorten-label-BfHH-3ih.js → shorten-label-BHlFrl9P.js} +1 -1
- package/dist/assets/{simple-select-DIgPQFb4.js → simple-select-rm53gQ69.js} +1 -1
- package/dist/assets/{spaces-CU7Gi53i.js → spaces-HwfT17d7.js} +1 -1
- package/dist/assets/{start-Ds4Of13F.js → start-4J_Dh_zH.js} +1 -1
- package/dist/assets/{starting-progress-BTMrLOch.js → starting-progress-mgdXXqlr.js} +1 -1
- package/dist/assets/status-B1AV3yPH.js +1 -0
- package/dist/assets/{step-actions-DDyCXELh.js → step-actions-YjxSTbIE.js} +1 -1
- package/dist/assets/{studio-CYLOXolI.js → studio-Cx6j_6QU.js} +1 -1
- package/dist/assets/{switch-control-CAUrltdD.js → switch-control-BR8H_fdm.js} +1 -1
- package/dist/assets/{table-tips-BNjmTVFL.js → table-tips-BP283GGZ.js} +1 -1
- package/dist/assets/team-Dl23XmaY.js +146 -0
- package/dist/assets/th-BkShd6jD.js +5 -0
- package/dist/assets/traffic-O-wVx65-.js +1 -0
- package/dist/assets/{transfer-2ba_g--R.js → transfer-gEq9B27K.js} +1 -1
- package/dist/assets/{unsubscribe-B0KWDak0.js → unsubscribe-vpGsla5T.js} +1 -1
- package/dist/assets/{use-app-logo-pyV6ZPrc.js → use-app-logo-7cjs_pn8.js} +1 -1
- package/dist/assets/{use-mobile-BcHeqFSk.js → use-mobile-C_DcJ5SZ.js} +1 -1
- package/dist/assets/{use-mobile-BmKySh5X.js → use-mobile-DM4d_PLd.js} +1 -1
- package/dist/assets/{use-server-logo-CFQEMdB-.js → use-server-logo-Cxah39TH.js} +1 -1
- package/dist/assets/{use-window-close-PwuafSt8.js → use-window-close-DpgRKaaP.js} +1 -1
- package/dist/assets/{useAsync-BrjQTmBf.js → useAsync-BrMo9m7W.js} +1 -1
- package/dist/assets/{useAsync-C0iFIKqR.js → useAsync-CsYRBczg.js} +1 -1
- package/dist/assets/{useAsyncRetry-BmdG-NgH.js → useAsyncRetry-D4-sRZN-.js} +1 -1
- package/dist/assets/useLocalStorage-DqhgzGNT.js +1 -0
- package/dist/assets/user-center-DtJ32yjF.js +126 -0
- package/dist/assets/user-sessions-CFxn5EHL.js +1 -0
- package/dist/assets/{util-Dceeaiqy.js → util-Ca2jlZN4.js} +1 -1
- package/dist/assets/{util-BW0qhGTg.js → util-o8U4JIlX.js} +1 -1
- package/dist/assets/{vendor-arcblock-D_Dm09bZ.js → vendor-arcblock-B7AoUs4o.js} +139 -138
- package/dist/assets/{vendor-hooks-9cd36rYd.js → vendor-hooks-BRXKH6Nb.js} +1 -1
- package/dist/assets/{vendor-mui-core-DV92LEhm.js → vendor-mui-core-B7zoO8f5.js} +1 -1
- package/dist/assets/{vendor-mui-x-8McV6Pkb.js → vendor-mui-x-Qph0dQcg.js} +1 -1
- package/dist/assets/vendor-utils-DtY42AM-.js +213 -0
- package/dist/assets/{vendor-ux-C9Q7otQi.js → vendor-ux-B7q8W4Pg.js} +11 -11
- package/dist/assets/vi-C1PSP5SP.js +5 -0
- package/dist/assets/{wait-connect-CZLL86-A.js → wait-connect-DPAxcgcf.js} +1 -1
- package/dist/assets/{wizard-B45wL4-0.js → wizard-072KuoFQ.js} +1 -1
- package/dist/assets/{wizard-components-DtebwiYw.js → wizard-components-Dx5C9E35.js} +3 -3
- package/dist/assets/wrap-locale-BQM6_LkP.js +1 -0
- package/dist/assets/{zh-DBSThusI.js → zh-C_fDhC3R.js} +1 -1
- package/dist/assets/{zh-BaEjqGHy.js → zh-gAK37O_Y.js} +2 -2
- package/dist/assets/{zh-tw-xcyHbP3V.js → zh-tw-BGfyObps.js} +2 -2
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/package.json +33 -33
- package/dist/assets/add-resource-DfcJCfFx.js +0 -1
- package/dist/assets/api-ZbpPN5Q9.js +0 -1
- package/dist/assets/authorize-Cp-IEkvY.js +0 -1
- package/dist/assets/base32-rvunYmjt.js +0 -1
- package/dist/assets/bind-account-DWpWB9oY.js +0 -1
- package/dist/assets/branding-C1Ia1UuG.js +0 -1
- package/dist/assets/button-DTxgdpBB.js +0 -1
- package/dist/assets/confirm-DTV46cI2.js +0 -7
- package/dist/assets/connect-to-DqRnkSJR.js +0 -1
- package/dist/assets/createClass-BMZZ4tvt.js +0 -1
- package/dist/assets/domain-action-card-CEOtRquC.js +0 -28
- package/dist/assets/domains-UcvU4SNI.js +0 -1
- package/dist/assets/engine-D80vWtQO.js +0 -1
- package/dist/assets/gen-access-key-CceVm9CK.js +0 -1
- package/dist/assets/gen-simple-access-key-DBtfSm_M.js +0 -1
- package/dist/assets/get-safe-url-C-ga6boD.js +0 -1
- package/dist/assets/hi-C3FQ6j4Z.js +0 -5
- package/dist/assets/iframe-yWzH7Y70.js +0 -1
- package/dist/assets/index-9RuhtmiE.js +0 -7
- package/dist/assets/index-B8oq6zxb.js +0 -1
- package/dist/assets/index-BPLFlpyZ.js +0 -1
- package/dist/assets/index-Bpx_SHfH.js +0 -124
- package/dist/assets/index-BwWh6qt0.js +0 -113
- package/dist/assets/index-CBuBVmWe.js +0 -1020
- package/dist/assets/index-CJ69vsWG.js +0 -271
- package/dist/assets/index-DMpO3u1o.js +0 -29
- package/dist/assets/index-DTwsbX7O.js +0 -55
- package/dist/assets/index-Dib9OV0s.js +0 -6
- package/dist/assets/index-GUfN0pBe.js +0 -62
- package/dist/assets/index-OkiS9ggb.js +0 -1
- package/dist/assets/landing-page-CEwZuo6C.js +0 -1
- package/dist/assets/list-DFvUHI6u.js +0 -103
- package/dist/assets/list-DKV7bt8d.js +0 -2
- package/dist/assets/localization-BAcpaWtp.js +0 -1
- package/dist/assets/logger-__gJZTBC.js +0 -1
- package/dist/assets/login-DcV8dmSg.js +0 -1
- package/dist/assets/passport-item-Bej8KfmX.js +0 -1
- package/dist/assets/preferences-f1ltD9jG.js +0 -1
- package/dist/assets/profile-embed-DKKNp824.js +0 -1
- package/dist/assets/pt-DopXhOk4.js +0 -5
- package/dist/assets/publish-resource-Ce_uMtZk.js +0 -1
- package/dist/assets/ru-pXOMfITZ.js +0 -5
- package/dist/assets/runtime-EaR7CQWh.js +0 -1
- package/dist/assets/sdk-D0Pm334j.js +0 -1
- package/dist/assets/session-DW40g2df.js +0 -1
- package/dist/assets/status-D4MGFqcv.js +0 -1
- package/dist/assets/team-C8yfeoct.js +0 -146
- package/dist/assets/th-Dt7avnjd.js +0 -5
- package/dist/assets/traffic-BjVQYor-.js +0 -1
- package/dist/assets/useLocalStorage-BRaJWH_j.js +0 -1
- package/dist/assets/user-center-V4qQZYhM.js +0 -126
- package/dist/assets/user-sessions-DYh09QrL.js +0 -1
- package/dist/assets/vendor-utils-CddrUZ58.js +0 -213
- package/dist/assets/vi-BbB_zl6_.js +0 -5
- package/dist/assets/wrap-locale-FkxlVw29.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,T as i}from"./vendor-mui-core-
|
|
1
|
+
import{j as e,T as i}from"./vendor-mui-core-B7zoO8f5.js";import{K as p,L as c}from"./vendor-utils-DtY42AM-.js";import{l as x}from"./vendor-ux-B7q8W4Pg.js";function y({name:t,nameFormatter:r=o=>typeof o=="string"?o.split(" ").map(f=>p(c(f))).join(" "):o,layout:n="horizontal",children:a,valueComponent:l="div",nameWidth:m=90,...s}){return e.jsxs(d,{layout:n,width:m,...s,children:[e.jsx(i,{color:"textSecondary",className:"info-row__name",children:r(t)}),a&&e.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:a})]})}const d=x("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
|
|
4
4
|
justify-content: flex-start;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as m,j as e,Q as c,bf as B,P as C,ai as E,o as I,bg as P,O as z}from"./vendor-mui-core-
|
|
1
|
+
import{M as m,j as e,Q as c,bf as B,P as C,ai as E,o as I,bg as P,O as z}from"./vendor-mui-core-B7zoO8f5.js";import{r as o}from"./vendor-react-Dvs43sk9.js";import{n as A}from"./vendor-utils-DtY42AM-.js";import{l as p}from"./vendor-ux-B7q8W4Pg.js";function L({...r}){const{size:d="medium",color:i="primary",menu:a=[],children:s=null,variant:u="contained",onClick:x=A,menuButtonProps:f={},...h}=r,[g,l]=o.useState(!1),n=o.useRef(null),j=Array.isArray(a)?a.map((t,b)=>o.isValidElement(t)?t:o.createElement(m,{...t,key:b})):a,M=()=>{l(t=>!t)},y=t=>{n.current&&n.current.contains(t.target)||l(!1)},k=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:u,size:d,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:M,color:i,...f,"aria-label":"more functions",children:e.jsx(B,{})})]}),e.jsx(w,{open:g,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(C,{children:e.jsx(E,{onClickAway:y,children:e.jsx(I,{onClick:k,children:j})})})})]})}L.Item=m;const v=p(P)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import{j as e,y as St,bb as Se,M as ae,ak as f,Q as _,W as u,J as xe,c0 as kt,I as O,aN as Pt,T as I,aj as Rt,b5 as Ee,P as Le,b6 as Q,a5 as Be,z as Ve,A as Ye,cm as It,bf as Tt,U as je,d8 as At,d9 as Mt,at as ee,da as zt,a6 as Y,n as le,D as Et,db as Lt,ar as We,b1 as ke,dc as Bt,aX as Wt,am as J,bp as Nt,bq as ye,a$ as Dt,cV as Ot}from"./vendor-mui-core-B7zoO8f5.js";import{r as y,a as $t,u as Ut,j as Ft}from"./vendor-react-Dvs43sk9.js";import{t as Ze,Z as qt,a7 as _t,R as Ne,D as Ht,C as ce,n as V,A as Gt}from"./vendor-utils-DtY42AM-.js";import{a as Kt,G as Vt,bw as Yt,c as Pe,d as Zt,Y as Qt,bx as Jt,aU as Re,W as fe,bh as Xt,by as er,a5 as tr,aW as rr,a6 as nr,bz as or}from"./index-CuQBOJqN.js";import{a as T,h as Qe,k as te,g as H,b as E,j as sr}from"./vendor-hooks-BRXKH6Nb.js";import{l as Je}from"./arrow-down.svg-lBR1lfm2.js";import{G as Ie,aa as D,T as N,aL as ir,a9 as Xe,aM as ar,H as q,aN as lr,aO as cr,aP as De,J as dr,D as et,I as Te,aQ as ur,aR as M,a1 as pr,a0 as xr,$ as tt,aS as fr,aT as hr,Z as gr,C as de,a5 as Oe,ab as mr}from"./vendor-ux-B7q8W4Pg.js";import{N as br}from"./list-CcfeNfGu.js";import{d as yr}from"./search-4YYphs0l.js";import{B as $e}from"./bundle-avatar-FLzOZWlh.js";import{h as Ue,T as vr}from"./team-Dl23XmaY.js";import{b as wr,d as jr,a as Cr,c as Sr,e as kr,f as Pr,B as Rr}from"./user-center-DtJ32yjF.js";import{N as rt,U as nt}from"./index-pAv7g5o_.js";import{u as re}from"./use-mobile-DM4d_PLd.js";import Ir from"./index-DEu06Btv.js";import{f as X}from"./index-DBs9Ljax.js";import{u as ot}from"./index-BtkFo6d6.js";import{U as ve}from"./user-sessions-CFxn5EHL.js";import Tr from"./index-ew1if2W6.js";import{o as Ar}from"./vendor-arcblock-B7AoUs4o.js";import{c as Mr,b as ue,a as zr,S as Er}from"./index-BtHQU9Nx.js";import"./index-C-DpXzH8.js";import"./index-BojVbZw0.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./index-DzqNo2lD.js";import"./util-Ca2jlZN4.js";import"./base32-D7JDMggs.js";import"./session-Bk6ebojT.js";import"./isURL-Cuto2_sB.js";import"./use-app-logo-7cjs_pn8.js";import"./index-Ca4b_pCt.js";import"./api-IUmhrtIY.js";import"./table-tips-BP283GGZ.js";import"./use-mobile-C_DcJ5SZ.js";import"./passport-item-VXkf3FVk.js";import"./did-address-CcsL3-Qm.js";import"./index-Cd2DJL-w.js";import"./vendor-mui-x-Qph0dQcg.js";import"./AdapterDayjs-VDBijwaM.js";import"./confirm-C9tgdTJT.js";import"./click-to-copy-CVpUD4ji.js";import"./delete-confirm-XVeEePxy.js";import"./permission-DeQz9qFD.js";import"./actions-Bf4UKTeu.js";import"./index-DRYJ0xIl.js";function Lr(){let t=new Map;function s({root:o,rootMargin:n,threshold:l}){let i=t.get(o);i||(i=new Map,t.set(o,i));let c=JSON.stringify({rootMargin:n,threshold:l}),p=i.get(c);if(!p){let r=new Map;p={observer:new IntersectionObserver(x=>{x.forEach(m=>{r.get(m.target)?.(m)})},{root:o,rootMargin:n,threshold:l}),entryCallbacks:r},i.set(c,p)}return{observe:(r,x)=>{p.entryCallbacks.set(r,x),p.observer.observe(r)},unobserve:r=>{p.entryCallbacks.delete(r),p.observer.unobserve(r)}}}return{getObserver:s}}var Br="0px",Wr=[0],Nr=Lr();function Dr(t){let s=t?.rootMargin??Br,o=t?.threshold??Wr,n=y.useRef(null),l=y.useRef(null),i=y.useRef(null),[c,p]=y.useState(),r=y.useCallback(()=>{let C=n.current;if(!C){p(void 0);return}let v=Nr.getObserver({root:l.current,rootMargin:s,threshold:o});v.observe(C,a=>{p(a)}),i.current=v},[s,o]),x=y.useCallback(()=>{let C=i.current,v=n.current;v&&C?.unobserve(v),i.current=null},[]),m=y.useCallback(C=>{x(),n.current=C,r()},[r,x]),h=y.useCallback(C=>{x(),l.current=C,r()},[r,x]);return[m,{entry:c,rootRef:h}]}var Or=Dr;function $r(t){let[s,o]=Or(t),n=!!o.entry?.isIntersecting,[l,i]=y.useState(n);return n&&!l&&i(!0),[s,{...o,isVisible:n,wasEverVisible:l}]}var Ur=$r,Fr=100;function qr({loading:t,hasNextPage:s,onLoadMore:o,rootMargin:n,disabled:l,delayInMs:i=Fr}){let c=y.useRef(o),[p,{rootRef:r,isVisible:x}]=Ur({rootMargin:n});y.useEffect(()=>{c.current=o},[o]);let m=!l&&!t&&x&&s;return y.useEffect(()=>{if(m){let h=setTimeout(()=>{c.current()},i);return()=>{clearTimeout(h)}}},[m,i]),[p,{rootRef:r}]}var _r=qr;const we={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};pe.propTypes={severity:u.oneOf(["info","success","warning","error",""]).isRequired,size:u.number};function pe({severity:t,size:s=8}){return we[t]?e.jsx(f,{component:"span",sx:{display:"inline-block",width:s,height:s,borderRadius:"50%",backgroundColor:we[t]||we.info}}):null}st.propTypes={theme:u.string,type:u.oneOf(["button","line","select"]),onSelectType:u.func,extra:u.node,loading:u.bool,currentTab:u.oneOf(["info","success","warning","error",""])};function st({theme:t="dark",type:s="button",onSelectType:o,extra:n=void 0,currentTab:l="",loading:i=!1,...c}){const{t:p}=y.useContext(Ie),r=[{label:p("notification.allSeverity"),value:""},{label:p("notification.severityType.info"),value:"info"},{label:p("notification.severityType.success"),value:"success"},{label:p("notification.severityType.warning"),value:"warning"},{label:p("notification.severityType.error"),value:"error"}],x=g=>{(g!==l||!i)&&o(g)},m=y.useMemo(()=>{const g={width:"100%",bgcolor:t==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:s==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return s==="line"?Object.assign(g,{}):g},[s,t]),h=(g,k,R)=>e.jsx(_,{disabled:i,onClick:()=>x(g.value),className:`profile-button ${k?"active":""}`,...c,children:g.label},g.value||R),C=(g,k,R)=>e.jsx(_,{variant:"text",disabled:i,onClick:()=>x(g.value),className:`profile-line-button ${k?"active":""}`,...c,children:g.label},g.value||R),v=()=>r?.map((g,k)=>{const R=l===g?.value;return s==="line"?e.jsx(y.Fragment,{children:C(g,R,k)},g.value||k):e.jsx(y.Fragment,{children:h(g,R,k)},g.value||k)}),a=g=>{const{value:k}=g.target;x(k==="all"?"":k)};return s==="select"?e.jsx(St,{sx:{maxWidth:300},children:e.jsx(Se,{value:l||"all",onChange:a,size:"small",label:"Severity",IconComponent:g=>e.jsx(Je,{...g,width:20,height:20}),MenuProps:{autoFocus:!1,PaperProps:{style:{maxHeight:400,overflowY:"auto",borderRadius:"8px",boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},variant:"outlined",sx:{fieldset:{border:"none"}},children:r.map((g,k)=>e.jsx(ae,{value:g.value||"all",children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(pe,{severity:g.value}),g.label]})},g.value||k))})}):e.jsxs(f,{className:"severity-tabs",sx:m,children:[e.jsx(f,{sx:{...s==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),n]})}it.propTypes={paging:u.objectOf(u.any).isRequired,loading:u.bool.isRequired,onChange:u.func.isRequired};function it({loading:t,paging:s,onChange:o}){const{t:n}=y.useContext(Ie),l=xe(r=>r.breakpoints.down("md"));if(s.pageCount<=0||l)return null;const i=(r,x)=>{o({page:x+1})},c=r=>{const x=Number(r.target.value);o({page:1,pageSize:x})},p=s.page-1<=0?0:s.page-1;return e.jsx(f,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(kt,{component:"div",disabled:t,count:s.total,page:p,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:n("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:x,count:m})=>`${r}–${x} / ${m!==-1?m:`${n()}more than ${x}`}`,rowsPerPage:s.pageSize,onPageChange:i,onRowsPerPageChange:c})})}const Hr=y.memo(it),Gr={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4h16v2.172a2 2 0 0 1-.586 1.414L15 12v7l-6 2v-8.5L4.52 7.572A2 2 0 0 1 4 6.227V4z"/>'},Fe=6,qe={"& .MuiCheckbox-root":{padding:"4px"},"& .MuiCheckbox-root .MuiSvgIcon-root":{fontSize:"1.35rem"},"& .MuiCheckbox-root:not(.Mui-checked)":{color:"divider"},"& .MuiCheckbox-root.Mui-checked":{color:"primary.main"},"& .MuiCheckbox-root .css-i4bv87-MuiSvgIcon-root":{width:"1.1em",height:"1.1em"},"& .MuiCheckbox-root svg":{stroke:"divider",strokeWidth:.7}},Kr={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},_e=()=>({...Kr,width:"calc(50% - 8px)"});at.propTypes={loading:u.bool,type:u.oneOf(["server","service"]),onFilterChange:u.func,blockletMap:u.object,filterType:u.oneOf(["component","entity"]),selectedId:u.array,severity:u.array,enableMarkAllAsRead:u.bool,unReadCount:u.number,onReadFilterChange:u.func,currentReadFilter:u.string};function at({onFilterChange:t=()=>{},loading:s=!1,type:o="service",blockletMap:n={},filterType:l="component",selectedId:i=[],severity:c=[],enableMarkAllAsRead:p=!0,unReadCount:r=0,onReadFilterChange:x=()=>{},currentReadFilter:m="all"}){const{t:h}=y.useContext(Ie),[C,v]=y.useState(null),a=!!C,[g,k]=y.useState(i),[R,P]=y.useState(c),[b,z]=y.useState(!1),[L,U]=y.useState(""),[j,S]=y.useState([]);y.useEffect(()=>{k(i),P(c)},[i,c]);const B=[{label:h("notification.filterType.all"),value:"all"},{label:h("notification.filterType.unread"),value:"unread"}],G=d=>{(d!==m||!s)&&x(d)},Z=[{label:h("notification.severityType.info"),value:"info"},{label:h("notification.severityType.success"),value:"success"},{label:h("notification.severityType.warning"),value:"warning"},{label:h("notification.severityType.error"),value:"error"}],ne=d=>{v(d.currentTarget),U(""),z(!1)},he=()=>{v(null)},oe=d=>{const w=g.includes(d)?g.filter(A=>A!==d):[...g,d];k(w),t({id:w,severity:R})},se=d=>{const w=R.includes(d)?R.filter(A=>A!==d):[...R,d];P(w),t({severity:w,id:g})},ge=d=>{U(d.target.value)},me=()=>{z(!b)},K=$t.useMemo(()=>{if(!n.size)return[];const d=[];return l==="component"&&d.push({label:h("notification.system"),id:"system"}),Array.from(n).forEach(([,w])=>{const A=w.did||w.meta?.did,W=w.title||w.meta?.title||"",F=w.appPid||w.appDid;(l==="component"&&F!==A||l==="entity"&&F===A)&&d.push({label:W,id:A,blocklet:w,ancestors:w.ancestors})}),d},[n,l,h]);y.useEffect(()=>{if(L.trim()==="")S(K);else{const d=L.toLowerCase(),w=K.filter(A=>A.label.toLowerCase().includes(d));S(w)}},[L,K]);const be=L.trim()!==""||b?j:j.slice(0,Fe);return e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:p?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[p&&e.jsx(f,{sx:{display:"flex",gap:1.5},children:B.map(d=>e.jsxs(_,{disabled:s,onClick:()=>G(d.value),className:`profile-button ${m===d.value?"active":""}`,sx:{...o==="service"&&m===d.value?{color:"secondary.main"}:{},color:"red",fontWeight:m===d.value?"bold":"normal"},children:[d.label,d.value==="unread"&&r>0&&` (${r})`]},d.value))}),e.jsxs(f,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(O,{size:"small",onClick:ne,disabled:s,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(D,{icon:Gr,hFlip:!0})}),e.jsx(Pt,{open:a,anchorEl:C,onClose:he,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},slotProps:{paper:{sx:{p:3,width:450,maxHeight:500,overflowY:"auto",backgroundColor:"background.paper",backgroundImage:"none",borderRadius:1,boxShadow:"0px 6px 24px rgba(0, 0, 0, 0.15)"}}},children:e.jsxs(f,{children:[e.jsxs(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(I,{variant:"subtitle1",sx:{fontWeight:"bold"},children:h("notification.severity")}),e.jsx(f,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(g.length>0||R.length>0)&&e.jsx(_,{size:"small",onClick:()=>{k([]),P([]),t({severity:[],id:[]})},startIcon:e.jsx(Rt,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:h("notification.clear")})})]}),e.jsx(f,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:Z.map(d=>e.jsx(Le,{elevation:0,sx:_e(R.includes(d.value)),children:e.jsx(Q,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...qe},control:e.jsx(Be,{checked:R.includes(d.value),onChange:()=>se(d.value),disabled:s,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(pe,{severity:d.value}),d.label]})})},d.value))})}),e.jsxs(f,{sx:{mb:2},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(I,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:h("notification.from")}),e.jsx(f,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ve,{size:"small",placeholder:"search",value:L,onChange:ge,sx:{width:"100%","& .MuiOutlinedInput-input":{padding:"6px 4px 6px 0"},".MuiOutlinedInput-root":{"&:hover":{fieldset:{borderColor:"divider"}},"&.Mui-focused":{fieldset:{borderColor:"divider"}}},fieldset:{borderColor:"divider"}},slotProps:{input:{size:"small",startAdornment:e.jsx(Ye,{position:"start",sx:{marginRight:"2px"},children:e.jsx(D,{icon:yr})})}}})})]}),e.jsx(Ee,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:be.map(d=>e.jsx(Le,{elevation:0,sx:_e(g.includes(d.id)),children:e.jsx(Q,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...qe},control:e.jsx(Be,{checked:g.includes(d.id),onChange:()=>oe(d.id),disabled:s,size:"small"}),label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[d.blocklet&&e.jsx($e,{size:20,blocklet:d.blocklet,ancestors:d.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(I,{noWrap:!0,variant:"body2",component:"span",title:d.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:d.label})]})})},d.id))}),j.length>Fe&&L.trim()===""&&e.jsx(_,{fullWidth:!0,size:"small",onClick:me,sx:{mt:1},endIcon:b?e.jsx(It,{}):e.jsx(Tt,{})})]})]})})]})]}),g.length>0||R.length>0?e.jsxs(f,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[R.map(d=>{const w=Z.find(A=>A.value===d);return e.jsx(je,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(pe,{severity:d}),w?w.label:d]}),onDelete:()=>se(d),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${d}`)}),g.map(d=>{const w=K.find(A=>A.id===d);return e.jsx(je,{label:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx($e,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:d]}),variant:"outlined",onDelete:()=>oe(d),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${d}`)})]}):null]})}const Vr=ee(zt)`
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 20px;
|
|
4
|
+
right: 20px;
|
|
5
|
+
z-index: 1000;
|
|
6
|
+
@media (max-width: 600px) {
|
|
7
|
+
bottom: 16px;
|
|
8
|
+
right: 16px;
|
|
9
|
+
transform: scale(0.9);
|
|
10
|
+
}
|
|
11
|
+
`;function Yr(){const[t,s]=y.useState(!1);y.useEffect(()=>{const n=Ze(()=>{s(window.pageYOffset>300)},200);return window.addEventListener("scroll",n),n(),()=>window.removeEventListener("scroll",n)},[]);const o=()=>{try{"scrollTo"in window?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0)}catch{window.scrollTo(0,0)}};return e.jsx(At,{in:t,children:e.jsx(Vr,{color:"primary",size:"small","aria-label":"scroll back to top",onClick:o,children:e.jsx(Mt,{})})})}const Zr=ee.div`
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
gap: ${t=>t.inDialog?0:"24px"};
|
|
15
|
+
.MuiContainer-root {
|
|
16
|
+
padding-right: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.profile-button.MuiButtonBase-root {
|
|
20
|
+
border-radius: 9999px;
|
|
21
|
+
margin-right: 2px;
|
|
22
|
+
padding: 5px 12px;
|
|
23
|
+
line-height: 22px;
|
|
24
|
+
font-size: 13px;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
background-color: ${({theme:t})=>t.palette.background.default};
|
|
27
|
+
color: ${({theme:t})=>t.palette.text.primary};
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
border: 1px solid ${({theme:t})=>t.palette.divider} !important;
|
|
30
|
+
}
|
|
31
|
+
.profile-button.active.MuiButtonBase-root,
|
|
32
|
+
.profile-button.active.MuiButtonBase-root:hover {
|
|
33
|
+
color: ${({theme:t})=>t.palette.primary.main};
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
background-color: ${({theme:t})=>le(t.palette.primary.main,.1)};
|
|
36
|
+
border: 1px solid ${({theme:t})=>le(t.palette.primary.main,.24)} !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.profile-button.MuiButtonBase-root:hover {
|
|
40
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.profile-line-button.MuiButtonBase-root {
|
|
44
|
+
margin-right: 2px;
|
|
45
|
+
color: ${({theme:t})=>t.palette.text.secondary};
|
|
46
|
+
padding: 5px 12px;
|
|
47
|
+
line-height: 22px;
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
border: none !important;
|
|
50
|
+
border-radius: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.profile-line-button.active.MuiButtonBase-root {
|
|
54
|
+
color: ${({theme:t})=>t.palette.text.primary};
|
|
55
|
+
border-bottom: 1px solid ${({theme:t})=>t.palette.text.primary} !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.profile-button.MuiButtonBase-root:last-of-type,
|
|
59
|
+
.profile-line-button.MuiButtonBase-root {
|
|
60
|
+
margin-right: 0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.profile-line-button.MuiButtonBase-root:hover {
|
|
64
|
+
color: ${({theme:t})=>t.palette.text.primary};
|
|
65
|
+
background-color: unset;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
* {
|
|
69
|
+
scrollbar-width: none; /* Firefox */
|
|
70
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
*::-webkit-scrollbar {
|
|
74
|
+
display: none; /* Chrome, Safari and Opera */
|
|
75
|
+
}
|
|
76
|
+
`;lt.propTypes={blocklets:u.array,context:u.object,pagination:u.bool,inDialog:u.bool,filterType:u.oneOf(["component","entity"]),toViewAll:u.func,type:u.oneOf(["server","service"])};function lt({blocklets:t=[],context:s,pagination:o=!0,inDialog:n=!1,filterType:l="component",toViewAll:i=()=>{},type:c="service"}){const{data:p,paging:r,refresh:x,loading:m,params:h,onReadNotification:C,componentDids:v,filterUnReadCount:a,initial:g}=s,k=d=>{x({...h,severity:d&&typeof d=="string"?[d]:d||[],paging:{...h.paging,page:1}})},[R]=Ut(),P=T(()=>R.get("id"),[R]),b=xe(d=>d.breakpoints.down("md")),[z,L]=y.useState(0),[U,j]=y.useState(!1),S=y.useMemo(()=>h.read===!1?"unread":"all",[h.read]),B=T(()=>Ze(d=>{if(m)return;const w=p.length,A=p.filter(F=>!Ue(F)).length;let W={...h,append:!0,paging:{...h.paging,...d,currentPage:(r.currentPage||0)+1}};S==="unread"&&A<w&&d.page>h.paging.page&&(W={...h,append:!0,paging:{...h.paging,...d,page:h.paging.page||1,currentPage:(r.currentPage||0)+1}}),x(W)},500),[p,h,S,r,m,x]);Qe(()=>{g&&typeof g=="function"&&g()}),y.useEffect(()=>{(!r.currentPage||r.currentPage===1)&&L(r.total)},[r.total,r.currentPage]),y.useEffect(()=>{setTimeout(()=>{const d=document.getElementById(P);d&&d.scrollIntoView({behavior:"smooth",block:"center"}),j(!0)},100),setTimeout(()=>{j(!1)},3e3)},[P]);const G=T(()=>p?.length>0&&p.length<z,[p,z]),Z=y.useCallback(d=>{const{blocklet:w={}}=window,A=[w?.did,...(w?.ancestors||[]).map(W=>W)];return v?.includes(d)||A.findIndex(W=>W===d)>-1},[v]),ne=y.useMemo(()=>{const d=new Map;return t.length&&t.forEach(w=>{const A=w?.did||w.meta?.did;A&&!d.has(A)&&(w.ancestors=[],d.set(A,w),w?.alsoKnownAs?.length>0&&w.alsoKnownAs.forEach(W=>{d.has(W)||d.set(W,w)})),w?.children?.length>0&&w.children.forEach(W=>{const F=W?.did||W.meta?.did;F&&!d.has(F)&&Z(F)&&(W.ancestors=[w],d.set(F,W))})}),d},[t,Z]),he=y.useCallback(()=>{m||B({page:r.page+1})},[r.page,m,B]),[oe]=_r({loading:m,hasNextPage:G,onLoadMore:he}),se=d=>{!d||Ue(d)||C(d.id).then(()=>{n&&i()})},ge=({severity:d,id:w})=>{if(m)return;let A={};l==="component"?A={entityId:[],componentDid:w}:l==="entity"&&(A={componentDid:[],entityId:w}),x({...h,severity:d,...A,paging:{...h.paging,page:1}})},me=d=>{if(m)return;let w={...h,paging:{...h.paging,page:1}};d==="unread"?(w.read=!1,w.paging.currentPage=1):w=qt(w,"read"),x(w)},K=T(()=>l==="component"?Array.isArray(h.componentDid)?h.componentDid:[]:l==="entity"?Array.isArray(h.entityId)?h.entityId:[]:[],[h,l]),be=T(()=>(Array.isArray(h.severity)?h.severity:[])[0]||"",[h.severity]);return e.jsxs(Zr,{inDialog:!!n,children:[n?e.jsx(st,{currentTab:be,type:"line",theme:"light",onSelectType:k}):e.jsx(at,{loading:m,blockletMap:ne,unReadCount:a,filterType:l,type:c,selectedId:K,onFilterChange:ge,severity:h.severity,onReadFilterChange:me,currentReadFilter:S}),!b&&m?e.jsx(f,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:e.jsx(Y,{})}):e.jsx(br,{data:p,blockletMap:ne,onReadNotification:se,onReadBatch:C,inDialog:n,highlightId:P,highlight:!n&&U,type:c}),o&&!b?e.jsx(Hr,{loading:m,paging:r,onChange:B}):null,o&&b&&(m||G)?e.jsx(f,{ref:oe,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:e.jsx(Y,{})}):null,!n&&b?e.jsx(Yr,{}):null]})}const Qr=y.memo(lt),$=new Yt;function Ae(t){const{userDid:s=""}={},{session:o}=Kt(),n=T(()=>{if(s)return s;const r=window.location.href,x=_t(r);return x?.did?Array.isArray(x.did)?x.did[0]:x.did:o?.user?.did},[o?.user?.did,s]),l=T(()=>o.user,[o]),i=T(()=>l?n===l?.did:!1,[n,l?.did]),c=te(async()=>{if(await Vt(()=>o?.initialized),i)return o.user;if(n)return $.user.getUserPublicInfo({did:n})},{refreshDeps:[n,i,o?.initialized,l]}),p=T(()=>l.passports?.some(r=>r.role===Pe.ROLES.OWNER),[l]);return{currentDid:n,session:o,isMyself:i,user:l,viewUser:c.data,isOwner:p}}function ct({user:t,...s}){const{t:o}=N(),n=Et(),l=T(()=>{const p=(t?.passports||[]).map(r=>({...r,revoked:r.status===ir.REVOKED}));return p.sort((r,x)=>r.revoked===x.revoked?0:r.revoked?1:-1),Ne(p.filter(r=>!r.display),"role").concat(Ne(p.filter(r=>r.display),"display.content"))},[t?.passports]),i=T(()=>l?.find(p=>p.name===t.role),[l,t?.role]),c=n.palette.primary.main;return l.length===0?e.jsx(f,{children:e.jsx(Xe,{children:o("userCenter.noPassport")})}):e.jsx(f,{...s,sx:{display:"grid",justifyItems:"start",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(5, 1fr)"},gap:2.5,...s.sx},children:l.map(p=>e.jsx(wr,{passport:p,user:t,color:window.blocklet.passportColor,createPassportSvg:Zt,title:i&&i.role===p.role?o("userCenter.currentPassport"):"",sx:{flexDirection:"column",alignItems:"center",gap:1,".passport-item__display":{width:166,height:166,borderRadius:1,px:2,display:"flex",justifyContent:"center",backgroundColor:"grey.50",boxShadow:i&&i.role===p.role?`0px 2px 4px 0px ${c}, 0px 1px 2px -1px ${c}, 0px 0px 0px 1px ${c} !important`:"unset"},".passport-item__body":{marginLeft:"0 !important"}}},p.id))})}ct.propTypes={user:u.object.isRequired};function Jr({visible:t,onClose:s,nft:o}){return!t||!o?null:e.jsx(Xr,{children:e.jsx(Lt,{open:t,onClose:s,children:e.jsx(en,{onClick:s,children:e.jsx(rt,{data:nt(o),address:o.address,inset:!0})})})})}const Xr=ee.div`
|
|
77
|
+
position: relative;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
.mask {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mask {
|
|
89
|
+
position: absolute;
|
|
90
|
+
top: 0;
|
|
91
|
+
left: 0;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 100%;
|
|
97
|
+
background: rgba(0, 0, 0, 0.6);
|
|
98
|
+
opacity: 0;
|
|
99
|
+
transition: opacity 0.2s;
|
|
100
|
+
}
|
|
101
|
+
`,en=ee.div`
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
align-items: center;
|
|
105
|
+
height: 100vh;
|
|
106
|
+
width: 100vw;
|
|
107
|
+
|
|
108
|
+
img,
|
|
109
|
+
object {
|
|
110
|
+
max-width: 90vw;
|
|
111
|
+
max-height: 75vh;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.nft-display--inset {
|
|
115
|
+
> .MuiBox-root,
|
|
116
|
+
.nft-display__loading {
|
|
117
|
+
width: 75vmin;
|
|
118
|
+
height: 75vmin;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
`,tn=t=>({position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.6)",opacity:0,transition:"opacity 0.3s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1,"& .mask-item":{backgroundColor:le(t.palette.background.paper,.9),color:"text.primary","&:hover":{backgroundColor:le(t.palette.background.paper,1)}}}),rn={position:"absolute",bottom:0,left:0,right:0,height:24,backgroundColor:"rgba(0, 0, 0, 0.6)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",gap:1,zIndex:1,"& .mask-item":{width:20,height:20,color:"white"}},He="https://main.abtnetwork.io/explorer";function dt({user:t}){const{t:s}=N(),o=re(),[n,l]=y.useState({visible:!1,nft:null}),[i,c]=y.useState({anchorEl:null,props:null}),p=P=>{const b=ce(He,"assets",P);window.open(b,"_blank")},r=(P,b)=>{let z="";typeof b.data?.value=="string"?z=JSON.parse(b.data?.value)?.domain:z=b.data?.value?.domain,c({anchorEl:P,props:{title:z?`Hey, I just won an NFT at the ${z} event!`:"Hey, I just won an NFT!",url:ce(He,"assets",b.address)}})},x=P=>{l({visible:!0,nft:P})},m=H({page:1,size:20}),h=te(async(P=m)=>(await Ht.get(`${Pe.WELLKNOWN_SERVICE_PATH_PREFIX}/ocap/listAssets`,{params:{ownerAddress:t.did,...P}})).data,{ready:t?.did&&m,defaultParams:[m],refreshDeps:[t?.did,m]}),{loading:C,data:v}=h,a=v?.page??{cursor:0,next:!1,total:0},g=(P,b)=>{m.page=b,h.run(m)},k=E(P=>[e.jsx(O,{size:"small",className:"mask-item",onClick:b=>{b.stopPropagation(),p(P.address)},children:e.jsx(D,{icon:"tabler:link",fontSize:18})},"link"),e.jsx(O,{size:"small",onClick:b=>{b.stopPropagation(),r(b.currentTarget,P)},className:"mask-item",children:e.jsx(D,{icon:"tabler:share-2",fontSize:18})},"share"),e.jsx(O,{size:"small",onClick:b=>{b.stopPropagation(),x(P)},className:"mask-item",children:e.jsx(D,{icon:"tabler:eye",fontSize:18})},"view")]),R=T(()=>{if(C){const P=["skeleton-1","skeleton-2","skeleton-3","skeleton-4","skeleton-5"].map(b=>e.jsx(We,{variant:"rectangular",width:"15%",height:166,sx:{borderRadius:1,flexShrink:0}},b));return e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(We,{width:"20%"}),e.jsx(f,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"nowrap"},children:P})]})}return e.jsxs(e.Fragment,{children:[e.jsx(I,{sx:{color:"grey.A700",fontWeight:600,mb:2.5},children:s("userCenter.common.nft")}),v?.assets?.length===0&&!C&&e.jsx(f,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:e.jsx(Xe,{children:s("userCenter.common.noNFT")})}),e.jsx(f,{className:"nft-list-wrapper",sx:{display:"grid",justifyItems:"start",gridTemplateColumns:{xs:"repeat(2, 1fr)",sm:"repeat(3, 1fr)",md:"repeat(3, 1fr)",lg:"repeat(5, 1fr)"},gap:2.5},children:v?.assets?.map(P=>e.jsxs(f,{sx:{flexShrink:0,width:{xs:120,sm:120,md:120,lg:166},height:{xs:120,sm:120,md:120,lg:166},position:"relative",borderRadius:1,overflow:"hidden",cursor:"pointer",...o?{}:{"&:hover .mask":{opacity:1}}},children:[e.jsx(rt,{data:nt(P),address:P.address,inset:!0,imageFilter:{imageFilter:"resize",w:"500",f:"webp"}}),o?e.jsx(f,{className:"footer-mask",sx:rn,children:k(P)}):e.jsx(f,{className:"mask",sx:tn,children:e.jsx(ke,{direction:"row",spacing:1,children:k(P)})})]},P.address))}),a.next||m.page>1?e.jsx(Bt,{sx:{display:"flex",justifyContent:"center",mt:2},page:m.page,onChange:g,count:Math.ceil(a.total/m.size),size:"small"}):null,e.jsx(Jr,{visible:n.visible&&!!n.nft,nft:n.nft,onClose:()=>{l({visible:!1,nft:null})}}),e.jsx(ar,{anchorEl:i.anchorEl,onClose:()=>{c({anchorEl:null,props:null})},sharedProps:i.props||{title:"",url:""}})]})},[C,a,m.page,m.size,g,i,n]);return e.jsx(f,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:2,mb:5},children:R})}dt.propTypes={user:u.object.isRequired};function nn(){const{t}=N(),{user:s,isMyself:o,viewUser:n}=Ae();return e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[o?e.jsxs(f,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,p:2},children:[e.jsx(I,{sx:{color:"text.primary",fontWeight:600,mb:2.5},children:t("userCenter.passport")}),e.jsx(ct,{user:s})]}):null,e.jsx(dt,{user:o?s:n})]})}const on=[{name:"English",code:"en"},{name:"中文",code:"zh"}];function ut({user:t,onSave:s}){const{t:o,changeLocale:n}=N(),l=H({locale:t.locale,loading:!1}),i=E(async c=>{try{const{value:p}=c.target;l.loading=!0,await $.user.saveProfile({locale:p}),await s("profile"),n(p),l.locale=p}catch(p){q.error(X(p))}finally{l.loading=!1}});return e.jsxs(f,{sx:{gap:1,display:"grid",alignItems:"center",gridTemplateColumns:{xs:"1fr",sm:"max-content 1fr"}},children:[e.jsx(f,{children:o("userCenter.commonSetting.locale")}),e.jsx(f,{children:e.jsx(Se,{value:l.locale,onChange:i,size:"small",IconComponent:c=>e.jsx(Je,{...c,width:20,height:20}),sx:{minWidth:200,"&:hover":{"fieldset.MuiOutlinedInput-notchedOutline":{borderColor:"divider"}},fieldset:{borderColor:"divider"}},children:(window.blocklet.languages||on).map(c=>e.jsx(ae,{value:c.code,children:c.name},c.code))})})]})}ut.propTypes={user:u.shape({locale:u.string}).isRequired,onSave:u.func.isRequired};function Ce({onTest:t=V,onDelete:s=V,onSave:o=V,onCancel:n=V,type:l="slack",url:i="",edit:c=!1}){const{t:p}=N(),r=H({type:l||"slack",url:i||"",edit:c??!1,error:"",loading:!1}),x=E(()=>r.url?Qt(r.url)?(r.error="",!0):(r.error=p("common.invalid"),!1):(r.error=p("common.required"),!1)),m=E(()=>{r.edit=!1,r.url=i||"",r.type=l||"slack",r.error="",r.loading=!1,n()}),h=E(async a=>{r.loading=!0,await t(a),r.loading=!1}),C=E(a=>()=>{x()&&a({type:r.type,url:r.url})}),v=T(()=>r.error?e.jsx(I,{component:"span",color:"error",children:r.error}):r.edit?r.loading?e.jsx(Y,{size:16}):e.jsx(O,{size:"small",onClick:C(h),sx:{mr:-1},children:e.jsx(D,{icon:jr})}):null,[r.error,r.edit,r.loading]);return e.jsxs(f,{sx:{display:"flex",gap:1.5,width:"100%",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(Se,{sx:{borderRadius:1,"&.Mui-disabled":{backgroundColor:"grey.50"}},disabled:!r.edit||r.loading,size:"small",value:r.type,onChange:a=>{r.type=a.target.value},children:[e.jsx(ae,{value:"api",children:p("userCenter.webhook.url")}),e.jsx(ae,{value:"slack",children:p("userCenter.webhook.slack")})]}),e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"},children:[e.jsx(Ve,{sx:{flex:1,".MuiInputBase-root":{borderRadius:1,"&.Mui-disabled":{backgroundColor:"grey.50"}}},disabled:!r.edit||r.loading,fullWidth:!0,size:"small",required:!0,value:r.url,onChange:a=>{r.url=a.target.value,x()},error:!!r.error,slotProps:{input:{endAdornment:e.jsx(Ye,{position:"end",children:v})}}}),e.jsx(f,{sx:{display:"flex",gap:.5},children:r.edit?e.jsxs(e.Fragment,{children:[e.jsx(O,{color:"success",onClick:C((...a)=>{o(...a),r.edit=!1}),sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(D,{icon:lr})}),e.jsx(O,{color:"error",onClick:m,sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(D,{icon:cr})})]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{onClick:()=>{r.edit=!0},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(D,{icon:Cr})}),e.jsx(O,{color:"error",onClick:()=>{s({type:r.type,url:r.url})},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(D,{icon:Sr})})]})})]})]})}Ce.propTypes={onTest:u.func,onDelete:u.func,onSave:u.func,onCancel:u.func,type:u.oneOf(["api","slack"]),url:u.string,edit:u.bool};function ie({title:t=void 0,description:s=void 0,value:o,onChange:n,isMobile:l}){const i=E(c=>{c.stopPropagation()});return e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ot,{checked:o,size:"small",onChange:n}),e.jsxs(I,{component:"div",onClick:i,sx:{color:"text.primary",fontSize:14,display:"flex",flexWrap:l?"wrap":"nowrap",columnGap:1,flex:1,whiteSpace:l?"normal":"nowrap"},children:[t,s]})]})}ie.propTypes={title:u.string,description:u.node,value:u.bool.isRequired,onChange:u.func.isRequired,isMobile:u.bool.isRequired};function pt({user:t,isMobile:s}){const{t:o}=N(),n=H({showAdd:!1}),l=te(async()=>await $.user.getUserNotificationConfig(),{refreshDeps:[t],loadingDelay:300}),i=T(()=>({wallet:!0,email:!0,phone:!1,push:!0,...l?.data?.notifications||{}}),[l?.data?.notifications]),c=T(()=>l?.data?.webhooks||[],[l?.data?.webhooks]),p=E(async v=>{try{await $.user.saveUserNotificationConfig(v),q.success(o("userCenter.saveSuccess")),l.run()}catch(a){q.error(X(a))}}),r=E(async(v,a)=>{await p({notifications:{[v]:a}})}),x=async v=>{try{await $.user.testNotificationWebhook(v),q.success(o("userCenter.webhookTested"))}catch(a){q.error(X(a))}},m=E(async v=>{await p({webhooks:c.filter((a,g)=>g!==v)})}),h=E(async(v,a)=>{await p({webhooks:c.map((g,k)=>k===v?a:g)})}),C=E(async v=>{await p({webhooks:[...c,v]}),n.showAdd=!1});return l.error?e.jsx(Wt,{severity:"error",children:l.error.message}):l.loading||!l.data?e.jsx(f,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px"},children:e.jsx(Y,{})}):e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(f,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:[e.jsx(ie,{value:i.wallet,isMobile:s,title:o("userCenter.walletNotification"),onChange:v=>r("wallet",v.target.checked),description:De(t)&&e.jsx(dr,{did:De(t),showQrcode:!1,showAvatar:!s,copyable:!0,compact:!0,responsive:!0,startChars:s?2:6})}),e.jsx(ie,{value:i.email,isMobile:s,onChange:v=>r("email",v.target.checked),title:o("userCenter.emailNotification"),description:t?.email&&e.jsx(I,{component:"span",sx:{color:"text.secondary",fontSize:13},children:t?.email})}),e.jsx(ie,{isMobile:s,value:i.push,title:o("userCenter.pushNotification"),onChange:v=>r("push",v.target.checked)})]}),e.jsxs(ke,{spacing:1.5,useFlexGap:!0,direction:"column",sx:{alignItems:"start"},children:[c.map((v,a)=>e.jsx(Ce,{onTest:x,onDelete:()=>m(a),onSave:(...g)=>h(a,...g),type:v.type,url:v.url,edit:!1},`${a}_${v.url}`)),n.showAdd&&e.jsx(Ce,{onTest:x,onCancel:()=>{n.showAdd=!1},onSave:(...v)=>C(...v),edit:!0},"add"),e.jsx(et,{variant:"outlined",size:"small",sx:{color:"text.primary",borderColor:"divider","&:hover":{borderColor:"divider"},py:.5,borderRadius:1},startIcon:e.jsx(D,{icon:kr}),onClick:()=>{n.showAdd=!0},children:o("userCenter.addWebhook")})]})]})}pt.propTypes={user:u.object.isRequired,isMobile:u.bool.isRequired};function xt({item:t}){const s=Te(),{blocklet:o}=Jt(),{confirmApi:n,confirmHolder:l}=Re(),i=H({loading:!1}),{t:c}=N(),{session:p}=y.use(fe),{bindOAuth:r,unbindOAuth:x,setBaseUrl:m,baseUrl:h}=p.useOAuth(),{disconnectPasskey:C,setTargetAppPid:v}=p.usePasskey(),a=T(()=>ur[t?.provider]||"unknown",[t?.provider]),g=E(async()=>{if(t?.provider===M.PASSKEY){await new Promise((b,z)=>{n.open({title:c("userCenter.thirdPartyLogin.disconnectPasskey",{name:a}),content:c("userCenter.thirdPartyLogin.disconnectPasskeyDescription",{name:a}),confirmButtonText:c("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:c("common.cancel"),onConfirm(L){C({session:p,connectedAccount:t}).then(b).catch(z),L()},onCancel:b})});return}try{i.loading=!0,await new Promise((b,z)=>{if(t?._bind)n.open({title:c("userCenter.thirdPartyLogin.confirmUnbind",{name:a}),content:c("userCenter.thirdPartyLogin.confirmUnbindDescription",{name:a}),confirmButtonText:c("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:c("common.cancel"),onConfirm(L){x({session:p,connectedAccount:{...Gt(t,["did","pk"]),showProvider:t.provider,provider:t._rawProvider}}).then(b).catch(z),L()},onCancel:b});else if(t.provider===M.WALLET)p.bindWallet({onSuccess:b,onCancel:z});else{const L=h,U=window?.blocklet;let j="/";const S=pr(U),B=xr(U);S&&B?.appPid&&p?.user?.sourceAppPid&&(j=B.appUrl),m(j),v(o?.appPid),r({session:p,oauthItem:{...t,provider:t._rawProvider}}).then(b).catch(z).finally(()=>{m(L),v()})}})}catch(b){console.error(`Failed to ${t?._bind?"unbind":"bind"} oauth account`,b)}finally{i.loading=!1}}),k=E(b=>b.provider===M.WALLET&&b.did?c("userCenter.thirdPartyLogin.walletAccount"):b._mainProvider?c("userCenter.thirdPartyLogin.mainAccount"):b?._bind?c("userCenter.thirdPartyLogin.disconnect"):c("userCenter.thirdPartyLogin.connect")),R=E(b=>b.provider===M.WALLET&&b.did?c("userCenter.thirdPartyLogin.walletAccountCantRemove"):b.provider===M.PASSKEY?c("userCenter.thirdPartyLogin.dontSupportRemoveinArcSphere"):b._mainProvider?c("userCenter.thirdPartyLogin.mainProviderCantRemove"):""),P=E(b=>b.provider===M.WALLET&&b.did||b.provider===M.PASSKEY&&(s.arcSphere||s.wallet)?!0:!!t._mainProvider,[s.arcSphere]);return e.jsxs(e.Fragment,{children:[e.jsxs(f,{sx:{borderRadius:1,border:"1px solid",borderColor:"divider",backgroundColor:"grey.50",display:"flex",alignItems:"center",py:1,px:1.5,gap:.75,fontSize:"14px",lineHeight:1,overflow:"hidden"},children:[e.jsx(Xt,{provider:t?.provider,sx:{width:"1em",height:"1em",flexShrink:0,fontSize:16,filter:({palette:b})=>t?.provider===M.GITHUB&&b.mode==="dark"?"invert(1)":"none"}}),e.jsx(f,{sx:{flex:1,display:{xs:t.userInfo?.email||t.did?"none":"block",sm:"block"}},children:a}),t.userInfo?.email||t.did?e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:.5,overflow:"hidden"},children:[e.jsx(f,{sx:{flex:1,textOverflow:"ellipsis",overflow:"hidden",lineHeight:"normal"},children:t.userInfo?.email||t.did}),t.userInfo?.name?e.jsx(J,{title:e.jsx(e.Fragment,{children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(tt,{size:36,variant:"circle",shape:"circle",src:t.userInfo?.picture,did:t.did}),e.jsxs(f,{children:[e.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:t.userInfo?.name}),e.jsx(I,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:t.userInfo?.email})]})]})}),children:e.jsx(f,{component:D,icon:er,sx:{color:"text.secondary",fontSize:16,cursor:"pointer",flexShrink:0}})}):null]}):null]}),e.jsx(J,{title:R(t),placement:"auto",children:e.jsx(f,{children:e.jsx(et,{variant:"outlined",size:"small",sx:b=>{const z=b.palette.error.main,L=b.palette.primary.main;return{color:t?._bind?z:L,borderColor:t?._bind?z:L,backgroundColor:"background.default","&:hover":{borderColor:t?._bind?z:L,backgroundColor:"action.hover"},py:.5,borderRadius:1,fontWeight:500,whiteSpace:"nowrap"}},fullWidth:!0,startIcon:i.loading?null:e.jsx(D,{icon:Pr}),onClick:g,disabled:P(t),loading:i.loading,children:k(t)})})}),l]})}xt.propTypes={item:u.shape({provider:u.string,did:u.string,pk:u.string,userInfo:u.object,id:u.string,_bind:u.bool,_rawProvider:u.string,_mainProvider:u.bool}).isRequired};function ft({user:t}){const{session:s}=y.use(fe),[o,n]=y.useState({}),{getOAuthConfigs:l}=s.useOAuth(),i=Te();sr(async()=>{const r=await l({sourceAppPid:t?.sourceAppPid});n(r)},[t?.sourceAppPid]);const c=T(()=>{const r=Object.keys(o).map(x=>({...o[x],provider:x})).filter(x=>x.enabled);return[{provider:M.WALLET,order:-1},...r,{provider:M.PASSKEY,order:1/0}]},[o]),p=T(()=>{const r=fr(t);let x=!1,m="",h=hr(t);const C=r.find(a=>a.provider===M.AUTH0);return C&&(C.id.startsWith("google-oauth2|")&&(r.some(a=>a.provider==="google")||(x=!0,m=M.GOOGLE,h===M.AUTH0&&(h=M.GOOGLE))),C.id.startsWith("appleid|")&&(r.some(a=>a.provider===M.APPLE)||(x=!0,m=M.APPLE,h===M.AUTH0&&(h=M.APPLE))),C.id.startsWith("github|")&&(r.some(a=>a.provider===M.GITHUB)||(x=!0,m=M.GITHUB,h===M.AUTH0&&(h=M.GITHUB)))),c.map(a=>{if(a.provider===M.AUTH0&&x)return null;const g=x&&a.provider===m?r.find(k=>k.provider===M.AUTH0):r.find(k=>k.provider===a.provider);return g?{...a,provider:a.provider,did:g.did,pk:g.pk,userInfo:g.userInfo,_bind:!0,_rawProvider:g.provider,_mainProvider:a.provider===h}:{...a,provider:a.provider,_rawProvider:a.provider,_mainProvider:a.provider===h}}).filter(a=>!(!a||a.provider===M.PASSKEY&&!a.did)).sort((a,g)=>a._mainProvider?-1:a?.order!==void 0&&g?.order!==void 0?a.order-g.order:a?.order!==void 0?-1:1)},[t?.connectedAccounts,c]);return e.jsxs(f,{sx:{gap:1,display:"grid",gridTemplateColumns:"1fr min-content"},children:[p.map(r=>e.jsx(xt,{item:r},r?.provider)),i.wallet||i.arcSphere?null:e.jsx(tr,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add New Passkey",onSuccess:V,onError:V,dense:!0,sx:{px:1.5,py:1,gap:.75}})]})}ft.propTypes={user:u.object.isRequired};function ht({configList:t,onSave:s}){const[o,n]=y.useState(t),{t:l}=N(),i=E(async(c,p)=>{try{const r=await $.user.saveUserPrivacyConfig({[c]:!p});n(o.map(x=>({...x,value:r?.[x.key]??x.value}))),q.success(l("userCenter.saveSuccess")),s("privacy")}catch(r){q.error(X(r))}});return y.useEffect(()=>{n(t)},[t]),e.jsx(f,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"start",".MuiFormControlLabel-root":{gap:1,m:0,flexDirection:{xs:"row-reverse",md:"row"},width:{xs:"100%",md:"unset"}},".MuiSwitch-track":{borderRadius:"100vw"},".MuiSwitch-thumb":{borderRadius:"100%"},".MuiSwitch-root.MuiSwitch-sizeSmall":{height:"20px",width:"36px",".MuiSwitch-thumb":{width:"16px",height:"16px"}}},children:o.map(c=>c.isPrivate?null:e.jsx(ot,{checked:!c.value,labelProps:{label:e.jsx(I,{sx:{color:"text.primary",fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:l("userCenter.toPublic",{name:c.name})})},size:"small",onChange:p=>i(c.key,p.target.checked)},c.key))})}ht.propTypes={configList:u.arrayOf(u.shape({key:u.string.isRequired,name:u.string.isRequired,value:u.bool.isRequired,isPrivate:u.bool})).isRequired,onSave:u.func.isRequired};function gt({user:t,sessionUser:s}){const o=T(()=>(t?.passports||[])?.find(n=>n.name===s.role),[t?.passports,s?.role]);return e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(tt,{size:40,variant:"circle",shape:"circle",src:s.avatar,did:s.did,sx:{flexShrink:0}}),e.jsxs(f,{sx:{flex:1,overflow:"hidden"},children:[e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(J,{title:s.fullName,children:e.jsx(I,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:s.fullName})}),e.jsx(je,{label:o?.title||o?.name||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:"text.primary",borderColor:"grey.300",backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),e.jsx(J,{title:s.email,children:e.jsx(I,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:s.email})})]})]})}gt.propTypes={user:u.object.isRequired,sessionUser:u.shape({role:u.string,avatar:u.string,did:u.string,fullName:u.string,email:u.string}).isRequired};const sn=()=>Promise.resolve(""),Ge=t=>new ve(t,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[ve.BROWSER.NAME,ve.BROWSER.VERSION]]}).getResult(),Ke={display:"flex",justifyContent:"flex-end",textAlign:"right"},an=new rr({concurrency:1}),Me=y.memo(({userSession:t,isMobile:s=!1})=>{const o=H({loading:!0,ipRegion:""}),{t:n}=N();return y.useEffect(()=>{an.add(async()=>{try{o.ipRegion=await sn(t.lastLoginIp)}finally{o.loading=!1}})},[o,t.lastLoginIp]),e.jsx(f,{...s&&{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:1,flexWrap:"wrap"},children:o.ipRegion?e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"body2",children:o.ipRegion}),e.jsx(I,{variant:"body2",color:"grey",children:t.lastLoginIp||n("userCenter.unknown")})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{children:t.lastLoginIp||n("userCenter.unknown")}),o.loading?e.jsx(I,{variant:"body2",color:"grey",sx:{textAlign:"center"},children:e.jsx(Y,{size:12,color:"inherit"})}):null]})})});Me.propTypes={userSession:u.object.isRequired,isMobile:u.bool};Me.defaultProps={isMobile:!1};function mt({user:t,showAction:s=!0,showUser:o=!0,getUserSessions:n,showOffline:l=!1}){const i=H({status:"online",page:1,pageSize:10}),c=H({online:0,expired:0,offline:0}),p=gr(),{t:r}=N(),x=re({key:"md"}),m=xe(j=>j.breakpoints.down("lg")),{confirmApi:h,confirmHolder:C}=Re(),v=E(async()=>{const j=await n({page:i.page,pageSize:i.pageSize,status:i.status}),S=j?.paging?.total||0;return c[i.status]=S,{total:S,list:j?.list||[]}});Qe(async()=>{const j=await n({page:1,pageSize:1,status:"expired"});c.expired=j?.paging?.total||0;const S=await n({page:1,pageSize:1,status:"offline"});c.offline=S?.paging?.total||0});const a=te(v,{refreshDeps:[i.status,i.page,i.pageSize]}),g=T(()=>a.data?.list||[],[a.data?.list]),k=T(()=>{const{status:j}=i;return j==="online"?c[j]<=1:c[j]===0},[g,p]),R=T(()=>de({},x?Ke:{}),[x]),P=E(({visitorId:j})=>{h.open({title:r("userCenter.logoutThisSession"),content:r("userCenter.logoutThisSessionConfirm"),confirmButtonText:r("userCenter.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:r("userCenter.cancel"),onConfirm:async()=>{await $.user.logout({visitorId:j,includeFederated:!0});const{page:S=0}=i,{list:B=[]}=a.data||{},G=B.length||0;S>1&&G===1&&(i.page=Math.max(S-1,1)),a.refresh(),h.close()}})}),b=E(()=>{h.open({title:r("userCenter.logoutAllSession",{type:r(i.status)}),content:r("userCenter.logoutAllSessionConfirm",{type:r(i.status)}),confirmButtonText:r("userCenter.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:r("userCenter.cancel"),onConfirm:async()=>{await $.user.logout({status:i.status,visitorId:p,includeFederated:!0}),i.page=1,a.refresh(),h.close()}})}),z=[];s&&z.push(e.jsx(J,{title:r("userCenter.logoutAllTips",{type:r(i.status)}),children:e.jsx(_,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:b,disabled:k,children:r("userCenter.logoutAll",{type:r(i.status)})})},"logoutAll"));const L=T(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600,page:i.page-1,rowsPerPage:i.pageSize,count:a.data?.total||0}),[a.data?.total,i.page,i.pageSize]),U=[{label:r("userCenter.platform"),name:"platform",options:{customBodyRenderLite:j=>{const S=g[j],B=Ge(S?.ua);return e.jsx(f,{sx:R,children:[B.os?.name,B.os?.version].filter(Boolean).join("/")||r("userCenter.unknown")})}}},{label:r("userCenter.deviceType"),name:"deviceType",options:{customBodyRenderLite:j=>{const S=g[j],B=Ge(S?.ua);return e.jsx(f,{sx:R,children:[B.browser?.name,B.browser?.version].filter(Boolean).join("/")||r("userCenter.unknown")})}}},{label:r("userCenter.walletOS"),name:"walletOS",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(f,{sx:R,children:S.extra?.walletOS||r("userCenter.unknown")})}}},o&&{label:r("userCenter.user"),name:"user",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(f,{sx:de({minWidth:150,maxWidth:250},x?Ke:{}),children:e.jsx(gt,{sessionUser:S.user,user:t})})}}},{label:r("userCenter.createdAt"),name:"createdAt",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(f,{sx:R,children:S.createdAt?e.jsx(Oe,{value:S.createdAt,relativeRange:3*86400*1e3}):r("userCenter.unknown")})}}},!l&&{label:r("userCenter.updatedAt"),name:"updatedAt",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(f,{sx:R,children:S.status==="expired"?r("userCenter.expired"):e.jsx(Oe,{value:S.updatedAt,relativeRange:3*86400*1e3})})}}},{label:r("userCenter.lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(Me,{userSession:S,isMobile:x})}}},s&&{label:r("userCenter.actions"),name:"actions",options:{customBodyRenderLite:j=>{const S=g[j];return e.jsx(f,{sx:R,children:e.jsx(_,{sx:{whiteSpace:"nowrap",fontSize:"12px !important",lineHeight:"1.25",px:1},disabled:p===S.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>P({visitorId:S.visitorId}),children:S.status==="expired"?r("userCenter.remove"):p===S.visitorId?r("userCenter.currentSession"):r("userCenter.logout")})})}}}].filter(Boolean);return e.jsxs(f,{className:"pc-user-sessions",sx:{maxWidth:x?"unset":m?"calc(100vw - 300px)":"100%",...x&&{".pc-user-sessions-table > div:nth-child(2)":{border:"1px solid",borderColor:"divider",borderRadius:1}},".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableRow-root":{border:"unset","&:nth-child(even)":{backgroundColor:"grey.50","&:hover":{backgroundColor:j=>`${j.palette.grey[50]} !important`}}},".MuiTableRow-hover":{"&:hover":{backgroundColor:"inherit !important"}},".MuiTableCell-root":{paddingRight:"8px",paddingLeft:"8px",color:"text.secondary",...x&&{padding:"8px !important","&:first-child":{paddingTop:"20px!important"},"&:last-child":{paddingBottom:"20px!important"}}}},children:[C,e.jsx(mr,{count:a.data?.total||0,data:g,columns:U,customButtons:z,options:L,loading:a.loading,className:"pc-user-sessions-table",title:e.jsxs(Nt,{row:!0,sx:{lineHeight:1,ml:1},onChange:j=>{i.status=j.target.value},children:[e.jsx(Q,{value:"online",control:e.jsx(ye,{size:"small",sx:{lineHeight:1,fontSize:0},checked:i.status==="online"}),label:e.jsxs(I,{sx:{display:"flex",alignItems:"center"},children:[r("userCenter.online"),e.jsxs(I,{component:"span",sx:{ml:.5,color:"text.secondary"},children:["(",c.online,")"]})]})}),e.jsx(Q,{value:"expired",control:e.jsx(ye,{size:"small",sx:{lineHeight:1,fontSize:0},checked:i.status==="expired"}),label:e.jsxs(I,{sx:{display:"flex",alignItems:"center"},children:[r("userCenter.expired"),e.jsxs(I,{component:"span",sx:{ml:.5,color:"text.secondary"},children:["(",c.expired,")"]})]})}),l?e.jsx(Q,{value:"offline",control:e.jsx(ye,{size:"small",sx:{lineHeight:1,fontSize:0},checked:i.status==="offline"}),label:e.jsxs(I,{sx:{display:"flex",alignItems:"center"},children:[r("userCenter.offline"),e.jsxs(I,{component:"span",sx:{ml:.5,color:"text.secondary"},children:["(",c.offline,")"]})]})}):null]}),onChange:j=>{i.page=j.page+1,i.pageSize=j.rowsPerPage}})]})}mt.propTypes={user:u.object.isRequired,showAction:u.bool,showUser:u.bool,showOffline:u.bool,getUserSessions:u.func.isRequired};function bt({onDestroySelf:t=void 0}){const{confirmHolder:s}=Re(),{t:o}=N(),{session:n}=y.use(fe),l=E(async()=>{if(!t||typeof t!="function")return;const i=n.withSecondaryAuth(t,{extraParams:{removeUserDid:n?.user?.did,input:{user:{did:n?.user?.did},teamDid:window?.blocklet?.did}},operation:"destroySelf"});try{await i(),n.logout()}catch(c){q.error(c?.message||o("userCenter.destroyMyself.error"))}});return e.jsxs(e.Fragment,{children:[e.jsx(f,{children:e.jsxs(f,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"space-between",flexWrap:"wrap"},children:[e.jsxs(f,{children:[e.jsx(I,{variant:"h6",sx:{fontSize:"0.875rem !important",fontWeight:"bold"},children:o("userCenter.dangerZone.deleteAccount")}),e.jsx(I,{variant:"caption",sx:{color:"text.secondary"},children:o("userCenter.dangerZone.deleteAccountDescription")})]}),e.jsx(_,{variant:"contained",color:"error",size:"small",onClick:l,children:o("userCenter.dangerZone.delete")})]})}),s]})}bt.propTypes={onDestroySelf:u.func};function ln(){const t=re({key:"md"}),s=xe(l=>l.breakpoints.down("lg")),o={display:"flex",justifyContent:"flex-end",flexWrap:"wrap",textAlign:"right","&.expired-at > div":{maxWidth:160,justifyContent:"flex-end",flexWrap:"wrap"}},n=T(()=>de({},t?o:{}),[t]);return e.jsx(f,{id:"user-center-access-key-setting",sx:{maxWidth:t?"unset":s?"calc(100vw - 300px)":"100%",...t&&{".pc-access-key-table > div:nth-child(2)":{border:"1px solid",borderColor:"divider",borderRadius:1}},".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableRow-root":{border:"unset","&:nth-child(even)":{backgroundColor:"grey.50","&:hover":{backgroundColor:l=>`${l.palette.grey[50]} !important`}}},".MuiTableRow-hover":{"&:hover":{backgroundColor:"inherit !important"}},".MuiTableCell-root":{paddingRight:"8px",paddingLeft:"8px",color:"text.secondary",...t&&{padding:"8px !important","&:first-child":{paddingTop:"20px!important"},"&:last-child":{paddingBottom:"20px!important"}}}},children:e.jsx(Tr,{isSelf:!0,columnSx:n})})}function yt({onDestroySelf:t=void 0,userCenterTabs:s=[]}){const{t:o}=N(),{user:n,session:l,isMyself:i,isOwner:c}=Ae(),r=Te().arcSphere,x=re({key:"md"}),m=te(async()=>n&&i?await $.user.getUserPrivacyConfig({did:n.did}):null,{refreshDeps:[n,i],loadingDelay:300}),h=T(()=>s.map(a=>({key:a.value,name:a.label,value:a.protected,isPrivate:a.isPrivate})),[s]),C=E(async a=>a==="privacy"?(await m.runAsync(),m.data):(a==="profile"&&await l.refresh(),null));y.useEffect(()=>{const a=window.location.hash.slice(1);a&&document.getElementById(a)?.scrollIntoView({behavior:"smooth"})},[]);const v=T(()=>[r?void 0:{label:o("userCenter.commonSetting.title"),value:"common",content:e.jsx(ut,{user:n,onSave:C})},{label:o("userCenter.notificationManagement"),value:"notification",content:e.jsx(pt,{user:n,isMobile:x})},{label:o("userCenter.thirdPartyLogin.title"),value:"thirdPartyLogin",content:e.jsx(ft,{user:n})},{label:o("common.accessKeys"),value:"accessKeys",content:e.jsx(ln,{isSelf:!0})},{label:o("common.mcpServers"),value:"mcpServers",content:e.jsx(Ir,{})},{label:o("userCenter.privacyManagement"),value:"privacy",content:e.jsx(ht,{configList:h,onSave:C})},{label:o("userCenter.sessionManagement"),value:"session",content:e.jsx(mt,{user:n,showUser:!1,getUserSessions:a=>$.userSession.getMyLoginSessions({},a)})},!c&&t&&typeof t=="function"?{label:o("userCenter.dangerZone.title"),value:"dangerZone",content:e.jsx(bt,{onDestroySelf:t}),sx:{borderColor:"error.main"}}:null].filter(Boolean),[n,h,x,c,t]);return i?e.jsx(f,{className:"user-center-settings",sx:{display:"flex",flexDirection:"column",gap:2.5,minWidth:{md:500},"@media (min-width: 1200px) and (max-width: 1260px)":{maxWidth:750},"@media (min-width: 1100px) and (max-width: 1199px)":{maxWidth:650},"@media (min-width: 1000px) and (max-width: 1099px)":{maxWidth:600},"@media (max-width: 1049px)":{maxWidth:"100%"}},children:v.map(a=>a?e.jsxs(f,{id:a.value,sx:de({border:"1px solid",borderColor:"divider",borderRadius:1,p:2,"&:last-child":{mb:5}},a.sx),children:[e.jsx(I,{sx:{color:"text.primary",fontWeight:600},children:a.label}),e.jsx(f,{sx:{mt:2.5},children:a.content})]},a.value):null)}):null}yt.propTypes={onDestroySelf:u.func,userCenterTabs:u.array};const vt=y.createContext({}),{Provider:cn,Consumer:ao}=vt;function wt({children:t}){const[s]=y.useState(!1),{session:o}=y.use(fe),{user:n}=o,[l,i]=y.useState(),c=y.useMemo(()=>n?.didSpace?.endpoint,[n?.didSpace]);y.useEffect(()=>{i(n?.didSpace)},[n?.didSpace]);const p=async()=>{i(void 0)},r=h=>{},x=async h=>{i(h),await r(h.endpoint)},m=!!(c&&l);return e.jsx(cn,{value:{loading:s,spaceGateway:l,session:o,deleteSpaceGateway:p,updateSpaceGateway:x,storageEndpoint:c,settingStorageEndpoint:r,hasStorageEndpoint:m},children:t})}function ze(){return y.use(vt)}wt.propTypes={children:u.node.isRequired};function dn(t){const s=t.replace(/\/api\/space\/.+/,""),n=t.replace(/\/$/,"").split("/").at(-4);return ce(s,"space",n)}function jt({session:t,spaceGateway:s,spaceStatus:o,refresh:n}){return e.jsxs(ke,{direction:"row",spacing:1,children:[o===Mr.DISCONNECTED&&e.jsx(ue,{reconnect:!0,variant:"outlined",session:t,spaceDid:t.user?.didSpace?.did,spaceGatewayUrl:t.user?.didSpace?.url,connectScope:"user",onSuccess:async()=>{await n()},onError:l=>{console.error(l),q.error(X(l))}}),e.jsx(O,{size:"small",LinkComponent:Dt,href:dn(s.endpoint),target:"_blank",children:e.jsx(Ot,{})})]})}jt.propTypes={session:u.object.isRequired,spaceGateway:u.object.isRequired,spaceStatus:u.string.isRequired,refresh:u.func.isRequired};function Ct({spaceGateway:t=void 0}){const{t:s}=N(),{updateSpaceGateway:o,session:n}=ze(),l=re(),i=({spaceGateway:c})=>o(c);return e.jsxs(f,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(f,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[e.jsx(I,{sx:{fontSize:"16px",fontWeight:"bold"},children:s("userCenter.storage.spaces.connected.title")}),!l&&e.jsx(ue,{connectScope:"user",connectText:s("userCenter.storage.spaces.connected.switch"),session:n,onSuccess:i})]}),e.jsx(f,{children:t&&e.jsx(zr,{endpoint:t.endpoint,deps:[t],selected:!0,footer:!0,action:c=>e.jsx(jt,{session:n,...c})},t.endpoint)}),l&&e.jsx(f,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2},children:e.jsx(ue,{connectScope:"user",connectText:s("userCenter.storage.spaces.connected.switch"),session:n,onSuccess:i})})]})}Ct.propTypes={spaceGateway:u.object};function un(){const{t}=N(),{updateSpaceGateway:s,session:o}=ze(),n=({spaceGateway:l})=>s(l);return e.jsxs(f,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(I,{sx:{fontSize:"16px",fontWeight:"bold"},children:t("userCenter.storage.spaces.connect.providerForStorage")}),e.jsx(Er,{viewBox:"0 0 228 258",style:{width:"156px",height:"156px",margin:"16px 0"}}),e.jsx(f,{children:e.jsx(ue,{session:o,onSuccess:n})})]})}function pn(){const{spaceGateway:t,hasStorageEndpoint:s,loading:o}=ze(),{isMyself:n}=Ae();return n?o?e.jsx(Ar,{relative:"parent",children:e.jsx(Y,{})}):e.jsx(fn,{children:e.jsx(f,{sx:{maxWidth:"720px"},children:s?e.jsx(Ct,{spaceGateway:t}):e.jsx(un,{})})}):null}function xn(){return e.jsx(wt,{children:e.jsx(pn,{})})}const fn=ee(f)`
|
|
122
|
+
height: 100%;
|
|
123
|
+
overflow-y: auto;
|
|
124
|
+
`;function lo(){const{api:t}=nr(),s=y.useRef(null),n=Ft().tab,i=new URLSearchParams(window.location.search).get("embed")||window.sessionStorage?.getItem("embed"),c=or(),p=T(()=>({...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:window?.blocklet?.componentMountPoints.map(x=>({...x,meta:{...x,did:x.did,name:x.name||x.title||"",logo:"logo.png"}}))})),r=async x=>{const{input:m,sessionId:h}=x;try{await t.destroySelf({input:{...m,sessionId:h}})}catch(C){console.error("destroy myself error",C)}};return e.jsx(vr,{children:e.jsxs(Rr,{ref:s,embed:i==="1",currentTab:n?ce(Pe.WELLKNOWN_SERVICE_PATH_PREFIX,"user",n):"",disableAutoRedirect:n==="settings",children:[n==="notifications"?e.jsx(Qr,{blocklets:[p],context:c}):null,n==="nfts"?e.jsx(nn,{}):null,n==="settings"?e.jsx(yt,{onDestroySelf:r}):null,n==="did-spaces"?e.jsx(xn,{}):null]})})}export{lo as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{W as o,j as n,ak as f,f as y,bf as
|
|
1
|
+
import{W as o,j as n,ak as f,f as y,bf as S,av as j,D as _}from"./vendor-mui-core-B7zoO8f5.js";import{r as v}from"./vendor-react-Dvs43sk9.js";import{l as k,aj as A,T as B,y as L,a6 as W}from"./vendor-ux-B7q8W4Pg.js";import{aT as H,b1 as Y,b2 as C,k as Z,b3 as V,b4 as G,b5 as J,aj as K,b6 as N,b7 as P}from"./index-CuQBOJqN.js";import{Y as Q,I as U,Z as X}from"./vendor-utils-DtY42AM-.js";import{a as ee}from"./vendor-hooks-BRXKH6Nb.js";function z({name:e="",logo:t="",description:i="",...p}){if(!e&&!t&&!i)return null;const c=v.isValidElement(t)?t:n.jsx("img",{src:t,alt:e});return n.jsxs(ne,{...p,children:[n.jsxs("div",{children:[t&&n.jsx(f,{component:"a",href:"/",className:"footer-brand-logo",children:c}),e&&n.jsx("div",{className:"footer-brand-name",children:e})]}),i&&n.jsx("div",{className:"footer-brand-desc",children:i})]})}z.propTypes={name:o.node,logo:o.node,description:o.string};const ne=k("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
font-size: 14px;
|
|
@@ -45,7 +45,7 @@ import{W as o,j as n,ak as f,f as y,bf as I,av as j,D as S}from"./vendor-mui-cor
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
`;function M({links:e=[],flowLayout:t=!1,columns:i,...p}){const[c,d]=v.useState(-1),x=H({key:"md"}),g=e.some(a=>a.items?.length),b=!x&&g&&
|
|
48
|
+
`;function M({links:e=[],flowLayout:t=!1,columns:i,...p}){const[c,d]=v.useState(-1),x=H({key:"md"}),g=e.some(a=>a.items?.length),b=!x&&g&&Q(i)&&i>1,u=({label:a,link:s,icon:l,render:m,props:r})=>{let h=a;if(m)h=m({label:a,link:s,props:r});else if(s&&U(s)){const $=s.startsWith("http")||s.startsWith("//");h=n.jsx("a",{href:s,"aria-label":`Footer link for ${a}`,target:$?"_blank":"_self",rel:$?"noreferrer noopener":void 0,...r,children:a})}return n.jsxs(n.Fragment,{children:[l&&n.jsx(C,{icon:l,size:20,sx:{mr:.5}}),h]})},w=ee(()=>e?.length?t?e.map((a,s)=>n.jsx("span",{className:"footer-links-item",children:u(a)},s)):b?Y(e,{columns:i}).map((a,s)=>n.jsx("div",{className:"footer-links-column",children:a.filter(l=>l.group).map((l,m)=>{const{items:r}=l;return n.jsxs("div",{className:"footer-links-group",children:[n.jsx("span",{className:"footer-links-item",children:u(l)}),!!r?.length&&n.jsx("div",{className:"footer-links-sub",children:r.map((h,$)=>n.jsx("span",{className:y("footer-links-item",{"footer-links-item--new":h.isNew}),children:u(h)},$))})]},m)})},s)):e.map((a,s)=>{const{items:l}=a,m=s===c;return n.jsxs("div",{className:y("footer-links-group",{"footer-links-group--active":m}),onClick:()=>d(c===s?-1:s),children:[n.jsxs("span",{className:"footer-links-item",children:[u(a),!!l?.length&&n.jsx("span",{className:"footer-links-group-expand-icon",children:n.jsx(S,{style:{transform:`rotate(${m?180:0}deg)`}})})]}),!!l?.length&&n.jsx("div",{className:"footer-links-sub",children:l.map((r,h)=>n.jsx("span",{className:y("footer-links-item",{"footer-links-item--new":r.isNew}),children:u(r)},h))})]},s)}):null,[e,t,b,c]);return e?.length?n.jsx(oe,{...p,className:y(p.className,{"footer-links--grouped":g,"footer-links--flow":t,"footer-links--columns":b}),children:n.jsx("div",{className:"footer-links-inner",children:w})}):null}M.propTypes={links:o.arrayOf(o.shape({label:o.string,link:o.string,render:o.func,props:o.object})),flowLayout:o.bool,columns:o.number.isRequired};const oe=k("div")`
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
color: ${({theme:e})=>e.palette.text.secondary};
|
|
51
51
|
.footer-links-inner {
|
|
@@ -211,7 +211,7 @@ import{W as o,j as n,ak as f,f as y,bf as I,av as j,D as S}from"./vendor-mui-cor
|
|
|
211
211
|
${e=>e.theme.breakpoints.down("md")} {
|
|
212
212
|
gap: 12px;
|
|
213
213
|
}
|
|
214
|
-
`;function
|
|
214
|
+
`;function R({owner:e="ArcBlock",year:t=`${new Date().getFullYear()}`,...i}){return n.jsxs(ie,{...i,children:["Copyright © ",t," ",e]})}R.propTypes={owner:o.string,year:o.string};const ie=k("p")`
|
|
215
215
|
display: flex;
|
|
216
216
|
align-items: center;
|
|
217
217
|
margin: 0;
|
|
@@ -237,7 +237,7 @@ import{W as o,j as n,ak as f,f as y,bf as I,av as j,D as S}from"./vendor-mui-cor
|
|
|
237
237
|
margin: 0 auto;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
`;function
|
|
240
|
+
`;function D({elements:e,data:t,className:i="",...p}){const c=!!t.navigation?.length;let d=null;return c?d=n.jsxs(j,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between"},children:[n.jsxs(f,{sx:{flex:"1 1 auto",paddingRight:{xs:0,md:3},display:"flex",flexDirection:"column",alignItems:"flex-start",gap:2,pb:3},children:[n.jsx(f,{children:e.brand}),n.jsx(f,{sx:{lineHeight:1},children:e.socialMedia})]}),n.jsx(f,{sx:({palette:x})=>({mb:3,borderTop:{xs:`1px solid ${x.grey[200]}`,md:0}}),children:e.navigation})]}):d=n.jsxs(j,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:"space-between",gap:2,pb:3},children:[n.jsx(f,{children:e.brand}),n.jsx(f,{sx:{lineHeight:1},children:e.socialMedia})]}),n.jsx(se,{...p,className:y({"footer--with-navs":c},i),children:n.jsxs(j,{style:{padding:0},children:[d,n.jsx(f,{sx:{pt:3,borderTop:1,borderColor:"divider"}}),n.jsx(j,{children:n.jsxs(T,{autoCenter:!0,children:[e.copyright,e.links]})})]})})}D.propTypes={elements:o.shape({brand:o.element,navigation:o.element,socialMedia:o.element,copyright:o.element,links:o.element}).isRequired,data:o.object.isRequired,className:o.string};const se=k("div")`
|
|
241
241
|
padding: 32px 0 24px 0;
|
|
242
242
|
.footer-brand-name,
|
|
243
243
|
.footer-brand-desc {
|
|
@@ -263,8 +263,8 @@ import{W as o,j as n,ak as f,f as y,bf as I,av as j,D as S}from"./vendor-mui-cor
|
|
|
263
263
|
flex-wrap: wrap;
|
|
264
264
|
gap: 8px;
|
|
265
265
|
}
|
|
266
|
-
`,F=[{name:"plain",support:(e,t)=>!t.navigation?.length&&!t.socialMedia?.length,component:E},{name:"standard",support:()=>!0,component:
|
|
266
|
+
`,F=[{name:"plain",support:(e,t)=>!t.navigation?.length&&!t.socialMedia?.length,component:E},{name:"standard",support:()=>!0,component:D}],ae=F.reduce((e,t)=>({...e,[t.name]:t}),{});function q({...e}){const{brand:t=null,navigation:i=null,socialMedia:p=null,copyright:c=null,links:d=null,layout:x="auto",...g}=e,b=()=>t?n.jsx(z,{...t}):null,u=()=>i?.length?n.jsx(M,{links:i,columns:3}):null,w=()=>p?.length?n.jsx(O,{items:p}):null,a=()=>{const r=c?.owner||t?.name;return r?n.jsx(R,{owner:r,year:c?.year||void 0}):null},s=()=>d?.length?n.jsx(M,{flowLayout:!0,links:d}):null,l={brand:b(),navigation:u(),socialMedia:w(),copyright:a(),links:s()};let m=null;if(x==="auto"?m=F.find(r=>r.support(l,e)).component:m=ae[x]?.component,!m)throw new Error(`layout ${x} is not supported.`);return n.jsxs(f,{...g,className:y("blocklet__footer",g.className),sx:[{position:"relative"},...Array.isArray(g.sx)?g.sx:[g.sx]],children:[n.jsx(m,{elements:l,data:e}),n.jsx(f,{sx:{position:"absolute",right:16,bottom:0,fontSize:12,color:"transparent","::selection":{background:"#000",color:"#fff"}},children:window?.blocklet?.version})]})}q.propTypes={brand:o.shape({name:o.node,description:o.string,logo:o.node}),navigation:o.arrayOf(o.shape({label:o.node,link:o.string})),socialMedia:o.arrayOf(o.shape({icon:o.node,link:o.string})),copyright:o.shape({owner:o.string,year:o.oneOfType([o.string,o.number])}),links:o.arrayOf(o.shape({label:o.node,link:o.string})),layout:o.oneOf(["auto","standard","plain"])};function I({meta:e={},theme:t={},...i}){const{locale:p}=B()||{},c=_(),d=v.useMemo(()=>{const r=Object.assign({},window.blocklet,e);try{return J(r)}catch(h){return console.error("Failed to format blocklet info",h,r),r}},[e]),x=v.useMemo(()=>L(c,t),[c,t]),g=K({key:"xs",meta:e,theme:t});if(!d.appName)return null;const{appName:b,appDescription:u,description:w,copyright:a}=d,s=x.palette.background.default,l={footerNav:N(d?.navigation?.footer,p)||[],socialMedia:N(d?.navigation?.social,p)||[],links:N(d?.navigation?.bottom,p)||[]},m={brand:{name:b,description:u||w,logo:g},navigation:P(l.footerNav,r=>({...r,label:r.title,link:r.link}),"items"),copyright:a,socialMedia:l.socialMedia,links:l.links.map(r=>({...r,label:r.title}))};return n.jsx(W,{theme:x,children:n.jsx(pe,{...m,...X(i,["bordered"]),$bordered:i?.bordered,$bgcolor:s})})}I.propTypes={meta:G,theme:o.object};const pe=k(q)`
|
|
267
267
|
${({$bordered:e,theme:t})=>`border-top: 1px solid ${e&&t.palette.divider};`}
|
|
268
268
|
color: ${({theme:e})=>e.palette.text.secondary};
|
|
269
269
|
${({$bgcolor:e})=>e&&`background-color: ${e};`}
|
|
270
|
-
`,he=A(
|
|
270
|
+
`,he=A(V(I),{FallbackComponent:Z});export{he as Z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./vendor-react-Dvs43sk9.js";import{j as a,y as b,W as t,z as y,M as E,ak as A}from"./vendor-mui-core-
|
|
1
|
+
import{r as p}from"./vendor-react-Dvs43sk9.js";import{j as a,y as b,W as t,z as y,M as E,ak as A}from"./vendor-mui-core-B7zoO8f5.js";import{a as j}from"./vendor-hooks-BRXKH6Nb.js";import{ao as r}from"./index-CuQBOJqN.js";import{T as C}from"./vendor-ux-B7q8W4Pg.js";import{l as I}from"./arrow-down.svg-lBR1lfm2.js";import{L as O,D as H}from"./vendor-mui-x-Qph0dQcg.js";import{A as R}from"./AdapterDayjs-VDBijwaM.js";function v({value:s=null,onChange:i,error:l=!1,helperText:c="",label:T="",timezone:e="",minDateTime:f=null}){const d=j(()=>{let n=r();return s&&(n=e?r(s).tz(e):r(s)),n},[s,e]),m=n=>{const h=e?r(n).tz(e):r(n);i(new Date(h.format("YYYY-MM-DD HH:mm:00")))};return a.jsx(O,{dateAdapter:R,children:a.jsx(b,{fullWidth:!0,error:l,children:a.jsx(H,{label:T,minDateTime:f,value:d,onChange:m,slotProps:{textField:{error:l,helperText:l?c:""}},format:"YYYY-MM-DD HH:mm"})})})}v.propTypes={value:t.oneOfType([t.string,t.instanceOf(Date)]),onChange:t.func.isRequired,error:t.bool,helperText:t.string,label:t.string,timezone:t.string,minDateTime:t.instanceOf(Date)};function U(s){return a.jsx(I,{...s,width:20,height:20})}const u={MINUTES_30:30*60*1e3,HOUR_1:60*60*1e3,HOURS_3:3*60*60*1e3,DAY_1:24*60*60*1e3,DAYS_7:7*24*60*60*1e3,DAYS_30:30*24*60*60*1e3};function $({placeholder:s="",value:i="",onChange:l,timezone:c="",showError:T=!0}){const{t:e}=C(),[f,d]=p.useState(i||""),[m,n]=p.useState(null),[h,Y]=p.useState(null),x=p.useMemo(()=>[{value:u.MINUTES_30,label:`30 ${e("common.minutes")}`},{value:u.HOUR_1,label:`1 ${e("common.hour")}`},{value:u.HOURS_3,label:`3 ${e("common.hours")}`},{value:u.DAY_1,label:`1 ${e("common.day")}`},{value:u.DAYS_7,label:`7 ${e("common.days")}`},{value:u.DAYS_30,label:`30 ${e("common.days")}`},{value:"custom",label:e("common.custom")}],[e]),_=o=>{if(d(o),o==="custom"){const D=c?r().tz(c):r(),S=D.add(1,"day").toDate();Y(D),n(S),l(S)}else l(new Date(Date.now()+o))},M=o=>{n(o),l(o)};p.useEffect(()=>{i&&(x.find(D=>r(D.value).isSame(i))||(d("custom"),n(i)))},[]);const g=j(()=>T?!!(!m||r(m).isBefore(r())):!1,[m,e]);return a.jsxs(a.Fragment,{children:[a.jsx(b,{fullWidth:!0,children:a.jsx(y,{select:!0,value:f,label:s||e("team.passport.passportExpireTime"),onChange:o=>_(o.target.value),variant:"outlined",slotProps:{select:{IconComponent:U}},children:x.map(o=>a.jsx(E,{value:o.value,children:o.label},o.value))})}),f==="custom"&&a.jsx(A,{children:a.jsx(v,{value:m,onChange:M,label:e("team.passport.customExpireTime"),timezone:c,error:!!g,helperText:g?e("team.passport.customExpireTimeIsInvalid"):void 0,minDateTime:h})})]})}$.propTypes={value:t.oneOfType([t.string,t.instanceOf(Date)]),onChange:t.func.isRequired,timezone:t.string,placeholder:t.string,showError:t.bool};export{$ as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,at as r}from"./vendor-mui-core-B7zoO8f5.js";import{r as s}from"./vendor-react-Dvs43sk9.js";import{G as a}from"./vendor-ux-B7q8W4Pg.js";import{t as n}from"./index-CuQBOJqN.js";import"./vendor-utils-DtY42AM-.js";import"./vendor-hooks-BRXKH6Nb.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-B7AoUs4o.js";function l(){const{t:o}=s.useContext(a);return t.jsx(i,{style:{paddingTop:"25vh"},children:t.jsx(n,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const i=r.main``;export{l as default};
|