@myagentroam/server 0.13.6 → 0.13.7
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/dist/index.d.ts +8 -0
- package/node_modules/@myagentroam/protocol/dist/index.js +2 -0
- 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 +6 -6
- package/web/assets/{AuditManagementPage-DdhzZJJz.js → AuditManagementPage-fDpTFGAJ.js} +1 -1
- package/web/assets/{BusyIndicator-DJEYrwl2.js → BusyIndicator-81gYfHFI.js} +1 -1
- package/web/assets/{CodeFileEditor-t-S2RxFj.js → CodeFileEditor-BWA7aZwM.js} +3 -3
- package/web/assets/{ConversationTemplateManagementPage-DtnCxKPr.js → ConversationTemplateManagementPage-CMwsINqq.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-8cWdT1rl.js → ConversationTemplateManagementPage-DM2WlZlh.js} +1 -1
- package/web/assets/{EnterpriseUserManagementPage-CVpJzsVL.js → EnterpriseUserManagementPage-BKCNfftS.js} +1 -1
- package/web/assets/{EnvironmentSecretManager-DaMtII6x.js → EnvironmentSecretManager-jWSJQLLY.js} +1 -1
- package/web/assets/{FilePreviewLoading-CqXCVUDH.js → FilePreviewLoading-EXabASKn.js} +1 -1
- package/web/assets/HtmlPreviewFrame-DQimcizh.js +5 -0
- package/web/assets/{HtmlPreviewFrame-CXd4x0y-.css → HtmlPreviewFrame-D_oKBx6Z.css} +1 -1
- package/web/assets/{LicenseManagementPage-C-25sen8.js → LicenseManagementPage-li8NTgz0.js} +1 -1
- package/web/assets/{ManagementPagination-BwZo73aV.js → ManagementPagination-DC_Jtk72.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-DkncBptD.js → MarAgentModelManagementPage-BhuEt5ck.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-B9lHTQtV.js → MarAgentModelManagementPage-DtQDSKsm.js} +1 -1
- package/web/assets/{MarIcon-0cJTzTai.js → MarIcon-DRzNI1TJ.js} +1 -1
- package/web/assets/{MarkdownFilePreview-CnWvYfKN.js → MarkdownFilePreview-DRxwzEkP.js} +2 -2
- package/web/assets/{McpDetailsDialog-nt3by9E1.js → McpDetailsDialog-C4hLhwaZ.js} +1 -1
- package/web/assets/{McpSourceManagementPage-Bg2wxoSB.js → McpSourceManagementPage-B4o2soUo.js} +1 -1
- package/web/assets/{McpSourceManagementPage-BVjVO0Tb.js → McpSourceManagementPage-ChCP_9Wx.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-D4wBwUzA.js → NodeDetailsDialogs-jvve59Rc.js} +1 -1
- package/web/assets/NodeManagementPage-BaoMHEc6.js +1 -0
- package/web/assets/NodeManagementPage-DcE_Tno8.js +1 -0
- package/web/assets/{OAuthManagementPage-D9cBB-vX.js → OAuthManagementPage-oSorMLvE.js} +1 -1
- package/web/assets/{OrganizationManagementPage-N8HwbTY5.js → OrganizationManagementPage-CEcAvCJe.js} +1 -1
- package/web/assets/{ResourceManagementPanel-D80V3ZdZ.js → ResourceManagementPanel-kqq0Svx_.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-DfCWa6fA.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-DWpc58cT.js} +1 -1
- package/web/assets/{SecretManagementPage-tsgbjSvn.js → SecretManagementPage-CXmPmuQ7.js} +1 -1
- package/web/assets/SecretManagementPage-DnHmkYKn.js +1 -0
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-CmSoYQ3n.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-DBmhix-s.js} +1 -1
- package/web/assets/{SessionSharePage-whJFT3cw.js → SessionSharePage-Bfibf3C2.js} +2 -2
- package/web/assets/{SettingsContent-WLH3DkgW.js → SettingsContent-BQYXFW0-.js} +1 -1
- package/web/assets/{SettingsContent-Dsw7sGr4.js → SettingsContent-KFZsk8Yv.js} +1 -1
- package/web/assets/{SkillCenterPage-yDU-t2cT.js → SkillCenterPage-5lJUA9pl.js} +1 -1
- package/web/assets/SkillCenterPage-BmqIek5Q.js +1 -0
- package/web/assets/{SkillDetailsDialog-BUfNxAjf.js → SkillDetailsDialog-CrN5o6Jk.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-B7yjgXR8.js → SkillSourceManagementPage-Di_lVA5-.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-BCHgTDXJ.js → SkillSourceManagementPage-DpenHp3H.js} +1 -1
- package/web/assets/{StandaloneFilePreviewPage-b-piNuN1.js → StandaloneFilePreviewPage-_Lh1H6-k.js} +1 -1
- package/web/assets/{SystemConfigurationPage-C2Ecb0Su.js → SystemConfigurationPage-BpCsGW-2.js} +1 -1
- package/web/assets/SystemConfigurationPage-BqqdmrAK.js +1 -0
- package/web/assets/{SystemInformationPage-CBWjqG43.js → SystemInformationPage-G9WA9kpj.js} +1 -1
- package/web/assets/{TerminalTabView-CeX2SVcm.js → TerminalTabView-KFAT6dN-.js} +1 -1
- package/web/assets/{WorkbenchPage-D4X4qerH.js → WorkbenchPage-BQdwbvse.js} +15 -15
- package/web/assets/WorkbenchPage-ptvzMUTa.css +1 -0
- package/web/assets/WorkspaceManagementPage-BYtbXfHc.js +1 -0
- package/web/assets/WorkspaceManagementPage-C-9iCpGW.js +1 -0
- package/web/assets/{_baseIteratee-CnCgfzqY.js → _baseIteratee-CEjLB6P0.js} +1 -1
- package/web/assets/{abnfDiagram-VCTEODGH-C8MLlCYr.js → abnfDiagram-VCTEODGH-DwwJ-B6X.js} +1 -1
- package/web/assets/{advancedFormat-tqE8I04X.js → advancedFormat-DwAKrlQQ.js} +1 -1
- package/web/assets/{arc-ChGPMlfM.js → arc-BhUv0GFi.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-UNKWS80q.js → architectureDiagram-5GKGNRK7-BYwr4pOI.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-DaoKTWzi.js → blockDiagram-OSKFZWR5-BQ0G5RBd.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-DeJ38tJ4.js → c4Diagram-7LVT6UL2-DLmelPF5.js} +1 -1
- package/web/assets/{catalog-ownership-service-ppl9SdO8.js → catalog-ownership-service-BQ72dnlA.js} +1 -1
- package/web/assets/{catalog-page-service-CA6TP1Er.js → catalog-page-service-D4eWT4uF.js} +1 -1
- package/web/assets/channel-BAHh016e.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-Cie4-T_4.js → chunk-2Q5K7J3B-CQf0ME4y.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-C02e2HuJ.js → chunk-5VM5RSS4-DQY_-Ks6.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-CYE4axjh.js → chunk-F27PBJKO-CklCJyS6.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-Qcd3DJvW.js → chunk-HLEWEB6X-Ofa5loFJ.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-BIlv53mX.js → chunk-JWPE2WC7-Dc7083sU.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-C1FzI22y.js → chunk-POPQ4Y6H-D4Zc7_fI.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-B5A4JoXo.js → chunk-SVP7TREG-DiJC9xJx.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-FdosaHEW.js → chunk-XXDRQBXY-BhYPRykj.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-BzhAoouo.js → chunk-ZLD2IHE6-Cc-O9KsT.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-IKe_y23-.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-IKe_y23-.js +1 -0
- package/web/assets/{conversation-history-D9993EDO.js → conversation-history-DsSE1wLH.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-C4ZjK8dC.js → cose-bilkent-JH36ORCC-rFqp0SYn.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-D-6QhPjX.js → cynefin-OW5HDTMX-deO0LWKC.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-Bwsk5LdU.js → cynefinDiagram-5FMLGOSQ-BCj0mYAO.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-DoA_-lbd.js → dagre-OS7QT2EB-faTq17DR.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-sgObxZyi.js → diagram-S7CK7UJ4-cAbTZ8qd.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-BdMjAaVk.js → diagram-UQ7AKVKN-CxoALt7V.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-BCH9zwo1.js → diagram-VSXAHHWV-BcZM5S7Z.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-Z6LSJKeQ.js → diagram-VX7I27RA-QIaSkKCU.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-CcbM5hsL.js → diagram-Z3DM3KII-tYE8PEsy.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-CWP32uDq.js → ebnfDiagram-PWID7BFC-CQON9X8w.js} +1 -1
- package/web/assets/{el-alert-8VKFJYUv.js → el-alert-DQT74Z6k.js} +1 -1
- package/web/assets/{el-cascader-CJR-DJLi.js → el-cascader-B52hB1X4.js} +1 -1
- package/web/assets/{el-checkbox-D7CsqiQq.js → el-checkbox-D8E82IC3.js} +1 -1
- package/web/assets/{el-date-picker-Lb4E2Nje.js → el-date-picker-CzlIv3iG.js} +1 -1
- package/web/assets/{el-descriptions-B48GJeGA.js → el-descriptions-CrLOiLtM.js} +1 -1
- package/web/assets/{el-form-item-Fjp3w344.js → el-form-item-CjLvz7IR.js} +1 -1
- package/web/assets/{el-input-DRF3bOe1.js → el-input-DsD8wPgd.js} +1 -1
- package/web/assets/{el-input-number-e6T9QIje.js → el-input-number-DYTEBnhp.js} +1 -1
- package/web/assets/{el-radio-DO8joult.js → el-radio-rHorotS0.js} +1 -1
- package/web/assets/{el-select-BSaB1c5h.js → el-select-vQRSFUuU.js} +1 -1
- package/web/assets/{el-switch-Cpl2xxJc.js → el-switch-D49n4nYq.js} +1 -1
- package/web/assets/{el-tab-pane-CQyfpTgD.js → el-tab-pane-CpoewUFm.js} +1 -1
- package/web/assets/{el-table-column-BRybrdLI.js → el-table-column-DIe-Jdox.js} +1 -1
- package/web/assets/{enterprise-management-service-Qtmnf50C.js → enterprise-management-service-CYSkSkqU.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-BOtd6Wuq.js → erDiagram-2YWLMYGG-D6cLXjx4.js} +1 -1
- package/web/assets/{error-presentation-CJfLHEK_.js → error-presentation-CKm32JzU.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-DGRqBn-8.js → flowDiagram-T62WH6J4-CWSvQfIj.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-D84r1V0Q.js → ganttDiagram-EL5Y4UJY-Bk9PlmQ0.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-FANv-qDA.js → gitGraphDiagram-WWUBYQGX-JFxyzn2J.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-CeOnupVC.js → hosted-conversation-template-client-CYBI7IvT.js} +1 -1
- package/web/assets/{index-DwQqO2fH.js → index-98DLRplS.js} +1 -1
- package/web/assets/{index-CBs38naL.js → index-BP-OH85t.js} +1 -1
- package/web/assets/{index-sctirQW0.js → index-BQ4D3lnr.js} +1 -1
- package/web/assets/{index-B0P8j1yb.js → index-BS-OsBk1.js} +1 -1
- package/web/assets/{index-C_EAvnDF.js → index-BTXpkf3M.js} +1 -1
- package/web/assets/{index-BYYx_GrI.js → index-BbOzeZis.js} +1 -1
- package/web/assets/{index-C90_sIrz.js → index-BzBol34B.js} +1 -1
- package/web/assets/{index-Bokwz5PA.js → index-C-rtGAiQ.js} +1 -1
- package/web/assets/{index-BkC7CnZA.js → index-C20Ctqox.js} +1 -1
- package/web/assets/{index-BOhe9vs1.js → index-C20z2yeK.js} +1 -1
- package/web/assets/{index-C8DbmG_l.js → index-C38uEGP7.js} +1 -1
- package/web/assets/{index-B7tnVSor.js → index-C8HJ-7wK.js} +1 -1
- package/web/assets/{index-hP6Cb_NE.js → index-CNYQPSEc.js} +1 -1
- package/web/assets/{index-9ks2AQTi.js → index-CRCrq0fK.js} +1 -1
- package/web/assets/{index-x9JuBH-H.js → index-CeewrlMR.js} +1 -1
- package/web/assets/{index-DGlioDXJ.js → index-D0gqeuOi.js} +1 -1
- package/web/assets/{index-W6jp3JVA.js → index-DCX6wtGf.js} +1 -1
- package/web/assets/{index-BsG4OGs3.js → index-DFYUX44y.js} +1 -1
- package/web/assets/{index-DU209g6d.js → index-DYEKyod1.js} +1 -1
- package/web/assets/{index-D6945seh.js → index-Dmjcd9dH.js} +1 -1
- package/web/assets/{index-eU6FSd70.js → index-DqPiRdTW.js} +1 -1
- package/web/assets/{index-x2OEXKrc.js → index-Dw3xGHpw.js} +1 -1
- package/web/assets/{index-zG9SJlS3.js → index-FxdcMPQK.js} +1 -1
- package/web/assets/{index-B8rWDVmR.js → index-GDJZ4nKF.js} +1 -1
- package/web/assets/{index-Tv4HGgSj.js → index-QkybH-4Y.js} +1 -1
- package/web/assets/{index-C_F0LgDO.js → index-X_ZLsJF-.js} +1 -1
- package/web/assets/{index-NReuiFej.js → index-oJjFup0f.js} +1 -1
- package/web/assets/{index-BeipYJv6.js → index-s_IiIj3Q.js} +1 -1
- package/web/assets/{index-DsgwAvJA.js → index-tebwt16R.js} +3 -3
- package/web/assets/infoDiagram-FKFFQAWI-odw5ek8A.js +2 -0
- package/web/assets/{isArrayLikeObject-Bg1E4S9y.js → isArrayLikeObject-CNIeaAGq.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-B0FDzCa4.js → ishikawaDiagram-5VMMS53U-S3I395rk.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-CIM_LxZU.js → journeyDiagram-EYS64GPL-CEURtMQT.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-DKxBi_r0.js → kanban-definition-UXKFOSKX-B_I_ageX.js} +1 -1
- package/web/assets/{layout-DU0JsES_.js → layout-C28pcZJ3.js} +1 -1
- package/web/assets/{linear-C3UCzYem.js → linear-B5pI1vN0.js} +1 -1
- package/web/assets/{management-url-service-DsBUOSH4.js → management-url-service-BUrqsIPf.js} +1 -1
- package/web/assets/{mcp-center-service-BluNkyx-.js → mcp-center-service-Bt8KNvBQ.js} +1 -1
- package/web/assets/{merge-B-E3iBqN.js → merge-k_TKlNxw.js} +1 -1
- package/web/assets/{mermaid.core-CMc9IFVw.js → mermaid.core-DPF_lBS3.js} +5 -5
- package/web/assets/{message-box-service-CszgyilP.js → message-box-service-BzqjQhzH.js} +1 -1
- package/web/assets/{mindmap-definition-THT77NOG-BJyPV49z.js → mindmap-definition-THT77NOG-D1wx2rOh.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-Csexw-by.js → mobile-dialog-return-service-CDghLsut.js} +1 -1
- package/web/assets/{oauth-callback-3M1eIOPT.js → oauth-callback-B21gNkv-.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-jpfn2XMn.js → pegDiagram-XKGWAZYB-0meuEp8g.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-B2jQ3Egj.js → pieDiagram-E7YTZNPT-jC3klXwe.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-BXSOa8Vi.js → quadrantDiagram-AXDQQJYC-DzQbzknx.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-BTy8Z6ZL.js → railroadDiagram-O6MQD6OU-DwiX_44I.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-eqVPnJ-z.js → requirementDiagram-IS5BZ75X-DdBB28Xn.js} +1 -1
- package/web/assets/{runner-presentation-D66Z9p-O.js → runner-presentation-CjPY5Dey.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-BI5fAwMJ.js → sankeyDiagram-P5KCCOFB-B1WX3WR_.js} +1 -1
- package/web/assets/{sequenceDiagram-WJ2MYXX4-CZ7Un31z.js → sequenceDiagram-WJ2MYXX4-Cz_KunCM.js} +1 -1
- package/web/assets/{session-share-client-service-W0XDwceC.js → session-share-client-service-C-0DdFRE.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-7gQRW3HD.js → sizeCapture-INFHLROL-sB2YOfNo.js} +1 -1
- package/web/assets/{stateDiagram-XQSTLZYL-D23AlrmH.js → stateDiagram-XQSTLZYL-Bwb7A16z.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-DY5Ukxza.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-By9JzeNC.js → swimlanes-V6O3JKXN-BNtAnq9r.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BZu5MiNn.js +8 -0
- package/web/assets/{time-presentation-BRvT6nTd.js → time-presentation-Cz63DSUv.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-CyydVD-f.js → timeline-definition-24CTP7MA-Cs6NtxYd.js} +1 -1
- package/web/assets/{union-BSveQIrm.js → union-C5QcR3bq.js} +1 -1
- package/web/assets/{use-form-common-props-BJ2vZd_0.js → use-form-common-props-C_muwpbj.js} +1 -1
- package/web/assets/{use-wheel-TWRoHAF5.js → use-wheel-7n7Aiy_e.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-3OEbunrh.js → vennDiagram-4TSXK5OY-DQcN4PIp.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-BuZvJTn0.js → wardleyDiagram-VM6X3IG4-B5qQJgni.js} +1 -1
- package/web/assets/{workbench-composer-interaction-controller-BJZsGMk-.js → workbench-composer-interaction-controller-BFZkEbwV.js} +19 -19
- package/web/assets/{workbench-presentation-DblBOxzZ.js → workbench-presentation-DSjYJkKK.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-CQzJStra.js → xychartDiagram-S5SC5T6Z-B8yJLdGw.js} +1 -1
- package/web/docs/404.html +2 -2
- package/web/docs/administration/account.html +4 -4
- package/web/docs/administration/audit.html +4 -4
- package/web/docs/administration/conversation-templates.html +4 -4
- package/web/docs/administration/email-notifications.html +4 -4
- package/web/docs/administration/license.html +5 -5
- package/web/docs/administration/nodes-workspaces.html +4 -4
- package/web/docs/administration/oauth.html +4 -4
- package/web/docs/administration/secrets.html +4 -4
- package/web/docs/administration/template-workspace-maintenance.html +4 -4
- package/web/docs/administration/users-organizations.html +4 -4
- package/web/docs/assets/administration_license.md.CVLEsGB6.js +1 -0
- package/web/docs/assets/{app.DFdypnML.js → app.HBmL36pQ.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.pxMPDJyo.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.Bmvw1ncU.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.P9CapR4-.js → VPLocalSearchBox.9e8uHIOt.js} +1 -1
- package/web/docs/assets/chunks/{theme.DLnKtfGY.js → theme.CXF2ox30.js} +2 -2
- package/web/docs/assets/deployment_network.md.Bbi7-zH2.js +1 -0
- package/web/docs/assets/deployment_network.md.Bbi7-zH2.lean.js +1 -0
- package/web/docs/assets/deployment_upgrade.md.CG_VFxvG.js +1 -0
- package/web/docs/assets/deployment_upgrade.md.CG_VFxvG.lean.js +1 -0
- package/web/docs/assets/en-US_administration_license.md.GCAYq1LT.js +1 -0
- package/web/docs/assets/en-US_deployment_network.md.770EzfaT.js +1 -0
- package/web/docs/assets/en-US_deployment_network.md.770EzfaT.lean.js +1 -0
- package/web/docs/assets/en-US_deployment_upgrade.md.DDevql7U.js +1 -0
- package/web/docs/assets/{en-US_deployment_upgrade.md.DZiDDiLn.lean.js → en-US_deployment_upgrade.md.DDevql7U.lean.js} +1 -1
- package/web/docs/assets/en-US_getting-started_npm-quick-start.md.D46Ec15e.js +3 -0
- package/web/docs/assets/en-US_getting-started_npm-quick-start.md.D46Ec15e.lean.js +1 -0
- package/web/docs/assets/{en-US_getting-started_overview.md.Bug5sh21.js → en-US_getting-started_overview.md.CB-43rGR.js} +1 -1
- package/web/docs/assets/{en-US_getting-started_overview.md.Bug5sh21.lean.js → en-US_getting-started_overview.md.CB-43rGR.lean.js} +1 -1
- package/web/docs/assets/en-US_getting-started_prerequisites.md.BFxGOlUy.js +1 -0
- package/web/docs/assets/en-US_getting-started_prerequisites.md.BFxGOlUy.lean.js +1 -0
- package/web/docs/assets/{en-US_getting-started_server-installation.md._k2XGM85.js → en-US_getting-started_server-installation.md.C7SjGDJt.js} +2 -2
- package/web/docs/assets/getting-started_npm-quick-start.md.CIYjFmiu.js +3 -0
- package/web/docs/assets/getting-started_npm-quick-start.md.CIYjFmiu.lean.js +1 -0
- package/web/docs/assets/{getting-started_overview.md.CA1CCOBc.js → getting-started_overview.md.Cv-HSfAh.js} +1 -1
- package/web/docs/assets/getting-started_prerequisites.md.DjWWTA7V.js +1 -0
- package/web/docs/assets/{getting-started_prerequisites.md.D26KU42D.lean.js → getting-started_prerequisites.md.DjWWTA7V.lean.js} +1 -1
- package/web/docs/assets/{getting-started_server-installation.md.D3P3Lmc2.js → getting-started_server-installation.md.BsEfVH6b.js} +2 -2
- package/web/docs/concepts/architecture.html +4 -4
- package/web/docs/concepts/data-and-security.html +4 -4
- package/web/docs/concepts/files-git-terminal.html +4 -4
- package/web/docs/concepts/node-and-workspace.html +4 -4
- package/web/docs/concepts/permissions-and-sharing.html +4 -4
- package/web/docs/concepts/runner-control.html +4 -4
- package/web/docs/concepts/secrets.html +4 -4
- package/web/docs/concepts/session-run-turn.html +4 -4
- package/web/docs/deployment/backup-restore.html +4 -4
- package/web/docs/deployment/network.html +5 -5
- package/web/docs/deployment/node-installation.html +4 -4
- package/web/docs/deployment/node-linux.html +4 -4
- package/web/docs/deployment/node-macos.html +4 -4
- package/web/docs/deployment/node-windows.html +4 -4
- package/web/docs/deployment/production.html +4 -4
- package/web/docs/deployment/security-checklist.html +4 -4
- package/web/docs/deployment/upgrade.html +5 -5
- package/web/docs/en-US/administration/account.html +4 -4
- package/web/docs/en-US/administration/audit.html +4 -4
- package/web/docs/en-US/administration/conversation-templates.html +4 -4
- package/web/docs/en-US/administration/email-notifications.html +4 -4
- package/web/docs/en-US/administration/license.html +5 -5
- package/web/docs/en-US/administration/nodes-workspaces.html +4 -4
- package/web/docs/en-US/administration/oauth.html +4 -4
- package/web/docs/en-US/administration/secrets.html +4 -4
- package/web/docs/en-US/administration/template-workspace-maintenance.html +4 -4
- package/web/docs/en-US/administration/users-organizations.html +4 -4
- package/web/docs/en-US/concepts/architecture.html +4 -4
- package/web/docs/en-US/concepts/data-and-security.html +4 -4
- package/web/docs/en-US/concepts/files-git-terminal.html +4 -4
- package/web/docs/en-US/concepts/node-and-workspace.html +4 -4
- package/web/docs/en-US/concepts/permissions-and-sharing.html +4 -4
- package/web/docs/en-US/concepts/runner-control.html +4 -4
- package/web/docs/en-US/concepts/secrets.html +4 -4
- package/web/docs/en-US/concepts/session-run-turn.html +4 -4
- package/web/docs/en-US/deployment/backup-restore.html +4 -4
- package/web/docs/en-US/deployment/network.html +5 -5
- package/web/docs/en-US/deployment/node-installation.html +4 -4
- package/web/docs/en-US/deployment/node-linux.html +4 -4
- package/web/docs/en-US/deployment/node-macos.html +4 -4
- package/web/docs/en-US/deployment/node-windows.html +4 -4
- package/web/docs/en-US/deployment/production.html +4 -4
- package/web/docs/en-US/deployment/security-checklist.html +4 -4
- package/web/docs/en-US/deployment/upgrade.html +5 -5
- package/web/docs/en-US/getting-started/connect-node.html +4 -4
- package/web/docs/en-US/getting-started/first-agent-session.html +4 -4
- package/web/docs/en-US/getting-started/first-login.html +4 -4
- package/web/docs/en-US/getting-started/next-steps.html +4 -4
- package/web/docs/en-US/getting-started/npm-quick-start.html +7 -7
- package/web/docs/en-US/getting-started/overview.html +5 -5
- package/web/docs/en-US/getting-started/prerequisites.html +5 -5
- package/web/docs/en-US/getting-started/register-workspace.html +4 -4
- package/web/docs/en-US/getting-started/server-installation.html +6 -6
- package/web/docs/en-US/operations/marctl.html +4 -4
- package/web/docs/en-US/reference/configuration.html +4 -4
- package/web/docs/en-US/reference/keyboard-shortcuts.html +4 -4
- package/web/docs/en-US/reference/limits.html +4 -4
- package/web/docs/en-US/reference/ports-paths-data.html +4 -4
- package/web/docs/en-US/reference/status-and-errors.html +4 -4
- package/web/docs/en-US/runners/claude-code.html +4 -4
- package/web/docs/en-US/runners/codex.html +4 -4
- package/web/docs/en-US/runners/mar-agent.html +4 -4
- package/web/docs/en-US/runners/opencode.html +4 -4
- package/web/docs/en-US/runners/overview.html +4 -4
- package/web/docs/en-US/runners/runner-troubleshooting.html +4 -4
- package/web/docs/en-US/troubleshooting/node-offline.html +4 -4
- package/web/docs/en-US/troubleshooting/quick-diagnosis.html +4 -4
- package/web/docs/en-US/troubleshooting/session-run.html +4 -4
- package/web/docs/en-US/troubleshooting/terminal.html +4 -4
- package/web/docs/en-US/troubleshooting/workspace-files.html +4 -4
- package/web/docs/en-US/workbench/composer.html +4 -4
- package/web/docs/en-US/workbench/context-and-plan.html +4 -4
- package/web/docs/en-US/workbench/conversation.html +4 -4
- package/web/docs/en-US/workbench/file-reference-and-attachment.html +4 -4
- package/web/docs/en-US/workbench/files.html +4 -4
- package/web/docs/en-US/workbench/git-changes.html +4 -4
- package/web/docs/en-US/workbench/git-history.html +4 -4
- package/web/docs/en-US/workbench/hosted-conversations.html +4 -4
- package/web/docs/en-US/workbench/mobile.html +4 -4
- package/web/docs/en-US/workbench/navigation.html +4 -4
- package/web/docs/en-US/workbench/sessions.html +4 -4
- package/web/docs/en-US/workbench/skills.html +4 -4
- package/web/docs/en-US/workbench/terminal.html +4 -4
- package/web/docs/getting-started/connect-node.html +4 -4
- package/web/docs/getting-started/first-agent-session.html +4 -4
- package/web/docs/getting-started/first-login.html +4 -4
- package/web/docs/getting-started/next-steps.html +4 -4
- package/web/docs/getting-started/npm-quick-start.html +7 -7
- package/web/docs/getting-started/overview.html +5 -5
- package/web/docs/getting-started/prerequisites.html +5 -5
- package/web/docs/getting-started/register-workspace.html +4 -4
- package/web/docs/getting-started/server-installation.html +6 -6
- package/web/docs/hashmap.json +1 -1
- package/web/docs/operations/marctl.html +4 -4
- package/web/docs/reference/configuration.html +4 -4
- package/web/docs/reference/keyboard-shortcuts.html +4 -4
- package/web/docs/reference/limits.html +4 -4
- package/web/docs/reference/ports-paths-data.html +4 -4
- package/web/docs/reference/status-and-errors.html +4 -4
- package/web/docs/runners/claude-code.html +4 -4
- package/web/docs/runners/codex.html +4 -4
- package/web/docs/runners/mar-agent.html +4 -4
- package/web/docs/runners/opencode.html +4 -4
- package/web/docs/runners/overview.html +4 -4
- package/web/docs/runners/runner-troubleshooting.html +4 -4
- package/web/docs/troubleshooting/node-offline.html +4 -4
- package/web/docs/troubleshooting/quick-diagnosis.html +4 -4
- package/web/docs/troubleshooting/session-run.html +4 -4
- package/web/docs/troubleshooting/terminal.html +4 -4
- package/web/docs/troubleshooting/workspace-files.html +4 -4
- package/web/docs/workbench/composer.html +4 -4
- package/web/docs/workbench/context-and-plan.html +4 -4
- package/web/docs/workbench/conversation.html +4 -4
- package/web/docs/workbench/file-reference-and-attachment.html +4 -4
- package/web/docs/workbench/files.html +4 -4
- package/web/docs/workbench/git-changes.html +4 -4
- package/web/docs/workbench/git-history.html +4 -4
- package/web/docs/workbench/hosted-conversations.html +4 -4
- package/web/docs/workbench/mobile.html +4 -4
- package/web/docs/workbench/navigation.html +4 -4
- package/web/docs/workbench/sessions.html +4 -4
- package/web/docs/workbench/skills.html +4 -4
- package/web/docs/workbench/terminal.html +4 -4
- package/web/index.html +1 -1
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/web/assets/HtmlPreviewFrame-xgqXo3bD.js +0 -5
- package/web/assets/NodeManagementPage-C1Cj7rex.js +0 -1
- package/web/assets/NodeManagementPage-DRBCipFy.js +0 -1
- package/web/assets/SecretManagementPage-BDo50Fo5.js +0 -1
- package/web/assets/SkillCenterPage-Dl-aKzxp.js +0 -1
- package/web/assets/SystemConfigurationPage-CUI3Icws.js +0 -1
- package/web/assets/WorkbenchPage-C1l73Bo7.css +0 -1
- package/web/assets/WorkspaceManagementPage-0uM3HF3o.js +0 -1
- package/web/assets/WorkspaceManagementPage-DlcAgYsx.js +0 -1
- package/web/assets/channel-D5Au5X55.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-CplRLUOK.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-CplRLUOK.js +0 -1
- package/web/assets/infoDiagram-FKFFQAWI-ZeaWiVDx.js +0 -2
- package/web/assets/stateDiagram-v2-IH3M54BS-D93lsHZ8.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-C3UEWonA.js +0 -8
- package/web/docs/assets/administration_license.md.Bf1iyuKG.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.BEf68FQA.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.Dw4g7XXs.js +0 -1
- package/web/docs/assets/deployment_network.md.BarghfLt.js +0 -1
- package/web/docs/assets/deployment_network.md.BarghfLt.lean.js +0 -1
- package/web/docs/assets/deployment_upgrade.md.BESOToM5.js +0 -1
- package/web/docs/assets/deployment_upgrade.md.BESOToM5.lean.js +0 -1
- package/web/docs/assets/en-US_administration_license.md.Dmg8rNEl.js +0 -1
- package/web/docs/assets/en-US_deployment_network.md.DdOgOLns.js +0 -1
- package/web/docs/assets/en-US_deployment_network.md.DdOgOLns.lean.js +0 -1
- package/web/docs/assets/en-US_deployment_upgrade.md.DZiDDiLn.js +0 -1
- package/web/docs/assets/en-US_getting-started_npm-quick-start.md.Dwsi-ffA.js +0 -3
- package/web/docs/assets/en-US_getting-started_npm-quick-start.md.Dwsi-ffA.lean.js +0 -1
- package/web/docs/assets/en-US_getting-started_prerequisites.md.Bpx_AQD1.js +0 -1
- package/web/docs/assets/en-US_getting-started_prerequisites.md.Bpx_AQD1.lean.js +0 -1
- package/web/docs/assets/getting-started_npm-quick-start.md.CcxMwUgz.js +0 -3
- package/web/docs/assets/getting-started_npm-quick-start.md.CcxMwUgz.lean.js +0 -1
- package/web/docs/assets/getting-started_prerequisites.md.D26KU42D.js +0 -1
- /package/web/docs/assets/{administration_license.md.Bf1iyuKG.lean.js → administration_license.md.CVLEsGB6.lean.js} +0 -0
- /package/web/docs/assets/{en-US_administration_license.md.Dmg8rNEl.lean.js → en-US_administration_license.md.GCAYq1LT.lean.js} +0 -0
- /package/web/docs/assets/{en-US_getting-started_server-installation.md._k2XGM85.lean.js → en-US_getting-started_server-installation.md.C7SjGDJt.lean.js} +0 -0
- /package/web/docs/assets/{getting-started_overview.md.CA1CCOBc.lean.js → getting-started_overview.md.Cv-HSfAh.lean.js} +0 -0
- /package/web/docs/assets/{getting-started_server-installation.md.D3P3Lmc2.lean.js → getting-started_server-installation.md.BsEfVH6b.lean.js} +0 -0
package/web/assets/{StandaloneFilePreviewPage-b-piNuN1.js → StandaloneFilePreviewPage-_Lh1H6-k.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as Ze,d as et,aL as tt,a as b,D as nt,Y as at,L as ot,o as p,b as P,u,p as B,G as X,aM as rt,v as x,H as j,O as ue,E as Te,I as Re,t as Z,g as _e,ad as it,q as st,c as ee,s as Ne,_ as lt}from"./index-DsgwAvJA.js";import{E as dt}from"./message-box-service-CszgyilP.js";import{d as ct,r as ut,a as ft,c as vt,b as wt,m as mt,e as fe,f as Fe,g as De,h as pt,i as gt,j as ht,H as yt,W as It,k as kt,l as bt,n as Pt,w as Et,o as St,t as Tt,p as Rt}from"./HtmlPreviewFrame-xgqXo3bD.js";import{c as _t}from"./session-share-client-service-W0XDwceC.js";import{c as Nt,a as Ft,i as Le,s as ve,u as Dt,f as Oe,d as Ce,F as Lt,b as we}from"./FilePreviewLoading-CqXCVUDH.js";import{f as Ot}from"./error-presentation-CJfLHEK_.js";import Ct from"./MarkdownFilePreview-CnWvYfKN.js";import{f as At}from"./file-presentation-Cm7tx53N.js";import"./mobile-dialog-return-service-Csexw-by.js";import"./el-input-DRF3bOe1.js";import"./use-form-common-props-BJ2vZd_0.js";import"./el-form-item-Fjp3w344.js";import"./el-switch-Cpl2xxJc.js";import"./MarIcon-0cJTzTai.js";import"./BusyIndicator-DJEYrwl2.js";const Ut="/assets/github-markdown-light-DWnTz46N.css",xt=800;function Wt(g){function te(){return{...g.repositoryPath===void 0?{}:{repositoryPath:g.repositoryPath},...g.worktreePath===void 0?{}:{worktreePath:g.worktreePath}}}let _=!0,E,O=0,a;const w=new Promise(l=>{a=l}),D=setTimeout(()=>a?.(!1),xt),y=vt({send:l=>W.sendDirect(l),shouldRetryProbe:(l,f)=>_&&l===g.nodeId&&f===E}),W=Nt({canConnect:()=>_,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(l,f)=>{l===g.nodeId&&!f&&y.invalidateNode(l)},onNodeReplaced:l=>y.invalidateNode(l),onReconnect:()=>{},onDisconnected:()=>y.invalidateControlConnection(),onReady:(l,f)=>{f||y.invalidateNetwork(),V()},onDirectMessage:l=>y.handle(l),onUnauthenticated:()=>F(!1),onInvalidMessage:()=>{}});async function V(){const l=++O;try{const f=await fetch(`/api/nodes/${encodeURIComponent(g.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!f.ok)throw new Error("DIRECT_UNAVAILABLE");const o=(await f.json()).manifest;if(!_||l!==O)return;if(o?.directTransfer?.apiVersion!==3||o.directTransfer.transport!==!0||o.directTransfer.download!==!0||typeof o.nodeGeneration!="string"){F(!1);return}E=o.nodeGeneration;const L=await y.ensureTransport(g.nodeId,E);_&&l===O&&F(L==="DIRECT_AVAILABLE")}catch{_&&l===O&&F(!1)}}function F(l){clearTimeout(D),a?.(l),a=void 0}async function N(l,f=!0){if(Ze(l)||f&&!await w)return;const h=E;if(!_||h===void 0||!y.isConnected(g.nodeId,h))return;const o={kind:"WORKSPACE_FILE",workspaceId:g.workspaceId,path:l,...te()};return{direct:y,nodeId:g.nodeId,nodeGeneration:h,resource:o,metadata:async()=>{const L=await wt({nodeId:g.nodeId,resource:o,request:async S=>{const T=await fetch(S,{credentials:"same-origin"});return T.ok?T.json():{}}});return _?L:void 0}}}async function $(l,f,h,o){const L=await N(l);if(L!==void 0)return ut({...L,fileName:l.split("/").at(-1)??"file",offset:f,length:h,...o===void 0?{}:{identity:o}}).catch(()=>{})}async function H(l){const f=await N(l);return f===void 0?void 0:ft(f)}async function K(l){const f=await N(l,!1);return f===void 0||g.activeDownloadWorker===void 0?"UNAVAILABLE":ct({...f,activeWorker:g.activeDownloadWorker})}function z(){y.invalidateNetwork()}function I(){_=!1,O+=1,F(!1),y.invalidateNetwork(),W.close()}return W.connect(),{objectUrl:H,readRange:$,download:K,networkChanged:z,close:I}}const $t=["href"],zt={key:0,class:"standalone-error"},Mt={class:"standalone-markdown-header html-preview-header"},jt={key:0},Vt={class:"standalone-markdown-header"},Bt={key:0},Ht={class:"standalone-preview-body"},Kt={key:1,class:"markdown-preview-page"},qt={key:0,class:"standalone-error"},Jt=et({__name:"StandaloneFilePreviewPage",props:{share:{}},emits:["close"],setup(g,{emit:te}){const _=tt(),E=g,O=te,a=new URLSearchParams(E.share?.intent??location.search),w=E.share?.access;if(w!==void 0){const n=w.session.value.share;a.set("nodeId",n.nodeId),a.set("workspaceId",n.workspaceId),a.delete("write"),a.delete("source"),a.delete("worktreePath"),a.delete("repositoryPath")}const D={...a.has("repositoryPath")?{repositoryPath:a.get("repositoryPath")}:{},...a.has("worktreePath")?{worktreePath:a.get("worktreePath")}:{}},y=w===void 0?void 0:_t(w,w.session.value.share),W=Ft(void 0,w===void 0?"workbench":`share:${w.session.value.share.id}`),V=!a.has("repositoryPath")&&a.get("markdownPreview")==="1",F=!a.has("repositoryPath")&&a.get("htmlPreview")==="1",N=V||F,$=a.get("source")==="hosted",H=w===void 0?"":`:share:${w.session.value.share.id}`,K="mar.standalone-file-tabs.v1"+H,z="mar.standalone-file-drafts.v1"+H,I=b([]),l=b(),f=b(),h=b(Me()),o=b(),L=b(),S=b(""),T=b(),k=b(),R=b(!0),q=b(!1),me=b(w===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),Ae=w===void 0&&a.get("write")==="1"&&Object.keys(D).length===0,pe=y??Rt({csrfToken:()=>me.value,renewCsrfToken:Je}),ne=Pt(pe),C=ne.state,J=ee(()=>C.value.error!==void 0?Ot(C.value.error,a.get("path")??""):S.value===""?"":Z(S.value)),Ue=ee(()=>C.value.url!==void 0&&new URL(C.value.url).hostname===location.hostname),ae=mt().preference,xe=ee(()=>({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">${Ge(ae.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),We=Number(a.get("line"))||void 0,$e=Number(a.get("column"))||void 0,oe=ee(()=>o.value===void 0?"unsupported":Oe(o.value.path,o.value.encoding));let A,re,Y=!1;function ze(){if(N)return;const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null)return;let r=[];try{const c=E.share?.embedded?[]:JSON.parse(sessionStorage.getItem(K)??"[]");Array.isArray(c)&&(r=c.filter(je))}catch{r=[]}const i={kind:ve(t,a.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:n,workspaceId:e,path:t,repositoryPath:a.get("repositoryPath")??"",worktreePath:a.get("worktreePath")??"",...a.has("repositoryPath")?{gitFile:!0}:{},...Number(a.get("line"))>0?{targetLine:Number(a.get("line"))}:{},...Number(a.get("column"))>0?{targetColumn:Number(a.get("column"))}:{}},s=Et(i),v=r.find(c=>c.identity===s),m=v===void 0?{...i,id:Math.max(0,...r.map(c=>c.id))+1,identity:s,fileName:St(t),url:location.href}:{...v,...i,url:location.href};I.value=[...r.filter(c=>c.identity!==s),m].slice(-20),l.value=m.id,ie()}function Me(){try{const n=JSON.parse(sessionStorage.getItem(z)??"[]");return Array.isArray(n)?n.filter(ge):[]}catch{return[]}}function je(n){if(typeof n!="object"||n===null)return!1;const e=n;if(!Number.isSafeInteger(e.id)||e.kind!=="WORKTREE_TEXT"&&e.kind!=="WORKTREE_PREVIEW"||typeof e.identity!="string"||typeof e.nodeId!="string"||typeof e.workspaceId!="string"||typeof e.path!="string"||typeof e.fileName!="string"||typeof e.url!="string")return!1;try{const t=new URL(e.url,location.href);return t.origin===location.origin&&t.pathname===location.pathname&&t.searchParams.get("standaloneFile")==="1"&&t.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function ge(n){if(typeof n!="object"||n===null)return!1;const e=n;return typeof e.tabIdentity=="string"&&typeof e.path=="string"&&typeof e.content=="string"&&typeof e.expectedRevision=="string"}function ie(){!N&&!E.share?.embedded&&sessionStorage.setItem(K,JSON.stringify(I.value))}function Ve(n){const e=I.value.find(t=>t.id===n);e===void 0||n===l.value||(se(),location.replace(e.url))}function Be(n){const e=I.value.findIndex(i=>i.id===n);if(e<0)return;const t=I.value.filter(i=>i.id!==n),r=I.value[e];if(I.value=t,he(r.identity),ie(),t.length===0){le();return}if(n!==l.value)return;const d=t[Math.min(e,t.length-1)];d!==void 0&&location.replace(d.url)}function se(){const n=f.value?.captureDirtyDrafts().filter(ge)??[];if(n.length===0)return;const e=new Set(n.map(t=>t.tabIdentity));h.value=[...h.value.filter(t=>!e.has(t.tabIdentity)),...n],sessionStorage.setItem(z,JSON.stringify(h.value))}async function He(n){const e=I.value.find(t=>t.id===n);if(e===void 0||!h.value.some(t=>t.tabIdentity===e.identity))return!0;try{return await dt.confirm(Z("fileEditor.unsavedMessage"),Z("fileEditor.unsavedTitle"),{closeIcon:Ne("close"),icon:Ne("warning"),type:"warning"}),!0}catch{return!1}}function Ke(){I.value=[],h.value=[],ie(),sessionStorage.removeItem(z),le()}function he(n){h.value=h.value.filter(e=>e.tabIdentity!==n),sessionStorage.setItem(z,JSON.stringify(h.value))}ze(),nt(async()=>{N?de.mount():window.addEventListener("mar-before-standalone-navigation",se),window.addEventListener("online",G),window.addEventListener("offline",G);const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null){S.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(!$&&w===void 0&&(A=Wt({nodeId:n,workspaceId:e,activeDownloadWorker:_.activeWorker,...D})),document.title=`${t.split("/").at(-1)??t} · MyAgentRoam`,F){R.value=!0,!$&&Le(t)&&Object.keys(D).length===0?await ne.open({nodeId:n,workspaceId:e,path:t}):S.value="htmlPreview.unavailable",R.value=!1;return}await ye()});async function ye(n=!1){const e=a.get("nodeId"),t=a.get("workspaceId"),r=a.get("path");if(e===null||t===null||r===null)return;R.value=!0,S.value="",re=void 0,Y=!1,k.value!==void 0&&fe(k.value),k.value=void 0;const d=ve(r);if(o.value={path:r,encoding:d?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},T.value=void 0,$){await qe(e,r);return}try{if(Dt(r)&&a.get("rawContent")==="1"){const s=n?void 0:await Fe(r,async()=>A?.objectUrl(r));if(s!==void 0){k.value=s.url,o.value={path:r,size:s.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:s.revision},T.value=s.url;return}const v=await ke(e,t,r,0,!1,1);o.value={path:r,...v.size===void 0?{}:{size:v.size},encoding:"base64",content:"",truncated:!1,nextOffset:null},T.value=Q(e,t,r);return}const i=await De(s=>ke(e,t,r,0,!n,s));if(i.encoding==="base64"){if(k.value!==void 0&&fe(k.value),o.value={...i,content:"",truncated:!1,nextOffset:null},Oe(r,"base64")==="unsupported")return;const s=n?void 0:await Fe(r,async()=>A?.objectUrl(r));if(k.value=s?.url,s!==void 0){T.value=k.value;return}T.value=Q(e,t,r)}else o.value={...i,truncated:i.nextOffset!==null,nextOffset:i.nextOffset}}catch{if(!n&&Y){await ye(!0);return}S.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function qe(n,e){const t=a.get("conversationId"),r=a.get("fileId"),d=a.get("mimeType")??"";let i=Number(a.get("size"));if(t===null||a.get("workspaceId")!==t||r===null||!Number.isSafeInteger(i)||i<0){S.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",R.value=!1;return}const s=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(t)}/files/${encodeURIComponent(r)}/content`,v=ve(e,d);if(o.value={path:e,size:i,encoding:v?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},!v){T.value=s,R.value=!1;return}try{if(i===0){const m=await fetch(s,{credentials:"same-origin",method:"HEAD"});if(!m.ok)throw new Error(`REQUEST_FAILED_${m.status}`);const c=m.headers.get("content-length");if(c===null||!Number.isSafeInteger(Number(c))||Number(c)<0)throw new Error("NODE_RESPONSE_INVALID");if(i=Number(c),i===0){o.value={path:e,size:i,encoding:"utf-8",content:"",truncated:!1,nextOffset:null};return}}o.value=await De(async m=>{const c=await fetch(s,{credentials:"same-origin",headers:{Range:`bytes=0-${m-1}`}});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);const U=new Uint8Array(await c.arrayBuffer()),Se=c.headers.get("content-range")?.match(/\/(\d+)$/u)?.[1],M=Se===void 0?i:Number(Se);if(!Number.isSafeInteger(M)||M<0)throw new Error("NODE_RESPONSE_INVALID");const ce=Ce(U,e,U.byteLength>=M,d);return{path:e,size:M,...ce,truncated:ce.encoding==="utf-8"&&U.byteLength<M,nextOffset:ce.encoding==="utf-8"&&U.byteLength<M?U.byteLength:null}}),o.value.encoding==="base64"&&(T.value=s)}catch{S.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function Je(){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 e=await n.json();if(typeof e.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return me.value=e.csrfToken,sessionStorage.setItem("mar.user.csrf-token",e.csrfToken),e.csrfToken}async function Ye(n,e){const t=a.get("nodeId"),r=a.get("workspaceId"),d=a.get("path");if(t===null||r===null||d===null||o.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const i=await pe.request(`/api/workspaces/${encodeURIComponent(r)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:t,path:d,content:n,expectedRevision:e})});if(typeof i.file?.revision!="string"||typeof i.file.size!="number"||!Number.isSafeInteger(i.file.size)||i.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return o.value!==void 0&&(o.value={...o.value,content:n,revision:i.file.revision,size:i.file.size}),i.file.revision}at(()=>{ne.release(),N?de.dispose():window.removeEventListener("mar-before-standalone-navigation",se),window.removeEventListener("online",G),window.removeEventListener("offline",G),A?.close(),k.value!==void 0&&fe(k.value)});async function Ie(){if(o.value!==void 0){q.value=!0;try{const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null)return;if($){const i=a.get("conversationId"),s=a.get("fileId");if(i===null||s===null)return;const v=document.createElement("a");v.href=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(i)}/files/${encodeURIComponent(s)}/content?download=1`,v.download=t.split("/").at(-1)??"download",v.click();return}if(k.value?.startsWith("blob:")){Tt(k.value,t.split("/").at(-1)??"download");return}const r=await A?.download(t);if(r!==void 0&&r!=="UNAVAILABLE")return;const d=document.createElement("a");d.href=Q(n,e,t,!0),d.download=o.value.path.split("/").at(-1)??"download",d.click()}finally{q.value=!1}}}function G(){A?.networkChanged()}async function ke(n,e,t,r,d=!0,i=512*1024){const s=d?await A?.readRange(t,r,i,re):void 0;if(s!==void 0){Y=!0,re={revision:s.revision,size:s.size};const c=await pt(s),U=Ce(s.bytes,t,s.nextOffset===null);return{path:t,size:s.size,...U,truncated:s.nextOffset!==null,nextOffset:s.nextOffset,...c===void 0?{}:{revision:c}}}if(d&&Y)throw new Error("DIRECT_FILE_READ_FAILED");const v=new URLSearchParams({nodeId:n,path:t,offset:String(r),limit:String(i),...D});let m;if(y!==void 0)m=await y.request(`/api/workspaces/${encodeURIComponent(e)}/files/read?${v.toString()}`);else{const c=await fetch(`/api/workspaces/${encodeURIComponent(e)}/files/read?${v.toString()}`,{credentials:"same-origin"});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);m=await c.json()}if(m.file===void 0||m.file.encoding!=="utf-8"&&m.file.encoding!=="base64"||m.file.nextOffset!==null&&!Number.isSafeInteger(m.file.nextOffset))throw new Error("NODE_RESPONSE_INVALID");return gt(m.file,t)}function Ge(n){return n.replace(/[&<>]/g,e=>e==="&"?"&":e==="<"?"<":">")}function le(){if(E.share?.embedded){O("close");return}window.close()}function be(){return le(),!0}const de=ht({isOpen:()=>N,closeWindow:be,closeTab:be});function Qe(n){de.bindFrame(n)}function Pe(n){const e=a.get("nodeId"),t=a.get("workspaceId");return e===null||t===null?"":Q(e,t,n)}function Ee(n){const e=a.get("nodeId"),t=a.get("workspaceId");if(e===null||t===null)return;const r=new URLSearchParams({standaloneFile:"1",...we(n)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:e,workspaceId:t,path:n}),d=`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`;w!==void 0?W.open(d):location.assign(d)}function Xe(n){const e=a.get("nodeId"),t=a.get("workspaceId");if(e===null||t===null)return;const r=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:e,workspaceId:t,path:n});W.open(`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`)===void 0&&(S.value="htmlPreview.unavailable")}function Q(n,e,t,r=!1){const d=new URLSearchParams({nodeId:n,path:t,...r?{download:"1"}:{},...D}),i=`/api/workspaces/${encodeURIComponent(e)}/files/content?${d.toString()}`;return y?.resourceUrl(i)??i}return(n,e)=>{const t=ot("tooltip");return p(),P(ue,null,[u(V)?(p(),B(rt,{key:0,to:"head"},[X("link",{rel:"stylesheet",href:u(Ut)},null,8,$t)])):x("",!0),u(N)?(p(),P("main",{key:1,ref_key:"standaloneRoot",ref:L,class:"standalone-file-preview"},[J.value?(p(),P("p",zt,j(J.value),1)):u(F)?(p(),P(ue,{key:1},[X("header",Mt,[Te((p(),P("code",null,[Re(j(u(a).get("path")),1)])),[[t,u(a).get("path")??""]]),u(C).url?(p(),P("small",jt,j(u(Z)(Ue.value?"htmlPreview.trustedWarning":"htmlPreview.isolatedWarning")),1)):x("",!0)]),_e(yt,{url:u(C).url,loading:R.value||u(C).loading,title:u(a).get("path")??"",onLoad:Qe},null,8,["url","loading","title"])],64)):u(V)?(p(),P(ue,{key:2},[X("header",Vt,[Te((p(),P("code",null,[Re(j(u(a).get("path")??o.value?.path),1)])),[[t,u(a).get("path")??o.value?.path??""]]),o.value?.size!==void 0?(p(),P("small",Bt,j(u(At)(o.value.size??0)),1)):x("",!0)]),X("div",Ht,[R.value?(p(),B(Lt,{key:0,variant:"page",overlay:""})):o.value&&u(we)(o.value.path)?(p(),P("main",Kt,[_e(Ct,{content:o.value.content,path:o.value.path,"resource-url":Pe,"standard-style":"",onOpenFile:Ee},null,8,["content","path"]),u(ae).watermarkEnabled&&u(ae).watermarkText?(p(),P("div",{key:0,class:"markdown-watermark",style:it(xe.value),"aria-hidden":"true"},null,4)):x("",!0)])):x("",!0)])],64)):x("",!0)],512)):(p(),B(bt,{key:2,ref_key:"standaloneFileTabs",ref:f,presentation:E.share?.embedded?"overlay":"window",tabs:I.value,"active-tab-id":l.value,"can-close-unmounted-tab":He,onActivate:Ve,onClose:Be,onCloseAll:Ke},{default:st(({tab:r,active:d,registerPageHandle:i,requestClose:s})=>[d&&J.value?(p(),P("p",qt,j(J.value),1)):d&&o.value&&oe.value==="text"?(p(),B(It,{key:1,ref:i,active:d,file:o.value,kind:oe.value,loading:R.value,downloading:q.value,"target-line":u(We),"target-column":u($e),"write-enabled":u(Ae),html:u(Le)(o.value.path)&&Object.keys(D).length===0,markdown:!u(a).has("repositoryPath")&&u(we)(o.value.path),"markdown-resource-url":Pe,"save-file":Ye,"tab-identity":r.identity,"initial-dirty-draft":h.value.find(v=>v.tabIdentity===r.identity&&v.path===r.path),onClose:s,onDownload:Ie,onOpenHtmlPreview:e[0]||(e[0]=v=>Xe(o.value.path)),onOpenMarkdownPreview:e[1]||(e[1]=v=>Ee(o.value.path)),onDirtyDraftApplied:he},null,8,["active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose"])):d&&o.value?(p(),B(kt,{key:2,ref:i,active:d,file:o.value,"content-url":T.value,kind:oe.value,loading:R.value,downloading:q.value,onClose:s,onDownload:Ie},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):x("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),un=lt(Jt,[["__scopeId","data-v-f08fdd09"]]);export{un as default};
|
|
1
|
+
import{n as Ze,d as et,aL as tt,a as b,D as nt,Y as at,L as ot,o as p,b as P,u,p as B,G as X,aM as rt,v as x,H as j,O as ue,E as Te,I as Re,t as Z,g as _e,ad as it,q as st,c as ee,s as Ne,_ as lt}from"./index-tebwt16R.js";import{E as dt}from"./message-box-service-BzqjQhzH.js";import{d as ct,r as ut,a as ft,c as vt,b as wt,m as mt,e as fe,f as Fe,g as De,h as pt,i as gt,j as ht,H as yt,W as It,k as kt,l as bt,n as Pt,w as Et,o as St,t as Tt,p as Rt}from"./HtmlPreviewFrame-DQimcizh.js";import{c as _t}from"./session-share-client-service-C-0DdFRE.js";import{c as Nt,a as Ft,i as Le,s as ve,u as Dt,f as Oe,d as Ce,F as Lt,b as we}from"./FilePreviewLoading-EXabASKn.js";import{f as Ot}from"./error-presentation-CKm32JzU.js";import Ct from"./MarkdownFilePreview-DRxwzEkP.js";import{f as At}from"./file-presentation-Cm7tx53N.js";import"./mobile-dialog-return-service-CDghLsut.js";import"./el-input-DsD8wPgd.js";import"./use-form-common-props-C_muwpbj.js";import"./el-form-item-CjLvz7IR.js";import"./el-switch-D49n4nYq.js";import"./MarIcon-DRzNI1TJ.js";import"./BusyIndicator-81gYfHFI.js";const Ut="/assets/github-markdown-light-DWnTz46N.css",xt=800;function Wt(g){function te(){return{...g.repositoryPath===void 0?{}:{repositoryPath:g.repositoryPath},...g.worktreePath===void 0?{}:{worktreePath:g.worktreePath}}}let _=!0,E,O=0,a;const w=new Promise(l=>{a=l}),D=setTimeout(()=>a?.(!1),xt),y=vt({send:l=>W.sendDirect(l),shouldRetryProbe:(l,f)=>_&&l===g.nodeId&&f===E}),W=Nt({canConnect:()=>_,onEvent:()=>{},onResyncRequired:()=>{},onNodeConnection:(l,f)=>{l===g.nodeId&&!f&&y.invalidateNode(l)},onNodeReplaced:l=>y.invalidateNode(l),onReconnect:()=>{},onDisconnected:()=>y.invalidateControlConnection(),onReady:(l,f)=>{f||y.invalidateNetwork(),V()},onDirectMessage:l=>y.handle(l),onUnauthenticated:()=>F(!1),onInvalidMessage:()=>{}});async function V(){const l=++O;try{const f=await fetch(`/api/nodes/${encodeURIComponent(g.nodeId)}/workbench-capabilities`,{credentials:"same-origin"});if(!f.ok)throw new Error("DIRECT_UNAVAILABLE");const o=(await f.json()).manifest;if(!_||l!==O)return;if(o?.directTransfer?.apiVersion!==3||o.directTransfer.transport!==!0||o.directTransfer.download!==!0||typeof o.nodeGeneration!="string"){F(!1);return}E=o.nodeGeneration;const L=await y.ensureTransport(g.nodeId,E);_&&l===O&&F(L==="DIRECT_AVAILABLE")}catch{_&&l===O&&F(!1)}}function F(l){clearTimeout(D),a?.(l),a=void 0}async function N(l,f=!0){if(Ze(l)||f&&!await w)return;const h=E;if(!_||h===void 0||!y.isConnected(g.nodeId,h))return;const o={kind:"WORKSPACE_FILE",workspaceId:g.workspaceId,path:l,...te()};return{direct:y,nodeId:g.nodeId,nodeGeneration:h,resource:o,metadata:async()=>{const L=await wt({nodeId:g.nodeId,resource:o,request:async S=>{const T=await fetch(S,{credentials:"same-origin"});return T.ok?T.json():{}}});return _?L:void 0}}}async function $(l,f,h,o){const L=await N(l);if(L!==void 0)return ut({...L,fileName:l.split("/").at(-1)??"file",offset:f,length:h,...o===void 0?{}:{identity:o}}).catch(()=>{})}async function H(l){const f=await N(l);return f===void 0?void 0:ft(f)}async function K(l){const f=await N(l,!1);return f===void 0||g.activeDownloadWorker===void 0?"UNAVAILABLE":ct({...f,activeWorker:g.activeDownloadWorker})}function z(){y.invalidateNetwork()}function I(){_=!1,O+=1,F(!1),y.invalidateNetwork(),W.close()}return W.connect(),{objectUrl:H,readRange:$,download:K,networkChanged:z,close:I}}const $t=["href"],zt={key:0,class:"standalone-error"},Mt={class:"standalone-markdown-header html-preview-header"},jt={key:0},Vt={class:"standalone-markdown-header"},Bt={key:0},Ht={class:"standalone-preview-body"},Kt={key:1,class:"markdown-preview-page"},qt={key:0,class:"standalone-error"},Jt=et({__name:"StandaloneFilePreviewPage",props:{share:{}},emits:["close"],setup(g,{emit:te}){const _=tt(),E=g,O=te,a=new URLSearchParams(E.share?.intent??location.search),w=E.share?.access;if(w!==void 0){const n=w.session.value.share;a.set("nodeId",n.nodeId),a.set("workspaceId",n.workspaceId),a.delete("write"),a.delete("source"),a.delete("worktreePath"),a.delete("repositoryPath")}const D={...a.has("repositoryPath")?{repositoryPath:a.get("repositoryPath")}:{},...a.has("worktreePath")?{worktreePath:a.get("worktreePath")}:{}},y=w===void 0?void 0:_t(w,w.session.value.share),W=Ft(void 0,w===void 0?"workbench":`share:${w.session.value.share.id}`),V=!a.has("repositoryPath")&&a.get("markdownPreview")==="1",F=!a.has("repositoryPath")&&a.get("htmlPreview")==="1",N=V||F,$=a.get("source")==="hosted",H=w===void 0?"":`:share:${w.session.value.share.id}`,K="mar.standalone-file-tabs.v1"+H,z="mar.standalone-file-drafts.v1"+H,I=b([]),l=b(),f=b(),h=b(Me()),o=b(),L=b(),S=b(""),T=b(),k=b(),R=b(!0),q=b(!1),me=b(w===void 0?sessionStorage.getItem("mar.user.csrf-token")??"":""),Ae=w===void 0&&a.get("write")==="1"&&Object.keys(D).length===0,pe=y??Rt({csrfToken:()=>me.value,renewCsrfToken:Je}),ne=Pt(pe),C=ne.state,J=ee(()=>C.value.error!==void 0?Ot(C.value.error,a.get("path")??""):S.value===""?"":Z(S.value)),Ue=ee(()=>C.value.url!==void 0&&new URL(C.value.url).hostname===location.hostname),ae=mt().preference,xe=ee(()=>({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">${Ge(ae.value.watermarkText)}</text></pattern></defs><rect width="100%" height="100%" fill="url(#watermark)"/></svg>`)}")`})),We=Number(a.get("line"))||void 0,$e=Number(a.get("column"))||void 0,oe=ee(()=>o.value===void 0?"unsupported":Oe(o.value.path,o.value.encoding));let A,re,Y=!1;function ze(){if(N)return;const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null)return;let r=[];try{const c=E.share?.embedded?[]:JSON.parse(sessionStorage.getItem(K)??"[]");Array.isArray(c)&&(r=c.filter(je))}catch{r=[]}const i={kind:ve(t,a.get("mimeType")??"")?"WORKTREE_TEXT":"WORKTREE_PREVIEW",nodeId:n,workspaceId:e,path:t,repositoryPath:a.get("repositoryPath")??"",worktreePath:a.get("worktreePath")??"",...a.has("repositoryPath")?{gitFile:!0}:{},...Number(a.get("line"))>0?{targetLine:Number(a.get("line"))}:{},...Number(a.get("column"))>0?{targetColumn:Number(a.get("column"))}:{}},s=Et(i),v=r.find(c=>c.identity===s),m=v===void 0?{...i,id:Math.max(0,...r.map(c=>c.id))+1,identity:s,fileName:St(t),url:location.href}:{...v,...i,url:location.href};I.value=[...r.filter(c=>c.identity!==s),m].slice(-20),l.value=m.id,ie()}function Me(){try{const n=JSON.parse(sessionStorage.getItem(z)??"[]");return Array.isArray(n)?n.filter(ge):[]}catch{return[]}}function je(n){if(typeof n!="object"||n===null)return!1;const e=n;if(!Number.isSafeInteger(e.id)||e.kind!=="WORKTREE_TEXT"&&e.kind!=="WORKTREE_PREVIEW"||typeof e.identity!="string"||typeof e.nodeId!="string"||typeof e.workspaceId!="string"||typeof e.path!="string"||typeof e.fileName!="string"||typeof e.url!="string")return!1;try{const t=new URL(e.url,location.href);return t.origin===location.origin&&t.pathname===location.pathname&&t.searchParams.get("standaloneFile")==="1"&&t.searchParams.get("markdownPreview")!=="1"}catch{return!1}}function ge(n){if(typeof n!="object"||n===null)return!1;const e=n;return typeof e.tabIdentity=="string"&&typeof e.path=="string"&&typeof e.content=="string"&&typeof e.expectedRevision=="string"}function ie(){!N&&!E.share?.embedded&&sessionStorage.setItem(K,JSON.stringify(I.value))}function Ve(n){const e=I.value.find(t=>t.id===n);e===void 0||n===l.value||(se(),location.replace(e.url))}function Be(n){const e=I.value.findIndex(i=>i.id===n);if(e<0)return;const t=I.value.filter(i=>i.id!==n),r=I.value[e];if(I.value=t,he(r.identity),ie(),t.length===0){le();return}if(n!==l.value)return;const d=t[Math.min(e,t.length-1)];d!==void 0&&location.replace(d.url)}function se(){const n=f.value?.captureDirtyDrafts().filter(ge)??[];if(n.length===0)return;const e=new Set(n.map(t=>t.tabIdentity));h.value=[...h.value.filter(t=>!e.has(t.tabIdentity)),...n],sessionStorage.setItem(z,JSON.stringify(h.value))}async function He(n){const e=I.value.find(t=>t.id===n);if(e===void 0||!h.value.some(t=>t.tabIdentity===e.identity))return!0;try{return await dt.confirm(Z("fileEditor.unsavedMessage"),Z("fileEditor.unsavedTitle"),{closeIcon:Ne("close"),icon:Ne("warning"),type:"warning"}),!0}catch{return!1}}function Ke(){I.value=[],h.value=[],ie(),sessionStorage.removeItem(z),le()}function he(n){h.value=h.value.filter(e=>e.tabIdentity!==n),sessionStorage.setItem(z,JSON.stringify(h.value))}ze(),nt(async()=>{N?de.mount():window.addEventListener("mar-before-standalone-navigation",se),window.addEventListener("online",G),window.addEventListener("offline",G);const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null){S.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid";return}if(!$&&w===void 0&&(A=Wt({nodeId:n,workspaceId:e,activeDownloadWorker:_.activeWorker,...D})),document.title=`${t.split("/").at(-1)??t} · MyAgentRoam`,F){R.value=!0,!$&&Le(t)&&Object.keys(D).length===0?await ne.open({nodeId:n,workspaceId:e,path:t}):S.value="htmlPreview.unavailable",R.value=!1;return}await ye()});async function ye(n=!1){const e=a.get("nodeId"),t=a.get("workspaceId"),r=a.get("path");if(e===null||t===null||r===null)return;R.value=!0,S.value="",re=void 0,Y=!1,k.value!==void 0&&fe(k.value),k.value=void 0;const d=ve(r);if(o.value={path:r,encoding:d?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},T.value=void 0,$){await qe(e,r);return}try{if(Dt(r)&&a.get("rawContent")==="1"){const s=n?void 0:await Fe(r,async()=>A?.objectUrl(r));if(s!==void 0){k.value=s.url,o.value={path:r,size:s.size,encoding:"base64",content:"",truncated:!1,nextOffset:null,revision:s.revision},T.value=s.url;return}const v=await ke(e,t,r,0,!1,1);o.value={path:r,...v.size===void 0?{}:{size:v.size},encoding:"base64",content:"",truncated:!1,nextOffset:null},T.value=Q(e,t,r);return}const i=await De(s=>ke(e,t,r,0,!n,s));if(i.encoding==="base64"){if(k.value!==void 0&&fe(k.value),o.value={...i,content:"",truncated:!1,nextOffset:null},Oe(r,"base64")==="unsupported")return;const s=n?void 0:await Fe(r,async()=>A?.objectUrl(r));if(k.value=s?.url,s!==void 0){T.value=k.value;return}T.value=Q(e,t,r)}else o.value={...i,truncated:i.nextOffset!==null,nextOffset:i.nextOffset}}catch{if(!n&&Y){await ye(!0);return}S.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function qe(n,e){const t=a.get("conversationId"),r=a.get("fileId"),d=a.get("mimeType")??"";let i=Number(a.get("size"));if(t===null||a.get("workspaceId")!==t||r===null||!Number.isSafeInteger(i)||i<0){S.value="generated.standaloneFilePreviewPage.theFilePreviewURLIsInvalid",R.value=!1;return}const s=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(t)}/files/${encodeURIComponent(r)}/content`,v=ve(e,d);if(o.value={path:e,size:i,encoding:v?"utf-8":"base64",content:"",truncated:!1,nextOffset:null},!v){T.value=s,R.value=!1;return}try{if(i===0){const m=await fetch(s,{credentials:"same-origin",method:"HEAD"});if(!m.ok)throw new Error(`REQUEST_FAILED_${m.status}`);const c=m.headers.get("content-length");if(c===null||!Number.isSafeInteger(Number(c))||Number(c)<0)throw new Error("NODE_RESPONSE_INVALID");if(i=Number(c),i===0){o.value={path:e,size:i,encoding:"utf-8",content:"",truncated:!1,nextOffset:null};return}}o.value=await De(async m=>{const c=await fetch(s,{credentials:"same-origin",headers:{Range:`bytes=0-${m-1}`}});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);const U=new Uint8Array(await c.arrayBuffer()),Se=c.headers.get("content-range")?.match(/\/(\d+)$/u)?.[1],M=Se===void 0?i:Number(Se);if(!Number.isSafeInteger(M)||M<0)throw new Error("NODE_RESPONSE_INVALID");const ce=Ce(U,e,U.byteLength>=M,d);return{path:e,size:M,...ce,truncated:ce.encoding==="utf-8"&&U.byteLength<M,nextOffset:ce.encoding==="utf-8"&&U.byteLength<M?U.byteLength:null}}),o.value.encoding==="base64"&&(T.value=s)}catch{S.value="generated.standaloneFilePreviewPage.unableToReadTheFileCheckYour"}finally{R.value=!1}}async function Je(){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 e=await n.json();if(typeof e.csrfToken!="string")throw new Error("CSRF_TOKEN_INVALID");return me.value=e.csrfToken,sessionStorage.setItem("mar.user.csrf-token",e.csrfToken),e.csrfToken}async function Ye(n,e){const t=a.get("nodeId"),r=a.get("workspaceId"),d=a.get("path");if(t===null||r===null||d===null||o.value?.previewEncoding!==void 0)throw new Error("FILE_WRITE_INVALID");const i=await pe.request(`/api/workspaces/${encodeURIComponent(r)}/files/write`,{method:"PUT",body:JSON.stringify({nodeId:t,path:d,content:n,expectedRevision:e})});if(typeof i.file?.revision!="string"||typeof i.file.size!="number"||!Number.isSafeInteger(i.file.size)||i.file.size<0)throw new Error("NODE_RESPONSE_INVALID");return o.value!==void 0&&(o.value={...o.value,content:n,revision:i.file.revision,size:i.file.size}),i.file.revision}at(()=>{ne.release(),N?de.dispose():window.removeEventListener("mar-before-standalone-navigation",se),window.removeEventListener("online",G),window.removeEventListener("offline",G),A?.close(),k.value!==void 0&&fe(k.value)});async function Ie(){if(o.value!==void 0){q.value=!0;try{const n=a.get("nodeId"),e=a.get("workspaceId"),t=a.get("path");if(n===null||e===null||t===null)return;if($){const i=a.get("conversationId"),s=a.get("fileId");if(i===null||s===null)return;const v=document.createElement("a");v.href=`/api/nodes/${encodeURIComponent(n)}/hosted-conversations/${encodeURIComponent(i)}/files/${encodeURIComponent(s)}/content?download=1`,v.download=t.split("/").at(-1)??"download",v.click();return}if(k.value?.startsWith("blob:")){Tt(k.value,t.split("/").at(-1)??"download");return}const r=await A?.download(t);if(r!==void 0&&r!=="UNAVAILABLE")return;const d=document.createElement("a");d.href=Q(n,e,t,!0),d.download=o.value.path.split("/").at(-1)??"download",d.click()}finally{q.value=!1}}}function G(){A?.networkChanged()}async function ke(n,e,t,r,d=!0,i=512*1024){const s=d?await A?.readRange(t,r,i,re):void 0;if(s!==void 0){Y=!0,re={revision:s.revision,size:s.size};const c=await pt(s),U=Ce(s.bytes,t,s.nextOffset===null);return{path:t,size:s.size,...U,truncated:s.nextOffset!==null,nextOffset:s.nextOffset,...c===void 0?{}:{revision:c}}}if(d&&Y)throw new Error("DIRECT_FILE_READ_FAILED");const v=new URLSearchParams({nodeId:n,path:t,offset:String(r),limit:String(i),...D});let m;if(y!==void 0)m=await y.request(`/api/workspaces/${encodeURIComponent(e)}/files/read?${v.toString()}`);else{const c=await fetch(`/api/workspaces/${encodeURIComponent(e)}/files/read?${v.toString()}`,{credentials:"same-origin"});if(!c.ok)throw new Error(`REQUEST_FAILED_${c.status}`);m=await c.json()}if(m.file===void 0||m.file.encoding!=="utf-8"&&m.file.encoding!=="base64"||m.file.nextOffset!==null&&!Number.isSafeInteger(m.file.nextOffset))throw new Error("NODE_RESPONSE_INVALID");return gt(m.file,t)}function Ge(n){return n.replace(/[&<>]/g,e=>e==="&"?"&":e==="<"?"<":">")}function le(){if(E.share?.embedded){O("close");return}window.close()}function be(){return le(),!0}const de=ht({isOpen:()=>N,closeWindow:be,closeTab:be});function Qe(n){de.bindFrame(n)}function Pe(n){const e=a.get("nodeId"),t=a.get("workspaceId");return e===null||t===null?"":Q(e,t,n)}function Ee(n){const e=a.get("nodeId"),t=a.get("workspaceId");if(e===null||t===null)return;const r=new URLSearchParams({standaloneFile:"1",...we(n)?{markdownPreview:"1"}:{rawContent:"1"},nodeId:e,workspaceId:t,path:n}),d=`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`;w!==void 0?W.open(d):location.assign(d)}function Xe(n){const e=a.get("nodeId"),t=a.get("workspaceId");if(e===null||t===null)return;const r=new URLSearchParams({standaloneFile:"1",htmlPreview:"1",nodeId:e,workspaceId:t,path:n});W.open(`${w===void 0?"/console":"/share/"+encodeURIComponent(w.session.value.share.id)}?${r.toString()}`)===void 0&&(S.value="htmlPreview.unavailable")}function Q(n,e,t,r=!1){const d=new URLSearchParams({nodeId:n,path:t,...r?{download:"1"}:{},...D}),i=`/api/workspaces/${encodeURIComponent(e)}/files/content?${d.toString()}`;return y?.resourceUrl(i)??i}return(n,e)=>{const t=ot("tooltip");return p(),P(ue,null,[u(V)?(p(),B(rt,{key:0,to:"head"},[X("link",{rel:"stylesheet",href:u(Ut)},null,8,$t)])):x("",!0),u(N)?(p(),P("main",{key:1,ref_key:"standaloneRoot",ref:L,class:"standalone-file-preview"},[J.value?(p(),P("p",zt,j(J.value),1)):u(F)?(p(),P(ue,{key:1},[X("header",Mt,[Te((p(),P("code",null,[Re(j(u(a).get("path")),1)])),[[t,u(a).get("path")??""]]),u(C).url?(p(),P("small",jt,j(u(Z)(Ue.value?"htmlPreview.trustedWarning":"htmlPreview.isolatedWarning")),1)):x("",!0)]),_e(yt,{url:u(C).url,loading:R.value||u(C).loading,title:u(a).get("path")??"",onLoad:Qe},null,8,["url","loading","title"])],64)):u(V)?(p(),P(ue,{key:2},[X("header",Vt,[Te((p(),P("code",null,[Re(j(u(a).get("path")??o.value?.path),1)])),[[t,u(a).get("path")??o.value?.path??""]]),o.value?.size!==void 0?(p(),P("small",Bt,j(u(At)(o.value.size??0)),1)):x("",!0)]),X("div",Ht,[R.value?(p(),B(Lt,{key:0,variant:"page",overlay:""})):o.value&&u(we)(o.value.path)?(p(),P("main",Kt,[_e(Ct,{content:o.value.content,path:o.value.path,"resource-url":Pe,"standard-style":"",onOpenFile:Ee},null,8,["content","path"]),u(ae).watermarkEnabled&&u(ae).watermarkText?(p(),P("div",{key:0,class:"markdown-watermark",style:it(xe.value),"aria-hidden":"true"},null,4)):x("",!0)])):x("",!0)])],64)):x("",!0)],512)):(p(),B(bt,{key:2,ref_key:"standaloneFileTabs",ref:f,presentation:E.share?.embedded?"overlay":"window",tabs:I.value,"active-tab-id":l.value,"can-close-unmounted-tab":He,onActivate:Ve,onClose:Be,onCloseAll:Ke},{default:st(({tab:r,active:d,registerPageHandle:i,requestClose:s})=>[d&&J.value?(p(),P("p",qt,j(J.value),1)):d&&o.value&&oe.value==="text"?(p(),B(It,{key:1,ref:i,active:d,file:o.value,kind:oe.value,loading:R.value,downloading:q.value,"target-line":u(We),"target-column":u($e),"write-enabled":u(Ae),html:u(Le)(o.value.path)&&Object.keys(D).length===0,markdown:!u(a).has("repositoryPath")&&u(we)(o.value.path),"markdown-resource-url":Pe,"save-file":Ye,"tab-identity":r.identity,"initial-dirty-draft":h.value.find(v=>v.tabIdentity===r.identity&&v.path===r.path),onClose:s,onDownload:Ie,onOpenHtmlPreview:e[0]||(e[0]=v=>Xe(o.value.path)),onOpenMarkdownPreview:e[1]||(e[1]=v=>Ee(o.value.path)),onDirtyDraftApplied:he},null,8,["active","file","kind","loading","downloading","target-line","target-column","write-enabled","html","markdown","tab-identity","initial-dirty-draft","onClose"])):d&&o.value?(p(),B(kt,{key:2,ref:i,active:d,file:o.value,"content-url":T.value,kind:oe.value,loading:R.value,downloading:q.value,onClose:s,onDownload:Ie},null,8,["active","file","content-url","kind","loading","downloading","onClose"])):x("",!0)]),_:1},8,["presentation","tabs","active-tab-id"]))],64)}}}),un=lt(Jt,[["__scopeId","data-v-f08fdd09"]]);export{un as default};
|
package/web/assets/{SystemConfigurationPage-C2Ecb0Su.js → SystemConfigurationPage-BpCsGW-2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as Ve}from"./el-alert-8VKFJYUv.js";import{E as de,a as me}from"./el-form-item-Fjp3w344.js";import{a as ce,E as pe}from"./el-input-DRF3bOe1.js";import{E as ge,a as fe}from"./el-select-BSaB1c5h.js";import{E as ye,u as te,m as ae}from"./mobile-dialog-return-service-Csexw-by.js";import{E as ke}from"./el-input-number-e6T9QIje.js";import{E as Te}from"./el-switch-Cpl2xxJc.js";import{E as Se,a as Ee}from"./el-table-column-BRybrdLI.js";import{a as _,d as ve,t,o as g,b as S,O as Y,g as o,q as r,I as U,H as p,u as e,s as k,p as D,E as ne,G as h,P as re,S as Ue,F as be,v as j,c as H,K as R,_ as _e,w as xe,D as Ie,r as De}from"./index-DsgwAvJA.js";/* empty css */import"./el-checkbox-D7CsqiQq.js";import{M as ue}from"./MarIcon-0cJTzTai.js";import{E as Me}from"./message-box-service-CszgyilP.js";import"./conversation-history-D9993EDO.js";import{e as Q}from"./error-presentation-CJfLHEK_.js";import"./use-form-common-props-BJ2vZd_0.js";import"./index-B7tnVSor.js";import"./_baseFindIndex-D7XfJLKM.js";import"./_baseIteratee-CnCgfzqY.js";import"./index-C90_sIrz.js";import"./merge-B-E3iBqN.js";import"./isArrayLikeObject-Bg1E4S9y.js";import"./last-DXTTfs9a.js";const Ke={key:"skill-tls",field:"skillTlsVerificationDisabled",payloadField:"verificationDisabled",nameKey:"generated.systemConfigurationPage.disableSkillSourceTLSVerification",descriptionKey:"generated.systemConfigurationPage.keepThisOffByDefaultUseIt",type:"boolean",initialValue:!1},Oe={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},Ne={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},$e={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function Fe(T,x=[]){const u=[...x,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},Ne,$e,Oe,Ke],P=new Map(u.map(i=>[i.key,i]));if(P.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=_(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),y=_({...w.value}),m=_(null),V=_(null),v=_(!1);function d(i){w.value=i,y.value={...i}}async function M(){if(!(v.value||V.value!==null)){v.value=!0;try{d(await T("/api/system-settings")),m.value=null}finally{v.value=!1}}}function K(i){!P.has(i)||v.value||V.value!==null||m.value!==null||(y.value={...w.value},m.value=i)}function O(i){m.value!==i||V.value!==null||(y.value={...w.value},m.value=null)}function N(i,l){if(i.type==="json"){if(typeof l!="string"||l.length>4096)return!1;try{const f=JSON.parse(l);return f!==null&&typeof f=="object"&&!Array.isArray(f)}catch{return!1}}if(i.type==="origin"){if(l==="")return!0;if(typeof l!="string"||l.length>253)return!1;try{const f=new URL(l);return f.origin===l&&(f.protocol==="https:"||f.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(f.hostname))}catch{return!1}}return i.type==="boolean"?typeof l=="boolean":typeof l=="number"&&Number.isFinite(l)&&l>=i.min&&l<=i.max}function $(i,l){const f=P.get(i);f===void 0||m.value!==i||V.value!==null||!(f.type==="origin"||f.type==="json"?typeof l=="string"&&l.length<=(f.type==="json"?4096:253):N(f,l))||(y.value[f.field]=l)}async function F(i){const l=P.get(i);if(l===void 0||m.value!==i||V.value!==null||v.value)return!1;const f=y.value[l.field];if(!N(l,f))return!1;V.value=i;try{return d(await T(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[l.payloadField]:f})})),m.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:y,editingKey:m,savingKey:V,loading:v,load:M,beginEdit:K,cancelEdit:O,validValue:N,setDraft:$,save:F}}function Be(T){const x=_([]),u=_(!1),P=_(!1);async function w(){if(!u.value){u.value=!0;try{x.value=await T("/api/mail/templates")}finally{u.value=!1}}}async function y(V,v){return T("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:v})})}async function m(V,v){P.value=!0;try{await T("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:v})})}finally{P.value=!1}}return{templates:x,loading:u,busy:P,load:w,preview:y,test:m}}const Ae={class:"template-viewer"},je={class:"template-description"},Re={key:0,class:"template-layout"},qe=["aria-label"],Le=["aria-pressed","onClick"],ze={class:"template-choice__meta"},Je={class:"template-choice__name"},He={class:"template-choice__subject"},Ze={key:0,class:"template-preview"},Ge={class:"template-preview__header"},We={class:"template-preview__locale"},Ye=["srcdoc","title"],Qe={key:1,class:"template-preview__fallback"},Xe={key:1,class:"template-empty"},et=ve({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(T){const x=T,u=Be(x.request),P=_(!1),w=_(""),y=H(()=>u.templates.value.find(b=>b.id===w.value)),m=_(),V=_(!1);let v=0;const d=_(!1),M=_(),K=_(""),O=_(""),N=H(()=>u.templates.value.filter(b=>b.kind==="TEST")),$=H(()=>({email:K.value,templateId:O.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:t("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?Q(b):t("generated.systemConfigurationPage.mailOperationFailed")}async function l(){P.value=!0,v+=1,w.value="",m.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await L()}catch(b){R(i(b),"error",b)}}function f(b){w.value=b.id,m.value=void 0,L()}async function L(){const b=y.value;if(b===void 0||!P.value)return;const C=++v;V.value=!0;try{const I=await u.preview(b,t("generated.systemConfigurationPage.mailPreviewMessage"));P.value&&C===v&&w.value===b.id&&(m.value=I)}catch(I){C===v&&R(i(I),"error",I)}finally{C===v&&(V.value=!1)}}function Z(){K.value="",O.value=(y.value?.kind==="TEST"?y.value.id:N.value[0]?.id)??"",d.value=!0}async function z(){if(x.writable)try{await M.value?.validate(),await u.test(K.value,O.value),d.value=!1,R(t("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&R(i(b),"error",b)}}return(b,C)=>{const I=ce,G=ye,X=pe,J=de,W=fe,s=ge,a=me,E=be;return g(),S(Y,null,[o(I,{icon:e(k)("mail"),onClick:l},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),P.value?(g(),D(G,{key:0,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:P.value,"onUpdate:modelValue":C[1]||(C[1]=c=>P.value=c),"append-to-body":"",title:e(t)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))","close-icon":e(k)("close")},{footer:r(()=>[o(I,{disabled:!T.writable||N.value.length===0||e(u).busy.value,onClick:Z},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(I,{onClick:C[0]||(C[0]=c=>P.value=!1)},{default:r(()=>[U(p(e(t)("common.close")),1)]),_:1})]),default:r(()=>[ne((g(),S("div",Ae,[h("p",je,p(e(t)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(g(),S("div",Re,[h("div",{class:"template-choices",role:"group","aria-label":e(t)("generated.systemConfigurationPage.mailTemplates")},[(g(!0),S(Y,null,re(e(u).templates.value,c=>(g(),S("button",{key:c.id,type:"button",class:Ue(["template-choice",{"is-selected":w.value===c.id}]),"aria-pressed":w.value===c.id,onClick:ee=>f(c)},[h("span",ze,[U(p(e(t)(c.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),C[6]||(C[6]=h("span",{"aria-hidden":"true"},"·",-1)),U(" "+p(c.locale),1)]),h("span",Je,p(c.name),1),h("span",He,p(c.subject),1)],10,Le))),128))],8,qe),y.value?ne((g(),S("div",Ze,[h("div",Ge,[h("span",null,p(e(t)("generated.systemConfigurationPage.mailPreviewSample")),1),h("span",We,p(y.value.locale),1)]),m.value?.html?(g(),S("iframe",{key:0,class:"template-preview__document",srcdoc:m.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(t)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Ye)):(g(),S("div",Qe,[h("span",null,p(e(t)("generated.systemConfigurationPage.mailSubject")),1),h("strong",null,p(m.value?.subject??y.value.subject),1),h("span",null,p(e(t)("generated.systemConfigurationPage.mailBody")),1),h("p",null,p(m.value?.text??y.value.body),1)]))])),[[E,V.value]]):j("",!0)])):e(u).loading.value?j("",!0):(g(),S("p",Xe,p(e(t)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[E,e(u).loading.value]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-icon"])):j("",!0),d.value?(g(),D(G,{key:1,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:d.value,"onUpdate:modelValue":C[5]||(C[5]=c=>d.value=c),"append-to-body":"",title:e(t)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))","close-icon":e(k)("close")},{footer:r(()=>[o(I,{onClick:C[4]||(C[4]=c=>d.value=!1)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1}),o(I,{type:"primary",loading:e(u).busy.value,onClick:z,"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading","loading-icon"])]),default:r(()=>[o(a,{ref_key:"testForm",ref:M,model:$.value,rules:F,"label-position":"top"},{default:r(()=>[o(J,{label:e(t)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:r(()=>[o(X,{modelValue:K.value,"onUpdate:modelValue":C[2]||(C[2]=c=>K.value=c),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(J,{label:e(t)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:r(()=>[o(s,{modelValue:O.value,"onUpdate:modelValue":C[3]||(C[3]=c=>O.value=c),class:"template-test-select","clear-icon":e(k)("clear-input"),"suffix-icon":e(k)("chevron-down")},{default:r(()=>[(g(!0),S(Y,null,re(N.value,c=>(g(),D(W,{key:c.id,value:c.id,label:c.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","close-icon"])):j("",!0)],64)}}}),tt=_e(et,[["__scopeId","data-v-62b5baac"]]),at={"element-loading-custom-class":"mar-page-loading",class:"management-page"},nt={class:"table-actions"},lt={key:1},ot={key:3},it={key:4},st={class:"smtp-toggle"},rt={class:"smtp-form__pair"},ut={class:"smtp-template-row"},dt={class:"smtp-dialog-hint"},mt={class:"smtp-dialog-footer"},ct=ve({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(T){const x=T,u=Fe(x.request,x.settings),P=_(),w=_(),y=_(""),m=_(!1),V=u.settings.find(s=>s.key==="mail-smtp"),v=_(!1),d=De({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let M="";const K={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:t("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:t("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:t("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:t("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:t("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(s,a,E)=>E(typeof a=="string"&&a.length<=1024&&(d.username===""?a==="":a!==""||d.username===M)?void 0:new Error(t("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},O=u.settings.find(s=>s.key==="html-preview-origin"),N={origin:[{validator:(s,a,E)=>E(u.validValue(O,a)?void 0:new Error(t("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:$,drafts:F,editingKey:i,savingKey:l,loading:f,beginEdit:L,cancelEdit:Z}=u,z=_(!1),b=H(()=>({origin:F.value.htmlPreviewOrigin})),C=H(()=>u.settings.map(s=>({...s,name:t(s.nameKey),description:t(s.descriptionKey)})));xe(m,s=>{y.value="",s||(d.password="",M="",Z("mail-smtp"))});function I(s){const a=F.value[s];return typeof a=="number"?a:void 0}function G(s){const a=F.value[s];return typeof a=="string"?a:""}function X(){if(!x.writable||(L("mail-smtp"),i.value!=="mail-smtp"))return;const s=JSON.parse(String($.value.smtpConfiguration));v.value=Object.keys(s).length>0,Object.assign(d,{host:s.host??"",port:s.port??587,tls:s.tls??"STARTTLS",from:s.from??"",fromName:s.fromName??"",username:s.username??"",password:""}),M=s.username??"",m.value=i.value==="mail-smtp"}async function J(){try{await u.load(),z.value=!0}catch(s){R(s instanceof Error?Q(s):t("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",s)}}async function W(s){if(x.writable){if(y.value="",s==="html-preview-origin")try{await P.value?.validate()}catch{return}if(s==="mail-smtp")if(v.value){try{await w.value?.validate()}catch{return}const a=JSON.stringify({...d});if(!u.validValue(V,a)){y.value=t("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(s,a)}else{if($.value.smtpConfiguration!=="{}")try{await Me.confirm(t("generated.systemConfigurationPage.smtpDisableConfirmation"),t("generated.systemConfigurationPage.smtpDisableTitle"),{closeIcon:k("close"),icon:k("warning"),type:"warning",confirmButtonText:t("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:t("common.cancel")})}catch(a){if(a==="cancel"||a==="close")return;R(a instanceof Error?Q(a):t("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",a);return}if(!m.value||i.value!==s)return;u.setDraft(s,"{}")}try{await u.save(s)&&(s==="mail-smtp"&&(m.value=!1),R(t("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(a){R(a instanceof Error?Q(a):t("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",a)}}}return Ie(()=>{J()}),(s,a)=>{const E=ce,c=Se,ee=ke,q=pe,B=de,le=me,oe=Te,Ce=Ee,ie=Ve,se=fe,he=ge,Pe=ye,we=be;return ne((g(),S("section",at,[h("div",nt,[o(E,{icon:e(k)("refresh"),loading:e(f)&&z.value,onClick:J,"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","loading","loading-icon"])]),o(Ce,{data:C.value,"row-key":"key"},{default:r(()=>[o(c,{prop:"name",label:e(t)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(c,{prop:"description",label:e(t)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(c,{label:e(t)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:r(({row:n})=>[n.type==="number"&&e(i)===n.key?(g(),D(ee,{key:0,"model-value":I(n.field),placeholder:n.placeholderKey===void 0?void 0:e(t)(n.placeholderKey),min:n.min,max:n.max,disabled:e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},{"decrease-icon":r(()=>[o(ue,{name:"subtract"})]),"increase-icon":r(()=>[o(ue,{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):n.type==="number"?(g(),S("span",lt,p(e($)[n.field]),1)):n.type==="origin"&&e(i)===n.key?(g(),D(le,{key:2,ref_key:"originForm",ref:P,model:b.value,rules:N},{default:r(()=>[o(B,{prop:"origin",class:"origin-setting-form"},{default:r(()=>[o(q,{"model-value":G(n.field),placeholder:e(t)(n.placeholderKey),disabled:e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):n.type==="origin"?(g(),S("span",ot,p(e($)[n.field]||e(t)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):n.type==="json"?(g(),S("span",it,"-")):(g(),D(oe,{key:5,"model-value":e(F)[n.field]===!0,disabled:e(i)!==n.key||!T.writable||e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(c,{label:e(t)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:r(({row:n})=>[e(i)!==n.key||n.type==="json"?(g(),D(E,{key:0,link:"",icon:e(k)("edit"),disabled:!T.writable||e(i)!==null,onClick:A=>n.type==="json"?X():e(L)(n.key)},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(g(),S(Y,{key:1},[o(E,{link:"",type:"primary",icon:e(k)("check"),loading:e(l)===n.key,disabled:!T.writable||e(l)!==null,onClick:A=>W(n.key),"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick","loading-icon"]),o(E,{link:"",icon:e(k)("close"),disabled:e(l)!==null,onClick:A=>e(Z)(n.key)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:1},8,["data"]),m.value?(g(),D(Pe,{key:0,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:m.value,"onUpdate:modelValue":a[10]||(a[10]=n=>m.value=n),title:e(t)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(l)===null,"close-on-press-escape":e(l)===null,"show-close":e(l)===null,"append-to-body":"","close-icon":e(k)("close")},{footer:r(()=>[h("div",mt,[o(E,{disabled:e(l)!==null,onClick:a[8]||(a[8]=n=>m.value=!1)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1},8,["disabled"]),o(E,{type:"primary",loading:e(l)==="mail-smtp",onClick:a[9]||(a[9]=n=>W("mail-smtp")),"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading","loading-icon"])])]),default:r(()=>[h("div",st,[h("span",null,p(e(t)("generated.systemConfigurationPage.smtpEnable")),1),o(oe,{modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=n=>v.value=n),disabled:e(l)!==null,"aria-label":e(t)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),v.value?(g(),D(le,{key:0,ref_key:"smtpForm",ref:w,model:d,rules:K,"label-position":"top",class:"smtp-form"},{default:r(()=>[y.value?(g(),D(ie,{key:0,title:y.value,type:"error",closable:!1},null,8,["title"])):j("",!0),o(B,{label:e(t)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:r(()=>[o(q,{modelValue:d.host,"onUpdate:modelValue":a[1]||(a[1]=n=>d.host=n),maxlength:"253",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),h("div",rt,[o(B,{label:e(t)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:r(()=>[o(ee,{modelValue:d.port,"onUpdate:modelValue":a[2]||(a[2]=n=>d.port=n),min:1,max:65535,controls:!1,disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:r(()=>[o(he,{modelValue:d.tls,"onUpdate:modelValue":a[3]||(a[3]=n=>d.tls=n),disabled:e(l)!==null,"clear-icon":e(k)("clear-input"),"suffix-icon":e(k)("chevron-down")},{default:r(()=>[o(se,{label:"STARTTLS",value:"STARTTLS"}),o(se,{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:r(()=>[o(q,{modelValue:d.from,"onUpdate:modelValue":a[4]||(a[4]=n=>d.from=n),maxlength:"320",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:r(()=>[o(q,{modelValue:d.fromName,"onUpdate:modelValue":a[5]||(a[5]=n=>d.fromName=n),maxlength:"128",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:r(()=>[o(q,{modelValue:d.username,"onUpdate:modelValue":a[6]||(a[6]=n=>d.username=n),maxlength:"320",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:r(()=>[o(q,{modelValue:d.password,"onUpdate:modelValue":a[7]||(a[7]=n=>d.password=n),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(M)===d.username&&e(M)?e(t)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(l)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):j("",!0),h("div",ut,[o(tt,{request:T.request,writable:T.writable},null,8,["request","writable"])]),h("p",dt,p(e(t)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close","close-icon"])):j("",!0),e($).skillTlsVerificationDisabled?(g(),D(ie,{key:1,class:"skill-tls-warning",type:"error",closable:!1,title:e(t)("generated.systemConfigurationPage.skillSourceTLSCertificateVerificationIsDisabled")},null,8,["title"])):j("",!0)])),[[we,e(f)&&!z.value]])}}}),Nt=_e(ct,[["__scopeId","data-v-015a943a"]]);export{Nt as default};
|
|
1
|
+
import{E as Ve}from"./el-alert-DQT74Z6k.js";import{E as de,a as me}from"./el-form-item-CjLvz7IR.js";import{a as ce,E as pe}from"./el-input-DsD8wPgd.js";import{E as ge,a as fe}from"./el-select-vQRSFUuU.js";import{E as ye,u as te,m as ae}from"./mobile-dialog-return-service-CDghLsut.js";import{E as ke}from"./el-input-number-DYTEBnhp.js";import{E as Te}from"./el-switch-D49n4nYq.js";import{E as Se,a as Ee}from"./el-table-column-DIe-Jdox.js";import{a as _,d as ve,t,o as g,b as S,O as Y,g as o,q as r,I as U,H as p,u as e,s as k,p as D,E as ne,G as h,P as re,S as Ue,F as be,v as j,c as H,K as R,_ as _e,w as xe,D as Ie,r as De}from"./index-tebwt16R.js";/* empty css */import"./el-checkbox-D8E82IC3.js";import{M as ue}from"./MarIcon-DRzNI1TJ.js";import{E as Me}from"./message-box-service-BzqjQhzH.js";import"./conversation-history-DsSE1wLH.js";import{e as Q}from"./error-presentation-CKm32JzU.js";import"./use-form-common-props-C_muwpbj.js";import"./index-C8HJ-7wK.js";import"./_baseFindIndex-D7XfJLKM.js";import"./_baseIteratee-CEjLB6P0.js";import"./index-BzBol34B.js";import"./merge-k_TKlNxw.js";import"./isArrayLikeObject-CNIeaAGq.js";import"./last-DXTTfs9a.js";const Ke={key:"skill-tls",field:"skillTlsVerificationDisabled",payloadField:"verificationDisabled",nameKey:"generated.systemConfigurationPage.disableSkillSourceTLSVerification",descriptionKey:"generated.systemConfigurationPage.keepThisOffByDefaultUseIt",type:"boolean",initialValue:!1},Oe={key:"html-preview-origin",field:"htmlPreviewOrigin",payloadField:"origin",nameKey:"generated.systemConfigurationPage.htmlPreviewOrigin",descriptionKey:"generated.systemConfigurationPage.htmlPreviewOriginDescription",placeholderKey:"generated.systemConfigurationPage.htmlPreviewOriginPlaceholder",type:"origin",initialValue:""},Ne={key:"mail-smtp",field:"smtpConfiguration",payloadField:"config",nameKey:"generated.systemConfigurationPage.smtp",descriptionKey:"generated.systemConfigurationPage.smtpDescription",placeholderKey:"generated.systemConfigurationPage.smtpPlaceholder",type:"json",initialValue:"{}"},$e={key:"web-push",field:"webPushEnabled",payloadField:"enabled",nameKey:"workbenchNotificationCenter.webPushConfiguration.title",descriptionKey:"workbenchNotificationCenter.webPushConfiguration.description",type:"boolean",initialValue:!1};function Fe(T,x=[]){const u=[...x,{key:"mar-agent-resource-input",field:"useResourceUrl",payloadField:"useResourceUrl",nameKey:"marAgentModels.useResourceUrl",descriptionKey:"marAgentModels.globalResourceUrlDescription",type:"boolean",initialValue:!0},Ne,$e,Oe,Ke],P=new Map(u.map(i=>[i.key,i]));if(P.size!==u.length)throw new Error("WEB_SYSTEM_SETTING_DUPLICATE");const w=_(Object.fromEntries(u.map(i=>[i.field,i.initialValue]))),y=_({...w.value}),m=_(null),V=_(null),v=_(!1);function d(i){w.value=i,y.value={...i}}async function M(){if(!(v.value||V.value!==null)){v.value=!0;try{d(await T("/api/system-settings")),m.value=null}finally{v.value=!1}}}function K(i){!P.has(i)||v.value||V.value!==null||m.value!==null||(y.value={...w.value},m.value=i)}function O(i){m.value!==i||V.value!==null||(y.value={...w.value},m.value=null)}function N(i,l){if(i.type==="json"){if(typeof l!="string"||l.length>4096)return!1;try{const f=JSON.parse(l);return f!==null&&typeof f=="object"&&!Array.isArray(f)}catch{return!1}}if(i.type==="origin"){if(l==="")return!0;if(typeof l!="string"||l.length>253)return!1;try{const f=new URL(l);return f.origin===l&&(f.protocol==="https:"||f.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(f.hostname))}catch{return!1}}return i.type==="boolean"?typeof l=="boolean":typeof l=="number"&&Number.isFinite(l)&&l>=i.min&&l<=i.max}function $(i,l){const f=P.get(i);f===void 0||m.value!==i||V.value!==null||!(f.type==="origin"||f.type==="json"?typeof l=="string"&&l.length<=(f.type==="json"?4096:253):N(f,l))||(y.value[f.field]=l)}async function F(i){const l=P.get(i);if(l===void 0||m.value!==i||V.value!==null||v.value)return!1;const f=y.value[l.field];if(!N(l,f))return!1;V.value=i;try{return d(await T(`/api/system-settings/${encodeURIComponent(i)}`,{method:"PATCH",body:JSON.stringify({[l.payloadField]:f})})),m.value=null,!0}finally{V.value=null}}return{settings:u,snapshot:w,drafts:y,editingKey:m,savingKey:V,loading:v,load:M,beginEdit:K,cancelEdit:O,validValue:N,setDraft:$,save:F}}function Be(T){const x=_([]),u=_(!1),P=_(!1);async function w(){if(!u.value){u.value=!0;try{x.value=await T("/api/mail/templates")}finally{u.value=!1}}}async function y(V,v){return T("/api/mail/templates/preview",{method:"POST",body:JSON.stringify({templateId:V.id,message:v})})}async function m(V,v){P.value=!0;try{await T("/api/mail/test",{method:"POST",body:JSON.stringify({email:V,templateId:v})})}finally{P.value=!1}}return{templates:x,loading:u,busy:P,load:w,preview:y,test:m}}const Ae={class:"template-viewer"},je={class:"template-description"},Re={key:0,class:"template-layout"},qe=["aria-label"],Le=["aria-pressed","onClick"],ze={class:"template-choice__meta"},Je={class:"template-choice__name"},He={class:"template-choice__subject"},Ze={key:0,class:"template-preview"},Ge={class:"template-preview__header"},We={class:"template-preview__locale"},Ye=["srcdoc","title"],Qe={key:1,class:"template-preview__fallback"},Xe={key:1,class:"template-empty"},et=ve({__name:"MailTemplateManagement",props:{request:{type:Function},writable:{type:Boolean}},setup(T){const x=T,u=Be(x.request),P=_(!1),w=_(""),y=H(()=>u.templates.value.find(b=>b.id===w.value)),m=_(),V=_(!1);let v=0;const d=_(!1),M=_(),K=_(""),O=_(""),N=H(()=>u.templates.value.filter(b=>b.kind==="TEST")),$=H(()=>({email:K.value,templateId:O.value})),F={email:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:t("generated.systemConfigurationPage.mailAddressInvalid"),trigger:"blur"}],templateId:[{required:!0,trigger:"change"}]};function i(b){return b instanceof Error?Q(b):t("generated.systemConfigurationPage.mailOperationFailed")}async function l(){P.value=!0,v+=1,w.value="",m.value=void 0;try{await u.load(),w.value=u.templates.value[0]?.id??"",w.value!==""&&await L()}catch(b){R(i(b),"error",b)}}function f(b){w.value=b.id,m.value=void 0,L()}async function L(){const b=y.value;if(b===void 0||!P.value)return;const C=++v;V.value=!0;try{const I=await u.preview(b,t("generated.systemConfigurationPage.mailPreviewMessage"));P.value&&C===v&&w.value===b.id&&(m.value=I)}catch(I){C===v&&R(i(I),"error",I)}finally{C===v&&(V.value=!1)}}function Z(){K.value="",O.value=(y.value?.kind==="TEST"?y.value.id:N.value[0]?.id)??"",d.value=!0}async function z(){if(x.writable)try{await M.value?.validate(),await u.test(K.value,O.value),d.value=!1,R(t("generated.systemConfigurationPage.mailTestAccepted"),"success")}catch(b){b instanceof Error&&R(i(b),"error",b)}}return(b,C)=>{const I=ce,G=ye,X=pe,J=de,W=fe,s=ge,a=me,E=be;return g(),S(Y,null,[o(I,{icon:e(k)("mail"),onClick:l},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTemplateView")),1)]),_:1},8,["icon"]),P.value?(g(),D(G,{key:0,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:P.value,"onUpdate:modelValue":C[1]||(C[1]=c=>P.value=c),"append-to-body":"",title:e(t)("generated.systemConfigurationPage.mailTemplates"),width:"min(780px, calc(100vw - 32px))","close-icon":e(k)("close")},{footer:r(()=>[o(I,{disabled:!T.writable||N.value.length===0||e(u).busy.value,onClick:Z},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTest")),1)]),_:1},8,["disabled"]),o(I,{onClick:C[0]||(C[0]=c=>P.value=!1)},{default:r(()=>[U(p(e(t)("common.close")),1)]),_:1})]),default:r(()=>[ne((g(),S("div",Ae,[h("p",je,p(e(t)("generated.systemConfigurationPage.mailTemplateBuiltIn")),1),e(u).templates.value.length>0?(g(),S("div",Re,[h("div",{class:"template-choices",role:"group","aria-label":e(t)("generated.systemConfigurationPage.mailTemplates")},[(g(!0),S(Y,null,re(e(u).templates.value,c=>(g(),S("button",{key:c.id,type:"button",class:Ue(["template-choice",{"is-selected":w.value===c.id}]),"aria-pressed":w.value===c.id,onClick:ee=>f(c)},[h("span",ze,[U(p(e(t)(c.kind==="TEST"?"generated.systemConfigurationPage.mailKindTest":"generated.systemConfigurationPage.mailKindNotification"))+" ",1),C[6]||(C[6]=h("span",{"aria-hidden":"true"},"·",-1)),U(" "+p(c.locale),1)]),h("span",Je,p(c.name),1),h("span",He,p(c.subject),1)],10,Le))),128))],8,qe),y.value?ne((g(),S("div",Ze,[h("div",Ge,[h("span",null,p(e(t)("generated.systemConfigurationPage.mailPreviewSample")),1),h("span",We,p(y.value.locale),1)]),m.value?.html?(g(),S("iframe",{key:0,class:"template-preview__document",srcdoc:m.value.html,sandbox:"",referrerpolicy:"no-referrer",title:e(t)("generated.systemConfigurationPage.mailPreviewSample")},null,8,Ye)):(g(),S("div",Qe,[h("span",null,p(e(t)("generated.systemConfigurationPage.mailSubject")),1),h("strong",null,p(m.value?.subject??y.value.subject),1),h("span",null,p(e(t)("generated.systemConfigurationPage.mailBody")),1),h("p",null,p(m.value?.text??y.value.body),1)]))])),[[E,V.value]]):j("",!0)])):e(u).loading.value?j("",!0):(g(),S("p",Xe,p(e(t)("generated.systemConfigurationPage.mailTemplateEmpty")),1))])),[[E,e(u).loading.value]])]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-icon"])):j("",!0),d.value?(g(),D(G,{key:1,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:d.value,"onUpdate:modelValue":C[5]||(C[5]=c=>d.value=c),"append-to-body":"",title:e(t)("generated.systemConfigurationPage.mailTest"),width:"min(480px, calc(100vw - 32px))","close-icon":e(k)("close")},{footer:r(()=>[o(I,{onClick:C[4]||(C[4]=c=>d.value=!1)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1}),o(I,{type:"primary",loading:e(u).busy.value,onClick:z,"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.mailTestSend")),1)]),_:1},8,["loading","loading-icon"])]),default:r(()=>[o(a,{ref_key:"testForm",ref:M,model:$.value,rules:F,"label-position":"top"},{default:r(()=>[o(J,{label:e(t)("generated.systemConfigurationPage.mailAddress"),prop:"email"},{default:r(()=>[o(X,{modelValue:K.value,"onUpdate:modelValue":C[2]||(C[2]=c=>K.value=c),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),o(J,{label:e(t)("generated.systemConfigurationPage.mailTemplate"),prop:"templateId"},{default:r(()=>[o(s,{modelValue:O.value,"onUpdate:modelValue":C[3]||(C[3]=c=>O.value=c),class:"template-test-select","clear-icon":e(k)("clear-input"),"suffix-icon":e(k)("chevron-down")},{default:r(()=>[(g(!0),S(Y,null,re(N.value,c=>(g(),D(W,{key:c.id,value:c.id,label:c.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","close-icon"])):j("",!0)],64)}}}),tt=_e(et,[["__scopeId","data-v-62b5baac"]]),at={"element-loading-custom-class":"mar-page-loading",class:"management-page"},nt={class:"table-actions"},lt={key:1},ot={key:3},it={key:4},st={class:"smtp-toggle"},rt={class:"smtp-form__pair"},ut={class:"smtp-template-row"},dt={class:"smtp-dialog-hint"},mt={class:"smtp-dialog-footer"},ct=ve({__name:"SystemConfigurationPage",props:{request:{type:Function},writable:{type:Boolean},settings:{}},setup(T){const x=T,u=Fe(x.request,x.settings),P=_(),w=_(),y=_(""),m=_(!1),V=u.settings.find(s=>s.key==="mail-smtp"),v=_(!1),d=De({host:"",port:587,tls:"STARTTLS",from:"",fromName:"",username:"",password:""});let M="";const K={host:[{required:!0,pattern:/^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?$/u,message:t("generated.systemConfigurationPage.smtpHostInvalid"),trigger:"blur"}],port:[{type:"integer",min:1,max:65535,required:!0,message:t("generated.systemConfigurationPage.smtpPortInvalid"),trigger:"change"}],tls:[{required:!0,trigger:"change"}],from:[{required:!0,pattern:/^[^\s@]+@[^\s@]+\.[^\s@]+$/u,message:t("generated.systemConfigurationPage.smtpFromInvalid"),trigger:"blur"}],fromName:[{max:128,pattern:/^[^\r\n]*$/u,message:t("generated.systemConfigurationPage.smtpFromNameInvalid"),trigger:"blur"}],username:[{max:320,pattern:/^[^\r\n]*$/u,message:t("generated.systemConfigurationPage.smtpUsernameInvalid"),trigger:"blur"}],password:[{validator:(s,a,E)=>E(typeof a=="string"&&a.length<=1024&&(d.username===""?a==="":a!==""||d.username===M)?void 0:new Error(t("generated.systemConfigurationPage.smtpPasswordInvalid"))),trigger:"blur"}]},O=u.settings.find(s=>s.key==="html-preview-origin"),N={origin:[{validator:(s,a,E)=>E(u.validValue(O,a)?void 0:new Error(t("generated.systemConfigurationPage.htmlPreviewOriginInvalid"))),trigger:"change"}]},{snapshot:$,drafts:F,editingKey:i,savingKey:l,loading:f,beginEdit:L,cancelEdit:Z}=u,z=_(!1),b=H(()=>({origin:F.value.htmlPreviewOrigin})),C=H(()=>u.settings.map(s=>({...s,name:t(s.nameKey),description:t(s.descriptionKey)})));xe(m,s=>{y.value="",s||(d.password="",M="",Z("mail-smtp"))});function I(s){const a=F.value[s];return typeof a=="number"?a:void 0}function G(s){const a=F.value[s];return typeof a=="string"?a:""}function X(){if(!x.writable||(L("mail-smtp"),i.value!=="mail-smtp"))return;const s=JSON.parse(String($.value.smtpConfiguration));v.value=Object.keys(s).length>0,Object.assign(d,{host:s.host??"",port:s.port??587,tls:s.tls??"STARTTLS",from:s.from??"",fromName:s.fromName??"",username:s.username??"",password:""}),M=s.username??"",m.value=i.value==="mail-smtp"}async function J(){try{await u.load(),z.value=!0}catch(s){R(s instanceof Error?Q(s):t("generated.systemConfigurationPage.unableToLoadSystemConfiguration"),"error",s)}}async function W(s){if(x.writable){if(y.value="",s==="html-preview-origin")try{await P.value?.validate()}catch{return}if(s==="mail-smtp")if(v.value){try{await w.value?.validate()}catch{return}const a=JSON.stringify({...d});if(!u.validValue(V,a)){y.value=t("generated.systemConfigurationPage.smtpInvalid");return}u.setDraft(s,a)}else{if($.value.smtpConfiguration!=="{}")try{await Me.confirm(t("generated.systemConfigurationPage.smtpDisableConfirmation"),t("generated.systemConfigurationPage.smtpDisableTitle"),{closeIcon:k("close"),icon:k("warning"),type:"warning",confirmButtonText:t("generated.systemConfigurationPage.smtpDisableTitle"),cancelButtonText:t("common.cancel")})}catch(a){if(a==="cancel"||a==="close")return;R(a instanceof Error?Q(a):t("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",a);return}if(!m.value||i.value!==s)return;u.setDraft(s,"{}")}try{await u.save(s)&&(s==="mail-smtp"&&(m.value=!1),R(t("generated.systemConfigurationPage.systemConfigurationSaved"),"success"))}catch(a){R(a instanceof Error?Q(a):t("generated.systemConfigurationPage.unableToSaveSystemConfiguration"),"error",a)}}}return Ie(()=>{J()}),(s,a)=>{const E=ce,c=Se,ee=ke,q=pe,B=de,le=me,oe=Te,Ce=Ee,ie=Ve,se=fe,he=ge,Pe=ye,we=be;return ne((g(),S("section",at,[h("div",nt,[o(E,{icon:e(k)("refresh"),loading:e(f)&&z.value,onClick:J,"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.refresh")),1)]),_:1},8,["icon","loading","loading-icon"])]),o(Ce,{data:C.value,"row-key":"key"},{default:r(()=>[o(c,{prop:"name",label:e(t)("generated.systemConfigurationPage.setting"),"min-width":"180"},null,8,["label"]),o(c,{prop:"description",label:e(t)("generated.systemConfigurationPage.description"),"min-width":"320"},null,8,["label"]),o(c,{label:e(t)("generated.systemConfigurationPage.value"),"min-width":"180"},{default:r(({row:n})=>[n.type==="number"&&e(i)===n.key?(g(),D(ee,{key:0,"model-value":I(n.field),placeholder:n.placeholderKey===void 0?void 0:e(t)(n.placeholderKey),min:n.min,max:n.max,disabled:e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},{"decrease-icon":r(()=>[o(ue,{name:"subtract"})]),"increase-icon":r(()=>[o(ue,{name:"plus"})]),_:1},8,["model-value","placeholder","min","max","disabled","onUpdate:modelValue"])):n.type==="number"?(g(),S("span",lt,p(e($)[n.field]),1)):n.type==="origin"&&e(i)===n.key?(g(),D(le,{key:2,ref_key:"originForm",ref:P,model:b.value,rules:N},{default:r(()=>[o(B,{prop:"origin",class:"origin-setting-form"},{default:r(()=>[o(q,{"model-value":G(n.field),placeholder:e(t)(n.placeholderKey),disabled:e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},null,8,["model-value","placeholder","disabled","onUpdate:modelValue"])]),_:2},1024)]),_:2},1032,["model"])):n.type==="origin"?(g(),S("span",ot,p(e($)[n.field]||e(t)("generated.systemConfigurationPage.htmlPreviewCurrentOrigin")),1)):n.type==="json"?(g(),S("span",it,"-")):(g(),D(oe,{key:5,"model-value":e(F)[n.field]===!0,disabled:e(i)!==n.key||!T.writable||e(l)!==null,"onUpdate:modelValue":A=>e(u).setDraft(n.key,A)},null,8,["model-value","disabled","onUpdate:modelValue"]))]),_:1},8,["label"]),o(c,{label:e(t)("generated.systemConfigurationPage.actions"),"min-width":"220"},{default:r(({row:n})=>[e(i)!==n.key||n.type==="json"?(g(),D(E,{key:0,link:"",icon:e(k)("edit"),disabled:!T.writable||e(i)!==null,onClick:A=>n.type==="json"?X():e(L)(n.key)},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.edit")),1)]),_:1},8,["icon","disabled","onClick"])):(g(),S(Y,{key:1},[o(E,{link:"",type:"primary",icon:e(k)("check"),loading:e(l)===n.key,disabled:!T.writable||e(l)!==null,onClick:A=>W(n.key),"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.save")),1)]),_:1},8,["icon","loading","disabled","onClick","loading-icon"]),o(E,{link:"",icon:e(k)("close"),disabled:e(l)!==null,onClick:A=>e(Z)(n.key)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1},8,["icon","disabled","onClick"])],64))]),_:1},8,["label"])]),_:1},8,["data"]),m.value?(g(),D(Pe,{key:0,onVnodeMounted:e(ae),onVnodeBeforeUnmount:e(te),modelValue:m.value,"onUpdate:modelValue":a[10]||(a[10]=n=>m.value=n),title:e(t)("generated.systemConfigurationPage.smtp"),width:"min(620px, calc(100vw - 32px))","close-on-click-modal":e(l)===null,"close-on-press-escape":e(l)===null,"show-close":e(l)===null,"append-to-body":"","close-icon":e(k)("close")},{footer:r(()=>[h("div",mt,[o(E,{disabled:e(l)!==null,onClick:a[8]||(a[8]=n=>m.value=!1)},{default:r(()=>[U(p(e(t)("common.cancel")),1)]),_:1},8,["disabled"]),o(E,{type:"primary",loading:e(l)==="mail-smtp",onClick:a[9]||(a[9]=n=>W("mail-smtp")),"loading-icon":e(k)("loading-action")},{default:r(()=>[U(p(e(t)("generated.systemConfigurationPage.save")),1)]),_:1},8,["loading","loading-icon"])])]),default:r(()=>[h("div",st,[h("span",null,p(e(t)("generated.systemConfigurationPage.smtpEnable")),1),o(oe,{modelValue:v.value,"onUpdate:modelValue":a[0]||(a[0]=n=>v.value=n),disabled:e(l)!==null,"aria-label":e(t)("generated.systemConfigurationPage.smtpEnable")},null,8,["modelValue","disabled","aria-label"])]),v.value?(g(),D(le,{key:0,ref_key:"smtpForm",ref:w,model:d,rules:K,"label-position":"top",class:"smtp-form"},{default:r(()=>[y.value?(g(),D(ie,{key:0,title:y.value,type:"error",closable:!1},null,8,["title"])):j("",!0),o(B,{label:e(t)("generated.systemConfigurationPage.smtpHost"),prop:"host"},{default:r(()=>[o(q,{modelValue:d.host,"onUpdate:modelValue":a[1]||(a[1]=n=>d.host=n),maxlength:"253",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),h("div",rt,[o(B,{label:e(t)("generated.systemConfigurationPage.smtpPort"),prop:"port"},{default:r(()=>[o(ee,{modelValue:d.port,"onUpdate:modelValue":a[2]||(a[2]=n=>d.port=n),min:1,max:65535,controls:!1,disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpTls"),prop:"tls"},{default:r(()=>[o(he,{modelValue:d.tls,"onUpdate:modelValue":a[3]||(a[3]=n=>d.tls=n),disabled:e(l)!==null,"clear-icon":e(k)("clear-input"),"suffix-icon":e(k)("chevron-down")},{default:r(()=>[o(se,{label:"STARTTLS",value:"STARTTLS"}),o(se,{label:"TLS",value:"TLS"})]),_:1},8,["modelValue","disabled","clear-icon","suffix-icon"])]),_:1},8,["label"])]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpFrom"),prop:"from"},{default:r(()=>[o(q,{modelValue:d.from,"onUpdate:modelValue":a[4]||(a[4]=n=>d.from=n),maxlength:"320",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpFromName"),prop:"fromName"},{default:r(()=>[o(q,{modelValue:d.fromName,"onUpdate:modelValue":a[5]||(a[5]=n=>d.fromName=n),maxlength:"128",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpUsername"),prop:"username"},{default:r(()=>[o(q,{modelValue:d.username,"onUpdate:modelValue":a[6]||(a[6]=n=>d.username=n),maxlength:"320",autocomplete:"off",disabled:e(l)!==null},null,8,["modelValue","disabled"])]),_:1},8,["label"]),o(B,{label:e(t)("generated.systemConfigurationPage.smtpPassword"),prop:"password"},{default:r(()=>[o(q,{modelValue:d.password,"onUpdate:modelValue":a[7]||(a[7]=n=>d.password=n),type:"password",maxlength:"1024",autocomplete:"new-password",placeholder:e(M)===d.username&&e(M)?e(t)("generated.systemConfigurationPage.smtpPasswordKeep"):void 0,disabled:e(l)!==null},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"])]),_:1},8,["model"])):j("",!0),h("div",ut,[o(tt,{request:T.request,writable:T.writable},null,8,["request","writable"])]),h("p",dt,p(e(t)("generated.systemConfigurationPage.smtpDialogHint")),1)]),_:1},8,["onVnodeMounted","onVnodeBeforeUnmount","modelValue","title","close-on-click-modal","close-on-press-escape","show-close","close-icon"])):j("",!0),e($).skillTlsVerificationDisabled?(g(),D(ie,{key:1,class:"skill-tls-warning",type:"error",closable:!1,title:e(t)("generated.systemConfigurationPage.skillSourceTLSCertificateVerificationIsDisabled")},null,8,["title"])):j("",!0)])),[[we,e(f)&&!z.value]])}}}),Nt=_e(ct,[["__scopeId","data-v-015a943a"]]);export{Nt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i from"./SystemConfigurationPage-BpCsGW-2.js";import{d as r,o,p as n}from"./index-tebwt16R.js";import"./el-alert-DQT74Z6k.js";import"./el-checkbox-D8E82IC3.js";import"./el-input-DsD8wPgd.js";import"./use-form-common-props-C_muwpbj.js";import"./mobile-dialog-return-service-CDghLsut.js";import"./last-DXTTfs9a.js";import"./el-form-item-CjLvz7IR.js";import"./el-select-vQRSFUuU.js";import"./index-C8HJ-7wK.js";import"./_baseFindIndex-D7XfJLKM.js";import"./_baseIteratee-CEjLB6P0.js";import"./el-input-number-DYTEBnhp.js";import"./index-BzBol34B.js";import"./el-switch-D49n4nYq.js";import"./message-box-service-BzqjQhzH.js";import"./el-table-column-DIe-Jdox.js";import"./merge-k_TKlNxw.js";import"./isArrayLikeObject-CNIeaAGq.js";/* empty css */import"./MarIcon-DRzNI1TJ.js";import"./conversation-history-DsSE1wLH.js";import"./error-presentation-CKm32JzU.js";const F=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,m)=>(o(),n(i,{request:e.request,writable:e.writable,settings:t},null,8,["request","writable"]))}});export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as a}from"./index-
|
|
1
|
+
import{E as a}from"./index-C8HJ-7wK.js";import{d as g,o as c,b as f,G as e,H as o,u as t,t as s,g as i,q as l,I as d,p as C,M as y,v as h,_ as v}from"./index-tebwt16R.js";/* empty css */import"./use-form-common-props-C_muwpbj.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:{}},emits:["extensionChanged"],setup(n,{emit:u}){const m=u;return(k,r)=>(c(),f("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?(c(),C(y(n.extension),{key:0,embedded:"",request:n.request,onImported:r[0]||(r[0]=p=>m("extensionChanged"))},null,40,["request"])):h("",!0)]))}}),A=v(B,[["__scopeId","data-v-0ef02bfd"]]);export{A as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as De,d as Tn,D as Pn,w as An,X as Ms,Y as On,E as In,aK as Nn,o as Pt,b as ci,G as ut,u as At,H as Ot,v as Ts,p as Hn,ad as Wn,S as Ps,g as di,I as ui,aM as zn,a as _i,bk as Fn,_ as $n}from"./index-
|
|
1
|
+
import{t as De,d as Tn,D as Pn,w as An,X as Ms,Y as On,E as In,aK as Nn,o as Pt,b as ci,G as ut,u as At,H as Ot,v as Ts,p as Hn,ad as Wn,S as Ps,g as di,I as ui,aM as zn,a as _i,bk as Fn,_ as $n}from"./index-tebwt16R.js";import{M as fi}from"./MarIcon-DRzNI1TJ.js";import{p as Un}from"./HtmlPreviewFrame-DQimcizh.js";import{T as Kn}from"./WorkbenchPage-BQdwbvse.js";import"./FilePreviewLoading-EXabASKn.js";import"./use-form-common-props-C_muwpbj.js";import"./mobile-dialog-return-service-CDghLsut.js";import"./el-input-DsD8wPgd.js";import"./BusyIndicator-81gYfHFI.js";import"./el-form-item-CjLvz7IR.js";import"./el-switch-D49n4nYq.js";import"./message-box-service-BzqjQhzH.js";import"./error-presentation-CKm32JzU.js";import"./file-presentation-Cm7tx53N.js";import"./time-presentation-Cz63DSUv.js";import"./conversation-history-DsSE1wLH.js";import"./workbench-presentation-DSjYJkKK.js";import"./workbench-composer-interaction-controller-BFZkEbwV.js";import"./el-checkbox-D8E82IC3.js";import"./last-DXTTfs9a.js";import"./el-radio-rHorotS0.js";/* empty css */import"./el-select-vQRSFUuU.js";import"./index-C8HJ-7wK.js";import"./_baseFindIndex-D7XfJLKM.js";import"./_baseIteratee-CEjLB6P0.js";/* empty css */import"./runner-presentation-CjPY5Dey.js";import"./hosted-conversation-template-client-CYBI7IvT.js";import"./oauth-callback-B21gNkv-.js";import"./el-alert-DQT74Z6k.js";import"./code-navigation-target-BlnRe0-a.js";import"./mcp-center-service-Bt8KNvBQ.js";import"./catalog-page-service-D4eWT4uF.js";import"./ManagementPagination-DC_Jtk72.js";import"./el-date-picker-CzlIv3iG.js";import"./index-BzBol34B.js";import"./el-table-column-DIe-Jdox.js";import"./merge-k_TKlNxw.js";import"./isArrayLikeObject-CNIeaAGq.js";import"./advancedFormat-DwAKrlQQ.js";import"./union-C5QcR3bq.js";import"./el-input-number-DYTEBnhp.js";import"./enterprise-management-service-CYSkSkqU.js";import"./NodeDetailsDialogs-jvve59Rc.js";import"./el-descriptions-CrLOiLtM.js";import"./EnvironmentSecretManager-jWSJQLLY.js";import"./management-url-service-BUrqsIPf.js";var qn=2,Vn=1,Yn=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(qn,Math.floor(u/e.css.cell.width)),rows:Math.max(Vn,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]],Xn=[[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]],Q;function jn(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 Gn=class{constructor(){if(this.version="6",!Q){Q=new Uint8Array(65536),Q.fill(1),Q[0]=0,Q.fill(0,1,32),Q.fill(0,127,160),Q.fill(2,4352,4448),Q[9001]=2,Q[9002]=2,Q.fill(2,11904,42192),Q[12351]=1,Q.fill(2,44032,55204),Q.fill(2,63744,64256),Q.fill(2,65040,65050),Q.fill(2,65072,65136),Q.fill(2,65280,65377),Q.fill(2,65504,65511);for(let t=0;t<pi.length;++t)Q.fill(0,pi[t][0],pi[t][1]+1)}}wcwidth(t){return t<32?0:t<127?1:t<65536?Q[t]:jn(t,Xn)?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=Jt.extractWidth(i);n===0?r=!1:n>s&&(s=n)}return Jt.createPropertyValue(0,s,r)}},Jn=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
|
|