@burdenoff/microfe-bigconsole 2026.1031.2 → 2026.1101.1

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.
@@ -5,21 +5,22 @@ import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
5
5
  import { Section as r, SectionStack as i } from "../components/common/Section.js";
6
6
  import "../components/common/index.js";
7
7
  import a from "../hooks/useBigConsoleAnalytics.js";
8
- import { isNative as ee, nativeImpact as o, nativeNotify as te } from "../../utils/nativeBridge.js";
8
+ import { setActiveGenerationContext as ee } from "../assistant/generationContext.js";
9
+ import { isNative as te, nativeImpact as o, nativeNotify as ne } from "../../utils/nativeBridge.js";
9
10
  import { generationApproval as s } from "../utils/generationApproval.js";
10
- import { isInsightsDraftDirty as ne } from "../utils/insightsDraft.js";
11
- import { GeneratedFormattingReview as re, GenerationExecutionStatus as ie } from "../components/insights/GeneratedFormattingReview.js";
11
+ import { isInsightsDraftDirty as re } from "../utils/insightsDraft.js";
12
+ import { GeneratedFormattingReview as ie, GenerationExecutionStatus as ae } from "../components/insights/GeneratedFormattingReview.js";
12
13
  /* empty css */
13
- import { memo as c, useCallback as l, useEffect as ae, useState as u } from "react";
14
- import { AlertCircle as oe, ArrowRight as d, Ban as se, CheckCircle as f, Clock as p, Eye as ce, History as le, Lightbulb as ue, Loader2 as m, RefreshCw as de, Sparkles as h, Trash2 as fe, Wand2 as g, X as pe, XCircle as _ } from "lucide-react";
14
+ import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
15
+ import { AlertCircle as oe, ArrowRight as f, Ban as se, CheckCircle as p, Clock as m, Eye as ce, History as le, Lightbulb as ue, Loader2 as h, RefreshCw as de, Sparkles as g, Trash2 as fe, Wand2 as _, X as pe, XCircle as v } from "lucide-react";
15
16
  import { AuroraBackground as me, GlassCard as he, GradientText as ge, IllustratedEmptyState as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
16
17
  import { useUnsavedChanges as ye } from "@burdenoff/fe-libs/shared/hooks";
17
- import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
18
- import { useMutation as y, useQuery as b } from "@apollo/client/react";
19
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
20
- import { gql as C } from "@apollo/client";
18
+ import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { useMutation as y, useQuery as xe } from "@apollo/client/react";
20
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
21
+ import { gql as S } from "@apollo/client";
21
22
  //#region src/bigconsole/pages/InsightsPage.tsx
22
- var be = C`
23
+ var Se = S`
23
24
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
24
25
  listPromptGenerations(status: $status, first: $first) {
25
26
  edges {
@@ -63,7 +64,7 @@ var be = C`
63
64
  totalCount
64
65
  }
65
66
  }
66
- `, xe = C`
67
+ `, Ce = S`
67
68
  query GetPromptSuggestions($category: String, $limit: Int) {
68
69
  getPromptSuggestions(category: $category, limit: $limit) {
69
70
  id
@@ -74,7 +75,7 @@ var be = C`
74
75
  tags
75
76
  }
76
77
  }
77
- `, Se = C`
78
+ `, we = S`
78
79
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
79
80
  generateDashboardFromPrompt(input: $input) {
80
81
  id
@@ -82,24 +83,24 @@ var be = C`
82
83
  prompt
83
84
  }
84
85
  }
85
- `, Ce = C`
86
+ `, Te = S`
86
87
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
87
88
  createDashboardFromGeneration(input: $input) {
88
89
  id
89
90
  }
90
91
  }
91
- `, we = C`
92
+ `, Ee = S`
92
93
  mutation DeletePromptGeneration($generationId: ID!) {
93
94
  deletePromptGeneration(generationId: $generationId)
94
95
  }
95
- `, Te = C`
96
+ `, De = S`
96
97
  mutation CancelPromptGeneration($generationId: ID!) {
97
98
  cancelPromptGeneration(generationId: $generationId) {
98
99
  id
99
100
  status
100
101
  }
101
102
  }
102
- `, Ee = C`
103
+ `, Oe = S`
103
104
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
104
105
  regenerateDashboard(input: $input) {
105
106
  id
@@ -107,7 +108,7 @@ var be = C`
107
108
  prompt
108
109
  }
109
110
  }
110
- `, De = C`
111
+ `, ke = S`
111
112
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
112
113
  refineGeneratedDashboard(input: $input) {
113
114
  id
@@ -115,11 +116,11 @@ var be = C`
115
116
  prompt
116
117
  }
117
118
  }
118
- `, Oe = [
119
+ `, C = [
119
120
  "PENDING",
120
121
  "PROCESSING",
121
122
  "GENERATING"
122
- ], ke = 12, Ae = 8, je = [
123
+ ], Ae = 12, je = 8, Me = [
123
124
  {
124
125
  value: "MODERN",
125
126
  label: "Modern"
@@ -140,7 +141,7 @@ var be = C`
140
141
  value: "VIBRANT",
141
142
  label: "Vibrant"
142
143
  }
143
- ], Me = [
144
+ ], Ne = [
144
145
  {
145
146
  value: "GRID",
146
147
  label: "Grid"
@@ -165,13 +166,13 @@ var be = C`
165
166
  value: "THREE_COLUMN",
166
167
  label: "Three column"
167
168
  }
168
- ], Ne = [
169
+ ], Pe = [
169
170
  6,
170
171
  8,
171
172
  12,
172
173
  16,
173
174
  24
174
- ], Pe = [
175
+ ], Fe = [
175
176
  4,
176
177
  6,
177
178
  8,
@@ -200,25 +201,25 @@ var be = C`
200
201
  border: "1px solid transparent",
201
202
  backgroundColor: "var(--color-action-primary-bg)",
202
203
  color: "var(--color-action-primary-text)"
203
- }, Fe = {
204
+ }, Ie = {
204
205
  ...w,
205
206
  border: "1px solid var(--color-status-warning-border)",
206
207
  backgroundColor: "transparent",
207
208
  color: "var(--color-status-warning-text)"
208
- }, Ie = {
209
+ }, D = {
209
210
  ...w,
210
211
  minWidth: "var(--size-controlHeight-md)",
211
212
  padding: "0 var(--space-controlGap)",
212
213
  border: "1px solid var(--color-border-default)",
213
214
  backgroundColor: "transparent",
214
215
  color: "var(--color-status-error-text)"
215
- }, D = {
216
+ }, O = {
216
217
  display: "block",
217
218
  marginBottom: "2px",
218
219
  fontSize: "var(--font-size-body-sm)",
219
220
  fontWeight: "var(--font-weight-medium)",
220
221
  color: "var(--color-text-secondary)"
221
- }, O = {
222
+ }, k = {
222
223
  width: "100%",
223
224
  minHeight: "var(--size-controlHeight-md)",
224
225
  padding: "0 var(--space-controlGap)",
@@ -227,7 +228,7 @@ var be = C`
227
228
  backgroundColor: "var(--color-bg-canvas)",
228
229
  color: "var(--color-text-primary)",
229
230
  fontSize: "var(--font-size-body-sm)"
230
- }, k = {
231
+ }, A = {
231
232
  display: "inline-flex",
232
233
  alignItems: "center",
233
234
  gap: "var(--space-iconGap)",
@@ -239,7 +240,7 @@ var be = C`
239
240
  backgroundColor: "var(--color-bg-sunken)",
240
241
  color: "var(--color-text-secondary)"
241
242
  };
242
- function A(e) {
243
+ function j(e) {
243
244
  switch (e) {
244
245
  case "COMPLETED": return "success";
245
246
  case "FAILED": return "danger";
@@ -249,7 +250,7 @@ function A(e) {
249
250
  default: return "neutral";
250
251
  }
251
252
  }
252
- var j = {
253
+ var M = {
253
254
  success: {
254
255
  text: "var(--color-status-success-text)",
255
256
  bg: "var(--color-status-success-bgSubtle)",
@@ -272,35 +273,35 @@ var j = {
272
273
  }
273
274
  };
274
275
  function Le(e) {
275
- let t = j[A(e)].text;
276
+ let t = M[j(e)].text;
276
277
  switch (e) {
277
- case "COMPLETED": return /* @__PURE__ */ x(f, {
278
+ case "COMPLETED": return /* @__PURE__ */ b(p, {
278
279
  size: 14,
279
280
  style: { color: t },
280
281
  "aria-hidden": "true"
281
282
  });
282
283
  case "FAILED":
283
- case "CANCELLED": return /* @__PURE__ */ x(_, {
284
+ case "CANCELLED": return /* @__PURE__ */ b(v, {
284
285
  size: 14,
285
286
  style: { color: t },
286
287
  "aria-hidden": "true"
287
288
  });
288
289
  case "PENDING":
289
290
  case "PROCESSING":
290
- case "GENERATING": return /* @__PURE__ */ x(m, {
291
+ case "GENERATING": return /* @__PURE__ */ b(h, {
291
292
  size: 14,
292
293
  className: "animate-spin",
293
294
  style: { color: t },
294
295
  "aria-hidden": "true"
295
296
  });
296
- default: return /* @__PURE__ */ x(p, {
297
+ default: return /* @__PURE__ */ b(m, {
297
298
  size: 14,
298
299
  style: { color: t },
299
300
  "aria-hidden": "true"
300
301
  });
301
302
  }
302
303
  }
303
- function M(e, t) {
304
+ function N(e, t) {
304
305
  switch (e) {
305
306
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
306
307
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -312,43 +313,43 @@ function M(e, t) {
312
313
  }
313
314
  }
314
315
  var Re = ({ status: e }) => {
315
- let { t } = v(), n = j[A(e)];
316
- return /* @__PURE__ */ S("span", {
316
+ let { t } = be(), n = M[j(e)];
317
+ return /* @__PURE__ */ x("span", {
317
318
  "data-status": e,
318
319
  style: {
319
- ...k,
320
+ ...A,
320
321
  border: `1px solid ${n.border}`,
321
322
  backgroundColor: n.bg,
322
323
  color: n.text
323
324
  },
324
- children: [Le(e), M(e, t)]
325
+ children: [Le(e), N(e, t)]
325
326
  });
326
327
  };
327
328
  function ze(e) {
328
- let t = j[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
329
+ let t = M[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
329
330
  return {
330
- ...k,
331
+ ...A,
331
332
  border: `1px solid ${t.border}`,
332
333
  backgroundColor: t.bg,
333
334
  color: t.text
334
335
  };
335
336
  }
336
- function N(e) {
337
+ function P(e) {
337
338
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
338
339
  }
339
340
  function Be(e) {
340
341
  let t = e?.toUpperCase();
341
342
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
342
343
  }
343
- var P = {
344
+ var Ve = {
344
345
  HIGH: "success",
345
346
  MEDIUM: "neutral",
346
347
  LOW: "danger"
347
348
  };
348
- function Ve(e) {
349
+ function He(e) {
349
350
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
350
351
  }
351
- function He(e, t) {
352
+ function Ue(e, t) {
352
353
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
353
354
  return {
354
355
  "--proposal-column": r + 1,
@@ -357,10 +358,10 @@ function He(e, t) {
357
358
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
358
359
  };
359
360
  }
360
- function Ue(e) {
361
- let t = j[P[e]];
361
+ function We(e) {
362
+ let t = M[Ve[e]];
362
363
  return {
363
- ...k,
364
+ ...A,
364
365
  padding: "0 var(--space-controlGap)",
365
366
  fontSize: "var(--font-size-xs)",
366
367
  fontWeight: "var(--font-weight-semibold)",
@@ -371,192 +372,192 @@ function Ue(e) {
371
372
  };
372
373
  }
373
374
  var F = c(function() {
374
- let { t: c } = v(), f = e(), p = a(), [_, C] = u(""), [w, A] = u("MODERN"), [j, Le] = u("GRID"), [M, P] = u(ke), [F, We] = u(Ae), [I, L] = u(!1), [Ge, R] = u(null), [z, Ke] = u(() => /* @__PURE__ */ new Set()), [B, V] = u(null), [H, U] = u(null), [W, G] = u("");
375
+ let { t: c } = be(), p = e(), m = a(), [v, S] = d(""), [w, j] = d("MODERN"), [M, Le] = d("GRID"), [N, Ve] = d(Ae), [F, Ge] = d(je), [I, Ke] = d(!1), [qe, L] = d(null), [R, Je] = d(() => /* @__PURE__ */ new Set()), [z, B] = d(null), [V, H] = d(null), [U, W] = d("");
375
376
  ye({
376
377
  id: "insights-prompt",
377
378
  label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
378
- dirty: ne({
379
- promptText: _,
379
+ dirty: re({
380
+ promptText: v,
380
381
  isGenerating: I,
381
- refineOpen: H !== null,
382
- refineText: W,
383
- refineBusy: H !== null && z.has(H.id)
382
+ refineOpen: V !== null,
383
+ refineText: U,
384
+ refineBusy: V !== null && R.has(V.id)
384
385
  })
385
- });
386
- let K = l((e) => {
387
- Ke((t) => new Set(t).add(e));
388
- }, []), q = l((e) => {
389
- Ke((t) => {
386
+ }), u(() => (ee(V?.id ?? z?.id ?? null), () => ee(null)), [V, z]);
387
+ let G = l((e) => {
388
+ Je((t) => new Set(t).add(e));
389
+ }, []), K = l((e) => {
390
+ Je((t) => {
390
391
  let n = new Set(t);
391
392
  return n.delete(e), n;
392
393
  });
393
- }, []), { data: qe, loading: Je, error: J, refetch: Y, startPolling: Ye, stopPolling: X } = b(be, {
394
+ }, []), { data: Ye, loading: Xe, error: q, refetch: J, startPolling: Ze, stopPolling: Y } = xe(Se, {
394
395
  variables: { first: 20 },
395
396
  fetchPolicy: "cache-and-network"
396
- }), Z = qe?.listPromptGenerations?.edges?.some((e) => Oe.includes(e.node.status)) ?? !1, { data: Xe, error: Ze, refetch: Qe } = b(xe, { variables: { limit: 6 } }), [$e] = y(Se), [et] = y(Ce), [tt] = y(we), [nt] = y(Te), [rt] = y(Ee), [it] = y(De), Q = qe?.listPromptGenerations?.edges?.map((e) => e.node) || [], at = Xe?.getPromptSuggestions || [];
397
- ae(() => (Z || I ? Ye(2e3) : X(), () => X()), [
398
- Z,
397
+ }), X = Ye?.listPromptGenerations?.edges?.some((e) => C.includes(e.node.status)) ?? !1, { data: Qe, error: $e, refetch: et } = xe(Ce, { variables: { limit: 6 } }), [tt] = y(we), [nt] = y(Te), [rt] = y(Ee), [it] = y(De), [Z] = y(Oe), [at] = y(ke), Q = Ye?.listPromptGenerations?.edges?.map((e) => e.node) || [], ot = Qe?.getPromptSuggestions || [];
398
+ u(() => (X || I ? Ze(2e3) : Y(), () => Y()), [
399
+ X,
399
400
  I,
400
- Ye,
401
- X
402
- ]), ae(() => {
403
- if (!B && !H) return;
401
+ Ze,
402
+ Y
403
+ ]), u(() => {
404
+ if (!z && !V) return;
404
405
  let e = (e) => {
405
- e.key === "Escape" && (V(null), U(null));
406
+ e.key === "Escape" && (B(null), H(null));
406
407
  };
407
408
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
408
- }, [B, H]);
409
- let ot = l(async () => {
410
- if (!(!_.trim() || I)) {
411
- if (_.length > 2e3) {
412
- R(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
409
+ }, [z, V]);
410
+ let st = l(async () => {
411
+ if (!(!v.trim() || I)) {
412
+ if (v.length > 2e3) {
413
+ L(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
413
414
  return;
414
415
  }
415
- R(null), L(!0);
416
+ L(null), Ke(!0);
416
417
  try {
417
- p("bigconsole.ai.generate_clicked", { maxWidgets: F });
418
- let e = await $e({ variables: { input: {
419
- prompt: _.trim(),
418
+ m("bigconsole.ai.generate_clicked", { maxWidgets: F });
419
+ let e = await tt({ variables: { input: {
420
+ prompt: v.trim(),
420
421
  styleType: w,
421
- layoutType: j,
422
- gridColumns: M,
422
+ layoutType: M,
423
+ gridColumns: N,
423
424
  maxWidgets: F
424
425
  } } });
425
426
  if (t(e, "command")) return;
426
427
  let n = e.data?.generateDashboardFromPrompt?.id;
427
- n && p("bigconsole.ai.dashboard_generated", {
428
+ n && m("bigconsole.ai.dashboard_generated", {
428
429
  generationId: n,
429
430
  maxWidgets: F
430
- }), C(""), Y();
431
+ }), S(""), J();
431
432
  } catch (e) {
432
433
  if (t(e, "command")) return;
433
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
434
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
434
435
  } finally {
435
- L(!1);
436
+ Ke(!1);
436
437
  }
437
438
  }
438
439
  }, [
439
- p,
440
- _,
440
+ m,
441
+ v,
441
442
  I,
442
- $e,
443
- Y,
443
+ tt,
444
+ J,
444
445
  w,
445
- j,
446
446
  M,
447
+ N,
447
448
  F,
448
449
  c
449
- ]), st = l(async (e) => {
450
- R(null);
450
+ ]), ct = l(async (e) => {
451
+ L(null);
451
452
  let n = s(e);
452
453
  if (n.kind === "view") {
453
- f(`/dashboards/${n.dashboardId}`);
454
+ p(`/dashboards/${n.dashboardId}`);
454
455
  return;
455
456
  }
456
457
  if (n.kind === "hold") {
457
- R(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
458
+ L(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
458
459
  return;
459
460
  }
460
461
  let r = e.id;
461
462
  try {
462
- p("bigconsole.ai.create_dashboard_clicked", { generationId: r });
463
- let e = await et({ variables: { input: n.input } });
463
+ m("bigconsole.ai.create_dashboard_clicked", { generationId: r });
464
+ let e = await nt({ variables: { input: n.input } });
464
465
  if (t(e, "project")) return;
465
466
  let i = e.data?.createDashboardFromGeneration?.id;
466
- i && (p("bigconsole.ai.dashboard_created", {
467
+ i && (m("bigconsole.ai.dashboard_created", {
467
468
  generationId: r,
468
469
  dashboardId: i
469
- }), f(`/dashboards/${i}`));
470
+ }), p(`/dashboards/${i}`));
470
471
  } catch (e) {
471
472
  if (t(e, "project")) return;
472
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
473
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
473
474
  }
474
475
  }, [
475
- et,
476
+ nt,
477
+ m,
476
478
  p,
477
- f,
478
479
  c
479
- ]), ct = l(async (e) => {
480
- R(null);
480
+ ]), lt = l(async (e) => {
481
+ L(null);
481
482
  try {
482
- await tt({ variables: { generationId: e } }), ee() && te("success"), Y();
483
+ await rt({ variables: { generationId: e } }), te() && ne("success"), J();
483
484
  } catch (e) {
484
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && te("error");
485
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), te() && ne("error");
485
486
  }
486
487
  }, [
487
- tt,
488
- Y,
488
+ rt,
489
+ J,
489
490
  c
490
- ]), lt = l(async (e) => {
491
- R(null), K(e);
491
+ ]), ut = l(async (e) => {
492
+ L(null), G(e);
492
493
  try {
493
- await nt({ variables: { generationId: e } }), Y();
494
+ await it({ variables: { generationId: e } }), J();
494
495
  } catch (e) {
495
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
496
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
496
497
  } finally {
497
- q(e);
498
+ K(e);
498
499
  }
499
500
  }, [
500
- nt,
501
- Y,
501
+ it,
502
+ J,
502
503
  c
503
- ]), ut = l(async (e) => {
504
- R(null), K(e);
504
+ ]), dt = l(async (e) => {
505
+ L(null), G(e);
505
506
  try {
506
- if (t(await rt({ variables: { input: { generationId: e } } }), "command")) return;
507
- Y();
507
+ if (t(await Z({ variables: { input: { generationId: e } } }), "command")) return;
508
+ J();
508
509
  } catch (e) {
509
510
  if (t(e, "command")) return;
510
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
511
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
511
512
  } finally {
512
- q(e);
513
+ K(e);
513
514
  }
514
515
  }, [
515
- rt,
516
- Y,
516
+ Z,
517
+ J,
517
518
  c
518
- ]), dt = l(async () => {
519
- if (!H || !W.trim()) return;
520
- let e = H.id;
521
- R(null), K(e);
519
+ ]), ft = l(async () => {
520
+ if (!V || !U.trim()) return;
521
+ let e = V.id;
522
+ L(null), G(e);
522
523
  let n = !1;
523
524
  try {
524
- if (t(await it({ variables: { input: {
525
+ if (t(await at({ variables: { input: {
525
526
  generationId: e,
526
- refinementPrompt: W.trim()
527
+ refinementPrompt: U.trim()
527
528
  } } }), "command")) {
528
529
  n = !0;
529
530
  return;
530
531
  }
531
- n = !0, Y();
532
+ n = !0, J();
532
533
  } catch (e) {
533
534
  if (t(e, "command")) {
534
535
  n = !0;
535
536
  return;
536
537
  }
537
- R(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
538
+ L(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
538
539
  } finally {
539
- n && (U(null), G("")), q(e);
540
+ n && (H(null), W("")), K(e);
540
541
  }
541
542
  }, [
542
- H,
543
- W,
544
- it,
545
- Y,
543
+ V,
544
+ U,
545
+ at,
546
+ J,
546
547
  c
547
- ]), ft = l((e) => {
548
- C(e);
549
- }, []), $ = B?.generatedSpec;
550
- return /* @__PURE__ */ S("div", {
548
+ ]), pt = l((e) => {
549
+ S(e);
550
+ }, []), $ = z?.generatedSpec;
551
+ return /* @__PURE__ */ x("div", {
551
552
  "data-tour": "bigconsole-ai-insights",
552
553
  className: "min-w-0",
553
554
  style: { backgroundColor: "var(--color-bg-canvas)" },
554
555
  children: [
555
- /* @__PURE__ */ S("header", {
556
+ /* @__PURE__ */ x("header", {
556
557
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
557
- children: [/* @__PURE__ */ x(me, { intensity: "subtle" }), /* @__PURE__ */ x("div", {
558
+ children: [/* @__PURE__ */ b(me, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
558
559
  style: { padding: "var(--space-pagePadding)" },
559
- children: /* @__PURE__ */ S("div", {
560
+ children: /* @__PURE__ */ x("div", {
560
561
  style: {
561
562
  display: "flex",
562
563
  alignItems: "center",
@@ -564,7 +565,7 @@ var F = c(function() {
564
565
  flexWrap: "wrap",
565
566
  minWidth: 0
566
567
  },
567
- children: [/* @__PURE__ */ x("div", {
568
+ children: [/* @__PURE__ */ b("div", {
568
569
  style: {
569
570
  display: "flex",
570
571
  height: "var(--size-controlHeight-lg)",
@@ -575,17 +576,17 @@ var F = c(function() {
575
576
  borderRadius: "var(--radius-card)",
576
577
  backgroundColor: "var(--color-action-primary-bg)"
577
578
  },
578
- children: /* @__PURE__ */ x(h, { style: {
579
+ children: /* @__PURE__ */ b(g, { style: {
579
580
  height: "var(--size-icon-lg)",
580
581
  width: "var(--size-icon-lg)",
581
582
  color: "var(--color-action-primary-text)"
582
583
  } })
583
- }), /* @__PURE__ */ S("div", {
584
+ }), /* @__PURE__ */ x("div", {
584
585
  style: { minWidth: 0 },
585
- children: [/* @__PURE__ */ x("h1", {
586
+ children: [/* @__PURE__ */ b("h1", {
586
587
  className: "m-0 text-2xl font-bold text-text-primary",
587
- children: /* @__PURE__ */ x(ge, { children: c("bigconsole.insights.header.title", "AI Insights") })
588
- }), /* @__PURE__ */ x("p", {
588
+ children: /* @__PURE__ */ b(ge, { children: c("bigconsole.insights.header.title", "AI Insights") })
589
+ }), /* @__PURE__ */ b("p", {
589
590
  className: "m-0 text-sm text-text-secondary",
590
591
  children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
591
592
  })]
@@ -593,47 +594,47 @@ var F = c(function() {
593
594
  })
594
595
  })]
595
596
  }),
596
- /* @__PURE__ */ S("div", {
597
+ /* @__PURE__ */ x("div", {
597
598
  style: { padding: "var(--space-pagePadding)" },
598
- children: [/* @__PURE__ */ x(ve, {
599
+ children: [/* @__PURE__ */ b(ve, {
599
600
  className: "mb-[var(--space-sectionGap)]",
600
601
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
601
- }), /* @__PURE__ */ S(i, { children: [
602
- Ge && /* @__PURE__ */ x(r, {
602
+ }), /* @__PURE__ */ x(i, { children: [
603
+ qe && /* @__PURE__ */ b(r, {
603
604
  headingLevel: 2,
604
605
  tone: "danger",
605
606
  padding: "compact",
606
607
  title: "That request did not go through",
607
- description: Ge,
608
- icon: /* @__PURE__ */ x(oe, { className: "h-icon-sm w-icon-sm" }),
608
+ description: qe,
609
+ icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" }),
609
610
  "data-testid": "insights-error",
610
- actions: /* @__PURE__ */ x("button", {
611
+ actions: /* @__PURE__ */ b("button", {
611
612
  type: "button",
612
- onClick: () => R(null),
613
+ onClick: () => L(null),
613
614
  "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
614
615
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
615
616
  style: T,
616
617
  children: "Dismiss"
617
618
  })
618
619
  }),
619
- (J || Ze) && /* @__PURE__ */ x("div", {
620
+ (q || $e) && /* @__PURE__ */ b("div", {
620
621
  role: "alert",
621
- children: /* @__PURE__ */ x(r, {
622
+ children: /* @__PURE__ */ b(r, {
622
623
  tone: "danger",
623
624
  padding: "compact",
624
625
  headingLevel: 2,
625
626
  title: c("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
626
627
  description: c("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
627
628
  "data-testid": "insights-load-error",
628
- actions: /* @__PURE__ */ S("button", {
629
+ actions: /* @__PURE__ */ x("button", {
629
630
  type: "button",
630
631
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
631
632
  style: T,
632
633
  onClick: () => {
633
- J && Y().catch(() => void 0), Ze && Qe().catch(() => void 0);
634
+ q && J().catch(() => void 0), $e && et().catch(() => void 0);
634
635
  },
635
636
  children: [
636
- /* @__PURE__ */ x(de, {
637
+ /* @__PURE__ */ b(de, {
637
638
  size: 14,
638
639
  "aria-hidden": "true"
639
640
  }),
@@ -643,22 +644,22 @@ var F = c(function() {
643
644
  })
644
645
  })
645
646
  }),
646
- /* @__PURE__ */ x(r, {
647
+ /* @__PURE__ */ b(r, {
647
648
  id: "insights-prompt",
648
649
  emphasis: "primary",
649
650
  headingLevel: 2,
650
651
  title: "Describe your dashboard",
651
652
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
652
- icon: /* @__PURE__ */ x(h, { className: "h-icon-sm w-icon-sm" }),
653
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" }),
653
654
  "data-testid": "insights-prompt",
654
- children: /* @__PURE__ */ S("div", {
655
+ children: /* @__PURE__ */ x("div", {
655
656
  style: {
656
657
  display: "flex",
657
658
  flexDirection: "column",
658
659
  gap: "var(--space-controlGap)"
659
660
  },
660
661
  children: [
661
- /* @__PURE__ */ x("label", {
662
+ /* @__PURE__ */ b("label", {
662
663
  htmlFor: "prompt-input",
663
664
  style: {
664
665
  display: "block",
@@ -668,10 +669,10 @@ var F = c(function() {
668
669
  },
669
670
  children: c("bigconsole.insights.prompt.label", "Your prompt")
670
671
  }),
671
- /* @__PURE__ */ x("textarea", {
672
+ /* @__PURE__ */ b("textarea", {
672
673
  id: "prompt-input",
673
- value: _,
674
- onChange: (e) => C(e.target.value),
674
+ value: v,
675
+ onChange: (e) => S(e.target.value),
675
676
  placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
676
677
  rows: 3,
677
678
  maxLength: 2e3,
@@ -688,10 +689,10 @@ var F = c(function() {
688
689
  resize: "vertical"
689
690
  },
690
691
  onKeyDown: (e) => {
691
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), ot());
692
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), st());
692
693
  }
693
694
  }),
694
- /* @__PURE__ */ S("div", {
695
+ /* @__PURE__ */ x("div", {
695
696
  role: "group",
696
697
  "aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
697
698
  "data-testid": "insights-generation-options",
@@ -701,69 +702,69 @@ var F = c(function() {
701
702
  gap: "var(--space-controlGap)"
702
703
  },
703
704
  children: [
704
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
705
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
705
706
  htmlFor: "prompt-style",
706
- style: D,
707
+ style: O,
707
708
  children: c("bigconsole.insights.prompt.style", "Style")
708
- }), /* @__PURE__ */ x("select", {
709
+ }), /* @__PURE__ */ b("select", {
709
710
  id: "prompt-style",
710
711
  value: w,
711
- onChange: (e) => A(e.target.value),
712
+ onChange: (e) => j(e.target.value),
712
713
  className: n,
713
- style: O,
714
- children: je.map((e) => /* @__PURE__ */ x("option", {
714
+ style: k,
715
+ children: Me.map((e) => /* @__PURE__ */ b("option", {
715
716
  value: e.value,
716
717
  children: e.label
717
718
  }, e.value))
718
719
  })] }),
719
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
720
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
720
721
  htmlFor: "prompt-layout",
721
- style: D,
722
+ style: O,
722
723
  children: c("bigconsole.insights.prompt.layout", "Layout")
723
- }), /* @__PURE__ */ x("select", {
724
+ }), /* @__PURE__ */ b("select", {
724
725
  id: "prompt-layout",
725
- value: j,
726
+ value: M,
726
727
  onChange: (e) => Le(e.target.value),
727
728
  className: n,
728
- style: O,
729
- children: Me.map((e) => /* @__PURE__ */ x("option", {
729
+ style: k,
730
+ children: Ne.map((e) => /* @__PURE__ */ b("option", {
730
731
  value: e.value,
731
732
  children: e.label
732
733
  }, e.value))
733
734
  })] }),
734
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
735
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
735
736
  htmlFor: "prompt-columns",
736
- style: D,
737
+ style: O,
737
738
  children: c("bigconsole.insights.prompt.columns", "Columns")
738
- }), /* @__PURE__ */ x("select", {
739
+ }), /* @__PURE__ */ b("select", {
739
740
  id: "prompt-columns",
740
- value: M,
741
- onChange: (e) => P(Number(e.target.value)),
741
+ value: N,
742
+ onChange: (e) => Ve(Number(e.target.value)),
742
743
  className: n,
743
- style: O,
744
- children: Ne.map((e) => /* @__PURE__ */ x("option", {
744
+ style: k,
745
+ children: Pe.map((e) => /* @__PURE__ */ b("option", {
745
746
  value: e,
746
747
  children: e
747
748
  }, e))
748
749
  })] }),
749
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
750
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
750
751
  htmlFor: "prompt-max-widgets",
751
- style: D,
752
+ style: O,
752
753
  children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
753
- }), /* @__PURE__ */ x("select", {
754
+ }), /* @__PURE__ */ b("select", {
754
755
  id: "prompt-max-widgets",
755
756
  value: F,
756
- onChange: (e) => We(Number(e.target.value)),
757
+ onChange: (e) => Ge(Number(e.target.value)),
757
758
  className: n,
758
- style: O,
759
- children: Pe.map((e) => /* @__PURE__ */ x("option", {
759
+ style: k,
760
+ children: Fe.map((e) => /* @__PURE__ */ b("option", {
760
761
  value: e,
761
762
  children: e
762
763
  }, e))
763
764
  })] })
764
765
  ]
765
766
  }),
766
- /* @__PURE__ */ S("div", {
767
+ /* @__PURE__ */ x("div", {
767
768
  style: {
768
769
  display: "flex",
769
770
  alignItems: "center",
@@ -772,7 +773,7 @@ var F = c(function() {
772
773
  borderTop: "1px solid var(--color-border-subtle)",
773
774
  paddingTop: "var(--space-controlGap)"
774
775
  },
775
- children: [/* @__PURE__ */ S("span", {
776
+ children: [/* @__PURE__ */ x("span", {
776
777
  style: {
777
778
  flex: "1 1 12rem",
778
779
  minWidth: 0,
@@ -782,25 +783,25 @@ var F = c(function() {
782
783
  children: [
783
784
  c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
784
785
  " · ",
785
- _.length,
786
+ v.length,
786
787
  "/2000"
787
788
  ]
788
- }), /* @__PURE__ */ S("button", {
789
+ }), /* @__PURE__ */ x("button", {
789
790
  type: "button",
790
- onClick: ot,
791
- disabled: !_.trim() || I,
791
+ onClick: st,
792
+ disabled: !v.trim() || I,
792
793
  className: n,
793
794
  style: {
794
795
  ...E,
795
796
  marginLeft: "auto",
796
- cursor: !_.trim() || I ? "not-allowed" : "pointer",
797
- opacity: !_.trim() || I ? .5 : 1
797
+ cursor: !v.trim() || I ? "not-allowed" : "pointer",
798
+ opacity: !v.trim() || I ? .5 : 1
798
799
  },
799
- children: [I ? /* @__PURE__ */ x(m, {
800
+ children: [I ? /* @__PURE__ */ b(h, {
800
801
  size: 16,
801
802
  className: "animate-spin",
802
803
  "aria-hidden": "true"
803
- }) : /* @__PURE__ */ x(h, {
804
+ }) : /* @__PURE__ */ b(g, {
804
805
  size: 16,
805
806
  "aria-hidden": "true"
806
807
  }), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
@@ -809,22 +810,22 @@ var F = c(function() {
809
810
  ]
810
811
  })
811
812
  }),
812
- at.length > 0 && /* @__PURE__ */ x(r, {
813
+ ot.length > 0 && /* @__PURE__ */ b(r, {
813
814
  emphasis: "muted",
814
815
  headingLevel: 2,
815
816
  title: c("bigconsole.insights.suggestions.heading", "Starting points"),
816
817
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
817
- icon: /* @__PURE__ */ x(ue, { className: "h-icon-sm w-icon-sm" }),
818
+ icon: /* @__PURE__ */ b(ue, { className: "h-icon-sm w-icon-sm" }),
818
819
  "data-testid": "insights-suggestions",
819
- children: /* @__PURE__ */ x("div", {
820
+ children: /* @__PURE__ */ b("div", {
820
821
  style: {
821
822
  display: "grid",
822
823
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
823
824
  gap: "var(--space-controlGap)"
824
825
  },
825
- children: at.map((e) => /* @__PURE__ */ S("button", {
826
+ children: ot.map((e) => /* @__PURE__ */ x("button", {
826
827
  type: "button",
827
- onClick: () => ft(e.prompt),
828
+ onClick: () => pt(e.prompt),
828
829
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
829
830
  style: {
830
831
  textAlign: "left",
@@ -837,7 +838,7 @@ var F = c(function() {
837
838
  cursor: "pointer"
838
839
  },
839
840
  children: [
840
- /* @__PURE__ */ x("span", {
841
+ /* @__PURE__ */ b("span", {
841
842
  style: {
842
843
  display: "block",
843
844
  fontWeight: "var(--font-weight-medium)",
@@ -847,7 +848,7 @@ var F = c(function() {
847
848
  },
848
849
  children: e.title
849
850
  }),
850
- /* @__PURE__ */ x("span", {
851
+ /* @__PURE__ */ b("span", {
851
852
  style: {
852
853
  display: "block",
853
854
  fontSize: "var(--font-size-body-sm)",
@@ -856,15 +857,15 @@ var F = c(function() {
856
857
  },
857
858
  children: e.exampleDescription || e.prompt
858
859
  }),
859
- e.tags.length > 0 && /* @__PURE__ */ x("span", {
860
+ e.tags.length > 0 && /* @__PURE__ */ b("span", {
860
861
  style: {
861
862
  display: "flex",
862
863
  gap: "var(--space-iconGap)",
863
864
  marginTop: "var(--space-controlGap)",
864
865
  flexWrap: "wrap"
865
866
  },
866
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
867
- style: k,
867
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
868
+ style: A,
868
869
  children: e
869
870
  }, e))
870
871
  })
@@ -872,15 +873,15 @@ var F = c(function() {
872
873
  }, e.id))
873
874
  })
874
875
  }),
875
- /* @__PURE__ */ x(r, {
876
+ /* @__PURE__ */ b(r, {
876
877
  emphasis: "bare",
877
878
  padding: "none",
878
879
  headingLevel: 2,
879
880
  title: c("bigconsole.insights.generations.heading", "Recent generations"),
880
881
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
881
- icon: /* @__PURE__ */ x(le, { className: "h-icon-sm w-icon-sm" }),
882
- meta: Q.length > 0 ? /* @__PURE__ */ S("span", {
883
- style: k,
882
+ icon: /* @__PURE__ */ b(le, { className: "h-icon-sm w-icon-sm" }),
883
+ meta: Q.length > 0 ? /* @__PURE__ */ x("span", {
884
+ style: A,
884
885
  children: [
885
886
  Q.length,
886
887
  " generation",
@@ -888,13 +889,13 @@ var F = c(function() {
888
889
  ]
889
890
  }) : void 0,
890
891
  "data-testid": "insights-generations",
891
- children: Je && Q.length === 0 ? /* @__PURE__ */ x(r, {
892
+ children: Xe && Q.length === 0 ? /* @__PURE__ */ b(r, {
892
893
  emphasis: "muted",
893
894
  headingLevel: 3,
894
895
  "aria-label": "Loading generations",
895
896
  className: "min-h-[10rem]",
896
897
  "data-testid": "insights-generations-loading",
897
- children: /* @__PURE__ */ S("div", {
898
+ children: /* @__PURE__ */ x("div", {
898
899
  style: {
899
900
  display: "flex",
900
901
  minHeight: "8rem",
@@ -904,84 +905,84 @@ var F = c(function() {
904
905
  gap: "var(--space-controlGap)",
905
906
  color: "var(--color-text-muted)"
906
907
  },
907
- children: [/* @__PURE__ */ x(m, {
908
+ children: [/* @__PURE__ */ b(h, {
908
909
  size: 24,
909
910
  className: "animate-spin",
910
911
  "aria-hidden": "true"
911
- }), /* @__PURE__ */ x("p", {
912
+ }), /* @__PURE__ */ b("p", {
912
913
  style: { fontSize: "var(--font-size-body-sm)" },
913
914
  children: c("bigconsole.insights.generations.loading", "Loading generations…")
914
915
  })]
915
916
  })
916
- }) : Q.length === 0 && !I && !J ? /* @__PURE__ */ x(he, {
917
+ }) : Q.length === 0 && !I && !q ? /* @__PURE__ */ b(he, {
917
918
  treatment: "insight",
918
919
  className: "border-[var(--color-border-seam)]",
919
- children: /* @__PURE__ */ x(_e, {
920
+ children: /* @__PURE__ */ b(_e, {
920
921
  illustration: "onboarding",
921
922
  title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
922
923
  description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
923
924
  })
924
- }) : /* @__PURE__ */ S("div", {
925
+ }) : /* @__PURE__ */ x("div", {
925
926
  className: "flex flex-col gap-list-gap",
926
- children: [I && !Z && /* @__PURE__ */ x(r, {
927
+ children: [I && !X && /* @__PURE__ */ b(r, {
927
928
  emphasis: "muted",
928
929
  tone: "info",
929
930
  padding: "compact",
930
931
  headingLevel: 3,
931
932
  title: "Sending your prompt…",
932
933
  description: "The new generation appears here as soon as the backend accepts it.",
933
- icon: /* @__PURE__ */ x(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
934
+ icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
934
935
  "data-testid": "insights-generation-pending"
935
936
  }), Q.map((e) => {
936
- let t = e.generatedSpec, i = z.has(e.id), a = Oe.includes(e.status);
937
- return /* @__PURE__ */ S(r, {
937
+ let t = e.generatedSpec, i = R.has(e.id), a = C.includes(e.status);
938
+ return /* @__PURE__ */ x(r, {
938
939
  emphasis: "standard",
939
940
  padding: "compact",
940
941
  headingLevel: 3,
941
942
  title: t?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
942
- meta: /* @__PURE__ */ x(Re, { status: e.status }),
943
+ meta: /* @__PURE__ */ b(Re, { status: e.status }),
943
944
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
944
945
  "data-testid": "insights-generation-card",
945
946
  bodyClassName: "flex flex-col gap-control-gap",
946
947
  children: [
947
- t && /* @__PURE__ */ S("div", {
948
+ t && /* @__PURE__ */ x("div", {
948
949
  style: {
949
950
  display: "flex",
950
951
  flexWrap: "wrap",
951
952
  gap: "var(--space-iconGap)"
952
953
  },
953
954
  children: [
954
- /* @__PURE__ */ S("span", {
955
- style: k,
955
+ /* @__PURE__ */ x("span", {
956
+ style: A,
956
957
  children: [
957
- N(t),
958
+ P(t),
958
959
  " widget",
959
- N(t) === 1 ? "" : "s"
960
+ P(t) === 1 ? "" : "s"
960
961
  ]
961
962
  }),
962
- /* @__PURE__ */ S("span", {
963
- style: k,
963
+ /* @__PURE__ */ x("span", {
964
+ style: A,
964
965
  children: [
965
966
  t.pages.length,
966
967
  " page",
967
968
  t.pages.length === 1 ? "" : "s"
968
969
  ]
969
970
  }),
970
- /* @__PURE__ */ S("span", {
971
+ /* @__PURE__ */ x("span", {
971
972
  style: ze(t.overallConfidence),
972
973
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
973
974
  })
974
975
  ]
975
976
  }),
976
- e.errorMessage && /* @__PURE__ */ x(r, {
977
+ e.errorMessage && /* @__PURE__ */ b(r, {
977
978
  headingLevel: 4,
978
979
  tone: "danger",
979
980
  padding: "compact",
980
981
  title: "Generation failed",
981
982
  description: e.errorMessage,
982
- icon: /* @__PURE__ */ x(oe, { className: "h-icon-sm w-icon-sm" })
983
+ icon: /* @__PURE__ */ b(oe, { className: "h-icon-sm w-icon-sm" })
983
984
  }),
984
- /* @__PURE__ */ S("div", {
985
+ /* @__PURE__ */ x("div", {
985
986
  style: {
986
987
  display: "flex",
987
988
  flexWrap: "wrap",
@@ -991,20 +992,20 @@ var F = c(function() {
991
992
  paddingTop: "var(--space-controlGap)"
992
993
  },
993
994
  children: [
994
- a && /* @__PURE__ */ S("button", {
995
+ a && /* @__PURE__ */ x("button", {
995
996
  type: "button",
996
997
  onClick: () => {
997
- o("medium"), lt(e.id);
998
+ o("medium"), ut(e.id);
998
999
  },
999
1000
  disabled: i,
1000
1001
  title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1001
1002
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1002
1003
  style: {
1003
- ...Fe,
1004
+ ...Ie,
1004
1005
  cursor: i ? "wait" : "pointer"
1005
1006
  },
1006
1007
  children: [
1007
- /* @__PURE__ */ x(se, {
1008
+ /* @__PURE__ */ b(se, {
1008
1009
  size: 14,
1009
1010
  "aria-hidden": "true"
1010
1011
  }),
@@ -1012,14 +1013,14 @@ var F = c(function() {
1012
1013
  c("bigconsole.insights.actions.cancel", "Cancel")
1013
1014
  ]
1014
1015
  }),
1015
- e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1016
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1016
1017
  type: "button",
1017
- onClick: () => V(e),
1018
+ onClick: () => B(e),
1018
1019
  title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1019
1020
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1020
1021
  style: T,
1021
1022
  children: [
1022
- /* @__PURE__ */ x(ce, {
1023
+ /* @__PURE__ */ b(ce, {
1023
1024
  size: 14,
1024
1025
  "aria-hidden": "true"
1025
1026
  }),
@@ -1027,16 +1028,16 @@ var F = c(function() {
1027
1028
  c("bigconsole.insights.actions.preview", "Preview")
1028
1029
  ]
1029
1030
  }),
1030
- e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
1031
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1031
1032
  type: "button",
1032
1033
  onClick: () => {
1033
- U(e), G("");
1034
+ H(e), W("");
1034
1035
  },
1035
1036
  title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1036
1037
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1037
1038
  style: T,
1038
1039
  children: [
1039
- /* @__PURE__ */ x(g, {
1040
+ /* @__PURE__ */ b(_, {
1040
1041
  size: 14,
1041
1042
  "aria-hidden": "true"
1042
1043
  }),
@@ -1044,10 +1045,10 @@ var F = c(function() {
1044
1045
  c("bigconsole.insights.actions.refine", "Refine")
1045
1046
  ]
1046
1047
  }),
1047
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
1048
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1048
1049
  type: "button",
1049
1050
  onClick: () => {
1050
- o("medium"), ut(e.id);
1051
+ o("medium"), dt(e.id);
1051
1052
  },
1052
1053
  disabled: i,
1053
1054
  title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
@@ -1057,7 +1058,7 @@ var F = c(function() {
1057
1058
  cursor: i ? "wait" : "pointer"
1058
1059
  },
1059
1060
  children: [
1060
- /* @__PURE__ */ x(de, {
1061
+ /* @__PURE__ */ b(de, {
1061
1062
  size: 14,
1062
1063
  className: i ? "animate-spin" : "",
1063
1064
  "aria-hidden": "true"
@@ -1066,7 +1067,7 @@ var F = c(function() {
1066
1067
  c("bigconsole.insights.actions.regenerate", "Regenerate")
1067
1068
  ]
1068
1069
  }),
1069
- /* @__PURE__ */ S("div", {
1070
+ /* @__PURE__ */ x("div", {
1070
1071
  style: {
1071
1072
  display: "flex",
1072
1073
  flexWrap: "wrap",
@@ -1075,13 +1076,13 @@ var F = c(function() {
1075
1076
  marginLeft: "auto"
1076
1077
  },
1077
1078
  children: [
1078
- e.status === "COMPLETED" && s(e).kind === "hold" && /* @__PURE__ */ x("span", {
1079
+ e.status === "COMPLETED" && s(e).kind === "hold" && /* @__PURE__ */ b("span", {
1079
1080
  role: "status",
1080
1081
  children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1081
1082
  }),
1082
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
1083
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1083
1084
  type: "button",
1084
- onClick: () => st(e),
1085
+ onClick: () => ct(e),
1085
1086
  disabled: s(e).kind !== "create",
1086
1087
  title: s(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1087
1088
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
@@ -1089,36 +1090,36 @@ var F = c(function() {
1089
1090
  children: [
1090
1091
  c("bigconsole.insights.actions.create", "Create dashboard"),
1091
1092
  " ",
1092
- /* @__PURE__ */ x(d, {
1093
+ /* @__PURE__ */ b(f, {
1093
1094
  size: 14,
1094
1095
  "aria-hidden": "true"
1095
1096
  })
1096
1097
  ]
1097
1098
  }),
1098
- e.dashboardId && /* @__PURE__ */ S("button", {
1099
+ e.dashboardId && /* @__PURE__ */ x("button", {
1099
1100
  type: "button",
1100
- onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
1101
+ onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1101
1102
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1102
1103
  style: T,
1103
1104
  children: [
1104
1105
  c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1105
1106
  " ",
1106
- /* @__PURE__ */ x(d, {
1107
+ /* @__PURE__ */ b(f, {
1107
1108
  size: 14,
1108
1109
  "aria-hidden": "true"
1109
1110
  })
1110
1111
  ]
1111
1112
  }),
1112
- /* @__PURE__ */ x("button", {
1113
+ /* @__PURE__ */ b("button", {
1113
1114
  type: "button",
1114
1115
  onClick: () => {
1115
- o("medium"), ct(e.id);
1116
+ o("medium"), lt(e.id);
1116
1117
  },
1117
1118
  title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1118
1119
  "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1119
1120
  className: n,
1120
- style: Ie,
1121
- children: /* @__PURE__ */ x(fe, {
1121
+ style: D,
1122
+ children: /* @__PURE__ */ b(fe, {
1122
1123
  size: 14,
1123
1124
  "aria-hidden": "true"
1124
1125
  })
@@ -1134,11 +1135,11 @@ var F = c(function() {
1134
1135
  })
1135
1136
  ] })]
1136
1137
  }),
1137
- B && $ && /* @__PURE__ */ x("div", {
1138
+ z && $ && /* @__PURE__ */ b("div", {
1138
1139
  role: "dialog",
1139
1140
  "aria-modal": "true",
1140
1141
  "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1141
- onClick: () => V(null),
1142
+ onClick: () => B(null),
1142
1143
  style: {
1143
1144
  position: "fixed",
1144
1145
  inset: 0,
@@ -1149,7 +1150,7 @@ var F = c(function() {
1149
1150
  justifyContent: "center",
1150
1151
  padding: "var(--space-pagePadding)"
1151
1152
  },
1152
- children: /* @__PURE__ */ S("div", {
1153
+ children: /* @__PURE__ */ x("div", {
1153
1154
  onClick: (e) => e.stopPropagation(),
1154
1155
  style: {
1155
1156
  display: "flex",
@@ -1163,7 +1164,7 @@ var F = c(function() {
1163
1164
  boxShadow: "var(--shadow-elevation-3)"
1164
1165
  },
1165
1166
  children: [
1166
- /* @__PURE__ */ S("div", {
1167
+ /* @__PURE__ */ x("div", {
1167
1168
  style: {
1168
1169
  display: "flex",
1169
1170
  justifyContent: "space-between",
@@ -1172,16 +1173,16 @@ var F = c(function() {
1172
1173
  padding: "var(--space-cardPadding)",
1173
1174
  borderBottom: "1px solid var(--color-border-subtle)"
1174
1175
  },
1175
- children: [/* @__PURE__ */ S("div", {
1176
+ children: [/* @__PURE__ */ x("div", {
1176
1177
  style: { minWidth: 0 },
1177
- children: [/* @__PURE__ */ x("h2", {
1178
+ children: [/* @__PURE__ */ b("h2", {
1178
1179
  style: {
1179
1180
  fontSize: "var(--font-size-heading-h4)",
1180
1181
  fontWeight: "var(--font-weight-semibold)",
1181
1182
  color: "var(--color-text-primary)"
1182
1183
  },
1183
1184
  children: $.name
1184
- }), $.description && /* @__PURE__ */ x("p", {
1185
+ }), $.description && /* @__PURE__ */ b("p", {
1185
1186
  style: {
1186
1187
  fontSize: "var(--font-size-body-sm)",
1187
1188
  color: "var(--color-text-secondary)",
@@ -1189,22 +1190,22 @@ var F = c(function() {
1189
1190
  },
1190
1191
  children: $.description
1191
1192
  })]
1192
- }), /* @__PURE__ */ x("button", {
1193
+ }), /* @__PURE__ */ b("button", {
1193
1194
  type: "button",
1194
- onClick: () => V(null),
1195
+ onClick: () => B(null),
1195
1196
  "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1196
1197
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1197
1198
  style: {
1198
- ...Ie,
1199
+ ...D,
1199
1200
  color: "var(--color-text-muted)"
1200
1201
  },
1201
- children: /* @__PURE__ */ x(pe, {
1202
+ children: /* @__PURE__ */ b(pe, {
1202
1203
  size: 18,
1203
1204
  "aria-hidden": "true"
1204
1205
  })
1205
1206
  })]
1206
1207
  }),
1207
- /* @__PURE__ */ S("div", {
1208
+ /* @__PURE__ */ x("div", {
1208
1209
  style: {
1209
1210
  flex: "1 1 auto",
1210
1211
  minHeight: 0,
@@ -1215,39 +1216,39 @@ var F = c(function() {
1215
1216
  gap: "var(--space-controlGap)"
1216
1217
  },
1217
1218
  children: [
1218
- /* @__PURE__ */ S("div", {
1219
+ /* @__PURE__ */ x("div", {
1219
1220
  style: {
1220
1221
  display: "flex",
1221
1222
  flexWrap: "wrap",
1222
1223
  gap: "var(--space-iconGap)"
1223
1224
  },
1224
1225
  children: [
1225
- /* @__PURE__ */ S("span", {
1226
- style: k,
1226
+ /* @__PURE__ */ x("span", {
1227
+ style: A,
1227
1228
  children: [
1228
- N($),
1229
+ P($),
1229
1230
  " widget",
1230
- N($) === 1 ? "" : "s"
1231
+ P($) === 1 ? "" : "s"
1231
1232
  ]
1232
1233
  }),
1233
- /* @__PURE__ */ S("span", {
1234
- style: k,
1234
+ /* @__PURE__ */ x("span", {
1235
+ style: A,
1235
1236
  children: [
1236
1237
  $.pages.length,
1237
1238
  " page",
1238
1239
  $.pages.length === 1 ? "" : "s"
1239
1240
  ]
1240
1241
  }),
1241
- /* @__PURE__ */ S("span", {
1242
+ /* @__PURE__ */ x("span", {
1242
1243
  style: ze($.overallConfidence),
1243
1244
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1244
1245
  })
1245
1246
  ]
1246
1247
  }),
1247
- /* @__PURE__ */ x(ie, { metadata: B.processingMetadata }),
1248
- $.reasoning && /* @__PURE__ */ S("details", {
1248
+ /* @__PURE__ */ b(ae, { metadata: z.processingMetadata }),
1249
+ $.reasoning && /* @__PURE__ */ x("details", {
1249
1250
  "data-testid": "preview-reasoning",
1250
- children: [/* @__PURE__ */ x("summary", {
1251
+ children: [/* @__PURE__ */ b("summary", {
1251
1252
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1252
1253
  style: {
1253
1254
  cursor: "pointer",
@@ -1257,7 +1258,7 @@ var F = c(function() {
1257
1258
  borderRadius: "var(--radius-button)"
1258
1259
  },
1259
1260
  children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1260
- }), /* @__PURE__ */ x("p", {
1261
+ }), /* @__PURE__ */ b("p", {
1261
1262
  style: {
1262
1263
  marginTop: "var(--space-controlGap)",
1263
1264
  fontSize: "var(--font-size-body-sm)",
@@ -1267,20 +1268,20 @@ var F = c(function() {
1267
1268
  children: $.reasoning
1268
1269
  })]
1269
1270
  }),
1270
- $.pages.map((e, t) => /* @__PURE__ */ S(r, {
1271
+ $.pages.map((e, t) => /* @__PURE__ */ x(r, {
1271
1272
  emphasis: "muted",
1272
1273
  padding: "compact",
1273
1274
  headingLevel: 3,
1274
1275
  title: e.name,
1275
- meta: /* @__PURE__ */ S("span", {
1276
- style: k,
1276
+ meta: /* @__PURE__ */ x("span", {
1277
+ style: A,
1277
1278
  children: [
1278
1279
  e.widgets.length,
1279
1280
  " widget",
1280
1281
  e.widgets.length === 1 ? "" : "s"
1281
1282
  ]
1282
1283
  }),
1283
- children: [/* @__PURE__ */ S("p", {
1284
+ children: [/* @__PURE__ */ x("p", {
1284
1285
  style: {
1285
1286
  fontSize: "var(--font-size-body-sm)",
1286
1287
  color: "var(--color-text-secondary)",
@@ -1296,15 +1297,15 @@ var F = c(function() {
1296
1297
  " ",
1297
1298
  e.layout.toLowerCase().replaceAll("_", " ")
1298
1299
  ]
1299
- }), /* @__PURE__ */ x("div", {
1300
+ }), /* @__PURE__ */ b("div", {
1300
1301
  className: "insights-proposal-grid",
1301
- style: Ve(e.gridColumns),
1302
+ style: He(e.gridColumns),
1302
1303
  children: e.widgets.map((t, n) => {
1303
1304
  let r = Be(t.confidence);
1304
- return /* @__PURE__ */ S("div", {
1305
+ return /* @__PURE__ */ x("div", {
1305
1306
  className: "insights-proposal-widget",
1306
1307
  style: {
1307
- ...He(t.position, e.gridColumns),
1308
+ ...Ue(t.position, e.gridColumns),
1308
1309
  display: "flex",
1309
1310
  flexDirection: "column",
1310
1311
  gap: "2px",
@@ -1314,7 +1315,7 @@ var F = c(function() {
1314
1315
  border: "1px solid var(--color-border-subtle)"
1315
1316
  },
1316
1317
  children: [
1317
- /* @__PURE__ */ S("div", {
1318
+ /* @__PURE__ */ x("div", {
1318
1319
  style: {
1319
1320
  display: "flex",
1320
1321
  flexWrap: "wrap",
@@ -1322,7 +1323,7 @@ var F = c(function() {
1322
1323
  gap: "var(--space-iconGap)"
1323
1324
  },
1324
1325
  children: [
1325
- /* @__PURE__ */ x("span", {
1326
+ /* @__PURE__ */ b("span", {
1326
1327
  style: {
1327
1328
  fontSize: "var(--font-size-body-sm)",
1328
1329
  fontWeight: "var(--font-weight-medium)",
@@ -1331,7 +1332,7 @@ var F = c(function() {
1331
1332
  },
1332
1333
  children: t.title
1333
1334
  }),
1334
- /* @__PURE__ */ x("span", {
1335
+ /* @__PURE__ */ b("span", {
1335
1336
  style: {
1336
1337
  fontSize: "var(--font-size-xs)",
1337
1338
  color: "var(--color-text-muted)"
@@ -1339,9 +1340,9 @@ var F = c(function() {
1339
1340
  "data-testid": "preview-widget-type",
1340
1341
  children: t.type
1341
1342
  }),
1342
- r && /* @__PURE__ */ x("span", {
1343
+ r && /* @__PURE__ */ b("span", {
1343
1344
  style: {
1344
- ...Ue(r),
1345
+ ...We(r),
1345
1346
  marginLeft: "auto"
1346
1347
  },
1347
1348
  "data-testid": "preview-widget-confidence",
@@ -1349,7 +1350,7 @@ var F = c(function() {
1349
1350
  })
1350
1351
  ]
1351
1352
  }),
1352
- t.reasoning && /* @__PURE__ */ x("p", {
1353
+ t.reasoning && /* @__PURE__ */ b("p", {
1353
1354
  style: {
1354
1355
  margin: 0,
1355
1356
  fontSize: "var(--font-size-xs)",
@@ -1358,7 +1359,7 @@ var F = c(function() {
1358
1359
  },
1359
1360
  children: t.reasoning
1360
1361
  }),
1361
- /* @__PURE__ */ x(re, { config: t.config })
1362
+ /* @__PURE__ */ b(ie, { config: t.config })
1362
1363
  ]
1363
1364
  }, n);
1364
1365
  })
@@ -1366,7 +1367,7 @@ var F = c(function() {
1366
1367
  }, t))
1367
1368
  ]
1368
1369
  }),
1369
- /* @__PURE__ */ S("div", {
1370
+ /* @__PURE__ */ x("div", {
1370
1371
  style: {
1371
1372
  display: "flex",
1372
1373
  justifyContent: "flex-end",
@@ -1376,24 +1377,24 @@ var F = c(function() {
1376
1377
  borderTop: "1px solid var(--color-border-subtle)"
1377
1378
  },
1378
1379
  children: [
1379
- /* @__PURE__ */ x("button", {
1380
+ /* @__PURE__ */ b("button", {
1380
1381
  type: "button",
1381
- onClick: () => V(null),
1382
+ onClick: () => B(null),
1382
1383
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1383
1384
  style: T,
1384
1385
  children: "Close"
1385
1386
  }),
1386
- B.status === "COMPLETED" && $ && /* @__PURE__ */ S("button", {
1387
+ z.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1387
1388
  type: "button",
1388
1389
  onClick: () => {
1389
- let e = B;
1390
- V(null), U(e), G("");
1390
+ let e = z;
1391
+ B(null), H(e), W("");
1391
1392
  },
1392
1393
  title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1393
1394
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1394
1395
  style: T,
1395
1396
  children: [
1396
- /* @__PURE__ */ x(g, {
1397
+ /* @__PURE__ */ b(_, {
1397
1398
  size: 14,
1398
1399
  "aria-hidden": "true"
1399
1400
  }),
@@ -1401,31 +1402,31 @@ var F = c(function() {
1401
1402
  c("bigconsole.insights.actions.refine", "Refine")
1402
1403
  ]
1403
1404
  }),
1404
- B.status === "COMPLETED" && s(B).kind === "hold" && /* @__PURE__ */ x("span", {
1405
+ z.status === "COMPLETED" && s(z).kind === "hold" && /* @__PURE__ */ b("span", {
1405
1406
  role: "status",
1406
1407
  children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1407
1408
  }),
1408
- B.dashboardId && /* @__PURE__ */ x("button", {
1409
+ z.dashboardId && /* @__PURE__ */ b("button", {
1409
1410
  type: "button",
1410
1411
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1411
1412
  style: T,
1412
- onClick: () => f(`/dashboards/${B.dashboardId}`),
1413
+ onClick: () => p(`/dashboards/${z.dashboardId}`),
1413
1414
  children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1414
1415
  }),
1415
- B.status === "COMPLETED" && !B.dashboardId && /* @__PURE__ */ S("button", {
1416
+ z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ x("button", {
1416
1417
  type: "button",
1417
- disabled: s(B).kind !== "create",
1418
- title: s(B).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1418
+ disabled: s(z).kind !== "create",
1419
+ title: s(z).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1419
1420
  onClick: () => {
1420
- let e = B;
1421
- V(null), st(e);
1421
+ let e = z;
1422
+ B(null), ct(e);
1422
1423
  },
1423
1424
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1424
1425
  style: E,
1425
1426
  children: [
1426
1427
  c("bigconsole.insights.actions.create", "Create dashboard"),
1427
1428
  " ",
1428
- /* @__PURE__ */ x(d, {
1429
+ /* @__PURE__ */ b(f, {
1429
1430
  size: 14,
1430
1431
  "aria-hidden": "true"
1431
1432
  })
@@ -1436,11 +1437,11 @@ var F = c(function() {
1436
1437
  ]
1437
1438
  })
1438
1439
  }),
1439
- H && /* @__PURE__ */ x("div", {
1440
+ V && /* @__PURE__ */ b("div", {
1440
1441
  role: "dialog",
1441
1442
  "aria-modal": "true",
1442
1443
  "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1443
- onClick: () => U(null),
1444
+ onClick: () => H(null),
1444
1445
  style: {
1445
1446
  position: "fixed",
1446
1447
  inset: 0,
@@ -1451,7 +1452,7 @@ var F = c(function() {
1451
1452
  justifyContent: "center",
1452
1453
  padding: "var(--space-pagePadding)"
1453
1454
  },
1454
- children: /* @__PURE__ */ S("div", {
1455
+ children: /* @__PURE__ */ x("div", {
1455
1456
  onClick: (e) => e.stopPropagation(),
1456
1457
  style: {
1457
1458
  display: "flex",
@@ -1465,19 +1466,19 @@ var F = c(function() {
1465
1466
  boxShadow: "var(--shadow-elevation-3)"
1466
1467
  },
1467
1468
  children: [
1468
- /* @__PURE__ */ S("div", {
1469
+ /* @__PURE__ */ x("div", {
1469
1470
  style: {
1470
1471
  padding: "var(--space-cardPadding)",
1471
1472
  borderBottom: "1px solid var(--color-border-subtle)"
1472
1473
  },
1473
- children: [/* @__PURE__ */ x("h2", {
1474
+ children: [/* @__PURE__ */ b("h2", {
1474
1475
  style: {
1475
1476
  fontSize: "var(--font-size-heading-h4)",
1476
1477
  fontWeight: "var(--font-weight-semibold)",
1477
1478
  color: "var(--color-text-primary)"
1478
1479
  },
1479
1480
  children: c("bigconsole.insights.refine.heading", "Refine dashboard")
1480
- }), /* @__PURE__ */ x("p", {
1481
+ }), /* @__PURE__ */ b("p", {
1481
1482
  style: {
1482
1483
  fontSize: "var(--font-size-body-sm)",
1483
1484
  color: "var(--color-text-secondary)",
@@ -1486,7 +1487,7 @@ var F = c(function() {
1486
1487
  children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1487
1488
  })]
1488
1489
  }),
1489
- /* @__PURE__ */ S("div", {
1490
+ /* @__PURE__ */ x("div", {
1490
1491
  style: {
1491
1492
  flex: "1 1 auto",
1492
1493
  minHeight: 0,
@@ -1496,20 +1497,20 @@ var F = c(function() {
1496
1497
  flexDirection: "column",
1497
1498
  gap: "var(--space-controlGap)"
1498
1499
  },
1499
- children: [/* @__PURE__ */ x(r, {
1500
+ children: [/* @__PURE__ */ b(r, {
1500
1501
  emphasis: "muted",
1501
1502
  padding: "compact",
1502
1503
  headingLevel: 3,
1503
- title: H.generatedSpec?.name || "Current proposal",
1504
- description: H.prompt.length > 240 ? `${H.prompt.slice(0, 240)}…` : H.prompt,
1505
- icon: /* @__PURE__ */ x(h, { className: "h-icon-sm w-icon-sm" })
1506
- }), /* @__PURE__ */ S("div", {
1504
+ title: V.generatedSpec?.name || "Current proposal",
1505
+ description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1506
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1507
+ }), /* @__PURE__ */ x("div", {
1507
1508
  style: {
1508
1509
  display: "flex",
1509
1510
  flexDirection: "column",
1510
1511
  gap: "var(--space-controlGap)"
1511
1512
  },
1512
- children: [/* @__PURE__ */ x("label", {
1513
+ children: [/* @__PURE__ */ b("label", {
1513
1514
  htmlFor: "refine-input",
1514
1515
  style: {
1515
1516
  display: "block",
@@ -1518,10 +1519,10 @@ var F = c(function() {
1518
1519
  color: "var(--color-text-primary)"
1519
1520
  },
1520
1521
  children: "What should change?"
1521
- }), /* @__PURE__ */ x("textarea", {
1522
+ }), /* @__PURE__ */ b("textarea", {
1522
1523
  id: "refine-input",
1523
- value: W,
1524
- onChange: (e) => G(e.target.value),
1524
+ value: U,
1525
+ onChange: (e) => W(e.target.value),
1525
1526
  maxLength: 2e3,
1526
1527
  rows: 4,
1527
1528
  placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
@@ -1540,7 +1541,7 @@ var F = c(function() {
1540
1541
  })]
1541
1542
  })]
1542
1543
  }),
1543
- /* @__PURE__ */ S("div", {
1544
+ /* @__PURE__ */ x("div", {
1544
1545
  style: {
1545
1546
  display: "flex",
1546
1547
  justifyContent: "flex-end",
@@ -1549,27 +1550,27 @@ var F = c(function() {
1549
1550
  padding: "var(--space-cardPadding)",
1550
1551
  borderTop: "1px solid var(--color-border-subtle)"
1551
1552
  },
1552
- children: [/* @__PURE__ */ x("button", {
1553
+ children: [/* @__PURE__ */ b("button", {
1553
1554
  type: "button",
1554
- onClick: () => U(null),
1555
+ onClick: () => H(null),
1555
1556
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1556
1557
  style: T,
1557
1558
  children: c("bigconsole.insights.actions.cancel", "Cancel")
1558
- }), /* @__PURE__ */ S("button", {
1559
+ }), /* @__PURE__ */ x("button", {
1559
1560
  type: "button",
1560
- onClick: () => void dt(),
1561
- disabled: !W.trim() || z.has(H.id),
1561
+ onClick: () => void ft(),
1562
+ disabled: !U.trim() || R.has(V.id),
1562
1563
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1563
1564
  style: {
1564
1565
  ...E,
1565
- cursor: !W.trim() || z.has(H.id) ? "not-allowed" : "pointer",
1566
- opacity: W.trim() ? 1 : .6
1566
+ cursor: !U.trim() || R.has(V.id) ? "not-allowed" : "pointer",
1567
+ opacity: U.trim() ? 1 : .6
1567
1568
  },
1568
- children: [z.has(H.id) ? /* @__PURE__ */ x(m, {
1569
+ children: [R.has(V.id) ? /* @__PURE__ */ b(h, {
1569
1570
  size: 14,
1570
1571
  className: "animate-spin",
1571
1572
  "aria-hidden": "true"
1572
- }) : /* @__PURE__ */ x(g, {
1573
+ }) : /* @__PURE__ */ b(_, {
1573
1574
  size: 14,
1574
1575
  "aria-hidden": "true"
1575
1576
  }), c("bigconsole.insights.refine.apply", "Apply refinement")]