@myagentroam/server 0.15.55 → 0.15.56
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/node_modules/@myagentroam/protocol/package.json +1 -1
- package/node_modules/@myagentroam/server-core/package.json +2 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/package.json +5 -5
- package/web/assets/{AuditManagementPage-CGePICnE.js → AuditManagementPage-CJpYO42N.js} +1 -1
- package/web/assets/{AuthEntryPanel-DRpHXyUu.js → AuthEntryPanel-C_BuwPY1.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-DSDrQMvI.js → ConversationTemplateManagementPage-C8p8GbuX.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-DpmVsV0-.js → ConversationTemplateManagementPage-CSknB014.js} +1 -1
- package/web/assets/{DocxPreview-DmOt3eKt.js → DocxPreview-CEKj0MFO.js} +3 -3
- package/web/assets/{EnterpriseUserManagementPage-B7E6wpwY.js → EnterpriseUserManagementPage-Bk_8sppx.js} +1 -1
- package/web/assets/{EnvironmentSecretManager-BZmWHu5t.js → EnvironmentSecretManager-Dl7hCv5N.js} +1 -1
- package/web/assets/{FilePreviewState-Clkl0yHR.js → FilePreviewState-BUcDrqrj.js} +1 -1
- package/web/assets/{ImagePreview-L_CiLOfv.js → ImagePreview-BrUoWFyv.js} +1 -1
- package/web/assets/{ImagePreviewViewport-CZcJHx3Y.js → ImagePreviewViewport-Csronmkx.js} +1 -1
- package/web/assets/{LicenseManagementPage-BmHu1lr3.js → LicenseManagementPage-TPG8xghz.js} +1 -1
- package/web/assets/{ManagementPagination-C90rbu7e.js → ManagementPagination-QZqNLeLY.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-CDzFUsk8.js → MarAgentModelManagementPage-BmmLgM3K.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-CirNkCQv.js → MarAgentModelManagementPage-MDEiSqE6.js} +1 -1
- package/web/assets/{MarAlert-B7jXXAw_.js → MarAlert-NkwuJEOq.js} +1 -1
- package/web/assets/{MarCascader-mv3IJmpf.js → MarCascader-DXamgewd.js} +1 -1
- package/web/assets/{MarCheckTag-CDX1S56g.js → MarCheckTag-BqGcYV8l.js} +1 -1
- package/web/assets/{MarCheckboxGroup-BQb2HFOi.js → MarCheckboxGroup-DRDeYetT.js} +1 -1
- package/web/assets/{MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DBaZZzUB.js → MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-CmWRifus.js} +1 -1
- package/web/assets/{MarDatePicker-CSIpHad7.js → MarDatePicker-DO6oTMCK.js} +1 -1
- package/web/assets/{MarDescriptionsItem-zjODCCpg.js → MarDescriptionsItem-BmPeYfY8.js} +1 -1
- package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-CQSbg3t1.js → MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js} +1 -1
- package/web/assets/{MarInputNumber-D2a1XmM_.js → MarInputNumber-C0IEcJYI.js} +1 -1
- package/web/assets/{MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-BliELde5.js → MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js} +1 -1
- package/web/assets/{MarSwitch-DHIp9da4.js → MarSwitch-BeNZxYkW.js} +1 -1
- package/web/assets/{MarTableColumn.vue_vue_type_script_setup_true_lang-BkNDBOi9.js → MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js} +1 -1
- package/web/assets/{MarTabs-Diwa_YPK.js → MarTabs-DE_aL9MQ.js} +1 -1
- package/web/assets/{MarTag-D7JOeohY.js → MarTag-DhjH9N1h.js} +1 -1
- package/web/assets/MarkdownFilePreview-2m7WBmpC.js +1 -0
- package/web/assets/{MarkdownFilePreview.vue_vue_type_script_setup_true_lang-YOia8O9x.js → MarkdownFilePreview.vue_vue_type_script_setup_true_lang-BDzqPFUj.js} +1 -1
- package/web/assets/{MarkdownPreview-CPDxIpvJ.js → MarkdownPreview-BsHajQCR.js} +2 -2
- package/web/assets/{McpDetailsDialog-DlW-FRQn.js → McpDetailsDialog-DDtd9_-k.js} +1 -1
- package/web/assets/{McpSourceManagementPage-Df3r1l8a.js → McpSourceManagementPage-BqMsOcOH.js} +1 -1
- package/web/assets/{McpSourceManagementPage-DGiAjDIm.js → McpSourceManagementPage-CMH9q9Dh.js} +1 -1
- package/web/assets/{MediaPreview-Bh5GAT89.js → MediaPreview-lK0YvjCs.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-C4Awa43W.js → NodeDetailsDialogs-DoFmRmAA.js} +1 -1
- package/web/assets/NodeManagementPage-5J7p6Yt-.js +1 -0
- package/web/assets/NodeManagementPage-CdPVLUe7.js +1 -0
- package/web/assets/{OAuthManagementPage-B0dY28pw.js → OAuthManagementPage-Bds4k_HZ.js} +1 -1
- package/web/assets/{OrganizationManagementPage-B6xoDKjm.js → OrganizationManagementPage-CMMYS-qU.js} +1 -1
- package/web/assets/{PdfPreview-DwAwYtal.js → PdfPreview-OrILtEBo.js} +1 -1
- package/web/assets/{PptxPreview-Zd4sD3un.js → PptxPreview-ClK8_Xz7.js} +1 -1
- package/web/assets/{RemoteDesktopPage-BkSF2-tw.js → RemoteDesktopPage-BU1-kR86.js} +1 -1
- package/web/assets/{ResourceManagementPanel-D6-PKRng.js → ResourceManagementPanel-D4QE6nem.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-D36D_SWR.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-BV4do8lf.js} +1 -1
- package/web/assets/SecretManagementPage-BdVRYJFb.js +1 -0
- package/web/assets/{SecretManagementPage-Dg4ZLRDE.js → SecretManagementPage-CCZCFUX3.js} +1 -1
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-EnOUlD-8.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-C5hUcWT-.js} +1 -1
- package/web/assets/{SessionSharePage-CiezVuub.js → SessionSharePage-DA4n6OKy.js} +2 -2
- package/web/assets/{SettingsContent-CU_e7l96.css → SettingsContent-BuhBQtZa.css} +1 -1
- package/web/assets/SettingsContent-DvZDFKpb.js +1 -0
- package/web/assets/{SettingsContent-Cy6qGNEM.js → SettingsContent-wwHWJKB9.js} +1 -1
- package/web/assets/{SkillCenterPage-CkndFz5S.js → SkillCenterPage-B0OeVpGr.js} +1 -1
- package/web/assets/SkillCenterPage-CtDIE-5l.js +1 -0
- package/web/assets/{SkillDetailsDialog-BOmhwXA1.js → SkillDetailsDialog-0ZPGDBn5.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-KFEVmyFQ.js → SkillSourceManagementPage-BbFYNud9.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-CafESWLm.js → SkillSourceManagementPage-DP06NeQM.js} +1 -1
- package/web/assets/{StandaloneFilePreviewPage-DuQlNWsY.js → StandaloneFilePreviewPage-DdHUS1Ce.js} +1 -1
- package/web/assets/{SystemConfigurationPage-By65U7gD.js → SystemConfigurationPage-CHdWfQ5h.js} +1 -1
- package/web/assets/{SystemConfigurationPage-V6JcipwA.js → SystemConfigurationPage-C_VNNuOY.js} +1 -1
- package/web/assets/{SystemInformationPage-Dd11bE2A.js → SystemInformationPage-CdWYtfT4.js} +1 -1
- package/web/assets/{TerminalTabView-CqacwGa9.js → TerminalTabView-BYPzshPJ.js} +1 -1
- package/web/assets/{UTIF-BCKu1iEO.js → UTIF-CUD2vrrz.js} +1 -1
- package/web/assets/WorkbenchPage-BbwAQaj5.css +1 -0
- package/web/assets/{WorkbenchPage-BjDPrZFZ.js → WorkbenchPage-DsHxvIzv.js} +8 -8
- package/web/assets/WorkspaceManagementPage-C9igWKHb.js +1 -0
- package/web/assets/WorkspaceManagementPage-D2bBXh6S.js +1 -0
- package/web/assets/{XlsxPreview-BoqVActY.js → XlsxPreview-B41-KTx1.js} +2 -2
- package/web/assets/{abnfDiagram-VCTEODGH-yZ4SFPSo.js → abnfDiagram-VCTEODGH-Gi4AyHBN.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-BLD3EJS3.js → architectureDiagram-5GKGNRK7-BLdWJMnT.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-BDkm5ESg.js → blockDiagram-OSKFZWR5-CwUIsqOo.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-CBTobK3C.js → c4Diagram-7LVT6UL2-DwkFMIAR.js} +1 -1
- package/web/assets/{catalog-ownership-service-Bquvdvur.js → catalog-ownership-service-BQMtgZLb.js} +1 -1
- package/web/assets/{catalog-page-service-D5RlUEa-.js → catalog-page-service-RgFFn1Yl.js} +1 -1
- package/web/assets/channel-d4vA9Dwt.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-CFJeAv7i.js → chunk-2Q5K7J3B-CNqh6zeP.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-BsJORUN3.js → chunk-5VM5RSS4-CcXhi_4J.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-ChpjoRI8.js → chunk-F27PBJKO-CknFZQjN.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-W0TTSRtC.js → chunk-HLEWEB6X-D81-L9Kd.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-Bn_9uPlJ.js → chunk-JWPE2WC7-BGqyhBr-.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-Z6y02hOB.js → chunk-POPQ4Y6H-COENKhYe.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-Cxt26xtW.js → chunk-SVP7TREG-BBEH2tjs.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DPUwGdcv.js → chunk-XXDRQBXY-BoNIGrFE.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-B4sqAQwm.js → chunk-ZLD2IHE6-BqTmuVP7.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-DrfrX2Mc.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-DrfrX2Mc.js +1 -0
- package/web/assets/{conversation-history-C5iSVaBv.js → conversation-history-Cpu8lv-7.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-DpGXV7Os.js → cose-bilkent-JH36ORCC-Ddatc464.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-CoCk1NvH.js → cynefin-OW5HDTMX-_gPtbVkq.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-Iu4AwKrk.js → cynefinDiagram-5FMLGOSQ-DaJowaLv.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-DwkHC2ix.js → dagre-OS7QT2EB-BtMOG3mT.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-BkgsCRwo.js → diagram-S7CK7UJ4-BMMbaKnq.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-Dw34SJ-U.js → diagram-UQ7AKVKN-Bil5JzWf.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-DLa0Ofjo.js → diagram-VSXAHHWV-DIhZfiCk.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-BD7RBRim.js → diagram-VX7I27RA-DUV6MLdG.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-D8DtzlU9.js → diagram-Z3DM3KII-0wH2rPsD.js} +1 -1
- package/web/assets/{docx-preview-C21zKndm.js → docx-preview-CrW7sY_C.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-DyWbek1R.js → ebnfDiagram-PWID7BFC-DYUCCArH.js} +1 -1
- package/web/assets/{editor-Bbzkx1FX.js → editor-4xaZ8ITk.js} +3 -3
- package/web/assets/{enterprise-management-service-DBqtU6or.js → enterprise-management-service-B_yURuGw.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-GI-632lg.js → erDiagram-2YWLMYGG-Dcu6CMNW.js} +1 -1
- package/web/assets/{error-presentation-B65PEVVV.js → error-presentation-CSDznxvT.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-CzsBsF03.js → flowDiagram-T62WH6J4-DadJl9TQ.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-ua0f1gGk.js → ganttDiagram-EL5Y4UJY-JoaVddzb.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-Dxqm7Tsa.js → gitGraphDiagram-WWUBYQGX-Pqf2sQfJ.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-Bq0ADKSI.js → hosted-conversation-template-client-CV1xizww.js} +1 -1
- package/web/assets/{image-Kl8rD8pw.js → image-_EENH5vg.js} +1 -1
- package/web/assets/{index-Ls5uj5Ke.js → index--Jt381_W.js} +1 -1
- package/web/assets/{index-C4CEAMsJ.js → index-4C9wiHpI.js} +4 -4
- package/web/assets/{index-Dljf3QO3.js → index-8_3zGtoq.js} +1 -1
- package/web/assets/{index-Do8onKHh.js → index-BF_L6Wyk.js} +1 -1
- package/web/assets/{index-CXQiAaKU.js → index-BhA2YOpS.js} +1 -1
- package/web/assets/{index-Ce17jEH0.js → index-BkHyQLtd.js} +1 -1
- package/web/assets/{index-du74SlWW.js → index-BlS3MY9A.js} +1 -1
- package/web/assets/{index-BSezMLIg.js → index-BpAsARlK.js} +1 -1
- package/web/assets/{index-BImE9TQA.js → index-BuJQHe80.js} +1 -1
- package/web/assets/{index-CQoYdI0Y.js → index-C6IDxfKG.js} +1 -1
- package/web/assets/{index-BT7UzIjo.js → index-C8C-ArGY.js} +2 -2
- package/web/assets/{index-TTXsirkP.js → index-CPVQbzMm.js} +1 -1
- package/web/assets/{index-VPF_5Urw.js → index-CgzINhOr.js} +1 -1
- package/web/assets/{index-Cg2gZ-Np.js → index-CvJyEWWy.js} +1 -1
- package/web/assets/{index-Dntpf_HT.js → index-Cwf8YCBa.js} +1 -1
- package/web/assets/{index-CjTLxVG_.js → index-D2Z5HVRK.js} +1 -1
- package/web/assets/{index-DyVpt4Kz.js → index-D6mmVj_r.js} +1 -1
- package/web/assets/{index-0deLQTFZ.js → index-DpR19uUj.js} +1 -1
- package/web/assets/{index-Ve9Le1Zg.js → index-DxK3hiAZ.js} +1 -1
- package/web/assets/{index-CuYqpLok.js → index-MlceU9Lf.js} +1 -1
- package/web/assets/{index-CpmvUVxC.js → index-a2gm6Agv.js} +1 -1
- package/web/assets/{index-CQ7TXEsY.js → index-aYEujL3w.js} +1 -1
- package/web/assets/{index-_RPTWbDl.js → index-gt0yv6qh.js} +1 -1
- package/web/assets/{index-BY2QfHA6.js → index-iB3Dhsc-.js} +1 -1
- package/web/assets/{infoDiagram-FKFFQAWI-C9CfC5uC.js → infoDiagram-FKFFQAWI-SLQCq96P.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-BqkUgMlw.js → ishikawaDiagram-5VMMS53U-yeetZDkK.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-BVFaCeu6.js → journeyDiagram-EYS64GPL-GPX-H5V6.js} +1 -1
- package/web/assets/{jszip.min-DGNPmo64.js → jszip.min-B0WpSbV_.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-pir7hriK.js → kanban-definition-UXKFOSKX-U--3JSQ1.js} +1 -1
- package/web/assets/{layout-B11gFX9k.js → layout-RDrPnjDy.js} +1 -1
- package/web/assets/{management-url-service-DwJj-vEo.js → management-url-service-WTIrc38n.js} +1 -1
- package/web/assets/{mar-agent-reasoning-effort-9WzCsfod.js → mar-agent-reasoning-effort-K13iNURu.js} +1 -1
- package/web/assets/{markdown-renderer-Cw8reAH3.js → markdown-renderer-CORifCeR.js} +1 -1
- package/web/assets/{mcp-center-service-0qjO6kQq.js → mcp-center-service-xKzbxMnl.js} +1 -1
- package/web/assets/{mermaid.core-DxQR5gSd.js → mermaid.core-DnYwwhYR.js} +5 -5
- package/web/assets/{mindmap-definition-THT77NOG-DBnGhD0r.js → mindmap-definition-THT77NOG-BB9pClYJ.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-BVo1UeW9.js → mobile-dialog-return-service-BoVFREoZ.js} +1 -1
- package/web/assets/{oauth-callback-DWvx6biG.js → oauth-callback-B4tdwgWr.js} +1 -1
- package/web/assets/{parser-C4gU8uDu.js → parser-BjfYmReN.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-whhRzqJy.js → pegDiagram-XKGWAZYB-fBV6l2Ir.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-h9VdrMIR.js → pieDiagram-E7YTZNPT-CVrAeS38.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-zOoSKl2Z.js → quadrantDiagram-AXDQQJYC-x4rGDiwn.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-dI0o3BxU.js → railroadDiagram-O6MQD6OU-CkrlvTRJ.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-nWXRS6H8.js → requirementDiagram-IS5BZ75X-_Jj6L0ST.js} +1 -1
- package/web/assets/{runner-presentation-CpkHzrC1.js → runner-presentation-mrgmpAJs.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-WWbMo8H7.js → sankeyDiagram-P5KCCOFB-DOPxGVg6.js} +1 -1
- package/web/assets/{scoped-http-service-CpPFUTeO.js → scoped-http-service-BDZJVSvp.js} +3 -3
- package/web/assets/{sequenceDiagram-WJ2MYXX4-COjxlvrb.js → sequenceDiagram-WJ2MYXX4-DfZCFJk0.js} +1 -1
- package/web/assets/{session-share-client-service-BBj9YqiT.js → session-share-client-service-DUO0hyog.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-ChMH1-jE.js → sizeCapture-INFHLROL-S9GFIGuU.js} +1 -1
- package/web/assets/{spreadsheet-Bm6y4uE0.js → spreadsheet-BIlVgiES.js} +4 -4
- package/web/assets/{stateDiagram-XQSTLZYL-BLeULQT4.js → stateDiagram-XQSTLZYL-BNa_9qTL.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-DtVFLQ8W.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN--c-0MHxg.js → swimlanes-V6O3JKXN-BeUJVyCH.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BcVG5Jqe.js +8 -0
- package/web/assets/{time-presentation-CeSBIHiD.js → time-presentation-09Rjr2Gy.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-B2pfIqGs.js → timeline-definition-24CTP7MA-1VMbel4h.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-BA3K0v3q.js → vennDiagram-4TSXK5OY-B0CorBbl.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-E2tMHKKR.js → wardleyDiagram-VM6X3IG4-BYPmSbHp.js} +1 -1
- package/web/assets/{workbench-live-service-ChTXppOO.js → workbench-live-service-vga8VA4K.js} +1 -1
- package/web/assets/{workbench-presentation-Beh6mErs.js → workbench-presentation-DH39N9Mr.js} +1 -1
- package/web/assets/{workspace-direct-transfer-service-FvEIWjko.js → workspace-direct-transfer-service-BqVxkJdU.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-BLfzPfTF.js → xychartDiagram-S5SC5T6Z-DhZ37yM2.js} +1 -1
- package/web/docs/404.html +2 -2
- package/web/docs/administration/account.html +3 -3
- package/web/docs/administration/audit.html +3 -3
- package/web/docs/administration/conversation-templates.html +3 -3
- package/web/docs/administration/email-notifications.html +3 -3
- package/web/docs/administration/license.html +3 -3
- package/web/docs/administration/nodes-workspaces.html +3 -3
- package/web/docs/administration/oauth.html +3 -3
- package/web/docs/administration/secrets.html +3 -3
- package/web/docs/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/administration/users-organizations.html +3 -3
- package/web/docs/assets/{app.D6UsQAFz.js → app.zKS4b13_.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.Bh134049.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.3yCeb0bm.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.BIFfRETI.js → VPLocalSearchBox.Cf2s7W5-.js} +1 -1
- package/web/docs/assets/chunks/{theme.CMBA6NVb.js → theme.BHeiQl-z.js} +2 -2
- package/web/docs/assets/{en-US_workbench_navigation.md.CkVCyKy2.js → en-US_workbench_navigation.md.CGGnsFCO.js} +1 -1
- package/web/docs/assets/{workbench_navigation.md.BDK35QL9.js → workbench_navigation.md.CdU188nP.js} +1 -1
- package/web/docs/concepts/architecture.html +3 -3
- package/web/docs/concepts/data-and-security.html +3 -3
- package/web/docs/concepts/files-git-terminal.html +3 -3
- package/web/docs/concepts/node-and-workspace.html +3 -3
- package/web/docs/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/concepts/runner-control.html +3 -3
- package/web/docs/concepts/secrets.html +3 -3
- package/web/docs/concepts/session-run-turn.html +3 -3
- package/web/docs/deployment/backup-restore.html +3 -3
- package/web/docs/deployment/network.html +3 -3
- package/web/docs/deployment/node-installation.html +3 -3
- package/web/docs/deployment/node-linux.html +3 -3
- package/web/docs/deployment/node-macos.html +3 -3
- package/web/docs/deployment/node-windows.html +3 -3
- package/web/docs/deployment/production.html +3 -3
- package/web/docs/deployment/security-checklist.html +3 -3
- package/web/docs/deployment/upgrade.html +3 -3
- package/web/docs/en-US/administration/account.html +3 -3
- package/web/docs/en-US/administration/audit.html +3 -3
- package/web/docs/en-US/administration/conversation-templates.html +3 -3
- package/web/docs/en-US/administration/email-notifications.html +3 -3
- package/web/docs/en-US/administration/license.html +3 -3
- package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
- package/web/docs/en-US/administration/oauth.html +3 -3
- package/web/docs/en-US/administration/secrets.html +3 -3
- package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/en-US/administration/users-organizations.html +3 -3
- package/web/docs/en-US/concepts/architecture.html +3 -3
- package/web/docs/en-US/concepts/data-and-security.html +3 -3
- package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
- package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
- package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/en-US/concepts/runner-control.html +3 -3
- package/web/docs/en-US/concepts/secrets.html +3 -3
- package/web/docs/en-US/concepts/session-run-turn.html +3 -3
- package/web/docs/en-US/deployment/backup-restore.html +3 -3
- package/web/docs/en-US/deployment/network.html +3 -3
- package/web/docs/en-US/deployment/node-installation.html +3 -3
- package/web/docs/en-US/deployment/node-linux.html +3 -3
- package/web/docs/en-US/deployment/node-macos.html +3 -3
- package/web/docs/en-US/deployment/node-windows.html +3 -3
- package/web/docs/en-US/deployment/production.html +3 -3
- package/web/docs/en-US/deployment/security-checklist.html +3 -3
- package/web/docs/en-US/deployment/upgrade.html +3 -3
- package/web/docs/en-US/getting-started/connect-node.html +3 -3
- package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
- package/web/docs/en-US/getting-started/first-login.html +3 -3
- package/web/docs/en-US/getting-started/next-steps.html +3 -3
- package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
- package/web/docs/en-US/getting-started/overview.html +3 -3
- package/web/docs/en-US/getting-started/prerequisites.html +3 -3
- package/web/docs/en-US/getting-started/register-workspace.html +3 -3
- package/web/docs/en-US/getting-started/server-installation.html +3 -3
- package/web/docs/en-US/operations/marctl.html +3 -3
- package/web/docs/en-US/reference/configuration.html +3 -3
- package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/en-US/reference/limits.html +3 -3
- package/web/docs/en-US/reference/ports-paths-data.html +3 -3
- package/web/docs/en-US/reference/status-and-errors.html +3 -3
- package/web/docs/en-US/runners/claude-code.html +3 -3
- package/web/docs/en-US/runners/codex.html +3 -3
- package/web/docs/en-US/runners/mar-agent.html +3 -3
- package/web/docs/en-US/runners/opencode.html +3 -3
- package/web/docs/en-US/runners/overview.html +3 -3
- package/web/docs/en-US/runners/runner-troubleshooting.html +3 -3
- package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
- package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/en-US/troubleshooting/session-run.html +3 -3
- package/web/docs/en-US/troubleshooting/terminal.html +3 -3
- package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
- package/web/docs/en-US/workbench/browser.html +3 -3
- package/web/docs/en-US/workbench/composer.html +3 -3
- package/web/docs/en-US/workbench/context-and-plan.html +3 -3
- package/web/docs/en-US/workbench/conversation.html +3 -3
- package/web/docs/en-US/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/en-US/workbench/files.html +3 -3
- package/web/docs/en-US/workbench/git-changes.html +3 -3
- package/web/docs/en-US/workbench/git-history.html +3 -3
- package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
- package/web/docs/en-US/workbench/mobile.html +3 -3
- package/web/docs/en-US/workbench/navigation.html +5 -5
- package/web/docs/en-US/workbench/remote-desktop.html +3 -3
- package/web/docs/en-US/workbench/sessions.html +3 -3
- package/web/docs/en-US/workbench/skills.html +3 -3
- package/web/docs/en-US/workbench/terminal.html +3 -3
- package/web/docs/getting-started/connect-node.html +3 -3
- package/web/docs/getting-started/first-agent-session.html +3 -3
- package/web/docs/getting-started/first-login.html +3 -3
- package/web/docs/getting-started/next-steps.html +3 -3
- package/web/docs/getting-started/npm-quick-start.html +3 -3
- package/web/docs/getting-started/overview.html +3 -3
- package/web/docs/getting-started/prerequisites.html +3 -3
- package/web/docs/getting-started/register-workspace.html +3 -3
- package/web/docs/getting-started/server-installation.html +3 -3
- package/web/docs/hashmap.json +1 -1
- package/web/docs/operations/marctl.html +3 -3
- package/web/docs/reference/configuration.html +3 -3
- package/web/docs/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/reference/limits.html +3 -3
- package/web/docs/reference/ports-paths-data.html +3 -3
- package/web/docs/reference/status-and-errors.html +3 -3
- package/web/docs/runners/claude-code.html +3 -3
- package/web/docs/runners/codex.html +3 -3
- package/web/docs/runners/mar-agent.html +3 -3
- package/web/docs/runners/opencode.html +3 -3
- package/web/docs/runners/overview.html +3 -3
- package/web/docs/runners/runner-troubleshooting.html +3 -3
- package/web/docs/troubleshooting/node-offline.html +3 -3
- package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/troubleshooting/session-run.html +3 -3
- package/web/docs/troubleshooting/terminal.html +3 -3
- package/web/docs/troubleshooting/workspace-files.html +3 -3
- package/web/docs/workbench/browser.html +3 -3
- package/web/docs/workbench/composer.html +3 -3
- package/web/docs/workbench/context-and-plan.html +3 -3
- package/web/docs/workbench/conversation.html +3 -3
- package/web/docs/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/workbench/files.html +3 -3
- package/web/docs/workbench/git-changes.html +3 -3
- package/web/docs/workbench/git-history.html +3 -3
- package/web/docs/workbench/hosted-conversations.html +3 -3
- package/web/docs/workbench/mobile.html +3 -3
- package/web/docs/workbench/navigation.html +5 -5
- package/web/docs/workbench/remote-desktop.html +3 -3
- package/web/docs/workbench/sessions.html +3 -3
- package/web/docs/workbench/skills.html +3 -3
- package/web/docs/workbench/terminal.html +3 -3
- package/web/index.html +2 -2
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/web/assets/MarkdownFilePreview-DXE1UI5t.js +0 -1
- package/web/assets/NodeManagementPage-BBQ-6zbC.js +0 -1
- package/web/assets/NodeManagementPage-CjfH5eDM.js +0 -1
- package/web/assets/SecretManagementPage-D1Axviz1.js +0 -1
- package/web/assets/SettingsContent-Xf7svkVQ.js +0 -1
- package/web/assets/SkillCenterPage-DsNVLj5o.js +0 -1
- package/web/assets/WorkbenchPage-BsW_cgVY.css +0 -1
- package/web/assets/WorkspaceManagementPage-BNIq2LYg.js +0 -1
- package/web/assets/WorkspaceManagementPage-pecvREjB.js +0 -1
- package/web/assets/channel-COnJBH-9.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-CbVQzsb_.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-CbVQzsb_.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-BKA2bwDT.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-D1AcaGuQ.js +0 -8
- package/web/docs/assets/chunks/@localSearchIndexen-US.DBFTJgr7.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.7U0K64EV.js +0 -1
- /package/web/docs/assets/{en-US_workbench_navigation.md.CkVCyKy2.lean.js → en-US_workbench_navigation.md.CGGnsFCO.lean.js} +0 -0
- /package/web/docs/assets/{workbench_navigation.md.BDK35QL9.lean.js → workbench_navigation.md.CdU188nP.lean.js} +0 -0
package/web/assets/{SkillSourceManagementPage-KFEVmyFQ.js → SkillSourceManagementPage-BbFYNud9.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Ze,C as je,D as Je,w as Qe,N as I,t as l,o as m,b as C,E as p,g as o,q as i,H as u,F as s,u as e,s as c,I as v,J as le,K as te,p as M,v as D,a0 as $,a1 as N,G as Z,a2 as We,a6 as Ye,f as he,L as ne,a as k,c as oe,r as ie,O as re,_ as Xe}from"./index-C4CEAMsJ.js";/* empty css */import{M as Ce,a as ea}from"./MarTabs-Diwa_YPK.js";import{M as Ve}from"./MarCheckTag-CDX1S56g.js";import{M as se}from"./MarTag-D7JOeohY.js";import{_ as f,M as de}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-BkNDBOi9.js";import{a as ue,_ as V}from"./MarFormItem.vue_vue_type_script_setup_true_lang-CQSbg3t1.js";import{M as O,a as q}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-BliELde5.js";import{M as _e}from"./MarSwitch-DHIp9da4.js";import{M as ce,u as ge,m as me}from"./mobile-dialog-return-service-BVo1UeW9.js";import{w as aa,M as la}from"./ManagementPagination-C90rbu7e.js";import{f as ta}from"./time-presentation-CeSBIHiD.js";import{c as na,s as j,S as oa}from"./SkillDetailsDialog-BOmhwXA1.js";import"./error-presentation-B65PEVVV.js";import"./catalog-page-service-D5RlUEa-.js";/* empty css */import"./MarDescriptionsItem-zjODCCpg.js";const ia={class:"mar-management-page"},ra={class:"mar-table-actions"},sa=["aria-label"],da={class:"mar-management-filter"},ua={class:"skill-table-section"},ca=["aria-label"],ga={key:1,class:"skill-empty"},ma={class:"mar-management-filter mar-management-filter--stacked"},fa=["aria-label"],pa={class:"skill-table-section"},va=["aria-label"],ka={class:"table-meta"},Sa={key:0,class:"skill-tags"},ba={class:"form-hint"},Ma=Ze({__name:"SkillSourceManagementPage",props:{request:{type:Function},writable:{type:Boolean},scopeLabel:{type:Function},loadExtension:{type:Function},sourceContext:{},catalogContext:{},ownershipRules:{},submitSource:{type:Function},submitFavorite:{type:Function}},emits:["openSource","openCatalog"],setup(b,{emit:Te}){const _=b,fe=Te,r=na(_.request,{..._.submitSource===void 0?{}:{submitSource:_.submitSource},..._.submitFavorite===void 0?{}:{submitFavorite:_.submitFavorite}}),De=r.sources,d=r.catalogPage;aa(d);const A=k(!1),P=k(!1),x=k(!1),L=k(!1),U=k("idle");let T=0;const pe=oe(()=>d.loading.value&&!d.loadingMore.value),B=k(new Set),J=k(),ve=k(),ke=k(),Se=k(),z=k(),Q=k(),K=k(),R=k({}),W=d.keyword,G=d.category,be=k("source"),w=ie({name:"",locator:""}),h=ie({featured:!1,tags:[]}),y=ie({featured:!1,tags:[]}),Y=oe(()=>({name:[{required:!0,message:l("generated.skillSourceManagementPage.enterASourceName"),trigger:"blur"}],locator:[{required:!0,message:l("generated.skillSourceManagementPage.enterARepositoryURL"),trigger:"blur"},{validator:(n,t,a)=>{const g=typeof t=="string"?t.trim():"";/^https:\/\//u.test(g)||/^git@[A-Za-z0-9.-]+:[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)+(?:\.git)?$/u.test(g)?a():a(new Error(l("generated.skillSourceManagementPage.enterAnHTTPSOrGitSSHRepository")))},trigger:"blur"}],tags:[{validator:(n,t,a)=>{const g=Array.isArray(t)?t.map(F=>String(F).trim()):[];g.some(F=>F.length===0||F.length>32)?a(new Error(l("generated.skillSourceManagementPage.eachTagMustContain132Characters"))):new Set(g.map(F=>F.toLocaleLowerCase())).size!==g.length?a(new Error(l("generated.skillSourceManagementPage.duplicateTagsAreNotAllowed"))):a()},trigger:"change"}]})),E=oe(()=>r.sources.value.find(n=>n.id===r.selectedSourceId.value)),X=d.tags,Ae=r.favorites;je(()=>{d.start(),xe()}),Je(()=>{T++,d.dispose()}),Qe(r.selectedSourceId,()=>{T++,U.value="idle",P.value=!1,z.value=void 0},{flush:"sync"});async function xe(){await Promise.all([S(async()=>{await r.loadSources(),await ee()}),S(r.loadCatalog),S(async()=>_.loadExtension?.())])}async function S(n,t){try{await n(),t!==void 0&&I(t,"success")}catch(a){if(a===d.error.value)return;I(j(a,l("generated.skillSourceManagementPage.theSkillSourceOperationDidNotComplete")),"error",a)}}function Ue(){Object.assign(w,{name:"",locator:""}),fe("openSource"),A.value=!0}async function Re(){await ve.value?.validate().catch(()=>!1)&&await S(async()=>{await r.addSource({name:w.name.trim(),locator:w.locator.trim()}),A.value=!1},l("generated.skillSourceManagementPage.skillSourceAdded"))}function Fe(n){z.value=n,Object.assign(h,{featured:!1,tags:[]}),fe("openCatalog"),P.value=!0}function Ie(n){K.value={name:n.name,description:n.description,source:n.source,...n.skillPath===null?{}:{path:n.skillPath},...n.installs===null?{}:{installs:n.installs}},L.value=!0}function Le(n){K.value={name:n.name,description:"",source:n.locator,scope:H(n.scope),status:n.enabled?l("generated.skillSourceManagementPage.enabled"):l("generated.skillSourceManagementPage.disabled")},L.value=!0}function Be(n){K.value={name:n.normalizedName,description:n.description,source:n.repositoryIdentity,scope:H(n.scope),path:n.skillPath,version:n.commitSha.slice(0,8),updatedAt:we(n.updatedAt),featured:n.featured,tags:n.tags},L.value=!0}function Ee(n){Q.value=n,y.featured=n.featured,y.tags=[...n.tags],x.value=!0}async function $e(){if(!await Se.value?.validate().catch(()=>!1)||Q.value===void 0)return;const n=y.tags.map(t=>t.trim());await S(async()=>{await r.updatePresentation(Q.value.id,{featured:y.featured,tags:n}),x.value=!1},l("generated.skillSourceManagementPage.skillInformationUpdated"))}async function Ne(n){r.selectedSourceId.value=n,r.query.value="",await S(ee)}async function ee(){await ye(r.loadCandidates,E.value?.kind==="REPOSITORY")}async function Me(){!E.value?.enabled||r.loading.value||await ye(r.search,E.value.kind!=="SKILLS_SH"||r.query.value.trim()!=="")}async function ye(n,t){const a=++T;U.value=t?"loading":"idle",r.candidates.value=[];try{await n()}catch(g){if(a===T)throw g}finally{t&&a===T&&(U.value="settled")}}async function Pe(n){const t=r.selectedSourceId.value;await n(),r.selectedSourceId.value!==t&&await ee()}async function Oe(n){try{await re.confirm(n.enabled?l("generated.skillSourceManagementPage.confirmDisableSkillSource",{value0:n.name}):l("generated.skillSourceManagementPage.confirmEnableSkillSource",{value0:n.name}),l("generated.skillSourceManagementPage.updateSkillSourceStatus"),{icon:c("warning"),type:"warning",confirmButtonText:n.enabled?l("generated.skillSourceManagementPage.disable"):l("generated.skillSourceManagementPage.enable"),cancelButtonText:l("generated.skillSourceManagementPage.cancel2")})}catch(t){if(ae(t))return;I(j(t,l("generated.skillSourceManagementPage.unableToConfirmSourceStatusChange")),"error",t);return}await S(()=>Pe(()=>r.setSourceEnabled(n.id,!n.enabled)),l("generated.skillSourceManagementPage.skillSourceStatusUpdated"))}async function qe(){const n=z.value,t=T;if(!n||r.loading.value||!r.candidates.value.includes(n)||!await ke.value?.validate().catch(()=>!1)||!P.value||r.loading.value||t!==T||n!==z.value)return;const a=h.tags.map(g=>g.trim());await S(async()=>{await r.favorite(n,{featured:h.featured,tags:a}),P.value=!1},l("generated.skillSourceManagementPage.skillAddedToTheCatalog"))}async function ze(n){B.value=new Set([...B.value,n.id]);try{await S(async()=>{const t=await r.checkUpdate(n.id);R.value={...R.value,[n.id]:t},I(t.updateAvailable?l("generated.skillSourceManagementPage.updateAvailable"):l("generated.skillSourceManagementPage.alreadyUpToDate"),"info")})}finally{const t=new Set(B.value);t.delete(n.id),B.value=t}}async function Ke(n){J.value=n.id;try{await S(async()=>{await r.upgrade(n.id);const t={...R.value};delete t[n.id],R.value=t},l("generated.skillSourceManagementPage.catalogSkillUpdated"))}finally{J.value=void 0}}function we(n){return ta(n)}async function Ge(n){try{await re.confirm(l("generated.skillSourceManagementPage.deleteSkillSource",{value0:n.name}),l("generated.skillSourceManagementPage.deleteSkillSource2"),{icon:c("warning"),type:"warning",confirmButtonText:l("generated.skillSourceManagementPage.delete"),cancelButtonText:l("generated.skillSourceManagementPage.cancel")})}catch(t){if(ae(t))return;I(j(t,l("generated.skillSourceManagementPage.unableToConfirmDeletionTryAgainLater")),"error",t);return}await S(()=>Pe(()=>r.removeSource(n.id)),l("generated.skillSourceManagementPage.skillSourceDeleted"))}async function He(n,t){try{await re.confirm(l("generated.skillSourceManagementPage.removeFromTheSkillCatalogInstalledCopies",{value0:t}),l("generated.skillSourceManagementPage.removeSkill"),{icon:c("warning"),type:"warning",confirmButtonText:l("generated.skillSourceManagementPage.remove"),cancelButtonText:l("generated.skillSourceManagementPage.cancel2")})}catch(a){if(ae(a))return;I(j(a,l("generated.skillSourceManagementPage.unableToConfirmRemovalTryAgainLater")),"error",a);return}await S(()=>r.remove(n),l("generated.skillSourceManagementPage.skillRemoved"))}function ae(n){return n==="cancel"||n==="close"}function H(n){return _.scopeLabel?.(n)??l("generated.skillSourceManagementPage.personal")}return(n,t)=>(m(),C("section",ia,[p("div",ra,[o(e(v),{type:"primary",icon:e(c)("plus"),disabled:!b.writable||e(r).loading.value,onClick:Ue},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.addSkillSource")),1)]),_:1},8,["icon","disabled"])]),o(e(de),{class:"clickable-rows skill-source-table",data:e(De),"aria-busy":e(r).sourcesLoading.value,"row-key":"id",onRowClick:Le},le({default:i(()=>[o(e(f),{prop:"name",label:e(l)("generated.skillSourceManagementPage.name"),sortable:"","min-width":"180"},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.scope"),width:"144","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(H(a.scope)),1)]),_:1},8,["label"]),o(e(f),{prop:"locator",label:e(l)("generated.skillSourceManagementPage.uRL"),"min-width":"280","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.status"),width:"110"},{default:i(({row:a})=>[o(e(se),{type:a.enabled?"success":"info",effect:"plain"},{default:i(()=>[u(s(a.enabled?e(l)("generated.skillSourceManagementPage.enabled"):e(l)("generated.skillSourceManagementPage.disabled")),1)]),_:2},1032,["type"])]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),width:180},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[0]||(t[0]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("power"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Oe(a)},{default:i(()=>[u(s(a.enabled?e(l)("generated.skillSourceManagementPage.disable"):e(l)("generated.skillSourceManagementPage.enable")),1)]),_:2},1032,["icon","disabled","onClick"]),a.builtIn?D("",!0):(m(),M(e(v),{key:0,link:"",type:"danger",icon:e(c)("delete"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ge(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.delete2")),1)]),_:1},8,["icon","disabled","onClick"]))])]),_:1},8,["label"])]),_:2},[e(r).sourcesLoading.value?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,sa)]),key:"0"}:void 0]),1032,["data","aria-busy"]),o(e(ea),{modelValue:be.value,"onUpdate:modelValue":t[8]||(t[8]=a=>be.value=a),class:"skill-management-tabs"},{default:i(()=>[o(e(Ce),{label:e(l)("generated.skillSourceManagementPage.sourceSkills"),name:"source"},{default:i(()=>[p("div",da,[o(e(O),{"model-value":e(r).selectedSourceId.value,class:"mar-management-filter__source","aria-label":e(l)("generated.skillSourceManagementPage.selectASkillSource"),placeholder:e(l)("generated.skillSourceManagementPage.selectAnEnabledSkillSource"),disabled:e(r).loading.value,onChange:Ne},{default:i(()=>[(m(!0),C($,null,N(e(r).sources.value.filter(a=>a.enabled),a=>(m(),M(e(q),{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","aria-label","placeholder","disabled"]),o(e(Z),{modelValue:e(r).query.value,"onUpdate:modelValue":t[2]||(t[2]=a=>e(r).query.value=a),class:"mar-management-filter__query",clearable:"",placeholder:e(l)("generated.skillSourceManagementPage.enterASkillNameOrDescription"),onKeyup:t[3]||(t[3]=We(a=>S(Me),["enter"])),"clear-icon":e(c)("clear-input")},{append:i(()=>[o(e(v),{icon:e(c)("search"),disabled:!E.value?.enabled||e(r).loading.value,onClick:t[1]||(t[1]=a=>S(Me))},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.search")),1)]),_:1},8,["icon","disabled"])]),_:1},8,["modelValue","placeholder","clear-icon"])]),p("div",ua,[U.value!=="idle"?(m(),M(e(de),{key:0,class:"clickable-rows source-skill-table",data:e(r).candidates.value,"aria-busy":U.value==="loading","row-key":"id",onRowClick:Ie},le({default:i(()=>[o(e(f),{prop:"name",label:e(l)("generated.skillSourceManagementPage.name"),"min-width":"180"},null,8,["label"]),o(e(f),{prop:"source",label:e(l)("generated.skillDetailsDialog.source"),"min-width":"180","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{prop:"description",label:e(l)("conversationTemplates.description"),"min-width":"280","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(a.description||e(l)("generated.skillSourceManagementPage.noDescriptionWasProvidedByThisSource")),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),width:180},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[4]||(t[4]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("plus"),disabled:!b.writable||e(r).loading.value,onClick:g=>Fe(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.addToCatalog")),1)]),_:1},8,["icon","disabled","onClick"])])]),_:1},8,["label"])]),_:2},[U.value==="loading"?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,ca)]),key:"0"}:void 0]),1032,["data","aria-busy"])):e(r).loading.value?D("",!0):(m(),C("div",ga,s(E.value?e(l)("generated.skillSourceManagementPage.noPopularSkillsAreAvailableEnterA"):e(l)("generated.skillSourceManagementPage.selectAnEnabledSkillSource2")),1))])]),_:1},8,["label"]),o(e(Ce),{label:e(l)("generated.skillSourceManagementPage.catalogSkills"),name:"catalog"},{default:i(()=>[p("div",ma,[o(e(Z),{modelValue:e(W),"onUpdate:modelValue":t[5]||(t[5]=a=>Ye(W)?W.value=a:null),class:"mar-management-filter__query",clearable:"",placeholder:e(l)("generated.skillSourceManagementPage.searchSkillNamesOrDescriptions"),"clear-icon":e(c)("clear-input")},null,8,["modelValue","placeholder","clear-icon"]),p("div",{class:"mar-management-category-strip",role:"group","aria-label":e(l)("generated.skillSourceManagementPage.catalogSkillCategories")},[o(e(Ve),{checked:e(G)==="",onClick:t[6]||(t[6]=a=>G.value="")},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.all")),1)]),_:1},8,["checked"]),(m(!0),C($,null,N(e(X),a=>(m(),M(e(Ve),{key:a,checked:e(G)===a,onClick:g=>G.value=a},{default:i(()=>[u(s(a),1)]),_:2},1032,["checked","onClick"]))),128))],8,fa)]),p("div",pa,[o(e(de),{class:"clickable-rows catalog-skill-table",onSortChange:e(d).sort,data:e(Ae),"aria-busy":pe.value,"row-key":"id",onRowClick:Be},le({default:i(()=>[o(e(f),{prop:"normalizedName",label:e(l)("generated.skillSourceManagementPage.name"),sortable:"custom","min-width":"170"},null,8,["label"]),o(e(f),{prop:"repositoryIdentity",label:e(l)("generated.skillDetailsDialog.source"),"min-width":"180","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.scope"),width:"144","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(H(a.scope)),1)]),_:1},8,["label"]),o(e(f),{prop:"description",label:e(l)("conversationTemplates.description"),"min-width":"260","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(a.description||e(l)("generated.skillSourceManagementPage.noDescriptionIsAvailableForThisSkill")),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillDetailsDialog.version"),"min-width":"170"},{default:i(({row:a})=>[p("span",null,s(a.commitSha.slice(0,8)),1),p("span",ka,s(e(l)("generated.skillSourceManagementPage.updated"))+" "+s(we(a.updatedAt)),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillDetailsDialog.tags"),"min-width":"150"},{default:i(({row:a})=>[a.featured||a.tags.length>0?(m(),C("div",Sa,[a.featured?(m(),M(e(se),{key:0,type:"warning",effect:"plain"},{default:i(()=>[u("★ "+s(e(l)("generated.skillSourceManagementPage.featured")),1)]),_:1})):D("",!0),(m(!0),C($,null,N(a.tags,g=>(m(),M(e(se),{key:g,type:"info",effect:"plain"},{default:i(()=>[u(s(g),1)]),_:2},1024))),128))])):D("",!0)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),"min-width":"360"},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[7]||(t[7]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("edit"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ee(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.edit")),1)]),_:1},8,["icon","disabled","onClick"]),R.value[a.id]?.updateAvailable?(m(),M(e(v),{key:1,link:"",icon:e(c)("retry"),loading:J.value===a.id,disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ke(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.updateTo"))+" "+s(R.value[a.id].latestCommitSha.slice(0,8)),1)]),_:2},1032,["icon","loading","disabled","onClick"])):(m(),M(e(v),{key:0,link:"",icon:e(c)("refresh"),loading:B.value.has(a.id),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>ze(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.checkForUpdates")),1)]),_:1},8,["icon","loading","disabled","onClick"])),o(e(v),{link:"",type:"danger",icon:e(c)("delete"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>He(a.id,a.normalizedName)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.remove2")),1)]),_:1},8,["icon","disabled","onClick"])])]),_:1},8,["label"])]),_:2},[pe.value?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,va)]),key:"0"}:void 0]),1032,["onSortChange","data","aria-busy"]),o(la,{total:e(d).total.value,page:e(d).page.value,mobile:e(d).mobileViewport.value,"mobile-visible-count":e(d).mobileVisibleCount.value,loading:e(d).loading.value,"loading-more":e(d).loadingMore.value,"has-more":e(d).hasMore.value,onPage:e(d).setPage,failed:e(d).failure.value!==void 0,"incremental-failed":e(d).failure.value?.incremental===!0,error:e(d).failure.value?.error,"context-key":e(d).contextKey.value,onRetry:e(d).retry,onLoadMore:e(d).loadMore},null,8,["total","page","mobile","mobile-visible-count","loading","loading-more","has-more","onPage","failed","incremental-failed","error","context-key","onRetry","onLoadMore"])])]),_:1},8,["label"])]),_:1},8,["modelValue"]),A.value?(m(),M(e(ne),{key:0,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:A.value,"onUpdate:modelValue":t[12]||(t[12]=a=>A.value=a),title:e(l)("generated.skillSourceManagementPage.addSkillSource2"),width:"min(520px, calc(100vw - 32px))"},{footer:i(()=>[o(e(v),{onClick:t[11]||(t[11]=a=>A.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel3")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:Re},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.add")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"sourceForm",ref:ve,model:{...b.sourceContext,...w},rules:{...b.ownershipRules,...Y.value},"label-position":"top"},{default:i(()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.name2"),prop:"name"},{default:i(()=>[o(e(Z),{modelValue:w.name,"onUpdate:modelValue":t[9]||(t[9]=a=>w.name=a),maxlength:"128"},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.repositoryURL"),prop:"locator"},{default:i(()=>[o(e(Z),{modelValue:w.locator,"onUpdate:modelValue":t[10]||(t[10]=a=>w.locator=a),placeholder:e(l)("generated.skillSourceManagementPage.httpsGithubComOrgRepoOrGit")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),p("p",ba,s(e(l)("generated.skillSourceManagementPage.gitRepositoriesUseTheServerProcessUser")),1),he(n.$slots,"source-ownership",{},()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.scope2")},{default:i(()=>[o(e(O),{"model-value":"PERSONAL","clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[o(e(q),{value:"PERSONAL",label:e(l)("generated.skillSourceManagementPage.personal2")},null,8,["label"])]),_:1},8,["clear-icon","suffix-icon"])]),_:1},8,["label"])],!0)]),_:3},8,["model","rules"])]),_:3},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),P.value?(m(),M(e(ne),{key:1,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:P.value,"onUpdate:modelValue":t[16]||(t[16]=a=>P.value=a),title:e(l)("generated.skillSourceManagementPage.addToCatalog2"),width:"min(460px, calc(100vw - 32px))"},{footer:i(()=>[o(e(v),{onClick:t[15]||(t[15]=a=>P.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel4")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:qe},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.add2")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"catalogForm",ref:ke,model:{...b.catalogContext,...h},rules:{...b.ownershipRules,...Y.value},"label-position":"top"},{default:i(()=>[he(n.$slots,"catalog-ownership",{},()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.availability")},{default:i(()=>[o(e(O),{"model-value":"PERSONAL","clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[o(e(q),{value:"PERSONAL",label:e(l)("generated.skillSourceManagementPage.personal3")},null,8,["label"])]),_:1},8,["clear-icon","suffix-icon"])]),_:1},8,["label"])],!0),o(e(V),{label:e(l)("generated.skillSourceManagementPage.featured2")},{default:i(()=>[o(e(_e),{modelValue:h.featured,"onUpdate:modelValue":t[13]||(t[13]=a=>h.featured=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.tags"),prop:"tags"},{default:i(()=>[o(e(O),{modelValue:h.tags,"onUpdate:modelValue":t[14]||(t[14]=a=>h.tags=a),multiple:"",filterable:"","allow-create":"","default-first-option":"","multiple-limit":10,placeholder:e(l)("generated.skillSourceManagementPage.enterATagAndPressEnterUp"),"clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[(m(!0),C($,null,N(e(X),a=>(m(),M(e(q),{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:3},8,["model","rules"])]),_:3},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),x.value?(m(),M(e(ne),{key:2,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:x.value,"onUpdate:modelValue":t[20]||(t[20]=a=>x.value=a),title:e(l)("generated.skillSourceManagementPage.editSkillInformation"),width:"min(460px, calc(100vw - 32px))","destroy-on-close":""},{footer:i(()=>[o(e(v),{onClick:t[19]||(t[19]=a=>x.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel5")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:$e},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.save")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"editForm",ref:Se,model:y,rules:Y.value,"label-position":"top"},{default:i(()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.featured3")},{default:i(()=>[o(e(_e),{modelValue:y.featured,"onUpdate:modelValue":t[17]||(t[17]=a=>y.featured=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.tags2"),prop:"tags"},{default:i(()=>[o(e(O),{modelValue:y.tags,"onUpdate:modelValue":t[18]||(t[18]=a=>y.tags=a),multiple:"",filterable:"","allow-create":"","default-first-option":"","multiple-limit":10,placeholder:e(l)("generated.skillSourceManagementPage.enterATagAndPressEnterUp2"),"clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[(m(!0),C($,null,N(e(X),a=>(m(),M(e(q),{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),o(oa,{modelValue:L.value,"onUpdate:modelValue":t[21]||(t[21]=a=>L.value=a),details:K.value},null,8,["modelValue","details"])]))}}),Ea=Xe(Ma,[["__scopeId","data-v-c11c9bf2"]]);export{Ea as default};
|
|
1
|
+
import{d as Ze,C as je,D as Je,w as Qe,N as I,t as l,o as m,b as C,E as p,g as o,q as i,H as u,F as s,u as e,s as c,I as v,J as le,K as te,p as M,v as D,a0 as $,a1 as N,G as Z,a2 as We,a6 as Ye,f as he,L as ne,a as k,c as oe,r as ie,O as re,_ as Xe}from"./index-4C9wiHpI.js";/* empty css */import{M as Ce,a as ea}from"./MarTabs-DE_aL9MQ.js";import{M as Ve}from"./MarCheckTag-BqGcYV8l.js";import{M as se}from"./MarTag-DhjH9N1h.js";import{_ as f,M as de}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js";import{a as ue,_ as V}from"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import{M as O,a as q}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js";import{M as _e}from"./MarSwitch-BeNZxYkW.js";import{M as ce,u as ge,m as me}from"./mobile-dialog-return-service-BoVFREoZ.js";import{w as aa,M as la}from"./ManagementPagination-QZqNLeLY.js";import{f as ta}from"./time-presentation-09Rjr2Gy.js";import{c as na,s as j,S as oa}from"./SkillDetailsDialog-0ZPGDBn5.js";import"./error-presentation-CSDznxvT.js";import"./catalog-page-service-RgFFn1Yl.js";/* empty css */import"./MarDescriptionsItem-BmPeYfY8.js";const ia={class:"mar-management-page"},ra={class:"mar-table-actions"},sa=["aria-label"],da={class:"mar-management-filter"},ua={class:"skill-table-section"},ca=["aria-label"],ga={key:1,class:"skill-empty"},ma={class:"mar-management-filter mar-management-filter--stacked"},fa=["aria-label"],pa={class:"skill-table-section"},va=["aria-label"],ka={class:"table-meta"},Sa={key:0,class:"skill-tags"},ba={class:"form-hint"},Ma=Ze({__name:"SkillSourceManagementPage",props:{request:{type:Function},writable:{type:Boolean},scopeLabel:{type:Function},loadExtension:{type:Function},sourceContext:{},catalogContext:{},ownershipRules:{},submitSource:{type:Function},submitFavorite:{type:Function}},emits:["openSource","openCatalog"],setup(b,{emit:Te}){const _=b,fe=Te,r=na(_.request,{..._.submitSource===void 0?{}:{submitSource:_.submitSource},..._.submitFavorite===void 0?{}:{submitFavorite:_.submitFavorite}}),De=r.sources,d=r.catalogPage;aa(d);const A=k(!1),P=k(!1),x=k(!1),L=k(!1),U=k("idle");let T=0;const pe=oe(()=>d.loading.value&&!d.loadingMore.value),B=k(new Set),J=k(),ve=k(),ke=k(),Se=k(),z=k(),Q=k(),K=k(),R=k({}),W=d.keyword,G=d.category,be=k("source"),w=ie({name:"",locator:""}),h=ie({featured:!1,tags:[]}),y=ie({featured:!1,tags:[]}),Y=oe(()=>({name:[{required:!0,message:l("generated.skillSourceManagementPage.enterASourceName"),trigger:"blur"}],locator:[{required:!0,message:l("generated.skillSourceManagementPage.enterARepositoryURL"),trigger:"blur"},{validator:(n,t,a)=>{const g=typeof t=="string"?t.trim():"";/^https:\/\//u.test(g)||/^git@[A-Za-z0-9.-]+:[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)+(?:\.git)?$/u.test(g)?a():a(new Error(l("generated.skillSourceManagementPage.enterAnHTTPSOrGitSSHRepository")))},trigger:"blur"}],tags:[{validator:(n,t,a)=>{const g=Array.isArray(t)?t.map(F=>String(F).trim()):[];g.some(F=>F.length===0||F.length>32)?a(new Error(l("generated.skillSourceManagementPage.eachTagMustContain132Characters"))):new Set(g.map(F=>F.toLocaleLowerCase())).size!==g.length?a(new Error(l("generated.skillSourceManagementPage.duplicateTagsAreNotAllowed"))):a()},trigger:"change"}]})),E=oe(()=>r.sources.value.find(n=>n.id===r.selectedSourceId.value)),X=d.tags,Ae=r.favorites;je(()=>{d.start(),xe()}),Je(()=>{T++,d.dispose()}),Qe(r.selectedSourceId,()=>{T++,U.value="idle",P.value=!1,z.value=void 0},{flush:"sync"});async function xe(){await Promise.all([S(async()=>{await r.loadSources(),await ee()}),S(r.loadCatalog),S(async()=>_.loadExtension?.())])}async function S(n,t){try{await n(),t!==void 0&&I(t,"success")}catch(a){if(a===d.error.value)return;I(j(a,l("generated.skillSourceManagementPage.theSkillSourceOperationDidNotComplete")),"error",a)}}function Ue(){Object.assign(w,{name:"",locator:""}),fe("openSource"),A.value=!0}async function Re(){await ve.value?.validate().catch(()=>!1)&&await S(async()=>{await r.addSource({name:w.name.trim(),locator:w.locator.trim()}),A.value=!1},l("generated.skillSourceManagementPage.skillSourceAdded"))}function Fe(n){z.value=n,Object.assign(h,{featured:!1,tags:[]}),fe("openCatalog"),P.value=!0}function Ie(n){K.value={name:n.name,description:n.description,source:n.source,...n.skillPath===null?{}:{path:n.skillPath},...n.installs===null?{}:{installs:n.installs}},L.value=!0}function Le(n){K.value={name:n.name,description:"",source:n.locator,scope:H(n.scope),status:n.enabled?l("generated.skillSourceManagementPage.enabled"):l("generated.skillSourceManagementPage.disabled")},L.value=!0}function Be(n){K.value={name:n.normalizedName,description:n.description,source:n.repositoryIdentity,scope:H(n.scope),path:n.skillPath,version:n.commitSha.slice(0,8),updatedAt:we(n.updatedAt),featured:n.featured,tags:n.tags},L.value=!0}function Ee(n){Q.value=n,y.featured=n.featured,y.tags=[...n.tags],x.value=!0}async function $e(){if(!await Se.value?.validate().catch(()=>!1)||Q.value===void 0)return;const n=y.tags.map(t=>t.trim());await S(async()=>{await r.updatePresentation(Q.value.id,{featured:y.featured,tags:n}),x.value=!1},l("generated.skillSourceManagementPage.skillInformationUpdated"))}async function Ne(n){r.selectedSourceId.value=n,r.query.value="",await S(ee)}async function ee(){await ye(r.loadCandidates,E.value?.kind==="REPOSITORY")}async function Me(){!E.value?.enabled||r.loading.value||await ye(r.search,E.value.kind!=="SKILLS_SH"||r.query.value.trim()!=="")}async function ye(n,t){const a=++T;U.value=t?"loading":"idle",r.candidates.value=[];try{await n()}catch(g){if(a===T)throw g}finally{t&&a===T&&(U.value="settled")}}async function Pe(n){const t=r.selectedSourceId.value;await n(),r.selectedSourceId.value!==t&&await ee()}async function Oe(n){try{await re.confirm(n.enabled?l("generated.skillSourceManagementPage.confirmDisableSkillSource",{value0:n.name}):l("generated.skillSourceManagementPage.confirmEnableSkillSource",{value0:n.name}),l("generated.skillSourceManagementPage.updateSkillSourceStatus"),{icon:c("warning"),type:"warning",confirmButtonText:n.enabled?l("generated.skillSourceManagementPage.disable"):l("generated.skillSourceManagementPage.enable"),cancelButtonText:l("generated.skillSourceManagementPage.cancel2")})}catch(t){if(ae(t))return;I(j(t,l("generated.skillSourceManagementPage.unableToConfirmSourceStatusChange")),"error",t);return}await S(()=>Pe(()=>r.setSourceEnabled(n.id,!n.enabled)),l("generated.skillSourceManagementPage.skillSourceStatusUpdated"))}async function qe(){const n=z.value,t=T;if(!n||r.loading.value||!r.candidates.value.includes(n)||!await ke.value?.validate().catch(()=>!1)||!P.value||r.loading.value||t!==T||n!==z.value)return;const a=h.tags.map(g=>g.trim());await S(async()=>{await r.favorite(n,{featured:h.featured,tags:a}),P.value=!1},l("generated.skillSourceManagementPage.skillAddedToTheCatalog"))}async function ze(n){B.value=new Set([...B.value,n.id]);try{await S(async()=>{const t=await r.checkUpdate(n.id);R.value={...R.value,[n.id]:t},I(t.updateAvailable?l("generated.skillSourceManagementPage.updateAvailable"):l("generated.skillSourceManagementPage.alreadyUpToDate"),"info")})}finally{const t=new Set(B.value);t.delete(n.id),B.value=t}}async function Ke(n){J.value=n.id;try{await S(async()=>{await r.upgrade(n.id);const t={...R.value};delete t[n.id],R.value=t},l("generated.skillSourceManagementPage.catalogSkillUpdated"))}finally{J.value=void 0}}function we(n){return ta(n)}async function Ge(n){try{await re.confirm(l("generated.skillSourceManagementPage.deleteSkillSource",{value0:n.name}),l("generated.skillSourceManagementPage.deleteSkillSource2"),{icon:c("warning"),type:"warning",confirmButtonText:l("generated.skillSourceManagementPage.delete"),cancelButtonText:l("generated.skillSourceManagementPage.cancel")})}catch(t){if(ae(t))return;I(j(t,l("generated.skillSourceManagementPage.unableToConfirmDeletionTryAgainLater")),"error",t);return}await S(()=>Pe(()=>r.removeSource(n.id)),l("generated.skillSourceManagementPage.skillSourceDeleted"))}async function He(n,t){try{await re.confirm(l("generated.skillSourceManagementPage.removeFromTheSkillCatalogInstalledCopies",{value0:t}),l("generated.skillSourceManagementPage.removeSkill"),{icon:c("warning"),type:"warning",confirmButtonText:l("generated.skillSourceManagementPage.remove"),cancelButtonText:l("generated.skillSourceManagementPage.cancel2")})}catch(a){if(ae(a))return;I(j(a,l("generated.skillSourceManagementPage.unableToConfirmRemovalTryAgainLater")),"error",a);return}await S(()=>r.remove(n),l("generated.skillSourceManagementPage.skillRemoved"))}function ae(n){return n==="cancel"||n==="close"}function H(n){return _.scopeLabel?.(n)??l("generated.skillSourceManagementPage.personal")}return(n,t)=>(m(),C("section",ia,[p("div",ra,[o(e(v),{type:"primary",icon:e(c)("plus"),disabled:!b.writable||e(r).loading.value,onClick:Ue},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.addSkillSource")),1)]),_:1},8,["icon","disabled"])]),o(e(de),{class:"clickable-rows skill-source-table",data:e(De),"aria-busy":e(r).sourcesLoading.value,"row-key":"id",onRowClick:Le},le({default:i(()=>[o(e(f),{prop:"name",label:e(l)("generated.skillSourceManagementPage.name"),sortable:"","min-width":"180"},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.scope"),width:"144","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(H(a.scope)),1)]),_:1},8,["label"]),o(e(f),{prop:"locator",label:e(l)("generated.skillSourceManagementPage.uRL"),"min-width":"280","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.status"),width:"110"},{default:i(({row:a})=>[o(e(se),{type:a.enabled?"success":"info",effect:"plain"},{default:i(()=>[u(s(a.enabled?e(l)("generated.skillSourceManagementPage.enabled"):e(l)("generated.skillSourceManagementPage.disabled")),1)]),_:2},1032,["type"])]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),width:180},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[0]||(t[0]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("power"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Oe(a)},{default:i(()=>[u(s(a.enabled?e(l)("generated.skillSourceManagementPage.disable"):e(l)("generated.skillSourceManagementPage.enable")),1)]),_:2},1032,["icon","disabled","onClick"]),a.builtIn?D("",!0):(m(),M(e(v),{key:0,link:"",type:"danger",icon:e(c)("delete"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ge(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.delete2")),1)]),_:1},8,["icon","disabled","onClick"]))])]),_:1},8,["label"])]),_:2},[e(r).sourcesLoading.value?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,sa)]),key:"0"}:void 0]),1032,["data","aria-busy"]),o(e(ea),{modelValue:be.value,"onUpdate:modelValue":t[8]||(t[8]=a=>be.value=a),class:"skill-management-tabs"},{default:i(()=>[o(e(Ce),{label:e(l)("generated.skillSourceManagementPage.sourceSkills"),name:"source"},{default:i(()=>[p("div",da,[o(e(O),{"model-value":e(r).selectedSourceId.value,class:"mar-management-filter__source","aria-label":e(l)("generated.skillSourceManagementPage.selectASkillSource"),placeholder:e(l)("generated.skillSourceManagementPage.selectAnEnabledSkillSource"),disabled:e(r).loading.value,onChange:Ne},{default:i(()=>[(m(!0),C($,null,N(e(r).sources.value.filter(a=>a.enabled),a=>(m(),M(e(q),{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["model-value","aria-label","placeholder","disabled"]),o(e(Z),{modelValue:e(r).query.value,"onUpdate:modelValue":t[2]||(t[2]=a=>e(r).query.value=a),class:"mar-management-filter__query",clearable:"",placeholder:e(l)("generated.skillSourceManagementPage.enterASkillNameOrDescription"),onKeyup:t[3]||(t[3]=We(a=>S(Me),["enter"])),"clear-icon":e(c)("clear-input")},{append:i(()=>[o(e(v),{icon:e(c)("search"),disabled:!E.value?.enabled||e(r).loading.value,onClick:t[1]||(t[1]=a=>S(Me))},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.search")),1)]),_:1},8,["icon","disabled"])]),_:1},8,["modelValue","placeholder","clear-icon"])]),p("div",ua,[U.value!=="idle"?(m(),M(e(de),{key:0,class:"clickable-rows source-skill-table",data:e(r).candidates.value,"aria-busy":U.value==="loading","row-key":"id",onRowClick:Ie},le({default:i(()=>[o(e(f),{prop:"name",label:e(l)("generated.skillSourceManagementPage.name"),"min-width":"180"},null,8,["label"]),o(e(f),{prop:"source",label:e(l)("generated.skillDetailsDialog.source"),"min-width":"180","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{prop:"description",label:e(l)("conversationTemplates.description"),"min-width":"280","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(a.description||e(l)("generated.skillSourceManagementPage.noDescriptionWasProvidedByThisSource")),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),width:180},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[4]||(t[4]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("plus"),disabled:!b.writable||e(r).loading.value,onClick:g=>Fe(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.addToCatalog")),1)]),_:1},8,["icon","disabled","onClick"])])]),_:1},8,["label"])]),_:2},[U.value==="loading"?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,ca)]),key:"0"}:void 0]),1032,["data","aria-busy"])):e(r).loading.value?D("",!0):(m(),C("div",ga,s(E.value?e(l)("generated.skillSourceManagementPage.noPopularSkillsAreAvailableEnterA"):e(l)("generated.skillSourceManagementPage.selectAnEnabledSkillSource2")),1))])]),_:1},8,["label"]),o(e(Ce),{label:e(l)("generated.skillSourceManagementPage.catalogSkills"),name:"catalog"},{default:i(()=>[p("div",ma,[o(e(Z),{modelValue:e(W),"onUpdate:modelValue":t[5]||(t[5]=a=>Ye(W)?W.value=a:null),class:"mar-management-filter__query",clearable:"",placeholder:e(l)("generated.skillSourceManagementPage.searchSkillNamesOrDescriptions"),"clear-icon":e(c)("clear-input")},null,8,["modelValue","placeholder","clear-icon"]),p("div",{class:"mar-management-category-strip",role:"group","aria-label":e(l)("generated.skillSourceManagementPage.catalogSkillCategories")},[o(e(Ve),{checked:e(G)==="",onClick:t[6]||(t[6]=a=>G.value="")},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.all")),1)]),_:1},8,["checked"]),(m(!0),C($,null,N(e(X),a=>(m(),M(e(Ve),{key:a,checked:e(G)===a,onClick:g=>G.value=a},{default:i(()=>[u(s(a),1)]),_:2},1032,["checked","onClick"]))),128))],8,fa)]),p("div",pa,[o(e(de),{class:"clickable-rows catalog-skill-table",onSortChange:e(d).sort,data:e(Ae),"aria-busy":pe.value,"row-key":"id",onRowClick:Be},le({default:i(()=>[o(e(f),{prop:"normalizedName",label:e(l)("generated.skillSourceManagementPage.name"),sortable:"custom","min-width":"170"},null,8,["label"]),o(e(f),{prop:"repositoryIdentity",label:e(l)("generated.skillDetailsDialog.source"),"min-width":"180","show-overflow-tooltip":""},null,8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.scope"),width:"144","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(H(a.scope)),1)]),_:1},8,["label"]),o(e(f),{prop:"description",label:e(l)("conversationTemplates.description"),"min-width":"260","show-overflow-tooltip":""},{default:i(({row:a})=>[u(s(a.description||e(l)("generated.skillSourceManagementPage.noDescriptionIsAvailableForThisSkill")),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillDetailsDialog.version"),"min-width":"170"},{default:i(({row:a})=>[p("span",null,s(a.commitSha.slice(0,8)),1),p("span",ka,s(e(l)("generated.skillSourceManagementPage.updated"))+" "+s(we(a.updatedAt)),1)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillDetailsDialog.tags"),"min-width":"150"},{default:i(({row:a})=>[a.featured||a.tags.length>0?(m(),C("div",Sa,[a.featured?(m(),M(e(se),{key:0,type:"warning",effect:"plain"},{default:i(()=>[u("★ "+s(e(l)("generated.skillSourceManagementPage.featured")),1)]),_:1})):D("",!0),(m(!0),C($,null,N(a.tags,g=>(m(),M(e(se),{key:g,type:"info",effect:"plain"},{default:i(()=>[u(s(g),1)]),_:2},1024))),128))])):D("",!0)]),_:1},8,["label"]),o(e(f),{label:e(l)("generated.skillSourceManagementPage.actions"),"min-width":"360"},{default:i(({row:a})=>[p("div",{class:"mar-row-actions",onClick:t[7]||(t[7]=te(()=>{},["stop"]))},[o(e(v),{link:"",icon:e(c)("edit"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ee(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.edit")),1)]),_:1},8,["icon","disabled","onClick"]),R.value[a.id]?.updateAvailable?(m(),M(e(v),{key:1,link:"",icon:e(c)("retry"),loading:J.value===a.id,disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>Ke(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.updateTo"))+" "+s(R.value[a.id].latestCommitSha.slice(0,8)),1)]),_:2},1032,["icon","loading","disabled","onClick"])):(m(),M(e(v),{key:0,link:"",icon:e(c)("refresh"),loading:B.value.has(a.id),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>ze(a)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.checkForUpdates")),1)]),_:1},8,["icon","loading","disabled","onClick"])),o(e(v),{link:"",type:"danger",icon:e(c)("delete"),disabled:!b.writable||!a.manageable||e(r).loading.value,onClick:g=>He(a.id,a.normalizedName)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.remove2")),1)]),_:1},8,["icon","disabled","onClick"])])]),_:1},8,["label"])]),_:2},[pe.value?{name:"loading",fn:i(()=>[p("span",{role:"progressbar","aria-label":e(l)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,va)]),key:"0"}:void 0]),1032,["onSortChange","data","aria-busy"]),o(la,{total:e(d).total.value,page:e(d).page.value,mobile:e(d).mobileViewport.value,"mobile-visible-count":e(d).mobileVisibleCount.value,loading:e(d).loading.value,"loading-more":e(d).loadingMore.value,"has-more":e(d).hasMore.value,onPage:e(d).setPage,failed:e(d).failure.value!==void 0,"incremental-failed":e(d).failure.value?.incremental===!0,error:e(d).failure.value?.error,"context-key":e(d).contextKey.value,onRetry:e(d).retry,onLoadMore:e(d).loadMore},null,8,["total","page","mobile","mobile-visible-count","loading","loading-more","has-more","onPage","failed","incremental-failed","error","context-key","onRetry","onLoadMore"])])]),_:1},8,["label"])]),_:1},8,["modelValue"]),A.value?(m(),M(e(ne),{key:0,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:A.value,"onUpdate:modelValue":t[12]||(t[12]=a=>A.value=a),title:e(l)("generated.skillSourceManagementPage.addSkillSource2"),width:"min(520px, calc(100vw - 32px))"},{footer:i(()=>[o(e(v),{onClick:t[11]||(t[11]=a=>A.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel3")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:Re},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.add")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"sourceForm",ref:ve,model:{...b.sourceContext,...w},rules:{...b.ownershipRules,...Y.value},"label-position":"top"},{default:i(()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.name2"),prop:"name"},{default:i(()=>[o(e(Z),{modelValue:w.name,"onUpdate:modelValue":t[9]||(t[9]=a=>w.name=a),maxlength:"128"},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.repositoryURL"),prop:"locator"},{default:i(()=>[o(e(Z),{modelValue:w.locator,"onUpdate:modelValue":t[10]||(t[10]=a=>w.locator=a),placeholder:e(l)("generated.skillSourceManagementPage.httpsGithubComOrgRepoOrGit")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),p("p",ba,s(e(l)("generated.skillSourceManagementPage.gitRepositoriesUseTheServerProcessUser")),1),he(n.$slots,"source-ownership",{},()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.scope2")},{default:i(()=>[o(e(O),{"model-value":"PERSONAL","clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[o(e(q),{value:"PERSONAL",label:e(l)("generated.skillSourceManagementPage.personal2")},null,8,["label"])]),_:1},8,["clear-icon","suffix-icon"])]),_:1},8,["label"])],!0)]),_:3},8,["model","rules"])]),_:3},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),P.value?(m(),M(e(ne),{key:1,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:P.value,"onUpdate:modelValue":t[16]||(t[16]=a=>P.value=a),title:e(l)("generated.skillSourceManagementPage.addToCatalog2"),width:"min(460px, calc(100vw - 32px))"},{footer:i(()=>[o(e(v),{onClick:t[15]||(t[15]=a=>P.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel4")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:qe},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.add2")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"catalogForm",ref:ke,model:{...b.catalogContext,...h},rules:{...b.ownershipRules,...Y.value},"label-position":"top"},{default:i(()=>[he(n.$slots,"catalog-ownership",{},()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.availability")},{default:i(()=>[o(e(O),{"model-value":"PERSONAL","clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[o(e(q),{value:"PERSONAL",label:e(l)("generated.skillSourceManagementPage.personal3")},null,8,["label"])]),_:1},8,["clear-icon","suffix-icon"])]),_:1},8,["label"])],!0),o(e(V),{label:e(l)("generated.skillSourceManagementPage.featured2")},{default:i(()=>[o(e(_e),{modelValue:h.featured,"onUpdate:modelValue":t[13]||(t[13]=a=>h.featured=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.tags"),prop:"tags"},{default:i(()=>[o(e(O),{modelValue:h.tags,"onUpdate:modelValue":t[14]||(t[14]=a=>h.tags=a),multiple:"",filterable:"","allow-create":"","default-first-option":"","multiple-limit":10,placeholder:e(l)("generated.skillSourceManagementPage.enterATagAndPressEnterUp"),"clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[(m(!0),C($,null,N(e(X),a=>(m(),M(e(q),{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:3},8,["model","rules"])]),_:3},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),x.value?(m(),M(e(ne),{key:2,onVnodeMounted:e(me),onVnodeBeforeUnmount:e(ge),modelValue:x.value,"onUpdate:modelValue":t[20]||(t[20]=a=>x.value=a),title:e(l)("generated.skillSourceManagementPage.editSkillInformation"),width:"min(460px, calc(100vw - 32px))","destroy-on-close":""},{footer:i(()=>[o(e(v),{onClick:t[19]||(t[19]=a=>x.value=!1)},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.cancel5")),1)]),_:1}),o(e(v),{type:"primary",loading:e(r).loading.value,onClick:$e},{default:i(()=>[u(s(e(l)("generated.skillSourceManagementPage.save")),1)]),_:1},8,["loading"])]),default:i(()=>[o(e(ue),{ref_key:"editForm",ref:Se,model:y,rules:Y.value,"label-position":"top"},{default:i(()=>[o(e(V),{label:e(l)("generated.skillSourceManagementPage.featured3")},{default:i(()=>[o(e(_e),{modelValue:y.featured,"onUpdate:modelValue":t[17]||(t[17]=a=>y.featured=a)},null,8,["modelValue"])]),_:1},8,["label"]),o(e(V),{label:e(l)("generated.skillSourceManagementPage.tags2"),prop:"tags"},{default:i(()=>[o(e(O),{modelValue:y.tags,"onUpdate:modelValue":t[18]||(t[18]=a=>y.tags=a),multiple:"",filterable:"","allow-create":"","default-first-option":"","multiple-limit":10,placeholder:e(l)("generated.skillSourceManagementPage.enterATagAndPressEnterUp2"),"clear-icon":e(c)("clear-input"),"suffix-icon":e(c)("chevron-down")},{default:i(()=>[(m(!0),C($,null,N(e(X),a=>(m(),M(e(q),{key:a,label:a,value:a},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):D("",!0),o(oa,{modelValue:L.value,"onUpdate:modelValue":t[21]||(t[21]=a=>L.value=a),details:K.value},null,8,["modelValue","details"])]))}}),Ea=Xe(Ma,[["__scopeId","data-v-c11c9bf2"]]);export{Ea as default};
|
package/web/assets/{SkillSourceManagementPage-CafESWLm.js → SkillSourceManagementPage-DP06NeQM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as P}from"./MarCascader-
|
|
1
|
+
import{M as P}from"./MarCascader-DXamgewd.js";import{_ as b}from"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import{M as z,a as S}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js";import{d as h,o as m,p as d,q as n,g as r,u as e,t as o,s as g,v as f,c as w}from"./index-4C9wiHpI.js";import y from"./SkillSourceManagementPage-BbFYNud9.js";import{c as R}from"./catalog-ownership-service-BQMtgZLb.js";/* empty css */import"./MarTabs-DE_aL9MQ.js";import"./MarCheckTag-BqGcYV8l.js";import"./MarTag-DhjH9N1h.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js";import"./MarSwitch-BeNZxYkW.js";import"./mobile-dialog-return-service-BoVFREoZ.js";import"./ManagementPagination-QZqNLeLY.js";import"./error-presentation-CSDznxvT.js";import"./time-presentation-09Rjr2Gy.js";import"./SkillDetailsDialog-0ZPGDBn5.js";import"./catalog-page-service-RgFFn1Yl.js";/* empty css */import"./MarDescriptionsItem-BmPeYfY8.js";import"./enterprise-management-service-B_yURuGw.js";function V(c){return{submitFavorite:(l,a)=>c("/api/skill-favorites",{method:"POST",body:JSON.stringify({...l,scope:a?.scope??"PERSONAL",...a?.scope==="ORGANIZATION"&&a.organizationId!==void 0?{organizationId:a.organizationId}:{}})}),submitSource:(l,a)=>c("/api/skill-sources",{method:"POST",body:JSON.stringify({kind:"REPOSITORY",enabled:!0,...l,scope:a?.scope??"PERSONAL",...a?.organizationId===void 0?{}:{organizationId:a.organizationId}})})}}const X=h({__name:"SkillSourceManagementPage",props:{request:{type:Function},edition:{},role:{},writable:{type:Boolean}},setup(c){const l=c,a=R(l.request,()=>l),{sourceDraft:u,catalogDraft:p,organizationOptions:O,canUseOrganizationScope:I}=a,M=w(()=>({organizationId:[{required:!0,message:o("generated.skillSourceManagementPage.selectAnOrganization"),trigger:"change"}]}));function N(i){return i==="ENTERPRISE"?o("generated.skillSourceManagementPage.enterprise"):i==="ORGANIZATION"?o("generated.skillSourceManagementPage.organization"):o("generated.skillSourceManagementPage.personal")}const k=V(l.request),A=i=>k.submitSource(i,a.sourceTarget()),v=i=>k.submitFavorite(i,a.catalogTarget());return(i,t)=>(m(),d(y,{request:c.request,writable:c.writable,"scope-label":N,"load-extension":e(a).load,"source-context":e(u),"catalog-context":e(p),"ownership-rules":M.value,"submit-source":A,"submit-favorite":v,onOpenSource:e(a).resetSource,onOpenCatalog:e(a).resetCatalog},{"source-ownership":n(()=>[r(e(b),{label:e(o)("generated.skillSourceManagementPage.scope2"),prop:"scope"},{default:n(()=>[r(e(z),{modelValue:e(u).scope,"onUpdate:modelValue":t[0]||(t[0]=s=>e(u).scope=s),"clear-icon":e(g)("clear-input"),"suffix-icon":e(g)("chevron-down")},{default:n(()=>[r(e(S),{label:e(o)("generated.skillSourceManagementPage.personal2"),value:"PERSONAL"},null,8,["label"]),e(I)?(m(),d(e(S),{key:0,label:e(o)("generated.skillSourceManagementPage.organization2"),value:"ORGANIZATION"},null,8,["label"])):f("",!0)]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"]),e(u).scope==="ORGANIZATION"?(m(),d(e(b),{key:0,label:e(o)("generated.skillSourceManagementPage.organization3"),prop:"organizationId"},{default:n(()=>[r(e(P),{modelValue:e(u).organizationId,"onUpdate:modelValue":t[1]||(t[1]=s=>e(u).organizationId=s),style:{width:"100%"},filterable:"",placeholder:e(o)("generated.skillSourceManagementPage.selectAManageableOrganization"),options:e(O),props:{checkStrictly:!0,emitPath:!1},"clear-icon":e(g)("clear-input")},null,8,["modelValue","placeholder","options","clear-icon"])]),_:1},8,["label"])):f("",!0)]),"catalog-ownership":n(()=>[r(e(b),{label:e(o)("generated.skillSourceManagementPage.availability"),prop:"scope"},{default:n(()=>[r(e(z),{modelValue:e(p).scope,"onUpdate:modelValue":t[2]||(t[2]=s=>e(p).scope=s),"clear-icon":e(g)("clear-input"),"suffix-icon":e(g)("chevron-down")},{default:n(()=>[r(e(S),{label:e(o)("generated.skillSourceManagementPage.personal3"),value:"PERSONAL"},null,8,["label"]),e(I)?(m(),d(e(S),{key:0,label:e(o)("generated.skillSourceManagementPage.organizationMembers"),value:"ORGANIZATION"},null,8,["label"])):f("",!0)]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"]),e(p).scope==="ORGANIZATION"?(m(),d(e(b),{key:0,label:e(o)("generated.skillSourceManagementPage.organization4"),prop:"organizationId"},{default:n(()=>[r(e(P),{modelValue:e(p).organizationId,"onUpdate:modelValue":t[3]||(t[3]=s=>e(p).organizationId=s),style:{width:"100%"},filterable:"",placeholder:e(o)("generated.skillSourceManagementPage.selectAManageableOrganization2"),options:e(O),props:{checkStrictly:!0,emitPath:!1},"clear-icon":e(g)("clear-input")},null,8,["modelValue","placeholder","options","clear-icon"])]),_:1},8,["label"])):f("",!0)]),_:1},8,["request","writable","load-extension","source-context","catalog-context","ownership-rules","onOpenSource","onOpenCatalog"]))}});export{X as default};
|
package/web/assets/{StandaloneFilePreviewPage-DuQlNWsY.js → StandaloneFilePreviewPage-DdHUS1Ce.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as Me,w as dt,o as g,b as S,p as H,v as U,a0 as te,a1 as ct,a3 as ye,c as J,X as ut,_ as $e,b1 as vt,a as N,n as ft,C as wt,P as pt,Q as gt,u as w,E as ee,b2 as mt,F as j,R as Oe,H as Fe,g as Ce,W as ht,q as yt,t as pe,O as It,s as kt}from"./index-C4CEAMsJ.js";import{d as bt,r as Pt,a as Tt,b as St,c as Et,m as _t,e as ge,u as De,f as Le,g as Nt,h as Rt,W as At,i as Ot,j as Ft,w as Ct,k as Dt,l as Lt}from"./scoped-http-service-CpPFUTeO.js";import{c as xt}from"./session-share-client-service-BBj9YqiT.js";import{F as Ve,a as Ut,d as Be,M as Wt,b as zt,i as xe,e as me,u as Mt,f as Ue,h as We,j as he}from"./FilePreviewState-Clkl0yHR.js";import{f as ze}from"./error-presentation-B65PEVVV.js";import{_ as $t}from"./MarkdownFilePreview.vue_vue_type_script_setup_true_lang-YOia8O9x.js";import{c as Vt}from"./workbench-live-service-ChTXppOO.js";import{c as Bt}from"./workspace-direct-transfer-service-FvEIWjko.js";import{f as jt}from"./file-presentation-Cm7tx53N.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-CQSbg3t1.js";import"./MarSwitch-DHIp9da4.js";import"./mobile-dialog-return-service-BVo1UeW9.js";import"./MarTabs-Diwa_YPK.js";const Ht="/assets/github-markdown-light-DWnTz46N.css",qt={class:"html-preview-body"},Kt=["src","title","inert","onLoad"],Jt=Me({__name:"HtmlPreviewFrame",props:{url:{},loading:{type:Boolean},title:{},retainOnReload:{type:Boolean}},emits:["load"],setup(c,{expose:_,emit:y}){const h=c,C=y,e=ye(),r=ye(),b=J(()=>[e.value,r.value].filter(k=>k!==void 0)),W=J(()=>r.value!==void 0);let M=0;dt(()=>h.url,k=>{h.retainOnReload||(e.value=void 0),r.value=k?{id:M++,url:k}:void 0},{immediate:!0});function I(k,E){if(E.target instanceof HTMLIFrameElement){if(k===r.value)e.value=k,r.value=void 0;else if(k!==e.value)return;C("load",E.target)}}return _({rendering:W}),(k,E)=>(g(),S("div",qt,[!e.value&&(c.loading||W.value)?(g(),H(Ve,{key:0,variant:"page",overlay:""})):U("",!0),(g(!0),S(te,null,ct(b.value,P=>(g(),S("iframe",{key:P.id,class:ut(["html-preview-frame",{"is-pending":P===r.value,"is-buffered":e.value&&P===r.value}]),src:P.url,title:c.title,inert:P===r.value,sandbox:"allow-scripts allow-same-origin",referrerpolicy:"no-referrer",onLoad:$=>I(P,$)},null,42,Kt))),128))]))}}),Yt=$e(Jt,[["__scopeId","data-v-9f4fdb5c"]]);function Xt(c){const _=ye({loading:!1});let y;function h(){y?.abort(),y=void 0,_.value={loading:!1}}async function C(e){y?.abort();const r=new AbortController;y=r,_.value={loading:!0};try{const b=await c.request("/api/html-preview/grants",{method:"POST",body:JSON.stringify(e),signal:r.signal});y===r&&(_.value={loading:!1,url:b.url})}catch(b){y===r&&(_.value={loading:!1,error:b})}}return{state:_,open:C,release:h}}const Gt=800;function Qt(c){function _(a){return{kind:"WORKSPACE_FILE",workspaceId:c.workspaceId,path:a,...c.repositoryPath===void 0?{}:{repositoryPath:c.repositoryPath},...c.worktreePath===void 0?{}:{worktreePath:c.worktreePath}}}const y=new AbortController,h=()=>!y.signal.aborted,{http:C}=c;let e,r=0,b;const W=new Promise(a=>{b=a}),M=c.fileStreams===void 0?setTimeout(()=>b?.(!1),Gt):void 0,I=Bt({send:a=>k.sendDirect(a),onTransportReady:a=>{E.directReady(a)},shouldRetryProbe:(a,d)=>h()&&a===c.nodeId&&d===e}),k=Vt({canConnect:h,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(a,d)=>{a===c.nodeId&&!d&&I.invalidateNode(a)},onNodeReplaced:a=>I.invalidateNode(a),onReconnect:()=>{},onDisconnected:()=>I.invalidateControlConnection(),onReady:(a,d)=>{d||I.invalidateNetwork(),$()},onDirectMessage:a=>I.handle(a),onUnauthenticated:()=>D(!1),onInvalidMessage:()=>{}}),E=Be({http:C,isNodeActive:h,async connectDirect(a,d){(e===void 0||!I.isConnected(a,e))&&await W,d.throwIfAborted();const p=e;if(p===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");const v=I.acquireTerminalTransport(a,p);if(v===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");try{const f=v.streamPath;if(f===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");return{get closed(){return f.closed},close:v.release,openStream:(m,F)=>m.kind==="file-upload"||m.kind==="file-download"?I.openFileStream(a,p,m.descriptor,F):Promise.resolve(void 0)}}catch(f){throw v.release(),f}}}),P=c.fileStreams??Ut(E.openRoutedStream);async function $(){const a=++r;try{const d=await fetch(`/api/nodes/${encodeURIComponent(c.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!d.ok)throw new Error("DIRECT_UNAVAILABLE");const v=(await d.json()).manifest;if(!h()||a!==r)return;if(v?.directTransfer?.apiVersion!==3||v.directTransfer.transport!==!0||v.directTransfer.download!==!0||typeof v.nodeGeneration!="string"){D(!1);return}e=v.nodeGeneration;const f=await I.ensureTransport(c.nodeId,e);h()&&a===r&&D(f==="DIRECT_AVAILABLE")}catch{h()&&a===r&&D(!1)}}function D(a){clearTimeout(M),b?.(a),b=void 0}async function V(a,d,p,v){const f=_(a);return Pt({resource:f,fileName:a.split("/").at(-1)??"file",offset:d,length:p,...v===void 0?{}:{identity:v},signal:y.signal,metadata:()=>L(f)},m=>P.download({...m,nodeId:c.nodeId}))}async function R(a){const d=_(a),p=await L(d);if(p.size>Wt)return{...p,url:void 0};const v=y.signal,f=a.split("/").at(-1)??"file";return{url:await Tt(f,v,F=>P.download({nodeId:c.nodeId,descriptor:{direction:"DOWNLOAD",resource:d,fileName:f,...p},sink:F,signal:v})),...p}}async function L(a){const d=y.signal;d.throwIfAborted();const p=await St({request:C.request,nodeId:c.nodeId,resource:a,signal:d});if(d.throwIfAborted(),p===void 0)throw new Error("NODE_RESPONSE_INVALID");return p}async function Y(a){const d=y.signal,p=_(a),v=await L(p),f=a.split("/").at(-1)??"download";return bt({fileName:f,size:v.size,...c.activeDownloadWorker===void 0?{}:{activeWorker:c.activeDownloadWorker},download:(m,F)=>P.download({nodeId:c.nodeId,descriptor:{direction:"DOWNLOAD",resource:p,fileName:f,...v},sink:m,signal:F===void 0?d:AbortSignal.any([d,F])})})}function O(){I.invalidateNetwork()}function i(){y.abort(),D(!1),E.reset(),I.invalidateNetwork(),k.close()}return c.fileStreams===void 0&&k.connect(),{objectUrl:R,readRange:V,download:Y,networkChanged:O,close:i}}const Zt=["href"],en={key:0,class:"standalone-error"},tn={class:"standalone-markdown-header html-preview-header"},nn={class:"standalone-markdown-header"},on={key:0},an={class:"standalone-preview-body"},rn={key:1,class:"markdown-preview-page"},sn={key:0,class:"standalone-error",role:"alert"},ln={key:1,class:"standalone-error"},dn=Me({__name:"StandaloneFilePreviewPage",props:{quoteTarget:{},share:{}},emits:["close"],setup(c,{emit:_}){const y=vt(),h=c,C=_,e=new URLSearchParams(h.share?.intent??location.search),r=h.share?.access;if(r!==void 0){const n=r.session.value.share;e.set("nodeId",n.nodeId),e.set("workspaceId",n.workspaceId),e.delete("write"),e.delete("source"),e.delete("worktreePath"),e.delete("repositoryPath")}const b={...e.has("repositoryPath")?{repositoryPath:e.get("repositoryPath")}:{},...e.has("worktreePath")?{worktreePath:e.get("worktreePath")}:{}},W=r===void 0?void 0:xt(r,r.session.value.share),M=zt(void 0,r===void 0?"workbench":`share:${r.session.value.share.id}`),I=!e.has("repositoryPath")&&e.get("markdownPreview")==="1",k=!e.has("repositoryPath")&&e.get("htmlPreview")==="1",E=I||k,P=e.get("source")==="hosted",$=r===void 0?"":`:share:${r.session.value.share.id}`,D="mar.standalone-file-tabs.v1"+$,V="mar.standalone-file-drafts.v1"+$,R=N([]),L=N(),Y=N(),O=N(Je()),i=N(),a=N(),d=N(""),p=N(),v=N(),f=N(),m=N(!0),F=N(!1),Ie=N(r===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),ke=r===void 0&&e.get("write")==="1"&&Object.keys(b).length===0&&!ft(e.get("path")??""),q=W??Lt({csrfToken:()=>Ie.value,renewCsrfToken:nt}),ne=new AbortController,oe=P&&r===void 0?Be({http:q}):void 0,B=oe===void 0?void 0:Et({http:q,openStream:oe.openStream,activeWorker:y.activeWorker}),ae=Xt(q),X=ae.state,G=J(()=>X.value.error!==void 0?ze(X.value.error,e.get("path")??""):d.value===""?"":pe(d.value)),re=_t().preference,je=J(()=>({backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="360" height="240"><defs><pattern id="watermark" width="360" height="240" patternUnits="userSpaceOnUse" patternTransform="rotate(-30)"><text x="0" y="120" fill="#000" fill-opacity=".12" font-family="serif" font-size="22">${rt(re.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),He=Number(e.get("line"))||void 0,qe=Number(e.get("column"))||void 0,ie=J(()=>i.value===void 0?"unsupported":Ue(i.value.path,i.value.encoding));let se,le;function de(){const n=e.get("nodeId"),t=e.get("workspaceId");if(n===null||t===null)throw new Error("NODE_CONNECTION_UNAVAILABLE");return se??=Qt({nodeId:n,workspaceId:t,activeDownloadWorker:y.activeWorker,...r!==void 0&&{fileStreams:r.fileStreams},http:q,...b})}function Ke(){if(E)return;const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;let l=[];try{const T=h.share?.embedded?[]:JSON.parse(sessionStorage.getItem(D)??"[]");Array.isArray(T)&&(l=T.filter(Ye))}catch{l=[]}const u={kind:me(o,e.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:n,workspaceId:t,path:o,repositoryPath:e.get("repositoryPath")??"",worktreePath:e.get("worktreePath")??"",...e.has("repositoryPath")?{gitFile:!0}:{},...Number(e.get("line"))>0?{targetLine:Number(e.get("line"))}:{},...Number(e.get("column"))>0?{targetColumn:Number(e.get("column"))}:{}},x=Ct(u),z=l.find(T=>T.identity===x),A=z===void 0?{...u,id:Math.max(0,...l.map(T=>T.id))+1,identity:x,fileName:Dt(o),url:location.href}:{...z,...u,url:location.href};R.value=[...l.filter(T=>T.identity!==x),A].slice(-20),L.value=A.id,ce()}function Je(){try{const n=JSON.parse(sessionStorage.getItem(V)??"[]");return Array.isArray(n)?n.filter(be):[]}catch{return[]}}function Ye(n){if(typeof n!="object"||n===null)return!1;const t=n;if(!Number.isSafeInteger(t.id)||t.kind!=="WORKTREE_TEXT"&&t.kind!=="WORKTREE_PREVIEW"||typeof t.identity!="string"||typeof t.nodeId!="string"||typeof t.workspaceId!="string"||typeof t.path!="string"||typeof t.fileName!="string"||typeof t.url!="string")return!1;try{const o=new URL(t.url,location.href);return o.origin===location.origin&&o.pathname===location.pathname&&o.searchParams.get("standaloneFile")==="1"&&o.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function be(n){if(typeof n!="object"||n===null)return!1;const t=n;return typeof t.tabIdentity=="string"&&typeof t.path=="string"&&typeof t.content=="string"&&typeof t.expectedRevision=="string"}function ce(){!E&&!h.share?.embedded&&sessionStorage.setItem(D,JSON.stringify(R.value))}function Xe(n){const t=R.value.find(o=>o.id===n);t===void 0||n===L.value||(ue(),location.replace(t.url))}function Ge(n){const t=R.value.findIndex(u=>u.id===n);if(t<0)return;const o=R.value.filter(u=>u.id!==n),l=R.value[t];if(R.value=o,Pe(l.identity),ce(),o.length===0){ve();return}if(n!==L.value)return;const s=o[Math.min(t,o.length-1)];s!==void 0&&location.replace(s.url)}function ue(){const n=Y.value?.captureDirtyDrafts().filter(be)??[];if(n.length===0)return;const t=new Set(n.map(o=>o.tabIdentity));O.value=[...O.value.filter(o=>!t.has(o.tabIdentity)),...n],sessionStorage.setItem(V,JSON.stringify(O.value))}async function Qe(n){const t=R.value.find(o=>o.id===n);if(t===void 0||!O.value.some(o=>o.tabIdentity===t.identity))return!0;try{return await It.confirm(pe("fileEditor.unsavedMessage"),pe("fileEditor.unsavedTitle"),{icon:kt("warning"),type:"warning"}),!0}catch{return!1}}function Ze(){R.value=[],O.value=[],ce(),sessionStorage.removeItem(V),ve()}function Pe(n){O.value=O.value.filter(t=>t.tabIdentity!==n),sessionStorage.setItem(V,JSON.stringify(O.value))}Ke(),wt(async()=>{E?fe.mount():window.addEventListener("mar-before-standalone-navigation",ue),window.addEventListener("online",Q),window.addEventListener("offline",Q);const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null){d.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(k){m.value=!0,!P&&xe(o)&&Object.keys(b).length===0?await ae.open({nodeId:n,workspaceId:t,path:o}):d.value="htmlPreview.unavailable",m.value=!1;return}await et()});async function et(){const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;m.value=!0,d.value="",le=void 0,f.value!==void 0&&ge(f.value),f.value=void 0;const l=me(o);if(i.value={path:o,encoding:l?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},v.value=void 0,P){await tt(n,o);return}try{if(De(o)){v.value=Re(n,t,o);return}if(Mt(o)){const u=await Te(o);i.value={path:o,size:u.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:u.revision};return}const s=await Le(u=>at(o,u));if(s.encoding==="base64"){if(f.value!==void 0&&ge(f.value),i.value={...s,content:"",truncated:!1,nextOffset:null},Ue(o,"base64")==="unsupported")return;await Te(o)}else i.value={...s,truncated:s.nextOffset!==null,nextOffset:s.nextOffset}}catch{d.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{m.value=!1}}async function Te(n){const t=await de().objectUrl(n);return f.value=v.value=t.url,t}async function tt(n,t){const o=e.get("conversationId"),l=e.get("fileId"),s=e.get("mimeType")??"",u=Number(e.get("size"));if(o===null||e.get("workspaceId")!==o||l===null||!Number.isSafeInteger(u)||u<0){d.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",m.value=!1;return}const x=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(o)}/files/${encodeURIComponent(l)}/content`,z=me(t,s);if(i.value={path:t,size:u,encoding:z?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},De(t)){v.value=x,m.value=!1;return}try{if(B===void 0)throw new Error("NODE_CONNECTION_UNAVAILABLE");const A=ne.signal,T=await B.describe({nodeId:n,conversationId:o,fileId:l},A);A.throwIfAborted();const Ae=`${T.updatedAt}-${T.size}`;if(!z){i.value={...i.value,size:T.size,revision:Ae},f.value=await B.objectUrl(n,T,A),v.value=f.value;return}i.value=await Le(async lt=>{const K=await B.readRange(n,T,0,lt,A),Z=T.size,we=We(K,t,K.byteLength>=Z,s);return{path:t,size:Z,revision:Ae,...we,truncated:we.encoding==="utf-8"&&K.byteLength<Z,nextOffset:we.encoding==="utf-8"&&K.byteLength<Z?K.byteLength:null}})}catch{d.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{m.value=!1}}async function nt(){const n=await fetch("/api/auth/csrf",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:"{}"});if(!n.ok)throw new Error("CSRF_INVALID");const t=await n.json();if(typeof t.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return Ie.value=t.csrfToken,sessionStorage.setItem("mar.user.csrf-token",t.csrfToken),t.csrfToken}async function ot(n,t){const o=e.get("nodeId"),l=e.get("workspaceId"),s=e.get("path");if(o===null||l===null||s===null||i.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const u=await q.request(`/api/workspaces/${encodeURIComponent(l)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:o,path:s,content:n,expectedRevision:t})});if(typeof u.file?.revision!="string"||typeof u.file.size!="number"||!Number.isSafeInteger(u.file.size)||u.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return i.value!==void 0&&(i.value={...i.value,content:n,revision:u.file.revision,size:u.file.size}),u.file.revision}pt(()=>{ne.abort(),oe?.reset(),ae.release(),E?fe.dispose():window.removeEventListener("mar-before-standalone-navigation",ue),window.removeEventListener("online",Q),window.removeEventListener("offline",Q),se?.close(),f.value!==void 0&&ge(f.value)});async function Se(){if(i.value!==void 0){p.value=void 0,F.value=!0;try{const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;if(P){const l=e.get("conversationId"),s=e.get("fileId");if(l===null||s===null)return;if(B===void 0)throw new Error("NODE_CONNECTION_UNAVAILABLE");await B.download({nodeId:n,conversationId:l,fileId:s},ne.signal);return}await de().download(o)}catch(n){n instanceof DOMException&&n.name==="AbortError"||(p.value=n)}finally{F.value=!1}}}function Q(){se?.networkChanged()}async function at(n,t){const o=await de().readRange(n,0,t,le);le={revision:o.revision,size:o.size};const l=We(o.bytes,n,o.nextOffset===null),s=ke&&l.encoding==="utf-8"&&l.previewEncoding===void 0?await Nt(o):void 0;return{path:n,size:o.size,...l,truncated:o.nextOffset!==null,nextOffset:o.nextOffset,...s===void 0?{}:{revision:s}}}function rt(n){return n.replace(/[&<>]/g,t=>t==="&"?"&":t==="<"?"<":">")}function ve(){if(h.share?.embedded){C("close");return}window.close()}function Ee(){return ve(),!0}const fe=Rt({isOpen:()=>E,closeWindow:Ee,closeTab:Ee});function it(n){fe.bindFrame(n)}function _e(n){const t=e.get("nodeId"),o=e.get("workspaceId");return t===null||o===null?"":Re(t,o,n)}function Ne(n){const t=e.get("nodeId"),o=e.get("workspaceId");if(t===null||o===null)return;const l=new URLSearchParams({standaloneFile:"1",...he(n)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:t,workspaceId:o,path:n}),s=`${r===void 0?"/console":"/share/"+encodeURIComponent(r.session.value.share.id)}?${l.toString()}`;r!==void 0?M.open(s):location.assign(s)}function st(n){const t=e.get("nodeId"),o=e.get("workspaceId");if(t===null||o===null)return;const l=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:t,workspaceId:o,path:n});M.open(`${r===void 0?"/console":"/share/"+encodeURIComponent(r.session.value.share.id)}?${l.toString()}`)===void 0&&(d.value="htmlPreview.unavailable")}function Re(n,t,o){const l=new URLSearchParams({nodeId:n,path:o,...b}),s=`/api/workspaces/${encodeURIComponent(t)}/files/content?${l.toString()}`;return W?.resourceUrl(s)??s}return(n,t)=>{const o=gt("tooltip");return g(),S(te,null,[w(I)?(g(),H(mt,{key:0,to:"head"},[ee("link",{rel:"stylesheet",href:w(Ht)},null,8,Zt)])):U("",!0),w(E)?(g(),S("main",{key:1,ref_key:"standaloneRoot",ref:a,class:"standalone-file-preview"},[G.value?(g(),S("p",en,j(G.value),1)):w(k)?(g(),S(te,{key:1},[ee("header",tn,[Oe((g(),S("code",null,[Fe(j(w(e).get("path")),1)])),[[o,w(e).get("path")??""]])]),Ce(Yt,{class:"standalone-html-preview-body",url:w(X).url,loading:m.value||w(X).loading,title:w(e).get("path")??"",onLoad:it},null,8,["url","loading","title"])],64)):w(I)?(g(),S(te,{key:2},[ee("header",nn,[Oe((g(),S("code",null,[Fe(j(w(e).get("path")??i.value?.path),1)])),[[o,w(e).get("path")??i.value?.path??""]]),i.value?.size!==void 0?(g(),S("small",on,j(w(jt)(i.value.size??0)),1)):U("",!0)]),ee("div",an,[m.value?(g(),H(Ve,{key:0,variant:"page",overlay:""})):i.value&&w(he)(i.value.path)?(g(),S("main",rn,[Ce($t,{content:i.value.content,path:i.value.path,"resource-url":_e,"standard-style":"",onOpenFile:Ne},null,8,["content","path"]),w(re).watermarkEnabled&&w(re).watermarkText?(g(),S("div",{key:0,class:"markdown-watermark",style:ht(je.value),"aria-hidden":"true"},null,4)):U("",!0)])):U("",!0)])],64)):U("",!0)],512)):(g(),H(Ft,{key:2,ref_key:"standaloneFileTabs",ref:Y,presentation:h.share?.embedded?"overlay":"window",tabs:R.value,"active-tab-id":L.value,"can-close-unmounted-tab":Qe,onActivate:Xe,onClose:Ge,onCloseAll:Ze},{default:yt(({tab:l,active:s,registerPageHandle:u,requestClose:x,requestCloseAll:z})=>[s&&p.value?(g(),S("p",sn,j(w(ze)(p.value,i.value?.path??"")),1)):U("",!0),s&&G.value?(g(),S("p",ln,j(G.value),1)):s&&i.value&&ie.value==="text"?(g(),H(At,{key:2,"quote-target":h.quoteTarget,ref:u,active:s,file:i.value,kind:ie.value,loading:m.value,downloading:F.value,"target-line":w(He),"target-column":w(qe),"write-enabled":w(ke),html:w(xe)(i.value.path)&&Object.keys(b).length===0,markdown:!w(e).has("repositoryPath")&&w(he)(i.value.path),"markdown-resource-url":_e,"save-file":ot,"tab-identity":l.identity,"initial-dirty-draft":O.value.find(A=>A.tabIdentity===l.identity&&A.path===l.path),onClose:x,onQuoted:z,onDownload:Se,onOpenHtmlPreview:t[0]||(t[0]=A=>st(i.value.path)),onOpenMarkdownPreview:t[1]||(t[1]=A=>Ne(i.value.path)),onDirtyDraftApplied:Pe},null,8,["quote-target","active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose","onQuoted"])):s&&i.value?(g(),H(Ot,{key:3,ref:u,active:s,file:i.value,"content-url":v.value,kind:ie.value,loading:m.value,downloading:F.value,onClose:x,onDownload:Se},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):U("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),Tn=$e(dn,[["__scopeId","data-v-c51fd37a"]]);export{Tn as default};
|
|
1
|
+
import{d as Me,w as dt,o as g,b as S,p as H,v as U,a0 as te,a1 as ct,a3 as ye,c as J,X as ut,_ as $e,b1 as vt,a as N,n as ft,C as wt,P as pt,Q as gt,u as w,E as ee,b2 as mt,F as j,R as Oe,H as Fe,g as Ce,W as ht,q as yt,t as pe,O as It,s as kt}from"./index-4C9wiHpI.js";import{d as bt,r as Pt,a as Tt,b as St,c as Et,m as _t,e as ge,u as De,f as Le,g as Nt,h as Rt,W as At,i as Ot,j as Ft,w as Ct,k as Dt,l as Lt}from"./scoped-http-service-BDZJVSvp.js";import{c as xt}from"./session-share-client-service-DUO0hyog.js";import{F as Ve,a as Ut,d as Be,M as Wt,b as zt,i as xe,e as me,u as Mt,f as Ue,h as We,j as he}from"./FilePreviewState-BUcDrqrj.js";import{f as ze}from"./error-presentation-CSDznxvT.js";import{_ as $t}from"./MarkdownFilePreview.vue_vue_type_script_setup_true_lang-BDzqPFUj.js";import{c as Vt}from"./workbench-live-service-vga8VA4K.js";import{c as Bt}from"./workspace-direct-transfer-service-BqVxkJdU.js";import{f as jt}from"./file-presentation-Cm7tx53N.js";import"./uuid-BmNSYLtZ.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import"./MarSwitch-BeNZxYkW.js";import"./mobile-dialog-return-service-BoVFREoZ.js";import"./MarTabs-DE_aL9MQ.js";const Ht="/assets/github-markdown-light-DWnTz46N.css",qt={class:"html-preview-body"},Kt=["src","title","inert","onLoad"],Jt=Me({__name:"HtmlPreviewFrame",props:{url:{},loading:{type:Boolean},title:{},retainOnReload:{type:Boolean}},emits:["load"],setup(c,{expose:_,emit:y}){const h=c,C=y,e=ye(),r=ye(),b=J(()=>[e.value,r.value].filter(k=>k!==void 0)),W=J(()=>r.value!==void 0);let M=0;dt(()=>h.url,k=>{h.retainOnReload||(e.value=void 0),r.value=k?{id:M++,url:k}:void 0},{immediate:!0});function I(k,E){if(E.target instanceof HTMLIFrameElement){if(k===r.value)e.value=k,r.value=void 0;else if(k!==e.value)return;C("load",E.target)}}return _({rendering:W}),(k,E)=>(g(),S("div",qt,[!e.value&&(c.loading||W.value)?(g(),H(Ve,{key:0,variant:"page",overlay:""})):U("",!0),(g(!0),S(te,null,ct(b.value,P=>(g(),S("iframe",{key:P.id,class:ut(["html-preview-frame",{"is-pending":P===r.value,"is-buffered":e.value&&P===r.value}]),src:P.url,title:c.title,inert:P===r.value,sandbox:"allow-scripts allow-same-origin",referrerpolicy:"no-referrer",onLoad:$=>I(P,$)},null,42,Kt))),128))]))}}),Yt=$e(Jt,[["__scopeId","data-v-9f4fdb5c"]]);function Xt(c){const _=ye({loading:!1});let y;function h(){y?.abort(),y=void 0,_.value={loading:!1}}async function C(e){y?.abort();const r=new AbortController;y=r,_.value={loading:!0};try{const b=await c.request("/api/html-preview/grants",{method:"POST",body:JSON.stringify(e),signal:r.signal});y===r&&(_.value={loading:!1,url:b.url})}catch(b){y===r&&(_.value={loading:!1,error:b})}}return{state:_,open:C,release:h}}const Gt=800;function Qt(c){function _(a){return{kind:"WORKSPACE_FILE",workspaceId:c.workspaceId,path:a,...c.repositoryPath===void 0?{}:{repositoryPath:c.repositoryPath},...c.worktreePath===void 0?{}:{worktreePath:c.worktreePath}}}const y=new AbortController,h=()=>!y.signal.aborted,{http:C}=c;let e,r=0,b;const W=new Promise(a=>{b=a}),M=c.fileStreams===void 0?setTimeout(()=>b?.(!1),Gt):void 0,I=Bt({send:a=>k.sendDirect(a),onTransportReady:a=>{E.directReady(a)},shouldRetryProbe:(a,d)=>h()&&a===c.nodeId&&d===e}),k=Vt({canConnect:h,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(a,d)=>{a===c.nodeId&&!d&&I.invalidateNode(a)},onNodeReplaced:a=>I.invalidateNode(a),onReconnect:()=>{},onDisconnected:()=>I.invalidateControlConnection(),onReady:(a,d)=>{d||I.invalidateNetwork(),$()},onDirectMessage:a=>I.handle(a),onUnauthenticated:()=>D(!1),onInvalidMessage:()=>{}}),E=Be({http:C,isNodeActive:h,async connectDirect(a,d){(e===void 0||!I.isConnected(a,e))&&await W,d.throwIfAborted();const p=e;if(p===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");const v=I.acquireTerminalTransport(a,p);if(v===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");try{const f=v.streamPath;if(f===void 0)throw new Error("NODE_DIRECT_UNAVAILABLE");return{get closed(){return f.closed},close:v.release,openStream:(m,F)=>m.kind==="file-upload"||m.kind==="file-download"?I.openFileStream(a,p,m.descriptor,F):Promise.resolve(void 0)}}catch(f){throw v.release(),f}}}),P=c.fileStreams??Ut(E.openRoutedStream);async function $(){const a=++r;try{const d=await fetch(`/api/nodes/${encodeURIComponent(c.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!d.ok)throw new Error("DIRECT_UNAVAILABLE");const v=(await d.json()).manifest;if(!h()||a!==r)return;if(v?.directTransfer?.apiVersion!==3||v.directTransfer.transport!==!0||v.directTransfer.download!==!0||typeof v.nodeGeneration!="string"){D(!1);return}e=v.nodeGeneration;const f=await I.ensureTransport(c.nodeId,e);h()&&a===r&&D(f==="DIRECT_AVAILABLE")}catch{h()&&a===r&&D(!1)}}function D(a){clearTimeout(M),b?.(a),b=void 0}async function V(a,d,p,v){const f=_(a);return Pt({resource:f,fileName:a.split("/").at(-1)??"file",offset:d,length:p,...v===void 0?{}:{identity:v},signal:y.signal,metadata:()=>L(f)},m=>P.download({...m,nodeId:c.nodeId}))}async function R(a){const d=_(a),p=await L(d);if(p.size>Wt)return{...p,url:void 0};const v=y.signal,f=a.split("/").at(-1)??"file";return{url:await Tt(f,v,F=>P.download({nodeId:c.nodeId,descriptor:{direction:"DOWNLOAD",resource:d,fileName:f,...p},sink:F,signal:v})),...p}}async function L(a){const d=y.signal;d.throwIfAborted();const p=await St({request:C.request,nodeId:c.nodeId,resource:a,signal:d});if(d.throwIfAborted(),p===void 0)throw new Error("NODE_RESPONSE_INVALID");return p}async function Y(a){const d=y.signal,p=_(a),v=await L(p),f=a.split("/").at(-1)??"download";return bt({fileName:f,size:v.size,...c.activeDownloadWorker===void 0?{}:{activeWorker:c.activeDownloadWorker},download:(m,F)=>P.download({nodeId:c.nodeId,descriptor:{direction:"DOWNLOAD",resource:p,fileName:f,...v},sink:m,signal:F===void 0?d:AbortSignal.any([d,F])})})}function O(){I.invalidateNetwork()}function i(){y.abort(),D(!1),E.reset(),I.invalidateNetwork(),k.close()}return c.fileStreams===void 0&&k.connect(),{objectUrl:R,readRange:V,download:Y,networkChanged:O,close:i}}const Zt=["href"],en={key:0,class:"standalone-error"},tn={class:"standalone-markdown-header html-preview-header"},nn={class:"standalone-markdown-header"},on={key:0},an={class:"standalone-preview-body"},rn={key:1,class:"markdown-preview-page"},sn={key:0,class:"standalone-error",role:"alert"},ln={key:1,class:"standalone-error"},dn=Me({__name:"StandaloneFilePreviewPage",props:{quoteTarget:{},share:{}},emits:["close"],setup(c,{emit:_}){const y=vt(),h=c,C=_,e=new URLSearchParams(h.share?.intent??location.search),r=h.share?.access;if(r!==void 0){const n=r.session.value.share;e.set("nodeId",n.nodeId),e.set("workspaceId",n.workspaceId),e.delete("write"),e.delete("source"),e.delete("worktreePath"),e.delete("repositoryPath")}const b={...e.has("repositoryPath")?{repositoryPath:e.get("repositoryPath")}:{},...e.has("worktreePath")?{worktreePath:e.get("worktreePath")}:{}},W=r===void 0?void 0:xt(r,r.session.value.share),M=zt(void 0,r===void 0?"workbench":`share:${r.session.value.share.id}`),I=!e.has("repositoryPath")&&e.get("markdownPreview")==="1",k=!e.has("repositoryPath")&&e.get("htmlPreview")==="1",E=I||k,P=e.get("source")==="hosted",$=r===void 0?"":`:share:${r.session.value.share.id}`,D="mar.standalone-file-tabs.v1"+$,V="mar.standalone-file-drafts.v1"+$,R=N([]),L=N(),Y=N(),O=N(Je()),i=N(),a=N(),d=N(""),p=N(),v=N(),f=N(),m=N(!0),F=N(!1),Ie=N(r===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),ke=r===void 0&&e.get("write")==="1"&&Object.keys(b).length===0&&!ft(e.get("path")??""),q=W??Lt({csrfToken:()=>Ie.value,renewCsrfToken:nt}),ne=new AbortController,oe=P&&r===void 0?Be({http:q}):void 0,B=oe===void 0?void 0:Et({http:q,openStream:oe.openStream,activeWorker:y.activeWorker}),ae=Xt(q),X=ae.state,G=J(()=>X.value.error!==void 0?ze(X.value.error,e.get("path")??""):d.value===""?"":pe(d.value)),re=_t().preference,je=J(()=>({backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="360" height="240"><defs><pattern id="watermark" width="360" height="240" patternUnits="userSpaceOnUse" patternTransform="rotate(-30)"><text x="0" y="120" fill="#000" fill-opacity=".12" font-family="serif" font-size="22">${rt(re.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),He=Number(e.get("line"))||void 0,qe=Number(e.get("column"))||void 0,ie=J(()=>i.value===void 0?"unsupported":Ue(i.value.path,i.value.encoding));let se,le;function de(){const n=e.get("nodeId"),t=e.get("workspaceId");if(n===null||t===null)throw new Error("NODE_CONNECTION_UNAVAILABLE");return se??=Qt({nodeId:n,workspaceId:t,activeDownloadWorker:y.activeWorker,...r!==void 0&&{fileStreams:r.fileStreams},http:q,...b})}function Ke(){if(E)return;const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;let l=[];try{const T=h.share?.embedded?[]:JSON.parse(sessionStorage.getItem(D)??"[]");Array.isArray(T)&&(l=T.filter(Ye))}catch{l=[]}const u={kind:me(o,e.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:n,workspaceId:t,path:o,repositoryPath:e.get("repositoryPath")??"",worktreePath:e.get("worktreePath")??"",...e.has("repositoryPath")?{gitFile:!0}:{},...Number(e.get("line"))>0?{targetLine:Number(e.get("line"))}:{},...Number(e.get("column"))>0?{targetColumn:Number(e.get("column"))}:{}},x=Ct(u),z=l.find(T=>T.identity===x),A=z===void 0?{...u,id:Math.max(0,...l.map(T=>T.id))+1,identity:x,fileName:Dt(o),url:location.href}:{...z,...u,url:location.href};R.value=[...l.filter(T=>T.identity!==x),A].slice(-20),L.value=A.id,ce()}function Je(){try{const n=JSON.parse(sessionStorage.getItem(V)??"[]");return Array.isArray(n)?n.filter(be):[]}catch{return[]}}function Ye(n){if(typeof n!="object"||n===null)return!1;const t=n;if(!Number.isSafeInteger(t.id)||t.kind!=="WORKTREE_TEXT"&&t.kind!=="WORKTREE_PREVIEW"||typeof t.identity!="string"||typeof t.nodeId!="string"||typeof t.workspaceId!="string"||typeof t.path!="string"||typeof t.fileName!="string"||typeof t.url!="string")return!1;try{const o=new URL(t.url,location.href);return o.origin===location.origin&&o.pathname===location.pathname&&o.searchParams.get("standaloneFile")==="1"&&o.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function be(n){if(typeof n!="object"||n===null)return!1;const t=n;return typeof t.tabIdentity=="string"&&typeof t.path=="string"&&typeof t.content=="string"&&typeof t.expectedRevision=="string"}function ce(){!E&&!h.share?.embedded&&sessionStorage.setItem(D,JSON.stringify(R.value))}function Xe(n){const t=R.value.find(o=>o.id===n);t===void 0||n===L.value||(ue(),location.replace(t.url))}function Ge(n){const t=R.value.findIndex(u=>u.id===n);if(t<0)return;const o=R.value.filter(u=>u.id!==n),l=R.value[t];if(R.value=o,Pe(l.identity),ce(),o.length===0){ve();return}if(n!==L.value)return;const s=o[Math.min(t,o.length-1)];s!==void 0&&location.replace(s.url)}function ue(){const n=Y.value?.captureDirtyDrafts().filter(be)??[];if(n.length===0)return;const t=new Set(n.map(o=>o.tabIdentity));O.value=[...O.value.filter(o=>!t.has(o.tabIdentity)),...n],sessionStorage.setItem(V,JSON.stringify(O.value))}async function Qe(n){const t=R.value.find(o=>o.id===n);if(t===void 0||!O.value.some(o=>o.tabIdentity===t.identity))return!0;try{return await It.confirm(pe("fileEditor.unsavedMessage"),pe("fileEditor.unsavedTitle"),{icon:kt("warning"),type:"warning"}),!0}catch{return!1}}function Ze(){R.value=[],O.value=[],ce(),sessionStorage.removeItem(V),ve()}function Pe(n){O.value=O.value.filter(t=>t.tabIdentity!==n),sessionStorage.setItem(V,JSON.stringify(O.value))}Ke(),wt(async()=>{E?fe.mount():window.addEventListener("mar-before-standalone-navigation",ue),window.addEventListener("online",Q),window.addEventListener("offline",Q);const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null){d.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(k){m.value=!0,!P&&xe(o)&&Object.keys(b).length===0?await ae.open({nodeId:n,workspaceId:t,path:o}):d.value="htmlPreview.unavailable",m.value=!1;return}await et()});async function et(){const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;m.value=!0,d.value="",le=void 0,f.value!==void 0&&ge(f.value),f.value=void 0;const l=me(o);if(i.value={path:o,encoding:l?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},v.value=void 0,P){await tt(n,o);return}try{if(De(o)){v.value=Re(n,t,o);return}if(Mt(o)){const u=await Te(o);i.value={path:o,size:u.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:u.revision};return}const s=await Le(u=>at(o,u));if(s.encoding==="base64"){if(f.value!==void 0&&ge(f.value),i.value={...s,content:"",truncated:!1,nextOffset:null},Ue(o,"base64")==="unsupported")return;await Te(o)}else i.value={...s,truncated:s.nextOffset!==null,nextOffset:s.nextOffset}}catch{d.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{m.value=!1}}async function Te(n){const t=await de().objectUrl(n);return f.value=v.value=t.url,t}async function tt(n,t){const o=e.get("conversationId"),l=e.get("fileId"),s=e.get("mimeType")??"",u=Number(e.get("size"));if(o===null||e.get("workspaceId")!==o||l===null||!Number.isSafeInteger(u)||u<0){d.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",m.value=!1;return}const x=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(o)}/files/${encodeURIComponent(l)}/content`,z=me(t,s);if(i.value={path:t,size:u,encoding:z?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},De(t)){v.value=x,m.value=!1;return}try{if(B===void 0)throw new Error("NODE_CONNECTION_UNAVAILABLE");const A=ne.signal,T=await B.describe({nodeId:n,conversationId:o,fileId:l},A);A.throwIfAborted();const Ae=`${T.updatedAt}-${T.size}`;if(!z){i.value={...i.value,size:T.size,revision:Ae},f.value=await B.objectUrl(n,T,A),v.value=f.value;return}i.value=await Le(async lt=>{const K=await B.readRange(n,T,0,lt,A),Z=T.size,we=We(K,t,K.byteLength>=Z,s);return{path:t,size:Z,revision:Ae,...we,truncated:we.encoding==="utf-8"&&K.byteLength<Z,nextOffset:we.encoding==="utf-8"&&K.byteLength<Z?K.byteLength:null}})}catch{d.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{m.value=!1}}async function nt(){const n=await fetch("/api/auth/csrf",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:"{}"});if(!n.ok)throw new Error("CSRF_INVALID");const t=await n.json();if(typeof t.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return Ie.value=t.csrfToken,sessionStorage.setItem("mar.user.csrf-token",t.csrfToken),t.csrfToken}async function ot(n,t){const o=e.get("nodeId"),l=e.get("workspaceId"),s=e.get("path");if(o===null||l===null||s===null||i.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const u=await q.request(`/api/workspaces/${encodeURIComponent(l)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:o,path:s,content:n,expectedRevision:t})});if(typeof u.file?.revision!="string"||typeof u.file.size!="number"||!Number.isSafeInteger(u.file.size)||u.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return i.value!==void 0&&(i.value={...i.value,content:n,revision:u.file.revision,size:u.file.size}),u.file.revision}pt(()=>{ne.abort(),oe?.reset(),ae.release(),E?fe.dispose():window.removeEventListener("mar-before-standalone-navigation",ue),window.removeEventListener("online",Q),window.removeEventListener("offline",Q),se?.close(),f.value!==void 0&&ge(f.value)});async function Se(){if(i.value!==void 0){p.value=void 0,F.value=!0;try{const n=e.get("nodeId"),t=e.get("workspaceId"),o=e.get("path");if(n===null||t===null||o===null)return;if(P){const l=e.get("conversationId"),s=e.get("fileId");if(l===null||s===null)return;if(B===void 0)throw new Error("NODE_CONNECTION_UNAVAILABLE");await B.download({nodeId:n,conversationId:l,fileId:s},ne.signal);return}await de().download(o)}catch(n){n instanceof DOMException&&n.name==="AbortError"||(p.value=n)}finally{F.value=!1}}}function Q(){se?.networkChanged()}async function at(n,t){const o=await de().readRange(n,0,t,le);le={revision:o.revision,size:o.size};const l=We(o.bytes,n,o.nextOffset===null),s=ke&&l.encoding==="utf-8"&&l.previewEncoding===void 0?await Nt(o):void 0;return{path:n,size:o.size,...l,truncated:o.nextOffset!==null,nextOffset:o.nextOffset,...s===void 0?{}:{revision:s}}}function rt(n){return n.replace(/[&<>]/g,t=>t==="&"?"&":t==="<"?"<":">")}function ve(){if(h.share?.embedded){C("close");return}window.close()}function Ee(){return ve(),!0}const fe=Rt({isOpen:()=>E,closeWindow:Ee,closeTab:Ee});function it(n){fe.bindFrame(n)}function _e(n){const t=e.get("nodeId"),o=e.get("workspaceId");return t===null||o===null?"":Re(t,o,n)}function Ne(n){const t=e.get("nodeId"),o=e.get("workspaceId");if(t===null||o===null)return;const l=new URLSearchParams({standaloneFile:"1",...he(n)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:t,workspaceId:o,path:n}),s=`${r===void 0?"/console":"/share/"+encodeURIComponent(r.session.value.share.id)}?${l.toString()}`;r!==void 0?M.open(s):location.assign(s)}function st(n){const t=e.get("nodeId"),o=e.get("workspaceId");if(t===null||o===null)return;const l=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:t,workspaceId:o,path:n});M.open(`${r===void 0?"/console":"/share/"+encodeURIComponent(r.session.value.share.id)}?${l.toString()}`)===void 0&&(d.value="htmlPreview.unavailable")}function Re(n,t,o){const l=new URLSearchParams({nodeId:n,path:o,...b}),s=`/api/workspaces/${encodeURIComponent(t)}/files/content?${l.toString()}`;return W?.resourceUrl(s)??s}return(n,t)=>{const o=gt("tooltip");return g(),S(te,null,[w(I)?(g(),H(mt,{key:0,to:"head"},[ee("link",{rel:"stylesheet",href:w(Ht)},null,8,Zt)])):U("",!0),w(E)?(g(),S("main",{key:1,ref_key:"standaloneRoot",ref:a,class:"standalone-file-preview"},[G.value?(g(),S("p",en,j(G.value),1)):w(k)?(g(),S(te,{key:1},[ee("header",tn,[Oe((g(),S("code",null,[Fe(j(w(e).get("path")),1)])),[[o,w(e).get("path")??""]])]),Ce(Yt,{class:"standalone-html-preview-body",url:w(X).url,loading:m.value||w(X).loading,title:w(e).get("path")??"",onLoad:it},null,8,["url","loading","title"])],64)):w(I)?(g(),S(te,{key:2},[ee("header",nn,[Oe((g(),S("code",null,[Fe(j(w(e).get("path")??i.value?.path),1)])),[[o,w(e).get("path")??i.value?.path??""]]),i.value?.size!==void 0?(g(),S("small",on,j(w(jt)(i.value.size??0)),1)):U("",!0)]),ee("div",an,[m.value?(g(),H(Ve,{key:0,variant:"page",overlay:""})):i.value&&w(he)(i.value.path)?(g(),S("main",rn,[Ce($t,{content:i.value.content,path:i.value.path,"resource-url":_e,"standard-style":"",onOpenFile:Ne},null,8,["content","path"]),w(re).watermarkEnabled&&w(re).watermarkText?(g(),S("div",{key:0,class:"markdown-watermark",style:ht(je.value),"aria-hidden":"true"},null,4)):U("",!0)])):U("",!0)])],64)):U("",!0)],512)):(g(),H(Ft,{key:2,ref_key:"standaloneFileTabs",ref:Y,presentation:h.share?.embedded?"overlay":"window",tabs:R.value,"active-tab-id":L.value,"can-close-unmounted-tab":Qe,onActivate:Xe,onClose:Ge,onCloseAll:Ze},{default:yt(({tab:l,active:s,registerPageHandle:u,requestClose:x,requestCloseAll:z})=>[s&&p.value?(g(),S("p",sn,j(w(ze)(p.value,i.value?.path??"")),1)):U("",!0),s&&G.value?(g(),S("p",ln,j(G.value),1)):s&&i.value&&ie.value==="text"?(g(),H(At,{key:2,"quote-target":h.quoteTarget,ref:u,active:s,file:i.value,kind:ie.value,loading:m.value,downloading:F.value,"target-line":w(He),"target-column":w(qe),"write-enabled":w(ke),html:w(xe)(i.value.path)&&Object.keys(b).length===0,markdown:!w(e).has("repositoryPath")&&w(he)(i.value.path),"markdown-resource-url":_e,"save-file":ot,"tab-identity":l.identity,"initial-dirty-draft":O.value.find(A=>A.tabIdentity===l.identity&&A.path===l.path),onClose:x,onQuoted:z,onDownload:Se,onOpenHtmlPreview:t[0]||(t[0]=A=>st(i.value.path)),onOpenMarkdownPreview:t[1]||(t[1]=A=>Ne(i.value.path)),onDirtyDraftApplied:Pe},null,8,["quote-target","active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose","onQuoted"])):s&&i.value?(g(),H(Ot,{key:3,ref:u,active:s,file:i.value,"content-url":v.value,kind:ie.value,loading:m.value,downloading:F.value,onClose:x,onDownload:Se},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):U("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),Tn=$e(dn,[["__scopeId","data-v-c51fd37a"]]);export{Tn as default};
|
package/web/assets/{SystemConfigurationPage-By65U7gD.js → SystemConfigurationPage-CHdWfQ5h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import i from"./SystemConfigurationPage-
|
|
1
|
+
import i from"./SystemConfigurationPage-C_VNNuOY.js";import{d as r,o as n,p as o}from"./index-4C9wiHpI.js";import"./mobile-dialog-return-service-BoVFREoZ.js";import"./MarAlert-NkwuJEOq.js";import"./MarInputNumber-C0IEcJYI.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js";import"./MarSwitch-BeNZxYkW.js";import"./conversation-history-Cpu8lv-7.js";import"./error-presentation-CSDznxvT.js";const P=r({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean}},setup(e){const t=[{key:"audit-retention",field:"auditRetentionDays",payloadField:"days",initialValue:180,nameKey:"generated.systemConfigurationPage.auditRetentionDays",descriptionKey:"generated.systemConfigurationPage.theServerRemovesExpiredEventsInBatches",type:"number",min:1,max:3650,placeholderKey:"generated.systemConfigurationPage.enterRetentionDays"}];return(a,s)=>(n(),o(i,{request:e.request,writable:e.writable,settings:t},null,8,["request","writable"]))}});export{P as default};
|
package/web/assets/{SystemConfigurationPage-V6JcipwA.js → SystemConfigurationPage-C_VNNuOY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as W,m as X,M as ce}from"./mobile-dialog-return-service-BVo1UeW9.js";import{a as C,d as de,t as a,o as c,b as T,a0 as Z,g as o,q as s,H as S,F as p,u as e,s as E,I as U,p as I,L as Y,R as ne,S as oe,E as P,a1 as ie,X as fe,v as R,G as j,c as J,N as A,_ as me,w as ye,C as ve,J as be,$ as se,r as Ce,O as he}from"./index-C4CEAMsJ.js";import{M as Pe}from"./MarAlert-B7jXXAw_.js";import{M as re}from"./MarInputNumber-D2a1XmM_.js";import{_ as H,M as _e}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-BkNDBOi9.js";import{_ as $,a as Q}from"./MarFormItem.vue_vue_type_script_setup_true_lang-CQSbg3t1.js";import{M as ge,a as ee}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-BliELde5.js";import{M as ue}from"./MarSwitch-DHIp9da4.js";import"./conversation-history-C5iSVaBv.js";import{e as G}from"./error-presentation-B65PEVVV.js";const we={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},Ve={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},ke={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function Te(k,M=[]){const u=[...M,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},Ve,ke,we],_=new Map(u.map(i=>[i.key,i]));if(_.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=C(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),y=C({...w.value}),g=C(null),V=C(null),v=C(!1);function d(i){w.value=i,y.value={...i}}async function x(){if(!(v.value||V.value!==null)){v.value=!0;try{d(await k("/api/system-settings")),g.value=null}finally{v.value=!1}}}function N(i){!_.has(i)||v.value||V.value!==null||g.value!==null||(y.value={...w.value},g.value=i)}function O(i){g.value!==i||V.value!==null||(y.value={...w.value},g.value=null)}function D(i,n){if(i.type==="json"){if(typeof n!="string"||n.length>4096)return!1;try{const f=JSON.parse(n);return f!==null&&typeof f=="object"&&!Array.isArray(f)}catch{return!1}}if(i.type==="origin"){if(n==="")return!0;if(typeof n!="string"||n.length>253)return!1;try{const f=new URL(n);return f.origin===n&&(f.protocol==="https:"||f.protocol==="http:")}catch{return!1}}return i.type==="boolean"?typeof n=="boolean":typeof n=="number"&&Number.isFinite(n)&&n>=i.min&&n<=i.max}function K(i,n){const f=_.get(i);f===void 0||g.value!==i||V.value!==null||!(f.type==="origin"||f.type==="json"?typeof n=="string"&&n.length<=(f.type==="json"?4096:253):D(f,n))||(y.value[f.field]=n)}async function F(i){const n=_.get(i);if(n===void 0||g.value!==i||V.value!==null||v.value)return!1;const f=y.value[n.field];if(!D(n,f))return!1;V.value=i;try{return d(await k(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[n.payloadField]:f})})),g.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:y,editingKey:g,savingKey:V,loading:v,load:x,beginEdit:N,cancelEdit:O,validValue:D,setDraft:K,save:F}}function Se(k){const M=C([]),u=C(!1),_=C(!1);async function w(){if(!u.value){u.value=!0;try{M.value=await k("/api/mail/templates")}finally{u.value=!1}}}async function y(V,v){return k("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:v})})}async function g(V,v){_.value=!0;try{await k("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:v})})}finally{_.value=!1}}return{templates:M,loading:u,busy:_,load:w,preview:y,test:g}}const Me={class:"template-viewer"},Ue={class:"template-description"},xe={key:0,class:"template-layout"},$e=["aria-label"],Ee=["aria-pressed","onClick"],Ie={class:"template-choice__meta"},Ne={class:"template-choice__name"},Oe={class:"template-choice__subject"},De={key:0,class:"template-preview"},Ke={class:"template-preview__header"},Fe={class:"template-preview__locale"},Be=["srcdoc","title"],Ae={key:1,class:"template-preview__fallback"},je={key:1,class:"template-empty"},Re=de({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(k){const M=k,u=Se(M.request),_=C(!1),w=C(""),y=J(()=>u.templates.value.find(b=>b.id===w.value)),g=C(),V=C(!1);let v=0;const d=C(!1),x=C(),N=C(""),O=C(""),D=J(()=>u.templates.value.filter(b=>b.kind==="TEST")),K=J(()=>({email:N.value,templateId:O.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?G(b):a("generated.systemConfigurationPage.mailOperationFailed")}async function n(){_.value=!0,v+=1,w.value="",g.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await q()}catch(b){A(i(b),"error",b)}}function f(b){w.value=b.id,g.value=void 0,q()}async function q(){const b=y.value;if(b===void 0||!_.value)return;const h=++v;V.value=!0;try{const m=await u.preview(b,a("generated.systemConfigurationPage.mailPreviewMessage"));_.value&&h===v&&w.value===b.id&&(g.value=m)}catch(m){h===v&&A(i(m),"error",m)}finally{h===v&&(V.value=!1)}}function z(){N.value="",O.value=(y.value?.kind==="TEST"?y.value.id:D.value[0]?.id)??"",d.value=!0}async function L(){if(M.writable)try{await x.value?.validate(),await u.test(N.value,O.value),d.value=!1,A(a("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&A(i(b),"error",b)}}return(b,h)=>(c(),T(Z,null,[o(e(U),{icon:e(E)("mail"),onClick:n},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),_.value?(c(),I(e(Y),{key:0,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:_.value,"onUpdate:modelValue":h[1]||(h[1]=m=>_.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))"},{footer:s(()=>[o(e(U),{disabled:!k.writable||D.value.length===0||e(u).busy.value,onClick:z},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(e(U),{onClick:h[0]||(h[0]=m=>_.value=!1)},{default:s(()=>[S(p(e(a)("common.close")),1)]),_:1})]),default:s(()=>[ne((c(),T("div",Me,[P("p",Ue,p(e(a)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(c(),T("div",xe,[P("div",{class:"template-choices",role:"group","aria-label":e(a)("generated.systemConfigurationPage.mailTemplates")},[(c(!0),T(Z,null,ie(e(u).templates.value,m=>(c(),T("button",{key:m.id,type:"button",class:fe(["template-choice",{"is-selected":w.value===m.id}]),"aria-pressed":w.value===m.id,onClick:ae=>f(m)},[P("span",Ie,[S(p(e(a)(m.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),h[6]||(h[6]=P("span",{"aria-hidden":"true"},"·",-1)),S(" "+p(m.locale),1)]),P("span",Ne,p(m.name),1),P("span",Oe,p(m.subject),1)],10,Ee))),128))],8,$e),y.value?ne((c(),T("div",De,[P("div",Ke,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailPreviewSample")),1),P("span",Fe,p(y.value.locale),1)]),g.value?.html?(c(),T("iframe",{key:0,class:"template-preview__document",srcdoc:g.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(a)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Be)):(c(),T("div",Ae,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailSubject")),1),P("strong",null,p(g.value?.subject??y.value.subject),1),P("span",null,p(e(a)("generated.systemConfigurationPage.mailBody")),1),P("p",null,p(g.value?.text??y.value.body),1)]))])),[[e(oe),V.value,"region"]]):R("",!0)])):e(u).loading.value?R("",!0):(c(),T("p",je,p(e(a)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[e(oe),e(u).loading.value,"region"]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0),d.value?(c(),I(e(Y),{key:1,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:d.value,"onUpdate:modelValue":h[5]||(h[5]=m=>d.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))"},{footer:s(()=>[o(e(U),{onClick:h[4]||(h[4]=m=>d.value=!1)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1}),o(e(U),{type:"primary",loading:e(u).busy.value,onClick:L},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading"])]),default:s(()=>[o(e(Q),{ref_key:"testForm",ref:x,model:K.value,rules:F,"label-position":"top"},{default:s(()=>[o(e($),{label:e(a)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:s(()=>[o(e(j),{modelValue:N.value,"onUpdate:modelValue":h[2]||(h[2]=m=>N.value=m),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:s(()=>[o(e(ge),{modelValue:O.value,"onUpdate:modelValue":h[3]||(h[3]=m=>O.value=m),class:"template-test-select","clear-icon":e(E)("clear-input"),"suffix-icon":e(E)("chevron-down")},{default:s(()=>[(c(!0),T(Z,null,ie(D.value,m=>(c(),I(e(ee),{key:m.id,value:m.id,label:m.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0)],64))}}),qe=me(Re,[["__scopeId","data-v-5494f73e"]]),Le={class:"mar-management-page"},Je={class:"mar-table-actions"},ze=["aria-label"],He={key:1},Ze={key:3},Ge={key:4},We={class:"smtp-toggle"},Xe={class:"smtp-form__pair"},Ye={class:"smtp-template-row"},Qe={class:"smtp-dialog-hint"},ea=de({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(k){const M=k,u=Te(M.request,M.settings),_=C(),w=C(),y=C(""),g=C(!1),V=u.settings.find(r=>r.key==="mail-smtp"),v=C(!1),d=Ce({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let x="";const N={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:a("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:a("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(r,l,t)=>t(typeof l=="string"&&l.length<=1024&&(d.username===""?l==="":l!==""||d.username===x)?void 0:new Error(a("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},O=u.settings.find(r=>r.key==="html-preview-origin"),D={origin:[{validator:(r,l,t)=>t(u.validValue(O,l)?void 0:new Error(a("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:K,drafts:F,editingKey:i,savingKey:n,loading:f,beginEdit:q,cancelEdit:z}=u,L=C(!1),b=J(()=>({origin:F.value.htmlPreviewOrigin})),h=J(()=>u.settings.map(r=>({...r,name:a(r.nameKey),description:a(r.descriptionKey)})));ye(g,r=>{y.value="",r||(d.password="",x="",z("mail-smtp"))});function m(r){const l=F.value[r];return typeof l=="number"?l:void 0}function ae(r){const l=F.value[r];return typeof l=="string"?l:""}function pe(){if(!M.writable||(q("mail-smtp"),i.value!=="mail-smtp"))return;const r=JSON.parse(String(K.value.smtpConfiguration));v.value=Object.keys(r).length>0,Object.assign(d,{host:r.host??"",port:r.port??587,tls:r.tls??"STARTTLS",from:r.from??"",fromName:r.fromName??"",username:r.username??"",password:""}),x=r.username??"",g.value=i.value==="mail-smtp"}async function te(){try{await u.load(),L.value=!0}catch(r){L.value=!1,A(r instanceof Error?G(r):a("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",r)}}async function le(r){if(M.writable){if(y.value="",r==="html-preview-origin")try{await _.value?.validate()}catch{return}if(r==="mail-smtp")if(v.value){try{await w.value?.validate()}catch{return}const l=JSON.stringify({...d});if(!u.validValue(V,l)){y.value=a("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(r,l)}else{if(K.value.smtpConfiguration!=="{}")try{await he.confirm(a("generated.systemConfigurationPage.smtpDisableConfirmation"),a("generated.systemConfigurationPage.smtpDisableTitle"),{icon:E("warning"),type:"warning",confirmButtonText:a("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:a("common.cancel")})}catch(l){if(l==="cancel"||l==="close")return;A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l);return}if(!g.value||i.value!==r)return;u.setDraft(r,"{}")}try{await u.save(r)&&(r==="mail-smtp"&&(g.value=!1),A(a("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(l){A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l)}}}return ve(()=>{te()}),(r,l)=>(c(),T("section",Le,[P("div",Je,[o(e(U),{icon:e(E)("refresh"),disabled:e(f)||e(n)!==null,onClick:te},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","disabled"])]),o(e(_e),{data:L.value?h.value:[],"row-key":"key","aria-busy":e(f)},be({default:s(()=>[o(e(H),{prop:"name",label:e(a)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(e(H),{prop:"description",label:e(a)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:s(({row:t})=>[t.type==="number"&&e(i)===t.key?(c(),I(e(re),{key:0,"model-value":m(t.field),placeholder:t.placeholderKey===void 0?void 0:e(a)(t.placeholderKey),min:t.min,max:t.max,disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},{"decrease-icon":s(()=>[o(e(se),{name:"subtract"})]),"increase-icon":s(()=>[o(e(se),{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):t.type==="number"?(c(),T("span",He,p(e(K)[t.field]),1)):t.type==="origin"&&e(i)===t.key?(c(),I(e(Q),{key:2,ref_key:"originForm",ref:_,model:b.value,rules:D},{default:s(()=>[o(e($),{prop:"origin",class:"origin-setting-form"},{default:s(()=>[o(e(j),{"model-value":ae(t.field),placeholder:e(a)(t.placeholderKey),disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):t.type==="origin"?(c(),T("span",Ze,p(e(K)[t.field]||e(a)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):t.type==="json"?(c(),T("span",Ge,"-")):(c(),I(e(ue),{key:5,"model-value":e(F)[t.field]===!0,disabled:e(i)!==t.key||!k.writable||e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:s(({row:t})=>[e(i)!==t.key||t.type==="json"?(c(),I(e(U),{key:0,link:"",icon:e(E)("edit"),disabled:!k.writable||e(i)!==null,onClick:B=>t.type==="json"?pe():e(q)(t.key)},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(c(),T(Z,{key:1},[o(e(U),{link:"",type:"primary",icon:e(E)("check"),loading:e(n)===t.key,disabled:!k.writable||e(n)!==null,onClick:B=>le(t.key)},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick"]),o(e(U),{link:"",icon:e(E)("close"),disabled:e(n)!==null,onClick:B=>e(z)(t.key)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:2},[e(f)?{name:"loading",fn:s(()=>[P("span",{role:"progressbar","aria-label":e(a)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,ze)]),key:"0"}:void 0]),1032,["data","aria-busy"]),g.value?(c(),I(e(Y),{key:0,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:g.value,"onUpdate:modelValue":l[10]||(l[10]=t=>g.value=t),title:e(a)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(n)===null,"close-on-press-escape":e(n)===null,"show-close":e(n)===null,"append-to-body":""},{footer:s(()=>[o(e(U),{disabled:e(n)!==null,onClick:l[8]||(l[8]=t=>g.value=!1)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["disabled"]),o(e(U),{type:"primary",loading:e(n)==="mail-smtp",onClick:l[9]||(l[9]=t=>le("mail-smtp"))},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading"])]),default:s(()=>[P("div",We,[P("span",null,p(e(a)("generated.systemConfigurationPage.smtpEnable")),1),o(e(ue),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=t=>v.value=t),disabled:e(n)!==null,"aria-label":e(a)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),v.value?(c(),I(e(Q),{key:0,ref_key:"smtpForm",ref:w,model:d,rules:N,"label-position":"top",class:"smtp-form"},{default:s(()=>[y.value?(c(),I(e(Pe),{key:0,title:y.value,type:"error",closable:!1},null,8,["title"])):R("",!0),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:s(()=>[o(e(j),{modelValue:d.host,"onUpdate:modelValue":l[1]||(l[1]=t=>d.host=t),maxlength:"253",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),P("div",Xe,[o(e($),{label:e(a)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:s(()=>[o(e(re),{modelValue:d.port,"onUpdate:modelValue":l[2]||(l[2]=t=>d.port=t),"aria-label":e(a)("generated.systemConfigurationPage.smtpPort"),min:1,max:65535,controls:!1,disabled:e(n)!==null},null,8,["modelValue","aria-label","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:s(()=>[o(e(ge),{modelValue:d.tls,"onUpdate:modelValue":l[3]||(l[3]=t=>d.tls=t),disabled:e(n)!==null,"clear-icon":e(E)("clear-input"),"suffix-icon":e(E)("chevron-down")},{default:s(()=>[o(e(ee),{label:"STARTTLS",value:"STARTTLS"}),o(e(ee),{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:s(()=>[o(e(j),{modelValue:d.from,"onUpdate:modelValue":l[4]||(l[4]=t=>d.from=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:s(()=>[o(e(j),{modelValue:d.fromName,"onUpdate:modelValue":l[5]||(l[5]=t=>d.fromName=t),maxlength:"128",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:s(()=>[o(e(j),{modelValue:d.username,"onUpdate:modelValue":l[6]||(l[6]=t=>d.username=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:s(()=>[o(e(j),{modelValue:d.password,"onUpdate:modelValue":l[7]||(l[7]=t=>d.password=t),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(x)===d.username&&e(x)?e(a)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(n)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):R("",!0),P("div",Ye,[o(qe,{request:k.request,writable:k.writable},null,8,["request","writable"])]),P("p",Qe,p(e(a)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close"])):R("",!0)]))}}),ma=me(ea,[["__scopeId","data-v-296e0178"]]);export{ma as default};
|
|
1
|
+
import{u as W,m as X,M as ce}from"./mobile-dialog-return-service-BoVFREoZ.js";import{a as C,d as de,t as a,o as c,b as T,a0 as Z,g as o,q as s,H as S,F as p,u as e,s as E,I as U,p as I,L as Y,R as ne,S as oe,E as P,a1 as ie,X as fe,v as R,G as j,c as J,N as A,_ as me,w as ye,C as ve,J as be,$ as se,r as Ce,O as he}from"./index-4C9wiHpI.js";import{M as Pe}from"./MarAlert-NkwuJEOq.js";import{M as re}from"./MarInputNumber-C0IEcJYI.js";import{_ as H,M as _e}from"./MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js";import{_ as $,a as Q}from"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import{M as ge,a as ee}from"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js";import{M as ue}from"./MarSwitch-BeNZxYkW.js";import"./conversation-history-Cpu8lv-7.js";import{e as G}from"./error-presentation-CSDznxvT.js";const we={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},Ve={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},ke={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function Te(k,M=[]){const u=[...M,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},Ve,ke,we],_=new Map(u.map(i=>[i.key,i]));if(_.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=C(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),y=C({...w.value}),g=C(null),V=C(null),v=C(!1);function d(i){w.value=i,y.value={...i}}async function x(){if(!(v.value||V.value!==null)){v.value=!0;try{d(await k("/api/system-settings")),g.value=null}finally{v.value=!1}}}function N(i){!_.has(i)||v.value||V.value!==null||g.value!==null||(y.value={...w.value},g.value=i)}function O(i){g.value!==i||V.value!==null||(y.value={...w.value},g.value=null)}function D(i,n){if(i.type==="json"){if(typeof n!="string"||n.length>4096)return!1;try{const f=JSON.parse(n);return f!==null&&typeof f=="object"&&!Array.isArray(f)}catch{return!1}}if(i.type==="origin"){if(n==="")return!0;if(typeof n!="string"||n.length>253)return!1;try{const f=new URL(n);return f.origin===n&&(f.protocol==="https:"||f.protocol==="http:")}catch{return!1}}return i.type==="boolean"?typeof n=="boolean":typeof n=="number"&&Number.isFinite(n)&&n>=i.min&&n<=i.max}function K(i,n){const f=_.get(i);f===void 0||g.value!==i||V.value!==null||!(f.type==="origin"||f.type==="json"?typeof n=="string"&&n.length<=(f.type==="json"?4096:253):D(f,n))||(y.value[f.field]=n)}async function F(i){const n=_.get(i);if(n===void 0||g.value!==i||V.value!==null||v.value)return!1;const f=y.value[n.field];if(!D(n,f))return!1;V.value=i;try{return d(await k(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[n.payloadField]:f})})),g.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:y,editingKey:g,savingKey:V,loading:v,load:x,beginEdit:N,cancelEdit:O,validValue:D,setDraft:K,save:F}}function Se(k){const M=C([]),u=C(!1),_=C(!1);async function w(){if(!u.value){u.value=!0;try{M.value=await k("/api/mail/templates")}finally{u.value=!1}}}async function y(V,v){return k("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:v})})}async function g(V,v){_.value=!0;try{await k("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:v})})}finally{_.value=!1}}return{templates:M,loading:u,busy:_,load:w,preview:y,test:g}}const Me={class:"template-viewer"},Ue={class:"template-description"},xe={key:0,class:"template-layout"},$e=["aria-label"],Ee=["aria-pressed","onClick"],Ie={class:"template-choice__meta"},Ne={class:"template-choice__name"},Oe={class:"template-choice__subject"},De={key:0,class:"template-preview"},Ke={class:"template-preview__header"},Fe={class:"template-preview__locale"},Be=["srcdoc","title"],Ae={key:1,class:"template-preview__fallback"},je={key:1,class:"template-empty"},Re=de({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(k){const M=k,u=Se(M.request),_=C(!1),w=C(""),y=J(()=>u.templates.value.find(b=>b.id===w.value)),g=C(),V=C(!1);let v=0;const d=C(!1),x=C(),N=C(""),O=C(""),D=J(()=>u.templates.value.filter(b=>b.kind==="TEST")),K=J(()=>({email:N.value,templateId:O.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?G(b):a("generated.systemConfigurationPage.mailOperationFailed")}async function n(){_.value=!0,v+=1,w.value="",g.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await q()}catch(b){A(i(b),"error",b)}}function f(b){w.value=b.id,g.value=void 0,q()}async function q(){const b=y.value;if(b===void 0||!_.value)return;const h=++v;V.value=!0;try{const m=await u.preview(b,a("generated.systemConfigurationPage.mailPreviewMessage"));_.value&&h===v&&w.value===b.id&&(g.value=m)}catch(m){h===v&&A(i(m),"error",m)}finally{h===v&&(V.value=!1)}}function z(){N.value="",O.value=(y.value?.kind==="TEST"?y.value.id:D.value[0]?.id)??"",d.value=!0}async function L(){if(M.writable)try{await x.value?.validate(),await u.test(N.value,O.value),d.value=!1,A(a("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&A(i(b),"error",b)}}return(b,h)=>(c(),T(Z,null,[o(e(U),{icon:e(E)("mail"),onClick:n},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),_.value?(c(),I(e(Y),{key:0,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:_.value,"onUpdate:modelValue":h[1]||(h[1]=m=>_.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))"},{footer:s(()=>[o(e(U),{disabled:!k.writable||D.value.length===0||e(u).busy.value,onClick:z},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(e(U),{onClick:h[0]||(h[0]=m=>_.value=!1)},{default:s(()=>[S(p(e(a)("common.close")),1)]),_:1})]),default:s(()=>[ne((c(),T("div",Me,[P("p",Ue,p(e(a)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(c(),T("div",xe,[P("div",{class:"template-choices",role:"group","aria-label":e(a)("generated.systemConfigurationPage.mailTemplates")},[(c(!0),T(Z,null,ie(e(u).templates.value,m=>(c(),T("button",{key:m.id,type:"button",class:fe(["template-choice",{"is-selected":w.value===m.id}]),"aria-pressed":w.value===m.id,onClick:ae=>f(m)},[P("span",Ie,[S(p(e(a)(m.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),h[6]||(h[6]=P("span",{"aria-hidden":"true"},"·",-1)),S(" "+p(m.locale),1)]),P("span",Ne,p(m.name),1),P("span",Oe,p(m.subject),1)],10,Ee))),128))],8,$e),y.value?ne((c(),T("div",De,[P("div",Ke,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailPreviewSample")),1),P("span",Fe,p(y.value.locale),1)]),g.value?.html?(c(),T("iframe",{key:0,class:"template-preview__document",srcdoc:g.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(a)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Be)):(c(),T("div",Ae,[P("span",null,p(e(a)("generated.systemConfigurationPage.mailSubject")),1),P("strong",null,p(g.value?.subject??y.value.subject),1),P("span",null,p(e(a)("generated.systemConfigurationPage.mailBody")),1),P("p",null,p(g.value?.text??y.value.body),1)]))])),[[e(oe),V.value,"region"]]):R("",!0)])):e(u).loading.value?R("",!0):(c(),T("p",je,p(e(a)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[e(oe),e(u).loading.value,"region"]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0),d.value?(c(),I(e(Y),{key:1,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:d.value,"onUpdate:modelValue":h[5]||(h[5]=m=>d.value=m),"append-to-body":"",title:e(a)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))"},{footer:s(()=>[o(e(U),{onClick:h[4]||(h[4]=m=>d.value=!1)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1}),o(e(U),{type:"primary",loading:e(u).busy.value,onClick:L},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading"])]),default:s(()=>[o(e(Q),{ref_key:"testForm",ref:x,model:K.value,rules:F,"label-position":"top"},{default:s(()=>[o(e($),{label:e(a)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:s(()=>[o(e(j),{modelValue:N.value,"onUpdate:modelValue":h[2]||(h[2]=m=>N.value=m),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:s(()=>[o(e(ge),{modelValue:O.value,"onUpdate:modelValue":h[3]||(h[3]=m=>O.value=m),class:"template-test-select","clear-icon":e(E)("clear-input"),"suffix-icon":e(E)("chevron-down")},{default:s(()=>[(c(!0),T(Z,null,ie(D.value,m=>(c(),I(e(ee),{key:m.id,value:m.id,label:m.name},null,8,["value","label"]))),128))]),_:1},8,["modelValue","clear-icon","suffix-icon"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title"])):R("",!0)],64))}}),qe=me(Re,[["__scopeId","data-v-5494f73e"]]),Le={class:"mar-management-page"},Je={class:"mar-table-actions"},ze=["aria-label"],He={key:1},Ze={key:3},Ge={key:4},We={class:"smtp-toggle"},Xe={class:"smtp-form__pair"},Ye={class:"smtp-template-row"},Qe={class:"smtp-dialog-hint"},ea=de({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(k){const M=k,u=Te(M.request,M.settings),_=C(),w=C(),y=C(""),g=C(!1),V=u.settings.find(r=>r.key==="mail-smtp"),v=C(!1),d=Ce({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let x="";const N={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:a("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:a("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:a("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:a("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(r,l,t)=>t(typeof l=="string"&&l.length<=1024&&(d.username===""?l==="":l!==""||d.username===x)?void 0:new Error(a("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},O=u.settings.find(r=>r.key==="html-preview-origin"),D={origin:[{validator:(r,l,t)=>t(u.validValue(O,l)?void 0:new Error(a("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:K,drafts:F,editingKey:i,savingKey:n,loading:f,beginEdit:q,cancelEdit:z}=u,L=C(!1),b=J(()=>({origin:F.value.htmlPreviewOrigin})),h=J(()=>u.settings.map(r=>({...r,name:a(r.nameKey),description:a(r.descriptionKey)})));ye(g,r=>{y.value="",r||(d.password="",x="",z("mail-smtp"))});function m(r){const l=F.value[r];return typeof l=="number"?l:void 0}function ae(r){const l=F.value[r];return typeof l=="string"?l:""}function pe(){if(!M.writable||(q("mail-smtp"),i.value!=="mail-smtp"))return;const r=JSON.parse(String(K.value.smtpConfiguration));v.value=Object.keys(r).length>0,Object.assign(d,{host:r.host??"",port:r.port??587,tls:r.tls??"STARTTLS",from:r.from??"",fromName:r.fromName??"",username:r.username??"",password:""}),x=r.username??"",g.value=i.value==="mail-smtp"}async function te(){try{await u.load(),L.value=!0}catch(r){L.value=!1,A(r instanceof Error?G(r):a("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",r)}}async function le(r){if(M.writable){if(y.value="",r==="html-preview-origin")try{await _.value?.validate()}catch{return}if(r==="mail-smtp")if(v.value){try{await w.value?.validate()}catch{return}const l=JSON.stringify({...d});if(!u.validValue(V,l)){y.value=a("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(r,l)}else{if(K.value.smtpConfiguration!=="{}")try{await he.confirm(a("generated.systemConfigurationPage.smtpDisableConfirmation"),a("generated.systemConfigurationPage.smtpDisableTitle"),{icon:E("warning"),type:"warning",confirmButtonText:a("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:a("common.cancel")})}catch(l){if(l==="cancel"||l==="close")return;A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l);return}if(!g.value||i.value!==r)return;u.setDraft(r,"{}")}try{await u.save(r)&&(r==="mail-smtp"&&(g.value=!1),A(a("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(l){A(l instanceof Error?G(l):a("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",l)}}}return ve(()=>{te()}),(r,l)=>(c(),T("section",Le,[P("div",Je,[o(e(U),{icon:e(E)("refresh"),disabled:e(f)||e(n)!==null,onClick:te},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","disabled"])]),o(e(_e),{data:L.value?h.value:[],"row-key":"key","aria-busy":e(f)},be({default:s(()=>[o(e(H),{prop:"name",label:e(a)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(e(H),{prop:"description",label:e(a)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:s(({row:t})=>[t.type==="number"&&e(i)===t.key?(c(),I(e(re),{key:0,"model-value":m(t.field),placeholder:t.placeholderKey===void 0?void 0:e(a)(t.placeholderKey),min:t.min,max:t.max,disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},{"decrease-icon":s(()=>[o(e(se),{name:"subtract"})]),"increase-icon":s(()=>[o(e(se),{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):t.type==="number"?(c(),T("span",He,p(e(K)[t.field]),1)):t.type==="origin"&&e(i)===t.key?(c(),I(e(Q),{key:2,ref_key:"originForm",ref:_,model:b.value,rules:D},{default:s(()=>[o(e($),{prop:"origin",class:"origin-setting-form"},{default:s(()=>[o(e(j),{"model-value":ae(t.field),placeholder:e(a)(t.placeholderKey),disabled:e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):t.type==="origin"?(c(),T("span",Ze,p(e(K)[t.field]||e(a)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):t.type==="json"?(c(),T("span",Ge,"-")):(c(),I(e(ue),{key:5,"model-value":e(F)[t.field]===!0,disabled:e(i)!==t.key||!k.writable||e(n)!==null,"onUpdate:modelValue":B=>e(u).setDraft(t.key,B)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(e(H),{label:e(a)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:s(({row:t})=>[e(i)!==t.key||t.type==="json"?(c(),I(e(U),{key:0,link:"",icon:e(E)("edit"),disabled:!k.writable||e(i)!==null,onClick:B=>t.type==="json"?pe():e(q)(t.key)},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(c(),T(Z,{key:1},[o(e(U),{link:"",type:"primary",icon:e(E)("check"),loading:e(n)===t.key,disabled:!k.writable||e(n)!==null,onClick:B=>le(t.key)},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick"]),o(e(U),{link:"",icon:e(E)("close"),disabled:e(n)!==null,onClick:B=>e(z)(t.key)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:2},[e(f)?{name:"loading",fn:s(()=>[P("span",{role:"progressbar","aria-label":e(a)("common.loading")},[o(e(ce),{class:"mar-read-loading-indicator"})],8,ze)]),key:"0"}:void 0]),1032,["data","aria-busy"]),g.value?(c(),I(e(Y),{key:0,onVnodeMounted:e(X),onVnodeBeforeUnmount:e(W),modelValue:g.value,"onUpdate:modelValue":l[10]||(l[10]=t=>g.value=t),title:e(a)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(n)===null,"close-on-press-escape":e(n)===null,"show-close":e(n)===null,"append-to-body":""},{footer:s(()=>[o(e(U),{disabled:e(n)!==null,onClick:l[8]||(l[8]=t=>g.value=!1)},{default:s(()=>[S(p(e(a)("common.cancel")),1)]),_:1},8,["disabled"]),o(e(U),{type:"primary",loading:e(n)==="mail-smtp",onClick:l[9]||(l[9]=t=>le("mail-smtp"))},{default:s(()=>[S(p(e(a)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading"])]),default:s(()=>[P("div",We,[P("span",null,p(e(a)("generated.systemConfigurationPage.smtpEnable")),1),o(e(ue),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=t=>v.value=t),disabled:e(n)!==null,"aria-label":e(a)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),v.value?(c(),I(e(Q),{key:0,ref_key:"smtpForm",ref:w,model:d,rules:N,"label-position":"top",class:"smtp-form"},{default:s(()=>[y.value?(c(),I(e(Pe),{key:0,title:y.value,type:"error",closable:!1},null,8,["title"])):R("",!0),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:s(()=>[o(e(j),{modelValue:d.host,"onUpdate:modelValue":l[1]||(l[1]=t=>d.host=t),maxlength:"253",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),P("div",Xe,[o(e($),{label:e(a)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:s(()=>[o(e(re),{modelValue:d.port,"onUpdate:modelValue":l[2]||(l[2]=t=>d.port=t),"aria-label":e(a)("generated.systemConfigurationPage.smtpPort"),min:1,max:65535,controls:!1,disabled:e(n)!==null},null,8,["modelValue","aria-label","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:s(()=>[o(e(ge),{modelValue:d.tls,"onUpdate:modelValue":l[3]||(l[3]=t=>d.tls=t),disabled:e(n)!==null,"clear-icon":e(E)("clear-input"),"suffix-icon":e(E)("chevron-down")},{default:s(()=>[o(e(ee),{label:"STARTTLS",value:"STARTTLS"}),o(e(ee),{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:s(()=>[o(e(j),{modelValue:d.from,"onUpdate:modelValue":l[4]||(l[4]=t=>d.from=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:s(()=>[o(e(j),{modelValue:d.fromName,"onUpdate:modelValue":l[5]||(l[5]=t=>d.fromName=t),maxlength:"128",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:s(()=>[o(e(j),{modelValue:d.username,"onUpdate:modelValue":l[6]||(l[6]=t=>d.username=t),maxlength:"320",autocomplete:"off",disabled:e(n)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(e($),{label:e(a)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:s(()=>[o(e(j),{modelValue:d.password,"onUpdate:modelValue":l[7]||(l[7]=t=>d.password=t),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(x)===d.username&&e(x)?e(a)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(n)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):R("",!0),P("div",Ye,[o(qe,{request:k.request,writable:k.writable},null,8,["request","writable"])]),P("p",Qe,p(e(a)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close"])):R("",!0)]))}}),ma=me(ea,[["__scopeId","data-v-296e0178"]]);export{ma as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as a}from"./MarTag-
|
|
1
|
+
import{M as a}from"./MarTag-DhjH9N1h.js";import{d as g,o as r,b as C,E as e,F as o,u as t,t as s,g as i,q as l,H as d,p as f,Z as y,v as h,_ as v}from"./index-4C9wiHpI.js";const x={class:"system-information"},b=["aria-label"],N=["src"],V=["aria-label"],B=g({__name:"SystemInformationPage",props:{authenticated:{type:Boolean},logoUrl:{},onlineNodeCount:{},nodeCount:{},request:{type:Function},isAdmin:{type:Boolean},serverVersion:{},extension:{type:[Object,Function]}},emits:["extensionChanged"],setup(n,{emit:u}){const m=u;return(k,c)=>(r(),C("section",x,[e("div",{class:"system-brand","aria-label":t(s)("generated.settingsContent.myAgentRoamVersion")},[e("img",{src:n.logoUrl,alt:""},null,8,N),e("div",null,[e("strong",null,o(t(s)("common.productName")),1),e("code",null,o(n.serverVersion??t(s)("generated.settingsContent.unknown")),1)])],8,b),e("section",{class:"system-status","aria-label":t(s)("generated.settingsContent.systemStatus")},[e("h2",null,o(t(s)("generated.settingsContent.systemStatus2")),1),e("dl",null,[e("div",null,[e("dt",null,o(t(s)("common.webConsole")),1),e("dd",null,[i(t(a),{effect:"light",type:"success"},{default:l(()=>[d(o(t(s)("generated.settingsContent.running")),1)]),_:1})])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.serverConnection")),1),e("dd",null,[i(t(a),{type:n.authenticated?"success":"info",effect:"light"},{default:l(()=>[d(o(n.authenticated?t(s)("generated.settingsContent.connected"):t(s)("generated.settingsContent.disconnected")),1)]),_:1},8,["type"])])]),e("div",null,[e("dt",null,o(t(s)("generated.settingsContent.nodeConnections")),1),e("dd",null,[i(t(a),{type:n.onlineNodeCount>0?"success":"info",effect:"light"},{default:l(()=>[d(o(n.onlineNodeCount)+"/"+o(n.nodeCount),1)]),_:1},8,["type"])])])])],8,V),n.isAdmin&&n.extension?(r(),f(y(n.extension),{key:0,embedded:"",request:n.request,onImported:c[0]||(c[0]=q=>m("extensionChanged"))},null,40,["request"])):h("",!0)]))}}),I=v(B,[["__scopeId","data-v-a082d68d"]]);export{I as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b3 as Mr,b4 as Tn,b5 as Pn,b6 as An,A as On,t as Be,d as In,b7 as Nn,w as Ms,C as Hn,a5 as di,P as Wn,R as Fn,ap as zn,o as ui,b as Ts,E as $n,u as Re,F as At,v as Ps,p as Kn,q as _t,g as Ot,H as _i,X as Un,a as It,aX as qn,b8 as Vn,b9 as Yn,_ as Xn}from"./index-
|
|
1
|
+
import{b3 as Mr,b4 as Tn,b5 as Pn,b6 as An,A as On,t as Be,d as In,b7 as Nn,w as Ms,C as Hn,a5 as di,P as Wn,R as Fn,ap as zn,o as ui,b as Ts,E as $n,u as Re,F as At,v as Ps,p as Kn,q as _t,g as Ot,H as _i,X as Un,a as It,aX as qn,b8 as Vn,b9 as Yn,_ as Xn}from"./index-4C9wiHpI.js";import{k as jn,l as fi,m as Gn}from"./FilePreviewState-BUcDrqrj.js";import{d as Jn}from"./workbench-live-service-vga8VA4K.js";import{w as Zn,r as Qn}from"./WorkbenchPage-DsHxvIzv.js";import"./mobile-dialog-return-service-BoVFREoZ.js";import"./uuid-BmNSYLtZ.js";import"./time-presentation-09Rjr2Gy.js";import"./conversation-history-Cpu8lv-7.js";import"./workbench-presentation-DH39N9Mr.js";import"./runner-presentation-mrgmpAJs.js";import"./AuthEntryPanel-C_BuwPY1.js";import"./error-presentation-CSDznxvT.js";import"./MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-CmWRifus.js";import"./MarCheckboxGroup-DRDeYetT.js";import"./markdown-renderer-CORifCeR.js";import"./MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-D8OF8KQq.js";import"./ImagePreviewViewport-Csronmkx.js";import"./scoped-http-service-BDZJVSvp.js";import"./MarFormItem.vue_vue_type_script_setup_true_lang-DS5V71d6.js";import"./MarSwitch-BeNZxYkW.js";import"./file-presentation-Cm7tx53N.js";import"./MarTabs-DE_aL9MQ.js";import"./vnc-client-BcA55F8T.js";import"./workspace-direct-transfer-service-BqVxkJdU.js";import"./mar-agent-reasoning-effort-K13iNURu.js";import"./hosted-conversation-template-client-CV1xizww.js";import"./oauth-callback-B4tdwgWr.js";import"./MarAlert-NkwuJEOq.js";import"./code-navigation-target-BlnRe0-a.js";import"./NodeDetailsDialogs-DoFmRmAA.js";/* empty css */import"./MarDescriptionsItem-BmPeYfY8.js";import"./MarTag-DhjH9N1h.js";import"./EnvironmentSecretManager-Dl7hCv5N.js";import"./MarTableColumn.vue_vue_type_script_setup_true_lang-ZzVyGxJK.js";import"./ManagementPagination-QZqNLeLY.js";import"./management-url-service-WTIrc38n.js";import"./MarInputNumber-C0IEcJYI.js";import"./MarDatePicker-DO6oTMCK.js";import"./mcp-center-service-xKzbxMnl.js";import"./catalog-page-service-RgFFn1Yl.js";import"./MarCascader-DXamgewd.js";import"./enterprise-management-service-B_yURuGw.js";var eo=2,to=1,io=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},l=o.top+o.bottom,h=o.right+o.left,a=s-l,u=r-h-t;return{cols:Math.max(eo,Math.floor(u/e.css.cell.width)),rows:Math.max(to,Math.floor(a/e.css.cell.height))}}};var pi=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],so=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],te;function ro(e,t){let i=0,s=t.length-1,r;if(e<t[0][0]||e>t[s][1])return!1;for(;s>=i;)if(r=i+s>>1,e>t[r][1])i=r+1;else if(e<t[r][0])s=r-1;else return!0;return!1}var no=class{constructor(){if(this.version="6",!te){te=new Uint8Array(65536),te.fill(1),te[0]=0,te.fill(0,1,32),te.fill(0,127,160),te.fill(2,4352,4448),te[9001]=2,te[9002]=2,te.fill(2,11904,42192),te[12351]=1,te.fill(2,44032,55204),te.fill(2,63744,64256),te.fill(2,65040,65050),te.fill(2,65072,65136),te.fill(2,65280,65377),te.fill(2,65504,65511);for(let t=0;t<pi.length;++t)te.fill(0,pi[t][0],pi[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?te[t]:ro(t,so)?0:t>=131072&&t<=196605||t>=196608&&t<=262141?2:1}charProperties(t,i){let s=this.wcwidth(t),r=s===0&&i!==0;if(r){let n=Zt.extractWidth(i);n===0?r=!1:n>s&&(s=n)}return Zt.createPropertyValue(0,s,r)}},oo=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?As.isErrorNoTelemetry(t)?new As(t.message+`
|
|
2
2
|
|
|
3
3
|
`+t.stack):new Error(t.message+`
|
|
4
4
|
|