@futdevpro/ccap 1.1.3500 → 1.1.3508

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 (183) hide show
  1. package/client-dist/{agent-instances.module-B2XZUQC6.js → agent-instances.module-X2EAZWNC.js} +2 -2
  2. package/client-dist/{ca.module-CXEHZQZS.js → ca.module-UKEVG7H5.js} +2 -2
  3. package/client-dist/cc-usage-dashboard.component-SWKOCSYU.js +2 -0
  4. package/client-dist/cc-usage-dashboard.component-SWKOCSYU.js.map +7 -0
  5. package/client-dist/{cc.module-6QMKZMBE.js → cc.module-AE3UTLQM.js} +4 -4
  6. package/client-dist/{cc.module-6QMKZMBE.js.map → cc.module-AE3UTLQM.js.map} +3 -3
  7. package/client-dist/{chunk-JTSW4KB2.js → chunk-2DCZKGMQ.js} +2 -2
  8. package/client-dist/{chunk-PM5I7YJC.js → chunk-2HP3VJTA.js} +2 -2
  9. package/client-dist/{chunk-62CPYMOW.js → chunk-2ZCY5YQ7.js} +2 -2
  10. package/client-dist/{chunk-H4VU6LQZ.js → chunk-2ZPKASXU.js} +2 -2
  11. package/client-dist/{chunk-H42VGD5M.js → chunk-3B2KB7MF.js} +2 -2
  12. package/client-dist/{chunk-SZKLSR6O.js → chunk-3LJRWGKD.js} +2 -2
  13. package/client-dist/{chunk-2WV2FF3Q.js → chunk-4BERPGJT.js} +2 -2
  14. package/client-dist/{chunk-NQHVRW62.js → chunk-4JRMGC33.js} +2 -2
  15. package/client-dist/{chunk-Y6TO7KG5.js → chunk-5CI77L5J.js} +2 -2
  16. package/client-dist/{chunk-WPARACH6.js → chunk-5GU2SVER.js} +2 -2
  17. package/client-dist/{chunk-V5E7MTWY.js → chunk-5H5VMEAE.js} +2 -2
  18. package/client-dist/{chunk-YG5PLC2P.js → chunk-5ZNUIE2O.js} +2 -2
  19. package/client-dist/{chunk-AHUOKGJ7.js → chunk-7AJI4JCW.js} +2 -2
  20. package/client-dist/{chunk-OYOA5O6J.js → chunk-ACYOZ4MP.js} +2 -2
  21. package/client-dist/{chunk-VFIWP6WW.js → chunk-AEAJ2ABL.js} +2 -2
  22. package/client-dist/{chunk-F5NOGK2B.js → chunk-ANMHMGCN.js} +2 -2
  23. package/client-dist/{chunk-F5NOGK2B.js.map → chunk-ANMHMGCN.js.map} +1 -1
  24. package/client-dist/{chunk-AUHPUPCM.js → chunk-ARE26OH2.js} +2 -2
  25. package/client-dist/{chunk-ECLZXUFQ.js → chunk-BCLGUIFQ.js} +2 -2
  26. package/client-dist/{chunk-PMMYOBKX.js → chunk-BSUZZCBN.js} +2 -2
  27. package/client-dist/{chunk-BHC2LIMC.js → chunk-ERROOXHA.js} +2 -2
  28. package/client-dist/{chunk-UHGYKZYI.js → chunk-EZD36BDE.js} +2 -2
  29. package/client-dist/{chunk-MRW5BKTC.js → chunk-G5RVYENP.js} +2 -2
  30. package/client-dist/{chunk-CJSODYSI.js → chunk-HJ6Q4JYU.js} +2 -2
  31. package/client-dist/{chunk-KXN7I4NH.js → chunk-HWY2SAVN.js} +2 -2
  32. package/client-dist/{chunk-NEVGW5P5.js → chunk-IVUKHZAE.js} +2 -2
  33. package/client-dist/{chunk-VEOMDFFW.js → chunk-JSLXFS3P.js} +2 -2
  34. package/client-dist/{chunk-EG4MWZ3G.js → chunk-KJBEKLZZ.js} +2 -2
  35. package/client-dist/{chunk-DZS3G5LG.js → chunk-KNNGJ7AJ.js} +2 -2
  36. package/client-dist/{chunk-EVCLCJFY.js → chunk-KOY5WHLS.js} +2 -2
  37. package/client-dist/{chunk-NHNFHQQV.js → chunk-L7MQFYDG.js} +2 -2
  38. package/client-dist/{chunk-65FNJEQY.js → chunk-LOGCDPUJ.js} +2 -2
  39. package/client-dist/{chunk-XIFGFVPM.js → chunk-M5JVIKJU.js} +2 -2
  40. package/client-dist/{chunk-GDZKZEQ6.js → chunk-NU2XNK5F.js} +2 -2
  41. package/client-dist/{chunk-GLGOIPXP.js → chunk-NYV2AR3J.js} +2 -2
  42. package/client-dist/{chunk-UE6QT3QX.js → chunk-NZTD5QPD.js} +2 -2
  43. package/client-dist/{chunk-XPFIWQJX.js → chunk-O2MF2KDY.js} +2 -2
  44. package/client-dist/{chunk-E5DW3NBZ.js → chunk-ORLDSG2B.js} +2 -2
  45. package/client-dist/{chunk-LIM5Q3RD.js → chunk-PHSKINXP.js} +2 -2
  46. package/client-dist/{chunk-OO6K4AWB.js → chunk-PQJSMEEO.js} +2 -2
  47. package/client-dist/{chunk-OA6WDW2F.js → chunk-QBVNLJ7A.js} +2 -2
  48. package/client-dist/{chunk-272VVSW4.js → chunk-R3JWUXQG.js} +2 -2
  49. package/client-dist/{chunk-UZKEIQWM.js → chunk-RHNIU2GL.js} +2 -2
  50. package/client-dist/{chunk-E5ZMUB4C.js → chunk-SOCHCXP2.js} +2 -2
  51. package/client-dist/{chunk-NKSKQA7M.js → chunk-SY2IF3DK.js} +2 -2
  52. package/client-dist/{chunk-SOBOH2SA.js → chunk-TOIHWXFM.js} +2 -2
  53. package/client-dist/{chunk-7EAXLWBT.js → chunk-U7YD552X.js} +2 -2
  54. package/client-dist/{chunk-3U7EAO6I.js → chunk-UMM6T6AQ.js} +2 -2
  55. package/client-dist/{chunk-WVHUNC74.js → chunk-WBU5DC4T.js} +2 -2
  56. package/client-dist/{chunk-G4GAE633.js → chunk-WIJ2KUXX.js} +2 -2
  57. package/client-dist/{chunk-H4YOE7ZQ.js → chunk-WLLWEGK2.js} +2 -2
  58. package/client-dist/{chunk-FUIXKBZ5.js → chunk-XBMDDFNC.js} +2 -2
  59. package/client-dist/{chunk-3XGNYWLF.js → chunk-XI7FMFIP.js} +2 -2
  60. package/client-dist/{chunk-CFRJ6OZ4.js → chunk-XJKKZSRS.js} +2 -2
  61. package/client-dist/{chunk-5F4DHUFW.js → chunk-Y5NZKXVF.js} +2 -2
  62. package/client-dist/{chunk-FNYMVWLM.js → chunk-YDJYWSDS.js} +2 -2
  63. package/client-dist/{chunk-HWOTY763.js → chunk-YYASTT5C.js} +2 -2
  64. package/client-dist/{chunk-CPWEDS4A.js → chunk-ZMT6QVPB.js} +2 -2
  65. package/client-dist/{consultant.module-PC2GM4DT.js → consultant.module-HZ7WOFTN.js} +2 -2
  66. package/client-dist/{crd.module-5FGOTLEM.js → crd.module-OXAMCXDI.js} +2 -2
  67. package/client-dist/{dashboard.module-Y5SAWE5J.js → dashboard.module-VSGVSZBD.js} +2 -2
  68. package/client-dist/{do.module-TQQU4CLK.js → do.module-WC6SE5GC.js} +2 -2
  69. package/client-dist/{document-library.module-XI2S5CEN.js → document-library.module-LF6PNZZ6.js} +2 -2
  70. package/client-dist/{embedding-eval.module-NYT7LMM4.js → embedding-eval.module-VG2H26HJ.js} +2 -2
  71. package/client-dist/{embedding-registry.module-XLFF4UZ2.js → embedding-registry.module-L4VRHDSK.js} +2 -2
  72. package/client-dist/{err.module-YYO7KQOH.js → err.module-7FJCXFSP.js} +2 -2
  73. package/client-dist/{feedback.module-IN6JCIAB.js → feedback.module-2K2I6WPU.js} +2 -2
  74. package/client-dist/{host-runtime-mcp.module-YFPNRDGO.js → host-runtime-mcp.module-JOQ523Q5.js} +2 -2
  75. package/client-dist/index.html +1 -1
  76. package/client-dist/{live-dev-pipeline.module-PVK3ZBZX.js → live-dev-pipeline.module-RJBGTQHR.js} +2 -2
  77. package/client-dist/{logs.module-A2WPSDIS.js → logs.module-2CBIYME4.js} +2 -2
  78. package/client-dist/{main-NP7IXPCG.js → main-TOSGI6VN.js} +3 -3
  79. package/client-dist/{master-control-remote-poc.module-I62DHW3D.js → master-control-remote-poc.module-5USUYVL5.js} +2 -2
  80. package/client-dist/{mobile-app.module-ZD436WTU.js → mobile-app.module-7ZWPWWLA.js} +2 -2
  81. package/client-dist/{model-registry.module-V3ODTAIK.js → model-registry.module-ENN2P4B7.js} +2 -2
  82. package/client-dist/{oc.module-NUDHTXNK.js → oc.module-27SYDDIP.js} +2 -2
  83. package/client-dist/{orc.module-XKHPJCTI.js → orc.module-JXNEWP23.js} +2 -2
  84. package/client-dist/{project-management.module-P5RMROTW.js → project-management.module-4ALXGXV4.js} +2 -2
  85. package/client-dist/project-source-routed.module-BENCKHFP.js +2 -0
  86. package/client-dist/{scheduler.module-SBDMGS6W.js → scheduler.module-N6PG2XU5.js} +2 -2
  87. package/client-dist/{session.module-OI2DENNX.js → session.module-QH4R6K5Q.js} +2 -2
  88. package/client-dist/{set.module-HSE6F74P.js → set.module-CVDVQQP3.js} +2 -2
  89. package/client-dist/{setup.module-3ZBIYEWA.js → setup.module-UVOQ7JCG.js} +2 -2
  90. package/client-dist/{terminals.module-M4KWKRL4.js → terminals.module-FYGH4UWH.js} +2 -2
  91. package/client-dist/{voice-notes-poc.module-F4QA3S73.js → voice-notes-poc.module-B2ZRFQMS.js} +2 -2
  92. package/client-dist/{wfs.module-ZNNIZDBZ.js → wfs.module-FPVJ74R6.js} +2 -2
  93. package/package.json +1 -1
  94. package/server/build/src/_modules/ccap-agent/_modules/tools/_models/interfaces/llm-tools/tool-schema/tool-result/tls-tool-execution-context.interface.d.ts +8 -0
  95. package/server/build/src/_modules/ccap-agent/_modules/tools/_models/interfaces/llm-tools/tool-schema/tool-result/tls-tool-execution-context.interface.d.ts.map +1 -1
  96. package/client-dist/cc-usage-dashboard.component-GVD6MICM.js +0 -2
  97. package/client-dist/cc-usage-dashboard.component-GVD6MICM.js.map +0 -7
  98. package/client-dist/project-source-routed.module-VHH74KI2.js +0 -2
  99. /package/client-dist/{agent-instances.module-B2XZUQC6.js.map → agent-instances.module-X2EAZWNC.js.map} +0 -0
  100. /package/client-dist/{ca.module-CXEHZQZS.js.map → ca.module-UKEVG7H5.js.map} +0 -0
  101. /package/client-dist/{chunk-JTSW4KB2.js.map → chunk-2DCZKGMQ.js.map} +0 -0
  102. /package/client-dist/{chunk-PM5I7YJC.js.map → chunk-2HP3VJTA.js.map} +0 -0
  103. /package/client-dist/{chunk-62CPYMOW.js.map → chunk-2ZCY5YQ7.js.map} +0 -0
  104. /package/client-dist/{chunk-H4VU6LQZ.js.map → chunk-2ZPKASXU.js.map} +0 -0
  105. /package/client-dist/{chunk-H42VGD5M.js.map → chunk-3B2KB7MF.js.map} +0 -0
  106. /package/client-dist/{chunk-SZKLSR6O.js.map → chunk-3LJRWGKD.js.map} +0 -0
  107. /package/client-dist/{chunk-2WV2FF3Q.js.map → chunk-4BERPGJT.js.map} +0 -0
  108. /package/client-dist/{chunk-NQHVRW62.js.map → chunk-4JRMGC33.js.map} +0 -0
  109. /package/client-dist/{chunk-Y6TO7KG5.js.map → chunk-5CI77L5J.js.map} +0 -0
  110. /package/client-dist/{chunk-WPARACH6.js.map → chunk-5GU2SVER.js.map} +0 -0
  111. /package/client-dist/{chunk-V5E7MTWY.js.map → chunk-5H5VMEAE.js.map} +0 -0
  112. /package/client-dist/{chunk-YG5PLC2P.js.map → chunk-5ZNUIE2O.js.map} +0 -0
  113. /package/client-dist/{chunk-AHUOKGJ7.js.map → chunk-7AJI4JCW.js.map} +0 -0
  114. /package/client-dist/{chunk-OYOA5O6J.js.map → chunk-ACYOZ4MP.js.map} +0 -0
  115. /package/client-dist/{chunk-VFIWP6WW.js.map → chunk-AEAJ2ABL.js.map} +0 -0
  116. /package/client-dist/{chunk-AUHPUPCM.js.map → chunk-ARE26OH2.js.map} +0 -0
  117. /package/client-dist/{chunk-ECLZXUFQ.js.map → chunk-BCLGUIFQ.js.map} +0 -0
  118. /package/client-dist/{chunk-PMMYOBKX.js.map → chunk-BSUZZCBN.js.map} +0 -0
  119. /package/client-dist/{chunk-BHC2LIMC.js.map → chunk-ERROOXHA.js.map} +0 -0
  120. /package/client-dist/{chunk-UHGYKZYI.js.map → chunk-EZD36BDE.js.map} +0 -0
  121. /package/client-dist/{chunk-MRW5BKTC.js.map → chunk-G5RVYENP.js.map} +0 -0
  122. /package/client-dist/{chunk-CJSODYSI.js.map → chunk-HJ6Q4JYU.js.map} +0 -0
  123. /package/client-dist/{chunk-KXN7I4NH.js.map → chunk-HWY2SAVN.js.map} +0 -0
  124. /package/client-dist/{chunk-NEVGW5P5.js.map → chunk-IVUKHZAE.js.map} +0 -0
  125. /package/client-dist/{chunk-VEOMDFFW.js.map → chunk-JSLXFS3P.js.map} +0 -0
  126. /package/client-dist/{chunk-EG4MWZ3G.js.map → chunk-KJBEKLZZ.js.map} +0 -0
  127. /package/client-dist/{chunk-DZS3G5LG.js.map → chunk-KNNGJ7AJ.js.map} +0 -0
  128. /package/client-dist/{chunk-EVCLCJFY.js.map → chunk-KOY5WHLS.js.map} +0 -0
  129. /package/client-dist/{chunk-NHNFHQQV.js.map → chunk-L7MQFYDG.js.map} +0 -0
  130. /package/client-dist/{chunk-65FNJEQY.js.map → chunk-LOGCDPUJ.js.map} +0 -0
  131. /package/client-dist/{chunk-XIFGFVPM.js.map → chunk-M5JVIKJU.js.map} +0 -0
  132. /package/client-dist/{chunk-GDZKZEQ6.js.map → chunk-NU2XNK5F.js.map} +0 -0
  133. /package/client-dist/{chunk-GLGOIPXP.js.map → chunk-NYV2AR3J.js.map} +0 -0
  134. /package/client-dist/{chunk-UE6QT3QX.js.map → chunk-NZTD5QPD.js.map} +0 -0
  135. /package/client-dist/{chunk-XPFIWQJX.js.map → chunk-O2MF2KDY.js.map} +0 -0
  136. /package/client-dist/{chunk-E5DW3NBZ.js.map → chunk-ORLDSG2B.js.map} +0 -0
  137. /package/client-dist/{chunk-LIM5Q3RD.js.map → chunk-PHSKINXP.js.map} +0 -0
  138. /package/client-dist/{chunk-OO6K4AWB.js.map → chunk-PQJSMEEO.js.map} +0 -0
  139. /package/client-dist/{chunk-OA6WDW2F.js.map → chunk-QBVNLJ7A.js.map} +0 -0
  140. /package/client-dist/{chunk-272VVSW4.js.map → chunk-R3JWUXQG.js.map} +0 -0
  141. /package/client-dist/{chunk-UZKEIQWM.js.map → chunk-RHNIU2GL.js.map} +0 -0
  142. /package/client-dist/{chunk-E5ZMUB4C.js.map → chunk-SOCHCXP2.js.map} +0 -0
  143. /package/client-dist/{chunk-NKSKQA7M.js.map → chunk-SY2IF3DK.js.map} +0 -0
  144. /package/client-dist/{chunk-SOBOH2SA.js.map → chunk-TOIHWXFM.js.map} +0 -0
  145. /package/client-dist/{chunk-7EAXLWBT.js.map → chunk-U7YD552X.js.map} +0 -0
  146. /package/client-dist/{chunk-3U7EAO6I.js.map → chunk-UMM6T6AQ.js.map} +0 -0
  147. /package/client-dist/{chunk-WVHUNC74.js.map → chunk-WBU5DC4T.js.map} +0 -0
  148. /package/client-dist/{chunk-G4GAE633.js.map → chunk-WIJ2KUXX.js.map} +0 -0
  149. /package/client-dist/{chunk-H4YOE7ZQ.js.map → chunk-WLLWEGK2.js.map} +0 -0
  150. /package/client-dist/{chunk-FUIXKBZ5.js.map → chunk-XBMDDFNC.js.map} +0 -0
  151. /package/client-dist/{chunk-3XGNYWLF.js.map → chunk-XI7FMFIP.js.map} +0 -0
  152. /package/client-dist/{chunk-CFRJ6OZ4.js.map → chunk-XJKKZSRS.js.map} +0 -0
  153. /package/client-dist/{chunk-5F4DHUFW.js.map → chunk-Y5NZKXVF.js.map} +0 -0
  154. /package/client-dist/{chunk-FNYMVWLM.js.map → chunk-YDJYWSDS.js.map} +0 -0
  155. /package/client-dist/{chunk-HWOTY763.js.map → chunk-YYASTT5C.js.map} +0 -0
  156. /package/client-dist/{chunk-CPWEDS4A.js.map → chunk-ZMT6QVPB.js.map} +0 -0
  157. /package/client-dist/{consultant.module-PC2GM4DT.js.map → consultant.module-HZ7WOFTN.js.map} +0 -0
  158. /package/client-dist/{crd.module-5FGOTLEM.js.map → crd.module-OXAMCXDI.js.map} +0 -0
  159. /package/client-dist/{dashboard.module-Y5SAWE5J.js.map → dashboard.module-VSGVSZBD.js.map} +0 -0
  160. /package/client-dist/{do.module-TQQU4CLK.js.map → do.module-WC6SE5GC.js.map} +0 -0
  161. /package/client-dist/{document-library.module-XI2S5CEN.js.map → document-library.module-LF6PNZZ6.js.map} +0 -0
  162. /package/client-dist/{embedding-eval.module-NYT7LMM4.js.map → embedding-eval.module-VG2H26HJ.js.map} +0 -0
  163. /package/client-dist/{embedding-registry.module-XLFF4UZ2.js.map → embedding-registry.module-L4VRHDSK.js.map} +0 -0
  164. /package/client-dist/{err.module-YYO7KQOH.js.map → err.module-7FJCXFSP.js.map} +0 -0
  165. /package/client-dist/{feedback.module-IN6JCIAB.js.map → feedback.module-2K2I6WPU.js.map} +0 -0
  166. /package/client-dist/{host-runtime-mcp.module-YFPNRDGO.js.map → host-runtime-mcp.module-JOQ523Q5.js.map} +0 -0
  167. /package/client-dist/{live-dev-pipeline.module-PVK3ZBZX.js.map → live-dev-pipeline.module-RJBGTQHR.js.map} +0 -0
  168. /package/client-dist/{logs.module-A2WPSDIS.js.map → logs.module-2CBIYME4.js.map} +0 -0
  169. /package/client-dist/{main-NP7IXPCG.js.map → main-TOSGI6VN.js.map} +0 -0
  170. /package/client-dist/{master-control-remote-poc.module-I62DHW3D.js.map → master-control-remote-poc.module-5USUYVL5.js.map} +0 -0
  171. /package/client-dist/{mobile-app.module-ZD436WTU.js.map → mobile-app.module-7ZWPWWLA.js.map} +0 -0
  172. /package/client-dist/{model-registry.module-V3ODTAIK.js.map → model-registry.module-ENN2P4B7.js.map} +0 -0
  173. /package/client-dist/{oc.module-NUDHTXNK.js.map → oc.module-27SYDDIP.js.map} +0 -0
  174. /package/client-dist/{orc.module-XKHPJCTI.js.map → orc.module-JXNEWP23.js.map} +0 -0
  175. /package/client-dist/{project-management.module-P5RMROTW.js.map → project-management.module-4ALXGXV4.js.map} +0 -0
  176. /package/client-dist/{project-source-routed.module-VHH74KI2.js.map → project-source-routed.module-BENCKHFP.js.map} +0 -0
  177. /package/client-dist/{scheduler.module-SBDMGS6W.js.map → scheduler.module-N6PG2XU5.js.map} +0 -0
  178. /package/client-dist/{session.module-OI2DENNX.js.map → session.module-QH4R6K5Q.js.map} +0 -0
  179. /package/client-dist/{set.module-HSE6F74P.js.map → set.module-CVDVQQP3.js.map} +0 -0
  180. /package/client-dist/{setup.module-3ZBIYEWA.js.map → setup.module-UVOQ7JCG.js.map} +0 -0
  181. /package/client-dist/{terminals.module-M4KWKRL4.js.map → terminals.module-FYGH4UWH.js.map} +0 -0
  182. /package/client-dist/{voice-notes-poc.module-F4QA3S73.js.map → voice-notes-poc.module-B2ZRFQMS.js.map} +0 -0
  183. /package/client-dist/{wfs.module-ZNNIZDBZ.js.map → wfs.module-FPVJ74R6.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as he}from"./chunk-MRW5BKTC.js";import{a as ge,b as Ce}from"./chunk-5F4DHUFW.js";import{a as me,b as _e}from"./chunk-NHNFHQQV.js";import{a as Se,b as Y}from"./chunk-L44637OO.js";import{a as ue}from"./chunk-OYOA5O6J.js";import{b as pe}from"./chunk-NKSKQA7M.js";import{d as fe}from"./chunk-E5ZMUB4C.js";import{d as U,h as xe}from"./chunk-AHUOKGJ7.js";import{a as ce}from"./chunk-FLAJXIYW.js";import{f as oe,i as ae,n as re,o as se,p as le,v as de}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-F5NOGK2B.js";import{$a as z,C as y,D as b,Fa as s,Ga as I,Ha as S,Ia as te,J as C,K as v,L as E,M as Q,Q as Z,T as q,Ta as w,U as A,Ua as O,Va as ne,Z as r,aa as $,ab as ie,bb as B,da as _,fa as R,ga as p,h as $e,hb as h,ia as M,k as H,la as u,mb as K,na as ee,oa as F,pa as V,pb as J,qa as a,ra as o,sa as x,ua as k,ub as N,va as f,wa as c,y as X}from"./chunk-TBMJSIBB.js";var ye=$e(Te());var W=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=n.getTime()-i.getTime();if(l<=0)return"expired";let m=Math.floor(l/6e4),T=Math.floor(m/60),j=m%60;return T>0?`${T}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=Math.floor((n.getTime()-i.getTime())/1e3);if(l<=0)return"expired";let m=Math.floor(l/86400),T=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),g=l%60,D=[];return m&&D.push(`${m}d`),(m||T)&&D.push(`${T}h`),(m||T||j)&&D.push(`${j}m`),D.push(`${g}s`),D.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=i&&i>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),z(23,"date"),o()()),t&2){let e=d,n=c();r(6),I(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),S(" ",e.status||"\u2014"," "),r(4),S("",n.utilizationPercent_$(),"%"),r(4),I(n.resetText_$()||"\u2014"),r(4),S(" ",B(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var be=(()=>{class t{claudeCode_AS=y(me);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=h(()=>W.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=h(()=>W.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=h(()=>W.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=_e.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{ye.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[w],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,i){if(n&1&&_(0,Me,24,14,"div",0),n&2){let l;u((l=i.rateLimitInfo_$())?0:-1,l)}},dependencies:[N,J],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),x(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),z(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),I(e.activeRunPhase||"\u2014"),r(2),I(e.activitySummary||"\u2014"),r(4),S(" ",B(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),I(e.lastMessage||"\u2014")}}var we=(()=>{class t{row;presence=void 0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[w],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),_(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),_(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),z(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),z(40,"date"),o()(),a(41,"div",6),x(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,m;r(4),I(i.row.registry.instanceKey||"\u2014"),r(4),I((i.row.instanceData==null||i.row.instanceData.name==null?null:i.row.instanceData.name.trim())||"\u2014"),r(4),I((i.row.instanceData==null?null:i.row.instanceData.status)||"\u2014"),r(),u((l=i.presence)?13:-1,l),r(4),S(" ",(i.row.instanceData==null||i.row.instanceData.sessionStatuses==null||i.row.instanceData.sessionStatuses[0]==null?null:i.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((m=i.row.instanceData==null||i.row.instanceData.sessionStatuses==null?null:i.row.instanceData.sessionStatuses[0])?18:-1,m),r(4),I(i.row.registry.primaryMacAddress||"\u2014"),r(4),I(i.row.registry.installLocationPath||"\u2014"),r(4),I(i.row.registry.hostName||"\u2014"),r(4),S(" ",B(35,12,i.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),S(" ",B(40,15,i.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",i.row.registry.instanceKey||"")}},dependencies:[N,J,be,Y],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&x(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function ze(t,d){t&1&&x(0,"span",7)}function Le(t,d){if(t&1){let e=k();a(0,"div",2)(1,"button",4),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleSelectInstance((i=l.instanceKey)!==null&&i!==void 0?i:""))}),_(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),_(4,Ve,2,0,"span",6)(5,ze,1,0,"span",7),o(),a(6,"button",8),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleInfoClick((i=l.instanceKey)!==null&&i!==void 0?i:""))}),s(7," i "),o()()}if(t&2){let e,n=d.$implicit,i=c();r(),M("border-ccapAccent",i.isSelected(n))("text-ccapAccent",i.isSelected(n))("border-neonDefault",!i.isSelected(n))("text-neutral-400",!i.isSelected(n))("hover:text-neutral-200",!i.isSelected(n))("hover:border-neutral-500",!i.isSelected(n)),p("ngClass",ne(17,Re,i.isSelected(n))),r(),u((e=i.getPresenceForRow(n))?2:-1,e),r(),S(" ",i.getDisplayLabel(n)," "),r(),u(i.isLocal(n)?4:-1),r(),u(i.getActiveSessionForRow(n)?5:-1)}}function Pe(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var Ee=(()=>{class t{peiContext_DS=y(ue);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new Z;instances_$=h(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=h(()=>this.peiContext_DS.activeCcapId_$());localKey_$=h(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",i=(e.instanceKey??"").slice(-6);return n?`${n} (${i})`:i||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[w],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),F(3,Le,8,19,"div",2,Ae),_(5,Pe,2,0,"span",3),o()),n&2&&(r(3),V(i.instances_$()),r(2),u(i.instances_$().length?-1:5))},dependencies:[N,K,Y],encapsulation:2})}return t})();function je(t,d){if(t&1&&x(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=k();a(0,"app-s-modal",2),f("closed",function(){C(e);let i=c();return v(i.handleModalClosed())}),_(1,je,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var en=(()=>{class t{instanceRegistry_DS=y(pe);runtimeInstances_DS=y(fe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=h(()=>Se.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=h(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=h(()=>this.selectedRow_$()!==null);modalTitle_$=h(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",i=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${i.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[w],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,i){n&1&&(a(0,"app-s-instance-selector",0),f("infoRequested",function(m){return i.handleInfoRequested(m)}),o(),_(1,Be,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",i.presenceMap)("activeSessionMap",i.activeSessionMap),r(),u(i.isModalOpen_$()?1:-1))},dependencies:[N,Ee,ce,we],encapsulation:2})}return t})();var G=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return h(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var P=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(P||{});var ke=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),S(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){t&1&&(E(),a(0,"svg",15),x(1,"path",22),o())}function Je(t,d){t&1&&(E(),a(0,"svg",15),x(1,"rect",23)(2,"rect",24),o())}function Qe(t,d){t&1&&(a(0,"span",18),s(1," \u23F8 paused "),o())}function qe(t,d){if(t&1&&(a(0,"span",20),s(1),z(2,"date"),o()),t&2){let e=c().$implicit;r(),S(" ",B(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ye(t,d){t&1&&(a(0,"span",21),s(1,"\u2014"),o())}function We(t,d){if(t&1&&(a(0,"span",27),s(1),o()),t&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),S(" ",n.getExecutionBadgeLabel(e.status)," ")}}function Ue(t,d){if(t&1&&(a(0,"div",25)(1,"span",26),s(2,"Trigger-ek:"),o(),F(3,We,2,3,"span",27,ke),o()),t&2){let e=c();r(3),V(e)}}function Xe(t,d){t&1&&_(0,Ue,5,0,"div",25),t&2&&u(d.length>0?0:-1)}function Ze(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),z(7,"schSchedulePresetLabel"),o()(),a(8,"div",13)(9,"button",14),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTogglePaused(i))}),_(10,He,2,0,":svg:svg",15)(11,Je,3,0,":svg:svg",15),o(),a(12,"button",16),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTriggerNow(i))}),E(),a(13,"svg",15),x(14,"path",17),o()()()(),_(15,Qe,2,0,"span",18),Q(),a(16,"div",19)(17,"span"),s(18,"K\xF6vetkez\u0151:"),o(),_(19,qe,3,4,"span",20)(20,Ye,2,0,"span",21),o(),_(21,Xe,1,1),o()}if(t&2){let e,n,i,l,m,T,j,g=d.$implicit,D=c(2);r(3),p("title",(e=g.name)!==null&&e!==void 0?e:""),r(),S(" ",((n=g.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),S(" ",ie(7,28,g.schedule)," "),r(3),M("border-neonCyan",g.paused)("text-neonCyan",g.paused)("hover:bg-neonCyan",g.paused)("hover:bg-opacity-10",g.paused)("border-neutral-500",!g.paused)("text-neutral-400",!g.paused)("hover:border-neutral-300",!g.paused)("hover:text-neutral-200",!g.paused),p("disabled",D.busyJobIds_$().has((i=g._id)!==null&&i!==void 0?i:""))("title",D.busyJobIds_$().has((l=g._id)!==null&&l!==void 0?l:"")?"Folyamatban\u2026":g.paused?"Folytat\xE1s (Resume)":"Sz\xFCneteltet\xE9s (Pause)"),R("aria-label",g.paused?"Resume schedule":"Pause schedule"),r(),u(g.paused?10:11),r(2),p("disabled",D.busyJobIds_$().has((m=g._id)!==null&&m!==void 0?m:""))("title",D.busyJobIds_$().has((T=g._id)!==null&&T!==void 0?T:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(3),u(g.paused?15:-1),r(4),u(g.nextDueAt?19:20),r(2),u((j=D.getRecentExecutions(g))?21:-1,j)}}function et(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),F(6,Ze,22,30,"div",9,ke),o()}if(t&2){let e=c();r(3),S(" Schedule (",e.sessionJobs_$().length,") "),r(3),V(e.sessionJobs_$())}}var _n=(()=>{class t{sessionId=A.required();scheduledJobs_DS=y(ge);overlayCoordinator_CS=y(G);OVERLAY_ID=P.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=h(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(i=>i.enabled===!1?!1:(i.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=h(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(i=>{let l=new Set(i);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(i=>{let l=new Set(i);return l.delete(n),l})}}})}handleTogglePaused(e){return H(this,null,function*(){let n=(e._id??"").trim();if(!n||this.busyJobIds_$().has(n))return;let i=!e.paused;this.busyJobIds_$.update(l=>{let m=new Set(l);return m.add(n),m});try{yield this.scheduledJobs_DS.togglePaused(n,i)}finally{this.busyJobIds_$.update(l=>{let m=new Set(l);return m.delete(n),m})}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
1
+ import{a as he}from"./chunk-G5RVYENP.js";import{a as ge,b as Ce}from"./chunk-Y5NZKXVF.js";import{a as me,b as _e}from"./chunk-L7MQFYDG.js";import{a as Se,b as Y}from"./chunk-L44637OO.js";import{a as ue}from"./chunk-ACYOZ4MP.js";import{b as pe}from"./chunk-SY2IF3DK.js";import{d as fe}from"./chunk-SOCHCXP2.js";import{d as U,h as xe}from"./chunk-7AJI4JCW.js";import{a as ce}from"./chunk-FLAJXIYW.js";import{f as oe,i as ae,n as re,o as se,p as le,v as de}from"./chunk-EO4DNTT4.js";import{p as Te}from"./chunk-ANMHMGCN.js";import{$a as z,C as y,D as b,Fa as s,Ga as I,Ha as S,Ia as te,J as C,K as v,L as E,M as Q,Q as Z,T as q,Ta as w,U as A,Ua as O,Va as ne,Z as r,aa as $,ab as ie,bb as B,da as _,fa as R,ga as p,h as $e,hb as h,ia as M,k as H,la as u,mb as K,na as ee,oa as F,pa as V,pb as J,qa as a,ra as o,sa as x,ua as k,ub as N,va as f,wa as c,y as X}from"./chunk-TBMJSIBB.js";var ye=$e(Te());var W=(()=>{class t{static SESSION_LIMIT_TYPE="five_hour";static WEEKLY_LIMIT_TYPE="seven_day";static formatResetText(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=n.getTime()-i.getTime();if(l<=0)return"expired";let m=Math.floor(l/6e4),T=Math.floor(m/60),j=m%60;return T>0?`${T}h ${j}m`:`${j}m`}static formatResetTextPrecise(e){if(!e?.resetsAt)return"";let n=new Date(e.resetsAt*1e3),i=new Date,l=Math.floor((n.getTime()-i.getTime())/1e3);if(l<=0)return"expired";let m=Math.floor(l/86400),T=Math.floor(l%86400/3600),j=Math.floor(l%3600/60),g=l%60,D=[];return m&&D.push(`${m}d`),(m||T)&&D.push(`${T}h`),(m||T||j)&&D.push(`${j}m`),D.push(`${g}s`),D.join(" ")}static computeUtilizationPercent(e){if(!e)return 0;let n=typeof e.utilization=="number"?e.utilization:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static computeThresholdPercent(e){if(!e)return 0;let n=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:0,i=Math.max(0,Math.min(1,n));return Math.round(i*100)}static isOverThreshold(e){if(!e)return!1;let n=typeof e.utilization=="number"?e.utilization:0,i=typeof e.surpassedThreshold=="number"?e.surpassedThreshold:1;return n>=i&&i>0}static formatLimitScopeLabel(e){return e?.rateLimitType?e.rateLimitType===t.SESSION_LIMIT_TYPE?"Session":e.rateLimitType===t.WEEKLY_LIMIT_TYPE?"Weekly":e.rateLimitType:""}}return t})();function Me(t,d){if(t&1&&(a(0,"div",0)(1,"span",1),s(2," Rate limit "),o(),a(3,"span",2),s(4,"Scope"),o(),a(5,"span",3),s(6),o(),a(7,"span",2),s(8,"St\xE1tusz"),o(),a(9,"span",3),s(10),o(),a(11,"span",2),s(12,"Utilization"),o(),a(13,"span",4),s(14),o(),a(15,"span",2),s(16,"Reset"),o(),a(17,"span",4),s(18),o(),a(19,"span",2),s(20,"Utols\xF3 \xE9szlel\xE9s"),o(),a(21,"span",5),s(22),z(23,"date"),o()()),t&2){let e=d,n=c();r(6),I(n.limitScopeLabel_$()||"\u2014"),r(3),M("text-neonRed",e.status==="limited")("text-yellow-400",e.status==="allowed_warning")("text-neutral-300",e.status==="allowed"),r(),S(" ",e.status||"\u2014"," "),r(4),S("",n.utilizationPercent_$(),"%"),r(4),I(n.resetText_$()||"\u2014"),r(4),S(" ",B(23,11,e.receivedAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," ")}}var be=(()=>{class t{claudeCode_AS=y(me);_ccapId="";set ccapId(e){this._ccapId=e?.trim()??"",this.refreshRateLimitState()}get ccapId(){return this._ccapId}rateLimitInfo_$=$(null);utilizationPercent_$=h(()=>W.computeUtilizationPercent(this.rateLimitInfo_$()));resetText_$=h(()=>W.formatResetText(this.rateLimitInfo_$()));limitScopeLabel_$=h(()=>W.formatLimitScopeLabel(this.rateLimitInfo_$()));refreshRateLimitState(){if(!this._ccapId){this.rateLimitInfo_$.set(null);return}this.claudeCode_AS.getRateLimitState({ccapId:this._ccapId}).then(e=>{let n=_e.mapServerItemsToClientInfo(e.items);this.rateLimitInfo_$.set(n)}).catch(e=>{ye.DyFM_Log.warn(`s-cc-rate-limit-info | rate-limit fetch failed | ccapId: ${this._ccapId} | err: ${String(e)}`),this.rateLimitInfo_$.set(null)})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-cc-rate-limit-info"]],inputs:{ccapId:"ccapId"},standalone:!0,features:[w],decls:1,vars:1,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"col-span-2","text-[11px]","uppercase","tracking-wider","text-neutral-500"],[1,"text-neutral-500","shrink-0"],[1,"whitespace-nowrap"],[1,"whitespace-nowrap","font-mono"],[1,"font-mono","text-[11px]","whitespace-nowrap"]],template:function(n,i){if(n&1&&_(0,Me,24,14,"div",0),n&2){let l;u((l=i.rateLimitInfo_$())?0:-1,l)}},dependencies:[N,J],encapsulation:2})}return t})();function Oe(t,d){if(t&1&&(a(0,"span",1),s(1,"Instance presence"),o(),a(2,"span",4),x(3,"app-s-instance-presence-badge",8),o()),t&2){let e=d;r(3),p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)}}function De(t,d){if(t&1&&(a(0,"span",9),s(1,"Run / tev\xE9kenys\xE9g"),o(),a(2,"span",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),o()(),a(7,"span",1),s(8,"Utols\xF3 aktivit\xE1s"),o(),a(9,"span",13),s(10),z(11,"date"),o(),a(12,"span",1),s(13,"Utols\xF3 \xFCzenet"),o(),a(14,"span",14),s(15),o()),t&2){let e=d;r(4),I(e.activeRunPhase||"\u2014"),r(2),I(e.activitySummary||"\u2014"),r(4),S(" ",B(11,4,e.lastActivityAt,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),I(e.lastMessage||"\u2014")}}var we=(()=>{class t{row;presence=void 0;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-detail-view"]],inputs:{row:"row",presence:"presence"},standalone:!0,features:[w],decls:43,vars:18,consts:[[1,"grid","grid-cols-[minmax(8rem,auto)_1fr]","gap-x-3","gap-y-2","text-xs","text-neutral-200"],[1,"text-neutral-500","shrink-0"],[1,"font-mono","break-all"],[1,"break-all"],[1,"whitespace-nowrap"],[1,"font-mono","whitespace-nowrap"],[1,"mt-2","pt-2","border-t","border-neutral-800"],[3,"ccapId"],[3,"presence","lastHeartbeatAt","wsConnected"],[1,"text-neutral-500","shrink-0","self-start","pt-0.5"],[1,"break-words"],[1,"font-mono","text-[11px]","text-neutral-400","block"],[1,"text-neutral-300"],[1,"font-mono","text-[11px]","whitespace-nowrap"],[1,"break-words","text-neutral-300"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"span",1),s(2,"instanceKey"),o(),a(3,"span",2),s(4),o(),a(5,"span",1),s(6,"N\xE9v"),o(),a(7,"span",3),s(8),o(),a(9,"span",1),s(10,"St\xE1tusz"),o(),a(11,"span",4),s(12),o(),_(13,Oe,4,3),a(14,"span",1),s(15,"Session presence"),o(),a(16,"span",4),s(17),o(),_(18,De,16,7),a(19,"span",1),s(20,"MAC"),o(),a(21,"span",2),s(22),o(),a(23,"span",1),s(24,"Install path"),o(),a(25,"span",2),s(26),o(),a(27,"span",1),s(28,"hostName"),o(),a(29,"span",3),s(30),o(),a(31,"span",1),s(32,"registry __created"),o(),a(33,"span",5),s(34),z(35,"date"),o(),a(36,"span",1),s(37,"registry __updated"),o(),a(38,"span",5),s(39),z(40,"date"),o()(),a(41,"div",6),x(42,"app-s-cc-rate-limit-info",7),o()),n&2){let l,m;r(4),I(i.row.registry.instanceKey||"\u2014"),r(4),I((i.row.instanceData==null||i.row.instanceData.name==null?null:i.row.instanceData.name.trim())||"\u2014"),r(4),I((i.row.instanceData==null?null:i.row.instanceData.status)||"\u2014"),r(),u((l=i.presence)?13:-1,l),r(4),S(" ",(i.row.instanceData==null||i.row.instanceData.sessionStatuses==null||i.row.instanceData.sessionStatuses[0]==null?null:i.row.instanceData.sessionStatuses[0].presence)||"\u2014"," "),r(),u((m=i.row.instanceData==null||i.row.instanceData.sessionStatuses==null?null:i.row.instanceData.sessionStatuses[0])?18:-1,m),r(4),I(i.row.registry.primaryMacAddress||"\u2014"),r(4),I(i.row.registry.installLocationPath||"\u2014"),r(4),I(i.row.registry.hostName||"\u2014"),r(4),S(" ",B(35,12,i.row.registry.__created,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(5),S(" ",B(40,15,i.row.registry.__updated,"yyyy-MM-dd HH:mm:ss")||"\u2014"," "),r(3),p("ccapId",i.row.registry.instanceKey||"")}},dependencies:[N,J,be,Y],encapsulation:2})}return t})();var Ae=(t,d)=>d.instanceKey,Re=t=>({"bg-ccapAccent/10":t});function Fe(t,d){if(t&1&&x(0,"app-s-instance-presence-badge",5),t&2){let e=d;p("presence",e.presence)("lastHeartbeatAt",e.lastHeartbeatAt)("wsConnected",e.wsConnected)("showLabel",!1)}}function Ve(t,d){t&1&&(a(0,"span",6),s(1,"(local)"),o())}function ze(t,d){t&1&&x(0,"span",7)}function Le(t,d){if(t&1){let e=k();a(0,"div",2)(1,"button",4),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleSelectInstance((i=l.instanceKey)!==null&&i!==void 0?i:""))}),_(2,Fe,1,4,"app-s-instance-presence-badge",5),s(3),_(4,Ve,2,0,"span",6)(5,ze,1,0,"span",7),o(),a(6,"button",8),f("click",function(){let i,l=C(e).$implicit,m=c();return v(m.handleInfoClick((i=l.instanceKey)!==null&&i!==void 0?i:""))}),s(7," i "),o()()}if(t&2){let e,n=d.$implicit,i=c();r(),M("border-ccapAccent",i.isSelected(n))("text-ccapAccent",i.isSelected(n))("border-neonDefault",!i.isSelected(n))("text-neutral-400",!i.isSelected(n))("hover:text-neutral-200",!i.isSelected(n))("hover:border-neutral-500",!i.isSelected(n)),p("ngClass",ne(17,Re,i.isSelected(n))),r(),u((e=i.getPresenceForRow(n))?2:-1,e),r(),S(" ",i.getDisplayLabel(n)," "),r(),u(i.isLocal(n)?4:-1),r(),u(i.getActiveSessionForRow(n)?5:-1)}}function Pe(t,d){t&1&&(a(0,"span",3),s(1,"loading..."),o())}var Ee=(()=>{class t{peiContext_DS=y(ue);presenceMap=new Map;activeSessionMap=new Map;infoRequested=new Z;instances_$=h(()=>this.peiContext_DS.instanceList_$());selectedCcapId_$=h(()=>this.peiContext_DS.activeCcapId_$());localKey_$=h(()=>this.peiContext_DS.localInstanceKey_$());ngOnInit(){this.peiContext_DS.initialize()}handleSelectInstance(e){this.peiContext_DS.selectInstance(e)}handleInfoClick(e){this.infoRequested.emit({instanceKey:e})}getDisplayLabel(e){let n=e.hostName??"",i=(e.instanceKey??"").slice(-6);return n?`${n} (${i})`:i||"?"}isSelected(e){return(e.instanceKey??"")===this.selectedCcapId_$()}isLocal(e){return(e.instanceKey??"")===this.localKey_$()}getPresenceForRow(e){let n=e.instanceKey??"";return n?this.presenceMap.get(n)??null:null}getActiveSessionForRow(e){let n=e.instanceKey??"";return n?this.activeSessionMap.get(n)===!0:!1}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-selector"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},outputs:{infoRequested:"infoRequested"},standalone:!0,features:[w],decls:6,vars:1,consts:[[1,"flex","gap-1","flex-wrap","items-center"],[1,"text-[10px]","text-neutral-500","mr-1","uppercase","tracking-wider"],[1,"flex","items-center","gap-0.5","group"],[1,"text-[10px]","text-neutral-600","italic"],[1,"px-2","py-0.5","text-[11px]","rounded-full","border","transition-colors","flex","items-center","gap-1",3,"click","ngClass"],[3,"presence","lastHeartbeatAt","wsConnected","showLabel"],[1,"ml-0.5","text-[9px]","text-neutral-500"],["title","Akt\xEDv session fut ezen az instance-en","aria-label","Akt\xEDv session fut ezen az instance-en","data-testid","s-instance-active-session-dot",1,"inline-block","w-1.5","h-1.5","rounded-full","bg-yellow-400","animate-pulse","shrink-0"],["type","button","title","Instance details","aria-label","Show instance details","data-testid","s-instance-selector-info-btn",1,"text-[11px]","leading-none","w-4","h-4","rounded-full","border","border-neutral-700","text-neutral-500","hover:text-ccapAccent","hover:border-ccapAccent","transition-colors","flex","items-center","justify-center",3,"click"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"span",1),s(2,"Instance:"),o(),F(3,Le,8,19,"div",2,Ae),_(5,Pe,2,0,"span",3),o()),n&2&&(r(3),V(i.instances_$()),r(2),u(i.instances_$().length?-1:5))},dependencies:[N,K,Y],encapsulation:2})}return t})();function je(t,d){if(t&1&&x(0,"app-s-instance-detail-view",3),t&2){let e=c(2);p("row",d)("presence",e.getPresenceForSelectedRow())}}function Be(t,d){if(t&1){let e=k();a(0,"app-s-modal",2),f("closed",function(){C(e);let i=c();return v(i.handleModalClosed())}),_(1,je,1,2,"app-s-instance-detail-view",3),o()}if(t&2){let e,n=c();p("isOpen",!0)("title",n.modalTitle_$())("maxWidth","lg"),r(),u((e=n.selectedRow_$())?1:-1,e)}}var en=(()=>{class t{instanceRegistry_DS=y(pe);runtimeInstances_DS=y(fe);presenceMap=new Map;activeSessionMap=new Map;selectedInstanceKey_$=$(null);viewRows_$=h(()=>Se.buildViewRows(this.instanceRegistry_DS.list_$(),this.runtimeInstances_DS.ccapInstanceList_$()));selectedRow_$=h(()=>{let e=this.selectedInstanceKey_$();return e?this.viewRows_$().find(n=>(n.registry.instanceKey??"")===e)??null:null});isModalOpen_$=h(()=>this.selectedRow_$()!==null);modalTitle_$=h(()=>{let e=this.selectedRow_$();if(!e)return"";let n=e.registry.hostName??"",i=e.registry.instanceKey??"";return n?`Instance \u2014 ${n}`:`Instance \u2014 ${i.slice(-6)||"?"}`});handleInfoRequested(e){this.selectedInstanceKey_$.set(e.instanceKey)}getPresenceForSelectedRow(){let e=this.selectedRow_$();if(!e)return;let n=e.registry.instanceKey??"";if(n)return this.presenceMap.get(n)}handleModalClosed(){this.selectedInstanceKey_$.set(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-instance-chip-row-with-info"]],hostAttrs:[1,"block"],inputs:{presenceMap:"presenceMap",activeSessionMap:"activeSessionMap"},standalone:!0,features:[w],decls:2,vars:3,consts:[[3,"infoRequested","presenceMap","activeSessionMap"],[3,"isOpen","title","maxWidth"],[3,"closed","isOpen","title","maxWidth"],[3,"row","presence"]],template:function(n,i){n&1&&(a(0,"app-s-instance-selector",0),f("infoRequested",function(m){return i.handleInfoRequested(m)}),o(),_(1,Be,2,4,"app-s-modal",1)),n&2&&(p("presenceMap",i.presenceMap)("activeSessionMap",i.activeSessionMap),r(),u(i.isModalOpen_$()?1:-1))},dependencies:[N,Ee,ce,we],encapsulation:2})}return t})();var G=(()=>{class t{currentlyOpenId_$=$(null);isOpen(e){return h(()=>this.currentlyOpenId_$()===e)}setOpen(e){this.currentlyOpenId_$.set(e)}toggle(e){this.currentlyOpenId_$()===e?this.currentlyOpenId_$.set(null):this.currentlyOpenId_$.set(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var P=function(t){return t.schedule="schedule",t.quickcast="quickcast",t.coordinator="coordinator",t.quickSettings="quick-settings",t}(P||{});var ke=(t,d)=>d._id,Ke=()=>["border-neonAmber/60","text-neonAmber","shadow-neon-glow-orange","hover:border-neonAmber","hover:bg-neonAmber/10"],Ne=()=>["border-neutral-700","text-neutral-600"];function Ge(t,d){if(t&1&&(a(0,"span",4),s(1),o()),t&2){let e=c();r(),S(" ",e.sessionJobs_$().length>9?"9+":e.sessionJobs_$().length," ")}}function He(t,d){t&1&&(E(),a(0,"svg",15),x(1,"path",22),o())}function Je(t,d){t&1&&(E(),a(0,"svg",15),x(1,"rect",23)(2,"rect",24),o())}function Qe(t,d){t&1&&(a(0,"span",18),s(1," \u23F8 paused "),o())}function qe(t,d){if(t&1&&(a(0,"span",20),s(1),z(2,"date"),o()),t&2){let e=c().$implicit;r(),S(" ",B(2,1,e.nextDueAt,"yyyy-MM-dd HH:mm")," ")}}function Ye(t,d){t&1&&(a(0,"span",21),s(1,"\u2014"),o())}function We(t,d){if(t&1&&(a(0,"span",27),s(1),o()),t&2){let e=d.$implicit,n=c(5);p("ngClass",n.getExecutionBadgeClass(e.status))("title",n.buildExecutionBadgeTooltip(e)),r(),S(" ",n.getExecutionBadgeLabel(e.status)," ")}}function Ue(t,d){if(t&1&&(a(0,"div",25)(1,"span",26),s(2,"Trigger-ek:"),o(),F(3,We,2,3,"span",27,ke),o()),t&2){let e=c();r(3),V(e)}}function Xe(t,d){t&1&&_(0,Ue,5,0,"div",25),t&2&&u(d.length>0?0:-1)}function Ze(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",6)(2,"div",10)(3,"span",11),s(4),o(),a(5,"span",12),s(6),z(7,"schSchedulePresetLabel"),o()(),a(8,"div",13)(9,"button",14),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTogglePaused(i))}),_(10,He,2,0,":svg:svg",15)(11,Je,3,0,":svg:svg",15),o(),a(12,"button",16),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleTriggerNow(i))}),E(),a(13,"svg",15),x(14,"path",17),o()()()(),_(15,Qe,2,0,"span",18),Q(),a(16,"div",19)(17,"span"),s(18,"K\xF6vetkez\u0151:"),o(),_(19,qe,3,4,"span",20)(20,Ye,2,0,"span",21),o(),_(21,Xe,1,1),o()}if(t&2){let e,n,i,l,m,T,j,g=d.$implicit,D=c(2);r(3),p("title",(e=g.name)!==null&&e!==void 0?e:""),r(),S(" ",((n=g.name)!==null&&n!==void 0?n:"").trim()||"Unnamed schedule"," "),r(2),S(" ",ie(7,28,g.schedule)," "),r(3),M("border-neonCyan",g.paused)("text-neonCyan",g.paused)("hover:bg-neonCyan",g.paused)("hover:bg-opacity-10",g.paused)("border-neutral-500",!g.paused)("text-neutral-400",!g.paused)("hover:border-neutral-300",!g.paused)("hover:text-neutral-200",!g.paused),p("disabled",D.busyJobIds_$().has((i=g._id)!==null&&i!==void 0?i:""))("title",D.busyJobIds_$().has((l=g._id)!==null&&l!==void 0?l:"")?"Folyamatban\u2026":g.paused?"Folytat\xE1s (Resume)":"Sz\xFCneteltet\xE9s (Pause)"),R("aria-label",g.paused?"Resume schedule":"Pause schedule"),r(),u(g.paused?10:11),r(2),p("disabled",D.busyJobIds_$().has((m=g._id)!==null&&m!==void 0?m:""))("title",D.busyJobIds_$().has((T=g._id)!==null&&T!==void 0?T:"")?"Ind\xEDt\xE1s folyamatban\u2026":"Most futtatni (Trigger Now)"),r(3),u(g.paused?15:-1),r(4),u(g.nextDueAt?19:20),r(2),u((j=D.getRecentExecutions(g))?21:-1,j)}}function et(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),F(6,Ze,22,30,"div",9,ke),o()}if(t&2){let e=c();r(3),S(" Schedule (",e.sessionJobs_$().length,") "),r(3),V(e.sessionJobs_$())}}var _n=(()=>{class t{sessionId=A.required();scheduledJobs_DS=y(ge);overlayCoordinator_CS=y(G);OVERLAY_ID=P.schedule;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);busyJobIds_$=$(new Set);sessionJobs_$=h(()=>{let e=(this.sessionId()??"").trim();return e?this.scheduledJobs_DS.jobs_$().filter(i=>i.enabled===!1?!1:(i.target?.payload?.sessionId??"").trim()===e):[]});hasSchedule_$=h(()=>this.sessionJobs_$().length>0);ngOnInit(){this.scheduledJobs_DS.jobs_$().length===0&&this.scheduledJobs_DS.loadAll()}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleTriggerNow(e){return H(this,null,function*(){let n=(e._id??"").trim();if(n&&!this.busyJobIds_$().has(n)){this.busyJobIds_$.update(i=>{let l=new Set(i);return l.add(n),l});try{yield this.scheduledJobs_DS.triggerNow({jobId:n,reason:"session-overlay-manual"})}finally{this.busyJobIds_$.update(i=>{let l=new Set(i);return l.delete(n),l})}}})}handleTogglePaused(e){return H(this,null,function*(){let n=(e._id??"").trim();if(!n||this.busyJobIds_$().has(n))return;let i=!e.paused;this.busyJobIds_$.update(l=>{let m=new Set(l);return m.add(n),m});try{yield this.scheduledJobs_DS.togglePaused(n,i)}finally{this.busyJobIds_$.update(l=>{let m=new Set(l);return m.delete(n),m})}})}getRecentExecutions(e){let n=e._id??"";return n?this.scheduledJobs_DS.recentExecutions_$().get(n)??[]:[]}getExecutionBadgeClass(e){switch(e){case"triggered":return"bg-emerald-500/20 text-emerald-400";case"completed":return"bg-sky-500/20 text-sky-400";case"skipped":return"bg-neutral-600/30 text-neutral-400";case"failed":return"bg-red-500/20 text-red-400";case"cancelled":return"bg-amber-500/20 text-amber-400";case"dry-run":return"bg-purple-500/20 text-purple-400";default:return"bg-neutral-700/40 text-neutral-500"}}getExecutionBadgeLabel(e){switch(e){case"triggered":return"OK";case"completed":return"Done";case"skipped":return"Skip";case"failed":return"Fail";case"cancelled":return"Cancel";case"dry-run":return"Dry";default:return"?"}}buildExecutionBadgeTooltip(e){let n=[];return e.scheduledAt&&(n.push(new Date(e.scheduledAt).toISOString().slice(0,16).replace("T"," ")),n.push(" \u2014 ")),n.push(e.status??"?"),e.skipReason&&n.push(` (${e.skipReason})`),e.status==="failed"&&e.errorDetails?.message&&n.push(`: ${e.errorDetails.message}`),n.join("")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-schedule-overlay"]],hostAttrs:[1,"absolute","bottom-4","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:12,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Schedule",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out","disabled:cursor-not-allowed",3,"click","disabled","title","ngClass"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d",`M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5
2
2
  a2 2 0 00-2 2v12a2 2 0 002 2z`],["aria-hidden","true",1,"absolute","-top-1","-right-1","min-w-[14px]","h-[14px]","px-[2px]","bg-neonCyan","text-neutral-900","rounded-full","text-[9px]","font-mono","font-bold","leading-[14px]","text-center","shadow-neon-glow-cyan"],[1,"bg-neutral-900","border-2","border-neonAmber/60","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs","shadow-neon-glow-orange"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","text-neonAmber","font-mono"],["type","button","title","Bez\xE1r\xE1s","aria-label","Schedule panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonAmber","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","border-t","border-neutral-800","pt-2","first:border-t-0","first:pt-0"],[1,"flex","flex-col","min-w-0"],[1,"text-sm","text-neutral-100","truncate",3,"title"],[1,"text-[10px]","text-neutral-500","font-mono"],[1,"flex","items-center","gap-1.5","shrink-0"],["type","button",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","transition-all","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled","title"],["fill","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3.5","h-3.5"],["type","button","aria-label","Trigger now",1,"flex","items-center","justify-center","w-7","h-7","rounded-full","bg-neutral-900","border-2","border-neonAmber/60","text-neonAmber","hover:border-neonAmber","hover:bg-neonAmber/10","hover:shadow-neon-glow-orange","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled","title"],["d","M8 5v14l11-7z"],[1,"inline-flex","items-center","gap-1","self-start","text-[9px]","uppercase","tracking-wider","px-1.5","py-0.5","rounded","border","border-neonCyan/50","bg-neonCyan/10","text-neonCyan","font-mono"],["title","K\xF6vetkez\u0151 \xFCtemezett fut\xE1s id\u0151pontja",1,"text-[10px]","text-neutral-500","flex","items-center","gap-1"],[1,"text-emerald-400","font-medium"],[1,"text-neutral-300"],["d","M5 5v14h2V5H5zm5 0v14l11-7z"],["x","6","y","5","width","4","height","14"],["x","14","y","5","width","4","height","14"],[1,"flex","items-center","gap-1","flex-wrap"],[1,"text-[10px]","text-neutral-500"],[1,"inline-flex","items-center","px-1.5","py-0.5","text-[10px]","rounded",3,"ngClass","title"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"path",3),o(),_(4,Ge,2,1,"span",4),o(),_(5,et,8,1,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("disabled",!i.hasSchedule_$())("title",i.hasSchedule_$()?i.isOpen_$()?"Schedule panel bez\xE1r\xE1sa":"Schedule megjelen\xEDt\xE9se ("+i.sessionJobs_$().length+" job)":"Nincs schedule ehhez a sessionh\xF6z")("ngClass",i.hasSchedule_$()?O(10,Ke):O(11,Ne)),R("aria-expanded",i.isOpen_$()),r(3),u(i.hasSchedule_$()&&i.sessionJobs_$().length>1?4:-1),r(),u(i.isOpen_$()?5:-1))},dependencies:[K,J,Ce],encapsulation:2})}return t})();function tt(t,d){if(t&1){let e=k();a(0,"button",10),f("click",function(){let i=C(e).$implicit,l=c(2);return v(l.handleAction(i))}),s(1),o()}if(t&2){let e=d.$implicit,n=c(2);p("disabled",n.pendingAction_$()===e),r(),S(" ",n.pendingAction_$()===e?"Sending\u2026":e," ")}}function nt(t,d){if(t&1){let e=k();a(0,"div",4)(1,"div",5)(2,"span",6),s(3," QuickCast "),o(),a(4,"button",7),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"div",8),F(7,tt,2,2,"button",9,ee),o()()}if(t&2){let e=c();r(7),V(e.actions())}}var vn=(()=>{class t{actions=A(["Go","Continue","OK","Proceed","implement","Review Very Very Carefully","Ensure Documentations","tervezd meg nagyon alaposan \xE9s fejleszd le","Hogy \xE1llunk most?","itt vagy?"]);actionSelected=q();overlayCoordinator_CS=y(G);OVERLAY_ID=P.quickcast;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);pendingAction_$=$(null);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAction(e){this.pendingAction_$()===null&&(this.pendingAction_$.set(e),this.actionSelected.emit(e),setTimeout(()=>{this.pendingAction_$()===e&&this.pendingAction_$.set(null)},800))}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-quickcast-overlay"]],hostAttrs:[1,"absolute","bottom-16","left-0","z-30","pointer-events-none"],inputs:{actions:[1,"actions"]},outputs:{actionSelected:"actionSelected"},standalone:!0,features:[w],decls:5,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","QuickCast",1,"flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonCyan/60","rounded-r-lg","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10","transition-all","duration-200","ease-out",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 10V3L4 14h7v7l9-11h-7z"],[1,"bg-neutral-900","border-2","border-neonCyan/60","rounded-md","p-1.5","flex","flex-col","gap-1","min-w-[8rem]","max-w-[13rem]","shadow-neon-glow-cyan"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wider","text-neonCyan","font-mono","leading-none"],["type","button","title","Bez\xE1r\xE1s","aria-label","QuickCast panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonCyan","leading-none","text-xs","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"disabled"],["type","button",1,"px-1.5","py-0.5","rounded","border-2","border-neonCyan/60","text-neonCyan","text-[11px]","font-medium","hover:border-neonCyan","hover:bg-neonCyan/10","hover:shadow-neon-glow-cyan","disabled:opacity-40","disabled:cursor-not-allowed","transition-all","leading-tight",3,"click","disabled"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"path",3),o()(),_(4,nt,9,0,"div",4),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isOpen_$()?"QuickCast bez\xE1r\xE1sa":"QuickCast megnyit\xE1sa"),R("aria-expanded",i.isOpen_$()),r(3),u(i.isOpen_$()?4:-1))},encapsulation:2})}return t})();var it=(t,d)=>d.provider+":::"+d.modelName,ot=()=>["border-neonPurple/60","text-neonPurple","shadow-[0_0_10px_rgba(168,85,247,0.4)]","hover:border-neonPurple","hover:bg-neonPurple/10"],at=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:bg-neutral-800/50"],rt=()=>["border-neonPurple/60","shadow-[0_0_10px_rgba(168,85,247,0.4)]"],st=()=>["border-neutral-700"],lt=()=>["text-neonPurple"],dt=()=>["text-neutral-400"];function ct(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"provider"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.providerName),r(),S(" ",e.providerName," ")}}function pt(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"model"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.model),r(),I(e.model)}}function ut(t,d){if(t&1&&(a(0,"div",10)(1,"span",11),s(2,"workflow"),o(),a(3,"span",14),s(4),o()()),t&2){let e=c();r(3),p("title",e.workflowId),r(),S(" ",e.workflowId," ")}}function mt(t,d){if(t&1){let e=k();a(0,"div",9)(1,"div",10)(2,"span",11),s(3,"status"),o(),a(4,"span",12),s(5),o()(),_(6,ct,5,2,"div",10)(7,pt,5,2,"div",10)(8,ut,5,2,"div",10),o(),a(9,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleStop())}),s(10),o()}if(t&2){let e=d,n=c(2);r(5),I(e.status),r(),u(e.providerName?6:-1),r(),u(e.model?7:-1),r(),u(e.workflowId?8:-1),r(),p("disabled",n.isBusy_$()),r(),S(" ",n.isBusy_$()?"Stopping\u2026":"Stop"," ")}}function _t(t,d){if(t&1&&(a(0,"option",18),s(1),o()),t&2){let e=d.$implicit;p("value",e.provider+":::"+e.modelName),r(),te(" ",e.provider," / ",e.modelName," ")}}function ft(t,d){if(t&1){let e=k();a(0,"span",15),s(1," Nincs assigned coordinator \u2014 v\xE1lassz modellt \xE9s kattints az Assign-ra. "),o(),a(2,"select",16),f("ngModelChange",function(i){C(e);let l=c(2);return v(l.selectedModelKey_$.set(i))}),a(3,"option",17),s(4,"\u2014 v\xE1lassz modellt \u2014"),o(),F(5,_t,2,3,"option",18,it),o(),a(7,"button",13),f("click",function(){C(e);let i=c(2);return v(i.handleAssign())}),s(8),o()}if(t&2){let e=c(2);r(2),p("ngModel",e.selectedModelKey_$()),r(3),V(e.modelOptions_$()),r(2),p("disabled",!e.selectedModelKey_$()||e.isBusy_$()),r(),S(" ",e.isBusy_$()?"Assigning\u2026":"Assign"," ")}}function xt(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Coordinator "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),_(6,mt,11,6)(7,ft,9,3),o()}if(t&2){let e,n=c();p("ngClass",n.isAssigned_$()?O(3,rt):O(4,st)),r(2),p("ngClass",n.isAssigned_$()?O(5,lt):O(6,dt)),r(4),u((e=n.assignedCoordinator_$())?6:7,e)}}var Dn=(()=>{class t{sessionId=A.required();coordinator_DS=y(he);registrySsot_CS=y(xe);overlayCoordinator_CS=y(G);OVERLAY_ID=P.coordinator;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);isBusy_$=$(!1);selectedModelKey_$=$("");modelOptions_$=h(()=>this.registrySsot_CS.enabledLlmModels_$());assignedCoordinator_$=h(()=>{let e=(this.sessionId()??"").trim();return!e||!this.coordinator_DS.coordinatedSessionIds_$().has(e)?null:this.coordinator_DS.globalCoordinatorsList_$().find(l=>{let m=(l.sessionId??"").trim(),T=(l.status??"").trim().toLowerCase();return m===e&&T!=="stopped"&&T!=="completed"})??null});isAssigned_$=h(()=>this.assignedCoordinator_$()!==null);ngOnInit(){this.coordinator_DS.globalCoordinatorsList_$().length===0&&this.coordinator_DS.loadAllCoordinatorsForManagementPage(),this.registrySsot_CS.ensureLoaded("llm")}handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleAssign(){return H(this,null,function*(){let e=(this.sessionId()??"").trim(),n=this.selectedModelKey_$().trim();if(!e||!n||this.isBusy_$())return;let i=n.split(":::");if(i.length!==2)return;let l=i[0],m=i[1];if(!(!l||!m)){this.isBusy_$.set(!0);try{yield this.coordinator_DS.startCoordinator({sessionId:e,providerName:l,model:m}),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}handleStop(){return H(this,null,function*(){let e=(this.sessionId()??"").trim();if(!(!e||this.isBusy_$())){this.isBusy_$.set(!0);try{yield this.coordinator_DS.stopCoordinator(e),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}finally{this.isBusy_$.set(!1)}}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-coordinator-overlay"]],hostAttrs:[1,"absolute","bottom-28","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:6,vars:10,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Coordinator",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","rounded-r-lg","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","10"],["points","16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"],[1,"bg-neutral-900","border-2","rounded-lg","p-3","flex","flex-col","gap-2","min-w-[16rem]","max-w-xs",3,"ngClass"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-[10px]","uppercase","tracking-wider","font-mono",3,"ngClass"],["type","button","title","Bez\xE1r\xE1s","aria-label","Coordinator panel bez\xE1r\xE1sa",1,"text-neutral-400","hover:text-neonPurple","leading-none","px-1","transition-colors",3,"click"],[1,"flex","flex-col","gap-1","text-xs"],[1,"flex","justify-between","gap-2"],[1,"text-neutral-500","font-mono","text-[10px]"],[1,"text-neutral-100"],["type","button",1,"self-end","px-2","py-1","rounded","border-2","border-neonPurple/60","text-neonPurple","text-xs","font-medium","hover:bg-neonPurple/10","hover:shadow-[0_0_10px_rgba(168,85,247,0.4)]","disabled:opacity-40","disabled:cursor-not-allowed","transition-all",3,"click","disabled"],[1,"text-neutral-100","truncate",3,"title"],[1,"text-[11px]","text-neutral-400"],[1,"bg-neutral-900","border","border-neutral-700","rounded","px-2","py-1","text-xs","text-neutral-100","focus:outline-none","focus:border-neonPurple/60",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"]],template:function(n,i){if(n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"circle",3)(4,"polygon",4),o()(),_(5,xt,8,7,"div",5),o()),n&2){let l;r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isAssigned_$()?i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Coordinator: "+((l=(l=i.assignedCoordinator_$())==null?null:l.status)!==null&&l!==void 0?l:""):i.isOpen_$()?"Coordinator panel bez\xE1r\xE1sa":"Nincs coordinator \u2014 assign-ol\xE1shoz kattints")("ngClass",i.isAssigned_$()?O(8,ot):O(9,at)),R("aria-expanded",i.isOpen_$()),r(4),u(i.isOpen_$()?5:-1)}},dependencies:[K,de,se,le,re,oe,ae],encapsulation:2})}return t})();var St=()=>["border-neonCyan/60","text-neonCyan","shadow-neon-glow-cyan","hover:border-neonCyan","hover:bg-neonCyan/10"],gt=()=>["border-neutral-700","text-neutral-500","hover:border-neutral-500","hover:text-neutral-300"];function ht(t,d){t&1&&(E(),a(0,"svg",1),x(1,"polygon",2)(2,"path",3)(3,"path",4),o())}function Ct(t,d){t&1&&(E(),a(0,"svg",1),x(1,"polygon",2)(2,"line",5)(3,"line",6),o())}var Ie=(()=>{class t{sessionId=A.required();isEnabled_$=$(!1);ngOnInit(){this.refreshEnabledFromStorage()}refreshEnabledFromStorage(){this.isEnabled_$.set(U.isEnabled(this.sessionId()))}handleToggle(){U.toggle(this.sessionId()),this.refreshEnabledFromStorage()}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-auto-read-tts-toggle"]],inputs:{sessionId:[1,"sessionId"]},standalone:!0,features:[w],decls:3,vars:6,consts:[["type","button",1,"relative","flex","items-center","justify-center","h-8","w-8","bg-neutral-900","border-2","rounded-md","transition-all","duration-200","ease-out",3,"click","title","ngClass"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"],["d","M15.54 8.46a5 5 0 0 1 0 7.07"],["d","M19.07 4.93a10 10 0 0 1 0 14.14"],["x1","23","y1","9","x2","17","y2","15"],["x1","17","y1","9","x2","23","y2","15"]],template:function(n,i){n&1&&(a(0,"button",0),f("click",function(){return i.handleToggle()}),_(1,ht,4,0,":svg:svg",1)(2,Ct,4,0,":svg:svg",1),o()),n&2&&(p("title",i.isEnabled_$()?"Auto-read assistant: ON (\xFAj asszisztens \xFCzenetek automatikusan felolvas\xE1sra ker\xFClnek). Klikk: kikapcsol\xE1s.":"Auto-read assistant: OFF. Klikk: bekapcsol\xE1s (csak az ezut\xE1n \xE9rkez\u0151 \xFCzenetek olvas\xF3dnak fel).")("ngClass",i.isEnabled_$()?O(4,St):O(5,gt)),R("aria-pressed",i.isEnabled_$()),r(),u(i.isEnabled_$()?1:2))},dependencies:[K],encapsulation:2})}return t})();function vt(t,d){if(t&1){let e=k();a(0,"button",26),f("click",function(){C(e);let i=c(2);return v(i.handleRestartRunnerClick())}),a(1,"span",13),E(),a(2,"svg",14),x(3,"path",27)(4,"path",28)(5,"path",29)(6,"path",30),o(),s(7," Restart Terminal Runner "),o()()}}function yt(t,d){if(t&1){let e=k();a(0,"div",5)(1,"div",6)(2,"span",7),s(3," Quick Settings "),o(),a(4,"button",8),f("click",function(){C(e);let i=c();return v(i.handleToggle())}),s(5," \xD7 "),o()(),a(6,"p",9),s(7," Plan-state v1 \u2014 minden funkci\xF3 "),a(8,"span",10),s(9,"disabled"),o(),s(10,"; bek\xF6t\xE9s Plans Feature Set keret\xE9ben k\xF6vetkezik (`2026-05-06-session-quick-settings-feature-set-plan.md`). "),o(),_(11,vt,8,0,"button",11),a(12,"div",12)(13,"span",13),E(),a(14,"svg",14),x(15,"path",15)(16,"path",16)(17,"path",17),o(),s(18," Auto-Read Assistant TTS "),o(),Q(),x(19,"app-s-auto-read-tts-toggle",18),o(),a(20,"button",19)(21,"span",13),E(),a(22,"svg",20),x(23,"rect",21)(24,"path",22)(25,"path",23)(26,"path",24),o(),s(27," Always-On Intelligent Voice Input "),o(),Q(),a(28,"span",25),s(29,"soon"),o()()()}if(t&2){let e=c();r(11),u(e.showRestartRunner()?11:-1),r(8),p("sessionId",e.sessionId())}}var Hn=(()=>{class t{sessionId=A.required();showRestartRunner=A(!1);restartRunnerClicked=q();overlayCoordinator_CS=y(G);OVERLAY_ID=P.quickSettings;isOpen_$=this.overlayCoordinator_CS.isOpen(this.OVERLAY_ID);handleToggle(){this.overlayCoordinator_CS.toggle(this.OVERLAY_ID)}handleRestartRunnerClick(){this.restartRunnerClicked.emit(),this.overlayCoordinator_CS.setOpen(null)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=b({type:t,selectors:[["app-s-session-quick-settings-overlay"]],hostAttrs:[1,"absolute","bottom-40","left-0","z-30","pointer-events-none"],inputs:{sessionId:[1,"sessionId"],showRestartRunner:[1,"showRestartRunner"]},outputs:{restartRunnerClicked:"restartRunnerClicked"},standalone:!0,features:[w],decls:6,vars:7,consts:[[1,"flex","items-end","gap-2","pointer-events-auto"],["type","button","aria-label","Session Quick Settings",1,"relative","flex","items-center","justify-center","h-8","w-7","bg-neutral-900","border-2","border-l-0","border-neonGreen/60","rounded-r-lg","text-neonGreen","shadow-[0_0_10px_rgba(0,255,136,0.35)]","hover:border-neonGreen","hover:bg-neonGreen/10","transition-all","duration-200","ease-out",3,"click","title"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4"],["cx","12","cy","12","r","3"],["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 0
3
3
  l-.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
4
4
  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.06
@@ -15,4 +15,4 @@ auto-send egyetlen \xFCzenetk\xE9nt, opcion\xE1lis chime hangjelz\xE9s a trigger
15
15
  Spec: __specifications/poc/voice-input-continuous-and-mobile.md (REQ-VIM-CONT-002,
16
16
  REQ-VIM-SEND-001). Hi\xE1nyz\xF3 r\xE9szek: per-segment \u2192 cycle-akkumul\xE1ci\xF3, silence-detect
17
17
  \u2192 auto-send, cseng\u0151 hang. Nagyobb implement\xE1ci\xF3s csomag \u2014 Plan dokumentum r\xE9szletez.`,1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neutral-700","text-neutral-500","text-xs","bg-neutral-900/50","cursor-not-allowed","transition-colors"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-4","h-4","shrink-0"],["x","9","y","3","width","6","height","12","rx","3"],["d","M19 11a7 7 0 0 1-14 0"],["d","M12 18v3"],["d","M8 21h8"],[1,"text-[9px]","uppercase","tracking-wider","text-neutral-600","font-mono"],["type","button","title","Aktu\xE1lis CC session terminal runner kill + respawn. \xDAj termin\xE1l ablak ny\xEDlik a friss npm-build-tel; runner version-mismatch vagy no-ACK-fire hib\xE1k gyors fixje a session-b\u0151l, dashboard-ra navig\xE1l\xE1s n\xE9lk\xFCl.",1,"flex","items-center","justify-between","gap-2","px-2","py-1.5","rounded","border-2","border-neonGreen/40","text-neutral-300","text-xs","bg-neutral-900/50","hover:bg-neonGreen/10","hover:border-neonGreen","cursor-pointer","transition-colors",3,"click"],["d","M3 12a9 9 0 0 1 15.5-6.3L21 8"],["d","M21 3v5h-5"],["d","M21 12a9 9 0 0 1-15.5 6.3L3 16"],["d","M3 21v-5h5"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"button",1),f("click",function(){return i.handleToggle()}),E(),a(2,"svg",2),x(3,"circle",3)(4,"path",4),o()(),_(5,yt,30,2,"div",5),o()),n&2&&(r(),M("-translate-x-2",!i.isOpen_$())("translate-x-2",i.isOpen_$()),p("title",i.isOpen_$()?"Session Quick Settings panel bez\xE1r\xE1sa":"Session Quick Settings \u2014 hamarosan: Restart Runner, Auto-Read TTS, Intelligent Voice Input. Plan dokumentum k\xE9szen, implement\xE1ci\xF3 folyamatban."),R("aria-expanded",i.isOpen_$()),r(4),u(i.isOpen_$()?5:-1))},dependencies:[Ie],encapsulation:2})}return t})();export{W as a,en as b,_n as c,vn as d,Dn as e,Hn as f};
18
- //# sourceMappingURL=chunk-DZS3G5LG.js.map
18
+ //# sourceMappingURL=chunk-KNNGJ7AJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-XIFGFVPM.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
- //# sourceMappingURL=chunk-EVCLCJFY.js.map
1
+ import{a as r}from"./chunk-M5JVIKJU.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
2
+ //# sourceMappingURL=chunk-KOY5WHLS.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-OYOA5O6J.js";import{I as m}from"./chunk-F5NOGK2B.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
- //# sourceMappingURL=chunk-NHNFHQQV.js.map
1
+ import{a as S}from"./chunk-ACYOZ4MP.js";import{I as m}from"./chunk-ANMHMGCN.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
2
+ //# sourceMappingURL=chunk-L7MQFYDG.js.map
@@ -1,2 +1,2 @@
1
- import{a as k}from"./chunk-H42VGD5M.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-F5NOGK2B.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var S=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let L=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=L.trim().length>0?L.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return e.overlapPrevMs!==void 0&&e.overlapPrevMs>0&&(r["X-Overlap-Prev-Ms"]=String(e.overlapPrevMs)),a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=S.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
- //# sourceMappingURL=chunk-65FNJEQY.js.map
1
+ import{a as k}from"./chunk-3B2KB7MF.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-ANMHMGCN.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var S=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let L=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=L.trim().length>0?L.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return e.overlapPrevMs!==void 0&&e.overlapPrevMs>0&&(r["X-Overlap-Prev-Ms"]=String(e.overlapPrevMs)),a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=S.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
2
+ //# sourceMappingURL=chunk-LOGCDPUJ.js.map
@@ -1,2 +1,2 @@
1
- import{p as h}from"./chunk-F5NOGK2B.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
2
- //# sourceMappingURL=chunk-XIFGFVPM.js.map
1
+ import{p as h}from"./chunk-ANMHMGCN.js";import{h as S}from"./chunk-TBMJSIBB.js";var c=S(h()),f=60,d=60*60,g=60*60*24,M=7,m=class{static formatRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=new Date,i=a.getTime()-n.getTime(),o=Math.floor(i/c.second);if(o<0)return"";if(o<f)return"just now";let e=Math.floor(o/f);if(e<60)return e===1?"1 minute ago":`${e} minutes ago`;let s=Math.floor(o/d);if(s<24)return s===1?"1 hour ago":`${s} hours ago`;let r=Math.floor(o/g);if(r<=M)return r===1?"1 day ago":`${r} days ago`;let u={month:"short",day:"numeric",year:n.getFullYear()!==a.getFullYear()?"numeric":void 0};return n.toLocaleDateString(void 0,u)}static formatCompactRelativeTime(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let i=Date.now()-n.getTime();if(i<0)return"just now";let o=Math.floor(i/c.second),e=Math.floor(o/f),s=Math.floor(o/d),r=Math.floor(o/g);return o<f?"just now":e<60?`${e}m ago`:s<24?`${s}h ago`:r<30?`${r}d ago`:`${Math.floor(r/30)}mo ago`}static formatAbsoluteForTooltip(t){if(t==null)return"";let n=typeof t=="string"?new Date(t):t;if(Number.isNaN(n.getTime()))return"";let a=String(n.getFullYear()),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0"),e=String(n.getHours()).padStart(2,"0"),s=String(n.getMinutes()).padStart(2,"0"),r=String(n.getSeconds()).padStart(2,"0");return`${a}-${i}-${o} ${e}:${s}:${r}`}};export{m as a};
2
+ //# sourceMappingURL=chunk-M5JVIKJU.js.map
@@ -1,2 +1,2 @@
1
- import{I as l}from"./chunk-F5NOGK2B.js";import{C as d,aa as r,k as c,p as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var f=(()=>{class i{baseUrl=`${l.api.baseUrl}/agent-feedback`;http=d(n);listFeedback(e){let t=[];e?.type!==void 0&&e.type!==""&&t.push(`type=${encodeURIComponent(e.type)}`),e?.limit!==void 0&&t.push(`limit=${e.limit}`),e?.skip!==void 0&&t.push(`skip=${e.skip}`);let a=`${this.baseUrl}/list`,b=t.length?`${a}?${t.join("&")}`:a;return o(this.http.get(b))}deleteFeedback(e){return o(this.http.delete(`${this.baseUrl}/delete/${encodeURIComponent(e)}`))}deleteAllFeedback(){return o(this.http.delete(`${this.baseUrl}/delete-all`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var A=(()=>{class i{feedback_$=r([]);feedbackLoading_$=r(!1);feedbackLoadError_$=r(null);filterType_$=r(void 0);feedbackTotalCount_$=r(0);feedback_AS=d(f);loadFeedback(){return c(this,null,function*(){this.feedbackLoading_$.set(!0),this.feedbackLoadError_$.set(null);try{let e=this.filterType_$(),a=(yield this.feedback_AS.listFeedback({type:e})).feedback??[];this.feedback_$.set(a),e===void 0&&this.feedbackTotalCount_$.set(a.length)}catch(e){this.feedbackLoadError_$.set(e),this.feedback_$.set([])}finally{this.feedbackLoading_$.set(!1)}})}setFilterType(e){this.filterType_$.set(e),this.loadFeedback()}clearAll(){return c(this,null,function*(){try{yield this.feedback_AS.deleteAllFeedback(),this.feedbackTotalCount_$.set(0),yield this.loadFeedback()}catch(e){this.feedbackLoadError_$.set(e)}})}clearOne(e){return c(this,null,function*(){try{yield this.feedback_AS.deleteFeedback(e),this.feedback_$.update(t=>t.filter(a=>a._id!==e)),this.feedbackTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.feedbackLoadError_$.set(t)}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{A as a};
2
- //# sourceMappingURL=chunk-GDZKZEQ6.js.map
1
+ import{I as l}from"./chunk-ANMHMGCN.js";import{C as d,aa as r,k as c,p as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var f=(()=>{class i{baseUrl=`${l.api.baseUrl}/agent-feedback`;http=d(n);listFeedback(e){let t=[];e?.type!==void 0&&e.type!==""&&t.push(`type=${encodeURIComponent(e.type)}`),e?.limit!==void 0&&t.push(`limit=${e.limit}`),e?.skip!==void 0&&t.push(`skip=${e.skip}`);let a=`${this.baseUrl}/list`,b=t.length?`${a}?${t.join("&")}`:a;return o(this.http.get(b))}deleteFeedback(e){return o(this.http.delete(`${this.baseUrl}/delete/${encodeURIComponent(e)}`))}deleteAllFeedback(){return o(this.http.delete(`${this.baseUrl}/delete-all`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var A=(()=>{class i{feedback_$=r([]);feedbackLoading_$=r(!1);feedbackLoadError_$=r(null);filterType_$=r(void 0);feedbackTotalCount_$=r(0);feedback_AS=d(f);loadFeedback(){return c(this,null,function*(){this.feedbackLoading_$.set(!0),this.feedbackLoadError_$.set(null);try{let e=this.filterType_$(),a=(yield this.feedback_AS.listFeedback({type:e})).feedback??[];this.feedback_$.set(a),e===void 0&&this.feedbackTotalCount_$.set(a.length)}catch(e){this.feedbackLoadError_$.set(e),this.feedback_$.set([])}finally{this.feedbackLoading_$.set(!1)}})}setFilterType(e){this.filterType_$.set(e),this.loadFeedback()}clearAll(){return c(this,null,function*(){try{yield this.feedback_AS.deleteAllFeedback(),this.feedbackTotalCount_$.set(0),yield this.loadFeedback()}catch(e){this.feedbackLoadError_$.set(e)}})}clearOne(e){return c(this,null,function*(){try{yield this.feedback_AS.deleteFeedback(e),this.feedback_$.update(t=>t.filter(a=>a._id!==e)),this.feedbackTotalCount_$.update(t=>Math.max(0,t-1))}catch(t){this.feedbackLoadError_$.set(t)}})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=s({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{A as a};
2
+ //# sourceMappingURL=chunk-NU2XNK5F.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-XPFIWQJX.js";import{I as d,p as h}from"./chunk-F5NOGK2B.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
- //# sourceMappingURL=chunk-GLGOIPXP.js.map
1
+ import{b as c}from"./chunk-O2MF2KDY.js";import{I as d,p as h}from"./chunk-ANMHMGCN.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
2
+ //# sourceMappingURL=chunk-NYV2AR3J.js.map
@@ -1,2 +1,2 @@
1
- import{k as F}from"./chunk-Y6TO7KG5.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
- //# sourceMappingURL=chunk-UE6QT3QX.js.map
1
+ import{k as F}from"./chunk-5CI77L5J.js";import{D as h,Fa as _,Ga as C,Ha as T,J as x,K as u,T as E,Ta as L,U as l,Ua as k,Z as a,da as c,ga as S,la as d,ma as f,oa as v,pa as g,qa as o,ra as r,sa as p,ua as y,ub as R,va as b,wa as i,xa as M,ya as w}from"./chunk-TBMJSIBB.js";var I=["*","*"],D=()=>[];function j(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function V(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,j,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function A(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function P(t,n){if(t&1&&(o(0,"div",4),v(1,A,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function B(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function O(t,n){if(t&1&&c(0,P,6,2,"div",4)(1,B,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function N(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function q(t,n){t&1&&w(0)}function z(t,n){if(t&1&&c(0,V,3,3,"div")(1,O,2,1)(2,N,2,1,"p",0)(3,q,1,0),t&2){let e=i();d(e.error()?0:e.isLoading()?1:e.isEmpty()?2:3)}}function G(t,n){t&1&&(o(0,"div",6),p(1,"div",9)(2,"div",10),r())}function H(t,n){if(t&1&&(o(0,"div",4),v(1,G,3,0,"div",6,f),o(3,"div",7),p(4,"span",8),_(5),r()()),t&2){let e=i(3);a(),g(k(1,D).constructor(e.skeletonRows())),a(4),T(" ",e.loadingMessage()," ")}}function J(t,n){if(t&1&&(o(0,"p",5),_(1),r()),t&2){let e=i(3);a(),C(e.loadingMessage())}}function K(t,n){if(t&1&&c(0,H,6,2,"div",4)(1,J,2,1,"p",5),t&2){let e=i(2);d(e.showSkeleton()?0:1)}}function Q(t,n){if(t&1){let e=y();o(0,"div",2)(1,"button",3),b("click",function(){x(e);let m=i(3);return u(m.handleRetry())}),_(2," \xDAjrapr\xF3b\xE1l\xE1s "),r()()}}function U(t,n){if(t&1&&(o(0,"div"),p(1,"app-ccap-error-display",1),c(2,Q,3,0,"div",2),r()),t&2){let e=i(2);a(),S("error",e.error())("sourceLabelOverride",e.errorSourceLabel()),a(),d(e.showRetry()?2:-1)}}function W(t,n){if(t&1&&(o(0,"p",0),_(1),r()),t&2){let e=i(2);a(),C(e.emptyMessage())}}function X(t,n){t&1&&w(0,1)}function Y(t,n){if(t&1&&c(0,K,2,1)(1,U,3,3,"div")(2,W,2,1,"p",0)(3,X,1,0),t&2){let e=i();d(e.isLoading()?0:e.error()?1:e.isEmpty()?2:3)}}var ot=(()=>{class t{isLoading=l(!1);error=l(null);isEmpty=l(!1);errorSourceLabel=l("");emptyMessage=l("Nincs megjelen\xEDthet\u0151 elem.");loadingMessage=l("Bet\xF6lt\xE9s\u2026");skeletonRows=l(2);showSkeleton=l(!1);showRetry=l(!0);errorTakesPrecedence=l(!1);retry=E();handleRetry(){this.retry.emit()}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=h({type:t,selectors:[["app-s-content-state"]],hostAttrs:[1,"block"],inputs:{isLoading:[1,"isLoading"],error:[1,"error"],isEmpty:[1,"isEmpty"],errorSourceLabel:[1,"errorSourceLabel"],emptyMessage:[1,"emptyMessage"],loadingMessage:[1,"loadingMessage"],skeletonRows:[1,"skeletonRows"],showSkeleton:[1,"showSkeleton"],showRetry:[1,"showRetry"],errorTakesPrecedence:[1,"errorTakesPrecedence"]},outputs:{retry:"retry"},standalone:!0,features:[L],ngContentSelectors:I,decls:2,vars:1,consts:[[1,"text-neutral-500","py-4"],[1,"mb-3","block",3,"error","sourceLabelOverride"],[1,"text-center"],["type","button",1,"mt-1","px-3","py-1.5","text-sm","border","border-neonCyan","rounded-md","bg-transparent","text-neutral-200","hover:bg-neutral-800","hover:shadow-neon-glow-cyan","transition-colors",3,"click"],[1,"flex","flex-col","gap-2","py-4"],[1,"text-neutral-400"],[1,"px-4","py-3","border","border-neonDefault","rounded-lg","animate-pulse"],[1,"flex","items-center","gap-2","text-neutral-500","text-sm"],[1,"inline-block","w-2","h-2","rounded-full","bg-ccapAccent","animate-pulse"],[1,"h-4","w-3/4","bg-neutral-600","rounded","mb-2"],[1,"h-3","w-1/2","bg-neutral-700","rounded"]],template:function(s,m){s&1&&(M(I),c(0,z,4,1)(1,Y,4,1)),s&2&&d(m.errorTakesPrecedence()?0:1)},dependencies:[R,F],encapsulation:2})}return t})();export{ot as a};
2
+ //# sourceMappingURL=chunk-NZTD5QPD.js.map
@@ -1,2 +1,2 @@
1
- import{I as o,p as f}from"./chunk-F5NOGK2B.js";import{C as s,aa as i,h as m,hb as n,k as l,p as h,xb as p,y as r}from"./chunk-TBMJSIBB.js";var c=m(f());var u=(()=>{class e{baseUrl=`${o.api.baseUrl}/mobile`;http=s(p);getStatus(){return h(this.http.get(`${this.baseUrl}/status`))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var C=6*60*60*1e3;function d(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}var y=(()=>{class e{mobile_AS=s(u);latestStatus_$=i(null);isChecking_$=i(!1);lastCheckedAt_$=i(null);lastCheckError_$=i(null);pendingCheckPromise=null;updateAvailable_$=n(()=>{let t=this.latestStatus_$();return!t||!t.available||!t.packageVersion?!1:t.packageVersion!==o.version});latestPackageVersion_$=n(()=>{let t=this.latestStatus_$();return t?.packageVersion??t?.version??""});intervalId=null;constructor(){d()&&this.startPeriodicCheck()}startPeriodicCheck(){this.checkNow(),this.intervalId=setInterval(()=>{this.checkNow()},C)}checkNow(){return this.pendingCheckPromise?this.pendingCheckPromise:(this.pendingCheckPromise=this.performCheck(),this.pendingCheckPromise)}performCheck(){return l(this,null,function*(){this.isChecking_$.set(!0),this.lastCheckError_$.set(null);try{let t=yield this.mobile_AS.getStatus();this.latestStatus_$.set(t),this.lastCheckedAt_$.set(new Date)}catch(t){c.DyFM_Error.logSimple("CCAP_AppVersionCheck | checkNow failed",t),this.lastCheckError_$.set(c.DyFM_Error.getErrorMessage(t)||"Verzi\xF3 ellen\u0151rz\xE9s sikertelen."),this.lastCheckedAt_$.set(new Date)}finally{this.isChecking_$.set(!1),this.pendingCheckPromise=null}})}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{u as a,y as b};
2
- //# sourceMappingURL=chunk-XPFIWQJX.js.map
1
+ import{I as o,p as f}from"./chunk-ANMHMGCN.js";import{C as s,aa as i,h as m,hb as n,k as l,p as h,xb as p,y as r}from"./chunk-TBMJSIBB.js";var c=m(f());var u=(()=>{class e{baseUrl=`${o.api.baseUrl}/mobile`;http=s(p);getStatus(){return h(this.http.get(`${this.baseUrl}/status`))}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var C=6*60*60*1e3;function d(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}var y=(()=>{class e{mobile_AS=s(u);latestStatus_$=i(null);isChecking_$=i(!1);lastCheckedAt_$=i(null);lastCheckError_$=i(null);pendingCheckPromise=null;updateAvailable_$=n(()=>{let t=this.latestStatus_$();return!t||!t.available||!t.packageVersion?!1:t.packageVersion!==o.version});latestPackageVersion_$=n(()=>{let t=this.latestStatus_$();return t?.packageVersion??t?.version??""});intervalId=null;constructor(){d()&&this.startPeriodicCheck()}startPeriodicCheck(){this.checkNow(),this.intervalId=setInterval(()=>{this.checkNow()},C)}checkNow(){return this.pendingCheckPromise?this.pendingCheckPromise:(this.pendingCheckPromise=this.performCheck(),this.pendingCheckPromise)}performCheck(){return l(this,null,function*(){this.isChecking_$.set(!0),this.lastCheckError_$.set(null);try{let t=yield this.mobile_AS.getStatus();this.latestStatus_$.set(t),this.lastCheckedAt_$.set(new Date)}catch(t){c.DyFM_Error.logSimple("CCAP_AppVersionCheck | checkNow failed",t),this.lastCheckError_$.set(c.DyFM_Error.getErrorMessage(t)||"Verzi\xF3 ellen\u0151rz\xE9s sikertelen."),this.lastCheckedAt_$.set(new Date)}finally{this.isChecking_$.set(!1),this.pendingCheckPromise=null}})}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{u as a,y as b};
2
+ //# sourceMappingURL=chunk-O2MF2KDY.js.map
@@ -1,2 +1,2 @@
1
- import{e as rt}from"./chunk-JTSW4KB2.js";import{I as st}from"./chunk-F5NOGK2B.js";import{$a as K,C,D as Z,Fa as u,Ga as V,Ha as T,J as G,K as L,L as S,M as q,Pa as W,Qa as B,R as J,Ra as U,Ta as tt,Ua as et,Z as o,aa as x,bb as N,da as y,fa as v,ga as H,ha as R,hb as nt,ia as A,ja as E,jb as j,k as p,la as g,na as Q,oa as k,p as m,pa as D,pb as it,qa as s,ra as a,sa as b,ua as P,ub as ot,va as F,wa as d,xb as at,y as O}from"./chunk-TBMJSIBB.js";var lt=(()=>{class n{baseUrl=`${st.api.baseUrl}/cc-account`;http=C(at);listAccounts(){return m(this.http.get(`${this.baseUrl}/list`))}listAccountsByIdentity(){return m(this.http.get(`${this.baseUrl}/list-by-identity`))}backfillIdentity(){return m(this.http.post(`${this.baseUrl}/backfill-identity`,{}))}auditIdentityDuplicates(){return m(this.http.get(`${this.baseUrl}/identity-audit`))}refreshLocalAccounts(){return m(this.http.post(`${this.baseUrl}/refresh`,{}))}getInstanceMapping(){return m(this.http.get(`${this.baseUrl}/instance-mapping`))}getAccount(t){return m(this.http.get(`${this.baseUrl}/${t}`))}getAccountUsage(t){return m(this.http.get(`${this.baseUrl}/${t}/usage`))}getAccountUsageHistory(t){let e=[];t.windowType!=null&&t.windowType!==""&&e.push(`windowType=${encodeURIComponent(t.windowType)}`),t.fromMs!=null&&e.push(`fromMs=${t.fromMs}`),t.toMs!=null&&e.push(`toMs=${t.toMs}`);let i=e.length>0?`?${e.join("&")}`:"";return m(this.http.get(`${this.baseUrl}/${t.accountKey}/usage-history${i}`))}refreshAccountUsage(t){return m(this.http.post(`${this.baseUrl}/${t}/refresh-usage`,{}))}renameAccount(t){let e={};return t.displayName!==void 0&&(e.displayName=t.displayName),t.email!==void 0&&(e.email=t.email),m(this.http.patch(`${this.baseUrl}/${t.accountKey}`,e))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var pt="cc:account-usage-update",_t="cc:account-list-update",ut=(()=>{class n{account_AS=C(lt);socket_CS=C(rt);ngZone=C(J);socketSubscription=null;accounts_$=x([]);accountUsageMap_$=x(new Map);instanceMapping_$=x(null);usageHistoryMap_$=x(new Map);identityGroups_$=x([]);isLoading_$=x(!1);loadError_$=x(null);loadDashboardBootstrap(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let[t,e,i]=yield Promise.all([this.account_AS.listAccounts(),this.account_AS.getInstanceMapping(),this.account_AS.listAccountsByIdentity()]);this.accounts_$.set(t.items),this.instanceMapping_$.set(e),this.identityGroups_$.set(i.groups);let r=new Map(this.accountUsageMap_$());for(let _ of i.groups)r.set(_.primary.accountKey,_.mergedUsage);this.accountUsageMap_$.set(r)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}finally{this.isLoading_$.set(!1)}})}loadIdentityGroups(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccountsByIdentity();this.identityGroups_$.set(t.groups);let e=new Map(this.accountUsageMap_$());for(let i of t.groups)e.set(i.primary.accountKey,i.mergedUsage);this.accountUsageMap_$.set(e)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}loadAccounts(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccounts();this.accounts_$.set(t.items)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}loadAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsage(t),i=new Map(this.accountUsageMap_$());i.set(t,e.items),this.accountUsageMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}loadAccountUsageHistory(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsageHistory(t),i=new Map(this.usageHistoryMap_$());i.set(t.accountKey,e.items),this.usageHistoryMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}loadInstanceMapping(){return p(this,null,function*(){try{let t=yield this.account_AS.getInstanceMapping();this.instanceMapping_$.set(t)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}refreshAccounts(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let t=yield this.account_AS.refreshLocalAccounts();return yield this.loadAccounts(),t}catch(t){return this.loadError_$.set(this.errorMessageOf(t)),{refreshedKeys:[],scannedPaths:0}}finally{this.isLoading_$.set(!1)}})}refreshAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.refreshAccountUsage(t);return yield this.loadAccountUsage(t),yield this.loadAccounts(),e}catch(e){return this.loadError_$.set(this.errorMessageOf(e)),{status:"error",windowsUpserted:0,email:null}}})}renameAccount(t){return p(this,null,function*(){try{let e=yield this.account_AS.renameAccount(t),i=this.accounts_$().map(r=>r.accountKey===t.accountKey?e:r);this.accounts_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}startLiveUpdates(){this.socketSubscription==null&&(this.socketSubscription=this.socket_CS.event$.subscribe(t=>{this.ngZone.run(()=>{t.event===pt?this.handleAccountUsageUpdate(t.payload):t.event===_t&&this.handleAccountListUpdate(t.payload)})}))}stopLiveUpdates(){this.socketSubscription!=null&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null)}ngOnDestroy(){this.stopLiveUpdates()}handleAccountUsageUpdate(t){let e=t.accountKey,i=t.windowType;if(typeof e!="string"||e===""||typeof i!="string")return;let r={accountKey:e,windowType:i,utilization:typeof t.utilization=="number"?t.utilization:void 0,resetsAtMs:typeof t.resetsAtMs=="number"?t.resetsAtMs:void 0,lastObservedStatus:typeof t.lastObservedStatus=="string"?t.lastObservedStatus:void 0,observedAt:typeof t.observedAt=="string"?t.observedAt:void 0,lastObservedByCcapId:typeof t.lastObservedByCcapId=="string"?t.lastObservedByCcapId:void 0,lastObservedBySessionId:typeof t.lastObservedBySessionId=="string"?t.lastObservedBySessionId:void 0},_=new Map(this.accountUsageMap_$()),l=(_.get(e)??[]).filter(f=>f.windowType!==i);l.push(r),_.set(e,l),this.accountUsageMap_$.set(_)}handleAccountListUpdate(t){this.loadAccounts(),this.loadIdentityGroups()}errorMessageOf(t){if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null){let e=t;if(typeof e.message=="string")return e.message}return String(t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var $=(()=>{class n{static CHART_WIDTH=100;static CHART_HEIGHT=40;static COLOR_MAP={five_hour:"#10b981",seven_day:"#06b6d4",seven_day_opus:"#a855f7",seven_day_sonnet:"#f59e0b",extra_usage:"#f43f5e"};static WINDOW_LABEL_MAP={five_hour:"5h",seven_day:"Weekly",seven_day_opus:"Opus",seven_day_sonnet:"Sonnet",extra_usage:"Extra"};static WINDOW_ORDER=["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];static buildChart(t){let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=0;for(let l of t){if(typeof l.observedAt!="string"||l.observedAt===""||typeof l.utilization!="number"||!isFinite(l.utilization))continue;let f=Date.parse(l.observedAt);isFinite(f)&&(f<e&&(e=f),f>i&&(i=f),r++)}if(r===0)return{lines:n.WINDOW_ORDER.map(l=>({windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:"",hasData:!1,pointCount:0,lastX:0,lastY:0})),hasAnyData:!1,minTimeMs:0,maxTimeMs:0};i-e<1&&(i=e+36e5);let _=i-e,M=n.WINDOW_ORDER.map(l=>{let f=[];for(let h of t){if(h.windowType!==l||typeof h.observedAt!="string"||h.observedAt===""||typeof h.utilization!="number"||!isFinite(h.utilization))continue;let w=Date.parse(h.observedAt);isFinite(w)&&f.push({t:w,u:Math.max(0,Math.min(1,h.utilization))})}f.sort((h,w)=>h.t-w.t);let I=[],z=0,Y=0;for(let h of f){let w=(h.t-e)/_*n.CHART_WIDTH,X=n.CHART_HEIGHT-h.u*n.CHART_HEIGHT;I.push(`${w.toFixed(2)},${X.toFixed(2)}`),z=w,Y=X}return{windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:I.join(" "),hasData:I.length>0,pointCount:I.length,lastX:z,lastY:Y}});return{lines:M,hasAnyData:M.some(l=>l.hasData),minTimeMs:e,maxTimeMs:i}}}return n})();var dt=(n,c)=>c.windowType,ht=()=>["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];function mt(n,c){if(n&1&&b(0,"div"),n&2){d();let t=U(0),e=d();E("h-full transition-all "+e.utilizationBarColorClass(t.utilization)),R("width",e.utilizationPercent(t.utilization),"%")}}function ft(n,c){if(n&1&&(W(0),s(1,"div")(2,"div",4),u(3),a(),s(4,"div",5)(5,"div"),y(6,mt,1,4,"div",6),a(),s(7,"span",7),u(8),a()(),s(9,"div",8),u(10),a()()),n&2){let t,e=c.$implicit,i=d(),r=B(i.usageItemOfWindow(e));o(),E(i.compact?"grid grid-cols-[90px_1fr_56px] items-center gap-2 text-[10px]":"grid grid-cols-[110px_1fr_64px] items-center gap-2 text-[11px]"),A("opacity-50",!r),o(),H("title",e),o(),T(" ",i.windowLabelOf(e)," "),o(2),E(i.compact?"flex-1 h-1.5 bg-neutral-800 rounded-full overflow-hidden":"flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden"),o(),g(r?6:-1),o(),E(i.compact?"w-8 text-[10px]":"w-9"),o(),T(" ",i.formatUtilization((t=r==null?null:r.utilization)!==null&&t!==void 0?t:null)," "),o(),H("title","Resets in "+i.formatResetCountdown(r==null?null:r.resetsAtMs)),o(),T(" ",i.formatResetCountdown(r==null?null:r.resetsAtMs)," ")}}function gt(n,c){n&1&&(s(0,"div",2),u(1," No data yet \u2014 click "),s(2,"strong",9),u(3,"Pull"),a(),u(4," or wait for the next rate-limit event. "),a())}function xt(n,c){n&1&&(s(0,"div",14),u(1," No graph data yet \u2014 pull usage or wait for a CC session rate-limit event. "),a())}function yt(n,c){if(n&1&&(S(),b(0,"circle",25)),n&2){let t=d(2).$implicit;v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function Ct(n,c){if(n&1&&(S(),b(0,"polyline",26)(1,"circle",27)),n&2){let t=d(2).$implicit;v("points",t.pathPoints)("stroke",t.colorHex),o(),v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function vt(n,c){if(n&1&&y(0,yt,1,3,":svg:circle",25)(1,Ct,2,5),n&2){let t=d().$implicit;g(t.pointCount===1?0:1)}}function wt(n,c){if(n&1&&y(0,vt,2,1),n&2){let t=c.$implicit;g(t.hasData?0:-1)}}function At(n,c){if(n&1&&(s(0,"span",31),u(1,"\xB7"),a(),s(2,"span",32),u(3),a()),n&2){let t=d().$implicit,e=d(4);o(3),T(" ",((e.chartH-t.lastY)/e.chartH*100).toFixed(0),"% ")}}function bt(n,c){if(n&1&&(s(0,"div",28),b(1,"span",29),s(2,"span",30),u(3),a(),y(4,At,4,1),a()),n&2){let t=c.$implicit;A("opacity-40",!t.hasData),o(),R("background-color",t.colorHex),o(2),V(t.label),o(),g(t.hasData?4:-1)}}function $t(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),V(N(2,1,t.minTimeMs,"yyyy-MM-dd HH:mm"))}}function Mt(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Tt(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),V(N(2,1,t.maxTimeMs,"yyyy-MM-dd HH:mm"))}}function St(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Et(n,c){if(n&1){let t=P();s(0,"div",15),S(),s(1,"svg",16),b(2,"line",17)(3,"line",18)(4,"line",19),k(5,wt,1,1,null,null,dt),a(),q(),s(7,"div",20)(8,"span"),u(9,"100%"),a(),s(10,"span"),u(11,"50%"),a(),s(12,"span"),u(13,"0%"),a()()(),s(14,"div",21),k(15,bt,5,6,"div",22,dt),a(),s(17,"div",23),y(18,$t,3,4,"span")(19,Mt,2,0,"span"),s(20,"button",24),F("click",function(){G(t);let i=d(3);return L(i.handleRefreshGraph())}),u(21," \u21BB Refresh "),a(),y(22,Tt,3,4,"span")(23,St,2,0,"span"),a()}if(n&2){d();let t=U(0),e=d(2);o(),A("h-24",e.compact)("h-32",!e.compact),v("viewBox",e.chartViewBox),o(),v("y1",e.chartH)("x2",e.chartW)("y2",e.chartH),o(),v("y1",e.chartMidY)("x2",e.chartW)("y2",e.chartMidY),o(),v("x2",e.chartW),o(),D(t.lines),o(10),D(t.lines),o(3),g(t.minTimeMs?18:19),o(4),g(t.maxTimeMs?22:23)}}function Ut(n,c){if(n&1&&(W(0),s(1,"div",13),y(2,xt,2,0,"div",14)(3,Et,24,14),a()),n&2){let t=B(d(2).chart_$());o(2),g(t.hasAnyData?3:2)}}function It(n,c){if(n&1){let t=P();s(0,"div",3)(1,"button",10),F("click",function(){G(t);let i=d();return L(i.handleToggleGraph())}),S(),s(2,"svg",11),b(3,"path",12),a(),u(4),a(),y(5,Ut,4,2,"div",13),a()}if(n&2){let t=d();o(),H("title",t.isGraphOpen_$()?"Hide usage graph":"Show usage graph (utilization over time per window)"),o(),A("rotate-90",t.isGraphOpen_$()),o(2),T(" \u{1F4C8} ",t.isGraphOpen_$()?"Hide":"Show"," graph "),o(),g(t.isGraphOpen_$()?5:-1)}}var Jt=(()=>{class n{account_DS=C(ut);accountKey="";compact=!1;showGraphToggle=!0;initiallyOpenGraph=!1;isGraphOpen_$=x(!1);chart_$=nt(()=>$.buildChart(this.account_DS.usageHistoryMap_$().get(this.accountKey)??[]));chartViewBox=`0 0 ${$.CHART_WIDTH} ${$.CHART_HEIGHT}`;chartW=$.CHART_WIDTH;chartH=$.CHART_HEIGHT;chartMidY=$.CHART_HEIGHT/2;usageEffect=j(()=>{let t=this.accountKey;t&&(this.account_DS.accountUsageMap_$().has(t)||this.account_DS.loadAccountUsage(t))});initialOpenEffect=j(()=>{this.initiallyOpenGraph&&this.isGraphOpen_$.set(!0)});handleToggleGraph(){return p(this,null,function*(){let t=!this.isGraphOpen_$();this.isGraphOpen_$.set(t),t&&!this.account_DS.usageHistoryMap_$().has(this.accountKey)&&(yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey}))})}handleRefreshGraph(){return p(this,null,function*(){yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey})})}usageItemOfWindow(t){let e=this.account_DS.accountUsageMap_$().get(this.accountKey)??[];for(let i of e)if(i.windowType===t)return i;return null}hasAnyUsageData(){return(this.account_DS.accountUsageMap_$().get(this.accountKey)??[]).length>0}windowLabelOf(t){switch(t){case"five_hour":return"5-hour session";case"seven_day":return"Weekly";case"seven_day_opus":return"Weekly \xB7 Opus";case"seven_day_sonnet":return"Weekly \xB7 Sonnet";case"extra_usage":return"Extra (pay-as-you-go)";default:return t}}utilizationPercent(t){return t==null||!isFinite(t)?0:Math.max(0,Math.min(100,Math.round(t*100)))}formatUtilization(t){return t==null?"\u2014":`${Math.round(t*100)}%`}utilizationBarColorClass(t){return t==null||!isFinite(t)?"bg-neutral-600":t>=.85?"bg-red-500":t>=.5?"bg-amber-500":"bg-emerald-500"}formatResetCountdown(t){if(t==null||!isFinite(t)||t<=0)return"\u2014";let e=t-Date.now();if(e<=0)return"expired";let i=Math.floor(e/6e4),r=Math.floor(i/(60*24)),_=Math.floor(i%(60*24)/60),M=i%60;return r>0?`${r}d ${_}h`:_>0?`${_}h ${M}m`:`${M}m`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-cc-account-usage-view"]],inputs:{accountKey:"accountKey",compact:"compact",showGraphToggle:"showGraphToggle",initiallyOpenGraph:"initiallyOpenGraph"},standalone:!0,features:[tt],decls:6,vars:11,consts:[[1,"flex","flex-col"],[3,"class","opacity-50"],[1,"text-[10px]","text-neutral-500","italic","pt-1","border-t","border-neutral-800/40"],[1,"border-t","border-neutral-800/40","pt-2"],[1,"text-neutral-300","font-medium","truncate",3,"title"],[1,"flex","items-center","gap-2","min-w-0"],[3,"class","width"],[1,"font-mono","text-neutral-200","text-right","shrink-0"],[1,"font-mono","text-neutral-500","text-right","text-[10px]","truncate",3,"title"],[1,"text-neutral-400"],["type","button",1,"text-[11px]","text-neutral-400","hover:text-neonCyan","flex","items-center","gap-1","transition-colors",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3","h-3","transition-transform"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 5l7 7-7 7"],[1,"mt-2","rounded-md","border","border-neutral-800","bg-neutral-950/40","p-2"],[1,"text-[11px]","text-neutral-500","italic","px-2","py-3","text-center"],[1,"relative","w-full"],["preserveAspectRatio","none",1,"w-full","block"],["x1","0","stroke","#3f3f46","stroke-width","0.3"],["x1","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],["x1","0","y1","0","y2","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],[1,"absolute","inset-y-0","left-0","flex","flex-col","justify-between","text-[8px]","text-neutral-600","font-mono","pointer-events-none"],[1,"mt-2","flex","flex-wrap","items-center","gap-2","text-[10px]"],[1,"flex","items-center","gap-1",3,"opacity-40"],[1,"mt-1","flex","items-center","justify-between","text-[9px]","text-neutral-600"],["type","button","title","Re-fetch usage event history for this graph.",1,"text-[10px]","text-neutral-400","hover:text-neonCyan","border","border-neutral-700","hover:border-neonCyan","rounded","px-1.5","py-0.5","transition-colors",3,"click"],["r","0.8"],["fill","none","stroke-width","0.6","stroke-linecap","round","stroke-linejoin","round","vector-effect","non-scaling-stroke"],["r","0.6"],[1,"flex","items-center","gap-1"],[1,"inline-block","w-2","h-2","rounded-sm"],[1,"text-neutral-300"],[1,"text-neutral-500"],[1,"font-mono","text-neutral-400"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div"),k(2,ft,11,15,"div",1,Q),a(),y(4,gt,5,0,"div",2)(5,It,6,5,"div",3),a()),e&2&&(A("gap-1",i.compact)("gap-2",!i.compact),o(),A("space-y-1",i.compact)("space-y-2",!i.compact),o(),D(et(10,ht)),o(2),g(i.hasAnyUsageData()?-1:4),o(),g(i.showGraphToggle?5:-1))},dependencies:[ot,it],encapsulation:2})}return n})();export{ut as a,Jt as b};
2
- //# sourceMappingURL=chunk-E5DW3NBZ.js.map
1
+ import{e as rt}from"./chunk-2DCZKGMQ.js";import{I as st}from"./chunk-ANMHMGCN.js";import{$a as K,C,D as Z,Fa as u,Ga as V,Ha as T,J as G,K as L,L as S,M as q,Pa as W,Qa as B,R as J,Ra as U,Ta as tt,Ua as et,Z as o,aa as x,bb as N,da as y,fa as v,ga as H,ha as R,hb as nt,ia as A,ja as E,jb as j,k as p,la as g,na as Q,oa as k,p as m,pa as D,pb as it,qa as s,ra as a,sa as b,ua as P,ub as ot,va as F,wa as d,xb as at,y as O}from"./chunk-TBMJSIBB.js";var lt=(()=>{class n{baseUrl=`${st.api.baseUrl}/cc-account`;http=C(at);listAccounts(){return m(this.http.get(`${this.baseUrl}/list`))}listAccountsByIdentity(){return m(this.http.get(`${this.baseUrl}/list-by-identity`))}backfillIdentity(){return m(this.http.post(`${this.baseUrl}/backfill-identity`,{}))}auditIdentityDuplicates(){return m(this.http.get(`${this.baseUrl}/identity-audit`))}refreshLocalAccounts(){return m(this.http.post(`${this.baseUrl}/refresh`,{}))}getInstanceMapping(){return m(this.http.get(`${this.baseUrl}/instance-mapping`))}getAccount(t){return m(this.http.get(`${this.baseUrl}/${t}`))}getAccountUsage(t){return m(this.http.get(`${this.baseUrl}/${t}/usage`))}getAccountUsageHistory(t){let e=[];t.windowType!=null&&t.windowType!==""&&e.push(`windowType=${encodeURIComponent(t.windowType)}`),t.fromMs!=null&&e.push(`fromMs=${t.fromMs}`),t.toMs!=null&&e.push(`toMs=${t.toMs}`);let i=e.length>0?`?${e.join("&")}`:"";return m(this.http.get(`${this.baseUrl}/${t.accountKey}/usage-history${i}`))}refreshAccountUsage(t){return m(this.http.post(`${this.baseUrl}/${t}/refresh-usage`,{}))}renameAccount(t){let e={};return t.displayName!==void 0&&(e.displayName=t.displayName),t.email!==void 0&&(e.email=t.email),m(this.http.patch(`${this.baseUrl}/${t.accountKey}`,e))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var pt="cc:account-usage-update",_t="cc:account-list-update",ut=(()=>{class n{account_AS=C(lt);socket_CS=C(rt);ngZone=C(J);socketSubscription=null;accounts_$=x([]);accountUsageMap_$=x(new Map);instanceMapping_$=x(null);usageHistoryMap_$=x(new Map);identityGroups_$=x([]);isLoading_$=x(!1);loadError_$=x(null);loadDashboardBootstrap(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let[t,e,i]=yield Promise.all([this.account_AS.listAccounts(),this.account_AS.getInstanceMapping(),this.account_AS.listAccountsByIdentity()]);this.accounts_$.set(t.items),this.instanceMapping_$.set(e),this.identityGroups_$.set(i.groups);let r=new Map(this.accountUsageMap_$());for(let _ of i.groups)r.set(_.primary.accountKey,_.mergedUsage);this.accountUsageMap_$.set(r)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}finally{this.isLoading_$.set(!1)}})}loadIdentityGroups(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccountsByIdentity();this.identityGroups_$.set(t.groups);let e=new Map(this.accountUsageMap_$());for(let i of t.groups)e.set(i.primary.accountKey,i.mergedUsage);this.accountUsageMap_$.set(e)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}loadAccounts(){return p(this,null,function*(){try{let t=yield this.account_AS.listAccounts();this.accounts_$.set(t.items)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}loadAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsage(t),i=new Map(this.accountUsageMap_$());i.set(t,e.items),this.accountUsageMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}loadAccountUsageHistory(t){return p(this,null,function*(){try{let e=yield this.account_AS.getAccountUsageHistory(t),i=new Map(this.usageHistoryMap_$());i.set(t.accountKey,e.items),this.usageHistoryMap_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}loadInstanceMapping(){return p(this,null,function*(){try{let t=yield this.account_AS.getInstanceMapping();this.instanceMapping_$.set(t)}catch(t){this.loadError_$.set(this.errorMessageOf(t))}})}refreshAccounts(){return p(this,null,function*(){this.isLoading_$.set(!0),this.loadError_$.set(null);try{let t=yield this.account_AS.refreshLocalAccounts();return yield this.loadAccounts(),t}catch(t){return this.loadError_$.set(this.errorMessageOf(t)),{refreshedKeys:[],scannedPaths:0}}finally{this.isLoading_$.set(!1)}})}refreshAccountUsage(t){return p(this,null,function*(){try{let e=yield this.account_AS.refreshAccountUsage(t);return yield this.loadAccountUsage(t),yield this.loadAccounts(),e}catch(e){return this.loadError_$.set(this.errorMessageOf(e)),{status:"error",windowsUpserted:0,email:null}}})}renameAccount(t){return p(this,null,function*(){try{let e=yield this.account_AS.renameAccount(t),i=this.accounts_$().map(r=>r.accountKey===t.accountKey?e:r);this.accounts_$.set(i)}catch(e){this.loadError_$.set(this.errorMessageOf(e))}})}startLiveUpdates(){this.socketSubscription==null&&(this.socketSubscription=this.socket_CS.event$.subscribe(t=>{this.ngZone.run(()=>{t.event===pt?this.handleAccountUsageUpdate(t.payload):t.event===_t&&this.handleAccountListUpdate(t.payload)})}))}stopLiveUpdates(){this.socketSubscription!=null&&(this.socketSubscription.unsubscribe(),this.socketSubscription=null)}ngOnDestroy(){this.stopLiveUpdates()}handleAccountUsageUpdate(t){let e=t.accountKey,i=t.windowType;if(typeof e!="string"||e===""||typeof i!="string")return;let r={accountKey:e,windowType:i,utilization:typeof t.utilization=="number"?t.utilization:void 0,resetsAtMs:typeof t.resetsAtMs=="number"?t.resetsAtMs:void 0,lastObservedStatus:typeof t.lastObservedStatus=="string"?t.lastObservedStatus:void 0,observedAt:typeof t.observedAt=="string"?t.observedAt:void 0,lastObservedByCcapId:typeof t.lastObservedByCcapId=="string"?t.lastObservedByCcapId:void 0,lastObservedBySessionId:typeof t.lastObservedBySessionId=="string"?t.lastObservedBySessionId:void 0},_=new Map(this.accountUsageMap_$()),l=(_.get(e)??[]).filter(f=>f.windowType!==i);l.push(r),_.set(e,l),this.accountUsageMap_$.set(_)}handleAccountListUpdate(t){this.loadAccounts(),this.loadIdentityGroups()}errorMessageOf(t){if(t instanceof Error)return t.message;if(typeof t=="object"&&t!==null){let e=t;if(typeof e.message=="string")return e.message}return String(t)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var $=(()=>{class n{static CHART_WIDTH=100;static CHART_HEIGHT=40;static COLOR_MAP={five_hour:"#10b981",seven_day:"#06b6d4",seven_day_opus:"#a855f7",seven_day_sonnet:"#f59e0b",extra_usage:"#f43f5e"};static WINDOW_LABEL_MAP={five_hour:"5h",seven_day:"Weekly",seven_day_opus:"Opus",seven_day_sonnet:"Sonnet",extra_usage:"Extra"};static WINDOW_ORDER=["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];static buildChart(t){let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=0;for(let l of t){if(typeof l.observedAt!="string"||l.observedAt===""||typeof l.utilization!="number"||!isFinite(l.utilization))continue;let f=Date.parse(l.observedAt);isFinite(f)&&(f<e&&(e=f),f>i&&(i=f),r++)}if(r===0)return{lines:n.WINDOW_ORDER.map(l=>({windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:"",hasData:!1,pointCount:0,lastX:0,lastY:0})),hasAnyData:!1,minTimeMs:0,maxTimeMs:0};i-e<1&&(i=e+36e5);let _=i-e,M=n.WINDOW_ORDER.map(l=>{let f=[];for(let h of t){if(h.windowType!==l||typeof h.observedAt!="string"||h.observedAt===""||typeof h.utilization!="number"||!isFinite(h.utilization))continue;let w=Date.parse(h.observedAt);isFinite(w)&&f.push({t:w,u:Math.max(0,Math.min(1,h.utilization))})}f.sort((h,w)=>h.t-w.t);let I=[],z=0,Y=0;for(let h of f){let w=(h.t-e)/_*n.CHART_WIDTH,X=n.CHART_HEIGHT-h.u*n.CHART_HEIGHT;I.push(`${w.toFixed(2)},${X.toFixed(2)}`),z=w,Y=X}return{windowType:l,label:n.WINDOW_LABEL_MAP[l]??l,colorHex:n.COLOR_MAP[l]??"#9ca3af",pathPoints:I.join(" "),hasData:I.length>0,pointCount:I.length,lastX:z,lastY:Y}});return{lines:M,hasAnyData:M.some(l=>l.hasData),minTimeMs:e,maxTimeMs:i}}}return n})();var dt=(n,c)=>c.windowType,ht=()=>["five_hour","seven_day","seven_day_opus","seven_day_sonnet","extra_usage"];function mt(n,c){if(n&1&&b(0,"div"),n&2){d();let t=U(0),e=d();E("h-full transition-all "+e.utilizationBarColorClass(t.utilization)),R("width",e.utilizationPercent(t.utilization),"%")}}function ft(n,c){if(n&1&&(W(0),s(1,"div")(2,"div",4),u(3),a(),s(4,"div",5)(5,"div"),y(6,mt,1,4,"div",6),a(),s(7,"span",7),u(8),a()(),s(9,"div",8),u(10),a()()),n&2){let t,e=c.$implicit,i=d(),r=B(i.usageItemOfWindow(e));o(),E(i.compact?"grid grid-cols-[90px_1fr_56px] items-center gap-2 text-[10px]":"grid grid-cols-[110px_1fr_64px] items-center gap-2 text-[11px]"),A("opacity-50",!r),o(),H("title",e),o(),T(" ",i.windowLabelOf(e)," "),o(2),E(i.compact?"flex-1 h-1.5 bg-neutral-800 rounded-full overflow-hidden":"flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden"),o(),g(r?6:-1),o(),E(i.compact?"w-8 text-[10px]":"w-9"),o(),T(" ",i.formatUtilization((t=r==null?null:r.utilization)!==null&&t!==void 0?t:null)," "),o(),H("title","Resets in "+i.formatResetCountdown(r==null?null:r.resetsAtMs)),o(),T(" ",i.formatResetCountdown(r==null?null:r.resetsAtMs)," ")}}function gt(n,c){n&1&&(s(0,"div",2),u(1," No data yet \u2014 click "),s(2,"strong",9),u(3,"Pull"),a(),u(4," or wait for the next rate-limit event. "),a())}function xt(n,c){n&1&&(s(0,"div",14),u(1," No graph data yet \u2014 pull usage or wait for a CC session rate-limit event. "),a())}function yt(n,c){if(n&1&&(S(),b(0,"circle",25)),n&2){let t=d(2).$implicit;v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function Ct(n,c){if(n&1&&(S(),b(0,"polyline",26)(1,"circle",27)),n&2){let t=d(2).$implicit;v("points",t.pathPoints)("stroke",t.colorHex),o(),v("cx",t.lastX)("cy",t.lastY)("fill",t.colorHex)}}function vt(n,c){if(n&1&&y(0,yt,1,3,":svg:circle",25)(1,Ct,2,5),n&2){let t=d().$implicit;g(t.pointCount===1?0:1)}}function wt(n,c){if(n&1&&y(0,vt,2,1),n&2){let t=c.$implicit;g(t.hasData?0:-1)}}function At(n,c){if(n&1&&(s(0,"span",31),u(1,"\xB7"),a(),s(2,"span",32),u(3),a()),n&2){let t=d().$implicit,e=d(4);o(3),T(" ",((e.chartH-t.lastY)/e.chartH*100).toFixed(0),"% ")}}function bt(n,c){if(n&1&&(s(0,"div",28),b(1,"span",29),s(2,"span",30),u(3),a(),y(4,At,4,1),a()),n&2){let t=c.$implicit;A("opacity-40",!t.hasData),o(),R("background-color",t.colorHex),o(2),V(t.label),o(),g(t.hasData?4:-1)}}function $t(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),V(N(2,1,t.minTimeMs,"yyyy-MM-dd HH:mm"))}}function Mt(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Tt(n,c){if(n&1&&(s(0,"span"),u(1),K(2,"date"),a()),n&2){d(2);let t=U(0);o(),V(N(2,1,t.maxTimeMs,"yyyy-MM-dd HH:mm"))}}function St(n,c){n&1&&(s(0,"span"),u(1,"\u2014"),a())}function Et(n,c){if(n&1){let t=P();s(0,"div",15),S(),s(1,"svg",16),b(2,"line",17)(3,"line",18)(4,"line",19),k(5,wt,1,1,null,null,dt),a(),q(),s(7,"div",20)(8,"span"),u(9,"100%"),a(),s(10,"span"),u(11,"50%"),a(),s(12,"span"),u(13,"0%"),a()()(),s(14,"div",21),k(15,bt,5,6,"div",22,dt),a(),s(17,"div",23),y(18,$t,3,4,"span")(19,Mt,2,0,"span"),s(20,"button",24),F("click",function(){G(t);let i=d(3);return L(i.handleRefreshGraph())}),u(21," \u21BB Refresh "),a(),y(22,Tt,3,4,"span")(23,St,2,0,"span"),a()}if(n&2){d();let t=U(0),e=d(2);o(),A("h-24",e.compact)("h-32",!e.compact),v("viewBox",e.chartViewBox),o(),v("y1",e.chartH)("x2",e.chartW)("y2",e.chartH),o(),v("y1",e.chartMidY)("x2",e.chartW)("y2",e.chartMidY),o(),v("x2",e.chartW),o(),D(t.lines),o(10),D(t.lines),o(3),g(t.minTimeMs?18:19),o(4),g(t.maxTimeMs?22:23)}}function Ut(n,c){if(n&1&&(W(0),s(1,"div",13),y(2,xt,2,0,"div",14)(3,Et,24,14),a()),n&2){let t=B(d(2).chart_$());o(2),g(t.hasAnyData?3:2)}}function It(n,c){if(n&1){let t=P();s(0,"div",3)(1,"button",10),F("click",function(){G(t);let i=d();return L(i.handleToggleGraph())}),S(),s(2,"svg",11),b(3,"path",12),a(),u(4),a(),y(5,Ut,4,2,"div",13),a()}if(n&2){let t=d();o(),H("title",t.isGraphOpen_$()?"Hide usage graph":"Show usage graph (utilization over time per window)"),o(),A("rotate-90",t.isGraphOpen_$()),o(2),T(" \u{1F4C8} ",t.isGraphOpen_$()?"Hide":"Show"," graph "),o(),g(t.isGraphOpen_$()?5:-1)}}var Jt=(()=>{class n{account_DS=C(ut);accountKey="";compact=!1;showGraphToggle=!0;initiallyOpenGraph=!1;isGraphOpen_$=x(!1);chart_$=nt(()=>$.buildChart(this.account_DS.usageHistoryMap_$().get(this.accountKey)??[]));chartViewBox=`0 0 ${$.CHART_WIDTH} ${$.CHART_HEIGHT}`;chartW=$.CHART_WIDTH;chartH=$.CHART_HEIGHT;chartMidY=$.CHART_HEIGHT/2;usageEffect=j(()=>{let t=this.accountKey;t&&(this.account_DS.accountUsageMap_$().has(t)||this.account_DS.loadAccountUsage(t))});initialOpenEffect=j(()=>{this.initiallyOpenGraph&&this.isGraphOpen_$.set(!0)});handleToggleGraph(){return p(this,null,function*(){let t=!this.isGraphOpen_$();this.isGraphOpen_$.set(t),t&&!this.account_DS.usageHistoryMap_$().has(this.accountKey)&&(yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey}))})}handleRefreshGraph(){return p(this,null,function*(){yield this.account_DS.loadAccountUsageHistory({accountKey:this.accountKey})})}usageItemOfWindow(t){let e=this.account_DS.accountUsageMap_$().get(this.accountKey)??[];for(let i of e)if(i.windowType===t)return i;return null}hasAnyUsageData(){return(this.account_DS.accountUsageMap_$().get(this.accountKey)??[]).length>0}windowLabelOf(t){switch(t){case"five_hour":return"5-hour session";case"seven_day":return"Weekly";case"seven_day_opus":return"Weekly \xB7 Opus";case"seven_day_sonnet":return"Weekly \xB7 Sonnet";case"extra_usage":return"Extra (pay-as-you-go)";default:return t}}utilizationPercent(t){return t==null||!isFinite(t)?0:Math.max(0,Math.min(100,Math.round(t*100)))}formatUtilization(t){return t==null?"\u2014":`${Math.round(t*100)}%`}utilizationBarColorClass(t){return t==null||!isFinite(t)?"bg-neutral-600":t>=.85?"bg-red-500":t>=.5?"bg-amber-500":"bg-emerald-500"}formatResetCountdown(t){if(t==null||!isFinite(t)||t<=0)return"\u2014";let e=t-Date.now();if(e<=0)return"expired";let i=Math.floor(e/6e4),r=Math.floor(i/(60*24)),_=Math.floor(i%(60*24)/60),M=i%60;return r>0?`${r}d ${_}h`:_>0?`${_}h ${M}m`:`${M}m`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-cc-account-usage-view"]],inputs:{accountKey:"accountKey",compact:"compact",showGraphToggle:"showGraphToggle",initiallyOpenGraph:"initiallyOpenGraph"},standalone:!0,features:[tt],decls:6,vars:11,consts:[[1,"flex","flex-col"],[3,"class","opacity-50"],[1,"text-[10px]","text-neutral-500","italic","pt-1","border-t","border-neutral-800/40"],[1,"border-t","border-neutral-800/40","pt-2"],[1,"text-neutral-300","font-medium","truncate",3,"title"],[1,"flex","items-center","gap-2","min-w-0"],[3,"class","width"],[1,"font-mono","text-neutral-200","text-right","shrink-0"],[1,"font-mono","text-neutral-500","text-right","text-[10px]","truncate",3,"title"],[1,"text-neutral-400"],["type","button",1,"text-[11px]","text-neutral-400","hover:text-neonCyan","flex","items-center","gap-1","transition-colors",3,"click","title"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","aria-hidden","true",1,"w-3","h-3","transition-transform"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M9 5l7 7-7 7"],[1,"mt-2","rounded-md","border","border-neutral-800","bg-neutral-950/40","p-2"],[1,"text-[11px]","text-neutral-500","italic","px-2","py-3","text-center"],[1,"relative","w-full"],["preserveAspectRatio","none",1,"w-full","block"],["x1","0","stroke","#3f3f46","stroke-width","0.3"],["x1","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],["x1","0","y1","0","y2","0","stroke","#3f3f46","stroke-width","0.2","stroke-dasharray","1,1"],[1,"absolute","inset-y-0","left-0","flex","flex-col","justify-between","text-[8px]","text-neutral-600","font-mono","pointer-events-none"],[1,"mt-2","flex","flex-wrap","items-center","gap-2","text-[10px]"],[1,"flex","items-center","gap-1",3,"opacity-40"],[1,"mt-1","flex","items-center","justify-between","text-[9px]","text-neutral-600"],["type","button","title","Re-fetch usage event history for this graph.",1,"text-[10px]","text-neutral-400","hover:text-neonCyan","border","border-neutral-700","hover:border-neonCyan","rounded","px-1.5","py-0.5","transition-colors",3,"click"],["r","0.8"],["fill","none","stroke-width","0.6","stroke-linecap","round","stroke-linejoin","round","vector-effect","non-scaling-stroke"],["r","0.6"],[1,"flex","items-center","gap-1"],[1,"inline-block","w-2","h-2","rounded-sm"],[1,"text-neutral-300"],[1,"text-neutral-500"],[1,"font-mono","text-neutral-400"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div"),k(2,ft,11,15,"div",1,Q),a(),y(4,gt,5,0,"div",2)(5,It,6,5,"div",3),a()),e&2&&(A("gap-1",i.compact)("gap-2",!i.compact),o(),A("space-y-1",i.compact)("space-y-2",!i.compact),o(),D(et(10,ht)),o(2),g(i.hasAnyUsageData()?-1:4),o(),g(i.showGraphToggle?5:-1))},dependencies:[ot,it],encapsulation:2})}return n})();export{ut as a,Jt as b};
2
+ //# sourceMappingURL=chunk-ORLDSG2B.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-FUIXKBZ5.js";import{a as u}from"./chunk-3XGNYWLF.js";import{L as c,t as l}from"./chunk-F5NOGK2B.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-LIM5Q3RD.js.map
1
+ import{a as g}from"./chunk-XBMDDFNC.js";import{a as u}from"./chunk-XI7FMFIP.js";import{L as c,t as l}from"./chunk-ANMHMGCN.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-PHSKINXP.js.map
@@ -1,4 +1,4 @@
1
- import{I as _,K as $,N as T,p as U}from"./chunk-F5NOGK2B.js";import{C,Gb as H,a as b,aa as L,b as j,h as w,k as I,p as f,q as h,wb as d,xb as M,y as F}from"./chunk-TBMJSIBB.js";var y=[{prefix:"/setup",hint:"Setup \u2014 client/src/app/_modules/config/_modules/setup/"},{prefix:"/settings",hint:"Settings \u2014 client/src/app/_modules/config/_modules/settings/"},{prefix:"/model-registry",hint:"Model registry \u2014 client/src/app/_modules/model-registry/"},{prefix:"/embedding-registry",hint:"Embedding registry \u2014 client/src/app/_modules/ai-systems/_modules/embedding-registry/"},{prefix:"/embedding-eval",hint:"Embedding eval \u2014 client/src/app/_modules/embedding-eval/"},{prefix:"/session",hint:"CCAP Session UI \u2014 client/src/app/_modules/session/"},{prefix:"/errors",hint:"Errors list \u2014 client/src/app/_modules/system/_modules/errors/"},{prefix:"/feedback",hint:"Feedback \u2014 client/src/app/_modules/feedback/"},{prefix:"/logs",hint:"Logs \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/logs/"},{prefix:"/host-runtime-mcp",hint:"Host runtime MCP \u2014 client/src/app/_modules/dev/_modules/host-runtime-mcp/"},{prefix:"/voice-notes-poc",hint:"Voice notes POC \u2014 client/src/app/_modules/dev/_modules/poc/voice-notes-poc/"},{prefix:"/master-control-remote-poc",hint:"Master control remote POC \u2014 client/src/app/_modules/dev/_modules/poc/master-control-remote-poc/"},{prefix:"/workflow-settings",hint:"Workflow settings \u2014 client/src/app/_modules/config/_modules/workflow-settings/"},{prefix:"/coordinator",hint:"Coordinator \u2014 client/src/app/_modules/coordinator/"},{prefix:"/dark-office",hint:"Dark Office \u2014 client/src/app/_modules/dark-office/"},{prefix:"/project-management",hint:"Project management \u2014 client/src/app/_modules/project-management/"},{prefix:"/cc-session",hint:"CC Session UI \u2014 client/src/app/_modules/cc-session/"},{prefix:"/mobile-app",hint:"Mobile app \u2014 client/src/app/_modules/dev/_modules/poc/mobile-app/"},{prefix:"/oc-session",hint:"OC Session \u2014 client/src/app/_modules/oc/"},{prefix:"/ca-session",hint:"CA Session \u2014 client/src/app/_modules/ca-session/"},{prefix:"/consultant",hint:"Consultant \u2014 client/src/app/_modules/consultant/"},{prefix:"/agent-instances",hint:"Agent instances \u2014 client/src/app/_modules/agent-instances/"},{prefix:"/terminals",hint:"Terminals \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/terminals/"},{prefix:"/live-development-pipeline",hint:"Live Development Pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/system-status",hint:"Legacy route \u2192 redirects to /live-development-pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/",hint:"Dashboard (root) \u2014 client/src/app/_modules/dashboard/"}];var q="NG0203",S=class r{static isNg0203Message(n){return n.trim()===q}static buildDiagnostics(n){let t={route:n.context.route,url:n.context.url,userAgent:n.context.userAgent,timestamp:n.context.timestamp},e=r.parseStackFrames(n.stack),i=typeof n.context.route=="string"?n.context.route:"",s=r.resolveRouteFeatureHints(i),o=r.buildStaticGuidance(),l=r.buildToolSteps({clientSnapshot:t,clientSource:n.clientSource,stackFrames:e,routeFeatureHints:s});return{summary:"Angular NG0203: inject() was called outside an injection context (constructor, field initializer, factory, or runInInjectionContext).",clientSource:n.clientSource,clientSnapshot:t,stackFrames:e,routeFeatureHints:s,staticGuidance:o,toolSteps:l}}static formatDiagnosticsAppendix(n){let t;try{t=JSON.stringify(n,null,2)}catch{t='{"ng0203Diagnostics":"JSON stringify failed"}'}return`
1
+ import{I as _,K as $,N as T,p as U}from"./chunk-ANMHMGCN.js";import{C,Gb as H,a as b,aa as L,b as j,h as w,k as I,p as f,q as h,wb as d,xb as M,y as F}from"./chunk-TBMJSIBB.js";var y=[{prefix:"/setup",hint:"Setup \u2014 client/src/app/_modules/config/_modules/setup/"},{prefix:"/settings",hint:"Settings \u2014 client/src/app/_modules/config/_modules/settings/"},{prefix:"/model-registry",hint:"Model registry \u2014 client/src/app/_modules/model-registry/"},{prefix:"/embedding-registry",hint:"Embedding registry \u2014 client/src/app/_modules/ai-systems/_modules/embedding-registry/"},{prefix:"/embedding-eval",hint:"Embedding eval \u2014 client/src/app/_modules/embedding-eval/"},{prefix:"/session",hint:"CCAP Session UI \u2014 client/src/app/_modules/session/"},{prefix:"/errors",hint:"Errors list \u2014 client/src/app/_modules/system/_modules/errors/"},{prefix:"/feedback",hint:"Feedback \u2014 client/src/app/_modules/feedback/"},{prefix:"/logs",hint:"Logs \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/logs/"},{prefix:"/host-runtime-mcp",hint:"Host runtime MCP \u2014 client/src/app/_modules/dev/_modules/host-runtime-mcp/"},{prefix:"/voice-notes-poc",hint:"Voice notes POC \u2014 client/src/app/_modules/dev/_modules/poc/voice-notes-poc/"},{prefix:"/master-control-remote-poc",hint:"Master control remote POC \u2014 client/src/app/_modules/dev/_modules/poc/master-control-remote-poc/"},{prefix:"/workflow-settings",hint:"Workflow settings \u2014 client/src/app/_modules/config/_modules/workflow-settings/"},{prefix:"/coordinator",hint:"Coordinator \u2014 client/src/app/_modules/coordinator/"},{prefix:"/dark-office",hint:"Dark Office \u2014 client/src/app/_modules/dark-office/"},{prefix:"/project-management",hint:"Project management \u2014 client/src/app/_modules/project-management/"},{prefix:"/cc-session",hint:"CC Session UI \u2014 client/src/app/_modules/cc-session/"},{prefix:"/mobile-app",hint:"Mobile app \u2014 client/src/app/_modules/dev/_modules/poc/mobile-app/"},{prefix:"/oc-session",hint:"OC Session \u2014 client/src/app/_modules/oc/"},{prefix:"/ca-session",hint:"CA Session \u2014 client/src/app/_modules/ca-session/"},{prefix:"/consultant",hint:"Consultant \u2014 client/src/app/_modules/consultant/"},{prefix:"/agent-instances",hint:"Agent instances \u2014 client/src/app/_modules/agent-instances/"},{prefix:"/terminals",hint:"Terminals \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/terminals/"},{prefix:"/live-development-pipeline",hint:"Live Development Pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/system-status",hint:"Legacy route \u2192 redirects to /live-development-pipeline \u2014 client/src/app/_modules/dev/_modules/devtools/_modules/live-dev-pipeline/"},{prefix:"/",hint:"Dashboard (root) \u2014 client/src/app/_modules/dashboard/"}];var q="NG0203",S=class r{static isNg0203Message(n){return n.trim()===q}static buildDiagnostics(n){let t={route:n.context.route,url:n.context.url,userAgent:n.context.userAgent,timestamp:n.context.timestamp},e=r.parseStackFrames(n.stack),i=typeof n.context.route=="string"?n.context.route:"",s=r.resolveRouteFeatureHints(i),o=r.buildStaticGuidance(),l=r.buildToolSteps({clientSnapshot:t,clientSource:n.clientSource,stackFrames:e,routeFeatureHints:s});return{summary:"Angular NG0203: inject() was called outside an injection context (constructor, field initializer, factory, or runInInjectionContext).",clientSource:n.clientSource,clientSnapshot:t,stackFrames:e,routeFeatureHints:s,staticGuidance:o,toolSteps:l}}static formatDiagnosticsAppendix(n){let t;try{t=JSON.stringify(n,null,2)}catch{t='{"ng0203Diagnostics":"JSON stringify failed"}'}return`
2
2
 
3
3
  [NG0203 diagnostics]
4
4
  ${t}`}static parseStackFrames(n){if(n==null||!n.trim())return[];let t=n.split(`
@@ -24,4 +24,4 @@ ${String(n)}`}function nt(r){if(r instanceof Error&&typeof r.stack=="string"&&r.
24
24
  `),o=t!=null&&t.trim().length>0?t.trim():"(no stack)";return`${s}
25
25
 
26
26
  ${o}`}buildReportPayloadFromError(t,e){let i=this.getCurrentContext(),s=p.getErrorMessageForDisplay(t),o=r.enrichMessageForReport(t,s),l=p.getStackForReport(t),m=this.buildStackWithContext(l,i),N=r.extractErrorCode(t),E=r.extractAdditionalContent(t);return{message:o,stack:m,source:e??"client-app",errorCode:N,errorAdditionalContent:E,clientContext:i}}static enrichMessageForReport(t,e){if(!(t instanceof d))return e;let i=t.url?`URL: ${t.url}`:"URL: (?)",s=`status: ${t.status}`;return`${e} | ${i} | ${s}`}static extractErrorCode(t){if(t==null||typeof t!="object")return;let e=t;if(typeof e.errorCode=="string"&&e.errorCode.length>0)return e.errorCode;if(typeof e._errorCode=="string"&&e._errorCode.length>0)return e._errorCode}static extractAdditionalContent(t){if(t==null||typeof t!="object")return;let e=t;if(e.additionalContent!=null&&typeof e.additionalContent=="object")return e.additionalContent}buildReportPayloadFromParams(t){let e=this.getCurrentContext(),i=this.buildStackWithContext(t.stack,e);return{message:t.message,stack:i,source:t.source,clientContext:e}}showError(t,e){setTimeout(()=>{try{let i=p.getErrorMessageForDisplay(t),s=R.tryGetShortNotificationAffix({error:t});if(s.length>0&&(i=i+s),!(t instanceof d)&&!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&x.matchesDisplayMessage(i)){t instanceof Error&&g.DyFM_Log.error("[CCAP]",e??"client-app",t);return}let o=this.getCurrentContext(),l;if(k.isNg0600Message(i))try{l=k.buildDiagnostics({stack:p.getStackForReport(t),context:{route:o.route,url:o.url,userAgent:o.userAgent,timestamp:o.timestamp},clientSource:e})}catch(a){g.DyFM_Log.error("CCAP NG0600 diagnostics failed",a)}let m;if(S.isNg0203Message(i))try{m=S.buildDiagnostics({stack:p.getStackForReport(t),context:{route:o.route,url:o.url,userAgent:o.userAgent,timestamp:o.timestamp},clientSource:e})}catch(a){g.DyFM_Log.error("CCAP NG0203 diagnostics failed",a)}let N=e!=null&&e.trim().length>0?e.trim():void 0,E={id:this.nextNotificationId++,error:t,displayMessage:i,timestamp:Date.now(),isDismissing:!1,clientSource:N,ng0600Diagnostics:l,ng0203Diagnostics:m};if(this.errors_$.update(a=>{let u=[...a,E];return u.length>r.maxNotifications?u.slice(u.length-r.maxNotifications):u}),setTimeout(()=>{this.dismissNotification(E.id)},r.autoDismissMs),t instanceof Error&&g.DyFM_Log.error("[CCAP]",e??"client-app",t),!(t instanceof d)){let a=this.buildReportPayloadFromError(t,e??"client-app"),u="";l!=null?u=k.formatDiagnosticsAppendix(l):m!=null&&(u=S.formatDiagnosticsAppendix(m));let X=u.length>0?`${a.stack??""}${u}`:a.stack??"",Y={message:a.message,stack:X,source:a.source,sessionId:a.sessionId,runId:a.runId,errorCode:a.errorCode,errorAdditionalContent:a.errorAdditionalContent,clientContext:a.clientContext};this.errors_AS.reportError(Y).catch(()=>{})}}catch(i){g.DyFM_Log.error("CCAP showError set failed",i)}},0)}selectError(t){let e=this.errors_$().find(i=>i.id===t);e!=null&&this.selectedNotificationForModal_$.set(e)}dismissNotification(t){let i=this.errors_$().find(s=>s.id===t);i==null||i.isDismissing||(this.errors_$.update(s=>s.map(o=>o.id===t?j(b({},o),{isDismissing:!0}):o)),setTimeout(()=>{this.errors_$.update(s=>s.filter(o=>o.id!==t))},r.exitAnimationMs))}dismissSelected(){this.selectedNotificationForModal_$.set(null)}dismissAll(){this.errors_$.set([]),this.selectedNotificationForModal_$.set(null)}copyToClipboard(t){return I(this,null,function*(){return(yield this.tryWriteTextWithNavigatorClipboard(t))?{ok:!0}:this.copyTextWithExecCommand(t)?{ok:!0}:{ok:!1,error:new Error("Clipboard copy failed (secure Clipboard API unavailable or denied, and legacy execCommand copy failed)")}})}tryWriteTextWithNavigatorClipboard(t){return I(this,null,function*(){let e=typeof navigator<"u"?navigator.clipboard:void 0;if(e==null||typeof e.writeText!="function")return!1;try{return yield e.writeText(t),!0}catch{return!1}})}copyTextWithExecCommand(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.setAttribute("aria-hidden","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.margin="0",e.style.border="none",e.style.outline="none",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus(),e.select();let i=t.length;e.setSelectionRange(0,i);let s=!1;try{s=document.execCommand("copy")}catch{s=!1}return e.remove(),s}reportErrorOnly(t){if(!(this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0)&&(t.source==="client-socket"||x.matchesDisplayMessage(t.message)))return;let i=this.buildReportPayloadFromParams(t);this.errors_AS.reportError(i).catch(()=>{})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=F({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{S as a,k as b,c,D as d,v as e,z as f,R as g,p as h,V as i,Ot as j};
27
- //# sourceMappingURL=chunk-OO6K4AWB.js.map
27
+ //# sourceMappingURL=chunk-PQJSMEEO.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-AHUOKGJ7.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
2
- //# sourceMappingURL=chunk-OA6WDW2F.js.map
1
+ import{b as a}from"./chunk-7AJI4JCW.js";var f=class{static extract(t){if(t.toolName)return t.toolName;if(t.rawData){let s=t.rawData.name??t.rawData.tool_name??t.rawData.last_tool_name;if(typeof s=="string")return s}let o=t.bodyText.indexOf(":");return o>0?t.bodyText.substring(0,o).trim():t.bodyText.trim()}};var b=class e{static DEFAULT_GROUPABLE_TOOLS=new Set(["Read","Bash","Grep","Glob"]);static DEFAULT_MIN_GROUP_SIZE=2;static groupSubAgentItems(t,o){let s=new Map;for(let r=0;r<t.length;r++){let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n);i&&s.set(i,{item:n,index:r})}}if(!s.size)return t;let c=new Map,d=new Set;for(let r=0;r<t.length;r++){let n=t[r];if(n.parentAgentId&&s.has(n.parentAgentId)){let i=c.get(n.parentAgentId)??[];i.push(n),c.set(n.parentAgentId,i),d.add(r)}}let l=[];for(let r=0;r<t.length;r++){if(d.has(r))continue;let n=t[r];if(n.kind===a.tool&&n.toolName==="Agent"){let i=e.resolveAgentId(n),p=c.get(i)??[],g=[n,...p],I=e.buildSubAgentLabel(n),A=e.extractSubagentType(n),y=e.groupConsecutiveToolItems(g,o);l.push({listKey:e.newListKey(),kind:a.subAgentGroup,bodyText:I,groupItems:y,groupToolName:A||"Agent",rawData:n.rawData})}else l.push(n)}return l}static groupConsecutiveToolItems(t,o){let s=o?.groupableTools??e.DEFAULT_GROUPABLE_TOOLS,c=o?.minGroupSize??e.DEFAULT_MIN_GROUP_SIZE,d=[],l=[],r="",n=()=>{if(!l.length)return;let i=l.filter(p=>p.kind===a.tool).length;i>=c?d.push({listKey:e.newListKey(),kind:a.toolGroup,bodyText:`${r} \xD7 ${i}`,groupItems:l,groupToolName:r}):d.push(...l),l=[],r=""};for(let i of t){if(i.kind===a.tool){let p=f.extract(i);if(s.has(p)){r&&r!==p&&n(),r=p,l.push(i);continue}}if(i.kind===a.toolResult&&l.length){l.push(i);continue}n(),d.push(i)}return n(),d}static resolveAgentId(t){return t.toolCallId?t.toolCallId:t.rawData&&typeof t.rawData.id=="string"?t.rawData.id:""}static extractSubagentType(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.subagent_type;return typeof s=="string"?s:""}static extractDescription(t){let o=t.rawData?.input;if(!o||typeof o!="object")return"";let s=o.description;return typeof s=="string"?s:""}static buildSubAgentLabel(t){let o=e.extractSubagentType(t),s=e.extractDescription(t);return o?`${o}: ${s||"..."}`:s||"Sub-agent"}static newListKey(){return globalThis.crypto.randomUUID()}};var u=function(e){return e.user="user",e.assistant="assistant",e.tool="tool",e.toolResult="tool-result",e.status="status",e.error="error",e.info="info",e.result="result",e.thinking="thinking",e.statusUpdate="status-update",e}(u||{});var h=class e{static fromAssembledMessage(t,o){let s=e.mapRoleToKind(t.messageRole),c=t.toolResult?{text:t.toolResult.text,expandableContent:t.toolResult.expandableContent,rawData:t.toolResult.rawData,isError:t.toolResult.isError}:void 0,d=t.messageRole===u.tool&&t.toolName==="Edit"&&!!t.expandableContent;return{listKey:t.messageKey,kind:s,bodyText:t.bodyText,timestampIso:t.timestamp,toolName:t.toolName,expandableContent:t.expandableContent,pairedResult:c,rawData:t.rawData,subtype:t.subtype,isUserAligned:t.isUserAligned,headerStatusDot:t.headerStatusDot==="error"?"error":void 0,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:d},tts:e.buildTts(t,o),toolCallId:t.toolCallId,parentAgentId:t.parentAgentId}}static buildTts(t,o){if(!(!o||!(t.messageRole===u.user||t.messageRole===u.assistant)||!t.bodyText.trim().length))return{messageKey:t.messageKey,sessionId:o.sessionId,role:t.messageRole,content:t.bodyText,timestampIso:t.timestamp,hasTtsAudio:o.cachedKeys.has(t.messageKey)}}static mapRoleToKind(t){switch(t){case u.user:return a.userPrompt;case u.assistant:return a.assistant;case u.tool:return a.tool;case u.toolResult:return a.toolResult;case u.status:return a.status;case u.error:return a.error;case u.info:return a.info;case u.result:return a.result;case u.thinking:return a.thinking;case u.statusUpdate:return a.statusUpdate;default:return a.info}}};export{b as a,h as b};
2
+ //# sourceMappingURL=chunk-QBVNLJ7A.js.map