@memberjunction/ng-dashboards 6.2.0-edge.6 → 6.2.0-edge.8

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 (233) hide show
  1. package/README.md +23 -16
  2. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js +2 -2
  3. package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js.map +1 -1
  4. package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -1
  5. package/dist/AI/components/analytics/realtime/realtime-management.component.js +3 -1
  6. package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -1
  7. package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +1 -1
  8. package/dist/AI/components/analytics/realtime/realtime-overview.component.js +3 -3
  9. package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -1
  10. package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +6 -4
  11. package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -1
  12. package/dist/AI/components/analytics/realtime/realtime-session-data.js +8 -2
  13. package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -1
  14. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  15. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +31 -10
  16. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  17. package/dist/AI/components/autotagging/components/classify-item-grid.component.js +1 -1
  18. package/dist/AI/components/autotagging/components/classify-item-grid.component.js.map +1 -1
  19. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.d.ts.map +1 -1
  20. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js +1 -0
  21. package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js.map +1 -1
  22. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts.map +1 -1
  23. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js +1 -0
  24. package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js.map +1 -1
  25. package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -1
  26. package/dist/AI/components/autotagging/tabs/sources-tab.component.js +1 -0
  27. package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
  28. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  29. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +1 -0
  30. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  31. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +2 -2
  32. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  33. package/dist/AI/components/tags/tags-resource.component.js +14 -24
  34. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  35. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  36. package/dist/AI/components/vectors/vector-management-resource.component.js +14 -7
  37. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  38. package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
  39. package/dist/AI/services/ai-instrumentation.service.js +4 -2
  40. package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
  41. package/dist/Actions/action-result-code.d.ts +80 -0
  42. package/dist/Actions/action-result-code.d.ts.map +1 -0
  43. package/dist/Actions/action-result-code.js +163 -0
  44. package/dist/Actions/action-result-code.js.map +1 -0
  45. package/dist/Actions/components/actions-overview.component.d.ts +8 -0
  46. package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
  47. package/dist/Actions/components/actions-overview.component.js +12 -9
  48. package/dist/Actions/components/actions-overview.component.js.map +1 -1
  49. package/dist/Actions/components/execution-monitoring.component.d.ts +29 -9
  50. package/dist/Actions/components/execution-monitoring.component.d.ts.map +1 -1
  51. package/dist/Actions/components/execution-monitoring.component.js +65 -42
  52. package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
  53. package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -1
  54. package/dist/Actions/components/explorer/action-card.component.js +5 -4
  55. package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
  56. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +92 -130
  57. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -1
  58. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +189 -274
  59. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -1
  60. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts +29 -0
  61. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts.map +1 -0
  62. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js +666 -0
  63. package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js.map +1 -0
  64. package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts +56 -0
  65. package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts.map +1 -0
  66. package/dist/ChiefOfStaff/chief-of-staff-governance.component.js +515 -0
  67. package/dist/ChiefOfStaff/chief-of-staff-governance.component.js.map +1 -0
  68. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts +14 -0
  69. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts.map +1 -0
  70. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js +39 -0
  71. package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js.map +1 -0
  72. package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts +17 -0
  73. package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts.map +1 -0
  74. package/dist/ChiefOfStaff/chief-of-staff-overview.component.js +485 -0
  75. package/dist/ChiefOfStaff/chief-of-staff-overview.component.js.map +1 -0
  76. package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts +139 -0
  77. package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts.map +1 -0
  78. package/dist/ChiefOfStaff/chief-of-staff-page-base.js +602 -0
  79. package/dist/ChiefOfStaff/chief-of-staff-page-base.js.map +1 -0
  80. package/dist/ChiefOfStaff/index.d.ts +4 -1
  81. package/dist/ChiefOfStaff/index.d.ts.map +1 -1
  82. package/dist/ChiefOfStaff/index.js +4 -1
  83. package/dist/ChiefOfStaff/index.js.map +1 -1
  84. package/dist/Communication/communication-monitor-resource.component.js +3 -3
  85. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  86. package/dist/Communication/communication-runs-resource.component.js +3 -3
  87. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  88. package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
  89. package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
  90. package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
  91. package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
  92. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +2 -1
  93. package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
  94. package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -1
  95. package/dist/ComponentStudio/services/component-version.service.js +3 -0
  96. package/dist/ComponentStudio/services/component-version.service.js.map +1 -1
  97. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +21 -2
  98. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  99. package/dist/DataExplorer/data-explorer-dashboard.component.js +32 -5
  100. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  101. package/dist/DevTools/graphql-console.component.js +2 -2
  102. package/dist/DevTools/lazy-module-status.component.js +2 -2
  103. package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
  104. package/dist/FormBuilder/form-builder-resource.component.js +5 -0
  105. package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
  106. package/dist/Integration/components/connections/connections.component.js +2 -2
  107. package/dist/Integration/services/integration-data.service.d.ts +1 -1
  108. package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
  109. package/dist/Integration/services/integration-data.service.js +4 -3
  110. package/dist/Integration/services/integration-data.service.js.map +1 -1
  111. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.d.ts.map +1 -1
  112. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js +11 -3
  113. package/dist/KnowledgeHub/components/clusters/cluster-visualization-resource.component.js.map +1 -1
  114. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +16 -16
  115. package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
  116. package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.d.ts +113 -0
  117. package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.d.ts.map +1 -0
  118. package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.js +1184 -0
  119. package/dist/KnowledgeHub/components/visualize/semantic-graph/semantic-graph-explorer.component.js.map +1 -0
  120. package/dist/KnowledgeHub/components/visualize/visualize-agent-context.d.ts +1 -1
  121. package/dist/KnowledgeHub/components/visualize/visualize-agent-context.d.ts.map +1 -1
  122. package/dist/KnowledgeHub/components/visualize/visualize-agent-context.js +1 -1
  123. package/dist/KnowledgeHub/components/visualize/visualize-agent-context.js.map +1 -1
  124. package/dist/KnowledgeHub/components/visualize/visualize-resource.component.d.ts +1 -1
  125. package/dist/KnowledgeHub/components/visualize/visualize-resource.component.d.ts.map +1 -1
  126. package/dist/KnowledgeHub/components/visualize/visualize-resource.component.js +21 -10
  127. package/dist/KnowledgeHub/components/visualize/visualize-resource.component.js.map +1 -1
  128. package/dist/Lists/components/lists-browse-resource.component.js +1 -1
  129. package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
  130. package/dist/Lists/components/lists-my-lists-resource.component.js +1 -1
  131. package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
  132. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
  133. package/dist/LoginStudio/login-studio-resource.component.js +1 -0
  134. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
  135. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  136. package/dist/PredictiveStudio/components/ps-experiments.component.js +1 -0
  137. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  138. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +2 -2
  139. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  140. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +3 -0
  141. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  142. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  143. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +1 -0
  144. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  145. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  146. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +1 -0
  147. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  148. package/dist/QueryBrowser/query-browser-resource.component.d.ts +26 -0
  149. package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
  150. package/dist/QueryBrowser/query-browser-resource.component.js +375 -252
  151. package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
  152. package/dist/SystemDiagnostics/system-diagnostics.component.d.ts.map +1 -1
  153. package/dist/SystemDiagnostics/system-diagnostics.component.js +4 -2
  154. package/dist/SystemDiagnostics/system-diagnostics.component.js.map +1 -1
  155. package/dist/UserRoutines/user-routines-resource.component.d.ts +8 -1
  156. package/dist/UserRoutines/user-routines-resource.component.d.ts.map +1 -1
  157. package/dist/UserRoutines/user-routines-resource.component.js +22 -4
  158. package/dist/UserRoutines/user-routines-resource.component.js.map +1 -1
  159. package/dist/VersionHistory/components/diff-resource.component.d.ts.map +1 -1
  160. package/dist/VersionHistory/components/diff-resource.component.js +1 -0
  161. package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
  162. package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts +162 -0
  163. package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts.map +1 -0
  164. package/dist/VideoStudio/components/vs-archetype-editor.component.js +1105 -0
  165. package/dist/VideoStudio/components/vs-archetype-editor.component.js.map +1 -0
  166. package/dist/VideoStudio/components/vs-audio-options.component.d.ts +27 -0
  167. package/dist/VideoStudio/components/vs-audio-options.component.d.ts.map +1 -0
  168. package/dist/VideoStudio/components/vs-audio-options.component.js +119 -0
  169. package/dist/VideoStudio/components/vs-audio-options.component.js.map +1 -0
  170. package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts +105 -0
  171. package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts.map +1 -0
  172. package/dist/VideoStudio/components/vs-copilot-panel.component.js +560 -0
  173. package/dist/VideoStudio/components/vs-copilot-panel.component.js.map +1 -0
  174. package/dist/VideoStudio/components/vs-production-brief.component.d.ts +163 -0
  175. package/dist/VideoStudio/components/vs-production-brief.component.d.ts.map +1 -0
  176. package/dist/VideoStudio/components/vs-production-brief.component.js +1054 -0
  177. package/dist/VideoStudio/components/vs-production-brief.component.js.map +1 -0
  178. package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts +43 -0
  179. package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts.map +1 -0
  180. package/dist/VideoStudio/components/vs-setup-health-card.component.js +412 -0
  181. package/dist/VideoStudio/components/vs-setup-health-card.component.js.map +1 -0
  182. package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts +73 -0
  183. package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts.map +1 -0
  184. package/dist/VideoStudio/components/vs-studio-slide-in.component.js +271 -0
  185. package/dist/VideoStudio/components/vs-studio-slide-in.component.js.map +1 -0
  186. package/dist/VideoStudio/index.d.ts +12 -0
  187. package/dist/VideoStudio/index.d.ts.map +1 -0
  188. package/dist/VideoStudio/index.js +12 -0
  189. package/dist/VideoStudio/index.js.map +1 -0
  190. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts +118 -0
  191. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts.map +1 -0
  192. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js +964 -0
  193. package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js.map +1 -0
  194. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts +70 -0
  195. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts.map +1 -0
  196. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js +600 -0
  197. package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js.map +1 -0
  198. package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts +182 -0
  199. package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts.map +1 -0
  200. package/dist/VideoStudio/resources/video-studio-productions-resource.component.js +1481 -0
  201. package/dist/VideoStudio/resources/video-studio-productions-resource.component.js.map +1 -0
  202. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts +102 -0
  203. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts.map +1 -0
  204. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js +240 -0
  205. package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js.map +1 -0
  206. package/dist/VideoStudio/video-studio-agent-context.d.ts +495 -0
  207. package/dist/VideoStudio/video-studio-agent-context.d.ts.map +1 -0
  208. package/dist/VideoStudio/video-studio-agent-context.js +992 -0
  209. package/dist/VideoStudio/video-studio-agent-context.js.map +1 -0
  210. package/dist/ai-dashboards.module.d.ts +46 -41
  211. package/dist/ai-dashboards.module.d.ts.map +1 -1
  212. package/dist/ai-dashboards.module.js +33 -7
  213. package/dist/ai-dashboards.module.js.map +1 -1
  214. package/dist/module.d.ts +13 -12
  215. package/dist/module.d.ts.map +1 -1
  216. package/dist/module.js +7 -0
  217. package/dist/module.js.map +1 -1
  218. package/dist/public-api.d.ts +8 -1
  219. package/dist/public-api.d.ts.map +1 -1
  220. package/dist/public-api.js +10 -2
  221. package/dist/public-api.js.map +1 -1
  222. package/dist/shared/action-scheduled-job.d.ts.map +1 -1
  223. package/dist/shared/action-scheduled-job.js +2 -0
  224. package/dist/shared/action-scheduled-job.js.map +1 -1
  225. package/dist/video-studio-dashboards.module.d.ts +40 -0
  226. package/dist/video-studio-dashboards.module.d.ts.map +1 -0
  227. package/dist/video-studio-dashboards.module.js +159 -0
  228. package/dist/video-studio-dashboards.module.js.map +1 -0
  229. package/package.json +78 -71
  230. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +0 -195
  231. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +0 -1
  232. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +0 -2910
  233. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +0 -1
@@ -0,0 +1,1054 @@
1
+ import { ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChildren, inject, } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { LogError, RunView } from '@memberjunction/core';
5
+ import { BrandKitEngine, VideoStudioEngine, VideoStudioSetupHealthOperation, } from '@memberjunction/core-entities';
6
+ import { ExcludeByUUIDs, UUIDsEqual } from '@memberjunction/global';
7
+ import { FormatVideoTime, FormatVideoTimeRange, MJVideoBeatStripComponent, MJVideoFormatGlyphComponent, } from '@memberjunction/ng-artifacts';
8
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
9
+ import { BrandKitCreatorComponent } from '@memberjunction/ng-brand-kits';
10
+ import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
11
+ import { MJButtonDirective, MJDialogComponent, MJDropdownComponent, MJNumericInputComponent, } from '@memberjunction/ng-ui-components';
12
+ import { VSArchetypeEditorComponent } from './vs-archetype-editor.component';
13
+ import { VSAudioOptionsComponent } from './vs-audio-options.component';
14
+ import { VSSetupHealthCardComponent } from './vs-setup-health-card.component';
15
+ import { BuildArchetypeBeatStripItems, BuildSavedQuerySearchFilter, BuildStudioAppContext, ClampStudioDuration, ComposeStudioFirstMessage, MapArchetypeToCard, MapBrandKitToCard, ParseArchetypeDefaultFormats, ResolveVideoStudioItem, STUDIO_VIDEO_FORMATS, } from '../video-studio-agent-context';
16
+ import * as i0 from "@angular/core";
17
+ import * as i1 from "@angular/forms";
18
+ import * as i2 from "@memberjunction/ng-shared-generic";
19
+ const _forTrack0 = ($index, $item) => $item.ID;
20
+ function VSProductionBriefComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
21
+ const _r1 = i0.ɵɵgetCurrentView();
22
+ i0.ɵɵelementStart(0, "section", 2)(1, "vs-setup-health-card", 44);
23
+ i0.ɵɵlistener("ExpandedChange", function VSProductionBriefComponent_Conditional_2_Template_vs_setup_health_card_ExpandedChange_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnSetupHealthExpandedChange($event)); })("Recheck", function VSProductionBriefComponent_Conditional_2_Template_vs_setup_health_card_Recheck_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CheckSetupHealth()); });
24
+ i0.ɵɵelementEnd()();
25
+ } if (rf & 2) {
26
+ const ctx_r1 = i0.ɵɵnextContext();
27
+ i0.ɵɵadvance();
28
+ i0.ɵɵproperty("Result", ctx_r1.SetupHealthResult)("Loading", ctx_r1.IsCheckingSetupHealth)("Expanded", ctx_r1.IsAllSetupOk && ctx_r1.ShowHealthySetupDetails);
29
+ } }
30
+ function VSProductionBriefComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
31
+ i0.ɵɵelementStart(0, "div", 11);
32
+ i0.ɵɵelement(1, "mj-loading", 45);
33
+ i0.ɵɵelementEnd();
34
+ } }
35
+ function VSProductionBriefComponent_Conditional_16_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
36
+ i0.ɵɵelementStart(0, "p", 51);
37
+ i0.ɵɵtext(1);
38
+ i0.ɵɵelementEnd();
39
+ } if (rf & 2) {
40
+ const arch_r4 = i0.ɵɵnextContext().$implicit;
41
+ i0.ɵɵadvance();
42
+ i0.ɵɵtextInterpolate(arch_r4.Description);
43
+ } }
44
+ function VSProductionBriefComponent_Conditional_16_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
45
+ i0.ɵɵelement(0, "mj-video-beat-strip", 52);
46
+ } if (rf & 2) {
47
+ const arch_r4 = i0.ɵɵnextContext().$implicit;
48
+ const ctx_r1 = i0.ɵɵnextContext(2);
49
+ i0.ɵɵproperty("Beats", ctx_r1.GetArchetypeBeats(arch_r4))("ShowLabels", true);
50
+ } }
51
+ function VSProductionBriefComponent_Conditional_16_For_2_Template(rf, ctx) { if (rf & 1) {
52
+ const _r3 = i0.ɵɵgetCurrentView();
53
+ i0.ɵɵelementStart(0, "button", 47);
54
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_Conditional_16_For_2_Template_button_click_0_listener() { const arch_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectArchetype(arch_r4)); });
55
+ i0.ɵɵelementStart(1, "div", 48)(2, "span", 49);
56
+ i0.ɵɵtext(3);
57
+ i0.ɵɵelementEnd();
58
+ i0.ɵɵelementStart(4, "span", 50);
59
+ i0.ɵɵtext(5);
60
+ i0.ɵɵelementEnd()();
61
+ i0.ɵɵconditionalCreate(6, VSProductionBriefComponent_Conditional_16_For_2_Conditional_6_Template, 2, 1, "p", 51);
62
+ i0.ɵɵconditionalCreate(7, VSProductionBriefComponent_Conditional_16_For_2_Conditional_7_Template, 1, 2, "mj-video-beat-strip", 52);
63
+ i0.ɵɵelementEnd();
64
+ } if (rf & 2) {
65
+ const arch_r4 = ctx.$implicit;
66
+ const ctx_r1 = i0.ɵɵnextContext(2);
67
+ i0.ɵɵclassProp("vs-brief__archetype-card--selected", ctx_r1.IsArchetypeSelected(arch_r4));
68
+ i0.ɵɵattribute("aria-pressed", ctx_r1.IsArchetypeSelected(arch_r4))("data-testid", "vs-brief-archetype-" + arch_r4.ID);
69
+ i0.ɵɵadvance(3);
70
+ i0.ɵɵtextInterpolate(arch_r4.Name);
71
+ i0.ɵɵadvance(2);
72
+ i0.ɵɵtextInterpolate2(" ", ctx_r1.FormatTime(arch_r4.DefaultDurationSeconds), " (", ctx_r1.FormatTimeRange(arch_r4.MinDurationSeconds, arch_r4.MaxDurationSeconds), ") ");
73
+ i0.ɵɵadvance();
74
+ i0.ɵɵconditional(arch_r4.Description ? 6 : -1);
75
+ i0.ɵɵadvance();
76
+ i0.ɵɵconditional(ctx_r1.GetArchetypeBeats(arch_r4).length > 0 ? 7 : -1);
77
+ } }
78
+ function VSProductionBriefComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
79
+ i0.ɵɵelementStart(0, "div", 12);
80
+ i0.ɵɵrepeaterCreate(1, VSProductionBriefComponent_Conditional_16_For_2_Template, 8, 9, "button", 46, _forTrack0);
81
+ i0.ɵɵelementEnd();
82
+ } if (rf & 2) {
83
+ const ctx_r1 = i0.ɵɵnextContext();
84
+ i0.ɵɵadvance();
85
+ i0.ɵɵrepeater(ctx_r1.AllArchetypes);
86
+ } }
87
+ function VSProductionBriefComponent_For_22_Template(rf, ctx) { if (rf & 1) {
88
+ const _r5 = i0.ɵɵgetCurrentView();
89
+ i0.ɵɵelementStart(0, "button", 53);
90
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_For_22_Template_button_click_0_listener() { const fmt_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.ToggleFormat(fmt_r6)); });
91
+ i0.ɵɵelement(1, "mj-video-format-glyph", 54);
92
+ i0.ɵɵelementEnd();
93
+ } if (rf & 2) {
94
+ const fmt_r6 = ctx.$implicit;
95
+ const ctx_r1 = i0.ɵɵnextContext();
96
+ i0.ɵɵproperty("Toggleable", true)("Selected", ctx_r1.IsFormatSelected(fmt_r6));
97
+ i0.ɵɵattribute("data-testid", "vs-brief-format-" + fmt_r6);
98
+ i0.ɵɵadvance();
99
+ i0.ɵɵproperty("Format", fmt_r6)("ShowLabel", true);
100
+ } }
101
+ function VSProductionBriefComponent_Conditional_55_For_2_Template(rf, ctx) { if (rf & 1) {
102
+ const _r7 = i0.ɵɵgetCurrentView();
103
+ i0.ɵɵelementStart(0, "button", 53);
104
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_Conditional_55_For_2_Template_button_click_0_listener() { const query_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.ToggleSavedQuery(query_r8)); });
105
+ i0.ɵɵelementStart(1, "span");
106
+ i0.ɵɵtext(2);
107
+ i0.ɵɵelementEnd()();
108
+ } if (rf & 2) {
109
+ const query_r8 = ctx.$implicit;
110
+ const ctx_r1 = i0.ɵɵnextContext(2);
111
+ i0.ɵɵproperty("Toggleable", true)("Selected", ctx_r1.IsQuerySelected(query_r8.ID));
112
+ i0.ɵɵattribute("data-testid", "vs-brief-query-" + query_r8.ID);
113
+ i0.ɵɵadvance(2);
114
+ i0.ɵɵtextInterpolate(query_r8.Name);
115
+ } }
116
+ function VSProductionBriefComponent_Conditional_55_Template(rf, ctx) { if (rf & 1) {
117
+ i0.ɵɵelementStart(0, "div", 37);
118
+ i0.ɵɵrepeaterCreate(1, VSProductionBriefComponent_Conditional_55_For_2_Template, 3, 4, "button", 16, _forTrack0);
119
+ i0.ɵɵelementEnd();
120
+ } if (rf & 2) {
121
+ const ctx_r1 = i0.ɵɵnextContext();
122
+ i0.ɵɵadvance();
123
+ i0.ɵɵrepeater(ctx_r1.AvailableQueries);
124
+ } }
125
+ function VSProductionBriefComponent_Conditional_56_Template(rf, ctx) { if (rf & 1) {
126
+ const _r9 = i0.ɵɵgetCurrentView();
127
+ i0.ɵɵelementStart(0, "mj-dialog", 55);
128
+ i0.ɵɵlistener("Close", function VSProductionBriefComponent_Conditional_56_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseBrandKitCreator()); });
129
+ i0.ɵɵelementStart(1, "mj-brand-kit-creator", 56);
130
+ i0.ɵɵlistener("Saved", function VSProductionBriefComponent_Conditional_56_Template_mj_brand_kit_creator_Saved_1_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnBrandKitCreatorSaved($event)); })("Cancelled", function VSProductionBriefComponent_Conditional_56_Template_mj_brand_kit_creator_Cancelled_1_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseBrandKitCreator()); });
131
+ i0.ɵɵelementEnd()();
132
+ } if (rf & 2) {
133
+ const ctx_r1 = i0.ɵɵnextContext();
134
+ i0.ɵɵproperty("Visible", true);
135
+ i0.ɵɵadvance();
136
+ i0.ɵɵproperty("Provider", ctx_r1.ProviderToUse)("Companies", ctx_r1.AvailableCompanies)("InitialCompanyId", ctx_r1.SelectedCompanyId);
137
+ } }
138
+ function VSProductionBriefComponent_Conditional_57_Template(rf, ctx) { if (rf & 1) {
139
+ const _r10 = i0.ɵɵgetCurrentView();
140
+ i0.ɵɵelementStart(0, "mj-dialog", 57);
141
+ i0.ɵɵlistener("Close", function VSProductionBriefComponent_Conditional_57_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseArchetypeEditor()); });
142
+ i0.ɵɵelementStart(1, "vs-archetype-editor", 58);
143
+ i0.ɵɵlistener("Saved", function VSProductionBriefComponent_Conditional_57_Template_vs_archetype_editor_Saved_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnArchetypeEditorSaved($event)); })("Cancelled", function VSProductionBriefComponent_Conditional_57_Template_vs_archetype_editor_Cancelled_1_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CloseArchetypeEditor()); });
144
+ i0.ɵɵelementEnd()();
145
+ } if (rf & 2) {
146
+ const ctx_r1 = i0.ɵɵnextContext();
147
+ i0.ɵɵproperty("Visible", true)("Title", ctx_r1.ArchetypeEditorDialogTitle);
148
+ i0.ɵɵadvance();
149
+ i0.ɵɵproperty("Provider", ctx_r1.ProviderToUse)("SourceArchetypeId", (ctx_r1.SelectedArchetype == null ? null : ctx_r1.SelectedArchetype.ID) ?? null)("Archetypes", ctx_r1.AllArchetypes)("Companies", ctx_r1.AvailableCompanies)("InitialCompanyId", ctx_r1.SelectedCompanyId !== "all" ? ctx_r1.SelectedCompanyId : null);
150
+ } }
151
+ const DEFAULT_STUDIO_DURATION_SECONDS = 30;
152
+ const DEFAULT_MIN_DURATION_SECONDS = 5;
153
+ const DEFAULT_MAX_DURATION_SECONDS = 180;
154
+ const SAVED_QUERIES_MAX_ROWS = 20;
155
+ /**
156
+ * Video Studio production brief (`vs-production-brief`).
157
+ *
158
+ * Renders inside the Video Studio right slide-in before the first conversation message
159
+ * (via `<ng-template mjChatSlot="composerExtra">`), guiding the user through:
160
+ * 1. Setup health (shown on warning/error, or when Setup OK details are toggled from the header)
161
+ * 2. What's it about?
162
+ * 3. Shape (archetype cards with beat strip and m:ss range)
163
+ * 4. Where it plays (format toggles with frame glyph + length numeric input)
164
+ * 5. Sound (`vs-audio-options`)
165
+ * 6. Brand kit (optional)
166
+ * 7. Data (optional)
167
+ * 8. Start production (sticky footer with one-line summary)
168
+ */
169
+ export class VSProductionBriefComponent extends BaseAngularComponent {
170
+ AutoLoad = true;
171
+ AutoCheckSetupHealth = true;
172
+ ShowSetupHealthCard = true;
173
+ SetupHealthResult = null;
174
+ IsCheckingSetupHealth = false;
175
+ ShowHealthySetupDetails = false;
176
+ AllArchetypes = [];
177
+ AllBrandKits = [];
178
+ AvailableQueries = [];
179
+ AvailableFormats = [...STUDIO_VIDEO_FORMATS];
180
+ SelectedArchetype = null;
181
+ SelectedCompanyId = 'all';
182
+ SelectedBrandKit = null;
183
+ SelectedBrandKitExplicitNone = false;
184
+ SelectedFormats = ['16:9'];
185
+ DurationSeconds = DEFAULT_STUDIO_DURATION_SECONDS;
186
+ Topic = '';
187
+ QuerySearchText = '';
188
+ SelectedQueries = [];
189
+ NarrationEnabled = true;
190
+ CaptionsMode = 'Burned';
191
+ StateChange = new EventEmitter();
192
+ StartRequested = new EventEmitter();
193
+ SetupHealthChange = new EventEmitter();
194
+ ShowHealthySetupDetailsChange = new EventEmitter();
195
+ buttonDirectives;
196
+ IsLoading = false;
197
+ LoadError = null;
198
+ IsSearchingQueries = false;
199
+ FilteredBrandKits = [];
200
+ IsBrandKitCreatorOpen = false;
201
+ IsArchetypeEditorOpen = false;
202
+ querySearchRequestId = 0;
203
+ cdr = inject(ChangeDetectorRef);
204
+ async ngOnInit() {
205
+ this.applyCompanyBrandKitFilter();
206
+ if (this.AllArchetypes.length > 0 && !this.SelectedArchetype) {
207
+ this.SelectArchetype(this.AllArchetypes[0]);
208
+ }
209
+ this.emitSetupHealthChange();
210
+ if (!this.AutoLoad) {
211
+ this.emitStateChange();
212
+ return;
213
+ }
214
+ if (this.AutoCheckSetupHealth &&
215
+ !this.SetupHealthResult &&
216
+ !this.IsCheckingSetupHealth) {
217
+ void this.CheckSetupHealth();
218
+ }
219
+ if (this.AllArchetypes.length === 0) {
220
+ await this.LoadBriefData(false);
221
+ }
222
+ else {
223
+ this.emitStateChange();
224
+ }
225
+ }
226
+ get IsAllSetupOk() {
227
+ return Boolean(this.SetupHealthResult &&
228
+ this.SetupHealthResult.Healthy &&
229
+ (this.SetupHealthResult.Checks ?? []).every((check) => check.Status === 'OK'));
230
+ }
231
+ get ShouldShowSetupHealthCard() {
232
+ if (!this.ShowSetupHealthCard || !this.SetupHealthResult) {
233
+ return false;
234
+ }
235
+ if (this.IsAllSetupOk) {
236
+ return this.ShowHealthySetupDetails;
237
+ }
238
+ return true;
239
+ }
240
+ OnSetupHealthExpandedChange(expanded) {
241
+ this.ShowHealthySetupDetails = expanded;
242
+ this.ShowHealthySetupDetailsChange.emit(expanded);
243
+ this.cdr.markForCheck();
244
+ }
245
+ FormatTime(seconds) {
246
+ return FormatVideoTime(seconds);
247
+ }
248
+ FormatTimeRange(fromSeconds, toSeconds) {
249
+ return FormatVideoTimeRange(fromSeconds, toSeconds);
250
+ }
251
+ get MinDurationSeconds() {
252
+ return this.SelectedArchetype?.MinDurationSeconds ?? DEFAULT_MIN_DURATION_SECONDS;
253
+ }
254
+ get MaxDurationSeconds() {
255
+ return this.SelectedArchetype?.MaxDurationSeconds ?? DEFAULT_MAX_DURATION_SECONDS;
256
+ }
257
+ get CanStartProduction() {
258
+ return (this.Topic.trim().length > 0 &&
259
+ this.SelectedArchetype !== null &&
260
+ this.SelectedFormats.length > 0);
261
+ }
262
+ get SummaryLine() {
263
+ if (this.Topic.trim().length === 0) {
264
+ return 'Add a topic to start';
265
+ }
266
+ if (!this.SelectedArchetype) {
267
+ return 'Pick a shape to start';
268
+ }
269
+ if (this.SelectedFormats.length === 0) {
270
+ return 'Pick at least one format to start';
271
+ }
272
+ const parts = [
273
+ FormatVideoTime(this.DurationSeconds),
274
+ this.SelectedArchetype.Name,
275
+ this.SelectedFormats.join(', '),
276
+ this.buildAudioSummary(),
277
+ ];
278
+ if (this.SelectedBrandKit?.Name) {
279
+ parts.push(this.SelectedBrandKit.Name);
280
+ }
281
+ if (this.SelectedQueries.length > 0) {
282
+ parts.push(this.SelectedQueries.length === 1
283
+ ? '1 query'
284
+ : `${this.SelectedQueries.length} queries`);
285
+ }
286
+ return parts.join(' \u00B7 ');
287
+ }
288
+ get AvailableCompanies() {
289
+ const map = new Map();
290
+ for (const kit of this.AllBrandKits) {
291
+ if (kit.CompanyID && kit.CompanyName) {
292
+ map.set(kit.CompanyID, kit.CompanyName);
293
+ }
294
+ }
295
+ return Array.from(map.entries())
296
+ .map(([ID, Name]) => ({ ID, Name }))
297
+ .sort((a, b) => a.Name.localeCompare(b.Name));
298
+ }
299
+ get CompanyDropdownOptions() {
300
+ return [{ ID: 'all', Name: 'All companies' }, ...this.AvailableCompanies];
301
+ }
302
+ get BrandKitDropdownOptions() {
303
+ return [
304
+ { ID: '', DisplayName: 'None' },
305
+ ...this.FilteredBrandKits.map((kit) => ({
306
+ ID: kit.ID,
307
+ DisplayName: `${kit.Name}${kit.CompanyName ? ' (' + kit.CompanyName + ')' : ' (Default)'}`,
308
+ })),
309
+ ];
310
+ }
311
+ GetArchetypeBeats(card) {
312
+ if (card.BeatItems && card.BeatItems.length > 0) {
313
+ return [...card.BeatItems];
314
+ }
315
+ const labels = card.BeatLabels ?? [];
316
+ if (labels.length === 0) {
317
+ return [];
318
+ }
319
+ return BuildArchetypeBeatStripItems(labels.map((label, idx) => ({
320
+ Key: `${card.ID}-beat-${idx + 1}`,
321
+ Label: label,
322
+ })), card.DefaultDurationSeconds || DEFAULT_STUDIO_DURATION_SECONDS);
323
+ }
324
+ IsArchetypeSelected(card) {
325
+ return Boolean(this.SelectedArchetype && UUIDsEqual(this.SelectedArchetype.ID, card.ID));
326
+ }
327
+ async CheckSetupHealth() {
328
+ this.IsCheckingSetupHealth = true;
329
+ this.emitSetupHealthChange();
330
+ this.cdr.markForCheck();
331
+ try {
332
+ const res = await new VideoStudioSetupHealthOperation().Execute({}, { provider: this.ProviderToUse });
333
+ if (res.Success && res.Output) {
334
+ this.SetupHealthResult = res.Output;
335
+ }
336
+ else {
337
+ this.SetupHealthResult = {
338
+ Healthy: false,
339
+ Checks: [
340
+ {
341
+ Key: 'Render',
342
+ Status: 'Error',
343
+ Title: 'Setup Health',
344
+ Message: res.ErrorMessage || 'Failed to check Video Studio setup health.',
345
+ },
346
+ ],
347
+ };
348
+ }
349
+ }
350
+ catch (e) {
351
+ const msg = e instanceof Error ? e.message : String(e);
352
+ this.SetupHealthResult = {
353
+ Healthy: false,
354
+ Checks: [
355
+ {
356
+ Key: 'Render',
357
+ Status: 'Error',
358
+ Title: 'Setup Health',
359
+ Message: msg || 'Failed to check Video Studio setup health.',
360
+ },
361
+ ],
362
+ };
363
+ }
364
+ finally {
365
+ this.IsCheckingSetupHealth = false;
366
+ this.emitSetupHealthChange();
367
+ this.cdr.markForCheck();
368
+ }
369
+ }
370
+ async LoadBriefData(forceRefresh = false) {
371
+ this.IsLoading = true;
372
+ this.LoadError = null;
373
+ this.cdr.markForCheck();
374
+ try {
375
+ const vsEngine = VideoStudioEngine.GetProviderInstance(this.ProviderToUse, VideoStudioEngine);
376
+ const bkEngine = BrandKitEngine.GetProviderInstance(this.ProviderToUse, BrandKitEngine);
377
+ const user = this.ProviderToUse?.CurrentUser ?? undefined;
378
+ await Promise.all([
379
+ vsEngine.Config(forceRefresh, user, this.ProviderToUse),
380
+ bkEngine.Config(forceRefresh, user, this.ProviderToUse),
381
+ ]);
382
+ const activeArchetypes = (vsEngine.Archetypes ?? []).filter((a) => a.Status === 'Active' || !a.Status);
383
+ this.AllArchetypes = activeArchetypes.map((a) => MapArchetypeToCard(a));
384
+ const activeKits = (bkEngine.BrandKits ?? []).filter((k) => k.Status === 'Active' || !k.Status);
385
+ this.AllBrandKits = activeKits.map((k) => MapBrandKitToCard(k, bkEngine.GetAssets?.(k.ID)));
386
+ this.applyCompanyBrandKitFilter();
387
+ if (this.SelectedBrandKit) {
388
+ const matchedKit = this.AllBrandKits.find((k) => UUIDsEqual(k.ID, this.SelectedBrandKit?.ID));
389
+ if (matchedKit) {
390
+ this.SelectedBrandKit = matchedKit;
391
+ }
392
+ }
393
+ if (this.SelectedArchetype) {
394
+ const matchedArch = this.AllArchetypes.find((a) => UUIDsEqual(a.ID, this.SelectedArchetype?.ID));
395
+ if (matchedArch) {
396
+ this.SelectedArchetype = matchedArch;
397
+ }
398
+ if (!this.SelectedBrandKit &&
399
+ !this.SelectedBrandKitExplicitNone &&
400
+ this.FilteredBrandKits.length > 0) {
401
+ this.selectDefaultBrandKitForArchetype(this.SelectedArchetype);
402
+ }
403
+ }
404
+ else if (this.AllArchetypes.length > 0) {
405
+ this.SelectArchetype(this.AllArchetypes[0]);
406
+ }
407
+ await this.SearchSavedQueries(this.QuerySearchText);
408
+ }
409
+ catch (err) {
410
+ const msg = err instanceof Error ? err.message : String(err);
411
+ LogError(`VSProductionBriefComponent.LoadBriefData: ${msg}`);
412
+ this.LoadError = msg;
413
+ }
414
+ finally {
415
+ this.IsLoading = false;
416
+ this.emitStateChange();
417
+ this.cdr.markForCheck();
418
+ }
419
+ }
420
+ SelectArchetype(card) {
421
+ this.SelectedArchetype = card;
422
+ this.SelectedFormats = ParseArchetypeDefaultFormats(card.DefaultFormats);
423
+ this.DurationSeconds = ClampStudioDuration(card.DefaultDurationSeconds, card.MinDurationSeconds, card.MaxDurationSeconds);
424
+ if (!this.SelectedBrandKitExplicitNone) {
425
+ this.selectDefaultBrandKitForArchetype(card);
426
+ }
427
+ this.emitStateChange();
428
+ this.cdr.markForCheck();
429
+ }
430
+ selectDefaultBrandKitForArchetype(card) {
431
+ if (card.CompanyID) {
432
+ this.SelectedCompanyId = card.CompanyID;
433
+ this.applyCompanyBrandKitFilter();
434
+ const companyDefault = this.FilteredBrandKits.find((k) => UUIDsEqual(k.CompanyID, card.CompanyID) && k.IsDefault) ??
435
+ this.FilteredBrandKits.find((k) => UUIDsEqual(k.CompanyID, card.CompanyID)) ??
436
+ this.FilteredBrandKits.find((k) => k.IsDefault) ??
437
+ null;
438
+ if (companyDefault) {
439
+ this.SelectedBrandKit = companyDefault;
440
+ }
441
+ }
442
+ else if (!this.SelectedBrandKit && this.FilteredBrandKits.length > 0) {
443
+ this.SelectedBrandKit =
444
+ this.FilteredBrandKits.find((k) => k.CompanyID === null && k.IsDefault) ??
445
+ this.FilteredBrandKits.find((k) => k.IsDefault) ??
446
+ this.FilteredBrandKits[0] ??
447
+ null;
448
+ }
449
+ }
450
+ OnCompanyFilterChange(companyId) {
451
+ this.SelectedCompanyId = companyId || 'all';
452
+ this.applyCompanyBrandKitFilter();
453
+ if (this.SelectedBrandKit &&
454
+ !this.FilteredBrandKits.some((k) => UUIDsEqual(k.ID, this.SelectedBrandKit?.ID))) {
455
+ this.SelectedBrandKit = null;
456
+ }
457
+ this.emitStateChange();
458
+ this.cdr.markForCheck();
459
+ }
460
+ SelectBrandKitById(brandKitId) {
461
+ const trimmed = (brandKitId ?? '').trim();
462
+ if (!trimmed) {
463
+ this.SelectedBrandKit = null;
464
+ this.SelectedBrandKitExplicitNone = true;
465
+ }
466
+ else {
467
+ this.SelectedBrandKit =
468
+ this.AllBrandKits.find((k) => UUIDsEqual(k.ID, trimmed)) ?? null;
469
+ this.SelectedBrandKitExplicitNone = false;
470
+ }
471
+ this.emitStateChange();
472
+ this.cdr.markForCheck();
473
+ }
474
+ OpenBrandKitCreator() {
475
+ this.IsBrandKitCreatorOpen = true;
476
+ this.cdr.markForCheck();
477
+ }
478
+ CloseBrandKitCreator() {
479
+ this.IsBrandKitCreatorOpen = false;
480
+ this.cdr.markForCheck();
481
+ }
482
+ async OnBrandKitCreatorSaved(newBrandKitId) {
483
+ const trimmedId = (newBrandKitId ?? '').trim();
484
+ if (!trimmedId) {
485
+ this.IsBrandKitCreatorOpen = false;
486
+ this.cdr.markForCheck();
487
+ return;
488
+ }
489
+ try {
490
+ const bkEngine = BrandKitEngine.GetProviderInstance(this.ProviderToUse, BrandKitEngine);
491
+ const user = this.ProviderToUse?.CurrentUser ?? undefined;
492
+ await bkEngine.Config(true, user, this.ProviderToUse);
493
+ const activeKits = (bkEngine.BrandKits ?? []).filter((k) => k.Status === 'Active' || !k.Status);
494
+ if (activeKits.length > 0) {
495
+ const refreshed = activeKits.map((k) => MapBrandKitToCard(k, bkEngine.GetAssets?.(k.ID)));
496
+ const existingExtra = ExcludeByUUIDs(this.AllBrandKits, refreshed.map((r) => r.ID));
497
+ this.AllBrandKits = [...refreshed, ...existingExtra];
498
+ }
499
+ }
500
+ catch {
501
+ // Non-fatal in test/disconnected environments; fallback card below ensures selection works.
502
+ }
503
+ let targetKit = this.AllBrandKits.find((k) => UUIDsEqual(k.ID, trimmedId)) ?? null;
504
+ if (!targetKit) {
505
+ targetKit = {
506
+ ID: trimmedId,
507
+ Name: 'New brand kit',
508
+ Description: '',
509
+ CompanyID: this.SelectedCompanyId && this.SelectedCompanyId !== 'all'
510
+ ? this.SelectedCompanyId
511
+ : null,
512
+ CompanyName: null,
513
+ IsDefault: false,
514
+ Status: 'Active',
515
+ Swatches: [],
516
+ PrimaryLogoFileID: null,
517
+ PrimaryLogoUrl: null,
518
+ AssetCount: 0,
519
+ };
520
+ this.AllBrandKits = [...this.AllBrandKits, targetKit];
521
+ }
522
+ if (this.SelectedCompanyId !== 'all' &&
523
+ targetKit.CompanyID !== null &&
524
+ !UUIDsEqual(targetKit.CompanyID, this.SelectedCompanyId)) {
525
+ this.SelectedCompanyId = targetKit.CompanyID;
526
+ }
527
+ this.applyCompanyBrandKitFilter();
528
+ this.IsBrandKitCreatorOpen = false;
529
+ this.SelectBrandKitById(trimmedId);
530
+ }
531
+ get ArchetypeEditorDialogTitle() {
532
+ return this.SelectedArchetype?.Name
533
+ ? `Make a copy of ${this.SelectedArchetype.Name}`
534
+ : 'New archetype';
535
+ }
536
+ OpenArchetypeEditor() {
537
+ this.IsArchetypeEditorOpen = true;
538
+ this.cdr.markForCheck();
539
+ }
540
+ CloseArchetypeEditor() {
541
+ this.IsArchetypeEditorOpen = false;
542
+ this.cdr.markForCheck();
543
+ }
544
+ async OnArchetypeEditorSaved(savedArchetypeId) {
545
+ const trimmedId = (savedArchetypeId ?? '').trim();
546
+ if (!trimmedId) {
547
+ this.IsArchetypeEditorOpen = false;
548
+ this.cdr.markForCheck();
549
+ return;
550
+ }
551
+ try {
552
+ const vsEngine = VideoStudioEngine.GetProviderInstance(this.ProviderToUse, VideoStudioEngine);
553
+ const user = this.ProviderToUse?.CurrentUser ?? undefined;
554
+ await vsEngine.Config(true, user, this.ProviderToUse);
555
+ const activeArchetypes = (vsEngine.Archetypes ?? []).filter((a) => a.Status === 'Active' || !a.Status);
556
+ if (activeArchetypes.length > 0) {
557
+ const refreshed = activeArchetypes.map((a) => MapArchetypeToCard(a));
558
+ const existingExtra = ExcludeByUUIDs(this.AllArchetypes, refreshed.map((r) => r.ID));
559
+ this.AllArchetypes = [...refreshed, ...existingExtra];
560
+ }
561
+ }
562
+ catch {
563
+ // Non-fatal in test/disconnected environments; fallback card below ensures selection works.
564
+ }
565
+ let targetArchetype = this.AllArchetypes.find((a) => UUIDsEqual(a.ID, trimmedId)) ?? null;
566
+ if (!targetArchetype) {
567
+ const source = this.SelectedArchetype ?? this.AllArchetypes[0] ?? null;
568
+ const companyId = this.SelectedCompanyId && this.SelectedCompanyId !== 'all'
569
+ ? this.SelectedCompanyId
570
+ : (source?.CompanyID ?? null);
571
+ targetArchetype = {
572
+ ID: trimmedId,
573
+ Name: source ? `${source.Name} (Copy)` : 'Custom Archetype',
574
+ Description: source?.Description ?? '',
575
+ Category: source?.Category ?? 'Explainer',
576
+ Status: 'Active',
577
+ CompanyID: companyId,
578
+ CompanyName: null,
579
+ IsShipped: false,
580
+ DefaultDurationSeconds: source?.DefaultDurationSeconds ?? DEFAULT_STUDIO_DURATION_SECONDS,
581
+ MinDurationSeconds: source?.MinDurationSeconds ?? DEFAULT_MIN_DURATION_SECONDS,
582
+ MaxDurationSeconds: source?.MaxDurationSeconds ?? DEFAULT_MAX_DURATION_SECONDS,
583
+ DefaultFormats: source?.DefaultFormats ?? '["16:9"]',
584
+ BeatCount: source?.BeatCount ?? 0,
585
+ BeatLabels: source?.BeatLabels ? [...source.BeatLabels] : [],
586
+ BeatItems: source?.BeatItems ? [...source.BeatItems] : [],
587
+ };
588
+ this.AllArchetypes = [...this.AllArchetypes, targetArchetype];
589
+ }
590
+ this.IsArchetypeEditorOpen = false;
591
+ this.SelectArchetype(targetArchetype);
592
+ }
593
+ IsFormatSelected(format) {
594
+ return this.SelectedFormats.includes(format);
595
+ }
596
+ ToggleFormat(format) {
597
+ if (this.SelectedFormats.includes(format)) {
598
+ if (this.SelectedFormats.length > 1) {
599
+ this.SelectedFormats = this.SelectedFormats.filter((f) => f !== format);
600
+ }
601
+ }
602
+ else {
603
+ this.SelectedFormats = [...this.SelectedFormats, format];
604
+ }
605
+ this.emitStateChange();
606
+ this.cdr.markForCheck();
607
+ }
608
+ SetFormats(formats) {
609
+ const allowed = new Set([
610
+ ...STUDIO_VIDEO_FORMATS,
611
+ ...this.AvailableFormats,
612
+ ]);
613
+ const valid = [];
614
+ for (const raw of formats) {
615
+ const cleaned = (raw ?? '').trim();
616
+ if (allowed.has(cleaned) && !valid.includes(cleaned)) {
617
+ valid.push(cleaned);
618
+ }
619
+ }
620
+ if (valid.length === 0) {
621
+ return false;
622
+ }
623
+ this.SelectedFormats = valid;
624
+ this.emitStateChange();
625
+ this.cdr.markForCheck();
626
+ return true;
627
+ }
628
+ OnDurationChange(rawValue) {
629
+ const numeric = typeof rawValue === 'number' ? rawValue : Number(rawValue);
630
+ this.DurationSeconds = ClampStudioDuration(numeric, this.MinDurationSeconds, this.MaxDurationSeconds);
631
+ this.emitStateChange();
632
+ this.cdr.markForCheck();
633
+ }
634
+ OnTopicChange(value) {
635
+ this.Topic = value ?? '';
636
+ this.emitStateChange();
637
+ this.cdr.markForCheck();
638
+ }
639
+ OnNarrationEnabledChange(enabled) {
640
+ this.NarrationEnabled = Boolean(enabled);
641
+ this.emitStateChange();
642
+ this.cdr.markForCheck();
643
+ }
644
+ OnCaptionsModeChange(mode) {
645
+ this.CaptionsMode = mode;
646
+ this.emitStateChange();
647
+ this.cdr.markForCheck();
648
+ }
649
+ async SearchSavedQueries(searchText) {
650
+ this.QuerySearchText = searchText ?? '';
651
+ this.IsSearchingQueries = true;
652
+ const requestId = ++this.querySearchRequestId;
653
+ this.cdr.markForCheck();
654
+ try {
655
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
656
+ const extraFilter = BuildSavedQuerySearchFilter(this.QuerySearchText);
657
+ const result = await rv.RunView({
658
+ EntityName: 'MJ: Queries',
659
+ ExtraFilter: extraFilter,
660
+ OrderBy: 'Name ASC',
661
+ Fields: ['ID', 'Name'],
662
+ MaxRows: SAVED_QUERIES_MAX_ROWS,
663
+ ResultType: 'simple',
664
+ });
665
+ if (requestId !== this.querySearchRequestId) {
666
+ return;
667
+ }
668
+ if (result.Success && Array.isArray(result.Results)) {
669
+ this.AvailableQueries = result.Results.map((row) => ({
670
+ ID: row.ID,
671
+ Name: row.Name,
672
+ }));
673
+ }
674
+ else {
675
+ this.AvailableQueries = [];
676
+ }
677
+ }
678
+ catch (err) {
679
+ if (requestId !== this.querySearchRequestId) {
680
+ return;
681
+ }
682
+ const msg = err instanceof Error ? err.message : String(err);
683
+ LogError(`VSProductionBriefComponent.SearchSavedQueries: ${msg}`);
684
+ this.AvailableQueries = [];
685
+ }
686
+ finally {
687
+ if (requestId === this.querySearchRequestId) {
688
+ this.IsSearchingQueries = false;
689
+ this.cdr.markForCheck();
690
+ }
691
+ }
692
+ }
693
+ IsQuerySelected(queryId) {
694
+ return this.SelectedQueries.some((q) => UUIDsEqual(q.ID, queryId));
695
+ }
696
+ ToggleSavedQuery(query) {
697
+ if (this.IsQuerySelected(query.ID)) {
698
+ this.SelectedQueries = this.SelectedQueries.filter((q) => !UUIDsEqual(q.ID, query.ID));
699
+ }
700
+ else {
701
+ this.SelectedQueries = [...this.SelectedQueries, query];
702
+ }
703
+ this.emitStateChange();
704
+ this.cdr.markForCheck();
705
+ }
706
+ OnStartClick() {
707
+ if (!this.CanStartProduction || !this.SelectedArchetype) {
708
+ return;
709
+ }
710
+ const message = ComposeStudioFirstMessage({
711
+ ArchetypeName: this.SelectedArchetype.Name,
712
+ Topic: this.Topic,
713
+ DurationSeconds: this.DurationSeconds,
714
+ Formats: this.SelectedFormats,
715
+ BrandKitName: this.SelectedBrandKit?.Name ?? null,
716
+ QueryNames: this.SelectedQueries.map((q) => q.Name),
717
+ NarrationEnabled: this.NarrationEnabled ? undefined : false,
718
+ CaptionsMode: this.CaptionsMode === 'Burned' ? undefined : this.CaptionsMode,
719
+ });
720
+ const appContext = this.BuildCurrentAppContext();
721
+ this.StartRequested.emit({
722
+ Message: message,
723
+ AppContext: appContext,
724
+ Archetype: this.SelectedArchetype,
725
+ BrandKit: this.SelectedBrandKit,
726
+ Formats: [...this.SelectedFormats],
727
+ DurationSeconds: this.DurationSeconds,
728
+ Topic: this.Topic.trim(),
729
+ Queries: [...this.SelectedQueries],
730
+ NarrationEnabled: this.NarrationEnabled,
731
+ CaptionsMode: this.CaptionsMode,
732
+ });
733
+ }
734
+ // ============================================================================
735
+ // Client Tool Helpers (invoked from VideoStudioProductionsResourceComponent)
736
+ // ============================================================================
737
+ ApplyClientToolArchetype(rawReference) {
738
+ const resolution = ResolveVideoStudioItem(rawReference, this.AllArchetypes, 'archetype');
739
+ if (!resolution.Ok) {
740
+ return { Success: false, ErrorMessage: resolution.Error };
741
+ }
742
+ this.SelectArchetype(resolution.Item);
743
+ return {
744
+ Success: true,
745
+ Data: {
746
+ SelectedArchetypeId: resolution.Item.ID,
747
+ SelectedArchetypeName: resolution.Item.Name,
748
+ },
749
+ };
750
+ }
751
+ ApplyClientToolBrandKit(rawReference) {
752
+ const trimmed = (rawReference ?? '').trim();
753
+ if (!trimmed || trimmed.toLowerCase() === 'none') {
754
+ this.SelectBrandKitById(null);
755
+ return { Success: true, Data: { SelectedBrandKitId: null } };
756
+ }
757
+ const resolution = ResolveVideoStudioItem(trimmed, this.AllBrandKits, 'brand kit');
758
+ if (!resolution.Ok) {
759
+ return { Success: false, ErrorMessage: resolution.Error };
760
+ }
761
+ this.SelectBrandKitById(resolution.Item.ID);
762
+ return {
763
+ Success: true,
764
+ Data: {
765
+ SelectedBrandKitId: resolution.Item.ID,
766
+ SelectedBrandKitName: resolution.Item.Name,
767
+ },
768
+ };
769
+ }
770
+ ApplyClientToolFormats(rawFormats) {
771
+ const list = Array.isArray(rawFormats)
772
+ ? rawFormats.filter((v) => typeof v === 'string')
773
+ : typeof rawFormats === 'string'
774
+ ? rawFormats.split(',')
775
+ : [];
776
+ const ok = this.SetFormats(list);
777
+ if (!ok) {
778
+ return {
779
+ Success: false,
780
+ ErrorMessage: `Specify at least one valid format (${this.AvailableFormats.join(', ')}).`,
781
+ };
782
+ }
783
+ return { Success: true, Data: { SelectedFormats: [...this.SelectedFormats] } };
784
+ }
785
+ ApplyClientToolTopic(rawTopic) {
786
+ this.OnTopicChange(rawTopic);
787
+ return { Success: true, Data: { Topic: this.Topic } };
788
+ }
789
+ BuildCurrentAppContext() {
790
+ return BuildStudioAppContext({
791
+ ArchetypeID: this.SelectedArchetype?.ID ?? null,
792
+ BrandKitID: this.SelectedBrandKit?.ID ?? null,
793
+ Formats: this.SelectedFormats,
794
+ DurationSeconds: this.DurationSeconds,
795
+ QueryIDs: this.SelectedQueries.map((q) => q.ID),
796
+ NarrationEnabled: this.NarrationEnabled,
797
+ CaptionsMode: this.CaptionsMode,
798
+ });
799
+ }
800
+ // ============================================================================
801
+ // Private helpers
802
+ // ============================================================================
803
+ buildAudioSummary() {
804
+ if (!this.NarrationEnabled) {
805
+ return 'Voiceover off';
806
+ }
807
+ if (this.CaptionsMode === 'Burned') {
808
+ return 'Voiceover, captions in the video';
809
+ }
810
+ if (this.CaptionsMode === 'Sidecar') {
811
+ return 'Voiceover, captions in separate file';
812
+ }
813
+ return 'Voiceover, captions off';
814
+ }
815
+ applyCompanyBrandKitFilter() {
816
+ const companyFilter = (this.SelectedCompanyId ?? 'all').trim();
817
+ if (!companyFilter || companyFilter === 'all') {
818
+ this.FilteredBrandKits = [...this.AllBrandKits];
819
+ return;
820
+ }
821
+ this.FilteredBrandKits = this.AllBrandKits.filter((kit) => kit.CompanyID === null || UUIDsEqual(kit.CompanyID, companyFilter));
822
+ }
823
+ emitStateChange() {
824
+ this.StateChange.emit({
825
+ AllArchetypes: this.AllArchetypes,
826
+ AllBrandKits: this.AllBrandKits,
827
+ SelectedArchetype: this.SelectedArchetype,
828
+ SelectedBrandKit: this.SelectedBrandKit,
829
+ SelectedBrandKitExplicitNone: this.SelectedBrandKitExplicitNone,
830
+ SelectedFormats: [...this.SelectedFormats],
831
+ DurationSeconds: this.DurationSeconds,
832
+ Topic: this.Topic,
833
+ SelectedQueries: [...this.SelectedQueries],
834
+ NarrationEnabled: this.NarrationEnabled,
835
+ CaptionsMode: this.CaptionsMode,
836
+ AppContext: this.BuildCurrentAppContext(),
837
+ IsLoading: this.IsLoading,
838
+ });
839
+ }
840
+ emitSetupHealthChange() {
841
+ this.SetupHealthChange.emit({
842
+ Result: this.SetupHealthResult,
843
+ Loading: this.IsCheckingSetupHealth,
844
+ });
845
+ }
846
+ static ɵfac = /*@__PURE__*/ (() => { let ɵVSProductionBriefComponent_BaseFactory; return function VSProductionBriefComponent_Factory(__ngFactoryType__) { return (ɵVSProductionBriefComponent_BaseFactory || (ɵVSProductionBriefComponent_BaseFactory = i0.ɵɵgetInheritedFactory(VSProductionBriefComponent)))(__ngFactoryType__ || VSProductionBriefComponent); }; })();
847
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VSProductionBriefComponent, selectors: [["vs-production-brief"], ["mj-vs-production-brief"]], viewQuery: function VSProductionBriefComponent_Query(rf, ctx) { if (rf & 1) {
848
+ i0.ɵɵviewQuery(MJButtonDirective, 5);
849
+ } if (rf & 2) {
850
+ let _t;
851
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.buttonDirectives = _t);
852
+ } }, inputs: { AutoLoad: "AutoLoad", AutoCheckSetupHealth: "AutoCheckSetupHealth", ShowSetupHealthCard: "ShowSetupHealthCard", SetupHealthResult: "SetupHealthResult", IsCheckingSetupHealth: "IsCheckingSetupHealth", ShowHealthySetupDetails: "ShowHealthySetupDetails", AllArchetypes: "AllArchetypes", AllBrandKits: "AllBrandKits", AvailableQueries: "AvailableQueries", AvailableFormats: "AvailableFormats", SelectedArchetype: "SelectedArchetype", SelectedCompanyId: "SelectedCompanyId", SelectedBrandKit: "SelectedBrandKit", SelectedBrandKitExplicitNone: "SelectedBrandKitExplicitNone", SelectedFormats: "SelectedFormats", DurationSeconds: "DurationSeconds", Topic: "Topic", QuerySearchText: "QuerySearchText", SelectedQueries: "SelectedQueries", NarrationEnabled: "NarrationEnabled", CaptionsMode: "CaptionsMode" }, outputs: { StateChange: "StateChange", StartRequested: "StartRequested", SetupHealthChange: "SetupHealthChange", ShowHealthySetupDetailsChange: "ShowHealthySetupDetailsChange" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 66, vars: 26, consts: [["data-testid", "vs-production-brief", 1, "vs-brief"], [1, "vs-brief__scroll"], ["aria-label", "Setup health", 1, "vs-brief__section"], [1, "vs-brief__section"], ["for", "vs-brief-topic-input", 1, "vs-brief__heading"], ["id", "vs-brief-topic-input", "data-testid", "vs-brief-topic-input", "rows", "2", "placeholder", "Describe the video topic, audience, and goal\u2026", 1, "vs-brief__textarea", 3, "ngModelChange", "ngModel"], ["aria-labelledby", "vs-brief-shape-heading", 1, "vs-brief__section"], [1, "vs-brief__section-header"], ["id", "vs-brief-shape-heading", 1, "vs-brief__heading"], ["type", "button", "data-testid", "vs-brief-make-your-own-link", 1, "vs-brief__action-link", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-plus"], ["data-testid", "vs-brief-loading", 1, "vs-brief__loading"], ["role", "group", "aria-labelledby", "vs-brief-shape-heading", 1, "vs-brief__archetypes"], ["aria-labelledby", "vs-brief-where-heading", 1, "vs-brief__section"], ["id", "vs-brief-where-heading", 1, "vs-brief__heading"], ["role", "group", "aria-label", "Output formats", "data-testid", "vs-brief-formats", 1, "vs-brief__formats"], ["type", "button", "mjButton", "", "Variant", "outline", "Size", "sm", 3, "Toggleable", "Selected"], [1, "vs-brief__field", "vs-brief__field--inline"], ["for", "vs-brief-duration-input", 1, "vs-brief__sublabel"], [1, "vs-brief__duration-row"], ["InputId", "vs-brief-duration-input", "data-testid", "vs-brief-duration-input", 3, "ngModelChange", "AriaLabel", "Min", "Max", "Step", "ngModel"], ["data-testid", "vs-brief-duration-formatted", 1, "vs-brief__duration-value"], ["aria-labelledby", "vs-brief-sound-heading", 1, "vs-brief__section"], ["id", "vs-brief-sound-heading", 1, "vs-brief__heading"], [3, "NarrationEnabledChange", "CaptionsModeChange", "NarrationEnabled", "CaptionsMode"], ["aria-labelledby", "vs-brief-brand-heading", 1, "vs-brief__section"], ["id", "vs-brief-brand-heading", 1, "vs-brief__heading"], ["type", "button", "data-testid", "vs-brief-new-brand-kit-link", 1, "vs-brief__action-link", 3, "click"], [1, "vs-brief__field-grid"], [1, "vs-brief__field"], ["id", "vs-brief-company-label", 1, "vs-brief__sublabel"], ["AriaLabelledBy", "vs-brief-company-label", "data-testid", "vs-brief-company-select", "TextField", "Name", "ValueField", "ID", 3, "ngModelChange", "Data", "ValuePrimitive", "ngModel"], ["id", "vs-brief-brand-kit-label", 1, "vs-brief__sublabel"], ["AriaLabelledBy", "vs-brief-brand-kit-label", "data-testid", "vs-brief-brand-kit-select", "Placeholder", "None", "TextField", "DisplayName", "ValueField", "ID", 3, "ngModelChange", "Data", "ValuePrimitive", "ngModel"], ["aria-labelledby", "vs-brief-data-heading", 1, "vs-brief__section"], ["id", "vs-brief-data-heading", 1, "vs-brief__heading"], ["type", "search", "data-testid", "vs-brief-query-search", "aria-label", "Search saved queries", "placeholder", "Filter saved queries by name\u2026", 1, "vs-brief__search-input", 3, "ngModelChange", "ngModel"], ["role", "group", "aria-label", "Saved queries", "data-testid", "vs-brief-query-list", 1, "vs-brief__queries"], ["Title", "New brand kit", "Size", "lg", 3, "Visible"], ["Size", "lg", 3, "Visible", "Title"], ["data-testid", "vs-brief-footer", 1, "vs-brief__footer"], ["data-testid", "vs-brief-summary", 1, "vs-brief__summary"], ["data-testid", "vs-brief-footer-hint", 1, "vs-brief__hint"], ["type", "button", "mjButton", "", "Variant", "primary", "Size", "md", "data-testid", "vs-brief-start-button", 1, "vs-brief__start-btn", 3, "click", "disabled"], [3, "ExpandedChange", "Recheck", "Result", "Loading", "Expanded"], ["Text", "Loading archetypes\u2026", "Size", "small"], ["type", "button", 1, "vs-brief__archetype-card", 3, "vs-brief__archetype-card--selected"], ["type", "button", 1, "vs-brief__archetype-card", 3, "click"], [1, "vs-brief__archetype-header"], [1, "vs-brief__archetype-name"], [1, "vs-brief__archetype-time"], [1, "vs-brief__archetype-desc"], [3, "Beats", "ShowLabels"], ["type", "button", "mjButton", "", "Variant", "outline", "Size", "sm", 3, "click", "Toggleable", "Selected"], ["Size", "sm", 3, "Format", "ShowLabel"], ["Title", "New brand kit", "Size", "lg", 3, "Close", "Visible"], [3, "Saved", "Cancelled", "Provider", "Companies", "InitialCompanyId"], ["Size", "lg", 3, "Close", "Visible", "Title"], ["Mode", "copy", 3, "Saved", "Cancelled", "Provider", "SourceArchetypeId", "Archetypes", "Companies", "InitialCompanyId"]], template: function VSProductionBriefComponent_Template(rf, ctx) { if (rf & 1) {
853
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
854
+ i0.ɵɵconditionalCreate(2, VSProductionBriefComponent_Conditional_2_Template, 2, 3, "section", 2);
855
+ i0.ɵɵelementStart(3, "section", 3)(4, "label", 4);
856
+ i0.ɵɵtext(5, " What's it about? ");
857
+ i0.ɵɵelementEnd();
858
+ i0.ɵɵelementStart(6, "textarea", 5);
859
+ i0.ɵɵlistener("ngModelChange", function VSProductionBriefComponent_Template_textarea_ngModelChange_6_listener($event) { return ctx.OnTopicChange($event); });
860
+ i0.ɵɵelementEnd()();
861
+ i0.ɵɵelementStart(7, "section", 6)(8, "div", 7)(9, "h3", 8);
862
+ i0.ɵɵtext(10, " Shape ");
863
+ i0.ɵɵelementEnd();
864
+ i0.ɵɵelementStart(11, "button", 9);
865
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_Template_button_click_11_listener() { return ctx.OpenArchetypeEditor(); });
866
+ i0.ɵɵelement(12, "i", 10);
867
+ i0.ɵɵelementStart(13, "span");
868
+ i0.ɵɵtext(14, "Make your own");
869
+ i0.ɵɵelementEnd()()();
870
+ i0.ɵɵconditionalCreate(15, VSProductionBriefComponent_Conditional_15_Template, 2, 0, "div", 11)(16, VSProductionBriefComponent_Conditional_16_Template, 3, 0, "div", 12);
871
+ i0.ɵɵelementEnd();
872
+ i0.ɵɵelementStart(17, "section", 13)(18, "h3", 14);
873
+ i0.ɵɵtext(19, " Where it plays ");
874
+ i0.ɵɵelementEnd();
875
+ i0.ɵɵelementStart(20, "div", 15);
876
+ i0.ɵɵrepeaterCreate(21, VSProductionBriefComponent_For_22_Template, 2, 5, "button", 16, i0.ɵɵrepeaterTrackByIdentity);
877
+ i0.ɵɵelementEnd();
878
+ i0.ɵɵelementStart(23, "div", 17)(24, "label", 18);
879
+ i0.ɵɵtext(25);
880
+ i0.ɵɵelementEnd();
881
+ i0.ɵɵelementStart(26, "div", 19)(27, "mj-numeric-input", 20);
882
+ i0.ɵɵlistener("ngModelChange", function VSProductionBriefComponent_Template_mj_numeric_input_ngModelChange_27_listener($event) { return ctx.OnDurationChange($event); });
883
+ i0.ɵɵelementEnd();
884
+ i0.ɵɵelementStart(28, "span", 21);
885
+ i0.ɵɵtext(29);
886
+ i0.ɵɵelementEnd()()()();
887
+ i0.ɵɵelementStart(30, "section", 22)(31, "h3", 23);
888
+ i0.ɵɵtext(32, " Sound ");
889
+ i0.ɵɵelementEnd();
890
+ i0.ɵɵelementStart(33, "vs-audio-options", 24);
891
+ i0.ɵɵlistener("NarrationEnabledChange", function VSProductionBriefComponent_Template_vs_audio_options_NarrationEnabledChange_33_listener($event) { return ctx.OnNarrationEnabledChange($event); })("CaptionsModeChange", function VSProductionBriefComponent_Template_vs_audio_options_CaptionsModeChange_33_listener($event) { return ctx.OnCaptionsModeChange($event); });
892
+ i0.ɵɵelementEnd()();
893
+ i0.ɵɵelementStart(34, "section", 25)(35, "div", 7)(36, "h3", 26);
894
+ i0.ɵɵtext(37, " Brand kit (optional) ");
895
+ i0.ɵɵelementEnd();
896
+ i0.ɵɵelementStart(38, "button", 27);
897
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_Template_button_click_38_listener() { return ctx.OpenBrandKitCreator(); });
898
+ i0.ɵɵelement(39, "i", 10);
899
+ i0.ɵɵelementStart(40, "span");
900
+ i0.ɵɵtext(41, "New brand kit");
901
+ i0.ɵɵelementEnd()()();
902
+ i0.ɵɵelementStart(42, "div", 28)(43, "div", 29)(44, "span", 30);
903
+ i0.ɵɵtext(45, "Company");
904
+ i0.ɵɵelementEnd();
905
+ i0.ɵɵelementStart(46, "mj-dropdown", 31);
906
+ i0.ɵɵlistener("ngModelChange", function VSProductionBriefComponent_Template_mj_dropdown_ngModelChange_46_listener($event) { return ctx.OnCompanyFilterChange($event); });
907
+ i0.ɵɵelementEnd()();
908
+ i0.ɵɵelementStart(47, "div", 29)(48, "span", 32);
909
+ i0.ɵɵtext(49, "Brand kit");
910
+ i0.ɵɵelementEnd();
911
+ i0.ɵɵelementStart(50, "mj-dropdown", 33);
912
+ i0.ɵɵlistener("ngModelChange", function VSProductionBriefComponent_Template_mj_dropdown_ngModelChange_50_listener($event) { return ctx.SelectBrandKitById($event || null); });
913
+ i0.ɵɵelementEnd()()()();
914
+ i0.ɵɵelementStart(51, "section", 34)(52, "h3", 35);
915
+ i0.ɵɵtext(53, " Data (optional) ");
916
+ i0.ɵɵelementEnd();
917
+ i0.ɵɵelementStart(54, "input", 36);
918
+ i0.ɵɵlistener("ngModelChange", function VSProductionBriefComponent_Template_input_ngModelChange_54_listener($event) { return ctx.SearchSavedQueries($event); });
919
+ i0.ɵɵelementEnd();
920
+ i0.ɵɵconditionalCreate(55, VSProductionBriefComponent_Conditional_55_Template, 3, 0, "div", 37);
921
+ i0.ɵɵelementEnd()();
922
+ i0.ɵɵconditionalCreate(56, VSProductionBriefComponent_Conditional_56_Template, 2, 4, "mj-dialog", 38);
923
+ i0.ɵɵconditionalCreate(57, VSProductionBriefComponent_Conditional_57_Template, 2, 7, "mj-dialog", 39);
924
+ i0.ɵɵelementStart(58, "footer", 40)(59, "p", 41);
925
+ i0.ɵɵtext(60);
926
+ i0.ɵɵelementEnd();
927
+ i0.ɵɵelementStart(61, "p", 42);
928
+ i0.ɵɵtext(62, " Fills the message box below \u2014 attach references if needed, then press Send. ");
929
+ i0.ɵɵelementEnd();
930
+ i0.ɵɵelementStart(63, "button", 43);
931
+ i0.ɵɵlistener("click", function VSProductionBriefComponent_Template_button_click_63_listener() { return ctx.OnStartClick(); });
932
+ i0.ɵɵelementStart(64, "span");
933
+ i0.ɵɵtext(65, "Start production");
934
+ i0.ɵɵelementEnd()()()();
935
+ } if (rf & 2) {
936
+ i0.ɵɵadvance(2);
937
+ i0.ɵɵconditional(ctx.ShouldShowSetupHealthCard ? 2 : -1);
938
+ i0.ɵɵadvance(4);
939
+ i0.ɵɵproperty("ngModel", ctx.Topic);
940
+ i0.ɵɵadvance(9);
941
+ i0.ɵɵconditional(ctx.IsLoading && ctx.AllArchetypes.length === 0 ? 15 : 16);
942
+ i0.ɵɵadvance(6);
943
+ i0.ɵɵrepeater(ctx.AvailableFormats);
944
+ i0.ɵɵadvance(4);
945
+ i0.ɵɵtextInterpolate1(" Length (", ctx.FormatTimeRange(ctx.MinDurationSeconds, ctx.MaxDurationSeconds), ") ");
946
+ i0.ɵɵadvance(2);
947
+ i0.ɵɵproperty("AriaLabel", "Length (" + ctx.FormatTimeRange(ctx.MinDurationSeconds, ctx.MaxDurationSeconds) + ")")("Min", ctx.MinDurationSeconds)("Max", ctx.MaxDurationSeconds)("Step", 5)("ngModel", ctx.DurationSeconds);
948
+ i0.ɵɵadvance(2);
949
+ i0.ɵɵtextInterpolate1(" ", ctx.FormatTime(ctx.DurationSeconds), " ");
950
+ i0.ɵɵadvance(4);
951
+ i0.ɵɵproperty("NarrationEnabled", ctx.NarrationEnabled)("CaptionsMode", ctx.CaptionsMode);
952
+ i0.ɵɵadvance(13);
953
+ i0.ɵɵproperty("Data", ctx.CompanyDropdownOptions)("ValuePrimitive", true)("ngModel", ctx.SelectedCompanyId);
954
+ i0.ɵɵadvance(4);
955
+ i0.ɵɵproperty("Data", ctx.BrandKitDropdownOptions)("ValuePrimitive", true)("ngModel", (ctx.SelectedBrandKit == null ? null : ctx.SelectedBrandKit.ID) ?? "");
956
+ i0.ɵɵadvance(4);
957
+ i0.ɵɵproperty("ngModel", ctx.QuerySearchText);
958
+ i0.ɵɵadvance();
959
+ i0.ɵɵconditional(ctx.AvailableQueries.length > 0 ? 55 : -1);
960
+ i0.ɵɵadvance();
961
+ i0.ɵɵconditional(ctx.IsBrandKitCreatorOpen ? 56 : -1);
962
+ i0.ɵɵadvance();
963
+ i0.ɵɵconditional(ctx.IsArchetypeEditorOpen ? 57 : -1);
964
+ i0.ɵɵadvance(2);
965
+ i0.ɵɵclassProp("vs-brief__summary--muted", !ctx.CanStartProduction);
966
+ i0.ɵɵadvance();
967
+ i0.ɵɵtextInterpolate1(" ", ctx.SummaryLine, " ");
968
+ i0.ɵɵadvance(3);
969
+ i0.ɵɵproperty("disabled", !ctx.CanStartProduction);
970
+ } }, dependencies: [CommonModule,
971
+ FormsModule, i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel, SharedGenericModule, i2.LoadingComponent, BrandKitCreatorComponent,
972
+ MJButtonDirective,
973
+ MJDialogComponent,
974
+ MJDropdownComponent,
975
+ MJNumericInputComponent,
976
+ MJVideoFormatGlyphComponent,
977
+ MJVideoBeatStripComponent,
978
+ VSArchetypeEditorComponent,
979
+ VSSetupHealthCardComponent,
980
+ VSAudioOptionsComponent], styles: ["[_nghost-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n.vs-brief[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n min-width: 0;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n overflow: hidden;\n}\n\n.vs-brief__scroll[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2-5);\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: var(--mj-space-2-5) var(--mj-space-3-5);\n}\n\n.vs-brief__section[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__section-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__heading[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.vs-brief__action-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n padding: 0;\n background: transparent;\n border: none;\n font-family: inherit;\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-brand-primary);\n cursor: pointer;\n}\n\n.vs-brief__action-link[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n}\n\n.vs-brief__action-link[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n border-radius: var(--mj-radius-sm);\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__sublabel[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n}\n\n.vs-brief__textarea[_ngcontent-%COMP%], \n.vs-brief__search-input[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: var(--mj-space-2) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n transition: var(--mj-transition-fast);\n}\n\n.vs-brief__textarea[_ngcontent-%COMP%] {\n resize: vertical;\n}\n\n.vs-brief__textarea[_ngcontent-%COMP%]:focus-visible, \n.vs-brief__search-input[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__loading[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--mj-space-4);\n}\n\n.vs-brief__archetypes[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__archetype-card[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--mj-space-1-5);\n width: 100%;\n padding: var(--mj-space-2-5) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n font-family: inherit;\n text-align: left;\n cursor: pointer;\n transition: var(--mj-transition-fast);\n}\n\n.vs-brief__archetype-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n box-shadow: var(--mj-shadow-sm);\n}\n\n.vs-brief__archetype-card[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__archetype-card--selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-card));\n}\n\n.vs-brief__archetype-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__archetype-name[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.vs-brief__archetype-time[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-muted);\n font-variant-numeric: tabular-nums;\n flex-shrink: 0;\n}\n\n.vs-brief__archetype-desc[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.vs-brief__formats[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__field--inline[_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__field-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-2-5);\n}\n\n.vs-brief__duration-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__duration-value[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n font-variant-numeric: tabular-nums;\n}\n\n.vs-brief__queries[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__footer[_ngcontent-%COMP%] {\n position: sticky;\n bottom: 0;\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n padding: var(--mj-space-2) var(--mj-space-3-5);\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n\n.vs-brief__summary[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-xs);\n line-height: 1.4;\n color: var(--mj-text-secondary);\n font-variant-numeric: tabular-nums;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n overflow-wrap: break-word;\n}\n\n.vs-brief__summary--muted[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n}\n\n.vs-brief__hint[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .vs-brief__textarea[_ngcontent-%COMP%], \n .vs-brief__search-input[_ngcontent-%COMP%], \n .vs-brief__archetype-card[_ngcontent-%COMP%] {\n transition: none;\n }\n}"] });
981
+ }
982
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VSProductionBriefComponent, [{
983
+ type: Component,
984
+ args: [{ standalone: true, selector: 'vs-production-brief, mj-vs-production-brief', imports: [
985
+ CommonModule,
986
+ FormsModule,
987
+ SharedGenericModule,
988
+ BrandKitCreatorComponent,
989
+ MJButtonDirective,
990
+ MJDialogComponent,
991
+ MJDropdownComponent,
992
+ MJNumericInputComponent,
993
+ MJVideoFormatGlyphComponent,
994
+ MJVideoBeatStripComponent,
995
+ VSArchetypeEditorComponent,
996
+ VSSetupHealthCardComponent,
997
+ VSAudioOptionsComponent,
998
+ ], template: "<div class=\"vs-brief\" data-testid=\"vs-production-brief\">\n <div class=\"vs-brief__scroll\">\n <!-- 1. Setup health (shown on warning/error, or when Setup OK details are toggled from the header) -->\n @if (ShouldShowSetupHealthCard) {\n <section class=\"vs-brief__section\" aria-label=\"Setup health\">\n <vs-setup-health-card\n [Result]=\"SetupHealthResult\"\n [Loading]=\"IsCheckingSetupHealth\"\n [Expanded]=\"IsAllSetupOk && ShowHealthySetupDetails\"\n (ExpandedChange)=\"OnSetupHealthExpandedChange($event)\"\n (Recheck)=\"CheckSetupHealth()\"\n ></vs-setup-health-card>\n </section>\n }\n\n <!-- 2. What's it about? -->\n <section class=\"vs-brief__section\">\n <label class=\"vs-brief__heading\" for=\"vs-brief-topic-input\">\n What's it about?\n </label>\n <textarea\n id=\"vs-brief-topic-input\"\n class=\"vs-brief__textarea\"\n data-testid=\"vs-brief-topic-input\"\n rows=\"2\"\n placeholder=\"Describe the video topic, audience, and goal\u2026\"\n [ngModel]=\"Topic\"\n (ngModelChange)=\"OnTopicChange($event)\"\n ></textarea>\n </section>\n\n <!-- 3. Shape -->\n <section class=\"vs-brief__section\" aria-labelledby=\"vs-brief-shape-heading\">\n <div class=\"vs-brief__section-header\">\n <h3 class=\"vs-brief__heading\" id=\"vs-brief-shape-heading\">\n Shape\n </h3>\n <button\n type=\"button\"\n class=\"vs-brief__action-link\"\n data-testid=\"vs-brief-make-your-own-link\"\n (click)=\"OpenArchetypeEditor()\"\n >\n <i class=\"fa-solid fa-plus\" aria-hidden=\"true\"></i>\n <span>Make your own</span>\n </button>\n </div>\n @if (IsLoading && AllArchetypes.length === 0) {\n <div class=\"vs-brief__loading\" data-testid=\"vs-brief-loading\">\n <mj-loading Text=\"Loading archetypes\u2026\" Size=\"small\"></mj-loading>\n </div>\n } @else {\n <div class=\"vs-brief__archetypes\" role=\"group\" aria-labelledby=\"vs-brief-shape-heading\">\n @for (arch of AllArchetypes; track arch.ID) {\n <button\n type=\"button\"\n class=\"vs-brief__archetype-card\"\n [class.vs-brief__archetype-card--selected]=\"IsArchetypeSelected(arch)\"\n [attr.aria-pressed]=\"IsArchetypeSelected(arch)\"\n [attr.data-testid]=\"'vs-brief-archetype-' + arch.ID\"\n (click)=\"SelectArchetype(arch)\"\n >\n <div class=\"vs-brief__archetype-header\">\n <span class=\"vs-brief__archetype-name\">{{ arch.Name }}</span>\n <span class=\"vs-brief__archetype-time\">\n {{ FormatTime(arch.DefaultDurationSeconds) }} ({{ FormatTimeRange(arch.MinDurationSeconds, arch.MaxDurationSeconds) }})\n </span>\n </div>\n @if (arch.Description) {\n <p class=\"vs-brief__archetype-desc\">{{ arch.Description }}</p>\n }\n @if (GetArchetypeBeats(arch).length > 0) {\n <mj-video-beat-strip\n [Beats]=\"GetArchetypeBeats(arch)\"\n [ShowLabels]=\"true\"\n ></mj-video-beat-strip>\n }\n </button>\n }\n </div>\n }\n </section>\n\n <!-- 4. Where it plays -->\n <section class=\"vs-brief__section\" aria-labelledby=\"vs-brief-where-heading\">\n <h3 class=\"vs-brief__heading\" id=\"vs-brief-where-heading\">\n Where it plays\n </h3>\n <div class=\"vs-brief__formats\" role=\"group\" aria-label=\"Output formats\" data-testid=\"vs-brief-formats\">\n @for (fmt of AvailableFormats; track fmt) {\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n [Toggleable]=\"true\"\n [Selected]=\"IsFormatSelected(fmt)\"\n [attr.data-testid]=\"'vs-brief-format-' + fmt\"\n (click)=\"ToggleFormat(fmt)\"\n >\n <mj-video-format-glyph\n [Format]=\"fmt\"\n [ShowLabel]=\"true\"\n Size=\"sm\"\n ></mj-video-format-glyph>\n </button>\n }\n </div>\n\n <div class=\"vs-brief__field vs-brief__field--inline\">\n <label class=\"vs-brief__sublabel\" for=\"vs-brief-duration-input\">\n Length ({{ FormatTimeRange(MinDurationSeconds, MaxDurationSeconds) }})\n </label>\n <div class=\"vs-brief__duration-row\">\n <mj-numeric-input\n InputId=\"vs-brief-duration-input\"\n [AriaLabel]=\"'Length (' + FormatTimeRange(MinDurationSeconds, MaxDurationSeconds) + ')'\"\n data-testid=\"vs-brief-duration-input\"\n [Min]=\"MinDurationSeconds\"\n [Max]=\"MaxDurationSeconds\"\n [Step]=\"5\"\n [ngModel]=\"DurationSeconds\"\n (ngModelChange)=\"OnDurationChange($event)\"\n ></mj-numeric-input>\n <span class=\"vs-brief__duration-value\" data-testid=\"vs-brief-duration-formatted\">\n {{ FormatTime(DurationSeconds) }}\n </span>\n </div>\n </div>\n </section>\n\n <!-- 5. Sound -->\n <section class=\"vs-brief__section\" aria-labelledby=\"vs-brief-sound-heading\">\n <h3 class=\"vs-brief__heading\" id=\"vs-brief-sound-heading\">\n Sound\n </h3>\n <vs-audio-options\n [NarrationEnabled]=\"NarrationEnabled\"\n (NarrationEnabledChange)=\"OnNarrationEnabledChange($event)\"\n [CaptionsMode]=\"CaptionsMode\"\n (CaptionsModeChange)=\"OnCaptionsModeChange($event)\"\n ></vs-audio-options>\n </section>\n\n <!-- 6. Brand kit (optional) -->\n <section class=\"vs-brief__section\" aria-labelledby=\"vs-brief-brand-heading\">\n <div class=\"vs-brief__section-header\">\n <h3 class=\"vs-brief__heading\" id=\"vs-brief-brand-heading\">\n Brand kit (optional)\n </h3>\n <button\n type=\"button\"\n class=\"vs-brief__action-link\"\n data-testid=\"vs-brief-new-brand-kit-link\"\n (click)=\"OpenBrandKitCreator()\"\n >\n <i class=\"fa-solid fa-plus\" aria-hidden=\"true\"></i>\n <span>New brand kit</span>\n </button>\n </div>\n <div class=\"vs-brief__field-grid\">\n <div class=\"vs-brief__field\">\n <span class=\"vs-brief__sublabel\" id=\"vs-brief-company-label\">Company</span>\n <mj-dropdown\n AriaLabelledBy=\"vs-brief-company-label\"\n data-testid=\"vs-brief-company-select\"\n [Data]=\"CompanyDropdownOptions\"\n TextField=\"Name\"\n ValueField=\"ID\"\n [ValuePrimitive]=\"true\"\n [ngModel]=\"SelectedCompanyId\"\n (ngModelChange)=\"OnCompanyFilterChange($event)\"\n ></mj-dropdown>\n </div>\n\n <div class=\"vs-brief__field\">\n <span class=\"vs-brief__sublabel\" id=\"vs-brief-brand-kit-label\">Brand kit</span>\n <mj-dropdown\n AriaLabelledBy=\"vs-brief-brand-kit-label\"\n data-testid=\"vs-brief-brand-kit-select\"\n Placeholder=\"None\"\n [Data]=\"BrandKitDropdownOptions\"\n TextField=\"DisplayName\"\n ValueField=\"ID\"\n [ValuePrimitive]=\"true\"\n [ngModel]=\"SelectedBrandKit?.ID ?? ''\"\n (ngModelChange)=\"SelectBrandKitById($event || null)\"\n ></mj-dropdown>\n </div>\n </div>\n </section>\n\n <!-- 7. Data (optional) -->\n <section class=\"vs-brief__section\" aria-labelledby=\"vs-brief-data-heading\">\n <h3 class=\"vs-brief__heading\" id=\"vs-brief-data-heading\">\n Data (optional)\n </h3>\n <input\n type=\"search\"\n class=\"vs-brief__search-input\"\n data-testid=\"vs-brief-query-search\"\n aria-label=\"Search saved queries\"\n placeholder=\"Filter saved queries by name\u2026\"\n [ngModel]=\"QuerySearchText\"\n (ngModelChange)=\"SearchSavedQueries($event)\"\n />\n @if (AvailableQueries.length > 0) {\n <div class=\"vs-brief__queries\" role=\"group\" aria-label=\"Saved queries\" data-testid=\"vs-brief-query-list\">\n @for (query of AvailableQueries; track query.ID) {\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n [Toggleable]=\"true\"\n [Selected]=\"IsQuerySelected(query.ID)\"\n [attr.data-testid]=\"'vs-brief-query-' + query.ID\"\n (click)=\"ToggleSavedQuery(query)\"\n >\n <span>{{ query.Name }}</span>\n </button>\n }\n </div>\n }\n </section>\n </div>\n\n @if (IsBrandKitCreatorOpen) {\n <mj-dialog\n [Visible]=\"true\"\n Title=\"New brand kit\"\n Size=\"lg\"\n (Close)=\"CloseBrandKitCreator()\"\n >\n <mj-brand-kit-creator\n [Provider]=\"ProviderToUse\"\n [Companies]=\"AvailableCompanies\"\n [InitialCompanyId]=\"SelectedCompanyId\"\n (Saved)=\"OnBrandKitCreatorSaved($event)\"\n (Cancelled)=\"CloseBrandKitCreator()\"\n ></mj-brand-kit-creator>\n </mj-dialog>\n }\n\n @if (IsArchetypeEditorOpen) {\n <mj-dialog\n [Visible]=\"true\"\n [Title]=\"ArchetypeEditorDialogTitle\"\n Size=\"lg\"\n (Close)=\"CloseArchetypeEditor()\"\n >\n <vs-archetype-editor\n [Provider]=\"ProviderToUse\"\n Mode=\"copy\"\n [SourceArchetypeId]=\"SelectedArchetype?.ID ?? null\"\n [Archetypes]=\"AllArchetypes\"\n [Companies]=\"AvailableCompanies\"\n [InitialCompanyId]=\"SelectedCompanyId !== 'all' ? SelectedCompanyId : null\"\n (Saved)=\"OnArchetypeEditorSaved($event)\"\n (Cancelled)=\"CloseArchetypeEditor()\"\n ></vs-archetype-editor>\n </mj-dialog>\n }\n\n <!-- 8. Sticky Start production footer -->\n <footer class=\"vs-brief__footer\" data-testid=\"vs-brief-footer\">\n <p\n class=\"vs-brief__summary\"\n [class.vs-brief__summary--muted]=\"!CanStartProduction\"\n data-testid=\"vs-brief-summary\"\n >\n {{ SummaryLine }}\n </p>\n <p class=\"vs-brief__hint\" data-testid=\"vs-brief-footer-hint\">\n Fills the message box below \u2014 attach references if needed, then press Send.\n </p>\n <button\n type=\"button\"\n mjButton\n Variant=\"primary\"\n Size=\"md\"\n class=\"vs-brief__start-btn\"\n data-testid=\"vs-brief-start-button\"\n [disabled]=\"!CanStartProduction\"\n (click)=\"OnStartClick()\"\n >\n <span>Start production</span>\n </button>\n </footer>\n</div>\n", styles: [":host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n min-width: 0;\n overflow: hidden;\n}\n\n.vs-brief {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n max-height: 100%;\n min-height: 0;\n min-width: 0;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n overflow: hidden;\n}\n\n.vs-brief__scroll {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2-5);\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: var(--mj-space-2-5) var(--mj-space-3-5);\n}\n\n.vs-brief__section {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__heading {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.vs-brief__action-link {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n padding: 0;\n background: transparent;\n border: none;\n font-family: inherit;\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-brand-primary);\n cursor: pointer;\n}\n\n.vs-brief__action-link:hover {\n text-decoration: underline;\n}\n\n.vs-brief__action-link:focus-visible {\n outline: none;\n border-radius: var(--mj-radius-sm);\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__sublabel {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n}\n\n.vs-brief__textarea,\n.vs-brief__search-input {\n width: 100%;\n box-sizing: border-box;\n padding: var(--mj-space-2) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: var(--mj-text-sm);\n transition: var(--mj-transition-fast);\n}\n\n.vs-brief__textarea {\n resize: vertical;\n}\n\n.vs-brief__textarea:focus-visible,\n.vs-brief__search-input:focus-visible {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__loading {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--mj-space-4);\n}\n\n.vs-brief__archetypes {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__archetype-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: var(--mj-space-1-5);\n width: 100%;\n padding: var(--mj-space-2-5) var(--mj-space-3);\n border-radius: var(--mj-radius-md);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n font-family: inherit;\n text-align: left;\n cursor: pointer;\n transition: var(--mj-transition-fast);\n}\n\n.vs-brief__archetype-card:hover {\n border-color: var(--mj-border-strong);\n box-shadow: var(--mj-shadow-sm);\n}\n\n.vs-brief__archetype-card:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.vs-brief__archetype-card--selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface-card));\n}\n\n.vs-brief__archetype-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__archetype-name {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-primary);\n}\n\n.vs-brief__archetype-time {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-muted);\n font-variant-numeric: tabular-nums;\n flex-shrink: 0;\n}\n\n.vs-brief__archetype-desc {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.vs-brief__formats {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__field {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__field--inline {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__field-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-2-5);\n}\n\n.vs-brief__duration-row {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n}\n\n.vs-brief__duration-value {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n font-variant-numeric: tabular-nums;\n}\n\n.vs-brief__queries {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-1-5);\n}\n\n.vs-brief__footer {\n position: sticky;\n bottom: 0;\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n padding: var(--mj-space-2) var(--mj-space-3-5);\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n\n.vs-brief__summary {\n margin: 0;\n font-size: var(--mj-text-xs);\n line-height: 1.4;\n color: var(--mj-text-secondary);\n font-variant-numeric: tabular-nums;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n overflow-wrap: break-word;\n}\n\n.vs-brief__summary--muted {\n color: var(--mj-text-muted);\n}\n\n.vs-brief__hint {\n margin: 0;\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .vs-brief__textarea,\n .vs-brief__search-input,\n .vs-brief__archetype-card {\n transition: none;\n }\n}\n"] }]
999
+ }], null, { AutoLoad: [{
1000
+ type: Input
1001
+ }], AutoCheckSetupHealth: [{
1002
+ type: Input
1003
+ }], ShowSetupHealthCard: [{
1004
+ type: Input
1005
+ }], SetupHealthResult: [{
1006
+ type: Input
1007
+ }], IsCheckingSetupHealth: [{
1008
+ type: Input
1009
+ }], ShowHealthySetupDetails: [{
1010
+ type: Input
1011
+ }], AllArchetypes: [{
1012
+ type: Input
1013
+ }], AllBrandKits: [{
1014
+ type: Input
1015
+ }], AvailableQueries: [{
1016
+ type: Input
1017
+ }], AvailableFormats: [{
1018
+ type: Input
1019
+ }], SelectedArchetype: [{
1020
+ type: Input
1021
+ }], SelectedCompanyId: [{
1022
+ type: Input
1023
+ }], SelectedBrandKit: [{
1024
+ type: Input
1025
+ }], SelectedBrandKitExplicitNone: [{
1026
+ type: Input
1027
+ }], SelectedFormats: [{
1028
+ type: Input
1029
+ }], DurationSeconds: [{
1030
+ type: Input
1031
+ }], Topic: [{
1032
+ type: Input
1033
+ }], QuerySearchText: [{
1034
+ type: Input
1035
+ }], SelectedQueries: [{
1036
+ type: Input
1037
+ }], NarrationEnabled: [{
1038
+ type: Input
1039
+ }], CaptionsMode: [{
1040
+ type: Input
1041
+ }], StateChange: [{
1042
+ type: Output
1043
+ }], StartRequested: [{
1044
+ type: Output
1045
+ }], SetupHealthChange: [{
1046
+ type: Output
1047
+ }], ShowHealthySetupDetailsChange: [{
1048
+ type: Output
1049
+ }], buttonDirectives: [{
1050
+ type: ViewChildren,
1051
+ args: [MJButtonDirective]
1052
+ }] }); })();
1053
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VSProductionBriefComponent, { className: "VSProductionBriefComponent", filePath: "src/VideoStudio/components/vs-production-brief.component.ts", lineNumber: 140 }); })();
1054
+ //# sourceMappingURL=vs-production-brief.component.js.map