@abtnode/blocklet-services 1.16.42-beta-20250413-121549-22e9a196 → 1.16.42-beta-20250415-222652-04c5d2fe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +4 -3
- package/api/libs/auth/index.js +5 -5
- package/api/libs/connect/session.js +29 -3
- package/api/libs/jwt.js +36 -1
- package/api/routes/federated.js +1 -1
- package/api/routes/mcp.js +26 -13
- package/api/routes/{oauth.js → oauth/client.js} +22 -21
- package/api/routes/oauth/server.js +95 -0
- package/api/routes/user.js +5 -4
- package/api/services/auth/connect/gen-access-key.js +92 -0
- package/api/services/auth/index.js +8 -0
- package/api/services/auth/passkey.js +1 -1
- package/api/services/auth/session.js +2 -3
- package/api/services/dashboard/index.js +6 -0
- package/api/services/mcp/server.js +151 -32
- package/api/services/notification/queue.js +9 -6
- package/api/services/oauth/server.js +213 -0
- package/api/util/index.js +1 -1
- package/api/util/user-util.js +1 -21
- package/dist/assets/AdapterDayjs-BLBXeg9J.js +3 -0
- package/dist/assets/{ArrowDropDown-a-C4j7Lx.js → ArrowDropDown--dAaadP8.js} +1 -1
- package/dist/assets/{CheckCircle-CuYzdCtm.js → CheckCircle-Av1UotA-.js} +1 -1
- package/dist/assets/{ChevronLeft-CnflXey6.js → ChevronLeft-De8Da-PB.js} +1 -1
- package/dist/assets/{ChevronRight-DE7hYCb3.js → ChevronRight-CQOI2CyK.js} +1 -1
- package/dist/assets/{Community-C8NtUXNH.js → Community-B_YqAP9P.js} +1 -1
- package/dist/assets/{DeleteOutline-PGhagisl.js → DeleteOutline-Cgoi-K0i.js} +1 -1
- package/dist/assets/{Done-BVaQae1-.js → Done-BYuUlh_s.js} +1 -1
- package/dist/assets/{Download-DNNh4N1T.js → Download-DUKR_Wkm.js} +1 -1
- package/dist/assets/Edit-D2RQMivt.js +1 -0
- package/dist/assets/{EditIcon-Y1U-3M09.js → EditIcon-5ixNT5sW.js} +1 -1
- package/dist/assets/{Email-BYzCrU9G.js → Email-RGD-rKFl.js} +1 -1
- package/dist/assets/{Error-C4dVUMw4.js → Error-By0ZMWzh.js} +1 -1
- package/dist/assets/{ExpandLess-Blh1x-4z.js → ExpandLess-BNGLjxae.js} +1 -1
- package/dist/assets/{Google-CAujGJ1A.js → Google-tZCjvU7D.js} +1 -1
- package/dist/assets/{Holiday-DxDxhx5X.js → Holiday-C_1hMIGZ.js} +1 -1
- package/dist/assets/{InfoOutlined-DF9JwavD.js → InfoOutlined-DSoJjRQo.js} +1 -1
- package/dist/assets/{Launch-gOz_lwLg.js → Launch-B161pSEw.js} +1 -1
- package/dist/assets/{LaunchOutlined-MbSPR9qn.js → LaunchOutlined-wehxIahb.js} +1 -1
- package/dist/assets/{Location-CEwgGcA5.js → Location-B6FoL795.js} +1 -1
- package/dist/assets/{LockIcon-D7BH0t_p.js → LockIcon-D3vSMIOk.js} +1 -1
- package/dist/assets/{Meeting-BJz5QiFc.js → Meeting-BfKca-xn.js} +1 -1
- package/dist/assets/{MoreHoriz-CGWVyYh4.js → MoreHoriz-Bo_R2nuS.js} +1 -1
- package/dist/assets/{OffSick--msvqLGm.js → OffSick-QPPyYyU6.js} +1 -1
- package/dist/assets/{Phone-CDl3oDYG.js → Phone-_lRBpoVi.js} +1 -1
- package/dist/assets/{PlayArrow-CxWt6459.js → PlayArrow-D38lbyGo.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-CPHZnM6u.js → QuestionMarkCircle-B4EnwYju.js} +1 -1
- package/dist/assets/{ServerLogo-vX_nf8Sc.js → ServerLogo-BW4PKwV0.js} +1 -1
- package/dist/assets/{Timezone-uXi4_8BX.js → Timezone-bYzGwn3x.js} +1 -1
- package/dist/assets/{TuneOutlined-DcqnBMqE.js → TuneOutlined-DMMtKa6E.js} +1 -1
- package/dist/assets/{ViewList-B6eveRY-.js → ViewList-CMIoKrN6.js} +1 -1
- package/dist/assets/{WorkingRemotely-CK4z1-Sd.js → WorkingRemotely-BK9_vlZ-.js} +1 -1
- package/dist/assets/{access-control-Dxyg5dpc.js → access-control-DLD9n3S7.js} +1 -1
- package/dist/assets/actions-CMsM02NP.js +1 -0
- package/dist/assets/add-component-core-FnU4dwXM.js +763 -0
- package/dist/assets/{add-resource-BetUBTvt.js → add-resource-CubCXHBS.js} +1 -1
- package/dist/assets/{addon-B1aBsfOX.js → addon-5JaI2ctX.js} +1 -1
- package/dist/assets/advanced-D4wfoh0v.js +14 -0
- package/dist/assets/api-3sG9at7i.js +1 -0
- package/dist/assets/appearance-BUsj4DWC.js +1 -0
- package/dist/assets/{ar-DrRqcx2b.js → ar-BUQWR0Zu.js} +1 -1
- package/dist/assets/{ar-Cb5zQ0go.js → ar-CMzth4YC.js} +3 -3
- package/dist/assets/{audit-logs-SSAqJt40.js → audit-logs-rk_iUYcM.js} +3 -3
- package/dist/assets/authorize-CDJXjmiI.js +1 -0
- package/dist/assets/{base32-iVyUiizz.js → base32-BhlNgZPk.js} +1 -1
- package/dist/assets/{branding-BDuOcSfH.js → branding-BBbE2Klb.js} +1 -1
- package/dist/assets/branding-JQ1914RB.js +40 -0
- package/dist/assets/{bundle-avatar-DfAWUEqX.js → bundle-avatar-woUZoGoi.js} +1 -1
- package/dist/assets/button-Rx3uHycr.js +1 -0
- package/dist/assets/click-to-copy-BxZJa7n5.js +1 -0
- package/dist/assets/cloneDeep-kMVNpUap.js +1 -0
- package/dist/assets/{complete-R99mlHBI.js → complete-KnPBZq-P.js} +2 -2
- package/dist/assets/{component-By64LaLD.js → component-fD-EGTLm.js} +80 -80
- package/dist/assets/{config-BvNNOdw8.js → config-8xeoVfWN.js} +2 -2
- package/dist/assets/{config-BHBxeyYh.js → config-DbqQgRSU.js} +1 -1
- package/dist/assets/{config-navigation-CPd_4svD.js → config-navigation-DrgPbe5I.js} +6 -6
- package/dist/assets/{config-space-BgWEAM0m.js → config-space-DZ9w_4_9.js} +1 -1
- package/dist/assets/confirm-_RIb3OmR.js +7 -0
- package/dist/assets/connect-CJOq1BXE.js +5 -0
- package/dist/assets/{connect-Bq-p3hnS.js → connect-CPIImVme.js} +1 -1
- package/dist/assets/{connect-to-bQVCrkhh.js → connect-to-BdhN0BHi.js} +1 -1
- package/dist/assets/{content-layout-CFHoSupA.js → content-layout-BM34AwsG.js} +1 -1
- package/dist/assets/dashboard-vsk4QHJ1.js +275 -0
- package/dist/assets/de-BkBUnf4o.js +13 -0
- package/dist/assets/{de-BRPos3d1.js → de-_X0eQXZu.js} +1 -1
- package/dist/assets/delete-confirm-DaoAi4Gz.js +1 -0
- package/dist/assets/did-address-CGHn52xI.js +1 -0
- package/dist/assets/domain-BJUSWYGQ.js +9 -0
- package/dist/assets/domain-action-card-9r42-rWK.js +29 -0
- package/dist/assets/domains-BNDFk-7R.js +1 -0
- package/dist/assets/{email-JviRloBo.js → email-fp1LVcF6.js} +3 -3
- package/dist/assets/empty-spinner-Ict2ItjU.js +1 -0
- package/dist/assets/es-C47yMWlQ.js +14 -0
- package/dist/assets/{es-D2rCdMgt.js → es-yHIDSG5r.js} +1 -1
- package/dist/assets/{exchange-passport-3aXbJr-q.js → exchange-passport-DIyhYtFS.js} +1 -1
- package/dist/assets/{format-error-BrmqJs5a.js → format-error-LAoTjvJe.js} +1 -1
- package/dist/assets/{fr-Chv_7X3-.js → fr-CXUB715N.js} +3 -3
- package/dist/assets/{fr-DAFx50ef.js → fr-D6i3bCqR.js} +1 -1
- package/dist/assets/{fuel-DOs3bqYm.js → fuel-aGwI1uP2.js} +1 -1
- package/dist/assets/gen-access-key-DMS1kzry.js +2 -0
- package/dist/assets/{get-safe-url-CWgEUVPT.js → get-safe-url-DMordnyN.js} +1 -1
- package/dist/assets/{get-safe-url-eATw6wn7.js → get-safe-url-DW2Z07ex.js} +1 -1
- package/dist/assets/{hi-CkD7b6N9.js → hi-ChVLDWm_.js} +1 -1
- package/dist/assets/hi-DCG5QxbH.js +11 -0
- package/dist/assets/{home-a0RwGUp7.js → home-B_gUzcjU.js} +1 -1
- package/dist/assets/id-BjbrrkXh.js +14 -0
- package/dist/assets/{id-BMWKdVei.js → id-D6XXuY_a.js} +1 -1
- package/dist/assets/{iframe-DVBEjxC1.js → iframe-BEanRyio.js} +1 -1
- package/dist/assets/index-4rY7Xp2W.js +14 -0
- package/dist/assets/{index-CwdXL2a0.js → index-AhbLOD9c.js} +1 -1
- package/dist/assets/{index-DrUxhMM5.js → index-BDNlzmD0.js} +4 -4
- package/dist/assets/{index-Th4BUzmb.js → index-BPa_QtWl.js} +30 -30
- package/dist/assets/index-BjN8LAYh.js +224 -0
- package/dist/assets/index-BmexzVQt.js +1 -0
- package/dist/assets/{index-C1nvgBfF.js → index-C-7MyHbp.js} +1 -1
- package/dist/assets/index-C0hr4pkt.js +346 -0
- package/dist/assets/{index-BGeUo-5w.js → index-CFJtmMCn.js} +1 -1
- package/dist/assets/index-CFkRKsyT.js +290 -0
- package/dist/assets/{index-9aeq_G-H.js → index-CX4jvZnM.js} +1 -1
- package/dist/assets/{index-DQIxR9j5.js → index-CbW18ndN.js} +2 -2
- package/dist/assets/index-CcjD0qiY.js +93 -0
- package/dist/assets/{index-DjIOxw8x.js → index-D1fVmwHN.js} +1 -1
- package/dist/assets/{index-VvWvVQT8.js → index-D22ZWGxu.js} +1 -1
- package/dist/assets/{index-BBl5mftj.js → index-D22lazSG.js} +3 -3
- package/dist/assets/{index-BVOsgGKh.js → index-D2EAXstd.js} +2 -2
- package/dist/assets/index-DBZZ-U66.js +1 -0
- package/dist/assets/index-DUQK_NaI.js +113 -0
- package/dist/assets/{index-DBLdE2lQ.js → index-D_gSWW1P.js} +1 -1
- package/dist/assets/index-DbpVrp8z.js +138 -0
- package/dist/assets/{index-MqiIu4kd.js → index-DkPKxdcu.js} +1 -1
- package/dist/assets/{index-sv3a1ZUw.js → index-DzDfEcNp.js} +1 -1
- package/dist/assets/{index-CCwUSMuP.js → index-O2l0NSUF.js} +1 -1
- package/dist/assets/{index-CPE8Apzb.js → index-pV_0wOyY.js} +1 -1
- package/dist/assets/{index-DVQCgvFb.js → index-tUQxVYYQ.js} +1 -1
- package/dist/assets/index-xa5W6ExD.js +1 -0
- package/dist/assets/{invitation-CwtXOXZc.js → invitation-D-l4US6a.js} +3 -3
- package/dist/assets/invite-DPswrm4J.js +1 -0
- package/dist/assets/{issue-passport-DtEbcgX6.js → issue-passport-AJghkFHK.js} +1 -1
- package/dist/assets/item-zk7clNKz.js +2 -0
- package/dist/assets/{ja-D2jInSAT.js → ja-DKZCt8Yp.js} +1 -1
- package/dist/assets/ja-DmNZQIta.js +14 -0
- package/dist/assets/{ko-BGB5KJZq.js → ko-B0uE9AyQ.js} +1 -1
- package/dist/assets/ko-CfYwMwZz.js +14 -0
- package/dist/assets/{landing-page-BM1TmagN.js → landing-page-D13wALfk.js} +1 -1
- package/dist/assets/{launch-result-message-DOa3SWMR.js → launch-result-message-Bvdtucih.js} +1 -1
- package/dist/assets/{layout-DCzN0ui5.js → layout-aS-gjZH3.js} +1 -1
- package/dist/assets/list-CJt5nOcn.js +234 -0
- package/dist/assets/{list-header-BLGbkNad.js → list-header-Bm8u_Z_p.js} +1 -1
- package/dist/assets/localization-Us9buoy1.js +1 -0
- package/dist/assets/{log-C0ajhie8.js → log-DFaz-U9x.js} +7 -7
- package/dist/assets/{logger-D6n4nbwy.js → logger-DXlQ8ejK.js} +1 -1
- package/dist/assets/{login-f1AXbIm0.js → login-DKSu0ge6.js} +1 -1
- package/dist/assets/login-oauth-callback-CP7cNspN.js +1 -0
- package/dist/assets/{logo-uploader-DbAVW3BS.js → logo-uploader-B7i5QemW.js} +5 -5
- package/dist/assets/{lost-passport-Dlmv8D-L.js → lost-passport-QRUn4RXe.js} +3 -3
- package/dist/assets/{lottie-react.esm-D2t-u0YU.js → lottie-react.esm-CPHH620R.js} +1 -1
- package/dist/assets/{lottie-web-jYmAQWuC.js → lottie-web-B6s7dDoL.js} +1 -1
- package/dist/assets/omit-MMUW2k9W.js +1 -0
- package/dist/assets/{open-window-DskgWqba.js → open-window-B6LZyZAW.js} +1 -1
- package/dist/assets/{overview-DY9-9zrL.js → overview-B3A_5sHO.js} +2 -2
- package/dist/assets/{page-header-XbzfRkA7.js → page-header-DUh_2MUQ.js} +1 -1
- package/dist/assets/passport-item-BY6VS7Ot.js +1 -0
- package/dist/assets/{permission-Bi46fqEy.js → permission-DKFJEWNH.js} +1 -1
- package/dist/assets/preferences-CA76rfbp.js +1 -0
- package/dist/assets/profile-embed-DHFHXO1W.js +1 -0
- package/dist/assets/{pt-DY0Ku5W5.js → pt-DCzE4kPq.js} +1 -1
- package/dist/assets/pt-DD_rP5GH.js +12 -0
- package/dist/assets/publish-resource-rxvf6s83.js +1 -0
- package/dist/assets/{raf-schd.esm-B3j6BePR.js → raf-schd.esm-GV-XhwE0.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-B68lWn23.js → react-beautiful-dnd.esm-D0nBCaor.js} +1 -1
- package/dist/assets/{relative-time-BeR_4mfM.js → relative-time-BK3hjJNN.js} +1 -1
- package/dist/assets/roboto-latin-400-normal-BVyCgWwA.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-DXyFPIdK.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-C6iW8rdg.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-rpP1_v3s.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-BWcFiwQV.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-CbYYDfWS.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-BSFkPfbf.woff +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-DgXbz5gU.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-DvHxAkTn.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-OQJhyaXd.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-Ba-CAIIA.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-DchBbzVz.woff2 +0 -0
- package/dist/assets/{ru-Cv5vRo7s.js → ru-B9yj9TuE.js} +1 -1
- package/dist/assets/ru-CwgUUzV8.js +11 -0
- package/dist/assets/runtime-D_bXZ0w0.js +1 -0
- package/dist/assets/sdk-Hg_BMu_u.js +1 -0
- package/dist/assets/{security-DmR541pi.js → security-DEmFjZiu.js} +1 -1
- package/dist/assets/session-DB9Du-lc.js +1 -0
- package/dist/assets/setup-kkb6SvQ7.js +19 -0
- package/dist/assets/{shorten-label-BuH-7PI8.js → shorten-label-CwDvu4_S.js} +1 -1
- package/dist/assets/simple-select-DgqUhMvQ.js +1 -0
- package/dist/assets/{slicedToArray-C0MW3KIe.js → slicedToArray-B8PdYes9.js} +1 -1
- package/dist/assets/{spaces-gLUqr6Uq.js → spaces-25E9GQ6_.js} +1 -1
- package/dist/assets/{start-XbVMHGiE.js → start-DfEUlPuS.js} +1 -1
- package/dist/assets/{status-DmyvEkKL.js → status-CUyAteC9.js} +1 -1
- package/dist/assets/{step-actions-brdohYRv.js → step-actions-CAgwlOEY.js} +1 -1
- package/dist/assets/{studio-DJeZlIfF.js → studio-2U2-FOOC.js} +1 -1
- package/dist/assets/{switch-control-Br1YNOSB.js → switch-control-DwTxPESj.js} +1 -1
- package/dist/assets/th-KqE3tuDR.js +12 -0
- package/dist/assets/{th-D6oDBVGi.js → th-et0IV3ES.js} +1 -1
- package/dist/assets/traffic-B94bYvtf.js +35 -0
- package/dist/assets/{transfer-DboKwiA_.js → transfer-DWjvJtPs.js} +1 -1
- package/dist/assets/{unsubscribe-C9k_L3g5.js → unsubscribe-CTZlUfqc.js} +1 -1
- package/dist/assets/use-mobile-BHPd3bDQ.js +1 -0
- package/dist/assets/use-mobile-CHMVa8_W.js +1 -0
- package/dist/assets/useAsync-DKE0K0bz.js +1 -0
- package/dist/assets/useAsyncRetry-BBomZj1z.js +7 -0
- package/dist/assets/{useLocalStorage-0mjZfnua.js → useLocalStorage-DKl7XFfI.js} +1 -1
- package/dist/assets/{useSetState-CWq0AVWn.js → useSetState-BL3ktMon.js} +1 -1
- package/dist/assets/user-center-Du6EtGgy.js +77 -0
- package/dist/assets/{util-YnaMqM3B.js → util-BEvdQ5nP.js} +1 -1
- package/dist/assets/{util-DLK92HF8.js → util-DkIhTuT7.js} +1 -1
- package/dist/assets/{vendor-arcblock-DPMnO1AO.js → vendor-arcblock-ACo-BN0q.js} +26 -26
- package/dist/assets/{vendor-hooks-DN4nZ7TU.js → vendor-hooks-BwVH-TAd.js} +2 -2
- package/dist/assets/{vendor-mui-core-x3zpe_j_.js → vendor-mui-core-DxD1UA4o.js} +2 -2
- package/dist/assets/vendor-mui-x-Bit8yv3W.js +6 -0
- package/dist/assets/{vendor-react-DEoibe3W.js → vendor-react-DoD83n6N.js} +1 -1
- package/dist/assets/vendor-utils-CTIzdAFg.js +11 -0
- package/dist/assets/vendor-ux-did-connect-2GapMFC4.css +1 -0
- package/dist/assets/vendor-ux-did-connect-DOjsg91L.js +1832 -0
- package/dist/assets/vi-BSkiIyr-.js +12 -0
- package/dist/assets/{vi-BKKJMbW2.js → vi-LBvVt_pj.js} +1 -1
- package/dist/assets/wrap-locale-DjpRZNtr.js +1 -0
- package/dist/assets/{zh-nDA-W8Iz.js → zh-BYP8UvRZ.js} +4 -4
- package/dist/assets/{zh-tw-B9PQstHP.js → zh-tw-Dcs2VpLv.js} +3 -3
- package/dist/assets/{zh-tw-B08rjgK3.js → zh-tw-l3XXo5aT.js} +1 -1
- package/dist/assets/{zh-gJhiLbCP.js → zh-yJzqRkfw.js} +1 -1
- package/dist/index.html +9 -9
- package/dist/service-worker.js +2 -2
- package/package.json +45 -43
- package/dist/assets/actions-BAjt7G_t.js +0 -1
- package/dist/assets/add-component-core-BXowXTJz.js +0 -762
- package/dist/assets/advanced-C8t1232G.js +0 -14
- package/dist/assets/api-kwOW9mRz.js +0 -1
- package/dist/assets/appearance-BIOmTg1q.js +0 -1
- package/dist/assets/branding-NmIAi0kv.js +0 -40
- package/dist/assets/button-Kk1bqv_H.js +0 -1
- package/dist/assets/click-to-copy-DCUroWft.js +0 -1
- package/dist/assets/cloneDeep-DHAAvuEH.js +0 -1
- package/dist/assets/confirm-92J4n1RP.js +0 -7
- package/dist/assets/connect-D20f2K4u.js +0 -5
- package/dist/assets/dashboard-BgQFc2Pc.js +0 -262
- package/dist/assets/de-BOcpEFUQ.js +0 -13
- package/dist/assets/delete-confirm-AkwIQ5yF.js +0 -1
- package/dist/assets/did-address-D4v6iN2l.js +0 -1
- package/dist/assets/domain-CBdLs2D9.js +0 -9
- package/dist/assets/domain-action-card-DN3KjFwP.js +0 -29
- package/dist/assets/domains-CMJbalsn.js +0 -1
- package/dist/assets/empty-spinner-DlzuJxRt.js +0 -1
- package/dist/assets/es-DAe7HpzA.js +0 -14
- package/dist/assets/hi-BqgGDMzX.js +0 -11
- package/dist/assets/id-DbN1Ye4x.js +0 -14
- package/dist/assets/index-3q6oLa2e.js +0 -290
- package/dist/assets/index-BJYrBMyS.js +0 -1
- package/dist/assets/index-BxTrfRkG.js +0 -138
- package/dist/assets/index-C3-7zmeY.js +0 -346
- package/dist/assets/index-DWuuU3ta.js +0 -113
- package/dist/assets/index-K5iSHoYm.js +0 -224
- package/dist/assets/index-KLUHbsxg.js +0 -1
- package/dist/assets/invite-CMj5995Z.js +0 -1
- package/dist/assets/item-zVdGBfMR.js +0 -2
- package/dist/assets/ja-Bv-A_sTl.js +0 -14
- package/dist/assets/ko-Bl3kd-sp.js +0 -14
- package/dist/assets/list-BuXPrN1N.js +0 -221
- package/dist/assets/localization-qd6O0FX9.js +0 -1
- package/dist/assets/login-oauth-callback-C5CFUlUR.js +0 -1
- package/dist/assets/omit-IjXSqbDA.js +0 -1
- package/dist/assets/preferences-DPpwnIAs.js +0 -1
- package/dist/assets/profile-embed-DV5vno0C.js +0 -1
- package/dist/assets/pt-B7_jgyK-.js +0 -12
- package/dist/assets/publish-resource-z2_THSz6.js +0 -1
- package/dist/assets/roboto-cyrillic-400-normal-DAIM1_dR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-400-normal-Dry59Hjn.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-CsCirF4J.woff +0 -0
- package/dist/assets/roboto-cyrillic-500-normal-hCeO1jFL.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CB1Rmiii.woff +0 -0
- package/dist/assets/roboto-cyrillic-700-normal-CzEIZVQR.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-BxX1-eA_.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-400-normal-DzMWdK87.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-B7rQpwPu.woff2 +0 -0
- package/dist/assets/roboto-cyrillic-ext-500-normal-ElvJfk8V.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-CIu0AXX2.woff +0 -0
- package/dist/assets/roboto-cyrillic-ext-700-normal-D_fA0fHY.woff2 +0 -0
- package/dist/assets/roboto-greek-400-normal-CAI06USH.woff +0 -0
- package/dist/assets/roboto-greek-400-normal-jFM2czAU.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-BJMS0heP.woff2 +0 -0
- package/dist/assets/roboto-greek-500-normal-D8eQD5zT.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DCrt6r9F.woff +0 -0
- package/dist/assets/roboto-greek-700-normal-DpKAje7q.woff2 +0 -0
- package/dist/assets/roboto-latin-400-normal-551zQQ7R.woff +0 -0
- package/dist/assets/roboto-latin-400-normal-CNwBRw8h.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-CkrA1NAy.woff2 +0 -0
- package/dist/assets/roboto-latin-500-normal-_8jDuD7w.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-CTLkNcF_.woff +0 -0
- package/dist/assets/roboto-latin-700-normal-DZr4b_KL.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-ZYmyxeOy.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-400-normal-uRIBRJt5.woff +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-C_ARlJGk.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-500-normal-eJ10kk0m.woff +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-BNPgmEQS.woff2 +0 -0
- package/dist/assets/roboto-latin-ext-700-normal-Cnx4FGpK.woff +0 -0
- package/dist/assets/roboto-math-400-normal-B3wgz80t.woff2 +0 -0
- package/dist/assets/roboto-math-400-normal-DHrwdhE6.woff +0 -0
- package/dist/assets/roboto-math-500-normal-CFNaIMFC.woff2 +0 -0
- package/dist/assets/roboto-math-500-normal-CetgDdIa.woff +0 -0
- package/dist/assets/roboto-math-700-normal-CpTCM92H.woff +0 -0
- package/dist/assets/roboto-math-700-normal-xbpggnJp.woff2 +0 -0
- package/dist/assets/roboto-symbols-400-normal-bG5rsNFs.woff +0 -0
- package/dist/assets/roboto-symbols-400-normal-fF1SLJBj.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-BXFTxrNR.woff2 +0 -0
- package/dist/assets/roboto-symbols-500-normal-toKUCDph.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-B2QKVW64.woff +0 -0
- package/dist/assets/roboto-symbols-700-normal-DKkQdRpM.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-CDDxGrUb.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-400-normal-DgufTq8s.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-Dw5heWgq.woff +0 -0
- package/dist/assets/roboto-vietnamese-500-normal-HYpufUYk.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-BFWtvCOj.woff2 +0 -0
- package/dist/assets/roboto-vietnamese-700-normal-ChAl_rRV.woff +0 -0
- package/dist/assets/ru-CToatViJ.js +0 -11
- package/dist/assets/runtime-D6tESY33.js +0 -1
- package/dist/assets/sdk-DNr-nKBq.js +0 -1
- package/dist/assets/session-CJFbMNLl.js +0 -1
- package/dist/assets/setup-BSsqBrsc.js +0 -19
- package/dist/assets/simple-select-DHvjqsw4.js +0 -1
- package/dist/assets/th-23Hwasay.js +0 -12
- package/dist/assets/traffic-LuIcK-L1.js +0 -37
- package/dist/assets/use-mobile-C98e2dYy.js +0 -1
- package/dist/assets/use-mobile-CqLLcWbr.js +0 -1
- package/dist/assets/useAsync-BxB2TpDl.js +0 -1
- package/dist/assets/useAsync-L7_fHBH5.js +0 -1
- package/dist/assets/useAsyncRetry-CEouAsle.js +0 -7
- package/dist/assets/user-center-BaKv3X4J.js +0 -77
- package/dist/assets/vendor-mui-x-CPOc4sOK.js +0 -6
- package/dist/assets/vendor-utils-C3FZIS9A.js +0 -11
- package/dist/assets/vendor-ux-did-connect-B1u6nvmg.js +0 -1832
- package/dist/assets/vendor-ux-did-connect-BDmhBveY.css +0 -1
- package/dist/assets/vi-D-QGxDS1.js +0 -12
- package/dist/assets/wrap-locale-m_NRjq-h.js +0 -1
- /package/api/services/oauth/{index.js → client.js} +0 -0
|
@@ -293,7 +293,6 @@ module.exports = {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
try {
|
|
296
|
-
const { secret } = await req.getBlockletInfo();
|
|
297
296
|
const [blocklet, info] = await Promise.all([req.getBlocklet(), req.getBlockletInfo()]);
|
|
298
297
|
|
|
299
298
|
const refreshTokenType = 'refresh';
|
|
@@ -303,7 +302,7 @@ module.exports = {
|
|
|
303
302
|
passport,
|
|
304
303
|
provider = LOGIN_PROVIDER.WALLET,
|
|
305
304
|
walletOS,
|
|
306
|
-
} = await verifySessionToken(token, secret, {
|
|
305
|
+
} = await verifySessionToken(token, info.secret, {
|
|
307
306
|
checkFromDb: true,
|
|
308
307
|
teamDid,
|
|
309
308
|
checkToken: (_token) => {
|
|
@@ -337,7 +336,7 @@ module.exports = {
|
|
|
337
336
|
const { sessionToken, refreshToken } = createToken(
|
|
338
337
|
userPid,
|
|
339
338
|
{
|
|
340
|
-
secret,
|
|
339
|
+
secret: info.secret,
|
|
341
340
|
passport,
|
|
342
341
|
role,
|
|
343
342
|
fullName: user.fullName,
|
|
@@ -126,6 +126,12 @@ function createWebsocketServer(node, ensureWsUser, options) {
|
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
|
|
129
|
+
eventHub.on(EVENTS.NOTIFICATION_BLOCKLET_UPDATE, (data) => {
|
|
130
|
+
const did = data.teamDid;
|
|
131
|
+
const eventName = `${did}/${EVENTS.NOTIFICATION_BLOCKLET_UPDATE}`;
|
|
132
|
+
wsServer.broadcast(eventName, eventName, data, { noCluster: true });
|
|
133
|
+
});
|
|
134
|
+
|
|
129
135
|
eventHub.on(EVENTS.NOTIFICATION_READ, (data) => {
|
|
130
136
|
const did = data.teamDid;
|
|
131
137
|
if (did) {
|
|
@@ -1,37 +1,156 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-unresolved
|
|
2
|
-
const { McpServer
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
const { McpServer } = require('@blocklet/mcp/server/mcp.js');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { initDbhubServer } = require('@blocklet/dbhub');
|
|
5
|
+
|
|
6
|
+
const { version } = require('../../../package.json');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {'loginToken' | 'componentCall' | 'signedToken'} AuthMethod
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {Object} SessionUser
|
|
14
|
+
* @property {string} did - The DID of the user
|
|
15
|
+
* @property {string} role - The role of the user
|
|
16
|
+
* @property {string} provider - The provider of the user
|
|
17
|
+
* @property {AuthMethod} [method] - The authentication method used
|
|
18
|
+
* @property {unknown} [key: string] - Additional properties
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @typedef {Object} AccessPolicy
|
|
23
|
+
* @property {Object} [allow] - Allow rules
|
|
24
|
+
* @property {string[]} [allow.dids] - List of allowed DIDs
|
|
25
|
+
* @property {string[]} [allow.roles] - List of allowed roles
|
|
26
|
+
* @property {string[]} [allow.providers] - List of allowed providers
|
|
27
|
+
* @property {AuthMethod[]} [allow.methods] - List of allowed authentication methods
|
|
28
|
+
* @property {Object} [deny] - Deny rules
|
|
29
|
+
* @property {string[]} [deny.dids] - List of denied DIDs
|
|
30
|
+
* @property {string[]} [deny.roles] - List of denied roles
|
|
31
|
+
* @property {string[]} [deny.providers] - List of denied providers
|
|
32
|
+
* @property {AuthMethod[]} [deny.methods] - List of denied authentication methods
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Checks if a user has permission based on the access policy
|
|
37
|
+
* @param {object} context - The authorization context to check against
|
|
38
|
+
* @param {AccessPolicy} [policy] - The access policy to check against
|
|
39
|
+
* @returns {boolean} - Whether the user has permission
|
|
40
|
+
*/
|
|
41
|
+
function checkPermissions(context, policy) {
|
|
42
|
+
if (!policy) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const user = context.user || null;
|
|
47
|
+
if (!user) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Check deny rules first
|
|
52
|
+
if (policy.deny) {
|
|
53
|
+
// Check denied DIDs
|
|
54
|
+
if (policy.deny.dids && policy.deny.dids.includes(user.did)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Check denied roles
|
|
59
|
+
if (policy.deny.roles && policy.deny.roles.includes(user.role)) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Check denied providers
|
|
64
|
+
if (policy.deny.providers && policy.deny.providers.includes(user.provider)) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Check denied auth methods
|
|
69
|
+
if (user.method && policy.deny.methods && policy.deny.methods.includes(user.method)) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Check allow rules
|
|
75
|
+
if (policy.allow) {
|
|
76
|
+
let isAllowed = false;
|
|
77
|
+
|
|
78
|
+
// If no allow rules are specified, default to allowed
|
|
79
|
+
if (!policy.allow.dids && !policy.allow.roles && !policy.allow.providers && !policy.allow.methods) {
|
|
80
|
+
isAllowed = true;
|
|
81
|
+
} else {
|
|
82
|
+
// Check allowed DIDs
|
|
83
|
+
if (policy.allow.dids && policy.allow.dids.includes(user.did)) {
|
|
84
|
+
isAllowed = true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Check allowed roles
|
|
88
|
+
if (policy.allow.roles && policy.allow.roles.includes(user.role)) {
|
|
89
|
+
isAllowed = true;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Check allowed providers
|
|
93
|
+
if (policy.allow.providers && policy.allow.providers.includes(user.provider)) {
|
|
94
|
+
isAllowed = true;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Check allowed auth methods
|
|
98
|
+
if (user.method && policy.allow.methods && policy.allow.methods.includes(user.method)) {
|
|
99
|
+
isAllowed = true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return isAllowed;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// If no rules specified, default to allowed
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function wrapToolHandler(handler, policy) {
|
|
111
|
+
return async (extra) => {
|
|
112
|
+
const hasPermission = await checkPermissions(extra.authContext, policy);
|
|
113
|
+
if (!hasPermission) {
|
|
114
|
+
throw new Error('Unauthorized');
|
|
115
|
+
}
|
|
116
|
+
return handler(extra);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function initMcpServer(node) {
|
|
121
|
+
const server = new McpServer({
|
|
122
|
+
name: 'Blocklet Service',
|
|
123
|
+
version,
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
initDbhubServer(
|
|
127
|
+
server,
|
|
128
|
+
wrapToolHandler(
|
|
129
|
+
async (extra) => {
|
|
130
|
+
if (!extra?.authContext?.blockletDid) {
|
|
131
|
+
throw new Error('blockletDid is required');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const blocklet = await node.getBlocklet({ did: extra.authContext.blockletDid, useCache: true });
|
|
135
|
+
if (!blocklet) {
|
|
136
|
+
throw new Error('blocklet not found');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return `sqlite://${path.join(blocklet.env.dataDir, 'blocklet.db')}`;
|
|
30
140
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
141
|
+
{
|
|
142
|
+
allow: {
|
|
143
|
+
roles: ['owner', 'admin'],
|
|
144
|
+
},
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
return server;
|
|
150
|
+
}
|
|
34
151
|
|
|
35
152
|
module.exports = {
|
|
36
|
-
|
|
153
|
+
initMcpServer,
|
|
154
|
+
checkPermissions,
|
|
155
|
+
wrapToolHandler,
|
|
37
156
|
};
|
|
@@ -148,12 +148,15 @@ const init = ({ node, notificationService }) => {
|
|
|
148
148
|
const blockletInfo = await getBlockletInfo({ did: teamDid, node });
|
|
149
149
|
wallet = blockletInfo.wallet;
|
|
150
150
|
}
|
|
151
|
+
|
|
151
152
|
const now = Math.floor(Date.now() / 1000);
|
|
152
|
-
const unsubscribeToken =
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
const unsubscribeToken = wallet
|
|
154
|
+
? JWT.signV2(wallet.address, wallet.secretKey, {
|
|
155
|
+
userDid: userInfo.did,
|
|
156
|
+
channel: 'email',
|
|
157
|
+
exp: String(now + 30 * 24 * 60 * 60), // 30 days
|
|
158
|
+
})
|
|
159
|
+
: null;
|
|
157
160
|
|
|
158
161
|
await notificationService.sendToMail.exec({
|
|
159
162
|
sender,
|
|
@@ -163,7 +166,7 @@ const init = ({ node, notificationService }) => {
|
|
|
163
166
|
appInfo: {
|
|
164
167
|
...(notification.appInfo || {}),
|
|
165
168
|
receivers: receivers.length > 0 ? receivers : [userInfo.did],
|
|
166
|
-
unsubscribeToken,
|
|
169
|
+
...(unsubscribeToken ? { unsubscribeToken } : {}),
|
|
167
170
|
userInfo: {
|
|
168
171
|
did: userInfo.did,
|
|
169
172
|
fullName: userInfo.fullName,
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
const crypto = require('crypto');
|
|
2
|
+
// const { Hasher } = require('@ocap/mcrypto');
|
|
3
|
+
const { getLastUsedPassport } = require('@abtnode/auth/lib/passport');
|
|
4
|
+
const snakeCase = require('lodash/snakeCase');
|
|
5
|
+
const camelCase = require('lodash/camelCase');
|
|
6
|
+
const { OAUTH_CODE_TTL, OAUTH_ACCESS_TOKEN_TTL, OAUTH_REFRESH_TOKEN_TTL } = require('@abtnode/constant');
|
|
7
|
+
|
|
8
|
+
const { canSessionBeElevated } = require('@abtnode/auth/lib/auth');
|
|
9
|
+
const initJwt = require('../../libs/jwt');
|
|
10
|
+
const { createTokenFn, redirectWithoutCache } = require('../../util');
|
|
11
|
+
|
|
12
|
+
const logger = require('../../libs/logger')('oauth:server');
|
|
13
|
+
|
|
14
|
+
const snakeCaseObject = (obj) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [snakeCase(key), value]));
|
|
15
|
+
const camelCaseObject = (obj) => Object.fromEntries(Object.entries(obj).map(([key, value]) => [camelCase(key), value]));
|
|
16
|
+
|
|
17
|
+
const createBlockletOAuthServerProvider = (node, options, blocklet, info) => {
|
|
18
|
+
const { createSessionToken, verifySessionToken } = initJwt(node, options);
|
|
19
|
+
|
|
20
|
+
const createToken = createTokenFn(createSessionToken);
|
|
21
|
+
// const hashToken = (token) => Hasher.SHA3.hash256(token);
|
|
22
|
+
const generateCode = (length = 16) => crypto.randomBytes(length).toString('hex').toUpperCase();
|
|
23
|
+
const generateTokens = async (client, userDid, scopes) => {
|
|
24
|
+
const user = await node.getUser({
|
|
25
|
+
teamDid: blocklet.appDid,
|
|
26
|
+
user: { did: userDid },
|
|
27
|
+
options: { enableConnectedAccount: true },
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (!user) {
|
|
31
|
+
throw new Error('User not found');
|
|
32
|
+
}
|
|
33
|
+
if (!user.approved) {
|
|
34
|
+
throw new Error('User not approved');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const passport = getLastUsedPassport(user?.passports || []);
|
|
38
|
+
const role = passport?.role || 'guest';
|
|
39
|
+
const { sessionToken, refreshToken } = createToken(
|
|
40
|
+
userDid,
|
|
41
|
+
{
|
|
42
|
+
secret: info.secret,
|
|
43
|
+
passport,
|
|
44
|
+
role,
|
|
45
|
+
fullName: user.fullName,
|
|
46
|
+
provider: passport?.provider || 'oauth',
|
|
47
|
+
emailVerified: !!user.emailVerified,
|
|
48
|
+
phoneVerified: !!user.phoneVerified,
|
|
49
|
+
elevated: canSessionBeElevated(role, await node.getNodeInfo({ useCache: true })),
|
|
50
|
+
oauth: {
|
|
51
|
+
clientId: client.client_id,
|
|
52
|
+
scopes,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{ cacheTtl: OAUTH_ACCESS_TOKEN_TTL, ttl: OAUTH_REFRESH_TOKEN_TTL, didConnectVersion: true }
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
access_token: sessionToken,
|
|
60
|
+
refresh_token: refreshToken,
|
|
61
|
+
token_type: 'Bearer',
|
|
62
|
+
scope: scopes.join(' '),
|
|
63
|
+
expires_in: OAUTH_ACCESS_TOKEN_TTL,
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
async authorize(client, params, res) {
|
|
69
|
+
if (!res.locals.user) {
|
|
70
|
+
throw new Error('User not logged in');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
logger.info('authorize', {
|
|
74
|
+
client,
|
|
75
|
+
params,
|
|
76
|
+
user: res.locals.user,
|
|
77
|
+
code: {
|
|
78
|
+
challenge: params.codeChallenge,
|
|
79
|
+
scopes: params.scopes,
|
|
80
|
+
clientId: client.client_id,
|
|
81
|
+
userDid: res.locals.user.did,
|
|
82
|
+
expiresAt: Date.now() + OAUTH_CODE_TTL * 1000,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
const { oauthCodeState } = await node.getOAuthState(blocklet.appDid);
|
|
86
|
+
|
|
87
|
+
// Generate authorization code
|
|
88
|
+
const code = generateCode();
|
|
89
|
+
await oauthCodeState.insert({
|
|
90
|
+
code,
|
|
91
|
+
challenge: params.codeChallenge,
|
|
92
|
+
scopes: params.scopes,
|
|
93
|
+
clientId: client.client_id,
|
|
94
|
+
userDid: res.locals.user.did,
|
|
95
|
+
expiresAt: Date.now() + OAUTH_CODE_TTL * 1000,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const redirectUrl = new URL(params.redirectUri);
|
|
99
|
+
redirectUrl.searchParams.set('code', code);
|
|
100
|
+
if (params.state) {
|
|
101
|
+
redirectUrl.searchParams.set('state', params.state);
|
|
102
|
+
}
|
|
103
|
+
redirectWithoutCache(res, redirectUrl.toString());
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
async challengeForAuthorizationCode(client, authorizationCode) {
|
|
107
|
+
logger.info('challengeForAuthorizationCode', { client, authorizationCode });
|
|
108
|
+
const { oauthCodeState } = await node.getOAuthState(blocklet.appDid);
|
|
109
|
+
const code = await oauthCodeState.findOne({ code: authorizationCode });
|
|
110
|
+
if (!code) {
|
|
111
|
+
throw new Error('Invalid authorization code');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (code.expiresAt < Date.now()) {
|
|
115
|
+
await oauthCodeState.update({ isRevoked: true }, { where: { code } });
|
|
116
|
+
throw new Error('Expired authorization code');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return code.challenge;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
async exchangeAuthorizationCode(client, authorizationCode) {
|
|
123
|
+
logger.info('exchangeAuthorizationCode', { client, authorizationCode });
|
|
124
|
+
const { oauthCodeState } = await node.getOAuthState(blocklet.appDid);
|
|
125
|
+
const code = await oauthCodeState.findOne({ code: authorizationCode });
|
|
126
|
+
if (!code) {
|
|
127
|
+
throw new Error('Invalid authorization code');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (code.clientId !== client.client_id) {
|
|
131
|
+
throw new Error('Authorization code was not issued to this client');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (Date.now() > code.expiresAt) {
|
|
135
|
+
throw new Error('Authorization code has expired');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Delete the used authorization code
|
|
139
|
+
await oauthCodeState.remove({ id: code.id });
|
|
140
|
+
|
|
141
|
+
// Generate tokens
|
|
142
|
+
return generateTokens(client, code.userDid, code.scopes);
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
async exchangeRefreshToken(client, token, scopes) {
|
|
146
|
+
logger.info('exchangeRefreshToken', { client, token, scopes });
|
|
147
|
+
try {
|
|
148
|
+
const { did: userDid } = await verifySessionToken(token, info.secret, {
|
|
149
|
+
locale: 'en',
|
|
150
|
+
checkFromDb: true,
|
|
151
|
+
teamDid: blocklet.appDid,
|
|
152
|
+
checkToken: (t) => {
|
|
153
|
+
if (t.tokenType !== 'refresh') {
|
|
154
|
+
throw new Error(`invalid token type ${t.tokenType}`);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Generate new tokens
|
|
160
|
+
return generateTokens(client, userDid, scopes);
|
|
161
|
+
} catch (error) {
|
|
162
|
+
console.error('Failed to exchange refresh token:', error);
|
|
163
|
+
throw new Error('Invalid refresh token');
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
async verifyAccessToken(token) {
|
|
168
|
+
logger.info('verifyAccessToken', { token });
|
|
169
|
+
const { oauth, exp } = await verifySessionToken(token, info.secret, {
|
|
170
|
+
locale: 'en',
|
|
171
|
+
checkFromDb: true,
|
|
172
|
+
teamDid: blocklet.appDid,
|
|
173
|
+
checkToken: (t) => {
|
|
174
|
+
if (t.tokenType !== 'refresh') {
|
|
175
|
+
throw new Error(`invalid token type ${t.tokenType}`);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
token,
|
|
182
|
+
clientId: oauth.clientId,
|
|
183
|
+
scopes: oauth.scopes,
|
|
184
|
+
expiresAt: exp,
|
|
185
|
+
};
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
// eslint-disable-next-line no-unused-vars
|
|
189
|
+
revokeToken(client, token) {
|
|
190
|
+
throw new Error('Not implemented');
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
clientsStore: {
|
|
194
|
+
async getClient(clientId) {
|
|
195
|
+
const { oauthClientState } = await node.getOAuthState(blocklet.appDid);
|
|
196
|
+
const client = await oauthClientState.findOne({ clientId });
|
|
197
|
+
return client ? snakeCaseObject(client) : null;
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
async registerClient(client) {
|
|
201
|
+
logger.info('registerClient.start', { teamDid: blocklet.appDid, client });
|
|
202
|
+
const { oauthClientState } = await node.getOAuthState(blocklet.appDid);
|
|
203
|
+
const newClient = await oauthClientState.insert(camelCaseObject(client));
|
|
204
|
+
logger.info('registerClient.end', { teamDid: blocklet.appDid, newClient });
|
|
205
|
+
return snakeCaseObject(newClient);
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
module.exports = {
|
|
212
|
+
createBlockletOAuthServerProvider,
|
|
213
|
+
};
|
package/api/util/index.js
CHANGED
|
@@ -153,7 +153,7 @@ const getRedirectUrl = ({ req, pagePath, params = {} }) => {
|
|
|
153
153
|
* @callback CreateToken
|
|
154
154
|
* @param {string} did
|
|
155
155
|
* @param {object} params
|
|
156
|
-
* @param {{cacheTtl
|
|
156
|
+
* @param {{cacheTtl?: number|string; ttl?: number|string; didConnectVersion?: any}} options
|
|
157
157
|
* @returns {{sessionToken: string; refreshToken: string;}}
|
|
158
158
|
*/
|
|
159
159
|
|
package/api/util/user-util.js
CHANGED
|
@@ -2,11 +2,8 @@ const JWT = require('@arcblock/jwt');
|
|
|
2
2
|
const CustomError = require('@abtnode/util/lib/custom-error');
|
|
3
3
|
const { callFederated } = require('@abtnode/auth/lib/util/federated');
|
|
4
4
|
const { fromAppDid } = require('@arcblock/did-ext');
|
|
5
|
-
const sortBy = require('lodash/sortBy');
|
|
6
|
-
const pick = require('lodash/pick');
|
|
7
|
-
const last = require('lodash/last');
|
|
8
|
-
const { PASSPORT_STATUS, ROLES, SECURITY_RULE_DEFAULT_ID } = require('@abtnode/constant');
|
|
9
5
|
|
|
6
|
+
const { SECURITY_RULE_DEFAULT_ID, ROLES } = require('@abtnode/constant');
|
|
10
7
|
const { getApplicationInfo, messages } = require('@abtnode/auth/lib/auth');
|
|
11
8
|
const { extractUserAvatar, getAvatarByEmail, getUserAvatarUrl, getAvatarByUrl } = require('@abtnode/util/lib/user');
|
|
12
9
|
const getRequestIP = require('@abtnode/util/lib/get-request-ip');
|
|
@@ -92,22 +89,6 @@ const getUserFromSub = async (sub, { req }) => {
|
|
|
92
89
|
};
|
|
93
90
|
};
|
|
94
91
|
|
|
95
|
-
/**
|
|
96
|
-
* @description 获取上次使用的通行证
|
|
97
|
-
* @param {params} params
|
|
98
|
-
* @param {array} params.passports
|
|
99
|
-
* @returns {object} { id, name, role, scope }
|
|
100
|
-
*/
|
|
101
|
-
const getLastUsedPassport = ({ passports = [] }) => {
|
|
102
|
-
let result;
|
|
103
|
-
const validPassports = passports.filter((item) => item.status === PASSPORT_STATUS.VALID);
|
|
104
|
-
const lastUsedPassport = last(sortBy(validPassports, 'lastLoginAt'));
|
|
105
|
-
if (lastUsedPassport) {
|
|
106
|
-
result = pick(lastUsedPassport, ['id', 'name', 'role', 'scope']);
|
|
107
|
-
}
|
|
108
|
-
return result;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
92
|
const getAvatarBnByEmail = async (email, { req, node }) => {
|
|
112
93
|
if (!email) {
|
|
113
94
|
return defaultAvatar;
|
|
@@ -287,7 +268,6 @@ module.exports = {
|
|
|
287
268
|
getDefaultPassport,
|
|
288
269
|
getVerifyCodeFromReq,
|
|
289
270
|
getUserFromSub,
|
|
290
|
-
getLastUsedPassport,
|
|
291
271
|
getAvatarBnByEmail,
|
|
292
272
|
getAvatarBnByUrl,
|
|
293
273
|
getUserNameByEmail,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{_ as dt}from"./vendor-mui-core-DxD1UA4o.js";import{a as f}from"./vendor-utils-CTIzdAFg.js";import{e as Q,g as R}from"./vendor-react-DoD83n6N.js";import{P as ft}from"./vendor-ux-did-connect-DOjsg91L.js";import{b as ct}from"./vendor-mui-x-Bit8yv3W.js";var tt={exports:{}};(function(T,L){(function(l,c){T.exports=c()})(Q,function(){var l="week",c="year";return function(g,t,e){var s=t.prototype;s.week=function(i){if(i===void 0&&(i=null),i!==null)return this.add(7*(i-this.week()),"day");var o=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var n=e(this).startOf(c).add(1,c).date(o),d=e(this).endOf(l);if(n.isBefore(d))return 1}var m=e(this).startOf(c).date(o).startOf(l).subtract(1,"millisecond"),U=this.diff(m,l,!0);return U<0?e(this).startOf("week").week():Math.ceil(U)},s.weeks=function(i){return i===void 0&&(i=null),this.week(i)}}})})(tt);var lt=tt.exports;const mt=R(lt);var et={exports:{}};(function(T,L){(function(l,c){T.exports=c()})(Q,function(){var l={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},c=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,g=/\d/,t=/\d\d/,e=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,i={},o=function(r){return(r=+r)+(r>68?1900:2e3)},n=function(r){return function(a){this[r]=+a}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(r){(this.zone||(this.zone={})).offset=function(a){if(!a||a==="Z")return 0;var h=a.match(/([+-]|\d\d)/g),u=60*h[1]+(+h[2]||0);return u===0?0:h[0]==="+"?-u:u}(r)}],m=function(r){var a=i[r];return a&&(a.indexOf?a:a.s.concat(a.f))},U=function(r,a){var h,u=i.meridiem;if(u){for(var D=1;D<=24;D+=1)if(r.indexOf(u(D,0,a))>-1){h=D>12;break}}else h=r===(a?"pm":"PM");return h},rt={A:[s,function(r){this.afternoon=U(r,!1)}],a:[s,function(r){this.afternoon=U(r,!0)}],Q:[g,function(r){this.month=3*(r-1)+1}],S:[g,function(r){this.milliseconds=100*+r}],SS:[t,function(r){this.milliseconds=10*+r}],SSS:[/\d{3}/,function(r){this.milliseconds=+r}],s:[e,n("seconds")],ss:[e,n("seconds")],m:[e,n("minutes")],mm:[e,n("minutes")],H:[e,n("hours")],h:[e,n("hours")],HH:[e,n("hours")],hh:[e,n("hours")],D:[e,n("day")],DD:[t,n("day")],Do:[s,function(r){var a=i.ordinal,h=r.match(/\d+/);if(this.day=h[0],a)for(var u=1;u<=31;u+=1)a(u).replace(/\[|\]/g,"")===r&&(this.day=u)}],w:[e,n("week")],ww:[t,n("week")],M:[e,n("month")],MM:[t,n("month")],MMM:[s,function(r){var a=m("months"),h=(m("monthsShort")||a.map(function(u){return u.slice(0,3)})).indexOf(r)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[s,function(r){var a=m("months").indexOf(r)+1;if(a<1)throw new Error;this.month=a%12||a}],Y:[/[+-]?\d+/,n("year")],YY:[t,function(r){this.year=o(r)}],YYYY:[/\d{4}/,n("year")],Z:d,ZZ:d};function nt(r){var a,h;a=r,h=i&&i.formats;for(var u=(r=a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,k,p){var M=p&&p.toUpperCase();return k||h[p]||l[p]||h[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(x,j,z){return j||z.slice(1)})})).match(c),D=u.length,w=0;w<D;w+=1){var P=u[w],S=rt[P],Y=S&&S[0],O=S&&S[1];u[w]=O?{regex:Y,parser:O}:P.replace(/^\[|\]$/g,"")}return function(b){for(var k={},p=0,M=0;p<D;p+=1){var x=u[p];if(typeof x=="string")M+=x.length;else{var j=x.regex,z=x.parser,H=b.slice(M),A=j.exec(H)[0];z.call(k,A),b=b.replace(A,"")}}return function(C){var I=C.afternoon;if(I!==void 0){var y=C.hours;I?y<12&&(C.hours+=12):y===12&&(C.hours=0),delete C.afternoon}}(k),k}}return function(r,a,h){h.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(o=r.parseTwoDigitYear);var u=a.prototype,D=u.parse;u.parse=function(w){var P=w.date,S=w.utc,Y=w.args;this.$u=S;var O=Y[1];if(typeof O=="string"){var b=Y[2]===!0,k=Y[3]===!0,p=b||k,M=Y[2];k&&(M=Y[2]),i=this.$locale(),!b&&M&&(i=h.Ls[M]),this.$d=function(H,A,C,I){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*H);var y=nt(A)(H),W=y.year,B=y.month,it=y.day,at=y.hours,ot=y.minutes,ht=y.seconds,ut=y.milliseconds,X=y.zone,q=y.week,$=new Date,N=it||(W||B?1:$.getDate()),Z=W||$.getFullYear(),F=0;W&&!B||(F=B>0?B-1:$.getMonth());var E,v=at||0,V=ot||0,J=ht||0,_=ut||0;return X?new Date(Date.UTC(Z,F,N,v,V,J,_+60*X.offset*1e3)):C?new Date(Date.UTC(Z,F,N,v,V,J,_)):(E=new Date(Z,F,N,v,V,J,_),q&&(E=I(E).week(q).toDate()),E)}catch{return new Date("")}}(P,O,S,h),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),p&&P!=this.format(O)&&(this.$d=new Date("")),i={}}else if(O instanceof Array)for(var x=O.length,j=1;j<=x;j+=1){Y[1]=O[j-1];var z=h.apply(this,Y);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}j===x&&(this.$d=new Date(""))}else D.call(this,w)}}})})(et);var yt=et.exports;const Mt=R(yt);var st={exports:{}};(function(T,L){(function(l,c){T.exports=c()})(Q,function(){return function(l,c,g){c.prototype.isBetween=function(t,e,s,i){var o=g(t),n=g(e),d=(i=i||"()")[0]==="(",m=i[1]===")";return(d?this.isAfter(o,s):!this.isBefore(o,s))&&(m?this.isBefore(n,s):!this.isAfter(n,s))||(d?this.isBefore(o,s):!this.isAfter(o,s))&&(m?this.isAfter(n,s):!this.isBefore(n,s))}}})})(st);var pt=st.exports;const Tt=R(pt);f.extend(Mt);f.extend(ft);f.extend(Tt);const gt=ct(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),Dt={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},wt={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},G=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
|
|
2
|
+
`),K=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
|
|
3
|
+
`),Yt=(T,L)=>L?(...l)=>T(...l).locale(L):T;class bt{constructor({locale:L,formats:l,instance:c}={}){var g;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=Dt,this.setLocaleToValue=t=>{const e=this.getCurrentLocaleCode();return e===t.locale()?t:t.locale(e)},this.hasUTCPlugin=()=>typeof f.utc<"u",this.hasTimezonePlugin=()=>typeof f.tz<"u",this.isSame=(t,e,s)=>{const i=this.setTimezone(e,this.getTimezone(t));return t.format(s)===i.format(s)},this.cleanTimezone=t=>{switch(t){case"default":return;case"system":return f.tz.guess();default:return t}},this.createSystemDate=t=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(t);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const e=f.tz.guess();return e!=="UTC"?f.tz(t,e):f(t)}return f(t)},this.createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(G);return f.utc(t)},this.createTZDate=(t,e)=>{if(!this.hasUTCPlugin())throw new Error(G);if(!this.hasTimezonePlugin())throw new Error(K);const s=t!==void 0&&!t.endsWith("Z");return f(t).tz(this.cleanTimezone(e),s)},this.getLocaleFormats=()=>{const t=f.Ls,e=this.locale||"en";let s=t[e];return s===void 0&&(gt(),s=t.en),s.formats},this.adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const e=this.getTimezone(t);if(e!=="UTC"){var s,i;const o=t.tz(this.cleanTimezone(e),!0);if(((s=o.$offset)!=null?s:0)===((i=t.$offset)!=null?i:0))return t;t.$offset=o.$offset}return t},this.date=t=>t===null?null:this.dayjs(t),this.dateWithTimezone=(t,e)=>{if(t===null)return null;let s;return e==="UTC"?s=this.createUTCDate(t):e==="system"||e==="default"&&!this.hasTimezonePlugin()?s=this.createSystemDate(t):s=this.createTZDate(t,e),this.locale===void 0?s:s.locale(this.locale)},this.getTimezone=t=>{if(this.hasTimezonePlugin()){var e;const s=(e=t.$x)==null?void 0:e.$timezone;if(s)return s}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"},this.setTimezone=(t,e)=>{if(this.getTimezone(t)===e)return t;if(e==="UTC"){if(!this.hasUTCPlugin())throw new Error(G);return t.utc()}if(e==="system")return t.local();if(!this.hasTimezonePlugin()){if(e==="default")return t;throw new Error(K)}return f.tz(t,this.cleanTimezone(e))},this.toJsDate=t=>t.toDate(),this.parseISO=t=>this.dayjs(t),this.toISO=t=>t.toISOString(),this.parse=(t,e)=>t===""?null:this.dayjs(t,e,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=t=>{const e=this.getLocaleFormats(),s=i=>i.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(o,n,d)=>n||d.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(i,o,n)=>{const d=n&&n.toUpperCase();return o||e[n]||s(e[d])})},this.getFormatHelperText=t=>this.expandFormat(t).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=t=>t===null,this.isValid=t=>this.dayjs(t).isValid(),this.format=(t,e)=>this.formatByString(t,this.formats[e]),this.formatByString=(t,e)=>this.dayjs(t).format(e),this.formatNumber=t=>t,this.getDiff=(t,e,s)=>t.diff(e,s),this.isEqual=(t,e)=>t===null&&e===null?!0:this.dayjs(t).toDate().getTime()===this.dayjs(e).toDate().getTime(),this.isSameYear=(t,e)=>this.isSame(t,e,"YYYY"),this.isSameMonth=(t,e)=>this.isSame(t,e,"YYYY-MM"),this.isSameDay=(t,e)=>this.isSame(t,e,"YYYY-MM-DD"),this.isSameHour=(t,e)=>t.isSame(e,"hour"),this.isAfter=(t,e)=>t>e,this.isAfterYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()>e.utc():t.isAfter(e,"year"),this.isAfterDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()>e.utc():t.isAfter(e,"day"),this.isBefore=(t,e)=>t<e,this.isBeforeYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()<e.utc():t.isBefore(e,"year"),this.isBeforeDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()<e.utc():t.isBefore(e,"day"),this.isWithinRange=(t,[e,s])=>t>=e&&t<=s,this.startOfYear=t=>this.adjustOffset(t.startOf("year")),this.startOfMonth=t=>this.adjustOffset(t.startOf("month")),this.startOfWeek=t=>this.adjustOffset(t.startOf("week")),this.startOfDay=t=>this.adjustOffset(t.startOf("day")),this.endOfYear=t=>this.adjustOffset(t.endOf("year")),this.endOfMonth=t=>this.adjustOffset(t.endOf("month")),this.endOfWeek=t=>this.adjustOffset(t.endOf("week")),this.endOfDay=t=>this.adjustOffset(t.endOf("day")),this.addYears=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"year"):t.add(e,"year")),this.addMonths=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"month"):t.add(e,"month")),this.addWeeks=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"week"):t.add(e,"week")),this.addDays=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"day"):t.add(e,"day")),this.addHours=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"hour"):t.add(e,"hour")),this.addMinutes=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"minute"):t.add(e,"minute")),this.addSeconds=(t,e)=>this.adjustOffset(e<0?t.subtract(Math.abs(e),"second"):t.add(e,"second")),this.getYear=t=>t.year(),this.getMonth=t=>t.month(),this.getDate=t=>t.date(),this.getHours=t=>t.hour(),this.getMinutes=t=>t.minute(),this.getSeconds=t=>t.second(),this.getMilliseconds=t=>t.millisecond(),this.setYear=(t,e)=>this.adjustOffset(t.set("year",e)),this.setMonth=(t,e)=>this.adjustOffset(t.set("month",e)),this.setDate=(t,e)=>this.adjustOffset(t.set("date",e)),this.setHours=(t,e)=>this.adjustOffset(t.set("hour",e)),this.setMinutes=(t,e)=>this.adjustOffset(t.set("minute",e)),this.setSeconds=(t,e)=>this.adjustOffset(t.set("second",e)),this.setMilliseconds=(t,e)=>this.adjustOffset(t.set("millisecond",e)),this.getDaysInMonth=t=>t.daysInMonth(),this.getNextMonth=t=>this.addMonths(t,1),this.getPreviousMonth=t=>this.addMonths(t,-1),this.getMonthArray=t=>{const s=[t.startOf("year")];for(;s.length<12;){const i=s[s.length-1];s.push(this.addMonths(i,1))}return s},this.mergeDateAndTime=(t,e)=>t.hour(e.hour()).minute(e.minute()).second(e.second()),this.getWeekdays=()=>{const t=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(e=>this.formatByString(this.addDays(t,e),"dd"))},this.getWeekArray=t=>{const e=this.setLocaleToValue(t),s=e.startOf("month").startOf("week"),i=e.endOf("month").endOf("week");let o=0,n=s;const d=[];for(;n<i;){const m=Math.floor(o/7);d[m]=d[m]||[],d[m].push(n),n=this.addDays(n,1),o+=1}return d},this.getWeekNumber=t=>t.week(),this.getYearRange=(t,e)=>{const s=t.startOf("year"),i=e.endOf("year"),o=[];let n=s;for(;n<i;)o.push(n),n=this.addYears(n,1);return o},this.getMeridiemText=t=>t==="am"?"AM":"PM",this.rawDayJsInstance=c,this.dayjs=Yt((g=this.rawDayJsInstance)!=null?g:f,L),this.locale=L,this.formats=dt({},wt,l),f.extend(mt)}}export{bt as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as e,j as t}from"./vendor-mui-core-DxD1UA4o.js";import{r as a}from"./vendor-ux-did-connect-DOjsg91L.js";var r={},o=e;Object.defineProperty(r,"__esModule",{value:!0});var u=r.default=void 0,i=o(a()),p=t;u=r.default=(0,i.default)((0,p.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");export{u as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as r,j as t}from"./vendor-mui-core-DxD1UA4o.js";import{r as a}from"./vendor-ux-did-connect-DOjsg91L.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(a()),l=t;u=e.default=(0,i.default)((0,l.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");export{u as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as r,j as t}from"./vendor-mui-core-DxD1UA4o.js";import{r as a}from"./vendor-ux-did-connect-DOjsg91L.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,f=o(a()),i=t;u=e.default=(0,f.default)((0,i.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");export{u as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a8 as r,j as t}from"./vendor-mui-core-DxD1UA4o.js";import{r as a}from"./vendor-ux-did-connect-DOjsg91L.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(a()),v=t;u=e.default=(0,i.default)((0,v.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");export{u as d};
|