@abtnode/blocklet-services 1.16.54-beta-20251016-050817-2fc632b8 → 1.16.54-beta-20251017-133309-7d40faa6
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/emails/_components/asset.js +7 -2
- package/api/emails/_components/attachments.js +1 -1
- package/dist/assets/{AdapterDayjs-DyE9ImrK.js → AdapterDayjs-T-a0V_gA.js} +1 -1
- package/dist/assets/{Google-ZJmTt04Y.js → Google-BXi1gq6W.js} +1 -1
- package/dist/assets/{access-control-C5AwSG3T.js → access-control-m0S6yUo8.js} +1 -1
- package/dist/assets/{actions-C4-lIUPY.js → actions-C0hEY5iN.js} +1 -1
- package/dist/assets/{add-component-core-CrZWbFmf.js → add-component-core-BksM6C--.js} +17 -17
- package/dist/assets/{add-resource-Brh4F6D2.js → add-resource-CTnW2X8N.js} +1 -1
- package/dist/assets/{addon-DMW6BcQH.js → addon-CPEWVDQ1.js} +1 -1
- package/dist/assets/{advanced-ykwSXzlQ.js → advanced-BQT157yk.js} +2 -2
- package/dist/assets/{aigne-DmDL-WLj.js → aigne-CfRlP6kv.js} +1 -1
- package/dist/assets/api-C7Kyuutl.js +1 -0
- package/dist/assets/{appearance-CwaUUdyp.js → appearance-BddR68-e.js} +1 -1
- package/dist/assets/{ar-Ge3t6oI2.js → ar-BQm9lQ4M.js} +1 -1
- package/dist/assets/{arrow-down.svg-D3B8bxxx.js → arrow-down.svg-UHWRwrOh.js} +1 -1
- package/dist/assets/audit-logs-BzqpNyz0.js +35 -0
- package/dist/assets/{authorize-CmneXxos.js → authorize-D9fC-nXh.js} +1 -1
- package/dist/assets/{base-chart-C_jLgGFD.js → base-chart-CSJD1faI.js} +1 -1
- package/dist/assets/{base32-Cg02gOuu.js → base32-iOXf3Dyk.js} +1 -1
- package/dist/assets/{bind-account-B_UMGXib.js → bind-account-DhXOE_rG.js} +1 -1
- package/dist/assets/branding-BQslHJ3k.js +1 -0
- package/dist/assets/{branding-DETOdgiW.js → branding-B_hljukd.js} +1 -1
- package/dist/assets/{branding-B_eCdYJK.js → branding-PrRXFhYD.js} +3 -3
- package/dist/assets/{bundle-avatar-BFaxogKz.js → bundle-avatar-B6pd4JA-.js} +1 -1
- package/dist/assets/button-2y9b8ibp.js +1 -0
- package/dist/assets/{click-to-copy-CK42VmRr.js → click-to-copy-PW3ieO34.js} +1 -1
- package/dist/assets/{cloneDeep-gpb_g13N.js → cloneDeep-D3tVGEyF.js} +1 -1
- package/dist/assets/{collapse-D7GlSZQp.js → collapse-Cc8IqFzl.js} +1 -1
- package/dist/assets/{complete-Bqi3d0V1.js → complete-BpTFnpTf.js} +2 -2
- package/dist/assets/{component-CSPqPsOF.js → component-abZy96kt.js} +2 -2
- package/dist/assets/{config-CPdtVTio.js → config-B-efbAjK.js} +1 -1
- package/dist/assets/{config-BWSyA18z.js → config-CBb_1lBq.js} +5 -5
- package/dist/assets/{config-BHZS65kz.js → config-CRxkGlLw.js} +1 -1
- package/dist/assets/{config-navigation-BFsrGucq.js → config-navigation-V-jkhCe0.js} +3 -3
- package/dist/assets/{config-space-CSl6D7xo.js → config-space-uoEgpVj0.js} +1 -1
- package/dist/assets/{confirm-CEAKWDZJ.js → confirm-2zLPRflS.js} +1 -1
- package/dist/assets/{connect-FvriLilq.js → connect-Bg2fkKdJ.js} +1 -1
- package/dist/assets/{connect-BVXqic92.js → connect-CR6YXL6l.js} +1 -1
- package/dist/assets/{connect-to-dZwJX0bt.js → connect-to-DVzVPrNg.js} +1 -1
- package/dist/assets/{content-layout-W7JDm8iO.js → content-layout-DJL10aJT.js} +1 -1
- package/dist/assets/{create-passport-svg-BsR3hKFq.js → create-passport-svg-G2i9OoEB.js} +1 -1
- package/dist/assets/{createClass-B4I2IV47.js → createClass-Bf8maCzZ.js} +1 -1
- package/dist/assets/{dashboard-DyYLnek8.js → dashboard-DvbW_coF.js} +2 -2
- package/dist/assets/{de-CbARTvf4.js → de-D0uPENSq.js} +1 -1
- package/dist/assets/{delete-confirm-DpKJ9gtf.js → delete-confirm-tJr-kQGY.js} +1 -1
- package/dist/assets/{did-address-BQL5Zxlr.js → did-address-yNLicvuz.js} +1 -1
- package/dist/assets/{domain-action-card-CRdL2PFv.js → domain-action-card-oKAg2vcg.js} +2 -2
- package/dist/assets/{domain-Bq75ZuOm.js → domain-orOrS-66.js} +1 -1
- package/dist/assets/domains-CIKaHlMa.js +1 -0
- package/dist/assets/{email-OlQWpbtF.js → email-Bw5lhga1.js} +1 -1
- package/dist/assets/{empty-spinner-sNq-0DF5.js → empty-spinner-Dqkt-AHg.js} +1 -1
- package/dist/assets/engine-DrB5N6Vq.js +1 -0
- package/dist/assets/{es-CaCbzATO.js → es-Dh4_UfCu.js} +1 -1
- package/dist/assets/{exchange-passport-DK4-g9my.js → exchange-passport-D5N7TuyP.js} +1 -1
- package/dist/assets/{form-C5dLovtO.js → form-D9ZwMxUQ.js} +1 -1
- package/dist/assets/{form-text-input-AIMlcRaM.js → form-text-input-BdGN_cNn.js} +1 -1
- package/dist/assets/{form-wrapper-DINLdpTN.js → form-wrapper-SZH1FnTd.js} +1 -1
- package/dist/assets/{fr-B3yjKUFH.js → fr-CzZWQkiT.js} +1 -1
- package/dist/assets/{fuel-DkqmEB8D.js → fuel-DRu4UcZ3.js} +1 -1
- package/dist/assets/{gen-access-key-BnCg2Wu1.js → gen-access-key-Cg1WeFbg.js} +1 -1
- package/dist/assets/{gen-simple-access-key-zOQbFtZ8.js → gen-simple-access-key-DPQLOBVf.js} +1 -1
- package/dist/assets/get-safe-url-BEmXir96.js +1 -0
- package/dist/assets/{hi-q4mhHiIl.js → hi-Do9VCuRi.js} +1 -1
- package/dist/assets/{home-DTXdAvXT.js → home-drsp3cTN.js} +1 -1
- package/dist/assets/{id-DTf7aVH8.js → id-Dhhrveu9.js} +1 -1
- package/dist/assets/{iframe-DAoobOBi.js → iframe-D7RMzvnk.js} +1 -1
- package/dist/assets/{index-DHQkab_n.js → index--FkaQ0Dk.js} +1 -1
- package/dist/assets/index--OvsXAyb.js +1 -0
- package/dist/assets/{index-DNGdj2R4.js → index-4_vQ0fa1.js} +4 -4
- package/dist/assets/{index-IGBGBXd_.js → index-B31Z5yXU.js} +1 -1
- package/dist/assets/index-B486VukG.js +1 -0
- package/dist/assets/{index-DeVDiUjo.js → index-B80ObPIt.js} +1 -1
- package/dist/assets/index-BJkTWRHF.js +281 -0
- package/dist/assets/{index-D_vhPpT2.js → index-BMkkWtK-.js} +1 -1
- package/dist/assets/index-BPz1W1F5.js +7 -0
- package/dist/assets/{index-D6Y3sCzN.js → index-BTb5QwNU.js} +2 -2
- package/dist/assets/{index-BJrVQ6ch.js → index-B_9ypeKS.js} +1 -1
- package/dist/assets/{index-3yzleS_1.js → index-BnPTSmJZ.js} +87 -87
- package/dist/assets/index-Bv1DYw0_.js +55 -0
- package/dist/assets/{index-D1thq8eN.js → index-BwxEDC7M.js} +6 -6
- package/dist/assets/{index-VySXxf4w.js → index-CAMegfIe.js} +1 -1
- package/dist/assets/{index-ve-p7nSZ.js → index-CMOR5eza.js} +5 -5
- package/dist/assets/index-CR7OYm8K.js +120 -0
- package/dist/assets/{index-KpZGUssm.js → index-CXs5RZ6g.js} +1 -1
- package/dist/assets/{index-Bgt2qHLn.js → index-CcoIHAI8.js} +4 -4
- package/dist/assets/{index-Cd_Gml9C.js → index-CjUY4wYp.js} +1 -1
- package/dist/assets/{index-DJj8GmQS.js → index-Cs8-XzFL.js} +1 -1
- package/dist/assets/{index-BcGECSaf.js → index-D0c5zNE-.js} +1 -1
- package/dist/assets/{index-C80JxCSn.js → index-D5jPhzpV.js} +1 -1
- package/dist/assets/{index-Cs_I9KFa.js → index-DC4JoVqO.js} +1 -1
- package/dist/assets/{index-DlRa8Zeh.js → index-DD8Xcc3x.js} +1 -1
- package/dist/assets/index-DJgF8q_o.js +124 -0
- package/dist/assets/{index-B6a6aopU.js → index-DJhcYi8s.js} +11 -11
- package/dist/assets/{index-DX3L95vz.js → index-DKuLdlGi.js} +1 -1
- package/dist/assets/{index-rQAVknkX.js → index-DVsdJqbi.js} +1 -1
- package/dist/assets/{index-Cr5RxnHu.js → index-DacQww-t.js} +1 -1
- package/dist/assets/{index-iOD1kOar.js → index-DdeHXxqD.js} +4 -4
- package/dist/assets/{index-BdHbrnpK.js → index-Dj7hvho1.js} +1 -1
- package/dist/assets/{index-D_HqsEfj.js → index-Dz7IF3dR.js} +1 -1
- package/dist/assets/{index-DFceGCP0.js → index-Z2OlxmBy.js} +1 -1
- package/dist/assets/{invitation-P1aXUnIO.js → invitation-dxOWwXhI.js} +1 -1
- package/dist/assets/{invitations-dPkgiFPr.js → invitations-fxhgBZ7v.js} +1 -1
- package/dist/assets/{invite-Bz99qCDF.js → invite-BUfTFpm3.js} +1 -1
- package/dist/assets/{isURL-DYsELTMk.js → isURL-BWdci4BV.js} +2 -2
- package/dist/assets/{issue-passport-DPyxNFLD.js → issue-passport-CGjo4nFE.js} +1 -1
- package/dist/assets/{item-B1UaStjk.js → item-CpRxSfFl.js} +1 -1
- package/dist/assets/{ja-Csh_XwzF.js → ja-B70UYq5X.js} +1 -1
- package/dist/assets/{ko-xiNTwgO9.js → ko-C7TZwmXC.js} +1 -1
- package/dist/assets/{landing-page-CkVnGimh.js → landing-page-BeMOLJet.js} +1 -1
- package/dist/assets/{launch-result-message-Dt-T7zmz.js → launch-result-message-DZJ76kCs.js} +1 -1
- package/dist/assets/{layout-fFNOz6Xe.js → layout-DSuoHJe3.js} +1 -1
- package/dist/assets/list-DA_a9DhC.js +103 -0
- package/dist/assets/list-gCQikTBu.js +2 -0
- package/dist/assets/{list-header-CjohGZ9B.js → list-header-BNFs7V0b.js} +1 -1
- package/dist/assets/localization-NenbMmXN.js +1 -0
- package/dist/assets/{log-lPrpnnPZ.js → log-BRV1BCFu.js} +1 -1
- package/dist/assets/logger-CHXN98LU.js +1 -0
- package/dist/assets/{login-63olb_gZ.js → login-DP97VuHR.js} +1 -1
- package/dist/assets/{login-oauth-callback-DebmT1Db.js → login-oauth-callback-C2DR5bOf.js} +1 -1
- package/dist/assets/{logo-uploader-3OpHGD1n.js → logo-uploader-BNfVMS9b.js} +1 -1
- package/dist/assets/{lost-passport-xCmWuuxC.js → lost-passport-BdOj7Qyw.js} +3 -3
- package/dist/assets/{observability-B458LeIE.js → observability-BjKI3tFt.js} +1 -1
- package/dist/assets/{omit-DdfLLBNW.js → omit-CxhCIYKY.js} +1 -1
- package/dist/assets/{open-window-CzYfI7l7.js → open-window-Dm9n80Az.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-C5fynimj.js → over-due-invoice-payment-Cg-G2W1o.js} +1 -1
- package/dist/assets/{overview-BFzvEbcq.js → overview-BFV7mugn.js} +2 -2
- package/dist/assets/{page-header-gosgJ3fX.js → page-header-xpG0yfsa.js} +1 -1
- package/dist/assets/passport-CQWKOko9.js +1 -0
- package/dist/assets/passport-item-ZjtfZLBd.js +1 -0
- package/dist/assets/{permission-UeJPGiMm.js → permission-BZsLoL-d.js} +1 -1
- package/dist/assets/{playground-_1Dj8J_h.js → playground-DKMlueFr.js} +1 -1
- package/dist/assets/preferences-C5BaFHlg.js +1 -0
- package/dist/assets/profile-embed-HIW9YGAc.js +1 -0
- package/dist/assets/{pt-BvcG4R7B.js → pt-DObJ_ADK.js} +1 -1
- package/dist/assets/publish-resource-CG--uFPX.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CIwtis6a.js → react-beautiful-dnd.esm-DG8qQeEC.js} +1 -1
- package/dist/assets/{react-stripe.esm-omsK4b05.js → react-stripe.esm-BV6kfV2w.js} +1 -1
- package/dist/assets/{required-BPzIdi1N.js → required-C9DLcn9T.js} +1 -1
- package/dist/assets/revoke.svg-CmffMlcP.js +1 -0
- package/dist/assets/{ru-DzUPRLmr.js → ru-nYDmEUmY.js} +1 -1
- package/dist/assets/{runtime-iwxdTEke.js → runtime-tvucPK2o.js} +1 -1
- package/dist/assets/{sanitize-CEXE1rEu.js → sanitize-m8Fu6XGD.js} +1 -1
- package/dist/assets/sdk-BGPH_Nn6.js +1 -0
- package/dist/assets/{section-DOw43pby.js → section-MSasF4Cx.js} +1 -1
- package/dist/assets/{security-D4Sx6wQO.js → security-DTZHnwsj.js} +6 -6
- package/dist/assets/{session-Dnp_ufkx.js → session-ByI8mrad.js} +1 -1
- package/dist/assets/{setup-DpBiTcjv.js → setup-BUodqoBL.js} +1 -1
- package/dist/assets/{shorten-label-C-X_7vr2.js → shorten-label-dRmYvYJ7.js} +1 -1
- package/dist/assets/simple-select-C-ApYkD4.js +1 -0
- package/dist/assets/{spaces-Bu7-7u79.js → spaces-Bqe6pnFj.js} +1 -1
- package/dist/assets/{start-B1qawsPb.js → start-DCOjCV4F.js} +1 -1
- package/dist/assets/{starting-progress-BfM3wNuj.js → starting-progress-_tZGZM6B.js} +1 -1
- package/dist/assets/{status-LEG00uGL.js → status-DAIZaCUT.js} +1 -1
- package/dist/assets/{step-actions-BzwezgI2.js → step-actions-D_gKO0Cw.js} +1 -1
- package/dist/assets/{studio-Bk9PCaeS.js → studio-DCdXmXUq.js} +1 -1
- package/dist/assets/{switch-control-CRxlGq2g.js → switch-control-Ddqhf44I.js} +1 -1
- package/dist/assets/{table-tips-BMq3WO_p.js → table-tips-BUZ1mtAq.js} +1 -1
- package/dist/assets/{team-DmYSbFMF.js → team-CeANUXFV.js} +7 -7
- package/dist/assets/{th-BmW1qKpZ.js → th-DMcUw_9_.js} +1 -1
- package/dist/assets/{traffic-CzxoP9Vj.js → traffic-CVF4T2v4.js} +1 -1
- package/dist/assets/{transfer-CUe_bnhh.js → transfer-B4X6jlUA.js} +1 -1
- package/dist/assets/ua-parser-DP5omx3I.js +1 -0
- package/dist/assets/{unsubscribe-5Z1xcJ3T.js → unsubscribe-xvziXmXe.js} +1 -1
- package/dist/assets/{use-app-logo-0uziDh86.js → use-app-logo-Cp60-jm5.js} +1 -1
- package/dist/assets/{use-mobile-DLnLSQQq.js → use-mobile-Bjbo_Gou.js} +1 -1
- package/dist/assets/{use-mobile-Db5FIl07.js → use-mobile-CjZIGfWP.js} +1 -1
- package/dist/assets/{use-server-logo-CFlVReBS.js → use-server-logo-uMEEt675.js} +1 -1
- package/dist/assets/{use-window-close-CrHmRyVV.js → use-window-close-Coe8kRfa.js} +1 -1
- package/dist/assets/{useAsync-1_z8P8M4.js → useAsync-B9mMAdx5.js} +1 -1
- package/dist/assets/{useAsync-BKYfrNw7.js → useAsync-tu8lmT7w.js} +1 -1
- package/dist/assets/{useAsyncRetry-Dyo5t1bq.js → useAsyncRetry-n96jNDlD.js} +1 -1
- package/dist/assets/{useLocalStorage-Be_1V0gr.js → useLocalStorage-CPNhajTc.js} +1 -1
- package/dist/assets/user-center-CdyILvwP.js +126 -0
- package/dist/assets/user-follower-Brdja1Pl.js +32 -0
- package/dist/assets/{util-DXaZWduO.js → util-cUwto1hL.js} +1 -1
- package/dist/assets/{util-CQfGbjyT.js → util-d0fh6S9R.js} +1 -1
- package/dist/assets/{vendor-arcblock-DGOH9a3F.js → vendor-arcblock-BzYItNIN.js} +1 -1
- package/dist/assets/{vendor-hooks-DmThWyyG.js → vendor-hooks-tpeT8a0P.js} +2 -2
- package/dist/assets/{vendor-mui-core-BFPsXaTR.js → vendor-mui-core-BPcN1m8_.js} +1 -1
- package/dist/assets/{vendor-mui-x-C6iZOJbV.js → vendor-mui-x-DEgOZXst.js} +1 -1
- package/dist/assets/{vendor-utils-OrZFrHBP.js → vendor-utils-COYaMdo5.js} +1 -1
- package/dist/assets/{vendor-ux-CE4sOH7O.js → vendor-ux-D_B1Y7iC.js} +126 -133
- package/dist/assets/{vi-BPU54RQW.js → vi-B73oWQBC.js} +1 -1
- package/dist/assets/{wait-connect-Rle27g9O.js → wait-connect-B4jNvmkx.js} +1 -1
- package/dist/assets/{wizard-CewJTR0V.js → wizard-BZNmVb4z.js} +1 -1
- package/dist/assets/{wizard-components-B4yvBYZF.js → wizard-components-C5WSLWm-.js} +1 -1
- package/dist/assets/wrap-locale-CsR2MOap.js +1 -0
- package/dist/assets/{zh-Bg-a-bz5.js → zh-BsfsxdYb.js} +1 -1
- package/dist/assets/{zh-WrFfMVyM.js → zh-DCABA61W.js} +1 -1
- package/dist/assets/{zh-tw-DjWFpq-W.js → zh-tw-M_0Y4wmR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +34 -34
- package/dist/assets/api-txzyyizM.js +0 -1
- package/dist/assets/audit-logs-eJR1v94e.js +0 -35
- package/dist/assets/branding-CHRz3wuZ.js +0 -1
- package/dist/assets/button-CaqBEwnu.js +0 -1
- package/dist/assets/domains-BiIZZN7p.js +0 -1
- package/dist/assets/engine-B1U2TY7M.js +0 -1
- package/dist/assets/get-safe-url-3Xj-tgXY.js +0 -1
- package/dist/assets/index-CDCcuLh3.js +0 -7
- package/dist/assets/index-CZp06HHE.js +0 -281
- package/dist/assets/index-D9QTZSnh.js +0 -1
- package/dist/assets/index-D_s4QOu7.js +0 -1
- package/dist/assets/index-Dfmjh5-5.js +0 -124
- package/dist/assets/index-LeqLm9hN.js +0 -55
- package/dist/assets/index-RD-gFG7U.js +0 -113
- package/dist/assets/list-C-9EwvIL.js +0 -2
- package/dist/assets/list-CX2Q1hbc.js +0 -103
- package/dist/assets/localization-DQioZq4I.js +0 -1
- package/dist/assets/logger-DkBs7Soy.js +0 -1
- package/dist/assets/passport-BLmrTDdo.js +0 -1
- package/dist/assets/passport-item-CBB6usyJ.js +0 -1
- package/dist/assets/preferences-Da8NATLw.js +0 -1
- package/dist/assets/profile-embed-9LLnCulK.js +0 -1
- package/dist/assets/publish-resource-Chyv1Trw.js +0 -1
- package/dist/assets/sdk-D4xzRwM9.js +0 -1
- package/dist/assets/simple-select-Bg4XC1E_.js +0 -1
- package/dist/assets/user-center-u6FpYGow.js +0 -126
- package/dist/assets/user-follower-CyGK-1so.js +0 -32
- package/dist/assets/user-sessions-4qrRIOb8.js +0 -1
- package/dist/assets/wrap-locale-qW2Nj5Kt.js +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import{j as e,y as ht,bc as ye,M as ne,ak as h,Q as G,W as p,J as ve,c1 as xt,I as D,aN as gt,T as E,aj as mt,b5 as Pe,P as Ie,b6 as Te,a5 as Re,z as Ue,A as Fe,ci as bt,bh as yt,U as Me,cR as vt,cS as wt,at as Z,cT as jt,a6 as Y,n as oe,D as Ct,cU as kt,ar as Ae,b1 as we,cV as St,aX as Pt,a$ as It,cW as Tt}from"./vendor-mui-core-BPcN1m8_.js";import{r as y,a as Rt,u as Mt,j as At}from"./vendor-react-Dvs43sk9.js";import{t as _e,Z as Et,a4 as zt,R as Ee,D as Lt,C as se,n as H,A as Wt}from"./vendor-utils-COYaMdo5.js";import{a as Dt,F as Bt,bi as Ot,c as je,Y as $t,bj as Nt,av as qe,W as le,bf as Ut,bk as Ft,a8 as _t,a9 as qt,bl as Ht}from"./index-BnPTSmJZ.js";import{a as T,h as Gt,k as ce,g as Q,b as A,j as Kt}from"./vendor-hooks-tpeT8a0P.js";import{l as He}from"./arrow-down.svg-UHWRwrOh.js";import{s as Ce,a3 as L,V as W,ay as Yt,z as Ge,az as Vt,H as $,aA as Zt,aB as Qt,aC as ze,v as Jt,p as Ke,u as ke,aD as Xt,aE as P,Q as er,P as tr,$ as rr,aF as nr,aG as or,o as Ye}from"./vendor-ux-D_B1Y7iC.js";import{N as sr}from"./list-DA_a9DhC.js";import{d as ir}from"./search-4YYphs0l.js";import{B as Le}from"./bundle-avatar-B6pd4JA-.js";import{h as We,T as ar}from"./team-CeANUXFV.js";import{b as lr,d as cr,a as dr,c as ur,e as pr,f as fr,h as hr,O as xr}from"./user-center-CdyILvwP.js";import{T as De,O as gr}from"./index-Cs8-XzFL.js";import{c as mr}from"./passport-CQWKOko9.js";import{N as Ve,U as Ze}from"./index-CMOR5eza.js";import{u as de}from"./use-mobile-CjZIGfWP.js";import br from"./index-BMkkWtK-.js";import{U as yr,a as vr}from"./user-follower-Brdja1Pl.js";import{f as V}from"./index-DBs9Ljax.js";import{u as me}from"./index-DD8Xcc3x.js";import wr from"./index-BwxEDC7M.js";import{o as jr}from"./vendor-arcblock-BzYItNIN.js";import{c as Cr,b as ie,a as kr,S as Sr}from"./index-CcoIHAI8.js";import"./index-CjUY4wYp.js";import"./index-BojVbZw0.js";import"./lottie-web-4koyQiv_.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./index-B80ObPIt.js";import"./util-d0fh6S9R.js";import"./base32-iOXf3Dyk.js";import"./session-ByI8mrad.js";import"./isURL-BWdci4BV.js";import"./use-app-logo-Cp60-jm5.js";import"./index-DdeHXxqD.js";import"./revoke.svg-CmffMlcP.js";import"./use-mobile-Bjbo_Gou.js";import"./actions-C0hEY5iN.js";import"./index-B31Z5yXU.js";import"./form-text-input-BdGN_cNn.js";import"./required-C9DLcn9T.js";import"./form-wrapper-SZH1FnTd.js";import"./edit.svg-DycWG9v3.js";import"./lock.svg-COUP8tyO.js";import"./index--FkaQ0Dk.js";import"./permission-BZsLoL-d.js";import"./confirm-2zLPRflS.js";import"./click-to-copy-PW3ieO34.js";import"./invitations-fxhgBZ7v.js";import"./create-passport-svg-G2i9OoEB.js";import"./api-C7Kyuutl.js";import"./table-tips-BUZ1mtAq.js";import"./ua-parser-DP5omx3I.js";import"./sdk-BGPH_Nn6.js";import"./passport-item-ZjtfZLBd.js";import"./did-address-yNLicvuz.js";import"./index-D5jPhzpV.js";import"./vendor-mui-x-DEgOZXst.js";import"./AdapterDayjs-T-a0V_gA.js";import"./delete-confirm-tJr-kQGY.js";import"./index-DRYJ0xIl.js";function Pr(){let t=new Map;function i({root:s,rootMargin:n,threshold:o}){let u=t.get(s);u||(u=new Map,t.set(s,u));let a=JSON.stringify({rootMargin:n,threshold:o}),d=u.get(a);if(!d){let r=new Map;d={observer:new IntersectionObserver(f=>{f.forEach(g=>{r.get(g.target)?.(g)})},{root:s,rootMargin:n,threshold:o}),entryCallbacks:r},u.set(a,d)}return{observe:(r,f)=>{d.entryCallbacks.set(r,f),d.observer.observe(r)},unobserve:r=>{d.entryCallbacks.delete(r),d.observer.unobserve(r)}}}return{getObserver:i}}var Ir="0px",Tr=[0],Rr=Pr();function Mr(t){let i=t?.rootMargin??Ir,s=t?.threshold??Tr,n=y.useRef(null),o=y.useRef(null),u=y.useRef(null),[a,d]=y.useState(),r=y.useCallback(()=>{let j=n.current;if(!j){d(void 0);return}let v=Rr.getObserver({root:o.current,rootMargin:i,threshold:s});v.observe(j,l=>{d(l)}),u.current=v},[i,s]),f=y.useCallback(()=>{let j=u.current,v=n.current;v&&j?.unobserve(v),u.current=null},[]),g=y.useCallback(j=>{f(),n.current=j,r()},[r,f]),x=y.useCallback(j=>{f(),o.current=j,r()},[r,f]);return[g,{entry:a,rootRef:x}]}var Ar=Mr;function Er(t){let[i,s]=Ar(t),n=!!s.entry?.isIntersecting,[o,u]=y.useState(n);return n&&!o&&u(!0),[i,{...s,isVisible:n,wasEverVisible:o}]}var zr=Er,Lr=100;function Wr({loading:t,hasNextPage:i,onLoadMore:s,rootMargin:n,disabled:o,delayInMs:u=Lr}){let a=y.useRef(s),[d,{rootRef:r,isVisible:f}]=zr({rootMargin:n});y.useEffect(()=>{a.current=s},[s]);let g=!o&&!t&&f&&i;return y.useEffect(()=>{if(g){let x=setTimeout(()=>{a.current()},u);return()=>{clearTimeout(x)}}},[g,u]),[d,{rootRef:r}]}var Dr=Wr;const ge={info:"#3B82F6",success:"#10B981",warning:"#F59E0B",error:"#EF4444"};ae.propTypes={severity:p.oneOf(["info","success","warning","error",""]).isRequired,size:p.number};function ae({severity:t,size:i=8}){return ge[t]?e.jsx(h,{component:"span",sx:{display:"inline-block",width:i,height:i,borderRadius:"50%",backgroundColor:ge[t]||ge.info}}):null}Qe.propTypes={theme:p.string,type:p.oneOf(["button","line","select"]),onSelectType:p.func,extra:p.node,loading:p.bool,currentTab:p.oneOf(["info","success","warning","error",""])};function Qe({theme:t="dark",type:i="button",onSelectType:s,extra:n=void 0,currentTab:o="",loading:u=!1,...a}){const{t:d}=y.useContext(Ce),r=[{label:d("notification.allSeverity"),value:""},{label:d("notification.severityType.info"),value:"info"},{label:d("notification.severityType.success"),value:"success"},{label:d("notification.severityType.warning"),value:"warning"},{label:d("notification.severityType.error"),value:"error"}],f=m=>{(m!==o||!u)&&s(m)},g=y.useMemo(()=>{const m={width:"100%",bgcolor:t==="dark"?"#F9FAFB":"",overflowY:"auto",paddingTop:i==="select"?"0":"5px",whiteSpace:"nowrap",borderRadius:0,display:"flex",justifyContent:"space-between",alignItems:"flex-end",flexWrap:"wrap",gap:"8px"};return i==="line"?Object.assign(m,{}):m},[i,t]),x=(m,C,I)=>e.jsx(G,{disabled:u,onClick:()=>f(m.value),className:`profile-button ${C?"active":""}`,...a,children:m.label},m.value||I),j=(m,C,I)=>e.jsx(G,{variant:"text",disabled:u,onClick:()=>f(m.value),className:`profile-line-button ${C?"active":""}`,...a,children:m.label},m.value||I),v=()=>r?.map((m,C)=>{const I=o===m?.value;return i==="line"?e.jsx(y.Fragment,{children:j(m,I,C)},m.value||C):e.jsx(y.Fragment,{children:x(m,I,C)},m.value||C)}),l=m=>{const{value:C}=m.target;f(C==="all"?"":C)};return i==="select"?e.jsx(ht,{sx:{maxWidth:300},children:e.jsx(ye,{value:o||"all",onChange:l,size:"small",label:"Severity",IconComponent:m=>e.jsx(He,{...m,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((m,C)=>e.jsx(ne,{value:m.value||"all",children:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(ae,{severity:m.value}),m.label]})},m.value||C))})}):e.jsxs(h,{className:"severity-tabs",sx:g,children:[e.jsx(h,{sx:{...i==="line"?{flex:1,borderBottom:"1px solid",borderColor:"grey.200"}:{display:"flex",gap:"24px"}},children:v()}),n]})}Je.propTypes={paging:p.objectOf(p.any).isRequired,loading:p.bool.isRequired,onChange:p.func.isRequired};function Je({loading:t,paging:i,onChange:s}){const{t:n}=y.useContext(Ce),o=ve(r=>r.breakpoints.down("md"));if(i.pageCount<=0||o)return null;const u=(r,f)=>{s({page:f+1})},a=r=>{const f=Number(r.target.value);s({page:1,pageSize:f})},d=i.page-1<=0?0:i.page-1;return e.jsx(h,{className:"notification-pagination",sx:{mt:2,display:"flex",justifyContent:"flex-end"},children:e.jsx(xt,{component:"div",disabled:t,count:i.total,page:d,rowsPerPageOptions:[10,20,50,100],labelRowsPerPage:n("pagination.rowsPerPage"),labelDisplayedRows:({from:r,to:f,count:g})=>`${r}–${f} / ${g!==-1?g:`${n()}more than ${f}`}`,rowsPerPage:i.pageSize,onPageChange:u,onRowsPerPageChange:a})})}const Br=y.memo(Je),Or={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"/>'},Be=6,Oe={"& .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}},$r={border:"1px solid",borderColor:"divider",borderRadius:1,overflow:"hidden",backgroundColor:"background.paper",backgroundImage:"none",transition:"all 0.2s ease-in-out"},$e=()=>({...$r,width:"calc(50% - 8px)"});Xe.propTypes={loading:p.bool,type:p.oneOf(["server","service"]),onFilterChange:p.func,blockletMap:p.object,filterType:p.oneOf(["component","entity"]),selectedId:p.array,severity:p.array,enableMarkAllAsRead:p.bool,unReadCount:p.number,onReadFilterChange:p.func,currentReadFilter:p.string};function Xe({onFilterChange:t=()=>{},loading:i=!1,type:s="service",blockletMap:n={},filterType:o="component",selectedId:u=[],severity:a=[],enableMarkAllAsRead:d=!0,unReadCount:r=0,onReadFilterChange:f=()=>{},currentReadFilter:g="all"}){const{t:x}=y.useContext(Ce),[j,v]=y.useState(null),l=!!j,[m,C]=y.useState(u),[I,k]=y.useState(a),[b,R]=y.useState(!1),[M,_]=y.useState(""),[B,N]=y.useState([]);y.useEffect(()=>{C(u),k(a)},[u,a]);const U=[{label:x("notification.filterType.all"),value:"all"},{label:x("notification.filterType.unread"),value:"unread"}],J=c=>{(c!==g||!i)&&f(c)},K=[{label:x("notification.severityType.info"),value:"info"},{label:x("notification.severityType.success"),value:"success"},{label:x("notification.severityType.warning"),value:"warning"},{label:x("notification.severityType.error"),value:"error"}],X=c=>{v(c.currentTarget),_(""),R(!1)},pe=()=>{v(null)},ee=c=>{const w=m.includes(c)?m.filter(S=>S!==c):[...m,c];C(w),t({id:w,severity:I})},te=c=>{const w=I.includes(c)?I.filter(S=>S!==c):[...I,c];k(w),t({severity:w,id:m})},fe=c=>{_(c.target.value)},he=()=>{R(!b)},q=Rt.useMemo(()=>{if(!n.size)return[];const c=[];return o==="component"&&c.push({label:x("notification.system"),id:"system"}),Array.from(n).forEach(([,w])=>{const S=w.did||w.meta?.did,z=w.title||w.meta?.title||"",O=w.appPid||w.appDid;(o==="component"&&O!==S||o==="entity"&&O===S)&&c.push({label:z,id:S,blocklet:w,ancestors:w.ancestors})}),c},[n,o,x]);y.useEffect(()=>{if(M.trim()==="")N(q);else{const c=M.toLowerCase(),w=q.filter(S=>S.label.toLowerCase().includes(c));N(w)}},[M,q]);const xe=M.trim()!==""||b?B:B.slice(0,Be);return e.jsxs(h,{children:[e.jsxs(h,{sx:{display:"flex",justifyContent:d?"space-between":"flex-end",alignItems:"flex-start",flexWrap:"wrap",gap:1},children:[d&&e.jsx(h,{sx:{display:"flex",gap:1.5},children:U.map(c=>e.jsxs(G,{disabled:i,onClick:()=>J(c.value),className:`profile-button ${g===c.value?"active":""}`,sx:{...s==="service"&&g===c.value?{color:"secondary.main"}:{},color:"red",fontWeight:g===c.value?"bold":"normal"},children:[c.label,c.value==="unread"&&r>0&&` (${r})`]},c.value))}),e.jsxs(h,{sx:{display:"flex",justifyContent:"flex-end",gap:2},children:[e.jsx(D,{size:"small",onClick:X,disabled:i,sx:{minWidth:"auto",borderRadius:1,border:"1px solid",borderColor:"divider","&:hover":{backgroundColor:"action.hover"}},children:e.jsx(L,{icon:Or,hFlip:!0})}),e.jsx(gt,{open:l,anchorEl:j,onClose:pe,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(h,{children:[e.jsxs(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,height:"28px"},children:[e.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:x("notification.severity")}),e.jsx(h,{sx:{minWidth:"60px",display:"flex",justifyContent:"flex-end"},children:(m.length>0||I.length>0)&&e.jsx(G,{size:"small",onClick:()=>{C([]),k([]),t({severity:[],id:[]})},startIcon:e.jsx(mt,{fontSize:"small"}),sx:{color:"text.secondary",textTransform:"none",minWidth:"auto","&:hover":{backgroundColor:"transparent"},"& .MuiButton-startIcon":{marginRight:"2px"}},children:x("notification.clear")})})]}),e.jsx(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2,flex:1},children:K.map(c=>e.jsx(Ie,{elevation:0,sx:$e(I.includes(c.value)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{display:"flex",alignItems:"center",gap:1,fontSize:"0.875rem"},...Oe},control:e.jsx(Re,{checked:I.includes(c.value),onChange:()=>te(c.value),disabled:i,size:"small"}),label:e.jsxs(h,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5},children:[e.jsx(ae,{severity:c.value}),c.label]})})},c.value))})}),e.jsxs(h,{sx:{mb:2},children:[e.jsxs(h,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,mb:1.5},children:[e.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold",width:"calc(100% - 36px)"},children:x("notification.from")}),e.jsx(h,{sx:{display:"flex",alignItems:"center",width:"calc(100% - 36px)"},children:e.jsx(Ue,{size:"small",placeholder:"search",value:M,onChange:fe,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(Fe,{position:"start",sx:{marginRight:"2px"},children:e.jsx(L,{icon:ir})})}}})})]}),e.jsx(Pe,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:2},children:xe.map(c=>e.jsx(Ie,{elevation:0,sx:$e(m.includes(c.id)),children:e.jsx(Te,{sx:{margin:0,padding:.5,width:"100%","& .MuiFormControlLabel-label":{fontSize:"0.875rem",width:"calc(100% - 36px)"},...Oe},control:e.jsx(Re,{checked:m.includes(c.id),onChange:()=>ee(c.id),disabled:i,size:"small"}),label:e.jsxs(h,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,minWidth:0,width:"100%"},children:[c.blocklet&&e.jsx(Le,{size:20,blocklet:c.blocklet,ancestors:c.ancestors,style:{borderRadius:4,flexShrink:0}}),e.jsx(E,{noWrap:!0,variant:"body2",component:"span",title:c.label,sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},children:c.label})]})})},c.id))}),B.length>Be&&M.trim()===""&&e.jsx(G,{fullWidth:!0,size:"small",onClick:he,sx:{mt:1},endIcon:b?e.jsx(bt,{}):e.jsx(yt,{})})]})]})})]})]}),m.length>0||I.length>0?e.jsxs(h,{className:"notification-filter-content",sx:{display:"flex",flexWrap:"wrap",gap:1,mt:2},children:[I.map(c=>{const w=K.find(S=>S.value===c);return e.jsx(Me,{label:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(ae,{severity:c}),w?w.label:c]}),onDelete:()=>te(c),size:"small",variant:"outlined",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`severity-${c}`)}),m.map(c=>{const w=q.find(S=>S.id===c);return e.jsx(Me,{label:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:.5},children:[w?.blocklet&&e.jsx(Le,{size:16,blocklet:w.blocklet,ancestors:w.ancestors,style:{borderRadius:4,flexShrink:0}}),w?w.label:c]}),variant:"outlined",onDelete:()=>ee(c),size:"small",sx:{borderRadius:2,color:"text.secondary",borderColor:"divider","& .MuiChip-label":{display:"flex",alignItems:"center"}}},`component-${c}`)})]}):null]})}const Nr=Z(jt)`
|
|
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 Ur(){const[t,i]=y.useState(!1);y.useEffect(()=>{const n=_e(()=>{i(window.pageYOffset>300)},200);return window.addEventListener("scroll",n),n(),()=>window.removeEventListener("scroll",n)},[]);const s=()=>{try{"scrollTo"in window?window.scrollTo({top:0,behavior:"smooth"}):window.scrollTo(0,0)}catch{window.scrollTo(0,0)}};return e.jsx(vt,{in:t,children:e.jsx(Nr,{color:"primary",size:"small","aria-label":"scroll back to top",onClick:s,children:e.jsx(wt,{})})})}const Fr=Z.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})=>oe(t.palette.primary.main,.1)};
|
|
36
|
+
border: 1px solid ${({theme:t})=>oe(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
|
+
`;et.propTypes={blocklets:p.array,context:p.object,pagination:p.bool,inDialog:p.bool,filterType:p.oneOf(["component","entity"]),toViewAll:p.func,type:p.oneOf(["server","service"])};function et({blocklets:t=[],context:i,pagination:s=!0,inDialog:n=!1,filterType:o="component",toViewAll:u=()=>{},type:a="service"}){const{data:d,paging:r,refresh:f,loading:g,params:x,onReadNotification:j,componentDids:v,filterUnReadCount:l,initial:m}=i,C=c=>{f({...x,severity:c&&typeof c=="string"?[c]:c||[],paging:{...x.paging,page:1}})},[I]=Mt(),k=T(()=>I.get("id"),[I]),b=ve(c=>c.breakpoints.down("md")),[R,M]=y.useState(0),[_,B]=y.useState(!1),N=y.useMemo(()=>x.read===!1?"unread":"all",[x.read]),U=T(()=>_e(c=>{if(g)return;const w=d.length,S=d.filter(O=>!We(O)).length;let z={...x,append:!0,paging:{...x.paging,...c,currentPage:(r.currentPage||0)+1}};N==="unread"&&S<w&&c.page>x.paging.page&&(z={...x,append:!0,paging:{...x.paging,...c,page:x.paging.page||1,currentPage:(r.currentPage||0)+1}}),f(z)},500),[d,x,N,r,g,f]);Gt(()=>{m&&typeof m=="function"&&m()}),y.useEffect(()=>{(!r.currentPage||r.currentPage===1)&&M(r.total)},[r.total,r.currentPage]),y.useEffect(()=>{setTimeout(()=>{const c=document.getElementById(k);c&&c.scrollIntoView({behavior:"smooth",block:"center"}),B(!0)},100),setTimeout(()=>{B(!1)},3e3)},[k]);const J=T(()=>d?.length>0&&d.length<R,[d,R]),K=y.useCallback(c=>{const{blocklet:w={}}=window,S=[w?.did,...(w?.ancestors||[]).map(z=>z)];return v?.includes(c)||S.findIndex(z=>z===c)>-1},[v]),X=y.useMemo(()=>{const c=new Map;return t.length&&t.forEach(w=>{const S=w?.did||w.meta?.did;S&&!c.has(S)&&(w.ancestors=[],c.set(S,w),w?.alsoKnownAs?.length>0&&w.alsoKnownAs.forEach(z=>{c.has(z)||c.set(z,w)})),w?.children?.length>0&&w.children.forEach(z=>{const O=z?.did||z.meta?.did;O&&!c.has(O)&&K(O)&&(z.ancestors=[w],c.set(O,z))})}),c},[t,K]),pe=y.useCallback(()=>{g||U({page:r.page+1})},[r.page,g,U]),[ee]=Dr({loading:g,hasNextPage:J,onLoadMore:pe}),te=c=>{!c||We(c)||j(c.id).then(()=>{n&&u()})},fe=({severity:c,id:w})=>{if(g)return;let S={};o==="component"?S={entityId:[],componentDid:w}:o==="entity"&&(S={componentDid:[],entityId:w}),f({...x,severity:c,...S,paging:{...x.paging,page:1}})},he=c=>{if(g)return;let w={...x,paging:{...x.paging,page:1}};c==="unread"?(w.read=!1,w.paging.currentPage=1):w=Et(w,"read"),f(w)},q=T(()=>o==="component"?Array.isArray(x.componentDid)?x.componentDid:[]:o==="entity"?Array.isArray(x.entityId)?x.entityId:[]:[],[x,o]),xe=T(()=>(Array.isArray(x.severity)?x.severity:[])[0]||"",[x.severity]);return e.jsxs(Fr,{inDialog:!!n,children:[n?e.jsx(Qe,{currentTab:xe,type:"line",theme:"light",onSelectType:C}):e.jsx(Xe,{loading:g,blockletMap:X,unReadCount:l,filterType:o,type:a,selectedId:q,onFilterChange:fe,severity:x.severity,onReadFilterChange:he,currentReadFilter:N}),!b&&g?e.jsx(h,{sx:{display:"flex",width:"100%",minHeight:400,justifyContent:"center",alignItems:"center"},children:e.jsx(Y,{})}):e.jsx(sr,{data:d,blockletMap:X,onReadNotification:te,onReadBatch:j,inDialog:n,highlightId:k,highlight:!n&&_,type:a}),s&&!b?e.jsx(Br,{loading:g,paging:r,onChange:U}):null,s&&b&&(g||J)?e.jsx(h,{ref:ee,sx:{display:"flex",width:"100%",minHeight:100,justifyContent:"center",alignItems:"center"},children:e.jsx(Y,{})}):null,!n&&b?e.jsx(Ur,{}):null]})}const _r=y.memo(et),F=new Ot;function ue(t){const{userDid:i=""}={},{session:s}=Dt(),n=T(()=>{if(i)return i;const r=window.location.href,f=zt(r);return f?.did?Array.isArray(f.did)?f.did[0]:f.did:s?.user?.did},[s?.user?.did,i]),o=T(()=>s.user,[s]),u=T(()=>o?n===o?.did:!1,[n,o?.did]),a=ce(async()=>{if(await Bt(()=>s?.initialized),u)return s.user;if(n)return F.user.getUserPublicInfo({did:n})},{refreshDeps:[n,u,s?.initialized,o]}),d=T(()=>o.passports?.some(r=>r.role===je.ROLES.OWNER),[o]);return{currentDid:n,session:s,isMyself:u,user:o,viewUser:a.data,isOwner:d}}function tt({user:t,...i}){const{t:s}=W(),n=Ct(),o=T(()=>{const d=(t?.passports||[]).map(r=>({...r,revoked:r.status===Yt.REVOKED}));return d.sort((r,f)=>r.revoked===f.revoked?0:r.revoked?1:-1),Ee(d.filter(r=>!r.display),"role").concat(Ee(d.filter(r=>r.display),"display.content"))},[t?.passports]),u=T(()=>o?.find(d=>d.name===t.role),[o,t?.role]),a=n.palette.primary.main;return o.length===0?e.jsx(h,{children:e.jsx(Ge,{children:s("userCenter.noPassport")})}):e.jsx(h,{...i,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,...i.sx},children:o.map(d=>e.jsx(lr,{passport:d,user:t,color:window.blocklet.passportColor,createPassportSvg:mr,title:u&&u.role===d.role?s("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:u&&u.role===d.role?`0px 2px 4px 0px ${a}, 0px 1px 2px -1px ${a}, 0px 0px 0px 1px ${a} !important`:"unset"},".passport-item__body":{marginLeft:"0 !important"}}},d.id))})}tt.propTypes={user:p.object.isRequired};function qr({visible:t,onClose:i,nft:s}){return!t||!s?null:e.jsx(Hr,{children:e.jsx(kt,{open:t,onClose:i,children:e.jsx(Gr,{onClick:i,children:e.jsx(Ve,{data:Ze(s),address:s.address,inset:!0})})})})}const Hr=Z.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
|
+
`,Gr=Z.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
|
+
`,Kr=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:oe(t.palette.background.paper,.9),color:"text.primary","&:hover":{backgroundColor:oe(t.palette.background.paper,1)}}}),Yr={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"}},Ne="https://main.abtnetwork.io/explorer";function rt({user:t}){const{t:i}=W(),s=de(),[n,o]=y.useState({visible:!1,nft:null}),[u,a]=y.useState({anchorEl:null,props:null}),d=k=>{const b=se(Ne,"assets",k);window.open(b,"_blank")},r=(k,b)=>{let R="";typeof b.data?.value=="string"?R=JSON.parse(b.data?.value)?.domain:R=b.data?.value?.domain,a({anchorEl:k,props:{title:R?`Hey, I just won an NFT at the ${R} event!`:"Hey, I just won an NFT!",url:se(Ne,"assets",b.address)}})},f=k=>{o({visible:!0,nft:k})},g=Q({page:1,size:20}),x=ce(async(k=g)=>(await Lt.get(`${je.WELLKNOWN_SERVICE_PATH_PREFIX}/ocap/listAssets`,{params:{ownerAddress:t.did,...k}})).data,{ready:t?.did&&g,defaultParams:[g],refreshDeps:[t?.did,g]}),{loading:j,data:v}=x,l=v?.page??{cursor:0,next:!1,total:0},m=(k,b)=>{g.page=b,x.run(g)},C=A(k=>[e.jsx(D,{size:"small",className:"mask-item",onClick:b=>{b.stopPropagation(),d(k.address)},children:e.jsx(L,{icon:"tabler:link",fontSize:18})},"link"),e.jsx(D,{size:"small",onClick:b=>{b.stopPropagation(),r(b.currentTarget,k)},className:"mask-item",children:e.jsx(L,{icon:"tabler:share-2",fontSize:18})},"share"),e.jsx(D,{size:"small",onClick:b=>{b.stopPropagation(),f(k)},className:"mask-item",children:e.jsx(L,{icon:"tabler:eye",fontSize:18})},"view")]),I=T(()=>{if(j){const k=["skeleton-1","skeleton-2","skeleton-3","skeleton-4","skeleton-5"].map(b=>e.jsx(Ae,{variant:"rectangular",width:"15%",height:166,sx:{borderRadius:1,flexShrink:0}},b));return e.jsxs(h,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsx(Ae,{width:"20%"}),e.jsx(h,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"nowrap"},children:k})]})}return e.jsxs(e.Fragment,{children:[e.jsx(E,{sx:{color:"grey.A700",fontWeight:600,mb:2.5},children:i("userCenter.common.nft")}),v?.assets?.length===0&&!j&&e.jsx(h,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},children:e.jsx(Ge,{children:i("userCenter.common.noNFT")})}),e.jsx(h,{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(k=>e.jsxs(h,{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",...s?{}:{"&:hover .mask":{opacity:1}}},children:[e.jsx(Ve,{data:Ze(k),address:k.address,inset:!0,imageFilter:{imageFilter:"resize",w:"500",f:"webp"}}),s?e.jsx(h,{className:"footer-mask",sx:Yr,children:C(k)}):e.jsx(h,{className:"mask",sx:Kr,children:e.jsx(we,{direction:"row",spacing:1,children:C(k)})})]},k.address))}),l.next||g.page>1?e.jsx(St,{sx:{display:"flex",justifyContent:"center",mt:2},page:g.page,onChange:m,count:Math.ceil(l.total/g.size),size:"small"}):null,e.jsx(qr,{visible:n.visible&&!!n.nft,nft:n.nft,onClose:()=>{o({visible:!1,nft:null})}}),e.jsx(Vt,{anchorEl:u.anchorEl,onClose:()=>{a({anchorEl:null,props:null})},sharedProps:u.props||{title:"",url:""}})]})},[j,l,g.page,g.size,m,u,n]);return e.jsx(h,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1,p:2,mb:5},children:I})}rt.propTypes={user:p.object.isRequired};function Vr(){const{t}=W(),{user:i,isMyself:s,viewUser:n}=ue();return e.jsxs(h,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[s?e.jsxs(h,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,p:2},children:[e.jsx(E,{sx:{color:"text.primary",fontWeight:600,mb:2.5},children:t("userCenter.passport")}),e.jsx(tt,{user:i})]}):null,e.jsx(rt,{user:s?i:n})]})}const Zr=[{name:"English",code:"en"},{name:"中文",code:"zh"}];function nt({user:t,onSave:i}){const{t:s,changeLocale:n}=W(),o=Q({locale:t.locale,loading:!1}),u=A(async a=>{try{const{value:d}=a.target;o.loading=!0,await F.user.saveProfile({locale:d}),await i("profile"),n(d),o.locale=d}catch(d){$.error(V(d))}finally{o.loading=!1}});return e.jsxs(h,{sx:{gap:1,display:"grid",alignItems:"center",gridTemplateColumns:{xs:"1fr",sm:"max-content 1fr"}},children:[e.jsx(h,{children:s("userCenter.commonSetting.locale")}),e.jsx(h,{children:e.jsx(ye,{value:o.locale,onChange:u,size:"small",IconComponent:a=>e.jsx(He,{...a,width:20,height:20}),sx:{minWidth:200,"&:hover":{"fieldset.MuiOutlinedInput-notchedOutline":{borderColor:"divider"}},fieldset:{borderColor:"divider"}},children:(window.blocklet.languages||Zr).map(a=>e.jsx(ne,{value:a.code,children:a.name},a.code))})})]})}nt.propTypes={user:p.shape({locale:p.string}).isRequired,onSave:p.func.isRequired};function be({onTest:t=H,onDelete:i=H,onSave:s=H,onCancel:n=H,type:o="slack",url:u="",edit:a=!1}){const{t:d}=W(),r=Q({type:o||"slack",url:u||"",edit:a??!1,error:"",loading:!1}),f=A(()=>r.url?$t(r.url)?(r.error="",!0):(r.error=d("common.invalid"),!1):(r.error=d("common.required"),!1)),g=A(()=>{r.edit=!1,r.url=u||"",r.type=o||"slack",r.error="",r.loading=!1,n()}),x=A(async l=>{r.loading=!0,await t(l),r.loading=!1}),j=A(l=>()=>{f()&&l({type:r.type,url:r.url})}),v=T(()=>r.error?e.jsx(E,{component:"span",color:"error",children:r.error}):r.edit?r.loading?e.jsx(Y,{size:16}):e.jsx(D,{size:"small",onClick:j(x),sx:{mr:-1},children:e.jsx(L,{icon:cr})}):null,[r.error,r.edit,r.loading]);return e.jsxs(h,{sx:{display:"flex",gap:1.5,width:"100%",alignItems:{xs:"flex-start",md:"center"},flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(ye,{sx:{borderRadius:1,"&.Mui-disabled":{backgroundColor:"grey.50"}},disabled:!r.edit||r.loading,size:"small",value:r.type,onChange:l=>{r.type=l.target.value},children:[e.jsx(ne,{value:"api",children:d("userCenter.webhook.url")}),e.jsx(ne,{value:"slack",children:d("userCenter.webhook.slack")})]}),e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"},children:[e.jsx(Ue,{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:l=>{r.url=l.target.value,f()},error:!!r.error,slotProps:{input:{endAdornment:e.jsx(Fe,{position:"end",children:v})}}}),e.jsx(h,{sx:{display:"flex",gap:.5},children:r.edit?e.jsxs(e.Fragment,{children:[e.jsx(D,{color:"success",onClick:j((...l)=>{s(...l),r.edit=!1}),sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(L,{icon:Zt})}),e.jsx(D,{color:"error",onClick:g,sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(L,{icon:Qt})})]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{onClick:()=>{r.edit=!0},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(L,{icon:dr})}),e.jsx(D,{color:"error",onClick:()=>{i({type:r.type,url:r.url})},sx:{borderRadius:1,border:"1px solid",borderColor:"grey.200"},children:e.jsx(L,{icon:ur})})]})})]})]})}be.propTypes={onTest:p.func,onDelete:p.func,onSave:p.func,onCancel:p.func,type:p.oneOf(["api","slack"]),url:p.string,edit:p.bool};function re({title:t=void 0,description:i=void 0,value:s,onChange:n,isMobile:o}){const u=A(a=>{a.stopPropagation()});return e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(me,{checked:s,size:"small",onChange:n}),e.jsxs(E,{component:"div",onClick:u,sx:{color:"text.primary",fontSize:14,display:"flex",flexWrap:o?"wrap":"nowrap",columnGap:1,flex:1,whiteSpace:o?"normal":"nowrap"},children:[t,i]})]})}re.propTypes={title:p.string,description:p.node,value:p.bool.isRequired,onChange:p.func.isRequired,isMobile:p.bool.isRequired};function ot({user:t,isMobile:i}){const{t:s}=W(),n=Q({showAdd:!1}),o=ce(async()=>await F.user.getUserNotificationConfig(),{refreshDeps:[t],loadingDelay:300}),u=T(()=>({wallet:!0,email:!0,phone:!1,push:!0,...o?.data?.notifications||{}}),[o?.data?.notifications]),a=T(()=>o?.data?.webhooks||[],[o?.data?.webhooks]),d=A(async v=>{try{await F.user.saveUserNotificationConfig(v),$.success(s("userCenter.saveSuccess")),o.run()}catch(l){$.error(V(l))}}),r=A(async(v,l)=>{await d({notifications:{[v]:l}})}),f=async v=>{try{await F.user.testNotificationWebhook(v),$.success(s("userCenter.webhookTested"))}catch(l){$.error(V(l))}},g=A(async v=>{await d({webhooks:a.filter((l,m)=>m!==v)})}),x=A(async(v,l)=>{await d({webhooks:a.map((m,C)=>C===v?l:m)})}),j=A(async v=>{await d({webhooks:[...a,v]}),n.showAdd=!1});return o.error?e.jsx(Pt,{severity:"error",children:o.error.message}):o.loading||!o.data?e.jsx(h,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px"},children:e.jsx(Y,{})}):e.jsxs(h,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(h,{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(re,{value:u.wallet,isMobile:i,title:s("userCenter.walletNotification"),onChange:v=>r("wallet",v.target.checked),description:ze(t)&&e.jsx(Jt,{did:ze(t),showQrcode:!1,showAvatar:!i,copyable:!0,compact:!0,responsive:!0,startChars:i?2:6})}),e.jsx(re,{value:u.email,isMobile:i,onChange:v=>r("email",v.target.checked),title:s("userCenter.emailNotification"),description:t?.email&&e.jsx(E,{component:"span",sx:{color:"text.secondary",fontSize:13},children:t?.email})}),e.jsx(re,{isMobile:i,value:u.push,title:s("userCenter.pushNotification"),onChange:v=>r("push",v.target.checked)})]}),e.jsxs(we,{spacing:1.5,useFlexGap:!0,direction:"column",sx:{alignItems:"start"},children:[a.map((v,l)=>e.jsx(be,{onTest:f,onDelete:()=>g(l),onSave:(...m)=>x(l,...m),type:v.type,url:v.url,edit:!1},`${l}_${v.url}`)),n.showAdd&&e.jsx(be,{onTest:f,onCancel:()=>{n.showAdd=!1},onSave:(...v)=>j(...v),edit:!0},"add"),e.jsx(Ke,{variant:"outlined",size:"small",sx:{color:"text.primary",borderColor:"divider","&:hover":{borderColor:"divider"},py:.5,borderRadius:1},startIcon:e.jsx(L,{icon:pr}),onClick:()=>{n.showAdd=!0},children:s("userCenter.addWebhook")})]})]})}ot.propTypes={user:p.object.isRequired,isMobile:p.bool.isRequired};function st({item:t}){const i=ke(),{blocklet:s}=Nt(),{confirmApi:n,confirmHolder:o}=qe(),u=Q({loading:!1}),{t:a}=W(),{session:d}=y.use(le),{bindOAuth:r,unbindOAuth:f,setBaseUrl:g,baseUrl:x}=d.useOAuth(),{disconnectPasskey:j,setTargetAppPid:v}=d.usePasskey(),l=T(()=>Xt[t?.provider]||"unknown",[t?.provider]),m=A(b=>b?._bind?b.provider===P.WALLET&&b.did?a("userCenter.thirdPartyLogin.walletAccountCantRemove"):b.provider===P.PASSKEY&&i.arcSphere?a("userCenter.thirdPartyLogin.dontSupportRemoveinArcSphere"):b._mainProvider&&i.arcSphere?a("userCenter.thirdPartyLogin.mainProviderCantRemove"):"":""),C=A(async()=>{if(t?.provider===P.PASSKEY){await new Promise((b,R)=>{n.open({title:a("userCenter.thirdPartyLogin.disconnectPasskey",{name:l}),content:a("userCenter.thirdPartyLogin.disconnectPasskeyDescription",{name:l}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:a("common.cancel"),onConfirm(M){j({session:d,connectedAccount:t}).then(b).catch(R),M()},onCancel:b})});return}try{u.loading=!0,await new Promise((b,R)=>{if(t?._bind)n.open({title:a("userCenter.thirdPartyLogin.confirmUnbind",{name:l}),content:a("userCenter.thirdPartyLogin.confirmUnbindDescription",{name:l}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"error"},cancelButtonText:a("common.cancel"),onConfirm(M){f({session:d,connectedAccount:{...Wt(t,["did","pk"]),showProvider:t.provider,provider:t._rawProvider}}).then(b).catch(R),M()},onCancel:b});else if(t.provider===P.WALLET)n.open({title:a("userCenter.thirdPartyLogin.confirmBindWallet",{name:l}),content:a("userCenter.thirdPartyLogin.confirmBindWalletDescription",{name:l}),confirmButtonText:a("common.confirm"),confirmButtonProps:{color:"primary"},cancelButtonText:a("common.cancel"),onConfirm:M=>{d.bindWallet({onSuccess:b,onCancel:R}),M()},onCancel:b});else{const M=x,_=window?.blocklet;let B="/";const N=er(_),U=tr(_);N&&U?.appPid&&d?.user?.sourceAppPid&&(B=U.appUrl),g(B),v(s?.appPid),r({session:d,oauthItem:{...t,provider:t._rawProvider}}).then(b).catch(R).finally(()=>{g(M),v()})}})}catch(b){console.error(`Failed to ${t?._bind?"unbind":"bind"} oauth account`,b)}finally{u.loading=!1}}),I=A(b=>b.provider===P.WALLET&&b.did?a("userCenter.thirdPartyLogin.walletAccount"):b._mainProvider?a("userCenter.thirdPartyLogin.mainAccount"):b?._bind?a("userCenter.thirdPartyLogin.disconnect"):a("userCenter.thirdPartyLogin.connect")),k=A(b=>b.provider===P.WALLET&&b.did||b.provider===P.PASSKEY&&(i.arcSphere||i.wallet)?!0:!!t._mainProvider,[i.arcSphere]);return e.jsxs(e.Fragment,{children:[e.jsxs(h,{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(Ut,{provider:t?.provider,sx:{width:"1em",height:"1em",flexShrink:0,fontSize:16}}),e.jsx(h,{sx:{flex:1,display:{xs:t.userInfo?.email||t.did?"none":"block",sm:"block"}},children:l}),t.userInfo?.email||t.did?e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:.5,overflow:"hidden"},children:[e.jsx(h,{sx:{flex:1,textOverflow:"ellipsis",overflow:"hidden",lineHeight:"normal"},children:t.userInfo?.email||t.did}),t.userInfo?.name?e.jsx(De,{title:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(rr,{size:36,variant:"circle",shape:"circle",src:t.userInfo?.picture,did:t.did}),e.jsxs(h,{children:[e.jsx(E,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:t.userInfo?.name}),e.jsx(E,{sx:{whiteSpace:"normal",wordBreak:"break-all",fontSize:"0.9rem"},children:t.userInfo?.email})]})]}),children:e.jsx(h,{component:L,icon:Ft,sx:{color:"text.secondary",fontSize:16,cursor:"pointer",flexShrink:0}})}):null]}):null]}),e.jsx(De,{title:m(t),placement:"auto",children:e.jsx(h,{children:e.jsx(Ke,{variant:"outlined",size:"small",sx:b=>{const R=b.palette.error.main,M=b.palette.primary.main;return{color:t?._bind?R:M,borderColor:t?._bind?R:M,backgroundColor:"background.default","&:hover":{borderColor:t?._bind?R:M,backgroundColor:"action.hover"},py:.5,borderRadius:1,fontWeight:500,whiteSpace:"nowrap"}},fullWidth:!0,startIcon:u.loading?null:e.jsx(L,{icon:fr}),onClick:C,disabled:k(t),loading:u.loading,children:I(t)})})}),o]})}st.propTypes={item:p.shape({provider:p.string,did:p.string,pk:p.string,userInfo:p.object,id:p.string,_bind:p.bool,_rawProvider:p.string,_mainProvider:p.bool}).isRequired};function it({user:t}){const{session:i}=y.use(le),[s,n]=y.useState({}),{getOAuthConfigs:o}=i.useOAuth(),u=ke();Kt(async()=>{const r=await o({sourceAppPid:t?.sourceAppPid});n(r)},[t?.sourceAppPid]);const a=T(()=>{const r=Object.keys(s).map(f=>({...s[f],provider:f})).filter(f=>f.enabled);return[{provider:P.WALLET,order:-1},...r,{provider:P.PASSKEY,order:1/0}]},[s]),d=T(()=>{const r=nr(t);let f=!1,g="",x=or(t);const j=r.find(l=>l.provider===P.AUTH0);return j&&(j.id.startsWith("google-oauth2|")&&(r.some(l=>l.provider==="google")||(f=!0,g=P.GOOGLE,x===P.AUTH0&&(x=P.GOOGLE))),j.id.startsWith("appleid|")&&(r.some(l=>l.provider===P.APPLE)||(f=!0,g=P.APPLE,x===P.AUTH0&&(x=P.APPLE))),j.id.startsWith("github|")&&(r.some(l=>l.provider===P.GITHUB)||(f=!0,g=P.GITHUB,x===P.AUTH0&&(x=P.GITHUB)))),a.map(l=>{if(l.provider===P.AUTH0&&f)return null;const m=f&&l.provider===g?r.find(C=>C.provider===P.AUTH0):r.find(C=>C.provider===l.provider);return m?{...l,provider:l.provider,did:m.did,pk:m.pk,userInfo:m.userInfo,_bind:!0,_rawProvider:m.provider,_mainProvider:l.provider===x}:{...l,provider:l.provider,_rawProvider:l.provider,_mainProvider:l.provider===x}}).filter(l=>!(!l||l.provider===P.PASSKEY&&!l.did)).sort((l,m)=>l._mainProvider?-1:l?.order!==void 0&&m?.order!==void 0?l.order-m.order:l?.order!==void 0?-1:1)},[t?.connectedAccounts,a]);return e.jsxs(h,{sx:{gap:1,display:"grid",gridTemplateColumns:"1fr min-content"},children:[d.map(r=>e.jsx(st,{item:r},r?.provider)),u.wallet||u.arcSphere?null:e.jsx(_t,{behavior:"only-new",action:"connect",createMode:"connect",createButtonText:"Add New Passkey",onSuccess:H,onError:H,dense:!0,sx:{px:1.5,py:1,gap:.75}})]})}it.propTypes={user:p.object.isRequired};function at({configList:t,onSave:i}){const[s,n]=y.useState(t),{t:o}=W(),u=A(async(a,d)=>{try{const r=await F.user.saveUserPrivacyConfig({[a]:typeof d=="string"?d:!d});n(s.map(f=>({...f,value:r?.[f.key]??f.value}))),$.success(o("userCenter.saveSuccess")),i("privacy")}catch(r){$.error(V(r))}});return y.useEffect(()=>{n(t)},[t]),e.jsx(h,{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:s.map(a=>{if(a.isPrivate)return null;const d=!a.value||["all","follower-only"].includes(a.value);return e.jsxs(h,{children:[e.jsx(me,{checked:d,labelProps:{label:e.jsx(E,{sx:{color:"text.primary",fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:o("userCenter.toPublic",{name:a.name})})},size:"small",onChange:r=>{const{checked:f}=r.target;a.followersOnly?u(a.key,f?"all":"private"):u(a.key,f)}},a.key),a.followersOnly&&d&&e.jsx(h,{sx:{pl:3,pt:1},children:e.jsx(me,{checked:a.value==="follower-only",labelProps:{label:e.jsx(E,{sx:{color:"text.primary",fontSize:14,display:"flex",flexFlow:"wrap",columnGap:1,flex:1},children:o("team.userFollowers.followersOnly")})},size:"small",onChange:r=>{const{checked:f}=r.target;u(a.key,f?"follower-only":"all")}})})]})})})}at.propTypes={configList:p.arrayOf(p.shape({key:p.string.isRequired,name:p.string.isRequired,value:p.bool.isRequired,isPrivate:p.bool})).isRequired,onSave:p.func.isRequired};function lt({onDestroySelf:t=void 0}){const{confirmHolder:i}=qe(),{t:s}=W(),{session:n}=y.use(le),o=A(async()=>{if(!t||typeof t!="function")return;const u=n.withSecondaryAuth(t,{extraParams:{removeUserDid:n?.user?.did,input:{user:{did:n?.user?.did},teamDid:window?.blocklet?.did}},operation:"destroySelf"});try{await u(),n.logout()}catch(a){$.error(a?.message||s("userCenter.destroyMyself.error"))}});return e.jsxs(e.Fragment,{children:[e.jsx(h,{children:e.jsxs(h,{sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"space-between",flexWrap:"wrap"},children:[e.jsxs(h,{children:[e.jsx(E,{variant:"h6",sx:{fontSize:"0.875rem !important",fontWeight:"bold"},children:s("userCenter.dangerZone.deleteAccount")}),e.jsx(E,{variant:"caption",sx:{color:"text.secondary"},children:s("userCenter.dangerZone.deleteAccountDescription")})]}),e.jsx(G,{variant:"contained",color:"error",size:"small",onClick:o,children:s("userCenter.dangerZone.delete")})]})}),i]})}lt.propTypes={onDestroySelf:p.func};function Qr(){const t=de({key:"md"}),i=ve(o=>o.breakpoints.down("lg")),s={display:"flex",justifyContent:"flex-end",flexWrap:"wrap",textAlign:"right","&.expired-at > div":{maxWidth:160,justifyContent:"flex-end",flexWrap:"wrap"}},n=T(()=>Ye({},t?s:{}),[t]);return e.jsx(h,{id:"user-center-access-key-setting",sx:{maxWidth:t?"unset":i?"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:o=>`${o.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(wr,{isSelf:!0,columnSx:n})})}function ct({onDestroySelf:t=void 0,userCenterTabs:i=[]}){const{t:s}=W(),{user:n,session:o,isMyself:u,isOwner:a}=ue(),r=ke().arcSphere,f=de({key:"md"}),g=ce(async()=>n&&u?await F.user.getUserPrivacyConfig({did:n.did}):null,{refreshDeps:[n,u],loadingDelay:300}),x=T(()=>i.map(l=>({key:l.value,name:l.label,value:l.protected,isPrivate:l.isPrivate,followersOnly:l.followersOnly})),[i]),j=A(async l=>l==="privacy"?(await g.runAsync(),g.data):(l==="profile"&&await o.refresh(),null));y.useEffect(()=>{const l=window.location.hash.slice(1);l&&document.getElementById(l)?.scrollIntoView({behavior:"smooth"})},[]);const v=T(()=>[r?void 0:{label:s("userCenter.commonSetting.title"),value:"common",content:e.jsx(nt,{user:n,onSave:j})},{label:s("userCenter.notificationManagement"),value:"notification",content:e.jsx(ot,{user:n,isMobile:f})},{label:s("userCenter.thirdPartyLogin.title"),value:"thirdPartyLogin",content:e.jsx(it,{user:n})},{label:s("common.accessKeys"),value:"accessKeys",content:e.jsx(Qr,{isSelf:!0})},{label:s("common.mcpServers"),value:"mcpServers",content:e.jsx(br,{})},{label:s("userCenter.privacyManagement"),value:"privacy",content:e.jsx(at,{configList:x,onSave:j})},{label:s("userCenter.sessionManagement"),value:"session",content:e.jsx(yr,{user:n,showUser:!1,getUserSessions:l=>F.userSession.getMyLoginSessions({},l)})},!a&&t&&typeof t=="function"?{label:s("userCenter.dangerZone.title"),value:"dangerZone",content:e.jsx(lt,{onDestroySelf:t}),sx:{borderColor:"error.main"}}:null].filter(Boolean),[n,x,f,a,t]);return u?e.jsx(h,{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(l=>l?e.jsxs(h,{id:l.value,sx:Ye({border:"1px solid",borderColor:"divider",borderRadius:1,p:2,"&:last-child":{mb:5}},l.sx),children:[e.jsx(E,{sx:{color:"text.primary",fontWeight:600},children:l.label}),e.jsx(h,{sx:{mt:2.5},children:l.content})]},l.value):null)}):null}ct.propTypes={onDestroySelf:p.func,userCenterTabs:p.array};const dt=y.createContext({}),{Provider:Jr,Consumer:ho}=dt;function ut({children:t}){const[i]=y.useState(!1),{session:s}=y.use(le),{user:n}=s,[o,u]=y.useState(),a=y.useMemo(()=>n?.didSpace?.endpoint,[n?.didSpace]);y.useEffect(()=>{u(n?.didSpace)},[n?.didSpace]);const d=async()=>{u(void 0)},r=x=>{},f=async x=>{u(x),await r(x.endpoint)},g=!!(a&&o);return e.jsx(Jr,{value:{loading:i,spaceGateway:o,session:s,deleteSpaceGateway:d,updateSpaceGateway:f,storageEndpoint:a,settingStorageEndpoint:r,hasStorageEndpoint:g},children:t})}function Se(){return y.use(dt)}ut.propTypes={children:p.node.isRequired};function Xr(t){const i=t.replace(/\/api\/space\/.+/,""),n=t.replace(/\/$/,"").split("/").at(-4);return se(i,"space",n)}function pt({session:t,spaceGateway:i,spaceStatus:s,refresh:n}){return e.jsxs(we,{direction:"row",spacing:1,children:[s===Cr.DISCONNECTED&&e.jsx(ie,{reconnect:!0,variant:"outlined",session:t,spaceDid:t.user?.didSpace?.did,spaceGatewayUrl:t.user?.didSpace?.url,connectScope:"user",onSuccess:async()=>{await n()},onError:o=>{console.error(o),$.error(V(o))}}),e.jsx(D,{size:"small",LinkComponent:It,href:Xr(i.endpoint),target:"_blank",children:e.jsx(Tt,{})})]})}pt.propTypes={session:p.object.isRequired,spaceGateway:p.object.isRequired,spaceStatus:p.string.isRequired,refresh:p.func.isRequired};function ft({spaceGateway:t=void 0}){const{t:i}=W(),{updateSpaceGateway:s,session:n}=Se(),o=de(),u=({spaceGateway:a})=>s(a);return e.jsxs(h,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(h,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[e.jsx(E,{sx:{fontSize:"16px",fontWeight:"bold"},children:i("userCenter.storage.spaces.connected.title")}),!o&&e.jsx(ie,{connectScope:"user",connectText:i("userCenter.storage.spaces.connected.switch"),session:n,onSuccess:u})]}),e.jsx(h,{children:t&&e.jsx(kr,{endpoint:t.endpoint,deps:[t],selected:!0,footer:!0,action:a=>e.jsx(pt,{session:n,...a})},t.endpoint)}),o&&e.jsx(h,{sx:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:2},children:e.jsx(ie,{connectScope:"user",connectText:i("userCenter.storage.spaces.connected.switch"),session:n,onSuccess:u})})]})}ft.propTypes={spaceGateway:p.object};function en(){const{t}=W(),{updateSpaceGateway:i,session:s}=Se(),n=({spaceGateway:o})=>i(o);return e.jsxs(h,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(E,{sx:{fontSize:"16px",fontWeight:"bold"},children:t("userCenter.storage.spaces.connect.providerForStorage")}),e.jsx(Sr,{viewBox:"0 0 228 258",style:{width:"156px",height:"156px",margin:"16px 0"}}),e.jsx(h,{children:e.jsx(ie,{session:s,onSuccess:n})})]})}function tn(){const{spaceGateway:t,hasStorageEndpoint:i,loading:s}=Se(),{isMyself:n}=ue();return n?s?e.jsx(jr,{relative:"parent",children:e.jsx(Y,{})}):e.jsx(nn,{children:e.jsx(h,{sx:{maxWidth:"720px"},children:i?e.jsx(ft,{spaceGateway:t}):e.jsx(en,{})})}):null}function rn(){return e.jsx(ut,{children:e.jsx(tn,{})})}const nn=Z(h)`
|
|
122
|
+
height: 100%;
|
|
123
|
+
overflow-y: auto;
|
|
124
|
+
`;function on(){const{user:t,isMyself:i,viewUser:s}=ue(),{followed:n}=hr();return e.jsx(h,{children:e.jsx(vr,{teamDid:window?.blocklet?.did||"",user:i?t:s,showInvitees:i,followed:n})})}function sn({tab:t=""}){const{api:i}=qt(),s=y.useRef(null),n=At(),o=t||n.tab,a=new URLSearchParams(window.location.search).get("embed")||window.sessionStorage?.getItem("embed"),d=Ht(),r=T(()=>({...window.blocklet,meta:{did:window.blocklet.did,name:window.blocklet.did},children:window?.blocklet?.componentMountPoints.map(g=>({...g,meta:{...g,did:g.did,name:g.name||g.title||"",logo:"logo.png"}}))})),f=async g=>{const{input:x,sessionId:j}=g;try{await i.destroySelf({input:{...x,sessionId:j}})}catch(v){console.error("destroy myself error",v)}};return e.jsx(ar,{mode:"user-center",children:e.jsxs(xr,{ref:s,embed:a==="1",currentTab:o?se(je.WELLKNOWN_SERVICE_PATH_PREFIX,"user",o):"",disableAutoRedirect:o==="settings",children:[o==="notifications"?e.jsx(_r,{blocklets:[r],context:d}):null,o==="nfts"?e.jsx(Vr,{}):null,o==="settings"?e.jsx(ct,{onDestroySelf:f}):null,o==="did-spaces"?e.jsx(rn,{}):null,o==="user-followers"?e.jsx(on,{}):null,o==="orgs"?e.jsx(gr,{id:n.id||""}):null]})})}sn.propTypes={tab:p.string};export{sn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a,D as M,T as _,ce as
|
|
1
|
+
import{j as a,D as M,T as _,ce as T,Q as W,cf as X,aV as q,ak as h,cg as Y,aU as Z,av as B,f as C,b$ as J,ch as K}from"./vendor-mui-core-BPcN1m8_.js";import{r as d,k as L,L as z,n as ee,o as ae}from"./vendor-react-Dvs43sk9.js";import{H as E,aX as te}from"./index-BnPTSmJZ.js";import{e as ie}from"./vendor-hooks-tpeT8a0P.js";import{M as re,l as m,a7 as A,a8 as S}from"./vendor-ux-D_B1Y7iC.js";import{z as oe}from"./vendor-arcblock-BzYItNIN.js";const H=d.createContext(null),se=e=>{const i=d.use(H);return d.useLayoutEffect(()=>{},[]),i};function le({children:e=void 0,...i}){const[t,r]=d.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),s=()=>{r(o=>({...o,inFullPage:!o.inFullPage}))},l=d.useMemo(()=>({...t,headerVisible:!t.inFullPage||t.headerVisibleInFullPage,footerVisible:!t.inFullPage||t.footerVisibleInFullPage,sidebarVisible:!t.inFullPage||t.sidebarVisibleInFullPage,toggleFullPage:s,configure:o=>r(n=>({...n,...o}))}),[t]);return a.jsx(H,{value:l,...i,children:e})}function ne({name:e,size:i=36,alt:t="",color:r="#000000",prefix:s="/images",showBadge:l=!1,style:o={},...n}){const c=`${s}/${e}-${r.replace(/^#/,"")}.png`;return a.jsxs(de,{style:{width:i,height:i},children:[a.jsx(re,{width:i,height:i,alt:t||e,src:c,style:Object.assign({width:i},o),...n}),l&&a.jsx("i",{className:"badge-point"})]})}const de=m("div")`
|
|
2
2
|
position: relative;
|
|
3
3
|
.badge-point {
|
|
4
4
|
position: absolute;
|
|
@@ -12,7 +12,7 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
12
12
|
0px 1px 4px rgba(0, 0, 0, 0.3),
|
|
13
13
|
0px 0px 20px rgba(0, 0, 0, 0.1);
|
|
14
14
|
}
|
|
15
|
-
`;function ce({images:e,links:i,prefix:t="/images",addons:r=void 0,logo:s=void 0,...l}){const o=M(),n=
|
|
15
|
+
`;function ce({images:e,links:i,prefix:t="/images",addons:r=void 0,logo:s=void 0,...l}){const o=M(),n=L(),c=(x,p)=>new RegExp(`/${p}`).test(n.pathname);return a.jsxs(he,{...l,children:[a.jsx(z,{to:"/",className:"sidebar-logo",children:s||a.jsx(A,{showText:!1,size:20})}),i.map(({url:x,name:p,title:b,showBadge:g})=>{const f=c(x,p);return a.jsxs(pe,{component:z,selected:f,to:x,children:[a.jsx(ne,{name:e[p],size:36,color:f?"#00c2c4":o.typography.color.main,prefix:t,showBadge:g}),a.jsx(_,{component:"span",className:"menu-title",children:b})]},x)}),a.jsx("div",{style:{flex:1}}),r]})}const he=d.memo(m("div")`
|
|
16
16
|
flex: 1;
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: column;
|
|
@@ -33,7 +33,7 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
33
33
|
display: block;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`),
|
|
36
|
+
`),V="linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))",pe=m(W)`
|
|
37
37
|
&& {
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-direction: column;
|
|
@@ -41,14 +41,14 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
41
41
|
align-items: center;
|
|
42
42
|
width: 100%;
|
|
43
43
|
transition: all 200ms ease-in-out;
|
|
44
|
-
background: ${e=>e.selected?
|
|
44
|
+
background: ${e=>e.selected?V:""};
|
|
45
45
|
padding: 24px 0;
|
|
46
|
-
border-left: 2px solid ${e=>e.selected?
|
|
46
|
+
border-left: 2px solid ${e=>e.selected?T.A700:"transparent"};
|
|
47
47
|
border-radius: 0;
|
|
48
48
|
|
|
49
49
|
&:hover {
|
|
50
|
-
background: ${
|
|
51
|
-
border-left-color: ${
|
|
50
|
+
background: ${V};
|
|
51
|
+
border-left-color: ${T.A700};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.menu-title {
|
|
@@ -132,7 +132,7 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
132
132
|
display: block;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
`;function ue({onToggleMenu:e,brand:i=void 0,description:t=void 0,addons:r=void 0,brandAddon:s=void 0,homeUrl:l="/",logo:o=void 0,children:n,...c}){return a.jsx(xe,{position:"sticky",className:"header",...c,children:a.jsxs(
|
|
135
|
+
`;function ue({onToggleMenu:e,brand:i=void 0,description:t=void 0,addons:r=void 0,brandAddon:s=void 0,homeUrl:l="/",logo:o=void 0,children:n,...c}){return a.jsx(xe,{position:"sticky",className:"header",...c,children:a.jsxs(X,{disableGutters:!1,className:"header-toolbar",children:[a.jsx(W,{color:"inherit","aria-label":"open drawer",className:"header-menu","aira-label":"header menu button",onClick:e,children:a.jsx(q,{})}),a.jsxs(z,{to:l,className:"header-link",children:[a.jsx(h,{sx:{display:{xs:"none",md:"block"}},className:"header-logo",children:o||a.jsx(A,{showText:!1})}),a.jsxs("div",{className:"header-title",children:[a.jsxs(_,{component:"h2",noWrap:!0,className:"header-title__primary",children:[i,s]}),a.jsx(_,{component:"p",noWrap:!0,className:"header-title__secondary",children:t})]})]}),a.jsx(h,{sx:{flexGrow:1}}),!!n&&a.jsx("div",{className:"header-children",children:n}),a.jsx("div",{className:"header-addons",children:r})]})})}const me=m("div")`
|
|
136
136
|
&.dashboard {
|
|
137
137
|
display: flex;
|
|
138
138
|
flex-direction: column;
|
|
@@ -160,7 +160,7 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
160
160
|
box-shadow: 2px 16px 10px 0 rgba(0, 0, 0, ${e=>e.theme.palette.mode==="light"?.05:.5});
|
|
161
161
|
border: 0;
|
|
162
162
|
}
|
|
163
|
-
`;function be({links:e=[],brand:i="",description:t="",images:r,title:s="Home",brandAddon:l=void 0,headerAddon:o=void 0,prefix:n="/images",fullWidth:c=!1,contentLayout:x="column",className:p="",homeUrl:b="/",logo:g=void 0,children:f,...P}){const w=ie(document.body)?.width||0,[v,F]=d.useState(w>=960?"permanent":"temporary"),[k,y]=d.useState(v==="permanent");d.useEffect(()=>{const N=w>=960?"permanent":"temporary";F(N),y(N!=="temporary")},[w]);const $=()=>{y(!k)},j=c||x==="row";return a.jsxs(me,{className:`dashboard ${p}`,...P,children:[a.jsx(E,{title:`${s}-${i}`}),a.jsx(ue,{className:"dashboard__header",onToggleMenu:$,brand:i,brandAddon:l,description:t,addons:o,homeUrl:b,logo:g}),a.jsxs(h,{className:"dashboard__body",sx:{display:"flex"},children:[a.jsx(Z,{variant:v,className:"drawer",classes:{paper:"drawerPaper"},open:k,onClose:$,ModalProps:{disablePortal:!0,keepMounted:!0},children:a.jsx(ce,{className:"dashboard__sidebar",images:r,links:e,prefix:n,logo:g})}),a.jsxs(h,{className:"dashboard__main",children:[a.jsx(B,{maxWidth:j?!1:"lg",className:"dashboard__content",children:f}),a.jsx(S,{})]})]})]})}function R({routerLinkComponent:e,to:i,external:t=!1,children:r,...s}){return t?a.jsx("a",{href:i,...s,children:r}):a.jsx(e,{to:i,...s,children:r})}function U({...e}){return a.jsx(R,{routerLinkComponent:z,...e})}function ge({className:e="",...i}){const t=i.external&&typeof e=="function"?e({}):e;return a.jsx(R,{routerLinkComponent:ee,className:t,...i})}function D(e,i){if(e.children?.length)return fe(e,i);const{url:t,icon:r,title:s,showBadge:l,external:o,active:n}=e;return a.jsx("li",{className:"layout-sidebar-item",children:a.jsxs(ge,{external:o,to:t,className:({isActive:c})=>
|
|
163
|
+
`;function be({links:e=[],brand:i="",description:t="",images:r,title:s="Home",brandAddon:l=void 0,headerAddon:o=void 0,prefix:n="/images",fullWidth:c=!1,contentLayout:x="column",className:p="",homeUrl:b="/",logo:g=void 0,children:f,...P}){const w=ie(document.body)?.width||0,[v,F]=d.useState(w>=960?"permanent":"temporary"),[k,y]=d.useState(v==="permanent");d.useEffect(()=>{const N=w>=960?"permanent":"temporary";F(N),y(N!=="temporary")},[w]);const $=()=>{y(!k)},j=c||x==="row";return a.jsxs(me,{className:`dashboard ${p}`,...P,children:[a.jsx(E,{title:`${s}-${i}`}),a.jsx(ue,{className:"dashboard__header",onToggleMenu:$,brand:i,brandAddon:l,description:t,addons:o,homeUrl:b,logo:g}),a.jsxs(h,{className:"dashboard__body",sx:{display:"flex"},children:[a.jsx(Z,{variant:v,className:"drawer",classes:{paper:"drawerPaper"},open:k,onClose:$,ModalProps:{disablePortal:!0,keepMounted:!0},children:a.jsx(ce,{className:"dashboard__sidebar",images:r,links:e,prefix:n,logo:g})}),a.jsxs(h,{className:"dashboard__main",children:[a.jsx(B,{maxWidth:j?!1:"lg",className:"dashboard__content",children:f}),a.jsx(S,{})]})]})]})}function R({routerLinkComponent:e,to:i,external:t=!1,children:r,...s}){return t?a.jsx("a",{href:i,...s,children:r}):a.jsx(e,{to:i,...s,children:r})}function U({...e}){return a.jsx(R,{routerLinkComponent:z,...e})}function ge({className:e="",...i}){const t=i.external&&typeof e=="function"?e({}):e;return a.jsx(R,{routerLinkComponent:ee,className:t,...i})}function D(e,i){if(e.children?.length)return fe(e,i);const{url:t,icon:r,title:s,showBadge:l,external:o,active:n}=e;return a.jsx("li",{className:"layout-sidebar-item",children:a.jsxs(ge,{external:o,to:t,className:({isActive:c})=>C("layout-sidebar-link",{"layout-sidebar-link--active":o?n:c}),children:[r&&a.jsx("span",{className:`layout-sidebar-icon ${l?"layout-sidebar-badge":""}`,children:r}),a.jsx(_,{component:"span",className:"layout-sidebar-link-text",children:s})]})},`${t}-${i}`)}function fe(e,i){return a.jsxs("li",{className:"layout-sidebar-group",children:[a.jsx("span",{className:"layout-sidebar-group-title",children:e.title}),a.jsx("ul",{children:e.children.map(D)})]},`group-${e.title}-${i}`)}function I({links:e,addons:i=void 0,dense:t=!1,...r}){return a.jsxs(je,{...r,className:C({"layout-sidebar-dense":t}),children:[a.jsx("ul",{children:e.map(D)}),a.jsx("div",{style:{flex:1}}),i]})}const ye="linear-gradient(32deg, rgba(144, 255, 230, 0.1), rgba(144, 255, 230, 0))",je=m("div")`
|
|
164
164
|
display: flex;
|
|
165
165
|
flex-direction: column;
|
|
166
166
|
ul {
|
|
@@ -285,7 +285,7 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
285
285
|
margin-top: 16px;
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
`;function we({closeMenu:e,...i}){const t=
|
|
288
|
+
`;function we({closeMenu:e,...i}){const t=L();return d.useEffect(()=>{e()},[t]),a.jsx(te,{...i})}function G(e,i){return e.map(t=>t.children?.length?{...t,label:t.title,children:G(t.children,i)}:{...t,label:a.jsx(U,{to:t.url,external:t.external,children:t.title}),active:t.external?t.active:!!ae({path:t.url,end:!1},i.pathname)})}function ke({title:e="Home",headerProps:i={},links:t=[],sidebarWidth:r=120,fullWidth:s=!1,dense:l="auto",footerProps:o={},sx:n={},children:c,hideHtmlTitle:x=!1,...p}){const b=M(),{inFullPage:g,showToggleButton:f,headerVisible:P,footerVisible:w,sidebarVisible:v,toggleFullPage:F}=se(),k=L(),y=d.useMemo(()=>G(t,k),[k,t]),$=y.some(u=>!!u.children?.length),j=l==="auto"?y.length>=8||$:l,N=C("dashboard",{"dashboard-dense":j},p.className),O={homeLink:u=>a.jsx(U,{to:window.blocklet?.prefix||"/",children:u}),...i};return d.useEffect(()=>{const{searchParams:u}=new URL(window.location.href);u.get("inviter")&&window.localStorage.setItem("inviter",u.get("inviter"))},[]),a.jsxs(ve,{sx:n,...p,className:N,sidebarWidth:r,children:[!x&&a.jsx(E,{title:e},e),P&&a.jsx($e,{...O,className:"dashboard-header",children:t?.length?({isMobile:u,closeMenu:Q})=>u?a.jsx(we,{mode:"inline",items:y,closeMenu:Q,bgColor:"transparent",activeTextColor:b.palette.primary.main}):null:null}),a.jsxs(h,{className:"dashboard-body",sx:{display:"flex"},children:[!!t?.length&&v&&a.jsx(h,{className:"dashboard-sidebar",sx:{display:{xs:"none",md:"block"}},children:j?a.jsx(I,{links:t,dense:j}):a.jsx(h,{className:"dashboard-sidebar-container",children:a.jsx(I,{links:t,dense:j})})}),a.jsxs(h,{className:"dashboard-main",id:"arc__dashboard-main",children:[f&&a.jsx(h,{sx:{position:"absolute",top:4,right:4,display:"flex",justifyContent:"center",alignItems:"center",width:24,height:24,color:"#fff",bgcolor:"rgba(158,158,158, 0.6);",borderRadius:1,cursor:"pointer"},onClick:F,children:g?a.jsx(J,{style:{fontSize:18}}):a.jsx(K,{style:{fontSize:18}})}),a.jsx(B,{className:"dashboard-content",id:"arc__dashboard-content",...s&&{maxWidth:!1},children:c}),w&&a.jsx(S,{dark:b.palette.mode==="dark",...o})]})]})]})}const ve=m(h)`
|
|
289
289
|
&.dashboard {
|
|
290
290
|
display: flex;
|
|
291
291
|
flex-direction: column;
|
|
@@ -345,4 +345,4 @@ import{j as a,D as M,T as _,ce as L,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as
|
|
|
345
345
|
.header-container {
|
|
346
346
|
max-width: 100%;
|
|
347
347
|
}
|
|
348
|
-
`;function
|
|
348
|
+
`;function Le({legacy:e=!0,...i}){return e?a.jsx(be,{...i}):a.jsx(le,{children:a.jsx(ke,{...i})})}export{se as d,Le as x};
|