@futdevpro/ccap 1.1.2968 → 1.1.2972

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.
Files changed (192) hide show
  1. package/client-dist/{agent-instances.module-LFM3J2LA.js → agent-instances.module-7JIOUWBV.js} +2 -2
  2. package/client-dist/{ca.module-6IKKBFCV.js → ca.module-6RTUEF6F.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-MAJTREX5.js → cc-usage-dashboard.component-MUE3JFHY.js} +2 -2
  4. package/client-dist/{cc.module-WIBOFFFC.js → cc.module-MNX3GMAU.js} +2 -2
  5. package/client-dist/{chunk-GZNAXQSR.js → chunk-4WYWBPHC.js} +2 -2
  6. package/client-dist/{chunk-C6BPLTAT.js → chunk-4XIUSDLS.js} +2 -2
  7. package/client-dist/{chunk-M6XVA3F3.js → chunk-65KI3GR5.js} +2 -2
  8. package/client-dist/{chunk-GZJSMF4W.js → chunk-AAFXSEZA.js} +2 -2
  9. package/client-dist/{chunk-OHXBMPQN.js → chunk-AX73SZY3.js} +2 -2
  10. package/client-dist/{chunk-XC6OGCBT.js → chunk-BEGOF2N7.js} +2 -2
  11. package/client-dist/{chunk-SBTVSUCF.js → chunk-BM4UEP47.js} +2 -2
  12. package/client-dist/{chunk-ZO42CPIZ.js → chunk-D4MN4WBX.js} +2 -2
  13. package/client-dist/{chunk-334PU4V5.js → chunk-E4TY6O3W.js} +2 -2
  14. package/client-dist/{chunk-P4E77IA5.js → chunk-ECVTQRJ7.js} +2 -2
  15. package/client-dist/{chunk-ZTO2WC4L.js → chunk-F5SAKHCX.js} +2 -2
  16. package/client-dist/{chunk-SOA6UZHW.js → chunk-GAQBLHO3.js} +2 -2
  17. package/client-dist/{chunk-7QXWTKTQ.js → chunk-GAS7HMJI.js} +2 -2
  18. package/client-dist/{chunk-4O5PJT2Q.js → chunk-GK3RSZLZ.js} +2 -2
  19. package/client-dist/{chunk-KS3E56FC.js → chunk-IOXSJK5R.js} +2 -2
  20. package/client-dist/{chunk-GXVFIYGG.js → chunk-IPLQJBDL.js} +2 -2
  21. package/client-dist/{chunk-GOHAZ3UP.js → chunk-J6ZXTCHI.js} +2 -2
  22. package/client-dist/{chunk-PZ3A7XIC.js → chunk-K35DOQT7.js} +2 -2
  23. package/client-dist/{chunk-OAZA6CLB.js → chunk-K4GGODV4.js} +2 -2
  24. package/client-dist/{chunk-KYXVXZA4.js → chunk-K4ZQ4DD5.js} +2 -2
  25. package/client-dist/{chunk-5SYCIFC7.js → chunk-KVUL77OV.js} +2 -2
  26. package/client-dist/{chunk-Y4WOX5ZT.js → chunk-LZ2PMXWH.js} +2 -2
  27. package/client-dist/{chunk-BBQR7THP.js → chunk-MBE24QTZ.js} +2 -2
  28. package/client-dist/{chunk-TKJC6WIX.js → chunk-MEDDAUB3.js} +2 -2
  29. package/client-dist/{chunk-B5C3VRNW.js → chunk-MUV3H7Z7.js} +2 -2
  30. package/client-dist/{chunk-AFNG5IFQ.js → chunk-N3AR5TZI.js} +2 -2
  31. package/client-dist/{chunk-5JBJMD26.js → chunk-N3TQEDBL.js} +2 -2
  32. package/client-dist/{chunk-OAYVBZZD.js → chunk-NEZJG3XV.js} +2 -2
  33. package/client-dist/{chunk-BP6PERGA.js → chunk-OSJXI65X.js} +2 -2
  34. package/client-dist/{chunk-SLYF4BZT.js → chunk-P3UG3XEN.js} +2 -2
  35. package/client-dist/{chunk-2XU2LIK5.js → chunk-PQVFWHXC.js} +2 -2
  36. package/client-dist/{chunk-375SGREC.js → chunk-QB2UH3OX.js} +2 -2
  37. package/client-dist/{chunk-BNZAUTHL.js → chunk-QEMJBYC2.js} +2 -2
  38. package/client-dist/{chunk-AOZH5KZ5.js → chunk-QFCHFWGA.js} +2 -2
  39. package/client-dist/{chunk-K2BXFMAZ.js → chunk-QJKK7MN2.js} +2 -2
  40. package/client-dist/{chunk-MDOELCBX.js → chunk-QSOEXUHP.js} +2 -2
  41. package/client-dist/{chunk-3XP3ALCH.js → chunk-RL2M6DJN.js} +2 -2
  42. package/client-dist/{chunk-5L255H5C.js → chunk-RXRE3G4K.js} +2 -2
  43. package/client-dist/{chunk-5L255H5C.js.map → chunk-RXRE3G4K.js.map} +1 -1
  44. package/client-dist/{chunk-YV7GEWMV.js → chunk-SE7LVQMB.js} +2 -2
  45. package/client-dist/{chunk-UZWYHQU5.js → chunk-STIDSZ7I.js} +2 -2
  46. package/client-dist/{chunk-CSJOCUB5.js → chunk-T2722QP4.js} +2 -2
  47. package/client-dist/{chunk-WSRT2AXO.js → chunk-TKONBOQQ.js} +2 -2
  48. package/client-dist/{chunk-YFGRQVYN.js → chunk-U2WBKQML.js} +2 -2
  49. package/client-dist/{chunk-ZRLRJNW4.js → chunk-UE4NDJOE.js} +2 -2
  50. package/client-dist/{chunk-VER7DLPS.js → chunk-UNNGLS4Y.js} +2 -2
  51. package/client-dist/{chunk-PIN4VFXO.js → chunk-UYLV7WAB.js} +2 -2
  52. package/client-dist/chunk-UYNSNX4F.js +2 -0
  53. package/client-dist/chunk-UYNSNX4F.js.map +7 -0
  54. package/client-dist/{chunk-7DXWR6DX.js → chunk-VJEPWZGD.js} +2 -2
  55. package/client-dist/{chunk-DZ4365RI.js → chunk-VOITLR7O.js} +2 -2
  56. package/client-dist/{chunk-HIUVSLF2.js → chunk-VY4R2KTU.js} +2 -2
  57. package/client-dist/{chunk-F5OKFSMW.js → chunk-WDV7MFNU.js} +2 -2
  58. package/client-dist/{chunk-OUBAPK5Q.js → chunk-WKAKYIU5.js} +2 -2
  59. package/client-dist/{chunk-62O4YXH2.js → chunk-XYNIZC5J.js} +2 -2
  60. package/client-dist/{chunk-536ONGRA.js → chunk-ZO5UJXHI.js} +2 -2
  61. package/client-dist/{chunk-XS5NRBFX.js → chunk-ZOWPV7TY.js} +2 -2
  62. package/client-dist/{chunk-GLISSBW6.js → chunk-ZQT44XRN.js} +2 -2
  63. package/client-dist/{consultant.module-XYGMFIBX.js → consultant.module-DMGMZCMM.js} +2 -2
  64. package/client-dist/{crd.module-2TUYARHJ.js → crd.module-UY2I7Q6C.js} +2 -2
  65. package/client-dist/{dashboard.module-G47SY7RR.js → dashboard.module-YAB6AARF.js} +2 -2
  66. package/client-dist/{do.module-WWLJVEM2.js → do.module-BQ4IIBCS.js} +2 -2
  67. package/client-dist/{document-library.module-EKVYKBGO.js → document-library.module-DDFSHADI.js} +2 -2
  68. package/client-dist/{embedding-eval.module-ZXMLZHML.js → embedding-eval.module-FJTNYACK.js} +2 -2
  69. package/client-dist/{embedding-registry.module-EE5OFQVA.js → embedding-registry.module-Q7H4MSJI.js} +2 -2
  70. package/client-dist/{err.module-AQ7S3MIX.js → err.module-TEYGZOAQ.js} +2 -2
  71. package/client-dist/{feedback.module-PS2TJILH.js → feedback.module-46D4VD2U.js} +2 -2
  72. package/client-dist/{host-runtime-mcp.module-XHWB3K2U.js → host-runtime-mcp.module-MOMBWPOG.js} +2 -2
  73. package/client-dist/index.html +2 -2
  74. package/client-dist/{live-dev-pipeline.module-HVIUS654.js → live-dev-pipeline.module-3ZZC7EDM.js} +2 -2
  75. package/client-dist/{logs.module-RZOFXUFO.js → logs.module-CFTLPVNZ.js} +2 -2
  76. package/client-dist/main-4A2EJGC7.js +7 -0
  77. package/client-dist/main-4A2EJGC7.js.map +7 -0
  78. package/client-dist/{master-control-remote-poc.module-Z44FHFP3.js → master-control-remote-poc.module-4NVA4X32.js} +2 -2
  79. package/client-dist/{mobile-app.module-7EN7TBHL.js → mobile-app.module-46TKS6V5.js} +2 -2
  80. package/client-dist/{model-registry.module-3GLXXUHT.js → model-registry.module-L56ALPDT.js} +2 -2
  81. package/client-dist/{oc.module-XJXWDHRE.js → oc.module-OTDAUU73.js} +2 -2
  82. package/client-dist/{orc.module-TGXVMQLI.js → orc.module-L6G3GB6S.js} +2 -2
  83. package/client-dist/{project-management.module-24CUEUF5.js → project-management.module-U75UPDGP.js} +2 -2
  84. package/client-dist/project-source-routed.module-I4WHFL6T.js +2 -0
  85. package/client-dist/{scheduler.module-I4VI7QU7.js → scheduler.module-V7JUED6T.js} +2 -2
  86. package/client-dist/{session.module-MQKLXSPJ.js → session.module-CZCDYPUM.js} +2 -2
  87. package/client-dist/{set.module-EBOPU2SQ.js → set.module-XQ6TPATG.js} +5 -5
  88. package/client-dist/{set.module-EBOPU2SQ.js.map → set.module-XQ6TPATG.js.map} +3 -3
  89. package/client-dist/{setup.module-LOYXPT7O.js → setup.module-M5RVUX4A.js} +2 -2
  90. package/client-dist/styles-XKQ3MDLE.css +2 -0
  91. package/client-dist/styles-XKQ3MDLE.css.map +7 -0
  92. package/client-dist/{terminals.module-45PXK7MW.js → terminals.module-LPJ4TLM7.js} +2 -2
  93. package/client-dist/{voice-notes-poc.module-UIV4RQN3.js → voice-notes-poc.module-UXJM32VE.js} +2 -2
  94. package/client-dist/{wfs.module-BNMGWII3.js → wfs.module-UIBLZ4KZ.js} +2 -2
  95. package/package.json +1 -1
  96. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.d.ts.map +1 -1
  97. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.js +13 -0
  98. package/server/build/src/_modules/setup-config/_routes/sc-server-status.controller.js.map +1 -1
  99. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.d.ts +28 -0
  100. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.d.ts.map +1 -1
  101. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.js +106 -0
  102. package/server/build/src/_modules/setup-config/_services/control-services/sc-server-status.control-service.js.map +1 -1
  103. package/client-dist/chunk-EIJM7YZZ.js +0 -2
  104. package/client-dist/chunk-EIJM7YZZ.js.map +0 -7
  105. package/client-dist/main-N4T3LPFJ.js +0 -7
  106. package/client-dist/main-N4T3LPFJ.js.map +0 -7
  107. package/client-dist/project-source-routed.module-DNGOB2JX.js +0 -2
  108. package/client-dist/styles-YBSH3JQY.css +0 -2
  109. package/client-dist/styles-YBSH3JQY.css.map +0 -7
  110. /package/client-dist/{agent-instances.module-LFM3J2LA.js.map → agent-instances.module-7JIOUWBV.js.map} +0 -0
  111. /package/client-dist/{ca.module-6IKKBFCV.js.map → ca.module-6RTUEF6F.js.map} +0 -0
  112. /package/client-dist/{cc-usage-dashboard.component-MAJTREX5.js.map → cc-usage-dashboard.component-MUE3JFHY.js.map} +0 -0
  113. /package/client-dist/{cc.module-WIBOFFFC.js.map → cc.module-MNX3GMAU.js.map} +0 -0
  114. /package/client-dist/{chunk-GZNAXQSR.js.map → chunk-4WYWBPHC.js.map} +0 -0
  115. /package/client-dist/{chunk-C6BPLTAT.js.map → chunk-4XIUSDLS.js.map} +0 -0
  116. /package/client-dist/{chunk-M6XVA3F3.js.map → chunk-65KI3GR5.js.map} +0 -0
  117. /package/client-dist/{chunk-GZJSMF4W.js.map → chunk-AAFXSEZA.js.map} +0 -0
  118. /package/client-dist/{chunk-OHXBMPQN.js.map → chunk-AX73SZY3.js.map} +0 -0
  119. /package/client-dist/{chunk-XC6OGCBT.js.map → chunk-BEGOF2N7.js.map} +0 -0
  120. /package/client-dist/{chunk-SBTVSUCF.js.map → chunk-BM4UEP47.js.map} +0 -0
  121. /package/client-dist/{chunk-ZO42CPIZ.js.map → chunk-D4MN4WBX.js.map} +0 -0
  122. /package/client-dist/{chunk-334PU4V5.js.map → chunk-E4TY6O3W.js.map} +0 -0
  123. /package/client-dist/{chunk-P4E77IA5.js.map → chunk-ECVTQRJ7.js.map} +0 -0
  124. /package/client-dist/{chunk-ZTO2WC4L.js.map → chunk-F5SAKHCX.js.map} +0 -0
  125. /package/client-dist/{chunk-SOA6UZHW.js.map → chunk-GAQBLHO3.js.map} +0 -0
  126. /package/client-dist/{chunk-7QXWTKTQ.js.map → chunk-GAS7HMJI.js.map} +0 -0
  127. /package/client-dist/{chunk-4O5PJT2Q.js.map → chunk-GK3RSZLZ.js.map} +0 -0
  128. /package/client-dist/{chunk-KS3E56FC.js.map → chunk-IOXSJK5R.js.map} +0 -0
  129. /package/client-dist/{chunk-GXVFIYGG.js.map → chunk-IPLQJBDL.js.map} +0 -0
  130. /package/client-dist/{chunk-GOHAZ3UP.js.map → chunk-J6ZXTCHI.js.map} +0 -0
  131. /package/client-dist/{chunk-PZ3A7XIC.js.map → chunk-K35DOQT7.js.map} +0 -0
  132. /package/client-dist/{chunk-OAZA6CLB.js.map → chunk-K4GGODV4.js.map} +0 -0
  133. /package/client-dist/{chunk-KYXVXZA4.js.map → chunk-K4ZQ4DD5.js.map} +0 -0
  134. /package/client-dist/{chunk-5SYCIFC7.js.map → chunk-KVUL77OV.js.map} +0 -0
  135. /package/client-dist/{chunk-Y4WOX5ZT.js.map → chunk-LZ2PMXWH.js.map} +0 -0
  136. /package/client-dist/{chunk-BBQR7THP.js.map → chunk-MBE24QTZ.js.map} +0 -0
  137. /package/client-dist/{chunk-TKJC6WIX.js.map → chunk-MEDDAUB3.js.map} +0 -0
  138. /package/client-dist/{chunk-B5C3VRNW.js.map → chunk-MUV3H7Z7.js.map} +0 -0
  139. /package/client-dist/{chunk-AFNG5IFQ.js.map → chunk-N3AR5TZI.js.map} +0 -0
  140. /package/client-dist/{chunk-5JBJMD26.js.map → chunk-N3TQEDBL.js.map} +0 -0
  141. /package/client-dist/{chunk-OAYVBZZD.js.map → chunk-NEZJG3XV.js.map} +0 -0
  142. /package/client-dist/{chunk-BP6PERGA.js.map → chunk-OSJXI65X.js.map} +0 -0
  143. /package/client-dist/{chunk-SLYF4BZT.js.map → chunk-P3UG3XEN.js.map} +0 -0
  144. /package/client-dist/{chunk-2XU2LIK5.js.map → chunk-PQVFWHXC.js.map} +0 -0
  145. /package/client-dist/{chunk-375SGREC.js.map → chunk-QB2UH3OX.js.map} +0 -0
  146. /package/client-dist/{chunk-BNZAUTHL.js.map → chunk-QEMJBYC2.js.map} +0 -0
  147. /package/client-dist/{chunk-AOZH5KZ5.js.map → chunk-QFCHFWGA.js.map} +0 -0
  148. /package/client-dist/{chunk-K2BXFMAZ.js.map → chunk-QJKK7MN2.js.map} +0 -0
  149. /package/client-dist/{chunk-MDOELCBX.js.map → chunk-QSOEXUHP.js.map} +0 -0
  150. /package/client-dist/{chunk-3XP3ALCH.js.map → chunk-RL2M6DJN.js.map} +0 -0
  151. /package/client-dist/{chunk-YV7GEWMV.js.map → chunk-SE7LVQMB.js.map} +0 -0
  152. /package/client-dist/{chunk-UZWYHQU5.js.map → chunk-STIDSZ7I.js.map} +0 -0
  153. /package/client-dist/{chunk-CSJOCUB5.js.map → chunk-T2722QP4.js.map} +0 -0
  154. /package/client-dist/{chunk-WSRT2AXO.js.map → chunk-TKONBOQQ.js.map} +0 -0
  155. /package/client-dist/{chunk-YFGRQVYN.js.map → chunk-U2WBKQML.js.map} +0 -0
  156. /package/client-dist/{chunk-ZRLRJNW4.js.map → chunk-UE4NDJOE.js.map} +0 -0
  157. /package/client-dist/{chunk-VER7DLPS.js.map → chunk-UNNGLS4Y.js.map} +0 -0
  158. /package/client-dist/{chunk-PIN4VFXO.js.map → chunk-UYLV7WAB.js.map} +0 -0
  159. /package/client-dist/{chunk-7DXWR6DX.js.map → chunk-VJEPWZGD.js.map} +0 -0
  160. /package/client-dist/{chunk-DZ4365RI.js.map → chunk-VOITLR7O.js.map} +0 -0
  161. /package/client-dist/{chunk-HIUVSLF2.js.map → chunk-VY4R2KTU.js.map} +0 -0
  162. /package/client-dist/{chunk-F5OKFSMW.js.map → chunk-WDV7MFNU.js.map} +0 -0
  163. /package/client-dist/{chunk-OUBAPK5Q.js.map → chunk-WKAKYIU5.js.map} +0 -0
  164. /package/client-dist/{chunk-62O4YXH2.js.map → chunk-XYNIZC5J.js.map} +0 -0
  165. /package/client-dist/{chunk-536ONGRA.js.map → chunk-ZO5UJXHI.js.map} +0 -0
  166. /package/client-dist/{chunk-XS5NRBFX.js.map → chunk-ZOWPV7TY.js.map} +0 -0
  167. /package/client-dist/{chunk-GLISSBW6.js.map → chunk-ZQT44XRN.js.map} +0 -0
  168. /package/client-dist/{consultant.module-XYGMFIBX.js.map → consultant.module-DMGMZCMM.js.map} +0 -0
  169. /package/client-dist/{crd.module-2TUYARHJ.js.map → crd.module-UY2I7Q6C.js.map} +0 -0
  170. /package/client-dist/{dashboard.module-G47SY7RR.js.map → dashboard.module-YAB6AARF.js.map} +0 -0
  171. /package/client-dist/{do.module-WWLJVEM2.js.map → do.module-BQ4IIBCS.js.map} +0 -0
  172. /package/client-dist/{document-library.module-EKVYKBGO.js.map → document-library.module-DDFSHADI.js.map} +0 -0
  173. /package/client-dist/{embedding-eval.module-ZXMLZHML.js.map → embedding-eval.module-FJTNYACK.js.map} +0 -0
  174. /package/client-dist/{embedding-registry.module-EE5OFQVA.js.map → embedding-registry.module-Q7H4MSJI.js.map} +0 -0
  175. /package/client-dist/{err.module-AQ7S3MIX.js.map → err.module-TEYGZOAQ.js.map} +0 -0
  176. /package/client-dist/{feedback.module-PS2TJILH.js.map → feedback.module-46D4VD2U.js.map} +0 -0
  177. /package/client-dist/{host-runtime-mcp.module-XHWB3K2U.js.map → host-runtime-mcp.module-MOMBWPOG.js.map} +0 -0
  178. /package/client-dist/{live-dev-pipeline.module-HVIUS654.js.map → live-dev-pipeline.module-3ZZC7EDM.js.map} +0 -0
  179. /package/client-dist/{logs.module-RZOFXUFO.js.map → logs.module-CFTLPVNZ.js.map} +0 -0
  180. /package/client-dist/{master-control-remote-poc.module-Z44FHFP3.js.map → master-control-remote-poc.module-4NVA4X32.js.map} +0 -0
  181. /package/client-dist/{mobile-app.module-7EN7TBHL.js.map → mobile-app.module-46TKS6V5.js.map} +0 -0
  182. /package/client-dist/{model-registry.module-3GLXXUHT.js.map → model-registry.module-L56ALPDT.js.map} +0 -0
  183. /package/client-dist/{oc.module-XJXWDHRE.js.map → oc.module-OTDAUU73.js.map} +0 -0
  184. /package/client-dist/{orc.module-TGXVMQLI.js.map → orc.module-L6G3GB6S.js.map} +0 -0
  185. /package/client-dist/{project-management.module-24CUEUF5.js.map → project-management.module-U75UPDGP.js.map} +0 -0
  186. /package/client-dist/{project-source-routed.module-DNGOB2JX.js.map → project-source-routed.module-I4WHFL6T.js.map} +0 -0
  187. /package/client-dist/{scheduler.module-I4VI7QU7.js.map → scheduler.module-V7JUED6T.js.map} +0 -0
  188. /package/client-dist/{session.module-MQKLXSPJ.js.map → session.module-CZCDYPUM.js.map} +0 -0
  189. /package/client-dist/{setup.module-LOYXPT7O.js.map → setup.module-M5RVUX4A.js.map} +0 -0
  190. /package/client-dist/{terminals.module-45PXK7MW.js.map → terminals.module-LPJ4TLM7.js.map} +0 -0
  191. /package/client-dist/{voice-notes-poc.module-UIV4RQN3.js.map → voice-notes-poc.module-UXJM32VE.js.map} +0 -0
  192. /package/client-dist/{wfs.module-BNMGWII3.js.map → wfs.module-UIBLZ4KZ.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{j as ks}from"./chunk-62O4YXH2.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-5L255H5C.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
1
+ import{j as ks}from"./chunk-XYNIZC5J.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-RXRE3G4K.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
2
2
  This means that the reconnection will use the socket.io reconnection logic, `,"not the Dynamo implementations."),this.reconnect=!1)}};xe.DyFM_SocketClient_Params=bt});var kt=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.DyFM_SocketEvent=void 0;var Ie=gs(),ws=ms(),Ee=gt(),mr=hr(),br=bs(),ke=qe(),Et=class{name;eventKey;serviceName;preProcesses;tasks;logEvent;logEventContent;stackLocation;constructor(e){try{this.name=e.name??e.eventKey,this.eventKey=e.eventKey,this.serviceName=e.serviceName??"UnknownSocketService",this.preProcesses=e.preProcesses??[],this.tasks=e.tasks??[],this.stackLocation=(0,mr.DyFM_getConstructionStackLocation)(),e.logEvent!==void 0?this.logEvent=e.logEvent:this.eventKey===ke.DyFM_SocketEvent_Key.subscribe?this.logEvent=!1:[ke.DyFM_SocketEvent_Key.incomingNewConnection,ke.DyFM_SocketEvent_Key.outgoingNewConnection,ke.DyFM_SocketEvent_Key.disconnect].includes(this.eventKey)?this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents||Ie.DyFM_global_settings.log_settings.socket_mainEvents:this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents,this.logEventContent=e.logEventContent??Ie.DyFM_global_settings.log_settings.socket_eventContent}catch(t){throw Ee.DyFM_Log.error(`
3
3
  Socket Event params setup failed (${this.serviceName}): ${e.eventKey}`,t),t}}getPreLog(e){return u(this,null,function*(){try{this.logEventContent&&this.eventKey!==ke.DyFM_SocketEvent_Key.incomingNewConnection?Ee.DyFM_Log.log(`---> incoming socket(${this.serviceName}) event: ${this.eventKey};
4
4
 
@@ -8,4 +8,4 @@ socket-client(${this.params?.name}) Service setup finished`),yield this.connectS
8
8
  Fn:. setupDefaultEvents`),this.defaultEvents.forEach(e=>{e.serviceName=this.params.name;let t=this.incomingEvents.find(n=>n.eventKey===e.eventKey);t?t.tasks.unshift(...e.tasks):this.incomingEvents.push(e)})}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Default Events failed, ERROR:`,e),e}})}setupSocketEvents(){return u(this,null,function*(){try{this.debugLog&&console.log(`Setup socket-client(${this.params.name}) Events...`),yield Lo.DyFM_Array.asyncForEach(this.incomingEvents,e=>u(this,null,function*(){e.serviceName=this.params.name,this.socket.on(e.eventKey,t=>u(this,null,function*(){try{yield e.executeEventTasks(t,this.params.service)}catch(n){k.DyFM_Log.error(`socket-client(${this.params.name}) Event failed, ERROR:`,n),yield this.emitEvent(X.DyFM_SocketEvent_Key.error,n)}}))}))}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Socket Events failed, ERROR:`,e),e}})}connectSocket(){return u(this,null,function*(){try{k.DyFM_Log.info(`< .. > socket-client(${this.params.name}) connecting to ${this.params.address}:${this.params.port} ...`),this.socket.connect(),this.params.reconnect&&(yield this.tryReconnectIfNeeded())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Connect Socket failed, ERROR:`,e),e}})}tryingToReconnect=!1;tryReconnectIfNeeded(){return u(this,null,function*(){try{if(console.log("tryReconnectIfNeeded",this._params.reconnectDelay),this.tryingToReconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) already trying to reconnect!`);return}if(!this.params.reconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) Dynamo reconnection is disabled!`);return}this.tryingToReconnect=!0,this.logFn&&console.log(`
9
9
  Fn:. tryReconnectIfNeeded`),yield vn.DyFM_Async.delay(this._params.reconnectDelay),this.connected||(this.tryingToReconnect=!1,yield this.connectSocket())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Try Reconnect failed, ERROR:`,e),this.tryingToReconnect=!1,e}})}reconnect(){this.tryingToReconnect=!1,this.socket&&this.socket.disconnect(),this.connectSocket()}};lt.DyFM_SocketClient_ServiceBase=os});var wn=f(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ht=(ys(),K(_s));ht.__exportStar(qe(),be);ht.__exportStar(Ss(),be);ht.__exportStar(kt(),be);ht.__exportStar(Sn(),be)});function pr(s,e){!e?.injector&&_t(pr);let t=e?.injector??oe(fs),n=new hs(1),r=Fe(()=>{let i;try{i=s()}catch(o){yt(()=>n.error(o));return}yt(()=>n.next(i))},{injector:t,manualCleanup:!0});return t.get(De).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}function mt(s,e){let t=!e?.manualCleanup;t&&!e?.injector&&_t(mt);let n=t?e?.injector?.get(De)??oe(De):null,r=_r(e?.equal),i;e?.requireSync?i=z({kind:0},{equal:r}):i=z({kind:1,value:e?.initialValue},{equal:r});let o=s.subscribe({next:c=>i.set({kind:1,value:c}),error:c=>{if(e?.rejectErrors)throw c;i.set({kind:2,error:c})}});if(e?.requireSync&&i().kind===0)throw new pt(601,!1);return n?.onDestroy(o.unsubscribe.bind(o)),ps(()=>{let c=i();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new pt(601,!1)}},{equal:e?.equal})}function _r(s=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&s(e.value,t.value)}var C=us(fr()),d=us(wn());var j=function(s){return s.connecting="connecting",s.connected="connected",s.error="error",s}(j||{});function dt(){if($.socketUrl!==void 0&&$.socketUrl.trim()!=="")return $.socketUrl.trim();if(typeof window<"u"){let s=new URL(window.location.href).origin;return C.DyFM_Log.warn("CCAP_Socket | socketUrl not set, using same-origin fallback:",s),s}return""}function U(s){return s!=null&&typeof s=="object"&&!(s instanceof Error)}function Cn(){return typeof globalThis>"u"?!1:globalThis.jasmine!==void 0}var Tn="answer",On="notify-user",Rn="agent-events",Pn="context:updated",An="monitoring:event",Nn="user-notification",Dn="cc-session:status",Fn="cc-session:output",Mn="cc-session:event",qn="cc-session:list-update",xn="cc-session:session-update",In="ca-session:status",jn="ca-session:output",Ln="ca-session:event",Bn="ca-session:list-update",Un="ext-session-msg:message",Kn="ext-session-msg:update",$n="user-interaction:request",Vn="instance-data:session-status-updated",Wn="instance:presence-update",Hn="openclaw-instance-data:status-updated",Yn="cci-instance-data:status-updated",Xn="cai-instance-data:status-updated",Jn="terminal:list:result",zn="terminal:start:result",Gn="terminal:command-result",Qn="terminal:command-output",Zn="cc:rate-limit-update",er="cc:account-usage-update",tr="cc:account-list-update",sr="session-queue:updated",nr="session-queue:lock-changed",Uo="system-error",Ko="terminal-error",$o="server:start-id",Vo="connect_error",Wo=8*C.second,Yc=(()=>{class s extends d.DyFM_SocketClient_ServiceBase{status_$=z(j.connecting);lastError_$=z(null);connectAttemptCount_$=z(0);hasEverConnected=!1;connectionTimeoutId=null;knownServerStartId=null;eventSubject_S=new ls;event$=this.eventSubject_S.asObservable();connected_$=mt(this.connected$,{initialValue:!1});get socketAddress(){return dt()||(this.params?.address??"")}globalError_CS=oe(ks);settingsGeneral_DS=oe(Es);constructor(){super(),Cn()||this.startConnectionTimeout(),Fe(()=>{this.connected&&!this.subscribed&&this.subscribe()})}startConnectionTimeout(){this.clearConnectionTimeout(),this.connectionTimeoutId=setTimeout(()=>{if(this.connectionTimeoutId=null,this.status_$()===j.connecting){let t=new Error("Socket connection timeout \u2013 server unreachable or setup failed. Click to reconnect.");this.status_$.set(j.error),this.lastError_$.set(t),C.DyFM_Log.warn("CCAP_Socket | Connection timeout")}},Wo)}clearConnectionTimeout(){this.connectionTimeoutId!==null&&(clearTimeout(this.connectionTimeoutId),this.connectionTimeoutId=null)}getParams(){let t=dt(),n=Cn(),r={path:"/socket",transports:["polling","websocket"],reconnectionDelay:1e3};return n&&(r.reconnection=!1),new d.DyFM_SocketClient_Params({name:"CCAP Client",address:t,reconnect:!n,reconnectDelay:C.minute,socketOptions:r})}getIncomingEvents(){let t=this,n=(r,i)=>{try{let o=U(i)?i:{};if(!t.eventSubject_S){let c=`Socket event dropped: eventSubject not initialized | event: ${r} | This means the socket event system is not functional \u2014 no live updates will arrive.`;C.DyFM_Log.error(`[CCAP_Socket] ${c}`),t.globalError_CS.showError(new Error(c),"client-socket-event-subject");return}t.eventSubject_S.next({event:r,payload:o})}catch(o){let c=o instanceof Error?o.message:String(o);C.DyFM_Log.error(`[CCAP_Socket] pushEnvelope failed | event: ${r} | ${c}`),t.globalError_CS.showError(o instanceof Error?o:new Error(`Socket event processing failed: ${r} \u2014 ${c}`),"client-socket-push-envelope")}};return[new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.outgoingNewConnection,tasks:[()=>u(this,null,function*(){t.clearConnectionTimeout(),t.hasEverConnected=!0,t.status_$.set(j.connected),t.lastError_$.set(null),t.connectAttemptCount_$.set(0),C.DyFM_Log.info("CCAP_Socket | Connected")})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.disconnect,tasks:[()=>u(this,null,function*(){t.hasEverConnected&&t.status_$.set(j.error),C.DyFM_Log.info("CCAP_Socket | Disconnected")})]}),new d.DyFM_SocketEvent({eventKey:Vo,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.connectAttemptCount_$.update(a=>a+1);let i=r instanceof Error?r:new Error(String(r)),o=U(r)?r.description:void 0,c=U(r)?r.type:void 0;C.DyFM_Log.info("CCAP_Socket | connect_error",`attempt #${t.connectAttemptCount_$()}`,i?.message??String(r),o!==void 0?String(o):"",c!==void 0?String(c):""),t.status_$.set(j.error);let h=t.params?.address??"",_=t.buildSocketErrorDisplay({err:i,socketUrl:h,eventType:"connect_error",raw:r});t.lastError_$.set(_),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(_.fullMessage??_.message??i.message),stack:typeof _.stack=="string"?_.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.error,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.status_$.set(j.error);let i=r instanceof Error?r:new Error(String(r)),o=t.params?.address??"",c=t.buildSocketErrorDisplay({err:i,socketUrl:o,eventType:"error",raw:r});t.lastError_$.set(c),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(c.fullMessage??c.message??i.message),stack:typeof c.stack=="string"?c.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:Tn,tasks:[r=>u(this,null,function*(){n(Tn,r)})]}),new d.DyFM_SocketEvent({eventKey:On,tasks:[r=>u(this,null,function*(){n(On,r)})]}),new d.DyFM_SocketEvent({eventKey:Rn,tasks:[r=>u(this,null,function*(){n(Rn,r)})]}),new d.DyFM_SocketEvent({eventKey:Pn,tasks:[r=>u(this,null,function*(){n(Pn,r)})]}),new d.DyFM_SocketEvent({eventKey:An,tasks:[r=>u(this,null,function*(){n(An,r)})]}),new d.DyFM_SocketEvent({eventKey:Nn,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{};if(n(Nn,r),i.type===Uo){let o=t.buildServerErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}else if(i.type===Ko){let o=t.buildTerminalErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}})]}),new d.DyFM_SocketEvent({eventKey:$o,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{},o=typeof i.serverStartId=="number"?i.serverStartId:void 0;o!==void 0&&(t.knownServerStartId===null?(t.knownServerStartId=o,C.DyFM_Log.info("CCAP_Socket | Server start ID stored:",o)):t.knownServerStartId!==o&&(C.DyFM_Log.warn("CCAP_Socket | Server restarted (start ID changed), reloading page"),window.location.reload()))})]}),new d.DyFM_SocketEvent({eventKey:Dn,tasks:[r=>u(this,null,function*(){n(Dn,r)})]}),new d.DyFM_SocketEvent({eventKey:Fn,tasks:[r=>u(this,null,function*(){n(Fn,r)})]}),new d.DyFM_SocketEvent({eventKey:Mn,tasks:[r=>u(this,null,function*(){n(Mn,r)})]}),new d.DyFM_SocketEvent({eventKey:qn,tasks:[r=>u(this,null,function*(){n(qn,r)})]}),new d.DyFM_SocketEvent({eventKey:xn,tasks:[r=>u(this,null,function*(){n(xn,r)})]}),new d.DyFM_SocketEvent({eventKey:In,tasks:[r=>u(this,null,function*(){n(In,r)})]}),new d.DyFM_SocketEvent({eventKey:jn,tasks:[r=>u(this,null,function*(){n(jn,r)})]}),new d.DyFM_SocketEvent({eventKey:Ln,tasks:[r=>u(this,null,function*(){n(Ln,r)})]}),new d.DyFM_SocketEvent({eventKey:Bn,tasks:[r=>u(this,null,function*(){n(Bn,r)})]}),new d.DyFM_SocketEvent({eventKey:Un,tasks:[r=>u(this,null,function*(){n(Un,r)})]}),new d.DyFM_SocketEvent({eventKey:Kn,tasks:[r=>u(this,null,function*(){n(Kn,r)})]}),new d.DyFM_SocketEvent({eventKey:$n,tasks:[r=>u(this,null,function*(){n($n,r)})]}),new d.DyFM_SocketEvent({eventKey:Vn,tasks:[r=>u(this,null,function*(){n(Vn,r)})]}),new d.DyFM_SocketEvent({eventKey:Wn,tasks:[r=>u(this,null,function*(){n(Wn,r)})]}),new d.DyFM_SocketEvent({eventKey:Hn,tasks:[r=>u(this,null,function*(){n(Hn,r)})]}),new d.DyFM_SocketEvent({eventKey:Yn,tasks:[r=>u(this,null,function*(){n(Yn,r)})]}),new d.DyFM_SocketEvent({eventKey:Xn,tasks:[r=>u(this,null,function*(){n(Xn,r)})]}),new d.DyFM_SocketEvent({eventKey:Jn,tasks:[r=>u(this,null,function*(){n(Jn,r)})]}),new d.DyFM_SocketEvent({eventKey:zn,tasks:[r=>u(this,null,function*(){n(zn,r)})]}),new d.DyFM_SocketEvent({eventKey:Gn,tasks:[r=>u(this,null,function*(){n(Gn,r)})]}),new d.DyFM_SocketEvent({eventKey:Qn,tasks:[r=>u(this,null,function*(){n(Qn,r)})]}),new d.DyFM_SocketEvent({eventKey:sr,tasks:[r=>u(this,null,function*(){n(sr,r)})]}),new d.DyFM_SocketEvent({eventKey:nr,tasks:[r=>u(this,null,function*(){n(nr,r)})]}),new d.DyFM_SocketEvent({eventKey:Zn,tasks:[r=>u(this,null,function*(){n(Zn,r)})]}),new d.DyFM_SocketEvent({eventKey:er,tasks:[r=>u(this,null,function*(){n(er,r)})]}),new d.DyFM_SocketEvent({eventKey:tr,tasks:[r=>u(this,null,function*(){n(tr,r)})]})]}getSubscriptionContent(){return u(this,null,function*(){let t=this.socket?.id;return Promise.resolve({clientId:t})})}shouldReportSocketConnectionErrorsToErrorList(){return this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0}buildSocketErrorDisplay(t){let n=t.err.message?.trim()?t.err.message:"WebSocket connection failed",r=t.socketUrl.trim()?`WebSocket: ${n} \u2014 ${t.socketUrl}`:`WebSocket: ${n}`,i={message:r,fullMessage:r,name:t.err.name,stack:t.err.stack??null,socketUrl:t.socketUrl,transport:"websocket",eventType:t.eventType,attemptedAt:new Date().toISOString(),connectAttempt:this.connectAttemptCount_$()},o=$.socketUrl!==void 0&&$.socketUrl.trim()!=="";i.socketUrlSource=o?"environment.socketUrl":"same-origin fallback";let c=this.params?.socketOptions?.transports??[];if(c.length>0&&(i.configuredTransports=c.join(", ")),typeof window<"u"&&(i.pageOrigin=window.location.origin),U(t.raw)){let _=t.raw,a=_.description;if(typeof a=="string"&&a.trim())i.description=a.trim();else if(a instanceof Error)i.description=a.message,a.stack&&(i.descriptionStack=a.stack);else if(a instanceof Event)i.description=this.extractDomEventInfo(a);else if(U(a)){let l=a,y=[];typeof l.message=="string"&&l.message.trim()&&y.push(l.message.trim()),typeof l.status=="number"&&(i.httpStatus=l.status,y.push(`HTTP ${l.status}`)),typeof l.statusText=="string"&&l.statusText.trim()&&(i.httpStatusText=l.statusText.trim(),y.push(l.statusText.trim())),typeof l.responseURL=="string"&&l.responseURL.trim()&&(i.responseUrl=l.responseURL.trim()),y.length>0&&(i.description=y.join(" \u2013 "))}typeof _.type=="string"&&_.type.trim()&&(i.type=_.type.trim()),U(_.context)&&(i.errorContext=_.context)}t.raw instanceof Event&&!i.description&&(i.description=this.extractDomEventInfo(t.raw));let h=[r];if(typeof i.description=="string"&&h.push(`Cause: ${i.description}`),typeof i.httpStatus=="number"){let _=typeof i.httpStatusText=="string"?` ${i.httpStatusText}`:"";h.push(`HTTP: ${i.httpStatus}${_}`)}return typeof i.responseUrl=="string"&&h.push(`Response URL: ${i.responseUrl}`),h.push(`Attempt: #${i.connectAttempt}`),h.push(`Source: ${i.socketUrlSource}`),i.fullMessage=h.join(" | "),i}extractDomEventInfo(t){let n=[];n.push(`type=${t.type}`);let r=t.target;return U(r)&&(typeof r.readyState=="number"&&n.push(`readyState=${r.readyState}`),typeof r.url=="string"&&r.url&&n.push(`url=${r.url}`),typeof r.responseURL=="string"&&r.responseURL&&n.push(`responseURL=${r.responseURL}`),typeof r.status=="number"&&n.push(`status=${r.status}`)),n.push("(DOM Event - tipikusan SSL cert reject, CORS, vagy network unreachable)"),n.join(", ")}buildTerminalErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=typeof t.code=="string"?t.code:String(t.code??""),i=[n];r&&i.push(`K\xF3d: ${r}`),typeof t.terminalId=="string"&&t.terminalId.trim()&&i.push(`Termin\xE1l ID: ${t.terminalId.trim()}`),typeof t.path=="string"&&t.path.trim()&&i.push(`Path: ${t.path.trim()}`);let o=i.join(`
10
10
  `),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:null,detailsText:o,timestamp:c}}buildServerErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=t.stack,i=typeof r=="string"?r:r!=null?String(r):null,o=typeof t.detailsText=="string"?t.detailsText:JSON.stringify(t,null,2),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:i,detailsText:o,timestamp:c}}reconnect(){if(this.socket){this.clearConnectionTimeout(),this.status_$.set(j.connecting),this.lastError_$.set(null),this.connectAttemptCount_$.set(0),this.startConnectionTimeout();let t=this.params?.address??dt();C.DyFM_Log.info("CCAP_Socket | Reconnecting to",t),this.socket.disconnect(),this.socket.connect()}}emit(t,n){this.socket?.connected&&this.socket.emit(t,n)}diagnoseConnection(){return u(this,null,function*(){let t=this.params?.address??dt(),n={timestamp:new Date().toISOString(),socketUrl:t,socketUrlSource:$.socketUrl!==void 0&&$.socketUrl.trim()!==""?"environment.socketUrl":"same-origin fallback",pageOrigin:typeof window<"u"?window.location.origin:"",socketConnected:this.socket?.connected??!1,socketId:this.socket?.id??null,connectAttemptCount:this.connectAttemptCount_$(),currentStatus:this.status_$()},r=yield s.probeEndpoint("/api/server/status","serverStatusApi");if(n.serverStatusApi=r,r.ok===!0&&r.body!==void 0){let _=r.body;if(_!==null&&typeof _=="object"){let a=_;n.serverReportedHttpPort=a.httpPort??null,n.serverReportedSocketPort=a.socketPort??null}}let i=this.params?.socketOptions?.path??"/socket",o=`${t}${i}/?EIO=4&transport=polling&t=${Date.now()}`,c=yield s.probeEndpoint(o,"socketIoPolling");n.socketIoPolling=c;let h=n.serverReportedSocketPort;if(typeof h=="number"&&h>0){let _=`http://localhost:${h}${i}/?EIO=4&transport=polling&t=${Date.now()}`,a=yield s.probeEndpoint(_,"socketIoDirectPort");n.socketIoDirectPort=a}return n})}static probeEndpoint(t,n){return u(this,null,function*(){let r={url:t,label:n},i=performance.now();try{let o=yield fetch(t,{method:"GET",cache:"no-store"}),c=Math.round(performance.now()-i);r.ok=o.ok,r.httpStatus=o.status,r.httpStatusText=o.statusText,r.elapsedMs=c;try{let h=yield o.text();try{r.body=JSON.parse(h)}catch{r.bodyPreview=h.substring(0,300)}}catch{r.bodyReadError="Failed to read response body"}}catch(o){let c=Math.round(performance.now()-i);r.elapsedMs=c,r.ok=!1,r.fetchError=o instanceof Error?o.message:String(o),o instanceof TypeError&&(r.fetchErrorType="TypeError (network/CORS/SSL)")}return r})}ngOnDestroy(){this.clearConnectionTimeout(),this.socket&&this.socket.disconnect()}static \u0275fac=function(n){return new(n||s)};static \u0275prov=ds({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{pr as a,mt as b,wn as c,j as d,Yc as e};
11
- //# sourceMappingURL=chunk-GZJSMF4W.js.map
11
+ //# sourceMappingURL=chunk-AAFXSEZA.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-GLISSBW6.js";import{a as u}from"./chunk-BNZAUTHL.js";import{L as c,t as l}from"./chunk-5L255H5C.js";import{C as d,aa as n,k as i,p as r,y as a}from"./chunk-TBMJSIBB.js";var D=(()=>{class o{documents_$=n([]);selectedDocument_$=n(null);selectedChunkCount_$=n(0);isLoading_$=n(!1);uploadStatus_$=n("idle");error_$=n(null);defaultCorpusDocumentId_$=n("");registryEntries_$=n([]);registryLoading_$=n(!1);selectedRegistryEntryId_$=n("");indexingStatus_$=n(null);indexingActive_$=n(!1);indexingPollInterval=null;docLibrary_AS=d(g);erg_AS=d(u);settings_AS=d(c);loadDocuments(){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let e=yield r(this.docLibrary_AS.listDocuments());this.documents_$.set(e.items)}catch(e){let t=e instanceof Error?e.message:"Dokumentum-lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.isLoading_$.set(!1)}})}loadDocumentDetail(e){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let t=yield r(this.docLibrary_AS.getDocument({documentId:e.documentId}));this.selectedDocument_$.set(t.document),this.selectedChunkCount_$.set(t.chunkCount)}catch(t){let s=t instanceof Error?t.message:"Dokumentum detail bet\xF6lt\xE9se sikertelen.";this.error_$.set(s)}finally{this.isLoading_$.set(!1)}})}uploadDocument(e){return i(this,null,function*(){this.uploadStatus_$.set("uploading"),this.error_$.set(null);let t=new FormData;t.append("file",e.file),t.append("name",e.name),e.description!==void 0&&e.description.trim()!==""&&t.append("description",e.description.trim());try{let s=yield r(this.docLibrary_AS.uploadDocument({formData:t}));return this.uploadStatus_$.set("done"),s}catch(s){let m=s instanceof Error?s.message:"Dokumentum felt\xF6lt\xE9se sikertelen.";throw this.error_$.set(m),this.uploadStatus_$.set("error"),s}})}deleteDocument(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.deleteDocument({documentId:e.documentId}));let t=this.documents_$();this.documents_$.set(t.filter(s=>s.id!==e.documentId))}catch(t){let s=t instanceof Error?t.message:"Dokumentum t\xF6rl\xE9se sikertelen.";throw this.error_$.set(s),t}})}loadRegistryEntries(){return i(this,null,function*(){this.registryLoading_$.set(!0);try{let e=yield this.erg_AS.getList({enabled:!0});this.registryEntries_$.set(e.list)}catch(e){let t=e instanceof Error?e.message:"Registry lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.registryLoading_$.set(!1)}})}startIndexing(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.startIndexing({documentId:e.documentId,registryEntryId:e.registryEntryId})),this.indexingActive_$.set(!0),this.startIndexingPolling({documentId:e.documentId,registryEntryId:e.registryEntryId})}catch(t){let s=t instanceof Error?t.message:"Indexel\xE9s ind\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}loadIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t)}catch{this.indexingStatus_$.set(null)}})}startIndexingPolling(e){this.stopIndexingPolling();let t=1500;this.indexingPollInterval=setInterval(()=>{this.pollIndexingStatus(e)},t),this.pollIndexingStatus(e)}pollIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t),t.total>0&&t.pending===0&&this.stopIndexingPolling()}catch{this.stopIndexingPolling()}})}stopIndexingPolling(){this.indexingPollInterval!==null&&(clearInterval(this.indexingPollInterval),this.indexingPollInterval=null),this.indexingActive_$.set(!1)}ngOnDestroy(){this.stopIndexingPolling()}loadDefaultCorpusDocumentId(){return i(this,null,function*(){try{let e=yield this.settings_AS.getSection(l.modelTesting),t=typeof e.embeddingTestCorpusDocumentId=="string"?e.embeddingTestCorpusDocumentId:"";this.defaultCorpusDocumentId_$.set(t)}catch{}})}setDefaultCorpusDocumentId(e){return i(this,null,function*(){this.error_$.set(null);try{let t=yield this.settings_AS.getSection(l.modelTesting),s={testAnalysisProvider:t.testAnalysisProvider??"open-ai",testAnalysisModel:t.testAnalysisModel??"",embeddingTestCorpusDocumentId:e.documentId};yield this.settings_AS.saveSection(l.modelTesting,s),this.defaultCorpusDocumentId_$.set(e.documentId)}catch(t){let s=t instanceof Error?t.message:"Default corpus be\xE1ll\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=a({token:o,factory:o.\u0275fac})}return o})();export{D as a};
2
- //# sourceMappingURL=chunk-OHXBMPQN.js.map
1
+ import{a as g}from"./chunk-ZQT44XRN.js";import{a as u}from"./chunk-QEMJBYC2.js";import{L as c,t as l}from"./chunk-RXRE3G4K.js";import{C as d,aa as n,k as i,p as r,y as a}from"./chunk-TBMJSIBB.js";var D=(()=>{class o{documents_$=n([]);selectedDocument_$=n(null);selectedChunkCount_$=n(0);isLoading_$=n(!1);uploadStatus_$=n("idle");error_$=n(null);defaultCorpusDocumentId_$=n("");registryEntries_$=n([]);registryLoading_$=n(!1);selectedRegistryEntryId_$=n("");indexingStatus_$=n(null);indexingActive_$=n(!1);indexingPollInterval=null;docLibrary_AS=d(g);erg_AS=d(u);settings_AS=d(c);loadDocuments(){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let e=yield r(this.docLibrary_AS.listDocuments());this.documents_$.set(e.items)}catch(e){let t=e instanceof Error?e.message:"Dokumentum-lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.isLoading_$.set(!1)}})}loadDocumentDetail(e){return i(this,null,function*(){this.isLoading_$.set(!0),this.error_$.set(null);try{let t=yield r(this.docLibrary_AS.getDocument({documentId:e.documentId}));this.selectedDocument_$.set(t.document),this.selectedChunkCount_$.set(t.chunkCount)}catch(t){let s=t instanceof Error?t.message:"Dokumentum detail bet\xF6lt\xE9se sikertelen.";this.error_$.set(s)}finally{this.isLoading_$.set(!1)}})}uploadDocument(e){return i(this,null,function*(){this.uploadStatus_$.set("uploading"),this.error_$.set(null);let t=new FormData;t.append("file",e.file),t.append("name",e.name),e.description!==void 0&&e.description.trim()!==""&&t.append("description",e.description.trim());try{let s=yield r(this.docLibrary_AS.uploadDocument({formData:t}));return this.uploadStatus_$.set("done"),s}catch(s){let m=s instanceof Error?s.message:"Dokumentum felt\xF6lt\xE9se sikertelen.";throw this.error_$.set(m),this.uploadStatus_$.set("error"),s}})}deleteDocument(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.deleteDocument({documentId:e.documentId}));let t=this.documents_$();this.documents_$.set(t.filter(s=>s.id!==e.documentId))}catch(t){let s=t instanceof Error?t.message:"Dokumentum t\xF6rl\xE9se sikertelen.";throw this.error_$.set(s),t}})}loadRegistryEntries(){return i(this,null,function*(){this.registryLoading_$.set(!0);try{let e=yield this.erg_AS.getList({enabled:!0});this.registryEntries_$.set(e.list)}catch(e){let t=e instanceof Error?e.message:"Registry lista bet\xF6lt\xE9se sikertelen.";this.error_$.set(t)}finally{this.registryLoading_$.set(!1)}})}startIndexing(e){return i(this,null,function*(){this.error_$.set(null);try{yield r(this.docLibrary_AS.startIndexing({documentId:e.documentId,registryEntryId:e.registryEntryId})),this.indexingActive_$.set(!0),this.startIndexingPolling({documentId:e.documentId,registryEntryId:e.registryEntryId})}catch(t){let s=t instanceof Error?t.message:"Indexel\xE9s ind\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}loadIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t)}catch{this.indexingStatus_$.set(null)}})}startIndexingPolling(e){this.stopIndexingPolling();let t=1500;this.indexingPollInterval=setInterval(()=>{this.pollIndexingStatus(e)},t),this.pollIndexingStatus(e)}pollIndexingStatus(e){return i(this,null,function*(){try{let t=yield r(this.docLibrary_AS.getIndexingStatus({documentId:e.documentId,registryEntryId:e.registryEntryId}));this.indexingStatus_$.set(t),t.total>0&&t.pending===0&&this.stopIndexingPolling()}catch{this.stopIndexingPolling()}})}stopIndexingPolling(){this.indexingPollInterval!==null&&(clearInterval(this.indexingPollInterval),this.indexingPollInterval=null),this.indexingActive_$.set(!1)}ngOnDestroy(){this.stopIndexingPolling()}loadDefaultCorpusDocumentId(){return i(this,null,function*(){try{let e=yield this.settings_AS.getSection(l.modelTesting),t=typeof e.embeddingTestCorpusDocumentId=="string"?e.embeddingTestCorpusDocumentId:"";this.defaultCorpusDocumentId_$.set(t)}catch{}})}setDefaultCorpusDocumentId(e){return i(this,null,function*(){this.error_$.set(null);try{let t=yield this.settings_AS.getSection(l.modelTesting),s={testAnalysisProvider:t.testAnalysisProvider??"open-ai",testAnalysisModel:t.testAnalysisModel??"",embeddingTestCorpusDocumentId:e.documentId};yield this.settings_AS.saveSection(l.modelTesting,s),this.defaultCorpusDocumentId_$.set(e.documentId)}catch(t){let s=t instanceof Error?t.message:"Default corpus be\xE1ll\xEDt\xE1sa sikertelen.";throw this.error_$.set(s),t}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=a({token:o,factory:o.\u0275fac})}return o})();export{D as a};
2
+ //# sourceMappingURL=chunk-AX73SZY3.js.map
@@ -1,2 +1,2 @@
1
- import{I as a}from"./chunk-5L255H5C.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
2
- //# sourceMappingURL=chunk-XC6OGCBT.js.map
1
+ import{I as a}from"./chunk-RXRE3G4K.js";import{C as n,p as t,xb as o,y as i}from"./chunk-TBMJSIBB.js";var m=(()=>{class r{baseUrl=`${a.api.baseUrl}/setup`;http=n(o);getSetupStatus(){return t(this.http.get(`${this.baseUrl}/status`))}getVaultStatus(){return t(this.http.get(`${this.baseUrl}/vault-status`))}getVaultKeyGenerate(){return t(this.http.get(`${this.baseUrl}/vault-key/generate`))}postVaultKey(e){return t(this.http.post(`${this.baseUrl}/vault-key`,{vaultKey:e}))}postSetup(e){return t(this.http.post(this.baseUrl,e))}putSetupConfig(e){let s=`${a.api.baseUrl}/settings`;return t(this.http.put(`${s}/config`,e))}static \u0275fac=function(s){return new(s||r)};static \u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{m as a};
2
+ //# sourceMappingURL=chunk-BEGOF2N7.js.map
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-BP6PERGA.js";import{I as l,p as $}from"./chunk-5L255H5C.js";import{C as a,aa as e,h as L,k as r,p as n,xb as o,y as c}from"./chunk-TBMJSIBB.js";var f=L($());var d=(()=>{class s{baseUrl=`${l.api.baseUrl}/cai-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/cci-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var u=(()=>{class s{baseUrl=`${l.api.baseUrl}/instance-data`;http=a(o);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}ensure(t){return n(this.http.post(`${this.baseUrl}/ensure`,t??{}))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var q=(()=>{class s{instanceData_AS=a(u);ociInstanceData_AS=a(h);cciInstanceData_AS=a(p);caiInstanceData_AS=a(d);ccapInstanceList_$=e([]);ccapInstanceListLoading_$=e(!1);ccapInstanceListError_$=e(null);ociInstanceList_$=e([]);ociInstanceListLoading_$=e(!1);ociInstanceListError_$=e(null);cciInstanceList_$=e([]);cciInstanceListLoading_$=e(!1);cciInstanceListError_$=e(null);caiInstanceList_$=e([]);caiInstanceListLoading_$=e(!1);caiInstanceListError_$=e(null);loadCcapInstanceList(){return r(this,null,function*(){this.ccapInstanceListLoading_$.set(!0),this.ccapInstanceListError_$.set(null);try{let t=yield this.instanceData_AS.getList();this.ccapInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ccapInstanceList_$.set([]),this.ccapInstanceListError_$.set(t),f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCcapInstanceList failed",t)}finally{this.ccapInstanceListLoading_$.set(!1)}})}loadOciInstanceListAllowEmpty(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadOciInstanceListAllowEmpty failed",t),this.ociInstanceList_$.set([])}finally{this.ociInstanceListLoading_$.set(!1)}})}loadOciInstanceListStrict(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ociInstanceListError_$.set(t)}finally{this.ociInstanceListLoading_$.set(!1)}})}loadCciInstanceListAllowEmpty(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCciInstanceListAllowEmpty failed",t),this.cciInstanceList_$.set([])}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCciInstanceListStrict(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.cciInstanceListError_$.set(t)}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCaiInstanceListAllowEmpty(){return r(this,null,function*(){this.caiInstanceListLoading_$.set(!0),this.caiInstanceListError_$.set(null);try{let t=yield this.caiInstanceData_AS.listInstances();this.caiInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCaiInstanceListAllowEmpty failed",t),this.caiInstanceList_$.set([])}finally{this.caiInstanceListLoading_$.set(!1)}})}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{d as a,p as b,u as c,q as d};
2
- //# sourceMappingURL=chunk-SBTVSUCF.js.map
1
+ import{a as h}from"./chunk-OSJXI65X.js";import{I as l,p as $}from"./chunk-RXRE3G4K.js";import{C as a,aa as e,h as L,k as r,p as n,xb as o,y as c}from"./chunk-TBMJSIBB.js";var f=L($());var d=(()=>{class s{baseUrl=`${l.api.baseUrl}/cai-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var p=(()=>{class s{baseUrl=`${l.api.baseUrl}/cci-instance-data`;http=a(o);listInstances(){return n(this.http.get(`${this.baseUrl}/list`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var u=(()=>{class s{baseUrl=`${l.api.baseUrl}/instance-data`;http=a(o);getList(){return n(this.http.get(`${this.baseUrl}/list`))}getCurrent(){return n(this.http.get(`${this.baseUrl}/current`))}getByCcapId(t){return n(this.http.get(`${this.baseUrl}/by-ccap/${t}`))}patchByCcapId(t){let i={};return t.name!==void 0&&(i.name=t.name),t.status!==void 0&&(i.status=t.status),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),n(this.http.patch(`${this.baseUrl}/by-ccap/${t.ccapId}`,i))}ensure(t){return n(this.http.post(`${this.baseUrl}/ensure`,t??{}))}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var q=(()=>{class s{instanceData_AS=a(u);ociInstanceData_AS=a(h);cciInstanceData_AS=a(p);caiInstanceData_AS=a(d);ccapInstanceList_$=e([]);ccapInstanceListLoading_$=e(!1);ccapInstanceListError_$=e(null);ociInstanceList_$=e([]);ociInstanceListLoading_$=e(!1);ociInstanceListError_$=e(null);cciInstanceList_$=e([]);cciInstanceListLoading_$=e(!1);cciInstanceListError_$=e(null);caiInstanceList_$=e([]);caiInstanceListLoading_$=e(!1);caiInstanceListError_$=e(null);loadCcapInstanceList(){return r(this,null,function*(){this.ccapInstanceListLoading_$.set(!0),this.ccapInstanceListError_$.set(null);try{let t=yield this.instanceData_AS.getList();this.ccapInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ccapInstanceList_$.set([]),this.ccapInstanceListError_$.set(t),f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCcapInstanceList failed",t)}finally{this.ccapInstanceListLoading_$.set(!1)}})}loadOciInstanceListAllowEmpty(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadOciInstanceListAllowEmpty failed",t),this.ociInstanceList_$.set([])}finally{this.ociInstanceListLoading_$.set(!1)}})}loadOciInstanceListStrict(){return r(this,null,function*(){this.ociInstanceListLoading_$.set(!0),this.ociInstanceListError_$.set(null);try{let t=yield this.ociInstanceData_AS.listInstances();this.ociInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.ociInstanceListError_$.set(t)}finally{this.ociInstanceListLoading_$.set(!1)}})}loadCciInstanceListAllowEmpty(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCciInstanceListAllowEmpty failed",t),this.cciInstanceList_$.set([])}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCciInstanceListStrict(){return r(this,null,function*(){this.cciInstanceListLoading_$.set(!0),this.cciInstanceListError_$.set(null);try{let t=yield this.cciInstanceData_AS.listInstances();this.cciInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){this.cciInstanceListError_$.set(t)}finally{this.cciInstanceListLoading_$.set(!1)}})}loadCaiInstanceListAllowEmpty(){return r(this,null,function*(){this.caiInstanceListLoading_$.set(!0),this.caiInstanceListError_$.set(null);try{let t=yield this.caiInstanceData_AS.listInstances();this.caiInstanceList_$.set(Array.isArray(t?.list)?t.list:[])}catch(t){f.DyFM_Error.logSimple("CCAP_RuntimeInstances_DS | loadCaiInstanceListAllowEmpty failed",t),this.caiInstanceList_$.set([])}finally{this.caiInstanceListLoading_$.set(!1)}})}static \u0275fac=function(i){return new(i||s)};static \u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{d as a,p as b,u as c,q as d};
2
+ //# sourceMappingURL=chunk-BM4UEP47.js.map
@@ -1,4 +1,4 @@
1
- import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-62O4YXH2.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-5L255H5C.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
1
+ import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-XYNIZC5J.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-RXRE3G4K.js";import{C as M,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as Me,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as we,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),o=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(o)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),o=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(o.ok)return{ok:!0,value:o.value};let s=o.failure,l=`JSON parse failed [${s.contextLabel}] (${ee.llmParse}): ${s.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:s.contextLabel,rawMessage:s.rawMessage,summaryMessage:l,position:s.position,line:s.line,column:s.column,inputLength:e.length,snippetAroundError:s.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:s.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,o;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";o=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
2
2
  ${$}
3
3
  ${ue}`}else{let y=e.slice(0,xe);o=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
4
4
  `+y+(e.length>xe?`
@@ -36,4 +36,4 @@ ${JSON.stringify(s,null,2)}`;return x.toDisplaySafeString(o??l)}let t=e instance
36
36
 
37
37
  Stack:
38
38
  ${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);this.quickInputFeedback=t?"Quick Input l\xE9trehozva!":"Quick Input sikertelen \u2014 nincs el\xE9rhet\u0151 projekt",t||this.globalError_CS.reportErrorOnly({message:"Send-to-Quick-Input returned false (likely: no available project or server-side validation reject)",source:"send-to-quick-input-no-result"})}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[Me],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[we],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,w as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
39
- //# sourceMappingURL=chunk-ZO42CPIZ.js.map
39
+ //# sourceMappingURL=chunk-D4MN4WBX.js.map
@@ -1,3 +1,3 @@
1
- import{a as n}from"./chunk-VER7DLPS.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
1
+ import{a as n}from"./chunk-UNNGLS4Y.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
2
2
  `).length}};export{a,u as b,d as c,s as d};
3
- //# sourceMappingURL=chunk-334PU4V5.js.map
3
+ //# sourceMappingURL=chunk-E4TY6O3W.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-XC6OGCBT.js";import{K as p,L as S}from"./chunk-5L255H5C.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
- //# sourceMappingURL=chunk-P4E77IA5.js.map
1
+ import{a as c}from"./chunk-BEGOF2N7.js";import{K as p,L as S}from"./chunk-RXRE3G4K.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
+ //# sourceMappingURL=chunk-ECVTQRJ7.js.map
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-4O5PJT2Q.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-536ONGRA.js";import{e as k}from"./chunk-GZJSMF4W.js";import{G as C,I as y,p as O}from"./chunk-5L255H5C.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
2
- //# sourceMappingURL=chunk-ZTO2WC4L.js.map
1
+ import{a as P}from"./chunk-GK3RSZLZ.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as U}from"./chunk-ZO5UJXHI.js";import{e as k}from"./chunk-AAFXSEZA.js";import{G as C,I as y,p as O}from"./chunk-RXRE3G4K.js";import{C as p,a as $,aa as o,b as v,h as N,jb as M,k as l,l as L,p as u,vb as f,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var b=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var d=N(O());var R=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var K=(()=>{class r{baseUrl=`${y.api.baseUrl}/session`;http=p(w);peiContext_DS=p(U);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new f);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new f);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let i=this.withCcapId(new f);return u(this.http.post(this.baseUrl,t,{params:i}))}getSession(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new f);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new f);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new f);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new f);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var j="answer",V="notify-user",B="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new L;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(K);conversation_AS=p(R);serverStatus_AS=p(P);socket_CS=p(k);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=M(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),i=typeof t.channelId=="string"?t.channelId:void 0,g=typeof t.sessionId=="string"?t.sessionId:void 0,I=!i&&!g||i===s||g===s;if(e.event===j&&I){let n=typeof t.content=="string"?t.content:"",a=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),c=typeof t.runId=="string"?t.runId:void 0,S={role:"assistant",content:n,timestamp:new Date(a)},h=c?v($({},S),{runId:c}):S,_=this.ensureClientListKey(h);this.messages_$.set([...this.messages_$(),_]);return}if(e.event===V&&I){let n=typeof t.content=="string"?t.content:"";d.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${n.substring(0,120)}\u2026`);let a=this.ensureClientListKey({role:"system",content:n,timestamp:new Date});this.messages_$.set([...this.messages_$(),a]);return}if(e.event===B){let n=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(n),this.applyAgentEventRunExecutionModeLatch(n);let a=typeof n.toolId=="string"?n.toolId:"",c=typeof n.phase=="string"?n.phase:"";a===W&&(c===Q||c===X)?this.pendingNotification_$.set({phase:c,notificationTitle:typeof n.notificationTitle=="string"?n.notificationTitle:"",notificationType:typeof n.notificationType=="string"?n.notificationType:"",notificationPriority:typeof n.notificationPriority=="string"?n.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let S=n.toolError,h=i??n.channelId,_=!h||h===s,D=b.toDisplayString(S).trim();if(D.length>0&&_){d.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${D.substring(0,80)}\u2026`);let F=this.ensureClientListKey({role:"system",content:D,timestamp:new Date});this.messages_$.set([...this.messages_$(),F])}return}if(e.event===z){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:n,contextState:a});return}if(e.event===H){let n=typeof t.sessionId=="string"?t.sessionId:"",a=typeof t.event=="object"&&t.event!==null?t.event:{},c={sessionId:n,event:a};this.monitoringEvent_$.set(c),this.monitoringEvent_S.next(c);return}if(e.event===G&&I){this.pendingInteraction_$.set(t);return}if(e.event===q&&I){let n=typeof t.interactionId=="string"?t.interactionId:void 0;if(!n)return;this.pendingInteraction_$()?.interactionId===n&&this.pendingInteraction_$.set(null);return}}loadSessions(){return l(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return l(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return l(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return l(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return l(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),i=y.socketUrl??t;if(s!==i&&typeof window<"u"){y.socketUrl=s,d.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return l(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return d.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return l(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let i=this.activeSessionId_$();if(!i)return{sent:!1};let g=(t?.length??0)>0;if(!s.length&&!g)return{sent:!1};let I={role:"user",content:e,timestamp:new Date},n=this.ensureClientListKey(I);this.messages_$.set([...this.messages_$(),n]);try{let c=(yield this.conversation_AS.sendMessage({sessionId:i,content:e,imageAttachments:t})).message,S=this.messages_$().map(h=>{if(h.clientListKey!==n.clientListKey)return h;let _=$({},h);return c.messageKey&&(_.messageKey=c.messageKey),c.hasTtsAudio!==void 0&&(_.hasTtsAudio=c.hasTtsAudio),_});return this.messages_$.set(S),{sent:!0}}catch(a){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",a);let c=this.messages_$().filter(h=>h.clientListKey!==n.clientListKey);return this.messages_$.set(c),{sent:!1,error:a instanceof Error?a.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return l(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([])}setMessages(e){let s=(e??[]).map(i=>this.ensureClientListKey(i));this.messages_$.set(s)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?v($({},e),{clientListKey:s}):v($({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(i=>i.messageKey===e?v($({},i),{hasTtsAudio:!0}):i);this.messages_$.set(s)}loadMessagesForView(e){return l(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadSessionDetail(e){return l(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return l(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return l(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let i=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(i.entries)}catch(i){d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",i),this.llmDebugTraceLoadError_$.set(i),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return l(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return d.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let i=e.runExecutionMode;if(typeof i=="string"&&i.trim()!==""){let g=r.normalizeRunExecutionModeSocketValue(i);g!==void 0&&this.activeRunExecutionMode_$.set(g)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let i of s)if(t===i)return i}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,b,Ce as c};
2
+ //# sourceMappingURL=chunk-F5SAKHCX.js.map
@@ -1,2 +1,2 @@
1
- import{e as $}from"./chunk-GZJSMF4W.js";import{I as h,p as S}from"./chunk-5L255H5C.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
- //# sourceMappingURL=chunk-SOA6UZHW.js.map
1
+ import{e as $}from"./chunk-AAFXSEZA.js";import{I as h,p as S}from"./chunk-RXRE3G4K.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
+ //# sourceMappingURL=chunk-GAQBLHO3.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as z,c as Ce}from"./chunk-5SYCIFC7.js";import{c as ge}from"./chunk-AFNG5IFQ.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-62O4YXH2.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
2
- //# sourceMappingURL=chunk-7QXWTKTQ.js.map
1
+ import{a as R,b as z,c as Ce}from"./chunk-KVUL77OV.js";import{c as ge}from"./chunk-N3AR5TZI.js";import{a as xe}from"./chunk-FLAJXIYW.js";import{b as le,c as se,f as de,i as ce,n as ue,o as _e,p as me,v as pe}from"./chunk-EO4DNTT4.js";import{a as K}from"./chunk-5UPNU54P.js";import{j as fe}from"./chunk-XYNIZC5J.js";import{C as q,D as Y,Fa as d,Ga as $,Ha as L,Ia as ie,J as f,Ja as oe,K as x,Ka as re,L as A,M as I,Ma as N,Na as W,Oa as O,Q as j,Ta as ae,U as H,Y as ee,Z as l,aa as p,da as C,fa as V,ga as y,ha as G,hb as v,ia as F,k as P,la as g,ma as te,na as ne,oa as B,pa as D,qa as o,ra as r,sa as S,ua as T,va as m,wa as c,y as X}from"./chunk-TBMJSIBB.js";var he="ccap-voiceInput:autoSendAfterVoice",be=(()=>{class n{autoSendAfterVoice_$=p(n.readAutoSendAfterVoiceFromStorage());setAutoSendAfterVoice(e){this.autoSendAfterVoice_$.set(e),K.writeString(he,String(e))}static readAutoSendAfterVoiceFromStorage(){return K.readString(he)==="true"}static \u0275fac=function(t){return new(t||n)};static \u0275prov=X({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var k=function(n){return n.equal="equal",n.removed="removed",n.added="added",n}(k||{});var U=class n{static tokenize(s){let e=s;if(e.length===0)return[];let t=e.split(/(\s+)/),i=[];for(let a=0;a<t.length;a++){let u=t[a];u.length>0&&i.push(u)}return i}static mergeAndAssignIds(s){if(s.length===0)return[];let e=[];for(let i=0;i<s.length;i++){let a=s[i],u=e[e.length-1];u!==void 0&&u.kind===a.kind?u.text=u.text+a.text:e.push({kind:a.kind,text:a.text})}let t=[];for(let i=0;i<e.length;i++){let a=e[i];t.push({id:i,kind:a.kind,text:a.text})}return t}static buildWordDiff(s,e){let t=n.tokenize(s),i=n.tokenize(e),a=t.length,u=i.length,_=[];for(let h=0;h<=a;h++){let E=[];for(let Q=0;Q<=u;Q++)E.push(0);_.push(E)}for(let h=1;h<=a;h++)for(let E=1;E<=u;E++)if(t[h-1]===i[E-1])_[h][E]=_[h-1][E-1]+1;else{let Q=_[h-1][E],Z=_[h][E-1];_[h][E]=Q>Z?Q:Z}let w=[],b=a,M=u;for(;b>0||M>0;)b>0&&M>0&&t[b-1]===i[M-1]?(w.push({kind:k.equal,text:t[b-1]}),b-=1,M-=1):M>0&&(b===0||_[b][M-1]>=_[b-1][M])?(w.push({kind:k.added,text:i[M-1]}),M-=1):b>0&&(w.push({kind:k.removed,text:t[b-1]}),b-=1);let J=[];for(let h=w.length-1;h>=0;h--)J.push(w[h]);return n.mergeAndAssignIds(J)}};var Se=(n,s)=>s.value,Ee=(n,s)=>s.id;function ye(n,s){n&1&&S(0,"span",25)}function $e(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function we(n,s){if(n&1&&(o(0,"div",26),C(1,$e,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function Me(n,s){n&1&&(o(0,"p",27)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Ae(n,s){if(n&1){let e=T();o(0,"div",0)(1,"div",15)(2,"button",16),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(3,"svg",17),S(4,"path",18)(5,"path",19),r()(),I(),o(6,"button",20),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(7,"svg",17),S(8,"circle",21)(9,"path",22)(10,"path",23),r()()(),I(),o(11,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(12,ye,1,0,"span",25)(13,we,6,1,"div",26),r(),C(14,Me,4,2,"p",27),r()}if(n&2){let e,t=c();l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?12:13),l(2),g((e=t.mediaUnavailable_$())?14:-1,e)}}function Te(n,s){n&1&&S(0,"span",25)}function Pe(n,s){if(n&1&&(o(0,"div",28),S(1,"div",33)(2,"div",34),r()),n&2){let e=c(3);l(),G("height",e.volumePercent_$(),"%")}}function Ve(n,s){if(n&1&&(o(0,"div",26),C(1,Pe,3,2,"div",28),A(),o(2,"svg",29),S(3,"path",30)(4,"path",31)(5,"line",32),r()()),n&2){let e=c(2);l(),g(e.isRecordActive_$()?1:-1)}}function ke(n,s){n&1&&(o(0,"p",39)(1,"span",35),d(2,"\u26A0"),r(),d(3),r()),n&2&&(V("aria-live","polite"),l(3),L("",s," "))}function Re(n,s){if(n&1){let e=T();o(0,"div",36)(1,"button",24),m("click",function(){f(e);let i=c();return x(i.toggleRecord())}),C(2,Te,1,0,"span",25)(3,Ve,6,1,"div",26),r(),o(4,"button",37),m("click",function(i){return f(e),c().toggleSettings(),x(i.stopPropagation())}),A(),o(5,"svg",17),S(6,"path",18)(7,"path",19),r()(),I(),o(8,"button",38),m("click",function(i){return f(e),c().toggleInfo(),x(i.stopPropagation())}),A(),o(9,"svg",17),S(10,"circle",21)(11,"path",22)(12,"path",23),r()()(),C(13,ke,4,2,"p",39)}if(n&2){let e,t=c();l(),F("border-neonCyan",t.isRecordActive_$()||t.busy_$())("shadow-neon-glow-cyan",t.isRecordActive_$()||t.busy_$())("animate-pulse",t.isRecording_$()),y("disabled",t.mediaUnavailable_$()!==null),V("aria-label",t.recordButtonAriaLabel_$())("title",t.recordButtonTitle_$()),l(),g(t.busy_$()&&!t.isRecordActive_$()?2:3),l(6),F("border-neonDefault",!t.lastQaTextWasModified_$())("text-neonCyan",!t.lastQaTextWasModified_$())("hover:border-neonCyan",!t.lastQaTextWasModified_$())("hover:shadow-neon-glow-cyan",!t.lastQaTextWasModified_$())("focus:ring-neonCyan",!t.lastQaTextWasModified_$())("border-neonAmber",t.lastQaTextWasModified_$())("text-neonAmber",t.lastQaTextWasModified_$())("shadow-neon-glow-orange",t.lastQaTextWasModified_$())("hover:border-neonAmber",t.lastQaTextWasModified_$())("hover:shadow-neon-glow-orange",t.lastQaTextWasModified_$())("focus:ring-neonAmber",t.lastQaTextWasModified_$()),V("aria-label",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult":"Utols\xF3 QA eredm\xE9ny")("title",t.lastQaTextWasModified_$()?"Utols\xF3 QA eredm\xE9ny \u2014 a sz\xF6veg m\xF3dosult (r\xE9szletek)":"Utols\xF3 QA eredm\xE9ny"),l(5),g((e=t.mediaUnavailable_$())?13:-1,e)}}function Qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),re(" Override: ",e.qaProviderDisplayLabel_$()," / ",e.qaModelName||"\u2014"," (glob\xE1l: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014","). ")}}function qe(n,s){if(n&1&&(o(0,"p",45),d(1),r()),n&2){let e=c(2);l(),ie(" Nincs be\xE1ll\xEDtva \u2013 haszn\xE1lt: ",e.defaultLlmProviderDisplayLabel_$()||"\u2014"," / ",e.defaultLlmModel_$()||"\u2014"," (glob\xE1l). ")}}function Fe(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e.value),l(),$(e.label)}}function Be(n,s){if(n&1&&(o(0,"option",49),d(1),r()),n&2){let e=s.$implicit;y("value",e),l(),$(e)}}function De(n,s){if(n&1){let e=T();o(0,"select",59),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),o(1,"option",48),d(2,"\u2014 default \u2014"),r(),B(3,Be,2,2,"option",49,ne),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName),l(3),D(e.qaModelsForProvider_$())}}function Le(n,s){if(n&1){let e=T();o(0,"input",60),O("ngModelChange",function(i){f(e);let a=c(2);return W(a.qaModelName,i)||(a.qaModelName=i),x(i)}),r()}if(n&2){let e=c(2);N("ngModel",e.qaModelName)}}function Ne(n,s){if(n&1&&(o(0,"p",52),d(1),r()),n&2){let e=c(2);l(),$(e.qaModelsListFetchError_$())}}function We(n,s){if(n&1){let e=T();o(0,"div",15)(1,"input",61),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionFrom(a,i.target.value))}),r(),o(2,"span",62),d(3,"\u2192"),r(),o(4,"input",63),m("input",function(i){let a=f(e).$index,u=c(2);return x(u.updateConfusionTo(a,i.target.value))}),r(),o(5,"button",64),m("click",function(){let i=f(e).$index,a=c(2);return x(a.removeConfusionEntry(i))}),o(6,"span",65),d(7,"T\xF6rl\xE9s"),r(),A(),o(8,"svg",66),S(9,"path",67),r()()()}if(n&2){let e=s.$implicit;l(),y("value",e.from),l(3),y("value",e.to)}}function Oe(n,s){if(n&1){let e=T();o(0,"div",8)(1,"div",40)(2,"p",41),d(3,"System prompt (LLM-nek)"),r(),o(4,"p",42),d(5),r()(),o(6,"div",40)(7,"p",41),d(8," User prompt sablon (ide f\u0171z\u0151dik be a felv\xE9tel adata) "),r(),o(9,"p",43),d(10),r(),o(11,"p",44),d(12),r()(),o(13,"div",40)(14,"p",41),d(15,"STT QA provider \xE9s modell"),r(),C(16,Qe,2,4,"p",45)(17,qe,2,2,"p",45),o(18,"div",46)(19,"select",47),O("ngModelChange",function(i){f(e);let a=c();return W(a.qaProviderName,i)||(a.qaProviderName=i),x(i)}),m("ngModelChange",function(){f(e);let i=c();return x(i.onQaProviderChange())}),o(20,"option",48),d(21,"\u2014 default \u2014"),r(),B(22,Fe,2,2,"option",49,Se),r(),C(24,De,5,1,"select",50)(25,Le,1,1,"input",51),r(),C(26,Ne,2,1,"p",52),r(),o(27,"div",53)(28,"p",54),d(29," Tipikus el\xEDr\xE1sok / tip\xF3k (confusion map) \u2013 ezekre jav\xEDt a QA "),r(),o(30,"div",55),B(31,We,10,2,"div",15,te),r(),o(33,"div",56)(34,"button",57),m("click",function(){f(e);let i=c();return x(i.addConfusionEntry())}),d(35," + Sor hozz\xE1ad\xE1sa "),r(),o(36,"button",58),m("click",function(){f(e);let i=c();return x(i.saveQaSettings())}),d(37),r()()()()}if(n&2){let e=s,t=c();l(5),$(e.systemPrompt),l(5),L(" ",e.userPromptTemplate," "),l(2),oe(" Placeholderek: ","{{TRANSCRIPT}}"," = nyers sz\xF6veg, ","{{NOTE_CONTEXT}}"," = jegyzet, ","{{CONFUSION_MAP}}"," = az al\xE1bbi el\xEDr\xE1s lista JSON-ban. "),l(4),g(t.qaProviderName.trim()?16:17),l(3),N("ngModel",t.qaProviderName),l(3),D(t.llmProviderSelectOptions_$()),l(2),g(t.qaShowModelSelect_$()?24:25),l(2),g(t.qaModelsListFetchError_$().trim()?26:-1),l(5),D(t.confusionMapList_$()),l(5),y("disabled",t.qaSettingsSaving_$()),l(),L(" ",t.qaSettingsSaving_$()?"Ment\xE9s\u2026":"QA be\xE1ll\xEDt\xE1sok ment\xE9se"," ")}}function Ie(n,s){n&1&&(o(0,"p",9),d(1,"QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se\u2026"),r())}function ze(n,s){if(n&1){let e=T();o(0,"p",68),d(1," A QA be\xE1ll\xEDt\xE1sok bet\xF6lt\xE9se sikertelen. "),r(),o(2,"button",69),m("click",function(){f(e);let i=c();return x(i.loadQaSettings())}),d(3," \xDAjra bet\xF6lt\xE9s "),r()}}function Ue(n,s){if(n&1&&(o(0,"span",78),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function je(n,s){if(n&1&&(o(0,"span",79),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function He(n,s){if(n&1&&(o(0,"span",80),d(1),r()),n&2){let e=c().$implicit;l(),$(e.text)}}function Ge(n,s){if(n&1&&C(0,Ue,2,1,"span",78)(1,je,2,1,"span",79)(2,He,2,1,"span",80),n&2){let e=s.$implicit,t=c(3);g(e.kind===t.SttQaDiffKind.equal?0:e.kind===t.SttQaDiffKind.removed?1:2)}}function Ke(n,s){if(n&1&&(o(0,"div",70)(1,"p",75),d(2," V\xE1ltoz\xE1sok (kiemelve) "),r(),o(3,"p",76),B(4,Ge,3,1,null,null,Ee),r(),o(6,"p",77),d(7," \xC1th\xFAzva: nyers STT; kiemelve: jav\xEDtott sz\xF6veg. Al\xE1bb a teljes k\xE9t v\xE1ltozat. "),r()()),n&2){let e=c(2);l(4),D(e.lastQaWordDiffSegments_$())}}function Je(n,s){if(n&1&&(o(0,"p",74),d(1,"Magyar\xE1zat:"),r(),o(2,"p",81),d(3),r()),n&2){let e=c();l(3),$(e.explanation)}}function Ze(n,s){if(n&1&&(o(0,"div",13),C(1,Ke,8,0,"div",70),o(2,"p",71),d(3,"Volt m\xF3dos\xEDt\xE1s: igen."),r(),o(4,"p",72),d(5,"Eredeti (nyers STT):"),r(),o(6,"p",73),d(7),r(),o(8,"p",74),d(9,"Jav\xEDtott:"),r(),o(10,"p",73),d(11),r(),C(12,Je,4,1),r()),n&2){let e=s,t=c();l(),g(t.lastQaWordDiffSegments_$().length>0?1:-1),l(6),$(e.original),l(4),$(e.corrected),l(),g(e.explanation?12:-1)}}function Xe(n,s){n&1&&(o(0,"p",14),d(1," M\xE9g nem volt STT QA jav\xEDt\xE1s. "),r())}var vt=(()=>{class n{globalError_CS=q(fe);soundRecorder_CS=q(Ce);voiceSttQaUi_DS=q(ge);voiceInputUi_DS=q(be);qaEnabled=H(void 0);compactLayout=H(!1);transcriptReady=new j;transcriptSegmentReady=new j;busy_$=p(!1);pendingTranscriptionCount=0;emitChain=Promise.resolve();volume_$=p(0);isQaEnabledFromSettings_$=p(!1);settingsOpen_$=p(!1);qaSettings_$=p(null);confusionMapList_$=p([]);qaSettingsSaving_$=p(!1);qaSettingsLoading_$=p(!1);settingsQaEnabled=!1;qaProviderName="";qaModelName="";llmProviderSelectOptions_$=p([]);qaModelsForProvider_$=p([]);qaModelsListFetchError_$=p("");lastQaTransformation_$=p(null);infoOpen_$=p(!1);mediaUnavailable_$=p(null);defaultLlmProvider_$=p("");defaultLlmModel_$=p("");volumePercent_$=v(()=>Math.min(100,this.volume_$()*250));qaShowModelSelect_$=v(()=>this.qaModelsForProvider_$().length>0);lastQaTextWasModified_$=v(()=>{let e=this.lastQaTransformation_$();return e===null?!1:e.original!==e.corrected});lastQaWordDiffSegments_$=v(()=>{let e=this.lastQaTransformation_$();return e===null||e.original===e.corrected?[]:U.buildWordDiff(e.original,e.corrected)});SttQaDiffKind=k;defaultLlmProviderDisplayLabel_$=v(()=>{let e=this.llmProviderSelectOptions_$(),t=this.defaultLlmProvider_$().trim();return t.length?e.find(a=>a.value===t)?.label??t:""});qaProviderDisplayLabel_$=v(()=>{let e=this.qaProviderName.trim();return e.length?this.llmProviderSelectOptions_$().find(a=>a.value===e)?.label??e:""});ngOnInit(){let e=z.getMediaRecordingAvailability();if(!e.supported&&e.reason){let t=e.reason;this.mediaUnavailable_$.set(z.getMediaUnavailableMessage(t)),this.globalError_CS.reportErrorOnly({message:z.getMediaUnavailableReportMessage(t),source:"ccap-voice-record-button"})}this.soundRecorder_CS.setOnChunk((t,i)=>{this.onChunk(t,i)}),this.soundRecorder_CS.setOnVolume(t=>{this.volume_$.set(t)}),this.soundRecorder_CS.setOnError(t=>{this.globalError_CS.showError(t,"ccap-voice-record-button")})}ngOnDestroy(){this.soundRecorder_CS.stopListening()}toggleRecord(){return P(this,null,function*(){if(this.mediaUnavailable_$()!==null)return;if(this.soundRecorder_CS.state_$()===R.stopped){this.qaEnabled()===void 0&&(yield this.loadQaEnabledOnce());try{yield this.soundRecorder_CS.startListening()}catch(t){this.globalError_CS.showError(t,"ccap-voice-record-button")}}else this.soundRecorder_CS.stopListening()})}loadQaEnabledOnce(){return P(this,null,function*(){this.isQaEnabledFromSettings_$.set(yield this.voiceSttQaUi_DS.fetchQaEnabledFlag())})}handleAutoSendAfterVoiceChange(e){this.voiceInputUi_DS.setAutoSendAfterVoice(e)}toggleSettings(){this.settingsOpen_$.update(e=>!e),this.settingsOpen_$()&&this.loadQaSettings()}toggleInfo(){this.infoOpen_$.update(e=>!e)}loadQaSettings(){return P(this,null,function*(){this.qaSettingsLoading_$.set(!0);try{let e=yield this.voiceSttQaUi_DS.loadSttQaSettingsPanelState(),t=e.qa;this.qaSettings_$.set(t),this.confusionMapList_$.set([...t.confusionMap??[]]),this.settingsQaEnabled=t.qaEnabled===!0,this.isQaEnabledFromSettings_$.set(t.qaEnabled===!0),this.qaProviderName=t.providerName??"",this.qaModelName=t.modelName??"",this.llmProviderSelectOptions_$.set(e.llmProviderSelectOptions),this.defaultLlmProvider_$.set(e.defaultLlmProvider),this.defaultLlmModel_$.set(e.defaultLlmModel),this.qaModelsForProvider_$.set(e.qaModelsForProvider),this.qaModelsListFetchError_$.set(e.qaModelsListFetchError)}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button"),this.qaSettings_$.set(null),this.confusionMapList_$.set([]),this.llmProviderSelectOptions_$.set([]),this.qaModelsListFetchError_$.set(""),this.qaModelsForProvider_$.set([])}finally{this.qaSettingsLoading_$.set(!1)}})}loadQaModelsForProvider(e){return P(this,null,function*(){let t=yield this.voiceSttQaUi_DS.fetchLlmModelsListForSttQa(e);this.qaModelsForProvider_$.set(t.models),this.qaModelsListFetchError_$.set(t.errorMessage)})}onQaProviderChange(){this.loadQaModelsForProvider(this.qaProviderName),this.qaModelName=""}addConfusionEntry(){this.confusionMapList_$.update(e=>[...e,{from:"",to:""}])}removeConfusionEntry(e){this.confusionMapList_$.update(t=>t.filter((i,a)=>a!==e))}updateConfusionFrom(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:t,to:a[e].to}),a})}updateConfusionTo(e,t){this.confusionMapList_$.update(i=>{let a=[...i];return a[e]&&(a[e]={from:a[e].from,to:t}),a})}saveQaSettings(){return P(this,null,function*(){this.qaSettingsSaving_$.set(!0);try{let e=this.voiceSttQaUi_DS.normalizeConfusionMapEntries(this.confusionMapList_$());yield this.voiceSttQaUi_DS.saveVoiceNotesQaSettings({confusionMap:e,providerName:this.qaProviderName.trim()||void 0,modelName:this.qaModelName.trim()||void 0,qaEnabled:this.settingsQaEnabled}),this.confusionMapList_$.set([...e]),this.isQaEnabledFromSettings_$.set(this.settingsQaEnabled);let t=this.qaSettings_$();t!==null&&this.qaSettings_$.set({systemPrompt:t.systemPrompt,userPromptTemplate:t.userPromptTemplate,confusionMap:e,providerName:this.qaProviderName.trim()||"",modelName:this.qaModelName.trim()||"",qaEnabled:this.settingsQaEnabled})}catch(e){this.globalError_CS.showError(e,"ccap-voice-record-button")}finally{this.qaSettingsSaving_$.set(!1)}})}onEscape(){this.settingsOpen_$()&&this.settingsOpen_$.set(!1),this.infoOpen_$()&&this.infoOpen_$.set(!1)}effectiveQaEnabled_$=v(()=>this.qaEnabled()!==void 0?this.qaEnabled():this.isQaEnabledFromSettings_$());onChunk(e,t){return P(this,null,function*(){this.pendingTranscriptionCount++,this.busy_$.set(!0);let i=this.emitChain,a=()=>{};this.emitChain=new Promise(u=>{a=u});try{let u=yield this.voiceSttQaUi_DS.transcribeVoiceChunk({blob:e,mimeType:t.mimeType,filename:t.filename,qaEnabled:this.effectiveQaEnabled_$(),noteContext:"",skipClassification:!0});if(yield i,u.ok===!1){this.transcriptSegmentReady.emit({text:"",isFinal:t.isFinal});return}let _=u;if(_.qaFailed===!0){let b=_.qaFailureMessage?.trim()??"";b.length>0&&this.globalError_CS.showError(new Error(b),"voice-stt-qa")}let w=_.correctedTranscript!=null&&_.correctedTranscript.trim().length>0?_.correctedTranscript.trim():(_.transcript??"").trim();_.usedQa===!0&&(_.transcript??"").trim().length>0&&(_.correctedTranscript??"").trim().length>0&&this.lastQaTransformation_$.set({original:(_.transcript??"").trim(),corrected:(_.correctedTranscript??"").trim(),explanation:(_.qaExplanation??"").trim()||void 0,input:_.qaInput}),w&&(this.transcriptReady.emit(w),this.transcriptSegmentReady.emit({text:w,isFinal:t.isFinal}))}catch(u){this.globalError_CS.showError(u,"ccap-voice-record-button")}finally{a(),this.pendingTranscriptionCount--,this.pendingTranscriptionCount<=0&&(this.pendingTranscriptionCount=0,this.busy_$.set(!1))}})}recordStateLabel_$=v(()=>this.soundRecorder_CS.state_$()===R.stopped?"Felv\xE9tel":"Stop");isRecordActive_$=v(()=>{let e=this.soundRecorder_CS.state_$();return e===R.standby||e===R.running});isRecording_$=v(()=>this.soundRecorder_CS.state_$()===R.running);recordButtonAriaLabel_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel (feldolgoz\xE1s folyamatban)":"Felv\xE9tel")});recordButtonTitle_$=v(()=>{let e=this.mediaUnavailable_$();return e||(this.isRecordActive_$()?"Stop":this.busy_$()?"\xDAj felv\xE9tel \u2014 el\u0151z\u0151 feldolgoz\xE1s folyamatban":"Felv\xE9tel")});static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Y({type:n,selectors:[["app-ccap-voice-record-button"]],hostBindings:function(t,i){t&1&&m("keydown.escape",function(){return i.onEscape()},!1,ee)},inputs:{qaEnabled:[1,"qaEnabled"],compactLayout:[1,"compactLayout"]},outputs:{transcriptReady:"transcriptReady",transcriptSegmentReady:"transcriptSegmentReady"},standalone:!0,features:[ae],decls:25,vars:14,consts:[[1,"flex","flex-col","items-center","gap-1"],[3,"closed","isOpen","title","maxWidth","zIndex","bodyFlexColumn"],[1,"flex","flex-col","flex-1","min-h-0","w-full","overflow-y-auto","overflow-x-hidden","overscroll-y-contain"],[1,"flex","flex-col","gap-2","shrink-0"],[1,"flex","items-center","gap-2","cursor-pointer","select-none"],["type","checkbox","name","settingsQaEnabled",3,"ngModelChange","ngModel"],[1,"text-sm","text-neutral-300"],["type","checkbox","name","autoSendAfterVoice",3,"ngModelChange","ngModel"],[1,"mt-3","pt-3","border-t","border-neonDefault","flex","flex-col","gap-3","shrink-0"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-400"],["modal-footer","",1,"shrink-0","px-4","py-3","border-t","border-neonDefault"],["type","button",1,"w-full","px-3","py-1.5","text-sm","border","border-neonCyan","rounded","text-neutral-300","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[3,"closed","isOpen","title","maxWidth","zIndex"],[1,"space-y-2","text-sm"],[1,"text-xs","text-neutral-500"],[1,"flex","items-center","gap-2"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-2.5","h-2.5","shrink-0"],["d","M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"],["type","button",1,"w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],["type","button",1,"flex","items-center","justify-center","min-w-[44px]","min-h-[44px]","w-10","h-10","rounded-full","shrink-0","bg-neutral-900","border-2","text-white","transition-all","duration-200","disabled:opacity-50","border-neonDefault","hover:border-neonCyan","hover:shadow-neon-glow-cyan","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click","disabled"],["aria-hidden","true",1,"inline-block","w-5","h-5","shrink-0","animate-spin","rounded-full","border-2","border-neonCyan/40","border-t-neonCyan"],[1,"flex","flex-col","items-center","gap-0.5","shrink-0"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[180px]","text-center"],["aria-hidden","true",1,"relative","w-2","h-6","rounded-sm","bg-neutral-800","overflow-hidden"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-5","h-5","shrink-0","text-neonCyan"],["d","M12 2a3 3 0 0 1 3 3v7a3 3 0 0 1-6 0V5a3 3 0 0 1 3-3Z"],["d","M19 10v2a7 7 0 0 1-14 0v-2"],["x1","12","y1","19","x2","12","y2","22"],[1,"absolute","inset-x-0","bottom-0","bg-neonCyan","transition-[height]","duration-75"],[1,"absolute","inset-x-0","h-0.5","bg-neonAmber","rounded-sm","z-10",2,"bottom","5%"],["aria-hidden","true",1,"mr-1"],[1,"relative","inline-flex"],["type","button","aria-label","Be\xE1ll\xEDt\xE1sok","title","Be\xE1ll\xEDt\xE1sok",1,"absolute","right-full","mr-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","border-neonDefault","text-neonCyan","hover:border-neonCyan","hover:shadow-neon-glow-cyan","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-neonCyan","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],["type","button",1,"absolute","left-full","ml-4","top-1/2","-translate-y-1/2","w-5","h-5","rounded-full","flex","items-center","justify-center","bg-neutral-900","border-2","transition-all","duration-200","focus:outline-none","focus:ring-2","focus:ring-offset-2","focus:ring-offset-neutral-900",3,"click"],[1,"text-[11px]","text-amber-300","leading-tight","max-w-[240px]","mt-1"],[1,"shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words"],[1,"text-xs","text-neutral-300","whitespace-pre-wrap","break-words","font-mono"],[1,"text-[10px]","text-neonAmber","mt-1"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"flex","flex-wrap","gap-2","items-center"],["name","qaProviderName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[120px]",3,"ngModelChange","ngModel"],["value",""],[3,"value"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModel"],[1,"text-[10px]","text-amber-300/90","mt-1"],[1,"flex","flex-col","shrink-0"],[1,"text-xs","font-medium","text-neutral-400","mb-1","shrink-0"],[1,"space-y-1.5","rounded","border","border-neonDefault/50","bg-neutral-800/20","p-2"],[1,"flex","flex-wrap","gap-2","items-center","shrink-0","mt-2"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],["type","button",1,"px-2","py-1","text-xs","border","border-neonCyan","rounded","text-neonCyan","hover:shadow-neon-glow-cyan","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","qaModelName",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]",3,"ngModelChange","ngModel"],["type","text","name","qaModelNameText","placeholder","Modell id (lista nem el\xE9rhet\u0151 ehhez a providerhez)",1,"px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","min-w-[140px]","font-mono",3,"ngModelChange","ngModel"],["type","text","placeholder","El\xEDr\xE1s / f\xE9lrehall\xE1s",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],[1,"text-neutral-500","shrink-0"],["type","text","placeholder","Helyes forma",1,"flex-1","min-w-0","px-2","py-1","text-xs","bg-neutral-800","border","border-neonDefault","rounded","text-neutral-200","placeholder-neutral-500",3,"input","value"],["type","button","aria-label","Sor t\xF6rl\xE9se","title","Sor t\xF6rl\xE9se",1,"shrink-0","p-1","text-neutral-500","hover:text-neonRed","transition-colors",3,"click"],[1,"sr-only"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2",1,"w-3.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"mt-3","pt-3","border-t","border-neonDefault","text-xs","text-neutral-500"],["type","button",1,"mt-1.5","px-2","py-1","text-xs","border","border-neonDefault","rounded","text-neutral-400","hover:border-neonCyan","hover:text-neonCyan","transition-colors",3,"click"],[1,"rounded-md","border","border-neonAmber/45","bg-neutral-950/95","p-2.5","mb-1"],[1,"font-medium","text-neonAmber"],[1,"text-neutral-400","text-xs"],[1,"text-neutral-200","break-words"],[1,"text-neutral-400","text-xs","mt-2"],[1,"text-[10px]","font-semibold","uppercase","tracking-wide","text-neonAmber/90","mb-1.5"],[1,"text-xs","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"text-[10px]","text-neutral-500","mt-1.5","leading-snug"],[1,"text-neutral-300"],[1,"mx-0.5","inline","rounded","px-0.5","text-red-300/95","line-through","decoration-red-400/85","bg-red-950/50","border","border-red-900/45"],[1,"mx-0.5","inline","rounded","px-0.5","text-neonAmber","bg-amber-950/55","border","border-neonAmber/50","shadow-[0_0_10px_rgb(251_191_36/0.28)]"],[1,"text-neutral-300","break-words"]],template:function(t,i){if(t&1&&(C(0,Ae,15,35,"div",0)(1,Re,14,35),o(2,"app-s-modal",1),m("closed",function(){return i.settingsOpen_$.set(!1)}),o(3,"div",2)(4,"div",3)(5,"label",4)(6,"input",5),O("ngModelChange",function(u){return W(i.settingsQaEnabled,u)||(i.settingsQaEnabled=u),u}),r(),o(7,"span",6),d(8,"STT QA"),r()(),o(9,"label",4)(10,"input",7),m("ngModelChange",function(u){return i.handleAutoSendAfterVoiceChange(u)}),r(),o(11,"span",6),d(12,"Send immediately after voice (Mimik-style)"),r()()(),C(13,Oe,38,11,"div",8)(14,Ie,2,0,"p",9)(15,ze,4,0),r(),o(16,"div",10)(17,"button",11),m("click",function(){return i.settingsOpen_$.set(!1)}),d(18," Bez\xE1r\xE1s "),r()()(),o(19,"app-s-modal",12),m("closed",function(){return i.infoOpen_$.set(!1)}),C(20,Ze,13,4,"div",13)(21,Xe,2,0,"p",14),o(22,"div",10)(23,"button",11),m("click",function(){return i.infoOpen_$.set(!1)}),d(24," Bez\xE1r\xE1s "),r()()()),t&2){let a,u;g(i.compactLayout()?0:1),l(2),y("isOpen",i.settingsOpen_$())("title","Voice Input be\xE1ll\xEDt\xE1sok")("maxWidth","lg")("zIndex","40")("bodyFlexColumn",!0),l(4),N("ngModel",i.settingsQaEnabled),l(4),y("ngModel",i.voiceInputUi_DS.autoSendAfterVoice_$()),l(3),g((a=i.qaSettings_$())?13:i.qaSettingsLoading_$()?14:15,a),l(6),y("isOpen",i.infoOpen_$())("title","Utols\xF3 QA eredm\xE9ny")("maxWidth","md")("zIndex","40"),l(),g((u=i.lastQaTransformation_$())?20:21,u)}},dependencies:[pe,_e,me,se,le,ue,de,ce,xe],encapsulation:2})}return n})();export{be as a,vt as b};
2
+ //# sourceMappingURL=chunk-GAS7HMJI.js.map
@@ -1,2 +1,2 @@
1
- import{I as p}from"./chunk-5L255H5C.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
- //# sourceMappingURL=chunk-4O5PJT2Q.js.map
1
+ import{I as p}from"./chunk-RXRE3G4K.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
2
+ //# sourceMappingURL=chunk-GK3RSZLZ.js.map
@@ -1,2 +1,2 @@
1
- import{I as p}from"./chunk-5L255H5C.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
2
- //# sourceMappingURL=chunk-KS3E56FC.js.map
1
+ import{I as p}from"./chunk-RXRE3G4K.js";import{C as l,G as h,aa as a,hb as b,k as i,p as o,xb as d,y as n}from"./chunk-TBMJSIBB.js";var g=(()=>{class r{http=l(d);baseUrl=`${p.api.baseUrl}/sch`;listJobs(){return o(this.http.get(`${this.baseUrl}/jobs`))}getJob(e){return o(this.http.get(`${this.baseUrl}/jobs/${e}`))}createJob(e){return o(this.http.post(`${this.baseUrl}/jobs`,e))}updateJob(e,t){return o(this.http.patch(`${this.baseUrl}/jobs/${e}`,t))}deleteJob(e){return o(this.http.delete(`${this.baseUrl}/jobs/${e}`))}enableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/enable`,{}))}disableJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/disable`,{}))}pauseJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/pause`,{}))}resumeJob(e){return o(this.http.post(`${this.baseUrl}/jobs/${e}/resume`,{}))}triggerNow(e){let t=[];e.bypass&&t.push("bypass=true"),e.forcePolicy&&t.push(`forcePolicy=${encodeURIComponent(e.forcePolicy)}`),e.dryRun&&t.push("dryRun=true");let s=t.length?`?${t.join("&")}`:"";return o(this.http.post(`${this.baseUrl}/jobs/${e.jobId}/trigger-now${s}`,{reason:e.reason}))}listExecutions(e){let t=[];e.jobId&&t.push(`jobId=${encodeURIComponent(e.jobId)}`),e.status&&t.push(`status=${encodeURIComponent(e.status)}`),e.targetSessionId&&t.push(`targetSessionId=${encodeURIComponent(e.targetSessionId)}`),e.from&&t.push(`from=${encodeURIComponent(e.from)}`),e.to&&t.push(`to=${encodeURIComponent(e.to)}`);let s=t.length?`?${t.join("&")}`:"";return o(this.http.get(`${this.baseUrl}/executions${s}`))}getExecution(e){return o(this.http.get(`${this.baseUrl}/executions/${e}`))}getDefaults(){return o(this.http.get(`${this.baseUrl}/defaults`))}applyDefaults(){return o(this.http.post(`${this.baseUrl}/defaults/apply`,{}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var F=(()=>{class r{jobs_AS=l(g);jobs_$=a([]);recentExecutions_$=a(new Map);isLoading_$=a(!1);errorMessage_$=a(null);scheduledSessionIds_$=b(()=>{let e=new Set;for(let t of this.jobs_$()){if(t.enabled===!1)continue;let s=t.target?.payload?.sessionId?.trim();s&&e.add(s)}return e});loadAll(){return i(this,null,function*(){this.isLoading_$.set(!0),this.errorMessage_$.set(null);try{let t=(yield this.jobs_AS.listJobs()).jobs??[];this.jobs_$.set(t),this.loadRecentExecutionsForJobs(t)}catch(e){this.errorMessage_$.set(e?.message??"Failed to load scheduler jobs")}finally{this.isLoading_$.set(!1)}})}loadRecentExecutionsForJobs(e){return i(this,null,function*(){let t=new Map;try{let $=(yield this.jobs_AS.listExecutions({})).executions??[];for(let j of e){let c=j._id??"";if(!c)continue;let y=$.filter(u=>u.jobId===c).sort((u,m)=>(m.scheduledAt??"").localeCompare(u.scheduledAt??"")).slice(0,10);t.set(c,y)}}catch{}this.recentExecutions_$.set(t)})}getJob(e){return i(this,null,function*(){try{return(yield this.jobs_AS.getJob(e)).job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load job"),null}})}create(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.createJob(e);return yield this.loadAll(),t.job}catch(t){return this.errorMessage_$.set(t?.message??"Failed to create job"),null}})}update(e,t){return i(this,null,function*(){try{let s=yield this.jobs_AS.updateJob(e,t);return yield this.loadAll(),s.job}catch(s){return this.errorMessage_$.set(s?.message??"Failed to update job"),null}})}remove(e){return i(this,null,function*(){try{let t=yield this.jobs_AS.deleteJob(e);return yield this.loadAll(),t.deleted}catch(t){return this.errorMessage_$.set(t?.message??"Failed to delete job"),!1}})}toggleEnabled(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.enableJob(e):yield this.jobs_AS.disableJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle enabled state")}})}togglePaused(e,t){return i(this,null,function*(){try{t?yield this.jobs_AS.pauseJob(e):yield this.jobs_AS.resumeJob(e),yield this.loadAll()}catch(s){this.errorMessage_$.set(s?.message??"Failed to toggle paused state")}})}triggerNow(e){return i(this,null,function*(){try{return(yield this.jobs_AS.triggerNow(e)).triggered}catch(t){return this.errorMessage_$.set(t?.message??"Failed to trigger job"),!1}})}listExecutions(e){return i(this,null,function*(){try{return(yield this.jobs_AS.listExecutions({jobId:e.jobId})).executions??[]}catch(t){return this.errorMessage_$.set(t?.message??"Failed to load executions"),[]}})}getDefaults(){return i(this,null,function*(){try{return(yield this.jobs_AS.getDefaults()).defaults}catch(e){return this.errorMessage_$.set(e?.message??"Failed to load defaults"),null}})}static \u0275fac=function(t){return new(t||r)};static \u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var E=(()=>{class r{transform(e){if(!e||!e.preset)return"\u2014";let t=e.preset,s=e.intervalValue;if(s===void 0||!isFinite(s))return t;switch(t){case"every-n-minutes":return`every ${s} minutes`;case"every-n-hours":return`every ${s} hours`;case"every-n-days":return`every ${s} days`;case"windowed-interval":return`every ${s} min (window)`;default:return t}}static \u0275fac=function(t){return new(t||r)};static \u0275pipe=h({name:"schSchedulePresetLabel",type:r,pure:!0,standalone:!0})}return r})();export{F as a,E as b};
2
+ //# sourceMappingURL=chunk-IOXSJK5R.js.map
@@ -1,2 +1,2 @@
1
- import{p as l}from"./chunk-5L255H5C.js";import{G as i,h as f}from"./chunk-TBMJSIBB.js";var o=f(l()),u=10*o.second,_=20*o.second,a=5,c=7;var n=class{static getDurationBand(r){if(r==null)return null;let e=typeof r=="number"?r:Number(r);return Number.isNaN(e)||e<0?null:e<=u?"green":e<=_?"yellow":"red"}static getScoreBand(r){return r<a?"red":r>=c?"green":"yellow"}};var m=(()=>{class t{transform(e){return e!=null?n.getScoreBand(Number(e)):"yellow"}static \u0275fac=function(p){return new(p||t)};static \u0275pipe=i({name:"ccapScoreBand",type:t,pure:!0,standalone:!0})}return t})();export{n as a,m as b};
2
- //# sourceMappingURL=chunk-GXVFIYGG.js.map
1
+ import{p as l}from"./chunk-RXRE3G4K.js";import{G as i,h as f}from"./chunk-TBMJSIBB.js";var o=f(l()),u=10*o.second,_=20*o.second,a=5,c=7;var n=class{static getDurationBand(r){if(r==null)return null;let e=typeof r=="number"?r:Number(r);return Number.isNaN(e)||e<0?null:e<=u?"green":e<=_?"yellow":"red"}static getScoreBand(r){return r<a?"red":r>=c?"green":"yellow"}};var m=(()=>{class t{transform(e){return e!=null?n.getScoreBand(Number(e)):"yellow"}static \u0275fac=function(p){return new(p||t)};static \u0275pipe=i({name:"ccapScoreBand",type:t,pure:!0,standalone:!0})}return t})();export{n as a,m as b};
2
+ //# sourceMappingURL=chunk-IPLQJBDL.js.map
@@ -1,2 +1,2 @@
1
- import{q as i}from"./chunk-5L255H5C.js";var e=class{static build(r){let t=r.localAiKey.trim();if(!t.length)throw new Error("localAiSettings.key must be non-empty UUID for custom local LLM rows");return`${i.customLocalAi}--${t}`}static parseLocalAiKeyFromInstanceId(r){let t=`${i.customLocalAi}--`,o=r.instanceId.trim();if(!o.startsWith(t)||o.length<=t.length)throw new Error("Invalid custom local LLM instance id");return o.slice(t.length)}};export{e as a};
2
- //# sourceMappingURL=chunk-GOHAZ3UP.js.map
1
+ import{q as i}from"./chunk-RXRE3G4K.js";var e=class{static build(r){let t=r.localAiKey.trim();if(!t.length)throw new Error("localAiSettings.key must be non-empty UUID for custom local LLM rows");return`${i.customLocalAi}--${t}`}static parseLocalAiKeyFromInstanceId(r){let t=`${i.customLocalAi}--`,o=r.instanceId.trim();if(!o.startsWith(t)||o.length<=t.length)throw new Error("Invalid custom local LLM instance id");return o.slice(t.length)}};export{e as a};
2
+ //# sourceMappingURL=chunk-J6ZXTCHI.js.map