@abtnode/webapp 1.17.4-beta-20251203-225234-75da41dd → 1.17.4-beta-20251204-152224-243ff54f
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-B8XrCnul.js → AdapterDayjs-D7bJvNHv.js} +1 -1
- package/dist/assets/{Add-kI5bOAG-.js → Add-CRng1bvb.js} +1 -1
- package/dist/assets/ArrowDropDown-DenHrhc8.js +1 -0
- package/dist/assets/{Autocomplete-CQE4jUXI.js → Autocomplete-Z7djk_ZA.js} +1 -1
- package/dist/assets/{Breadcrumbs-AnwvYAV4.js → Breadcrumbs-Cl3pYXuX.js} +1 -1
- package/dist/assets/{ButtonGroup-BMNpoL2h.js → ButtonGroup-DT2mnbzl.js} +1 -1
- package/dist/assets/{CSSTransition-BxHb6pgR.js → CSSTransition-DnKCf5MC.js} +1 -1
- package/dist/assets/{CallMerge-D4r5xzUL.js → CallMerge-ez9AWPJv.js} +1 -1
- package/dist/assets/{CardContent-7R2qvvpi.js → CardContent-3_u5Glkf.js} +1 -1
- package/dist/assets/{ChevronLeft-LXiuPIK5.js → ChevronLeft-CrMq5UEk.js} +1 -1
- package/dist/assets/{ChevronRight-DqFLktR4.js → ChevronRight-Cuplw8Vk.js} +1 -1
- package/dist/assets/{Clear-Hs60zEib.js → Clear-BqdaPKpz.js} +1 -1
- package/dist/assets/{DeleteOutline-DsqrqnCp.js → DeleteOutline-BASXPKuD.js} +1 -1
- package/dist/assets/{Done-vE3VnBR0.js → Done-CB_qB8AL.js} +1 -1
- package/dist/assets/{Edit-qO_MT0b2.js → Edit-Dtb20pIp.js} +1 -1
- package/dist/assets/{ErrorOutline-DdvUBhqw.js → ErrorOutline-D9sfPJGD.js} +1 -1
- package/dist/assets/{FilterList-AnfIXCKs.js → FilterList-C8mCq8zA.js} +1 -1
- package/dist/assets/{Google--RzStVOR.js → Google-C-fURhjk.js} +1 -1
- package/dist/assets/{HelpOutline-CoSkqfzt.js → HelpOutline-Cueb4ga5.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-Dujsdgxw.js → KeyboardArrowDown-BcVS9Fto.js} +1 -1
- package/dist/assets/{Launch-DYmoqTVe.js → Launch-7PWsMLYi.js} +1 -1
- package/dist/assets/{Link-C00bCC3q.js → Link-DehBPVeZ.js} +1 -1
- package/dist/assets/{ListItemButton-BEID3HDl.js → ListItemButton-DWl1Vgm4.js} +1 -1
- package/dist/assets/{ListSubheader-Dc864cM6.js → ListSubheader-CwlXohNJ.js} +1 -1
- package/dist/assets/{LoadingButton-BClJhQK8.js → LoadingButton-MojQ_kdf.js} +1 -1
- package/dist/assets/{MoreVert-CqJOZeEC.js → MoreVert-DtyK0V7L.js} +1 -1
- package/dist/assets/{OpenInNew-Pw51SEHY.js → OpenInNew-_TIFZ5Zi.js} +1 -1
- package/dist/assets/{Refresh-CcEIh6xY.js → Refresh-DwyswQXH.js} +1 -1
- package/dist/assets/{Search-C_5maoKz.js → Search-CsPuhVY5.js} +1 -1
- package/dist/assets/{Stepper-Ck_x8FLF.js → Stepper-Rcrn65Du.js} +1 -1
- package/dist/assets/{Switch-DYHMHuRa.js → Switch-DkUYQLr7.js} +1 -1
- package/dist/assets/TableSearch-Bj-RkYUe.js +51 -0
- package/dist/assets/{ToggleButtonGroup-CS6Q6qZB.js → ToggleButtonGroup-3zowoGqS.js} +1 -1
- package/dist/assets/{UnfoldMore-BPzgNPA4.js → UnfoldMore-DkTRhBQs.js} +1 -1
- package/dist/assets/{Verified-LTXU8MrA.js → Verified-B6fUdHX1.js} +1 -1
- package/dist/assets/{VerifiedUser-B3wH8cXt.js → VerifiedUser-Dk6hfaYJ.js} +1 -1
- package/dist/assets/{ViewList-BfiQ8qPi.js → ViewList-D8N8QDcN.js} +1 -1
- package/dist/assets/{_createAggregator-4BM34H5l.js → _createAggregator-B5A3r6Wz.js} +1 -1
- package/dist/assets/actions-CGozisCX.js +11 -0
- package/dist/assets/actions-DzRp1CK0.js +1 -0
- package/dist/assets/{agreement-BzsHgssv.js → agreement-BPuCuaYS.js} +3 -3
- package/dist/assets/api-DksC2jZF.js +1 -0
- package/dist/assets/{appearance-DHqXwjoD.js → appearance-DqS4_O1_.js} +1 -1
- package/dist/assets/ar-Cwm1-0yA.js +7 -0
- package/dist/assets/{audit-logs-fSLdeI5s.js → audit-logs-D0e8XQkm.js} +1 -1
- package/dist/assets/{base-chart-D5YNxfH0.js → base-chart-DWYRF-Pp.js} +1 -1
- package/dist/assets/{blocklet-DzsezOxR.js → blocklet-CO_UEcgH.js} +1 -1
- package/dist/assets/{chain-C9-WRPu7.js → chain-Ss4dh3Ib.js} +1 -1
- package/dist/assets/{click-to-copy-BqSPQ3-7.js → click-to-copy-CHgcysbr.js} +1 -1
- package/dist/assets/cloneDeep-DGATVnvO.js +1 -0
- package/dist/assets/{collapse-B_3Ho-QP.js → collapse-BxCDdwz2.js} +1 -1
- package/dist/assets/{config-navigation-Dp2RakXR.js → config-navigation-DnjjiErQ.js} +3 -3
- package/dist/assets/{connect-to-pNkkzCak.js → connect-to-DDy1G5fS.js} +1 -1
- package/dist/assets/{cssMode-tZr3iQNS.js → cssMode-BIviLN-T.js} +1 -1
- package/dist/assets/de-XQM4sDLo.js +7 -0
- package/dist/assets/{delete-confirm-Co07Njuf.js → delete-confirm-vp8hd-iS.js} +1 -1
- package/dist/assets/{depsEqual-DDykxzRj.js → depsEqual-CZP345Xi.js} +1 -1
- package/dist/assets/{detail-DcgwTwye.js → detail-DKJA4QJA.js} +3 -3
- package/dist/assets/domains-DnORdhZ7.js +28 -0
- package/dist/assets/{download-CK01OJP3.js → download-bjQaUX52.js} +1 -1
- package/dist/assets/{edit.svg-BQ5aLBCI.js → edit.svg-D22FchVe.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-CqYOpxkG.js +1 -0
- package/dist/assets/engine-Cc942eOX.js +1 -0
- package/dist/assets/es-D4zFwVhj.js +9 -0
- package/dist/assets/fr-BQXlmrTL.js +7 -0
- package/dist/assets/{freemarker2-DSJRqUi6.js → freemarker2-B6EoaK3p.js} +1 -1
- package/dist/assets/{get-safe-url-DQ8We4Cn.js → get-safe-url-CfVKsPMH.js} +1 -1
- package/dist/assets/getValidReactChildren-D7wwEzgt.js +1 -0
- package/dist/assets/{graphqlMode-BG47Adzu.js → graphqlMode-B1q5zCxy.js} +2 -2
- package/dist/assets/{handlebars-B6x-6VIa.js → handlebars-leG6s9kW.js} +1 -1
- package/dist/assets/hi-Cdz2GskJ.js +5 -0
- package/dist/assets/{html-jMDnRBWp.js → html-BUpVyqnU.js} +1 -1
- package/dist/assets/{html-title-B38L6o3q.js → html-title-B7gNlV0N.js} +1 -1
- package/dist/assets/{htmlMode-C5S9mBrG.js → htmlMode-BtvUyoUm.js} +1 -1
- package/dist/assets/id-Q9i8FdSt.js +7 -0
- package/dist/assets/{iframe-BNWt4-fa.js → iframe-Bcq1yggD.js} +1 -1
- package/dist/assets/{index-BtUuqhY5.js → index-8muv7_Jd.js} +1 -1
- package/dist/assets/index-9amiOBds.js +1 -0
- package/dist/assets/{index-BWfkNY7x.js → index-B9cmEwta.js} +1 -1
- package/dist/assets/{index-fUcEQ60M.js → index-BA9z7d5M.js} +2 -2
- package/dist/assets/{index-Dj4J7MRE.js → index-BCFuar1a.js} +1 -1
- package/dist/assets/{index-D1awT4uB.js → index-BEBlF9m9.js} +1 -1
- package/dist/assets/{index-CdmTtYEH.js → index-BFd6rfnD.js} +1 -1
- package/dist/assets/index-BHh7dbJI.js +79 -0
- package/dist/assets/{index-CHG9EhW0.js → index-BZK15J4S.js} +2 -2
- package/dist/assets/{index-gLhIa95r.js → index-BcwJKAa8.js} +3 -3
- package/dist/assets/index-BmhCRjuT.js +1 -0
- package/dist/assets/{index-i1qQpQly.js → index-Bs1YhLgL.js} +1 -1
- package/dist/assets/index-BtC9W7tW.js +120 -0
- package/dist/assets/{index-sbhy4wTO.js → index-BuBuhUeR.js} +1 -1
- package/dist/assets/{index-CVAkH3vd.js → index-BzdGhRHG.js} +1 -1
- package/dist/assets/{index-C601SkM4.js → index-C4pxl7E6.js} +1 -1
- package/dist/assets/{index-B_NMI3ZI.js → index-C5QUiUfn.js} +1 -1
- package/dist/assets/index-C8uJSnoX.js +606 -0
- package/dist/assets/{index-YAdFrAoP.js → index-CK2r1fQ4.js} +3 -3
- package/dist/assets/{index-CdAykioB.js → index-CLUNG8RH.js} +1 -1
- package/dist/assets/{index-CX5L5Zzo.js → index-COAHcVH6.js} +1 -1
- package/dist/assets/{index-CQ3wtaOi.js → index-CP2ySx69.js} +1 -1
- package/dist/assets/{index-CT2MPFX1.js → index-CS3jjVt-.js} +1 -1
- package/dist/assets/index-CToqwOpp.js +328 -0
- package/dist/assets/{index-Da6avpbI.js → index-CYKLn0md.js} +1 -1
- package/dist/assets/{index-Ca71Ul3i.js → index-CaFQZBnI.js} +3 -3
- package/dist/assets/{index-B7lwLoYe.js → index-CjNtQPhT.js} +1 -1
- package/dist/assets/index-ClhL9yaw.js +1 -0
- package/dist/assets/{index-BqDRNwJX.js → index-CtuC-y68.js} +1 -1
- package/dist/assets/{index-ituQ-YWI.js → index-Cueikc61.js} +2 -2
- package/dist/assets/{index-gKfbF3Uy.js → index-D6RZzwG3.js} +1 -1
- package/dist/assets/{index-CLvjrKnU.js → index-D7pAGc4n.js} +9 -9
- package/dist/assets/{index-DOjmnZso.js → index-D8QdSuWP.js} +1 -1
- package/dist/assets/{index-DypTd994.js → index-DP781l3f.js} +1 -1
- package/dist/assets/{index-BfBCWTwI.js → index-DPRN-V2-.js} +1 -1
- package/dist/assets/{index-DXgv4Xqm.js → index-DPsk4bZI.js} +1 -1
- package/dist/assets/{index-D6Tf4nQu.js → index-DRjvR70q.js} +1 -1
- package/dist/assets/{index-D331Asw4.js → index-DYek3fDu.js} +5 -5
- package/dist/assets/{index-CtGeZSa_.js → index-D_SuvjB5.js} +1 -1
- package/dist/assets/{index-PBuMheS3.js → index-DdtHjUVR.js} +4 -4
- package/dist/assets/index-DpjK8TAu.js +20 -0
- package/dist/assets/{index-D0tbGiP6.js → index-LTqv_onD.js} +1 -1
- package/dist/assets/{index-B6tHzrIn.js → index-STr1ffGc.js} +2 -2
- package/dist/assets/{index-DaYK2wTG.js → index-nb9hmF43.js} +1 -1
- package/dist/assets/index-uvbslqFd.js +1 -0
- package/dist/assets/{index-CUSquMEA.js → index-wL5lEY63.js} +8 -8
- package/dist/assets/{index.esm-yDr2HoCY.js → index.esm-uQodQ2iI.js} +1 -1
- package/dist/assets/{install-from-url-CUdRu_Yn.js → install-from-url-B1AvU1HE.js} +1 -1
- package/dist/assets/{invitation-BcqzR03j.js → invitation-BGoJ_RU_.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-wXDXCvIL.js → is-path-prefix-equal-B0MjzJqh.js} +1 -1
- package/dist/assets/item-MiuwuO0Y.js +273 -0
- package/dist/assets/ja-CH8WZngC.js +9 -0
- package/dist/assets/{javascript-Cif1kEP1.js → javascript-CQivY_iF.js} +1 -1
- package/dist/assets/{jsonMode-Dtj4OX0P.js → jsonMode-B1DIJogh.js} +1 -1
- package/dist/assets/ko-Nli9PwTV.js +9 -0
- package/dist/assets/{liquid-wpaZ49Sr.js → liquid-B-d-gcy-.js} +1 -1
- package/dist/assets/{list-header--wgea2u-.js → list-header-CSw-R3Ib.js} +1 -1
- package/dist/assets/{lock.svg-Br-cW1Vr.js → lock.svg-BhUN8bfS.js} +1 -1
- package/dist/assets/log-DSCML-QG.js +15 -0
- package/dist/assets/{lottie-react.esm-DGCSfjEH.js → lottie-react.esm-BsJCvwoE.js} +1 -1
- package/dist/assets/{mdx-BNHuuftl.js → mdx-CmVqY81W.js} +1 -1
- package/dist/assets/{memory-CO8_mKFj.js → memory-CYZ4RyvC.js} +1 -1
- package/dist/assets/{metric-D4Ezyye6.js → metric--Aw7wHv-.js} +1 -1
- package/dist/assets/omit-D3F-V5wK.js +1 -0
- package/dist/assets/overview-Dtzj0xH0.js +13 -0
- package/dist/assets/{permission-DkUGU8Dy.js → permission-C4awFEcL.js} +1 -1
- package/dist/assets/{preference-C1-5FR1J.js → preference-4rp0K0MI.js} +3 -3
- package/dist/assets/pt-eVksFEJb.js +5 -0
- package/dist/assets/{python-BeSPls-_.js → python-UalezmyW.js} +1 -1
- package/dist/assets/{raf-schd.esm-Bmt0I179.js → raf-schd.esm-nqmR3RY3.js} +1 -1
- package/dist/assets/{razor-VrEhsMvy.js → razor-CCom4Y0p.js} +1 -1
- package/dist/assets/{rotate-session-key-BPyoa2sO.js → rotate-session-key-BVtPivm4.js} +1 -1
- package/dist/assets/ru-ycnIgUGb.js +5 -0
- package/dist/assets/runtime-ChvahMmk.js +1 -0
- package/dist/assets/schema-D90no3Xq.js +1 -0
- package/dist/assets/sdk-D033K402.js +1 -0
- package/dist/assets/{service-B3qJKUUb.js → service-D0Nqh0MK.js} +1 -1
- package/dist/assets/shorten-label-BtsExUKj.js +1 -0
- package/dist/assets/{simple-select-BlzEjZYK.js → simple-select-CwS4mJu8.js} +1 -1
- package/dist/assets/{spaces-BW0FVSze.js → spaces-DfyZsuc8.js} +1 -1
- package/dist/assets/status-BniY81sT.js +1 -0
- package/dist/assets/{status-hfEX7VoN.js → status-CUxXICmB.js} +1 -1
- package/dist/assets/{switch-control-CRKB4FYD.js → switch-control-BKH5l4X4.js} +1 -1
- package/dist/assets/{table-icons-DIiznwf7.js → table-icons-SEKPul8f.js} +18 -18
- package/dist/assets/{team-Cr3_9lEo.js → team-azT9Jfpw.js} +1 -1
- package/dist/assets/th-BvLhxkpi.js +5 -0
- package/dist/assets/{toLower-CBDRJ4vw.js → toLower-BOQN0AT2.js} +1 -1
- package/dist/assets/toUpper-CS-AduT_.js +1 -0
- package/dist/assets/{traffic-c9i5qWvQ.js → traffic-DasUqpt9.js} +1 -1
- package/dist/assets/{tsMode-DA1Je9xp.js → tsMode-DiIkFf_x.js} +1 -1
- package/dist/assets/{typescript-BC9b2MIP.js → typescript-85TY_MlI.js} +1 -1
- package/dist/assets/{url-evaluation-BNj0UZK1.js → url-evaluation-CcvHRXPN.js} +1 -1
- package/dist/assets/{url-join-Cwzm0LVv.js → url-join-BXDQZ2P_.js} +1 -1
- package/dist/assets/{use-mobile-DegDbYke.js → use-mobile-CWjERnhJ.js} +1 -1
- package/dist/assets/{use-mobile-ZXn0_vSN.js → use-mobile-DMNeuaxw.js} +1 -1
- package/dist/assets/{useAsync-DhvcDNZU.js → useAsync-CCNZX_yW.js} +1 -1
- package/dist/assets/{useAsyncRetry-BuFRS3YZ.js → useAsyncRetry-DOwZIXtY.js} +1 -1
- package/dist/assets/{useLocalStorage-Ceu1UYjX.js → useLocalStorage-CEBeH0_O.js} +1 -1
- package/dist/assets/{useThemeProps-CGNNiV2h.js → useThemeProps-Ck1ydGI4.js} +1 -1
- package/dist/assets/{util-CvX1kI1W.js → util-C4YCPi_k.js} +1 -1
- package/dist/assets/vi-BmM-09Iq.js +5 -0
- package/dist/assets/{wait-container-DQfZdJnZ.js → wait-container-B7fAP1Xa.js} +7 -7
- package/dist/assets/{without-wallet-BKVBw3vL.js → without-wallet-C-OpmM-K.js} +1 -1
- package/dist/assets/wrap-locale-DHJmdRca.js +1 -0
- package/dist/assets/{xml-Byc4kRnH.js → xml-CTVLNdi0.js} +1 -1
- package/dist/assets/{yaml-BqelJ5A8.js → yaml-Dx5B49fH.js} +1 -1
- package/dist/assets/{zh-DZI4Yy2m.js → zh-BkVzTN9N.js} +2 -2
- package/dist/assets/zh-tw-CW4J6ddt.js +9 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-DQiHUHN2.js +0 -1
- package/dist/assets/TableSearch-CCo38KPm.js +0 -51
- package/dist/assets/actions-CE27qWor.js +0 -11
- package/dist/assets/actions-SrVXdq5g.js +0 -1
- package/dist/assets/api-SBg_zsK3.js +0 -1
- package/dist/assets/ar-C89Z16Ql.js +0 -7
- package/dist/assets/cloneDeep-DpgUjdaj.js +0 -1
- package/dist/assets/de-BsCDrfBl.js +0 -7
- package/dist/assets/domains-BV1XoGlV.js +0 -28
- package/dist/assets/emotion-cache.browser.esm-X_vzDGxi.js +0 -1
- package/dist/assets/engine-WLYB4JH-.js +0 -1
- package/dist/assets/es-BJh_XsEm.js +0 -9
- package/dist/assets/fr-DRJMwn7V.js +0 -7
- package/dist/assets/getValidReactChildren-BsG2WRwa.js +0 -1
- package/dist/assets/hi-h-9Yl5g9.js +0 -5
- package/dist/assets/id-BDWggRsa.js +0 -7
- package/dist/assets/index-B8v-axBf.js +0 -328
- package/dist/assets/index-B_nHd_uz.js +0 -606
- package/dist/assets/index-C4B0vM19.js +0 -1
- package/dist/assets/index-C7TNAoJk.js +0 -1
- package/dist/assets/index-CD7DvxmZ.js +0 -20
- package/dist/assets/index-CExol_6_.js +0 -1
- package/dist/assets/index-CvbVZVN0.js +0 -79
- package/dist/assets/index-DuCzR9nh.js +0 -120
- package/dist/assets/index-xk8o36aP.js +0 -1
- package/dist/assets/item-CEMWCyCy.js +0 -273
- package/dist/assets/ja-R9EF3xbB.js +0 -9
- package/dist/assets/ko-C_QLPZyk.js +0 -9
- package/dist/assets/log-BwGGQAmT.js +0 -15
- package/dist/assets/omit-BkO80IDI.js +0 -1
- package/dist/assets/overview-XRYsL-Df.js +0 -13
- package/dist/assets/pt-DpYO8djd.js +0 -5
- package/dist/assets/ru-DkZtar3s.js +0 -5
- package/dist/assets/runtime-B2AOXg1s.js +0 -1
- package/dist/assets/schema-BZPDZOr7.js +0 -1
- package/dist/assets/sdk-jF2ykj-E.js +0 -1
- package/dist/assets/shorten-label-CdOupV3k.js +0 -1
- package/dist/assets/status-BwdlUN6n.js +0 -1
- package/dist/assets/th-04iX5CrT.js +0 -5
- package/dist/assets/toUpper-CiB1f6qA.js +0 -1
- package/dist/assets/vi-kOP0E9Ga.js +0 -5
- package/dist/assets/wrap-locale-DyG--MvI.js +0 -1
- package/dist/assets/zh-tw-BLapUUeq.js +0 -9
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CaFQZBnI.js","./index-DYek3fDu.js","./index-DGkT7afN.css","./url-join-BXDQZ2P_.js","./index-CS3jjVt-.js","./_createAggregator-B5A3r6Wz.js","./depsEqual-CZP345Xi.js","./index-BFd6rfnD.js","./index-DRYJ0xIl.js","./toUpper-CS-AduT_.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aF as Fe,j as t,dt as _s,gz as Ss,iw as Es,V as le,bo as xe,K as B,O as Ce,H as V,o as x,f as gt,r as k,p as _e,bG as st,b as be,i as X,X as Un,bF as ft,Y as ve,ix as ks,t as ye,s as se,a4 as he,aW as uo,T as ce,$ as Zt,dI as mt,y as we,b9 as Rs,bK as Ps,aH as K,b2 as Ts,go as Is,gp as Ds,C as je,f5 as po,hv as Wn,x as Bs,ax as Kt,w as Os,iy as Us,iz as Ns,v as Be,iA as Ls,Z as As,a0 as Ms,iB as fo,bp as mo,R as Ne,f7 as zs,f2 as Fs,aA as qs,aB as $s,bl as Ws,aC as Hs,aD as pe,aO as Ks,cS as Gs,S as Vs,eO as cr,bj as Ys,h as Zs,dx as It,iC as Xs,f$ as ho,iD as Qs,iE as Js,ez as fe,iF as go,dG as ei,iG as ti,ha as ni,fP as ri,iH as oi,cJ as dr,hq as Hn,av as si,bB as Xt,dq as Me,bv as ii,bw as ur,z as Gt,cw as ai,G as ze,aP as pr,gk as xo,aT as He,h6 as li,bE as kt,cp as fr,hy as ci,fn as mr,bh as di,L as xt,E as yo,bn as ui,_ as pi,M as Rt,a_ as Kn,iI as fi,a$ as Le,az as hr,cQ as mi,ad as it,aM as vo,bY as Gn,cB as hi,iJ as gi,ba as xi,A as Vn,aV as Nn,g as yi,aS as ut,N as fn,W as vi,bH as Co,aI as Ci,by as bo,aR as bi,fe as gr,g7 as xr,g8 as yr,U as vr,cP as ji,g9 as wi,bX as _i,iK as Si}from"./index-DYek3fDu.js";import{y as Ei}from"./index-C4pxl7E6.js";import{a as ki,c as Ri,d as Pi,u as Yn,R as Ti}from"./actions-CGozisCX.js";import{S as Ii}from"./switch-control-BKH5l4X4.js";import{u as De}from"./blocklet-CO_UEcgH.js";import{P as Ln,w as Qt}from"./permission-C4awFEcL.js";import{E as jo}from"./Edit-Dtb20pIp.js";import{T as Di,M as Bi,t as Oi}from"./table-icons-SEKPul8f.js";import{s as Ui,F as wo,L as Ni,I as Li,a as Pt,S as Ai,B as Mi}from"./preference-4rp0K0MI.js";import{C as Cr}from"./click-to-copy-CHgcysbr.js";import{v as mn}from"./index-CtuC-y68.js";import{A as zi}from"./Add-CRng1bvb.js";import{A as Jt}from"./Link-DehBPVeZ.js";import{C as Fi,c as qi,b as $i,f as _o,A as Wi,_ as Hi,a as Ki,e as Gi,d as So,s as Vi,L as Yi,u as Zi,g as Xi,S as Qi}from"./item-MiuwuO0Y.js";import{T as Ji,L as ea,a as An,u as br,W as ta,P as na}from"./index-BuBuhUeR.js";import{e as Eo}from"./engine-Cc942eOX.js";import{u as ra,C as oa,D as sa,a as ia,b as aa}from"./connect-to-DDy1G5fS.js";import{C as la,u as ca,A as da}from"./agreement-BPuCuaYS.js";import{A as ua,a as pa,b as fa,c as ma,R as ot,S as dt}from"./collapse-BxCDdwz2.js";import{D as ko}from"./Done-CB_qB8AL.js";import{C as ha}from"./Google-C-fURhjk.js";import{I as Ro,f as ga,a as xa,B as ya}from"./install-from-url-B1AvU1HE.js";import{a as jr}from"./api-DksC2jZF.js";import{v as Po,e as va,a as Vt}from"./util-C4YCPi_k.js";import{u as To}from"./use-mobile-CWjERnhJ.js";import{A as Ca}from"./ArrowDropDown-DenHrhc8.js";import{u as ba}from"./useLocalStorage-CEBeH0_O.js";import{r as en}from"./index-CS3jjVt-.js";import{b as tn}from"./without-wallet-C-OpmM-K.js";import{E as Zn}from"./ErrorOutline-D9sfPJGD.js";import{H as ja}from"./HelpOutline-Cueb4ga5.js";import{C as wa}from"./lock.svg-BhUN8bfS.js";import{D as nn,R as _a,a as wr}from"./url-evaluation-CcvHRXPN.js";import{L as Io}from"./Launch-7PWsMLYi.js";import{D as Sa}from"./delete-confirm-vp8hd-iS.js";import{W as ht,B as Mn,m as Ea}from"./status-CUxXICmB.js";import{A as Do}from"./actions-DzRp1CK0.js";import{v as hn}from"./index-CP2ySx69.js";import{t as ka}from"./toUpper-CS-AduT_.js";import{S as Ra}from"./Switch-DkUYQLr7.js";import{a as Pa}from"./team-azT9Jfpw.js";import"./MoreVert-DtyK0V7L.js";import"./get-safe-url-CfVKsPMH.js";import"./ButtonGroup-DT2mnbzl.js";import"./getValidReactChildren-D7wwEzgt.js";import"./FilterList-C8mCq8zA.js";import"./CSSTransition-DnKCf5MC.js";import"./emotion-cache.browser.esm-CqYOpxkG.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-nqmR3RY3.js";import"./redux-DfszZyTl.js";import"./useThemeProps-Ck1ydGI4.js";import"./html-title-B7gNlV0N.js";import"./Clear-BqdaPKpz.js";import"./ChevronRight-Cuplw8Vk.js";import"./ChevronLeft-CrMq5UEk.js";import"./Search-CsPuhVY5.js";import"./omit-D3F-V5wK.js";import"./edit.svg-D22FchVe.js";import"./index-BFd6rfnD.js";import"./iframe-Bcq1yggD.js";import"./index-B9cmEwta.js";import"./KeyboardArrowDown-BcVS9Fto.js";import"./Autocomplete-Z7djk_ZA.js";import"./ListSubheader-CwlXohNJ.js";import"./Verified-B6fUdHX1.js";import"./VerifiedUser-Dk6hfaYJ.js";import"./DeleteOutline-BASXPKuD.js";import"./url-join-BXDQZ2P_.js";import"./index-BojVbZw0.js";import"./spaces-DfyZsuc8.js";import"./OpenInNew-_TIFZ5Zi.js";import"./index-DRYJ0xIl.js";import"./index-nb9hmF43.js";import"./decode-DPztD6kB.js";import"./cloneDeep-DGATVnvO.js";import"./ListItemButton-DWl1Vgm4.js";import"./Stepper-Rcrn65Du.js";import"./is-path-prefix-equal-B0MjzJqh.js";const Ta=Fe(t.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),Ia=Fe(t.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"})),Bo=Fe(t.jsx("path",{d:"M22 5.18 10.59 16.6l-4.24-4.24 1.41-1.41 2.83 2.83 10-10zm-2.21 5.04c.13.57.21 1.17.21 1.78 0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8c1.58 0 3.04.46 4.28 1.25l1.44-1.44C16.1 2.67 14.13 2 12 2 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-1.19-.22-2.33-.6-3.39z"})),Da=Fe(t.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Oo=Fe(t.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),Ba=Fe(t.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),Oa=Fe(t.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"})),Ua=Fe(t.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"})),Na=Fe(t.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}));function _r(e,n){var r={};return n=_s(n),Ss(e,function(i,a,o){Es(r,a,n(i,a,o))}),r}function Uo({children:e=null,...n}){const{t:r}=le(),{api:i}=xe(),{blocklet:a}=De(),o=a?.settings?.autoCheckUpdate,f=async l=>{await i.updateAutoCheckUpdate({input:{did:a.meta.did,autoCheckUpdate:l}})},c=async()=>{try{const l=!o?.enabled;await f({enabled:l}),V.success(r(l?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(l){V.error(l.message)}},d=!!o?.enabled;return t.jsxs(B,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e,t.jsx(Ce,{title:r("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:t.jsx("div",{children:t.jsx(Ii,{checked:d,onChange:c,name:"enableWelcomePage",style:{...n.style,zoom:.8}})})})]})}Uo.propTypes={children:x.any};function Sr(e){function n({sx:r,...i}){return t.jsx(e,{...i,sx:{color:"text.primary",...r}})}return n}const La={..._r(Oi,Sr),..._r(ki,Sr)},Aa=(e,n)=>{let{description:r}=e;return(Object.values(be.CHAIN_PROP_MAP).includes(e.key)||X.isEnvShareable(e))&&(r?r=`${r} (${n("blocklet.config.sharedToAllComponents")})`:r=n("blocklet.config.sharedToAllComponents")),r&&t.jsx("div",{style:{marginLeft:12},children:r})},gn=(e,n,r=[])=>!r?.length&&!e.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(e.key)&&!n.meta.environments.find(i=>i.name===e.key)&&n.children.every(i=>!i.meta.environments.find(a=>a.name===e.key))?!0:e.custom,Er=e=>[be.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)?!0:!(e.startsWith("BLOCKLET_")||e.startsWith("COMPONENT_")),xn=e=>[be.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(e)===!1;function No({blocklet:e,ancestors:n=[]}){const r=xe(),{palette:i}=gt(),{inService:a}=r,{t:o}=k.useContext(_e),f=[...n.map(s=>s.meta.did),e.meta.did],c=()=>V.success(o("blocklet.config.changedTip")),d=s=>gn(s,e,n);if(st(e.status)||e.status==="unknown"&&st(e.status))return null;const l=s=>new Promise(async(h,b)=>{if(!s.key.trim()||!s.value.trim()){V.error(o("blocklet.config.environment.keyValueRequired")),b();return}if(Er(s.key)===!1){V.error(o("blocklet.config.environment.invalidKey")),b();return}s.custom=xn(s.key);try{const R=await r.api.configBlocklet({input:{did:f,configs:[s]}});c(R.blocklet),h()}catch(R){V.error(ve(R)),b()}}),y=(s,h)=>new Promise(async(b,R)=>{if(s.required&&(!s.key.trim()||!s.value.trim())){V.error(o("blocklet.config.environment.keyValueRequired")),R();return}if(Er(s.key)===!1){V.error(o("blocklet.config.environment.invalidKey")),R();return}if(s.key===be.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const M=ks(s);if(M){V.error(M),R();return}}const E=[{...s,value:s.secure&&s.value==="__encrypted__"?"":s.value}];if(s.key!==h.key){if(!gn(s,e,n)){V.error("Only key of custom env can be changed"),R();return}E.push({key:h.key,custom:xn(s.key)})}try{const M=await r.api.configBlocklet({input:{did:f,configs:E}});c(M.blocklet),b()}catch(M){V.error(ve(M)),R()}}),p=s=>new Promise(async(h,b)=>{if(s.required){V.error(o("blocklet.config.environment.deleteForbidden")),b();return}if(!gn(s,e,n)){V.error(o("environmentTips.deleteForbidden")),b();return}try{const R=await r.api.configBlocklet({input:{did:f,configs:[{key:s.key,custom:xn(s.key)}]}});c(R.blocklet),h()}catch(R){V.error(ve(R)),b()}}),C=(e.configs||[]).filter(s=>!be.BLOCKLET_CONFIGURABLE_KEY[s.key]||[be.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(s.key)),m=X.getSharedConfigObj(n[0],e),v=X.getComponentMissingConfigs(e,n[0]),j=C.map(s=>({...s,value:Object.values(be.CHAIN_PROP_MAP).includes(s.key)&&Object.keys(m).includes(s.key)?m[s.key]:m[s.key]||s.value})),w=j.some(s=>s.key&&s.key.startsWith("BWA_")),S={onRowAdd:l,onRowUpdate:y,onRowDelete:p,isDeletable:d},u=()=>[{title:o("common.key"),field:"key",initialEditValue:"",width:"30%",render:s=>t.jsx(Cr,{value:s.value,style:{color:s.required&&!s.value?i.error.main:i.text.primary,fontWeight:s.required?"bold":"normal"},children:s.key}),editComponent:s=>{const{value:h,rowData:b,onChange:R}=s;return t.jsx(kr,{children:t.jsx(ye,{fullWidth:!0,size:"small",value:Ui.escapeTag(h),onChange:E=>R(E.target.value),variant:"outlined",label:"Key",placeholder:o("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:d(b)===!1}}})})}},{title:o("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:s=>s.value?s.secure?"******":t.jsx(Cr,{unstyled:!0,value:s.value,style:{wordBreak:"break-all"},children:s.value}):null,editComponent:s=>{const{value:h,rowData:b,onChange:R}=s;return t.jsxs(kr,{children:[t.jsx(ye,{fullWidth:!0,size:"small",value:h==="__encrypted__"?"":h,onChange:E=>R(E.target.value),variant:"outlined",label:o("common.value"),placeholder:o("blocklet.config.environment.value"),margin:"dense"}),Aa(b,o)]})}}];return t.jsxs(Ma,{children:[!!v.length&&t.jsx(Un,{severity:"error",style:{marginTop:24},children:o("blocklet.config.missingRequired")}),w&&t.jsx(Un,{severity:"info",children:o("blocklet.config.environment.tip")}),t.jsx(Ln,{permission:a?"":"mutate_blocklets",role:a?ft:[],children:s=>t.jsx(Di,{className:"config-table",children:t.jsx(Bi,{title:t.jsx(B,{sx:{fontWeight:"bold"},children:o("common.environments")}),columns:u(),icons:La,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:o("common.actions")},body:{emptyDataSourceMessage:o("common.noData"),editRow:{deleteText:o("environmentTips.delete")}}},data:j,editable:s?S:{}})})})]})}No.propTypes={blocklet:x.object.isRequired,ancestors:x.array};const Ma=se.div`
|
|
3
|
+
.config-table {
|
|
4
|
+
margin-bottom: 24px;
|
|
5
|
+
position: relative;
|
|
6
|
+
.hide-control {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 10px;
|
|
9
|
+
left: 200px;
|
|
10
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
11
|
+
left: 160px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.MuiToolbar-root {
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.MuiTableRow-head {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.hide-header {
|
|
24
|
+
.MuiToolbar-root {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.accordion {
|
|
31
|
+
margin-bottom: 16px;
|
|
32
|
+
&:last-of-type {
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
padding: 8px 0 8px 0px;
|
|
36
|
+
&.MuiAccordion-root {
|
|
37
|
+
background: transparent;
|
|
38
|
+
box-shadow: none;
|
|
39
|
+
border: 1px solid #ddd;
|
|
40
|
+
border-radius: 4px;
|
|
41
|
+
&::before,
|
|
42
|
+
&::after {
|
|
43
|
+
height: 0;
|
|
44
|
+
}
|
|
45
|
+
.MuiAccordionSummary-root {
|
|
46
|
+
padding-left: 0;
|
|
47
|
+
}
|
|
48
|
+
.accordion-title {
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
padding-left: 16px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`,kr=se.div`
|
|
55
|
+
height: 60px;
|
|
56
|
+
`;function Xn({open:e=!1,onClose:n=null,hiddenChildren:r=!1,blocklet:i,ancestors:a=[],children:o=null}){const[f,c]=k.useState(!1),{t:d}=le(),l=d("environmentFor",{name:X.getDisplayName(i,!0)});if(st(i.status)||i.status==="unknown"&&st(i.status))return null;const y=()=>{n?.(),c(!1)},p=m=>{m.stopPropagation(),c(!0)};let C=null;return r||(C=typeof o=="function"?o({open:p}):t.jsx(he,{onClick:p,"data-cy":"action-config-component",children:t.jsx(jo,{})})),t.jsxs(t.Fragment,{children:[C,(e||f)&&t.jsx(za,{open:!0,fullWidth:!0,maxWidth:"md",title:l,onClose:y,PaperProps:{style:{minHeight:"auto",backgroundImage:"none"}},children:t.jsxs(uo,{sx:{gap:0},children:[t.jsx(ce,{sx:{fontSize:12,color:"text.secondary",mb:.5},children:d("description.environment",{name:X.getDisplayName(i,!0)})}),t.jsx(No,{blocklet:i,ancestors:a})]})})]})}Xn.propTypes={blocklet:x.object.isRequired,ancestors:x.array,children:x.any,open:x.bool,onClose:x.func,hiddenChildren:x.bool};const za=se(Zt)`
|
|
57
|
+
.MuiDialogContent-root {
|
|
58
|
+
padding-top: 0;
|
|
59
|
+
padding-bottom: 24px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.MuiToolbar-root {
|
|
63
|
+
padding-right: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ux-dialog_closeButton {
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
`,Fa=k.lazy(()=>Ps(()=>import("./index-CaFQZBnI.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(e=>({default:e.Uploader}))),qa="/blocklet/component/upload",Rr=[".html",".htm",".tgz",".zip"],$a=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||K.MAX_UPLOAD_FILE_SIZE,Wa=$a*1024*1024;function Lo({did:e,prefix:n,headers:r=()=>({}),onUploaded:i=mt,open:a=!1,onClose:o=mt}){const{t:f,locale:c}=le(),d=k.useRef(null),l=k.useCallback(y=>{const{status:p,data:C}=y;if(p===200){i(C);return}V.error(f("blocklet.component.addComponentTip.uploadFailed"))},[i,f]);return k.useEffect(()=>{a?d.current?.open():d.current?.close()},[a]),t.jsx(Ha,{id:`component-uploader-${e}`,children:t.jsx(Fa,{ref:d,locale:c,popup:!0,onUploadFinish:l,plugins:[],onClose:o,installerProps:{disabled:!0},apiPathProps:{uploader:we(n,qa,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:Rr,maxFileSize:Wa,maxNumberOfFiles:1}},tusProps:{headers:r},dashboardProps:{note:f("blocklet.component.addComponentTip.allowedFileTypes",{types:Rr.map(y=>y.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}Lo.propTypes={did:x.string.isRequired,prefix:x.string.isRequired,open:x.bool,headers:x.func,onUploaded:x.func,onClose:x.func};const Ha=Rs(B)`
|
|
70
|
+
.uploader-wrapper {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
position: relative;
|
|
73
|
+
font-size: 0px;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
&.enabled {
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
&::after {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
&.enabled::after {
|
|
82
|
+
display: block;
|
|
83
|
+
opacity: 1;
|
|
84
|
+
position: absolute;
|
|
85
|
+
bottom: 0;
|
|
86
|
+
background: rgba(0, 0, 0, 0.3);
|
|
87
|
+
left: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
height: 2.2em;
|
|
90
|
+
color: white;
|
|
91
|
+
text-align: center;
|
|
92
|
+
font-size: 12px;
|
|
93
|
+
line-height: 2em;
|
|
94
|
+
transition: opacity 0.3s ease;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`,Qn={description:x.string,editing:x.bool,onChange:x.func,required:x.bool,value:x.any,componentProps:x.object,render:x.func,renderFormItem:x.func};function Jn({editing:e,value:n,onChange:r}){const[i,a]=k.useState(!1),o=k.useRef(),f=k.useRef(n);k.useEffect(()=>{let p=null;return e&&(p=setTimeout(()=>{a(!0)},50)),()=>{clearTimeout(p)}},[e]);const c=p=>{f.current=p,r(p)},d=()=>{a(!1),r(f.current)},l=t.jsx(B,{className:"form-item-input slot",sx:{px:1},children:t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[n,n!=="auto"&&t.jsx("div",{style:{marginLeft:4,backgroundColor:n,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),y=t.jsxs(B,{onKeyDown:d,sx:{display:"flex",flexGrow:1,alignItems:"center",height:"40px"},children:[t.jsx(B,{onClick:()=>a(!0),sx:{display:"flex",alignItems:"center"},children:t.jsx("div",{ref:o,style:{flexShrink:0,marginLeft:"8px",backgroundColor:n,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:n==="auto"?"default":"pointer"}})}),t.jsx(Ts,{open:i,anchorEl:o.current,onClose:()=>a(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:t.jsx(ha,{color:n,onChange:p=>c(p.hex)})})]});return e?y:l}Jn.propTypes=Qn;function Ao({editing:e,description:n,value:r,onChange:i,componentProps:a={},...o}){const{placeholder:f}=a,c=k.useRef(r),{t:d}=k.useContext(_e),l=p=>{p.key==="Enter"&&i(c.current,"confirm")},y=p=>{c.current=p,i(p)};return e?t.jsx(ye,{style:{flex:1},fullWidth:!0,value:r,onChange:p=>{p.persist(),y(p.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:n||f,onKeyDown:l,...o}):t.jsx(B,{className:"form-item-input slot",sx:{px:1},children:r||t.jsx("span",{className:"placeholder",children:d("common.requiredInputPlaceholder",{name:n||f})})})}Ao.propTypes=Qn;function Mo({editing:e,value:n,onChange:r,componentProps:i,...a}){const{blocklet:o}=i,f=n==="auto"?Is(o.appDid):n;return t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[t.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:Ds({title:"Owner",issuer:X.getDisplayName(o),issuerDid:o.appDid,ownerName:"Your Name",ownerDid:o.appDid,preferredColor:n||"auto"})}}),t.jsx(Jn,{...a,editing:e,value:e?f:n,onChange:r,componentProps:i})]})}Mo.propTypes={...Qn,componentProps:x.shape({blocklet:x.object.isRequired}).isRequired};const Ka=Wn`
|
|
98
|
+
0%, 100% {
|
|
99
|
+
transform: scale(1) translateX(0);
|
|
100
|
+
}
|
|
101
|
+
50% {
|
|
102
|
+
transform: scale(1.05) translateX(-3px);
|
|
103
|
+
}
|
|
104
|
+
25%, 75% {
|
|
105
|
+
transform: scale(1.1) translateX(3px);
|
|
106
|
+
}
|
|
107
|
+
`,Ga={input:Ao,color:Jn,passport:Mo,uploader:e=>t.jsx(Ni,{...e.componentProps})};function Va(e,{editing:n=!1}){const{componentType:r="input",render:i,renderFormItem:a}=e;return n&&a?a:!n&&i?i:Ga[r?.toLowerCase()]}er.propTypes={item:x.object.isRequired,findEditingItem:x.func.isRequired,getItemValue:x.func.isRequired,onFormItemChange:x.func.isRequired,onFocusOut:x.func.isRequired,disabled:x.bool,loading:x.bool,onCancel:x.func,formValues:x.object.isRequired};function er({item:e,findEditingItem:n,getItemValue:r,onFormItemChange:i,onFocusOut:a,disabled:o=!1,loading:f=!1,onCancel:c=()=>{},formValues:d}){const{key:l,description:y,required:p,solo:C=!1,hidden:m=!1,componentProps:v={},skipButtonDisabled:j=!1}=e;if(m)return null;const w=n(l),{editing:S,shaking:u}=w??{},s=r(e,{editing:S}),h=Va(e,{editing:S}),b={inputProps:{"data-cy":"schema-form-item-component"},key:l,description:y,editing:S,value:s,onChange:(R,E="change")=>i(e,R,E),componentProps:v,skipButtonDisabled:j,onBlur:()=>a(e)};return e.componentType==="collapse"&&e.children?.length>0?t.jsxs(ua,{children:[t.jsx(pa,{expandIcon:t.jsx(fa,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:e.description}),t.jsx(ma,{children:e.children.map(R=>t.jsx(er,{item:R,findEditingItem:n,getItemValue:r,onFormItemChange:i,onFocusOut:a,formValues:d,disabled:o,loading:f,onCancel:c},R.key))})]}):t.jsxs(B,{className:"form-item",children:[!C&&t.jsxs(B,{className:"form-item-label",sx:{color:p&&!s?"error.main":"text.secondary"},children:[y,p&&t.jsx(ot,{})]}),t.jsxs(B,{className:"form-item-body",children:[t.jsx(B,{className:"form-item-input","data-cy":"schema-form-item-edit",sx:{textAlign:C?"center":"left"},style:{cursor:"text"},onClick:()=>{o||w?.edited||j||i(e,d[l],"edit")},children:t.jsx(h,{...b})}),!C&&t.jsx(B,{className:"form-item-action",style:{marginLeft:0},children:S?t.jsxs(t.Fragment,{children:[w.edited?t.jsx(he,{"data-cy":"schema-form-item-confirm",onClick:()=>{i(e,s,"confirm")},disabled:o||f,sx:{animation:u?`${Ka} 0.5s linear`:"none"},style:{paddingRight:4},size:"large",children:f?t.jsx(je,{size:24}):t.jsx(ko,{})}):null,t.jsx(he,{"data-cy":"schema-form-item-cancel",onClick:()=>c(e),style:{paddingLeft:w.edited?4:8},disabled:o||f,size:"large",children:t.jsx(po,{})})]}):null})]})]},l)}function zo({schema:e,loading:n=!1,value:r=void 0,defaultValue:i={},onChange:a,style:o={},disabled:f=!1}){const c=Object.prototype.toString.call(r)==="[object Object]",[d,l]=k.useState([]),[y,p]=k.useState(c?r:i),C=k.useMemo(()=>e.length===1,[e]),m=k.useCallback(h=>d.find(b=>b.key===h),[d]);k.useEffect(()=>{C&&e[0]?.required&&l([{key:e[0].key,editing:!0,initialValue:i[e[0].key]}])},[e,C,i]);const v=k.useCallback(h=>{l(b=>b.find(E=>E.key===h.key)?b.map(E=>E.key===h.key?h:{...E}):[h].concat(b))},[]),j=k.useCallback((h,b,R)=>{const{key:E,secure:M}=h,F=m(E)??{...h};F.editing=!0;const D=y[E]!==b;F.edited=b&&F.initialValue!==b,F.initialValue=i[E];const I={...y,[E]:b};D&&p(I),a({[E]:b},{allValues:I,action:R,currentItem:h}),R==="confirm"&&M&&p({...y,[E]:"__encrypted__"}),R==="confirm"&&(F.initialValue=y[E]),["confirm","cancel"].includes(R)&&(F.editing=!1,F.edited=!1),v(F)},[i,y,a,v,m]),w=k.useCallback((h,{editing:b=!1})=>{const{key:R}=h,E=c?r[R]:y[R];return E==="__encrypted__"?b?"":"******":E},[c,r,y]),S=k.useCallback(h=>{const b=m(h.key);b&&j(h,b.initialValue,"cancel")},[m,j]),u=k.useCallback(h=>{const b=m(h.key);!b||!b.edited||(b.shaking=!0,v(b),setTimeout(()=>{b.shaking=!1,v(b)},500))},[m,v]),s=k.useCallback(h=>{const b=m(h.key);!b||!b.edited?S(h):u(h)},[m,u,S]);return t.jsx(Ya,{className:"form",style:o,children:e?.map(h=>{const{hidden:b=!1}=h;return b?null:t.jsx(er,{item:h,findEditingItem:m,getItemValue:w,onFormItemChange:j,onFocusOut:s,formValues:y,disabled:f,loading:n,onCancel:S})})})}zo.propTypes={schema:x.array.isRequired,loading:x.bool,onChange:x.func.isRequired,value:x.object,defaultValue:x.object,style:x.object,disabled:x.bool};const Ya=se(wo)``;function Fo({meta:e,onCancel:n,mode:r,handlePaySuccess:i=()=>{}}){const{t:a,locale:o}=le(),{info:f}=xe(),c=Bs(f),[d,l]=k.useState(null),y=new URL(e?.registryUrl).origin,p=X.getDisplayName({meta:e}),C=async(v,j)=>{const w=({downloadTokenList:s})=>{i({downloadTokenList:s})},S=s=>{V.error(s),n(s)};function u(s){return Ns(()=>jr.get(s).then(async({data:h})=>{const b=h?.downloadTokenList;if(h.status==="succeed"){if(b&&b.length)await w({downloadTokenList:b});else return await S(a("blocklet.component.missDownloadTokenTip")),!0;return!0}return h.status==="error"?(console.error("vc error: ",h),await S(h?.error),!0):!1}),{interval:1e3})}if(r==="purchase"&&d){const{statusUrl:s}=Us(d);await u(s)}else await w({downloadTokenList:v.downloadTokenList&&j(v.downloadTokenList)})};if(k.useEffect(()=>{if(r==="purchase"){const v=new URL(y);v.pathname="/api/did/verify-purchase-blocklet/token",v.searchParams.set("serverDid",f.did),v.searchParams.set("blockletDid",e?.did);try{jr.get(v.href).then(({data:j})=>{const w=`${j.url}`;l(w)})}catch(j){console.error("get next workflow url error: ",j)}}return()=>{l(null)}},[r]),r==="purchase"&&!d)return"";const m={verify:{action:"verify-purchase-blocklet",checkFn:Kt.create({baseURL:y}).get,extraParams:{serverDid:f.did,blockletDid:e?.did},messages:{title:a("store.purchase.verify.auth.title",{name:p}),scan:a("store.purchase.verify.auth.scan"),confirm:a("store.purchase.verify.auth.confirm"),success:a("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:Kt.create({baseURL:we(y,"/store")}).get,extraParams:{factory:e.nftFactory,nw:d},messages:{title:a("store.purchase.auth.title",{name:p}),scan:a("store.purchase.auth.scan"),confirm:a("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx("p",{children:a("store.purchase.auth.success")}),t.jsx("p",{children:a("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return t.jsx(Os,{open:!0,locale:o,popup:!1,saveConnect:!1,className:"connect",baseUrl:y,onSuccess:C,cancelWhenScanned:n,onClose:n,checkTimeout:60*5e3,webWalletUrl:c,disableClose:!0,showDownload:!1,...m[r]})}Fo.propTypes={...qi,handlePaySuccess:x.func,mode:x.oneOf(["verify","purchase"]).isRequired};function qo({ref:e=null,mode:n,...r}){const[i,a]=k.useState(n!=="both"?n:"verify"),[o,f]=k.useState(n!=="both"?2:1),c=l=>{l!==i&&a(l)},d=()=>{i&&o!==2&&f(2)};return k.useImperativeHandle(e,()=>({onNext:d,getCurrentStep:()=>o})),o===1?t.jsx("div",{style:{maxWidth:520},children:t.jsx(Fi,{action:i,onNext:null,onSelect:c})}):t.jsx(Fo,{...r,mode:i})}qo.propTypes={mode:x.oneOf(["both","verify","purchase"]).isRequired,ref:x.any};function Za({...e}){return t.jsx(Be,{className:"bottom-button",variant:"contained",color:"primary",...e})}function $o({blocklet:e=null,onStartNow:n=()=>{},children:r=null,disabled:i=!1}){const{t:a}=le(),o=To();return!e||Ls(e.meta)?t.jsx(Xa,{children:r}):t.jsxs(Qa,{isMobile:o,children:[t.jsx(Za,{className:"start-now",variant:"contained",color:"primary",disabled:i,onClick:()=>n(),children:a("setup.startNow")}),t.jsx(B,{sx:{display:"flex",alignItems:"center"},children:r})]})}$o.propTypes={blocklet:x.object,onStartNow:x.func,children:x.any,disabled:x.bool};const Xa=se(B)`
|
|
108
|
+
width: 100%;
|
|
109
|
+
margin-top: auto;
|
|
110
|
+
padding-top: 24px;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
.bottom-button {
|
|
115
|
+
min-width: 200px;
|
|
116
|
+
}
|
|
117
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
118
|
+
.bottom-button {
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`,Qa=se(B)`
|
|
123
|
+
padding-top: 24px;
|
|
124
|
+
margin-top: auto;
|
|
125
|
+
width: 100%;
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: space-between;
|
|
129
|
+
.start-now {
|
|
130
|
+
min-width: 140px;
|
|
131
|
+
}
|
|
132
|
+
.bottom-button {
|
|
133
|
+
min-width: 120px;
|
|
134
|
+
}
|
|
135
|
+
${e=>e.theme.breakpoints.down("lg")} {
|
|
136
|
+
width: 100%;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
140
|
+
.start-now {
|
|
141
|
+
min-width: inherit;
|
|
142
|
+
}
|
|
143
|
+
.bottom-button {
|
|
144
|
+
min-width: 100px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
${e=>e.isMobile} {
|
|
149
|
+
justify-content: space-between;
|
|
150
|
+
gap: '32px',
|
|
151
|
+
}}
|
|
152
|
+
`;function Wo({blockletMeta:e,onEndpointUpdate:n=()=>{}}){const r=To(),{blocklet:i}=De(),{updateSpaceGateway:a,loading:o,hasStorageEndpoint:f}=ra();return k.useEffect(()=>{n?.()},[i]),o?t.jsx(As,{relative:"parent",children:t.jsx(je,{})}):t.jsxs(Ja,{children:[t.jsx(B,{sx:{width:r?"360px":"720px"},children:f?t.jsx(oa,{}):t.jsx(sa,{})}),e?.capabilities?.didSpace==="required"&&t.jsx($o,{mt:8,children:t.jsx(ia,{onConnect:a})})]})}Wo.propTypes={blockletMeta:x.any.isRequired,onEndpointUpdate:Ms.func};const Ja=se(la)`
|
|
153
|
+
height: 100%;
|
|
154
|
+
overflow-y: auto;
|
|
155
|
+
padding-bottom: 32px;
|
|
156
|
+
overflow-x: hidden;
|
|
157
|
+
`;function Ho({onChange:e=()=>{},loading:n=!1,children:r,extra:i="",stores:a=[],storageKey:o=""}){const{t:f}=le(),{info:c,inService:d}=xe(),{blocklet:l}=De(),[y,p]=k.useState(!1),C=k.useRef(null),[m,v]=k.useState(),[j,w]=ba(o||"tmp"),[S,u]=o?[j,w]:[m,v],{storeList:s,teamDid:h}=fo({fromBlocklet:d,blocklet:l,nodeInfo:c}),b=mo([...a.map(E=>({...E,protected:!0})),...s],"url"),R=S&&b.find(E=>S===E.url)||b[0];return t.jsxs(t.Fragment,{children:[t.jsxs(el,{children:[t.jsx(Be,{ref:C,color:"primary","data-cy":"add-component-select-store",endIcon:t.jsx(Ca,{color:"primary"}),onClick:()=>{p(!0)},style:{padding:"0 2px"},children:t.jsx(ce,{color:"primary",children:R.name})}),t.jsx(ce,{color:"primary",children:i})]}),t.jsxs(ye,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:f("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:R,autoFocus:!0,onChange:E=>{const M=E.target.value;u(M.url),e(M)},style:{display:"none"},margin:"normal",slotProps:{select:{open:y,MenuProps:{anchorEl:C.current},renderValue:E=>E?.name,onClose:()=>{p(!1)}}},children:[b?.map(E=>t.jsx(Ne,{sx:{width:"400px",maxWidth:"90vw"},value:E,"data-cy":E.url,children:t.jsx($i,{teamDid:h,store:E,onDelete:()=>{S===E.url&&u(b[0]?.url)}})},E.url)),!_o.isInServerlessMode(c)&&t.jsx(Wi,{disabled:n,storeList:b,teamDid:h,onAdd:E=>{u(E)}})]}),r({currentRegistry:R})]})}Ho.propTypes={onChange:x.func,loading:x.bool,children:x.any.isRequired,extra:x.node,storageKey:x.string,stores:x.arrayOf(x.shape({name:x.string.isRequired,url:x.string.isRequired}))};const el=se.div`
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: space-between;
|
|
160
|
+
align-items: center;
|
|
161
|
+
margin-bottom: 16px;
|
|
162
|
+
|
|
163
|
+
span {
|
|
164
|
+
font-size: 16px;
|
|
165
|
+
color: ${e=>e.theme.palette.text.primary};
|
|
166
|
+
// font-weight: bold;
|
|
167
|
+
}
|
|
168
|
+
`,tl={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm0 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zm0-8h6m-3-3v6"/>'},nl={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m17 10l-2-6m-8 6l2-6m4 16H7.244a3 3 0 0 1-2.965-2.544l-1.255-7.152A2 2 0 0 1 5.001 8H19a2 2 0 0 1 1.977 2.304"/><path d="M10 14a2 2 0 1 0 4 0a2 2 0 0 0-4 0m11 1h-2.5a1.5 1.5 0 0 0 0 3h1a1.5 1.5 0 0 1 0 3H17m2 0v1m0-8v1"/></g>'},rl={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m7 11l5-5l5 5M7 17l5-5l5 5"/>'},ol=(e,n)=>we(n,`/blocklets/${e.did}`),Pr=({blocklet:e,attribute:n,value:r})=>e._formatted?e._formatted[n]:r,sl=e=>e.inStore&&X.isFreeBlocklet(e)===!1;function Ko({blocklet:e,blocklets:n=[],handleButtonClick:r=null,endpoint:i="",serverVersion:a=""}){const{t:o}=le();let f=we(i,Hs(e.did,e.logo||""));try{const w=new URL(f);w.searchParams.set("v",e.version||+new Date),f=w.href}catch{}const[c,d]=k.useState(!1),l=async()=>{try{d(!0),await r({meta:e,registryUrl:i,blocklets:n})}catch(w){V.error(w.message)}finally{d(!1)}},{blocklet:y}=De(),p=()=>(y?.children||[]).find(u=>u.meta.bundleDid===e.did).meta.version,m=(()=>{const w=(y?.children||[]).find(S=>S.meta.bundleDid===e.did);if(w){try{const S=w.meta.version,u=e.version;if(Ks.gt(u,S))return"upgrade"}catch{return"install"}return"disable"}return"install"})(),v=e.requirements?.server,j=[];return m==="upgrade"?j.push({key:"upgrade",icon:t.jsx(pe,{icon:rl,color:"success.light",width:20,height:20},"version"),title:`${p()} -> ${e.version}`,align:"right",color:"success.light",maxWidth:300,text:t.jsx(B,{sx:{fontWeight:"bold"},children:o("blocklet.component.upgradeAvailable")})}):m==="disable"?j.push({key:"disable",icon:t.jsx(pe,{icon:tl,color:"text.disabled",width:20,height:20},"disable"),align:"right",maxWidth:300,color:"text.disabled",text:o("blocklet.component.installed")}):sl(e)&&j.push({key:"purchase",icon:t.jsx(pe,{icon:nl,color:"primary.main",width:20,height:20},"purchase"),align:"right",maxWidth:300,color:"primary.main",text:o("blocklet.component.needBuy")}),t.jsx(il,{title:Pr({blocklet:e,attribute:"title",value:e.title||e.name}),did:e.did,description:Pr({blocklet:e,attribute:"description",value:e.description}),cover:e.logo?f:"",version:e.version,onButtonClick:null,"data-cy":"install-blocklet",sx:m!=="disable"?{"&:hover, && *":{cursor:"pointer"}}:{"&:after, &:before":{content:'""',opacity:"0 !important"}},onMainClick:m==="disable"?void 0:l,icons:e.docker?.image?[{key:"docker",icon:t.jsx(B,{sx:{display:"flex",color:"primary.main"},children:t.jsx(pe,{icon:So})}),title:o("blocklet.dockerImage")}]:[],official:e.isOfficial?{tooltip:o("blocklet.component.isOfficial")}:void 0,download:e.stats.downloads,status:j,button:t.jsx(Ki,{serverVersion:a,requirementVersion:v,size:"small",children:t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(Gi,{children:t.jsx(Be,{size:"small",disabled:c,variant:"outlined",color:"primary",onClick:w=>{w.preventDefault(),w.stopPropagation();const S=ol(e,i);S&&window.open(S,"_blank","noopener,noreferrer")},children:o("common.detail")},e.did)})})})})}Ko.propTypes={blocklet:x.object.isRequired,blocklets:x.array,handleButtonClick:x.func,endpoint:x.string,serverVersion:x.string};function Go({handleButtonClick:e=null,handleSearchSelect:n=null,storeUrl:r,handleBlockletRender:i=null,extraFilter:a=void 0,serverVersion:o="",resourceType:f="",resourceDid:c="",showResourcesSwitch:d=!0,showCategory:l=!0,compact:y=!1,...p}){const C=gt(),{locale:m}=le(),[v,j]=k.useState(!1),[w,S]=k.useState({}),u=b=>{S(b)},s=r,h=k.useMemo(()=>zs(C,{palette:{background:{default:C.palette.background.paper}}}),[C]);return k.useEffect(()=>{S({showResources:!0,resourceType:f,resourceDid:c})},[s,f,c]),k.useEffect(()=>{j(!0),S({showResources:!0,resourceType:f,resourceDid:c})},[]),t.jsx(Fs,{theme:h,children:t.jsx(qs,{FallbackComponent:$s,resetKeys:[s],children:t.jsxs(B,{...p,sx:Ws({overflow:"auto",".title-bar + div":{height:"unset"}},p.sx),children:[v&&t.jsx(Hi,{showCategory:l,showResourcesSwitch:d,blockletRender:b=>{const R={...b,handleButtonClick:e,endpoint:s};return i({...b,defaultRender:t.jsx(Ko,{...R})})},compact:y,minItemWidth:300,baseSearch:!0,endpoint:s,locale:m,onFilterChange:u,onSearchSelect:n,filters:w,extraFilter:a,serverVersion:o,fetchCategoryDelay:500}),t.jsx(B,{sx:{mt:2},children:" "})]})})})}Go.propTypes={storeUrl:x.string.isRequired,handleButtonClick:x.func,handleSearchSelect:x.func,handleBlockletRender:x.func,extraFilter:x.func,serverVersion:x.string,resourceType:x.string,resourceDid:x.string,showResourcesSwitch:x.bool,showCategory:x.bool,compact:x.bool};const il=se(Vi)`
|
|
169
|
+
.ms-highlight {
|
|
170
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
171
|
+
}
|
|
172
|
+
`;function Vo({ref:e=null,meta:n=null,isMobile:r,onStepChange:i}){const a=gt(),{steps:o,activeStep:f,setActiveStepByKey:c,setActiveStepByIndex:d}=Ji(),{t:l,locale:y}=le(),p=o[f];return k.useEffect(()=>{i(f)},[i,f]),k.useImperativeHandle(e,()=>({setActiveStepByKey:c,setActiveStepByIndex:d})),t.jsx(ll,{component:"div",className:r?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-of-type":{flex:{md:1}}},children:t.jsx(ea,{locale:y,blockletMeta:{title:" ",...n},pcWidth:"100%",pcHeight:"100%",logoUrl:n&&n.logo&&n.registryUrl?Gs({did:n.did,version:n.version,baseUrl:n.registryUrl,logoPath:n.logo}):null,theme:a,stepTip:l("blocklet.component.add"),children:t.jsx(al,{children:typeof p?.body=="function"?p.body():p?.body})})})}Vo.propTypes={ref:x.any,meta:x.any,onStepChange:x.func.isRequired,isMobile:x.bool.isRequired};const Tr=e=>e.isMobile?`
|
|
173
|
+
height: calc(100vh - 56px - 64px - 48px);
|
|
174
|
+
`:"",al=se.div`
|
|
175
|
+
width: 100%;
|
|
176
|
+
height: 100%;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
justify-content: flex-start;
|
|
180
|
+
align-items: flex-start;
|
|
181
|
+
|
|
182
|
+
.bottom-button {
|
|
183
|
+
min-width: 200px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// blocklet-select-side
|
|
187
|
+
aside {
|
|
188
|
+
width: 140px;
|
|
189
|
+
}
|
|
190
|
+
`,ll=se(B)`
|
|
191
|
+
${({className:e})=>e==="mobileStyle"?`
|
|
192
|
+
& > div{
|
|
193
|
+
height: 100%;
|
|
194
|
+
}
|
|
195
|
+
.root-header {
|
|
196
|
+
.app-name-content {
|
|
197
|
+
display: none;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// content-panel
|
|
202
|
+
.root-header + div{
|
|
203
|
+
padding-top: 0;
|
|
204
|
+
position: relative;
|
|
205
|
+
& > div {
|
|
206
|
+
padding-top: 0;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
header + div {
|
|
211
|
+
padding-top: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
header {
|
|
215
|
+
.header-title {
|
|
216
|
+
margin-left: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.header-title-name {
|
|
220
|
+
max-width: 100% !important;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
.app-content {
|
|
224
|
+
padding: 0!important;
|
|
225
|
+
}
|
|
226
|
+
`:`
|
|
227
|
+
position: relative;
|
|
228
|
+
.ll-container { // 通过 Launcher Layout 组件约定的 .ll-container class 自定义 Layout 样式
|
|
229
|
+
width: 100%;
|
|
230
|
+
height: 100%;
|
|
231
|
+
border-radius: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.root-header {
|
|
235
|
+
z-index: auto !important;
|
|
236
|
+
position: fixed !important;
|
|
237
|
+
}
|
|
238
|
+
& > div {
|
|
239
|
+
height: 100%;
|
|
240
|
+
width: 100%;
|
|
241
|
+
max-width: 100%;
|
|
242
|
+
& > div {
|
|
243
|
+
max-height: unset !important;
|
|
244
|
+
max-width: 100%;
|
|
245
|
+
& > div {
|
|
246
|
+
// left-panel
|
|
247
|
+
&:first-of-type {
|
|
248
|
+
padding: 0;
|
|
249
|
+
width: 20%;
|
|
250
|
+
min-width: 180px;
|
|
251
|
+
|
|
252
|
+
& > div:first-of-type {
|
|
253
|
+
display: none;
|
|
254
|
+
}
|
|
255
|
+
// step
|
|
256
|
+
& > div:last-child {
|
|
257
|
+
// margin-top: 32px;
|
|
258
|
+
margin-top: 0;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
// right-panel
|
|
262
|
+
&:last-child {
|
|
263
|
+
padding-top: 0;
|
|
264
|
+
padding-right: 0px;
|
|
265
|
+
overflow-y: hidden;
|
|
266
|
+
.app-content {
|
|
267
|
+
padding: 0 0 24px 0;
|
|
268
|
+
}
|
|
269
|
+
.button-container {
|
|
270
|
+
padding-right: 0;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
`}
|
|
278
|
+
|
|
279
|
+
& .ll-container {
|
|
280
|
+
background: ${({theme:e})=>e.palette.background.paper};
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
& .app-overview {
|
|
284
|
+
margin-left: 0 !important;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
& .flex-justify-center {
|
|
288
|
+
display: flex;
|
|
289
|
+
justify-content: center;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
& .flex-align-center {
|
|
293
|
+
display: flex;
|
|
294
|
+
height: 100%;
|
|
295
|
+
align-items: center;
|
|
296
|
+
${e=>Tr(e)}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
& .agreement-wrapper {
|
|
300
|
+
${e=>Tr(e)}
|
|
301
|
+
max-height: 60vh;
|
|
302
|
+
.eula-trigger {
|
|
303
|
+
padding-right: 0;
|
|
304
|
+
}
|
|
305
|
+
.next-button {
|
|
306
|
+
display: none;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
& .connect {
|
|
311
|
+
background: white;
|
|
312
|
+
}
|
|
313
|
+
`,cl=Wn`
|
|
314
|
+
0%, 100% {
|
|
315
|
+
transform: scale(1) translateX(0);
|
|
316
|
+
}
|
|
317
|
+
50% {
|
|
318
|
+
transform: scale(1.05) translateX(-3px);
|
|
319
|
+
}
|
|
320
|
+
25%, 75% {
|
|
321
|
+
transform: scale(1.1) translateX(3px);
|
|
322
|
+
}
|
|
323
|
+
`;function Dt({src:e,alt:n,size:r=20}){return t.jsx("img",{src:e,alt:n,style:{width:r,height:r,display:"block",objectFit:"contain",borderRadius:"2px",flexShrink:0},onError:i=>{i.target.style.display="none"}})}Dt.propTypes={src:x.string.isRequired,alt:x.string.isRequired,size:x.number};const dl=48,ul=8,Ir={PaperProps:{style:{maxHeight:dl*4.5+ul,width:250}}},pl=(e,n,r)=>({fontWeight:n.indexOf(e)===-1?r.typography.fontWeightRegular:r.typography.fontWeightMedium});function Yo({label:e="",disabled:n=!1,required:r=!1,initialValue:i="",onChange:a=()=>{},sx:o={},onSubmit:f=()=>{},triggers:c=[],options:d=[],formatterBeforeSubmit:l=j=>j.join(","),helperText:y="",config:p={},directEditing:C=!1,searchable:m=!0,...v}){const j=gt(),[w,S]=k.useState(C),[u,s]=k.useState(!1),[h,b]=k.useState(""),{multiple:R=!1,labelField:E="name",valueField:M="code"}=p,[F,P]=k.useState(i),[D,I]=k.useState(F),[L,z]=k.useState(!1),[q,G]=k.useState(!1),ne=k.useCallback(()=>{G(!0),setTimeout(()=>{G(!1)},500)},[]),oe=async()=>{s(!0);try{await f(typeof l=="function"&&R?l(D):D)===!1?I(F):(I(D),P(D),z(!1))}catch{I(F)}finally{s(!1),S(!1)}},U=k.useCallback(()=>{C&&!n&&!u&&oe(),L&&ne(),!L&&!n&&!u&&(S(!1),z(!1))},[C,n,u,L,ne]);k.useEffect(()=>{const g=i;g!==F&&(P(g),I(g),z(!1))},[i,F]);const ie=d.filter(g=>{if(!h)return!0;const _=h.toLowerCase();return g[E]?.toLowerCase().includes(_)||g[M]?.toLowerCase().includes(_)}),N=g=>{let{value:_}=g.target;R&&(_=typeof _=="string"?_.split(","):_),z(_!==D),I(_),a(_)},O=w||C?t.jsxs(Vs,{value:D,onChange:N,fullWidth:!0,multiple:R,variant:"outlined",margin:"dense",onBlur:U,disabled:n,renderValue:g=>{if(R)return t.jsx(B,{sx:{display:"flex",flexWrap:"wrap"},children:g.filter(T=>d.some($=>$[M]===T)).map(T=>t.jsx(cr,{label:d.find($=>$[M]===T)[E],style:{marginRight:8},size:"small"},T))});if(!g)return null;const _=d.find(T=>T[M]===g);return t.jsxs(B,{sx:{display:"flex",alignItems:"center",gap:1},children:[_?.logo&&t.jsx(Dt,{src:_.logo,alt:_[E],size:20}),t.jsx("span",{children:_?_[E]:""})]})},MenuProps:{...Ir,PaperProps:{...Ir.PaperProps}},error:!!y,...v,children:[m?t.jsx(B,{sx:{p:1,borderBottom:1,borderColor:"divider"},children:t.jsx(ye,{size:"small",placeholder:"Search...",value:h,onChange:g=>b(g.target.value),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),fullWidth:!0,variant:"outlined"})}):null,ie.map(g=>t.jsx(Ne,{value:g[M],style:pl(g[M],D,j),children:t.jsxs(B,{sx:{display:"flex",alignItems:"center",gap:1},children:[g.logo&&t.jsx(Dt,{src:g.logo,alt:g[E],size:20}),t.jsx("span",{children:g[E]})]})},g[M]))]}):t.jsx(B,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},sx:{px:1},onClick:()=>{n||S(!0)},children:R?D.filter(g=>d.some(_=>_[M]===g)).map(g=>t.jsx(cr,{label:d.find(_=>_[M]===g)[E],style:{marginRight:8},size:"small"},g)):D&&d.some(g=>g[M]===D)&&t.jsxs(B,{sx:{display:"flex",alignItems:"center",gap:1},children:[(()=>{const g=d.find(_=>_[M]===D);return g?.logo?t.jsx(Dt,{src:g.logo,alt:g[E],size:20}):null})(),t.jsx("span",{children:d.find(g=>g[M]===D)[E]})]})});return t.jsx(wo,{className:"form",sx:o,children:t.jsxs(B,{className:"form-item",children:[t.jsxs(B,{className:"form-item-label",children:[e,r&&t.jsx(ot,{})]}),t.jsxs(B,{className:"form-item-body",children:[t.jsx(B,{className:"form-item-input",children:O}),t.jsx(B,{className:"form-item-action",style:!w||C?{marginLeft:0}:{},children:w&&!C?t.jsxs(t.Fragment,{children:[L?t.jsx(he,{"data-cy":"schema-form-item-confirm",onClick:oe,disabled:n||u,sx:{animation:q?`${cl} 0.5s linear`:"none"},size:"large",children:u?t.jsx(je,{size:24}):t.jsx(ko,{})}):null,t.jsx(he,{"data-cy":"schema-form-item-cancel",onClick:()=>{I(F),S(!1)},disabled:n||u,size:"large",children:t.jsx(po,{})})]}):t.jsx(B,{children:c.length?t.jsx(Li,{triggers:c,disabled:n}):null})})]}),w&&y&&t.jsx(Ys,{error:!0,children:y})]})})}Yo.propTypes={sx:x.object,onSubmit:x.func,onChange:x.func,label:x.string,initialValue:x.string,required:x.bool,disabled:x.bool,triggers:x.array,options:x.array,helperText:x.string,formatterBeforeSubmit:x.func,config:x.object,directEditing:x.bool,searchable:x.bool};const Ke={};function fl(e){Ke[e]&&(clearTimeout(Ke[e]),delete Ke[e])}async function ml(e,{interval:n=1e3,maxDuration:r=120*1e3,intervalFirst:i=4e3,timerKey:a=""}){Ke[a]&&clearTimeout(Ke[a]),await new Promise(c=>setTimeout(c,i));const o=Date.now(),f=async(c,d)=>{try{const l=await e();c(l)}catch(l){Date.now()-o>r?d(l):a?Ke[a]=setTimeout(()=>f(c,d),n):setTimeout(()=>f(c,d),n)}};return new Promise(f)}function hl(e,{did:n,refresh:r,t:i,providerName:a,values:o,timerKey:f}){return ml(async()=>{const{blocklet:c}=await e.getBlocklet({input:{did:n}}),d=Zs(c,"settings.aigne",{}),{url:l,key:y,provider:p}=d||{},{key:C}=o;if(p==="aigneHub"){if(!l||!y)throw new Error(i("setting.aigne.connectTimeOut",{provider:a}));if(C&&C===y)throw new Error(i("setting.aigne.connectTimeOut",{provider:a}));await r(),clearTimeout(Ke[`connect-aigne-${n}`])}else{if(!C||C!==y)throw new Error(i("setting.aigne.connectTimeOut",{provider:a}));await r(),clearTimeout(Ke[`connect-aigne-${n}`])}},{timerKey:f,maxDuration:3*60*1e3})}var ke={},Bt={exports:{}},Ot={exports:{}},gl=Ot.exports,Dr;function Oe(){return Dr||(Dr=1,function(e,n){(function(r,i){e.exports=i()})(gl,function(){var r=r||function(i,a){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof It<"u"&&It.crypto&&(o=It.crypto),!o&&typeof Xs=="function")try{o=ho()}catch{}var f=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function u(){}return function(s){var h;return u.prototype=s,h=new u,u.prototype=null,h}}(),d={},l=d.lib={},y=l.Base=function(){return{extend:function(u){var s=c(this);return u&&s.mixIn(u),(!s.hasOwnProperty("init")||this.init===s.init)&&(s.init=function(){s.$super.init.apply(this,arguments)}),s.init.prototype=s,s.$super=this,s},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var s in u)u.hasOwnProperty(s)&&(this[s]=u[s]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=l.WordArray=y.extend({init:function(u,s){u=this.words=u||[],s!=a?this.sigBytes=s:this.sigBytes=u.length*4},toString:function(u){return(u||m).stringify(this)},concat:function(u){var s=this.words,h=u.words,b=this.sigBytes,R=u.sigBytes;if(this.clamp(),b%4)for(var E=0;E<R;E++){var M=h[E>>>2]>>>24-E%4*8&255;s[b+E>>>2]|=M<<24-(b+E)%4*8}else for(var F=0;F<R;F+=4)s[b+F>>>2]=h[F>>>2];return this.sigBytes+=R,this},clamp:function(){var u=this.words,s=this.sigBytes;u[s>>>2]&=4294967295<<32-s%4*8,u.length=i.ceil(s/4)},clone:function(){var u=y.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var s=[],h=0;h<u;h+=4)s.push(f());return new p.init(s,u)}}),C=d.enc={},m=C.Hex={stringify:function(u){for(var s=u.words,h=u.sigBytes,b=[],R=0;R<h;R++){var E=s[R>>>2]>>>24-R%4*8&255;b.push((E>>>4).toString(16)),b.push((E&15).toString(16))}return b.join("")},parse:function(u){for(var s=u.length,h=[],b=0;b<s;b+=2)h[b>>>3]|=parseInt(u.substr(b,2),16)<<24-b%8*4;return new p.init(h,s/2)}},v=C.Latin1={stringify:function(u){for(var s=u.words,h=u.sigBytes,b=[],R=0;R<h;R++){var E=s[R>>>2]>>>24-R%4*8&255;b.push(String.fromCharCode(E))}return b.join("")},parse:function(u){for(var s=u.length,h=[],b=0;b<s;b++)h[b>>>2]|=(u.charCodeAt(b)&255)<<24-b%4*8;return new p.init(h,s)}},j=C.Utf8={stringify:function(u){try{return decodeURIComponent(escape(v.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return v.parse(unescape(encodeURIComponent(u)))}},w=l.BufferedBlockAlgorithm=y.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=j.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var s,h=this._data,b=h.words,R=h.sigBytes,E=this.blockSize,M=E*4,F=R/M;u?F=i.ceil(F):F=i.max((F|0)-this._minBufferSize,0);var P=F*E,D=i.min(P*4,R);if(P){for(var I=0;I<P;I+=E)this._doProcessBlock(b,I);s=b.splice(0,P),h.sigBytes-=D}return new p.init(s,D)},clone:function(){var u=y.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0});l.Hasher=w.extend({cfg:y.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){w.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var s=this._doFinalize();return s},blockSize:16,_createHelper:function(u){return function(s,h){return new u.init(h).finalize(s)}},_createHmacHelper:function(u){return function(s,h){return new S.HMAC.init(u,h).finalize(s)}}});var S=d.algo={};return d}(Math);return r})}(Ot)),Ot.exports}var Ut={exports:{}},xl=Ut.exports,Br;function Zo(){return Br||(Br=1,function(e,n){(function(r,i){e.exports=i(Oe())})(xl,function(r){return function(){var i=r,a=i.lib,o=a.WordArray,f=i.enc;f.Base64={stringify:function(d){var l=d.words,y=d.sigBytes,p=this._map;d.clamp();for(var C=[],m=0;m<y;m+=3)for(var v=l[m>>>2]>>>24-m%4*8&255,j=l[m+1>>>2]>>>24-(m+1)%4*8&255,w=l[m+2>>>2]>>>24-(m+2)%4*8&255,S=v<<16|j<<8|w,u=0;u<4&&m+u*.75<y;u++)C.push(p.charAt(S>>>6*(3-u)&63));var s=p.charAt(64);if(s)for(;C.length%4;)C.push(s);return C.join("")},parse:function(d){var l=d.length,y=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var C=0;C<y.length;C++)p[y.charCodeAt(C)]=C}var m=y.charAt(64);if(m){var v=d.indexOf(m);v!==-1&&(l=v)}return c(d,l,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(d,l,y){for(var p=[],C=0,m=0;m<l;m++)if(m%4){var v=y[d.charCodeAt(m-1)]<<m%4*2,j=y[d.charCodeAt(m)]>>>6-m%4*2,w=v|j;p[C>>>2]|=w<<24-C%4*8,C++}return o.create(p,C)}}(),r.enc.Base64})}(Ut)),Ut.exports}var Nt={exports:{}},yl=Nt.exports,Or;function vl(){return Or||(Or=1,function(e,n){(function(r,i){e.exports=i(Oe())})(yl,function(r){return function(i){var a=r,o=a.lib,f=o.WordArray,c=o.Hasher,d=a.algo,l=[];(function(){for(var j=0;j<64;j++)l[j]=i.abs(i.sin(j+1))*4294967296|0})();var y=d.MD5=c.extend({_doReset:function(){this._hash=new f.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(j,w){for(var S=0;S<16;S++){var u=w+S,s=j[u];j[u]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360}var h=this._hash.words,b=j[w+0],R=j[w+1],E=j[w+2],M=j[w+3],F=j[w+4],P=j[w+5],D=j[w+6],I=j[w+7],L=j[w+8],z=j[w+9],q=j[w+10],G=j[w+11],ne=j[w+12],oe=j[w+13],U=j[w+14],ie=j[w+15],N=h[0],O=h[1],g=h[2],_=h[3];N=p(N,O,g,_,b,7,l[0]),_=p(_,N,O,g,R,12,l[1]),g=p(g,_,N,O,E,17,l[2]),O=p(O,g,_,N,M,22,l[3]),N=p(N,O,g,_,F,7,l[4]),_=p(_,N,O,g,P,12,l[5]),g=p(g,_,N,O,D,17,l[6]),O=p(O,g,_,N,I,22,l[7]),N=p(N,O,g,_,L,7,l[8]),_=p(_,N,O,g,z,12,l[9]),g=p(g,_,N,O,q,17,l[10]),O=p(O,g,_,N,G,22,l[11]),N=p(N,O,g,_,ne,7,l[12]),_=p(_,N,O,g,oe,12,l[13]),g=p(g,_,N,O,U,17,l[14]),O=p(O,g,_,N,ie,22,l[15]),N=C(N,O,g,_,R,5,l[16]),_=C(_,N,O,g,D,9,l[17]),g=C(g,_,N,O,G,14,l[18]),O=C(O,g,_,N,b,20,l[19]),N=C(N,O,g,_,P,5,l[20]),_=C(_,N,O,g,q,9,l[21]),g=C(g,_,N,O,ie,14,l[22]),O=C(O,g,_,N,F,20,l[23]),N=C(N,O,g,_,z,5,l[24]),_=C(_,N,O,g,U,9,l[25]),g=C(g,_,N,O,M,14,l[26]),O=C(O,g,_,N,L,20,l[27]),N=C(N,O,g,_,oe,5,l[28]),_=C(_,N,O,g,E,9,l[29]),g=C(g,_,N,O,I,14,l[30]),O=C(O,g,_,N,ne,20,l[31]),N=m(N,O,g,_,P,4,l[32]),_=m(_,N,O,g,L,11,l[33]),g=m(g,_,N,O,G,16,l[34]),O=m(O,g,_,N,U,23,l[35]),N=m(N,O,g,_,R,4,l[36]),_=m(_,N,O,g,F,11,l[37]),g=m(g,_,N,O,I,16,l[38]),O=m(O,g,_,N,q,23,l[39]),N=m(N,O,g,_,oe,4,l[40]),_=m(_,N,O,g,b,11,l[41]),g=m(g,_,N,O,M,16,l[42]),O=m(O,g,_,N,D,23,l[43]),N=m(N,O,g,_,z,4,l[44]),_=m(_,N,O,g,ne,11,l[45]),g=m(g,_,N,O,ie,16,l[46]),O=m(O,g,_,N,E,23,l[47]),N=v(N,O,g,_,b,6,l[48]),_=v(_,N,O,g,I,10,l[49]),g=v(g,_,N,O,U,15,l[50]),O=v(O,g,_,N,P,21,l[51]),N=v(N,O,g,_,ne,6,l[52]),_=v(_,N,O,g,M,10,l[53]),g=v(g,_,N,O,q,15,l[54]),O=v(O,g,_,N,R,21,l[55]),N=v(N,O,g,_,L,6,l[56]),_=v(_,N,O,g,ie,10,l[57]),g=v(g,_,N,O,D,15,l[58]),O=v(O,g,_,N,oe,21,l[59]),N=v(N,O,g,_,F,6,l[60]),_=v(_,N,O,g,G,10,l[61]),g=v(g,_,N,O,E,15,l[62]),O=v(O,g,_,N,z,21,l[63]),h[0]=h[0]+N|0,h[1]=h[1]+O|0,h[2]=h[2]+g|0,h[3]=h[3]+_|0},_doFinalize:function(){var j=this._data,w=j.words,S=this._nDataBytes*8,u=j.sigBytes*8;w[u>>>5]|=128<<24-u%32;var s=i.floor(S/4294967296),h=S;w[(u+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,w[(u+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,j.sigBytes=(w.length+1)*4,this._process();for(var b=this._hash,R=b.words,E=0;E<4;E++){var M=R[E];R[E]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}return b},clone:function(){var j=c.clone.call(this);return j._hash=this._hash.clone(),j}});function p(j,w,S,u,s,h,b){var R=j+(w&S|~w&u)+s+b;return(R<<h|R>>>32-h)+w}function C(j,w,S,u,s,h,b){var R=j+(w&u|S&~u)+s+b;return(R<<h|R>>>32-h)+w}function m(j,w,S,u,s,h,b){var R=j+(w^S^u)+s+b;return(R<<h|R>>>32-h)+w}function v(j,w,S,u,s,h,b){var R=j+(S^(w|~u))+s+b;return(R<<h|R>>>32-h)+w}a.MD5=c._createHelper(y),a.HmacMD5=c._createHmacHelper(y)}(Math),r.MD5})}(Nt)),Nt.exports}var Lt={exports:{}},At={exports:{}},Cl=At.exports,Ur;function bl(){return Ur||(Ur=1,function(e,n){(function(r,i){e.exports=i(Oe())})(Cl,function(r){return function(){var i=r,a=i.lib,o=a.WordArray,f=a.Hasher,c=i.algo,d=[],l=c.SHA1=f.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(y,p){for(var C=this._hash.words,m=C[0],v=C[1],j=C[2],w=C[3],S=C[4],u=0;u<80;u++){if(u<16)d[u]=y[p+u]|0;else{var s=d[u-3]^d[u-8]^d[u-14]^d[u-16];d[u]=s<<1|s>>>31}var h=(m<<5|m>>>27)+S+d[u];u<20?h+=(v&j|~v&w)+1518500249:u<40?h+=(v^j^w)+1859775393:u<60?h+=(v&j|v&w|j&w)-1894007588:h+=(v^j^w)-899497514,S=w,w=j,j=v<<30|v>>>2,v=m,m=h}C[0]=C[0]+m|0,C[1]=C[1]+v|0,C[2]=C[2]+j|0,C[3]=C[3]+w|0,C[4]=C[4]+S|0},_doFinalize:function(){var y=this._data,p=y.words,C=this._nDataBytes*8,m=y.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=Math.floor(C/4294967296),p[(m+64>>>9<<4)+15]=C,y.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var y=f.clone.call(this);return y._hash=this._hash.clone(),y}});i.SHA1=f._createHelper(l),i.HmacSHA1=f._createHmacHelper(l)}(),r.SHA1})}(At)),At.exports}var Mt={exports:{}},jl=Mt.exports,Nr;function wl(){return Nr||(Nr=1,function(e,n){(function(r,i){e.exports=i(Oe())})(jl,function(r){(function(){var i=r,a=i.lib,o=a.Base,f=i.enc,c=f.Utf8,d=i.algo;d.HMAC=o.extend({init:function(l,y){l=this._hasher=new l.init,typeof y=="string"&&(y=c.parse(y));var p=l.blockSize,C=p*4;y.sigBytes>C&&(y=l.finalize(y)),y.clamp();for(var m=this._oKey=y.clone(),v=this._iKey=y.clone(),j=m.words,w=v.words,S=0;S<p;S++)j[S]^=1549556828,w[S]^=909522486;m.sigBytes=v.sigBytes=C,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var y=this._hasher,p=y.finalize(l);y.reset();var C=y.finalize(this._oKey.clone().concat(p));return C}})})()})}(Mt)),Mt.exports}var _l=Lt.exports,Lr;function Xo(){return Lr||(Lr=1,function(e,n){(function(r,i,a){e.exports=i(Oe(),bl(),wl())})(_l,function(r){return function(){var i=r,a=i.lib,o=a.Base,f=a.WordArray,c=i.algo,d=c.MD5,l=c.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:d,iterations:1}),init:function(y){this.cfg=this.cfg.extend(y)},compute:function(y,p){for(var C,m=this.cfg,v=m.hasher.create(),j=f.create(),w=j.words,S=m.keySize,u=m.iterations;w.length<S;){C&&v.update(C),C=v.update(y).finalize(p),v.reset();for(var s=1;s<u;s++)C=v.finalize(C),v.reset();j.concat(C)}return j.sigBytes=S*4,j}});i.EvpKDF=function(y,p,C){return l.create(C).compute(y,p)}}(),r.EvpKDF})}(Lt)),Lt.exports}var zt={exports:{}},Sl=zt.exports,Ar;function El(){return Ar||(Ar=1,function(e,n){(function(r,i,a){e.exports=i(Oe(),Xo())})(Sl,function(r){r.lib.Cipher||function(i){var a=r,o=a.lib,f=o.Base,c=o.WordArray,d=o.BufferedBlockAlgorithm,l=a.enc;l.Utf8;var y=l.Base64,p=a.algo,C=p.EvpKDF,m=o.Cipher=d.extend({cfg:f.extend(),createEncryptor:function(P,D){return this.create(this._ENC_XFORM_MODE,P,D)},createDecryptor:function(P,D){return this.create(this._DEC_XFORM_MODE,P,D)},init:function(P,D,I){this.cfg=this.cfg.extend(I),this._xformMode=P,this._key=D,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(P){return this._append(P),this._process()},finalize:function(P){P&&this._append(P);var D=this._doFinalize();return D},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function P(D){return typeof D=="string"?F:R}return function(D){return{encrypt:function(I,L,z){return P(L).encrypt(D,I,L,z)},decrypt:function(I,L,z){return P(L).decrypt(D,I,L,z)}}}}()});o.StreamCipher=m.extend({_doFinalize:function(){var P=this._process(!0);return P},blockSize:1});var v=a.mode={},j=o.BlockCipherMode=f.extend({createEncryptor:function(P,D){return this.Encryptor.create(P,D)},createDecryptor:function(P,D){return this.Decryptor.create(P,D)},init:function(P,D){this._cipher=P,this._iv=D}}),w=v.CBC=function(){var P=j.extend();P.Encryptor=P.extend({processBlock:function(I,L){var z=this._cipher,q=z.blockSize;D.call(this,I,L,q),z.encryptBlock(I,L),this._prevBlock=I.slice(L,L+q)}}),P.Decryptor=P.extend({processBlock:function(I,L){var z=this._cipher,q=z.blockSize,G=I.slice(L,L+q);z.decryptBlock(I,L),D.call(this,I,L,q),this._prevBlock=G}});function D(I,L,z){var q,G=this._iv;G?(q=G,this._iv=i):q=this._prevBlock;for(var ne=0;ne<z;ne++)I[L+ne]^=q[ne]}return P}(),S=a.pad={},u=S.Pkcs7={pad:function(P,D){for(var I=D*4,L=I-P.sigBytes%I,z=L<<24|L<<16|L<<8|L,q=[],G=0;G<L;G+=4)q.push(z);var ne=c.create(q,L);P.concat(ne)},unpad:function(P){var D=P.words[P.sigBytes-1>>>2]&255;P.sigBytes-=D}};o.BlockCipher=m.extend({cfg:m.cfg.extend({mode:w,padding:u}),reset:function(){var P;m.reset.call(this);var D=this.cfg,I=D.iv,L=D.mode;this._xformMode==this._ENC_XFORM_MODE?P=L.createEncryptor:(P=L.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==P?this._mode.init(this,I&&I.words):(this._mode=P.call(L,this,I&&I.words),this._mode.__creator=P)},_doProcessBlock:function(P,D){this._mode.processBlock(P,D)},_doFinalize:function(){var P,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),P=this._process(!0)):(P=this._process(!0),D.unpad(P)),P},blockSize:128/32});var s=o.CipherParams=f.extend({init:function(P){this.mixIn(P)},toString:function(P){return(P||this.formatter).stringify(this)}}),h=a.format={},b=h.OpenSSL={stringify:function(P){var D,I=P.ciphertext,L=P.salt;return L?D=c.create([1398893684,1701076831]).concat(L).concat(I):D=I,D.toString(y)},parse:function(P){var D,I=y.parse(P),L=I.words;return L[0]==1398893684&&L[1]==1701076831&&(D=c.create(L.slice(2,4)),L.splice(0,4),I.sigBytes-=16),s.create({ciphertext:I,salt:D})}},R=o.SerializableCipher=f.extend({cfg:f.extend({format:b}),encrypt:function(P,D,I,L){L=this.cfg.extend(L);var z=P.createEncryptor(I,L),q=z.finalize(D),G=z.cfg;return s.create({ciphertext:q,key:I,iv:G.iv,algorithm:P,mode:G.mode,padding:G.padding,blockSize:P.blockSize,formatter:L.format})},decrypt:function(P,D,I,L){L=this.cfg.extend(L),D=this._parse(D,L.format);var z=P.createDecryptor(I,L).finalize(D.ciphertext);return z},_parse:function(P,D){return typeof P=="string"?D.parse(P,this):P}}),E=a.kdf={},M=E.OpenSSL={execute:function(P,D,I,L,z){if(L||(L=c.random(64/8)),z)var q=C.create({keySize:D+I,hasher:z}).compute(P,L);else var q=C.create({keySize:D+I}).compute(P,L);var G=c.create(q.words.slice(D),I*4);return q.sigBytes=D*4,s.create({key:q,iv:G,salt:L})}},F=o.PasswordBasedCipher=R.extend({cfg:R.cfg.extend({kdf:M}),encrypt:function(P,D,I,L){L=this.cfg.extend(L);var z=L.kdf.execute(I,P.keySize,P.ivSize,L.salt,L.hasher);L.iv=z.iv;var q=R.encrypt.call(this,P,D,z.key,L);return q.mixIn(z),q},decrypt:function(P,D,I,L){L=this.cfg.extend(L),D=this._parse(D,L.format);var z=L.kdf.execute(I,P.keySize,P.ivSize,D.salt,L.hasher);L.iv=z.iv;var q=R.decrypt.call(this,P,D,z.key,L);return q}})}()})}(zt)),zt.exports}var kl=Bt.exports,Mr;function Rl(){return Mr||(Mr=1,function(e,n){(function(r,i,a){e.exports=i(Oe(),Zo(),vl(),Xo(),El())})(kl,function(r){return function(){var i=r,a=i.lib,o=a.BlockCipher,f=i.algo,c=[],d=[],l=[],y=[],p=[],C=[],m=[],v=[],j=[],w=[];(function(){for(var s=[],h=0;h<256;h++)h<128?s[h]=h<<1:s[h]=h<<1^283;for(var b=0,R=0,h=0;h<256;h++){var E=R^R<<1^R<<2^R<<3^R<<4;E=E>>>8^E&255^99,c[b]=E,d[E]=b;var M=s[b],F=s[M],P=s[F],D=s[E]*257^E*16843008;l[b]=D<<24|D>>>8,y[b]=D<<16|D>>>16,p[b]=D<<8|D>>>24,C[b]=D;var D=P*16843009^F*65537^M*257^b*16843008;m[E]=D<<24|D>>>8,v[E]=D<<16|D>>>16,j[E]=D<<8|D>>>24,w[E]=D,b?(b=M^s[s[s[P^M]]],R^=s[s[R]]):b=R=1}})();var S=[0,1,2,4,8,16,32,64,128,27,54],u=f.AES=o.extend({_doReset:function(){var s;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var h=this._keyPriorReset=this._key,b=h.words,R=h.sigBytes/4,E=this._nRounds=R+6,M=(E+1)*4,F=this._keySchedule=[],P=0;P<M;P++)P<R?F[P]=b[P]:(s=F[P-1],P%R?R>6&&P%R==4&&(s=c[s>>>24]<<24|c[s>>>16&255]<<16|c[s>>>8&255]<<8|c[s&255]):(s=s<<8|s>>>24,s=c[s>>>24]<<24|c[s>>>16&255]<<16|c[s>>>8&255]<<8|c[s&255],s^=S[P/R|0]<<24),F[P]=F[P-R]^s);for(var D=this._invKeySchedule=[],I=0;I<M;I++){var P=M-I;if(I%4)var s=F[P];else var s=F[P-4];I<4||P<=4?D[I]=s:D[I]=m[c[s>>>24]]^v[c[s>>>16&255]]^j[c[s>>>8&255]]^w[c[s&255]]}}},encryptBlock:function(s,h){this._doCryptBlock(s,h,this._keySchedule,l,y,p,C,c)},decryptBlock:function(s,h){var b=s[h+1];s[h+1]=s[h+3],s[h+3]=b,this._doCryptBlock(s,h,this._invKeySchedule,m,v,j,w,d);var b=s[h+1];s[h+1]=s[h+3],s[h+3]=b},_doCryptBlock:function(s,h,b,R,E,M,F,P){for(var D=this._nRounds,I=s[h]^b[0],L=s[h+1]^b[1],z=s[h+2]^b[2],q=s[h+3]^b[3],G=4,ne=1;ne<D;ne++){var oe=R[I>>>24]^E[L>>>16&255]^M[z>>>8&255]^F[q&255]^b[G++],U=R[L>>>24]^E[z>>>16&255]^M[q>>>8&255]^F[I&255]^b[G++],ie=R[z>>>24]^E[q>>>16&255]^M[I>>>8&255]^F[L&255]^b[G++],N=R[q>>>24]^E[I>>>16&255]^M[L>>>8&255]^F[z&255]^b[G++];I=oe,L=U,z=ie,q=N}var oe=(P[I>>>24]<<24|P[L>>>16&255]<<16|P[z>>>8&255]<<8|P[q&255])^b[G++],U=(P[L>>>24]<<24|P[z>>>16&255]<<16|P[q>>>8&255]<<8|P[I&255])^b[G++],ie=(P[z>>>24]<<24|P[q>>>16&255]<<16|P[I>>>8&255]<<8|P[L&255])^b[G++],N=(P[q>>>24]<<24|P[I>>>16&255]<<16|P[L>>>8&255]<<8|P[z&255])^b[G++];s[h]=oe,s[h+1]=U,s[h+2]=ie,s[h+3]=N},keySize:256/32});i.AES=o._createHelper(u)}(),r.AES})}(Bt)),Bt.exports}var Ft={exports:{}},Pl=Ft.exports,zr;function Tl(){return zr||(zr=1,function(e,n){(function(r,i){e.exports=i(Oe())})(Pl,function(r){return r.enc.Latin1})}(Ft)),Ft.exports}var qt={exports:{}},Il=qt.exports,Fr;function Dl(){return Fr||(Fr=1,function(e,n){(function(r,i){e.exports=i(Oe())})(Il,function(r){return r.enc.Utf8})}(qt)),qt.exports}var $t={exports:{}},Bl=$t.exports,qr;function Ol(){return qr||(qr=1,function(e,n){(function(r,i){e.exports=i(Oe())})(Bl,function(r){return function(){var i=r,a=i.lib,o=a.WordArray,f=i.enc;f.Utf16=f.Utf16BE={stringify:function(d){for(var l=d.words,y=d.sigBytes,p=[],C=0;C<y;C+=2){var m=l[C>>>2]>>>16-C%4*8&65535;p.push(String.fromCharCode(m))}return p.join("")},parse:function(d){for(var l=d.length,y=[],p=0;p<l;p++)y[p>>>1]|=d.charCodeAt(p)<<16-p%2*16;return o.create(y,l*2)}},f.Utf16LE={stringify:function(d){for(var l=d.words,y=d.sigBytes,p=[],C=0;C<y;C+=2){var m=c(l[C>>>2]>>>16-C%4*8&65535);p.push(String.fromCharCode(m))}return p.join("")},parse:function(d){for(var l=d.length,y=[],p=0;p<l;p++)y[p>>>1]|=c(d.charCodeAt(p)<<16-p%2*16);return o.create(y,l*2)}};function c(d){return d<<8&4278255360|d>>>8&16711935}}(),r.enc.Utf16})}($t)),$t.exports}var Wt={exports:{}},Ul=Wt.exports,$r;function Nl(){return $r||($r=1,function(e,n){(function(r,i){e.exports=i(Oe())})(Ul,function(r){return r.enc.Hex})}(Wt)),Wt.exports}var tt={},Wr;function Ll(){if(Wr)return tt;Wr=1;var e=tt&&tt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(tt,"__esModule",{value:!0});const n=e(Qs());return tt.default=n.default.create("encrypt","decrypt"),tt}var Hr;function Al(){if(Hr)return ke;Hr=1;var e=ke&&ke.__createBinding||(Object.create?function(m,v,j,w){w===void 0&&(w=j);var S=Object.getOwnPropertyDescriptor(v,j);(!S||("get"in S?!v.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return v[j]}}),Object.defineProperty(m,w,S)}:function(m,v,j,w){w===void 0&&(w=j),m[w]=v[j]}),n=ke&&ke.__setModuleDefault||(Object.create?function(m,v){Object.defineProperty(m,"default",{enumerable:!0,value:v})}:function(m,v){m.default=v}),r=ke&&ke.__importStar||function(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var j in m)j!=="default"&&Object.prototype.hasOwnProperty.call(m,j)&&e(v,m,j);return n(v,m),v},i=ke&&ke.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(ke,"__esModule",{value:!0}),ke.AesCrypter=void 0;const a=r(Rl()),o=i(Tl()),f=i(Dl()),c=i(Ol()),d=i(Zo()),l=i(Nl()),y=i(Ll()),p={latin1:o.default,utf8:f.default,hex:l.default,utf16:c.default,base64:d.default};class C extends y.default{encrypt(v,j){const w=typeof v=="string"?v:JSON.stringify(v);return a.encrypt(w,j).toString()}decrypt(v,j,w="utf8"){return a.decrypt(v,j).toString(p[w])}}return ke.AesCrypter=C,ke.default=new C,ke}const Ml=!0,zl=">= 8",Fl=">= 0.5 && < 0.9.7",ql=!0,$l=!0,Wl=">= 0.5",Hl=!0,Kl=!0,Gl=!0,Vl=">= 1 && < 8",Yl="< 8",Zl=!0,Xl=[">= 14.17 && < 15",">= 15.1"],Ql=!0,Jl=">= 0.7.12",ec=!0,tc="< 6",nc=!0,rc=">= 0.11.1",oc=">= 0.11.1",sc=">= 0.11.1",ic=">= 0.11.1",ac=">= 0.11.1",lc=">= 0.11.1",cc=!0,dc=">= 8.8",uc=!0,pc=">= 8",fc="< 8",mc=!0,hc=!0,gc=!0,xc=!0,yc=">= 8.5",vc=">= 1",Cc=">= 0.5",bc=!0,jc=!0,wc=!0,_c=">= 0.11.5 && < 3",Sc=">= 0.9.4",Ec=">= 0.9.4",kc=">= 1.4.1",Rc=">= 0.9.4",Pc=">= 0.9.4",Tc=">= 0.9.4",Ic=!0,Dc=!0,Bc=[">= 0.4 && < 0.7",">= 0.8"],Oc=!0,Uc=">= 0.11.13",Nc=">= 0.11.3 && < 10",Lc=">= 0.11.3",Ac=!0,Mc=">= 10",zc=!0,Fc=!0,qc=!0,$c=">= 1",Wc=!0,Hc=[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],Kc=">= 11.7",Gc=">= 0.5",Vc={assert:Ml,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:zl,"node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:Fl,buffer:ql,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:$l,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:Wl,"node:cluster":[">= 14.18 && < 15",">= 16"],console:Hl,"node:console":[">= 14.18 && < 15",">= 16"],constants:Kl,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:Gl,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:Vl,_debugger:Yl,dgram:Zl,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:Xl,"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:Ql,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:Jl,"node:domain":[">= 14.18 && < 15",">= 16"],events:ec,"node:events":[">= 14.18 && < 15",">= 16"],freelist:tc,fs:nc,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:rc,"node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:oc,"node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:sc,"node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:ic,"node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:ac,"node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:lc,"node:_http_server":[">= 14.18 && < 15",">= 16"],http:cc,"node:http":[">= 14.18 && < 15",">= 16"],http2:dc,"node:http2":[">= 14.18 && < 15",">= 16"],https:uc,"node:https":[">= 14.18 && < 15",">= 16"],inspector:pc,"node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:fc,module:mc,"node:module":[">= 14.18 && < 15",">= 16"],net:hc,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:gc,"node:os":[">= 14.18 && < 15",">= 16"],path:xc,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:yc,"node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:vc,"node:process":[">= 14.18 && < 15",">= 16"],punycode:Cc,"node:punycode":[">= 14.18 && < 15",">= 16"],querystring:bc,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:jc,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:wc,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:_c,_stream_duplex:Sc,"node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:Ec,"node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:kc,"node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:Rc,"node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:Pc,"node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:Tc,"node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:Ic,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:Dc,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:Bc,"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:Oc,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:Uc,"node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:Nc,_tls_wrap:Lc,"node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:Ac,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:Mc,"node:trace_events":[">= 14.18 && < 15",">= 16"],tty:zc,"node:tty":[">= 14.18 && < 15",">= 16"],url:Fc,"node:url":[">= 14.18 && < 15",">= 16"],util:qc,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:$c,"node:v8":[">= 14.18 && < 15",">= 16"],vm:Wc,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:Hc,"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:Kc,"node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:Gc,"node:zlib":[">= 14.18 && < 15",">= 16"]};var yn,Kr;function Yc(){if(Kr)return yn;Kr=1;var e=Js();function n(o,f){for(var c=o.split("."),d=f.split(" "),l=d.length>1?d[0]:"=",y=(d.length>1?d[1]:d[0]).split("."),p=0;p<3;++p){var C=parseInt(c[p]||0,10),m=parseInt(y[p]||0,10);if(C!==m)return l==="<"?C<m:l===">="?C>=m:!1}return l===">="}function r(o,f){var c=f.split(/ ?&& ?/);if(c.length===0)return!1;for(var d=0;d<c.length;++d)if(!n(o,c[d]))return!1;return!0}function i(o,f){if(typeof f=="boolean")return f;var c=typeof o>"u"?fe.versions&&fe.versions.node:o;if(typeof c!="string")throw new TypeError(typeof o>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(f&&typeof f=="object"){for(var d=0;d<f.length;++d)if(r(c,f[d]))return!0;return!1}return r(c,f)}var a=Vc;return yn=function(f,c){return e(a,f)&&i(c,a[f])},yn}var vn,Gr;function Zc(){if(Gr)return vn;Gr=1;var e={},n=go();return vn=n.homedir||function(){var i=e.HOME,a=e.LOGNAME||e.USER||e.LNAME||e.USERNAME;return fe.platform==="win32"?e.USERPROFILE||e.HOMEDRIVE+e.HOMEPATH||i||null:fe.platform==="darwin"?i||(a?"/Users/"+a:null):fe.platform==="linux"?i||(fe.getuid()===0?"/root":a?"/home/"+a:null):i||null},vn}var Cn,Vr;function Xc(){return Vr||(Vr=1,Cn=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(r,i){return i};var n=new Error().stack;return Error.prepareStackTrace=e,n[2].getFileName()}),Cn}var nt={exports:{}},Yr;function Qc(){if(Yr)return nt.exports;Yr=1;var e=fe.platform==="win32",n=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,r={};function i(c){return n.exec(c).slice(1)}r.parse=function(c){if(typeof c!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var d=i(c);if(!d||d.length!==5)throw new TypeError("Invalid path '"+c+"'");return{root:d[1],dir:d[0]===d[1]?d[0]:d[0].slice(0,-1),base:d[2],ext:d[4],name:d[3]}};var a=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,o={};function f(c){return a.exec(c).slice(1)}return o.parse=function(c){if(typeof c!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var d=f(c);if(!d||d.length!==5)throw new TypeError("Invalid path '"+c+"'");return{root:d[1],dir:d[0].slice(0,-1),base:d[2],ext:d[4],name:d[3]}},e?nt.exports=r.parse:nt.exports=o.parse,nt.exports.posix=o.parse,nt.exports.win32=r.parse,nt.exports}var bn,Zr;function Jc(){if(Zr)return bn;Zr=1;var e=en(),n=e.parse||Qc(),r=function(a,o){var f="/";/^([A-Za-z]:)/.test(a)?f="":/^\\\\/.test(a)&&(f="\\\\");for(var c=[a],d=n(a);d.dir!==c[c.length-1];)c.push(d.dir),d=n(d.dir);return c.reduce(function(l,y){return l.concat(o.map(function(p){return e.resolve(f,y,p)}))},[])};return bn=function(a,o,f){var c=o&&o.moduleDirectory?[].concat(o.moduleDirectory):["node_modules"];if(o&&typeof o.paths=="function")return o.paths(f,a,function(){return r(a,c)},o);var d=r(a,c);return o&&o.paths?d.concat(o.paths):d},bn}var jn,Xr;function ed(){return Xr||(Xr=1,jn=function(e,n){return n||{}}),jn}var wn,Qr;function td(){if(Qr)return wn;Qr=1;var e=Yc(),n=tn,r=en(),i=Zc(),a=Xc(),o=Jc(),f=ed(),c=fe.platform!=="win32"&&n.realpathSync&&typeof n.realpathSync.native=="function"?n.realpathSync.native:n.realpathSync,d=i(),l=function(){return[r.join(d,".node_modules"),r.join(d,".node_libraries")]},y=function(S){try{var u=n.statSync(S,{throwIfNoEntry:!1})}catch(s){if(s&&(s.code==="ENOENT"||s.code==="ENOTDIR"))return!1;throw s}return!!u&&(u.isFile()||u.isFIFO())},p=function(S){try{var u=n.statSync(S,{throwIfNoEntry:!1})}catch(s){if(s&&(s.code==="ENOENT"||s.code==="ENOTDIR"))return!1;throw s}return!!u&&u.isDirectory()},C=function(S){try{return c(S)}catch(u){if(u.code!=="ENOENT")throw u}return S},m=function(S,u,s){return s&&s.preserveSymlinks===!1?S(u):u},v=function(S,u){var s=S(u);try{var h=JSON.parse(s);return h}catch{}},j=function(S,u,s){for(var h=o(u,s,S),b=0;b<h.length;b++)h[b]=r.join(h[b],S);return h};return wn=function(S,u){if(typeof S!="string")throw new TypeError("Path must be a string.");var s=f(S,u),h=s.isFile||y,b=s.readFileSync||n.readFileSync,R=s.isDirectory||p,E=s.realpathSync||C,M=s.readPackageSync||v;if(s.readFileSync&&s.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var F=s.packageIterator,P=s.extensions||[".js"],D=s.includeCoreModules!==!1,I=s.basedir||r.dirname(a()),L=s.filename||I;s.paths=s.paths||l();var z=m(E,r.resolve(I),s);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(S)){var q=r.resolve(z,S);(S==="."||S===".."||S.slice(-1)==="/")&&(q+="/");var G=U(q)||N(q);if(G)return m(E,G,s)}else{if(D&&e(S))return S;var ne=O(S,z);if(ne)return m(E,ne,s)}var oe=new Error("Cannot find module '"+S+"' from '"+L+"'");throw oe.code="MODULE_NOT_FOUND",oe;function U(g){var _=ie(r.dirname(g));if(_&&_.dir&&_.pkg&&s.pathFilter){var T=r.relative(_.dir,g),$=s.pathFilter(_.pkg,g,T);$&&(g=r.resolve(_.dir,$))}if(h(g))return g;for(var H=0;H<P.length;H++){var ee=g+P[H];if(h(ee))return ee}}function ie(g){if(!(g===""||g==="/")&&!(fe.platform==="win32"&&/^\w:[/\\]*$/.test(g))&&!/[/\\]node_modules[/\\]*$/.test(g)){var _=r.join(m(E,g,s),"package.json");if(!h(_))return ie(r.dirname(g));var T=M(b,_);return T&&s.packageFilter&&(T=s.packageFilter(T,g)),{pkg:T,dir:g}}}function N(g){var _=r.join(m(E,g,s),"/package.json");if(h(_)){try{var T=M(b,_)}catch{}if(T&&s.packageFilter&&(T=s.packageFilter(T,g)),T&&T.main){if(typeof T.main!="string"){var $=new TypeError("package “"+T.name+"” `main` must be a string");throw $.code="INVALID_PACKAGE_MAIN",$}(T.main==="."||T.main==="./")&&(T.main="index");try{var H=U(r.resolve(g,T.main));if(H)return H;var ee=N(r.resolve(g,T.main));if(ee)return ee}catch{}}}return U(r.join(g,"/index"))}function O(g,_){for(var T=function(){return j(g,_,s)},$=F?F(g,_,T,s):T(),H=0;H<$.length;H++){var ee=$[H];if(R(r.dirname(ee))){var re=U(ee);if(re)return re;var Y=N(ee);if(Y)return Y}}}},wn}var _n,Jr;function nd(){return Jr||(Jr=1,_n=td()),_n}var Sn,eo;function rd(){if(eo)return Sn;eo=1;var e={};Sn=a,a.sync=o;var n=tn;function r(f,c){var d=c.pathExt!==void 0?c.pathExt:e.PATHEXT;if(!d||(d=d.split(";"),d.indexOf("")!==-1))return!0;for(var l=0;l<d.length;l++){var y=d[l].toLowerCase();if(y&&f.substr(-y.length).toLowerCase()===y)return!0}return!1}function i(f,c,d){return!f.isSymbolicLink()&&!f.isFile()?!1:r(c,d)}function a(f,c,d){n.stat(f,function(l,y){d(l,l?!1:i(y,f,c))})}function o(f,c){return i(n.statSync(f),f,c)}return Sn}var En,to;function od(){if(to)return En;to=1,En=n,n.sync=r;var e=tn;function n(o,f,c){e.stat(o,function(d,l){c(d,d?!1:i(l,f))})}function r(o,f){return i(e.statSync(o),f)}function i(o,f){return o.isFile()&&a(o,f)}function a(o,f){var c=o.mode,d=o.uid,l=o.gid,y=f.uid!==void 0?f.uid:fe.getuid&&fe.getuid(),p=f.gid!==void 0?f.gid:fe.getgid&&fe.getgid(),C=parseInt("100",8),m=parseInt("010",8),v=parseInt("001",8),j=C|m,w=c&v||c&m&&l===p||c&C&&d===y||c&j&&y===0;return w}return En}var kn,no;function sd(){if(no)return kn;no=1;var e;fe.platform==="win32"||It.TESTING_WINDOWS?e=rd():e=od(),kn=n,n.sync=r;function n(i,a,o){if(typeof a=="function"&&(o=a,a={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(f,c){n(i,a||{},function(d,l){d?c(d):f(l)})})}e(i,a||{},function(f,c){f&&(f.code==="EACCES"||a&&a.ignoreErrors)&&(f=null,c=!1),o(f,c)})}function r(i,a){try{return e.sync(i,a||{})}catch(o){if(a&&a.ignoreErrors||o.code==="EACCES")return!1;throw o}}return kn}var Rn,ro;function id(){if(ro)return Rn;ro=1;var e={};const n=fe.platform==="win32"||e.OSTYPE==="cygwin"||e.OSTYPE==="msys",r=en(),i=n?";":":",a=sd(),o=l=>Object.assign(new Error(`not found: ${l}`),{code:"ENOENT"}),f=(l,y)=>{const p=y.colon||i,C=l.match(/\//)||n&&l.match(/\\/)?[""]:[...n?[fe.cwd()]:[],...(y.path||e.PATH||"").split(p)],m=n?y.pathExt||e.PATHEXT||".EXE;.CMD;.BAT;.COM":"",v=n?m.split(p):[""];return n&&l.indexOf(".")!==-1&&v[0]!==""&&v.unshift(""),{pathEnv:C,pathExt:v,pathExtExe:m}},c=(l,y,p)=>{typeof y=="function"&&(p=y,y={}),y||(y={});const{pathEnv:C,pathExt:m,pathExtExe:v}=f(l,y),j=[],w=u=>new Promise((s,h)=>{if(u===C.length)return y.all&&j.length?s(j):h(o(l));const b=C[u],R=/^".*"$/.test(b)?b.slice(1,-1):b,E=r.join(R,l),M=!R&&/^\.[\\\/]/.test(l)?l.slice(0,2)+E:E;s(S(M,u,0))}),S=(u,s,h)=>new Promise((b,R)=>{if(h===m.length)return b(w(s+1));const E=m[h];a(u+E,{pathExt:v},(M,F)=>{if(!M&&F)if(y.all)j.push(u+E);else return b(u+E);return b(S(u,s,h+1))})});return p?w(0).then(u=>p(null,u),p):w(0)},d=(l,y)=>{y=y||{};const{pathEnv:p,pathExt:C,pathExtExe:m}=f(l,y),v=[];for(let j=0;j<p.length;j++){const w=p[j],S=/^".*"$/.test(w)?w.slice(1,-1):w,u=r.join(S,l),s=!S&&/^\.[\\\/]/.test(l)?l.slice(0,2)+u:u;for(let h=0;h<C.length;h++){const b=s+C[h];try{if(a.sync(b,{pathExt:m}))if(y.all)v.push(b);else return b}catch{}}}if(y.all&&v.length)return v;if(y.nothrow)return null;throw o(l)};return Rn=c,c.sync=d,Rn}var Pn,oo;function ad(){if(oo)return Pn;oo=1;function e(n){if(!(typeof n>"u"))return JSON.parse(JSON.stringify(n))}return Pn=e,Pn}var Tn,so;function ld(){if(so)return Tn;so=1;var e={};const{BLOCKLET_MODES:n}=ei(),r=ho(),i=Al().default,a=ti(),o=oi,{dirname:f,join:c,sep:d}=en(),l=nd(),{tmpdir:y,homedir:p}=go(),C=id(),{withHttps:m}=ni(),{exec:v}=tn,{promisify:j}=ri(),w=ad(),S="z8iZiDFg3vkkrPwsiba1TLXy3H9XHzFERsP8o",u="z8iZjMn7Hcyh93rKf8PqcSM94XnS8nRqSrPoP",s=(g,_,T)=>i.encrypt(g,r.pbkdf2Sync(T,_,256,32,"sha512").toString("hex")),h=(g,_,T)=>i.decrypt(g,r.pbkdf2Sync(T,_,256,32,"sha512").toString("hex")),b=(g,_=!0)=>{let T=g;return Array.isArray(T)&&T.every($=>$.originFileObj&&$.url)&&(T=T.map($=>$.url),T.length===1&&([T]=T)),_&&T&&typeof T=="object"&&(T=JSON.stringify(T)),T&&typeof T=="string"&&(T=T.replace(/(\r\n|\n|\r)/gm," ")),T},R=g=>g.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),E=g=>R(dr.from(g).toString("base64")),M=g=>(g+"===".slice((g.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"),F=g=>new Uint8Array(dr.from(M(g),"base64")),P="v21.6.0",D=()=>a.gte(fe.version,P),I=()=>{try{return l("@arcblock/pm2",{basedir:__dirname})}catch{return null}};function L(g){try{return C.sync(g)}catch{return null}}const z=new Map;async function q({optionsKey:g,optionsValues:_}){const T=j(v),$=fe.version,H=`${$}.${g}`;if(z.has(H))return z.get(H);try{const{stdout:ee}=await T("node -h"),re=_.find(Y=>ee.includes(Y));if(!re)throw new Error(`Can not get permission option: ${g} for this Node.js version: ${$}`);return z.set(H,re),re}catch(ee){throw console.error(ee),ee}}const G=async(g,_=!0)=>{const T=e.NODE_OPTIONS??"";if(T.includes("--experimental-permission")||T.includes("--permission")||T.includes("--allow-fs-read")||T.includes("--allow-fs-write")||T.includes("--allow-addons")||T.includes("--allow-child-process")||T.includes("--allow-worker"))throw console.error("getSecurityNodeOptions",{nodeOptions:T}),new Error("process.env.NODE_OPTIONS should not include --experimental-permission or --permission or --allow-fs-read or --allow-fs-write or --allow-addons or --allow-child-process or --allow-worker");if(!g)throw new Error("blocklet is not defined");if(T.includes("ms-vscode.js-debug/src/bootloader.js")&&(g.mode===n.DEVELOPMENT||g.environmentObj.BLOCKLET_MODE===n.DEVELOPMENT))return T;const $=[T].filter(Q=>!!Q&&Q!=="undefined");if(!D()||!_)return $.join(" ").trim();const H=I(),ee=L("meilisearch"),re="/data/bin/meilisearch",Y=L("blocklet"),Se=[e.XDG_DATA_HOME?c(e.XDG_DATA_HOME,"pnpm/global/"):"",e.PNPM_HOME?c(e.PNPM_HOME,"global/"):""],me=await q({optionsKey:"--permission",optionsValues:["--permission","--experimental-permission"]});if($.push(me,...[g.environmentObj.BLOCKLET_DATA_DIR,g.environmentObj.BLOCKLET_APP_DIR,g.environmentObj.BLOCKLET_LOG_DIR,g.environmentObj.BLOCKLET_CACHE_DIR,g.environmentObj.BLOCKLET_APP_DATA_DIR?c(g.environmentObj.BLOCKLET_APP_DATA_DIR,".projects"):"",y()].filter(Boolean).map(Q=>`--allow-fs-write=${c(Q,"/*")}`),"--allow-addons","--allow-child-process"),g.mode===n.DEVELOPMENT||g.environmentObj.BLOCKLET_MODE===n.DEVELOPMENT)$.push("--allow-worker","--allow-fs-read=*"),$.push(`--allow-fs-write=${c(p(),".npm","_logs","/*")}`);else if($.push(...[g.environmentObj.BLOCKLET_LOG_DIR,g.environmentObj.BLOCKLET_CACHE_DIR,g.environmentObj.BLOCKLET_APP_DATA_DIR,f(f(g.environmentObj.BLOCKLET_APP_DIR)),H&&f(f(f(f(H)))),Y,ee,re,f(f(fe.execPath)),fe.cwd(),y(),c(p(),".cursor-server"),"/Applications/Cursor.app",...Se].filter(Boolean).filter(Q=>Q!==d).map(Q=>`--allow-fs-read=${c(Q,"/*")}`)),[S,u].includes(g?.environmentObj?.BLOCKLET_COMPONENT_DID)){const Q=await q({optionsKey:"--allow-worker",optionsValues:["--allow-worker","--experimental-worker"]});$.push(Q)}return o($).join(" ").trim()},ne={crossOriginEmbedderPolicy:!1,crossOriginOpenerPolicy:!1,crossOriginResourcePolicy:!1,originAgentCluster:!1,strictTransportSecurity:!0,xContentTypeOptions:!0,xDnsPrefetchControl:!1,xDownloadOptions:!1,xPermittedCrossDomainPolicies:!1,contentSecurityPolicy:!1,referrerPolicy:!1,xFrameOptions:!1,xPoweredBy:!0,xXssProtection:!1};function oe(g,_,T){const $=w(g[_]||[]);return $.push(...T),[...new Set($)]}async function U(g,{node:_,blocklet:T,trustedDomains:$=[]}){if(!g?.contentSecurityPolicy?.directives)return g;const H=w(g);H.contentSecurityPolicy.directives["default-src"]=oe(H.contentSecurityPolicy.directives,"default-src",["'self'"]);const ee=await _.getNodeInfo({useCache:!0});let re=await _.getBlockletDomainAliases({blocklet:T,nodeInfo:ee});return re=(re||[]).map(Y=>Y.value),H.contentSecurityPolicy.directives["connect-src"]=oe(H.contentSecurityPolicy.directives,"connect-src",["'self'",...re.filter(Y=>Y).map(Y=>`https://${Y}/.well-known/ping`),"https://api.simplesvg.com","https://api.iconify.design","https://api.unisvg.com"]),H.contentSecurityPolicy.directives["script-src"]=oe(H.contentSecurityPolicy.directives,"script-src",["'self'","https://js.stripe.com"]),H.contentSecurityPolicy.directives["frame-src"]=oe(H.contentSecurityPolicy.directives,"frame-src",["'self'","https://js.stripe.com",...$.filter(Boolean).map(Y=>`https://${Y}`)]),H.contentSecurityPolicy.directives["frame-ancestors"]=oe(H.contentSecurityPolicy.directives,"frame-ancestors",["'self'",...(T.settings.userSpaceHosts||[]).map(Y=>`https://${Y}`),...$.filter(Boolean).map(Y=>`https://${Y}`)]),H}async function ie(g,{node:_,blocklet:T}){const $=w(g);if($?.origin?.smart){const H=[];H.push(...$.origin?.value||[]);const ee=await _.getNodeInfo({useCache:!0});let re=await _.getBlockletDomainAliases({blocklet:T,nodeInfo:ee});re=(re||[]).map(Q=>Q.value),H.push(...re.map(Q=>m(Q)));const Se=((T.settings.federated||{})?.sites||[]).filter(Q=>Q?.isMaster!==!1||Q.status==="approved"),me=[];for(const Q of Se)me.push(new URL(Q.appUrl).hostname),me.push(...Q.aliasDomain||[]);H.push(...me.map(Q=>m(Q))),$.origin.value=[...new Set(H)]}return $}function N(g){const _=w(g);for(const T of Object.keys(_))_[T]=_[T]?.value??_[T];return _}function O(g){const _=w(g);for(const T of Object.keys(_))_[T]=_[T]?.override??!1;return _}return Tn={encrypt:s,decrypt:h,formatEnv:b,encodeEncryptionKey:E,decodeEncryptionKey:F,canUseFileSystemIsolateApi:D,getSecurityNodeOptions:G,patchResponseHeader:U,patchCors:ie,cleanConfigOverride:N,keepConfigOverride:O,DEFAULT_HELMET_CONFIG:ne,SAFE_NODE_VERSION:P},Tn}var Qo=ld();const In=(e,n)=>e&&Qo.encrypt(e,n||K.AIGNE_CONFIG_ENCRYPT_SALT,""),Dn=(e,n)=>e&&Qo.decrypt(e,n||K.AIGNE_CONFIG_ENCRYPT_SALT,""),pt=e=>e==="aigneHub",Ht=e=>e==="bedrock",cd=e=>{const n=["provider","model"];if(Hn(e))return[...n,"key"];const{provider:r}=e;let i=n;return pt(r)?i=[...n,"key","url"]:Ht(r)?i=[...n,"accessKeyId","secretAccessKey"]:i=[...n,"key"],i.filter(a=>!e[a])},io=e=>{if(Hn(e)||e==="")return"0";const n=typeof e=="string"?parseFloat(e):e;if(Number.isNaN(n))return"0";if(typeof Intl<"u"&&Intl.NumberFormat)return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}).format(n);const r=n.toFixed(2).split("."),i=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),a=parseFloat(r[1])>0?`.${r[1]}`:"";return`${i}${a}`},dd=e=>[{provider:"aigneHub",name:"AIGNE Hub",baseURL:"https://hub.aigne.io",logo:e?.imgPrefix?we(e.imgPrefix,"/aigne-hub.jpg"):"/aigne-hub.jpg",documentation:"https://hub.aigne.io/docs",models:[]}];function ud(e){if(!e)return"Unknown error";if(e?.name==="ZodError")return Array.isArray(e.errors)?e.errors.map(n=>n.message).join(`
|
|
324
|
+
`):"Validation failed";if(Array.isArray(e?.details))return`Validate failed: ${e.details.map(r=>{const i=r.message.replace(/["]/g,"'");return`${r.path.join(".")}: ${i}`}).join(";")}`;if(Array.isArray(e?.errors))return e.errors.map(n=>n.msg||n.message).join(`
|
|
325
|
+
`);if(Array.isArray(e?.constraints))return Object.values(e.constraints).join(`
|
|
326
|
+
`);if(e?.keyword==="validation")return e.message||"Validation error";if(Array.isArray(e?.errors))return e.errors.map(n=>n.message).join(`
|
|
327
|
+
`);if(e instanceof TypeError&&e.message.includes("fetch"))return"Network error: Failed to fetch";if(e?.name==="FetchError")return e.message||"Fetch error occurred";if(e?.isAxiosError){if(e.response?.data){if(e.response.data.message)return e.response.data.message;if(e.response.data.error)return e.response.data.error;const n=typeof e.response.data=="string"?e.response.data.slice(0,200):JSON.stringify(e.response.data);return`Request failed: ${e.response.status} ${e.response.statusText}: ${n}`}return e.message||"Request failed"}if(e?.response){if(e.response.error)return e.response.error;if(e.response.data?.message)return e.response.data.message;if(e.response.data?.error)return e.response.data.error;const n=typeof e.response.data=="string"?e.response.data.slice(0,200):JSON.stringify(e.response.data);return`Request failed: ${e.response.status} ${e.response.statusText}: ${n}`}return e.message||String(e)}const Yt="z8ia3xzq2tMq8CRHfaXj1BTYJyYnEcHbqP8cJ",pd=async e=>{const n=new URL(e);if(typeof window<"u"&&n.origin===window.location.origin)return Jo();const r=we(n.origin,"__blocklet__.js?type=json"),i=await Kt.get(r).then(f=>f.data);if((i?.componentId||"").split("/").pop()===Yt)return we(n.origin,i.prefix||"/");const o=(i?.componentMountPoints||[]).find(f=>f?.did===Yt);return o?we(n.origin,o.mountPoint):e},Jo=()=>{var e,n,r,i;if(typeof window>"u")return"";const a=((e=window.blocklet)===null||e===void 0?void 0:e.prefix)||"/",o=(n=window.location)===null||n===void 0?void 0:n.origin;if((((r=window.blocklet)===null||r===void 0?void 0:r.componentId)||"").split("/").pop()===Yt)return we(o,a);const c=(((i=window.blocklet)===null||i===void 0?void 0:i.componentMountPoints)||[]).find(d=>d?.did===Yt);return c?we(o,c.mountPoint):we(o,a)};async function fd({baseUrl:e="",accessKey:n=""}){let r=Jo();const i=typeof window<"u";try{if(e){const a=new URL(e);(!i||i&&a.origin!==window.location.origin)&&(r=await pd(e))}}catch(a){throw console.warn("Failed to parse baseUrl:",a),new Error(`Failed to parse baseUrl: ${ud(a)}`)}if(!r||!n)throw new Error("baseUrl or accessKey is not set");return Kt.get(we(r,"/api/user/info"),{headers:{Authorization:`Bearer ${n}`}}).then(a=>a.data)}const rn=se.div`
|
|
328
|
+
min-height: ${({minHeight:e})=>e==="none"?"auto":`${e||160}px`};
|
|
329
|
+
height: ${({height:e,minHeight:n})=>e==="none"?"auto":`${e||n||160}px`};
|
|
330
|
+
padding: ${({theme:e})=>e.spacing(2)};
|
|
331
|
+
border-radius: ${({theme:e})=>e.shape.borderRadius}px;
|
|
332
|
+
border: 1px solid;
|
|
333
|
+
border-color: ${({theme:e})=>e.palette.divider};
|
|
334
|
+
background-color: ${({theme:e})=>e.palette.background.paper};
|
|
335
|
+
box-shadow: ${({theme:e})=>e.shadows[1]};
|
|
336
|
+
`,md={loading:x.bool,authLoading:x.bool,disconnectLoading:x.bool,connecting:x.bool},zn=se(Xt)`
|
|
337
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
338
|
+
font-weight: 500;
|
|
339
|
+
border-color: ${({theme:e})=>e.palette.grey[300]};
|
|
340
|
+
line-height: 1.5;
|
|
341
|
+
&:hover {
|
|
342
|
+
background-color: ${({theme:e})=>si(e.palette.primary.main,.1)};
|
|
343
|
+
}
|
|
344
|
+
`;function es({loading:e=!1,user:n=null,switchUser:r=mt,connecting:i=!1,url:a=""}){const{t:o}=k.useContext(_e);return!n&&!e?null:t.jsx(rn,{children:e?t.jsxs(B,{sx:{display:"flex",justifyContent:"center",alignItems:"flex-start",gap:2,height:"100%"},children:[t.jsx(Me,{variant:"circular",width:48,height:48}),t.jsxs(B,{sx:{display:"flex",flexDirection:"column",gap:1,width:"100%"},children:[t.jsx(Me,{variant:"rounded",sx:{width:"80%",height:20}}),t.jsx(Me,{variant:"rounded",sx:{width:"40%",height:20}}),t.jsx(Me,{variant:"rounded",sx:{width:"30%",height:20}}),t.jsx(Me,{variant:"rounded",sx:{width:"60%",height:20}})]})]}):t.jsxs(B,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"flex-start",height:"100%"},children:[t.jsx(ii,{size:"large",showDid:!0,showHoverCard:!0,user:n,avatarProps:{size:48},infoType:ur.Minimal,popupInfoType:ur.Basic,sx:{border:"none",p:0},onAvatarClick:()=>{a&&window.open(Gt(we(a,K.WELLKNOWN_BLOCKLET_USER_PATH),{did:n.did}),"_blank")}}),t.jsx(B,{children:t.jsx(zn,{variant:"outlined",disabled:i,startIcon:i?t.jsx(je,{size:16,sx:{mr:1}}):t.jsx(pe,{style:{fontSize:16},icon:"tabler:switch-horizontal"}),onClick:r,children:o("setting.aigne.switchUser")})})]})})}es.propTypes={loading:x.bool,user:x.object,switchUser:x.func,url:x.string,...md};function ts({loading:e=!1,credit:n=null,connecting:r=!1,onRefresh:i=()=>{},refreshing:a=!1}){const{t:o}=k.useContext(_e),f=Wn`
|
|
345
|
+
from {
|
|
346
|
+
transform: rotate(0deg);
|
|
347
|
+
}
|
|
348
|
+
to {
|
|
349
|
+
transform: rotate(360deg);
|
|
350
|
+
}
|
|
351
|
+
`,c=k.useMemo(()=>!n?.enableCredit,[n]),d=k.useMemo(()=>Number(n?.creditBalance?.balance)<=0&&Number(n?.creditBalance?.pendingCredit)>0,[n]);if(!n&&!e)return null;const{creditBalance:l,profileLink:y="",paymentLink:p=""}=n||{};return t.jsx(rn,{children:e?t.jsxs(B,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"flex-start",gap:2,height:"100%"},children:[t.jsxs(B,{sx:{width:"100%",display:"flex",flexDirection:"column",gap:1},children:[t.jsx(Me,{variant:"rounded",sx:{width:"80%",height:20}}),t.jsx(Me,{variant:"rounded",sx:{width:"50%",height:20}})]}),t.jsxs(B,{sx:{width:"100%",display:"flex",justifyContent:"space-between",gap:1},children:[t.jsx(Me,{variant:"rounded",sx:{width:"100%",height:20}}),t.jsx(Me,{variant:"rounded",sx:{width:"100%",height:20}})]})]}):t.jsxs(B,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"flex-start",height:"100%",width:"100%"},children:[t.jsxs(B,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[t.jsx(ce,{variant:"body1",children:"AIGNE Hub Credits"}),t.jsxs(ce,{variant:"h2",sx:{color:!c&&d?"error.main":"text.primary"},children:[t.jsx("span",{children:c?o("setting.aigne.infinite"):d?`- ${io(l?.pendingCredit)}`:io(l.balance)}),c?null:t.jsx(Ce,{title:o("common.refresh"),children:t.jsx(Ia,{sx:{fontSize:14,ml:1,cursor:"pointer",animation:a?`${f} 1s linear infinite`:"none"},onClick:i})})]})]}),c?null:t.jsxs(B,{sx:{width:"100%",display:"flex",gap:1},children:[t.jsx(zn,{fullWidth:!0,variant:"outlined",disabled:r,onClick:()=>{p&&window.open(p,"_blank")},startIcon:t.jsx(pe,{style:{fontSize:16},icon:"tabler:credit-card"}),children:o("setting.aigne.addCredits")}),t.jsx(zn,{fullWidth:!0,disabled:r,onClick:()=>{y&&window.open(Gt(y,{appDid:window.blocklet.appPid}),"_blank")},variant:"outlined",startIcon:t.jsx(pe,{style:{fontSize:16},icon:"hugeicons:transaction"}),children:o("setting.aigne.transaction")})]})]})})}ts.propTypes={loading:x.bool,credit:x.object,connecting:x.bool,onRefresh:x.func,refreshing:x.bool};function ns({url:e,apiKey:n,switchUser:r=mt,connecting:i=!1}){const{t:a}=k.useContext(_e),[o,f]=k.useState(!1),{data:c,loading:d,error:l,refresh:y}=ai(()=>fd({baseUrl:e,accessKey:n}),{ready:!!(e&&n),refreshDeps:[e,n],onSuccess:()=>{f(!1)},onError:()=>{f(!1)}}),p=k.useCallback(()=>{d||o||(f(!0),y())},[y,d,o]);return l?null:t.jsxs(B,{children:[t.jsx(ce,{variant:"h5",sx:{fontSize:18,mb:2},children:a("setting.aigne.account")}),t.jsxs(ze,{container:!0,className:"config-container",spacing:2,sx:{width:"100%"},children:[t.jsx(ze,{size:{xs:12,md:6},children:t.jsx(es,{loading:d&&!o,user:c?.user,switchUser:r,connecting:i,url:e})}),t.jsx(ze,{size:{xs:12,md:6},children:t.jsx(ts,{refreshing:o,loading:d&&!o,credit:c,connecting:i,onRefresh:p})})]})]})}ns.propTypes={url:x.string.isRequired,apiKey:x.string.isRequired,connecting:x.bool,switchUser:x.func};function rs({url:e,providerName:n,disconnect:r=mt,disabled:i=!1,loading:a=!1,validationResult:o=""}){const{t:f}=k.useContext(_e),c=k.useMemo(()=>o&&o!=="success",[o]);return t.jsx(rn,{minHeight:80,height:"none",children:t.jsxs(B,{sx:{width:"100%",height:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:2},children:[c?t.jsx(Ce,{title:o,children:t.jsx(Zn,{sx:{fontSize:24,color:"error.main",cursor:"pointer",flexShrink:0}})}):t.jsx(Bo,{sx:{fontSize:24,color:"success.main",cursor:"pointer",flexShrink:0}}),t.jsxs(B,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flex:1,flexWrap:"wrap"},children:[t.jsxs(B,{children:[t.jsx(ce,{variant:"h5",sx:{fontSize:18},children:c?f("setting.aigne.testFailed"):f("setting.aigne.connected",{provider:n})}),t.jsxs(ce,{variant:"body1",sx:{color:"text.secondary",fontSize:14},children:[f("setting.aigne.baseUrl",{provider:n}),": ",e]})]}),t.jsx(Xt,{variant:"outlined",color:"error",startIcon:a?t.jsx(je,{size:16,sx:{mr:1}}):t.jsx(Yi,{}),onClick:r,disabled:i||a,sx:{lineHeight:1.5},children:f("setting.aigne.disconnect")})]})]})})}rs.propTypes={url:x.string.isRequired,providerName:x.string.isRequired,disabled:x.bool,disconnect:x.func,loading:x.bool,validationResult:x.string};function rt({desc:e,docLink:n=null,provider:r="",orientation:i="vertical"}){const{t:a}=k.useContext(_e);return t.jsxs(ce,{variant:"body2",sx:{lineHeight:1.6,color:"text.secondary",fontSize:12,...i==="vertical"&&{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},title:e,children:[e,n&&t.jsx(Ce,{title:t.jsxs(t.Fragment,{children:[a("setting.aigne.desc.docLink"),n&&t.jsxs(t.Fragment,{children:[":"," ",t.jsx(xt,{href:n,target:"_blank",rel:"noopener noreferrer",sx:{ml:.5},children:r||"documentation"})]})]}),arrow:!0,children:t.jsx(ja,{fontSize:"small",sx:{ml:.25,fontSize:14,cursor:"pointer",verticalAlign:"middle"}})})]})}const Bn={provider:"",model:"",url:"",key:"",accessKeyId:"",testConnection:""};rt.propTypes={desc:x.string.isRequired,docLink:x.string,provider:x.string,orientation:x.oneOf(["vertical","horizontal"])};function os({orientation:e="vertical",hideDivider:n=!1,source:r="dashboard",forceValidate:i=!1},a){const[o,f]=k.useState(!1),[c,d]=k.useState(!1),[l,y]=k.useState(!1),[p,C]=k.useState(!1),{t:m}=k.useContext(_e),v=xe(),{api:j}=v,{did:w,blocklet:S,actions:u}=De(),[s,h]=k.useState(!1),b=pr({...Bn}),R=pr({loading:!1,success:!1}),{confirmApi:E,confirmHolder:M}=xo(),F=k.useMemo(()=>`connect-aigne-${w}`,[w]),P=dd(v),D=Zi({messageType:"connect-aigne-message",onOpen:()=>f(!0),onClose:()=>f(!1)}),I=k.useMemo(()=>o||c||l||R.loading,[o,c,l,R.loading]),L=He(A=>P.find(J=>J.provider===A)),z=He(A=>L(A)?.models||[]);li(()=>{F&&fl(F)});const q=He(A=>{if(A)return A;const J=P[0]?.provider;return z(J)[0]?.name||"auto"}),G=He(()=>{Object.keys(Bn).forEach(A=>{b[A]=Bn[A]})}),ne=kt(()=>{const{aigne:A={}}=S?.settings||{};return A},[S]),oe=kt(()=>{const A={...ne},J=A?.provider||P[0]?.provider,te=L(J),ge=pt(J),vt=Ht(J);return{...A,url:fr.getOriginUrl(A?.url||ge&&te?.baseURL||""),provider:J,model:q(A?.model),key:Dn(A?.key,w),accessKeyId:vt?Dn(A?.accessKeyId,w):A?.accessKeyId,secretAccessKey:vt?Dn(A?.secretAccessKey,w):A?.secretAccessKey}},[S,L,q]),[U,ie]=k.useState(oe);k.useEffect(()=>{ie(oe)},[oe]);const N=k.useMemo(()=>U?.url&&U?.key&&U?.provider==="aigneHub",[U]),O=kt(()=>L(U.provider)?.name||U.provider,[U,L]),g=k.useMemo(()=>cd(U),[U]),_=kt(()=>L(U.provider)?.documentation||"",[U,L]),T=async()=>{try{f(!0);const A=new Set(["running","error"]),J=S.children.filter(te=>A.has(te.status)||A.has(te.greenStatus)).map(te=>te.meta.did);await j.restartBlocklet({input:{did:w,componentDids:J}}),u.refreshBlocklet()}catch(A){console.error("error",A),V.error(ve(A))}finally{f(!1)}},$=(A=!0)=>{if(r!=="setup")return new Promise(J=>{E.open({title:m("setting.aigne.restart.title"),content:A?m("setting.aigne.restart.connectedContent",{provider:O}):m("setting.aigne.restart.notConnectedContent",{provider:O}),confirmButtonText:m("setting.aigne.restart.confirm"),cancelButtonText:m("setting.aigne.restart.cancel"),onConfirm(te){te(),T(),J(!0)},onCancel(){J(!1)}})})},H=He(()=>new Promise(A=>{E.open({title:m("setting.aigne.revokeUrlAuthTitle",{url:m("setting.aigne.baseUrl",{provider:O})}),content:m("setting.aigne.revokeUrlAuth",{url:m("setting.aigne.baseUrl",{provider:O})}),confirmButtonText:m("common.confirm"),cancelButtonText:m("common.cancel"),onConfirm(J){J(),A(!0)},onCancel(){A(!1)}})})),ee=async(A,J)=>{const te={};if(ie({...U,[A]:J}),A==="provider"){const ge=z(J);ge.length>0&&(te.model=ge[0].name),te.key=""}return N&&A==="url"&&J!==U.url&&(await H()?(te.key="",te.validationResult=""):te.url=U.url),setTimeout(()=>{ie({...U,[A]:J,...te})},100),h(!0),!0},re=k.useMemo(()=>U.provider,[U.provider]),Y=He(A=>ci(A)?"":m("setting.aigne.invalidUrl",{provider:O})),Se=(A=[])=>{const J=g.filter(ge=>!A.includes(ge));if(J.length)return J.forEach(ge=>{b[ge]="required"}),!J.includes("url")&&pt(U.provider)&&(b.url=Y(U.url)),!1;const te=pt(U.provider)&&Y(U.url);return te?(b.url=te,!1):!0},me=async()=>{try{y(!0),await j.disconnectToAigne({input:{did:w,url:U.url,key:U.key}}),h(!1),V.success(m("setting.aigne.disconnectSuccess")),setTimeout(()=>{$(!1)},300)}catch(A){console.error("disconnect error:",A),V.error(ve(A)||m("setting.aigne.disconnectFailed"))}finally{y(!1)}},Q=()=>{E.open({title:m("setting.aigne.disconnect"),content:m("setting.aigne.disconnectConfirm"),confirmButtonText:m("setting.aigne.disconnect"),cancelButtonText:m("common.cancel"),onConfirm(A){A(),me()}})},de=async()=>{if(!Se())return;G();const A={...U,model:"auto",key:In(U.key,w)};Ht(A.provider)?(A.key="",U.accessKeyId&&(A.accessKeyId=In(U.accessKeyId,w)),U.secretAccessKey&&(A.secretAccessKey=In(U.secretAccessKey,w))):(A.accessKeyId="",A.secretAccessKey="");const J=await j.updateBlockletSettings({input:{did:w,aigne:A}});return u.refreshBlocklet(),J},Ve=async()=>{try{if(!s&&!i)return;f(!0);const A=await de();return A?(h(!1),V.success(m("oauth.saveSuccess")),A):void 0}catch(A){throw console.error("error",A),V.error(ve(A)||m("setting.aigne.failed")),A}finally{f(!1)}},Ye=async(A=!1)=>{b.testConnection="";try{if(R.loading=!0,!A&&(await de())?.code!=="ok")return;await j.verifyAigneConnection({input:{did:w}}),V.success(m("setting.aigne.testSuccess",{provider:O})),R.success=!0}catch(J){throw console.error("error",J),b.testConnection=J.message,V.error(m("setting.aigne.testFailed")),J}finally{R.loading=!1,u.refreshBlocklet()}},at=async()=>{try{await hl(j,{did:w,refresh:u.refreshBlocklet,t:m,providerName:O,timerKey:F,values:{...ne}}).catch(A=>{throw console.error("waitGetConnectedAigne error",A),V.error(ve(A)),A}).then(()=>Ye(!0).catch(A=>{throw console.error("onVerifyConnection error",A),A})),$(!0)}catch(A){console.error("error",A)}finally{h(!1)}},Ze=()=>{Se(["key"])&&(G(),D(async(A,J)=>{try{d(!0);const te=await j.connectToAigne({input:{did:w,baseUrl:fr.getOriginUrl(U.url||new URL(window.location.origin).origin),provider:U.provider,model:"auto"}});if(!te?.url){V.error("failed to connect to endpoint"),d(!1),f(!1);return}J(te.url),await at(),d(!1)}catch(te){const ge=ve(te);V.error(ge),d(!1)}}))};k.useImperativeHandle(a,()=>({onSubmit:Ve,loading:o||c||l})),z(re);const Xe=re==="aigneHub",sn=()=>{C(!p)},Ee=A=>{A.preventDefault()},yt=k.useMemo(()=>b.url==="required"?m("common.requiredErrorText",{name:m("setting.aigne.baseUrl",{provider:O})}):b.url?b.url:b.key==="required"?m("setting.aigne.apiKeyNotAuthorized",{provider:O}):"",[b.url,b.key,m,O]);return t.jsxs(hd,{source:r,children:[t.jsx(ce,{variant:"h5",sx:{fontSize:18},children:m("setting.aigne.authorizeAigneHub",{name:O})}),N&&U.validationResult?t.jsx(rs,{url:U.url,providerName:O,disconnect:Q,validationResult:U.validationResult,disabled:I,loading:l}):t.jsx(rn,{height:"none",minHeight:"none",children:t.jsxs(B,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:2},children:[t.jsx(dt,{orientation:e,title:m("setting.aigne.baseUrl",{provider:O}),required:pt(U.provider),desc:t.jsx(rt,{desc:m("setting.aigne.desc.baseUrl",{example:"https://hub.aigne.io"})}),children:t.jsx(Pt,{disabled:I,initialValue:U.url||"",directEditing:!0,onSubmit:A=>{ee("url",A)},autoFocus:!1,errorTips:yt,InputProps:N?{endAdornment:t.jsx(mr,{position:"end",children:R.loading||c?t.jsx(je,{size:16}):t.jsxs(t.Fragment,{children:[U.validationResult==="success"?t.jsx(Ce,{title:m("setting.aigne.testSuccess",{provider:O}),children:t.jsx(Bo,{sx:{fontSize:16,color:"success.main",cursor:"pointer"}})}):null,U.validationResult&&U.validationResult!=="success"?t.jsx(Ce,{title:U.validationResult,children:t.jsx(Zn,{sx:{fontSize:16,color:"error.main",cursor:"pointer"}})}):null,U.validationResult?null:t.jsx(he,{"aria-label":"test connection",onClick:Ye,edge:"end",children:R.loading?t.jsx(je,{size:16}):t.jsx(Ce,{title:m("setting.aigne.testConnection",{provider:O}),children:t.jsx(pe,{style:{fontSize:16},icon:"tabler:location-check"})})})]})})}:{}})}),t.jsx(Xt,{variant:"contained",onClick:Ze,startIcon:c?t.jsx(je,{size:16,sx:{mr:1}}):t.jsx(Jt,{}),disabled:I||!U.url,sx:{flexShrink:0},children:m("setting.aigne.authorizeAigneHub",{name:"AIGNE Hub"})})]})}),t.jsxs(ze,{container:!0,className:"config-container",spacing:2,sx:{display:"none"},children:[t.jsx(ze,{size:{xs:12,md:4},children:t.jsx(dt,{orientation:e,title:m("setting.aigne.modelAdapter"),required:!0,desc:t.jsx(rt,{desc:m("setting.aigne.desc.modelAdapter")}),children:t.jsx(Yo,{disabled:I,options:P,config:{multiple:!1,labelField:"name",valueField:"provider"},initialValue:U.provider,directEditing:!0,searchable:!1,helperText:b.provider==="required"?m("common.requiredErrorText",{name:m("setting.aigne.modelAdapter")}):b.provider,onChange:A=>ee("provider",A)})})}),null,Xe?null:t.jsx(t.Fragment,{children:Ht(U.provider)?t.jsxs(t.Fragment,{children:[t.jsx(dt,{orientation:e,title:"Access Key ID",required:!0,desc:t.jsx(rt,{desc:m("setting.aigne.desc.accessKeyId"),docLink:_,provider:O}),children:t.jsx(Pt,{disabled:I,initialValue:U.accessKeyId||"",type:p?"text":"password",onChange:A=>ee("accessKeyId",A),directEditing:!0,autoFocus:!1})}),!n&&t.jsx(B,{className:"config-form",component:di,sx:{my:3}}),t.jsx(dt,{orientation:e,title:"Secret Access Key",required:!0,desc:t.jsx(rt,{desc:m("setting.aigne.desc.secretAccessKey"),docLink:_,provider:O}),children:t.jsx(Pt,{disabled:I,initialValue:U.secretAccessKey||"",type:p?"text":"password",onChange:A=>ee("secretAccessKey",A),directEditing:!0,autoFocus:!1})})]}):t.jsx(dt,{orientation:e,title:"API Key",required:!0,desc:t.jsx(rt,{desc:m("setting.aigne.desc.key",{provider:O}),docLink:_,provider:O}),children:t.jsx(Pt,{disabled:I,initialValue:U.key||"",type:p?"text":"password",onChange:A=>ee("key",A),directEditing:!0,autoFocus:!1,InputProps:{endAdornment:t.jsx(mr,{position:"end",children:t.jsx(he,{"aria-label":"toggle password visibility",onClick:sn,onMouseDown:Ee,edge:"end",children:p?t.jsx(Ua,{}):t.jsx(Na,{})})})}})})})]}),N&&U.validationResult==="success"?t.jsx(ns,{switchUser:Ze,url:U.url||"",apiKey:U.key||"",connecting:c||l}):null,r!=="setup"&&t.jsxs(ce,{sx:{fontSize:12,color:"text.secondary",mt:3,fontStyle:"italic"},children:["* ",m("setting.aigne.description",{name:X.getDisplayName(S,!0)})]}),M]})}os.propTypes={orientation:x.oneOf(["vertical","horizontal"]),hideDivider:x.bool,source:x.oneOf(["dashboard","setup"]),forceValidate:x.bool};const hd=se.div`
|
|
352
|
+
max-width: 920px;
|
|
353
|
+
display: flex;
|
|
354
|
+
flex-direction: column;
|
|
355
|
+
gap: 16px;
|
|
356
|
+
.section-title {
|
|
357
|
+
line-height: 1.2 !important;
|
|
358
|
+
font-weight: ${({source:e})=>e==="setup"?"400":"500"};
|
|
359
|
+
color: ${({theme:e,source:n})=>n==="setup"?e.palette.text.secondary:e.palette.text.primary};
|
|
360
|
+
font-size: ${({source:e})=>e==="setup"?"14px":"16px"};
|
|
361
|
+
}
|
|
362
|
+
.section-left {
|
|
363
|
+
width: 100%;
|
|
364
|
+
}
|
|
365
|
+
.form-item {
|
|
366
|
+
margin-bottom: 0 !important;
|
|
367
|
+
margin-top: 0 !important;
|
|
368
|
+
}
|
|
369
|
+
`,gd=k.forwardRef(os),xd=(e,n)=>(e?.children||[]).find(r=>r.mountPoint===n)?.meta,yd=e=>e.inStore&&X.isFreeBlocklet(e)===!1,vd=e=>[be.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,be.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes(e?.capabilities?.didSpace),On=e=>e?.configs?.find(n=>n.key===be.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)?.value||null,Cd=e=>(e.environments||[]).some(n=>n.required),ao=(e,n)=>e?.some(r=>r.required&&!n[r.key]),bd=({params:e,blocklet:n,t:r})=>{const i=e.title||e.name;return i?(n?.children||[]).find(o=>o.meta.bundleDid===e.bundleDid)?r("blocklet.component.upgradeNext",{name:i}):r("blocklet.component.addNext",{name:i}):r("common.next")},lo=({componentDid:e,timeout:n=1e3,manual:r=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:e,manual:r},"*")},n)},jd=e=>e?.store?e.store:e?.url||"";function ss({onClose:e=()=>{},mode:n="normal",stores:r=[],resourceType:i="",resourceDid:a="",storageKey:o="",inDialog:f=!0,selectedMeta:c=null,storeUrl:d="",showResourcesSwitch:l=!0,showFromUrl:y=!0,enableRunBackground:p=!0,showCategory:C=!0,installFromUrlParams:m=null}){const{t:v,locale:j}=le(),[w,S]=k.useState(!1),[u,s]=k.useState(null),[h,b]=k.useState(""),[R,E]=k.useState(""),{api:M,ws:{useSubscription:F},inService:P,info:D}=xe(),{blocklet:I,actions:{refreshBlocklet:L}}=De(),[z,q]=k.useState(null),[G,ne]=k.useState(!1),oe={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1,isUpload:!1,upgradeDid:""},[U,ie]=k.useState(oe),[N,O]=k.useState(0),g=k.useRef({}),_=k.useRef({}),T=k.useRef({}),$=yo(W=>W.breakpoints.down("md")),H=ui(),[ee,re]=k.useState(!0),{meta:Y}=g.current,Se=ca(Y),me=k.useRef(!1),Q=k.useRef(null),de=W=>ie(Z=>({...Z,...W}));k.useEffect(()=>{if(U.pathPrefix){const{errMsg:W}=J({...U,pathPrefix:U.pathPrefix,locale:j});b(W)}},[U.pathPrefix]),k.useEffect(()=>{N===0&&ie(oe)},[N]);const Ve=()=>{const W=On(I)??"";de({didSpaceEndpoint:W})},Ye=()=>g?.current?.meta?X.getDisplayName(g.current):"",at=()=>{S(!1),ie({}),me.current=!1,g.current={},e()},Ze=W=>{const Z=ae=>{de({installResultProps:{variant:"error",title:Ye(),subTitle:W,footer:t.jsx(Be,{className:"bottom-button",disabled:ae,"data-cy":"retry-install-component",onClick:async()=>{Z(!0),await A(g.current.installInput)},children:t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[ae&&t.jsx(je,{size:16,style:{marginRight:8}}),v("common.retry")]})})}})};Z()},Xe=W=>Z=>{(Z?.meta?.did||Z?.meta)===I?.meta?.did&&W(Z)},sn=()=>{lo({timeout:0,componentDid:H.componentDid,manual:!0}),at(),setTimeout(()=>{const W=document.getElementsByClassName("dashboard-main")[0];W&&(W.scrollTop=W.scrollHeight)},200)};F(be.BlockletEvents.componentInstalled,Xe(()=>{de({installResultProps:{variant:"success",title:Ye(),subTitle:v("blocklet.component.installSuccessTip")}}),lo({componentDid:H.componentDid})}),[I?.meta?.did]),F(be.BlockletEvents.statusChange,Xe(()=>{const W=On(I);de(Z=>({...Z,didSpaceEndpoint:W}))}),[I?.meta?.did]),F(be.BlockletEvents.downloadFailed,Xe(()=>{me.current=!1,Ze(v("blocklet.component.installComponentError"))}),[I?.meta?.did]),F(be.BlockletEvents.installFailed,Xe(()=>{me.current=!1,Ze(v("blocklet.component.installComponentError"))}),[I?.meta?.did]);const Ee=[],yt=W=>(I?.children||[]).find(Z=>Z.meta.did===W),A=async W=>{me.current=!0;const{pathPrefix:Z,bundleDid:ae,title:ue,componentName:Te="",componentDid:qe=""}=U,Ge=g.current?.meta||{},{configs:Qe=[],registryUrl:Ue,inStore:Je,inputUrl:lt,dist:ln}=Ge,Ct=g.current?.downloadTokenList,bt=lt||(Je?hr(Ue,ae,ln):"");S(!0);const Re={rootDid:I.meta.did,url:bt,mountPoint:Z?Le.urlPathFriendly(Z):`/${Le.urlPathFriendly(Ge.title||Ge.name)}`,title:ue,name:Te,did:U.isUpload&&U.upgradeDid?U.upgradeDid:qe,dist:{tarball:"",integrity:""},onlyRequired:!ee,...U.hasEnvironmentsStep&&Qe.length>0?{configs:Qe.map(Ae=>({...Ae,value:U.configsValue[Ae.key]||""}))}:{},...Ct?{downloadTokenList:Ct}:{},...W};try{if(await M.installComponent({input:Re}),Ue){const{teamDid:Ae,storeList:$e}=fo({fromBlocklet:P,nodeInfo:D,blocklet:I}),{isNew:ct,decoded:jt}=mi(Ue,$e);ct&&M.addBlockletStore({input:{teamDid:Ae,url:jt}}).catch(cn=>{console.error("addBlockletStore error: ",cn)})}de({installResultProps:{}}),L({showError:!1,attachRuntimeInfo:!1})}catch(Ae){const $e=ve(Ae);V.error($e),console.error("installComponent error: ",Ae),Ze($e)}finally{S(!1),g.current.installInput=Re}},J=W=>{const Z=Po({params:{...W,did:W.bundleDid},blocklets:[I],blocklet:I,locale:j,isUpload:U.isUpload});let ae=Z;const ue=xd(I,U.pathPrefix);if(Z==="overwrite"&&ue&&ue.did!==W.bundleDid?(de({upgradeDid:ue.did}),ae=""):(de({upgradeDid:""}),ae=Z),ae){const Te=yt(W.bundleDid),qe=va({params:{...W,did:W.bundleDid},blocklet:I});if(Te&&Te.mountPoint===qe)return{errMsg:""}}return{errMsg:ae}},te=async W=>{const{errMsg:Z}=J({...U,locale:j});b(Z),N===Ee.length-2&&!me.current&&await A(W),_.current?.setActiveStepByIndex?.(ae=>ae+1)},ge=()=>{_.current?.setActiveStepByIndex?.(W=>W-1)},vt=()=>{const{pathPrefix:W,bundleDid:Z,title:ae,componentName:ue="",componentDid:Te=""}=U,{meta:qe={}}=g.current||{},{registryUrl:Ge,inStore:Qe,inputUrl:Ue,dist:Je}=qe,lt=Qe?hr(Ge,Z,Je):Ue;q({meta:qe,installOpts:{type:"component",rootDid:I.meta.did,mountPoint:W,url:lt,title:ae,name:ue,did:Te}})},ar=W=>{ne(!1),de({purchaseResultProps:{variant:"error",title:Ye(),subTitle:W,style:{paddingTop:120},footer:t.jsx(Be,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{de({purchaseResultProps:{}})},children:v("common.retry")})}})},vs=({downloadTokenList:W})=>{g.current.downloadTokenList=W,ne(!1),te()},an=({chooseParams:W=g.current,componentDid:Z,isInit:ae=!1,isUpload:ue=!1})=>{const{meta:Te,registryUrl:qe,inStore:Ge,inputUrl:Qe}=W,{did:Ue,title:Je,name:lt}=Te,ln=(I.settings?.children||[]).filter(Ie=>Ie.status==="deleted"&&Ie.meta.bundleDid===Ue),Ct=Z||"",bt=Te.environments?.map(Ie=>{const{name:dn,validation:wt,..._t}=Ie,un={validation:Hn(wt)?"":wt};return{..._t,key:dn,...un}});g.current={...W,meta:{...Te,configs:bt,registryUrl:qe,inStore:Ge,inputUrl:Qe}};let Re={};if(ae){const Ie=[I],dn=bt||[],wt=[],_t=mo(fi([...dn,...wt]),"key").filter(et=>!!et.key).sort((et,St)=>et.required&&!St.required?-1:St.required&&!et.required?1:0),un=X.getSharedConfigObj(Ie[0],{configs:_t}),pn={},lr=_t.map(et=>{const{default:St,key:Et,...ws}=et;return pn[Et]=un[Et]||St,{...ws,key:Et,hidden:!!be.BLOCKLET_CONFIGURABLE_KEY[Et]}});Re={...Re,configsList:lr,configsValue:pn,hasMissRequiredConfigs:ao(lr,pn)}}const Ae=I.children.some(Ie=>Ie.mountPoint==="/"),$e=ln.find(Ie=>Ie.meta.bundleDid===Ue),ct=I.children.find(Ie=>Ie.meta.bundleDid===Ue);Re.title=Je||"",$e?Re={...Re,pathPrefix:$e.mountPoint||"",componentName:$e.meta.name,hasEnvironmentsStep:!1}:ct?Re={...Re,pathPrefix:ct.mountPoint||"",componentName:ct.meta.name,hasEnvironmentsStep:!1}:Re={...Re,pathPrefix:Ae?`/${Le.urlPathFriendly(Je)||Le.urlPathFriendly(lt)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:g.current.meta?.environments?.length>0};const jt=yd(g.current.meta),cn=vd(g.current.meta),js=On(I);de({bundleDid:Ue,componentDid:Ct,...Re,hasRequiredEnvironments:Cd(g.current.meta),requirePurchase:jt,didSpaceIsRequiredSetup:cn,didSpaceEndpoint:js,isUpload:ue}),ae&&jt&&vt()},Cs=async()=>{if(!Q.current.loading)try{S(!0),await Q.current.onSubmit()&&te()}catch(W){console.error("error",W)}finally{S(!1)}};k.useEffect(()=>{if(!c&&!m?.meta||N!==0||!I)return;const{meta:W,inputUrl:Z="",inStore:ae=!0,registryUrl:ue="",isUpload:Te=!1}=m||{};an({chooseParams:{blocklets:[c||W],meta:c||W,registryUrl:ue||d||jd(c?.bundleSource),inStore:ae,inputUrl:Z},isInit:!0,isUpload:Te}),de({showFromUrlDialog:!1}),te()},[c,N,I,m]),Ee.push({key:"selectComponent",name:v("blocklet.component.selectComponent"),body:t.jsxs(We,{sx:{width:400,display:"flex",flexDirection:"column"},component:"div",children:[y&&U.showFromUrlDialog&&t.jsx(Ro,{mode:"component",onCancel:()=>{de({showFromUrlDialog:!1})},onSuccess:({meta:W,inputUrl:Z,inStore:ae,registryUrl:ue})=>{an({chooseParams:{meta:W,inputUrl:Z,inStore:ae,registryUrl:ue},isInit:!0}),de({showFromUrlDialog:!1}),te()},handleText:{title:v("blocklet.component.addComponentTip.fromUrl"),confirm:v("blocklet.component.choose")}}),t.jsx(Ho,{stores:r,extra:_o.isInServerlessMode(D)?null:y?t.jsxs(Be,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{de({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[t.jsx(Jt,{style:{fontSize:20,marginRight:4}}),v("blocklet.component.addComponentTip.fromUrl")]}):null,loading:w,onChange:()=>{ie({}),g.current={}},storageKey:o,children:({currentRegistry:W})=>t.jsx(Go,{showResourcesSwitch:l,showCategory:C,serverVersion:D?.version,compact:!0,style:{flex:1,overflow:"hidden",height:"100%"},storeUrl:W.url,resourceType:i,resourceDid:a,handleButtonClick:Z=>{an({chooseParams:{...Z,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:Z,defaultRender:ae})=>{const ue=U?.bundleDid&&U?.bundleDid===Z?.did;return t.jsxs(_d,{children:[t.jsx(B,{className:ue?"choose-blocklet":"",sx:{"& > div":{position:"relative","&:before, &:after":{content:'""',position:"absolute",width:"0",height:"0",opacity:0,transition:"width 0.3s, height 0.3s, opacity 0.3s",borderRadius:"8px",pointerEvents:"none",...ue?{width:"100%",height:"100%",opacity:1}:{}},"&:before":{top:0,left:0,borderTop:"1px solid",borderLeft:"1px solid",borderColor:"primary.main"},"&:after":{bottom:0,right:0,borderBottom:"1px solid",borderRight:"1px solid",borderColor:"primary.main"},"&:hover":{"&:before, &:after":{width:"100%",height:"100%",opacity:1}}}},style:{marginLeft:16},children:ae}),ue&&t.jsx(B,{className:"check-container",children:t.jsx(pi,{className:"check-icon"})})]})}})})]}),cancel:n==="embed"?void 0:v("common.cancel"),confirm:bd({params:U,blocklet:I,t:v}),onCancel:at,onConfirm:()=>{te()}}),Ee.push({key:"agreement",name:v("launchBlocklet.introduction"),body:t.jsxs(We,{component:"div",className:"agreement-wrapper",children:[t.jsx(An,{title:v("launchBlocklet.introduction"),subTitle:v("blocklet.component.addComponentTip.introduction")}),Y?t.jsx(da,{meta:Y,onClickNext:te,installRelated:ee,onChangeInstallRelated:re,handleDescEle:t.jsx("p",{children:v("blocklet.component.addComponentTip.belowInformation")})}):null]}),cancel:c?void 0:v("common.pre"),disabled:!Se,confirm:v(Se?"launchBlocklet.next":"launchBlocklet.canNotInstall"),onCancel:c?at:ge,onConfirm:()=>{ne(!1),te()}}),Y&&U.requirePurchase&&Ee.push({key:"purchase",name:t.jsxs(t.Fragment,{children:[v("common.verifyNFT"),t.jsx(ot,{})]}),body:t.jsxs(We,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(T.current?.getCurrentStep?.()===2||G)&&t.jsx(Tt,{title:v("common.verifyNFT"),subTitle:v("blocklet.component.addComponentTip.verifyNFT")}),Rt(U.purchaseResultProps)?z&&t.jsx(qo,{ref:T,meta:z.meta,mode:U.componentDid?"verify":"both",onCancel:ar,installOpts:z.installOpts,handlePaySuccess:vs}):t.jsx("div",{className:"flex-align-center flex-justify-center",children:t.jsx(br,{...U.purchaseResultProps})})]}),disabled:T.current?.getCurrentStep?.()===2||G,cancel:v("common.pre"),confirm:v("common.next"),onConfirm:()=>{typeof T.current.onNext=="function"&&(T.current.onNext(),ne(!0))},onCancel:()=>{ge()}}),X.hasStartEngine(Y)&&Eo.hasMountPoint(Y)?Ee.push({key:"config",name:v("common.config"),error:h,body:t.jsxs(We,{component:"div",children:[t.jsx(Tt,{title:v("common.config"),subTitle:v("blocklet.component.addComponentTip.config")}),t.jsx(ye,{label:v("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",fullWidth:!0,helperText:R||v("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:U.pathPrefix,onChange:W=>{const Z=W.target.value;de({pathPrefix:Z}),E(v("common.slugifyHint",{value:Kn(Z)}))},slotProps:{htmlInput:{"data-cy":"mount-point-input"}}}),!!h&&t.jsx(Un,{severity:"error",style:{width:"100%",marginTop:8},children:h})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:ge,onConfirm:()=>{te()}}):Y&&(U.pathPrefix=Y.interfaces?.[0]?.path||`/${Y.did}`),Y&&Y?.requirements?.aigne&&Ee.push({key:"aigne",name:t.jsxs(ce,{component:"div",title:v("setting.aigne.config"),sx:{whiteSpace:"break-spaces"},children:[v("setting.aigne.config")," ",t.jsx(ot,{})]}),body:()=>t.jsxs(We,{component:"div",className:"aigne-config-wrapper",children:[t.jsx(An,{title:v("setting.aigne.config")}),t.jsx(B,{className:"form-container",sx:{"> div":{maxWidth:"unset",width:"100%"}},children:t.jsx(gd,{orientation:"vertical",hideSubmitButton:!0,hideDivider:!0,source:"setup",forceValidate:!0,ref:Q})})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:()=>{Q.current.loading||ge()},onConfirm:Cs,loading:w||Q.current?.loading,disabled:w||Q.current?.loading}),Y&&U?.hasEnvironmentsStep&&Ee.push({key:"environment",name:t.jsxs(t.Fragment,{children:[v("common.environment")," ",U.hasRequiredEnvironments&&t.jsx(ot,{})]}),disabled:!!u||U?.hasMissRequiredConfigs,body:()=>t.jsxs(We,{component:"div",style:{overflowY:"auto"},children:[t.jsx(Tt,{title:v("common.environment"),subTitle:v("blocklet.component.addComponentTip.environment")}),t.jsx(zo,{style:{marginTop:-12,width:"100%"},schema:U.configsList,defaultValue:U.configsValue,onChange:(W,{action:Z,currentItem:ae,allValues:ue})=>{Z==="confirm"&&de({hasMissRequiredConfigs:ao(U.configsList,ue),configsValue:ue}),Z==="edit"?s(ae):["cancel","confirm"].includes(Z)&&s(null)}})]}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:ge,onConfirm:te}),Y&&U?.didSpaceIsRequiredSetup&&Ee.push({key:"didSpace",name:t.jsxs(t.Fragment,{children:[v("blocklet.component.didSpaceConfig")," ",U.didSpaceIsRequiredSetup==="required"&&t.jsx(ot,{})]}),disabled:U?.didSpaceIsRequiredSetup&&!U.didSpaceEndpoint,body:()=>t.jsx(aa,{children:t.jsxs(We,{component:"div",children:[t.jsx(Tt,{title:v("blocklet.component.didSpaceConfig"),subTitle:v("blocklet.component.didSpaceConfigTip")}),t.jsx(B,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:t.jsx(Wo,{blockletMeta:g.current.meta,onNext:()=>{te()},onEndpointUpdate:Ve})})]})}),cancel:v("common.pre"),confirm:v("common.next"),onCancel:ge,onConfirm:te}),Ee.push({key:"install",name:yt(Y?.did)?v("common.upgrade"):v("common.install"),disabled:p?!1:Rt(U.installResultProps),loading:p?!1:Rt(U.installResultProps),body:t.jsx(We,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:Rt(U.installResultProps)?t.jsx(ta,{message:t.jsx(Sd,{children:v(p?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):t.jsx("div",{style:{marginTop:120},children:t.jsx(br,{...U.installResultProps})})}),confirm:v("common.complete"),onConfirm:sn});const Pe=Ee[N]||{},bs=()=>w||Pe.error||!U.bundleDid?!0:N>1?!U.pathPrefix:!1;return I?t.jsxs(wd,{sx:f?{height:{xs:"calc(100vh - 72px - 32px)",md:"72vh"},"&& .ll-header":{p:3},"&& .MuiDialogContent-root":{p:0},"&& .layout-content":{p:0,pl:{xs:0,md:2},pb:0,"& .filter-bar":{pt:0,pl:2}}}:{width:"100%",height:"100vh"},children:[t.jsx(na,{steps:Ee,mode:"memory",children:t.jsx(Vo,{ref:_,meta:Y,isMobile:$,onStepChange:W=>{O(W)}})}),t.jsxs(B,{className:"action-bar",children:[Pe.cancel&&t.jsx(Be,{onClick:W=>{W.stopPropagation(),Pe.onCancel()},disabled:N===Ee.length-2&&w,color:"inherit",children:Pe.cancel||v("common.cancel")}),Pe.confirm&&t.jsx(Be,{onClick:W=>{W.stopPropagation(),Pe.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:w||(typeof Pe.disabled=="boolean"?Pe.disabled:bs()),variant:"contained",autoFocus:!0,title:Pe.confirm,style:{marginLeft:8,overflow:"hidden",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:t.jsxs(B,{sx:{display:"flex",alignItems:"center",overflow:"hidden"},children:[(typeof Pe.loading=="boolean"?Pe.loading:w)&&t.jsx(je,{style:{marginRight:8},size:16}),t.jsx(B,{component:"span",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:Pe.confirm})]})})]})]}):null}ss.propTypes={onClose:x.func,mode:x.oneOf(["normal","embed"]),inDialog:x.bool,stores:x.arrayOf(x.string),storeUrl:x.string,resourceType:x.string,resourceDid:x.string,storageKey:x.string,selectedMeta:x.object,showResourcesSwitch:x.bool,showFromUrl:x.bool,enableRunBackground:x.bool,showCategory:x.bool,installFromUrlParams:x.object};const wd=se(B)`
|
|
370
|
+
.action-bar {
|
|
371
|
+
display: flex;
|
|
372
|
+
justify-content: flex-end;
|
|
373
|
+
position: sticky;
|
|
374
|
+
bottom: 0;
|
|
375
|
+
padding-top: 16px;
|
|
376
|
+
z-index: 100;
|
|
377
|
+
width: 100%;
|
|
378
|
+
background: ${({theme:e})=>e.palette.background.paper};
|
|
379
|
+
border-top: '1px solid';
|
|
380
|
+
border-color: ${({theme:e})=>e.palette.divider};
|
|
381
|
+
}
|
|
382
|
+
`,We=se(ce)`
|
|
383
|
+
width: 100%;
|
|
384
|
+
height: 100%;
|
|
385
|
+
`,Tt=se(An)`
|
|
386
|
+
margin-bottom: 24px;
|
|
387
|
+
`,_d=se.div`
|
|
388
|
+
position: relative;
|
|
389
|
+
|
|
390
|
+
.choose-blocklet {
|
|
391
|
+
background-color: rgb(236, 251, 253);
|
|
392
|
+
border-color: rgb(236, 251, 253);
|
|
393
|
+
border-radius: 8px;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.check-container {
|
|
397
|
+
position: absolute;
|
|
398
|
+
right: 0;
|
|
399
|
+
bottom: 0;
|
|
400
|
+
display: flex;
|
|
401
|
+
justify-content: flex-end;
|
|
402
|
+
align-items: flex-end;
|
|
403
|
+
width: 30px;
|
|
404
|
+
height: 30px;
|
|
405
|
+
border-radius: 0 0 8px 0;
|
|
406
|
+
color: ${e=>e.theme.palette.common.white};
|
|
407
|
+
overflow: hidden;
|
|
408
|
+
transition: all ease 0.3s;
|
|
409
|
+
&:after {
|
|
410
|
+
position: absolute;
|
|
411
|
+
z-index: 0;
|
|
412
|
+
display: block;
|
|
413
|
+
width: 0;
|
|
414
|
+
height: 0;
|
|
415
|
+
border-top: transparent solid 15px;
|
|
416
|
+
border-left: transparent solid 15px;
|
|
417
|
+
border-bottom: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
418
|
+
border-right: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
419
|
+
transition: all ease 0.1s;
|
|
420
|
+
content: '';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.check-icon {
|
|
424
|
+
position: relative;
|
|
425
|
+
z-index: 2;
|
|
426
|
+
margin: 0 1px 1px 0;
|
|
427
|
+
font-size: 16px;
|
|
428
|
+
transition: all ease 0.2s;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
`,Sd=se.div`
|
|
432
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
433
|
+
.msg-before {
|
|
434
|
+
display: inline-block;
|
|
435
|
+
color: #aaa;
|
|
436
|
+
font-size: 14px;
|
|
437
|
+
margin-right: 6px;
|
|
438
|
+
}
|
|
439
|
+
`;function tr({blocklet:e,showDialog:n,setShowDialog:r,selectedMeta:i=null,showFromUrl:a=!0,installFromUrlParams:o=null}){const{t:f}=le(),c=yo(y=>y.breakpoints.down("md")),{inService:d}=xe(),l=()=>{r(!1)};return n?t.jsx(Ed,{title:f("blocklet.component.addWithName",{name:X.getDisplayName(e)}),maxWidth:!1,fullWidth:!1,PaperProps:{style:c?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(y,p)=>{p!=="backdropClick"&&l()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:t.jsx(ss,{selectedMeta:i,onClose:l,storageKey:d?Xi:Qi,showFromUrl:a,installFromUrlParams:o})}):null}tr.propTypes={selectedMeta:x.object,showDialog:x.bool.isRequired,setShowDialog:x.func.isRequired,blocklet:x.object.isRequired,showFromUrl:x.bool,installFromUrlParams:x.object};const Ed=se(Zt)`
|
|
440
|
+
.ux-dialog_header {
|
|
441
|
+
background-color: ${({theme:e})=>e.palette.background.paper};
|
|
442
|
+
}
|
|
443
|
+
.MuiDialogContent-root {
|
|
444
|
+
background-color: ${({theme:e})=>e.palette.background.paper};
|
|
445
|
+
}
|
|
446
|
+
`;function is({blocklet:e,children:n=null,disabled:r=!1}){const{t:i}=le(),[a,o]=k.useState(!1),[f,c]=k.useState({show:!1,params:null}),[d,l]=k.useState({show:!1,params:null}),{getSessionInHeader:y,prefix:p}=xe(),C=h=>{h.stopPropagation(),o(!0)},m=k.useCallback(()=>{c(h=>({...h,show:!0}))},[]),v=k.useCallback((h=!1)=>{c(h?{params:null,show:!1}:b=>({...b,show:!1}))},[]),j=k.useCallback(()=>{l({params:null,show:!0})},[]),w=k.useCallback(h=>{l({params:{...h,inStore:!1,isUpload:!0},show:!1}),h.meta&&o(!0)},[]),S=k.useCallback((h=!1)=>{l(h?{params:null,show:!1}:b=>({...b,show:!1}))},[]),u=k.useCallback(h=>{o(h),h||(v(!0),S(!0))},[v,S]),s=k.useMemo(()=>[t.jsxs(mn.Item,{"data-cy":"add-component-from-url",onClick:m,style:{fontSize:14,color:"primary.main"},children:[t.jsx(Jt,{style:{fontSize:16,marginRight:4}}),i("blocklet.component.addComponentTip.fromUrl")]},"add-component-from-url"),t.jsxs(mn.Item,{"data-cy":"add-component-from-upload",onClick:j,style:{fontSize:14,color:"primary.main"},children:[t.jsx(Oa,{style:{fontSize:16,marginRight:4}}),i("blocklet.component.addComponentTip.fromUpload")]},"add-component-from-upload")],[j,m,i]);return t.jsxs(t.Fragment,{children:[typeof n=="function"?n({open:C}):t.jsxs(mn,{onClick:C,disabled:r,size:"small",menuButtonProps:{"data-cy":"add-component-more"},menu:s,children:[t.jsx(zi,{style:{fontSize:"1.3em",marginRight:4}}),i("blocklet.component.add")]}),t.jsx(tr,{showDialog:a,setShowDialog:u,blocklet:e,selectedMeta:f.params?.meta||d.params?.meta||null,installFromUrlParams:f.params||d.params,showFromUrl:!1}),f.show?t.jsx(Ro,{mode:"component",onCancel:v,onSuccess:({meta:h,inputUrl:b,inStore:R,registryUrl:E})=>{c({show:!1,params:{meta:h,inputUrl:b,inStore:R,registryUrl:E}}),o(!0)},handleText:{title:i("blocklet.component.addComponentTip.fromUrl"),confirm:i("blocklet.component.choose")}}):null,t.jsx(Lo,{open:d.show,did:e.meta.did,prefix:p,headers:y,onUploaded:w,onClose:S})]})}is.propTypes={children:x.any,blocklet:x.object.isRequired,disabled:x.bool};const kd=e=>e.children.filter(n=>n.meta.interfaces.find(r=>r.type===be.BLOCKLET_INTERFACE_TYPE_WEB));function nr({params:e={},setParams:n=()=>{},setError:r=()=>{},serviceTypes:i=[{name:"Redirect",value:K.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:K.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:K.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Response - Response with provided content",value:K.ROUTING_RULE_TYPES.DIRECT_RESPONSE},{name:"Component - Pass traffic to blocklet component",value:K.ROUTING_RULE_TYPES.COMPONENT}]}){const{t:a}=le(),{blocklet:o}=De(),f=o.meta.did,c=kd(o),[d,l]=k.useState([]),y={301:a("common.redirectPermanently"),302:a("common.redirectTemporary"),307:a("common.redirectTemporary"),308:a("common.redirectPermanently")};return k.useEffect(()=>{if(e.type===K.ROUTING_RULE_TYPES.COMPONENT&&e.componentId){const p=c.find(v=>v.meta.did===e.componentId),C=X.findWebInterface(p.meta),m=(Array.isArray(C?.pageGroups)?C.pageGroups:[]).map(v=>({value:v,label:`${v} pages`}));m.length&&m.unshift({value:"",label:"All pages"}),l(m),e.pageGroup&&m.find(v=>v.value===e.pageGroup)===!1&&n({...e,pageGroups:""})}},[e.componentId,e.type]),t.jsxs(t.Fragment,{children:[t.jsx(ye,{select:!0,label:a("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:e.type,onChange:p=>{r(""),n({...e,type:p.target.value,did:p.target.value===K.ROUTING_RULE_TYPES.BLOCKLET?f:"",__disableConfirm:!1})},style:{marginBottom:32},slotProps:{select:{}},children:i.map(({name:p,value:C})=>t.jsx(Ne,{value:C,children:p},C))}),e.type===K.ROUTING_RULE_TYPES.REDIRECT&&[t.jsx(ye,{select:!0,label:a("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:e.redirectCode,onChange:p=>n({...e,redirectCode:p.target.value}),style:{marginBottom:32},slotProps:{select:{}},children:Object.keys(y).map(p=>t.jsx(Ne,{value:p,children:`${y[p]} - ${p}`},p))},"redirectCode"),t.jsx(ye,{label:a("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:e.url,helperText:a("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{n({...e,url:p.target.value,__disableConfirm:!p.target.value.trim()}),p.target.value.trim()?r(""):r(a("router.validation.redirectUrlRequired"))},slotProps:{htmlInput:{"data-cy":"redirect-url-input"}}},"redirectUrl")],e.type===K.ROUTING_RULE_TYPES.COMPONENT&&[t.jsx(ye,{select:!0,label:a("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:e.componentId,onChange:p=>{n({...e,componentId:p.target.value})},style:{marginBottom:32},slotProps:{select:{}},children:c.map(p=>t.jsx(Ne,{value:p.meta.did,selected:p.meta.did===e.componentId,children:X.getDisplayName(p,!0)},p.meta.did))},"componentId"),d.length?t.jsx(ye,{select:!0,label:a("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:e.pageGroup,helperText:a("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:p=>{n({...e,pageGroup:p.target.value})},slotProps:{select:{}},children:d.map(p=>t.jsx(Ne,{value:p.value,selected:p.value===e.pageGroup,children:p.label},p.label))},"pageGroup"):null].filter(Boolean),e.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&t.jsx(ye,{label:a("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:e.url,helperText:a("router.urlHelperText"),style:{marginBottom:32},onChange:p=>{const C=p.target.value.trim();n({...e,url:p.target.value,__disableConfirm:!C}),r(C?"":a("router.validation.rewriteUrlRequired"))}},"url"),e.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&[t.jsx(ye,{select:!0,label:a("router.rule.add.responseType"),autoComplete:"off",variant:"outlined",name:"responseType",fullWidth:!0,value:e.responseType,onChange:p=>n({...e,responseType:p.target.value}),style:{marginBottom:32},slotProps:{select:{}},children:K.ROUTING_RESPONSE_TYPES.map(p=>t.jsx(Ne,{value:p.value,children:p.text},p.value))},"responseType"),t.jsx(ye,{label:a("router.rule.add.responseBody"),autoComplete:"off",variant:"outlined",name:"responseBody","data-cy":"response-body-input",fullWidth:!0,multiline:!0,minRows:3,value:e.responseBody,helperText:a("router.rule.add.responseBodyTip"),style:{marginBottom:32},onChange:p=>{const C=p.target.value.trim();n({...e,responseBody:p.target.value,__disableConfirm:!C}),r(C?"":a("router.rule.add.responseBodyRequired"))}},"response-body")]]})}nr.propTypes={params:x.object,serviceTypes:x.array,setParams:x.func,setError:x.func};function as({children:e=null,hiddenChildren:n=!1,open:r=!1,onClose:i=null}){const{t:a}=le(),{api:o}=xe(),{blocklet:f}=De(),[c,d]=k.useState(!1),[l,y]=k.useState(!1),p=f.meta.did,C=f.site.id,m=()=>{i?.(),d(!1),y(!1)},v=async u=>{try{const s=await Vt(u,a);if(s)throw s;d(!0);const h={from:{pathPrefix:Le.urlPathFriendly(u.pathPrefix)},to:{type:u.type}};u.type===K.ROUTING_RULE_TYPES.REDIRECT&&(h.to.url=u.url.trim(),h.to.redirectCode=u.redirectCode),u.type===K.ROUTING_RULE_TYPES.COMPONENT&&(h.to.did=p,h.to.componentId=u.componentId,h.to.pageGroup=u.pageGroup),u.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(h.to.url=Le.urlPathFriendly(u.url)),u.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(h.to.response={status:200,contentType:u.responseType,body:u.responseBody}),await o.addRoutingRule({input:{id:C,rule:h,teamDid:p}}),i?.()}catch(s){V.error(s.message)}finally{d(!1),y(!1)}},j={title:a("router.rule.add.title"),description:(u,s,h)=>{const b=R=>{if(h(null),Vt(R,a)){s({...R,__disableConfirm:!0});return}s({...R})};return t.jsxs(ce,{component:"div",children:[t.jsx(ye,{label:a("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",fullWidth:!0,autoFocus:!0,helperText:u.pathPrefixHint||a("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:u.pathPrefix,onChange:R=>{let E=!1;const M=Po({params:{...u,pathPrefix:R.target.value},blocklets:[f]});h(M),u.type===K.ROUTING_RULE_TYPES.BLOCKLET&&M&&(E=!0),u.type===K.ROUTING_RULE_TYPES.REDIRECT&&!u.url&&(E=!0),u.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!u.url&&(E=!0),u.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!u.responseType||!u.responseBody)&&(E=!0),R.target.value.trim()||(E=!0,h(a("router.validation.pathPrefixRequired"))),E||h("");const F=a("common.slugifyHint",{value:Kn(R.target.value)});s({...u,pathPrefix:R.target.value,pathPrefixHint:F,__disableConfirm:E})},slotProps:{htmlInput:{"data-cy":"path-prefix-input"}}}),t.jsx(nr,{params:u,setParams:b,setError:h})]})},confirm:a("router.rule.add.confirm"),cancel:a("common.cancel"),params:{did:"",pathPrefix:"",type:K.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,responseType:"text/plain",responseBody:"",__disableConfirm:!0},onConfirm:v,onCancel:m},w=u=>{u.stopPropagation(),y(!0)};let S=null;return n||(S=typeof e=="function"?e({open:w}):t.jsxs(Ne,{onClick:w,className:"rule-action","data-cy":"action-add-rule",children:[c?t.jsx(je,{size:16}):t.jsx(Jt,{style:{fontSize:18,marginRight:5}}),a("router.rule.add.title")]})),t.jsxs(t.Fragment,{children:[S,(r||l)&&t.jsx(it,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel,color:"primary"})]})}as.propTypes={children:x.any,onClose:x.func,hiddenChildren:x.bool,open:x.bool};function on({depth:e=1,className:n=""}){return t.jsx(B,{className:n,sx:{ml:Math.max((e-1)*2,0),borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}on.propTypes={depth:x.number,className:x.string};function ls({id:e,from:n,children:r=null}){const{t:i}=le(),{api:a}=xe(),{blocklet:o}=De(),[f,c]=k.useState(!1),[d,l]=k.useState(null),y=o.meta.did,p=o.site.id,C=n.pathPrefix,m=()=>{c(!1),l(null)},v=async()=>{c(!0);try{await a.deleteRoutingRule({input:{id:p,ruleId:e,teamDid:y}})}catch(S){V.error(S.message)}finally{l(null),c(!1)}},j={keyName:C,title:i("router.rule.delete.title"),description:i("router.rule.delete.description",{name:`<b>${C}</b>`}),confirmPlaceholder:i("router.rule.delete.confirm_desc",{name:C}),confirm:i("common.delConfirm"),cancel:i("router.rule.delete.cancel"),onConfirm:v,onCancel:m},w=S=>{S.stopPropagation(),l(j)};return t.jsxs(t.Fragment,{children:[typeof r=="function"?r({loading:f,open:w}):t.jsxs(Ne,{onClick:w,className:"rule-action","data-cy":"action-delete-rule",children:[f?t.jsx(je,{size:16}):t.jsx(nn,{style:{fontSize:18,marginRight:5}}),i("router.rule.delete.title")]}),d&&t.jsx(Sa,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}ls.propTypes={id:x.string.isRequired,from:x.object.isRequired,children:x.any};function cs({id:e,from:n,to:r,children:i=null}){const{t:a}=le(),{api:o}=xe(),{blocklet:f}=De(),[c,d]=k.useState(!1),[l,y]=k.useState(null),p=f.meta.did,C=f.site.id,m=n.pathPrefix,v=()=>{d(!1),y(null)},j=async u=>{try{const s=await Vt(u,a);if(s)throw s;d(!0);const h={id:e,from:{pathPrefix:Le.urlPathFriendly(u.pathPrefix)},to:{type:u.type}};u.type===K.ROUTING_RULE_TYPES.REDIRECT&&(h.to.url=u.url,h.to.redirectCode=u.redirectCode),u.type===K.ROUTING_RULE_TYPES.COMPONENT&&(h.to.did=p,h.to.componentId=u.componentId,h.to.pageGroup=u.pageGroup),u.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(h.to.url=Le.urlPathFriendly(u.url)),u.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(h.to.response={status:200,contentType:u.responseType,body:u.responseBody}),await o.updateRoutingRule({input:{id:C,rule:h,teamDid:p}})}catch(s){V.error(s.message)}finally{d(!1),y(null)}},w={title:a("router.rule.update.title"),description:(u,s,h)=>{const b=R=>{if(Vt(R,a)){s({...R,__disableConfirm:!0});return}s({...R})};return t.jsxs(ce,{component:"div",children:[t.jsx(ye,{label:a("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix",fullWidth:!0,autoFocus:!0,helperText:u.helperText||a("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:u.pathPrefix,onChange:R=>{let E=!1;u.type===K.ROUTING_RULE_TYPES.REDIRECT&&!u.url&&(E=!0),u.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&!u.url&&(E=!0),u.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&(!u.responseType||!u.responseBody)&&(E=!0),R.target.value.trim()||(E=!0,h(a("router.validation.pathPrefixRequired"))),E||h("");const M=a("common.slugifyHint",{value:Kn(R.target.value)});s({...u,pathPrefix:R.target.value,helperText:M,__disableConfirm:E})},slotProps:{htmlInput:{"data-cy":"path-prefix-input"}}}),t.jsx(nr,{params:u,setParams:b,setError:h})]})},confirm:a("router.rule.update.confirm"),cancel:a("router.rule.update.cancel"),color:"primary",params:{did:r.did||"",pathPrefix:m==="/"?m:m.replace(/^\/+/,"").replace(/\/+$/,""),type:r.type||K.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:r.redirectCode||302,componentId:r.componentId||"",pageGroup:r.pageGroup||"",url:r.url||"",responseType:r.response?.contentType||"",responseBody:(r.response?.body||"").replace(/\\"/g,'"'),__disableConfirm:!1},onConfirm:j,onCancel:v},S=u=>{u.stopPropagation(),y(w)};return t.jsxs(t.Fragment,{children:[typeof i=="function"?i({loading:c,open:S}):t.jsxs(Ne,{onClick:S,className:"rule-action","data-cy":"action-update-rule",children:[c?t.jsx(je,{size:16}):t.jsx(jo,{style:{fontSize:18,marginRight:5}}),a("router.rule.update.title")]}),l&&t.jsx(it,{title:l.title,description:l.description,confirm:l.confirm,color:l.color,cancel:l.cancel,params:l.params,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}cs.propTypes={id:x.string.isRequired,from:x.object.isRequired,to:x.object.isRequired,children:x.any};function ds({from:e,isProtected:n=!1,...r}){const{locale:i}=le(),{blocklet:a,recommendedDomain:o}=De(),f=vo(o,e.pathPrefix,Gn(a,i));return t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(B,{component:"a",sx:{display:{xs:"flex",md:"none"}},target:"_blank",href:f,rel:"noopener noreferrer",title:f,children:t.jsx(he,{size:"small",children:t.jsx(Io,{})})}),t.jsx(cs,{...r,isProtected:n,from:e,children:({open:c})=>t.jsx(he,{size:"small",onClick:c,disabled:n,"data-cy":"action-update-rule",children:t.jsx(Ai,{})})}),t.jsx(ls,{...r,isProtected:n,from:e,children:({open:c})=>t.jsx(he,{size:"small",onClick:c,disabled:n,"data-cy":"action-delete-rule",children:t.jsx(nn,{})})})]})}ds.propTypes={isProtected:x.bool};function us({group:e,...n}){return e?t.jsx(ht,{type:"reverse",...n,children:e}):null}us.propTypes={group:x.string.isRequired};function Fn({domain:e,isHttps:n=!1,toUrl:r}){const i=n?"https":"http";let a=r;return xi(a)||(a=`${i}://${e}${r}`),t.jsx(xt,{href:a,target:"_blank",style:{fontSize:14},underline:"hover",children:r},a)}Fn.propTypes={domain:x.string.isRequired,toUrl:x.string.isRequired,isHttps:x.bool};function rr({hasPermission:e=!1}){const{t:n,locale:r}=le(),i=gt(),{blocklet:a,recommendedDomain:o}=De();return a.site.rules.filter(c=>c.to.type!==K.ROUTING_RULE_TYPES.BLOCKLET).map(c=>{let d=null,l=null;c.to.type===K.ROUTING_RULE_TYPES.NONE?d="404":c.to.type===K.ROUTING_RULE_TYPES.REDIRECT?d=c.to.redirectCode:c.to.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE?d="R":c.to.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE?d=t.jsx(Da,{sx:{color:"text.secondary",fontSize:"45px"}}):c.to.type===K.ROUTING_RULE_TYPES.COMPONENT&&(l=a.children.find(p=>p.meta.did===c.to.componentId),d="C");const y=c.isProtected?t.jsx(Ce,{title:n("blocklet.router.urlLockTooltip"),placement:"top",children:t.jsx("span",{children:t.jsx(he,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:t.jsx(wa,{style:{fill:i.palette.text.disabled}})})})}):t.jsx(ds,{...c});return[t.jsxs(B,{className:"component-item",sx:{display:"flex",py:2,justifyContent:"space-between",alignItems:"center"},children:[t.jsxs(B,{sx:{width:{xs:300,md:400},display:"flex",alignItems:"center"},children:[t.jsx(B,{className:"component-item__indent",sx:{width:28}}),typeof d=="object"?d:t.jsx(hi,{children:d}),t.jsxs(B,{sx:{ml:2,flex:1,wordBreak:"break-word"},children:[t.jsxs(B,{style:{color:"text.primary",fontSize:16},children:[c.to.type===K.ROUTING_RULE_TYPES.NONE&&n("common.page404"),c.to.type===K.ROUTING_RULE_TYPES.REDIRECT&&n("common.redirect"),c.to.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&n("common.rewrite"),c.to.type===K.ROUTING_RULE_TYPES.DIRECT_RESPONSE&&K.ROUTING_RESPONSE_TYPES.find(p=>p.value===c.to.response.contentType)?.text,c.to.type===K.ROUTING_RULE_TYPES.COMPONENT&&X.getDisplayName(l,!0)]}),t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[c.to.type===K.ROUTING_RULE_TYPES.REDIRECT&&t.jsx(Fn,{domain:o,toUrl:c.to.url}),c.to.type===K.ROUTING_RULE_TYPES.GENERAL_REWRITE&&t.jsx(Fn,{domain:o,toUrl:c.to.url}),c.to.type===K.ROUTING_RULE_TYPES.COMPONENT&&t.jsx(us,{group:c.to.pageGroup})]})]})]}),t.jsx(B,{sx:{px:2,alignItems:"center",flexGrow:"1",display:{xs:"none",md:"flex"}},children:t.jsx(xt,{href:vo(o,c.from.pathPrefix,Gn(a,r)),target:"_blank",style:{fontSize:16,color:"inherit"},underline:"hover",children:gi(c.from.pathPrefix,"/")||"/"})},c.from.pathPrefix),t.jsx(B,{children:e&&t.jsx("div",{style:{textAlign:"right"},children:y})},"actions")]},"rule"),t.jsx(on,{},"divider")]})}rr.propTypes={hasPermission:x.bool};const Rd=Qt(rr,"mutate_blocklets"),Pd=Qt(rr,"",ft);function Td(e){const{inService:n}=xe();return n?t.jsx(Pd,{...e}):t.jsx(Rd,{...e})}function Id(e,n){const r=k.useRef(n);k.useEffect(()=>{const i=a=>r.current(a.detail);return window.addEventListener(e,i),()=>window.removeEventListener(e,i)},[e])}function Dd(e){const n=Vn(),{t:r}=le(),i=()=>{const a=new URLSearchParams(window.location.search);a.get("checkUpdate")&&(a.delete("checkUpdate"),n(a.toString()),e(),V.success(r("notification.checkingForUpdates")))};k.useEffect(i,[]),Id("checkUpdate",i)}function Bd({blocklet:e,scrollToComponent:n}={blocklet:null,scrollToComponent:!1}){const r=Vn(),{t:i}=le(),a=k.useRef(null),o=k.useMemo(()=>{if(!e||!e.optionalComponents)return null;const f=new URLSearchParams(window.location.search),c=f.get("install-component");if(c){a.current=c,f.delete("install-component"),r(f.toString());const d=e.optionalComponents.find(y=>y.meta.did===c);if(!d)return V.success(i("notification.installComponentError",{did:c})),null;const{meta:l}=d;if(n){const y=document.getElementById(`optional-component-${c}`),p=document.querySelector(".dashboard-main");if(y){const C=y.getBoundingClientRect(),m=p.getBoundingClientRect();p.scrollTo({top:C.top-m.top+p.scrollTop,behavior:"smooth"})}}return l}return null},[e,r,i,n]);return k.useEffect(()=>{a.current&&window.opener&&window.opener.postMessage({blocklet:e,kind:"component-installer"},window.blocklet?.appUrl)},[e]),o}function or({open:e=!1,onClose:n=null,blocklet:r,ancestors:i=[]}){const{t:a}=le(),o=[...(i||[]).map(l=>l?.meta?.did||""),r?.meta?.did||""].filter(Boolean).join("/"),f=a("preferencesFor",{name:X.getDisplayName(r,!0)}),c=k.useMemo(()=>({position:"relative",minHeight:"50vh",height:"100%",overflow:"hidden",border:0}),[]);if(st(r.status)||r.status==="unknown"&&st(r.status))return null;const d=()=>{n?.()};return t.jsx(Od,{open:e,fullWidth:!0,maxWidth:"md",title:f,onClose:d,PaperProps:{style:{minHeight:"500px"}},children:t.jsxs(uo,{sx:{gap:1},children:[t.jsx(ce,{sx:{fontSize:12,color:"text.secondary",mb:.5},children:a("description.preferences",{name:X.getDisplayName(r,!0)})}),t.jsx(Mi,{id:o,styles:c})]})})}or.propTypes={blocklet:x.object.isRequired,ancestors:x.array,open:x.bool,onClose:x.func};const Od=se(Zt)`
|
|
447
|
+
.MuiDialogContent-root {
|
|
448
|
+
padding-top: 0;
|
|
449
|
+
padding-bottom: 24px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.MuiToolbar-root {
|
|
453
|
+
padding-right: 0;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.ux-dialog_closeButton {
|
|
457
|
+
margin: 0;
|
|
458
|
+
}
|
|
459
|
+
`;function ps({component:e,remove:n=async()=>{},disabled:r=!1,tip:i="",showConfirm:a=!1,hideBtn:o=!1,onCancel:f=()=>{}}){const{t:c}=k.useContext(_e),[d,l]=k.useState(!1),[y,p]=k.useState(null),C=async S=>{l(!0),await n(S.component,S.removeType),l(!1),p(null)},m=r||d,v=()=>{p({title:`${c("common.delete")} ${e.meta.title||e.meta.name}`,description:(S,u)=>t.jsxs(ce,{component:"div",children:[t.jsx(ce,{gutterBottom:!0,children:c("blocklet.action.removeComponentDescription")}),t.jsxs(_a,{name:"removeType",value:S.removeType,onChange:s=>u({...S,removeType:s.target.value}),children:[t.jsx(Nn,{value:"keepData",control:t.jsx(wr,{}),label:c("blocklet.action.removeComponentKeepData")}),t.jsx(Nn,{value:"complete",control:t.jsx(wr,{}),label:c("blocklet.action.removeComponentComplete")})]})]}),confirm:c("common.confirm"),cancel:c("common.cancel"),params:{component:e,removeType:"keepData"},onConfirm:C,onCancel:()=>{p(null),f()}})};k.useEffect(()=>{a?v():(l(!1),p(null))},[a]);const j=t.jsx(Ud,{size:"small",disabled:m,onClick:()=>v,"data-cy":"delete-component-btn",children:t.jsx(nn,{disabled:m})}),w=t.jsx(Ce,{title:i||c("common.delete"),children:t.jsx("span",{children:j})});return t.jsxs(t.Fragment,{children:[!o&&w,y&&t.jsx(it,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})]})}ps.propTypes={component:x.object.isRequired,remove:x.func,onCancel:x.func,disabled:x.bool,showConfirm:x.bool,hideBtn:x.bool,tip:x.string};const Ud=se(he)`
|
|
460
|
+
&.Mui-disabled {
|
|
461
|
+
opacity: 0.5;
|
|
462
|
+
}
|
|
463
|
+
`;function fs({component:e,onStart:n=async()=>{},onStop:r=async()=>{},disabled:i=!1,tip:a=""}){const{t:o}=k.useContext(_e),[f,c]=k.useState(!1),[d,l]=k.useState(),y=async()=>{c(!0);try{await n(e)}catch(S){V.error(S.message)}c(!1)},p=async()=>{c(!0);try{await r(e)}catch(S){V.error(S.message)}c(!1)},C=i||f,m=["starting","running","stopping"],v=m.includes(e.status)||m.includes(e.greenStatus),j=v?Ri:Pi,w=t.jsx(Nd,{disabled:C,size:"small",onClick:()=>{v?l({title:`${o("common.stop")} ${e?.meta?.title}`,description:o("blocklet.action.stopComponentDescription"),confirm:o("blocklet.action.confirmStop"),cancel:o("common.cancel"),onConfirm:()=>(l(null),p()),onCancel:()=>l(null)}):y()},"data-cy":`${v?"stop":"start"}-component-btn`,children:t.jsx(j,{disabled:C,fontSize:"small"})});return[t.jsx(Ce,{title:a||o(`common.${v?"stop":"start"}`),children:t.jsx("span",{children:w})},"btn"),d&&t.jsx(it,{title:d.title,description:d.description,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel},"connect")]}fs.propTypes={component:x.object.isRequired,onStart:x.func,onStop:x.func,disabled:x.bool,tip:x.string};const Nd=se(he)`
|
|
464
|
+
&.Mui-disabled {
|
|
465
|
+
opacity: 0.5;
|
|
466
|
+
}
|
|
467
|
+
`;function ms({sourceInfo:e={},blocklet:n={}}){const{t:r}=k.useContext(_e);let{source:i}=e;return i==="registry"&&(i="Blocklet Store"),t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(yi,{type:"success",children:ka(i)},"source"),e.source==="registry"&&t.jsx(xt,{href:we(e.deployedFrom,"blocklets",n?.meta?.bundleDid||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:r("blocklet.overview.viewInStore")})]})}ms.propTypes={sourceInfo:x.shape({source:x.string,deployedFrom:x.string}),blocklet:x.object};function sr({blocklet:e,checkUpgrade:n=!1,hasPermission:r=!1,...i}){const{api:a}=xe(),{t:o}=k.useContext(_e),[f,c]=k.useState(!1),[d,l]=k.useState(""),[y,p]=k.useState(null),[C,m]=k.useState(null);k.useEffect(()=>{p(null),n&&(e.mode,be.BLOCKLET_MODES.DEVELOPMENT)},[e,n]);const v=()=>{c(!1),m(null)},j=async()=>{c(!0);try{const S={did:e.meta.did,version:y.version,storeUrl:y.registryUrl||""};await ut(2e3),await a.upgradeBlocklet({input:S})}catch(S){V.error(`Blocklet upgrade failed: ${ve(S)}`)}finally{c(!1),m(null)}},w={title:`${o("common.upgrade")} ${o("common.blocklet")} ${X.getDisplayName(e)}`,description:o("blocklet.action.upgradeDescription"),confirm:o("blocklet.action.confirmUpgrade"),cancel:o("common.cancel"),onConfirm:j,onCancel:v};return r&&y&&!X.isInProgress(e.status)?t.jsxs(t.Fragment,{children:[t.jsx(ht,{...i,children:e.meta.version}),t.jsx(Ce,{title:o("common.updateAvailable",{version:y.version}),children:t.jsx(he,{size:"small",style:{marginLeft:8},disabled:f,onClick:()=>m(w),children:f?t.jsx(je,{size:16}):t.jsx(Ta,{style:{fontSize:16,color:"red"}})})}),!!d&&t.jsx(V,{variant:"error",message:d,onClose:()=>l("")}),C&&t.jsx(it,{title:C.title,description:C.description,confirm:C.confirm,cancel:C.cancel,params:C.params,onConfirm:C.onConfirm,onCancel:C.onCancel})]}):t.jsx(ht,{...i,children:e.meta.version})}sr.propTypes={blocklet:x.object.isRequired,checkUpgrade:x.bool,hasPermission:x.bool};const Ld=Qt(sr,"mutate_blocklets"),Ad=Qt(sr,"",ft);function Md(e){const{inService:n}=xe();return n?t.jsx(Ad,{...e}):t.jsx(Ld,{...e})}const zd=e=>!e?.meta?.group,Fd=(e,n)=>e?[{name:n("common.name"),value:e.displayName},{name:n("common.description"),value:e.description},{name:n("common.version"),value:t.jsx(ht,{children:e.version})}]:[],qd=e=>{const{source:n,deployedFrom:r,bundleSource:i}=e;if(n)return{source:n,deployedFrom:r};if(!i)return{source:"upload",deployedFrom:r};if(i.url){const a=r||Array.isArray(i.url)?i.url[0]:i.url;return{source:"url",deployedFrom:a,link:a}}if(i.store){const a=r||Array.isArray(i.store)?i.store[0]:i.store;return{source:"registry",deployedFrom:a,link:a}}return{}},$d=(e,n)=>{const r=e.split("/").slice(1);let i=n,a=0;const o=[];for(;i&&a<r.length;){const f=i.children.find(c=>c.meta.did===r[a]);i=f,a++,f&&o.push(f.meta.title)}return o.join(" / ")};function hs({blocklet:e,depth:n=0,componentInfo:r=null,app:i=null,onClose:a}){const{t:o,locale:f}=k.useContext(_e),{deletingBlocklets:c}=Yn();let{status:d,greenStatus:l}=e;(d==="running"||l==="running")&&(d="running"),n===1&&c.includes(e.meta.did)&&(d="deleting");const y=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),p=v=>v.map(j=>j.name===o("common.did")||j.name===o("blocklet.appId")?t.jsx(hn,{valueComponent:"div",nameWidth:120,name:j.name,nameFormatter:()=>j.name,children:j.value},j.name):t.jsx(hn,{valueComponent:"div",nameWidth:120,name:j.name,children:j.link?t.jsx(xt,{href:j.link,target:"_blank",className:"page-link",underline:"hover",children:j.value}):j.value},j.name)),C=r?qd(r):{},m=r?[{name:o("common.name"),value:X.getDisplayName(r,!0)},{name:o("common.version"),value:t.jsx(Md,{blocklet:r,checkUpgrade:!1})},{name:o("common.status"),value:t.jsx(Mn,{isResource:zd(e),status:d,source:r.source,progress:e.progress})},X.isBlockletRunning(e)?{name:o("blocklet.startedAt"),value:e.startedAt?t.jsx(fn,{value:e.startedAt,type:"all",locale:f}):"-"}:null,X.isBlockletRunning(e)?null:{name:o("blocklet.stoppedAt"),value:e.stoppedAt?t.jsx(fn,{value:e.stoppedAt,type:"all",locale:f}):"-"},e.installedAt?{name:o("blocklet.installedAt"),value:e.installedAt?t.jsx(fn,{value:e.installedAt,type:"all",locale:f}):"-"}:null,X.hasStartEngine(e.meta)?{name:o("common.mountPoint"),value:y}:null,r.meta.group?{name:o("common.group"),value:t.jsx(ht,{type:"success",children:r.meta.group})}:null,{name:o("blocklet.overview.source"),value:t.jsx(ms,{sourceInfo:C,blocklet:e})},{name:o("blocklet.overview.deployedFrom"),value:C.deployedFrom||"-",link:C.link??""},{name:o("common.did"),value:t.jsx(vi,{did:r.meta.did,showQrcode:!0})},{name:o("common.author"),value:r.meta.owner?t.jsx(xa,{owner:r.meta.owner,locale:f}):ga.formatPerson(r.meta.author)},{name:o("common.engine"),value:Fd(r.engine,o).map(({name:v,value:j})=>t.jsx(hn,{style:{marginBottom:4},nameWidth:120,name:v,children:j},v))},e.dependents?.length?{name:o("common.dependents"),value:t.jsx(B,{children:e.dependents.map(v=>t.jsx(B,{children:`${$d(v.id,i)} ${v.required?`(${o("common.required")})`:""}`},v.id))})}:null,e.meta.resources?.length?{name:o("common.resource"),value:e.meta.resources.join(", ")}:null].filter(Boolean):[];return r?t.jsx(Zt,{open:!0,title:o("common.componentBasicInfo"),showCloseButton:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{a(null)},children:t.jsx(B,{sx:{paddingBottom:1.5},children:p(m)},"dialog-wrapper")},"base-info-dialog"):null}hs.propTypes={blocklet:x.object.isRequired,depth:x.number,app:x.object,componentInfo:x.object,onClose:x.func.isRequired};se(Co)`
|
|
468
|
+
.BaseBadge-badge {
|
|
469
|
+
top: ${e=>e.top*8||6}px;
|
|
470
|
+
right: ${e=>e.right*8||6}px;
|
|
471
|
+
}
|
|
472
|
+
`;se(B)`
|
|
473
|
+
.component-header {
|
|
474
|
+
display: flex;
|
|
475
|
+
align-items: center;
|
|
476
|
+
align-items: flex-end;
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
}
|
|
479
|
+
.component-name {
|
|
480
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
481
|
+
font-size: 16px;
|
|
482
|
+
}
|
|
483
|
+
.component-version {
|
|
484
|
+
color: ${({theme:e})=>e.palette.grey[400]};
|
|
485
|
+
font-size: 12px;
|
|
486
|
+
margin-left: 4px;
|
|
487
|
+
transform: translateY(-1px);
|
|
488
|
+
}
|
|
489
|
+
`;function gs({blocklet:e,ancestors:n,mountPoint:r,href:i}){const[a,o]=k.useState(!1),[f,c]=k.useState(!1),[d,l]=k.useState(!1),[y,p]=k.useState(r),{api:C}=xe(),m=!n.length,v=m?e.meta.did:n.map(E=>E.meta.did)[0],{t:j}=le(),{confirmApi:w,confirmHolder:S}=xo();k.useEffect(()=>{c(!1),o(!1),l(!1)},[r]);const u=()=>{o(!1),c(!1),p(r)},s=async()=>{l(!0),o(!1);try{const E={rootDid:v,mountPoint:Le.urlPathFriendly(y)};m||(E.did=e.meta.did),await C.updateComponentMountPoint({input:E})}catch(E){throw E.message=ve(E),V.error(E.message),E}finally{u()}},h=He(()=>{w.open({title:j("common.noticeTitle"),content:t.jsxs(B,{sx:{color:"#9397A1","& > li":{listStyle:"disc",ml:1.5}},children:[t.jsx(ce,{sx:{mb:1.5},children:j("blocklet.mountPoint.description1")}),t.jsx(ce,{component:"li",children:j("blocklet.mountPoint.case1")}),t.jsx(ce,{component:"li",children:j("blocklet.mountPoint.case2")}),t.jsx(ce,{sx:{mt:1.5},children:j("blocklet.mountPoint.description2")})]}),confirmButtonText:j("common.confirm"),cancelButtonText:j("common.cancel"),async onConfirm(E){await s(),E()},confirmButtonProps:{"data-cy":"edit-mount-point-confirm"}})}),b=E=>{E?.preventDefault(),Le.urlPathFriendly(y)!==r?h():c(!1)},R=f?t.jsxs(B,{sx:{ml:1},children:[t.jsx(he,{size:"medium",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),"data-cy":"edit-mount-point-submit",onClick:b,children:t.jsx(B,{component:pe,icon:"material-symbols:done",sx:{color:"primary.main",transition:"0.3s opacity"}})}),t.jsx(he,{size:"medium",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:u,children:t.jsx(B,{component:pe,icon:"iconoir:cancel",sx:{color:"primary.main",transition:"0.3s opacity"}})})]}):t.jsx(he,{size:"medium",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:()=>c(!0),children:t.jsx(B,{component:pe,"data-cy":"edit-mount-point",icon:"lets-icons:edit-light",sx:{opacity:a?1:0,color:"primary.main",transition:"0.3s opacity"}})});return t.jsxs(B,{sx:{alignItems:"center",flexGrow:"1",display:{xs:"none",md:"flex"}},children:[S,f?t.jsx("form",{onSubmit:b,children:t.jsx(ye,{style:{flex:1},fullWidth:!0,"data-cy":"edit-mount-point-input",value:y,onChange:E=>p(E.target.value),autoFocus:!0,size:"small",variant:"outlined",placeholder:r})}):t.jsx(B,{component:"a",target:"_blank",href:i,rel:"noopener noreferrer",title:i,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:t.jsx(B,{sx:{maxWidth:400,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"primary.main",fontSize:16,px:2},children:Ci(r)})}),d?t.jsx(je,{size:20,sx:{ml:1}}):R]},r)}gs.propTypes={mountPoint:x.string.isRequired,href:x.string.isRequired,blocklet:x.object.isRequired,ancestors:x.array.isRequired};const Wd=e=>!e?.meta?.group,co=(e,n)=>{const r=e.split("/").slice(1);let i=n,a=0;const o=[];for(;i&&a<r.length;){const f=i.children.find(c=>c.meta.did===r[a]);i=f,a++,f&&o.push(f.meta.title)}return o.join(" / ")},Hd=(e,n)=>{window.IS_DEBUG&&console.log("blocklet status","blueStatus:",e,"greenStatus:",n);const r=e==="running"||n==="running",i=e==="stopping"||n==="stopping",a=e==="downloading"&&n==="downloading";let o="",f="";return i?(o="stopping",f=""):r?o="running":o=e||n||"",r&&e!==n&&(f=e==="running"?n:e),a&&(o="running",f="downloading"),o==="running"&&f==="stopped"&&(f=""),e===n&&(o=e,f=""),{primaryStatus:o,secondaryStatus:f}};function qn({blocklet:e,ancestors:n=[],depth:r=0,onRemove:i=()=>{},onStart:a=()=>{},onStop:o=()=>{},onRestart:f=()=>{},getComponentUrl:c=()=>window.location.origin,app:d=null}){const{t:l,locale:y}=k.useContext(_e),p=Vn(),[C,m]=k.useState(),[v,j]=k.useState(!1),[w,S]=k.useState(!1),[u,s]=k.useState(null),{info:h,inService:b}=xe(),[R,E]=k.useState(!1),[M,F]=k.useState(!1),{deletingBlocklets:P}=Yn();let{status:D}=e;r===1&&P.includes(e.meta.did)&&(D="deleting");const I=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),L=c(I),z=X.isInProgress(d.status),q=X.isInProgress(e.status);let G="";if(z||q||r===1&&P.includes(e.meta.did))G=l("blocklet.component.tip.stopBlocklet");else if(e.dependents?.length){const g=e.dependents.filter(_=>_.required);if(g.length){const _=g.map(T=>co(T.id,d));G=l("blocklet.component.tip.requiredBy",{name:_.join(", ")})}}const ne=He(()=>{const g=e.meta.did;if(b){const _=Gt(we(K.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/developers/logs"),{locale:y,component:g});window.location.href=_}else{const _=Gt(we("/blocklets",d.appPid,"/logs"),{locale:y,component:g});p(_)}}),oe=async(...g)=>{S(!0);try{await i(...g)}catch{}S(!1),j(!1)},{usingDocker:U,usingIsolation:ie}=k.useMemo(()=>{if(!e.meta.group||e.meta.group==="static")return{usingDocker:!1,usingIsolation:!1};const g=!!h?.enableDocker||window.blocklet?.enableDocker,_=[...d.configs,...e.configs].find(H=>H.key==="SKIP_DOCKER"&&H.value),T=[...d.configs,...e.configs].find(H=>H.key==="USE_DOCKER"&&H.value),$=[...d.configs,...e.configs].find(H=>H.key==="SKIP_DOCKER_NETWORK"&&H.value);return{usingDocker:g?!_:!!T,usingIsolation:g&&!$&&(h?.enableDockerNetwork||window.blocklet?.enableDockerNetwork)}},[e.configs,h?.enableDocker,h?.enableDockerNetwork,d.configs,e.meta.group]),{primaryStatus:N,secondaryStatus:O}=Hd(D,e.greenStatus);return t.jsxs(t.Fragment,{children:[t.jsxs(ir,{display:"flex",py:2,className:"component-item",justifyContent:"flex-start",alignItems:"center",children:[t.jsxs(B,{sx:{pl:2,width:{xs:250,sm:400},display:"flex",alignItems:"center"},children:[t.jsx(bo,{blocklet:e,ancestors:n}),t.jsxs(B,{sx:{ml:"16px",minWidth:0},children:[t.jsxs(B,{className:"component-header",onClick:()=>m(e),children:[t.jsx(B,{className:"component-name",children:X.getDisplayName(e,!0)}),t.jsx(B,{className:"component-version",children:e?.meta?.version})]}),t.jsxs(B,{sx:{display:"flex",alignItems:"center",gap:.5},children:[N&&t.jsx(Mn,{style:{whiteSpace:"nowrap"},status:N,source:e.source,progress:e.progress}),O&&(N==="running"&&Ea[O]==="error"?t.jsx(Ce,{title:l("blocklet.status.failWithOldVersion"),children:t.jsx(B,{sx:{display:"flex",color:"warning.main",ml:1},children:t.jsx(Zn,{})})}):t.jsx(Mn,{style:{whiteSpace:"nowrap"},status:O,source:e.source,progress:e.progress})),t.jsx(ya,{style:{whiteSpace:"nowrap"},mode:e.mode||""}),e.mode!=="development"&&U&&t.jsx(Ce,{title:l("blocklet.usingDocker"),children:t.jsx(B,{sx:{display:"flex",color:"primary.main",ml:1},children:t.jsx(pe,{icon:So})})}),e.mode!=="development"&&ie&&t.jsx(Ce,{title:l("blocklet.usingIsolation"),children:t.jsx(B,{sx:{display:"flex",color:"primary.main",ml:1},children:t.jsx(pe,{icon:"streamline:network"})})}),!!e.dependents?.length&&t.jsx(Ce,{title:[`${l("common.dependents")}: `,e.dependents.map(g=>t.jsx(B,{sx:{pl:1},children:`${co(g.id,d)} ${g.required?`(${l("common.required")})`:""}`},g.id))],children:t.jsx(B,{sx:{display:"flex",color:"primary.main",ml:1},children:t.jsx(pe,{icon:"octicon:package-dependents-16"})})})]})]})]},e),Eo.hasMountPoint(e.meta)&&t.jsx(gs,{blocklet:e,ancestors:n,mountPoint:I,href:L},I),t.jsx("div",{style:{flex:1}}),t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[X.hasStartEngine(e.meta)&&t.jsx(Ce,{title:l("common.visit"),children:t.jsx(B,{component:"a",sx:{display:{xs:"flex",md:"none"}},target:"_blank",href:L,rel:"noopener noreferrer",children:t.jsx(he,{size:"small",children:t.jsx(Io,{fontSize:"small"})})})}),t.jsx(fs,{blocklet:d,component:e,onStart:a,onStop:o,disabled:!["starting","stopping"].includes(d.status)&&X.isInProgress(d.status)}),t.jsx(he,{size:"small",onClick:()=>F(!0),disabled:z||q,children:t.jsx(Oo,{fontSize:"small"})}),t.jsx($n,{color:"error",badgeContent:"",variant:"dot",invisible:!X.getComponentMissingConfigs(e,n[0]).length,children:t.jsx(Do,{"data-cy":"component-actions",actions:[X.hasStartEngine(e.meta)||Wd(e)?{icon:t.jsx(bi,{}),text:l("common.detail"),onClick:()=>{m(e)}}:null,{icon:t.jsx(Ti,{}),text:l("common.restart"),onClick:()=>{s({title:`${l("common.restart")} ${e.meta.title}`,description:l("blocklet.action.restartDescription"),confirm:l("blocklet.action.confirmRestart"),cancel:l("common.cancel"),onConfirm:async()=>{S(!0),await f(e),S(!1),s(null)},onCancel:()=>s(null)})},disabled:w||z||q||!X.isBlockletRunning(e)},{icon:t.jsx(nn,{}),text:l("common.delete"),onClick:()=>{j(!0)},disabled:z||q||!!G,tip:G},{icon:t.jsx(pe,{icon:"heroicons:command-line"}),text:l("common.logs"),onClick:ne,disabled:z||q||!!G,tip:G},{separator:!0},{icon:t.jsx(pe,{icon:"mdi:variable"}),onClick:()=>{E(!0)},text:t.jsx($n,{color:"error",badgeContent:"",variant:"dot",invisible:!X.getComponentMissingConfigs(e,n[0]).length,children:t.jsx(B,{sx:{width:"100%"},children:l("common.environments")})}),disabled:z||q}].filter(Boolean)})})]},"actions")]},"group-not-gateway-box"),t.jsx(on,{},"line"),t.jsx(hs,{componentInfo:C,onClose:m,blocklet:e,app:d,depth:r}),t.jsx(ps,{blocklet:d,component:e,remove:oe,onCancel:()=>j(!1),hideBtn:!0,showConfirm:v},"delete-component"),u&&t.jsx(it,{title:u.title,description:u.description,confirm:u.confirm,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel},"confirm-setting"),R&&t.jsx(Xn,{open:!0,hiddenChildren:!0,onClose:()=>E(!1),blocklet:e,ancestors:n}),M&&t.jsx(or,{open:!0,onClose:()=>F(!1),blocklet:e,ancestors:n})]})}qn.propTypes={blocklet:x.object.isRequired,ancestors:x.array,depth:x.number,onRemove:x.func,onStart:x.func,onStop:x.func,onRestart:x.func,getComponentUrl:x.func,app:x.object};const $n=se(Co)`
|
|
490
|
+
.BaseBadge-badge {
|
|
491
|
+
top: ${e=>e.top*8||6}px;
|
|
492
|
+
right: ${e=>e.right*8||6}px;
|
|
493
|
+
}
|
|
494
|
+
`,ir=se(B)`
|
|
495
|
+
&:hover {
|
|
496
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
497
|
+
}
|
|
498
|
+
.component-header {
|
|
499
|
+
display: flex;
|
|
500
|
+
align-items: center;
|
|
501
|
+
align-items: flex-end;
|
|
502
|
+
cursor: pointer;
|
|
503
|
+
}
|
|
504
|
+
.component-name {
|
|
505
|
+
min-width: 0;
|
|
506
|
+
overflow: hidden;
|
|
507
|
+
text-overflow: ellipsis;
|
|
508
|
+
white-space: nowrap;
|
|
509
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
510
|
+
font-size: 16px;
|
|
511
|
+
}
|
|
512
|
+
.component-version {
|
|
513
|
+
color: ${({theme:e})=>e.palette.text.secondary};
|
|
514
|
+
font-size: 12px;
|
|
515
|
+
margin-left: 4px;
|
|
516
|
+
transform: translateY(-1px);
|
|
517
|
+
}
|
|
518
|
+
`;function xs({blocklet:e,ancestors:n=[],meta:r,dependencies:i=[],setInstallComponentMeta:a,logoUrl:o=""}){const f=xe(),{t:c}=le(),d=()=>{r.bundleSource=e.bundleSource||{},a(r)},l=40;return t.jsxs(Kd,{id:`optional-component-${r.did}`,children:[t.jsxs("div",{className:"cell",children:[t.jsxs("div",{className:"component-left",children:[t.jsx("div",{className:"component-logo",children:o?t.jsx("img",{src:o,onError:()=>`${f.imgPrefix}/blocklet.png`,alt:r.title,style:{width:l,height:l}}):t.jsx(bo,{blocklet:e,ancestors:n})}),t.jsxs("div",{className:"component-header",children:[t.jsx("div",{className:"component-name",children:r.title}),t.jsx("div",{className:"component-version",children:r.version})]}),t.jsx(Ce,{title:[`${c("common.dependents")}: `,i.map(y=>t.jsx(B,{sx:{pl:1},children:`${y.parentTitle} ${y.required?`(${c("common.required")})`:""}`},y.parentName+y.mount_point))],children:t.jsx(B,{sx:{display:"flex",color:"primary.main",ml:1},children:t.jsx(pe,{icon:"octicon:package-dependents-16"})})})]}),t.jsx("div",{style:{flex:1}}),t.jsx(B,{sx:{minWidth:100,display:"flex",justifyContent:"flex-end"},children:t.jsx(Xt,{onClick:d,startIcon:t.jsx(pe,{icon:"ph:download-simple-bold"}),children:c("common.install")})})]}),t.jsx(on,{class:"line"},"line")]})}xs.propTypes={meta:x.object.isRequired,blocklet:x.object.isRequired,ancestors:x.array,setInstallComponentMeta:x.func.isRequired,logoUrl:x.string,dependencies:x.arrayOf(x.shape({parentDid:x.string,parentName:x.string,parentPoint:x.string,required:x.bool}))};const Kd=se(ir)`
|
|
519
|
+
.line {
|
|
520
|
+
opacity: 0.5;
|
|
521
|
+
}
|
|
522
|
+
.cell {
|
|
523
|
+
display: flex;
|
|
524
|
+
width: 100%;
|
|
525
|
+
flex-direction: row;
|
|
526
|
+
align-items: center;
|
|
527
|
+
justify-content: flex-start;
|
|
528
|
+
padding-top: 16px;
|
|
529
|
+
padding-bottom: 16px;
|
|
530
|
+
}
|
|
531
|
+
.component-left {
|
|
532
|
+
display: flex;
|
|
533
|
+
flex-direction: row;
|
|
534
|
+
justify-content: flex-start;
|
|
535
|
+
align-items: center;
|
|
536
|
+
min-width: 0;
|
|
537
|
+
}
|
|
538
|
+
.component-logo {
|
|
539
|
+
width: 40px;
|
|
540
|
+
margin-left: 16px;
|
|
541
|
+
opacity: 0.5;
|
|
542
|
+
border-radius: 10px;
|
|
543
|
+
overflow: hidden;
|
|
544
|
+
}
|
|
545
|
+
.component-header {
|
|
546
|
+
flex: 1;
|
|
547
|
+
min-width: 0;
|
|
548
|
+
opacity: 0.5;
|
|
549
|
+
margin-left: 12px;
|
|
550
|
+
display: flex;
|
|
551
|
+
align-items: center;
|
|
552
|
+
align-items: flex-end;
|
|
553
|
+
cursor: pointer;
|
|
554
|
+
}
|
|
555
|
+
.component-name {
|
|
556
|
+
flex: 1;
|
|
557
|
+
opacity: 0.5;
|
|
558
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
559
|
+
font-size: 16px;
|
|
560
|
+
}
|
|
561
|
+
.component-version {
|
|
562
|
+
opacity: 0.8;
|
|
563
|
+
color: ${({theme:e})=>e.palette.grey[400]};
|
|
564
|
+
font-size: 12px;
|
|
565
|
+
margin-left: 4px;
|
|
566
|
+
transform: translateY(-1px);
|
|
567
|
+
}
|
|
568
|
+
`;function ys({blocklet:e,onUpdate:n=()=>{},getComponentUrl:r=()=>window.location.origin,...i}){const{t:a}=k.useContext(_e),{api:o,inService:f,info:c}=xe(),{addDeletingDid:d,removeDeletingDid:l,matchDeletingDid:y}=Yn(),[p,C]=k.useState(!1),[m,v]=k.useState(null),[j,w]=k.useState(null),[S,u]=k.useState(!1),[s,h]=k.useState(!1),[b,R]=k.useState(!1),[E,M]=k.useState(!1),[F,P]=k.useState(null),D=e&&e.structVersion!==K.APP_STRUCT_VERSION,[I,L]=k.useState(!1),z=[...e.children];e.meta.group!=="gateway"&&z.unshift(e),y(z.map(T=>T.meta.did));const q=async()=>{if(!p){C(!0);try{const{updateId:T,updateList:$}=(await o.checkComponentsForUpdates({input:{did:e.meta.did}})).preUpdateInfo||{};if(C(!1),!T){V.info(a("blocklet.component.noUpdate"));return}const H=[];X.forEachChildSync(e,(re,{id:Y,ancestors:Se})=>{const me=$.find(Q=>Q.id===Y);if(me){const Q=Se.slice(1).concat(re).map(Ve=>Ve.meta.title||Ve.meta.name).join(" / "),de=(Se[1]||re).meta.did;H.push({groupId:de,name:Q,version:re.meta.version,newVersion:me.meta.version})}});const ee={};H.forEach(re=>{ee[re.groupId]?re.disabled=!0:ee[re.groupId]=!0}),v({params:{updateId:T},list:H,checks:ee,hasChecks:!0})}catch(T){C(!1),V.error(ve(T))}}},G=async()=>{if(!p)try{C(!0);const T=Object.keys(m.checks).filter(H=>m.checks[H]),$={updateId:m.params.updateId,rootDid:e.meta.did,selectedComponents:T};await o.upgradeComponents({input:$}),C(!1),v(null),L(null)}catch(T){C(!1),V.error(ve(T))}},ne=async(T,$)=>{d(T.meta.did);try{await o.deleteComponent({input:{did:T.meta.did,keepData:$==="keepData",rootDid:e.meta.did}}),await ut(800)}catch(H){V.error(ve(H)),l(T.meta.did)}},oe=async T=>{try{await o.startBlocklet({input:{did:e.meta.did,componentDids:[T.meta.did]}}),await ut(800)}catch($){V.error(ve($))}},U=async T=>{try{await o.stopBlocklet({input:{did:e.meta.did,componentDids:[T.meta.did]}}),await ut(800)}catch($){V.error(ve($))}},ie=async T=>{try{await o.restartBlocklet({input:{did:e.meta.did,componentDids:[T.meta.did]}}),await ut(800)}catch($){V.error(ve($))}},N=(T,$)=>{const{checked:H}=T.target;v(ee=>{const re=Object.entries(ee.checks).reduce((Se,[me,Q])=>(Se[me]=$===me||$==="all"?H:Q,Se),{}),Y=Object.values(re).includes(!0);return{...ee,checks:re,hasChecks:Y}})},O=k.useMemo(()=>m?.list.filter(T=>!T.disabled).every(T=>m.checks[T.groupId]),[m]);Dd(q);const g=Bd({blocklet:e,scrollToComponent:!0}),_=F||g;return t.jsxs(Gd,{component:"div",...i,onUpdate:n,children:[t.jsxs(Vd,{display:"flex",children:[t.jsxs(Yd,{flexDirection:"row",className:"title",display:"flex",alignItems:"center",children:[z?.length?`${a("common.components")} (${z.length})`:`${a("common.components")}`,!D&&t.jsx(Ln,{permission:f?"":"mutate_blocklets",role:f?ft:[],children:t.jsx(Uo,{children:t.jsx($n,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!I,children:t.jsxs(Be,{disabled:p||X.isInProgress(e.status),onClick:()=>{q()},"data-cy":"check-for-updates",children:[t.jsx(B,{sx:{ml:.5,mr:.5,display:"flex"},children:p?t.jsx(je,{size:16}):t.jsx(Ba,{style:{fontSize:"1em"}})}),a("blocklet.component.checkUpdateTitle")]})})})})]}),t.jsx(Ln,{permission:f?"":"mutate_blocklets",role:f?ft:[],children:t.jsxs(B,{sx:{display:"flex",alignItems:"center",gap:.5},children:[!D&&t.jsx(is,{blocklet:e,serverVersion:c.version,disabled:p||X.isInProgress(e.status)}),t.jsx(Do,{"data-cy":"component-actions",actions:[{icon:t.jsx(pe,{icon:"fluent:link-20-filled"}),onClick:()=>h(!0),text:a("router.rule.add.title"),disabled:p||X.isInProgress(e.status)},...D?[]:[{icon:t.jsx(pe,{icon:"mdi:variable"}),onClick:()=>{R(!0)},text:a("common.environments")},{icon:t.jsx(Oo,{}),onClick:()=>{M(!0)},text:a("common.preferences")}]].filter(Boolean)})]})})]}),z?.length?t.jsxs(t.Fragment,{children:[t.jsxs(B,{sx:{mt:2},children:[e.meta.group!=="gateway"&&t.jsx(qn,{blocklet:e,app:e,onRemove:ne,onStart:oe,onStop:U,onRestart:ie,getComponentUrl:r},`0-${e.meta.did}`),e.children.map(T=>t.jsx(qn,{depth:1,blocklet:T,ancestors:[e],app:e,onRemove:ne,onStart:oe,onStop:U,onRestart:ie,getComponentUrl:r},`1-${T.meta.did}`))]},`top-blocklet-${e.meta.did}`),e.optionalComponents?.map(T=>t.jsx(ir,{children:t.jsx(xs,{blocklet:T,ancestors:[e],setInstallComponentMeta:P,...T})},T.meta.did))]}):t.jsx(B,{sx:{mt:8},children:t.jsx(Ei,{children:a("blocklet.component.noComponent")})}),!!e.site.rules.length&&t.jsx(B,{sx:{mt:0,".component-item__indent":{pl:2,width:0}},children:t.jsx(Td,{})}),!!m&&t.jsx(gr,{open:!0,fullWidth:!0,children:t.jsxs(B,{sx:{paddingY:1.5},children:[t.jsx(xr,{children:a("blocklet.component.updateTitle")}),t.jsxs(B,{component:yr,sx:{py:4},children:[m.list.filter(T=>!T.disabled).length>1&&t.jsxs(B,{sx:{display:"flex",alignItems:"center"},children:[t.jsx(vr,{checked:O,onChange:T=>N(T,"all")}),t.jsx(B,{children:a(O?"common.unselectAll":"common.selectAll")})]}),m.list.map(T=>t.jsxs(B,{sx:{display:"flex",alignItems:"center",mb:1},children:[t.jsx(vr,{checked:m.checks[T.groupId],onChange:$=>N($,T.groupId),style:{marginLeft:T.disabled?16:0,alignSelf:"flex-start"},defaultChecked:!0,disabled:T.disabled}),t.jsxs(B,{sx:{flexGrow:1},children:[t.jsx(B,{xs:8,sx:{pt:1},children:T.name}),T.version&&t.jsxs(ze,{container:!0,spacing:2,sx:{fontSize:"h6.fontSize",alignItems:"center"},children:[t.jsx(ze,{size:3,children:T.version}),t.jsx(ze,{size:1,children:t.jsx(ji,{style:{fontSize:"0.9em"}})}),t.jsx(ze,{size:3,children:t.jsx(B,{sx:{color:"secondary.main"},children:T.newVersion})})]})]},`${T.name}-${T.newVersion}`)]},T.name))]}),t.jsxs(wi,{style:{padding:"8px 24px 24px"},children:[t.jsx(Be,{onClick:()=>{v(null)},children:a("common.cancel")}),t.jsxs(Be,{onClick:T=>{T.stopPropagation(),G()},color:"primary",disabled:p||!m.hasChecks,variant:"contained",autoFocus:!0,children:[p&&t.jsx(je,{size:16}),a("common.update")]})]})]})}),!!j&&t.jsx(gr,{open:!0,fullWidth:!0,onClose:()=>w(!1),children:t.jsxs(B,{sx:{paddingY:1.5},children:[t.jsx(xr,{children:a("common.configuration")}),t.jsx(yr,{children:t.jsx(B,{sx:{py:2},children:t.jsx(Nn,{control:t.jsx(Ra,{checked:S,onChange:T=>u(!!T.target.checked)}),label:a("blocklet.component.showContainer")})})})]})}),t.jsx(tr,{selectedMeta:_,blocklet:e,showDialog:!!_,setShowDialog:()=>P(null)}),s&&t.jsx(as,{hiddenChildren:!0,open:!0,onClose:()=>h(!1)}),b&&t.jsx(Xn,{open:!0,onClose:()=>R(!1),hiddenChildren:!0,blocklet:e,ancestors:[]}),E&&t.jsx(or,{open:!0,onClose:()=>M(!1),blocklet:e,ancestors:[]})]})}ys.propTypes={blocklet:x.object.isRequired,onUpdate:x.func,getComponentUrl:x.func};const Gd=se.div`
|
|
569
|
+
.title {
|
|
570
|
+
font-size: 1.2rem;
|
|
571
|
+
font-weight: bold;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
@keyframes showDelay {
|
|
575
|
+
0% {
|
|
576
|
+
opacity: 0;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
100% {
|
|
580
|
+
opacity: 1;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.component-item {
|
|
585
|
+
animation: showDelay 0.75s ease 1;
|
|
586
|
+
}
|
|
587
|
+
`,Vd=se(B)`
|
|
588
|
+
${e=>e.theme.breakpoints.up("sm")} {
|
|
589
|
+
flex-direction: row;
|
|
590
|
+
justify-content: space-between;
|
|
591
|
+
align-items: center;
|
|
592
|
+
}
|
|
593
|
+
${e=>e.theme.breakpoints.down("sm")} {
|
|
594
|
+
flex-direction: column;
|
|
595
|
+
justify-content: flex-end;
|
|
596
|
+
align-items: flex-end;
|
|
597
|
+
.sm-hide-icon > svg {
|
|
598
|
+
display: none;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
`,Yd=se(B)`
|
|
602
|
+
${e=>e.theme.breakpoints.down("sm")} {
|
|
603
|
+
width: 100%;
|
|
604
|
+
justify-content: space-between;
|
|
605
|
+
}
|
|
606
|
+
`;function jp(e){const{locale:n}=k.useContext(_e),{blocklet:r,recommendedDomain:i}=Pa(),a=o=>_i({blocklet:r,domain:{value:i||`${Si.encode(r.appPid)}.${K.DEFAULT_DID_DOMAIN}`},mountPoint:o,params:Gn(r,n)});return t.jsx(ys,{blocklet:r,getComponentUrl:a,...e})}export{jp as default};
|