@futdevpro/ccap 1.1.3513 → 1.1.3523

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 (195) hide show
  1. package/client-dist/{agent-instances.module-T6EFJFPE.js → agent-instances.module-CWOIQQ77.js} +2 -2
  2. package/client-dist/{ca.module-NCBI74FP.js → ca.module-WN5ZJX3W.js} +2 -2
  3. package/client-dist/{cc-usage-dashboard.component-Q3FBUIIR.js → cc-usage-dashboard.component-26JCGRDJ.js} +2 -2
  4. package/client-dist/{cc.module-CIY6QMB5.js → cc.module-OTFOVDK6.js} +2 -2
  5. package/client-dist/{chunk-VTB3IOVV.js → chunk-2XWVIUOT.js} +2 -2
  6. package/client-dist/{chunk-3N2JTN7N.js → chunk-35GZKIHM.js} +2 -2
  7. package/client-dist/{chunk-MS2KQ2G4.js → chunk-3B43AFFF.js} +2 -2
  8. package/client-dist/{chunk-Q7ORWYDO.js → chunk-3BNJTYQO.js} +2 -2
  9. package/client-dist/{chunk-M6EVLEFQ.js → chunk-3UWSVQYY.js} +2 -2
  10. package/client-dist/{chunk-QP53M3ES.js → chunk-43DAQMAP.js} +2 -2
  11. package/client-dist/{chunk-YXBF6EUR.js → chunk-4DVJMOGV.js} +2 -2
  12. package/client-dist/{chunk-ASAT75IU.js → chunk-4HBQE4BE.js} +2 -2
  13. package/client-dist/{chunk-GTMPSTDI.js → chunk-4Q4L27AF.js} +2 -2
  14. package/client-dist/{chunk-YZ27TRGU.js → chunk-4SA3LZAD.js} +2 -2
  15. package/client-dist/{chunk-EVV5L3LF.js → chunk-4SDD3VFR.js} +2 -2
  16. package/client-dist/{chunk-SNRZOR27.js → chunk-4WR3JURO.js} +2 -2
  17. package/client-dist/{chunk-QKA6WOBV.js → chunk-5BAOJQJC.js} +2 -2
  18. package/client-dist/{chunk-IFF2675Y.js → chunk-5YESEEVR.js} +2 -2
  19. package/client-dist/{chunk-GDAWHJEQ.js → chunk-7CECCKGS.js} +2 -2
  20. package/client-dist/{chunk-N72DAUY2.js → chunk-7KQEZMY4.js} +2 -2
  21. package/client-dist/{chunk-PR5JV6XX.js → chunk-7LKN2H5J.js} +2 -2
  22. package/client-dist/{chunk-YYUKX4AF.js → chunk-7PEB3BOC.js} +2 -2
  23. package/client-dist/{chunk-6HZB6QSW.js → chunk-CULH4KGF.js} +2 -2
  24. package/client-dist/{chunk-P5OOFVBC.js → chunk-CWHBS3BF.js} +2 -2
  25. package/client-dist/{chunk-NEYB4VGZ.js → chunk-ED2O3QVI.js} +2 -2
  26. package/client-dist/{chunk-N4KTLLCR.js → chunk-EKLOUDYW.js} +2 -2
  27. package/client-dist/{chunk-2ZI26XMZ.js → chunk-EQMEMEMQ.js} +2 -2
  28. package/client-dist/{chunk-BWH3JLHB.js → chunk-F344AZJS.js} +2 -2
  29. package/client-dist/{chunk-E5QVIO4C.js → chunk-FE5ELX22.js} +2 -2
  30. package/client-dist/{chunk-MLGDSF43.js → chunk-HWIGSS33.js} +2 -2
  31. package/client-dist/{chunk-7IUV4ACY.js → chunk-IGQJJABX.js} +2 -2
  32. package/client-dist/{chunk-AWIEYMZV.js → chunk-IUTUQEPX.js} +2 -2
  33. package/client-dist/{chunk-4UKDXJIX.js → chunk-J7ZVFHVR.js} +2 -2
  34. package/client-dist/{chunk-FYMVJNXZ.js → chunk-JBSJWONA.js} +2 -2
  35. package/client-dist/{chunk-QIXXTQJJ.js → chunk-K6YB4Q4Y.js} +2 -2
  36. package/client-dist/{chunk-6UQHXR3E.js → chunk-M2BIMBKO.js} +2 -2
  37. package/client-dist/{chunk-I7TF6JIJ.js → chunk-MPGR64BK.js} +2 -2
  38. package/client-dist/{chunk-2DR4NRFY.js → chunk-MWX2FEYH.js} +2 -2
  39. package/client-dist/{chunk-OKZUEJZL.js → chunk-NCFK56ZV.js} +2 -2
  40. package/client-dist/{chunk-BR7XXFVN.js → chunk-OMGH7GAL.js} +2 -2
  41. package/client-dist/{chunk-SXZ6SL34.js → chunk-PFOAVOJI.js} +2 -2
  42. package/client-dist/{chunk-NQ33IXIS.js → chunk-PNT3PBKY.js} +2 -2
  43. package/client-dist/{chunk-5BYRCQ4G.js → chunk-PWM7U52X.js} +2 -2
  44. package/client-dist/{chunk-QQ2C4ATW.js → chunk-Q2XBBF3S.js} +2 -2
  45. package/client-dist/{chunk-FWVYBWXT.js → chunk-Q6DRW5RY.js} +2 -2
  46. package/client-dist/{chunk-YWLPTL5I.js → chunk-QGFGI2WD.js} +2 -2
  47. package/client-dist/{chunk-F4DZS3GH.js → chunk-QLSM7AU5.js} +2 -2
  48. package/client-dist/{chunk-PY7ZXKHG.js → chunk-RVLDL574.js} +2 -2
  49. package/client-dist/{chunk-H3QXSZIS.js → chunk-SYFEIBHY.js} +2 -2
  50. package/client-dist/{chunk-F4BNEQYE.js → chunk-TKLG6NOU.js} +2 -2
  51. package/client-dist/{chunk-UKVDEDDM.js → chunk-U2NJOYW5.js} +2 -2
  52. package/client-dist/{chunk-EUEEHSUR.js → chunk-VMHSKHAH.js} +2 -2
  53. package/client-dist/{chunk-HZSNYOA4.js → chunk-VVFKXESB.js} +2 -2
  54. package/client-dist/{chunk-66FQLE3Y.js → chunk-VYBCAMPC.js} +2 -2
  55. package/client-dist/{chunk-6RYNRTDZ.js → chunk-W3BQ3EYT.js} +2 -2
  56. package/client-dist/{chunk-QXQWNRPL.js → chunk-WCOEXEAR.js} +2 -2
  57. package/client-dist/{chunk-NIEBWTUO.js → chunk-WJTRYBJQ.js} +2 -2
  58. package/client-dist/{chunk-WTIUHUMN.js → chunk-YDEFBLVL.js} +2 -2
  59. package/client-dist/{chunk-A37XCJWY.js → chunk-YLVTK6CQ.js} +2 -2
  60. package/client-dist/{chunk-WR6NSOQ2.js → chunk-YSI2TV56.js} +2 -2
  61. package/client-dist/{chunk-WR6NSOQ2.js.map → chunk-YSI2TV56.js.map} +1 -1
  62. package/client-dist/{chunk-DZFGKIFO.js → chunk-ZKQBXFWO.js} +2 -2
  63. package/client-dist/{consultant.module-RMGDKO7R.js → consultant.module-POQU3QQP.js} +2 -2
  64. package/client-dist/{crd.module-7WOWOPYH.js → crd.module-UJQDY32U.js} +2 -2
  65. package/client-dist/{dashboard.module-UH6C2XJC.js → dashboard.module-OQ23RHCA.js} +2 -2
  66. package/client-dist/{do.module-DITA42VY.js → do.module-OJTKSFG4.js} +2 -2
  67. package/client-dist/{document-library.module-NDPVJJ3N.js → document-library.module-X4SNNCTE.js} +2 -2
  68. package/client-dist/{embedding-eval.module-JROZZ6QM.js → embedding-eval.module-XDJXQR47.js} +2 -2
  69. package/client-dist/{embedding-registry.module-OYU7CQPU.js → embedding-registry.module-JT6VKF4E.js} +2 -2
  70. package/client-dist/{err.module-M7L4RF46.js → err.module-45M6UFPK.js} +2 -2
  71. package/client-dist/{feedback.module-ZG272S6E.js → feedback.module-BXM4MEMF.js} +2 -2
  72. package/client-dist/{host-runtime-mcp.module-PVVACC4N.js → host-runtime-mcp.module-Z7QHTOFQ.js} +2 -2
  73. package/client-dist/index.html +1 -1
  74. package/client-dist/{live-dev-pipeline.module-FKNKOKZ4.js → live-dev-pipeline.module-2Q7L5OZE.js} +2 -2
  75. package/client-dist/{logs.module-MN6SDRMH.js → logs.module-VT3K4D3C.js} +2 -2
  76. package/client-dist/{main-NHPLEEM5.js → main-FAF4OLPB.js} +3 -3
  77. package/client-dist/{master-control-remote-poc.module-A3XO6MIC.js → master-control-remote-poc.module-GNRGR433.js} +2 -2
  78. package/client-dist/{mobile-app.module-QADWA6MM.js → mobile-app.module-TOGFSAHF.js} +2 -2
  79. package/client-dist/{model-registry.module-IRG2HWJO.js → model-registry.module-2WGFZ5JY.js} +2 -2
  80. package/client-dist/{oc.module-52TKAH2Q.js → oc.module-TWSBQN4R.js} +2 -2
  81. package/client-dist/{orc.module-HSTBXIQM.js → orc.module-V4FGV47K.js} +2 -2
  82. package/client-dist/{project-management.module-FL2RWRKY.js → project-management.module-3JJCH5KY.js} +2 -2
  83. package/client-dist/project-source-routed.module-HTFOG5YI.js +2 -0
  84. package/client-dist/{scheduler.module-XYY22JMT.js → scheduler.module-X7BDYQ7J.js} +2 -2
  85. package/client-dist/{session.module-N2DJOIHD.js → session.module-T2SWWTDD.js} +2 -2
  86. package/client-dist/{set.module-XW5X3ZLY.js → set.module-CGMLFMSF.js} +2 -2
  87. package/client-dist/{setup.module-B4QMBFKV.js → setup.module-TALL5C3O.js} +2 -2
  88. package/client-dist/{terminals.module-24K6SSFO.js → terminals.module-O7ZKQ3SG.js} +2 -2
  89. package/client-dist/{voice-notes-poc.module-IW7VPFDD.js → voice-notes-poc.module-7GMDVTT7.js} +2 -2
  90. package/client-dist/{wfs.module-S2SMAT5Z.js → wfs.module-XDQFGKMY.js} +2 -2
  91. package/package.json +1 -1
  92. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.d.ts +7 -0
  93. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.d.ts.map +1 -1
  94. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.js +12 -1
  95. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.js.map +1 -1
  96. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.spec.js +69 -0
  97. package/server/build/src/_modules/ccap-agent/_modules/agent-path/_modules/default-path/workspace-path.util.spec.js.map +1 -1
  98. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.d.ts.map +1 -1
  99. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.js +19 -4
  100. package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.js.map +1 -1
  101. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-handling/_collections/consts/fh-handling-tool-definition.const.d.ts.map +1 -1
  102. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-handling/_collections/consts/fh-handling-tool-definition.const.js +4 -0
  103. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/file-tools/_modules/file-handling/_collections/consts/fh-handling-tool-definition.const.js.map +1 -1
  104. package/server/build/src/_modules/ccap-agent/_modules/tools/_services/tls-execution.control-service.d.ts +9 -0
  105. package/server/build/src/_modules/ccap-agent/_modules/tools/_services/tls-execution.control-service.d.ts.map +1 -1
  106. package/server/build/src/_modules/ccap-agent/_modules/tools/_services/tls-execution.control-service.js +40 -2
  107. package/server/build/src/_modules/ccap-agent/_modules/tools/_services/tls-execution.control-service.js.map +1 -1
  108. package/client-dist/project-source-routed.module-N76TUCOI.js +0 -2
  109. /package/client-dist/{agent-instances.module-T6EFJFPE.js.map → agent-instances.module-CWOIQQ77.js.map} +0 -0
  110. /package/client-dist/{ca.module-NCBI74FP.js.map → ca.module-WN5ZJX3W.js.map} +0 -0
  111. /package/client-dist/{cc-usage-dashboard.component-Q3FBUIIR.js.map → cc-usage-dashboard.component-26JCGRDJ.js.map} +0 -0
  112. /package/client-dist/{cc.module-CIY6QMB5.js.map → cc.module-OTFOVDK6.js.map} +0 -0
  113. /package/client-dist/{chunk-VTB3IOVV.js.map → chunk-2XWVIUOT.js.map} +0 -0
  114. /package/client-dist/{chunk-3N2JTN7N.js.map → chunk-35GZKIHM.js.map} +0 -0
  115. /package/client-dist/{chunk-MS2KQ2G4.js.map → chunk-3B43AFFF.js.map} +0 -0
  116. /package/client-dist/{chunk-Q7ORWYDO.js.map → chunk-3BNJTYQO.js.map} +0 -0
  117. /package/client-dist/{chunk-M6EVLEFQ.js.map → chunk-3UWSVQYY.js.map} +0 -0
  118. /package/client-dist/{chunk-QP53M3ES.js.map → chunk-43DAQMAP.js.map} +0 -0
  119. /package/client-dist/{chunk-YXBF6EUR.js.map → chunk-4DVJMOGV.js.map} +0 -0
  120. /package/client-dist/{chunk-ASAT75IU.js.map → chunk-4HBQE4BE.js.map} +0 -0
  121. /package/client-dist/{chunk-GTMPSTDI.js.map → chunk-4Q4L27AF.js.map} +0 -0
  122. /package/client-dist/{chunk-YZ27TRGU.js.map → chunk-4SA3LZAD.js.map} +0 -0
  123. /package/client-dist/{chunk-EVV5L3LF.js.map → chunk-4SDD3VFR.js.map} +0 -0
  124. /package/client-dist/{chunk-SNRZOR27.js.map → chunk-4WR3JURO.js.map} +0 -0
  125. /package/client-dist/{chunk-QKA6WOBV.js.map → chunk-5BAOJQJC.js.map} +0 -0
  126. /package/client-dist/{chunk-IFF2675Y.js.map → chunk-5YESEEVR.js.map} +0 -0
  127. /package/client-dist/{chunk-GDAWHJEQ.js.map → chunk-7CECCKGS.js.map} +0 -0
  128. /package/client-dist/{chunk-N72DAUY2.js.map → chunk-7KQEZMY4.js.map} +0 -0
  129. /package/client-dist/{chunk-PR5JV6XX.js.map → chunk-7LKN2H5J.js.map} +0 -0
  130. /package/client-dist/{chunk-YYUKX4AF.js.map → chunk-7PEB3BOC.js.map} +0 -0
  131. /package/client-dist/{chunk-6HZB6QSW.js.map → chunk-CULH4KGF.js.map} +0 -0
  132. /package/client-dist/{chunk-P5OOFVBC.js.map → chunk-CWHBS3BF.js.map} +0 -0
  133. /package/client-dist/{chunk-NEYB4VGZ.js.map → chunk-ED2O3QVI.js.map} +0 -0
  134. /package/client-dist/{chunk-N4KTLLCR.js.map → chunk-EKLOUDYW.js.map} +0 -0
  135. /package/client-dist/{chunk-2ZI26XMZ.js.map → chunk-EQMEMEMQ.js.map} +0 -0
  136. /package/client-dist/{chunk-BWH3JLHB.js.map → chunk-F344AZJS.js.map} +0 -0
  137. /package/client-dist/{chunk-E5QVIO4C.js.map → chunk-FE5ELX22.js.map} +0 -0
  138. /package/client-dist/{chunk-MLGDSF43.js.map → chunk-HWIGSS33.js.map} +0 -0
  139. /package/client-dist/{chunk-7IUV4ACY.js.map → chunk-IGQJJABX.js.map} +0 -0
  140. /package/client-dist/{chunk-AWIEYMZV.js.map → chunk-IUTUQEPX.js.map} +0 -0
  141. /package/client-dist/{chunk-4UKDXJIX.js.map → chunk-J7ZVFHVR.js.map} +0 -0
  142. /package/client-dist/{chunk-FYMVJNXZ.js.map → chunk-JBSJWONA.js.map} +0 -0
  143. /package/client-dist/{chunk-QIXXTQJJ.js.map → chunk-K6YB4Q4Y.js.map} +0 -0
  144. /package/client-dist/{chunk-6UQHXR3E.js.map → chunk-M2BIMBKO.js.map} +0 -0
  145. /package/client-dist/{chunk-I7TF6JIJ.js.map → chunk-MPGR64BK.js.map} +0 -0
  146. /package/client-dist/{chunk-2DR4NRFY.js.map → chunk-MWX2FEYH.js.map} +0 -0
  147. /package/client-dist/{chunk-OKZUEJZL.js.map → chunk-NCFK56ZV.js.map} +0 -0
  148. /package/client-dist/{chunk-BR7XXFVN.js.map → chunk-OMGH7GAL.js.map} +0 -0
  149. /package/client-dist/{chunk-SXZ6SL34.js.map → chunk-PFOAVOJI.js.map} +0 -0
  150. /package/client-dist/{chunk-NQ33IXIS.js.map → chunk-PNT3PBKY.js.map} +0 -0
  151. /package/client-dist/{chunk-5BYRCQ4G.js.map → chunk-PWM7U52X.js.map} +0 -0
  152. /package/client-dist/{chunk-QQ2C4ATW.js.map → chunk-Q2XBBF3S.js.map} +0 -0
  153. /package/client-dist/{chunk-FWVYBWXT.js.map → chunk-Q6DRW5RY.js.map} +0 -0
  154. /package/client-dist/{chunk-YWLPTL5I.js.map → chunk-QGFGI2WD.js.map} +0 -0
  155. /package/client-dist/{chunk-F4DZS3GH.js.map → chunk-QLSM7AU5.js.map} +0 -0
  156. /package/client-dist/{chunk-PY7ZXKHG.js.map → chunk-RVLDL574.js.map} +0 -0
  157. /package/client-dist/{chunk-H3QXSZIS.js.map → chunk-SYFEIBHY.js.map} +0 -0
  158. /package/client-dist/{chunk-F4BNEQYE.js.map → chunk-TKLG6NOU.js.map} +0 -0
  159. /package/client-dist/{chunk-UKVDEDDM.js.map → chunk-U2NJOYW5.js.map} +0 -0
  160. /package/client-dist/{chunk-EUEEHSUR.js.map → chunk-VMHSKHAH.js.map} +0 -0
  161. /package/client-dist/{chunk-HZSNYOA4.js.map → chunk-VVFKXESB.js.map} +0 -0
  162. /package/client-dist/{chunk-66FQLE3Y.js.map → chunk-VYBCAMPC.js.map} +0 -0
  163. /package/client-dist/{chunk-6RYNRTDZ.js.map → chunk-W3BQ3EYT.js.map} +0 -0
  164. /package/client-dist/{chunk-QXQWNRPL.js.map → chunk-WCOEXEAR.js.map} +0 -0
  165. /package/client-dist/{chunk-NIEBWTUO.js.map → chunk-WJTRYBJQ.js.map} +0 -0
  166. /package/client-dist/{chunk-WTIUHUMN.js.map → chunk-YDEFBLVL.js.map} +0 -0
  167. /package/client-dist/{chunk-A37XCJWY.js.map → chunk-YLVTK6CQ.js.map} +0 -0
  168. /package/client-dist/{chunk-DZFGKIFO.js.map → chunk-ZKQBXFWO.js.map} +0 -0
  169. /package/client-dist/{consultant.module-RMGDKO7R.js.map → consultant.module-POQU3QQP.js.map} +0 -0
  170. /package/client-dist/{crd.module-7WOWOPYH.js.map → crd.module-UJQDY32U.js.map} +0 -0
  171. /package/client-dist/{dashboard.module-UH6C2XJC.js.map → dashboard.module-OQ23RHCA.js.map} +0 -0
  172. /package/client-dist/{do.module-DITA42VY.js.map → do.module-OJTKSFG4.js.map} +0 -0
  173. /package/client-dist/{document-library.module-NDPVJJ3N.js.map → document-library.module-X4SNNCTE.js.map} +0 -0
  174. /package/client-dist/{embedding-eval.module-JROZZ6QM.js.map → embedding-eval.module-XDJXQR47.js.map} +0 -0
  175. /package/client-dist/{embedding-registry.module-OYU7CQPU.js.map → embedding-registry.module-JT6VKF4E.js.map} +0 -0
  176. /package/client-dist/{err.module-M7L4RF46.js.map → err.module-45M6UFPK.js.map} +0 -0
  177. /package/client-dist/{feedback.module-ZG272S6E.js.map → feedback.module-BXM4MEMF.js.map} +0 -0
  178. /package/client-dist/{host-runtime-mcp.module-PVVACC4N.js.map → host-runtime-mcp.module-Z7QHTOFQ.js.map} +0 -0
  179. /package/client-dist/{live-dev-pipeline.module-FKNKOKZ4.js.map → live-dev-pipeline.module-2Q7L5OZE.js.map} +0 -0
  180. /package/client-dist/{logs.module-MN6SDRMH.js.map → logs.module-VT3K4D3C.js.map} +0 -0
  181. /package/client-dist/{main-NHPLEEM5.js.map → main-FAF4OLPB.js.map} +0 -0
  182. /package/client-dist/{master-control-remote-poc.module-A3XO6MIC.js.map → master-control-remote-poc.module-GNRGR433.js.map} +0 -0
  183. /package/client-dist/{mobile-app.module-QADWA6MM.js.map → mobile-app.module-TOGFSAHF.js.map} +0 -0
  184. /package/client-dist/{model-registry.module-IRG2HWJO.js.map → model-registry.module-2WGFZ5JY.js.map} +0 -0
  185. /package/client-dist/{oc.module-52TKAH2Q.js.map → oc.module-TWSBQN4R.js.map} +0 -0
  186. /package/client-dist/{orc.module-HSTBXIQM.js.map → orc.module-V4FGV47K.js.map} +0 -0
  187. /package/client-dist/{project-management.module-FL2RWRKY.js.map → project-management.module-3JJCH5KY.js.map} +0 -0
  188. /package/client-dist/{project-source-routed.module-N76TUCOI.js.map → project-source-routed.module-HTFOG5YI.js.map} +0 -0
  189. /package/client-dist/{scheduler.module-XYY22JMT.js.map → scheduler.module-X7BDYQ7J.js.map} +0 -0
  190. /package/client-dist/{session.module-N2DJOIHD.js.map → session.module-T2SWWTDD.js.map} +0 -0
  191. /package/client-dist/{set.module-XW5X3ZLY.js.map → set.module-CGMLFMSF.js.map} +0 -0
  192. /package/client-dist/{setup.module-B4QMBFKV.js.map → setup.module-TALL5C3O.js.map} +0 -0
  193. /package/client-dist/{terminals.module-24K6SSFO.js.map → terminals.module-O7ZKQ3SG.js.map} +0 -0
  194. /package/client-dist/{voice-notes-poc.module-IW7VPFDD.js.map → voice-notes-poc.module-7GMDVTT7.js.map} +0 -0
  195. /package/client-dist/{wfs.module-S2SMAT5Z.js.map → wfs.module-XDQFGKMY.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{b as mi,c as hi,d as Te}from"./chunk-I7TF6JIJ.js";import{c as Tt}from"./chunk-ASAT75IU.js";import{a as fi}from"./chunk-M6EVLEFQ.js";import{a as di}from"./chunk-NEYB4VGZ.js";import{a as gi}from"./chunk-A37XCJWY.js";import{f as si,i as ai,n as li,o as ci,p as pi,v as ui}from"./chunk-EO4DNTT4.js";import{a as sn}from"./chunk-5UPNU54P.js";import{j as Et}from"./chunk-MS2KQ2G4.js";import{p as on}from"./chunk-WR6NSOQ2.js";import{$a as Y,C as se,Cb as vt,D as Ve,Fa as g,G as ei,Ga as T,Ha as tn,Hb as ri,Ia as nn,J as P,K as O,Kb as oi,L as ae,M as Qe,T as Xe,Ta as Ge,U as fe,Ua as rn,W as yt,X as wt,Z as d,_ as ti,a as oe,aa as G,ab as Q,b as Ue,da as A,fa as Re,ga as M,h as en,hb as w,ja as W,jb as ii,k as D,la as k,na as St,oa as ve,pa as Ee,qa as c,ra as p,sa as v,ua as F,ub as je,va as z,wa as _,xa as ni,y as He,ya as et}from"./chunk-TBMJSIBB.js";var{entries:vi,setPrototypeOf:_i,isFrozen:fr,getPrototypeOf:gr,getOwnPropertyDescriptor:_r}=Object,{freeze:te,seal:ce,create:Rt}=Object,{apply:mn,construct:hn}=typeof Reflect<"u"&&Reflect;te||(te=function(n){return n});ce||(ce=function(n){return n});mn||(mn=function(n,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.apply(e,i)});hn||(hn=function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new n(...r)});var At=ne(Array.prototype.forEach),xr=ne(Array.prototype.lastIndexOf),xi=ne(Array.prototype.pop),tt=ne(Array.prototype.push),br=ne(Array.prototype.splice),$t=ne(String.prototype.toLowerCase),an=ne(String.prototype.toString),ln=ne(String.prototype.match),nt=ne(String.prototype.replace),Cr=ne(String.prototype.indexOf),kr=ne(String.prototype.trim),le=ne(Object.prototype.hasOwnProperty),ee=ne(RegExp.prototype.test),it=yr(TypeError);function ne(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return mn(t,n,r)}}function yr(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return hn(t,e)}}function E(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;_i&&_i(t,null);let r=n.length;for(;r--;){let i=n[r];if(typeof i=="string"){let o=e(i);o!==i&&(fr(n)||(n[r]=o),i=o)}t[i]=!0}return t}function wr(t){for(let n=0;n<t.length;n++)le(t,n)||(t[n]=null);return t}function ge(t){let n=Rt(null);for(let[e,r]of vi(t))le(t,e)&&(Array.isArray(r)?n[e]=wr(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=ge(r):n[e]=r);return n}function rt(t,n){for(;t!==null;){let r=_r(t,n);if(r){if(r.get)return ne(r.get);if(typeof r.value=="function")return ne(r.value)}t=gr(t)}function e(){return null}return e}var bi=te(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cn=te(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pn=te(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sr=te(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),un=te(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vr=te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ci=te(["#text"]),ki=te(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),dn=te(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yi=te(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mt=te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Er=ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tr=ce(/<%[\w\W]*|[\w\W]*%>/gm),Ar=ce(/\$\{[\w\W]*/gm),Mr=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rr=ce(/^aria-[\-\w]+$/),Ei=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ce(/^(?:\w+script|data):/i),Lr=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ti=ce(/^html$/i),Ir=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),wi=Object.freeze({__proto__:null,ARIA_ATTR:Rr,ATTR_WHITESPACE:Lr,CUSTOM_ELEMENT:Ir,DATA_ATTR:Mr,DOCTYPE_NAME:Ti,ERB_EXPR:Tr,IS_ALLOWED_URI:Ei,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Er,TMPLIT_EXPR:Ar}),ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Br=function(){return typeof window>"u"?null:window},Dr=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return n.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Si=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ai(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Br(),n=b=>Ai(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==ot.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,r=e,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,pe=rt(L,"cloneNode"),ut=rt(L,"remove"),dt=rt(L,"nextSibling"),mt=rt(L,"childNodes"),Be=rt(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let q,be="",{implementation:Ce,createNodeIterator:Xi,createDocumentFragment:er,getElementsByTagName:tr}=e,{importNode:nr}=r,X=Si();n.isSupported=typeof vi=="function"&&typeof Be=="function"&&Ce&&Ce.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ft,ERB_EXPR:Ut,TMPLIT_EXPR:Ht,DATA_ATTR:ir,ARIA_ATTR:rr,IS_SCRIPT_OR_DATA:or,ATTR_WHITESPACE:Rn,CUSTOM_ELEMENT:sr}=wi,{IS_ALLOWED_URI:$n}=wi,j=null,Ln=E({},[...bi,...cn,...pn,...un,...Ci]),K=null,In=E({},[...ki,...dn,...yi,...Mt]),U=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,ht=null,Se=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bn=!0,Vt=!0,Dn=!1,Pn=!0,De=!1,ft=!0,Ae=!1,Gt=!1,jt=!1,Pe=!1,gt=!1,_t=!1,On=!0,zn=!1,ar="user-content-",Wt=!0,Ze=!1,Oe={},me=null,qt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nn=null,Fn=E({},["audio","video","img","source","image","track"]),Kt=null,Un=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",ze=ke,Jt=!1,Zt=null,lr=E({},[xt,bt,ke],an),Ct=E({},["mi","mo","mn","ms","mtext"]),kt=E({},["annotation-xml"]),cr=E({},["title","style","font","a","script"]),Ye=null,pr=["application/xhtml+xml","text/html"],ur="text/html",V=null,Ne=null,dr=e.createElement("form"),Hn=function(a){return a instanceof RegExp||a instanceof Function},Yt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ne&&Ne===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),Ye=pr.indexOf(a.PARSER_MEDIA_TYPE)===-1?ur:a.PARSER_MEDIA_TYPE,V=Ye==="application/xhtml+xml"?an:$t,j=le(a,"ALLOWED_TAGS")?E({},a.ALLOWED_TAGS,V):Ln,K=le(a,"ALLOWED_ATTR")?E({},a.ALLOWED_ATTR,V):In,Zt=le(a,"ALLOWED_NAMESPACES")?E({},a.ALLOWED_NAMESPACES,an):lr,Kt=le(a,"ADD_URI_SAFE_ATTR")?E(ge(Un),a.ADD_URI_SAFE_ATTR,V):Un,Nn=le(a,"ADD_DATA_URI_TAGS")?E(ge(Fn),a.ADD_DATA_URI_TAGS,V):Fn,me=le(a,"FORBID_CONTENTS")?E({},a.FORBID_CONTENTS,V):qt,Je=le(a,"FORBID_TAGS")?E({},a.FORBID_TAGS,V):ge({}),ht=le(a,"FORBID_ATTR")?E({},a.FORBID_ATTR,V):ge({}),Oe=le(a,"USE_PROFILES")?a.USE_PROFILES:!1,Bn=a.ALLOW_ARIA_ATTR!==!1,Vt=a.ALLOW_DATA_ATTR!==!1,Dn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=a.SAFE_FOR_TEMPLATES||!1,ft=a.SAFE_FOR_XML!==!1,Ae=a.WHOLE_DOCUMENT||!1,Pe=a.RETURN_DOM||!1,gt=a.RETURN_DOM_FRAGMENT||!1,_t=a.RETURN_TRUSTED_TYPE||!1,jt=a.FORCE_BODY||!1,On=a.SANITIZE_DOM!==!1,zn=a.SANITIZE_NAMED_PROPS||!1,Wt=a.KEEP_CONTENT!==!1,Ze=a.IN_PLACE||!1,$n=a.ALLOWED_URI_REGEXP||Ei,ze=a.NAMESPACE||ke,Ct=a.MATHML_TEXT_INTEGRATION_POINTS||Ct,kt=a.HTML_INTEGRATION_POINTS||kt,U=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Vt=!1),gt&&(Pe=!0),Oe&&(j=E({},Ci),K=Rt(null),Oe.html===!0&&(E(j,bi),E(K,ki)),Oe.svg===!0&&(E(j,cn),E(K,dn),E(K,Mt)),Oe.svgFilters===!0&&(E(j,pn),E(K,dn),E(K,Mt)),Oe.mathMl===!0&&(E(j,un),E(K,yi),E(K,Mt))),le(a,"ADD_TAGS")||(Se.tagCheck=null),le(a,"ADD_ATTR")||(Se.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?Se.tagCheck=a.ADD_TAGS:(j===Ln&&(j=ge(j)),E(j,a.ADD_TAGS,V))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?Se.attributeCheck=a.ADD_ATTR:(K===In&&(K=ge(K)),E(K,a.ADD_ATTR,V))),a.ADD_URI_SAFE_ATTR&&E(Kt,a.ADD_URI_SAFE_ATTR,V),a.FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.FORBID_CONTENTS,V)),a.ADD_FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.ADD_FORBID_CONTENTS,V)),Wt&&(j["#text"]=!0),Ae&&E(j,["html","head","body"]),j.table&&(E(j,["tbody"]),delete Je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=a.TRUSTED_TYPES_POLICY,be=q.createHTML("")}else q===void 0&&(q=Dr(I,i)),q!==null&&typeof be=="string"&&(be=q.createHTML(""));te&&te(a),Ne=a}},Vn=E({},[...cn,...pn,...Sr]),Gn=E({},[...un,...vr]),mr=function(a){let f=Be(a);(!f||!f.tagName)&&(f={namespaceURI:ze,tagName:"template"});let x=$t(a.tagName),B=$t(f.tagName);return Zt[a.namespaceURI]?a.namespaceURI===bt?f.namespaceURI===ke?x==="svg":f.namespaceURI===xt?x==="svg"&&(B==="annotation-xml"||Ct[B]):!!Vn[x]:a.namespaceURI===xt?f.namespaceURI===ke?x==="math":f.namespaceURI===bt?x==="math"&&kt[B]:!!Gn[x]:a.namespaceURI===ke?f.namespaceURI===bt&&!kt[B]||f.namespaceURI===xt&&!Ct[B]?!1:!Gn[x]&&(cr[x]||!Vn[x]):!!(Ye==="application/xhtml+xml"&&Zt[a.namespaceURI]):!1},he=function(a){tt(n.removed,{element:a});try{Be(a).removeChild(a)}catch{ut(a)}},Me=function(a,f){try{tt(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{tt(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(Pe||gt)try{he(f)}catch{}else try{f.setAttribute(a,"")}catch{}},jn=function(a){let f=null,x=null;if(jt)a="<remove></remove>"+a;else{let H=ln(a,/^[\r\n\t ]+/);x=H&&H[0]}Ye==="application/xhtml+xml"&&ze===ke&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let B=q?q.createHTML(a):a;if(ze===ke)try{f=new S().parseFromString(B,Ye)}catch{}if(!f||!f.documentElement){f=Ce.createDocument(ze,"template",null);try{f.documentElement.innerHTML=Jt?be:B}catch{}}let Z=f.body||f.documentElement;return a&&x&&Z.insertBefore(e.createTextNode(x),Z.childNodes[0]||null),ze===ke?tr.call(f,Ae?"html":"body")[0]:Ae?f.documentElement:Z},Wn=function(a){return Xi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Qt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},qn=function(a){return typeof u=="function"&&a instanceof u};function ye(b,a,f){At(b,x=>{x.call(n,a,f,Ne)})}let Kn=function(a){let f=null;if(ye(X.beforeSanitizeElements,a,null),Qt(a))return he(a),!0;let x=V(a.nodeName);if(ye(X.uponSanitizeElement,a,{tagName:x,allowedTags:j}),ft&&a.hasChildNodes()&&!qn(a.firstElementChild)&&ee(/<[/\w!]/g,a.innerHTML)&&ee(/<[/\w!]/g,a.textContent)||a.nodeType===ot.progressingInstruction||ft&&a.nodeType===ot.comment&&ee(/<[/\w]/g,a.data))return he(a),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(x))&&(!j[x]||Je[x])){if(!Je[x]&&Zn(x)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x)))return!1;if(Wt&&!me[x]){let B=Be(a)||a.parentNode,Z=mt(a)||a.childNodes;if(Z&&B){let H=Z.length;for(let re=H-1;re>=0;--re){let we=pe(Z[re],!0);we.__removalCount=(a.__removalCount||0)+1,B.insertBefore(we,dt(a))}}}return he(a),!0}return a instanceof l&&!mr(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&ee(/<\/no(script|embed|frames)/i,a.innerHTML)?(he(a),!0):(De&&a.nodeType===ot.text&&(f=a.textContent,At([Ft,Ut,Ht],B=>{f=nt(f,B," ")}),a.textContent!==f&&(tt(n.removed,{element:a.cloneNode()}),a.textContent=f)),ye(X.afterSanitizeElements,a,null),!1)},Jn=function(a,f,x){if(ht[f]||On&&(f==="id"||f==="name")&&(x in e||x in dr))return!1;if(!(Vt&&!ht[f]&&ee(ir,f))){if(!(Bn&&ee(rr,f))){if(!(Se.attributeCheck instanceof Function&&Se.attributeCheck(f,a))){if(!K[f]||ht[f]){if(!(Zn(a)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,a)||U.tagNameCheck instanceof Function&&U.tagNameCheck(a))&&(U.attributeNameCheck instanceof RegExp&&ee(U.attributeNameCheck,f)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(f,a))||f==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))))return!1}else if(!Kt[f]){if(!ee($n,nt(x,Rn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&Cr(x,"data:")===0&&Nn[a])){if(!(Dn&&!ee(or,nt(x,Rn,"")))){if(x)return!1}}}}}}}return!0},Zn=function(a){return a!=="annotation-xml"&&ln(a,sr)},Yn=function(a){ye(X.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||Qt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},B=f.length;for(;B--;){let Z=f[B],{name:H,namespaceURI:re,value:we}=Z,Fe=V(H),Xt=we,J=H==="value"?Xt:kr(Xt);if(x.attrName=Fe,x.attrValue=J,x.keepAttr=!0,x.forceKeepAttr=void 0,ye(X.uponSanitizeAttribute,a,x),J=x.attrValue,zn&&(Fe==="id"||Fe==="name")&&(Me(H,a),J=ar+J),ft&&ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,J)){Me(H,a);continue}if(Fe==="attributename"&&ln(J,"href")){Me(H,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Me(H,a);continue}if(!Pn&&ee(/\/>/i,J)){Me(H,a);continue}De&&At([Ft,Ut,Ht],Xn=>{J=nt(J,Xn," ")});let Qn=V(a.nodeName);if(!Jn(Qn,Fe,J)){Me(H,a);continue}if(q&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!re)switch(I.getAttributeType(Qn,Fe)){case"TrustedHTML":{J=q.createHTML(J);break}case"TrustedScriptURL":{J=q.createScriptURL(J);break}}if(J!==Xt)try{re?a.setAttributeNS(re,H,J):a.setAttribute(H,J),Qt(a)?he(a):xi(n.removed)}catch{Me(H,a)}}ye(X.afterSanitizeAttributes,a,null)},hr=function b(a){let f=null,x=Wn(a);for(ye(X.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)ye(X.uponSanitizeShadowNode,f,null),Kn(f),Yn(f),f.content instanceof o&&b(f.content);ye(X.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,B=null,Z=null;if(Jt=!b,Jt&&(b="<!-->"),typeof b!="string"&&!qn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw it("dirty is not a string, aborting")}else throw it("toString is not a function");if(!n.isSupported)return b;if(Gt||Yt(a),n.removed=[],typeof b=="string"&&(Ze=!1),Ze){if(b.nodeName){let we=V(b.nodeName);if(!j[we]||Je[we])throw it("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)f=jn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===ot.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!Pe&&!De&&!Ae&&b.indexOf("<")===-1)return q&&_t?q.createHTML(b):b;if(f=jn(b),!f)return Pe?null:_t?be:""}f&&jt&&he(f.firstChild);let H=Wn(Ze?b:f);for(;B=H.nextNode();)Kn(B),Yn(B),B.content instanceof o&&hr(B.content);if(Ze)return b;if(Pe){if(gt)for(Z=er.call(f.ownerDocument);f.firstChild;)Z.appendChild(f.firstChild);else Z=f;return(K.shadowroot||K.shadowrootmode)&&(Z=nr.call(r,Z,!0)),Z}let re=Ae?f.outerHTML:f.innerHTML;return Ae&&j["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&ee(Ti,f.ownerDocument.doctype.name)&&(re="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
1
+ import{b as mi,c as hi,d as Te}from"./chunk-MPGR64BK.js";import{c as Tt}from"./chunk-4HBQE4BE.js";import{a as fi}from"./chunk-3UWSVQYY.js";import{a as di}from"./chunk-ED2O3QVI.js";import{a as gi}from"./chunk-YLVTK6CQ.js";import{f as si,i as ai,n as li,o as ci,p as pi,v as ui}from"./chunk-EO4DNTT4.js";import{a as sn}from"./chunk-5UPNU54P.js";import{j as Et}from"./chunk-3B43AFFF.js";import{p as on}from"./chunk-YSI2TV56.js";import{$a as Y,C as se,Cb as vt,D as Ve,Fa as g,G as ei,Ga as T,Ha as tn,Hb as ri,Ia as nn,J as P,K as O,Kb as oi,L as ae,M as Qe,T as Xe,Ta as Ge,U as fe,Ua as rn,W as yt,X as wt,Z as d,_ as ti,a as oe,aa as G,ab as Q,b as Ue,da as A,fa as Re,ga as M,h as en,hb as w,ja as W,jb as ii,k as D,la as k,na as St,oa as ve,pa as Ee,qa as c,ra as p,sa as v,ua as F,ub as je,va as z,wa as _,xa as ni,y as He,ya as et}from"./chunk-TBMJSIBB.js";var{entries:vi,setPrototypeOf:_i,isFrozen:fr,getPrototypeOf:gr,getOwnPropertyDescriptor:_r}=Object,{freeze:te,seal:ce,create:Rt}=Object,{apply:mn,construct:hn}=typeof Reflect<"u"&&Reflect;te||(te=function(n){return n});ce||(ce=function(n){return n});mn||(mn=function(n,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.apply(e,i)});hn||(hn=function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new n(...r)});var At=ne(Array.prototype.forEach),xr=ne(Array.prototype.lastIndexOf),xi=ne(Array.prototype.pop),tt=ne(Array.prototype.push),br=ne(Array.prototype.splice),$t=ne(String.prototype.toLowerCase),an=ne(String.prototype.toString),ln=ne(String.prototype.match),nt=ne(String.prototype.replace),Cr=ne(String.prototype.indexOf),kr=ne(String.prototype.trim),le=ne(Object.prototype.hasOwnProperty),ee=ne(RegExp.prototype.test),it=yr(TypeError);function ne(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return mn(t,n,r)}}function yr(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return hn(t,e)}}function E(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;_i&&_i(t,null);let r=n.length;for(;r--;){let i=n[r];if(typeof i=="string"){let o=e(i);o!==i&&(fr(n)||(n[r]=o),i=o)}t[i]=!0}return t}function wr(t){for(let n=0;n<t.length;n++)le(t,n)||(t[n]=null);return t}function ge(t){let n=Rt(null);for(let[e,r]of vi(t))le(t,e)&&(Array.isArray(r)?n[e]=wr(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=ge(r):n[e]=r);return n}function rt(t,n){for(;t!==null;){let r=_r(t,n);if(r){if(r.get)return ne(r.get);if(typeof r.value=="function")return ne(r.value)}t=gr(t)}function e(){return null}return e}var bi=te(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cn=te(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pn=te(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sr=te(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),un=te(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vr=te(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ci=te(["#text"]),ki=te(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),dn=te(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yi=te(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Mt=te(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Er=ce(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tr=ce(/<%[\w\W]*|[\w\W]*%>/gm),Ar=ce(/\$\{[\w\W]*/gm),Mr=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Rr=ce(/^aria-[\-\w]+$/),Ei=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ce(/^(?:\w+script|data):/i),Lr=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ti=ce(/^html$/i),Ir=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),wi=Object.freeze({__proto__:null,ARIA_ATTR:Rr,ATTR_WHITESPACE:Lr,CUSTOM_ELEMENT:Ir,DATA_ATTR:Mr,DOCTYPE_NAME:Ti,ERB_EXPR:Tr,IS_ALLOWED_URI:Ei,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Er,TMPLIT_EXPR:Ar}),ot={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Br=function(){return typeof window>"u"?null:window},Dr=function(n,e){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));let o="dompurify"+(r?"#"+r:"");try{return n.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Si=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ai(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Br(),n=b=>Ai(b);if(n.version="3.3.3",n.removed=[],!t||!t.document||t.document.nodeType!==ot.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t,r=e,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:u,Element:l,NodeFilter:h,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:C,DOMParser:S,trustedTypes:I}=t,L=l.prototype,pe=rt(L,"cloneNode"),ut=rt(L,"remove"),dt=rt(L,"nextSibling"),mt=rt(L,"childNodes"),Be=rt(L,"parentNode");if(typeof s=="function"){let b=e.createElement("template");b.content&&b.content.ownerDocument&&(e=b.content.ownerDocument)}let q,be="",{implementation:Ce,createNodeIterator:Xi,createDocumentFragment:er,getElementsByTagName:tr}=e,{importNode:nr}=r,X=Si();n.isSupported=typeof vi=="function"&&typeof Be=="function"&&Ce&&Ce.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ft,ERB_EXPR:Ut,TMPLIT_EXPR:Ht,DATA_ATTR:ir,ARIA_ATTR:rr,IS_SCRIPT_OR_DATA:or,ATTR_WHITESPACE:Rn,CUSTOM_ELEMENT:sr}=wi,{IS_ALLOWED_URI:$n}=wi,j=null,Ln=E({},[...bi,...cn,...pn,...un,...Ci]),K=null,In=E({},[...ki,...dn,...yi,...Mt]),U=Object.seal(Rt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Je=null,ht=null,Se=Object.seal(Rt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Bn=!0,Vt=!0,Dn=!1,Pn=!0,De=!1,ft=!0,Ae=!1,Gt=!1,jt=!1,Pe=!1,gt=!1,_t=!1,On=!0,zn=!1,ar="user-content-",Wt=!0,Ze=!1,Oe={},me=null,qt=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Nn=null,Fn=E({},["audio","video","img","source","image","track"]),Kt=null,Un=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",ke="http://www.w3.org/1999/xhtml",ze=ke,Jt=!1,Zt=null,lr=E({},[xt,bt,ke],an),Ct=E({},["mi","mo","mn","ms","mtext"]),kt=E({},["annotation-xml"]),cr=E({},["title","style","font","a","script"]),Ye=null,pr=["application/xhtml+xml","text/html"],ur="text/html",V=null,Ne=null,dr=e.createElement("form"),Hn=function(a){return a instanceof RegExp||a instanceof Function},Yt=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ne&&Ne===a)){if((!a||typeof a!="object")&&(a={}),a=ge(a),Ye=pr.indexOf(a.PARSER_MEDIA_TYPE)===-1?ur:a.PARSER_MEDIA_TYPE,V=Ye==="application/xhtml+xml"?an:$t,j=le(a,"ALLOWED_TAGS")?E({},a.ALLOWED_TAGS,V):Ln,K=le(a,"ALLOWED_ATTR")?E({},a.ALLOWED_ATTR,V):In,Zt=le(a,"ALLOWED_NAMESPACES")?E({},a.ALLOWED_NAMESPACES,an):lr,Kt=le(a,"ADD_URI_SAFE_ATTR")?E(ge(Un),a.ADD_URI_SAFE_ATTR,V):Un,Nn=le(a,"ADD_DATA_URI_TAGS")?E(ge(Fn),a.ADD_DATA_URI_TAGS,V):Fn,me=le(a,"FORBID_CONTENTS")?E({},a.FORBID_CONTENTS,V):qt,Je=le(a,"FORBID_TAGS")?E({},a.FORBID_TAGS,V):ge({}),ht=le(a,"FORBID_ATTR")?E({},a.FORBID_ATTR,V):ge({}),Oe=le(a,"USE_PROFILES")?a.USE_PROFILES:!1,Bn=a.ALLOW_ARIA_ATTR!==!1,Vt=a.ALLOW_DATA_ATTR!==!1,Dn=a.ALLOW_UNKNOWN_PROTOCOLS||!1,Pn=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=a.SAFE_FOR_TEMPLATES||!1,ft=a.SAFE_FOR_XML!==!1,Ae=a.WHOLE_DOCUMENT||!1,Pe=a.RETURN_DOM||!1,gt=a.RETURN_DOM_FRAGMENT||!1,_t=a.RETURN_TRUSTED_TYPE||!1,jt=a.FORCE_BODY||!1,On=a.SANITIZE_DOM!==!1,zn=a.SANITIZE_NAMED_PROPS||!1,Wt=a.KEEP_CONTENT!==!1,Ze=a.IN_PLACE||!1,$n=a.ALLOWED_URI_REGEXP||Ei,ze=a.NAMESPACE||ke,Ct=a.MATHML_TEXT_INTEGRATION_POINTS||Ct,kt=a.HTML_INTEGRATION_POINTS||kt,U=a.CUSTOM_ELEMENT_HANDLING||{},a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=a.CUSTOM_ELEMENT_HANDLING.tagNameCheck),a.CUSTOM_ELEMENT_HANDLING&&Hn(a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=a.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),a.CUSTOM_ELEMENT_HANDLING&&typeof a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=a.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Vt=!1),gt&&(Pe=!0),Oe&&(j=E({},Ci),K=Rt(null),Oe.html===!0&&(E(j,bi),E(K,ki)),Oe.svg===!0&&(E(j,cn),E(K,dn),E(K,Mt)),Oe.svgFilters===!0&&(E(j,pn),E(K,dn),E(K,Mt)),Oe.mathMl===!0&&(E(j,un),E(K,yi),E(K,Mt))),le(a,"ADD_TAGS")||(Se.tagCheck=null),le(a,"ADD_ATTR")||(Se.attributeCheck=null),a.ADD_TAGS&&(typeof a.ADD_TAGS=="function"?Se.tagCheck=a.ADD_TAGS:(j===Ln&&(j=ge(j)),E(j,a.ADD_TAGS,V))),a.ADD_ATTR&&(typeof a.ADD_ATTR=="function"?Se.attributeCheck=a.ADD_ATTR:(K===In&&(K=ge(K)),E(K,a.ADD_ATTR,V))),a.ADD_URI_SAFE_ATTR&&E(Kt,a.ADD_URI_SAFE_ATTR,V),a.FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.FORBID_CONTENTS,V)),a.ADD_FORBID_CONTENTS&&(me===qt&&(me=ge(me)),E(me,a.ADD_FORBID_CONTENTS,V)),Wt&&(j["#text"]=!0),Ae&&E(j,["html","head","body"]),j.table&&(E(j,["tbody"]),delete Je.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=a.TRUSTED_TYPES_POLICY,be=q.createHTML("")}else q===void 0&&(q=Dr(I,i)),q!==null&&typeof be=="string"&&(be=q.createHTML(""));te&&te(a),Ne=a}},Vn=E({},[...cn,...pn,...Sr]),Gn=E({},[...un,...vr]),mr=function(a){let f=Be(a);(!f||!f.tagName)&&(f={namespaceURI:ze,tagName:"template"});let x=$t(a.tagName),B=$t(f.tagName);return Zt[a.namespaceURI]?a.namespaceURI===bt?f.namespaceURI===ke?x==="svg":f.namespaceURI===xt?x==="svg"&&(B==="annotation-xml"||Ct[B]):!!Vn[x]:a.namespaceURI===xt?f.namespaceURI===ke?x==="math":f.namespaceURI===bt?x==="math"&&kt[B]:!!Gn[x]:a.namespaceURI===ke?f.namespaceURI===bt&&!kt[B]||f.namespaceURI===xt&&!Ct[B]?!1:!Gn[x]&&(cr[x]||!Vn[x]):!!(Ye==="application/xhtml+xml"&&Zt[a.namespaceURI]):!1},he=function(a){tt(n.removed,{element:a});try{Be(a).removeChild(a)}catch{ut(a)}},Me=function(a,f){try{tt(n.removed,{attribute:f.getAttributeNode(a),from:f})}catch{tt(n.removed,{attribute:null,from:f})}if(f.removeAttribute(a),a==="is")if(Pe||gt)try{he(f)}catch{}else try{f.setAttribute(a,"")}catch{}},jn=function(a){let f=null,x=null;if(jt)a="<remove></remove>"+a;else{let H=ln(a,/^[\r\n\t ]+/);x=H&&H[0]}Ye==="application/xhtml+xml"&&ze===ke&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");let B=q?q.createHTML(a):a;if(ze===ke)try{f=new S().parseFromString(B,Ye)}catch{}if(!f||!f.documentElement){f=Ce.createDocument(ze,"template",null);try{f.documentElement.innerHTML=Jt?be:B}catch{}}let Z=f.body||f.documentElement;return a&&x&&Z.insertBefore(e.createTextNode(x),Z.childNodes[0]||null),ze===ke?tr.call(f,Ae?"html":"body")[0]:Ae?f.documentElement:Z},Wn=function(a){return Xi.call(a.ownerDocument||a,a,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Qt=function(a){return a instanceof C&&(typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||!(a.attributes instanceof m)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function")},qn=function(a){return typeof u=="function"&&a instanceof u};function ye(b,a,f){At(b,x=>{x.call(n,a,f,Ne)})}let Kn=function(a){let f=null;if(ye(X.beforeSanitizeElements,a,null),Qt(a))return he(a),!0;let x=V(a.nodeName);if(ye(X.uponSanitizeElement,a,{tagName:x,allowedTags:j}),ft&&a.hasChildNodes()&&!qn(a.firstElementChild)&&ee(/<[/\w!]/g,a.innerHTML)&&ee(/<[/\w!]/g,a.textContent)||a.nodeType===ot.progressingInstruction||ft&&a.nodeType===ot.comment&&ee(/<[/\w]/g,a.data))return he(a),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(x))&&(!j[x]||Je[x])){if(!Je[x]&&Zn(x)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x)))return!1;if(Wt&&!me[x]){let B=Be(a)||a.parentNode,Z=mt(a)||a.childNodes;if(Z&&B){let H=Z.length;for(let re=H-1;re>=0;--re){let we=pe(Z[re],!0);we.__removalCount=(a.__removalCount||0)+1,B.insertBefore(we,dt(a))}}}return he(a),!0}return a instanceof l&&!mr(a)||(x==="noscript"||x==="noembed"||x==="noframes")&&ee(/<\/no(script|embed|frames)/i,a.innerHTML)?(he(a),!0):(De&&a.nodeType===ot.text&&(f=a.textContent,At([Ft,Ut,Ht],B=>{f=nt(f,B," ")}),a.textContent!==f&&(tt(n.removed,{element:a.cloneNode()}),a.textContent=f)),ye(X.afterSanitizeElements,a,null),!1)},Jn=function(a,f,x){if(ht[f]||On&&(f==="id"||f==="name")&&(x in e||x in dr))return!1;if(!(Vt&&!ht[f]&&ee(ir,f))){if(!(Bn&&ee(rr,f))){if(!(Se.attributeCheck instanceof Function&&Se.attributeCheck(f,a))){if(!K[f]||ht[f]){if(!(Zn(a)&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,a)||U.tagNameCheck instanceof Function&&U.tagNameCheck(a))&&(U.attributeNameCheck instanceof RegExp&&ee(U.attributeNameCheck,f)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(f,a))||f==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&ee(U.tagNameCheck,x)||U.tagNameCheck instanceof Function&&U.tagNameCheck(x))))return!1}else if(!Kt[f]){if(!ee($n,nt(x,Rn,""))){if(!((f==="src"||f==="xlink:href"||f==="href")&&a!=="script"&&Cr(x,"data:")===0&&Nn[a])){if(!(Dn&&!ee(or,nt(x,Rn,"")))){if(x)return!1}}}}}}}return!0},Zn=function(a){return a!=="annotation-xml"&&ln(a,sr)},Yn=function(a){ye(X.beforeSanitizeAttributes,a,null);let{attributes:f}=a;if(!f||Qt(a))return;let x={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0},B=f.length;for(;B--;){let Z=f[B],{name:H,namespaceURI:re,value:we}=Z,Fe=V(H),Xt=we,J=H==="value"?Xt:kr(Xt);if(x.attrName=Fe,x.attrValue=J,x.keepAttr=!0,x.forceKeepAttr=void 0,ye(X.uponSanitizeAttribute,a,x),J=x.attrValue,zn&&(Fe==="id"||Fe==="name")&&(Me(H,a),J=ar+J),ft&&ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,J)){Me(H,a);continue}if(Fe==="attributename"&&ln(J,"href")){Me(H,a);continue}if(x.forceKeepAttr)continue;if(!x.keepAttr){Me(H,a);continue}if(!Pn&&ee(/\/>/i,J)){Me(H,a);continue}De&&At([Ft,Ut,Ht],Xn=>{J=nt(J,Xn," ")});let Qn=V(a.nodeName);if(!Jn(Qn,Fe,J)){Me(H,a);continue}if(q&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!re)switch(I.getAttributeType(Qn,Fe)){case"TrustedHTML":{J=q.createHTML(J);break}case"TrustedScriptURL":{J=q.createScriptURL(J);break}}if(J!==Xt)try{re?a.setAttributeNS(re,H,J):a.setAttribute(H,J),Qt(a)?he(a):xi(n.removed)}catch{Me(H,a)}}ye(X.afterSanitizeAttributes,a,null)},hr=function b(a){let f=null,x=Wn(a);for(ye(X.beforeSanitizeShadowDOM,a,null);f=x.nextNode();)ye(X.uponSanitizeShadowNode,f,null),Kn(f),Yn(f),f.content instanceof o&&b(f.content);ye(X.afterSanitizeShadowDOM,a,null)};return n.sanitize=function(b){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=null,x=null,B=null,Z=null;if(Jt=!b,Jt&&(b="<!-->"),typeof b!="string"&&!qn(b))if(typeof b.toString=="function"){if(b=b.toString(),typeof b!="string")throw it("dirty is not a string, aborting")}else throw it("toString is not a function");if(!n.isSupported)return b;if(Gt||Yt(a),n.removed=[],typeof b=="string"&&(Ze=!1),Ze){if(b.nodeName){let we=V(b.nodeName);if(!j[we]||Je[we])throw it("root node is forbidden and cannot be sanitized in-place")}}else if(b instanceof u)f=jn("<!---->"),x=f.ownerDocument.importNode(b,!0),x.nodeType===ot.element&&x.nodeName==="BODY"||x.nodeName==="HTML"?f=x:f.appendChild(x);else{if(!Pe&&!De&&!Ae&&b.indexOf("<")===-1)return q&&_t?q.createHTML(b):b;if(f=jn(b),!f)return Pe?null:_t?be:""}f&&jt&&he(f.firstChild);let H=Wn(Ze?b:f);for(;B=H.nextNode();)Kn(B),Yn(B),B.content instanceof o&&hr(B.content);if(Ze)return b;if(Pe){if(gt)for(Z=er.call(f.ownerDocument);f.firstChild;)Z.appendChild(f.firstChild);else Z=f;return(K.shadowroot||K.shadowrootmode)&&(Z=nr.call(r,Z,!0)),Z}let re=Ae?f.outerHTML:f.innerHTML;return Ae&&j["!doctype"]&&f.ownerDocument&&f.ownerDocument.doctype&&f.ownerDocument.doctype.name&&ee(Ti,f.ownerDocument.doctype.name)&&(re="<!DOCTYPE "+f.ownerDocument.doctype.name+`>
2
2
  `+re),De&&At([Ft,Ut,Ht],we=>{re=nt(re,we," ")}),q&&_t?q.createHTML(re):re},n.setConfig=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(b),Gt=!0},n.clearConfig=function(){Ne=null,Gt=!1},n.isValidAttribute=function(b,a,f){Ne||Yt({});let x=V(b),B=V(a);return Jn(x,B,f)},n.addHook=function(b,a){typeof a=="function"&&tt(X[b],a)},n.removeHook=function(b,a){if(a!==void 0){let f=xr(X[b],a);return f===-1?void 0:br(X[b],f,1)[0]}return xi(X[b])},n.removeHooks=function(b){X[b]=[]},n.removeAllHooks=function(){X=Si()},n}var Mi=Ai();function xn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ie=xn();function Pi(t){Ie=t}var $e={exec:()=>null};function R(t,n=""){let e=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(ie.caret,"$1"),e=e.replace(i,s),r},getRegex:()=>new RegExp(e,n)};return r}var Pr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Or=/^(?:[ \t]*(?:\n|$))+/,zr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nr=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ct=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bn=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Oi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zi=R(Oi).replace(/bull/g,bn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ur=R(Oi).replace(/bull/g,bn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Cn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hr=/^[^\n]+/,kn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vr=R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",kn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gr=R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bn).getRegex(),Pt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jr=R("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",yn).replace("tag",Pt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ni=R(Cn).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex(),Wr=R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ni).getRegex(),wn={blockquote:Wr,code:zr,def:Vr,fences:Nr,heading:Fr,hr:ct,html:jr,lheading:zi,list:Gr,newline:Or,paragraph:Ni,table:$e,text:Hr},Ri=R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex(),qr=Ue(oe({},wn),{lheading:Ur,table:Ri,paragraph:R(Cn).replace("hr",ct).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ri).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Pt).getRegex()}),Kr=Ue(oe({},wn),{html:R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",yn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$e,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:R(Cn).replace("hr",ct).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",zi).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Jr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Zr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fi=/^( {2,}|\\)\n(?!\s*$)/,Yr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,We=/[\p{P}\p{S}]/u,Ot=/[\s\p{P}\p{S}]/u,Sn=/[^\s\p{P}\p{S}]/u,Qr=R(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ot).getRegex(),Ui=/(?!~)[\p{P}\p{S}]/u,Xr=/(?!~)[\s\p{P}\p{S}]/u,eo=/(?:[^\s\p{P}\p{S}]|~)/u,to=R(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Hi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,no=R(Hi,"u").replace(/punct/g,We).getRegex(),io=R(Hi,"u").replace(/punct/g,Ui).getRegex(),Vi="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ro=R(Vi,"gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),oo=R(Vi,"gu").replace(/notPunctSpace/g,eo).replace(/punctSpace/g,Xr).replace(/punct/g,Ui).getRegex(),so=R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),ao=R(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,We).getRegex(),lo="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",co=R(lo,"gu").replace(/notPunctSpace/g,Sn).replace(/punctSpace/g,Ot).replace(/punct/g,We).getRegex(),po=R(/\\(punct)/,"gu").replace(/punct/g,We).getRegex(),uo=R(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mo=R(yn).replace("(?:-->|$)","-->").getRegex(),ho=R("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mo).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),It=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,fo=R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",It).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gi=R(/^!?\[(label)\]\[(ref)\]/).replace("label",It).replace("ref",kn).getRegex(),ji=R(/^!?\[(ref)\](?:\[\])?/).replace("ref",kn).getRegex(),go=R("reflink|nolink(?!\\()","g").replace("reflink",Gi).replace("nolink",ji).getRegex(),$i=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vn={_backpedal:$e,anyPunctuation:po,autolink:uo,blockSkip:to,br:Fi,code:Zr,del:$e,delLDelim:$e,delRDelim:$e,emStrongLDelim:no,emStrongRDelimAst:ro,emStrongRDelimUnd:so,escape:Jr,link:fo,nolink:ji,punctuation:Qr,reflink:Gi,reflinkSearch:go,tag:ho,text:Yr,url:$e},_o=Ue(oe({},vn),{link:R(/^!?\[(label)\]\((.*?)\)/).replace("label",It).getRegex(),reflink:R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It).getRegex()}),fn=Ue(oe({},vn),{emStrongRDelimAst:oo,emStrongLDelim:io,delLDelim:ao,delRDelim:co,url:R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$i).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$i).getRegex()}),xo=Ue(oe({},fn),{br:R(Fi).replace("{2,}","*").getRegex(),text:R(fn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Lt={normal:wn,gfm:qr,pedantic:Kr},st={normal:vn,gfm:fn,breaks:xo,pedantic:_o},bo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Li=t=>bo[t];function _e(t,n){if(n){if(ie.escapeTest.test(t))return t.replace(ie.escapeReplace,Li)}else if(ie.escapeTestNoEncode.test(t))return t.replace(ie.escapeReplaceNoEncode,Li);return t}function Ii(t){try{t=encodeURI(t).replace(ie.percentDecode,"%")}catch{return null}return t}function Bi(t,n){let e=t.replace(ie.findPipe,(o,s,u)=>{let l=!1,h=s;for(;--h>=0&&u[h]==="\\";)l=!l;return l?"|":" |"}),r=e.split(ie.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),n)if(r.length>n)r.splice(n);else for(;r.length<n;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(ie.slashPipe,"|");return r}function at(t,n,e){let r=t.length;if(r===0)return"";let i=0;for(;i<r;){let o=t.charAt(r-i-1);if(o===n&&!e)i++;else if(o!==n&&e)i++;else break}return t.slice(0,r-i)}function Co(t,n){if(t.indexOf(n[1])===-1)return-1;let e=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===n[0])e++;else if(t[r]===n[1]&&(e--,e<0))return r;return e>0?-2:-1}function ko(t,n=0){let e=n,r="";for(let i of t)if(i===" "){let o=4-e%4;r+=" ".repeat(o),e+=o}else r+=i,e++;return r}function Di(t,n,e,r,i){let o=n.href,s=n.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,l}function yo(t,n,e){let r=t.match(e.other.indentCodeCompensation);if(r===null)return n;let i=r[1];return n.split(`
4
4
  `).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[u]=s;return u.length>=i.length?o.slice(i.length):o}).join(`
@@ -70,4 +70,4 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
70
70
  `).slice(1).join(`
71
71
  `).trim();return Te.looksLikeJson(i)?Te.formatJson(i):i});typeLabel_$=w(()=>{switch(this.view().kind){case y.userPrompt:return"User";case y.assistant:return"Assistant";case y.tool:return"Tool Call";case y.toolResult:return"Tool Result";case y.error:return"Error";case y.info:return"Info";case y.status:return"Status";case y.thinking:return"Thinking";case y.runIntent:return"Run intent";case y.iteration:return"Iteration";case y.statusUpdate:return"Status update";case y.raw:return"Raw";case y.result:return"Result";case y.toolGroup:return"Tool group";case y.subAgentGroup:return"Sub-agent";default:return String(this.view().kind)}});kindEnum=y;tts_$=w(()=>this.view().tts??null);ttsLoading_$=G(!1);showTtsButton_$=w(()=>{let e=this.tts_$();return e!==null&&!e.hasTtsAudio&&e.content.trim().length>0});autoReadEffect=ii(()=>{if(this.isAutoPlayFired||this.view().kind!==y.assistant)return;let e=this.tts_$();!e||e.hasTtsAudio||e.content.trim().length===0||this.ttsLoading_$()||Nt.shouldAutoPlay(e.sessionId,e.timestampIso)&&(this.isAutoPlayFired=!0,this.handleTtsPlayClick())});ttsAudioUrl_$=w(()=>{let e=this.tts_$();if(!e||!e.hasTtsAudio)return null;let r=this.voiceSttQaUi_DS.getTtsMessageAudioUrl(e.messageKey);return r.length>0?r:null});handleTtsPlayClick(){return D(this,null,function*(){let e=this.tts_$();if(!(!e||this.ttsLoading_$())){this.ttsLoading_$.set(!0);try{(yield this.voiceTts_CS.playMessage({messageKey:e.messageKey,sessionId:e.sessionId,role:e.role,content:e.content,timestampIso:e.timestampIso,isUserGesture:!0}))&&this.ttsCached.emit(e.messageKey)}finally{this.ttsLoading_$.set(!1)}}})}handleToggleExpand(){this.isExpanded_$.update(e=>!e)}handleToggleAssistantBodyExpand(){this.isAssistantBodyExpanded_$.update(e=>!e)}handleToggleRawInfo(){this.isRawInfoOpen_$.update(e=>!e)}handleImageClick(e){window.open(e,"_blank")}handleAssistantMdClick(e){return D(this,null,function*(){yield Tn.handleCodeCopyClick(e,r=>this.globalError_CS.copyToClipboard(r))})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-agent-console-message-bubble"]],inputs:{view:[1,"view"]},outputs:{ttsCached:"ttsCached"},standalone:!0,features:[Ge],decls:10,vars:2,consts:[[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden",3,"class"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden",3,"class"],[1,"flex","justify-center","mb-1","group/msg"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden",3,"class"],[1,"bg-orange-500/5","border","border-orange-500/15","rounded-lg","overflow-hidden"],[1,"border","border-indigo-500/20","rounded-lg","overflow-hidden","bg-indigo-500/3"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4"],[1,"rounded","border","px-2.5","py-1","text-xs","overflow-hidden"],[1,"flex","items-center","gap-2","cursor-pointer","select-none",3,"click"],["title","Tool call failed",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"text-orange-400","font-semibold","text-[11px]"],[1,"text-[10px]","text-neutral-400","select-none",3,"title"],[1,"flex-1"],[1,"text-neutral-600","text-[10px]"],["type","button","title","Raw details",3,"class"],["buttonTitle","Copy tool call","size","sm",3,"content"],[1,"text-[10px]","text-red-500/60","font-medium"],[1,"text-[10px]","text-green-500/60","font-medium"],["type","button","title","Raw details",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true"],["cx","12","cy","12","r","10"],["d","M12 16v-4"],["d","M12 8h.01"],[1,"mt-1.5","border-t","border-orange-500/10","pt-1.5"],[1,"mt-1.5","border-t","border-green-500/10","pt-1.5"],[1,"text-[9px]","text-neutral-600","uppercase","tracking-wider","mb-0.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/80","max-h-[300px]","overflow-y-auto"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","overflow-x-auto","break-words",3,"innerHTML"],[1,"text-[11px]","leading-relaxed","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto","whitespace-pre-wrap","break-words",3,"innerHTML"],[1,"mt-1","flex","justify-end"],["buttonTitle","Copy result","size","sm",3,"content"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-green-400/80","max-h-[300px]","overflow-y-auto"],[1,"mt-1.5","border-t","border-red-500/15","pt-1.5"],[1,"text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-red-400/90","max-h-[300px]","overflow-y-auto"],[1,"group/msg","rounded-lg","border","px-2","py-1","text-xs","sm:px-3","sm:py-1.5","sm:text-sm","overflow-hidden"],[1,"flex","items-center","gap-1","mb-px"],[1,"font-bold","text-[10px]","text-neonGreen/60","uppercase"],[1,"flex","items-center","gap-0.5"],["buttonTitle","Copy prompt","size","sm",3,"content"],["type","button","title","Felolvas\xE1s (TTS)",3,"disabled","class"],[1,"flex","flex-wrap","gap-2","mb-1.5"],[1,"leading-snug","sm:leading-normal","whitespace-pre-wrap","break-words","text-neutral-100"],["controls","","aria-label","\xDCzenet felolvas\xE1sa",1,"max-w-full","h-8","min-w-[200px]","mt-1.5",3,"src"],["type","button","title","Felolvas\xE1s (TTS)",3,"click","disabled"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-blue-400/40","border-t-blue-400"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","aria-hidden","true",1,"w-3.5","h-3.5","shrink-0"],["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"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"src"],["alt","Attached image",1,"max-w-[200px]","max-h-[200px]","rounded","border","border-neonDefault/30","object-contain","cursor-pointer",3,"click","src"],[1,"font-bold","text-[10px]","text-neonCyan/60","uppercase"],["buttonTitle","Copy message","size","sm",3,"content"],[1,"text-xs","leading-snug","sm:leading-normal","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-neutral-100"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors"],[1,"inline-block","w-3.5","h-3.5","shrink-0","animate-spin","rounded-full","border-2","border-neutral-400/40","border-t-neutral-300"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"innerHTML"],[1,"ccap-assistant-md","leading-snug","sm:leading-normal","break-words","text-neutral-100","min-w-0",3,"click","innerHTML"],["type","button",1,"mt-1","text-[10px]","text-ccapAccent","hover:text-ccapAccent/80","transition-colors",3,"click"],[1,"inline-flex","items-center","gap-1.5","bg-teal-500/6","border","border-teal-500/15","rounded-full","px-3","py-0.5","max-w-[85%]","min-w-0"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","2",1,"w-3","h-3","text-teal-400/70","shrink-0","animate-spin"],["d","M8 2a6 6 0 0 1 6 6","stroke-linecap","round"],[1,"text-[10px]","text-teal-300/70","truncate","min-w-0"],[1,"text-[8px]","text-teal-400/40","shrink-0"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30"],["type","button",1,"shrink-0","w-3.5","h-3.5","rounded-full","bg-teal-500/15","flex","items-center","justify-center","cursor-pointer","hover:bg-teal-500/30",3,"click"],[1,"text-[7px]","text-teal-300/60","font-bold","leading-none"],[1,"rounded","border","px-2.5","py-1.5","text-xs","overflow-hidden"],[1,"flex","items-center","gap-1.5","mb-0.5"],["title","Error",1,"w-1.5","h-1.5","rounded-full","bg-red-500","shrink-0"],[1,"font-semibold","text-[10px]","text-red-400","uppercase","tracking-wider"],["buttonTitle","Copy error","size","sm",3,"content"],[1,"leading-relaxed","whitespace-pre-wrap","break-words","text-red-400"],[1,"font-semibold","text-[10px]","text-orange-300/70","uppercase","tracking-wider"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono","text-orange-300/70","max-h-[300px]","overflow-y-auto"],[1,"flex","items-center","gap-1.5","px-2.5","py-1","cursor-pointer","select-none","hover:bg-orange-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],[1,"text-[11px]","text-orange-300/90","font-medium"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-orange-400/50","transition-transform","[[open]>&]:rotate-90"],["d","M4.5 2.5l4 3.5-4 3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"px-2","pb-1.5","pt-0.5","space-y-0.5"],[3,"view"],[3,"ttsCached","view"],[1,"flex","items-center","gap-1.5","px-2.5","py-1.5","cursor-pointer","select-none","hover:bg-indigo-500/8","transition-colors","list-none","[&::-webkit-details-marker]:hidden"],["viewBox","0 0 16 16","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","text-indigo-400","shrink-0"],["x","3","y","5","width","10","height","8","rx","2"],["cx","6","cy","9","r","1"],["cx","10","cy","9","r","1"],["d","M8 2v3"],["d","M6 2h4"],[1,"text-[10px]","text-indigo-400/60","font-medium","uppercase","tracking-wider","shrink-0"],[1,"text-[11px]","text-indigo-300/90","font-medium","truncate"],[1,"text-[9px]","text-indigo-400/40","shrink-0"],["viewBox","0 0 12 12","fill","none",1,"w-3","h-3","text-indigo-400/40","shrink-0","transition-transform","[[open]>&]:rotate-90"],[1,"px-2","pb-2","pt-1","space-y-0.5","border-t","border-indigo-500/10"],[1,"font-semibold","text-[10px]","uppercase","tracking-wider"],[1,"text-[9px]","text-neutral-500"],["buttonTitle","Copy","size","sm",3,"content"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono",3,"class"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words",3,"class"],[1,"mt-1","text-[11px]","leading-relaxed","overflow-x-auto","whitespace-pre-wrap","break-words","font-mono"],[1,"mt-1","leading-relaxed","whitespace-pre-wrap","break-words"],[1,"fixed","inset-0","z-50","flex","items-center","justify-center","bg-black/70","p-4",3,"click"],[1,"bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-2xl","w-full","max-w-2xl","max-h-[80vh]","flex","flex-col",2,"max-height","80dvh",3,"click"],[1,"flex","items-center","gap-2","px-4","py-2","border-b","border-neutral-700","shrink-0"],[1,"text-xs","font-semibold","text-neutral-300"],[1,"text-[10px]","text-neutral-400",3,"title"],["buttonTitle","Copy raw JSON","size","sm",3,"content"],["type","button",1,"text-neutral-500","hover:text-neutral-300","text-sm","transition-colors","px-1",3,"click"],[1,"flex-1","overflow-auto","p-4","space-y-4"],[1,"text-[9px]","text-neutral-500","uppercase","tracking-wide","mb-1"],[1,"text-[11px]","leading-relaxed","whitespace-pre-wrap","break-words","overflow-x-auto","font-mono","text-neutral-300"],[1,"mb-3","last:mb-0"],[1,"text-[8px]","text-neutral-600","mb-0.5"]],template:function(r,i){if(r&1&&A(0,Fo,16,15,"div",0)(1,Jo,17,14,"div",1)(2,cs,17,14,"div",1)(3,ds,8,3,"div",2)(4,fs,14,11,"div",3)(5,bs,14,12,"div",0)(6,ks,10,2,"details",4)(7,Ss,20,3,"details",5)(8,$s,15,16,"div",0)(9,Ps,17,11,"div",6),r&2){let o,s;k((o=i.view().kind)===i.kindEnum.tool?0:o===i.kindEnum.userPrompt?1:o===i.kindEnum.assistant?2:o===i.kindEnum.statusUpdate?3:o===i.kindEnum.error?4:o===i.kindEnum.toolResult?5:o===i.kindEnum.toolGroup?6:o===i.kindEnum.subAgentGroup?7:8),d(9),k((s=i.isRawInfoOpen_$()&&i.rawOverlayBundle_$())?9:-1,s)}},dependencies:()=>[t,je,mi,Ji,hi,fi],styles:[`@charset "UTF-8";
72
72
  /*# sourceMappingURL=s-agent-console-message-bubble.component-QJSDQEWX.css.map */`]})}return t})();var Os=[[["","sChatColumnHeader",""]],[["","sChatColumnScroll",""]],[["","sChatColumnOverlay",""]],[["","sChatColumnComposer",""]]],zs=["[sChatColumnHeader]","[sChatColumnScroll]","[sChatColumnOverlay]","[sChatColumnComposer]"],rl=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-session-chat-column-layout"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],standalone:!0,features:[Ge],ngContentSelectors:zs,decls:8,vars:0,consts:[[1,"min-w-0","shrink-0"],[1,"relative","min-h-0","min-w-0","flex-1","flex","flex-col"],[1,"min-h-0","min-w-0","flex-1","overflow-y-auto","overflow-x-hidden"]],template:function(r,i){r&1&&(ni(Os),c(0,"div",0),et(1),p(),c(2,"div",1)(3,"div",2),et(4,1),p(),et(5,2),p(),c(6,"div",0),et(7,3),p())},dependencies:[je],encapsulation:2})}return t})();var Mn=en(on());var Qi=(()=>{class t{mrg_AS=se(di);erg_AS=se(gi);llmEntries_$=G([]);llmLoading_$=G(!1);llmLoadError_$=G(null);isLlmLoaded=!1;llmLoadPromise=null;embeddingEntries_$=G([]);embeddingLoading_$=G(!1);embeddingLoadError_$=G(null);isEmbeddingLoaded=!1;embeddingLoadPromise=null;enabledLlmModels_$=w(()=>this.llmEntries_$().filter(e=>e.enabled));enabledLlmProviders_$=w(()=>{let e=new Map;for(let r of this.enabledLlmModels_$())e.has(r.provider)||e.set(r.provider,t.llmProviderLabel(r.provider));return[...e.entries()].map(([r,i])=>({value:r,label:i}))});isLlmEmpty_$=w(()=>this.isLlmLoaded&&!this.llmLoading_$()&&this.enabledLlmModels_$().length===0);enabledEmbeddingModels_$=w(()=>this.embeddingEntries_$().filter(e=>e.enabled===!0));enabledEmbeddingProviders_$=w(()=>{let e=new Map;for(let r of this.enabledEmbeddingModels_$()){let i=r.embeddingBackend??"";i&&!e.has(i)&&e.set(i,t.embeddingBackendLabel(i))}return[...e.entries()].map(([r,i])=>({value:r,label:i}))});isEmbeddingEmpty_$=w(()=>this.isEmbeddingLoaded&&!this.embeddingLoading_$()&&this.enabledEmbeddingModels_$().length===0);ensureLoaded(e){return D(this,null,function*(){if(e==="llm"){if(this.isLlmLoaded&&!this.llmLoading_$())return;if(this.llmLoadPromise)return this.llmLoadPromise;this.llmLoadPromise=this.fetchLlm();try{yield this.llmLoadPromise}finally{this.llmLoadPromise=null}return}if(!(this.isEmbeddingLoaded&&!this.embeddingLoading_$())){if(this.embeddingLoadPromise)return this.embeddingLoadPromise;this.embeddingLoadPromise=this.fetchEmbedding();try{yield this.embeddingLoadPromise}finally{this.embeddingLoadPromise=null}}})}refresh(e){return D(this,null,function*(){e==="llm"?(this.isLlmLoaded=!1,yield this.fetchLlm()):(this.isEmbeddingLoaded=!1,yield this.fetchEmbedding())})}invalidate(e){e==="llm"?this.isLlmLoaded=!1:this.isEmbeddingLoaded=!1}getModelsForProvider(e,r){return e==="llm"?this.enabledLlmModels_$().filter(i=>i.provider===r).map(i=>i.modelName):this.enabledEmbeddingModels_$().filter(i=>i.embeddingBackend===r).map(i=>i.modelId??"")}fetchLlm(){return D(this,null,function*(){this.llmLoading_$.set(!0),this.llmLoadError_$.set(null);try{let e=yield this.mrg_AS.getList({enabled:!0});this.llmEntries_$.set(e.list),this.isLlmLoaded=!0}catch(e){this.llmLoadError_$.set(e),Mn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchLlm failed",e)}finally{this.llmLoading_$.set(!1)}})}fetchEmbedding(){return D(this,null,function*(){this.embeddingLoading_$.set(!0),this.embeddingLoadError_$.set(null);try{let e=yield this.erg_AS.getList({enabled:!0});this.embeddingEntries_$.set(e.list),this.isEmbeddingLoaded=!0}catch(e){this.embeddingLoadError_$.set(e),Mn.DyFM_Error.logSimple("AIS_RegistrySsot_ControlService | fetchEmbedding failed",e)}finally{this.embeddingLoading_$.set(!1)}})}static llmProviderLabel(e){return{"open-ai":"OpenAI",anthropic:"Anthropic",google:"Google",deepseek:"DeepSeek","fdp-ai":"FDPAI"}[e]??e}static embeddingBackendLabel(e){return{ollama:"Ollama","open-ai-compatible":"OpenAI-kompatibilis","open-ai-official":"OpenAI hivatalos","custom-http":"Custom HTTP"}[e]??e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=He({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ns=(t,n)=>n.value;function Fs(t,n){t&1&&(c(0,"div",0),v(1,"span",3),c(2,"span"),g(3,"Registry bet\xF6lt\xE9se\u2026"),p()())}function Us(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett modell a registry-ben."),p(),c(2,"p"),g(3," Menj a "),c(4,"a",5),g(5,"Model Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Hs(t,n){if(t&1&&(c(0,"p",4),g(1,"Nincs enged\xE9lyezett embedding modell."),p(),c(2,"p"),g(3," Menj az "),c(4,"a",5),g(5,"Embedding Registry"),p(),g(6," oldalra, futtass "),c(7,"strong"),g(8,"Sync"),p(),g(9,"-et, majd az "),c(10,"code",6),g(11,"enabled"),p(),g(12," kapcsol\xF3val enged\xE9lyezz legal\xE1bb egy modellt. "),p()),t&2){let e=_(2);d(4),M("routerLink",e.registryRoute_$())}}function Vs(t,n){if(t&1&&(c(0,"div",1),A(1,Us,13,1)(2,Hs,13,1),p()),t&2){let e=_();d(),k(e.registryKind()==="llm"?1:2)}}function Gs(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;M("value",e.value),d(),T(e.label)}}function js(t,n){if(t&1){let e=F();c(0,"div",7)(1,"label",8),g(2),p(),c(3,"select",9),z("ngModelChange",function(i){P(e);let o=_(2);return O(o.handleProviderChange(i))}),c(4,"option",10),g(5,"\u2014 V\xE1lassz \u2014"),p(),ve(6,Gs,2,2,"option",11,Ns),p()()}if(t&2){let e=_(2);d(2),T(e.providerLabel()),d(),M("ngModel",e.selectedProvider())("disabled",e.disabled()),d(3),Ee(e.providerOptions_$())}}function Ws(t,n){if(t&1&&(c(0,"option",11),g(1),p()),t&2){let e=n.$implicit;M("value",e),d(),T(e)}}function qs(t,n){t&1&&(c(0,"span",12),g(1,"A kiv\xE1lasztott providernek nincs enged\xE9lyezett modellje."),p())}function Ks(t,n){if(t&1){let e=F();c(0,"div",2),A(1,js,8,3,"div",7),c(2,"div",7)(3,"label",8),g(4),p(),c(5,"select",9),z("ngModelChange",function(i){P(e);let o=_();return O(o.handleModelChange(i))}),c(6,"option",10),g(7,"\u2014 V\xE1lassz modellt \u2014"),p(),ve(8,Ws,2,2,"option",11,St),p(),A(10,qs,2,0,"span",12),p()()}if(t&2){let e=_();d(),k(e.showProviderSelect_$()?1:-1),d(3),T(e.modelLabel()),d(),M("ngModel",e.selectedModel())("disabled",e.disabled()||e.modelOptions_$().length===0),d(3),Ee(e.modelOptions_$()),d(2),k(e.modelOptions_$().length===0&&(e.selectedProvider()||e.providerFilter())?10:-1)}}var Cl=(()=>{class t{registrySsot_CS=se(Qi);registryKind=fe.required();selectedProvider=fe("");selectedModel=fe("");providerLabel=fe("Provider");modelLabel=fe("Modell");disabled=fe(!1);providerFilter=fe(void 0);providerChange=Xe();modelChange=Xe();isEmpty_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.isLlmEmpty_$():this.registrySsot_CS.isEmbeddingEmpty_$());isLoading_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.llmLoading_$():this.registrySsot_CS.embeddingLoading_$());providerOptions_$=w(()=>this.registryKind()==="llm"?this.registrySsot_CS.enabledLlmProviders_$():this.registrySsot_CS.enabledEmbeddingProviders_$());modelOptions_$=w(()=>{let e=this.providerFilter()??this.selectedProvider();return e?this.registrySsot_CS.getModelsForProvider(this.registryKind(),e):[]});registryRoute_$=w(()=>this.registryKind()==="llm"?"/model-registry":"/embedding-registry");showProviderSelect_$=w(()=>this.providerFilter()===void 0);ngOnInit(){this.registrySsot_CS.ensureLoaded(this.registryKind())}handleProviderChange(e){this.providerChange.emit(e)}handleModelChange(e){this.modelChange.emit(e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Ve({type:t,selectors:[["app-s-registry-provider-model-select"]],inputs:{registryKind:[1,"registryKind"],selectedProvider:[1,"selectedProvider"],selectedModel:[1,"selectedModel"],providerLabel:[1,"providerLabel"],modelLabel:[1,"modelLabel"],disabled:[1,"disabled"],providerFilter:[1,"providerFilter"]},outputs:{providerChange:"providerChange",modelChange:"modelChange"},standalone:!0,features:[Ge],decls:3,vars:3,consts:[[1,"flex","items-center","gap-2","text-sm","text-zinc-400","py-1"],[1,"bg-red-900/30","border","border-red-600","rounded","px-3","py-2","text-sm","text-red-300","space-y-1"],[1,"flex","flex-col","gap-2"],[1,"animate-spin","inline-block","w-4","h-4","border-2","border-zinc-500","border-t-transparent","rounded-full"],[1,"font-semibold"],[1,"underline","text-blue-400","hover:text-blue-300",3,"routerLink"],[1,"text-xs","bg-zinc-800","px-1","rounded"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-zinc-400","uppercase","tracking-wide"],[1,"bg-zinc-800","border","border-zinc-600","rounded","px-2","py-1","text-sm","text-zinc-100",3,"ngModelChange","ngModel","disabled"],["value",""],[3,"value"],[1,"text-xs","text-zinc-500"]],template:function(r,i){r&1&&A(0,Fs,4,0,"div",0)(1,Vs,3,1,"div",1)(2,Ks,11,5,"div",2),r&2&&(k(i.isLoading_$()?0:-1),d(),k(i.isEmpty_$()&&!i.isLoading_$()?1:-1),d(),k(!i.isEmpty_$()&&!i.isLoading_$()?2:-1))},dependencies:[je,ui,ci,pi,li,si,ai,oi,ri],encapsulation:2})}return t})();export{Tn as a,y as b,Ke as c,Nt as d,Ji as e,el as f,rl as g,Qi as h,Cl as i};
73
- //# sourceMappingURL=chunk-F4DZS3GH.js.map
73
+ //# sourceMappingURL=chunk-QLSM7AU5.js.map
@@ -1,2 +1,2 @@
1
- import{a as x}from"./chunk-P5OOFVBC.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-2DR4NRFY.js";import{e as D}from"./chunk-6UQHXR3E.js";import{G as w,I as v,p as N}from"./chunk-WR6NSOQ2.js";import{C as p,a as g,aa as o,b as I,h as O,jb as b,k as c,l as M,p as u,vb as S,xb as C,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var L=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var h=O(N());var F=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(C);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var R=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(C);peiContext_DS=p(P);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new S);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new S);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let n=e?.workspacePath!==void 0?e.workspacePath.trim():void 0;n!==void 0&&n.length>0&&(t.workspacePath=n);let a=this.withCcapId(new S);return u(this.http.post(this.baseUrl,t,{params:a}))}getSession(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new S);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new S);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var B="answer",V="notify-user",j="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",W="user-interaction:resolved",q="ccap_notification",Q="notification-sent",X="waiting-for-user",we=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new M;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(R);conversation_AS=p(F);serverStatus_AS=p(x);socket_CS=p(D);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=b(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,a=typeof t.sessionId=="string"?t.sessionId:void 0,_=!n&&!a||n===s||a===s;if(e.event===B&&_){let i=typeof t.content=="string"?t.content:"",d=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,y={role:"assistant",content:i,timestamp:new Date(d)},f=l?I(g({},y),{runId:l}):y,$=this.ensureClientListKey(f);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&_){let i=typeof t.content=="string"?t.content:"";h.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let d=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),d]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let d=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";l==="runInitialization"&&_&&this.transitionLatestUserMessageToProcessing(),d===q&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let y=i.toolError,f=n??i.channelId,$=!f||f===s,k=L.toDisplayString(y).trim();if(k.length>0&&$){h.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${k.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:k,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:d});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:d};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&_){this.pendingInteraction_$.set(t);return}if(e.event===W&&_){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return c(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return c(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return c(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return c(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return c(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return c(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),n=v.socketUrl??t;if(s!==n&&typeof window<"u"){v.socketUrl=s,h.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return c(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return h.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return c(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let a=(t?.length??0)>0;if(!s.length&&!a)return{sent:!1};let _={role:"user",content:e,timestamp:new Date,processingStatus:"sending"},i=this.ensureClientListKey(_);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,y=this.messages_$().map(f=>{if(f.clientListKey!==i.clientListKey)return f;let $=g({},f);return $.processingStatus="sent",l?.messageKey&&($.messageKey=l.messageKey),l?.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(y),{sent:!0}}catch(d){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",d);let l=this.messages_$().filter(f=>f.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:d instanceof Error?d.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return c(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}transitionLatestUserMessageToProcessing(){let e=this.messages_$(),t=-1;for(let a=e.length-1;a>=0;a=a-1)if(e[a].role==="user"){t=a;break}if(t<0||e[t].processingStatus!=="sent")return;let n=e.map((a,_)=>_!==t?a:I(g({},a),{processingStatus:"processing"}));this.messages_$.set(n)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?I(g({},e),{clientListKey:s}):I(g({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?I(g({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return c(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadInitialChunk(e){return c(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return c(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(I(g({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(a=>this.ensureClientListKey(a));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1}));return s}catch(s){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return c(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return c(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return c(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return c(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return c(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return c(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return c(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let a=r.normalizeRunExecutionModeSocketValue(n);a!==void 0&&this.activeRunExecutionMode_$.set(a)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[w.instant,w.agenticAny,w.ask,w.plan];for(let n of s)if(t===n)return n}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,L as b,we as c};
2
- //# sourceMappingURL=chunk-PY7ZXKHG.js.map
1
+ import{a as x}from"./chunk-CWHBS3BF.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-MWX2FEYH.js";import{e as D}from"./chunk-M2BIMBKO.js";import{G as w,I as v,p as N}from"./chunk-YSI2TV56.js";import{C as p,a as g,aa as o,b as I,h as O,jb as b,k as c,l as M,p as u,vb as S,xb as C,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var L=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var h=O(N());var F=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(C);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var R=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(C);peiContext_DS=p(P);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new S);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new S);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let n=e?.workspacePath!==void 0?e.workspacePath.trim():void 0;n!==void 0&&n.length>0&&(t.workspacePath=n);let a=this.withCcapId(new S);return u(this.http.post(this.baseUrl,t,{params:a}))}getSession(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new S);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new S);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var B="answer",V="notify-user",j="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",W="user-interaction:resolved",q="ccap_notification",Q="notification-sent",X="waiting-for-user",we=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new M;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(R);conversation_AS=p(F);serverStatus_AS=p(x);socket_CS=p(D);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=b(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,a=typeof t.sessionId=="string"?t.sessionId:void 0,_=!n&&!a||n===s||a===s;if(e.event===B&&_){let i=typeof t.content=="string"?t.content:"",d=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,y={role:"assistant",content:i,timestamp:new Date(d)},f=l?I(g({},y),{runId:l}):y,$=this.ensureClientListKey(f);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&_){let i=typeof t.content=="string"?t.content:"";h.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let d=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),d]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let d=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";l==="runInitialization"&&_&&this.transitionLatestUserMessageToProcessing(),d===q&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let y=i.toolError,f=n??i.channelId,$=!f||f===s,k=L.toDisplayString(y).trim();if(k.length>0&&$){h.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${k.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:k,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:d});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:d};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&_){this.pendingInteraction_$.set(t);return}if(e.event===W&&_){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return c(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return c(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return c(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return c(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return c(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return c(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),n=v.socketUrl??t;if(s!==n&&typeof window<"u"){v.socketUrl=s,h.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return c(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return h.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return c(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let a=(t?.length??0)>0;if(!s.length&&!a)return{sent:!1};let _={role:"user",content:e,timestamp:new Date,processingStatus:"sending"},i=this.ensureClientListKey(_);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,y=this.messages_$().map(f=>{if(f.clientListKey!==i.clientListKey)return f;let $=g({},f);return $.processingStatus="sent",l?.messageKey&&($.messageKey=l.messageKey),l?.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(y),{sent:!0}}catch(d){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",d);let l=this.messages_$().filter(f=>f.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:d instanceof Error?d.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return c(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}transitionLatestUserMessageToProcessing(){let e=this.messages_$(),t=-1;for(let a=e.length-1;a>=0;a=a-1)if(e[a].role==="user"){t=a;break}if(t<0||e[t].processingStatus!=="sent")return;let n=e.map((a,_)=>_!==t?a:I(g({},a),{processingStatus:"processing"}));this.messages_$.set(n)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?I(g({},e),{clientListKey:s}):I(g({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?I(g({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return c(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadInitialChunk(e){return c(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return c(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(I(g({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(a=>this.ensureClientListKey(a));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1}));return s}catch(s){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return c(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return c(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return c(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return c(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return c(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return c(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return c(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let a=r.normalizeRunExecutionModeSocketValue(n);a!==void 0&&this.activeRunExecutionMode_$.set(a)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[w.instant,w.agenticAny,w.ask,w.plan];for(let n of s)if(t===n)return n}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,L as b,we as c};
2
+ //# sourceMappingURL=chunk-RVLDL574.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-EVV5L3LF.js";import{K as p,L as S}from"./chunk-WR6NSOQ2.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
- //# sourceMappingURL=chunk-H3QXSZIS.js.map
1
+ import{a as c}from"./chunk-4SDD3VFR.js";import{K as p,L as S}from"./chunk-YSI2TV56.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
2
+ //# sourceMappingURL=chunk-SYFEIBHY.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-F4DZS3GH.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-F4BNEQYE.js.map
1
+ import{b as a}from"./chunk-QLSM7AU5.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-TKLG6NOU.js.map
@@ -1,2 +1,2 @@
1
- import{I as c}from"./chunk-WR6NSOQ2.js";import{C as s,p as n,vb as o,xb as f,y as r}from"./chunk-TBMJSIBB.js";var b=(()=>{class i{baseUrl=`${c.api.baseUrl}/ext-session-message`;http=s(f);getMessages(t){let e=new o;return t.sinceSequence!==void 0&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.beforeSequence!==void 0&&(e=e.set("beforeSequence",String(t.beforeSequence))),t.limit!==void 0&&(e=e.set("limit",String(t.limit))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/messages`,{params:e}))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=r({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{b as a};
2
- //# sourceMappingURL=chunk-UKVDEDDM.js.map
1
+ import{I as c}from"./chunk-YSI2TV56.js";import{C as s,p as n,vb as o,xb as f,y as r}from"./chunk-TBMJSIBB.js";var b=(()=>{class i{baseUrl=`${c.api.baseUrl}/ext-session-message`;http=s(f);getMessages(t){let e=new o;return t.sinceSequence!==void 0&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.beforeSequence!==void 0&&(e=e.set("beforeSequence",String(t.beforeSequence))),t.limit!==void 0&&(e=e.set("limit",String(t.limit))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/messages`,{params:e}))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=r({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{b as a};
2
+ //# sourceMappingURL=chunk-U2NJOYW5.js.map
@@ -1,2 +1,2 @@
1
- import{p as h}from"./chunk-WR6NSOQ2.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-EUEEHSUR.js.map
1
+ import{p as h}from"./chunk-YSI2TV56.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-VMHSKHAH.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-EUEEHSUR.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-HZSNYOA4.js.map
1
+ import{a as r}from"./chunk-VMHSKHAH.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-VVFKXESB.js.map
@@ -1,2 +1,2 @@
1
- import{e as $}from"./chunk-6UQHXR3E.js";import{I as h,p as S}from"./chunk-WR6NSOQ2.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
- //# sourceMappingURL=chunk-66FQLE3Y.js.map
1
+ import{e as $}from"./chunk-M2BIMBKO.js";import{I as h,p as S}from"./chunk-YSI2TV56.js";import{C as u,aa as a,h as C,k as m,p as c,xb as y,y as _}from"./chunk-TBMJSIBB.js";var f=C(S());var T=(()=>{class n{baseUrl=`${h.api.baseUrl}/terminals`;http=u(y);getTerminals(){return c(this.http.get(this.baseUrl))}startTerminal(t){return c(this.http.post(`${this.baseUrl}/start`,{path:t.path},{headers:{"Content-Type":"application/json"}}))}runCommand(t,e){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/command`,{action:e.action,command:e.command,code:e.code},{headers:{"Content-Type":"application/json"}}))}deleteTerminal(t){return c(this.http.delete(`${this.baseUrl}/${encodeURIComponent(t)}`))}closeTerminal(t){return c(this.http.post(`${this.baseUrl}/${encodeURIComponent(t)}/close`,{},{headers:{"Content-Type":"application/json"}}))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var R="terminal:list",A="terminal:list:result",q="terminal:start",b="terminal:start:result",p="terminal:attach",N="terminal:command-result",M="terminal:command-output",k="terminal:command-stdin";function E(n){if(n==null||typeof n!="object")return null;let s=n,t=typeof s.terminalId=="string"?s.terminalId:"";if(!t.trim())return null;let e=s.type,r=e==="exec"||e==="cc-runner"||e==="ca-runner"?e:void 0;return{_id:typeof s._id=="string"?s._id:void 0,terminalId:t.trim(),path:typeof s.path=="string"?s.path:void 0,status:typeof s.status=="string"?s.status:void 0,__created:typeof s.__created=="string"?s.__created:void 0,__lastModified:typeof s.__lastModified=="string"?s.__lastModified:void 0,type:r,sessionId:typeof s.sessionId=="string"?s.sessionId:void 0,command:typeof s.command=="string"?s.command:void 0}}var B=(()=>{class n{terminals_$=a([]);terminalsLoading_$=a(!1);terminalsLoadError_$=a(null);selectedTerminalId_$=a("");commandResults_$=a([]);startLoading_$=a(!1);startError_$=a(null);runCommandLoading_$=a(!1);runCommandError_$=a(null);interactiveRequestId_$=a(null);interactiveOutput_$=a("");eventSubscription=null;terminal_AS=u(T);socket_CS=u($);constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(t=>{if(t.event===A){let r=(Array.isArray(t.payload.terminals)?t.payload.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r),this.terminalsLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null&&this.terminalsLoadError_$.set(t.payload.error)}else if(t.event===b){if(this.startLoading_$.set(!1),t.payload.error!==void 0&&t.payload.error!==null){this.startError_$.set(t.payload.error);return}this.startError_$.set(null);let e=typeof t.payload.terminalId=="string"?t.payload.terminalId:"",r=typeof t.payload.path=="string"?t.payload.path:"";e&&(this.terminals_$.update(i=>i.some(l=>l.terminalId===e)?i:[{terminalId:e,path:r,status:t.payload.status},...i]),this.selectedTerminalId_$.set(e),this.socket_CS.emit(p,{terminalId:e}),this.commandResults_$.set([]),this.clearInteractiveState())}else if(t.event===N){if((typeof t.payload.terminalId=="string"?t.payload.terminalId:"")!==this.selectedTerminalId_$())return;let r=t.payload.interactive===!0,i=t.payload.interactiveEnd===!0,o=typeof t.payload.exitCode=="number"?t.payload.exitCode:void 0;if(r){let d=typeof t.payload.requestId=="string"?t.payload.requestId:"";this.interactiveRequestId_$.set(d||null),this.interactiveOutput_$.set("");return}if(i){let d=this.interactiveOutput_$();this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("");let g=o!==void 0?`Session ended. Exit code: ${o}`:"Session ended.";this.commandResults_$.update(I=>[...d.trim().length>0?[...I,{output:d.trim(),success:!0}]:I,{output:g,success:!0,interactiveEnd:!0,exitCode:o}]);return}let l={requestId:typeof t.payload.requestId=="string"?t.payload.requestId:void 0,output:typeof t.payload.output=="string"?t.payload.output:"",success:t.payload.success===!0,error:typeof t.payload.error=="string"?t.payload.error:void 0};this.commandResults_$.update(d=>[...d,l])}else if(t.event===M){let e=typeof t.payload.terminalId=="string"?t.payload.terminalId.trim():"",r=typeof t.payload.requestId=="string"?String(t.payload.requestId).trim():"",i=typeof t.payload.chunk=="string"?t.payload.chunk:"",o=(this.interactiveRequestId_$()??"").trim(),l=(this.selectedTerminalId_$()??"").trim();if(o.length===0||r!==o){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: requestId mismatch",{requestId:r,currentRequestId:o});return}if(e.length>0&&l.length>0&&e!==l){h.production||f.DyFM_Log.info("CCAP_Terminal | command-output kisz\u0171rve: terminalId mismatch",{terminalId:e,selectedId:l});return}this.interactiveOutput_$.update(d=>d+i)}})}requestTerminalListViaSocket(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0),this.socket_CS.emit(R,{})}loadTerminalsRest(){return m(this,null,function*(){this.terminalsLoadError_$.set(null),this.terminalsLoading_$.set(!0);try{let t=yield this.terminal_AS.getTerminals(),r=(Array.isArray(t?.terminals)?t.terminals:[]).map(i=>E(i)).filter(i=>i!==null);this.terminals_$.set(r)}catch(t){this.terminalsLoadError_$.set(t)}finally{this.terminalsLoading_$.set(!1)}})}startTerminalRest(t){return m(this,null,function*(){this.startError_$.set(null),this.startLoading_$.set(!0);try{let e=yield this.terminal_AS.startTerminal(t);this.startError_$.set(null),e.terminalId&&(this.terminals_$.update(r=>r.some(o=>o.terminalId===e.terminalId)?r:[{terminalId:e.terminalId,path:e.path,status:e.status},...r]),this.selectedTerminalId_$.set(e.terminalId),this.socket_CS.emit(p,{terminalId:e.terminalId}),this.commandResults_$.set([]),this.clearInteractiveState())}catch(e){this.startError_$.set(e)}finally{this.startLoading_$.set(!1)}})}startTerminalViaSocket(t){this.startError_$.set(null),this.startLoading_$.set(!0),this.socket_CS.emit(q,{path:t.path})}sendStdin(t){let e=this.selectedTerminalId_$(),r=this.interactiveRequestId_$();!e||!r||this.socket_CS.emit(k,{terminalId:e,requestId:r,data:typeof t=="string"?t:""})}clearInteractiveState(){this.interactiveRequestId_$.set(null),this.interactiveOutput_$.set("")}attachToTerminal(t){this.selectedTerminalId_$.set(t),this.socket_CS.emit(p,{terminalId:t}),this.commandResults_$.set([]),this.clearInteractiveState()}deleteTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.deleteTerminal(e),this.terminals_$.update(r=>r.filter(i=>(i.terminalId??"")!==e)),this.selectedTerminalId_$()===e&&(this.selectedTerminalId_$.set(""),this.clearInteractiveState())}catch(r){this.runCommandError_$.set(r)}}})}closeTerminal(t){return m(this,null,function*(){let e=(t??"").trim();if(e){this.runCommandError_$.set(null);try{yield this.terminal_AS.closeTerminal(e),this.selectedTerminalId_$()===e&&this.clearInteractiveState(),yield this.loadTerminalsRest()}catch(r){this.runCommandError_$.set(r)}}})}runCommand(t){return m(this,null,function*(){let e=this.selectedTerminalId_$();if(!e){this.runCommandError_$.set(new Error("No terminal selected"));return}this.runCommandError_$.set(null),this.runCommandLoading_$.set(!0);try{let r=yield this.terminal_AS.runCommand(e,t);this.runCommandError_$.set(null),r.interactive===!0&&typeof r.requestId=="string"?(this.interactiveRequestId_$.set(r.requestId),this.interactiveOutput_$.set("")):this.commandResults_$.update(i=>[...i,{output:r.output,success:r.success,error:r.error}])}catch(r){this.runCommandError_$.set(r)}finally{this.runCommandLoading_$.set(!1)}})}ngOnDestroy(){this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=_({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{B as a};
2
+ //# sourceMappingURL=chunk-VYBCAMPC.js.map
@@ -1,2 +1,2 @@
1
- import{p as v}from"./chunk-WR6NSOQ2.js";import{aa as p,h as g,k as m,y as f}from"./chunk-TBMJSIBB.js";var n=function(l){return l.stopped="stopped",l.standby="standby",l.running="running",l}(n||{});var C={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},M={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},h=class{static wrapGetUserMediaError(r){if(r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.code.startsWith("CCAP_"))return r;let e=r instanceof DOMException||r instanceof Error?r.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let s=new Error(i);return s.code=t,s.cause=r,s}static getGetUserMediaErrorMessage(r){switch(r instanceof DOMException||r instanceof Error?r.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(r){switch(r instanceof DOMException||r instanceof Error?r.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(r){return`Media recording not available (reason: ${r}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(r){return M[r]??""}static getMediaUnavailableMessage(r){return C[r]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var o=g(v());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class l{volumeGate=.05;silenceTimeLimitMs=5*o.second;timesliceMs=5*o.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*o.second;state_$=p(n.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;pendingOverlapPrevMs=0;newRecorderStartAt=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return m(this,null,function*(){if(this.state_$()===n.stopped)try{let e=h.getMediaRecordingAvailability();if(!e.supported){let s=`Media recording not available (reason: ${e.reason??"unknown"})`,a=new Error(s);throw a.code="CCAP_MEDIA_NOT_AVAILABLE",a}let t=null;try{let s=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),a=new Promise((d,u)=>{t=setTimeout(()=>{let c=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);c.code="CCAP_MIC_TIMEOUT",u(c)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([s,a])}catch(s){throw h.wrapGetUserMediaError(s)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(o.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{o.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(n.standby)}catch(e){throw this.state_$.set(n.stopped),e}})}stopListening(){let e=this.state_$()===n.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(n.stopped)}startCapture(){return m(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.pendingOverlapPrevMs=0,this.newRecorderStartAt=null,this.createAndStartRecorder(),this.state_$.set(n.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(n.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==n.running)){try{this.mediaRecorder.stop()}catch(i){o.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped)}}}createRecorder(e){if(!this.mediaStream)return null;let t=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3});return t.ondataavailable=i=>{if(i.data.size>0&&e.push(i.data),this.mediaRecorder!==t||this.state_$()!==n.running||this.isRestartingForFlush)return;let s=e.length>=this.segmentMaxChunks,a=e.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(s||a)&&this.restartRecorderForFlush()},t}createAndStartRecorder(){let e=this.createRecorder(this.chunks);e&&(this.mediaRecorder=e,e.start(this.timesliceMs))}restartRecorderForFlush(){if(!this.mediaRecorder||this.mediaRecorder.state==="inactive"||!this.mediaStream)return;this.isRestartingForFlush=!0,this.silenceStartTime=null;let e=this.mediaRecorder,t=this.chunks,i=[],s=this.createRecorder(i);if(!s){this.isRestartingForFlush=!1;return}if(this.mediaRecorder=s,this.chunks=i,o.DyFM_Log.info("[CCAP] restartRecorderForFlush (dual): starting new recorder before stopping old"),s.start(this.timesliceMs),s.state==="recording"){this.newRecorderStartAt=Date.now(),this.finalizeFlushByStoppingOldRecorder(e,t);return}let a=!1,d=c=>{a||(a=!0,s.removeEventListener("start",u),this.newRecorderStartAt===null&&c!==null&&(this.newRecorderStartAt=c),this.finalizeFlushByStoppingOldRecorder(e,t))},u=()=>{this.newRecorderStartAt=Date.now(),d(null)};s.addEventListener("start",u),setTimeout(()=>{d(Date.now()-500)},500)}finalizeFlushByStoppingOldRecorder(e,t){let i=this.pendingOverlapPrevMs,s=this.newRecorderStartAt;e.onstop=()=>{let a=Date.now();this.pendingOverlapPrevMs=s!==null?Math.max(0,a-s):0;let d=t.length;this.flushChunksFromArray(t,!1,i),o.DyFM_Log.info(`[CCAP] restartRecorderForFlush (dual): flushed ${d} old chunks as segment, overlapPrevMs=${i}, nextOverlapPrevMs=${this.pendingOverlapPrevMs}`),this.isRestartingForFlush=!1};try{e.stop()}catch{let a=Date.now();this.pendingOverlapPrevMs=s!==null?Math.max(0,a-s):0,this.flushChunksFromArray(t,!1,i),this.isRestartingForFlush=!1}}flushChunksFromArray(e,t,i){if(e.length===0)return;let s=new Blob(e,{type:this.selectedMime}),a={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:t,overlapPrevMs:i};this.onChunkCb?.(s,a)}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=this.pendingOverlapPrevMs;this.pendingOverlapPrevMs=0;let i=new Blob(this.chunks,{type:this.selectedMime}),s={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e,overlapPrevMs:t};this.chunks=[],this.onChunkCb?.(i,s)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";o.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==n.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let d=0;d<e.length;d++)i+=Math.abs(e[d]);let s=i/e.length;this.onVolumeCb(s);let a=this.state_$();if(a===n.standby&&s>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}a===n.running&&!this.isRestartingForFlush&&(s<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{o.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||l)};static \u0275prov=f({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{n as a,h as b,z as c};
2
- //# sourceMappingURL=chunk-6RYNRTDZ.js.map
1
+ import{p as v}from"./chunk-YSI2TV56.js";import{aa as p,h as g,k as m,y as f}from"./chunk-TBMJSIBB.js";var n=function(l){return l.stopped="stopped",l.standby="standby",l.running="running",l}(n||{});var C={navigator_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 k\xF6rnyezet nem t\xE1mogatja a navigator API-t.",media_devices_unavailable:"A hangfelv\xE9tel nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 ezen az oldalon nem ad hozz\xE1f\xE9r\xE9st a mikrofonhoz.",secure_context_required:"A hangfelv\xE9tel ezen az oldalon nem el\xE9rhet\u0151: a b\xF6ng\xE9sz\u0151 csak biztons\xE1gos kapcsolatban (HTTPS vagy localhost) enged\xE9lyezi a mikrofont."},M={media_devices_unavailable:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on.",secure_context_required:"A mikrofonhoz haszn\xE1ld az alkalmaz\xE1st HTTPS c\xEDmen (pl. https://localhost:39051) vagy localhost-on."},h=class{static wrapGetUserMediaError(r){if(r instanceof Error&&"code"in r&&typeof r.code=="string"&&r.code.startsWith("CCAP_"))return r;let e=r instanceof DOMException||r instanceof Error?r.name:"UnknownError",t,i;switch(e){case"NotAllowedError":t="CCAP_MIC_PERMISSION_DENIED",i="Microphone access denied by user or browser policy";break;case"NotFoundError":t="CCAP_MIC_NOT_FOUND",i="No microphone device found on this device";break;case"NotReadableError":t="CCAP_MIC_NOT_READABLE",i="Microphone hardware error or device already in use by another application";break;case"OverconstrainedError":t="CCAP_MIC_OVERCONSTRAINED",i="Microphone does not support the requested audio constraints";break;case"AbortError":t="CCAP_MIC_ABORTED",i="Microphone access request was aborted by the system";break;case"SecurityError":t="CCAP_MIC_SECURITY_ERROR",i="Microphone access blocked by document security policy (Permissions-Policy / iframe)";break;default:t="CCAP_MIC_UNKNOWN_ERROR",i=`getUserMedia failed with ${e}`;break}let s=new Error(i);return s.code=t,s.cause=r,s}static getGetUserMediaErrorMessage(r){switch(r instanceof DOMException||r instanceof Error?r.name:""){case"NotAllowedError":return"A mikrofon haszn\xE1lata nem enged\xE9lyezett: a b\xF6ng\xE9sz\u0151 vagy a felhaszn\xE1l\xF3 megtagadta a hozz\xE1f\xE9r\xE9st.";case"NotFoundError":return"Nem tal\xE1lhat\xF3 mikrofon ezen az eszk\xF6z\xF6n.";case"NotReadableError":return"A mikrofon nem olvashat\xF3: hardverhiba vagy egy m\xE1sik alkalmaz\xE1s haszn\xE1lja.";case"OverconstrainedError":return"A mikrofon nem t\xE1mogatja a k\xE9rt audio be\xE1ll\xEDt\xE1sokat.";case"AbortError":return"A mikrofon-hozz\xE1f\xE9r\xE9si k\xE9r\xE9s megszakadt.";case"SecurityError":return"A mikrofon-hozz\xE1f\xE9r\xE9st a biztons\xE1gi szab\xE1lyzat (Permissions-Policy / iframe) blokkolta.";default:return"A mikrofon el\xE9r\xE9se sikertelen (ismeretlen hiba)."}}static getGetUserMediaErrorHint(r){switch(r instanceof DOMException||r instanceof Error?r.name:""){case"NotAllowedError":return"Enged\xE9lyezd a mikrofont a b\xF6ng\xE9sz\u0151 c\xEDmsor\xE1ban (lakat ikon \u2192 Mikrofon \u2192 Enged\xE9lyez\xE9s), majd pr\xF3b\xE1ld \xFAjra. Androidon: Be\xE1ll\xEDt\xE1sok \u2192 Alkalmaz\xE1sok \u2192 Chrome \u2192 Enged\xE9lyek \u2192 Mikrofon.";case"NotReadableError":return"Z\xE1rd be a mikrofont haszn\xE1l\xF3 m\xE1sik alkalmaz\xE1st (pl. vide\xF3h\xEDv\xE1s, diktafon), majd pr\xF3b\xE1ld \xFAjra.";case"SecurityError":return'Ha az alkalmaz\xE1s iframe-ben fut, az iframe-nek "allow=microphone" attrib\xFAtumra van sz\xFCks\xE9ge.';default:return""}}static getMediaRecordingAvailability(){return typeof navigator>"u"?{supported:!1,reason:"navigator_unavailable"}:typeof window<"u"&&window.isSecureContext===!1?{supported:!1,reason:"secure_context_required"}:navigator.mediaDevices==null?{supported:!1,reason:"media_devices_unavailable"}:{supported:!0}}static getMediaUnavailableReportMessage(r){return`Media recording not available (reason: ${r}). Use HTTPS or localhost for microphone access.`}static getMediaUnavailableHint(r){return M[r]??""}static getMediaUnavailableMessage(r){return C[r]??"A hangfelv\xE9tel nem el\xE9rhet\u0151 ezen az oldalon."}};var o=g(v());var A=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/ogg","audio/mp4"],z=(()=>{class l{volumeGate=.05;silenceTimeLimitMs=5*o.second;timesliceMs=5*o.second;segmentMaxChunks=6;segmentSoftFlushMinChunks=4;getUserMediaTimeoutMs=15*o.second;state_$=p(n.stopped);mediaStream=null;mediaRecorder=null;audioContext=null;analyser=null;audioSourceNode=null;volumeAnimationId=null;chunkIndex=0;chunks=[];isRestartingForFlush=!1;selectedMime="";onChunkCb=null;onVolumeCb=null;onErrorCb=null;deviceChangeHandler=null;silenceStartTime=null;pendingOverlapPrevMs=0;newRecorderStartAt=null;setOnChunk(e){this.onChunkCb=e}setOnVolume(e){this.onVolumeCb=e}setOnError(e){this.onErrorCb=e}selectMime(){for(let e of A)if(MediaRecorder.isTypeSupported(e))return e;return"audio/webm"}getExtension(){return this.selectedMime.startsWith("audio/webm")?"webm":this.selectedMime.startsWith("audio/ogg")?"ogg":this.selectedMime.startsWith("audio/mp4")?"mp4":"webm"}startListening(){return m(this,null,function*(){if(this.state_$()===n.stopped)try{let e=h.getMediaRecordingAvailability();if(!e.supported){let s=`Media recording not available (reason: ${e.reason??"unknown"})`,a=new Error(s);throw a.code="CCAP_MEDIA_NOT_AVAILABLE",a}let t=null;try{let s=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0,channelCount:1}}),a=new Promise((d,u)=>{t=setTimeout(()=>{let c=new Error(`getUserMedia timed out after ${this.getUserMediaTimeoutMs}ms`);c.code="CCAP_MIC_TIMEOUT",u(c)},this.getUserMediaTimeoutMs)});this.mediaStream=yield Promise.race([s,a])}catch(s){throw h.wrapGetUserMediaError(s)}finally{t!==null&&clearTimeout(t)}let i=this.mediaStream.getAudioTracks()[0];i&&(o.DyFM_Log.info("[CCAP] mic track settings",i.getSettings()),i.onended=()=>{o.DyFM_Log.info("[CCAP] mic track ended unexpectedly"),this.stopListening(),this.onErrorCb?.(new Error("Microphone track ended unexpectedly (device disconnected?)"))}),this.registerDeviceChangeListener(),this.selectedMime=this.selectMime(),this.startVolumeLoop(),this.state_$.set(n.standby)}catch(e){throw this.state_$.set(n.stopped),e}})}stopListening(){let e=this.state_$()===n.running;e&&this.stopCapture(!0),this.stopVolumeLoop(),e||this.stopMediaRecorder(),this.silenceStartTime=null,this.unregisterDeviceChangeListener(),this.mediaStream&&(this.mediaStream.getTracks().forEach(t=>t.stop()),this.mediaStream=null),this.state_$.set(n.stopped)}startCapture(){return m(this,null,function*(){try{if(this.mediaStream==null&&(yield this.startListening()),this.mediaStream==null)return;this.silenceStartTime=null,this.chunks=[],this.pendingOverlapPrevMs=0,this.newRecorderStartAt=null,this.createAndStartRecorder(),this.state_$.set(n.running)}catch(e){this.stopVolumeLoop(),this.state_$.set(n.stopped),this.onErrorCb?.(e)}})}stopCapture(e=!1,t=!1){if(this.isRestartingForFlush=!1,!(this.mediaRecorder==null||this.state_$()!==n.running)){try{this.mediaRecorder.stop()}catch(i){o.DyFM_Log.info("[CCAP] mediaRecorder.stop() failed (likely already inactive)",i),this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped);return}if(t){this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped);return}this.mediaRecorder.onstop=()=>{this.mediaRecorder=null,this.flushChunksAsSegment(e),this.state_$.set(this.mediaStream?n.standby:n.stopped)}}}createRecorder(e){if(!this.mediaStream)return null;let t=new MediaRecorder(this.mediaStream,{mimeType:this.selectedMime,audioBitsPerSecond:128e3});return t.ondataavailable=i=>{if(i.data.size>0&&e.push(i.data),this.mediaRecorder!==t||this.state_$()!==n.running||this.isRestartingForFlush)return;let s=e.length>=this.segmentMaxChunks,a=e.length>=this.segmentSoftFlushMinChunks&&this.silenceStartTime!==null;(s||a)&&this.restartRecorderForFlush()},t}createAndStartRecorder(){let e=this.createRecorder(this.chunks);e&&(this.mediaRecorder=e,e.start(this.timesliceMs))}restartRecorderForFlush(){if(!this.mediaRecorder||this.mediaRecorder.state==="inactive"||!this.mediaStream)return;this.isRestartingForFlush=!0,this.silenceStartTime=null;let e=this.mediaRecorder,t=this.chunks,i=[],s=this.createRecorder(i);if(!s){this.isRestartingForFlush=!1;return}if(this.mediaRecorder=s,this.chunks=i,o.DyFM_Log.info("[CCAP] restartRecorderForFlush (dual): starting new recorder before stopping old"),s.start(this.timesliceMs),s.state==="recording"){this.newRecorderStartAt=Date.now(),this.finalizeFlushByStoppingOldRecorder(e,t);return}let a=!1,d=c=>{a||(a=!0,s.removeEventListener("start",u),this.newRecorderStartAt===null&&c!==null&&(this.newRecorderStartAt=c),this.finalizeFlushByStoppingOldRecorder(e,t))},u=()=>{this.newRecorderStartAt=Date.now(),d(null)};s.addEventListener("start",u),setTimeout(()=>{d(Date.now()-500)},500)}finalizeFlushByStoppingOldRecorder(e,t){let i=this.pendingOverlapPrevMs,s=this.newRecorderStartAt;e.onstop=()=>{let a=Date.now();this.pendingOverlapPrevMs=s!==null?Math.max(0,a-s):0;let d=t.length;this.flushChunksFromArray(t,!1,i),o.DyFM_Log.info(`[CCAP] restartRecorderForFlush (dual): flushed ${d} old chunks as segment, overlapPrevMs=${i}, nextOverlapPrevMs=${this.pendingOverlapPrevMs}`),this.isRestartingForFlush=!1};try{e.stop()}catch{let a=Date.now();this.pendingOverlapPrevMs=s!==null?Math.max(0,a-s):0,this.flushChunksFromArray(t,!1,i),this.isRestartingForFlush=!1}}flushChunksFromArray(e,t,i){if(e.length===0)return;let s=new Blob(e,{type:this.selectedMime}),a={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:t,overlapPrevMs:i};this.onChunkCb?.(s,a)}flushChunksAsSegment(e){if(this.chunks.length===0)return;let t=this.pendingOverlapPrevMs;this.pendingOverlapPrevMs=0;let i=new Blob(this.chunks,{type:this.selectedMime}),s={mimeType:this.selectedMime,filename:`audio-${Date.now()}.${this.getExtension()}`,chunkIndex:this.chunkIndex++,isFinal:e,overlapPrevMs:t};this.chunks=[],this.onChunkCb?.(i,s)}startVolumeLoop(){if(this.mediaStream==null||this.onVolumeCb==null)return;this.audioContext=new AudioContext,this.audioContext.state==="suspended"&&this.audioContext.resume().catch(()=>{}),this.audioContext.onstatechange=()=>{let i=this.audioContext?.state??"unknown";o.DyFM_Log.info("[CCAP] AudioContext state changed:",i),i==="suspended"&&this.state_$()!==n.stopped&&this.audioContext?.resume().catch(()=>{})},this.audioSourceNode=this.audioContext.createMediaStreamSource(this.mediaStream),this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.analyser.smoothingTimeConstant=.8,this.audioSourceNode.connect(this.analyser);let e=new Float32Array(this.analyser.fftSize),t=()=>{if(this.analyser==null||this.onVolumeCb==null)return;this.analyser.getFloatTimeDomainData(e);let i=0;for(let d=0;d<e.length;d++)i+=Math.abs(e[d]);let s=i/e.length;this.onVolumeCb(s);let a=this.state_$();if(a===n.standby&&s>=this.volumeGate){this.startCapture(),this.volumeAnimationId=requestAnimationFrame(t);return}a===n.running&&!this.isRestartingForFlush&&(s<this.volumeGate?this.silenceStartTime===null?this.silenceStartTime=Date.now():Date.now()-this.silenceStartTime>=this.silenceTimeLimitMs&&(this.stopCapture(),this.silenceStartTime=null):this.silenceStartTime=null),this.volumeAnimationId=requestAnimationFrame(t)};t()}stopVolumeLoop(){this.volumeAnimationId!=null&&(cancelAnimationFrame(this.volumeAnimationId),this.volumeAnimationId=null),this.audioSourceNode=null,this.audioContext!=null&&(this.audioContext.onstatechange=null,this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyser=null}stopMediaRecorder(){if(this.mediaRecorder!=null&&this.mediaRecorder.state!=="inactive"){try{this.mediaRecorder.stop()}catch{}this.mediaRecorder=null}this.chunks=[],this.isRestartingForFlush=!1}registerDeviceChangeListener(){try{this.deviceChangeHandler=()=>{o.DyFM_Log.info("[CCAP] media device change detected")},navigator.mediaDevices.addEventListener("devicechange",this.deviceChangeHandler)}catch{this.deviceChangeHandler=null}}unregisterDeviceChangeListener(){if(this.deviceChangeHandler){try{navigator.mediaDevices.removeEventListener("devicechange",this.deviceChangeHandler)}catch{}this.deviceChangeHandler=null}}static \u0275fac=function(t){return new(t||l)};static \u0275prov=f({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{n as a,h as b,z as c};
2
+ //# sourceMappingURL=chunk-W3BQ3EYT.js.map
@@ -1,2 +1,2 @@
1
- import{I as o}from"./chunk-WR6NSOQ2.js";import{C as s,p as r,xb as a,y as n}from"./chunk-TBMJSIBB.js";var h=(()=>{class e{baseUrl=`${o.api.baseUrl}/oci-instance-data`;http=s(a);listInstances(){return r(this.http.get(`${this.baseUrl}/list`))}getByInstanceId(t){return r(this.http.get(`${this.baseUrl}/by-id/${t}`))}patchVisuals(t){let i={};return t.label!==void 0&&(i.label=t.label),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),r(this.http.patch(`${this.baseUrl}/by-id/${t.instanceId}`,i))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{h as a};
2
- //# sourceMappingURL=chunk-QXQWNRPL.js.map
1
+ import{I as o}from"./chunk-YSI2TV56.js";import{C as s,p as r,xb as a,y as n}from"./chunk-TBMJSIBB.js";var h=(()=>{class e{baseUrl=`${o.api.baseUrl}/oci-instance-data`;http=s(a);listInstances(){return r(this.http.get(`${this.baseUrl}/list`))}getByInstanceId(t){return r(this.http.get(`${this.baseUrl}/by-id/${t}`))}patchVisuals(t){let i={};return t.label!==void 0&&(i.label=t.label),t.darkOfficeVisuals!==void 0&&(i.darkOfficeVisuals=t.darkOfficeVisuals),r(this.http.patch(`${this.baseUrl}/by-id/${t.instanceId}`,i))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{h as a};
2
+ //# sourceMappingURL=chunk-WCOEXEAR.js.map