@burdenoff/microfe-bigconsole 2026.1119.5 → 2026.1119.7

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.
@@ -2,30 +2,31 @@ import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
3
  import t from "../hooks/useBigConsoleAnalytics.js";
4
4
  import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
5
- import { Section as r, SectionStack as ee } from "../components/common/Section.js";
6
- import { generationApproval as i } from "../utils/generationApproval.js";
7
- import { findParentGeneration as te, splitSupersededGenerations as a } from "../utils/generationRevisions.js";
8
- import { setActiveGenerationContext as o } from "../assistant/generationContext.js";
9
- import { isInsightsDraftDirty as ne } from "../utils/insightsDraft.js";
10
- import { reportBigConsoleQuotaError as s } from "../utils/quota.js";
11
- import { PromptAnalysisPreview as re } from "../components/insights/PromptAnalysisPreview.js";
12
- import { isNative as ie, nativeImpact as ae, nativeNotify as oe } from "../../utils/nativeBridge.js";
5
+ import { Section as r, SectionStack as i } from "../components/common/Section.js";
6
+ import { generationApproval as a } from "../utils/generationApproval.js";
7
+ import { findParentGeneration as ee, splitSupersededGenerations as o } from "../utils/generationRevisions.js";
8
+ import { setActiveGenerationContext as s } from "../assistant/generationContext.js";
9
+ import { isInsightsDraftDirty as te } from "../utils/insightsDraft.js";
10
+ import { reportBigConsoleQuotaError as c } from "../utils/quota.js";
11
+ import { PromptAnalysisPreview as ne } from "../components/insights/PromptAnalysisPreview.js";
12
+ import { isNative as re, nativeImpact as ie, nativeNotify as ae } from "../../utils/nativeBridge.js";
13
13
  import "../components/common/index.js";
14
- import { GeneratedFormattingReview as se, GenerationExecutionStatus as ce } from "../components/insights/GeneratedFormattingReview.js";
15
- import { BoardLintPanel as le } from "../components/insights/BoardLintPanel.js";
16
- import { DraftCheckDialog as ue } from "../components/insights/DraftCheckDialog.js";
17
- import { ConversationalEditPanel as de } from "../components/insights/ConversationalEditPanel.js";
14
+ import { GeneratedFormattingReview as oe, GenerationExecutionStatus as se } from "../components/insights/GeneratedFormattingReview.js";
15
+ import { BoardLintPanel as ce } from "../components/insights/BoardLintPanel.js";
16
+ import { DraftCheckDialog as le } from "../components/insights/DraftCheckDialog.js";
17
+ import { ConversationalEditPanel as ue } from "../components/insights/ConversationalEditPanel.js";
18
+ import { AskYourData as de } from "../components/ask/AskYourData.js";
18
19
  /* empty css */
19
- import { memo as c, useCallback as l, useEffect as fe, useMemo as pe, useRef as me, useState as u } from "react";
20
- import { AlertCircle as he, ArrowRight as d, Ban as ge, CheckCircle as f, Clock as p, Eye as _e, History as ve, Lightbulb as ye, Loader2 as m, MessageSquare as be, RefreshCw as xe, ShieldCheck as Se, Sparkles as h, Trash2 as Ce, Wand2 as g, X as we, XCircle as _ } from "lucide-react";
20
+ import { memo as l, useCallback as u, useEffect as d, useMemo as fe, useRef as pe, useState as f } from "react";
21
+ import { AlertCircle as me, ArrowRight as he, Ban as ge, CheckCircle as p, Clock as m, Eye as _e, History as ve, Lightbulb as ye, Loader2 as h, MessageSquare as be, RefreshCw as xe, ShieldCheck as Se, Sparkles as g, Trash2 as Ce, Wand2 as _, X as we, XCircle as v } from "lucide-react";
21
22
  import { AuroraBackground as Te, GlassCard as Ee, GradientText as De, IllustratedEmptyState as Oe, PagePurpose as ke } from "@burdenoff/fe-libs/ui";
22
23
  import { useUnsavedChanges as Ae } from "@burdenoff/fe-libs/shared/hooks";
23
24
  import { useI18n as je } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
24
- import { useMutation as v, useQuery as Me } from "@apollo/client/react";
25
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
26
- import { gql as x } from "@apollo/client";
25
+ import { useMutation as y, useQuery as Me } from "@apollo/client/react";
26
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
27
+ import { gql as S } from "@apollo/client";
27
28
  // src/bigconsole/pages/InsightsPage.tsx
28
- var Ne = x`
29
+ var Ne = S`
29
30
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
30
31
  listPromptGenerations(status: $status, first: $first) {
31
32
  edges {
@@ -70,7 +71,7 @@ var Ne = x`
70
71
  totalCount
71
72
  }
72
73
  }
73
- `, Pe = x`
74
+ `, Pe = S`
74
75
  query GetPromptSuggestions($category: String, $limit: Int) {
75
76
  getPromptSuggestions(category: $category, limit: $limit) {
76
77
  id
@@ -81,7 +82,7 @@ var Ne = x`
81
82
  tags
82
83
  }
83
84
  }
84
- `, Fe = x`
85
+ `, Fe = S`
85
86
  mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
86
87
  generateDashboardFromPrompt(input: $input) {
87
88
  id
@@ -89,24 +90,24 @@ var Ne = x`
89
90
  prompt
90
91
  }
91
92
  }
92
- `, Ie = x`
93
+ `, Ie = S`
93
94
  mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
94
95
  createDashboardFromGeneration(input: $input) {
95
96
  id
96
97
  }
97
98
  }
98
- `, Le = x`
99
+ `, Le = S`
99
100
  mutation DeletePromptGeneration($generationId: ID!) {
100
101
  deletePromptGeneration(generationId: $generationId)
101
102
  }
102
- `, Re = x`
103
+ `, Re = S`
103
104
  mutation CancelPromptGeneration($generationId: ID!) {
104
105
  cancelPromptGeneration(generationId: $generationId) {
105
106
  id
106
107
  status
107
108
  }
108
109
  }
109
- `, ze = x`
110
+ `, ze = S`
110
111
  mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
111
112
  regenerateDashboard(input: $input) {
112
113
  id
@@ -114,7 +115,7 @@ var Ne = x`
114
115
  prompt
115
116
  }
116
117
  }
117
- `, Be = x`
118
+ `, Be = S`
118
119
  mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
119
120
  refineGeneratedDashboard(input: $input) {
120
121
  id
@@ -191,7 +192,7 @@ function Je(e) {
191
192
  let t = e.refineGeneratedDashboard;
192
193
  return typeof t != "object" || !t || !("id" in t) ? null : typeof t.id == "string" ? t.id : null;
193
194
  }
194
- var S = {
195
+ var C = {
195
196
  display: "inline-flex",
196
197
  alignItems: "center",
197
198
  justifyContent: "center",
@@ -203,35 +204,35 @@ var S = {
203
204
  fontWeight: "var(--font-weight-medium)",
204
205
  lineHeight: 1.2,
205
206
  cursor: "pointer"
206
- }, C = {
207
- ...S,
207
+ }, w = {
208
+ ...C,
208
209
  border: "1px solid var(--color-border-default)",
209
210
  backgroundColor: "transparent",
210
211
  color: "var(--color-text-primary)"
211
- }, w = {
212
- ...S,
212
+ }, T = {
213
+ ...C,
213
214
  border: "1px solid transparent",
214
215
  backgroundColor: "var(--color-action-primary-bg)",
215
216
  color: "var(--color-action-primary-text)"
216
217
  }, Ye = {
217
- ...S,
218
+ ...C,
218
219
  border: "1px solid var(--color-status-warning-border)",
219
220
  backgroundColor: "transparent",
220
221
  color: "var(--color-status-warning-text)"
221
222
  }, Xe = {
222
- ...S,
223
+ ...C,
223
224
  minWidth: "var(--size-controlHeight-md)",
224
225
  padding: "0 var(--space-controlGap)",
225
226
  border: "1px solid var(--color-border-default)",
226
227
  backgroundColor: "transparent",
227
228
  color: "var(--color-status-error-text)"
228
- }, T = {
229
+ }, E = {
229
230
  display: "block",
230
231
  marginBottom: "2px",
231
232
  fontSize: "var(--font-size-body-sm)",
232
233
  fontWeight: "var(--font-weight-medium)",
233
234
  color: "var(--color-text-secondary)"
234
- }, E = {
235
+ }, D = {
235
236
  width: "100%",
236
237
  minHeight: "var(--size-controlHeight-md)",
237
238
  padding: "0 var(--space-controlGap)",
@@ -240,7 +241,7 @@ var S = {
240
241
  backgroundColor: "var(--color-bg-canvas)",
241
242
  color: "var(--color-text-primary)",
242
243
  fontSize: "var(--font-size-body-sm)"
243
- }, D = {
244
+ }, O = {
244
245
  display: "inline-flex",
245
246
  alignItems: "center",
246
247
  gap: "var(--space-iconGap)",
@@ -252,7 +253,7 @@ var S = {
252
253
  backgroundColor: "var(--color-bg-sunken)",
253
254
  color: "var(--color-text-secondary)"
254
255
  };
255
- function O(e) {
256
+ function k(e) {
256
257
  switch (e) {
257
258
  case "COMPLETED": return "success";
258
259
  case "FAILED": return "danger";
@@ -262,7 +263,7 @@ function O(e) {
262
263
  default: return "neutral";
263
264
  }
264
265
  }
265
- var k = {
266
+ var A = {
266
267
  success: {
267
268
  text: "var(--color-status-success-text)",
268
269
  bg: "var(--color-status-success-bgSubtle)",
@@ -285,35 +286,35 @@ var k = {
285
286
  }
286
287
  };
287
288
  function Ze(e) {
288
- let t = k[O(e)].text;
289
+ let t = A[k(e)].text;
289
290
  switch (e) {
290
- case "COMPLETED": return /* @__PURE__ */ y(f, {
291
+ case "COMPLETED": return /* @__PURE__ */ b(p, {
291
292
  size: 14,
292
293
  style: { color: t },
293
294
  "aria-hidden": "true"
294
295
  });
295
296
  case "FAILED":
296
- case "CANCELLED": return /* @__PURE__ */ y(_, {
297
+ case "CANCELLED": return /* @__PURE__ */ b(v, {
297
298
  size: 14,
298
299
  style: { color: t },
299
300
  "aria-hidden": "true"
300
301
  });
301
302
  case "PENDING":
302
303
  case "PROCESSING":
303
- case "GENERATING": return /* @__PURE__ */ y(m, {
304
+ case "GENERATING": return /* @__PURE__ */ b(h, {
304
305
  size: 14,
305
306
  className: "animate-spin",
306
307
  style: { color: t },
307
308
  "aria-hidden": "true"
308
309
  });
309
- default: return /* @__PURE__ */ y(p, {
310
+ default: return /* @__PURE__ */ b(m, {
310
311
  size: 14,
311
312
  style: { color: t },
312
313
  "aria-hidden": "true"
313
314
  });
314
315
  }
315
316
  }
316
- function A(e, t) {
317
+ function j(e, t) {
317
318
  switch (e) {
318
319
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
319
320
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -325,28 +326,28 @@ function A(e, t) {
325
326
  }
326
327
  }
327
328
  var Qe = ({ status: e }) => {
328
- let { t } = je(), n = k[O(e)];
329
- return /* @__PURE__ */ b("span", {
329
+ let { t } = je(), n = A[k(e)];
330
+ return /* @__PURE__ */ x("span", {
330
331
  "data-status": e,
331
332
  style: {
332
- ...D,
333
+ ...O,
333
334
  border: `1px solid ${n.border}`,
334
335
  backgroundColor: n.bg,
335
336
  color: n.text
336
337
  },
337
- children: [Ze(e), A(e, t)]
338
+ children: [Ze(e), j(e, t)]
338
339
  });
339
340
  };
340
341
  function $e(e) {
341
- let t = k[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
342
+ let t = A[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
342
343
  return {
343
- ...D,
344
+ ...O,
344
345
  border: `1px solid ${t.border}`,
345
346
  backgroundColor: t.bg,
346
347
  color: t.text
347
348
  };
348
349
  }
349
- function j(e) {
350
+ function M(e) {
350
351
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
351
352
  }
352
353
  function et(e) {
@@ -371,9 +372,9 @@ function rt(e, t) {
371
372
  };
372
373
  }
373
374
  function it(e) {
374
- let t = k[tt[e]];
375
+ let t = A[tt[e]];
375
376
  return {
376
- ...D,
377
+ ...O,
377
378
  padding: "0 var(--space-controlGap)",
378
379
  fontSize: "var(--font-size-xs)",
379
380
  fontWeight: "var(--font-weight-semibold)",
@@ -383,8 +384,8 @@ function it(e) {
383
384
  color: t.text
384
385
  };
385
386
  }
386
- var M = c(function() {
387
- let { t: c } = je(), f = e(), p = t(), [_, x] = u(""), [S, O] = u("MODERN"), [k, Ze] = u("GRID"), [A, tt] = u(He), [M, at] = u(Ue), [N, ot] = u(!1), [st, P] = u(null), [F, ct] = u(() => /* @__PURE__ */ new Set()), [I, L] = u(null), [lt, ut] = u(null), [R, dt] = u(null), [ft, pt] = u({}), mt = l((e, t) => {
387
+ var N = l(function() {
388
+ let { t: l } = je(), p = e(), m = t(), [v, S] = f(""), [C, k] = f("MODERN"), [A, Ze] = f("GRID"), [j, tt] = f(He), [N, at] = f(Ue), [P, ot] = f(!1), [st, F] = f(null), [I, ct] = f(() => /* @__PURE__ */ new Set()), [L, R] = f(null), [lt, ut] = f(null), [z, dt] = f(null), [ft, pt] = f({}), mt = u((e, t) => {
388
389
  pt((n) => {
389
390
  if (t) return {
390
391
  ...n,
@@ -393,207 +394,207 @@ var M = c(function() {
393
394
  let r = { ...n };
394
395
  return delete r[e], r;
395
396
  });
396
- }, []), [z, B] = u(null), [V, H] = u(""), [U, ht] = u(!1), [W, G] = u(null), [gt, _t] = u({
397
+ }, []), [B, V] = f(null), [H, U] = f(""), [ht, gt] = f(!1), [W, _t] = f(null), [vt, yt] = f({
397
398
  text: "",
398
399
  busy: !1
399
400
  });
400
401
  Ae({
401
402
  id: "insights-prompt",
402
- label: c("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
403
- dirty: ne({
404
- promptText: _,
405
- isGenerating: N,
406
- refineOpen: z !== null,
407
- refineText: V,
408
- refineBusy: z !== null && F.has(z.id),
403
+ label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
404
+ dirty: te({
405
+ promptText: v,
406
+ isGenerating: P,
407
+ refineOpen: B !== null,
408
+ refineText: H,
409
+ refineBusy: B !== null && I.has(B.id),
409
410
  chatOpen: W !== null,
410
- chatText: gt.text,
411
- chatBusy: gt.busy
411
+ chatText: vt.text,
412
+ chatBusy: vt.busy
412
413
  })
413
- }), fe(() => (o(z?.id ?? W?.id ?? I?.id ?? null), () => o(null)), [
414
- z,
414
+ }), d(() => (s(B?.id ?? W?.id ?? L?.id ?? null), () => s(null)), [
415
+ B,
415
416
  W,
416
- I
417
+ L
417
418
  ]);
418
- let K = l((e) => {
419
+ let G = u((e) => {
419
420
  ct((t) => new Set(t).add(e));
420
- }, []), q = l((e) => {
421
+ }, []), K = u((e) => {
421
422
  ct((t) => {
422
423
  let n = new Set(t);
423
424
  return n.delete(e), n;
424
425
  });
425
- }, []), { data: vt, loading: yt, error: bt, refetch: J, startPolling: xt, stopPolling: St } = Me(Ne, {
426
+ }, []), { data: bt, loading: xt, error: St, refetch: q, startPolling: Ct, stopPolling: wt } = Me(Ne, {
426
427
  variables: { first: 20 },
427
428
  fetchPolicy: "cache-and-network"
428
- }), Ct = vt?.listPromptGenerations?.edges?.some((e) => Ve.includes(e.node.status)) ?? !1, { data: wt, error: Tt, refetch: Et } = Me(Pe, { variables: { limit: 6 } }), [Dt] = v(Fe), [Ot] = v(Ie), [Y] = v(Le), [kt] = v(Re), [At] = v(ze), [X] = v(Be), Z = vt?.listPromptGenerations?.edges?.map((e) => e.node) || [], jt = wt?.getPromptSuggestions || [], { current: Mt, superseded: Nt } = a(Z), Q = U ? Z : Mt;
429
- fe(() => (Ct || N ? xt(2e3) : St(), () => St()), [
429
+ }), Tt = bt?.listPromptGenerations?.edges?.some((e) => Ve.includes(e.node.status)) ?? !1, { data: Et, error: Dt, refetch: Ot } = Me(Pe, { variables: { limit: 6 } }), [kt] = y(Fe), [At] = y(Ie), [J] = y(Le), [jt] = y(Re), [Mt] = y(ze), [Y] = y(Be), X = bt?.listPromptGenerations?.edges?.map((e) => e.node) || [], Nt = Et?.getPromptSuggestions || [], { current: Pt, superseded: Ft } = o(X), Z = ht ? X : Pt;
430
+ d(() => (Tt || P ? Ct(2e3) : wt(), () => wt()), [
431
+ Tt,
432
+ P,
430
433
  Ct,
431
- N,
432
- xt,
433
- St
434
- ]), fe(() => {
435
- if (!I && !z && !W) return;
434
+ wt
435
+ ]), d(() => {
436
+ if (!L && !B && !W) return;
436
437
  let e = (e) => {
437
- e.key === "Escape" && (L(null), B(null), G(null));
438
+ e.key === "Escape" && (R(null), V(null), _t(null));
438
439
  };
439
440
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
440
441
  }, [
441
- I,
442
- z,
442
+ L,
443
+ B,
443
444
  W
444
445
  ]);
445
- let Pt = l(async () => {
446
- if (_.trim() && !N) {
447
- if (_.length > 2e3) P(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
446
+ let It = u(async () => {
447
+ if (v.trim() && !P) {
448
+ if (v.length > 2e3) F(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
448
449
  else {
449
- P(null), ot(!0);
450
+ F(null), ot(!0);
450
451
  try {
451
- p("bigconsole.ai.generate_clicked", { maxWidgets: M });
452
- let e = await Dt({ variables: { input: {
453
- prompt: _.trim(),
454
- styleType: S,
455
- layoutType: k,
456
- gridColumns: A,
457
- maxWidgets: M
452
+ m("bigconsole.ai.generate_clicked", { maxWidgets: N });
453
+ let e = await kt({ variables: { input: {
454
+ prompt: v.trim(),
455
+ styleType: C,
456
+ layoutType: A,
457
+ gridColumns: j,
458
+ maxWidgets: N
458
459
  } } });
459
- if (s(e, "command")) return;
460
+ if (c(e, "command")) return;
460
461
  let t = e.data?.generateDashboardFromPrompt?.id;
461
- t && p("bigconsole.ai.dashboard_generated", {
462
+ t && m("bigconsole.ai.dashboard_generated", {
462
463
  generationId: t,
463
- maxWidgets: M
464
- }), x(""), J();
464
+ maxWidgets: N
465
+ }), S(""), q();
465
466
  } catch (e) {
466
- if (s(e, "command")) return;
467
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
467
+ if (c(e, "command")) return;
468
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
468
469
  } finally {
469
470
  ot(!1);
470
471
  }
471
472
  }
472
473
  }
473
474
  }, [
474
- p,
475
- _,
476
- N,
477
- Dt,
478
- J,
479
- S,
480
- k,
475
+ m,
476
+ v,
477
+ P,
478
+ kt,
479
+ q,
480
+ C,
481
481
  A,
482
- M,
483
- c
484
- ]), Ft = l(async (e) => {
485
- P(null);
486
- let t = i(e);
482
+ j,
483
+ N,
484
+ l
485
+ ]), Lt = u(async (e) => {
486
+ F(null);
487
+ let t = a(e);
487
488
  if (t.kind === "view") {
488
- f(`/dashboards/${t.dashboardId}`);
489
+ p(`/dashboards/${t.dashboardId}`);
489
490
  return;
490
491
  }
491
492
  if (t.kind === "hold") {
492
- P(c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
493
+ F(l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
493
494
  return;
494
495
  }
495
496
  let n = e.id;
496
497
  try {
497
- p("bigconsole.ai.create_dashboard_clicked", { generationId: n });
498
- let e = await Ot({ variables: { input: t.input } });
499
- if (s(e, "project")) return;
498
+ m("bigconsole.ai.create_dashboard_clicked", { generationId: n });
499
+ let e = await At({ variables: { input: t.input } });
500
+ if (c(e, "project")) return;
500
501
  let r = e.data?.createDashboardFromGeneration?.id;
501
- r && (p("bigconsole.ai.dashboard_created", {
502
+ r && (m("bigconsole.ai.dashboard_created", {
502
503
  generationId: n,
503
504
  dashboardId: r
504
- }), f(`/dashboards/${r}`));
505
+ }), p(`/dashboards/${r}`));
505
506
  } catch (e) {
506
- if (s(e, "project")) return;
507
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
507
+ if (c(e, "project")) return;
508
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
508
509
  }
509
510
  }, [
510
- Ot,
511
+ At,
512
+ m,
511
513
  p,
512
- f,
513
- c
514
- ]), It = l(async (e) => {
515
- P(null);
514
+ l
515
+ ]), Rt = u(async (e) => {
516
+ F(null);
516
517
  try {
517
- await Y({ variables: { generationId: e } }), ie() && oe("success"), J();
518
+ await J({ variables: { generationId: e } }), re() && ae("success"), q();
518
519
  } catch (e) {
519
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ie() && oe("error");
520
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), re() && ae("error");
520
521
  }
521
522
  }, [
522
- Y,
523
523
  J,
524
- c
525
- ]), Lt = l(async (e) => {
526
- P(null), K(e);
524
+ q,
525
+ l
526
+ ]), zt = u(async (e) => {
527
+ F(null), G(e);
527
528
  try {
528
- await kt({ variables: { generationId: e } }), J();
529
+ await jt({ variables: { generationId: e } }), q();
529
530
  } catch (e) {
530
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
531
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
531
532
  } finally {
532
- q(e);
533
+ K(e);
533
534
  }
534
535
  }, [
535
- kt,
536
- J,
537
- c
538
- ]), Rt = l(async (e) => {
539
- P(null), K(e);
536
+ jt,
537
+ q,
538
+ l
539
+ ]), Bt = u(async (e) => {
540
+ F(null), G(e);
540
541
  try {
541
- let t = await At({ variables: { input: { generationId: e } } });
542
- if (s(t, "command")) return;
543
- J();
542
+ let t = await Mt({ variables: { input: { generationId: e } } });
543
+ if (c(t, "command")) return;
544
+ q();
544
545
  } catch (e) {
545
- if (s(e, "command")) return;
546
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
546
+ if (c(e, "command")) return;
547
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
547
548
  } finally {
548
- q(e);
549
+ K(e);
549
550
  }
550
551
  }, [
551
- At,
552
- J,
553
- c
554
- ]), zt = l(async () => {
555
- if (!z || !V.trim()) return;
556
- let e = z.id;
557
- P(null), K(e);
552
+ Mt,
553
+ q,
554
+ l
555
+ ]), Vt = u(async () => {
556
+ if (!B || !H.trim()) return;
557
+ let e = B.id;
558
+ F(null), G(e);
558
559
  let t = !1;
559
560
  try {
560
- let n = await X({ variables: { input: {
561
+ let n = await Y({ variables: { input: {
561
562
  generationId: e,
562
- refinementPrompt: V.trim()
563
+ refinementPrompt: H.trim()
563
564
  } } });
564
- if (s(n, "command")) {
565
+ if (c(n, "command")) {
565
566
  t = !0;
566
567
  return;
567
568
  }
568
- t = !0, J();
569
+ t = !0, q();
569
570
  } catch (e) {
570
- if (s(e, "command")) {
571
+ if (c(e, "command")) {
571
572
  t = !0;
572
573
  return;
573
574
  }
574
- P(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
575
+ F(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
575
576
  } finally {
576
- t && (B(null), H("")), q(e);
577
+ t && (V(null), U("")), K(e);
577
578
  }
578
579
  }, [
579
- z,
580
- V,
581
- X,
582
- J,
583
- c
584
- ]), Bt = l((e) => {
585
- x(e);
586
- }, []), Vt = l((e) => {
580
+ B,
581
+ H,
582
+ Y,
583
+ q,
584
+ l
585
+ ]), Ht = u((e) => {
586
+ S(e);
587
+ }, []), Ut = u((e) => {
587
588
  let t = e.generatedSpec;
588
589
  t && (ut({
589
590
  name: t.name,
590
591
  pages: t.pages
591
592
  }), dt(e.id));
592
- }, []), Ht = me(/* @__PURE__ */ new Set()), Ut = l(async (e, t) => {
593
- if (Ht.current.has(e)) throw Error("A fix is already being applied to this draft. Please wait a moment.");
594
- Ht.current.add(e), P(null), K(e);
593
+ }, []), Q = pe(/* @__PURE__ */ new Set()), Wt = u(async (e, t) => {
594
+ if (Q.current.has(e)) throw Error("A fix is already being applied to this draft. Please wait a moment.");
595
+ Q.current.add(e), F(null), G(e);
595
596
  try {
596
- let n = await X({ variables: { input: {
597
+ let n = await Y({ variables: { input: {
597
598
  generationId: e,
598
599
  refinementPrompt: `Board Lint fix: ${t.summary}`,
599
600
  widgetRefinements: [{
@@ -602,34 +603,34 @@ var M = c(function() {
602
603
  ...t.configOverrides ? { configOverrides: t.configOverrides } : {}
603
604
  }]
604
605
  } } });
605
- return s(n, "command") ? null : (J(), Je(n.data));
606
+ return c(n, "command") ? null : (q(), Je(n.data));
606
607
  } catch (e) {
607
- if (s(e, "command")) return null;
608
+ if (c(e, "command")) return null;
608
609
  throw e;
609
610
  } finally {
610
- Ht.current.delete(e), q(e);
611
+ Q.current.delete(e), K(e);
611
612
  }
612
613
  }, [
613
- X,
614
- J,
615
- K,
616
- q
617
- ]), Wt = l(async (e) => {
618
- await Y({ variables: { generationId: e } }), J();
619
- }, [Y, J]), Gt = pe(() => I?.generatedSpec ? {
620
- name: I.generatedSpec.name,
621
- pages: I.generatedSpec.pages
622
- } : null, [I?.generatedSpec]), $ = I?.generatedSpec;
623
- return /* @__PURE__ */ b("div", {
614
+ Y,
615
+ q,
616
+ G,
617
+ K
618
+ ]), Gt = u(async (e) => {
619
+ await J({ variables: { generationId: e } }), q();
620
+ }, [J, q]), Kt = fe(() => L?.generatedSpec ? {
621
+ name: L.generatedSpec.name,
622
+ pages: L.generatedSpec.pages
623
+ } : null, [L?.generatedSpec]), $ = L?.generatedSpec;
624
+ return /* @__PURE__ */ x("div", {
624
625
  "data-tour": "bigconsole-ai-insights",
625
626
  className: "min-w-0",
626
627
  style: { backgroundColor: "var(--color-bg-canvas)" },
627
628
  children: [
628
- /* @__PURE__ */ b("header", {
629
+ /* @__PURE__ */ x("header", {
629
630
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
630
- children: [/* @__PURE__ */ y(Te, { intensity: "subtle" }), /* @__PURE__ */ y("div", {
631
+ children: [/* @__PURE__ */ b(Te, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
631
632
  style: { padding: "var(--space-pagePadding)" },
632
- children: /* @__PURE__ */ b("div", {
633
+ children: /* @__PURE__ */ x("div", {
633
634
  style: {
634
635
  display: "flex",
635
636
  alignItems: "center",
@@ -637,7 +638,7 @@ var M = c(function() {
637
638
  flexWrap: "wrap",
638
639
  minWidth: 0
639
640
  },
640
- children: [/* @__PURE__ */ y("div", {
641
+ children: [/* @__PURE__ */ b("div", {
641
642
  style: {
642
643
  display: "flex",
643
644
  height: "var(--size-controlHeight-lg)",
@@ -648,90 +649,91 @@ var M = c(function() {
648
649
  borderRadius: "var(--radius-card)",
649
650
  backgroundColor: "var(--color-action-primary-bg)"
650
651
  },
651
- children: /* @__PURE__ */ y(h, { style: {
652
+ children: /* @__PURE__ */ b(g, { style: {
652
653
  height: "var(--size-icon-lg)",
653
654
  width: "var(--size-icon-lg)",
654
655
  color: "var(--color-action-primary-text)"
655
656
  } })
656
- }), /* @__PURE__ */ b("div", {
657
+ }), /* @__PURE__ */ x("div", {
657
658
  style: { minWidth: 0 },
658
- children: [/* @__PURE__ */ y("h1", {
659
+ children: [/* @__PURE__ */ b("h1", {
659
660
  className: "m-0 text-2xl font-bold text-text-primary",
660
- children: /* @__PURE__ */ y(De, { children: c("bigconsole.insights.header.title", "AI Insights") })
661
- }), /* @__PURE__ */ y("p", {
661
+ children: /* @__PURE__ */ b(De, { children: l("bigconsole.insights.header.title", "AI Insights") })
662
+ }), /* @__PURE__ */ b("p", {
662
663
  className: "m-0 text-sm text-text-secondary",
663
- children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
664
+ children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
664
665
  })]
665
666
  })]
666
667
  })
667
668
  })]
668
669
  }),
669
- /* @__PURE__ */ b("div", {
670
+ /* @__PURE__ */ x("div", {
670
671
  style: { padding: "var(--space-pagePadding)" },
671
- children: [/* @__PURE__ */ y(ke, {
672
+ children: [/* @__PURE__ */ b(ke, {
672
673
  className: "mb-[var(--space-sectionGap)]",
673
674
  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."
674
- }), /* @__PURE__ */ b(ee, { children: [
675
- st && /* @__PURE__ */ y(r, {
675
+ }), /* @__PURE__ */ x(i, { children: [
676
+ /* @__PURE__ */ b(de, {}),
677
+ st && /* @__PURE__ */ b(r, {
676
678
  headingLevel: 2,
677
679
  tone: "danger",
678
680
  padding: "compact",
679
681
  title: "That request did not go through",
680
682
  description: st,
681
- icon: /* @__PURE__ */ y(he, { className: "h-icon-sm w-icon-sm" }),
683
+ icon: /* @__PURE__ */ b(me, { className: "h-icon-sm w-icon-sm" }),
682
684
  "data-testid": "insights-error",
683
- actions: /* @__PURE__ */ y("button", {
685
+ actions: /* @__PURE__ */ b("button", {
684
686
  type: "button",
685
- onClick: () => P(null),
686
- "aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
687
+ onClick: () => F(null),
688
+ "aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
687
689
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
688
- style: C,
690
+ style: w,
689
691
  children: "Dismiss"
690
692
  })
691
693
  }),
692
- (bt || Tt) && /* @__PURE__ */ y("div", {
694
+ (St || Dt) && /* @__PURE__ */ b("div", {
693
695
  role: "alert",
694
- children: /* @__PURE__ */ y(r, {
696
+ children: /* @__PURE__ */ b(r, {
695
697
  tone: "danger",
696
698
  padding: "compact",
697
699
  headingLevel: 2,
698
- title: c("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
699
- description: c("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
700
+ title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
701
+ description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
700
702
  "data-testid": "insights-load-error",
701
- actions: /* @__PURE__ */ b("button", {
703
+ actions: /* @__PURE__ */ x("button", {
702
704
  type: "button",
703
705
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
704
- style: C,
706
+ style: w,
705
707
  onClick: () => {
706
- bt && J().catch(() => void 0), Tt && Et().catch(() => void 0);
708
+ St && q().catch(() => void 0), Dt && Ot().catch(() => void 0);
707
709
  },
708
710
  children: [
709
- /* @__PURE__ */ y(xe, {
711
+ /* @__PURE__ */ b(xe, {
710
712
  size: 14,
711
713
  "aria-hidden": "true"
712
714
  }),
713
715
  " ",
714
- c("bigconsole.insights.error.retry", "Retry")
716
+ l("bigconsole.insights.error.retry", "Retry")
715
717
  ]
716
718
  })
717
719
  })
718
720
  }),
719
- /* @__PURE__ */ y(r, {
721
+ /* @__PURE__ */ b(r, {
720
722
  id: "insights-prompt",
721
723
  emphasis: "primary",
722
724
  headingLevel: 2,
723
725
  title: "Describe your dashboard",
724
726
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
725
- icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" }),
727
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" }),
726
728
  "data-testid": "insights-prompt",
727
- children: /* @__PURE__ */ b("div", {
729
+ children: /* @__PURE__ */ x("div", {
728
730
  style: {
729
731
  display: "flex",
730
732
  flexDirection: "column",
731
733
  gap: "var(--space-controlGap)"
732
734
  },
733
735
  children: [
734
- /* @__PURE__ */ y("label", {
736
+ /* @__PURE__ */ b("label", {
735
737
  htmlFor: "prompt-input",
736
738
  style: {
737
739
  display: "block",
@@ -739,13 +741,13 @@ var M = c(function() {
739
741
  fontWeight: "var(--font-weight-medium)",
740
742
  color: "var(--color-text-primary)"
741
743
  },
742
- children: c("bigconsole.insights.prompt.label", "Your prompt")
744
+ children: l("bigconsole.insights.prompt.label", "Your prompt")
743
745
  }),
744
- /* @__PURE__ */ y("textarea", {
746
+ /* @__PURE__ */ b("textarea", {
745
747
  id: "prompt-input",
746
- value: _,
747
- onChange: (e) => x(e.target.value),
748
- placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
748
+ value: v,
749
+ onChange: (e) => S(e.target.value),
750
+ placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
749
751
  rows: 3,
750
752
  maxLength: 2e3,
751
753
  className: n,
@@ -761,12 +763,12 @@ var M = c(function() {
761
763
  resize: "vertical"
762
764
  },
763
765
  onKeyDown: (e) => {
764
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Pt());
766
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), It());
765
767
  }
766
768
  }),
767
- /* @__PURE__ */ b("div", {
769
+ /* @__PURE__ */ x("div", {
768
770
  role: "group",
769
- "aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
771
+ "aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
770
772
  "data-testid": "insights-generation-options",
771
773
  style: {
772
774
  display: "grid",
@@ -774,73 +776,73 @@ var M = c(function() {
774
776
  gap: "var(--space-controlGap)"
775
777
  },
776
778
  children: [
777
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
779
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
778
780
  htmlFor: "prompt-style",
779
- style: T,
780
- children: c("bigconsole.insights.prompt.style", "Style")
781
- }), /* @__PURE__ */ y("select", {
781
+ style: E,
782
+ children: l("bigconsole.insights.prompt.style", "Style")
783
+ }), /* @__PURE__ */ b("select", {
782
784
  id: "prompt-style",
783
- value: S,
784
- onChange: (e) => O(e.target.value),
785
+ value: C,
786
+ onChange: (e) => k(e.target.value),
785
787
  className: n,
786
- style: E,
787
- children: We.map((e) => /* @__PURE__ */ y("option", {
788
+ style: D,
789
+ children: We.map((e) => /* @__PURE__ */ b("option", {
788
790
  value: e.value,
789
791
  children: e.label
790
792
  }, e.value))
791
793
  })] }),
792
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
794
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
793
795
  htmlFor: "prompt-layout",
794
- style: T,
795
- children: c("bigconsole.insights.prompt.layout", "Layout")
796
- }), /* @__PURE__ */ y("select", {
796
+ style: E,
797
+ children: l("bigconsole.insights.prompt.layout", "Layout")
798
+ }), /* @__PURE__ */ b("select", {
797
799
  id: "prompt-layout",
798
- value: k,
800
+ value: A,
799
801
  onChange: (e) => Ze(e.target.value),
800
802
  className: n,
801
- style: E,
802
- children: Ge.map((e) => /* @__PURE__ */ y("option", {
803
+ style: D,
804
+ children: Ge.map((e) => /* @__PURE__ */ b("option", {
803
805
  value: e.value,
804
806
  children: e.label
805
807
  }, e.value))
806
808
  })] }),
807
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
809
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
808
810
  htmlFor: "prompt-columns",
809
- style: T,
810
- children: c("bigconsole.insights.prompt.columns", "Columns")
811
- }), /* @__PURE__ */ y("select", {
811
+ style: E,
812
+ children: l("bigconsole.insights.prompt.columns", "Columns")
813
+ }), /* @__PURE__ */ b("select", {
812
814
  id: "prompt-columns",
813
- value: A,
815
+ value: j,
814
816
  onChange: (e) => tt(Number(e.target.value)),
815
817
  className: n,
816
- style: E,
817
- children: Ke.map((e) => /* @__PURE__ */ y("option", {
818
+ style: D,
819
+ children: Ke.map((e) => /* @__PURE__ */ b("option", {
818
820
  value: e,
819
821
  children: e
820
822
  }, e))
821
823
  })] }),
822
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
824
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
823
825
  htmlFor: "prompt-max-widgets",
824
- style: T,
825
- children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
826
- }), /* @__PURE__ */ y("select", {
826
+ style: E,
827
+ children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
828
+ }), /* @__PURE__ */ b("select", {
827
829
  id: "prompt-max-widgets",
828
- value: M,
830
+ value: N,
829
831
  onChange: (e) => at(Number(e.target.value)),
830
832
  className: n,
831
- style: E,
832
- children: qe.map((e) => /* @__PURE__ */ y("option", {
833
+ style: D,
834
+ children: qe.map((e) => /* @__PURE__ */ b("option", {
833
835
  value: e,
834
836
  children: e
835
837
  }, e))
836
838
  })] })
837
839
  ]
838
840
  }),
839
- /* @__PURE__ */ y(re, {
840
- prompt: _,
841
- disabled: N
841
+ /* @__PURE__ */ b(ne, {
842
+ prompt: v,
843
+ disabled: P
842
844
  }),
843
- /* @__PURE__ */ b("div", {
845
+ /* @__PURE__ */ x("div", {
844
846
  style: {
845
847
  display: "flex",
846
848
  alignItems: "center",
@@ -849,7 +851,7 @@ var M = c(function() {
849
851
  borderTop: "1px solid var(--color-border-subtle)",
850
852
  paddingTop: "var(--space-controlGap)"
851
853
  },
852
- children: [/* @__PURE__ */ b("span", {
854
+ children: [/* @__PURE__ */ x("span", {
853
855
  style: {
854
856
  flex: "1 1 12rem",
855
857
  minWidth: 0,
@@ -857,51 +859,51 @@ var M = c(function() {
857
859
  color: "var(--color-text-muted)"
858
860
  },
859
861
  children: [
860
- c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
862
+ l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
861
863
  " · ",
862
- _.length,
864
+ v.length,
863
865
  "/2000"
864
866
  ]
865
- }), /* @__PURE__ */ b("button", {
867
+ }), /* @__PURE__ */ x("button", {
866
868
  type: "button",
867
- onClick: Pt,
868
- disabled: !_.trim() || N,
869
+ onClick: It,
870
+ disabled: !v.trim() || P,
869
871
  className: n,
870
872
  style: {
871
- ...w,
873
+ ...T,
872
874
  marginLeft: "auto",
873
- cursor: !_.trim() || N ? "not-allowed" : "pointer",
874
- opacity: !_.trim() || N ? .5 : 1
875
+ cursor: !v.trim() || P ? "not-allowed" : "pointer",
876
+ opacity: !v.trim() || P ? .5 : 1
875
877
  },
876
- children: [N ? /* @__PURE__ */ y(m, {
878
+ children: [P ? /* @__PURE__ */ b(h, {
877
879
  size: 16,
878
880
  className: "animate-spin",
879
881
  "aria-hidden": "true"
880
- }) : /* @__PURE__ */ y(h, {
882
+ }) : /* @__PURE__ */ b(g, {
881
883
  size: 16,
882
884
  "aria-hidden": "true"
883
- }), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
885
+ }), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
884
886
  })]
885
887
  })
886
888
  ]
887
889
  })
888
890
  }),
889
- jt.length > 0 && /* @__PURE__ */ y(r, {
891
+ Nt.length > 0 && /* @__PURE__ */ b(r, {
890
892
  emphasis: "muted",
891
893
  headingLevel: 2,
892
- title: c("bigconsole.insights.suggestions.heading", "Starting points"),
894
+ title: l("bigconsole.insights.suggestions.heading", "Starting points"),
893
895
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
894
- icon: /* @__PURE__ */ y(ye, { className: "h-icon-sm w-icon-sm" }),
896
+ icon: /* @__PURE__ */ b(ye, { className: "h-icon-sm w-icon-sm" }),
895
897
  "data-testid": "insights-suggestions",
896
- children: /* @__PURE__ */ y("div", {
898
+ children: /* @__PURE__ */ b("div", {
897
899
  style: {
898
900
  display: "grid",
899
901
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
900
902
  gap: "var(--space-controlGap)"
901
903
  },
902
- children: jt.map((e) => /* @__PURE__ */ b("button", {
904
+ children: Nt.map((e) => /* @__PURE__ */ x("button", {
903
905
  type: "button",
904
- onClick: () => Bt(e.prompt),
906
+ onClick: () => Ht(e.prompt),
905
907
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
906
908
  style: {
907
909
  textAlign: "left",
@@ -914,7 +916,7 @@ var M = c(function() {
914
916
  cursor: "pointer"
915
917
  },
916
918
  children: [
917
- /* @__PURE__ */ y("span", {
919
+ /* @__PURE__ */ b("span", {
918
920
  style: {
919
921
  display: "block",
920
922
  fontWeight: "var(--font-weight-medium)",
@@ -924,7 +926,7 @@ var M = c(function() {
924
926
  },
925
927
  children: e.title
926
928
  }),
927
- /* @__PURE__ */ y("span", {
929
+ /* @__PURE__ */ b("span", {
928
930
  style: {
929
931
  display: "block",
930
932
  fontSize: "var(--font-size-body-sm)",
@@ -933,15 +935,15 @@ var M = c(function() {
933
935
  },
934
936
  children: e.exampleDescription || e.prompt
935
937
  }),
936
- e.tags.length > 0 && /* @__PURE__ */ y("span", {
938
+ e.tags.length > 0 && /* @__PURE__ */ b("span", {
937
939
  style: {
938
940
  display: "flex",
939
941
  gap: "var(--space-iconGap)",
940
942
  marginTop: "var(--space-controlGap)",
941
943
  flexWrap: "wrap"
942
944
  },
943
- children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ y("span", {
944
- style: D,
945
+ children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
946
+ style: O,
945
947
  children: e
946
948
  }, e))
947
949
  })
@@ -949,29 +951,29 @@ var M = c(function() {
949
951
  }, e.id))
950
952
  })
951
953
  }),
952
- /* @__PURE__ */ y(r, {
954
+ /* @__PURE__ */ b(r, {
953
955
  emphasis: "bare",
954
956
  padding: "none",
955
957
  headingLevel: 2,
956
- title: c("bigconsole.insights.generations.heading", "Recent generations"),
958
+ title: l("bigconsole.insights.generations.heading", "Recent generations"),
957
959
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
958
- icon: /* @__PURE__ */ y(ve, { className: "h-icon-sm w-icon-sm" }),
959
- meta: Q.length > 0 ? /* @__PURE__ */ b("span", {
960
- style: D,
960
+ icon: /* @__PURE__ */ b(ve, { className: "h-icon-sm w-icon-sm" }),
961
+ meta: Z.length > 0 ? /* @__PURE__ */ x("span", {
962
+ style: O,
961
963
  children: [
962
- Q.length,
964
+ Z.length,
963
965
  " generation",
964
- Q.length === 1 ? "" : "s"
966
+ Z.length === 1 ? "" : "s"
965
967
  ]
966
968
  }) : void 0,
967
969
  "data-testid": "insights-generations",
968
- children: yt && Z.length === 0 ? /* @__PURE__ */ y(r, {
970
+ children: xt && X.length === 0 ? /* @__PURE__ */ b(r, {
969
971
  emphasis: "muted",
970
972
  headingLevel: 3,
971
973
  "aria-label": "Loading generations",
972
974
  className: "min-h-[10rem]",
973
975
  "data-testid": "insights-generations-loading",
974
- children: /* @__PURE__ */ b("div", {
976
+ children: /* @__PURE__ */ x("div", {
975
977
  style: {
976
978
  display: "flex",
977
979
  minHeight: "8rem",
@@ -981,91 +983,91 @@ var M = c(function() {
981
983
  gap: "var(--space-controlGap)",
982
984
  color: "var(--color-text-muted)"
983
985
  },
984
- children: [/* @__PURE__ */ y(m, {
986
+ children: [/* @__PURE__ */ b(h, {
985
987
  size: 24,
986
988
  className: "animate-spin",
987
989
  "aria-hidden": "true"
988
- }), /* @__PURE__ */ y("p", {
990
+ }), /* @__PURE__ */ b("p", {
989
991
  style: { fontSize: "var(--font-size-body-sm)" },
990
- children: c("bigconsole.insights.generations.loading", "Loading generations…")
992
+ children: l("bigconsole.insights.generations.loading", "Loading generations…")
991
993
  })]
992
994
  })
993
- }) : Z.length === 0 && !N && !bt ? /* @__PURE__ */ y(Ee, {
995
+ }) : X.length === 0 && !P && !St ? /* @__PURE__ */ b(Ee, {
994
996
  treatment: "insight",
995
997
  className: "border-[var(--color-border-seam)]",
996
- children: /* @__PURE__ */ y(Oe, {
998
+ children: /* @__PURE__ */ b(Oe, {
997
999
  illustration: "onboarding",
998
- title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
999
- description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
1000
+ title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
1001
+ description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
1000
1002
  })
1001
- }) : /* @__PURE__ */ b("div", {
1003
+ }) : /* @__PURE__ */ x("div", {
1002
1004
  className: "flex flex-col gap-list-gap",
1003
1005
  children: [
1004
- N && !Ct && /* @__PURE__ */ y(r, {
1006
+ P && !Tt && /* @__PURE__ */ b(r, {
1005
1007
  emphasis: "muted",
1006
1008
  tone: "info",
1007
1009
  padding: "compact",
1008
1010
  headingLevel: 3,
1009
1011
  title: "Sending your prompt…",
1010
1012
  description: "The new generation appears here as soon as the backend accepts it.",
1011
- icon: /* @__PURE__ */ y(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
1013
+ icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
1012
1014
  "data-testid": "insights-generation-pending"
1013
1015
  }),
1014
- Q.map((e) => {
1015
- let t = e.generatedSpec, ee = te(Z, e), a = F.has(e.id), o = Ve.includes(e.status);
1016
- return /* @__PURE__ */ b(r, {
1016
+ Z.map((e) => {
1017
+ let t = e.generatedSpec, i = ee(X, e), o = I.has(e.id), s = Ve.includes(e.status);
1018
+ return /* @__PURE__ */ x(r, {
1017
1019
  emphasis: "standard",
1018
1020
  padding: "compact",
1019
1021
  headingLevel: 3,
1020
- title: t?.name || (o ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
1021
- meta: /* @__PURE__ */ y(Qe, { status: e.status }),
1022
+ title: t?.name || (s ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
1023
+ meta: /* @__PURE__ */ b(Qe, { status: e.status }),
1022
1024
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
1023
1025
  "data-testid": "insights-generation-card",
1024
1026
  bodyClassName: "flex flex-col gap-control-gap",
1025
1027
  children: [
1026
- t && /* @__PURE__ */ b("div", {
1028
+ t && /* @__PURE__ */ x("div", {
1027
1029
  style: {
1028
1030
  display: "flex",
1029
1031
  flexWrap: "wrap",
1030
1032
  gap: "var(--space-iconGap)"
1031
1033
  },
1032
1034
  children: [
1033
- e.parentGenerationId && /* @__PURE__ */ y("span", {
1034
- style: D,
1035
+ e.parentGenerationId && /* @__PURE__ */ b("span", {
1036
+ style: O,
1035
1037
  "data-testid": "insights-generation-revision",
1036
- children: ee ? c("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: ee.generatedSpec?.name || c("bigconsole.insights.generations.untitled", "Untitled generation") }) : c("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
1038
+ children: i ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: i.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
1037
1039
  }),
1038
- /* @__PURE__ */ b("span", {
1039
- style: D,
1040
+ /* @__PURE__ */ x("span", {
1041
+ style: O,
1040
1042
  children: [
1041
- j(t),
1043
+ M(t),
1042
1044
  " widget",
1043
- j(t) === 1 ? "" : "s"
1045
+ M(t) === 1 ? "" : "s"
1044
1046
  ]
1045
1047
  }),
1046
- /* @__PURE__ */ b("span", {
1047
- style: D,
1048
+ /* @__PURE__ */ x("span", {
1049
+ style: O,
1048
1050
  children: [
1049
1051
  t.pages.length,
1050
1052
  " page",
1051
1053
  t.pages.length === 1 ? "" : "s"
1052
1054
  ]
1053
1055
  }),
1054
- /* @__PURE__ */ b("span", {
1056
+ /* @__PURE__ */ x("span", {
1055
1057
  style: $e(t.overallConfidence),
1056
1058
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
1057
1059
  })
1058
1060
  ]
1059
1061
  }),
1060
- e.errorMessage && /* @__PURE__ */ y(r, {
1062
+ e.errorMessage && /* @__PURE__ */ b(r, {
1061
1063
  headingLevel: 4,
1062
1064
  tone: "danger",
1063
1065
  padding: "compact",
1064
1066
  title: "Generation failed",
1065
1067
  description: e.errorMessage,
1066
- icon: /* @__PURE__ */ y(he, { className: "h-icon-sm w-icon-sm" })
1068
+ icon: /* @__PURE__ */ b(me, { className: "h-icon-sm w-icon-sm" })
1067
1069
  }),
1068
- /* @__PURE__ */ b("div", {
1070
+ /* @__PURE__ */ x("div", {
1069
1071
  style: {
1070
1072
  display: "flex",
1071
1073
  flexWrap: "wrap",
@@ -1075,97 +1077,97 @@ var M = c(function() {
1075
1077
  paddingTop: "var(--space-controlGap)"
1076
1078
  },
1077
1079
  children: [
1078
- o && /* @__PURE__ */ b("button", {
1080
+ s && /* @__PURE__ */ x("button", {
1079
1081
  type: "button",
1080
1082
  onClick: () => {
1081
- ae("medium"), Lt(e.id);
1083
+ ie("medium"), zt(e.id);
1082
1084
  },
1083
- disabled: a,
1084
- title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1085
+ disabled: o,
1086
+ title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
1085
1087
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1086
1088
  style: {
1087
1089
  ...Ye,
1088
- cursor: a ? "wait" : "pointer"
1090
+ cursor: o ? "wait" : "pointer"
1089
1091
  },
1090
1092
  children: [
1091
- /* @__PURE__ */ y(ge, {
1093
+ /* @__PURE__ */ b(ge, {
1092
1094
  size: 14,
1093
1095
  "aria-hidden": "true"
1094
1096
  }),
1095
1097
  " ",
1096
- c("bigconsole.insights.actions.cancel", "Cancel")
1098
+ l("bigconsole.insights.actions.cancel", "Cancel")
1097
1099
  ]
1098
1100
  }),
1099
- e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
1101
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1100
1102
  type: "button",
1101
- onClick: () => L(e),
1102
- title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1103
+ onClick: () => R(e),
1104
+ title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1103
1105
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1104
- style: C,
1106
+ style: w,
1105
1107
  children: [
1106
- /* @__PURE__ */ y(_e, {
1108
+ /* @__PURE__ */ b(_e, {
1107
1109
  size: 14,
1108
1110
  "aria-hidden": "true"
1109
1111
  }),
1110
1112
  " ",
1111
- c("bigconsole.insights.actions.preview", "Preview")
1113
+ l("bigconsole.insights.actions.preview", "Preview")
1112
1114
  ]
1113
1115
  }),
1114
- e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
1116
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1115
1117
  type: "button",
1116
1118
  onClick: () => {
1117
- B(e), H("");
1119
+ V(e), U("");
1118
1120
  },
1119
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1121
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1120
1122
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1121
- style: C,
1123
+ style: w,
1122
1124
  children: [
1123
- /* @__PURE__ */ y(g, {
1125
+ /* @__PURE__ */ b(_, {
1124
1126
  size: 14,
1125
1127
  "aria-hidden": "true"
1126
1128
  }),
1127
1129
  " ",
1128
- c("bigconsole.insights.actions.refine", "Refine")
1130
+ l("bigconsole.insights.actions.refine", "Refine")
1129
1131
  ]
1130
1132
  }),
1131
- e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
1133
+ e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1132
1134
  type: "button",
1133
- onClick: () => Vt(e),
1134
- title: c("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1135
+ onClick: () => Ut(e),
1136
+ title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1135
1137
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1136
- style: C,
1138
+ style: w,
1137
1139
  children: [
1138
- /* @__PURE__ */ y(Se, {
1140
+ /* @__PURE__ */ b(Se, {
1139
1141
  size: 14,
1140
1142
  "aria-hidden": "true"
1141
1143
  }),
1142
1144
  " ",
1143
- c("bigconsole.insights.actions.checkDraft", "Check draft")
1145
+ l("bigconsole.insights.actions.checkDraft", "Check draft")
1144
1146
  ]
1145
1147
  }),
1146
- (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ b("button", {
1148
+ (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1147
1149
  type: "button",
1148
1150
  onClick: () => {
1149
- ae("medium"), Rt(e.id);
1151
+ ie("medium"), Bt(e.id);
1150
1152
  },
1151
- disabled: a,
1152
- title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1153
+ disabled: o,
1154
+ title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1153
1155
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1154
1156
  style: {
1155
- ...C,
1156
- cursor: a ? "wait" : "pointer"
1157
+ ...w,
1158
+ cursor: o ? "wait" : "pointer"
1157
1159
  },
1158
1160
  children: [
1159
- /* @__PURE__ */ y(xe, {
1161
+ /* @__PURE__ */ b(xe, {
1160
1162
  size: 14,
1161
- className: a ? "animate-spin" : "",
1163
+ className: o ? "animate-spin" : "",
1162
1164
  "aria-hidden": "true"
1163
1165
  }),
1164
1166
  " ",
1165
- c("bigconsole.insights.actions.regenerate", "Regenerate")
1167
+ l("bigconsole.insights.actions.regenerate", "Regenerate")
1166
1168
  ]
1167
1169
  }),
1168
- /* @__PURE__ */ b("div", {
1170
+ /* @__PURE__ */ x("div", {
1169
1171
  style: {
1170
1172
  display: "flex",
1171
1173
  flexWrap: "wrap",
@@ -1174,50 +1176,50 @@ var M = c(function() {
1174
1176
  marginLeft: "auto"
1175
1177
  },
1176
1178
  children: [
1177
- e.status === "COMPLETED" && i(e).kind === "hold" && /* @__PURE__ */ y("span", {
1179
+ e.status === "COMPLETED" && a(e).kind === "hold" && /* @__PURE__ */ b("span", {
1178
1180
  role: "status",
1179
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1181
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1180
1182
  }),
1181
- e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ b("button", {
1183
+ e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1182
1184
  type: "button",
1183
- onClick: () => Ft(e),
1184
- disabled: i(e).kind !== "create",
1185
- title: i(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1185
+ onClick: () => Lt(e),
1186
+ disabled: a(e).kind !== "create",
1187
+ title: a(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1186
1188
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1187
- style: w,
1189
+ style: T,
1188
1190
  children: [
1189
- c("bigconsole.insights.actions.create", "Create dashboard"),
1191
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1190
1192
  " ",
1191
- /* @__PURE__ */ y(d, {
1193
+ /* @__PURE__ */ b(he, {
1192
1194
  size: 14,
1193
1195
  "aria-hidden": "true"
1194
1196
  })
1195
1197
  ]
1196
1198
  }),
1197
- e.dashboardId && /* @__PURE__ */ b("button", {
1199
+ e.dashboardId && /* @__PURE__ */ x("button", {
1198
1200
  type: "button",
1199
- onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
1201
+ onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1200
1202
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1201
- style: C,
1203
+ style: w,
1202
1204
  children: [
1203
- c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1205
+ l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1204
1206
  " ",
1205
- /* @__PURE__ */ y(d, {
1207
+ /* @__PURE__ */ b(he, {
1206
1208
  size: 14,
1207
1209
  "aria-hidden": "true"
1208
1210
  })
1209
1211
  ]
1210
1212
  }),
1211
- /* @__PURE__ */ y("button", {
1213
+ /* @__PURE__ */ b("button", {
1212
1214
  type: "button",
1213
1215
  onClick: () => {
1214
- ae("medium"), It(e.id);
1216
+ ie("medium"), Rt(e.id);
1215
1217
  },
1216
- title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1217
- "aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1218
+ title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1219
+ "aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1218
1220
  className: n,
1219
1221
  style: Xe,
1220
- children: /* @__PURE__ */ y(Ce, {
1222
+ children: /* @__PURE__ */ b(Ce, {
1221
1223
  size: 14,
1222
1224
  "aria-hidden": "true"
1223
1225
  })
@@ -1229,25 +1231,25 @@ var M = c(function() {
1229
1231
  ]
1230
1232
  }, e.id);
1231
1233
  }),
1232
- Nt.length > 0 && /* @__PURE__ */ y("button", {
1234
+ Ft.length > 0 && /* @__PURE__ */ b("button", {
1233
1235
  type: "button",
1234
- onClick: () => ht((e) => !e),
1235
- "aria-expanded": U,
1236
+ onClick: () => gt((e) => !e),
1237
+ "aria-expanded": ht,
1236
1238
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1237
- style: C,
1239
+ style: w,
1238
1240
  "data-testid": "insights-earlier-versions-toggle",
1239
- children: U ? c("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Nt.length === 1 ? c("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : c("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Nt.length })
1241
+ children: ht ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Ft.length === 1 ? l("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Ft.length })
1240
1242
  })
1241
1243
  ]
1242
1244
  })
1243
1245
  })
1244
1246
  ] })]
1245
1247
  }),
1246
- I && $ && /* @__PURE__ */ y("div", {
1248
+ L && $ && /* @__PURE__ */ b("div", {
1247
1249
  role: "dialog",
1248
1250
  "aria-modal": "true",
1249
- "aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1250
- onClick: () => L(null),
1251
+ "aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1252
+ onClick: () => R(null),
1251
1253
  style: {
1252
1254
  position: "fixed",
1253
1255
  inset: 0,
@@ -1258,7 +1260,7 @@ var M = c(function() {
1258
1260
  justifyContent: "center",
1259
1261
  padding: "var(--space-pagePadding)"
1260
1262
  },
1261
- children: /* @__PURE__ */ b("div", {
1263
+ children: /* @__PURE__ */ x("div", {
1262
1264
  onClick: (e) => e.stopPropagation(),
1263
1265
  style: {
1264
1266
  display: "flex",
@@ -1272,7 +1274,7 @@ var M = c(function() {
1272
1274
  boxShadow: "var(--shadow-elevation-3)"
1273
1275
  },
1274
1276
  children: [
1275
- /* @__PURE__ */ b("div", {
1277
+ /* @__PURE__ */ x("div", {
1276
1278
  style: {
1277
1279
  display: "flex",
1278
1280
  justifyContent: "space-between",
@@ -1281,16 +1283,16 @@ var M = c(function() {
1281
1283
  padding: "var(--space-cardPadding)",
1282
1284
  borderBottom: "1px solid var(--color-border-subtle)"
1283
1285
  },
1284
- children: [/* @__PURE__ */ b("div", {
1286
+ children: [/* @__PURE__ */ x("div", {
1285
1287
  style: { minWidth: 0 },
1286
- children: [/* @__PURE__ */ y("h2", {
1288
+ children: [/* @__PURE__ */ b("h2", {
1287
1289
  style: {
1288
1290
  fontSize: "var(--font-size-heading-h4)",
1289
1291
  fontWeight: "var(--font-weight-semibold)",
1290
1292
  color: "var(--color-text-primary)"
1291
1293
  },
1292
1294
  children: $.name
1293
- }), $.description && /* @__PURE__ */ y("p", {
1295
+ }), $.description && /* @__PURE__ */ b("p", {
1294
1296
  style: {
1295
1297
  fontSize: "var(--font-size-body-sm)",
1296
1298
  color: "var(--color-text-secondary)",
@@ -1298,22 +1300,22 @@ var M = c(function() {
1298
1300
  },
1299
1301
  children: $.description
1300
1302
  })]
1301
- }), /* @__PURE__ */ y("button", {
1303
+ }), /* @__PURE__ */ b("button", {
1302
1304
  type: "button",
1303
- onClick: () => L(null),
1304
- "aria-label": c("bigconsole.insights.preview.close", "Close preview"),
1305
+ onClick: () => R(null),
1306
+ "aria-label": l("bigconsole.insights.preview.close", "Close preview"),
1305
1307
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1306
1308
  style: {
1307
1309
  ...Xe,
1308
1310
  color: "var(--color-text-muted)"
1309
1311
  },
1310
- children: /* @__PURE__ */ y(we, {
1312
+ children: /* @__PURE__ */ b(we, {
1311
1313
  size: 18,
1312
1314
  "aria-hidden": "true"
1313
1315
  })
1314
1316
  })]
1315
1317
  }),
1316
- /* @__PURE__ */ b("div", {
1318
+ /* @__PURE__ */ x("div", {
1317
1319
  style: {
1318
1320
  flex: "1 1 auto",
1319
1321
  minHeight: 0,
@@ -1324,46 +1326,46 @@ var M = c(function() {
1324
1326
  gap: "var(--space-controlGap)"
1325
1327
  },
1326
1328
  children: [
1327
- /* @__PURE__ */ b("div", {
1329
+ /* @__PURE__ */ x("div", {
1328
1330
  style: {
1329
1331
  display: "flex",
1330
1332
  flexWrap: "wrap",
1331
1333
  gap: "var(--space-iconGap)"
1332
1334
  },
1333
1335
  children: [
1334
- /* @__PURE__ */ b("span", {
1335
- style: D,
1336
+ /* @__PURE__ */ x("span", {
1337
+ style: O,
1336
1338
  children: [
1337
- j($),
1339
+ M($),
1338
1340
  " widget",
1339
- j($) === 1 ? "" : "s"
1341
+ M($) === 1 ? "" : "s"
1340
1342
  ]
1341
1343
  }),
1342
- /* @__PURE__ */ b("span", {
1343
- style: D,
1344
+ /* @__PURE__ */ x("span", {
1345
+ style: O,
1344
1346
  children: [
1345
1347
  $.pages.length,
1346
1348
  " page",
1347
1349
  $.pages.length === 1 ? "" : "s"
1348
1350
  ]
1349
1351
  }),
1350
- /* @__PURE__ */ b("span", {
1352
+ /* @__PURE__ */ x("span", {
1351
1353
  style: $e($.overallConfidence),
1352
1354
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1353
1355
  })
1354
1356
  ]
1355
1357
  }),
1356
- /* @__PURE__ */ y(ce, { metadata: I.processingMetadata }),
1357
- /* @__PURE__ */ y(le, {
1358
- spec: Gt,
1359
- onApplyFix: (e) => Ut(I.id, e),
1360
- onUndoFix: Wt,
1361
- applied: ft[I.id] ?? null,
1362
- onAppliedChange: (e) => mt(I.id, e)
1358
+ /* @__PURE__ */ b(se, { metadata: L.processingMetadata }),
1359
+ /* @__PURE__ */ b(ce, {
1360
+ spec: Kt,
1361
+ onApplyFix: (e) => Wt(L.id, e),
1362
+ onUndoFix: Gt,
1363
+ applied: ft[L.id] ?? null,
1364
+ onAppliedChange: (e) => mt(L.id, e)
1363
1365
  }),
1364
- $.reasoning && /* @__PURE__ */ b("details", {
1366
+ $.reasoning && /* @__PURE__ */ x("details", {
1365
1367
  "data-testid": "preview-reasoning",
1366
- children: [/* @__PURE__ */ y("summary", {
1368
+ children: [/* @__PURE__ */ b("summary", {
1367
1369
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1368
1370
  style: {
1369
1371
  cursor: "pointer",
@@ -1372,8 +1374,8 @@ var M = c(function() {
1372
1374
  color: "var(--color-text-secondary)",
1373
1375
  borderRadius: "var(--radius-button)"
1374
1376
  },
1375
- children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1376
- }), /* @__PURE__ */ y("p", {
1377
+ children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
1378
+ }), /* @__PURE__ */ b("p", {
1377
1379
  style: {
1378
1380
  marginTop: "var(--space-controlGap)",
1379
1381
  fontSize: "var(--font-size-body-sm)",
@@ -1383,41 +1385,41 @@ var M = c(function() {
1383
1385
  children: $.reasoning
1384
1386
  })]
1385
1387
  }),
1386
- $.pages.map((e, t) => /* @__PURE__ */ b(r, {
1388
+ $.pages.map((e, t) => /* @__PURE__ */ x(r, {
1387
1389
  emphasis: "muted",
1388
1390
  padding: "compact",
1389
1391
  headingLevel: 3,
1390
1392
  title: e.name,
1391
- meta: /* @__PURE__ */ b("span", {
1392
- style: D,
1393
+ meta: /* @__PURE__ */ x("span", {
1394
+ style: O,
1393
1395
  children: [
1394
1396
  e.widgets.length,
1395
1397
  " widget",
1396
1398
  e.widgets.length === 1 ? "" : "s"
1397
1399
  ]
1398
1400
  }),
1399
- children: [/* @__PURE__ */ b("p", {
1401
+ children: [/* @__PURE__ */ x("p", {
1400
1402
  style: {
1401
1403
  fontSize: "var(--font-size-body-sm)",
1402
1404
  color: "var(--color-text-secondary)",
1403
1405
  marginBottom: "var(--space-controlGap)"
1404
1406
  },
1405
1407
  children: [
1406
- c("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1408
+ l("bigconsole.insights.preview.proposedLayout", "Proposed layout"),
1407
1409
  " · ",
1408
1410
  e.gridColumns,
1409
1411
  " ",
1410
- c("bigconsole.insights.preview.columns", "columns"),
1412
+ l("bigconsole.insights.preview.columns", "columns"),
1411
1413
  " ·",
1412
1414
  " ",
1413
1415
  e.layout.toLowerCase().replaceAll("_", " ")
1414
1416
  ]
1415
- }), /* @__PURE__ */ y("div", {
1417
+ }), /* @__PURE__ */ b("div", {
1416
1418
  className: "insights-proposal-grid",
1417
1419
  style: nt(e.gridColumns),
1418
1420
  children: e.widgets.map((t, n) => {
1419
1421
  let r = et(t.confidence);
1420
- return /* @__PURE__ */ b("div", {
1422
+ return /* @__PURE__ */ x("div", {
1421
1423
  className: "insights-proposal-widget",
1422
1424
  style: {
1423
1425
  ...rt(t.position, e.gridColumns),
@@ -1430,7 +1432,7 @@ var M = c(function() {
1430
1432
  border: "1px solid var(--color-border-subtle)"
1431
1433
  },
1432
1434
  children: [
1433
- /* @__PURE__ */ b("div", {
1435
+ /* @__PURE__ */ x("div", {
1434
1436
  style: {
1435
1437
  display: "flex",
1436
1438
  flexWrap: "wrap",
@@ -1438,7 +1440,7 @@ var M = c(function() {
1438
1440
  gap: "var(--space-iconGap)"
1439
1441
  },
1440
1442
  children: [
1441
- /* @__PURE__ */ y("span", {
1443
+ /* @__PURE__ */ b("span", {
1442
1444
  style: {
1443
1445
  fontSize: "var(--font-size-body-sm)",
1444
1446
  fontWeight: "var(--font-weight-medium)",
@@ -1447,7 +1449,7 @@ var M = c(function() {
1447
1449
  },
1448
1450
  children: t.title
1449
1451
  }),
1450
- /* @__PURE__ */ y("span", {
1452
+ /* @__PURE__ */ b("span", {
1451
1453
  style: {
1452
1454
  fontSize: "var(--font-size-xs)",
1453
1455
  color: "var(--color-text-muted)"
@@ -1455,7 +1457,7 @@ var M = c(function() {
1455
1457
  "data-testid": "preview-widget-type",
1456
1458
  children: t.type
1457
1459
  }),
1458
- r && /* @__PURE__ */ y("span", {
1460
+ r && /* @__PURE__ */ b("span", {
1459
1461
  style: {
1460
1462
  ...it(r),
1461
1463
  marginLeft: "auto"
@@ -1465,7 +1467,7 @@ var M = c(function() {
1465
1467
  })
1466
1468
  ]
1467
1469
  }),
1468
- t.reasoning && /* @__PURE__ */ y("p", {
1470
+ t.reasoning && /* @__PURE__ */ b("p", {
1469
1471
  style: {
1470
1472
  margin: 0,
1471
1473
  fontSize: "var(--font-size-xs)",
@@ -1474,7 +1476,7 @@ var M = c(function() {
1474
1476
  },
1475
1477
  children: t.reasoning
1476
1478
  }),
1477
- /* @__PURE__ */ y(se, { config: t.config })
1479
+ /* @__PURE__ */ b(oe, { config: t.config })
1478
1480
  ]
1479
1481
  }, n);
1480
1482
  })
@@ -1482,7 +1484,7 @@ var M = c(function() {
1482
1484
  }, t))
1483
1485
  ]
1484
1486
  }),
1485
- /* @__PURE__ */ b("div", {
1487
+ /* @__PURE__ */ x("div", {
1486
1488
  style: {
1487
1489
  display: "flex",
1488
1490
  justifyContent: "flex-end",
@@ -1492,92 +1494,92 @@ var M = c(function() {
1492
1494
  borderTop: "1px solid var(--color-border-subtle)"
1493
1495
  },
1494
1496
  children: [
1495
- /* @__PURE__ */ y("button", {
1497
+ /* @__PURE__ */ b("button", {
1496
1498
  type: "button",
1497
- onClick: () => L(null),
1499
+ onClick: () => R(null),
1498
1500
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1499
- style: C,
1501
+ style: w,
1500
1502
  children: "Close"
1501
1503
  }),
1502
- I.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
1504
+ L.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1503
1505
  type: "button",
1504
1506
  onClick: () => {
1505
- let e = I;
1506
- L(null), B(e), H("");
1507
+ let e = L;
1508
+ R(null), V(e), U("");
1507
1509
  },
1508
- title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1510
+ title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1509
1511
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1510
- style: C,
1512
+ style: w,
1511
1513
  children: [
1512
- /* @__PURE__ */ y(g, {
1514
+ /* @__PURE__ */ b(_, {
1513
1515
  size: 14,
1514
1516
  "aria-hidden": "true"
1515
1517
  }),
1516
1518
  " ",
1517
- c("bigconsole.insights.actions.refine", "Refine")
1519
+ l("bigconsole.insights.actions.refine", "Refine")
1518
1520
  ]
1519
1521
  }),
1520
- I.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
1522
+ L.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1521
1523
  type: "button",
1522
- onClick: () => Vt(I),
1523
- title: c("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1524
+ onClick: () => Ut(L),
1525
+ title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
1524
1526
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1525
- style: C,
1527
+ style: w,
1526
1528
  children: [
1527
- /* @__PURE__ */ y(Se, {
1529
+ /* @__PURE__ */ b(Se, {
1528
1530
  size: 14,
1529
1531
  "aria-hidden": "true"
1530
1532
  }),
1531
1533
  " ",
1532
- c("bigconsole.insights.actions.checkDraft", "Check draft")
1534
+ l("bigconsole.insights.actions.checkDraft", "Check draft")
1533
1535
  ]
1534
1536
  }),
1535
- I.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
1537
+ L.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1536
1538
  type: "button",
1537
1539
  onClick: () => {
1538
- let e = I;
1539
- L(null), G(e), _t({
1540
+ let e = L;
1541
+ R(null), _t(e), yt({
1540
1542
  text: "",
1541
1543
  busy: !1
1542
1544
  });
1543
1545
  },
1544
- title: c("bigconsole.insights.actions.chatTitle", "Edit the draft by conversation"),
1546
+ title: l("bigconsole.insights.actions.chatTitle", "Edit the draft by conversation"),
1545
1547
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1546
- style: C,
1548
+ style: w,
1547
1549
  children: [
1548
- /* @__PURE__ */ y(be, {
1550
+ /* @__PURE__ */ b(be, {
1549
1551
  size: 14,
1550
1552
  "aria-hidden": "true"
1551
1553
  }),
1552
1554
  " ",
1553
- c("bigconsole.insights.actions.chat", "Chat to edit")
1555
+ l("bigconsole.insights.actions.chat", "Chat to edit")
1554
1556
  ]
1555
1557
  }),
1556
- I.status === "COMPLETED" && i(I).kind === "hold" && /* @__PURE__ */ y("span", {
1558
+ L.status === "COMPLETED" && a(L).kind === "hold" && /* @__PURE__ */ b("span", {
1557
1559
  role: "status",
1558
- children: c("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1560
+ children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
1559
1561
  }),
1560
- I.dashboardId && /* @__PURE__ */ y("button", {
1562
+ L.dashboardId && /* @__PURE__ */ b("button", {
1561
1563
  type: "button",
1562
1564
  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
- style: C,
1564
- onClick: () => f(`/dashboards/${I.dashboardId}`),
1565
- children: c("bigconsole.insights.actions.viewDashboard", "View dashboard")
1565
+ style: w,
1566
+ onClick: () => p(`/dashboards/${L.dashboardId}`),
1567
+ children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
1566
1568
  }),
1567
- I.status === "COMPLETED" && !I.dashboardId && /* @__PURE__ */ b("button", {
1569
+ L.status === "COMPLETED" && !L.dashboardId && /* @__PURE__ */ x("button", {
1568
1570
  type: "button",
1569
- disabled: i(I).kind !== "create",
1570
- title: i(I).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1571
+ disabled: a(L).kind !== "create",
1572
+ title: a(L).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
1571
1573
  onClick: () => {
1572
- let e = I;
1573
- L(null), Ft(e);
1574
+ let e = L;
1575
+ R(null), Lt(e);
1574
1576
  },
1575
1577
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1576
- style: w,
1578
+ style: T,
1577
1579
  children: [
1578
- c("bigconsole.insights.actions.create", "Create dashboard"),
1580
+ l("bigconsole.insights.actions.create", "Create dashboard"),
1579
1581
  " ",
1580
- /* @__PURE__ */ y(d, {
1582
+ /* @__PURE__ */ b(he, {
1581
1583
  size: 14,
1582
1584
  "aria-hidden": "true"
1583
1585
  })
@@ -1588,11 +1590,11 @@ var M = c(function() {
1588
1590
  ]
1589
1591
  })
1590
1592
  }),
1591
- z && /* @__PURE__ */ y("div", {
1593
+ B && /* @__PURE__ */ b("div", {
1592
1594
  role: "dialog",
1593
1595
  "aria-modal": "true",
1594
- "aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1595
- onClick: () => B(null),
1596
+ "aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1597
+ onClick: () => V(null),
1596
1598
  style: {
1597
1599
  position: "fixed",
1598
1600
  inset: 0,
@@ -1603,7 +1605,7 @@ var M = c(function() {
1603
1605
  justifyContent: "center",
1604
1606
  padding: "var(--space-pagePadding)"
1605
1607
  },
1606
- children: /* @__PURE__ */ b("div", {
1608
+ children: /* @__PURE__ */ x("div", {
1607
1609
  onClick: (e) => e.stopPropagation(),
1608
1610
  style: {
1609
1611
  display: "flex",
@@ -1617,28 +1619,28 @@ var M = c(function() {
1617
1619
  boxShadow: "var(--shadow-elevation-3)"
1618
1620
  },
1619
1621
  children: [
1620
- /* @__PURE__ */ b("div", {
1622
+ /* @__PURE__ */ x("div", {
1621
1623
  style: {
1622
1624
  padding: "var(--space-cardPadding)",
1623
1625
  borderBottom: "1px solid var(--color-border-subtle)"
1624
1626
  },
1625
- children: [/* @__PURE__ */ y("h2", {
1627
+ children: [/* @__PURE__ */ b("h2", {
1626
1628
  style: {
1627
1629
  fontSize: "var(--font-size-heading-h4)",
1628
1630
  fontWeight: "var(--font-weight-semibold)",
1629
1631
  color: "var(--color-text-primary)"
1630
1632
  },
1631
- children: c("bigconsole.insights.refine.heading", "Refine dashboard")
1632
- }), /* @__PURE__ */ y("p", {
1633
+ children: l("bigconsole.insights.refine.heading", "Refine dashboard")
1634
+ }), /* @__PURE__ */ b("p", {
1633
1635
  style: {
1634
1636
  fontSize: "var(--font-size-body-sm)",
1635
1637
  color: "var(--color-text-secondary)",
1636
1638
  marginTop: 2
1637
1639
  },
1638
- children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1640
+ children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
1639
1641
  })]
1640
1642
  }),
1641
- /* @__PURE__ */ b("div", {
1643
+ /* @__PURE__ */ x("div", {
1642
1644
  style: {
1643
1645
  flex: "1 1 auto",
1644
1646
  minHeight: 0,
@@ -1648,20 +1650,20 @@ var M = c(function() {
1648
1650
  flexDirection: "column",
1649
1651
  gap: "var(--space-controlGap)"
1650
1652
  },
1651
- children: [/* @__PURE__ */ y(r, {
1653
+ children: [/* @__PURE__ */ b(r, {
1652
1654
  emphasis: "muted",
1653
1655
  padding: "compact",
1654
1656
  headingLevel: 3,
1655
- title: z.generatedSpec?.name || "Current proposal",
1656
- description: z.prompt.length > 240 ? `${z.prompt.slice(0, 240)}…` : z.prompt,
1657
- icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" })
1658
- }), /* @__PURE__ */ b("div", {
1657
+ title: B.generatedSpec?.name || "Current proposal",
1658
+ description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
1659
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1660
+ }), /* @__PURE__ */ x("div", {
1659
1661
  style: {
1660
1662
  display: "flex",
1661
1663
  flexDirection: "column",
1662
1664
  gap: "var(--space-controlGap)"
1663
1665
  },
1664
- children: [/* @__PURE__ */ y("label", {
1666
+ children: [/* @__PURE__ */ b("label", {
1665
1667
  htmlFor: "refine-input",
1666
1668
  style: {
1667
1669
  display: "block",
@@ -1670,13 +1672,13 @@ var M = c(function() {
1670
1672
  color: "var(--color-text-primary)"
1671
1673
  },
1672
1674
  children: "What should change?"
1673
- }), /* @__PURE__ */ y("textarea", {
1675
+ }), /* @__PURE__ */ b("textarea", {
1674
1676
  id: "refine-input",
1675
- value: V,
1676
- onChange: (e) => H(e.target.value),
1677
+ value: H,
1678
+ onChange: (e) => U(e.target.value),
1677
1679
  maxLength: 2e3,
1678
1680
  rows: 4,
1679
- placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1681
+ placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
1680
1682
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1681
1683
  style: {
1682
1684
  width: "100%",
@@ -1692,7 +1694,7 @@ var M = c(function() {
1692
1694
  })]
1693
1695
  })]
1694
1696
  }),
1695
- /* @__PURE__ */ b("div", {
1697
+ /* @__PURE__ */ x("div", {
1696
1698
  style: {
1697
1699
  display: "flex",
1698
1700
  justifyContent: "flex-end",
@@ -1701,65 +1703,65 @@ var M = c(function() {
1701
1703
  padding: "var(--space-cardPadding)",
1702
1704
  borderTop: "1px solid var(--color-border-subtle)"
1703
1705
  },
1704
- children: [/* @__PURE__ */ y("button", {
1706
+ children: [/* @__PURE__ */ b("button", {
1705
1707
  type: "button",
1706
- onClick: () => B(null),
1708
+ onClick: () => V(null),
1707
1709
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1708
- style: C,
1709
- children: c("bigconsole.insights.actions.cancel", "Cancel")
1710
- }), /* @__PURE__ */ b("button", {
1710
+ style: w,
1711
+ children: l("bigconsole.insights.actions.cancel", "Cancel")
1712
+ }), /* @__PURE__ */ x("button", {
1711
1713
  type: "button",
1712
- onClick: () => void zt(),
1713
- disabled: !V.trim() || F.has(z.id),
1714
+ onClick: () => void Vt(),
1715
+ disabled: !H.trim() || I.has(B.id),
1714
1716
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1715
1717
  style: {
1716
- ...w,
1717
- cursor: !V.trim() || F.has(z.id) ? "not-allowed" : "pointer",
1718
- opacity: V.trim() ? 1 : .6
1718
+ ...T,
1719
+ cursor: !H.trim() || I.has(B.id) ? "not-allowed" : "pointer",
1720
+ opacity: H.trim() ? 1 : .6
1719
1721
  },
1720
- children: [F.has(z.id) ? /* @__PURE__ */ y(m, {
1722
+ children: [I.has(B.id) ? /* @__PURE__ */ b(h, {
1721
1723
  size: 14,
1722
1724
  className: "animate-spin",
1723
1725
  "aria-hidden": "true"
1724
- }) : /* @__PURE__ */ y(g, {
1726
+ }) : /* @__PURE__ */ b(_, {
1725
1727
  size: 14,
1726
1728
  "aria-hidden": "true"
1727
- }), c("bigconsole.insights.refine.apply", "Apply refinement")]
1729
+ }), l("bigconsole.insights.refine.apply", "Apply refinement")]
1728
1730
  })]
1729
1731
  })
1730
1732
  ]
1731
1733
  })
1732
1734
  }),
1733
- W && W.generatedSpec && /* @__PURE__ */ y(de, {
1735
+ W && W.generatedSpec && /* @__PURE__ */ b(ue, {
1734
1736
  generation: {
1735
1737
  ...W,
1736
1738
  generatedSpec: W.generatedSpec
1737
1739
  },
1738
- message: gt.text,
1739
- onMessageChange: (e) => _t((t) => ({
1740
+ message: vt.text,
1741
+ onMessageChange: (e) => yt((t) => ({
1740
1742
  ...t,
1741
1743
  text: e
1742
1744
  })),
1743
- onBusyChange: (e) => _t((t) => ({
1745
+ onBusyChange: (e) => yt((t) => ({
1744
1746
  ...t,
1745
1747
  busy: e
1746
1748
  })),
1747
- onClose: () => G(null)
1749
+ onClose: () => _t(null)
1748
1750
  }),
1749
- /* @__PURE__ */ y(ue, {
1751
+ /* @__PURE__ */ b(le, {
1750
1752
  open: lt !== null,
1751
1753
  onClose: () => {
1752
1754
  ut(null), dt(null);
1753
1755
  },
1754
1756
  spec: lt,
1755
- onApplyFix: (e) => R ? Ut(R, e) : Promise.resolve(null),
1756
- onUndoFix: Wt,
1757
- appliedFix: R ? ft[R] ?? null : null,
1757
+ onApplyFix: (e) => z ? Wt(z, e) : Promise.resolve(null),
1758
+ onUndoFix: Gt,
1759
+ appliedFix: z ? ft[z] ?? null : null,
1758
1760
  onAppliedFixChange: (e) => {
1759
- R && mt(R, e);
1761
+ z && mt(z, e);
1760
1762
  }
1761
1763
  })
1762
1764
  ]
1763
1765
  });
1764
1766
  });
1765
- export { M as InsightsPage, M as default };
1767
+ export { N as InsightsPage, N as default };