@abtnode/blocklet-services 1.16.43-beta-20250427-232837-e671de06 → 1.16.43-beta-20250429-130236-269254ff
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/emails/_components/layout.js +2 -2
- package/api/emails/_libs/style.js +8 -3
- package/api/emails/_templates/kyc-code-verify.js +43 -0
- package/api/emails/_templates/new-user-session.js +2 -6
- package/api/emails/_templates/notification.js +2 -6
- package/api/emails/_templates/verify-code-body.js +4 -1
- package/api/emails/_templates/verify-code.js +2 -6
- package/api/index.js +31 -2
- package/api/libs/email.js +16 -0
- package/api/routes/blocklet.js +26 -17
- package/api/routes/ocap.js +1 -1
- package/api/routes/user.js +1 -1
- package/api/services/auth/session.js +2 -2
- package/api/services/kyc/index.js +5 -11
- package/dist/assets/{AdapterDayjs-BUGplkxR.js → AdapterDayjs-D5LoqHiU.js} +1 -1
- package/dist/assets/{ArrowDropDown-B0sLkJoY.js → ArrowDropDown-BCCa5uRn.js} +1 -1
- package/dist/assets/{CheckCircle-BNrN9mgy.js → CheckCircle-Bxk_pKUt.js} +1 -1
- package/dist/assets/{ChevronLeft-Dq00IS01.js → ChevronLeft-DgTQnUwX.js} +1 -1
- package/dist/assets/{ChevronRight-ZTqWK-Ga.js → ChevronRight-C-lajCDc.js} +1 -1
- package/dist/assets/{Community-DZCTPNMP.js → Community-DathqRsd.js} +1 -1
- package/dist/assets/{DeleteOutline-C2sY6hfm.js → DeleteOutline-Csdx_lih.js} +1 -1
- package/dist/assets/{Done-JLiLhELm.js → Done-DjB4uf97.js} +1 -1
- package/dist/assets/{Download-Ch4RfGRW.js → Download-CF6ZhZfD.js} +1 -1
- package/dist/assets/{Edit-CY6fFHQM.js → Edit-C-zkyYSj.js} +1 -1
- package/dist/assets/{EditIcon-Bi2cR-_u.js → EditIcon-DWRQ3fi6.js} +1 -1
- package/dist/assets/{Email-Dz2Eyqu0.js → Email-B0n6rLUZ.js} +1 -1
- package/dist/assets/{Error-CSFUqG0m.js → Error-DnzvDd2d.js} +1 -1
- package/dist/assets/{ExpandLess-BiMmSOBl.js → ExpandLess-DBN4huDO.js} +1 -1
- package/dist/assets/{Google-GOp5YvmZ.js → Google-VfyWFLKO.js} +1 -1
- package/dist/assets/{Holiday-Lc6woG1j.js → Holiday-BkY6LMfd.js} +1 -1
- package/dist/assets/{InfoOutlined-CQB5qKm-.js → InfoOutlined-BMb9Zu84.js} +1 -1
- package/dist/assets/{Launch-fxgQvk19.js → Launch-CVPYIHzD.js} +1 -1
- package/dist/assets/{LaunchOutlined-BV4_W1pb.js → LaunchOutlined-faHvtBle.js} +1 -1
- package/dist/assets/{Location-B8EOY3d0.js → Location-BQhEvGNL.js} +1 -1
- package/dist/assets/{LockIcon-fuTfhB_G.js → LockIcon-Bd69pSJI.js} +1 -1
- package/dist/assets/{Meeting-Epdyx36z.js → Meeting-BW-_XtSL.js} +1 -1
- package/dist/assets/{MoreHoriz-CX_pwfPT.js → MoreHoriz-CT231fLS.js} +1 -1
- package/dist/assets/{OffSick-VYgugWxu.js → OffSick-9I8vBA8l.js} +1 -1
- package/dist/assets/{Phone-KP65huHK.js → Phone-CKzC4712.js} +1 -1
- package/dist/assets/{PlayArrow-DFH1Psjx.js → PlayArrow-CVHX5RbU.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-p6m3avKp.js → QuestionMarkCircle-DpFFQWud.js} +1 -1
- package/dist/assets/{ServerLogo-Bssx1Eou.js → ServerLogo-AfxVBRdi.js} +1 -1
- package/dist/assets/{Timezone-Ce4E1Xey.js → Timezone-C3hiNX6j.js} +1 -1
- package/dist/assets/{TuneOutlined-Dy2qPFGI.js → TuneOutlined-DcBuSd1o.js} +1 -1
- package/dist/assets/{ViewList-e3CoNi3K.js → ViewList-rVo7d5VV.js} +1 -1
- package/dist/assets/{WorkingRemotely-CXFJ6pz8.js → WorkingRemotely-CHzRY2CT.js} +1 -1
- package/dist/assets/access-control-Cum8iIaB.js +14 -0
- package/dist/assets/{actions-DA-6s_nQ.js → actions-D-Helr6n.js} +1 -1
- package/dist/assets/{add-component-core-DG9mQFsr.js → add-component-core-kWUUw0fB.js} +43 -37
- package/dist/assets/add-resource-DEesv1LC.js +1 -0
- package/dist/assets/{addon-Bcc-Xwbf.js → addon-B5zwPHe5.js} +1 -1
- package/dist/assets/{advanced-DTe2fs5L.js → advanced-CjSPlkxp.js} +1 -1
- package/dist/assets/api-BkKTvlm_.js +1 -0
- package/dist/assets/appearance-rlMOco_Q.js +1 -0
- package/dist/assets/ar-BRKjvO8p.js +1 -0
- package/dist/assets/ar-Duy7ZH--.js +7 -0
- package/dist/assets/audit-logs-BpacJ0mq.js +35 -0
- package/dist/assets/{authorize-DUyL7MEU.js → authorize-Dup4yiJg.js} +1 -1
- package/dist/assets/{base32-p9VcJrwv.js → base32-yUUlhgnG.js} +1 -1
- package/dist/assets/branding-3E94pu9e.js +54 -0
- package/dist/assets/{branding-_VO2ZZ3t.js → branding-BB4z7dex.js} +2 -2
- package/dist/assets/bundle-avatar-njRzpG6o.js +1 -0
- package/dist/assets/button-DRqMfYjF.js +1 -0
- package/dist/assets/{click-to-copy-BGyXQL2i.js → click-to-copy-CSwBjJDI.js} +1 -1
- package/dist/assets/cloneDeep-Cg0h_FaY.js +1 -0
- package/dist/assets/complete-lhAOowgH.js +45 -0
- package/dist/assets/{component-5gjaNHCg.js → component-DG-t6Jac.js} +50 -46
- package/dist/assets/{config-Bh19ZUJ-.js → config-BWuaMoux.js} +1 -1
- package/dist/assets/config-Ct2icT-j.js +32 -0
- package/dist/assets/{config-navigation-Dvjz9nAh.js → config-navigation-BZ3T8tYK.js} +6 -6
- package/dist/assets/config-space-CKx83vmi.js +1 -0
- package/dist/assets/{confirm-DqvNmeoz.js → confirm-Bj4L0Vn8.js} +2 -2
- package/dist/assets/connect-BoejDqj-.js +5 -0
- package/dist/assets/connect-to-lcfZI_0b.js +1 -0
- package/dist/assets/connect-v2Zx9JEk.js +1 -0
- package/dist/assets/{content-layout-BPaAeaMQ.js → content-layout-C3Yd4mK9.js} +1 -1
- package/dist/assets/dashboard-0TEl6bJJ.js +280 -0
- package/dist/assets/de-D3cg0t9f.js +1 -0
- package/dist/assets/de-jJ-wrtW1.js +7 -0
- package/dist/assets/{delete-confirm-_BzUlhv2.js → delete-confirm-kpan5KFX.js} +1 -1
- package/dist/assets/did-address-CJZtrzhT.js +1 -0
- package/dist/assets/{domain-ag7_Ivc1.js → domain-C8nJlURa.js} +1 -1
- package/dist/assets/domain-action-card-BZ3CFKs5.js +24 -0
- package/dist/assets/domains-Cn_DfzNS.js +1 -0
- package/dist/assets/{dot-BE1YP292.js → dot-CaKxEi_0.js} +2 -2
- package/dist/assets/{email-DKpgximx.js → email-BjCEb0WI.js} +2 -2
- package/dist/assets/{empty-spinner-DmDm8XzF.js → empty-spinner-BYUFR95o.js} +1 -1
- package/dist/assets/es-CoGP0eAj.js +7 -0
- package/dist/assets/es-DPjqApVE.js +1 -0
- package/dist/assets/exchange-passport-B_b6xNH8.js +1 -0
- package/dist/assets/fr-Dscs9WsP.js +1 -0
- package/dist/assets/fr-yctlgsrj.js +7 -0
- package/dist/assets/{fuel-CcBzY6Bt.js → fuel-Dtvd1fJW.js} +1 -1
- package/dist/assets/{gen-access-key-DxKwgiGT.js → gen-access-key-DsGgHUvi.js} +1 -1
- package/dist/assets/get-safe-url-BTmcSfZP.js +1 -0
- package/dist/assets/get-safe-url-BYr2jgRv.js +1 -0
- package/dist/assets/hi-B8D3j6bs.js +1 -0
- package/dist/assets/hi-Dh_pGPBD.js +5 -0
- package/dist/assets/{home-Bi8fA3jh.js → home-ClwQWk4f.js} +1 -1
- package/dist/assets/{id-BderyGO5.js → id-DWMMQI0G.js} +1 -1
- package/dist/assets/id-cicarMJv.js +7 -0
- package/dist/assets/{iframe-DZ181i8X.js → iframe-B7H87IMw.js} +1 -1
- package/dist/assets/index-2eL6Ndgh.js +288 -0
- package/dist/assets/index-B9lBWxnt.js +113 -0
- package/dist/assets/index-BDaAwySV.js +1 -0
- package/dist/assets/index-BOvzhuNp.js +11 -0
- package/dist/assets/{index-BT0GBmWF.js → index-BUHlfcy3.js} +1 -1
- package/dist/assets/index-BUrD6xiH.js +241 -0
- package/dist/assets/index-Bco7nZ5q.js +6 -0
- package/dist/assets/{index-SDdS_qt8.js → index-Bt7GP-dU.js} +1 -1
- package/dist/assets/{index-CYeIiQ6Q.js → index-C-rP7qS0.js} +1 -1
- package/dist/assets/{index-DyxFC42L.js → index-C1UHqpp3.js} +3 -3
- package/dist/assets/index-CEmSUlto.js +192 -0
- package/dist/assets/{index-CHbpkZwO.js → index-CMFOn8T3.js} +1 -1
- package/dist/assets/index-CVKN_Jn1.js +55 -0
- package/dist/assets/index-Cb1OPKJL.js +708 -0
- package/dist/assets/index-CjZLIV87.js +10 -0
- package/dist/assets/{index-Dl4W1N74.js → index-Cx-tuAMi.js} +1 -1
- package/dist/assets/index-D9eW5l3E.js +345 -0
- package/dist/assets/index-DAer_mWn.js +137 -0
- package/dist/assets/{index-n0Q-fETi.js → index-DHIWtN6I.js} +5 -5
- package/dist/assets/{index-DKhrYmrN.js → index-DIe9psLc.js} +1 -1
- package/dist/assets/{index-YbJjfDTR.js → index-DyKjKMmu.js} +1 -1
- package/dist/assets/{index-DuH8q5ir.js → index-M6peJL7s.js} +1 -1
- package/dist/assets/index-a0ZdM5aG.js +4 -0
- package/dist/assets/{index-CGBZONPv.js → index-i5c4XeO-.js} +1 -1
- package/dist/assets/{invitation-BrAZQXQL.js → invitation-DGRUoRzD.js} +3 -3
- package/dist/assets/invite-uoA9amq7.js +1 -0
- package/dist/assets/{issue-passport-Dd_yyO08.js → issue-passport-2LsCG1Ym.js} +1 -1
- package/dist/assets/item-taL0aTyr.js +2 -0
- package/dist/assets/ja-3LoBq68U.js +1 -0
- package/dist/assets/ja-Bm56AvcM.js +7 -0
- package/dist/assets/ko-B0ZZ2RWO.js +7 -0
- package/dist/assets/ko-B2dxwXDl.js +1 -0
- package/dist/assets/landing-page-EY5bGAu7.js +1 -0
- package/dist/assets/{launch-result-message-C9huWJUf.js → launch-result-message-B_fS-f90.js} +1 -1
- package/dist/assets/{layout-Cw-hwCHs.js → layout-DAempiIX.js} +1 -1
- package/dist/assets/list-B1E5dxgu.js +236 -0
- package/dist/assets/list-header-8k1_C0K0.js +1 -0
- package/dist/assets/localization-Di0I0VVv.js +1 -0
- package/dist/assets/{log-Chqr_or_.js → log-CL673QLU.js} +1 -1
- package/dist/assets/{logger-zix81YaM.js → logger-OMyVyA8K.js} +1 -1
- package/dist/assets/login-CsMJeMSS.js +1 -0
- package/dist/assets/login-oauth-callback-Bh6TJ59S.js +1 -0
- package/dist/assets/{logo-uploader-CJrdpVcQ.js → logo-uploader-DFGj09Gp.js} +20 -19
- package/dist/assets/{lost-passport-Do1Pl0xI.js → lost-passport-D00cnWl_.js} +2 -2
- package/dist/assets/lottie-error-CMOXHtBH.js +1 -0
- package/dist/assets/lottie-loading-o-GBrhM9.js +1 -0
- package/dist/assets/lottie-welcome-C9B95FIi.js +1 -0
- package/dist/assets/omit-1zyydTZL.js +1 -0
- package/dist/assets/{open-window-D8MZhu_7.js → open-window-xLNOSl03.js} +1 -1
- package/dist/assets/{overview-DLA9wj6a.js → overview-Ds0WiSnv.js} +2 -2
- package/dist/assets/{page-header-CWY8mxlT.js → page-header-BXC_EZqA.js} +1 -1
- package/dist/assets/{passport-item-CWtlyIE_.js → passport-item-Dpr4rKdD.js} +1 -1
- package/dist/assets/{permission-BGM09622.js → permission-DDLyDuSn.js} +1 -1
- package/dist/assets/preferences-DXw1rfcr.js +1 -0
- package/dist/assets/profile-embed-co2rsGfl.js +1 -0
- package/dist/assets/pt-6Xqu-_a4.js +5 -0
- package/dist/assets/pt-eei1_Z4R.js +1 -0
- package/dist/assets/publish-resource-CBR18Gc3.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-ByydTUk4.js → react-beautiful-dnd.esm-CeODMcuS.js} +1 -1
- package/dist/assets/relative-time-DlN06RKr.js +1 -0
- package/dist/assets/ru-ZKgT6XdU.js +1 -0
- package/dist/assets/ru-y0N1jyVB.js +5 -0
- package/dist/assets/runtime-nJVx0iKJ.js +1 -0
- package/dist/assets/sdk-DICk2ZHP.js +1 -0
- package/dist/assets/{security-BhkfG23R.js → security-CHs7ENbZ.js} +4 -4
- package/dist/assets/session-j-9KoWbs.js +1 -0
- package/dist/assets/setup-CGwOCqjv.js +25 -0
- package/dist/assets/{shorten-label-DFzv9EKX.js → shorten-label-SbKUBkvs.js} +1 -1
- package/dist/assets/{simple-select-DlrdVbaI.js → simple-select-CLc0Q9sm.js} +1 -1
- package/dist/assets/{slicedToArray-CPl5_eGD.js → slicedToArray-C0YDCVwK.js} +2 -2
- package/dist/assets/{spaces-WkJCApHO.js → spaces-CZHg-rr5.js} +1 -1
- package/dist/assets/start-Chlvxw3J.js +187 -0
- package/dist/assets/starting-progress-DpqgCEFM.js +40 -0
- package/dist/assets/{status-CygZ0LuY.js → status-XLk6MkKv.js} +1 -1
- package/dist/assets/{step-actions-D_1PFeFs.js → step-actions-hjC-pbPT.js} +1 -1
- package/dist/assets/{studio-Byjzwg8q.js → studio-DrYhFxCD.js} +1 -1
- package/dist/assets/{switch-control-5fEOPVKs.js → switch-control-CqfXXgvP.js} +1 -1
- package/dist/assets/th-CG5eLRZo.js +1 -0
- package/dist/assets/th-CJa7646q.js +5 -0
- package/dist/assets/{traffic-T11hxc--.js → traffic-Dbf1L1c0.js} +1 -1
- package/dist/assets/{transfer-ROpxn9LD.js → transfer-GcIVZcyL.js} +1 -1
- package/dist/assets/unsubscribe-D2dQlJJM.js +1 -0
- package/dist/assets/use-blocklet-logo-DryhoHen.js +1 -0
- package/dist/assets/{use-mobile-C_flBrm-.js → use-mobile-BKvZ6hcv.js} +1 -1
- package/dist/assets/{use-mobile-DlKplWTG.js → use-mobile-BNUwcWCH.js} +1 -1
- package/dist/assets/{useAsync-CGW40D2-.js → useAsync-DXeWUWXr.js} +1 -1
- package/dist/assets/{useLocalStorage-DldnaMbZ.js → useLocalStorage-Cb6R1F6v.js} +1 -1
- package/dist/assets/user-center-D7lo6m0u.js +76 -0
- package/dist/assets/{util-Bjy-tP7q.js → util-BYQQqvk1.js} +1 -1
- package/dist/assets/util-BcFfyz6S.js +1 -0
- package/dist/assets/{vendor-arcblock-ScFEr-lj.js → vendor-arcblock-CX-5Ex_f.js} +100 -97
- package/dist/assets/vendor-hooks-DpLLpTSZ.js +7 -0
- package/dist/assets/vendor-mui-core-B6POpIBB.js +266 -0
- package/dist/assets/{vendor-mui-x-B0hsmEJ3.js → vendor-mui-x-CATHW1QL.js} +1 -1
- package/dist/assets/{vendor-utils-BNHJB5U7.js → vendor-utils-BUwfcN20.js} +13 -13
- package/dist/assets/{vendor-ux-did-connect-BdkhddhO.js → vendor-ux-did-connect-DVrP2LNw.js} +271 -241
- package/dist/assets/vi-CoZs3B42.js +1 -0
- package/dist/assets/vi-Rc5fwdQU.js +5 -0
- package/dist/assets/wrap-locale-CzSOEkvO.js +1 -0
- package/dist/assets/zh-CgkeS2I3.js +1 -0
- package/dist/assets/{zh-BYRCoK6F.js → zh-J32RyrWT.js} +2 -2
- package/dist/assets/zh-tw-BSUxp5LQ.js +7 -0
- package/dist/assets/zh-tw-CuakNRcW.js +1 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/dist/share/shared-bridge.html +85 -0
- package/package.json +34 -34
- package/dist/assets/access-control-B20P1UrY.js +0 -14
- package/dist/assets/add-resource-BoS5YkVy.js +0 -1
- package/dist/assets/api-BrU7j0QA.js +0 -1
- package/dist/assets/appearance-DYi32tlk.js +0 -1
- package/dist/assets/ar-CmhpkjwX.js +0 -1
- package/dist/assets/ar-DupP3pla.js +0 -7
- package/dist/assets/audit-logs-CydL26ZC.js +0 -35
- package/dist/assets/branding-CAMtNLMU.js +0 -54
- package/dist/assets/bundle-avatar-D0t7RLGx.js +0 -1
- package/dist/assets/button-BeZibzB9.js +0 -1
- package/dist/assets/cloneDeep-SfcdeqEN.js +0 -1
- package/dist/assets/complete-BzCBoyhn.js +0 -45
- package/dist/assets/config-1xq1_d84.js +0 -32
- package/dist/assets/config-space-CYg-72ab.js +0 -1
- package/dist/assets/connect-Bbc2y5nS.js +0 -1
- package/dist/assets/connect-DM2xKEWk.js +0 -5
- package/dist/assets/connect-to-Ck5O2M1K.js +0 -1
- package/dist/assets/dashboard-8QXGSoVu.js +0 -280
- package/dist/assets/de-Doy9B4I7.js +0 -1
- package/dist/assets/de-TcDcBkI0.js +0 -7
- package/dist/assets/did-address-DUThaBlf.js +0 -1
- package/dist/assets/domain-action-card-D3w6jyPR.js +0 -24
- package/dist/assets/domains-BDxEOJh6.js +0 -1
- package/dist/assets/es-CDD0y3ur.js +0 -7
- package/dist/assets/es-CruF8tDk.js +0 -1
- package/dist/assets/exchange-passport-Izkf8qpM.js +0 -1
- package/dist/assets/fr-Bajh_D8H.js +0 -1
- package/dist/assets/fr-zYSSKlBw.js +0 -7
- package/dist/assets/get-safe-url-Bq9SFfX6.js +0 -1
- package/dist/assets/get-safe-url-DBsPGn--.js +0 -1
- package/dist/assets/hi-BsP-0YrU.js +0 -5
- package/dist/assets/hi-DOsApYK0.js +0 -1
- package/dist/assets/id-CY2FWdMB.js +0 -7
- package/dist/assets/index-B2yOcqTl.js +0 -192
- package/dist/assets/index-BGgGfqEc.js +0 -346
- package/dist/assets/index-B_vrglsK.js +0 -10
- package/dist/assets/index-BnmeT4Bk.js +0 -113
- package/dist/assets/index-C8QMe2NL.js +0 -138
- package/dist/assets/index-Cjjg2_Xp.js +0 -11
- package/dist/assets/index-DNG6b9sp.js +0 -224
- package/dist/assets/index-DO3_1y-L.js +0 -708
- package/dist/assets/index-DO4cSlUf.js +0 -290
- package/dist/assets/index-DcBUShKK.js +0 -1
- package/dist/assets/index-EnQ254k3.js +0 -6
- package/dist/assets/index-bb90BUf4.js +0 -55
- package/dist/assets/index-mDKG4SiY.js +0 -1
- package/dist/assets/index-slEV_y-C.js +0 -4
- package/dist/assets/invite-Cbz8B2uW.js +0 -1
- package/dist/assets/item-nK3D7WH5.js +0 -2
- package/dist/assets/ja-99RIjwwl.js +0 -1
- package/dist/assets/ja-BLPXqHM4.js +0 -7
- package/dist/assets/ko-8oFi6wHH.js +0 -1
- package/dist/assets/ko-Cxgk34co.js +0 -7
- package/dist/assets/landing-page-BMM_oJb1.js +0 -1
- package/dist/assets/list-Dmtz4mRb.js +0 -235
- package/dist/assets/list-header-CgF1S4js.js +0 -1
- package/dist/assets/localization-DATb3Y_j.js +0 -1
- package/dist/assets/login-DjB23H9M.js +0 -1
- package/dist/assets/login-oauth-callback-ILeP59KT.js +0 -1
- package/dist/assets/omit-bLid3PKQ.js +0 -1
- package/dist/assets/preferences-DYdbb0kG.js +0 -1
- package/dist/assets/profile-embed-CeEMHxEc.js +0 -1
- package/dist/assets/pt-BINIHul4.js +0 -5
- package/dist/assets/pt-ChXuTrrd.js +0 -1
- package/dist/assets/publish-resource-BEc_A5mC.js +0 -1
- package/dist/assets/relative-time-Djw-K4Zu.js +0 -1
- package/dist/assets/ru-BifF7u-P.js +0 -5
- package/dist/assets/ru-IkTTTY0K.js +0 -1
- package/dist/assets/runtime-DXl0lfXF.js +0 -1
- package/dist/assets/sdk-CTe6rL6c.js +0 -1
- package/dist/assets/session-VIMbdc9j.js +0 -1
- package/dist/assets/setup-BmYxTt6Z.js +0 -25
- package/dist/assets/start-CVexuuAk.js +0 -187
- package/dist/assets/th-CBxM23U5.js +0 -5
- package/dist/assets/th-OF8xr--T.js +0 -1
- package/dist/assets/unsubscribe-Cd3XOnSp.js +0 -1
- package/dist/assets/use-app-logo-B8Kl9EZt.js +0 -1
- package/dist/assets/user-center-CzyCbtWm.js +0 -77
- package/dist/assets/util-Dw9Eiuko.js +0 -1
- package/dist/assets/vendor-hooks-DftG_2gV.js +0 -7
- package/dist/assets/vendor-mui-core-CQ38ohp2.js +0 -266
- package/dist/assets/vi-DCBJBc4G.js +0 -1
- package/dist/assets/vi-DY_Y13jR.js +0 -5
- package/dist/assets/wrap-locale-DMTYAE64.js +0 -1
- package/dist/assets/zh-BRAYg0sY.js +0 -1
- package/dist/assets/zh-tw-BG0rlH8p.js +0 -7
- package/dist/assets/zh-tw-D5-DkgwC.js +0 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-CL673QLU.js","assets/vendor-mui-core-B6POpIBB.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-Cb6R1F6v.js","assets/vendor-ux-did-connect-DVrP2LNw.js","assets/vendor-utils-BUwfcN20.js","assets/vendor-hooks-DpLLpTSZ.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-Cb1OPKJL.js","assets/vendor-arcblock-CX-5Ex_f.js","assets/index-B1ljmpu4.css","assets/Download-CF6ZhZfD.js","assets/bundle-avatar-njRzpG6o.js","assets/log-D33dFtt_.css","assets/index-D9eW5l3E.js","assets/ViewList-rVo7d5VV.js","assets/index-CjZLIV87.js","assets/Phone-CKzC4712.js","assets/Location-BQhEvGNL.js","assets/Email-B0n6rLUZ.js","assets/Timezone-C3hiNX6j.js","assets/did-address-CJZtrzhT.js","assets/permission-DDLyDuSn.js","assets/session-j-9KoWbs.js","assets/click-to-copy-CSwBjJDI.js","assets/index-Cx-tuAMi.js","assets/vendor-mui-x-CATHW1QL.js","assets/AdapterDayjs-D5LoqHiU.js","assets/format-error-BrmqJs5a.js","assets/useAsync-DXeWUWXr.js","assets/index-i5c4XeO-.js","assets/DeleteOutline-Csdx_lih.js","assets/confirm-Bj4L0Vn8.js","assets/util-BcFfyz6S.js","assets/base32-yUUlhgnG.js","assets/sdk-DICk2ZHP.js","assets/actions-D-Helr6n.js","assets/MoreHoriz-CT231fLS.js","assets/shorten-label-SbKUBkvs.js","assets/PlayArrow-CVHX5RbU.js","assets/get-safe-url-BYr2jgRv.js","assets/use-blocklet-logo-DryhoHen.js","assets/InfoOutlined-BMb9Zu84.js","assets/dot-CaKxEi_0.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-BNUwcWCH.js","assets/index-DAer_mWn.js","assets/ExpandLess-DBN4huDO.js","assets/index-BUrD6xiH.js","assets/Error-DnzvDd2d.js","assets/empty-spinner-BYUFR95o.js","assets/list-header-8k1_C0K0.js","assets/QuestionMarkCircle-DpFFQWud.js","assets/index-DVQCgvFb.js","assets/index-DIe9psLc.js","assets/api-BkKTvlm_.js","assets/ChevronRight-C-lajCDc.js","assets/react-beautiful-dnd.esm-CeODMcuS.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-taL0aTyr.js","assets/Launch-CVPYIHzD.js","assets/Done-DjB4uf97.js","assets/delete-confirm-kpan5KFX.js","assets/ArrowDropDown-BCCa5uRn.js","assets/index-CMFOn8T3.js","assets/index-C0Iiqot3.css","assets/index-Bt7GP-dU.js","assets/overview-Ds0WiSnv.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-XLk6MkKv.js","assets/omit-1zyydTZL.js","assets/spaces-CZHg-rr5.js","assets/domains-Cn_DfzNS.js","assets/domain-action-card-BZ3CFKs5.js","assets/util-BYQQqvk1.js","assets/CheckCircle-Bxk_pKUt.js","assets/index-2eL6Ndgh.js","assets/passport-item-Dpr4rKdD.js","assets/Google-VfyWFLKO.js","assets/cloneDeep-Cg0h_FaY.js","assets/EditIcon-DWRQ3fi6.js","assets/LockIcon-Bd69pSJI.js","assets/appearance-rlMOco_Q.js","assets/audit-logs-BpacJ0mq.js","assets/relative-time-DlN06RKr.js","assets/index-B9lBWxnt.js","assets/list-B1E5dxgu.js","assets/traffic-Dbf1L1c0.js","assets/iframe-B7H87IMw.js","assets/LaunchOutlined-faHvtBle.js","assets/ChevronLeft-DgTQnUwX.js","assets/index-BUHlfcy3.js","assets/config-navigation-BZ3T8tYK.js","assets/index-DyKjKMmu.js","assets/slicedToArray-C0YDCVwK.js","assets/simple-select-CLc0Q9sm.js","assets/index-Bco7nZ5q.js","assets/use-mobile-BKvZ6hcv.js","assets/connect-to-lcfZI_0b.js","assets/config-space-CKx83vmi.js","assets/index-C-rP7qS0.js","assets/switch-control-CqfXXgvP.js","assets/index-CVKN_Jn1.js","assets/security-CHs7ENbZ.js","assets/config-BWuaMoux.js","assets/branding-3E94pu9e.js","assets/logo-uploader-DFGj09Gp.js","assets/advanced-CjSPlkxp.js","assets/runtime-nJVx0iKJ.js","assets/index-DHIWtN6I.js","assets/Edit-C-zkyYSj.js","assets/component-DG-t6Jac.js","assets/TuneOutlined-DcBuSd1o.js","assets/add-component-core-kWUUw0fB.js","assets/launch-result-message-B_fS-f90.js","assets/page-header-BXC_EZqA.js","assets/index-BOvzhuNp.js","assets/content-layout-C3Yd4mK9.js","assets/add-component-core-D-IRi6XF.css","assets/index-M6peJL7s.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as pe,u as Yn,p as Ps,h as et,f as er,g as tr,i as ks,j as Ls,k as Ds,m as As,l as En,n as Os,E as $s,o as Ms,H as Ns,_ as $,R as zs}from"./vendor-arcblock-CX-5Ex_f.js";import{H as j,j as s,a9 as Z,ah as V,I as ct,aq as Us,ak as nr,X as Ht,q as Bs,b5 as Hs,ab as le,b6 as qs,bx as Fs,T as B,bv as Vs,bt as ke,bw as Pn,aa as E,bJ as Ws,v as se,a6 as lt,bK as Ks,ae as Gs,bg as Qs,ap as qt,bL as rr,ad as Le,bM as Zs,ar as Js,ai as Xs,e as Ys,al as tt,O as re,bu as Ct,bp as ae,bN as sr,bO as or,bP as ir,E as me,b4 as ar,y as eo,bi as to}from"./vendor-mui-core-B6POpIBB.js";import{r as w,L as cr,f as lr,g as ur,u as no,l as ro}from"./vendor-react-DEoibe3W.js";import{r as J,b8 as so,b6 as ut,b9 as oo,a as ge,n as U,a7 as kn,a2 as N,u as W,at as io,p as dr,ba as Ft,o as ao,d as co,a0 as Vt,a$ as lo,aa as fr,aw as pr,bb as uo,I as fo,G as nt,bc as po,bd as mo,a4 as ho,ar as go}from"./vendor-ux-did-connect-DVrP2LNw.js";import{z as _e,f as F,A as gt,B as xo,b as vo,C as Wt,D as yo,E as mr,F as te,G as hr,t as je,H as gr,I as bo,n as Ce,J as jo,K as wo,u as So,j as Ln,g as _o,L as Dn,h as Co,l as xt,k as Io,m as To,M as Ro,O as Eo,Q as Ge,e as qe,R as Po,T as ko,U as Lo,N as Do,V as vt,c as An}from"./index-Cb1OPKJL.js";import{ae as Ao,A as we,af as Oo,b as Qe,p as xr,z as vr,ag as $o}from"./vendor-utils-BUwfcN20.js";import{_ as On}from"./useLocalStorage-Cb6R1F6v.js";import{C as $n}from"./confirm-Bj4L0Vn8.js";import{d as Mo}from"./PlayArrow-CVHX5RbU.js";import{g as Mn}from"./get-safe-url-BYr2jgRv.js";import{f as Kt}from"./format-error-BrmqJs5a.js";import{u as yr}from"./session-j-9KoWbs.js";import{f as xe,a as br,u as q,w as No}from"./vendor-hooks-DpLLpTSZ.js";import{i as zo,u as Uo,M as Bo,c as De,s as rt,H as Ho,p as jr,a as qo}from"./use-blocklet-logo-DryhoHen.js";import{d as Fo}from"./InfoOutlined-BMb9Zu84.js";import{_ as wr,D as Vo}from"./dot-CaKxEi_0.js";import{_ as Sr}from"./useSetState-CWq0AVWn.js";import{u as _r}from"./use-mobile-BNUwcWCH.js";const Cr=w.createContext({});function Gt({children:e,type:t}){const[n,r]=w.useState([]),o=w.useRef([]),i=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},a=l=>{if(o.current.includes(l)){const u=o.current.filter(f=>f!==l);r(u),o.current=u}},c=l=>{const u=n.filter(h=>l.find(p=>p===h));Ao(u,n).forEach(h=>a(h))};return s.jsx(Cr.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:c},children:e})}Gt.propTypes={type:j.string,children:j.node.isRequired};Gt.defaultProps={type:"blocklets"};function Fl(){return w.useContext(Cr)}var Qt={},Wo=Z;Object.defineProperty(Qt,"__esModule",{value:!0});var Ir=Qt.default=void 0,Ko=Wo(J()),Go=s;Ir=Qt.default=(0,Ko.default)((0,Go.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var Zt={},Qo=Z;Object.defineProperty(Zt,"__esModule",{value:!0});var Tr=Zt.default=void 0,Zo=Qo(J()),Jo=s;Tr=Zt.default=(0,Zo.default)((0,Jo.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 Jt={},Xo=Z;Object.defineProperty(Jt,"__esModule",{value:!0});var Rr=Jt.default=void 0,Yo=Xo(J()),ei=s;Rr=Jt.default=(0,Yo.default)((0,ei.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 Xt={},ti=Z;Object.defineProperty(Xt,"__esModule",{value:!0});var Yt=Xt.default=void 0,ni=ti(J()),ri=s;Yt=Xt.default=(0,ni.default)((0,ri.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 en={},si=Z;Object.defineProperty(en,"__esModule",{value:!0});var Er=en.default=void 0,oi=si(J()),ii=s;Er=en.default=(0,oi.default)((0,ii.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 tn={},ai=Z;Object.defineProperty(tn,"__esModule",{value:!0});var Pr=tn.default=void 0,ci=ai(J()),li=s;Pr=tn.default=(0,ci.default)((0,li.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 nn={},ui=Z;Object.defineProperty(nn,"__esModule",{value:!0});var kr=nn.default=void 0,di=ui(J()),fi=s;kr=nn.default=(0,di.default)((0,fi.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 rn=function(e){return s.jsx("svg",{...e,children:s.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"})})};rn.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};rn.displayName="dashboard";var sn={},pi=Z;Object.defineProperty(sn,"__esModule",{value:!0});var Lr=sn.default=void 0,mi=pi(J()),hi=s;Lr=sn.default=(0,mi.default)((0,hi.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 be={Start:Mo,Stop:Ir,Restart:Tr,Reload:Rr,Remove:so,Config:Yt,Log:Er,Group:Pr,Cancel:kr,Dashboard:rn,Overview:Lr},gi=(e,t)=>{if(!e)return"";const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(we(n.origin,t));return o.search=r.toString(),o.toString()},xi="internal",vi="external";function on({blocklet:e,onStart:t,onComplete:n,variant:r,hasPermission:o,getComponentUrl:i,useBlockletUrlEvaluation:a,...c}){const l=_e(),[u,f]=w.useState(null),[h,p]=w.useState(null),[v,S]=w.useState(!1),[b,P]=w.useState(null),{t:d}=w.useContext(ut),[x]=On("skip-blocklet-setup",!1),{loading:g,recommendedUrl:k}=a(e),[L]=On("blocklet-type-filter",xi),y=F.isInProgress(e.status),[T,C]=w.useState(!1);w.useEffect(()=>{var M,G;if(!(e!=null&&e.controller))return;C(((G=(M=e==null?void 0:e.controller)==null?void 0:M.status)==null?void 0:G.value)===pe.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var X,ie,de;try{const Y=await l.api.getLauncherSession({input:{launcherSessionId:(X=e==null?void 0:e.controller)==null?void 0:X.launcherSessionId,launcherUrl:(ie=e==null?void 0:e.controller)==null?void 0:ie.launcherUrl}});if(Y!=null&&Y.error){console.error("get launcher session failed",Y.error);return}C([U.LAUNCH_SESSION_STATUS.overdue,U.LAUNCH_SESSION_STATUS.canceled,U.LAUNCH_SESSION_STATUS.terminated].includes((de=Y==null?void 0:Y.launcherSession)==null?void 0:de.status))}catch(Y){console.error("call getLauncherSession error",Y)}})()},[]);const{inService:I}=l,m=(R,M,G=!1)=>async()=>{const X=async Ue=>{var He;t({action:R,blocklet:e}),S(!0),p(R);let Be=!1;try{if(R==="remove")await M(Ue);else if(R==="start"){if(!F.hasRunnableComponent(e)){N.error(d("blocklet.noComponent"));return}if(!I&&!x&&!((He=e.settings)!=null&&He.initialized)&&e.mode!==pe.BLOCKLET_MODES.DEVELOPMENT){if(!k||!kn(k)){N.error(d("blocklet.gotoVisitError"));return}const ne=xo(l.info),Rn=new URL(k);Rn.searchParams.set("serverUrl",ne),window.open(Mn(Rn.href,{allowDomains:null})),n({action:R,blocklet:e});return}const fe=e.children.filter(ne=>!F.isInProgress(ne.status)&&ne.status!=="running").map(ne=>ne.meta.did),ye={did:e.meta.did,componentDids:fe};await M({input:ye})}else if(["stop","restart","reload"].includes(R)){const fe=e.children.filter(ne=>ne.status==="running").map(ne=>ne.meta.did),ye={did:e.meta.did,componentDids:fe};await M({input:ye})}else{const fe={did:e.meta.did};await M({input:fe})}R==="remove"?Be=!0:await vo(1e3),R==="reload"&&N.success(d("blocklet.reloadSuccess")),P(null),n({action:R,blocklet:e})}catch(fe){const ye=`Blocklet ${R} failed: ${Kt(fe)}`;throw n({action:R,blocklet:e,error:new Error(ye)}),new Error(ye)}finally{Be||S(!1)}},ie=()=>{S(!1),P(null)},de=F.getDisplayName(e,!0),Y=e.mode===pe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>s.jsx(B,{component:"div",children:s.jsx(B,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Ue,Be)=>s.jsxs(B,{component:"div",children:[s.jsx(B,{gutterBottom:!0,children:d("blocklet.action.removeApplicationDescription")}),s.jsxs(Vs,{name:"removeType",value:Ue.removeType,onChange:He=>Be({...Ue,removeType:He.target.value}),children:[s.jsx(ke,{value:"backup",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationAfterBackup")}),s.jsx(ke,{value:"complete",control:s.jsx(Pn,{}),label:d("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Es={stop:{title:`${d("common.stop")} ${de}`,description:d("blocklet.action.stopDescription"),confirm:d("blocklet.action.confirmStop"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},restart:{title:`${d("common.restart")} ${de}`,description:d("blocklet.action.restartDescription"),confirm:d("blocklet.action.confirmRestart"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie},remove:{title:`${d("common.remove")} ${de}`,confirm:d("blocklet.action.confirmRemove"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie,...Y},cancelDownload:{title:`${d("common.cancel")}`,description:d("blocklet.action.cancelDownloadDescription",{name:de}),confirm:d("common.confirm"),cancel:d("common.cancel"),onConfirm:X,onCancel:ie}};G?P(Es[R]):await X()},_=!!u,A=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(R.currentTarget)},D=R=>{try{R.stopPropagation(),R.preventDefault()}catch{}f(null)},H=async(R,M)=>{try{M.stopPropagation(),M.preventDefault()}catch{}if(typeof R.handler=="function")try{S(!0),p(R.action),await R.handler()}catch(G){console.error(`Blocklet ${R.name} failed: `,G)}finally{S(!1),f(null)}else f(null)},K=!I&&F.isDeletableBlocklet(e)?{action:"remove",icon:be.Remove,name:d("common.remove"),handler:m("remove",async({removeType:R})=>{R==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:y}:null,ht={action:"remove",icon:({sx:R,...M})=>s.jsx(be.Cancel,{sx:{...R,paddingRight:"2px",zoom:.95},...M}),name:d("common.cancel"),handler:m("cancelDownload",l.api.cancelDownloadBlocklet,!0)},Ts=F.getAppMissingConfigs(e),Rs=()=>{var X;const R=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),M=i==null?void 0:i({mountPoint:R,blocklet:e});if(!M||!kn(M)){N.error(d("blocklet.gotoVisitError"));return}const G=(X=e==null?void 0:e.site)==null?void 0:X.domainAliases;window.open(Mn(gi(M,".well-known/service/admin"),{allowDomains:G==null?void 0:G.map(ie=>ie.value)}))};let ze=[{action:"start",icon:be.Start,inExternal:!0,name:d("common.start"),handler:m("start",l.api.startBlocklet),disabled:T||e.children.every(R=>R.status==="running")||gt(e.status)||g||y},{action:"stop",icon:be.Stop,inExternal:!0,name:d("common.stop"),handler:m("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:be.Restart,name:d("common.restart"),handler:m("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},gt(e.status)?ht:K,{separator:!0},I?null:{action:"dashboard",icon:({style:R,...M})=>s.jsx(be.Dashboard,{...M,style:{...R,width:"26px",height:"26px",paddingRight:"3px"}}),name:d("sidebar.dashboard"),handler:Rs}].filter(Boolean);return L===vi&&(ze=ze.filter(R=>R.inExternal)),r==="menu"?s.jsxs(Nn,{"data-cy":"blocklet-actions",children:[s.jsx(ct,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:A,size:"small",disabled:!o||!gt(e.status)&&v,children:s.jsx(oo,{})}),s.jsxs(Us,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:_,onClose:D,PaperProps:{},children:[Ts.length>0&&s.jsxs(nr,{style:{maxWidth:"400px"},severity:"error",children:[d("blocklet.config.missingRequired"),s.jsx("br",{}),s.jsx(cr,{to:`/blocklets/${e.meta.did}/components`,children:d("blocklet.config.gotoFix")})]}),ze.map((R,M)=>R.separator?s.jsx(Ht,{},`separator-${M}`):s.jsxs(Bs,{dense:!0,onClick:G=>H(R,G),disabled:v||R.disabled,"data-cy":`${R.action}-blocklet`,children:[s.jsx(Hs,{style:{minWidth:24},children:h===R.action&&v?s.jsx(le,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{fontSize:"small"})}),s.jsx(qs,{primary:R.name})]},R.name))]}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]}):s.jsxs(Nn,{"data-cy":"blocklet-actions",...c,children:[s.jsx(Fs,{children:ze.filter(R=>!R.separator&&!R.onlyInMenu).map(R=>s.jsxs(ge,{title:R.name,"data-cy":`${R.action}-blocklet`,onClick:()=>H(R),disabled:!!R.disabled||v,children:[h===R.action&&v?s.jsx(le,{size:16,sx:{marginRight:1}}):s.jsx(R.icon,{}),s.jsx("span",{className:"blocklet-action-text",children:R.name})]},R.name))}),b&&s.jsx($n,{title:b.title,description:b.description,confirm:b.confirm,cancel:b.cancel,params:b.params,onConfirm:b.onConfirm,onCancel:b.onCancel})]})}on.propTypes={getComponentUrl:j.func,blocklet:j.object.isRequired,onStart:j.func.isRequired,onComplete:j.func.isRequired,variant:j.oneOf(["menu","group"]),hasPermission:j.bool,useBlockletUrlEvaluation:j.func};on.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 Nn=V.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
|
+
`,zn=w.memo(on),yi=e=>{const t={};let n=null;return F.forEachBlockletSync(e,r=>{t[r.meta.bundleDid]?n=F.getDisplayName(r,!0):r.meta.bundleDid&&(t[r.meta.bundleDid]=!0)}),n},bi=(e,t,n)=>{var i;const{hostname:r,href:o}=e;if(!t)return o;if(n){const c=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(r);if(!c)return o;const l=c[0],f=((((i=t.site)==null?void 0:i.domainAliases)||[]).map(h=>h.value).filter(Boolean).find(h=>h.endsWith(U.DEFAULT_DID_DOMAIN))||"").replace(`.${U.DEFAULT_DID_DOMAIN}`,"");return f?o.replace(r,`${f}-${l}.${U.DEFAULT_IP_DOMAIN_SUFFIX}`):o}return o.replace(t.meta.bundleDid,t.appPid)};function Dr(){const{t:e}=W(),{api:t}=yr(),{blocklet:n}=Wt(),{inService:r}=_e(),[o,i]=w.useState(!1),[a,c]=w.useState(5),l=n&&n.structVersion!==U.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){N.error(e("blocklet.migrate.tip.running"));return}const p=yi(n);if(p){N.error(e("blocklet.migrate.tip.duplicate",{name:p}));return}i(!0)}catch(p){N.error(Kt(p))}},f=()=>{const p=bi(window.location,n,r);setTimeout(()=>{window.location.href=p},5e3),c(5),setInterval(()=>{c(v=>v-1)},1e3)},h=()=>i(!1);return[l&&s.jsxs(nr,{severity:"warning",style:{margin:"12px 0"},children:[s.jsxs(E,{display:"flex",alignItems:"center",children:[s.jsx(ge,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),s.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(p=>s.jsx(E,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${p}`)},p))]},"alert"),n&&s.jsx(io,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:n.appDid,did:n.meta.did,wt:yo(n,!0),title:F.getDisplayName(n)},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:h},"connect")]}Dr.propTypes={};function ji(){const e=Ws();return[...e.breakpoints.keys].reverse().reduce((n,r)=>{const o=se(e.breakpoints.up(r));return!n&&o?r:n},null)||"xs"}function wi(e){return s.jsx(lt,{...e,children:s.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 Si(e){return s.jsx(lt,{...e,children:s.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function _i(e){return s.jsx(lt,{...e,children:s.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 Ci(e){return s.jsx(lt,{...e,children:s.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 Fe={fontSize:20,marginInlineEnd:8},Ii={success:s.jsx(wi,{style:Fe}),warning:s.jsx(Si,{style:Fe}),error:s.jsx(_i,{style:Fe}),info:s.jsx(Ci,{style:Fe})},Ti=Ks(e=>{const t={xl:"400px",lg:"400px",md:"400px",sm:"300px"},n=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:n,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:r=>({backgroundColor:`${Gs[600]} !important`,width:t[r.breakpoint]}),error:r=>({backgroundColor:`${e.palette.error.dark} !important`,width:t[r.breakpoint]}),info:r=>({backgroundColor:`${e.palette.primary.main} !important`,width:t[r.breakpoint]}),warning:r=>({backgroundColor:`${Qs[700]} !important`,width:t[r.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 an({keyId:e,notification:t={},viewAllUrl:n,content:r},o){var b,P,d;const i=Ti({breakpoint:ji()}),a=[i.contentRoot,i.lessPadding,i[t.severity]].join(" "),c=Ii[t.severity],{closeSnackbar:l}=dr(),u=()=>l(e),f=lr(),h=()=>{l(e),f(n)},p=xe(()=>zo(t),[t]),v=xe(()=>t==null?void 0:t.activity,[t]),S=Uo({activity:v,users:[t==null?void 0:t.actorInfo],actors:[(b=t==null?void 0:t.activity)==null?void 0:b.actor],extra:{linkColor:Ft.primaryBase,userDid:(d=(P=t==null?void 0:t.receivers)==null?void 0:P[0])==null?void 0:d.did}});return s.jsxs(ao,{ref:o,className:a,children:[s.jsxs("div",{className:i.message,children:[c,s.jsx(Ei,{onClick:h,style:{width:"calc(100% - 30px)"},children:s.jsx(E,{children:p?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:S}),s.jsx(Bo,{meta:v.meta,type:v.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"title",children:t.title}),r||s.jsx("span",{className:"desc",children:t.description})]})})})]}),s.jsx("div",{className:i.action,children:s.jsx(ct,{"aria-label":"close",color:"inherit",onClick:u,size:"large",children:s.jsx(co,{className:i.icon})},"close")})]})}const Ri=w.forwardRef(an);an.propTypes={viewAllUrl:j.string.isRequired,keyId:j.number.isRequired,notification:j.object.isRequired,content:j.node};an.defaultProps={content:null};const Ei=V.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 Ar({attachment:e}){const{data:t}=e;let n="";try{n=new URL(t.url).host}catch{n=t.url}return s.jsxs(qt,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:r=>{r.customPreventRedirect=!0},children:[!!n&&s.jsx("span",{className:"url",children:n}),!!t.title&&s.jsx(E,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&s.jsx(E,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:t.description}),!!t.image&&s.jsx("img",{src:Yn.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ar.propTypes={attachment:j.object.isRequired};function Or({attachment:e}){const{data:t}=e;return s.jsx("img",{src:Yn.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Or.propTypes={attachment:j.object.isRequired};function $r({attachment:e,...t}){var c;const{data:n}=e,r=((c=n.color)==null?void 0:c.toLowerCase())||t.color,o=n.size||t.size,i=n.fontWeight||t.fontWeight||400;let a="14px";return o==="small"?a="12px":o==="normal"?a="14px":o==="big"?a="16px":o==="large"&&(a="18px"),s.jsx(Pi,{className:"title",style:{fontSize:a,color:r,whiteSpace:"unset",fontWeight:i},children:n.text})}$r.propTypes={attachment:j.object.isRequired};const Pi=V.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
|
+
`;cn.propTypes={locale:j.string,data:j.object.isRequired};cn.defaultProps={locale:"en"};function cn({locale:e="en",data:t}){const n={zh:"来自",en:"from"}[e]||"from",r={zh:"接收",en:"Received"}[e]||"Received",i=`https://${De.getUrlHost(t.chainHost)||De.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`;let a=t.amount;t.decimal&&(a=t.amount/10**t.decimal);const c=xe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:l=>{l.customPreventRedirect=!0},children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:c,children:[s.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:r}),s.jsxs(B,{component:"div",align:"right",style:rt.summaryStyle,flex:1,children:["+",a," ",t.symbol]})]}),s.jsxs(E,{sx:c,children:[s.jsx(B,{component:"div",style:{...rt.remarkStyle,fontSize:14},children:n}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}ln.propTypes={locale:j.string,data:j.object.isRequired};ln.defaultProps={locale:"en"};function ln({locale:e,data:t}){var l,u;const n={zh:"接收",en:"Received"}[e]||"Received",r={zh:"来自",en:"from"}[e]||"from",o=De.getUrlHost(t.chainHost)||De.getChainHost(t.chainId),i=t.did||((u=(l=t==null?void 0:t.credential)==null?void 0:l.issuer)==null?void 0:u.id)||"",a=`https://${o}/explorer/assets/${i}`,c=xe(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return s.jsx(E,{sx:{pr:1},children:s.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:s.jsxs(E,{display:"flex",flexDirection:"column",children:[s.jsxs(E,{sx:c,children:[s.jsx(B,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:n}),s.jsx(B,{component:"div",align:"right",style:rt.summaryStyle,children:"+1 Asset"})]}),i?s.jsxs(E,{sx:c,children:[s.jsx(B,{component:"div",style:{...rt.remarkStyle,fontSize:14},children:r}),s.jsx(E,{maxWidth:260,fontSize:14,children:s.jsx(Vt,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Mr.propTypes={data:j.object.isRequired,locale:j.string};function Mr({data:e,locale:t="en"}){return s.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:n=>{n.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),s.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[s.jsx("div",{style:{marginBottom:"6px"},children:e.title}),s.jsx(E,{maxWidth:260,fontSize:10,style:{color:"#a5a5a5"},children:s.jsx(Vt,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}un.propTypes={locale:j.string,data:j.object.isRequired};un.defaultProps={locale:"en"};function un({locale:e,data:t}){const n=De.getChainHost(t.chainId),r=`https://${n}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return s.jsxs("a",{href:r,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[s.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:n}),s.jsx("p",{style:{color:"#4598fa",margin:0},children:o}),s.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",t.hash]})]})}function Nr({attachment:e,...t}){const{local:n}=w.useContext(ut),r=se(o=>o.breakpoints.down("md"));return s.jsxs(ki,{...t,isMd:r,children:[e.type==="link"&&s.jsx(Ar,{attachment:e,...t,isMd:r}),e.type==="image"&&s.jsx(Or,{attachment:e,isMd:r}),e.type==="text"&&s.jsx($r,{attachment:e,isMd:r}),e.type==="token"&&s.jsx(cn,{data:e.data,local:n,isMd:r}),e.type==="asset"||e.type==="vc"?s.jsx(ln,{data:e.data,local:n,isMd:r}):null,e.type==="dapp"&&s.jsx(Mr,{data:e.data,local:n,isMd:r}),e.type==="transaction"&&s.jsx(un,{data:e.data,local:n,...t,isMd:r}),e.type==="divider"&&s.jsx(Ht,{sx:{mb:1,mt:1},style:{color:Ft.dividerColor}})]})}const ki=V.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
|
+
`;Nr.propTypes={attachment:j.object.isRequired};function zr({data:e,...t}){const{items:n}=e;return s.jsx(Li,{...t,children:n.map(r=>s.jsxs(rr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[s.jsxs(E,{display:"flex",alignItems:"center",gap:1,children:[r.icon?s.jsx("img",{src:r.icon,alt:r.title,style:{width:16,height:16}}):null,s.jsxs(E,{className:"metric-name",display:"flex",alignItems:"center",children:[r.title,r.subtitle?s.jsx(Le,{title:r.subtitle,arrow:!0,placement:"top",children:s.jsx(Fo,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),s.jsxs(E,{className:"metric-number",sx:{color:r.content_color||"rgba(3, 7, 18, 1)"},children:[r.content,r.sub_content?s.jsxs("span",{className:"sub-content",style:{color:r.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",r.sub_content,")"]}):null]})]},r.title))})}const Li=V(E)`
|
|
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
|
+
`;zr.propTypes={data:j.object.isRequired};function Ur({data:e}){const{items:t}=e,n=se(a=>a.breakpoints.down("sm")),r=se(a=>a.breakpoints.down("md")),o=se(a=>a.breakpoints.down("lg")),i=()=>n?1:r?3:o?4:6;return s.jsx(Zs,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?s.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:s.jsx(Js,{children:s.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}Ur.propTypes={data:j.object.isRequired};function dn({data:e,feedType:t,...n}){return s.jsxs(Di,{...n,children:[t==="data-tracker"&&e.type==="table"&&s.jsx(zr,{data:e}),(t==="graphic"||t==="gallery")&&s.jsx(Ur,{data:e})]})}const Di=V.div`
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin-bottom: 4px;
|
|
72
|
+
&:last-child {
|
|
73
|
+
margin-bottom: 0;
|
|
74
|
+
}
|
|
75
|
+
`;dn.propTypes={data:j.object.isRequired,feedType:j.string};dn.defaultProps={feedType:"data-tracker"};const Ai=lo(),Oi=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},$i=e=>e.every(t=>t.type==="text"),Mi=e=>e.every(t=>t.type==="image"),Ni=e=>Oo(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(n=>{var r,o,i;return(i=(o=(r=n==null?void 0:n.data)==null?void 0:r.text)==null?void 0:o.trim)==null?void 0:i.call(o)})),zi=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(n=>n.type===t)},Ui=async(e,t)=>{const n=Ai.user;if(n)try{return await n.getUserPublicInfo({did:e})?await n.getProfileUrl({did:e,locale:t}):void 0}catch(r){console.error(r);return}};Ze.propTypes={data:j.array.isRequired,style:j.object};function Ze({data:e,style:t={}}){return s.jsx(B,{style:{color:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},children:e.text})}function Br({data:e}){const t=[];for(let n=0;n<(e==null?void 0:e.length);n+=2){const r=e[n],o=e[n+1];r&&o?t.push(s.jsxs(Un,{children:[s.jsx("td",{className:"label-col",children:s.jsx(Ze,{data:r.data,style:{whiteSpace:"nowrap"}})}),s.jsx("td",{className:"value-col",children:s.jsx(Ze,{data:o.data,style:{wordBreak:"break-all"}})})]},n)):r&&t.push(s.jsx(Un,{children:s.jsx("td",{className:"label-col",children:s.jsx(Ze,{data:r.data})})},n))}return s.jsx("table",{style:{width:"100%"},children:s.jsx("tbody",{children:t})})}Br.propTypes={data:j.array.isRequired};const Un=V.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 fn({notification:e,severity:t,showSke:n=!0}){const{attachments:r,data:o,...i}=e,a=se(f=>f.breakpoints.down("md"));if((!r||!r.length)&&Qe(o))return null;const c=Oi(t),l=(f,h=!1)=>{if(!f&&!Array.isArray(f))return null;let p=f,v={},S="horizontal";h&&$i(f)&&(p=Ni(f),S="vertical",v={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||p.length===1?"100%":"28%"});const b=zi(p);return s.jsx(E,{sx:{width:"100%",display:"flex",gap:1,flexDirection:h?"row":"column",justifyContent:"flex-start",alignItems:h?"center":"unset",flexWrap:"wrap"},children:p.map((P,d)=>P.type==="section"?s.jsx(Br,{data:P.fields},d):s.jsxs(w.Fragment,{children:[s.jsx(Nr,{attachment:P,style:v,...i}),!(a&&S==="vertical")&&b&&p.length>1&&d!==p.length-1?s.jsx(Ht,{orientation:S,style:{color:Ft.dividerColor},sx:S==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},d))})},u=Mi(r);return s.jsx(Bi,{children:s.jsxs("div",{className:"message-in-list",children:[r.length>0&&s.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:u?l(r):s.jsx(rr,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:l(r)})}),!Qe(o)&&s.jsx("div",{className:"message-container",children:s.jsx("div",{className:"data-container",children:s.jsx(dn,{data:o,feedType:e.feedType})})}),r.length===0&&Qe(o)&&n&&s.jsx(Xs,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Bi=V.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
|
+
`;fn.propTypes={severity:j.string.isRequired,notification:j.object.isRequired,showSke:j.bool};fn.defaultProps={showSke:!0};const yt=e=>Ps.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Hi=async(e,t)=>{const{type:n,did:r}=e;return er.isSameAddr(n,"did")?await Ui(r,t)||et.getLink(e):et.getLink(e)},qi=async(e,t,n=!0)=>{const r=et.toTextList(e);return await Promise.all(r.map(async i=>{if(i instanceof et.Link){if(n){const a=await Hi(i,t),{type:c,chainId:l,did:u}=i;return er.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${l}" data-did="${u}">${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="${c}" data-chain-id="${l}" data-did="${u}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};Hr.propTypes={notification:j.object,rows:j.number,minimal:j.bool};function Hr({notification:e,rows:t=2,minimal:n=!1}){const[r,o]=w.useState(!1),[i,a]=w.useState(""),{t:c,locale:l}=W(),{palette:u}=Ys(),f=w.useMemo(()=>{const{attachments:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),h=w.useMemo(()=>{const{blocks:d}=e||{};if(!d)return!1;try{return d.length>0}catch{return!1}},[e]),p=w.useMemo(()=>{const{description:d}=e||{};return!!d},[e]),v=w.useMemo(()=>{const{data:d}=e||{};return!Qe(d)},[e]),S=w.useMemo(()=>f||h||p||v,[f,h,p,v]);if(w.useEffect(()=>{qi((e==null?void 0:e.description)??"",l).then(d=>{a(d)})},[e==null?void 0:e.description,l]),!S)return null;const b=()=>t===0?"":r?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,P=d=>{const{target:x}=d;x.getAttribute("data-name")==="toggle-expanded"&&(o(!r),d.customPreventRedirect=!0)};return s.jsxs(Fi,{color:n?u.primary.contrastText:"",children:[s.jsx(E,{className:"text-container",component:"div",onClick:P,children:i&&(!r&&t>0?s.jsx(Ho,{basedOn:"letters",unsafeHTML:yt(i),maxLine:t,ellipsisHTML:yt(b())}):s.jsx(B,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:yt(`${i}${b()}`)}}))}),!n&&(f||v)?s.jsx(fn,{severity:e.severity,notification:e}):null]})}const Fi=V(E)`
|
|
141
|
+
width: 100%;
|
|
142
|
+
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
143
|
+
.text-container {
|
|
144
|
+
word-wrap: break-word;
|
|
145
|
+
word-break: break-all;
|
|
146
|
+
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
147
|
+
.toggle-btn {
|
|
148
|
+
display: inline-block;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
margin-left: 4px;
|
|
152
|
+
color: ${e=>e.theme.palette.secondary.main};
|
|
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
|
+
line-height: 1.25;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
`,Vi=w.memo(Hr);var It={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=P;var n=c(tr),r=c(ks),o=c(Ls),i=c(Ds),a=c(As);function c(d){return d&&d.__esModule?d:{default:d}}function l(d,x){return v(d)||p(d,x)||f(d,x)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
166
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(d,x){if(d){if(typeof d=="string")return h(d,x);var g={}.toString.call(d).slice(8,-1);return g==="Object"&&d.constructor&&(g=d.constructor.name),g==="Map"||g==="Set"?Array.from(d):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?h(d,x):void 0}}function h(d,x){(x==null||x>d.length)&&(x=d.length);for(var g=0,k=Array(x);g<x;g++)k[g]=d[g];return k}function p(d,x){var g=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(g!=null){var k,L,y,T,C=[],I=!0,m=!1;try{if(y=(g=g.call(d)).next,x!==0)for(;!(I=(k=y.call(g)).done)&&(C.push(k.value),C.length!==x);I=!0);}catch(_){m=!0,L=_}finally{try{if(!I&&g.return!=null&&(T=g.return(),Object(T)!==T))return}finally{if(m)throw L}}return C}}function v(d){if(Array.isArray(d))return d}var S={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},b=/^\[([^\]]+)\](?::([0-9]+))?$/;function P(d,x){if((0,n.default)(d),!d||/[\s<>]/.test(d)||d.indexOf("mailto:")===0||(x=(0,a.default)(x,S),x.validate_length&&d.length>x.max_allowed_length)||!x.allow_fragments&&d.includes("#")||!x.allow_query_components&&(d.includes("?")||d.includes("&")))return!1;var g,k,L,y,T,C,I,m;if(I=d.split("#"),d=I.shift(),I=d.split("?"),d=I.shift(),I=d.split("://"),I.length>1){if(g=I.shift().toLowerCase(),x.require_valid_protocol&&x.protocols.indexOf(g)===-1)return!1}else{if(x.require_protocol)return!1;if(d.slice(0,2)==="//"){if(!x.allow_protocol_relative_urls)return!1;I[0]=d.slice(2)}}if(d=I.join("://"),d==="")return!1;if(I=d.split("/"),d=I.shift(),d===""&&!x.require_host)return!0;if(I=d.split("@"),I.length>1){if(x.disallow_auth||I[0]===""||(k=I.shift(),k.indexOf(":")>=0&&k.split(":").length>2))return!1;var _=k.split(":"),A=l(_,2),D=A[0],H=A[1];if(D===""&&H==="")return!1}y=I.join("@"),C=null,m=null;var K=y.match(b);if(K?(L="",m=K[1],C=K[2]||null):(I=y.split(":"),L=I.shift(),I.length&&(C=I.join(":"))),C!==null&&C.length>0){if(T=parseInt(C,10),!/^[0-9]+$/.test(C)||T<=0||T>65535)return!1}else if(x.require_port)return!1;return x.host_whitelist?(0,r.default)(L,x.host_whitelist):L===""&&!x.require_host?!0:!(!(0,i.default)(L)&&!(0,o.default)(L,x)&&(!m||!(0,i.default)(m,6))||(L=L||m,x.host_blacklist&&(0,r.default)(L,x.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(It,It.exports);var Wi=It.exports;const qr=ur(Wi);var Tt={exports:{}},Rt={exports:{}},Et={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){return r==null}e.exports=t.default,e.exports.default=t.default})(Et,Et.exports);var Ki=Et.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=o(tr),r=o(Ki);function o(l){return l&&l.__esModule?l:{default:l}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function c(l,u){(0,n.default)(l),u=u||{};var f=u.allow_leading_zeroes===!1?i:a,h=!u.hasOwnProperty("min")||(0,r.default)(u.min)||l>=u.min,p=!u.hasOwnProperty("max")||(0,r.default)(u.max)||l<=u.max,v=!u.hasOwnProperty("lt")||(0,r.default)(u.lt)||l<u.lt,S=!u.hasOwnProperty("gt")||(0,r.default)(u.gt)||l>u.gt;return f.test(l)&&h&&p&&v&&S}e.exports=t.default,e.exports.default=t.default})(Rt,Rt.exports);var Gi=Rt.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=r(Gi);function r(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,n.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=t.default,e.exports.default=t.default})(Tt,Tt.exports);var Qi=Tt.exports;const Zi=ur(Qi);function Q({title:e,desc:t,sectionLeftSx:n,sectionRightSx:r,children:o,...i}){return s.jsx(Ji,{...i,children:s.jsxs(tt,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[s.jsxs(E,{className:"section-left",sx:n,children:[s.jsx(B,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),s.jsx(E,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:t}})]}),s.jsx(tt,{className:"section-content",direction:"column",sx:{width:"100%",...r},children:o})]})})}Q.propTypes={title:j.string.isRequired,children:j.node.isRequired,desc:j.string,sectionLeftSx:j.object,sectionRightSx:j.object};Q.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Ji=V(E)`
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: flex-start;
|
|
169
|
+
width: 100%;
|
|
170
|
+
|
|
171
|
+
.section {
|
|
172
|
+
width: 100%;
|
|
173
|
+
|
|
174
|
+
.section-left {
|
|
175
|
+
flex-shrink: 0;
|
|
176
|
+
flex-grow: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.section-title {
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
line-height: 32px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.section-desc {
|
|
185
|
+
font-weight: normal;
|
|
186
|
+
font-size: 12px;
|
|
187
|
+
white-space: pre-line;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.section-content {
|
|
191
|
+
flex-grow: 1;
|
|
192
|
+
width: 0;
|
|
193
|
+
align-self: center;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media (max-width: 900px) {
|
|
198
|
+
.section-left {
|
|
199
|
+
width: 100%;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.section-content {
|
|
203
|
+
width: 100% !important;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
`,bt={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Xi(){var T,C,I;const{api:e}=_e(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=fr(),i=(T=t==null?void 0:t.meta)==null?void 0:T.did,a=Object.assign({...bt},((I=(C=t==null?void 0:t.settings)==null?void 0:C.notification)==null?void 0:I.email)||{}),{handleSubmit:c,control:l,formState:u,watch:f,reset:h}=mr({defaultValues:xr(a,Object.keys(bt))}),p=br({testReceiver:"",testReceiverError:""}),v=f("enabled"),S=q(async(m,_,A=!0)=>{var D,H;try{const{blocklet:K}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:m})}}),ht=Object.assign({...bt},((H=(D=K==null?void 0:K.settings)==null?void 0:D.notification)==null?void 0:H.email)||{});h(ht),A&&N.success(n("oauth.saveSuccess"))}catch(K){if(A)N.error(K.message||n("oauth.saveFailed"));else throw K}}),b=q(async(m,_,A)=>{try{u.isDirty&&await S(m,_,!1),await e.sendEmail({input:{did:i,receiver:A,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),N.success(n("notification.email.testSuccess"))}catch(D){N.error(D.message||n("notification.email.testfailed"))}}),P=q((m,_)=>{p.testReceiver="",p.testReceiverError="",r.open({title:n("notification.email.testSendEmail"),content:()=>s.jsx(E,{sx:{width:"300px"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.email.inputTestReceiver"),value:p.testReceiver,onChange:A=>{p.testReceiver=A.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(A){var H;const D=(H=p.testReceiver)==null?void 0:H.trim();if(!D){p.testReceiverError=n("notification.email.receiverRequired");return}if(!En(D)){p.testReceiverError=n("notification.email.receiverInvalid");return}p.testReceiverError="",await b(m,_,D),A()}})}),d=q(m=>{const _=m==null?void 0:m.trim();return _?En(_)?!0:n("notification.email.fromInvalid"):n("notification.email.fromRequired")}),x=q(m=>{const _=m==null?void 0:m.trim();return _?qr(_,{require_host:!1,protocols:[]})?!0:n("notification.email.hostInvalid"):n("notification.email.hostRequired")}),g=q(m=>m?Zi(m)?!0:n("notification.email.portInvalid"):n("notification.email.portRequired")),k=q(m=>m!=null&&m.trim()?!0:n("notification.email.userRequired")),L=q(m=>m!=null&&m.trim()?!0:n("notification.email.passwordRequired")),y=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(Yi,{component:"form",onSubmit:c(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.email.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:l,render:({field:m})=>s.jsx(ke,{control:s.jsx(Ct,{checked:m.value,...m})})})}),s.jsx(Q,{title:n("notification.email.from"),children:s.jsx(te,{name:"from",control:l,rules:{validate:v?d:y},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,label:n("notification.email.from"),error:!!u.errors[m.name],helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.host"),children:s.jsx(te,{name:"host",control:l,rules:{validate:v?x:y},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.host"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.port"),children:s.jsx(te,{name:"port",control:l,rules:{validate:v?g:y},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"number",error:!!u.errors[m.name],label:n("notification.email.port"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.user"),children:s.jsx(te,{name:"user",control:l,rules:{validate:v?k:y},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,error:!!u.errors[m.name],label:n("notification.email.user"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.password"),children:s.jsx(te,{name:"password",control:l,rules:{validate:v?L:y},render:({field:m})=>{var _;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...m,size:"small",required:!0,type:"password",error:!!u.errors[m.name],label:n("notification.email.password"),helperText:((_=u.errors[m.name])==null?void 0:_.message)||" ",disabled:!v})})}})}),s.jsx(Q,{title:n("notification.email.secure"),children:s.jsx(te,{name:"secure",control:l,rules:{validate:y},render:({field:m})=>s.jsx(ae,{fullWidth:!0,children:s.jsx(ke,{control:s.jsx(Ct,{checked:m.value,...m,disabled:!v})})})})}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ge,{variant:"outlined",color:"warning",onClick:c(P),sx:{mr:2},disabled:!v,children:n("oauth.runTest")}),s.jsx(ge,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const Yi=V(tt)``,jt={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function ea(){var g,k,L;const{api:e}=_e(),{blocklet:t}=Wt(),{t:n}=W(),{confirmApi:r,confirmHolder:o}=fr(),i=(g=t==null?void 0:t.meta)==null?void 0:g.did,a=Object.assign({...jt},((L=(k=t==null?void 0:t.settings)==null?void 0:k.notification)==null?void 0:L.pushKit)||{}),{handleSubmit:c,control:l,formState:u,watch:f,reset:h}=mr({defaultValues:xr(a,Object.keys(jt))}),p=br({testReceiver:"",testReceiverError:""}),v=f("enabled"),S=q(async(y,T,C=!0)=>{var I,m;try{const{blocklet:_}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:y})}}),A=Object.assign({...jt},((m=(I=_==null?void 0:_.settings)==null?void 0:I.notification)==null?void 0:m.pushKit)||{});h(A),C&&N.success(n("oauth.saveSuccess"))}catch(_){if(C)N.error(_.message||n("oauth.saveFailed"));else throw _}}),b=q(async(y,T)=>{var C,I,m;try{u.isDirty&&await S(y,T,!1);const _=(C=((t==null?void 0:t.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:C.value,A=vr(we(_,"/.well-known/service/blocklet/logo"),{v:(I=t==null?void 0:t.meta)==null?void 0:I.version,t:new Date((t==null?void 0:t.updatedAt)||0).getTime()}),D={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:t==null?void 0:t.appDid,fullName:(m=t==null?void 0:t.meta)==null?void 0:m.title,avatar:A}}}};await e.sendPush({input:{did:i,receiver:p.testReceiver,notification:JSON.stringify(D)}}),N.success(n("notification.pushKit.testSuccess"))}catch(_){N.error(_.message||n("notification.pushKit.testfailed"))}}),P=q((y,T)=>{p.testReceiverError="",r.open({title:n("notification.pushKit.testSend"),content:()=>s.jsx(E,{sx:{width:"450px",maxWidth:"100%"},children:s.jsx(re,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:n("notification.pushKit.inputTestReceiver"),value:p.testReceiver,onChange:C=>{p.testReceiver=C.target.value},error:!!p.testReceiverError,helperText:p.testReceiverError||" "})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),async onConfirm(C){var m;if(!((m=p.testReceiver)==null?void 0:m.trim())){p.testReceiverError=n("notification.pushKit.receiverRequired");return}p.testReceiverError="",await b(y,T),C()}})}),d=q(y=>{const T=y==null?void 0:y.trim();return T?qr(T)?!0:n("notification.pushKit.endpointInvalid"):n("notification.pushKit.endpointRequired")}),x=q(()=>!0);return s.jsxs(E,{children:[s.jsxs(ta,{component:"form",onSubmit:c(S),disabled:!0,sx:{".section-left":{width:"160px"}},children:[s.jsx(Q,{title:n("notification.pushKit.enable"),my:2.5,children:s.jsx(te,{name:"enabled",control:l,render:({field:y})=>s.jsx(ke,{control:s.jsx(Ct,{checked:y.value,...y})})})}),s.jsx(Q,{title:n("notification.pushKit.endpoint"),children:s.jsx(te,{name:"endpoint",control:l,rules:{validate:v?d:x},render:({field:y})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...y,size:"small",required:!0,label:n("notification.pushKit.endpoint"),error:!!u.errors[y.name],helperText:((T=u.errors[y.name])==null?void 0:T.message)||" ",disabled:!v})})}})}),s.jsxs(Q,{title:n("notification.pushKit.customOptions"),children:[s.jsx(te,{name:"did",control:l,render:({field:y})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...y,size:"small",label:n("notification.pushKit.did"),error:!!u.errors[y.name],helperText:((T=u.errors[y.name])==null?void 0:T.message)||" ",disabled:!v})})}}),s.jsx(te,{name:"pushPath",control:l,render:({field:y})=>{var T;return s.jsx(ae,{fullWidth:!0,children:s.jsx(re,{...y,size:"small",label:n("notification.pushKit.pushPath"),error:!!u.errors[y.name],helperText:((T=u.errors[y.name])==null?void 0:T.message)||" ",disabled:!v})})}})]}),s.jsxs(E,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[s.jsx(ge,{variant:"outlined",color:"warning",onClick:c(P),disabled:!v,children:n("oauth.runTest")}),s.jsx(ge,{type:"submit",variant:"contained",disabled:!u.isDirty,children:n("oauth.save")})]})]}),o]})}const ta=V(tt)``,Bn=[{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:s.jsx(E,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function na(){const[e,t]=w.useState(Bn[0].value),{locale:n}=w.useContext(ut),r=xe(()=>({email:s.jsx(Xi,{}),pushKit:s.jsx(ea,{})}),[n]),o=w.useMemo(()=>({padding:"10px 0"}),[]);return s.jsxs(E,{children:[s.jsx(pr,{tabs:Bn,current:e,onChange:t}),s.jsx(E,{style:o,children:r[e]})]})}var O=function(t,n,r){return sr.call(n,"css")?s.jsx(or,ir(t,n),r):s.jsx(t,n,r)},Ve=function(t,n,r){return sr.call(n,"css")?s.jsxs(or,ir(t,n),r):s.jsxs(t,n,r)};/**
|
|
207
|
+
* (c) Iconify
|
|
208
|
+
*
|
|
209
|
+
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
210
|
+
* files at https://github.com/iconify/iconify
|
|
211
|
+
*
|
|
212
|
+
* Licensed under MIT.
|
|
213
|
+
*
|
|
214
|
+
* @license MIT
|
|
215
|
+
* @version 3.1.1
|
|
216
|
+
*/const Fr=Object.freeze({left:0,top:0,width:16,height:16}),st=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Oe=Object.freeze({...Fr,...st}),Pt=Object.freeze({...Oe,body:"",hidden:!1});function ra(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Hn(e,t){const n=ra(e,t);for(const r in Pt)r in st?r in e&&!(r in n)&&(n[r]=st[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function sa(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function i(a){if(n[a])return o[a]=[];if(!(a in o)){o[a]=null;const c=r[a]&&r[a].parent,l=c&&i(c);l&&(o[a]=[c].concat(l))}return o[a]}return Object.keys(n).concat(Object.keys(r)).forEach(i),o}function oa(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let i={};function a(c){i=Hn(r[c]||o[c],i)}return a(t),n.forEach(a),Hn(e,i)}function ia(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=sa(e);for(const o in r){const i=r[o];i&&(t(o,oa(e,o,i)),n.push(o))}return n}const Re=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ie=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const c=o.pop(),l=o.pop(),u={provider:o.length>0?o[0]:r,prefix:l,name:c};return t&&!Je(u)?null:u}const i=o[0],a=i.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Je(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:i};return t&&!Je(c,n)?null:c}return null},Je=(e,t)=>e?!!((e.provider===""||e.provider.match(Re))&&(t&&e.prefix===""||e.prefix.match(Re))&&e.name.match(Re)):!1,aa={provider:"",aliases:{},not_found:{},...Fr};function wt(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ca(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!wt(e,aa))return null;const n=t.icons;for(const o in n){const i=n[o];if(!o.match(Re)||typeof i.body!="string"||!wt(i,Pt))return null}const r=t.aliases||Object.create(null);for(const o in r){const i=r[o],a=i.parent;if(!o.match(Re)||typeof a!="string"||!n[a]&&!r[a]||!wt(i,Pt))return null}return t}const ot=Object.create(null);function la(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function oe(e,t){const n=ot[e]||(ot[e]=Object.create(null));return n[t]||(n[t]=la(e,t))}function pn(e,t){return ca(t)?ia(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function ua(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function da(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(ot)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(ot[o]||{})).forEach(a=>{const c=oe(o,a);n=n.concat(Object.keys(c.icons).map(l=>(o!==""?"@"+o+":":"")+a+":"+l))})}),n}let mn=!1;function fa(e){return mn}function $e(e){const t=typeof e=="string"?Ie(e,!0,mn):e;if(t){const n=oe(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function pa(e,t){const n=Ie(e,!0,mn);if(!n)return!1;const r=oe(n.provider,n.prefix);return ua(r,n.name,t)}function Vr(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!Je({provider:t,prefix:n,name:"a"}))return!1;const r=oe(t,n);return!!pn(r,e)}function ma(e){return!!$e(e)}function ha(e){const t=$e(e);return t?{...Oe,...t}:null}const Wr=Object.freeze({width:null,height:null}),Kr=Object.freeze({...Wr,...st}),ga=/(-?[0-9.]*[0-9]+[0-9.]*)/g,xa=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function kt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(ga);if(r===null||!r.length)return e;const o=[];let i=r.shift(),a=xa.test(i);for(;;){if(a){const c=parseFloat(i);isNaN(c)?o.push(i):o.push(Math.ceil(c*t*n)/n)}else o.push(i);if(i=r.shift(),i===void 0)return o.join("");a=!a}}const va=e=>e==="unset"||e==="undefined"||e==="none";function dt(e,t){const n={...Oe,...e},r={...Kr,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,r].forEach(S=>{const b=[],P=S.hFlip,d=S.vFlip;let x=S.rotate;P?d?x+=2:(b.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),b.push("scale(-1 1)"),o.top=o.left=0):d&&(b.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),b.push("scale(1 -1)"),o.top=o.left=0);let g;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:g=o.height/2+o.top,b.unshift("rotate(90 "+g.toString()+" "+g.toString()+")");break;case 2:b.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:g=o.width/2+o.left,b.unshift("rotate(-90 "+g.toString()+" "+g.toString()+")");break}x%2===1&&(o.left!==o.top&&(g=o.left,o.left=o.top,o.top=g),o.width!==o.height&&(g=o.width,o.width=o.height,o.height=g)),b.length&&(i='<g transform="'+b.join(" ")+'">'+i+"</g>")});const a=r.width,c=r.height,l=o.width,u=o.height;let f,h;a===null?(h=c===null?"1em":c==="auto"?u:c,f=kt(h,l/u)):(f=a==="auto"?l:a,h=c===null?kt(f,u/l):c==="auto"?u:c);const p={},v=(S,b)=>{va(b)||(p[S]=b.toString())};return v("width",f),v("height",h),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:p,body:i}}const ya=/\sid="(\S+)"/g,ba="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ja=0;function Gr(e,t=ba){const n=[];let r;for(;r=ya.exec(e);)n.push(r[1]);if(!n.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(i=>{const a=typeof t=="function"?t(i):t+(ja++).toString(),c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const he={local:!0,session:!0},Qr={local:new Set,session:new Set};let hn=!1;function wa(e){hn=e}const qn="iconify2",Ae="iconify",Zr=Ae+"-count",Fn=Ae+"-version",Jr=36e5,Sa=168;function Lt(e,t){try{return e.getItem(t)}catch{}}function gn(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Vn(e,t){try{e.removeItem(t)}catch{}}function Dt(e,t){return gn(e,Zr,t.toString())}function At(e){return parseInt(Lt(e,Zr))||0}let We=typeof window>"u"?{}:window;function Xr(e){const t=e+"Storage";try{if(We&&We[t]&&typeof We[t].length=="number")return We[t]}catch{}he[e]=!1}function Yr(e,t){const n=Xr(e);if(!n)return;const r=Lt(n,Fn);if(r!==qn){if(r){const c=At(n);for(let l=0;l<c;l++)Vn(n,Ae+l.toString())}gn(n,Fn,qn),Dt(n,0);return}const o=Math.floor(Date.now()/Jr)-Sa,i=c=>{const l=Ae+c.toString(),u=Lt(n,l);if(typeof u=="string"){try{const f=JSON.parse(u);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>o&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&t(f,c))return!0}catch{}Vn(n,l)}};let a=At(n);for(let c=a-1;c>=0;c--)i(c)||(c===a-1?(a--,Dt(n,a)):Qr[e].add(c))}function es(){if(!hn){wa(!0);for(const e in he)Yr(e,t=>{const n=t.data,r=t.provider,o=n.prefix,i=oe(r,o);if(!pn(i,n).length)return!1;const a=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function ts(e,t){switch(e){case"local":case"session":he[e]=t;break;case"all":for(const n in he)he[n]=t;break}}const Ot=Object.create(null);function ns(e,t){Ot[e]=t}function $t(e){return Ot[e]||Ot[""]}function xn(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const ft=Object.create(null),Te=["https://api.simplesvg.com","https://api.unisvg.com"],Xe=[];for(;Te.length>0;)Te.length===1||Math.random()>.5?Xe.push(Te.shift()):Xe.push(Te.pop());ft[""]=xn({resources:["https://api.iconify.design"].concat(Xe)});function rs(e,t){const n=xn(t);return n===null?!1:(ft[e]=n,!0)}function pt(e){return ft[e]}function _a(){return Object.keys(ft)}const Ca=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let it=Ca();function Ia(e){it=e}function Ta(){return it}function Ra(e,t){const n=pt(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(a=>{o=Math.max(o,a.length)});const i=t+".json?icons=";r=n.maxURL-o-n.path.length-i.length}return r}function Ea(e){return e===404}const Pa=(e,t,n)=>{const r=[],o=Ra(e,t),i="icons";let a={type:i,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=o&&u>0&&(r.push(a),a={type:i,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function ka(e){if(typeof e=="string"){const t=pt(e);if(t)return t.path}return"/"}const La=(e,t,n)=>{if(!it){n("abort",424);return}let r=ka(t.provider);switch(t.type){case"icons":{const i=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=i+".json?"+l.toString();break}case"custom":{const i=t.uri;r+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let o=503;it(e+r).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{n(Ea(a)?"abort":"next",a)});return}return o=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",o)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",o)})},Da={prepare:Pa,send:La};function Aa(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,i)=>o.provider!==i.provider?o.provider.localeCompare(i.provider):o.prefix!==i.prefix?o.prefix.localeCompare(i.prefix):o.name.localeCompare(i.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const i=o.provider,a=o.prefix,c=o.name,l=n[i]||(n[i]=Object.create(null)),u=l[a]||(l[a]=oe(i,a));let f;c in u.icons?f=t.loaded:a===""||u.missing.has(c)?f=t.missing:f=t.pending;const h={provider:i,prefix:a,name:c};f.push(h)}),t}function ss(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function Oa(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(i=>{const a=i.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==o)return!0;const u=l.name;if(e.icons[u])a.loaded.push({provider:r,prefix:o,name:u});else if(e.missing.has(u))a.missing.push({provider:r,prefix:o,name:u});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||ss([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let $a=0;function Ma(e,t,n){const r=$a++,o=ss.bind(null,n,r);if(!t.pending.length)return o;const i={id:r,icons:t,callback:e,abort:o};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),o}function Na(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const i=typeof o=="string"?Ie(o,t,n):o;i&&r.push(i)}),r}var za={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ua(e,t,n,r){const o=e.resources.length,i=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let y=e.resources.slice(0);for(a=[];y.length>1;){const T=Math.floor(Math.random()*y.length);a.push(y[T]),y=y.slice(0,T).concat(y.slice(T+1))}a=a.concat(y)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const c=Date.now();let l="pending",u=0,f,h=null,p=[],v=[];typeof r=="function"&&v.push(r);function S(){h&&(clearTimeout(h),h=null)}function b(){l==="pending"&&(l="aborted"),S(),p.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),p=[]}function P(y,T){T&&(v=[]),typeof y=="function"&&v.push(y)}function d(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:p.length,subscribe:P,abort:b}}function x(){l="failed",v.forEach(y=>{y(void 0,f)})}function g(){p.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),p=[]}function k(y,T,C){const I=T!=="success";switch(p=p.filter(m=>m!==y),l){case"pending":break;case"failed":if(I||!e.dataAfterTimeout)return;break;default:return}if(T==="abort"){f=C,x();return}if(I){f=C,p.length||(a.length?L():x());return}if(S(),g(),!e.random){const m=e.resources.indexOf(y.resource);m!==-1&&m!==e.index&&(e.index=m)}l="completed",v.forEach(m=>{m(C)})}function L(){if(l!=="pending")return;S();const y=a.shift();if(y===void 0){if(p.length){h=setTimeout(()=>{S(),l==="pending"&&(g(),x())},e.timeout);return}x();return}const T={status:"pending",resource:y,callback:(C,I)=>{k(T,C,I)}};p.push(T),u++,h=setTimeout(L,e.rotate),n(y,t,T.callback)}return setTimeout(L),d}function os(e){const t={...za,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function o(c,l,u){const f=Ua(t,c,l,(h,p)=>{r(),u&&u(h,p)});return n.push(f),f}function i(c){return n.find(l=>c(l))||null}return{query:o,find:i,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Wn(){}const St=Object.create(null);function Ba(e){if(!St[e]){const t=pt(e);if(!t)return;const n=os(t),r={config:t,redundancy:n};St[e]=r}return St[e]}function is(e,t,n){let r,o;if(typeof e=="string"){const i=$t(e);if(!i)return n(void 0,424),Wn;o=i.send;const a=Ba(e);a&&(r=a.redundancy)}else{const i=xn(e);if(i){r=os(i);const a=e.resources?e.resources[0]:"",c=$t(a);c&&(o=c.send)}}return!r||!o?(n(void 0,424),Wn):r.query(t,o,n)().abort}function Ha(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in he)Yr(r,o=>{const i=o.data;return o.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function qa(e,t){hn||es();function n(r){let o;if(!he[r]||!(o=Xr(r)))return;const i=Qr[r];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=At(o),!Dt(o,a+1))return;const c={cached:Math.floor(Date.now()/Jr),provider:e.provider,data:t};return gn(o,Ae+a.toString(),JSON.stringify(c))}t.lastModified&&!Ha(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Kn(){}function Fa(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Oa(e)}))}function Va(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let i;if(!o||!(i=$t(n)))return;i.prepare(n,r,o).forEach(c=>{is(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=pn(e,l);if(!u.length)return;const f=e.pendingIcons;f&&u.forEach(h=>{f.delete(h)}),qa(e,l)}catch(u){console.error(u)}Fa(e)})})}))}const Wa=e=>{const n=oe(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},vn=(e,t)=>{const n=Na(e,!0,fa()),r=Aa(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,Kn)}),()=>{l=!1}}const o=Object.create(null),i=[];let a,c;return r.pending.forEach(l=>{const{provider:u,prefix:f}=l;if(f===c&&u===a)return;a=u,c=f,i.push(oe(u,f));const h=o[u]||(o[u]=Object.create(null));h[f]||(h[f]=[])}),r.pending.forEach(l=>{const{provider:u,prefix:f,name:h}=l,p=oe(u,f),v=p.pendingIcons||(p.pendingIcons=new Set);v.has(h)||(v.add(h),o[u][f].push(h))}),i.forEach(l=>{const{provider:u,prefix:f}=l;o[u][f].length&&Va(l,o[u][f])}),t?Ma(t,r,i):Kn},Ka=e=>new Promise((t,n)=>{const r=typeof e=="string"?Ie(e,!0):e;if(!r){n(e);return}vn([r||e],o=>{if(o.length&&r){const i=$e(r);if(i){t({...Oe,...i});return}}n(e)})});function as(e,t){const n={...e};for(const r in t){const o=t[r],i=typeof o;r in Wr?(o===null||o&&(i==="string"||i==="number"))&&(n[r]=o):i===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const mt={...Kr,inline:!1},_t="iconify",Mt="iconify-inline",ue="iconifyData"+Date.now();let ve=[];function Me(e){for(let t=0;t<ve.length;t++){const n=ve[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function cs(e,t=!1){let n=Me(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},ve.push(n),n)}function Ga(){if(document.documentElement)return cs(document.documentElement);ve.push({node:()=>document.documentElement})}function Qa(e){ve=ve.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function Ne(){return ve}function Za(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let Ee=null;const Ja={childList:!0,subtree:!0,attributes:!0};function ls(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,Ee&&Ee(e)}))}function Xa(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let r=0;r<t.length;r++){const o=t[r];if(o.addedNodes&&o.addedNodes.length>0||o.type==="attributes"&&o.target[ue]!==void 0){n.paused||ls(e);return}}}function us(e,t){e.observer.instance.observe(t,Ja)}function at(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(Xa.bind(null,e)),us(e,n),t.paused||ls(e))}function Gn(){Ne().forEach(at)}function ds(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function Ya(e){const t=Ee!==null;if(Ee!==e&&(Ee=e,t&&Ne().forEach(ds)),t){Gn();return}Za(Gn)}function Nt(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function ec(e){if(e){const t=Me(e);t&&Nt(t)}else Nt()}function zt(e){(e?[e]:Ne()).forEach(t=>{if(!t.observer){at(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const r=typeof t.node=="function"?t.node():t.node;if(r)n.instance?us(t,r):at(t);else return}})}function tc(e){if(e){const t=Me(e);t&&zt(t)}else zt()}function fs(e,t=!1){const n=cs(e,t);return at(n),n}function ps(e){const t=Me(e);t&&(ds(t),Qa(e))}function nc(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,r=t.customisations;for(const o in mt)if(n[o]!==r[o])return!0;return!1}function rc(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/o,i%1===0?r(i):0)}}return t}const sc=/[\s,]+/;function oc(e,t){t.split(sc).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const ic=["width","height"],ac=["inline","hFlip","vFlip"];function cc(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function lc(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&Ie(t,!0);if(!n)return null;const r={...mt,inline:e.classList&&e.classList.contains(Mt)};ic.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(r[c]=l)});const o=e.getAttribute("data-rotate");typeof o=="string"&&(r.rotate=rc(o));const i=e.getAttribute("data-flip");typeof i=="string"&&oc(r,i),ac.forEach(c=>{const l="data-"+c,u=cc(e.getAttribute(l),l);typeof u=="boolean"&&(r[c]=u)});const a=e.getAttribute("data-mode");return{name:t,icon:n,customisations:r,mode:a}}const uc="svg."+_t+", i."+_t+", span."+_t+", i."+Mt+", span."+Mt;function dc(e){const t=[];return e.querySelectorAll(uc).forEach(n=>{const r=n[ue]||n.tagName.toLowerCase()!=="svg"?lc(n):null;r&&t.push({node:n,props:r})}),t}function ms(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let Pe;function fc(){try{Pe=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Pe=null}}function pc(e){return Pe===void 0&&fc(),Pe?Pe.createHTML(e):e}function hs(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function gs(e,t,n,r){const o=e.classList;if(r){const a=r.classList;Array.from(a).forEach(c=>{o.add(c)})}const i=[];return t.forEach(a=>{o.contains(a)?n.has(a)&&i.push(a):(o.add(a),i.push(a))}),n.forEach(a=>{t.has(a)||o.remove(a)}),i}function xs(e,t,n){const r=e.style;(n||[]).forEach(i=>{r.removeProperty(i)});const o=[];for(const i in t)r.getPropertyValue(i)||(o.push(i),r.setProperty(i,t[i]));return o}function vs(e,t,n){let r;try{r=document.createElement("span")}catch{return e}const o=t.customisations,i=dt(n,o),a=e[ue],c=ms(Gr(i.body),{"aria-hidden":"true",role:"img",...i.attributes});r.innerHTML=pc(c);const l=r.childNodes[0],u=e.attributes;for(let S=0;S<u.length;S++){const b=u.item(S),P=b.name;P!=="class"&&!l.hasAttribute(P)&&l.setAttribute(P,b.value)}const f=hs(t.icon),h=gs(l,f,new Set(a&&a.addedClasses),e),p=xs(l,o.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),v={...t,status:"loaded",addedClasses:h,addedStyles:p};return l[ue]=v,e.parentNode&&e.parentNode.replaceChild(l,e),l}function mc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function hc(e){return"data:image/svg+xml,"+mc(e)}function gc(e){return'url("'+hc(e)+'")'}const xc={display:"inline-block"},Ut={"background-color":"currentColor"},ys={"background-color":"transparent"},Qn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Zn={"-webkit-mask":Ut,mask:Ut,background:ys};for(const e in Zn){const t=Zn[e];for(const n in Qn)t[e+"-"+n]=Qn[n]}function Jn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function vc(e,t,n,r){const o=t.customisations,i=dt(n,o),a=i.attributes,c=e[ue],l=ms(i.body,{...a,width:n.width+"",height:n.height+""}),u=hs(t.icon),f=gs(e,u,new Set(c&&c.addedClasses)),p={"--svg":gc(l),width:Jn(a.width),height:Jn(a.height),...xc,...r?Ut:ys};o.inline&&(p["vertical-align"]="-0.125em");const v=xs(e,p,c&&c.addedStyles),S={...t,status:"loaded",addedClasses:f,addedStyles:v};return e[ue]=S,e}let Ke=!1;function yc(){Ke||(Ke=!0,setTimeout(()=>{Ke&&(Ke=!1,Se())}))}function Se(e,t=!1){const n=Object.create(null);function r(o,i){const{provider:a,prefix:c,name:l}=o,u=oe(a,c),f=u.icons[l];if(f)return{status:"loaded",icon:f};if(u.missing.has(l))return{status:"missing"};if(i&&!Wa(o)){const h=n[a]||(n[a]=Object.create(null));(h[c]||(h[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:Ne()).forEach(o=>{const i=typeof o.node=="function"?o.node():o.node;if(!i||!i.querySelectorAll)return;let a=!1,c=!1;function l(u,f,h){if(c||(c=!0,Nt(o)),u.tagName.toUpperCase()!=="SVG"){const p=f.mode,v=p==="mask"||(p==="bg"?!1:p==="style"?h.body.indexOf("currentColor")!==-1:null);if(typeof v=="boolean"){vc(u,f,{...Oe,...h},v);return}}vs(u,f,h)}dc(i).forEach(({node:u,props:f})=>{const h=u[ue];if(!h){const{status:v,icon:S}=r(f.icon,!0);if(S){l(u,f,S);return}a=a||v==="loading",u[ue]={...f,status:v};return}let p;if(nc(h,f)){if(p=r(f.icon,h.name!==f.name),!p.icon){a=a||p.status==="loading",Object.assign(h,{...f,status:p.status});return}}else{if(h.status!=="loading")return;if(p=r(f.icon,!1),!p.icon){h.status=p.status;return}}l(u,f,p.icon)}),o.temporary&&!a?ps(i):t&&a?fs(i,!0):c&&o.observer&&zt(o)});for(const o in n){const i=n[o];for(const a in i){const c=i[a];vn(Array.from(c).map(l=>({provider:o,prefix:a,name:l})),yc)}}}function bc(e){const t=Me(e);t?Se(t):Se({node:e,temporary:!0},!0)}function bs(e,t,n=!1){const r=$e(e);if(!r)return null;const o=Ie(e),i=as(mt,t||{}),a=vs(document.createElement("span"),{name:e,icon:o,customisations:i},r);return n?a.outerHTML:a}function jc(){return"3.1.1"}function wc(e,t){return bs(e,t,!1)}function Sc(e,t){return bs(e,t,!0)}function _c(e,t){const n=$e(e);if(!n)return null;const r=as(mt,t||{});return dt(n,r)}function Cc(e){e?bc(e):Se()}if(typeof document<"u"&&typeof window<"u"){Ga();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Vr(r))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{Ya(Se),Se()})}function Ic(e,t){ts(e,t!==!1)}function Tc(e){ts(e,!0)}ns("",Da);if(typeof document<"u"&&typeof window<"u"){es();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const r="IconifyProviders["+n+"] is invalid.";try{const o=t[n];if(typeof o!="object"||!o||o.resources===void 0)continue;rs(n,o)||console.error(r)}catch{console.error(r)}}}}const Rc={getAPIConfig:pt,setAPIModule:ns,sendAPIQuery:is,setFetch:Ia,getFetch:Ta,listAPIProviders:_a},Ec={_api:Rc,addAPIProvider:rs,loadIcons:vn,loadIcon:Ka,iconExists:ma,getIcon:ha,listIcons:da,addIcon:pa,addCollection:Vr,replaceIDs:Gr,calculateSize:kt,buildIcon:dt,getVersion:jc,renderSVG:wc,renderHTML:Sc,renderIcon:_c,scan:Cc,observe:fs,stopObserving:ps,pauseObserver:ec,resumeObserver:tc,enableCache:Ic,disableCache:Tc};try{self.Iconify===void 0&&(self.Iconify=Ec)}catch{}var yn={},Pc=Z;Object.defineProperty(yn,"__esModule",{value:!0});var js=yn.default=void 0,kc=Pc(J()),Lc=s;js=yn.default=(0,kc.default)((0,Lc.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 bn({infos:e}){const{t}=W(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(o=>{n.searchParams.set(o.label,o.value)});const r=e.map(o=>`* ${o.label}: ${o.value}`).join(`
|
|
217
|
+
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
<!--
|
|
222
|
+
[Server Info]
|
|
223
|
+
${r}
|
|
224
|
+
* Page: ${window.location.href}
|
|
225
|
+
-->
|
|
226
|
+
`),O(E,{sx:{mx:{xs:0,md:2}},children:O(qt,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}bn.propTypes={infos:j.arrayOf(j.shape({label:j.string,value:j.string}))};bn.defaultProps={infos:[]};var jn={},Dc=Z;Object.defineProperty(jn,"__esModule",{value:!0});var Bt=jn.default=void 0,Ac=Dc(J()),Xn=s;Bt=jn.default=(0,Ac.default)([(0,Xn.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,Xn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ce({children:e}){return se(n=>n.breakpoints.down("md"))?s.jsx(Le,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:s.jsx(E,{sx:{display:"flex",alignItems:"center",gap:1},children:s.jsx(Bt,{fontSize:"small"})})}):s.jsxs(E,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.jsx(Bt,{fontSize:"small"}),e]})}ce.propTypes={children:j.node.isRequired};const Oc="https://launcher.arcblock.io/",$c=30*24*60*60*1e3;function wn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var L,y,T,C,I,m;const{t:i,locale:a}=W(),c=_e(),[l,u]=Sr({safeIframeRef:null,popoverAnchorEl:null}),f=w.useRef(null),h=se(_=>_.breakpoints.down("md")),{sx:p={},...v}=o,S=h?"mobile":"desktop",b=wr(async()=>{const[_,A]=await Promise.all([c.api.getLauncherSession({input:{launcherSessionId:r,launcherUrl:e}}),hr({launcherUrl:e||Oc,nftDid:n,launcherSessionId:r,locale:a})]);if(_!=null&&_.error)throw new Error(_.error);return{launcherSession:_.launcherSession,subscriptionURL:A}},[a]);if(b.loading)return s.jsx(me,{label:s.jsxs(ce,{children:[!h&&i("expiration.desktop.loading"),s.jsx(le,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(b.error)return console.error(b.error),s.jsx(me,{label:s.jsx(ce,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>b.retry()});const P=_=>{u({popoverAnchorEl:_.currentTarget})},d=()=>{u({popoverAnchorEl:null})},x=(L=b.value)==null?void 0:L.launcherSession;let g="success";[U.LAUNCH_SESSION_STATUS.overdue,U.LAUNCH_SESSION_STATUS.canceled,U.LAUNCH_SESSION_STATUS.terminated].includes((T=(y=b.value)==null?void 0:y.launcherSession)==null?void 0:T.status)&&(g="error");let k=null;if(x.expirationDate&&!x.subscription){const _=je(x.expirationDate).diff(je(),"ms");k=i(`expiration.${S}.tips.${g}`,{validity:jr(_,{locale:gr(a),compact:!0,verbose:!0})}),_>0&&_<=$c&&(g="warning")}return s.jsxs(s.Fragment,{children:[s.jsx(me,{label:s.jsx(ce,{children:k||((I=(C=x==null?void 0:x.subscription)==null?void 0:C.product)==null?void 0:I.name)||i("common.subscription")}),color:g,variant:g!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:P}),s.jsx(ar,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:d,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(m=b.value)==null?void 0:m.subscriptionURL})})})]})}wn.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};wn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Mc=30*24*60*60*1e3,Nc="https://launcher.arcblock.io/";function Sn({launcherUrl:e,chainHost:t,nftId:n,launcherSessionId:r,...o}){var y,T,C,I,m,_,A;const{t:i,locale:a}=W(),[c,l]=Sr({safeIframeRef:null,popoverAnchorEl:null}),u=w.useRef(null),f=se(D=>D.breakpoints.down("md")),h=_e(),{sx:p={},...v}=o,S=f?"mobile":"desktop",b=wr(async()=>{const[D,H]=await Promise.all([h.api.getLauncherSession({input:{launcherSessionId:r||n,launcherUrl:e}}),hr({launcherUrl:e||Nc,nftDid:n,launcherSessionId:r,locale:a})]);if(D!=null&&D.error)throw new Error(D.error);return{launcherSession:D.launcherSession,subscriptionURL:H}},[a]);if(b.loading)return s.jsx(me,{label:s.jsxs(ce,{children:[!f&&i("expiration.desktop.loading"),s.jsx(le,{size:16})]}),variant:"success",sx:{cursor:"pointer",...p},...v});if(b.error)return console.error(b.error),s.jsx(me,{label:s.jsx(ce,{children:i(`expiration.${S}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...p},...v,onClick:()=>b.retry()});const P=(T=(y=b.value)==null?void 0:y.launcherSession)==null?void 0:T.expirationDate,d=je(P).isBefore(je()),x=je(P).diff(je(),"ms");let g="success";x<=Mc&&(g="warning"),d&&(g="error");const k=D=>{l({popoverAnchorEl:D.currentTarget})},L=()=>{l({popoverAnchorEl:null})};return s.jsxs(s.Fragment,{children:[((I=(C=b.value)==null?void 0:C.launcherSession)==null?void 0:I.subscription)&&s.jsx(me,{label:s.jsx(ce,{children:i("expiration.desktop.nextInvoice",{date:bo(P,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...p},...v,onClick:k}),!((_=(m=b.value)==null?void 0:m.launcherSession)!=null&&_.subscription)&&s.jsx(me,{label:s.jsx(ce,{children:i(`expiration.${S}.tips.${g}`,{validity:jr(x,{locale:gr(a),compact:!0,verbose:!0})})}),color:g,variant:g!=="success"?"contained":"outlined",sx:{cursor:"pointer",...p},...v,onClick:k}),s.jsx(ar,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:L,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:s.jsx(E,{sx:{width:{xs:"360px",md:"450px"}},children:s.jsx("iframe",{ref:u,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(A=b.value)==null?void 0:A.subscriptionURL})})})]})}Sn.propTypes={chainHost:j.string.isRequired,nftId:j.string,launcherSessionId:j.string,sx:j.object,retention:j.number,launcherUrl:j.string.isRequired};Sn.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var _n={},zc=Z;Object.defineProperty(_n,"__esModule",{value:!0});var ws=_n.default=void 0,Uc=zc(J()),Bc=s;ws=_n.default=(0,Uc.default)((0,Bc.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Cn={},Hc=Z;Object.defineProperty(Cn,"__esModule",{value:!0});var Ss=Cn.default=void 0,qc=Hc(J()),Fc=s;Ss=Cn.default=(0,qc.default)((0,Fc.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");const Vc={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function In({children:e,style:t,...n}){return s.jsx(uo,{style:t,...n,children:e})}In.propTypes={children:j.any.isRequired,style:j.object};In.defaultProps={style:{}};const z={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},Ye={added:z.grey,waiting:z.yellow,downloading:z.yellow,extracting:z.yellow,downloaded:z.grey,installing:z.yellow,installed:z.grey,starting:z.yellow,running:z.running,stopping:z.yellow,stopped:z.reverse,error:z.error,upgrading:z.yellow,restarting:z.yellow,corrupted:z.error,deleting:z.yellow,resource:z.primary},Wc={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 _s({isResource:e,status:t,variant:n,source:r,progress:o,...i}){const{t:a}=w.useContext(ut),c=F.isInProgress(t),l=e&&t==="stopped"?"resource":t,u=a(`blocklet.status.${l}`);return n==="pin"?s.jsx(Le,{title:a("blocklet.statusTip",{status:u}),children:s.jsxs(E,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[s.jsx(E,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Ye[l],style:{opacity:.15}}),s.jsx(E,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Ye[l]})]})}):n==="dot"?s.jsx(Le,{title:a("blocklet.statusTip",{status:u}),children:s.jsx(Vo,{color:Ye[l],...i})}):s.jsxs(In,{type:Wc[l],...i,children:[c&&s.jsx(le,{size:12,color:"inherit",style:{marginRight:5}}),u,l==="downloading"&&o?s.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}_s.propTypes={status:j.string.isRequired,variant:j.oneOf(["dot","tag","pin"]),source:j.string,progress:j.number,isResource:j.bool};_s.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function Kc(){const{inFullPage:e,toggleFullPage:t}=Ms();return O(ct,{onClick:t,children:e?O(Ss,{sx:{transform:"scale(1.3)"}}):O(ws,{sx:{transform:"scale(1.3)"}})})}function Tn({children:e}){var P;const{t}=W(),{loading:n,error:r,actions:{refreshBlocklet:o},env:i,blocklet:a}=Ce(),{info:c}=jo(),l=no(),u=se(d=>d.breakpoints.down("md")),{appId:f,version:h}=i,p=[{label:"App ID",value:f},{label:"App Version",value:h},{label:"App Bundle Name",value:(P=a==null?void 0:a.meta)==null?void 0:P.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],v=d=>{var g,k,L,y;const x=Array.isArray(d)?d:[d];if(u||x.unshift(O(Kc,{})),a){const T={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};wo(a)?x.unshift(O(wn,{chainHost:(g=a==null?void 0:a.controller)==null?void 0:g.chainHost,nftId:(k=a==null?void 0:a.controller)==null?void 0:k.nftId,launcherSessionId:(L=a==null?void 0:a.controller)==null?void 0:L.launcherSessionId,launcherUrl:(y=a==null?void 0:a.controller)==null?void 0:y.launcherUrl,sx:T})):c.ownerNft&&c.launcher&&x.unshift(O(Sn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:T}))}return x},S=qo({blocklet:a}),b={logo:S?O("img",{src:S,alt:"logo"}):null,brandAddon:O(E,{children:a&&Ve(E,{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:[O(Le,{title:F.isRunning(a==null?void 0:a.status)?void 0:t(`blocklet.status.${a==null?void 0:a.status}`),children:O(E,{sx:{width:8,height:8,borderRadius:"50%"},bgcolor:Ye[a==null?void 0:a.status]})}),O(E,{sx:{lineHeight:1,color:"text.secondary",maxWidth:u?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.getDisplayName(a)}),O(E,{component:fo,icon:Vc,sx:{color:"text.secondary"}})]})})};return Ve(Gc,{legacy:!1,fullWidth:!0,headerAddons:v,headerProps:b,footerProps:{addon:O(bn,{infos:p})},children:[!a&&n&&O(nt,{relative:"parent",children:O(le,{})}),!a&&r&&Ve(nt,{relative:"parent",children:[Ve(E,{display:"flex",alignItems:"center",children:[O(js,{color:"error",sx:{marginRight:1}}),Kt(r)]}),O(ge,{onClick:()=>o(),children:O("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!a&&O(E,{flex:1,padding:u?2:3,display:"flex",flexDirection:"column",children:O(po,{FallbackComponent:$s,resetKeys:[l.pathname],children:e})})]})}Tn.propTypes={children:j.any};Tn.defaultProps={children:null};const Gc=V(Os)`
|
|
227
|
+
div.dashboard-content {
|
|
228
|
+
padding: 0;
|
|
229
|
+
}
|
|
230
|
+
.header-addons .locales {
|
|
231
|
+
max-height: 400px;
|
|
232
|
+
overflow-y: auto;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.header-brand-addon {
|
|
236
|
+
display: block;
|
|
237
|
+
}
|
|
238
|
+
`;function Qc(){var P;const{t:e,locale:t}=W(),{blocklet:n,launcherSession:r,refreshSubscription:o}=Ce(),{connectApi:i,session:a,api:c}=So(),[l,u]=w.useState(!1),[f,h]=w.useState(""),[p,v]=No({subscriptionURL:"#"});if(w.useEffect(()=>{var d,x;Ln(n,r)&&_o({launcherSessionId:(d=n==null?void 0:n.controller)==null?void 0:d.launcherSessionId,launcherUrl:(x=n==null?void 0:n.controller)==null?void 0:x.launcherUrl,locale:t}).then(g=>{v({subscriptionURL:g})}).catch(g=>{console.error("get subscription url error:",g)})},[n,r]),w.useEffect(()=>{var d;if((d=n.controller)!=null&&d.launcherUrl){const x=we(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(x).then(g=>g.json()).then(g=>{var y,T;const k=(T=(y=g.componentMountPoints)==null?void 0:y.find(C=>C.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk"))==null?void 0:T.mountPoint,L=we(n.controller.launcherUrl,k);h(L)})}},[(P=n.controller)==null?void 0:P.launcherUrl]),!Dn(r)&&(!n||!r||!Co(n)||r.status===U.LAUNCH_SESSION_STATUS.installed))return"";let S=null,b="";return Dn(r)?(S=s.jsx(eo,{onClick:()=>u(!0),children:e("blocklet.paynow")}),b=e("blocklet.suspendedCausedByExpired",{deadline:xt(r==null?void 0:r.reservedUntil,t)})):Ln(n,r)?(S=s.jsx(qt,{href:p.subscriptionURL,children:e("blocklet.manageSubscription")}),b=e("blocklet.suspendedCausedByExpired",{deadline:xt(r==null?void 0:r.reservedUntil,t)})):Io(n,r)&&(S=s.jsx(cr,{to:we(U.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),b=e("blocklet.suspendedCausedByTerminated",{canceledAt:xt(r==null?void 0:r.terminatedAt,t),deadline:To(r==null?void 0:r.terminatedAt,t)})),s.jsxs(E,{component:mo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l&&f&&r&&s.jsx(Ro,{session:a,connect:i,baseUrl:f,authToken:r.subscription.authToken,children:s.jsx(Eo,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})}),b,s.jsx(B,{component:"span",sx:{marginLeft:"4px"},children:S})]})}const Cs=w.createContext({});function Vl(){return w.useContext(Cs)}const{Provider:Zc,Consumer:Wl}=Cs,{did:ee,appId:Jc}=window.env;function Xc({children:e}){var y,T;const{t,locale:n}=W(),{blocklet:r}=Ce(),[o,i]=w.useState([]),[a,c]=w.useState([]),[l,u]=w.useState([]),f=F.getDisplayName(r),h=((y=((r==null?void 0:r.environments)||[]).find(C=>C.key===pe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:y.value)||"auto",p=(r==null?void 0:r.trustedPassports)||[],v=(r==null?void 0:r.trustedFactories)||[],S=(r==null?void 0:r.enablePassportIssuance)!==!1,b=async()=>{try{const C=await qe.doBatchQuery({getRoles:{input:{teamDid:ee}},getPermissions:{input:{teamDid:ee}},getInvitations:{input:{teamDid:ee}}}),I=(C.getRoles.roles||[]).filter(m=>!U.RBAC_CONFIG.roles.some(_=>_.name===m.name&&(!_.passport||_.ci))).map(m=>(m.hasDescription=!!m.description,m.hasDescription||(m.description=t("team.passport.description",{teamName:f,title:m.title})),m));c($o(I,[m=>Po(m.name)],["desc"])),u(C.getPermissions.permissions||[]),i(C.getInvitations.invitations||[])}catch(C){N.error(C.message)}},P=({did:C}={})=>{const I={teamDid:ee,user:{did:C}};return qe.getUser({input:I})},d=({query:C,paging:I}={})=>{const m={teamDid:ee};return I&&(m.paging=I),C&&(m.query=C),m.sort={lastLoginAt:-1},qe.getUsers({input:m})},x=()=>qe.getUsersCountPerRole({input:{teamDid:ee}}),g=()=>b();w.useEffect(()=>{var C;(C=r==null?void 0:r.meta)!=null&&C.did&&b()},[(T=r==null?void 0:r.meta)==null?void 0:T.did]),w.useEffect(()=>{c(C=>C.map(I=>(I.hasDescription||(I.description=t("team.passport.description",{teamName:f,title:I.title})),{...I})))},[t,n]);const k=C=>{C.teamDid===ee&&b()};Ge(pe.TeamEvents.userAdded,k,[ee]),Ge(pe.TeamEvents.userRemoved,k,[ee]),Ge(pe.TeamEvents.userUpdated,k,[ee]);const L={teamDid:ee,teamIssuerDid:Jc,teamName:f,invitations:o,roles:a,permissions:l,trustedPassports:p,trustedFactories:v,isNodeTeam:!1,enablePassportIssuance:S,refresh:g,passportColor:h,endpoint:window.location.origin,blocklet:r,api:{getUser:P,getUsers:d,getUsersCountPerRole:x}};return s.jsx(Zc,{value:L,children:e})}const Yc=w.lazy(()=>$(()=>import("./log-CL673QLU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),el=w.lazy(()=>$(()=>import("./index-D9eW5l3E.js"),__vite__mapDeps([15,2,1,5,4,6,7,8,10,16,9,11,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,3,40,41,42,43,44,45,46]))),tl=w.lazy(()=>$(()=>import("./index-DAer_mWn.js"),__vite__mapDeps([47,4,2,5,1,6,7,8,43,9,10,11,48,33,29,37,38,3,40,41,24,42,44,30,45,46]))),nl=w.lazy(()=>$(()=>import("./index-BUrD6xiH.js"),__vite__mapDeps([49,2,1,9,10,4,5,6,7,8,11,50,33,29,24,22,51,13,39,52,12,25,53,45,54,55,56,57,27,32,58,59,60,61,62,63,41,64,65,66,67]))),rl=w.lazy(()=>$(()=>import("./overview-Ds0WiSnv.js"),__vite__mapDeps([68,1,2,4,5,6,7,8,10,43,69,42,24,9,11,31,44,30,22,70,71,72,56,3,33,29,40,41,45,46]))),sl=w.lazy(()=>$(()=>import("./domains-Cn_DfzNS.js"),__vite__mapDeps([73,2,4,5,1,6,7,8,9,10,11,74,48,23,24,44,30,33,29,37,38,63,25,75,45,43,31,76]))),ol=w.lazy(()=>$(()=>import("./index-2eL6Ndgh.js"),__vite__mapDeps([77,2,6,5,1,4,7,8,9,10,11,22,78,17,18,19,20,21,34,35,23,24,79,80,81,33,29,52,45,82,3,40,41,42,43,44,30,46]))),il=w.lazy(()=>$(()=>import("./appearance-rlMOco_Q.js"),__vite__mapDeps([83,5,2,4,1,6,7,8,9,10,11]))),al=w.lazy(()=>$(()=>import("./audit-logs-BpacJ0mq.js"),__vite__mapDeps([84,4,2,5,1,6,7,8,34,35,3,9,10,11,65,66,43,85,42,24,39,67,33,29,40,41,44,30,45,46]))),cl=w.lazy(()=>$(()=>import("./index-B9lBWxnt.js"),__vite__mapDeps([86,2,1,5,4,6,7,8,9,10,11,39,31,87,55,13,42,24,85,43,36,76,17,18,19,20,21,34,35,22,88,44,30,89,90,91,57,92,29,27,28,3,33,40,41,45,46]))),ll=w.lazy(()=>$(()=>import("./config-navigation-BZ3T8tYK.js"),__vite__mapDeps([93,2,4,5,1,6,7,8,71,80,10,94,9,11,95,96,64,56,42,24,58,59,89,29,3,33,40,41,43,44,30,45,46]))),ul=w.lazy(()=>$(()=>import("./index-Bco7nZ5q.js"),__vite__mapDeps([97,1,2,6,5,10,4,7,8,9,11,98,56,99,100,72,32,29,31,101,38,41,102,52,3,33,40,24,42,43,44,30,45,46]))),dl=w.lazy(()=>$(()=>import("./index-CVKN_Jn1.js"),__vite__mapDeps([103,4,2,5,1,6,7,8,9,10,11,102,69,31,35,98,3,33,29,40,41,24,42,43,44,30,45,46]))),fl=w.lazy(()=>$(()=>import("./security-CHs7ENbZ.js"),__vite__mapDeps([104,4,2,5,1,6,7,8,9,10,11,96,105,98,3,33,29,40,41,24,42,43,44,30,45,46]))),pl=w.lazy(()=>$(()=>import("./branding-3E94pu9e.js"),__vite__mapDeps([106,2,1,4,5,6,7,8,10,62,107,54,81,64,9,11,23,24,42,3,33,29,40,41,43,44,30,45,46]))),ml=w.lazy(()=>$(()=>import("./advanced-CjSPlkxp.js"),__vite__mapDeps([108,2,1,9,10,4,5,6,7,8,11,23,24,33,29,45,25,31,22,70,71,3,40,41,42,43,44,30,46]))),hl=w.lazy(()=>$(()=>import("./traffic-Dbf1L1c0.js").then(e=>e.t),__vite__mapDeps([88,2,9,1,10,4,5,6,7,8,11,44,30,89,90,91,57,92,29,27,28]))),gl=w.lazy(()=>$(()=>import("./runtime-nJVx0iKJ.js"),__vite__mapDeps([109,2,1,42,6,5,4,7,8,24,10,9,11,101,13,3,33,29,40,41,43,44,30,45,46]))),xl=w.lazy(()=>$(()=>import("./index-DHIWtN6I.js"),__vite__mapDeps([110,2,4,5,1,6,7,8,78,17,10,18,19,20,21,22,34,35,9,11,26,27,28,33,29,25,63,111,23,24,13,3,40,41,42,43,44,30,45,46]))),vl=w.lazy(()=>$(()=>import("./component-DG-t6Jac.js"),__vite__mapDeps([112,1,2,5,4,6,7,8,10,9,11,113,102,23,24,111,95,92,59,25,57,91,64,29,114,60,61,62,32,63,33,41,22,115,116,100,72,56,107,54,117,79,80,65,66,94,31,3,75,98,118,99,119,82,43,89,13,40,37,38,42,44,30,45,46]))),yl=w.lazy(()=>$(()=>import("./index-M6peJL7s.js"),__vite__mapDeps([120,1,2,9,10,4,5,6,7,8,11]))),bl=we(U.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),jl=e=>{const{enqueueSnackbar:t}=dr(),n=w.useCallback(r=>vr(bl,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Ge(`${e}/${U.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:i,description:a}=r||{},c=["error","warning"].includes(i)||r.sticky;r.source==="system"&&t(a,{variant:i,autoHideDuration:c?null:5e3,content:l=>s.jsx(Ri,{viewAllUrl:o,keyId:l,notification:r,content:s.jsx(Vi,{notification:r,minimal:!0,rows:0})})})},[],"user")};function Is({blocklet:e,isAdmin:t}){const[n,r]=w.useState(!1),{t:o}=W(),i=_r();return t?s.jsxs(s.Fragment,{children:[s.jsx(cl,{blocklet:e,customTableButtons:[s.jsxs(E,{display:"flex",alignItems:"center",gap:1.5,children:[s.jsx(ct,{onClick:()=>r(!0),sx:{p:i?0:void 0},children:s.jsx(Yt,{})},"settings"),i?s.jsx(B,{children:o("common.setting")}):null]})]}),s.jsx(go,{title:`${o("common.notification")} ${o("common.setting")}`,fullWidth:!0,maxWidth:"md",open:n,onClose:()=>r(!1),PaperProps:{style:{minHeight:"500px"}},children:s.jsx(E,{sx:{mt:"-16px",overflowY:"hidden"},children:s.jsx(na,{})})})]}):s.jsx(zs,{status:403})}Is.propTypes={blocklet:j.object.isRequired,isAdmin:j.bool.isRequired};const wl=e=>{var f,h;const{t}=W(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:i}=Ce(),a=(f=n==null?void 0:n.meta)==null?void 0:f.did,c=!n||vt(n.status)?[]:F.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:s.jsx(to,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding",show:!vt(n==null?void 0:n.status)},{label:t("common.theming"),value:"theming",show:!vt(n==null?void 0:n.status)},{label:t("common.navigation"),value:"navigation"},{label:t("common.sitemap"),value:"sitemap"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"}],developers:[{label:t("common.logs"),value:"logs",show:((h=n==null?void 0:n.children)==null?void 0:h.length)&&n.structVersion===U.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:rl,components:vl,members:s.jsx(el,{type:"blocklet",createPassportSvg:An}),passports:s.jsx(ol,{createPassportSvg:An}),settings:s.jsx(dl,{orientation:"vertical"}),security:s.jsx(fl,{}),"did-spaces":s.jsx(ul,{navOrientation:"horizontal"}),domains:sl,branding:s.jsx(pl,{blocklet:n,onUpdate:r}),theming:s.jsx(il,{}),navigation:ll,sitemap:s.jsx(ho,{children:t("common.comingSoon")}),notifications:s.jsx(Is,{blocklet:n,isAdmin:e}),"audit-logs":s.jsx(al,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:s.jsx(hl,{client:o,did:i}),advanced:s.jsx(ml,{blocklet:n,onUpdate:r}),webhooks:s.jsx(tl,{}),"access-keys":s.jsx(xl,{}),logs:Yc,performance:s.jsx(gl,{client:o,did:i}),docs:yl,publish:s.jsx(nl,{})};return{tabGroups:l,renders:u}};function Sl(){var d,x;const e=lr(),{tab:t="overview",subtab:n}=ro(),{blocklet:r,refreshFlag:o}=Ce(),{session:i}=yr(),a=xe(()=>{var g;return(g=i==null?void 0:i.user)==null?void 0:g.did},[i]),c=_r(),l=xe(()=>{var g;return((g=i.user)==null?void 0:g.role)&&Lo.includes(i.user.role)},[i]);jl(a);const{tabGroups:u,renders:f}=wl(l),h=g=>{e(`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${g}`)},p=(u[t]||[]).filter(g=>g.show===void 0||g.show),v=((d=(p||[]).find(g=>g.value===n))==null?void 0:d.value)||((x=p==null?void 0:p[0])==null?void 0:x.value)||t,S=f[v]||f.overview,b=["overview"].includes(t),P=r?s.jsxs(Gt,{type:"components",children:[p.length>0&&s.jsxs(E,{mb:2,display:"flex",alignItems:"center",gap:2,children:[s.jsx(E,{flex:1,children:s.jsx(pr,{tabs:p,current:v,onChange:h,scrollButtons:"auto"})}),b&&!c&&s.jsx(E,{component:"div",className:"page-header",children:r?s.jsx(zn,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:g}={})=>{g&&N.error(g.message)},variant:"group"}):null})]}),s.jsx(E,{className:"page-content",children:s.jsx(w.Suspense,{fallback:s.jsx(nt,{relative:"parent",children:s.jsx(le,{})}),children:w.isValidElement(S)?S:s.jsx(S,{blocklet:r})})})]}):s.jsx(nt,{relative:"parent",children:s.jsx(le,{})});return s.jsx(Do,{children:s.jsx(Xc,{children:s.jsx(Tn,{children:s.jsxs(Cl,{children:[c&&b&&s.jsx(E,{component:"div",className:"page-header",mb:2,children:r?s.jsx(zn,{className:"page-actions",hasPermission:!0,blocklet:r,onStart:()=>{},onComplete:({error:g}={})=>{g&&N.error(g.message)},variant:"group"}):null}),s.jsx(Dr,{}),s.jsx(Qc,{}),P]})},`${o}`)})})}function _l(){var r;const{blocklet:e}=Ce(),{t}=W(),n=(r=e==null?void 0:e.meta)==null?void 0:r.did;return w.useEffect(()=>{const o=ko();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),s.jsxs(s.Fragment,{children:[s.jsx(Ns,{children:s.jsx("title",{children:t("pageTitle.dashboard")})}),s.jsx(Sl,{})]})}const Cl=V.main`
|
|
239
|
+
.page-header {
|
|
240
|
+
display: flex;
|
|
241
|
+
justify-content: space-between;
|
|
242
|
+
align-items: center;
|
|
243
|
+
flex-wrap: wrap;
|
|
244
|
+
gap: 16px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.page-title {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
|
|
251
|
+
.page-link {
|
|
252
|
+
font-size: 15px;
|
|
253
|
+
margin-top: 8px;
|
|
254
|
+
margin-left: 8px;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
259
|
+
.page-header {
|
|
260
|
+
flex-direction: column;
|
|
261
|
+
align-items: flex-start;
|
|
262
|
+
.page-actions,
|
|
263
|
+
.MuiButtonGroup-root {
|
|
264
|
+
width: 100%;
|
|
265
|
+
}
|
|
266
|
+
.MuiButtonGroup-root {
|
|
267
|
+
.MuiButtonBase-root {
|
|
268
|
+
flex: 1;
|
|
269
|
+
}
|
|
270
|
+
.blocklet-action-text {
|
|
271
|
+
display: none;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.page-title {
|
|
277
|
+
margin-bottom: 15px;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
`,Kl=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"}));export{_s as B,Q as S,In as W,Tr as a,Ir as b,Pr as c,js as d,be as e,Fl as f,Kl as g,Vl as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={auth:{noPermission:{title:"Keine Erlaubnis",description:"Du bist nicht der Administrator des Blocklets"}},login:{reLogin:"Verbinden",description:"Du musst deine DIDs Wallet verbinden, um auf {name} zuzugreifen",already:"Du bist verbunden als",connectWallet:"Verbinde das DID Wallet",closeWindow:"Fenster schließen",accessLimit:{title:"Seitenzugriff eingeschränkt",description:"Diese Seite erfordert die folgenden Pässe zum Zugriff, verbinden Sie sich bitte mit dem Portemonnaie, um den entsprechenden Pass zu ändern oder zu beantragen.",alreadyHavePassport:"Habe bereits den Reisepass",connectWithPassport:"Verbinde mit diesem Reisepass",buyPassport:"Kaufen Sie einen Reisepass"},switchDid:{title:"Konto wechseln",scan:"Verwenden Sie die folgenden Methoden, um das Konto zu wechseln",confirm:"Bestätige den Wechsel in deiner DID-Wallet",success:"Erfolgreich umgeschaltet"},switchSpecifiedDid:{title:"Konto wechseln",scan:"Du musst die DID zu {did} wechseln, um die folgenden Aktionen abzuschließen.",confirm:"Bestätigen Sie den Wechsel in Ihrer DID-Brieftasche",success:"Erfolgreich gewechselt"},connect:{title:"Verbinden",scan:"Verwenden Sie bitte die folgenden Methoden, um die Verbindung herzustellen",confirm:"Bestätigen Sie in Ihrer DID-Geldbörse",success:"Sie sind erfolgreich verbunden"},needManualClose:"Anmeldung erfolgreich. Wenn sich dieses Fenster nicht automatisch schließt, bitte schließen.",connectWithPassport:"Verbinde dich mit diesem Reisepass",invalidRedirectUrl:"Ungültige Weiterleitungs-URL",issueKyc:{pageDescription:"Schließen Sie die Verifizierung ab, um Ihr Konto zu sichern und ein wiederverwendbares NFT zu erhalten, das von anderen Websites vertraut werden kann (einmal überprüfen und überall präsentieren).",verifyButton:"Überprüfen",sendCodeButton:"Holen Sie sich einen Bestätigungscode",codeSentMessage:"Wir haben gerade einen Bestätigungscode an {email} gesendet. Der Code ist 30 Minuten lang gültig. Bitte überprüfen Sie Ihr Postfach oder Spam-Ordner.",codeSentSuccess:"Bestätigungscode erfolgreich gesendet",claim:"Bestätigungs-E-Mail-Zertifikat abrufen",scan:"Verbinden Sie Ihre DID-Brieftasche, um das Zertifikat zu erhalten",confirm:"Bestätigen Sie auf Ihrem DID Wallet",success:"Herzlichen Glückwunsch! Sie haben Ihre E-Mail erfolgreich verifiziert und das Zertifikat in Ihrem DID Wallet beansprucht.",backToHome:"Zurück zum Start",emailPlaceholder:"Ihre E-Mail-Adresse",verifyTitle:"Bestätigen Sie Ihre E-Mail-Adresse",issueTitle:"Anspruch E-Mail-Verifizierung NFT",verifyAction:"Überprüfen",issueAction:"Beanspruchung",issueTarget:"Du bist {action} für die folgende DID, klicke auf den Avatar, um eine weitere DID hinzuzufügen"},updateKyc:{button:"Zertifikat präsentieren",title:"Präsentieren Sie das verifizierte E-Mail-Zertifikat",scan:"Verbinden Sie Ihre DID-Brieftasche, um das Zertifikat vorzulegen",confirm:"Bestätigen Sie auf Ihrem DID Wallet",success:"Herzlichen Glückwunsch! Ihr NFT wurde überprüft und akzeptiert."},invalidOpenerUrl:"Ungültige Opener-URL"},studio:{home:"Studio",preferences:"Präferenzaufbau",localization:"Lokalisierung",branding:"Markenbilder",ratio:"Verhältnis",size:"Größe",count:"Zählen",tip:"Tipp",change:"Klicken Sie auf das Logo, um es zu ändern.",order:"Bestellung",orderTip:"Ziehen zum Ändern",orderTipLong:"Ziehen Sie, um zu ändern. Wenn Sie Screenshots auf der Festplatte löschen, aktualisieren Sie bitte die Seite.",type:"Typ",videoTipLong:"Klicke auf das Cover, um den Videolink zu bearbeiten.",video:"Video",videoTooltip:"Ziehen Sie, um die Reihenfolge zu ändern.",videoType:"Unterstützte Webseiten",videoDialogTitle:"Video hinzufügen",videoDialogEditTitle:"Video bearbeiten/löschen",videoInputLabel:"Geben Sie einen YouTube- oder Vimeo-Videolink ein",videoDialogNoSrc:"Bitte geben Sie einen gültigen Videolink ein",duplicateVideo:"Dieses Video wurde hinzugefügt",confirm:"Bestätigen",cancel:"Abbrechen",preview:"Vorschau",delete:"Löschen",title:"Bilder für {title} bereitstellen",description:"Mehr Informationen finden Sie unter",documentation:"Dokumentation"},blocklet:{startApplication:"Starte Anwendung",startDescription:"Bereit, {name} zu starten",start:"Start",starting:"Starten...",open:"Öffnen",suspended:"Anwendung ausgesetzt",manageSubscription:"Abonnement verwalten",suspendedCausedByExpired:"Diese Anwendung wurde aufgrund abgelaufener Bezahlung vorübergehend gestoppt. Bitte erneuern Sie vor {deadline}, um fortzufahren. Erfolgt in der angegebenen Frist keine Erneuerung, kann sie nicht mehr erneuert oder fortgesetzt werden.",suspendedCausedByTerminated:"Die Anwendung wurde aufgrund der am {canceledAt} gekündigten Subscription beendet und die Daten werden bis zum {deadline} vorgehalten. Bevor die Daten gelöscht werden, können Sie die Daten in DID Spaces sichern.",terminated:"Anwendung beendet",gotoVisitError:"Kann URL des Blocklets nicht aufrufen, bitte später erneut versuchen.",paynow:"Jetzt bezahlen",startLoadingText:"Dienst wird gestartet und kann einige Minuten dauern, bitte warten...",startingProgress:{starting:"Starte {name}...",success:"{name} erfolgreich gestartet",failed:"{name} konnte nicht gestartet werden"}},setup:{steps:{connect:"Verbinden",didSpace:"DID Spaces",config:"Konfiguration",domain:"Domain",access:"Zugangskontrolle",fuel:"Kraftstoff",complete:"Komplett",introduction:"Einführung",selectNodeDesc:"Wähle Blocklet Server aus",launchAppDesc:"Blocklet auf Server installieren",setupAppDesc:"Setup Blocklet",launched:"Vervollständigen"},connect:{title:"Verbinde mit Anwendung",scan:"Verwenden Sie die folgenden Methoden, um Benutzerprofil und Blocklet-Besitzerrechte bereitzustellen. Anschließend können Sie die App konfigurieren und starten.",confirm:"Bestätigen Sie in Ihrer DID-Brieftasche",success:"Sie sind erfolgreich verbunden"},domain:{addTitle:"Bestehende Domain binden (Optional)",title:"Domain auswählen",subTitle:"Passe deine Domain für die Anwendung an",label:"Bitte geben Sie einen gültigen Domainnamen an",tipStart:"Bitte stellen Sie sicher",tipEnd:"Hat Punkt zum aktuellen Server",addingCert:"Zertifikat wird erstellt...",recordType:"Datentyp",recordValue:"Aufzeichnungswert",genCertSuccess:"Das {domain}-Zertifikat wurde erfolgreich ausgestellt",genCertFailed:"Fehler beim Ausstellen des Zertifikats für {domain}: {message}",genCertFailedForNFTDomain:"NFT-Domain erfolgreich hinzugefügt, aber das HTTPS-Zertifikat konnte nicht generiert werden. Bitte versuche es später erneut.",buyDIDDomainTitle:"Kaufe eine DID-Domain (Optional)",buyDIDDomainTips:"Nach dem Kauf einer DID-Domain wird diese automatisch an die Anwendung gebunden.",buyOrConnect:"Sie können eine bestehende Domain kaufen oder konfigurieren",skipDescription:"Sie können vorübergehend die Standarddomains verwenden. Diese Domains sind nicht für die Produktion geeignet und sollten nicht mit Kunden geteilt werden."},didSpace:{title:"Konfigurieren Sie DID Spaces",subTitle:"Bitte schließen Sie den folgenden Verbindungsvorgang ab, um Anwendungsdaten in DID Spaces zu speichern.",tips:"Tipps",description:"Konfigurieren Sie die DID Spaces Instanzadresse und speichern Sie die Anwendungsdaten in DID Spaces nach einer erfolgreichen Verbindung",label:"Bitte wählen Sie den DID Spaces-Dienst",connected:"Sie haben erfolgreich eine Verbindung mit DID Spaces hergestellt",connect:"Verbinden Sie jetzt",reconnect:"Verbinden",addressCannotEmpty:"Die Adresse darf nicht leer sein",addressNotValid:"{url} ist keine gültige Adresse.",authorize:{title:"Verbinde {appName} mit DID Spaces",scan:"Verwenden Sie die folgenden Methoden, um der App {appName} die Verbindung zu DID Spaces zu ermöglichen",success:"Erfolgreich verbunden"}},config:{title:"Konfiguration",subTitle:"Andere Konfigurationselemente (Sie müssen auch die folgenden Elemente festlegen)"},complete:{title:"Ihre App ist bereit",failedTitle:"Fehler beim Starten der App",backToServer:"Zurück zum Blocklet Server",notRunning:"App konnte beim ersten Versuch nicht starten, bitte erneut versuchen",readyToStart:"Ihre App ist bald fertig"},fuel:{title:"Kraftstoff zum Starten erforderlich",tipStart:"Schlitz",tipEnd:"Für diese Anwendung ist eine Guthaben erforderlich, damit die Anwendung ordnungsgemäß funktionieren kann. Die Gelder werden in der Anwendungsbrieftasche gespeichert und können für Transaktionsgebühren verwendet werden. Sie können Ihr Guthaben jederzeit abheben, wenn Sie die App nicht mehr verwenden.",addressTitle:"Anwendungskonto",addressTip:"Befüllen Sie die Anwendung mit einer DID Wallet",need:"Brauchen",current:"Aktuell",fuelApp:"Anwendung mit Treibstoff versorgen"},title:"Aufbau",next:"Nächster",previous:"Vorherige",continue:"Weiter",skip:"Überspringen",startNow:"Starte jetzt",confirm:"Bestätigen",cancel:"Abbrechen"},user:{walletNotification:"DID Wallet Benachrichtigung",emailNotification:"E-Mail-Benachrichtigung",smsNotification:"SMS-Benachrichtigung",addWebhook:"Neuen Webhook hinzufügen"},pageTitle:{login:"Anmelden",dashboard:"Blocklet-Dashboard",userCenter:"Benutzerzentrum",invite:"Einladen",issuePassport:"Reisepass ausstellen",lostPassport:"Verloren Reisepass"},errorPage:{404:{title:"Ups! Seite nicht gefunden",description:"Es scheint, dass die gesuchte Seite nicht existiert.",backHome:'Wenn Sie ein Besucher sind, können Sie <a href="{url}">zurück zur Startseite gehen</a>',goToDashboard:"Wenn Sie der Site-Besitzer sind, können Sie sich im <a href={url}>Dashboard anmelden</a>."}},common:{branding:"Branding",theming:"Design",navigation:"Navigation",sitemap:"Sitemap",advanced:"Erweitert",performance:"Leistung",docs:"Dokumente",comingSoon:"Bald verfügbar",accessKeys:"Zugriffsschlüssel"},connectCli:{title:"Verbinden, um Zugangsschlüssel zu generieren",scan:"Scannen Sie folgenden QR-Code, um den Zugangsschlüssel zu generieren",success:"Verbindung zum Generieren des Zugriffsschlüssels erfolgreich hergestellt",successDesc:"Zugriffsschlüssel erfolgreich generiert, diese Seite kann sicher geschlossen werden. Sie können jetzt lokale Blocklets mit dem generierten Zugriffsschlüssel hochladen.",invalidSession:"Ungültige Sitzung",invalidSessionDesc:"Sitzung existiert nicht oder ist abgelaufen. Verwenden Sie den Befehl 'blocklet deploy --endpoint {endpoint}', um den Zugriffsschlüssel neu zu generieren.",connectionError:"Zugriffsschlüssel konnte nicht generiert werden",home:"Zurück zur Startseite",tips:{title:"Zugriffsschlüssel generieren",item1:"Unterstützt lokale Bereitstellung von Blocklets in der aktuellen Anwendung",item2:"Wird in der Liste der Zugriffsschlüssel der Anwendung angezeigt",item3:"Sie können den Zugriffsschlüssel jederzeit in der Liste widerrufen"}}};export{e as default};
|