@abtnode/blocklet-services 1.16.43-beta-20250420-132156-d732158a → 1.16.43-beta-20250422-042711-c40bec75
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/services/auth/connect/gen-access-key.js +9 -2
- package/api/services/auth/session.js +7 -4
- package/dist/assets/{AdapterDayjs-Bq_2AanQ.js → AdapterDayjs-DcprbhsV.js} +1 -1
- package/dist/assets/{ArrowDropDown-CnO3M65x.js → ArrowDropDown-BHNhtNqo.js} +1 -1
- package/dist/assets/{CheckCircle-vHBx3yBd.js → CheckCircle-C7lAzkFm.js} +1 -1
- package/dist/assets/{ChevronLeft-J2DjxamT.js → ChevronLeft-fcaEvvT2.js} +1 -1
- package/dist/assets/{ChevronRight-CbbryV_W.js → ChevronRight-BWcj-otI.js} +1 -1
- package/dist/assets/{Community-eISlOOkV.js → Community-BXFIKoZW.js} +1 -1
- package/dist/assets/{DeleteOutline-D3rMfe5l.js → DeleteOutline-CMgoFNHT.js} +1 -1
- package/dist/assets/{Done-BKjm-wNl.js → Done-CkkNExgL.js} +1 -1
- package/dist/assets/{Download-dWBmoIIz.js → Download-B1KcU2Zd.js} +1 -1
- package/dist/assets/{Edit-BsIdXKZ9.js → Edit-C-ChSGAK.js} +1 -1
- package/dist/assets/{EditIcon-CQgpOLLT.js → EditIcon-BRKobKzh.js} +1 -1
- package/dist/assets/{Email-BWTg6iJI.js → Email-7cDhevM1.js} +1 -1
- package/dist/assets/{Error-BhDI-TWw.js → Error-Du9QXuYs.js} +1 -1
- package/dist/assets/{ExpandLess-ap4H2881.js → ExpandLess-Cdn0T-U2.js} +1 -1
- package/dist/assets/{Google-yY5m8tgo.js → Google-3Ox3gIL3.js} +1 -1
- package/dist/assets/{Holiday-C3bRTVlx.js → Holiday-BtexoPxk.js} +1 -1
- package/dist/assets/{InfoOutlined-xdatqyfu.js → InfoOutlined-ZIQMeu0p.js} +1 -1
- package/dist/assets/{Launch-C6_9RwNa.js → Launch-qJWNGQwX.js} +1 -1
- package/dist/assets/{LaunchOutlined-CG63jbPx.js → LaunchOutlined-BVUDVgft.js} +1 -1
- package/dist/assets/LoadingButton-D_tuQuaP.js +1 -0
- package/dist/assets/{Location-C_mUMqZP.js → Location-BF9BwrVf.js} +1 -1
- package/dist/assets/{LockIcon-G8zLxYzV.js → LockIcon-L5QI4AoC.js} +1 -1
- package/dist/assets/{Meeting-vvmUKHs1.js → Meeting-gc3Ts6jN.js} +1 -1
- package/dist/assets/{MoreHoriz-ylsvAqcI.js → MoreHoriz-ByNTWUxY.js} +1 -1
- package/dist/assets/{OffSick-BTxtVws3.js → OffSick-_EZgqU01.js} +1 -1
- package/dist/assets/{Phone-Cz_yY8ed.js → Phone-oJLFEdfI.js} +1 -1
- package/dist/assets/{PlayArrow-B-b0Dvp8.js → PlayArrow-rSzT1Thf.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-DeAbZuzW.js → QuestionMarkCircle-Cw7EtCDd.js} +1 -1
- package/dist/assets/{ServerLogo-UZVUmHWK.js → ServerLogo-zdbLsMaw.js} +1 -1
- package/dist/assets/{Timezone-5RxC7sK-.js → Timezone-BtCtoEo9.js} +1 -1
- package/dist/assets/{TuneOutlined-DJ2Nw9gU.js → TuneOutlined-BnxAi8kP.js} +1 -1
- package/dist/assets/{ViewList-DYqpQSjn.js → ViewList-DbzNMeex.js} +1 -1
- package/dist/assets/{WorkingRemotely-_QD8QN72.js → WorkingRemotely-YBya8rZT.js} +1 -1
- package/dist/assets/{access-control-DcIGjdcM.js → access-control-q2DA79L8.js} +1 -1
- package/dist/assets/actions-J8MFA_6y.js +1 -0
- package/dist/assets/{add-component-core-BpT5fbHq.js → add-component-core-IYRc9eac.js} +24 -24
- package/dist/assets/{add-resource-BVgzn5lM.js → add-resource-8w2aCwfA.js} +1 -1
- package/dist/assets/{addon-DXuj5GtV.js → addon-BQEpbqTR.js} +1 -1
- package/dist/assets/{advanced-CIJNFJAE.js → advanced-CX8tZItX.js} +1 -1
- package/dist/assets/api-BrU7j0QA.js +1 -0
- package/dist/assets/{appearance-CCLVRyLq.js → appearance-C5895lZP.js} +1 -1
- package/dist/assets/{audit-logs-brXiMrw_.js → audit-logs-DukS3LSM.js} +3 -3
- package/dist/assets/authorize-CEHLfOxJ.js +1 -0
- package/dist/assets/{base32-Dd6rPCV6.js → base32--dljmFCF.js} +1 -1
- package/dist/assets/{branding-31ZnkyoG.js → branding-Abk6CVlX.js} +1 -1
- package/dist/assets/branding-Cczews7F.js +40 -0
- package/dist/assets/bundle-avatar-DFwyxj9P.js +1 -0
- package/dist/assets/button-CJk6Iiza.js +1 -0
- package/dist/assets/click-to-copy-CbKZyfyr.js +1 -0
- package/dist/assets/cloneDeep-SfcdeqEN.js +1 -0
- package/dist/assets/{complete-Cpcoq6Ge.js → complete-ejUOC1cY.js} +2 -2
- package/dist/assets/{component-Djsamap6.js → component-BOLQzzEI.js} +2 -2
- package/dist/assets/{config-BK2qWQnO.js → config-Bv0DcfgY.js} +2 -2
- package/dist/assets/{config-BQ9p6EgE.js → config-efFznM9P.js} +1 -1
- package/dist/assets/{config-navigation-D2PpiTzz.js → config-navigation-1cuUaRsL.js} +6 -6
- package/dist/assets/{config-space-BFcXXNuJ.js → config-space-DEku2tJv.js} +1 -1
- package/dist/assets/confirm-miQS3Z1c.js +7 -0
- package/dist/assets/connect-0B3z_kZV.js +5 -0
- package/dist/assets/{connect-rWOVXBvz.js → connect-OYujfpaQ.js} +1 -1
- package/dist/assets/connect-to-C-vFK0ym.js +1 -0
- package/dist/assets/{content-layout-Cg5RRv1R.js → content-layout-JixQ7owc.js} +1 -1
- package/dist/assets/dashboard-C9tAGBV0.js +280 -0
- package/dist/assets/{delete-confirm-B2Ye1_SC.js → delete-confirm-kKb8VxbQ.js} +1 -1
- package/dist/assets/{did-address-gmPYOGuy.js → did-address-DNf_-NM-.js} +1 -1
- package/dist/assets/domain-RAN90v9n.js +9 -0
- package/dist/assets/domain-action-card-BNybk5kq.js +25 -0
- package/dist/assets/domains-B51g2OQM.js +1 -0
- package/dist/assets/dot-xwsgXXMo.js +7 -0
- package/dist/assets/{email-BAajjNQV.js → email-CBFKGDtB.js} +3 -3
- package/dist/assets/{empty-spinner-yzHJfTIe.js → empty-spinner-Rr_2DR73.js} +1 -1
- package/dist/assets/{exchange-passport-EldPKAEU.js → exchange-passport-2U7cUaM-.js} +1 -1
- package/dist/assets/{format-error-LAoTjvJe.js → format-error-BrmqJs5a.js} +1 -1
- package/dist/assets/{fuel-g6aTZdFA.js → fuel-Ctl6kh4M.js} +1 -1
- package/dist/assets/{gen-access-key-CXCl8SEM.js → gen-access-key-CIrRotRy.js} +2 -2
- package/dist/assets/{get-safe-url-BpQyWsMx.js → get-safe-url-BXaepgsm.js} +1 -1
- package/dist/assets/{get-safe-url-DGJYpGp-.js → get-safe-url-MZ-ksvtD.js} +1 -1
- package/dist/assets/{home-DBeMBDeM.js → home-C2Bgs4zS.js} +1 -1
- package/dist/assets/{iframe-DTWkOiY8.js → iframe-oHkt22fl.js} +1 -1
- package/dist/assets/{index-Bh63LaOx.js → index-51ncOoae.js} +2 -2
- package/dist/assets/{index-BY0gjHeR.js → index-B1-S-x6B.js} +32 -32
- package/dist/assets/{index-D7Oq5q89.js → index-B1EwWGHW.js} +4 -4
- package/dist/assets/index-B1ljmpu4.css +1 -0
- package/dist/assets/{index-C9TPKuLt.js → index-BRXM9-_y.js} +1 -1
- package/dist/assets/{index-C8lvmI4i.js → index-BT3gX_Gs.js} +1 -1
- package/dist/assets/{index-Cg_v1vT_.js → index-BWx6ivvZ.js} +650 -55
- package/dist/assets/{index-lk2RMFv-.js → index-BaU0U5xc.js} +10 -10
- package/dist/assets/index-BiIKWZTs.js +113 -0
- package/dist/assets/{index-B0Z8409R.js → index-C3XAI9I7.js} +1 -1
- package/dist/assets/{index-C6wFIF6L.js → index-C7UL-KG1.js} +2 -2
- package/dist/assets/{index-BGnWzg98.js → index-CILVFQJH.js} +4 -4
- package/dist/assets/{index-B1r8E4TH.js → index-CNpN35y4.js} +1 -1
- package/dist/assets/{index-pV_0wOyY.js → index-CPE8Apzb.js} +1 -1
- package/dist/assets/{index-haYY8BAk.js → index-CYeIiQ6Q.js} +1 -1
- package/dist/assets/index-CzzLOOSx.js +55 -0
- package/dist/assets/{index-BkHi7e8i.js → index-DGPhY8xp.js} +2 -2
- package/dist/assets/{index-DhAVA9HZ.js → index-DHdYd4nT.js} +3 -3
- package/dist/assets/index-DHjPgdgK.js +1 -0
- package/dist/assets/{index-CEMXycV7.js → index-DQc29-JM.js} +1 -1
- package/dist/assets/{index-tUQxVYYQ.js → index-DVQCgvFb.js} +1 -1
- package/dist/assets/{index-CgtY16Wm.js → index-DhGZEbPZ.js} +1 -1
- package/dist/assets/index-Ds7z-vG7.js +10 -0
- package/dist/assets/{index-BfbxxLBr.js → index-GJgyTjK2.js} +9 -9
- package/dist/assets/{index-Xi3jaVFs.js → index-Hl4sXXdc.js} +1 -1
- package/dist/assets/{index-BjmnM2sd.js → index-ILkKQT7G.js} +1 -1
- package/dist/assets/{index-kqlC8JFQ.js → index-YbJjfDTR.js} +1 -1
- package/dist/assets/{index-KWGv7rf_.js → index-qcSTfn8X.js} +2 -2
- package/dist/assets/{invitation-DnZ_Ex8p.js → invitation-CPSru_8S.js} +5 -5
- package/dist/assets/invite-DquuAqEb.js +1 -0
- package/dist/assets/issue-passport-DW27M9Fi.js +1 -0
- package/dist/assets/{item-VCJ7-Z3r.js → item-CdEFLc19.js} +1 -1
- package/dist/assets/{landing-page-QhzHIr--.js → landing-page-DPD1zNWJ.js} +1 -1
- package/dist/assets/{launch-result-message-Ckk5lRW7.js → launch-result-message-yorrVgpQ.js} +1 -1
- package/dist/assets/{layout-0YBKzIlI.js → layout-DBsOgAhr.js} +1 -1
- package/dist/assets/{list-Dw9DDKoC.js → list-BNd4p4TF.js} +9 -8
- package/dist/assets/{list-header-BYlc5SI1.js → list-header-BTUducS9.js} +1 -1
- package/dist/assets/localization-CS7BsCef.js +1 -0
- package/dist/assets/{log-BLTzXOlE.js → log-R8TIkchf.js} +1 -1
- package/dist/assets/logger-d2Lh_KCF.js +1 -0
- package/dist/assets/{login-tmff27IK.js → login-Dgvm6HMJ.js} +1 -1
- package/dist/assets/{login-oauth-callback-DnYvzeVx.js → login-oauth-callback-rmUYgE44.js} +1 -1
- package/dist/assets/logo-uploader-Bv2ZSxJV.js +133 -0
- package/dist/assets/{lost-passport-DiKkPtUB.js → lost-passport-CiVM9B2L.js} +4 -4
- package/dist/assets/{lottie-react.esm-CPHH620R.js → lottie-react.esm-D2t-u0YU.js} +1 -1
- package/dist/assets/{lottie-web-B6s7dDoL.js → lottie-web-jYmAQWuC.js} +1 -1
- package/dist/assets/omit-bLid3PKQ.js +1 -0
- package/dist/assets/{open-window-DjL5TW3X.js → open-window-D2wkW326.js} +1 -1
- package/dist/assets/{overview-zOWtcWbm.js → overview-C_fDcPQA.js} +2 -2
- package/dist/assets/{page-header-BhpaMk9g.js → page-header-C86YQnHE.js} +1 -1
- package/dist/assets/{passport-item-Cxkhzo-W.js → passport-item-C4X2VZeo.js} +1 -1
- package/dist/assets/{permission-_ttLx53e.js → permission-CbDCh9eS.js} +1 -1
- package/dist/assets/preferences-Cdzon7pe.js +1 -0
- package/dist/assets/profile-embed-Dr2ZxkvM.js +1 -0
- package/dist/assets/publish-resource-DumHfLtC.js +1 -0
- package/dist/assets/{raf-schd.esm-GV-XhwE0.js → raf-schd.esm-B3j6BePR.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-gUY08qHq.js → react-beautiful-dnd.esm-kcYalw4r.js} +1 -1
- package/dist/assets/{relative-time-DYjTOclf.js → relative-time-Dkz5qmEb.js} +1 -1
- package/dist/assets/runtime-HBzWjxDb.js +1 -0
- package/dist/assets/sdk-DuZx5LYY.js +1 -0
- package/dist/assets/{security-BD2-azah.js → security-BFBpBlQy.js} +4 -4
- package/dist/assets/session-CdQbSkeB.js +1 -0
- package/dist/assets/setup-BSfklNq4.js +19 -0
- package/dist/assets/{shorten-label-8jfEkawx.js → shorten-label-Dz7RgJfj.js} +1 -1
- package/dist/assets/{simple-select-CNZc1N7Q.js → simple-select-BlUQXxNL.js} +1 -1
- package/dist/assets/{slicedToArray-gyBkcGHe.js → slicedToArray-lOWXD6Th.js} +1 -1
- package/dist/assets/{spaces-B_YG3iE7.js → spaces-CcTi9vap.js} +1 -1
- package/dist/assets/{start-DIhK4VNY.js → start-BitVK7fH.js} +1 -1
- package/dist/assets/{status-CQCKGmiV.js → status-F7OR8ZWk.js} +1 -1
- package/dist/assets/{step-actions-DGcZdY1e.js → step-actions-Cmh5n2jE.js} +1 -1
- package/dist/assets/{studio-CC8lU96f.js → studio-CW2bLcBh.js} +1 -1
- package/dist/assets/{switch-control-BWuo2NQH.js → switch-control-BjOmRKBW.js} +1 -1
- package/dist/assets/{traffic-BIz-TYy2.js → traffic-CcfffSvS.js} +2 -2
- package/dist/assets/{transfer-OroSS_fF.js → transfer-DHcMO-R4.js} +1 -1
- package/dist/assets/{unsubscribe-cKpP6HeV.js → unsubscribe-DnPmucfC.js} +1 -1
- package/dist/assets/{use-app-logo-C5KrAQp3.js → use-app-logo-DnfizCGM.js} +1 -1
- package/dist/assets/{use-mobile-BbxjRR_q.js → use-mobile-Bgy7gTTP.js} +1 -1
- package/dist/assets/{use-mobile-T-9_nK_m.js → use-mobile-CcdVxg80.js} +1 -1
- package/dist/assets/useAsync-70zHrUMr.js +1 -0
- package/dist/assets/useAsync-BquSRC77.js +1 -0
- package/dist/assets/{useLocalStorage-BTc2ONSy.js → useLocalStorage-BJb7uGDO.js} +1 -1
- package/dist/assets/{useSetState-BL3ktMon.js → useSetState-CWq0AVWn.js} +1 -1
- package/dist/assets/user-center-u43jJYr4.js +77 -0
- package/dist/assets/{util-DA84MxE0.js → util-BYLEVYA_.js} +1 -1
- package/dist/assets/{util-Dvapjz4O.js → util-CJbxj6IE.js} +1 -1
- package/dist/assets/{vendor-arcblock-Dd-d3bxC.js → vendor-arcblock-CWji6U03.js} +300 -300
- package/dist/assets/{vendor-hooks-jg6xPUPF.js → vendor-hooks-DftG_2gV.js} +2 -2
- package/dist/assets/{vendor-mui-core-DiDsSLd-.js → vendor-mui-core-CfA4EdRA.js} +26 -26
- package/dist/assets/{vendor-mui-x-mVhD3N7n.js → vendor-mui-x-DSNWmGVo.js} +1 -1
- package/dist/assets/{vendor-react-DoD83n6N.js → vendor-react-DEoibe3W.js} +1 -1
- package/dist/assets/vendor-utils-BNHJB5U7.js +208 -0
- package/dist/assets/vendor-ux-did-connect-zBIy2ulO.js +2265 -0
- package/dist/assets/{wrap-locale-CyEJqSC4.js → wrap-locale-BSYWBgCo.js} +1 -1
- package/dist/assets/zh-_GYrLCB8.js +1 -0
- package/dist/index.html +9 -8
- package/dist/service-worker.js +1 -1
- package/package.json +30 -29
- package/dist/assets/actions-54wIQrhQ.js +0 -1
- package/dist/assets/api-DwjKcjK8.js +0 -1
- package/dist/assets/authorize-DVVvHvmA.js +0 -1
- package/dist/assets/branding-CY0aknSo.js +0 -40
- package/dist/assets/bundle-avatar-BcZExfqu.js +0 -1
- package/dist/assets/button-Cfb46ee0.js +0 -1
- package/dist/assets/click-to-copy-D4Cmyemb.js +0 -1
- package/dist/assets/cloneDeep-DUYD8ZBI.js +0 -1
- package/dist/assets/confirm-Bi4_XwxH.js +0 -7
- package/dist/assets/connect-Bzett2rh.js +0 -5
- package/dist/assets/connect-to-nP4HS-Z0.js +0 -1
- package/dist/assets/dashboard-27JnEnGY.js +0 -279
- package/dist/assets/domain-5-nsJfDM.js +0 -9
- package/dist/assets/domain-action-card-DrjkSQwC.js +0 -25
- package/dist/assets/domains-CD91MGQk.js +0 -1
- package/dist/assets/dot-BBxUn__M.js +0 -7
- package/dist/assets/index-B-h0rpyF.js +0 -10
- package/dist/assets/index-BeXUaMlG.js +0 -55
- package/dist/assets/index-Ca99ESdg.js +0 -1
- package/dist/assets/index-o53rWfYr.js +0 -113
- package/dist/assets/invite-BC0OYJxG.js +0 -1
- package/dist/assets/issue-passport-CD5ylk7Y.js +0 -1
- package/dist/assets/localization-Bqeaav45.js +0 -1
- package/dist/assets/logger-DzZIANXq.js +0 -1
- package/dist/assets/logo-uploader-BKxncdN2.js +0 -133
- package/dist/assets/omit-B1LDXfkq.js +0 -1
- package/dist/assets/preferences-C0eu3vgg.js +0 -1
- package/dist/assets/profile-embed-DfDaKcjJ.js +0 -1
- package/dist/assets/publish-resource-BEIDgQwd.js +0 -1
- package/dist/assets/runtime-B8E7DTqn.js +0 -1
- package/dist/assets/sdk-K0wUtuBQ.js +0 -1
- package/dist/assets/session-BPop7wxF.js +0 -1
- package/dist/assets/setup-DW_rcwsG.js +0 -19
- package/dist/assets/useAsync-B_98ShEr.js +0 -1
- package/dist/assets/user-center-DGFt0-Nt.js +0 -77
- package/dist/assets/vendor-utils-DMClavLd.js +0 -11
- package/dist/assets/vendor-ux-did-connect-qEfzi7sf.js +0 -1832
- package/dist/assets/zh-yJzqRkfw.js +0 -1
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-BLTzXOlE.js","assets/vendor-mui-core-DiDsSLd-.js","assets/vendor-react-DoD83n6N.js","assets/useLocalStorage-BTc2ONSy.js","assets/vendor-ux-did-connect-qEfzi7sf.js","assets/vendor-utils-DMClavLd.js","assets/vendor-hooks-jg6xPUPF.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-Cg_v1vT_.js","assets/vendor-arcblock-Dd-d3bxC.js","assets/Download-dWBmoIIz.js","assets/bundle-avatar-BcZExfqu.js","assets/log-D33dFtt_.css","assets/index-BY0gjHeR.js","assets/ViewList-DYqpQSjn.js","assets/index-B-h0rpyF.js","assets/Location-C_mUMqZP.js","assets/Email-BWTg6iJI.js","assets/Timezone-5RxC7sK-.js","assets/did-address-gmPYOGuy.js","assets/permission-_ttLx53e.js","assets/session-BPop7wxF.js","assets/click-to-copy-D4Cmyemb.js","assets/index-C8lvmI4i.js","assets/vendor-mui-x-mVhD3N7n.js","assets/AdapterDayjs-Bq_2AanQ.js","assets/format-error-LAoTjvJe.js","assets/useAsync-B_98ShEr.js","assets/index-C6wFIF6L.js","assets/DeleteOutline-D3rMfe5l.js","assets/confirm-Bi4_XwxH.js","assets/util-Dvapjz4O.js","assets/base32-Dd6rPCV6.js","assets/sdk-K0wUtuBQ.js","assets/actions-54wIQrhQ.js","assets/MoreHoriz-ylsvAqcI.js","assets/shorten-label-8jfEkawx.js","assets/PlayArrow-B-b0Dvp8.js","assets/get-safe-url-DGJYpGp-.js","assets/index-Xi3jaVFs.js","assets/InfoOutlined-xdatqyfu.js","assets/dot-BBxUn__M.js","assets/useSetState-BL3ktMon.js","assets/use-mobile-T-9_nK_m.js","assets/index-BkHi7e8i.js","assets/ExpandLess-ap4H2881.js","assets/index-lk2RMFv-.js","assets/Error-BhDI-TWw.js","assets/empty-spinner-yzHJfTIe.js","assets/list-header-BYlc5SI1.js","assets/QuestionMarkCircle-DeAbZuzW.js","assets/index-tUQxVYYQ.js","assets/index-B0Z8409R.js","assets/api-DwjKcjK8.js","assets/ChevronRight-CbbryV_W.js","assets/react-beautiful-dnd.esm-gUY08qHq.js","assets/raf-schd.esm-GV-XhwE0.js","assets/item-VCJ7-Z3r.js","assets/Launch-C6_9RwNa.js","assets/Done-BKjm-wNl.js","assets/delete-confirm-B2Ye1_SC.js","assets/ArrowDropDown-CnO3M65x.js","assets/index-CEMXycV7.js","assets/index-C0Iiqot3.css","assets/index-BjmnM2sd.js","assets/overview-zOWtcWbm.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-CQCKGmiV.js","assets/omit-B1LDXfkq.js","assets/spaces-B_YG3iE7.js","assets/domains-CD91MGQk.js","assets/domain-action-card-DrjkSQwC.js","assets/util-DA84MxE0.js","assets/CheckCircle-vHBx3yBd.js","assets/index-BfbxxLBr.js","assets/passport-item-Cxkhzo-W.js","assets/Google-yY5m8tgo.js","assets/cloneDeep-DUYD8ZBI.js","assets/EditIcon-CQgpOLLT.js","assets/LockIcon-G8zLxYzV.js","assets/appearance-CCLVRyLq.js","assets/audit-logs-brXiMrw_.js","assets/relative-time-DYjTOclf.js","assets/index-o53rWfYr.js","assets/list-Dw9DDKoC.js","assets/use-app-logo-C5KrAQp3.js","assets/traffic-BIz-TYy2.js","assets/iframe-DTWkOiY8.js","assets/LaunchOutlined-CG63jbPx.js","assets/ChevronLeft-J2DjxamT.js","assets/index-CgtY16Wm.js","assets/config-navigation-D2PpiTzz.js","assets/index-kqlC8JFQ.js","assets/slicedToArray-gyBkcGHe.js","assets/simple-select-CNZc1N7Q.js","assets/index-Bh63LaOx.js","assets/use-mobile-BbxjRR_q.js","assets/connect-to-nP4HS-Z0.js","assets/config-space-BFcXXNuJ.js","assets/index-haYY8BAk.js","assets/switch-control-BWuo2NQH.js","assets/index-BeXUaMlG.js","assets/security-BD2-azah.js","assets/config-BQ9p6EgE.js","assets/branding-31ZnkyoG.js","assets/logo-uploader-BKxncdN2.js","assets/advanced-CIJNFJAE.js","assets/runtime-B8E7DTqn.js","assets/index-BGnWzg98.js","assets/Edit-BsIdXKZ9.js","assets/component-Djsamap6.js","assets/TuneOutlined-DJ2Nw9gU.js","assets/add-component-core-BpT5fbHq.js","assets/launch-result-message-Ckk5lRW7.js","assets/page-header-BhpaMk9g.js","assets/index-KWGv7rf_.js","assets/content-layout-Cg5RRv1R.js","assets/add-component-core-D-IRi6XF.css","assets/index-C9TPKuLt.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as $e,u as bn,p as ho,h as $t,f as _n,b as wn,e as mo,i as go,g as xo,m as yo,j as $s,D as vo,E as bo,k as _o,H as wo,_ as X,R as jo}from"./vendor-arcblock-Dd-d3bxC.js";import{H as D,j as o,a8 as je,ag as me,I as Yt,ap as So,aj as jn,X as Wr,q as Co,b4 as Ao,a9 as qe,b5 as Eo,bw as To,T as ue,bu as Ro,bs as xt,bv as Us,aa as N,bF as ko,v as Fe,a5 as Xt,bG as Io,ac as Do,bi as Lo,ao as Kr,bH as Sn,ab as yt,bI as Po,aq as Fo,ah as Oo,ak as Ut,O as Le,bt as Ar,bo as Ne,bJ as Cn,bK as An,bL as En,E as Ge,b3 as Tn,bk as Vo}from"./vendor-mui-core-DiDsSLd-.js";import{r as P,L as Rn,k as kn,b as B,g as In,u as Mo,l as No}from"./vendor-react-DoD83n6N.js";import{r as Se,b3 as $o,b1 as er,b4 as Uo,B as Je,p as ne,a1 as Bs,Y as re,u as ye,an as Bo,v as Dn,o as Gr,q as zo,d as Ho,W as Qr,aW as qo,a4 as Ln,ar as Pn,b5 as Wo,h as Ko,C as Bt,b6 as Go,b7 as Qo,_ as Zo,al as Jo}from"./vendor-ux-did-connect-qEfzi7sf.js";import{z as at,f as pe,A as cr,B as Yo,b as Xo,C as Zr,D as ea,E as Fn,t as st,F as On,G as ta,n as lt,H as ra,I as sa,j as zs,g as na,h as ia,l as Hs,k as oa,m as aa,J as Lt,e as Tt,K as la,L as ca,M as ua,N as da,O as ur,c as qs}from"./index-Cg_v1vT_.js";import{aa as fa,y as tr,ab as pa,z as Pt,I as Vn,x as Mn,ac as ha}from"./vendor-utils-DMClavLd.js";import{_ as Ws}from"./useLocalStorage-BTc2ONSy.js";import{C as Ks}from"./confirm-Bi4_XwxH.js";import{d as ma}from"./PlayArrow-B-b0Dvp8.js";import{g as Gs}from"./get-safe-url-DGJYpGp-.js";import{f as Jr}from"./format-error-LAoTjvJe.js";import{u as Nn}from"./session-BPop7wxF.js";import{f as Ye,a as $n,u as fe,v as ga}from"./vendor-hooks-jg6xPUPF.js";import{i as xa,u as ya,M as va,c as vt,s as zt,H as ba,p as Un}from"./index-Xi3jaVFs.js";import{d as _a}from"./InfoOutlined-xdatqyfu.js";import{_ as Bn,D as wa}from"./dot-BBxUn__M.js";import{_ as zn}from"./useSetState-BL3ktMon.js";import{u as Hn}from"./use-mobile-T-9_nK_m.js";const qn=P.createContext({});function Yr({children:e,type:r}){const[t,s]=P.useState([]),n=P.useRef([]),i=c=>{if(!n.current.includes(c)){const d=[...n.current,c];s(d),n.current=d}},a=c=>{if(n.current.includes(c)){const d=n.current.filter(f=>f!==c);s(d),n.current=d}},l=c=>{const d=t.filter(y=>c.find(p=>p===y));fa(d,t).forEach(y=>a(y))};return o.jsx(qn.Provider,{value:{type:r,deletingBlocklets:t,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}Yr.propTypes={type:D.string,children:D.node.isRequired};Yr.defaultProps={type:"blocklets"};function Bd(){return P.useContext(qn)}var Xr={},ja=je;Object.defineProperty(Xr,"__esModule",{value:!0});var Wn=Xr.default=void 0,Sa=ja(Se()),Ca=o;Wn=Xr.default=(0,Sa.default)((0,Ca.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var es={},Aa=je;Object.defineProperty(es,"__esModule",{value:!0});var Kn=es.default=void 0,Ea=Aa(Se()),Ta=o;Kn=es.default=(0,Ea.default)((0,Ta.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ts={},Ra=je;Object.defineProperty(ts,"__esModule",{value:!0});var Gn=ts.default=void 0,ka=Ra(Se()),Ia=o;Gn=ts.default=(0,ka.default)((0,Ia.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var rs={},Da=je;Object.defineProperty(rs,"__esModule",{value:!0});var ss=rs.default=void 0,La=Da(Se()),Pa=o;ss=rs.default=(0,La.default)((0,Pa.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var ns={},Fa=je;Object.defineProperty(ns,"__esModule",{value:!0});var Qn=ns.default=void 0,Oa=Fa(Se()),Va=o;Qn=ns.default=(0,Oa.default)((0,Va.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var is={},Ma=je;Object.defineProperty(is,"__esModule",{value:!0});var Zn=is.default=void 0,Na=Ma(Se()),$a=o;Zn=is.default=(0,Na.default)((0,$a.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var os={},Ua=je;Object.defineProperty(os,"__esModule",{value:!0});var Jn=os.default=void 0,Ba=Ua(Se()),za=o;Jn=os.default=(0,Ba.default)((0,za.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var as=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};as.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};as.displayName="dashboard";var ls={},Ha=je;Object.defineProperty(ls,"__esModule",{value:!0});var Yn=ls.default=void 0,qa=Ha(Se()),Wa=o;Yn=ls.default=(0,qa.default)((0,Wa.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const tt={Start:ma,Stop:Wn,Restart:Kn,Reload:Gn,Remove:$o,Config:ss,Log:Qn,Group:Zn,Cancel:Jn,Dashboard:as,Overview:Yn},Ka=(e,r)=>{if(!e)return"";const t=new URL(e),s=new URLSearchParams(t.searchParams),n=new URL(tr(t.origin,r));return n.search=s.toString(),n.toString()},Ga="internal",Qa="external";function cs({blocklet:e,onStart:r,onComplete:t,variant:s,hasPermission:n,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=at(),[d,f]=P.useState(null),[y,p]=P.useState(null),[w,k]=P.useState(!1),[C,F]=P.useState(null),{t:x}=P.useContext(er),[g]=Ws("skip-blocklet-setup",!1),{loading:I,recommendedUrl:z}=a(e),[U]=Ws("blocklet-type-filter",Ga),m=pe.isInProgress(e.status),[_,j]=P.useState(!1);P.useEffect(()=>{var Q,le;if(!(e!=null&&e.controller))return;j(((le=(Q=e==null?void 0:e.controller)==null?void 0:Q.status)==null?void 0:le.value)===$e.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var de,Ce,De;try{const ge=await c.api.getLauncherSession({input:{launcherSessionId:(de=e==null?void 0:e.controller)==null?void 0:de.launcherSessionId,launcherUrl:(Ce=e==null?void 0:e.controller)==null?void 0:Ce.launcherUrl}});if(ge!=null&&ge.error){console.error("get launcher session failed",ge.error);return}j([ne.LAUNCH_SESSION_STATUS.overdue,ne.LAUNCH_SESSION_STATUS.canceled,ne.LAUNCH_SESSION_STATUS.terminated].includes((De=ge==null?void 0:ge.launcherSession)==null?void 0:De.status))}catch(ge){console.error("call getLauncherSession error",ge)}})()},[]);const{inService:S}=c,v=(O,Q,le=!1)=>async()=>{const de=async et=>{var Ke;r({action:O,blocklet:e}),k(!0),p(O);let Ue=!1;try{if(O==="remove")await Q(et);else if(O==="start"){if(!pe.hasRunnableComponent(e)){re.error(x("blocklet.noComponent"));return}if(!S&&!g&&!((Ke=e.settings)!=null&&Ke.initialized)&&e.mode!==$e.BLOCKLET_MODES.DEVELOPMENT){if(!z||!Bs(z)){re.error(x("blocklet.gotoVisitError"));return}const be=Yo(c.info),ut=new URL(z);ut.searchParams.set("serverUrl",be),window.open(Gs(ut.href,{allowDomains:null})),t({action:O,blocklet:e});return}const Ae=e.children.filter(be=>!pe.isInProgress(be.status)&&be.status!=="running").map(be=>be.meta.did),Ve={did:e.meta.did,componentDids:Ae};await Q({input:Ve})}else if(["stop","restart","reload"].includes(O)){const Ae=e.children.filter(be=>be.status==="running").map(be=>be.meta.did),Ve={did:e.meta.did,componentDids:Ae};await Q({input:Ve})}else{const Ae={did:e.meta.did};await Q({input:Ae})}O==="remove"?Ue=!0:await Xo(1e3),O==="reload"&&re.success(x("blocklet.reloadSuccess")),F(null),t({action:O,blocklet:e})}catch(Ae){const Ve=`Blocklet ${O} failed: ${Jr(Ae)}`;throw t({action:O,blocklet:e,error:new Error(Ve)}),new Error(Ve)}finally{Ue||k(!1)}},Ce=()=>{k(!1),F(null)},De=pe.getDisplayName(e,!0),ge=e.mode===$e.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(ue,{component:"div",children:o.jsx(ue,{gutterBottom:!0,children:x("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(et,Ue)=>o.jsxs(ue,{component:"div",children:[o.jsx(ue,{gutterBottom:!0,children:x("blocklet.action.removeApplicationDescription")}),o.jsxs(Ro,{name:"removeType",value:et.removeType,onChange:Ke=>Ue({...et,removeType:Ke.target.value}),children:[o.jsx(xt,{value:"backup",control:o.jsx(Us,{}),label:x("blocklet.action.removeApplicationAfterBackup")}),o.jsx(xt,{value:"complete",control:o.jsx(Us,{}),label:x("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Et={stop:{title:`${x("common.stop")} ${De}`,description:x("blocklet.action.stopDescription"),confirm:x("blocklet.action.confirmStop"),cancel:x("common.cancel"),onConfirm:de,onCancel:Ce},restart:{title:`${x("common.restart")} ${De}`,description:x("blocklet.action.restartDescription"),confirm:x("blocklet.action.confirmRestart"),cancel:x("common.cancel"),onConfirm:de,onCancel:Ce},remove:{title:`${x("common.remove")} ${De}`,confirm:x("blocklet.action.confirmRemove"),cancel:x("common.cancel"),onConfirm:de,onCancel:Ce,...ge},cancelDownload:{title:`${x("common.cancel")}`,description:x("blocklet.action.cancelDownloadDescription",{name:De}),confirm:x("common.confirm"),cancel:x("common.cancel"),onConfirm:de,onCancel:Ce}};le?F(Et[O]):await de()},T=!!d,$=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(O.currentTarget)},M=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(null)},H=async(O,Q)=>{try{Q.stopPropagation(),Q.preventDefault()}catch{}if(typeof O.handler=="function")try{k(!0),p(O.action),await O.handler()}catch(le){console.error(`Blocklet ${O.name} failed: `,le)}finally{k(!1),f(null)}else f(null)},K=!S&&pe.isDeletableBlocklet(e)?{action:"remove",icon:tt.Remove,name:x("common.remove"),handler:v("remove",async({removeType:O})=>{O==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:m}:null,ie={action:"remove",icon:({sx:O,...Q})=>o.jsx(tt.Cancel,{sx:{...O,paddingRight:"2px",zoom:.95},...Q}),name:x("common.cancel"),handler:v("cancelDownload",c.api.cancelDownloadBlocklet,!0)},ve=pe.getAppMissingConfigs(e),ke=()=>{var de;const O=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),Q=i==null?void 0:i({mountPoint:O,blocklet:e});if(!Q||!Bs(Q)){re.error(x("blocklet.gotoVisitError"));return}const le=(de=e==null?void 0:e.site)==null?void 0:de.domainAliases;window.open(Gs(Ka(Q,".well-known/service/admin"),{allowDomains:le==null?void 0:le.map(Ce=>Ce.value)}))};let Ie=[{action:"start",icon:tt.Start,inExternal:!0,name:x("common.start"),handler:v("start",c.api.startBlocklet),disabled:_||e.children.every(O=>O.status==="running")||cr(e.status)||I||m},{action:"stop",icon:tt.Stop,inExternal:!0,name:x("common.stop"),handler:v("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:tt.Restart,name:x("common.restart"),handler:v("restart",c.api.restartBlocklet,!0),disabled:_||e.status!=="running"},cr(e.status)?ie:K,{separator:!0},S?null:{action:"dashboard",icon:({style:O,...Q})=>o.jsx(tt.Dashboard,{...Q,style:{...O,width:"26px",height:"26px",paddingRight:"3px"}}),name:x("sidebar.dashboard"),handler:ke}].filter(Boolean);return U===Qa&&(Ie=Ie.filter(O=>O.inExternal)),s==="menu"?o.jsxs(Qs,{"data-cy":"blocklet-actions",children:[o.jsx(Yt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:$,size:"small",disabled:!n||!cr(e.status)&&w,children:o.jsx(Uo,{})}),o.jsxs(So,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:T,onClose:M,PaperProps:{},children:[ve.length>0&&o.jsxs(jn,{style:{maxWidth:"400px"},severity:"error",children:[x("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(Rn,{to:`/blocklets/${e.meta.did}/components`,children:x("blocklet.config.gotoFix")})]}),Ie.map((O,Q)=>O.separator?o.jsx(Wr,{},`separator-${Q}`):o.jsxs(Co,{dense:!0,onClick:le=>H(O,le),disabled:w||O.disabled,"data-cy":`${O.action}-blocklet`,children:[o.jsx(Ao,{style:{minWidth:24},children:y===O.action&&w?o.jsx(qe,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{fontSize:"small"})}),o.jsx(Eo,{primary:O.name})]},O.name))]}),C&&o.jsx(Ks,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel})]}):o.jsxs(Qs,{"data-cy":"blocklet-actions",...l,children:[o.jsx(To,{children:Ie.filter(O=>!O.separator&&!O.onlyInMenu).map(O=>o.jsxs(Je,{title:O.name,"data-cy":`${O.action}-blocklet`,onClick:()=>H(O),disabled:!!O.disabled||w,children:[y===O.action&&w?o.jsx(qe,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:O.name})]},O.name))}),C&&o.jsx(Ks,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel})]})}cs.propTypes={getComponentUrl:D.func,blocklet:D.object.isRequired,onStart:D.func.isRequired,onComplete:D.func.isRequired,variant:D.oneOf(["menu","group"]),hasPermission:D.bool,useBlockletUrlEvaluation:D.func};cs.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Qs=me.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.MuiButton-root {
|
|
8
|
-
padding: 4px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,Zs=P.memo(cs),Za=e=>{const r={};let t=null;return pe.forEachBlockletSync(e,s=>{r[s.meta.bundleDid]?t=pe.getDisplayName(s,!0):s.meta.bundleDid&&(r[s.meta.bundleDid]=!0)}),t},Ja=(e,r,t)=>{var i;const{hostname:s,href:n}=e;if(!r)return n;if(t){const l=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(s);if(!l)return n;const c=l[0],f=((((i=r.site)==null?void 0:i.domainAliases)||[]).map(y=>y.value).filter(Boolean).find(y=>y.endsWith(ne.DEFAULT_DID_DOMAIN))||"").replace(`.${ne.DEFAULT_DID_DOMAIN}`,"");return f?n.replace(s,`${f}-${c}.${ne.DEFAULT_IP_DOMAIN_SUFFIX}`):n}return n.replace(r.meta.bundleDid,r.appPid)};function Xn(){const{t:e}=ye(),{api:r}=Nn(),{blocklet:t}=Zr(),{inService:s}=at(),[n,i]=P.useState(!1),[a,l]=P.useState(5),c=t&&t.structVersion!==ne.APP_STRUCT_VERSION,d=()=>{try{if(t.status==="running"){re.error(e("blocklet.migrate.tip.running"));return}const p=Za(t);if(p){re.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){re.error(Jr(p))}},f=()=>{const p=Ja(window.location,t,s);setTimeout(()=>{window.location.href=p},5e3),l(5),setInterval(()=>{l(w=>w-1)},1e3)},y=()=>i(!1);return[c&&o.jsxs(jn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(N,{display:"flex",alignItems:"center",children:[o.jsx(Je,{variant:"contained",size:"small",color:"primary",onClick:()=>d(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>o.jsx(N,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),t&&o.jsx(Bo,{popup:!0,open:n,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:r.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:t.appDid,did:t.meta.did,wt:ea(t,!0),title:pe.getDisplayName(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:y},"connect")]}Xn.propTypes={};function Ya(){const e=ko();return[...e.breakpoints.keys].reverse().reduce((t,s)=>{const n=Fe(e.breakpoints.up(s));return!t&&n?s:t},null)||"xs"}function Xa(e){return o.jsx(Xt,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function el(e){return o.jsx(Xt,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function tl(e){return o.jsx(Xt,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function rl(e){return o.jsx(Xt,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Rt={fontSize:20,marginInlineEnd:8},sl={success:o.jsx(Xa,{style:Rt}),warning:o.jsx(el,{style:Rt}),error:o.jsx(tl,{style:Rt}),info:o.jsx(rl,{style:Rt})},nl=Io(e=>{const r={xl:"400px",lg:"400px",md:"400px",sm:"300px"},t=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:t,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:s=>({backgroundColor:`${Do[600]} !important`,width:r[s.breakpoint]}),error:s=>({backgroundColor:`${e.palette.error.dark} !important`,width:r[s.breakpoint]}),info:s=>({backgroundColor:`${e.palette.primary.main} !important`,width:r[s.breakpoint]}),warning:s=>({backgroundColor:`${Lo[700]} !important`,width:r[s.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function us({keyId:e,notification:r={},viewAllUrl:t,content:s},n){var C;const i=nl({breakpoint:Ya()}),a=[i.contentRoot,i.lessPadding,i[r.severity]].join(" "),l=sl[r.severity],{closeSnackbar:c}=Dn(),d=()=>c(e),f=kn(),y=()=>{c(e),f(t)},p=Ye(()=>xa(r),[r]),w=Ye(()=>r==null?void 0:r.activity,[r]),k=ya({activity:w,users:[r==null?void 0:r.actorInfo],actors:[(C=r==null?void 0:r.activity)==null?void 0:C.actor],extra:{linkColor:Gr.primaryBase}});return o.jsxs(zo,{ref:n,className:a,children:[o.jsxs("div",{className:i.message,children:[l,o.jsx(ol,{onClick:y,style:{width:"calc(100% - 30px)"},children:o.jsx(N,{children:p?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:k}),o.jsx(va,{meta:w.meta,type:w.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:r.title}),s||o.jsx("span",{className:"desc",children:r.description})]})})})]}),o.jsx("div",{className:i.action,children:o.jsx(Yt,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(Ho,{className:i.icon})},"close")})]})}const il=P.forwardRef(us);us.propTypes={viewAllUrl:D.string.isRequired,keyId:D.number.isRequired,notification:D.object.isRequired,content:D.node};us.defaultProps={content:null};const ol=me.div`
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
.title {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
-webkit-box-orient: vertical;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
}
|
|
24
|
-
.desc {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
text-overflow: ellipsis;
|
|
27
|
-
display: -webkit-box;
|
|
28
|
-
-webkit-line-clamp: 3;
|
|
29
|
-
-webkit-box-orient: vertical;
|
|
30
|
-
word-break: break-word;
|
|
31
|
-
}
|
|
32
|
-
`;function ei({attachment:e}){const{data:r}=e;let t="";try{t=new URL(r.url).host}catch{t=r.url}return o.jsxs(Kr,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!t&&o.jsx("span",{className:"url",children:t}),!!r.title&&o.jsx(N,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&o.jsx(N,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&o.jsx("img",{src:bn.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}ei.propTypes={attachment:D.object.isRequired};function ti({attachment:e}){const{data:r}=e;return o.jsx("img",{src:bn.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}ti.propTypes={attachment:D.object.isRequired};function ri({attachment:e,...r}){var l;const{data:t}=e,s=((l=t.color)==null?void 0:l.toLowerCase())||r.color,n=t.size||r.size,i=t.fontWeight||r.fontWeight||400;let a="14px";return n==="small"?a="12px":n==="normal"?a="14px":n==="big"?a="16px":n==="large"&&(a="18px"),o.jsx(al,{className:"title",style:{fontSize:a,color:s,whiteSpace:"unset",fontWeight:i},children:t.text})}ri.propTypes={attachment:D.object.isRequired};const al=me.span`
|
|
33
|
-
width: 100%;
|
|
34
|
-
display: -webkit-box;
|
|
35
|
-
-webkit-box-orient: vertical;
|
|
36
|
-
-webkit-line-clamp: 2;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
text-overflow: ellipsis;
|
|
39
|
-
white-space: normal;
|
|
40
|
-
word-break: break-word;
|
|
41
|
-
`;ds.propTypes={locale:D.string,data:D.object.isRequired};ds.defaultProps={locale:"en"};function ds({locale:e="en",data:r}){const t={zh:"来自",en:"from"}[e]||"from",s={zh:"接收",en:"Received"}[e]||"Received",i=`https://${vt.getUrlHost(r.chainHost)||vt.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let a=r.amount;r.decimal&&(a=r.amount/10**r.decimal);const l=Ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:c=>{c.customPreventRedirect=!0},children:o.jsxs(N,{display:"flex",flexDirection:"column",children:[o.jsxs(N,{sx:l,children:[o.jsx(ue,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),o.jsxs(ue,{component:"div",align:"right",style:zt.summaryStyle,flex:1,children:["+",a," ",r.symbol]})]}),o.jsxs(N,{sx:l,children:[o.jsx(ue,{component:"div",style:{...zt.remarkStyle,fontSize:14},children:t}),o.jsx(N,{maxWidth:260,fontSize:14,children:o.jsx(Qr,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}fs.propTypes={locale:D.string,data:D.object.isRequired};fs.defaultProps={locale:"en"};function fs({locale:e,data:r}){var c,d;const t={zh:"接收",en:"Received"}[e]||"Received",s={zh:"来自",en:"from"}[e]||"from",n=vt.getUrlHost(r.chainHost)||vt.getChainHost(r.chainId),i=r.did||((d=(c=r==null?void 0:r.credential)==null?void 0:c.issuer)==null?void 0:d.id)||"",a=`https://${n}/explorer/assets/${i}`,l=Ye(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(N,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(N,{display:"flex",flexDirection:"column",children:[o.jsxs(N,{sx:l,children:[o.jsx(ue,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:t}),o.jsx(ue,{component:"div",align:"right",style:zt.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(N,{sx:l,children:[o.jsx(ue,{component:"div",style:{...zt.remarkStyle,fontSize:14},children:s}),o.jsx(N,{maxWidth:260,fontSize:14,children:o.jsx(Qr,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}si.propTypes={data:D.object.isRequired,locale:D.string};function si({data:e,locale:r="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:t=>{t.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx(N,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:o.jsx(Qr,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}ps.propTypes={locale:D.string,data:D.object.isRequired};ps.defaultProps={locale:"en"};function ps({locale:e,data:r}){const t=vt.getChainHost(r.chainId),s=`https://${t}/explorer/txs/${r.hash}`,n={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:s,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:t}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:n}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",r.hash]})]})}function ni({attachment:e,...r}){const{local:t}=P.useContext(er),s=Fe(n=>n.breakpoints.down("md"));return o.jsxs(ll,{...r,isMd:s,children:[e.type==="link"&&o.jsx(ei,{attachment:e,...r,isMd:s}),e.type==="image"&&o.jsx(ti,{attachment:e,isMd:s}),e.type==="text"&&o.jsx(ri,{attachment:e,isMd:s}),e.type==="token"&&o.jsx(ds,{data:e.data,local:t,isMd:s}),e.type==="asset"||e.type==="vc"?o.jsx(fs,{data:e.data,local:t,isMd:s}):null,e.type==="dapp"&&o.jsx(si,{data:e.data,local:t,isMd:s}),e.type==="transaction"&&o.jsx(ps,{data:e.data,local:t,...r,isMd:s}),e.type==="divider"&&o.jsx(Wr,{sx:{mb:1,mt:1},style:{color:Gr.dividerColor}})]})}const ll=me.div`
|
|
42
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
43
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
44
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
45
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
46
|
-
&:last-child {
|
|
47
|
-
margin-bottom: 0;
|
|
48
|
-
}
|
|
49
|
-
`;ni.propTypes={attachment:D.object.isRequired};function ii({data:e,...r}){const{items:t}=e;return o.jsx(cl,{...r,children:t.map(s=>o.jsxs(Sn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(N,{display:"flex",alignItems:"center",gap:1,children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,style:{width:16,height:16}}):null,o.jsxs(N,{className:"metric-name",display:"flex",alignItems:"center",children:[s.title,s.subtitle?o.jsx(yt,{title:s.subtitle,arrow:!0,placement:"top",children:o.jsx(_a,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(N,{className:"metric-number",sx:{color:s.content_color||"rgba(3, 7, 18, 1)"},children:[s.content,s.sub_content?o.jsxs("span",{className:"sub-content",style:{color:s.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",s.sub_content,")"]}):null]})]},s.title))})}const cl=me(N)`
|
|
50
|
-
display: flex;
|
|
51
|
-
justify-content: flex-start;
|
|
52
|
-
flex-wrap: wrap;
|
|
53
|
-
gap: 16px;
|
|
54
|
-
.metric-number {
|
|
55
|
-
font-size: 18px;
|
|
56
|
-
font-weight: 600;
|
|
57
|
-
.sub-content {
|
|
58
|
-
font-size: 12px;
|
|
59
|
-
font-weight: 400;
|
|
60
|
-
margin-left: 4px;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
.metric-name {
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
color: rgba(156, 163, 175, 1);
|
|
66
|
-
}
|
|
67
|
-
`;ii.propTypes={data:D.object.isRequired};function oi({data:e}){const{items:r}=e,t=Fe(a=>a.breakpoints.down("sm")),s=Fe(a=>a.breakpoints.down("md")),n=Fe(a=>a.breakpoints.down("lg")),i=()=>t?1:s?3:n?4:6;return o.jsx(Po,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(a=>{const l=a.cover||a.display;return l?o.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(Fo,{children:o.jsx("img",{src:l,alt:a.title||"",style:{borderRadius:"8px"}})})},l):null})})}oi.propTypes={data:D.object.isRequired};function hs({data:e,feedType:r,...t}){return o.jsxs(ul,{...t,children:[r==="data-tracker"&&e.type==="table"&&o.jsx(ii,{data:e}),(r==="graphic"||r==="gallery")&&o.jsx(oi,{data:e})]})}const ul=me.div`
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
width: 100%;
|
|
71
|
-
margin-bottom: 4px;
|
|
72
|
-
&:last-child {
|
|
73
|
-
margin-bottom: 0;
|
|
74
|
-
}
|
|
75
|
-
`;hs.propTypes={data:D.object.isRequired,feedType:D.string};hs.defaultProps={feedType:"data-tracker"};const dl=qo(),fl=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},pl=e=>e.every(r=>r.type==="text"),hl=e=>e.every(r=>r.type==="image"),ml=e=>pa(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(t=>{var s,n,i;return(i=(n=(s=t==null?void 0:t.data)==null?void 0:s.text)==null?void 0:n.trim)==null?void 0:i.call(n)})),gl=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(t=>t.type===r)},xl=async(e,r)=>{const t=dl.user;if(t)try{return await t.getUserPublicInfo({did:e})?await t.getProfileUrl({did:e,locale:r}):void 0}catch(s){console.error(s);return}};Ft.propTypes={data:D.array.isRequired,style:D.object};function Ft({data:e,style:r={}}){return o.jsx(ue,{style:{color:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...r},children:e.text})}function ai({data:e}){const r=[];for(let t=0;t<(e==null?void 0:e.length);t+=2){const s=e[t],n=e[t+1];s&&n?r.push(o.jsxs(Js,{children:[o.jsx("td",{className:"label-col",children:o.jsx(Ft,{data:s.data,style:{whiteSpace:"nowrap"}})}),o.jsx("td",{className:"value-col",children:o.jsx(Ft,{data:n.data,style:{wordBreak:"break-all"}})})]},t)):s&&r.push(o.jsx(Js,{children:o.jsx("td",{className:"label-col",children:o.jsx(Ft,{data:s.data})})},t))}return o.jsx("table",{style:{width:"100%"},children:o.jsx("tbody",{children:r})})}ai.propTypes={data:D.array.isRequired};const Js=me.tr`
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: row;
|
|
78
|
-
justify-content: flex-start;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: ${({theme:e})=>e.spacing(1)};
|
|
81
|
-
.label-col {
|
|
82
|
-
min-width: 130px;
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
}
|
|
85
|
-
.value-col {
|
|
86
|
-
flex: 1;
|
|
87
|
-
}
|
|
88
|
-
`;function ms({notification:e,severity:r,showSke:t=!0}){const{attachments:s,data:n,...i}=e,a=Fe(f=>f.breakpoints.down("md"));if((!s||!s.length)&&Pt(n))return null;const l=fl(r),c=(f,y=!1)=>{if(!f&&!Array.isArray(f))return null;let p=f,w={},k="horizontal";y&&pl(f)&&(p=ml(f),k="vertical",w={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const C=gl(p);return o.jsx(N,{sx:{width:"100%",display:"flex",gap:1,flexDirection:y?"row":"column",justifyContent:"flex-start",alignItems:y?"center":"unset",flexWrap:"wrap"},children:p.map((F,x)=>F.type==="section"?o.jsx(ai,{data:F.fields},x):o.jsxs(P.Fragment,{children:[o.jsx(ni,{attachment:F,style:w,...i}),!(a&&k==="vertical")&&C&&p.length>1&&x!==p.length-1?o.jsx(Wr,{orientation:k,style:{color:Gr.dividerColor},sx:k==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},x))})},d=hl(s);return o.jsx(yl,{children:o.jsxs("div",{className:"message-in-list",children:[s.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:d?c(s):o.jsx(Sn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(s)})}),!Pt(n)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(hs,{data:n,feedType:e.feedType})})}),s.length===0&&Pt(n)&&t&&o.jsx(Oo,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const yl=me.div`
|
|
89
|
-
display: flex;
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
.message-in-list {
|
|
92
|
-
padding: 8px 8px 8px 0;
|
|
93
|
-
display: flex;
|
|
94
|
-
border-radius: 8px;
|
|
95
|
-
}
|
|
96
|
-
.message-title {
|
|
97
|
-
color: #25292f;
|
|
98
|
-
font-size: 18px;
|
|
99
|
-
font-weight: bold;
|
|
100
|
-
word-break: break-all;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.attach-ske {
|
|
104
|
-
position: relative;
|
|
105
|
-
margin-left: 10px;
|
|
106
|
-
&::after {
|
|
107
|
-
content: '';
|
|
108
|
-
position: absolute;
|
|
109
|
-
left: -10px;
|
|
110
|
-
top: 0;
|
|
111
|
-
height: 100%;
|
|
112
|
-
width: 4px;
|
|
113
|
-
background-color: ${e=>e.leftLineColor};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.message-body {
|
|
118
|
-
color: #25292f;
|
|
119
|
-
font-size: 16px;
|
|
120
|
-
word-break: break-all;
|
|
121
|
-
white-space: pre-line;
|
|
122
|
-
}
|
|
123
|
-
.message-container {
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
justify-content: flex-start;
|
|
127
|
-
.data-container,
|
|
128
|
-
.attachment-container {
|
|
129
|
-
display: flex;
|
|
130
|
-
flex-direction: column;
|
|
131
|
-
width: 100%;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.actions-container {
|
|
135
|
-
margin-top: 10px;
|
|
136
|
-
.actions-item {
|
|
137
|
-
margin-right: 8px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`;ms.propTypes={severity:D.string.isRequired,notification:D.object.isRequired,showSke:D.bool};ms.defaultProps={showSke:!0};const dr=e=>ho.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),vl=async(e,r)=>{const{type:t,did:s}=e;return _n.isSameAddr(t,"did")?await xl(s,r)||$t.getLink(e):$t.getLink(e)},bl=async(e,r,t=!0)=>{const s=$t.toTextList(e);return await Promise.all(s.map(async i=>{if(i instanceof $t.Link){if(t){const a=await vl(i,r),{type:l,chainId:c,did:d}=i;return _n.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};li.propTypes={notification:D.object,rows:D.number,minimal:D.bool};function li({notification:e,rows:r=2,minimal:t=!1}){const[s,n]=P.useState(!1),[i,a]=P.useState(""),{t:l,locale:c}=ye(),d=P.useMemo(()=>{const{attachments:F}=e||{};if(!F)return!1;try{return F.length>0}catch{return!1}},[e]),f=P.useMemo(()=>{const{blocks:F}=e||{};if(!F)return!1;try{return F.length>0}catch{return!1}},[e]),y=P.useMemo(()=>{const{description:F}=e||{};return!!F},[e]),p=P.useMemo(()=>{const{data:F}=e||{};return!Pt(F)},[e]),w=P.useMemo(()=>d||f||y||p,[d,f,y,p]);if(P.useEffect(()=>{bl((e==null?void 0:e.description)??"",c).then(F=>{a(F)})},[e==null?void 0:e.description,c]),!w)return null;const k=()=>r===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,C=F=>{const{target:x}=F;x.getAttribute("data-name")==="toggle-expanded"&&(n(!s),F.customPreventRedirect=!0)};return o.jsxs(_l,{color:t?"#fff":"",children:[o.jsx(N,{className:"text-container",component:"div",onClick:C,children:i&&(!s&&r>0?o.jsx(ba,{basedOn:"letters",unsafeHTML:dr(i),maxLine:r,ellipsisHTML:dr(k())}):o.jsx(ue,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:dr(`${i}${k()}`)}}))}),!t&&(d||p)?o.jsx(ms,{severity:e.severity,notification:e}):null]})}const _l=me(N)`
|
|
141
|
-
width: 100%;
|
|
142
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
143
|
-
.text-container {
|
|
144
|
-
word-wrap: break-word;
|
|
145
|
-
word-break: break-all;
|
|
146
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
147
|
-
.toggle-btn {
|
|
148
|
-
display: inline-block;
|
|
149
|
-
white-space: nowrap;
|
|
150
|
-
cursor: pointer;
|
|
151
|
-
margin-left: 4px;
|
|
152
|
-
color: rgba(59, 130, 246, 1);
|
|
153
|
-
}
|
|
154
|
-
.content.ellipsis {
|
|
155
|
-
overflow: hidden;
|
|
156
|
-
text-overflow: ellipsis;
|
|
157
|
-
word-break: break-all;
|
|
158
|
-
display: block;
|
|
159
|
-
display: -webkit-box;
|
|
160
|
-
-webkit-box-orient: vertical;
|
|
161
|
-
-webkit-line-clamp: 2;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
`,wl=P.memo(li);var _t=e=>e.type==="checkbox",Qe=e=>e instanceof Date,ce=e=>e==null;const ci=e=>typeof e=="object";var Y=e=>!ce(e)&&!Array.isArray(e)&&ci(e)&&!Qe(e),ui=e=>Y(e)&&e.target?_t(e.target)?e.target.checked:e.target.value:e,jl=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,di=(e,r)=>e.has(jl(r)),Sl=e=>{const r=e.constructor&&e.constructor.prototype;return Y(r)&&r.hasOwnProperty("isPrototypeOf")},gs=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Z(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(gs&&(e instanceof Blob||s))&&(t||Y(e)))if(r=t?[]:{},!t&&!Sl(e))r=e;else for(const n in e)e.hasOwnProperty(n)&&(r[n]=Z(e[n]));else return e;return r}var wt=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,E=(e,r,t)=>{if(!r||!Y(e))return t;const s=wt(r.split(/[,[\].]+?/)).reduce((n,i)=>ce(n)?n:n[i],e);return G(s)||s===e?G(e[r])?t:e[r]:s},xe=e=>typeof e=="boolean",xs=e=>/^\w*$/.test(e),fi=e=>wt(e.replace(/["|']|\]/g,"").split(/\.|\[/)),W=(e,r,t)=>{let s=-1;const n=xs(r)?[r]:fi(r),i=n.length,a=i-1;for(;++s<i;){const l=n[s];let c=t;if(s!==a){const d=e[l];c=Y(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const Ht={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},we={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Me={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Cl=B.createContext(null),rr=()=>B.useContext(Cl);var pi=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const a=i;return r._proxyFormState[a]!==we.all&&(r._proxyFormState[a]=!s||we.all),t&&(t[a]=!0),e[a]}});return n};function Al(e){const r=rr(),{control:t=r.control,disabled:s,name:n,exact:i}=e||{},[a,l]=B.useState(t._formState),c=B.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=B.useRef(n);return d.current=n,B.useEffect(()=>t._subscribe({name:d.current,formState:c.current,exact:i,callback:f=>{!s&&l({...t._formState,...f})}}),[t,s,i]),B.useEffect(()=>{c.current.isValid&&t._setValid(!0)},[t]),B.useMemo(()=>pi(a,t,c.current,!1),[a,t])}var Pe=e=>typeof e=="string",hi=(e,r,t,s,n)=>Pe(e)?(s&&r.watch.add(e),E(t,e,n)):Array.isArray(e)?e.map(i=>(s&&r.watch.add(i),E(t,i))):(s&&(r.watchAll=!0),t);function El(e){const r=rr(),{control:t=r.control,name:s,defaultValue:n,disabled:i,exact:a}=e||{},l=B.useRef(s),c=B.useRef(n);l.current=s,B.useEffect(()=>t._subscribe({name:l.current,formState:{values:!0},exact:a,callback:y=>!i&&f(hi(l.current,t._names,y.values||t._formValues,!1,c.current))}),[t,i,a]);const[d,f]=B.useState(t._getWatch(s,n));return B.useEffect(()=>t._removeUnmounted()),d}function Tl(e){const r=rr(),{name:t,disabled:s,control:n=r.control,shouldUnregister:i}=e,a=di(n._names.array,t),l=El({control:n,name:t,defaultValue:E(n._formValues,t,E(n._defaultValues,t,e.defaultValue)),exact:!0}),c=Al({control:n,name:t,exact:!0}),d=B.useRef(e),f=B.useRef(n.register(t,{...e.rules,value:l,...xe(e.disabled)?{disabled:e.disabled}:{}})),y=B.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!E(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!E(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!E(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!E(c.validatingFields,t)},error:{enumerable:!0,get:()=>E(c.errors,t)}}),[c,t]),p=B.useCallback(F=>f.current.onChange({target:{value:ui(F),name:t},type:Ht.CHANGE}),[t]),w=B.useCallback(()=>f.current.onBlur({target:{value:E(n._formValues,t),name:t},type:Ht.BLUR}),[t,n._formValues]),k=B.useCallback(F=>{const x=E(n._fields,t);x&&F&&(x._f.ref={focus:()=>F.focus(),select:()=>F.select(),setCustomValidity:g=>F.setCustomValidity(g),reportValidity:()=>F.reportValidity()})},[n._fields,t]),C=B.useMemo(()=>({name:t,value:l,...xe(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:p,onBlur:w,ref:k}),[t,s,c.disabled,p,w,k,l]);return B.useEffect(()=>{const F=n._options.shouldUnregister||i;n.register(t,{...d.current.rules,...xe(d.current.disabled)?{disabled:d.current.disabled}:{}});const x=(g,I)=>{const z=E(n._fields,g);z&&z._f&&(z._f.mount=I)};if(x(t,!0),F){const g=Z(E(n._options.defaultValues,t));W(n._defaultValues,t,g),G(E(n._formValues,t))&&W(n._formValues,t,g)}return!a&&n.register(t),()=>{(a?F&&!n._state.action:F)?n.unregister(t):x(t,!1)}},[t,n,a,i]),B.useEffect(()=>{n._setDisabledField({disabled:s,name:t})},[s,t,n]),B.useMemo(()=>({field:C,formState:c,fieldState:y}),[C,c,y])}const Te=e=>e.render(Tl(e));var Rl=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},he=e=>Array.isArray(e)?e:[e],Ys=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}},Er=e=>ce(e)||!ci(e);function ze(e,r){if(Er(e)||Er(r))return e===r;if(Qe(e)&&Qe(r))return e.getTime()===r.getTime();const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const n of t){const i=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const a=r[n];if(Qe(i)&&Qe(a)||Y(i)&&Y(a)||Array.isArray(i)&&Array.isArray(a)?!ze(i,a):i!==a)return!1}}return!0}var ae=e=>Y(e)&&!Object.keys(e).length,ys=e=>e.type==="file",Re=e=>typeof e=="function",qt=e=>{if(!gs)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},mi=e=>e.type==="select-multiple",vs=e=>e.type==="radio",kl=e=>vs(e)||_t(e),fr=e=>qt(e)&&e.isConnected;function Il(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=G(e)?s++:e[r[s++]];return e}function Dl(e){for(const r in e)if(e.hasOwnProperty(r)&&!G(e[r]))return!1;return!0}function te(e,r){const t=Array.isArray(r)?r:xs(r)?[r]:fi(r),s=t.length===1?e:Il(e,t),n=t.length-1,i=t[n];return s&&delete s[i],n!==0&&(Y(s)&&ae(s)||Array.isArray(s)&&Dl(s))&&te(e,t.slice(0,-1)),e}var gi=e=>{for(const r in e)if(Re(e[r]))return!0;return!1};function Wt(e,r={}){const t=Array.isArray(e);if(Y(e)||t)for(const s in e)Array.isArray(e[s])||Y(e[s])&&!gi(e[s])?(r[s]=Array.isArray(e[s])?[]:{},Wt(e[s],r[s])):ce(e[s])||(r[s]=!0);return r}function xi(e,r,t){const s=Array.isArray(e);if(Y(e)||s)for(const n in e)Array.isArray(e[n])||Y(e[n])&&!gi(e[n])?G(r)||Er(t[n])?t[n]=Array.isArray(e[n])?Wt(e[n],[]):{...Wt(e[n])}:xi(e[n],ce(r)?{}:r[n],t[n]):t[n]=!ze(e[n],r[n]);return t}var dt=(e,r)=>xi(e,r,Wt(r));const Xs={value:!1,isValid:!1},en={value:!0,isValid:!0};var yi=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?en:{value:e[0].value,isValid:!0}:en:Xs}return Xs},vi=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>G(e)?e:r?e===""?NaN:e&&+e:t&&Pe(e)?new Date(e):s?s(e):e;const tn={isValid:!1,value:null};var bi=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,tn):tn;function rn(e){const r=e.ref;return ys(r)?r.files:vs(r)?bi(e.refs).value:mi(r)?[...r.selectedOptions].map(({value:t})=>t):_t(r)?yi(e.refs).value:vi(G(r.value)?e.ref.value:r.value,e)}var Ll=(e,r,t,s)=>{const n={};for(const i of e){const a=E(r,i);a&&W(n,i,a._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},Kt=e=>e instanceof RegExp,ft=e=>G(e)?e:Kt(e)?e.source:Y(e)?Kt(e.value)?e.value.source:e.value:e,nt=e=>({isOnSubmit:!e||e===we.onSubmit,isOnBlur:e===we.onBlur,isOnChange:e===we.onChange,isOnAll:e===we.all,isOnTouch:e===we.onTouched});const sn="AsyncFunction";var Pl=e=>!!e&&!!e.validate&&!!(Re(e.validate)&&e.validate.constructor.name===sn||Y(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===sn)),Fl=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Tr=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const it=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const i=E(e,n);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],n)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(it(l,r))break}else if(Y(l)&&it(l,r))break}}};function nn(e,r,t){const s=E(e,t);if(s||xs(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const i=n.join("."),a=E(r,i),l=E(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(l&&l.type)return{name:i,error:l};n.pop()}return{name:t}}var Ol=(e,r,t,s)=>{t(e);const{name:n,...i}=e;return ae(i)||Object.keys(i).length>=Object.keys(r).length||Object.keys(i).find(a=>r[a]===(!s||we.all))},Vl=(e,r,t)=>!e||!r||e===r||he(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),Ml=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Nl=(e,r)=>!wt(E(e,r)).length&&te(e,r),_i=(e,r,t)=>{const s=he(E(e,t));return W(s,"root",r[t]),W(e,t,s),e},Ot=e=>Pe(e);function on(e,r,t="validate"){if(Ot(e)||Array.isArray(e)&&e.every(Ot)||xe(e)&&!e)return{type:t,message:Ot(e)?e:"",ref:r}}var rt=e=>Y(e)&&!Kt(e)?e:{value:e,message:""},Rr=async(e,r,t,s,n,i)=>{const{ref:a,refs:l,required:c,maxLength:d,minLength:f,min:y,max:p,pattern:w,validate:k,name:C,valueAsNumber:F,mount:x}=e._f,g=E(t,C);if(!x||r.has(C))return{};const I=l?l[0]:a,z=$=>{n&&I.reportValidity&&(I.setCustomValidity(xe($)?"":$||""),I.reportValidity())},U={},m=vs(a),_=_t(a),j=m||_,S=(F||ys(a))&&G(a.value)&&G(g)||qt(a)&&a.value===""||g===""||Array.isArray(g)&&!g.length,v=Rl.bind(null,C,s,U),T=($,M,H,K=Me.maxLength,ie=Me.minLength)=>{const ve=$?M:H;U[C]={type:$?K:ie,message:ve,ref:a,...v($?K:ie,ve)}};if(i?!Array.isArray(g)||!g.length:c&&(!j&&(S||ce(g))||xe(g)&&!g||_&&!yi(l).isValid||m&&!bi(l).isValid)){const{value:$,message:M}=Ot(c)?{value:!!c,message:c}:rt(c);if($&&(U[C]={type:Me.required,message:M,ref:I,...v(Me.required,M)},!s))return z(M),U}if(!S&&(!ce(y)||!ce(p))){let $,M;const H=rt(p),K=rt(y);if(!ce(g)&&!isNaN(g)){const ie=a.valueAsNumber||g&&+g;ce(H.value)||($=ie>H.value),ce(K.value)||(M=ie<K.value)}else{const ie=a.valueAsDate||new Date(g),ve=O=>new Date(new Date().toDateString()+" "+O),ke=a.type=="time",Ie=a.type=="week";Pe(H.value)&&g&&($=ke?ve(g)>ve(H.value):Ie?g>H.value:ie>new Date(H.value)),Pe(K.value)&&g&&(M=ke?ve(g)<ve(K.value):Ie?g<K.value:ie<new Date(K.value))}if(($||M)&&(T(!!$,H.message,K.message,Me.max,Me.min),!s))return z(U[C].message),U}if((d||f)&&!S&&(Pe(g)||i&&Array.isArray(g))){const $=rt(d),M=rt(f),H=!ce($.value)&&g.length>+$.value,K=!ce(M.value)&&g.length<+M.value;if((H||K)&&(T(H,$.message,M.message),!s))return z(U[C].message),U}if(w&&!S&&Pe(g)){const{value:$,message:M}=rt(w);if(Kt($)&&!g.match($)&&(U[C]={type:Me.pattern,message:M,ref:a,...v(Me.pattern,M)},!s))return z(M),U}if(k){if(Re(k)){const $=await k(g,t),M=on($,I);if(M&&(U[C]={...M,...v(Me.validate,M.message)},!s))return z(M.message),U}else if(Y(k)){let $={};for(const M in k){if(!ae($)&&!s)break;const H=on(await k[M](g,t),I,M);H&&($={...H,...v(M,H.message)},z(H.message),s&&(U[C]=$))}if(!ae($)&&(U[C]={ref:I,...$},!s))return U}}return z(!0),U};const $l={mode:we.onSubmit,reValidateMode:we.onChange,shouldFocusError:!0};function Ul(e={}){let r={...$l,...e},t={submitCount:0,isDirty:!1,isLoading:Re(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1};const s={};let n=Y(r.defaultValues)||Y(r.values)?Z(r.values||r.defaultValues)||{}:{},i=r.shouldUnregister?{}:Z(n),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let y={...f};const p={array:Ys(),state:Ys()},w=nt(r.mode),k=nt(r.reValidateMode),C=r.criteriaMode===we.all,F=u=>h=>{clearTimeout(d),d=setTimeout(u,h)},x=async u=>{if(!r.disabled&&(f.isValid||y.isValid||u)){const h=r.resolver?ae((await S()).errors):await T(s,!0);h!==t.isValid&&p.state.next({isValid:h})}},g=(u,h)=>{!r.disabled&&(f.isValidating||f.validatingFields||y.isValidating||y.validatingFields)&&((u||Array.from(l.mount)).forEach(b=>{b&&(h?W(t.validatingFields,b,h):te(t.validatingFields,b))}),p.state.next({validatingFields:t.validatingFields,isValidating:!ae(t.validatingFields)}))},I=(u,h=[],b,L,R=!0,A=!0)=>{if(L&&b&&!r.disabled){if(a.action=!0,A&&Array.isArray(E(s,u))){const V=b(E(s,u),L.argA,L.argB);R&&W(s,u,V)}if(A&&Array.isArray(E(t.errors,u))){const V=b(E(t.errors,u),L.argA,L.argB);R&&W(t.errors,u,V),Nl(t.errors,u)}if((f.touchedFields||y.touchedFields)&&A&&Array.isArray(E(t.touchedFields,u))){const V=b(E(t.touchedFields,u),L.argA,L.argB);R&&W(t.touchedFields,u,V)}(f.dirtyFields||y.dirtyFields)&&(t.dirtyFields=dt(n,i)),p.state.next({name:u,isDirty:M(u,h),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else W(i,u,h)},z=(u,h)=>{W(t.errors,u,h),p.state.next({errors:t.errors})},U=u=>{t.errors=u,p.state.next({errors:t.errors,isValid:!1})},m=(u,h,b,L)=>{const R=E(s,u);if(R){const A=E(i,u,G(b)?E(n,u):b);G(A)||L&&L.defaultChecked||h?W(i,u,h?A:rn(R._f)):ie(u,A),a.mount&&x()}},_=(u,h,b,L,R)=>{let A=!1,V=!1;const q={name:u};if(!r.disabled){if(!b||L){(f.isDirty||y.isDirty)&&(V=t.isDirty,t.isDirty=q.isDirty=M(),A=V!==q.isDirty);const ee=ze(E(n,u),h);V=!!E(t.dirtyFields,u),ee?te(t.dirtyFields,u):W(t.dirtyFields,u,!0),q.dirtyFields=t.dirtyFields,A=A||(f.dirtyFields||y.dirtyFields)&&V!==!ee}if(b){const ee=E(t.touchedFields,u);ee||(W(t.touchedFields,u,b),q.touchedFields=t.touchedFields,A=A||(f.touchedFields||y.touchedFields)&&ee!==b)}A&&R&&p.state.next(q)}return A?q:{}},j=(u,h,b,L)=>{const R=E(t.errors,u),A=(f.isValid||y.isValid)&&xe(h)&&t.isValid!==h;if(r.delayError&&b?(c=F(()=>z(u,b)),c(r.delayError)):(clearTimeout(d),c=null,b?W(t.errors,u,b):te(t.errors,u)),(b?!ze(R,b):R)||!ae(L)||A){const V={...L,...A&&xe(h)?{isValid:h}:{},errors:t.errors,name:u};t={...t,...V},p.state.next(V)}},S=async u=>{g(u,!0);const h=await r.resolver(i,r.context,Ll(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return g(u),h},v=async u=>{const{errors:h}=await S(u);if(u)for(const b of u){const L=E(h,b);L?W(t.errors,b,L):te(t.errors,b)}else t.errors=h;return h},T=async(u,h,b={valid:!0})=>{for(const L in u){const R=u[L];if(R){const{_f:A,...V}=R;if(A){const q=l.array.has(A.name),ee=R._f&&Pl(R._f);ee&&f.validatingFields&&g([L],!0);const oe=await Rr(R,l.disabled,i,C,r.shouldUseNativeValidation&&!h,q);if(ee&&f.validatingFields&&g([L]),oe[A.name]&&(b.valid=!1,h))break;!h&&(E(oe,A.name)?q?_i(t.errors,oe,A.name):W(t.errors,A.name,oe[A.name]):te(t.errors,A.name))}!ae(V)&&await T(V,h,b)}}return b.valid},$=()=>{for(const u of l.unMount){const h=E(s,u);h&&(h._f.refs?h._f.refs.every(b=>!fr(b)):!fr(h._f.ref))&&Ue(u)}l.unMount=new Set},M=(u,h)=>!r.disabled&&(u&&h&&W(i,u,h),!ze(le(),n)),H=(u,h,b)=>hi(u,l,{...a.mount?i:G(h)?n:Pe(u)?{[u]:h}:h},b,h),K=u=>wt(E(a.mount?i:n,u,r.shouldUnregister?E(n,u,[]):[])),ie=(u,h,b={})=>{const L=E(s,u);let R=h;if(L){const A=L._f;A&&(!A.disabled&&W(i,u,vi(h,A)),R=qt(A.ref)&&ce(h)?"":h,mi(A.ref)?[...A.ref.options].forEach(V=>V.selected=R.includes(V.value)):A.refs?_t(A.ref)?A.refs.length>1?A.refs.forEach(V=>(!V.defaultChecked||!V.disabled)&&(V.checked=Array.isArray(R)?!!R.find(q=>q===V.value):R===V.value)):A.refs[0]&&(A.refs[0].checked=!!R):A.refs.forEach(V=>V.checked=V.value===R):ys(A.ref)?A.ref.value="":(A.ref.value=R,A.ref.type||p.state.next({name:u,values:Z(i)})))}(b.shouldDirty||b.shouldTouch)&&_(u,R,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&Q(u)},ve=(u,h,b)=>{for(const L in h){const R=h[L],A=`${u}.${L}`,V=E(s,A);(l.array.has(u)||Y(R)||V&&!V._f)&&!Qe(R)?ve(A,R,b):ie(A,R,b)}},ke=(u,h,b={})=>{const L=E(s,u),R=l.array.has(u),A=Z(h);W(i,u,A),R?(p.array.next({name:u,values:Z(i)}),(f.isDirty||f.dirtyFields||y.isDirty||y.dirtyFields)&&b.shouldDirty&&p.state.next({name:u,dirtyFields:dt(n,i),isDirty:M(u,A)})):L&&!L._f&&!ce(A)?ve(u,A,b):ie(u,A,b),Tr(u,l)&&p.state.next({...t}),p.state.next({name:a.mount?u:void 0,values:Z(i)})},Ie=async u=>{a.mount=!0;const h=u.target;let b=h.name,L=!0;const R=E(s,b),A=V=>{L=Number.isNaN(V)||Qe(V)&&isNaN(V.getTime())||ze(V,E(i,b,V))};if(R){let V,q;const ee=h.type?rn(R._f):ui(u),oe=u.type===Ht.BLUR||u.type===Ht.FOCUS_OUT,uo=!Fl(R._f)&&!r.resolver&&!E(t.errors,b)&&!R._f.deps||Ml(oe,E(t.touchedFields,b),t.isSubmitted,k,w),ar=Tr(b,l,oe);W(i,b,ee),oe?(R._f.onBlur&&R._f.onBlur(u),c&&c(0)):R._f.onChange&&R._f.onChange(u);const lr=_(b,ee,oe),fo=!ae(lr)||ar;if(!oe&&p.state.next({name:b,type:u.type,values:Z(i)}),uo)return(f.isValid||y.isValid)&&(r.mode==="onBlur"?oe&&x():oe||x()),fo&&p.state.next({name:b,...ar?{}:lr});if(!oe&&ar&&p.state.next({...t}),r.resolver){const{errors:Ms}=await S([b]);if(A(ee),L){const po=nn(t.errors,s,b),Ns=nn(Ms,s,po.name||b);V=Ns.error,b=Ns.name,q=ae(Ms)}}else g([b],!0),V=(await Rr(R,l.disabled,i,C,r.shouldUseNativeValidation))[b],g([b]),A(ee),L&&(V?q=!1:(f.isValid||y.isValid)&&(q=await T(s,!0)));L&&(R._f.deps&&Q(R._f.deps),j(b,q,V,lr))}},O=(u,h)=>{if(E(t.errors,h)&&u.focus)return u.focus(),1},Q=async(u,h={})=>{let b,L;const R=he(u);if(r.resolver){const A=await v(G(u)?u:R);b=ae(A),L=u?!R.some(V=>E(A,V)):b}else u?(L=(await Promise.all(R.map(async A=>{const V=E(s,A);return await T(V&&V._f?{[A]:V}:V)}))).every(Boolean),!(!L&&!t.isValid)&&x()):L=b=await T(s);return p.state.next({...!Pe(u)||(f.isValid||y.isValid)&&b!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:b}:{},errors:t.errors}),h.shouldFocus&&!L&&it(s,O,u?R:l.mount),L},le=u=>{const h={...a.mount?i:n};return G(u)?h:Pe(u)?E(h,u):u.map(b=>E(h,b))},de=(u,h)=>({invalid:!!E((h||t).errors,u),isDirty:!!E((h||t).dirtyFields,u),error:E((h||t).errors,u),isValidating:!!E(t.validatingFields,u),isTouched:!!E((h||t).touchedFields,u)}),Ce=u=>{u&&he(u).forEach(h=>te(t.errors,h)),p.state.next({errors:u?t.errors:{}})},De=(u,h,b)=>{const L=(E(s,u,{_f:{}})._f||{}).ref,R=E(t.errors,u)||{},{ref:A,message:V,type:q,...ee}=R;W(t.errors,u,{...ee,...h,ref:L}),p.state.next({name:u,errors:t.errors,isValid:!1}),b&&b.shouldFocus&&L&&L.focus&&L.focus()},ge=(u,h)=>Re(u)?p.state.subscribe({next:b=>u(H(void 0,h),b)}):H(u,h,!0),Et=u=>p.state.subscribe({next:h=>{Vl(u.name,h.name,u.exact)&&Ol(h,u.formState||f,co,u.reRenderRoot)&&u.callback({values:{...i},...t,...h})}}).unsubscribe,et=u=>(a.mount=!0,y={...y,...u.formState},Et({...u,formState:y})),Ue=(u,h={})=>{for(const b of u?he(u):l.mount)l.mount.delete(b),l.array.delete(b),h.keepValue||(te(s,b),te(i,b)),!h.keepError&&te(t.errors,b),!h.keepDirty&&te(t.dirtyFields,b),!h.keepTouched&&te(t.touchedFields,b),!h.keepIsValidating&&te(t.validatingFields,b),!r.shouldUnregister&&!h.keepDefaultValue&&te(n,b);p.state.next({values:Z(i)}),p.state.next({...t,...h.keepDirty?{isDirty:M()}:{}}),!h.keepIsValid&&x()},Ke=({disabled:u,name:h})=>{(xe(u)&&a.mount||u||l.disabled.has(h))&&(u?l.disabled.add(h):l.disabled.delete(h))},Ae=(u,h={})=>{let b=E(s,u);const L=xe(h.disabled)||xe(r.disabled);return W(s,u,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:u}},name:u,mount:!0,...h}}),l.mount.add(u),b?Ke({disabled:xe(h.disabled)?h.disabled:r.disabled,name:u}):m(u,!0,h.value),{...L?{disabled:h.disabled||r.disabled}:{},...r.progressive?{required:!!h.required,min:ft(h.min),max:ft(h.max),minLength:ft(h.minLength),maxLength:ft(h.maxLength),pattern:ft(h.pattern)}:{},name:u,onChange:Ie,onBlur:Ie,ref:R=>{if(R){Ae(u,h),b=E(s,u);const A=G(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,V=kl(A),q=b._f.refs||[];if(V?q.find(ee=>ee===A):A===b._f.ref)return;W(s,u,{_f:{...b._f,...V?{refs:[...q.filter(fr),A,...Array.isArray(E(n,u))?[{}]:[]],ref:{type:A.type,name:u}}:{ref:A}}}),m(u,!1,void 0,A)}else b=E(s,u,{}),b._f&&(b._f.mount=!1),(r.shouldUnregister||h.shouldUnregister)&&!(di(l.array,u)&&a.action)&&l.unMount.add(u)}}},Ve=()=>r.shouldFocusError&&it(s,O,l.mount),be=u=>{xe(u)&&(p.state.next({disabled:u}),it(s,(h,b)=>{const L=E(s,b);L&&(h.disabled=L._f.disabled||u,Array.isArray(L._f.refs)&&L._f.refs.forEach(R=>{R.disabled=L._f.disabled||u}))},0,!1))},ut=(u,h)=>async b=>{let L;b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let R=Z(i);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:A,values:V}=await S();t.errors=A,R=V}else await T(s);if(l.disabled.size)for(const A of l.disabled)W(R,A,void 0);if(te(t.errors,"root"),ae(t.errors)){p.state.next({errors:{}});try{await u(R,b)}catch(A){L=A}}else h&&await h({...t.errors},b),Ve(),setTimeout(Ve);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ae(t.errors)&&!L,submitCount:t.submitCount+1,errors:t.errors}),L)throw L},ao=(u,h={})=>{E(s,u)&&(G(h.defaultValue)?ke(u,Z(E(n,u))):(ke(u,h.defaultValue),W(n,u,Z(h.defaultValue))),h.keepTouched||te(t.touchedFields,u),h.keepDirty||(te(t.dirtyFields,u),t.isDirty=h.defaultValue?M(u,Z(E(n,u))):M()),h.keepError||(te(t.errors,u),f.isValid&&x()),p.state.next({...t}))},Fs=(u,h={})=>{const b=u?Z(u):n,L=Z(b),R=ae(u),A=R?n:L;if(h.keepDefaultValues||(n=b),!h.keepValues){if(h.keepDirtyValues){const V=new Set([...l.mount,...Object.keys(dt(n,i))]);for(const q of Array.from(V))E(t.dirtyFields,q)?W(A,q,E(i,q)):ke(q,E(A,q))}else{if(gs&&G(u))for(const V of l.mount){const q=E(s,V);if(q&&q._f){const ee=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(qt(ee)){const oe=ee.closest("form");if(oe){oe.reset();break}}}}for(const V of l.mount)ke(V,E(A,V))}i=Z(A),p.array.next({values:{...A}}),p.state.next({values:{...A}})}l={mount:h.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!h.keepIsValid||!!h.keepDirtyValues,a.watch=!!r.shouldUnregister,p.state.next({submitCount:h.keepSubmitCount?t.submitCount:0,isDirty:R?!1:h.keepDirty?t.isDirty:!!(h.keepDefaultValues&&!ze(u,n)),isSubmitted:h.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:R?{}:h.keepDirtyValues?h.keepDefaultValues&&i?dt(n,i):t.dirtyFields:h.keepDefaultValues&&u?dt(n,u):h.keepDirty?t.dirtyFields:{},touchedFields:h.keepTouched?t.touchedFields:{},errors:h.keepErrors?t.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Os=(u,h)=>Fs(Re(u)?u(i):u,h),lo=(u,h={})=>{const b=E(s,u),L=b&&b._f;if(L){const R=L.refs?L.refs[0]:L.ref;R.focus&&(R.focus(),h.shouldSelect&&Re(R.select)&&R.select())}},co=u=>{t={...t,...u}},Vs={control:{register:Ae,unregister:Ue,getFieldState:de,handleSubmit:ut,setError:De,_subscribe:Et,_runSchema:S,_getWatch:H,_getDirty:M,_setValid:x,_setFieldArray:I,_setDisabledField:Ke,_setErrors:U,_getFieldArray:K,_reset:Fs,_resetDefaultValues:()=>Re(r.defaultValues)&&r.defaultValues().then(u=>{Os(u,r.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:$,_disableForm:be,_subjects:p,_proxyFormState:f,get _fields(){return s},get _formValues(){return i},get _state(){return a},set _state(u){a=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},get _options(){return r},set _options(u){r={...r,...u}}},subscribe:et,trigger:Q,register:Ae,handleSubmit:ut,watch:ge,setValue:ke,getValues:le,reset:Os,resetField:ao,clearErrors:Ce,unregister:Ue,setError:De,setFocus:lo,getFieldState:de};return{...Vs,formControl:Vs}}var Be=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},pr=(e,r,t={})=>t.shouldFocus||G(t.shouldFocus)?t.focusName||`${e}.${G(t.focusIndex)?r:t.focusIndex}.`:"",hr=(e,r)=>[...e,...he(r)],mr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function gr(e,r,t){return[...e.slice(0,r),...he(t),...e.slice(r)]}var xr=(e,r,t)=>Array.isArray(e)?(G(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],yr=(e,r)=>[...he(r),...he(e)];function Bl(e,r){let t=0;const s=[...e];for(const n of r)s.splice(n-t,1),t++;return wt(s).length?s:[]}var vr=(e,r)=>G(r)?[]:Bl(e,he(r).sort((t,s)=>t-s)),br=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]},an=(e,r,t)=>(e[r]=t,e);function zd(e){const r=rr(),{control:t=r.control,name:s,keyName:n="id",shouldUnregister:i,rules:a}=e,[l,c]=B.useState(t._getFieldArray(s)),d=B.useRef(t._getFieldArray(s).map(Be)),f=B.useRef(l),y=B.useRef(s),p=B.useRef(!1);y.current=s,f.current=l,t._names.array.add(s),a&&t.register(s,a),B.useEffect(()=>t._subjects.array.subscribe({next:({values:m,name:_})=>{if(_===y.current||!_){const j=E(m,y.current);Array.isArray(j)&&(c(j),d.current=j.map(Be))}}}).unsubscribe,[t]);const w=B.useCallback(m=>{p.current=!0,t._setFieldArray(s,m)},[t,s]),k=(m,_)=>{const j=he(Z(m)),S=hr(t._getFieldArray(s),j);t._names.focus=pr(s,S.length-1,_),d.current=hr(d.current,j.map(Be)),w(S),c(S),t._setFieldArray(s,S,hr,{argA:mr(m)})},C=(m,_)=>{const j=he(Z(m)),S=yr(t._getFieldArray(s),j);t._names.focus=pr(s,0,_),d.current=yr(d.current,j.map(Be)),w(S),c(S),t._setFieldArray(s,S,yr,{argA:mr(m)})},F=m=>{const _=vr(t._getFieldArray(s),m);d.current=vr(d.current,m),w(_),c(_),!Array.isArray(E(t._fields,s))&&W(t._fields,s,void 0),t._setFieldArray(s,_,vr,{argA:m})},x=(m,_,j)=>{const S=he(Z(_)),v=gr(t._getFieldArray(s),m,S);t._names.focus=pr(s,m,j),d.current=gr(d.current,m,S.map(Be)),w(v),c(v),t._setFieldArray(s,v,gr,{argA:m,argB:mr(_)})},g=(m,_)=>{const j=t._getFieldArray(s);br(j,m,_),br(d.current,m,_),w(j),c(j),t._setFieldArray(s,j,br,{argA:m,argB:_},!1)},I=(m,_)=>{const j=t._getFieldArray(s);xr(j,m,_),xr(d.current,m,_),w(j),c(j),t._setFieldArray(s,j,xr,{argA:m,argB:_},!1)},z=(m,_)=>{const j=Z(_),S=an(t._getFieldArray(s),m,j);d.current=[...S].map((v,T)=>!v||T===m?Be():d.current[T]),w(S),c([...S]),t._setFieldArray(s,S,an,{argA:m,argB:j},!0,!1)},U=m=>{const _=he(Z(m));d.current=_.map(Be),w([..._]),c([..._]),t._setFieldArray(s,[..._],j=>j,{},!0,!1)};return B.useEffect(()=>{if(t._state.action=!1,Tr(s,t._names)&&t._subjects.state.next({...t._formState}),p.current&&(!nt(t._options.mode).isOnSubmit||t._formState.isSubmitted)&&!nt(t._options.reValidateMode).isOnSubmit)if(t._options.resolver)t._runSchema([s]).then(m=>{const _=E(m.errors,s),j=E(t._formState.errors,s);(j?!_&&j.type||_&&(j.type!==_.type||j.message!==_.message):_&&_.type)&&(_?W(t._formState.errors,s,_):te(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{const m=E(t._fields,s);m&&m._f&&!(nt(t._options.reValidateMode).isOnSubmit&&nt(t._options.mode).isOnSubmit)&&Rr(m,t._names.disabled,t._formValues,t._options.criteriaMode===we.all,t._options.shouldUseNativeValidation,!0).then(_=>!ae(_)&&t._subjects.state.next({errors:_i(t._formState.errors,_,s)}))}t._subjects.state.next({name:s,values:Z(t._formValues)}),t._names.focus&&it(t._fields,(m,_)=>{if(t._names.focus&&_.startsWith(t._names.focus)&&m.focus)return m.focus(),1}),t._names.focus="",t._setValid(),p.current=!1},[l,s,t]),B.useEffect(()=>(!E(t._formValues,s)&&t._setFieldArray(s),()=>{const m=(_,j)=>{const S=E(t._fields,_);S&&S._f&&(S._f.mount=j)};t._options.shouldUnregister||i?t.unregister(s):m(s,!1)}),[s,t,n,i]),{swap:B.useCallback(g,[w,s,t]),move:B.useCallback(I,[w,s,t]),prepend:B.useCallback(C,[w,s,t]),append:B.useCallback(k,[w,s,t]),remove:B.useCallback(F,[w,s,t]),insert:B.useCallback(x,[w,s,t]),update:B.useCallback(z,[w,s,t]),replace:B.useCallback(U,[w,s,t]),fields:B.useMemo(()=>l.map((m,_)=>({...m,[n]:d.current[_]||Be()})),[l,n])}}function wi(e={}){const r=B.useRef(void 0),t=B.useRef(void 0),[s,n]=B.useState({isDirty:!1,isValidating:!1,isLoading:Re(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Re(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...e.formControl?e.formControl:Ul(e),formState:s},e.formControl&&e.defaultValues&&!Re(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const i=r.current.control;return i._options=e,B.useLayoutEffect(()=>i._subscribe({formState:i._proxyFormState,callback:()=>n({...i._formState}),reRenderRoot:!0}),[i]),B.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),B.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==s.isDirty&&i._subjects.state.next({isDirty:a})}},[i,s.isDirty]),B.useEffect(()=>{e.values&&!ze(e.values,t.current)?(i._reset(e.values,i._options.resetOptions),t.current=e.values,n(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),B.useEffect(()=>{e.errors&&!ae(e.errors)&&i._setErrors(e.errors)},[e.errors,i]),B.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),B.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[e.shouldUnregister,i]),r.current.formState=pi(s,i),r.current}var kr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=F;var t=l(wn),s=l(mo),n=l(go),i=l(xo),a=l(yo);function l(x){return x&&x.__esModule?x:{default:x}}function c(x,g){return w(x)||p(x,g)||f(x,g)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
165
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(x,g){if(x){if(typeof x=="string")return y(x,g);var I={}.toString.call(x).slice(8,-1);return I==="Object"&&x.constructor&&(I=x.constructor.name),I==="Map"||I==="Set"?Array.from(x):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?y(x,g):void 0}}function y(x,g){(g==null||g>x.length)&&(g=x.length);for(var I=0,z=Array(g);I<g;I++)z[I]=x[I];return z}function p(x,g){var I=x==null?null:typeof Symbol<"u"&&x[Symbol.iterator]||x["@@iterator"];if(I!=null){var z,U,m,_,j=[],S=!0,v=!1;try{if(m=(I=I.call(x)).next,g!==0)for(;!(S=(z=m.call(I)).done)&&(j.push(z.value),j.length!==g);S=!0);}catch(T){v=!0,U=T}finally{try{if(!S&&I.return!=null&&(_=I.return(),Object(_)!==_))return}finally{if(v)throw U}}return j}}function w(x){if(Array.isArray(x))return x}var k={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},C=/^\[([^\]]+)\](?::([0-9]+))?$/;function F(x,g){if((0,t.default)(x),!x||/[\s<>]/.test(x)||x.indexOf("mailto:")===0||(g=(0,a.default)(g,k),g.validate_length&&x.length>g.max_allowed_length)||!g.allow_fragments&&x.includes("#")||!g.allow_query_components&&(x.includes("?")||x.includes("&")))return!1;var I,z,U,m,_,j,S,v;if(S=x.split("#"),x=S.shift(),S=x.split("?"),x=S.shift(),S=x.split("://"),S.length>1){if(I=S.shift().toLowerCase(),g.require_valid_protocol&&g.protocols.indexOf(I)===-1)return!1}else{if(g.require_protocol)return!1;if(x.slice(0,2)==="//"){if(!g.allow_protocol_relative_urls)return!1;S[0]=x.slice(2)}}if(x=S.join("://"),x==="")return!1;if(S=x.split("/"),x=S.shift(),x===""&&!g.require_host)return!0;if(S=x.split("@"),S.length>1){if(g.disallow_auth||S[0]===""||(z=S.shift(),z.indexOf(":")>=0&&z.split(":").length>2))return!1;var T=z.split(":"),$=c(T,2),M=$[0],H=$[1];if(M===""&&H==="")return!1}m=S.join("@"),j=null,v=null;var K=m.match(C);if(K?(U="",v=K[1],j=K[2]||null):(S=m.split(":"),U=S.shift(),S.length&&(j=S.join(":"))),j!==null&&j.length>0){if(_=parseInt(j,10),!/^[0-9]+$/.test(j)||_<=0||_>65535)return!1}else if(g.require_port)return!1;return g.host_whitelist?(0,s.default)(U,g.host_whitelist):U===""&&!g.require_host?!0:!(!(0,i.default)(U)&&!(0,n.default)(U,g)&&(!v||!(0,i.default)(v,6))||(U=U||v,g.host_blacklist&&(0,s.default)(U,g.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(kr,kr.exports);var zl=kr.exports;const ji=In(zl);var Ir={exports:{}},Dr={exports:{}},Lr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(s){return s==null}e.exports=r.default,e.exports.default=r.default})(Lr,Lr.exports);var Hl=Lr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=l;var t=n(wn),s=n(Hl);function n(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,d){(0,t.default)(c),d=d||{};var f=d.allow_leading_zeroes===!1?i:a,y=!d.hasOwnProperty("min")||(0,s.default)(d.min)||c>=d.min,p=!d.hasOwnProperty("max")||(0,s.default)(d.max)||c<=d.max,w=!d.hasOwnProperty("lt")||(0,s.default)(d.lt)||c<d.lt,k=!d.hasOwnProperty("gt")||(0,s.default)(d.gt)||c>d.gt;return f.test(c)&&y&&p&&w&&k}e.exports=r.default,e.exports.default=r.default})(Dr,Dr.exports);var ql=Dr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var t=s(ql);function s(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=r.default,e.exports.default=r.default})(Ir,Ir.exports);var Wl=Ir.exports;const Kl=In(Wl);function _e({title:e,desc:r,sectionLeftSx:t,sectionRightSx:s,children:n,...i}){return o.jsx(Gl,{...i,children:o.jsxs(Ut,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[o.jsxs(N,{className:"section-left",sx:t,children:[o.jsx(ue,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),o.jsx(N,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:r}})]}),o.jsx(Ut,{className:"section-content",direction:"column",sx:{width:"100%",...s},children:n})]})})}_e.propTypes={title:D.string.isRequired,children:D.node.isRequired,desc:D.string,sectionLeftSx:D.object,sectionRightSx:D.object};_e.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Gl=me(N)`
|
|
166
|
-
display: flex;
|
|
167
|
-
align-items: flex-start;
|
|
168
|
-
width: 100%;
|
|
169
|
-
|
|
170
|
-
.section {
|
|
171
|
-
width: 100%;
|
|
172
|
-
|
|
173
|
-
.section-left {
|
|
174
|
-
flex-shrink: 0;
|
|
175
|
-
flex-grow: 0;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.section-title {
|
|
179
|
-
font-weight: 500;
|
|
180
|
-
line-height: 32px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.section-desc {
|
|
184
|
-
font-weight: normal;
|
|
185
|
-
font-size: 12px;
|
|
186
|
-
white-space: pre-line;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.section-content {
|
|
190
|
-
flex-grow: 1;
|
|
191
|
-
width: 0;
|
|
192
|
-
align-self: center;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
@media (max-width: 900px) {
|
|
197
|
-
.section-left {
|
|
198
|
-
width: 100%;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.section-content {
|
|
202
|
-
width: 100% !important;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
`,_r={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Ql(){var _,j,S;const{api:e}=at(),{blocklet:r}=Zr(),{t}=ye(),{confirmApi:s,confirmHolder:n}=Ln(),i=(_=r==null?void 0:r.meta)==null?void 0:_.did,a=Object.assign({..._r},((S=(j=r==null?void 0:r.settings)==null?void 0:j.notification)==null?void 0:S.email)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:y}=wi({defaultValues:Vn(a,Object.keys(_r))}),p=$n({testReceiver:"",testReceiverError:""}),w=f("enabled"),k=fe(async(v,T,$=!0)=>{var M,H;try{const{blocklet:K}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:v})}}),ie=Object.assign({..._r},((H=(M=K==null?void 0:K.settings)==null?void 0:M.notification)==null?void 0:H.email)||{});y(ie),$&&re.success(t("oauth.saveSuccess"))}catch(K){if($)re.error(K.message||t("oauth.saveFailed"));else throw K}}),C=fe(async(v,T,$)=>{try{d.isDirty&&await k(v,T,!1),await e.sendEmail({input:{did:i,receiver:$,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),re.success(t("notification.email.testSuccess"))}catch(M){re.error(M.message||t("notification.email.testfailed"))}}),F=fe((v,T)=>{p.testReceiver="",p.testReceiverError="",s.open({title:t("notification.email.testSendEmail"),content:()=>o.jsx(N,{sx:{width:"300px"},children:o.jsx(Le,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:p.testReceiver,onChange:$=>{p.testReceiver=$.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm($){var H;const M=(H=p.testReceiver)==null?void 0:H.trim();if(!M){p.testReceiverError=t("notification.email.receiverRequired");return}if(!$s(M)){p.testReceiverError=t("notification.email.receiverInvalid");return}p.testReceiverError="",await C(v,T,M),$()}})}),x=fe(v=>{const T=v==null?void 0:v.trim();return T?$s(T)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),g=fe(v=>{const T=v==null?void 0:v.trim();return T?ji(T,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),I=fe(v=>v?Kl(v)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),z=fe(v=>v!=null&&v.trim()?!0:t("notification.email.userRequired")),U=fe(v=>v!=null&&v.trim()?!0:t("notification.email.passwordRequired")),m=fe(()=>!0);return o.jsxs(N,{children:[o.jsxs(Zl,{component:"form",onSubmit:l(k),disabled:!0,sx:{".section-left":{width:"160px"}},children:[o.jsx(_e,{title:t("notification.email.enable"),my:2.5,children:o.jsx(Te,{name:"enabled",control:c,render:({field:v})=>o.jsx(xt,{control:o.jsx(Ar,{checked:v.value,...v})})})}),o.jsx(_e,{title:t("notification.email.from"),children:o.jsx(Te,{name:"from",control:c,rules:{validate:w?x:m},render:({field:v})=>{var T;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...v,size:"small",required:!0,label:t("notification.email.from"),error:!!d.errors[v.name],helperText:((T=d.errors[v.name])==null?void 0:T.message)||" ",disabled:!w})})}})}),o.jsx(_e,{title:t("notification.email.host"),children:o.jsx(Te,{name:"host",control:c,rules:{validate:w?g:m},render:({field:v})=>{var T;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...v,size:"small",required:!0,error:!!d.errors[v.name],label:t("notification.email.host"),helperText:((T=d.errors[v.name])==null?void 0:T.message)||" ",disabled:!w})})}})}),o.jsx(_e,{title:t("notification.email.port"),children:o.jsx(Te,{name:"port",control:c,rules:{validate:w?I:m},render:({field:v})=>{var T;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...v,size:"small",required:!0,type:"number",error:!!d.errors[v.name],label:t("notification.email.port"),helperText:((T=d.errors[v.name])==null?void 0:T.message)||" ",disabled:!w})})}})}),o.jsx(_e,{title:t("notification.email.user"),children:o.jsx(Te,{name:"user",control:c,rules:{validate:w?z:m},render:({field:v})=>{var T;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...v,size:"small",required:!0,error:!!d.errors[v.name],label:t("notification.email.user"),helperText:((T=d.errors[v.name])==null?void 0:T.message)||" ",disabled:!w})})}})}),o.jsx(_e,{title:t("notification.email.password"),children:o.jsx(Te,{name:"password",control:c,rules:{validate:w?U:m},render:({field:v})=>{var T;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...v,size:"small",required:!0,type:"password",error:!!d.errors[v.name],label:t("notification.email.password"),helperText:((T=d.errors[v.name])==null?void 0:T.message)||" ",disabled:!w})})}})}),o.jsx(_e,{title:t("notification.email.secure"),children:o.jsx(Te,{name:"secure",control:c,rules:{validate:m},render:({field:v})=>o.jsx(Ne,{fullWidth:!0,children:o.jsx(xt,{control:o.jsx(Ar,{checked:v.value,...v,disabled:!w})})})})}),o.jsxs(N,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[o.jsx(Je,{variant:"outlined",color:"warning",onClick:l(F),sx:{mr:2},disabled:!w,children:t("oauth.runTest")}),o.jsx(Je,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]})]}),n]})}const Zl=me(Ut)``,wr={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Jl(){var I,z,U;const{api:e}=at(),{blocklet:r}=Zr(),{t}=ye(),{confirmApi:s,confirmHolder:n}=Ln(),i=(I=r==null?void 0:r.meta)==null?void 0:I.did,a=Object.assign({...wr},((U=(z=r==null?void 0:r.settings)==null?void 0:z.notification)==null?void 0:U.pushKit)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:y}=wi({defaultValues:Vn(a,Object.keys(wr))}),p=$n({testReceiver:"",testReceiverError:""}),w=f("enabled"),k=fe(async(m,_,j=!0)=>{var S,v;try{const{blocklet:T}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:m})}}),$=Object.assign({...wr},((v=(S=T==null?void 0:T.settings)==null?void 0:S.notification)==null?void 0:v.pushKit)||{});y($),j&&re.success(t("oauth.saveSuccess"))}catch(T){if(j)re.error(T.message||t("oauth.saveFailed"));else throw T}}),C=fe(async(m,_)=>{var j,S,v;try{d.isDirty&&await k(m,_,!1);const T=(j=((r==null?void 0:r.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:j.value,$=Mn(tr(T,"/.well-known/service/blocklet/logo"),{v:(S=r==null?void 0:r.meta)==null?void 0:S.version,t:new Date((r==null?void 0:r.updatedAt)||0).getTime()}),M={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:r==null?void 0:r.appDid,fullName:(v=r==null?void 0:r.meta)==null?void 0:v.title,avatar:$}}}};await e.sendPush({input:{did:i,receiver:p.testReceiver,notification:JSON.stringify(M)}}),re.success(t("notification.pushKit.testSuccess"))}catch(T){re.error(T.message||t("notification.pushKit.testfailed"))}}),F=fe((m,_)=>{p.testReceiverError="",s.open({title:t("notification.pushKit.testSend"),content:()=>o.jsx(N,{sx:{width:"450px",maxWidth:"100%"},children:o.jsx(Le,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:p.testReceiver,onChange:j=>{p.testReceiver=j.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(j){var v;if(!((v=p.testReceiver)==null?void 0:v.trim())){p.testReceiverError=t("notification.pushKit.receiverRequired");return}p.testReceiverError="",await C(m,_),j()}})}),x=fe(m=>{const _=m==null?void 0:m.trim();return _?ji(_)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),g=fe(()=>!0);return o.jsxs(N,{children:[o.jsxs(Yl,{component:"form",onSubmit:l(k),disabled:!0,sx:{".section-left":{width:"160px"}},children:[o.jsx(_e,{title:t("notification.pushKit.enable"),my:2.5,children:o.jsx(Te,{name:"enabled",control:c,render:({field:m})=>o.jsx(xt,{control:o.jsx(Ar,{checked:m.value,...m})})})}),o.jsx(_e,{title:t("notification.pushKit.endpoint"),children:o.jsx(Te,{name:"endpoint",control:c,rules:{validate:w?x:g},render:({field:m})=>{var _;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...m,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!d.errors[m.name],helperText:((_=d.errors[m.name])==null?void 0:_.message)||" ",disabled:!w})})}})}),o.jsxs(_e,{title:t("notification.pushKit.customOptions"),children:[o.jsx(Te,{name:"did",control:c,render:({field:m})=>{var _;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...m,size:"small",label:t("notification.pushKit.did"),error:!!d.errors[m.name],helperText:((_=d.errors[m.name])==null?void 0:_.message)||" ",disabled:!w})})}}),o.jsx(Te,{name:"pushPath",control:c,render:({field:m})=>{var _;return o.jsx(Ne,{fullWidth:!0,children:o.jsx(Le,{...m,size:"small",label:t("notification.pushKit.pushPath"),error:!!d.errors[m.name],helperText:((_=d.errors[m.name])==null?void 0:_.message)||" ",disabled:!w})})}})]}),o.jsxs(N,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[o.jsx(Je,{variant:"outlined",color:"warning",onClick:l(F),disabled:!w,children:t("oauth.runTest")}),o.jsx(Je,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]})]}),n]})}const Yl=me(Ut)``,ln=[{label:o.jsx(N,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:o.jsx(N,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function Xl(){const[e,r]=P.useState(ln[0].value),{locale:t}=P.useContext(er),s=Ye(()=>({email:o.jsx(Ql,{}),pushKit:o.jsx(Jl,{})}),[t]),n=P.useMemo(()=>({padding:"10px 0"}),[]);return o.jsxs(N,{children:[o.jsx(Pn,{tabs:ln,current:e,onChange:r}),o.jsx(N,{style:n,children:s[e]})]})}var J=function(r,t,s){return Cn.call(t,"css")?o.jsx(An,En(r,t),s):o.jsx(r,t,s)},kt=function(r,t,s){return Cn.call(t,"css")?o.jsxs(An,En(r,t),s):o.jsxs(r,t,s)};/**
|
|
206
|
-
* (c) Iconify
|
|
207
|
-
*
|
|
208
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
209
|
-
* files at https://github.com/iconify/iconify
|
|
210
|
-
*
|
|
211
|
-
* Licensed under MIT.
|
|
212
|
-
*
|
|
213
|
-
* @license MIT
|
|
214
|
-
* @version 3.1.1
|
|
215
|
-
*/const Si=Object.freeze({left:0,top:0,width:16,height:16}),Gt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),jt=Object.freeze({...Si,...Gt}),Pr=Object.freeze({...jt,body:"",hidden:!1});function ec(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const s=((e.rotate||0)+(r.rotate||0))%4;return s&&(t.rotate=s),t}function cn(e,r){const t=ec(e,r);for(const s in Pr)s in Gt?s in e&&!(s in t)&&(t[s]=Gt[s]):s in r?t[s]=r[s]:s in e&&(t[s]=e[s]);return t}function tc(e,r){const t=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=s[a]&&s[a].parent,c=l&&i(l);c&&(n[a]=[l].concat(c))}return n[a]}return Object.keys(t).concat(Object.keys(s)).forEach(i),n}function rc(e,r,t){const s=e.icons,n=e.aliases||Object.create(null);let i={};function a(l){i=cn(s[l]||n[l],i)}return a(r),t.forEach(a),cn(e,i)}function sc(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(n=>{r(n,null),t.push(n)});const s=tc(e);for(const n in s){const i=s[n];i&&(r(n,rc(e,n,i)),t.push(n))}return t}const ht=/^[a-z0-9]+(-[a-z0-9]+)*$/,ct=(e,r,t,s="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),c=n.pop(),d={provider:n.length>0?n[0]:s,prefix:c,name:l};return r&&!Vt(d)?null:d}const i=n[0],a=i.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return r&&!Vt(l)?null:l}if(t&&s===""){const l={provider:s,prefix:"",name:i};return r&&!Vt(l,t)?null:l}return null},Vt=(e,r)=>e?!!((e.provider===""||e.provider.match(ht))&&(r&&e.prefix===""||e.prefix.match(ht))&&e.name.match(ht)):!1,nc={provider:"",aliases:{},not_found:{},...Si};function jr(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function ic(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!jr(e,nc))return null;const t=r.icons;for(const n in t){const i=t[n];if(!n.match(ht)||typeof i.body!="string"||!jr(i,Pr))return null}const s=r.aliases||Object.create(null);for(const n in s){const i=s[n],a=i.parent;if(!n.match(ht)||typeof a!="string"||!t[a]&&!s[a]||!jr(i,Pr))return null}return r}const Qt=Object.create(null);function oc(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Oe(e,r){const t=Qt[e]||(Qt[e]=Object.create(null));return t[r]||(t[r]=oc(e,r))}function bs(e,r){return ic(r)?sc(r,(t,s)=>{s?e.icons[t]=s:e.missing.add(t)}):[]}function ac(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}function lc(e,r){let t=[];return(typeof e=="string"?[e]:Object.keys(Qt)).forEach(n=>{(typeof n=="string"&&typeof r=="string"?[r]:Object.keys(Qt[n]||{})).forEach(a=>{const l=Oe(n,a);t=t.concat(Object.keys(l.icons).map(c=>(n!==""?"@"+n+":":"")+a+":"+c))})}),t}let _s=!1;function cc(e){return _s}function St(e){const r=typeof e=="string"?ct(e,!0,_s):e;if(r){const t=Oe(r.provider,r.prefix),s=r.name;return t.icons[s]||(t.missing.has(s)?null:void 0)}}function uc(e,r){const t=ct(e,!0,_s);if(!t)return!1;const s=Oe(t.provider,t.prefix);return ac(s,t.name,r)}function Ci(e,r){if(typeof e!="object")return!1;typeof r!="string"&&(r=e.provider||"");const t=e.prefix;if(!Vt({provider:r,prefix:t,name:"a"}))return!1;const s=Oe(r,t);return!!bs(s,e)}function dc(e){return!!St(e)}function fc(e){const r=St(e);return r?{...jt,...r}:null}const Ai=Object.freeze({width:null,height:null}),Ei=Object.freeze({...Ai,...Gt}),pc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hc=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Fr(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const s=e.split(pc);if(s===null||!s.length)return e;const n=[];let i=s.shift(),a=hc.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?n.push(i):n.push(Math.ceil(l*r*t)/t)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");a=!a}}const mc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,r){const t={...jt,...e},s={...Ei,...r},n={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,s].forEach(k=>{const C=[],F=k.hFlip,x=k.vFlip;let g=k.rotate;F?x?g+=2:(C.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),C.push("scale(-1 1)"),n.top=n.left=0):x&&(C.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),C.push("scale(1 -1)"),n.top=n.left=0);let I;switch(g<0&&(g-=Math.floor(g/4)*4),g=g%4,g){case 1:I=n.height/2+n.top,C.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:C.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:I=n.width/2+n.left,C.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}g%2===1&&(n.left!==n.top&&(I=n.left,n.left=n.top,n.top=I),n.width!==n.height&&(I=n.width,n.width=n.height,n.height=I)),C.length&&(i='<g transform="'+C.join(" ")+'">'+i+"</g>")});const a=s.width,l=s.height,c=n.width,d=n.height;let f,y;a===null?(y=l===null?"1em":l==="auto"?d:l,f=Fr(y,c/d)):(f=a==="auto"?c:a,y=l===null?Fr(f,d/c):l==="auto"?d:l);const p={},w=(k,C)=>{mc(C)||(p[k]=C.toString())};return w("width",f),w("height",y),p.viewBox=n.left.toString()+" "+n.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:p,body:i}}const gc=/\sid="(\S+)"/g,xc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let yc=0;function Ti(e,r=xc){const t=[];let s;for(;s=gc.exec(e);)t.push(s[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=typeof r=="function"?r(i):r+(yc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const Ze={local:!0,session:!0},Ri={local:new Set,session:new Set};let ws=!1;function vc(e){ws=e}const un="iconify2",bt="iconify",ki=bt+"-count",dn=bt+"-version",Ii=36e5,bc=168;function Or(e,r){try{return e.getItem(r)}catch{}}function js(e,r,t){try{return e.setItem(r,t),!0}catch{}}function fn(e,r){try{e.removeItem(r)}catch{}}function Vr(e,r){return js(e,ki,r.toString())}function Mr(e){return parseInt(Or(e,ki))||0}let It=typeof window>"u"?{}:window;function Di(e){const r=e+"Storage";try{if(It&&It[r]&&typeof It[r].length=="number")return It[r]}catch{}Ze[e]=!1}function Li(e,r){const t=Di(e);if(!t)return;const s=Or(t,dn);if(s!==un){if(s){const l=Mr(t);for(let c=0;c<l;c++)fn(t,bt+c.toString())}js(t,dn,un),Vr(t,0);return}const n=Math.floor(Date.now()/Ii)-bc,i=l=>{const c=bt+l.toString(),d=Or(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>n&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&r(f,l))return!0}catch{}fn(t,c)}};let a=Mr(t);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,Vr(t,a)):Ri[e].add(l))}function Pi(){if(!ws){vc(!0);for(const e in Ze)Li(e,r=>{const t=r.data,s=r.provider,n=t.prefix,i=Oe(s,n);if(!bs(i,t).length)return!1;const a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Fi(e,r){switch(e){case"local":case"session":Ze[e]=r;break;case"all":for(const t in Ze)Ze[t]=r;break}}const Nr=Object.create(null);function Oi(e,r){Nr[e]=r}function $r(e){return Nr[e]||Nr[""]}function Ss(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const nr=Object.create(null),pt=["https://api.simplesvg.com","https://api.unisvg.com"],Mt=[];for(;pt.length>0;)pt.length===1||Math.random()>.5?Mt.push(pt.shift()):Mt.push(pt.pop());nr[""]=Ss({resources:["https://api.iconify.design"].concat(Mt)});function Vi(e,r){const t=Ss(r);return t===null?!1:(nr[e]=t,!0)}function ir(e){return nr[e]}function _c(){return Object.keys(nr)}const wc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Zt=wc();function jc(e){Zt=e}function Sc(){return Zt}function Cc(e,r){const t=ir(e);if(!t)return 0;let s;if(!t.maxURL)s=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const i=r+".json?icons=";s=t.maxURL-n-t.path.length-i.length}return s}function Ac(e){return e===404}const Ec=(e,r,t)=>{const s=[],n=Cc(e,r),i="icons";let a={type:i,provider:e,prefix:r,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=n&&d>0&&(s.push(a),a={type:i,provider:e,prefix:r,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function Tc(e){if(typeof e=="string"){const r=ir(e);if(r)return r.path}return"/"}const Rc=(e,r,t)=>{if(!Zt){t("abort",424);return}let s=Tc(r.provider);switch(r.type){case"icons":{const i=r.prefix,l=r.icons.join(","),c=new URLSearchParams({icons:l});s+=i+".json?"+c.toString();break}case"custom":{const i=r.uri;s+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let n=503;Zt(e+s).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{t(Ac(a)?"abort":"next",a)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",n)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",n)})},kc={prepare:Ec,send:Rc};function Ic(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let s={provider:"",prefix:"",name:""};return e.forEach(n=>{if(s.name===n.name&&s.prefix===n.prefix&&s.provider===n.provider)return;s=n;const i=n.provider,a=n.prefix,l=n.name,c=t[i]||(t[i]=Object.create(null)),d=c[a]||(c[a]=Oe(i,a));let f;l in d.icons?f=r.loaded:a===""||d.missing.has(l)?f=r.missing:f=r.pending;const y={provider:i,prefix:a,name:l};f.push(y)}),r}function Mi(e,r){e.forEach(t=>{const s=t.loaderCallbacks;s&&(t.loaderCallbacks=s.filter(n=>n.id!==r))})}function Dc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const s=e.provider,n=e.prefix;r.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==n)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:s,prefix:n,name:d});else if(e.missing.has(d))a.missing.push({provider:s,prefix:n,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Mi([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Lc=0;function Pc(e,r,t){const s=Lc++,n=Mi.bind(null,t,s);if(!r.pending.length)return n;const i={id:s,icons:r,callback:e,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),n}function Fc(e,r=!0,t=!1){const s=[];return e.forEach(n=>{const i=typeof n=="string"?ct(n,r,t):n;i&&s.push(i)}),s}var Oc={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Vc(e,r,t,s){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let a;if(e.random){let m=e.resources.slice(0);for(a=[];m.length>1;){const _=Math.floor(Math.random()*m.length);a.push(m[_]),m=m.slice(0,_).concat(m.slice(_+1))}a=a.concat(m)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,y=null,p=[],w=[];typeof s=="function"&&w.push(s);function k(){y&&(clearTimeout(y),y=null)}function C(){c==="pending"&&(c="aborted"),k(),p.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),p=[]}function F(m,_){_&&(w=[]),typeof m=="function"&&w.push(m)}function x(){return{startTime:l,payload:r,status:c,queriesSent:d,queriesPending:p.length,subscribe:F,abort:C}}function g(){c="failed",w.forEach(m=>{m(void 0,f)})}function I(){p.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),p=[]}function z(m,_,j){const S=_!=="success";switch(p=p.filter(v=>v!==m),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){f=j,g();return}if(S){f=j,p.length||(a.length?U():g());return}if(k(),I(),!e.random){const v=e.resources.indexOf(m.resource);v!==-1&&v!==e.index&&(e.index=v)}c="completed",w.forEach(v=>{v(j)})}function U(){if(c!=="pending")return;k();const m=a.shift();if(m===void 0){if(p.length){y=setTimeout(()=>{k(),c==="pending"&&(I(),g())},e.timeout);return}g();return}const _={status:"pending",resource:m,callback:(j,S)=>{z(_,j,S)}};p.push(_),d++,y=setTimeout(U,e.rotate),t(m,r,_.callback)}return setTimeout(U),x}function Ni(e){const r={...Oc,...e};let t=[];function s(){t=t.filter(l=>l().status==="pending")}function n(l,c,d){const f=Vc(r,l,c,(y,p)=>{s(),d&&d(y,p)});return t.push(f),f}function i(l){return t.find(c=>l(c))||null}return{query:n,find:i,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:s}}function pn(){}const Sr=Object.create(null);function Mc(e){if(!Sr[e]){const r=ir(e);if(!r)return;const t=Ni(r),s={config:r,redundancy:t};Sr[e]=s}return Sr[e]}function $i(e,r,t){let s,n;if(typeof e=="string"){const i=$r(e);if(!i)return t(void 0,424),pn;n=i.send;const a=Mc(e);a&&(s=a.redundancy)}else{const i=Ss(e);if(i){s=Ni(i);const a=e.resources?e.resources[0]:"",l=$r(a);l&&(n=l.send)}}return!s||!n?(t(void 0,424),pn):s.query(r,n,t)().abort}function Nc(e,r){const t=e.lastModifiedCached;if(t&&t>=r)return t===r;if(e.lastModifiedCached=r,t)for(const s in Ze)Li(s,n=>{const i=n.data;return n.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===r});return!0}function $c(e,r){ws||Pi();function t(s){let n;if(!Ze[s]||!(n=Di(s)))return;const i=Ri[s];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Mr(n),!Vr(n,a+1))return;const l={cached:Math.floor(Date.now()/Ii),provider:e.provider,data:r};return js(n,bt+a.toString(),JSON.stringify(l))}r.lastModified&&!Nc(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),t("local")||t("session"))}function hn(){}function Uc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Dc(e)}))}function Bc(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:s}=e,n=e.iconsToLoad;delete e.iconsToLoad;let i;if(!n||!(i=$r(t)))return;i.prepare(t,s,n).forEach(l=>{$i(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{e.missing.add(d)});else try{const d=bs(e,c);if(!d.length)return;const f=e.pendingIcons;f&&d.forEach(y=>{f.delete(y)}),$c(e,c)}catch(d){console.error(d)}Uc(e)})})}))}const zc=e=>{const t=Oe(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},Cs=(e,r)=>{const t=Fc(e,!0,cc()),s=Ic(t);if(!s.pending.length){let c=!0;return r&&setTimeout(()=>{c&&r(s.loaded,s.missing,s.pending,hn)}),()=>{c=!1}}const n=Object.create(null),i=[];let a,l;return s.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(Oe(d,f));const y=n[d]||(n[d]=Object.create(null));y[f]||(y[f]=[])}),s.pending.forEach(c=>{const{provider:d,prefix:f,name:y}=c,p=Oe(d,f),w=p.pendingIcons||(p.pendingIcons=new Set);w.has(y)||(w.add(y),n[d][f].push(y))}),i.forEach(c=>{const{provider:d,prefix:f}=c;n[d][f].length&&Bc(c,n[d][f])}),r?Pc(r,s,i):hn},Hc=e=>new Promise((r,t)=>{const s=typeof e=="string"?ct(e,!0):e;if(!s){t(e);return}Cs([s||e],n=>{if(n.length&&s){const i=St(s);if(i){r({...jt,...i});return}}t(e)})});function Ui(e,r){const t={...e};for(const s in r){const n=r[s],i=typeof n;s in Ai?(n===null||n&&(i==="string"||i==="number"))&&(t[s]=n):i===typeof t[s]&&(t[s]=s==="rotate"?n%4:n)}return t}const or={...Ei,inline:!1},Cr="iconify",Ur="iconify-inline",We="iconifyData"+Date.now();let Xe=[];function Ct(e){for(let r=0;r<Xe.length;r++){const t=Xe[r];if((typeof t.node=="function"?t.node():t.node)===e)return t}}function Bi(e,r=!1){let t=Ct(e);return t?(t.temporary&&(t.temporary=r),t):(t={node:e,temporary:r},Xe.push(t),t)}function qc(){if(document.documentElement)return Bi(document.documentElement);Xe.push({node:()=>document.documentElement})}function Wc(e){Xe=Xe.filter(r=>e!==r&&e!==(typeof r.node=="function"?r.node():r.node))}function At(){return Xe}function Kc(e){const r=document;r.readyState&&r.readyState!=="loading"?e():r.addEventListener("DOMContentLoaded",e)}let mt=null;const Gc={childList:!0,subtree:!0,attributes:!0};function zi(e){if(!e.observer)return;const r=e.observer;r.pendingScan||(r.pendingScan=setTimeout(()=>{delete r.pendingScan,mt&&mt(e)}))}function Qc(e,r){if(!e.observer)return;const t=e.observer;if(!t.pendingScan)for(let s=0;s<r.length;s++){const n=r[s];if(n.addedNodes&&n.addedNodes.length>0||n.type==="attributes"&&n.target[We]!==void 0){t.paused||zi(e);return}}}function Hi(e,r){e.observer.instance.observe(r,Gc)}function Jt(e){let r=e.observer;if(r&&r.instance)return;const t=typeof e.node=="function"?e.node():e.node;!t||!window||(r||(r={paused:0},e.observer=r),r.instance=new window.MutationObserver(Qc.bind(null,e)),Hi(e,t),r.paused||zi(e))}function mn(){At().forEach(Jt)}function qi(e){if(!e.observer)return;const r=e.observer;r.pendingScan&&(clearTimeout(r.pendingScan),delete r.pendingScan),r.instance&&(r.instance.disconnect(),delete r.instance)}function Zc(e){const r=mt!==null;if(mt!==e&&(mt=e,r&&At().forEach(qi)),r){mn();return}Kc(mn)}function Br(e){(e?[e]:At()).forEach(r=>{if(!r.observer){r.observer={paused:1};return}const t=r.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function Jc(e){if(e){const r=Ct(e);r&&Br(r)}else Br()}function zr(e){(e?[e]:At()).forEach(r=>{if(!r.observer){Jt(r);return}const t=r.observer;if(t.paused&&(t.paused--,!t.paused)){const s=typeof r.node=="function"?r.node():r.node;if(s)t.instance?Hi(r,s):Jt(r);else return}})}function Yc(e){if(e){const r=Ct(e);r&&zr(r)}else zr()}function Wi(e,r=!1){const t=Bi(e,r);return Jt(t),t}function Ki(e){const r=Ct(e);r&&(qi(r),Wc(e))}function Xc(e,r){if(e.name!==r.name||e.mode!==r.mode)return!0;const t=e.customisations,s=r.customisations;for(const n in or)if(t[n]!==s[n])return!0;return!1}function eu(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function s(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(e);return isNaN(n)?0:s(n)}else if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/n,i%1===0?s(i):0)}}return r}const tu=/[\s,]+/;function ru(e,r){r.split(tu).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const su=["width","height"],nu=["inline","hFlip","vFlip"];function iu(e,r){return e===r||e==="true"?!0:e===""||e==="false"?!1:null}function ou(e){const r=e.getAttribute("data-icon"),t=typeof r=="string"&&ct(r,!0);if(!t)return null;const s={...or,inline:e.classList&&e.classList.contains(Ur)};su.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const n=e.getAttribute("data-rotate");typeof n=="string"&&(s.rotate=eu(n));const i=e.getAttribute("data-flip");typeof i=="string"&&ru(s,i),nu.forEach(l=>{const c="data-"+l,d=iu(e.getAttribute(c),c);typeof d=="boolean"&&(s[l]=d)});const a=e.getAttribute("data-mode");return{name:r,icon:t,customisations:s,mode:a}}const au="svg."+Cr+", i."+Cr+", span."+Cr+", i."+Ur+", span."+Ur;function lu(e){const r=[];return e.querySelectorAll(au).forEach(t=>{const s=t[We]||t.tagName.toLowerCase()!=="svg"?ou(t):null;s&&r.push({node:t,props:s})}),r}function Gi(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)t+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}let gt;function cu(){try{gt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{gt=null}}function uu(e){return gt===void 0&&cu(),gt?gt.createHTML(e):e}function Qi(e){const r=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{e[t]&&r.add("iconify--"+e[t])}),r}function Zi(e,r,t,s){const n=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{n.add(l)})}const i=[];return r.forEach(a=>{n.contains(a)?t.has(a)&&i.push(a):(n.add(a),i.push(a))}),t.forEach(a=>{r.has(a)||n.remove(a)}),i}function Ji(e,r,t){const s=e.style;(t||[]).forEach(i=>{s.removeProperty(i)});const n=[];for(const i in r)s.getPropertyValue(i)||(n.push(i),s.setProperty(i,r[i]));return n}function Yi(e,r,t){let s;try{s=document.createElement("span")}catch{return e}const n=r.customisations,i=sr(t,n),a=e[We],l=Gi(Ti(i.body),{"aria-hidden":"true",role:"img",...i.attributes});s.innerHTML=uu(l);const c=s.childNodes[0],d=e.attributes;for(let k=0;k<d.length;k++){const C=d.item(k),F=C.name;F!=="class"&&!c.hasAttribute(F)&&c.setAttribute(F,C.value)}const f=Qi(r.icon),y=Zi(c,f,new Set(a&&a.addedClasses),e),p=Ji(c,n.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),w={...r,status:"loaded",addedClasses:y,addedStyles:p};return c[We]=w,e.parentNode&&e.parentNode.replaceChild(c,e),c}function du(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function fu(e){return"data:image/svg+xml,"+du(e)}function pu(e){return'url("'+fu(e)+'")'}const hu={display:"inline-block"},Hr={"background-color":"currentColor"},Xi={"background-color":"transparent"},gn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},xn={"-webkit-mask":Hr,mask:Hr,background:Xi};for(const e in xn){const r=xn[e];for(const t in gn)r[e+"-"+t]=gn[t]}function yn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function mu(e,r,t,s){const n=r.customisations,i=sr(t,n),a=i.attributes,l=e[We],c=Gi(i.body,{...a,width:t.width+"",height:t.height+""}),d=Qi(r.icon),f=Zi(e,d,new Set(l&&l.addedClasses)),p={"--svg":pu(c),width:yn(a.width),height:yn(a.height),...hu,...s?Hr:Xi};n.inline&&(p["vertical-align"]="-0.125em");const w=Ji(e,p,l&&l.addedStyles),k={...r,status:"loaded",addedClasses:f,addedStyles:w};return e[We]=k,e}let Dt=!1;function gu(){Dt||(Dt=!0,setTimeout(()=>{Dt&&(Dt=!1,ot())}))}function ot(e,r=!1){const t=Object.create(null);function s(n,i){const{provider:a,prefix:l,name:c}=n,d=Oe(a,l),f=d.icons[c];if(f)return{status:"loaded",icon:f};if(d.missing.has(c))return{status:"missing"};if(i&&!zc(n)){const y=t[a]||(t[a]=Object.create(null));(y[l]||(y[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:At()).forEach(n=>{const i=typeof n.node=="function"?n.node():n.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(d,f,y){if(l||(l=!0,Br(n)),d.tagName.toUpperCase()!=="SVG"){const p=f.mode,w=p==="mask"||(p==="bg"?!1:p==="style"?y.body.indexOf("currentColor")!==-1:null);if(typeof w=="boolean"){mu(d,f,{...jt,...y},w);return}}Yi(d,f,y)}lu(i).forEach(({node:d,props:f})=>{const y=d[We];if(!y){const{status:w,icon:k}=s(f.icon,!0);if(k){c(d,f,k);return}a=a||w==="loading",d[We]={...f,status:w};return}let p;if(Xc(y,f)){if(p=s(f.icon,y.name!==f.name),!p.icon){a=a||p.status==="loading",Object.assign(y,{...f,status:p.status});return}}else{if(y.status!=="loading")return;if(p=s(f.icon,!1),!p.icon){y.status=p.status;return}}c(d,f,p.icon)}),n.temporary&&!a?Ki(i):r&&a?Wi(i,!0):l&&n.observer&&zr(n)});for(const n in t){const i=t[n];for(const a in i){const l=i[a];Cs(Array.from(l).map(c=>({provider:n,prefix:a,name:c})),gu)}}}function xu(e){const r=Ct(e);r?ot(r):ot({node:e,temporary:!0},!0)}function eo(e,r,t=!1){const s=St(e);if(!s)return null;const n=ct(e),i=Ui(or,r||{}),a=Yi(document.createElement("span"),{name:e,icon:n,customisations:i},s);return t?a.outerHTML:a}function yu(){return"3.1.1"}function vu(e,r){return eo(e,r,!1)}function bu(e,r){return eo(e,r,!0)}function _u(e,r){const t=St(e);if(!t)return null;const s=Ui(or,r||{});return sr(t,s)}function wu(e){e?xu(e):ot()}if(typeof document<"u"&&typeof window<"u"){qc();const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!Ci(s))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{Zc(ot),ot()})}function ju(e,r){Fi(e,r!==!1)}function Su(e){Fi(e,!0)}Oi("",kc);if(typeof document<"u"&&typeof window<"u"){Pi();const e=window;if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(const t in r){const s="IconifyProviders["+t+"] is invalid.";try{const n=r[t];if(typeof n!="object"||!n||n.resources===void 0)continue;Vi(t,n)||console.error(s)}catch{console.error(s)}}}}const Cu={getAPIConfig:ir,setAPIModule:Oi,sendAPIQuery:$i,setFetch:jc,getFetch:Sc,listAPIProviders:_c},Au={_api:Cu,addAPIProvider:Vi,loadIcons:Cs,loadIcon:Hc,iconExists:dc,getIcon:fc,listIcons:lc,addIcon:uc,addCollection:Ci,replaceIDs:Ti,calculateSize:Fr,buildIcon:sr,getVersion:yu,renderSVG:vu,renderHTML:bu,renderIcon:_u,scan:wu,observe:Wi,stopObserving:Ki,pauseObserver:Jc,resumeObserver:Yc,enableCache:ju,disableCache:Su};try{self.Iconify===void 0&&(self.Iconify=Au)}catch{}var As={},Eu=je;Object.defineProperty(As,"__esModule",{value:!0});var to=As.default=void 0,Tu=Eu(Se()),Ru=o;to=As.default=(0,Tu.default)((0,Ru.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Es({infos:e}){const{t:r}=ye(),t=new URL("https://community.arcblock.io/discussions/add");e.forEach(n=>{t.searchParams.set(n.label,n.value)});const s=e.map(n=>`* ${n.label}: ${n.value}`).join(`
|
|
216
|
-
`);return t.searchParams.set("report","server"),t.searchParams.set("context",`[Enter feedback here]
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
<!--
|
|
221
|
-
[Server Info]
|
|
222
|
-
${s}
|
|
223
|
-
* Page: ${window.location.href}
|
|
224
|
-
-->
|
|
225
|
-
`),J(N,{sx:{mx:{xs:0,md:2}},children:J(Kr,{sx:{color:"text.primary"},target:"_blank",href:t.href,rel:"noreferrer",style:{textDecoration:"underline"},children:r("common.reportIssue")})})}Es.propTypes={infos:D.arrayOf(D.shape({label:D.string,value:D.string}))};Es.defaultProps={infos:[]};var Ts={},ku=je;Object.defineProperty(Ts,"__esModule",{value:!0});var qr=Ts.default=void 0,Iu=ku(Se()),vn=o;qr=Ts.default=(0,Iu.default)([(0,vn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,vn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function He({children:e}){return Fe(t=>t.breakpoints.down("md"))?o.jsx(yt,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(N,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(qr,{fontSize:"small"})})}):o.jsxs(N,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(qr,{fontSize:"small"}),e]})}He.propTypes={children:D.node.isRequired};const Du="https://launcher.arcblock.io/",Lu=30*24*60*60*1e3;function Rs({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var U,m,_,j,S,v;const{t:i,locale:a}=ye(),l=at(),[c,d]=zn({safeIframeRef:null,popoverAnchorEl:null}),f=P.useRef(null),y=Fe(T=>T.breakpoints.down("md")),{sx:p={},...w}=n,k=y?"mobile":"desktop",C=Bn(async()=>{const[T,$]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),Fn({launcherUrl:e||Du,nftDid:t,launcherSessionId:s,locale:a})]);if(T!=null&&T.error)throw new Error(T.error);return{launcherSession:T.launcherSession,subscriptionURL:$}},[a]);if(C.loading)return o.jsx(Ge,{label:o.jsxs(He,{children:[!y&&i("expiration.desktop.loading"),o.jsx(qe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...w});if(C.error)return console.error(C.error),o.jsx(Ge,{label:o.jsx(He,{children:i(`expiration.${k}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...w,onClick:()=>C.retry()});const F=T=>{d({popoverAnchorEl:T.currentTarget})},x=()=>{d({popoverAnchorEl:null})},g=(U=C.value)==null?void 0:U.launcherSession;let I="success";[ne.LAUNCH_SESSION_STATUS.overdue,ne.LAUNCH_SESSION_STATUS.canceled,ne.LAUNCH_SESSION_STATUS.terminated].includes((_=(m=C.value)==null?void 0:m.launcherSession)==null?void 0:_.status)&&(I="error");let z=null;if(g.expirationDate&&!g.subscription){const T=st(g.expirationDate).diff(st(),"ms");z=i(`expiration.${k}.tips.${I}`,{validity:Un(T,{locale:On(a),compact:!0,verbose:!0})}),T>0&&T<=Lu&&(I="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(Ge,{label:o.jsx(He,{children:z||((S=(j=g==null?void 0:g.subscription)==null?void 0:j.product)==null?void 0:S.name)||i("common.subscription")}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...w,onClick:F}),o.jsx(Tn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(N,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(v=C.value)==null?void 0:v.subscriptionURL})})})]})}Rs.propTypes={chainHost:D.string.isRequired,nftId:D.string,launcherSessionId:D.string,sx:D.object,retention:D.number,launcherUrl:D.string.isRequired};Rs.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Pu=30*24*60*60*1e3,Fu="https://launcher.arcblock.io/";function ks({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var m,_,j,S,v,T,$;const{t:i,locale:a}=ye(),[l,c]=zn({safeIframeRef:null,popoverAnchorEl:null}),d=P.useRef(null),f=Fe(M=>M.breakpoints.down("md")),y=at(),{sx:p={},...w}=n,k=f?"mobile":"desktop",C=Bn(async()=>{const[M,H]=await Promise.all([y.api.getLauncherSession({input:{launcherSessionId:s||t,launcherUrl:e}}),Fn({launcherUrl:e||Fu,nftDid:t,launcherSessionId:s,locale:a})]);if(M!=null&&M.error)throw new Error(M.error);return{launcherSession:M.launcherSession,subscriptionURL:H}},[a]);if(C.loading)return o.jsx(Ge,{label:o.jsxs(He,{children:[!f&&i("expiration.desktop.loading"),o.jsx(qe,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...w});if(C.error)return console.error(C.error),o.jsx(Ge,{label:o.jsx(He,{children:i(`expiration.${k}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...w,onClick:()=>C.retry()});const F=(_=(m=C.value)==null?void 0:m.launcherSession)==null?void 0:_.expirationDate,x=st(F).isBefore(st()),g=st(F).diff(st(),"ms");let I="success";g<=Pu&&(I="warning"),x&&(I="error");const z=M=>{c({popoverAnchorEl:M.currentTarget})},U=()=>{c({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((S=(j=C.value)==null?void 0:j.launcherSession)==null?void 0:S.subscription)&&o.jsx(Ge,{label:o.jsx(He,{children:i("expiration.desktop.nextInvoice",{date:ta(F,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...w,onClick:z}),!((T=(v=C.value)==null?void 0:v.launcherSession)!=null&&T.subscription)&&o.jsx(Ge,{label:o.jsx(He,{children:i(`expiration.${k}.tips.${I}`,{validity:Un(g,{locale:On(a),compact:!0,verbose:!0})})}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...w,onClick:z}),o.jsx(Tn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:U,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(N,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:($=C.value)==null?void 0:$.subscriptionURL})})})]})}ks.propTypes={chainHost:D.string.isRequired,nftId:D.string,launcherSessionId:D.string,sx:D.object,retention:D.number,launcherUrl:D.string.isRequired};ks.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Is={},Ou=je;Object.defineProperty(Is,"__esModule",{value:!0});var ro=Is.default=void 0,Vu=Ou(Se()),Mu=o;ro=Is.default=(0,Vu.default)((0,Mu.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Ds={},Nu=je;Object.defineProperty(Ds,"__esModule",{value:!0});var so=Ds.default=void 0,$u=Nu(Se()),Uu=o;so=Ds.default=(0,$u.default)((0,Uu.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const Bu={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function Ls({children:e,style:r,...t}){return o.jsx(Wo,{style:r,...t,children:e})}Ls.propTypes={children:D.any.isRequired,style:D.object};Ls.defaultProps={style:{}};const se={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Nt={added:se.grey,waiting:se.yellow,downloading:se.yellow,extracting:se.yellow,downloaded:se.grey,installing:se.yellow,installed:se.grey,starting:se.yellow,running:se.running,stopping:se.yellow,stopped:se.reverse,error:se.error,upgrading:se.yellow,restarting:se.yellow,corrupted:se.error,deleting:se.yellow,resource:se.primary},zu={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"};function no({isResource:e,status:r,variant:t,source:s,progress:n,...i}){const{t:a}=P.useContext(er),l=pe.isInProgress(r),c=e&&r==="stopped"?"resource":r,d=a(`blocklet.status.${c}`);return t==="pin"?o.jsx(yt,{title:a("blocklet.statusTip",{status:d}),children:o.jsxs(N,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(N,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Nt[c],style:{opacity:.15}}),o.jsx(N,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Nt[c]})]})}):t==="dot"?o.jsx(yt,{title:a("blocklet.statusTip",{status:d}),children:o.jsx(wa,{color:Nt[c],...i})}):o.jsxs(Ls,{type:zu[c],...i,children:[l&&o.jsx(qe,{size:12,color:"inherit",style:{marginRight:5}}),d,c==="downloading"&&n?o.jsx("div",{style:{marginLeft:5},children:`${n} %`}):null]})}no.propTypes={status:D.string.isRequired,variant:D.oneOf(["dot","tag","pin"]),source:D.string,progress:D.number,isResource:D.bool};no.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Hu(){const{inFullPage:e,toggleFullPage:r}=_o();return J(Yt,{onClick:r,children:e?J(so,{sx:{transform:"scale(1.3)"}}):J(ro,{sx:{transform:"scale(1.3)"}})})}function Ps({children:e}){var I,z,U;const{t:r}=ye(),{loading:t,error:s,actions:{refreshBlocklet:n},env:i,blocklet:a}=lt(),{info:l}=ra(),c=Mo(),d=Fe(m=>m.breakpoints.down("md")),[f,y]=P.useState(null),{appId:p,version:w}=i,k=[{label:"App ID",value:p},{label:"App Version",value:w},{label:"App Bundle Name",value:(I=a==null?void 0:a.meta)==null?void 0:I.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],C=m=>{var j,S,v,T;const _=Array.isArray(m)?m:[m];if(d||_.unshift(J(Hu,{})),a){const $={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};sa(a)?_.unshift(J(Rs,{chainHost:(j=a==null?void 0:a.controller)==null?void 0:j.chainHost,nftId:(S=a==null?void 0:a.controller)==null?void 0:S.nftId,launcherSessionId:(v=a==null?void 0:a.controller)==null?void 0:v.launcherSessionId,launcherUrl:(T=a==null?void 0:a.controller)==null?void 0:T.launcherUrl,sx:$})):l.ownerNft&&l.launcher&&_.unshift(J(ks,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:$}))}return _},F=(z=((a==null?void 0:a.environments)||[]).find(m=>m.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:z.value,x=(U=((a==null?void 0:a.environments)||[]).find(m=>m.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:U.value;P.useEffect(()=>{if(d)y(null);else{const{appLogo:m,appLogoRect:_}=window.blocklet??{};(_||m)&&y(`${_||m}&v=${Date.now()}`)}},[F,x,d]);const g={logo:f?J("img",{src:f,alt:"logo"}):null,brandAddon:J(N,{children:a&&kt(N,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,sx:{py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[J(yt,{title:pe.isRunning(a==null?void 0:a.status)?void 0:r(`blocklet.status.${a==null?void 0:a.status}`),children:J(N,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:Nt[a==null?void 0:a.status]})}),J(N,{sx:{lineHeight:1,color:"text.secondary",maxWidth:d?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:pe.getDisplayName(a)}),J(N,{component:Ko,icon:Bu,sx:{color:"text.secondary"}})]})})};return kt(qu,{legacy:!1,fullWidth:!0,headerAddons:C,headerProps:g,footerProps:{addon:J(Es,{infos:k})},children:[!a&&t&&J(Bt,{relative:"parent",children:J(qe,{})}),!a&&s&&kt(Bt,{relative:"parent",children:[kt(N,{display:"flex",alignItems:"center",children:[J(to,{color:"error",sx:{marginRight:1}}),Jr(s)]}),J(Je,{onClick:()=>n(),children:J("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!a&&J(N,{flex:1,padding:d?2:3,display:"flex",flexDirection:"column",children:J(Go,{FallbackComponent:bo,resetKeys:[c.pathname],children:e})})]})}Ps.propTypes={children:D.any};Ps.defaultProps={children:null};const qu=me(vo)`
|
|
226
|
-
div.dashboard-content {
|
|
227
|
-
padding: 0;
|
|
228
|
-
}
|
|
229
|
-
.header-addons .locales {
|
|
230
|
-
max-height: 400px;
|
|
231
|
-
overflow-y: auto;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.header-brand-addon {
|
|
235
|
-
display: block;
|
|
236
|
-
}
|
|
237
|
-
`;function Wu(){const{t:e,locale:r}=ye(),{blocklet:t,launcherSession:s}=lt(),[n,i]=ga({subscriptionURL:"#"});if(P.useEffect(()=>{var c,d;zs(t,s)&&na({launcherSessionId:(c=t==null?void 0:t.controller)==null?void 0:c.launcherSessionId,launcherUrl:(d=t==null?void 0:t.controller)==null?void 0:d.launcherUrl,locale:r}).then(f=>{i({subscriptionURL:f})}).catch(f=>{console.error("get subscription url error:",f)})},[t,s]),!t||!s||!ia(t)||s.status===ne.LAUNCH_SESSION_STATUS.installed)return"";let a=null,l="";return zs(t,s)?(a=o.jsx(Kr,{href:n.subscriptionURL,children:e("blocklet.manageSubscription")}),l=e("blocklet.suspendedCausedByExpired",{deadline:Hs(s==null?void 0:s.reservedUntil,r)})):oa(t,s)&&(a=o.jsx(Rn,{to:tr(ne.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),l=e("blocklet.suspendedCausedByTerminated",{canceledAt:Hs(s==null?void 0:s.terminatedAt,r),deadline:aa(s==null?void 0:s.terminatedAt,r)})),o.jsxs(N,{component:Qo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l,o.jsx(ue,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const io=P.createContext({});function Hd(){return P.useContext(io)}const{Provider:Ku,Consumer:qd}=io,{did:Ee,appId:Gu}=window.env;function Qu({children:e}){var m,_;const{t:r,locale:t}=ye(),{blocklet:s}=lt(),[n,i]=P.useState([]),[a,l]=P.useState([]),[c,d]=P.useState([]),f=pe.getDisplayName(s),y=((m=((s==null?void 0:s.environments)||[]).find(j=>j.key===$e.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:m.value)||"auto",p=(s==null?void 0:s.trustedPassports)||[],w=(s==null?void 0:s.trustedFactories)||[],k=(s==null?void 0:s.enablePassportIssuance)!==!1,C=async()=>{try{const j=await Tt.doBatchQuery({getRoles:{input:{teamDid:Ee}},getPermissions:{input:{teamDid:Ee}},getInvitations:{input:{teamDid:Ee}}}),S=(j.getRoles.roles||[]).filter(v=>!ne.RBAC_CONFIG.roles.some(T=>T.name===v.name&&(!T.passport||T.ci))).map(v=>(v.hasDescription=!!v.description,v.hasDescription||(v.description=r("team.passport.description",{teamName:f,title:v.title})),v));l(ha(S,[v=>la(v.name)],["desc"])),d(j.getPermissions.permissions||[]),i(j.getInvitations.invitations||[])}catch(j){re.error(j.message)}},F=({did:j}={})=>{const S={teamDid:Ee,user:{did:j}};return Tt.getUser({input:S})},x=({query:j,paging:S}={})=>{const v={teamDid:Ee};return S&&(v.paging=S),j&&(v.query=j),v.sort={lastLoginAt:-1},Tt.getUsers({input:v})},g=()=>Tt.getUsersCountPerRole({input:{teamDid:Ee}}),I=()=>C();P.useEffect(()=>{var j;(j=s==null?void 0:s.meta)!=null&&j.did&&C()},[(_=s==null?void 0:s.meta)==null?void 0:_.did]),P.useEffect(()=>{l(j=>j.map(S=>(S.hasDescription||(S.description=r("team.passport.description",{teamName:f,title:S.title})),{...S})))},[r,t]);const z=j=>{j.teamDid===Ee&&C()};Lt($e.TeamEvents.userAdded,z,[Ee]),Lt($e.TeamEvents.userRemoved,z,[Ee]),Lt($e.TeamEvents.userUpdated,z,[Ee]);const U={teamDid:Ee,teamIssuerDid:Gu,teamName:f,invitations:n,roles:a,permissions:c,trustedPassports:p,trustedFactories:w,isNodeTeam:!1,enablePassportIssuance:k,refresh:I,passportColor:y,endpoint:window.location.origin,blocklet:s,api:{getUser:F,getUsers:x,getUsersCountPerRole:g}};return o.jsx(Ku,{value:U,children:e})}const Zu=P.lazy(()=>X(()=>import("./log-BLTzXOlE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Ju=P.lazy(()=>X(()=>import("./index-BY0gjHeR.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,10,15,9,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,3,38,39,40,41,42,43,44]))),Yu=P.lazy(()=>X(()=>import("./index-BkHi7e8i.js"),__vite__mapDeps([45,4,2,5,1,6,7,8,41,9,10,46,31,27,35,36,3,38,39,22,40,42,28,43,44]))),Xu=P.lazy(()=>X(()=>import("./index-lk2RMFv-.js"),__vite__mapDeps([47,2,1,9,10,4,5,6,7,8,48,31,27,22,20,49,12,37,50,11,23,51,43,52,53,54,55,25,30,56,57,58,59,60,61,39,62,63,64,65]))),ed=P.lazy(()=>X(()=>import("./overview-zOWtcWbm.js"),__vite__mapDeps([66,1,2,4,5,6,7,8,10,41,67,40,9,29,42,28,20,68,69,70,54,3,31,27,38,39,22,43,44]))),td=P.lazy(()=>X(()=>import("./domains-CD91MGQk.js"),__vite__mapDeps([71,2,4,5,1,6,7,8,9,10,72,46,21,22,42,28,31,27,35,36,61,23,37,73,43,41,29,74]))),rd=P.lazy(()=>X(()=>import("./index-BfbxxLBr.js"),__vite__mapDeps([75,2,6,5,1,4,7,8,9,10,20,76,16,17,18,19,32,33,21,22,77,78,79,31,27,50,43,80,3,38,39,40,41,42,28,44]))),sd=P.lazy(()=>X(()=>import("./appearance-CCLVRyLq.js"),__vite__mapDeps([81,5,2,4,1,6,7,8,9,10]))),nd=P.lazy(()=>X(()=>import("./audit-logs-brXiMrw_.js"),__vite__mapDeps([82,4,2,5,1,6,7,8,32,33,3,9,10,63,64,41,83,40,37,65,31,27,38,39,22,42,28,43,44]))),id=P.lazy(()=>X(()=>import("./index-o53rWfYr.js"),__vite__mapDeps([84,2,1,5,4,6,7,8,9,10,37,29,85,53,12,86,83,40,41,34,74,16,17,18,19,32,33,20,87,42,28,88,89,90,55,91,27,25,26,3,31,38,39,22,43,44]))),od=P.lazy(()=>X(()=>import("./config-navigation-D2PpiTzz.js"),__vite__mapDeps([92,2,4,5,1,6,7,8,69,78,10,93,9,94,95,62,54,86,56,57,88,27,3,31,38,39,22,40,41,42,28,43,44]))),ad=P.lazy(()=>X(()=>import("./index-Bh63LaOx.js"),__vite__mapDeps([96,1,2,6,5,10,4,7,8,9,97,54,98,99,70,30,27,29,100,36,39,101,50,3,31,38,22,40,41,42,28,43,44]))),ld=P.lazy(()=>X(()=>import("./index-BeXUaMlG.js"),__vite__mapDeps([102,4,2,5,1,6,7,8,9,10,101,67,29,33,97,3,31,27,38,39,22,40,41,42,28,43,44]))),cd=P.lazy(()=>X(()=>import("./security-BD2-azah.js"),__vite__mapDeps([103,4,2,5,1,6,7,8,9,10,95,104,97,3,31,27,38,39,22,40,41,42,28,43,44]))),ud=P.lazy(()=>X(()=>import("./branding-31ZnkyoG.js"),__vite__mapDeps([105,2,1,4,5,6,7,8,10,60,106,52,79,62,9,21,22,86,3,31,27,38,39,40,41,42,28,43,44]))),dd=P.lazy(()=>X(()=>import("./advanced-CIJNFJAE.js"),__vite__mapDeps([107,2,1,9,10,4,5,6,7,8,21,22,31,27,43,23,29,20,68,69,3,38,39,40,41,42,28,44]))),fd=P.lazy(()=>X(()=>import("./traffic-BIz-TYy2.js").then(e=>e.t),__vite__mapDeps([87,2,9,1,10,4,5,6,7,8,42,28,88,89,90,55,91,27,25,26]))),pd=P.lazy(()=>X(()=>import("./runtime-B8E7DTqn.js"),__vite__mapDeps([108,2,1,40,6,5,4,7,8,9,10,100,12,3,31,27,38,39,22,41,42,28,43,44]))),hd=P.lazy(()=>X(()=>import("./index-BGnWzg98.js"),__vite__mapDeps([109,2,4,5,1,6,7,8,76,16,10,17,18,19,20,32,33,9,24,25,26,31,27,23,61,37,110,21,22,12,3,38,39,40,41,42,28,43,44]))),md=P.lazy(()=>X(()=>import("./component-Djsamap6.js"),__vite__mapDeps([111,1,2,5,4,6,7,8,10,9,112,101,21,22,110,94,91,57,23,55,90,62,27,113,58,59,60,30,61,37,31,39,20,114,115,99,70,54,106,52,116,77,78,63,64,93,29,3,73,97,117,98,118,80,41,88,12,38,35,36,40,42,28,43,44]))),gd=P.lazy(()=>X(()=>import("./index-C9TPKuLt.js"),__vite__mapDeps([119,1,2,9,10,4,5,6,7,8]))),xd=tr(ne.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),yd=e=>{const{enqueueSnackbar:r}=Dn(),t=P.useCallback(s=>Mn(xd,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);Lt(`${e}/${ne.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const n=t(s),{severity:i,description:a}=s||{},l=["error","warning"].includes(i)||s.sticky;s.source==="system"&&r(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>o.jsx(il,{viewAllUrl:n,keyId:c,notification:s,content:o.jsx(wl,{notification:s,minimal:!0,rows:0})})})},[],"user")};function oo({blocklet:e,isAdmin:r}){const[t,s]=P.useState(!1),{t:n}=ye(),i=Hn();return r?o.jsxs(o.Fragment,{children:[o.jsx(id,{blocklet:e,customTableButtons:[o.jsxs(N,{display:"flex",alignItems:"center",gap:1.5,children:[o.jsx(Yt,{onClick:()=>s(!0),sx:{p:i?0:void 0},children:o.jsx(ss,{})},"settings"),i?o.jsx(ue,{children:n("common.setting")}):null]})]}),o.jsx(Jo,{title:`${n("common.notification")} ${n("common.setting")}`,fullWidth:!0,maxWidth:"md",open:t,onClose:()=>s(!1),PaperProps:{style:{minHeight:"500px"}},children:o.jsx(N,{sx:{mt:"-16px",overflowY:"hidden"},children:o.jsx(Xl,{})})})]}):o.jsx(jo,{status:403})}oo.propTypes={blocklet:D.object.isRequired,isAdmin:D.bool.isRequired};const vd=e=>{var f,y;const{t:r}=ye(),{blocklet:t,actions:{refreshBlocklet:s},client:n,did:i}=lt(),a=(f=t==null?void 0:t.meta)==null?void 0:f.did,l=!t||ur(t.status)?[]:pe.getAppMissingConfigs(t),c={overview:[{label:r("common.overview"),value:"overview"},{label:o.jsx(Vo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:r("common.components")}),value:"components"}],"did-connect":[{label:r("common.members"),value:"members"},{label:r("team.member.passports"),value:"passports"},{label:r("common.setting"),value:"settings"},{label:r("common.security"),value:"security"}],website:[{label:r("common.domains"),value:"domains"},{label:r("common.branding"),value:"branding",show:!ur(t==null?void 0:t.status)},{label:r("common.theming"),value:"theming",show:!ur(t==null?void 0:t.status)},{label:r("common.navigation"),value:"navigation"},{label:r("common.sitemap"),value:"sitemap"}],operations:[{label:r("common.notificationRecords"),value:"notifications",show:e},{label:r("common.analytics"),value:"analytics"},{label:r("common.auditLogs"),value:"audit-logs"},{label:r("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:r("common.accessKeys"),value:"access-keys"}],developers:[{label:r("common.logs"),value:"logs",show:((y=t==null?void 0:t.children)==null?void 0:y.length)&&t.structVersion===ne.APP_STRUCT_VERSION},{label:r("common.performance"),value:"performance"},{label:r("common.docs"),value:"docs"}]},d={overview:ed,components:md,members:o.jsx(Ju,{type:"blocklet",createPassportSvg:qs}),passports:o.jsx(rd,{createPassportSvg:qs}),settings:o.jsx(ld,{orientation:"vertical"}),security:o.jsx(cd,{}),"did-spaces":o.jsx(ad,{navOrientation:"horizontal"}),domains:td,branding:o.jsx(ud,{blocklet:t,onUpdate:s}),theming:o.jsx(sd,{}),navigation:od,sitemap:o.jsx(Zo,{children:r("common.comingSoon")}),notifications:o.jsx(oo,{blocklet:t,isAdmin:e}),"audit-logs":o.jsx(nd,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(fd,{client:n,did:i}),advanced:o.jsx(dd,{blocklet:t,onUpdate:s}),webhooks:o.jsx(Yu,{}),"access-keys":o.jsx(hd,{}),logs:Zu,performance:o.jsx(pd,{client:n,did:i}),docs:gd,publish:o.jsx(Xu,{})};return{tabGroups:c,renders:d}};function bd(){var F,x;const e=kn(),{tab:r="overview",subtab:t}=No(),{blocklet:s}=lt(),{session:n}=Nn(),i=Ye(()=>{var g;return(g=n==null?void 0:n.user)==null?void 0:g.did},[n]),a=Hn(),l=Ye(()=>{var g;return((g=n.user)==null?void 0:g.role)&&ua.includes(n.user.role)},[n]);yd(i);const{tabGroups:c,renders:d}=vd(l),f=g=>{e(`${ne.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${g}`)},y=(c[r]||[]).filter(g=>g.show===void 0||g.show),p=((F=(y||[]).find(g=>g.value===t))==null?void 0:F.value)||((x=y==null?void 0:y[0])==null?void 0:x.value)||r,w=d[p]||d.overview,k=["overview"].includes(r),C=s?o.jsxs(Yr,{type:"components",children:[y.length>0&&o.jsxs(N,{mb:2,display:"flex",alignItems:"center",gap:2,children:[o.jsx(N,{flex:1,children:o.jsx(Pn,{tabs:y,current:p,onChange:f,scrollButtons:"auto"})}),k&&!a&&o.jsx(N,{component:"div",className:"page-header",children:s?o.jsx(Zs,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:g}={})=>{g&&re.error(g.message)},variant:"group"}):null})]}),o.jsx(N,{className:"page-content",children:o.jsx(P.Suspense,{fallback:o.jsx(Bt,{relative:"parent",children:o.jsx(qe,{})}),children:P.isValidElement(w)?w:o.jsx(w,{blocklet:s})})})]}):o.jsx(Bt,{relative:"parent",children:o.jsx(qe,{})});return o.jsx(da,{children:o.jsx(Qu,{children:o.jsx(Ps,{children:o.jsxs(wd,{children:[a&&k&&o.jsx(N,{component:"div",className:"page-header",mb:2,children:s?o.jsx(Zs,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:g}={})=>{g&&re.error(g.message)},variant:"group"}):null}),o.jsx(Xn,{}),o.jsx(Wu,{}),C]})})})})}function _d(){var s;const{blocklet:e}=lt(),{t:r}=ye(),t=(s=e==null?void 0:e.meta)==null?void 0:s.did;return P.useEffect(()=>{const n=ca();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),o.jsxs(o.Fragment,{children:[o.jsx(wo,{children:o.jsx("title",{children:r("pageTitle.dashboard")})}),o.jsx(bd,{})]})}const wd=me.main`
|
|
238
|
-
.page-header {
|
|
239
|
-
display: flex;
|
|
240
|
-
justify-content: space-between;
|
|
241
|
-
align-items: center;
|
|
242
|
-
flex-wrap: wrap;
|
|
243
|
-
gap: 16px;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.page-title {
|
|
247
|
-
display: flex;
|
|
248
|
-
align-items: center;
|
|
249
|
-
|
|
250
|
-
.page-link {
|
|
251
|
-
font-size: 15px;
|
|
252
|
-
margin-top: 8px;
|
|
253
|
-
margin-left: 8px;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
258
|
-
.page-header {
|
|
259
|
-
flex-direction: column;
|
|
260
|
-
align-items: flex-start;
|
|
261
|
-
.page-actions,
|
|
262
|
-
.MuiButtonGroup-root {
|
|
263
|
-
width: 100%;
|
|
264
|
-
}
|
|
265
|
-
.MuiButtonGroup-root {
|
|
266
|
-
.MuiButtonBase-root {
|
|
267
|
-
flex: 1;
|
|
268
|
-
}
|
|
269
|
-
.blocklet-action-text {
|
|
270
|
-
display: none;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
.page-title {
|
|
276
|
-
margin-bottom: 15px;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
`,Wd=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"}));export{no as B,Te as C,_e as S,Ls as W,wi as a,Kn as b,El as c,to as d,Wn as e,zd as f,Zn as g,tt as h,Bd as i,Wd as j,Hd as u};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{j as o,aa as i,H as h,ag as C}from"./vendor-mui-core-DiDsSLd-.js";import{n as k,f as B,ad as b,d as x}from"./index-Cg_v1vT_.js";import{D as w,a as I,b as E}from"./domain-action-card-DrjkSQwC.js";import{b1 as T}from"./vendor-ux-did-connect-qEfzi7sf.js";import{P as A}from"./page-header-BhpaMk9g.js";import{r}from"./vendor-react-DoD83n6N.js";import{_ as L}from"./useSetState-BL3ktMon.js";import{S as D}from"./button-Cfb46ee0.js";import{S as W}from"./layout-0YBKzIlI.js";import{S as H}from"./step-actions-DGcZdY1e.js";import"./vendor-arcblock-Dd-d3bxC.js";import"./vendor-utils-DMClavLd.js";import"./vendor-hooks-jg6xPUPF.js";import"./lottie-web-B6s7dDoL.js";import"./ExpandLess-ap4H2881.js";import"./permission-_ttLx53e.js";import"./session-BPop7wxF.js";import"./dot-BBxUn__M.js";import"./useAsync-B_98ShEr.js";import"./confirm-Bi4_XwxH.js";import"./format-error-LAoTjvJe.js";import"./actions-54wIQrhQ.js";import"./MoreHoriz-ylsvAqcI.js";import"./delete-confirm-B2Ye1_SC.js";import"./click-to-copy-D4Cmyemb.js";import"./shorten-label-8jfEkawx.js";import"./util-DA84MxE0.js";import"./InfoOutlined-xdatqyfu.js";import"./index-C6wFIF6L.js";import"./CheckCircle-vHBx3yBd.js";import"./content-layout-Cg5RRv1R.js";import"./use-mobile-T-9_nK_m.js";function d({onNext:s,onPrevious:S}){var u,f;const{t:n}=r.useContext(T),[j,p]=r.useState(!1),{blocklet:e}=k(),[l,y]=r.useState(""),P=(((e==null?void 0:e.site)||{}).domainAliases||[]).map(t=>B.replaceSlotToIp(t.value,l)),[a,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=(f=(u=e.environments)==null?void 0:u.find(t=>t.key==="BLOCKLET_APP_PK"))==null?void 0:f.value,g=P.find(t=>b.isDidDomain(t));return r.useEffect(()=>{x.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{y(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(_,{children:[o.jsx(i,{className:"header",children:o.jsx(A,{title:n("setup.domain.title"),subTitle:n("setup.domain.subTitle"),onClickBack:S})}),o.jsxs(i,{className:"form",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:`${n("setup.domain.buyOrConnect")} (${n("common.optional")})`})}),o.jsx(i,{mt:1,children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:g,currentIp:l,inBlockletSetup:!0,shouldCheckDomain:!0,resolveDomain:t=>x.get(`/dns-resolve?hostname=${t}`),onInputDomain:t=>{m({domain:t.domain,type:t.type}),p(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const v={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};m(v),s()},onError:p}})})]}),o.jsxs(i,{children:[o.jsx(i,{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",children:o.jsx(i,{display:"inline",children:n("setup.domain.skipDescription")})}),o.jsx(i,{mt:1,children:o.jsx(E,{inSetup:!0,showAllDomains:!0})})]})]}),o.jsx(H,{mt:8,disabled:!!a.addDomainState.text,blocklet:e,onStartNow:()=>s("complete"),children:a.domain?o.jsx(D,{variant:"contained",loading:!!a.addDomainState.text,disabled:j||!!a.addDomainState.text||!a.domain,onClick:()=>s(),children:a.addDomainState.text||n("setup.continue")}):o.jsx(D,{variant:"contained",disabled:!!a.addDomainState.text,onClick:()=>s(),children:n("setup.continue")})})]})}function Dt(s){return o.jsx(w,{children:o.jsx(d,{...s})})}d.propTypes={onNext:h.func,onPrevious:h.func};d.defaultProps={onNext:()=>{},onPrevious:()=>{}};const _=C(W)`
|
|
2
|
-
height: 100%;
|
|
3
|
-
overflow-y: hidden;
|
|
4
|
-
|
|
5
|
-
.form {
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
}
|
|
9
|
-
`;export{Dt as default};
|