react-semaphor 0.1.540 → 0.1.541

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +41 -38
  3. package/dist/chunks/{aggregate-table-row-presentation-BjK9YfMI.js → aggregate-table-row-presentation-B_vQjYR3.js} +319 -302
  4. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-D1fDZD6O.js} +3 -3
  5. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-B6IrON_Q.js} +1 -1
  6. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-DwjFpewq.js} +4 -4
  7. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-C_BI28ME.js} +5 -5
  8. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-DDY15Trn.js} +1 -1
  9. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-DP_Op5mu.js} +1168 -1166
  10. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-CH2dzWW-.js} +4 -4
  11. package/dist/chunks/{index-CqMiAkay.js → index-DaQlghLY.js} +547 -511
  12. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-DpNkFfQO.js} +5 -5
  13. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-CJ2WpoMF.js} +1 -1
  14. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-KT598QJq.js} +29621 -29528
  15. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-BxV3Fl8h.js} +2 -2
  16. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-DdD12SMY.js} +2 -2
  17. package/dist/dashboard/index.js +1 -1
  18. package/dist/dashboard-authoring/index.js +582 -568
  19. package/dist/format-utils/index.js +117 -114
  20. package/dist/index.js +10 -10
  21. package/dist/pdf-export-policy/index.js +20 -10
  22. package/dist/surfboard/index.js +1 -1
  23. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  24. package/dist/types/briefings/index.d.ts +1 -0
  25. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  26. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  27. package/dist/types/lib/types/common-types.d.ts +7 -0
  28. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  29. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  30. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  31. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  32. package/dist/types/shared/format-utils/index.d.ts +1 -0
  33. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  34. package/package.json +1 -1
@@ -1,35 +1,35 @@
1
1
  var we = Object.defineProperty;
2
- var Fe = (e, t, a) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
- var z = (e, t, a) => Fe(e, typeof t != "symbol" ? t + "" : t, a);
2
+ var Fe = (e, t, r) => t in e ? we(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var z = (e, t, r) => Fe(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import { D as B, a as xe, r as H } from "../chunks/apply-dashboard-operations-C-iahGka.js";
5
- import { N as ca, d as la, p as ua, f as fa, i as pa, b as ma, o as ha, j as ga, k as ba, m as Ia, g as Ca, l as ya, h as _a, n as Da, e as Sa, s as va } from "../chunks/apply-dashboard-operations-C-iahGka.js";
6
- import { c as ke, r as Ae, v as Oe, f as Re, a as Ee, p as Ne } from "../chunks/calculated-field-identity-DcBS2NPP.js";
7
- import { A as wa, N as Fa, O as xa, P as ka, K as Aa, L as Oa, M as Ra, G as Ea, H as Na, J as Ma, I as Pa, Q as $a, a1 as La, S as Ba, R as qa, b as Va, a0 as za, $ as ja, l as Ua, q as Ga, m as Ha, n as Wa, o as Ka, a4 as Qa, F as Xa, E as Ya, y as Ja, a5 as Za, g as er, e as tr, Y as ar, i as rr, Z as nr, _ as ir, x as or, z as sr, w as dr, a2 as cr, a3 as lr, d as ur, a6 as fr, C as pr, j as mr, U as hr, k as gr, W as br, X as Ir, V as Cr, h as yr, B as _r, u as Dr, s as Sr, t as vr, D as Tr, T as wr } from "../chunks/calculated-field-identity-DcBS2NPP.js";
5
+ import { N as cr, d as lr, p as ur, f as fr, i as pr, b as mr, o as hr, j as gr, k as br, m as Ir, g as Cr, l as yr, h as _r, n as Dr, e as Sr, s as vr } from "../chunks/apply-dashboard-operations-C-iahGka.js";
6
+ import { c as ke, r as Ae, v as Re, f as Oe, a as Ee, p as Ne } from "../chunks/calculated-field-identity-DcBS2NPP.js";
7
+ import { A as wr, N as Fr, O as xr, P as kr, K as Ar, L as Rr, M as Or, G as Er, H as Nr, J as Mr, I as Pr, Q as $r, a1 as Lr, S as Br, R as qr, b as Vr, a0 as zr, $ as jr, l as Ur, q as Gr, m as Hr, n as Wr, o as Kr, a4 as Qr, F as Xr, E as Yr, y as Jr, a5 as Zr, g as ea, e as ta, Y as ra, i as aa, Z as na, _ as ia, x as oa, z as sa, w as da, a2 as ca, a3 as la, d as ua, a6 as fa, C as pa, j as ma, U as ha, k as ga, W as ba, X as Ia, V as Ca, h as ya, B as _a, u as Da, s as Sa, t as va, D as Ta, T as wa } from "../chunks/calculated-field-identity-DcBS2NPP.js";
8
8
  import { q as Me, E as Y, av as Pe, F as fe, l as $e, ah as Le } from "../chunks/validators-Ej1DdCXa.js";
9
9
  import "../chunks/matrix-operation-contract-B8PBF1Gd.js";
10
10
  import "../chunks/analytics-base-schemas-BFAoRlkU.js";
11
11
  import "zod";
12
12
  import { m as j } from "../chunks/document-sheet-utils-C1eEldxs.js";
13
- import { k as xr, D as kr, i as Ar, q as Or, h as Rr, d as Er, a as Nr, b as Mr, n as Pr, p as $r, g as Lr, r as Br, c as qr, l as Vr, o as zr, f as jr, j as Ur, s as Gr, w as Hr } from "../chunks/document-sheet-utils-C1eEldxs.js";
13
+ import { k as xa, D as ka, i as Aa, q as Ra, h as Oa, d as Ea, a as Na, b as Ma, n as Pa, p as $a, g as La, r as Ba, c as qa, l as Va, o as za, f as ja, j as Ua, s as Ga, w as Ha } from "../chunks/document-sheet-utils-C1eEldxs.js";
14
14
  import { n as Be } from "../chunks/operators-B3zZoskU.js";
15
- import { a as Kr, b as Qr, r as Xr } from "../chunks/canonical-result-keys-CEQefvdO.js";
16
- import { D as Jr, i as Zr, k as en, j as tn, l as an, m as rn } from "../chunks/common-types-CUf03Htv.js";
15
+ import { a as Ka, b as Qa, r as Xa } from "../chunks/canonical-result-keys-CEQefvdO.js";
16
+ import { D as Ja, i as Za, k as en, j as tn, l as rn, m as an } from "../chunks/common-types-CUf03Htv.js";
17
17
  import { D as on, d as sn, i as dn, v as cn } from "../chunks/dashboard-filter-value-compatibility-D95O4nd7.js";
18
18
  import { b as un, c as fn, g as pn, a as mn, m as hn, r as gn } from "../chunks/matrix-definition-DQDI2okF.js";
19
19
  import { d as qe, w as Ve } from "../chunks/metric-comparison-CojWeLqx.js";
20
20
  import { p as ze } from "../chunks/report-runtime-context-B984Nq1E.js";
21
21
  import { m as In, a as Cn, r as yn } from "../chunks/matrix-card-CJn1hB5V.js";
22
- function D(e) {
22
+ function S(e) {
23
23
  return e && typeof e == "object" ? e : null;
24
24
  }
25
25
  function T(e) {
26
26
  return typeof e == "string" ? e : null;
27
27
  }
28
28
  function je(e) {
29
- var t, a, r;
30
- return !!(e && typeof e == "object") && (((t = D(e)) == null ? void 0 : t.kind) === "semantic" || ((a = D(e)) == null ? void 0 : a.kind) === "physical" || ((r = D(e)) == null ? void 0 : r.kind) === "sql");
29
+ var t, r, a;
30
+ return !!(e && typeof e == "object") && (((t = S(e)) == null ? void 0 : t.kind) === "semantic" || ((r = S(e)) == null ? void 0 : r.kind) === "physical" || ((a = S(e)) == null ? void 0 : a.kind) === "sql");
31
31
  }
32
- function R(e) {
32
+ function O(e) {
33
33
  return je(e) ? e.kind === "semantic" ? !!(e.domainId && e.datasetName) : e.kind === "physical" ? !!(e.connectionId && e.tableName) : !1 : !1;
34
34
  }
35
35
  function Xt(e) {
@@ -43,13 +43,13 @@ function Ue(e, t) {
43
43
  }
44
44
  function q(e) {
45
45
  const t = [];
46
- for (const a of e) {
47
- const r = t.findIndex(
48
- (i) => pe(i, a)
46
+ for (const r of e) {
47
+ const a = t.findIndex(
48
+ (n) => pe(n, r)
49
49
  );
50
- r === -1 ? t.push(a) : t[r] = Ue(
51
- t[r],
52
- a
50
+ a === -1 ? t.push(r) : t[a] = Ue(
51
+ t[a],
52
+ r
53
53
  );
54
54
  }
55
55
  return t;
@@ -61,78 +61,78 @@ function W(e, t) {
61
61
  return e.kind !== "semantic" || e.connectionId || (t == null ? void 0 : t.kind) !== "semantic" || !Y(e, t) || !t.connectionId ? e : { ...e, connectionId: t.connectionId };
62
62
  }
63
63
  function K(e) {
64
- return R(e) ? e : void 0;
64
+ return O(e) ? e : void 0;
65
65
  }
66
66
  function le(e, t) {
67
67
  if (!(e.kind !== "semantic" || e.connectionId))
68
68
  return t.find(
69
- (a) => (a == null ? void 0 : a.kind) === "semantic" && Y(e, a) && !!a.connectionId
69
+ (r) => (r == null ? void 0 : r.kind) === "semantic" && Y(e, r) && !!r.connectionId
70
70
  );
71
71
  }
72
72
  function v(e, t) {
73
- const a = K(e == null ? void 0 : e.source);
74
- return a ? W(a, t) : void 0;
73
+ const r = K(e == null ? void 0 : e.source);
74
+ return r ? W(r, t) : void 0;
75
75
  }
76
76
  function Ge({
77
77
  explicitSource: e,
78
78
  field: t,
79
- defaultSource: a,
80
- fallbackSources: r
79
+ defaultSource: r,
80
+ fallbackSources: a
81
81
  }) {
82
- const i = [a, ...r || []], o = K(e), n = o ? W(
83
- o,
84
- le(o, i)
82
+ const n = [r, ...a || []], i = K(e), o = i ? W(
83
+ i,
84
+ le(i, n)
85
85
  ) : void 0;
86
- if (n)
87
- return n;
86
+ if (o)
87
+ return o;
88
88
  if (e !== void 0)
89
89
  return;
90
- const s = v(t, a), l = s ? W(
90
+ const s = v(t, r), l = s ? W(
91
91
  s,
92
- le(s, i)
92
+ le(s, n)
93
93
  ) : void 0;
94
94
  if (l)
95
95
  return l;
96
96
  if ((t == null ? void 0 : t.source) === void 0)
97
- return K(a);
97
+ return K(r);
98
98
  }
99
99
  function Jt(e, t) {
100
100
  if (!(e != null && e.name) || !(t != null && t.name) || e.name !== t.name)
101
101
  return !1;
102
- const a = v(e), r = v(t);
103
- return !a || !r ? !0 : pe(a, r);
102
+ const r = v(e), a = v(t);
103
+ return !r || !a ? !0 : pe(r, a);
104
104
  }
105
- function x(e) {
105
+ function k(e) {
106
106
  var t;
107
- return T((t = D(e)) == null ? void 0 : t.kind);
107
+ return T((t = S(e)) == null ? void 0 : t.kind);
108
108
  }
109
109
  function me(e) {
110
- var t, a;
111
- return x(e) !== "semantic" ? null : ((a = T((t = D(e)) == null ? void 0 : t.domainId)) == null ? void 0 : a.trim()) || null;
110
+ var t, r;
111
+ return k(e) !== "semantic" ? null : ((r = T((t = S(e)) == null ? void 0 : t.domainId)) == null ? void 0 : r.trim()) || null;
112
112
  }
113
113
  function He(e) {
114
114
  var t;
115
- return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetName);
115
+ return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetName);
116
116
  }
117
117
  function We(e) {
118
118
  var t;
119
- return x(e) !== "semantic" ? null : T((t = D(e)) == null ? void 0 : t.datasetId);
119
+ return k(e) !== "semantic" ? null : T((t = S(e)) == null ? void 0 : t.datasetId);
120
120
  }
121
121
  function Ke(e) {
122
122
  var t;
123
- return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.connectionId);
123
+ return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.connectionId);
124
124
  }
125
125
  function Qe(e) {
126
126
  var t;
127
- return x(e) !== "physical" ? null : T((t = D(e)) == null ? void 0 : t.tableName);
127
+ return k(e) !== "physical" ? null : T((t = S(e)) == null ? void 0 : t.tableName);
128
128
  }
129
129
  function Xe(e) {
130
130
  var t;
131
- return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.databaseName) || "";
131
+ return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.databaseName) || "";
132
132
  }
133
133
  function Ye(e) {
134
134
  var t;
135
- return x(e) !== "physical" ? "" : T((t = D(e)) == null ? void 0 : t.schemaName) || "";
135
+ return k(e) !== "physical" ? "" : T((t = S(e)) == null ? void 0 : t.schemaName) || "";
136
136
  }
137
137
  function Je(e) {
138
138
  if (e.analyticsIntent && typeof e.analyticsIntent == "object" && "source" in e.analyticsIntent)
@@ -146,47 +146,47 @@ function Ze({
146
146
  return { ok: !1, issue: "invalid_dataset_count" };
147
147
  if (e.length <= 1)
148
148
  return { ok: !0 };
149
- const a = e.map(me), r = new Set(a.filter(Boolean));
150
- return a.some((i) => !i) || r.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
149
+ const r = e.map(me), a = new Set(r.filter(Boolean));
150
+ return r.some((n) => !n) || a.size !== 1 ? { ok: !1, issue: "invalid_multi_dataset_scope" } : { ok: !0 };
151
151
  }
152
152
  function J(e, t) {
153
153
  if (!t)
154
154
  return !1;
155
155
  if (t.kind === "semantic") {
156
- const a = We(e);
157
- return me(e) === t.domainId ? a && t.datasetId ? a === t.datasetId : He(e) === t.datasetName : !1;
156
+ const r = We(e);
157
+ return me(e) === t.domainId ? r && t.datasetId ? r === t.datasetId : He(e) === t.datasetName : !1;
158
158
  }
159
159
  return t.kind === "physical" ? Ke(e) === t.connectionId && Qe(e) === t.tableName && Xe(e) === (t.databaseName || "") && Ye(e) === (t.schemaName || "") : !1;
160
160
  }
161
161
  function Zt(e, t) {
162
162
  return e.find(
163
- (a) => J(a, t)
163
+ (r) => J(r, t)
164
164
  );
165
165
  }
166
- function f(e, t, a) {
167
- return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
166
+ function f(e, t, r) {
167
+ return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
168
168
  }
169
169
  function M(e) {
170
170
  const t = /* @__PURE__ */ new Set();
171
- for (const a of e) {
172
- if (t.has(a))
173
- return a;
174
- t.add(a);
171
+ for (const r of e) {
172
+ if (t.has(r))
173
+ return r;
174
+ t.add(r);
175
175
  }
176
176
  return null;
177
177
  }
178
178
  function he({
179
179
  card: e,
180
180
  datasets: t,
181
- errors: a
181
+ errors: r
182
182
  }) {
183
183
  if (e.type === "text")
184
184
  return;
185
- const r = Je(e);
186
- if (!r) {
185
+ const a = Je(e);
186
+ if (!a) {
187
187
  if (t.length <= 1)
188
188
  return;
189
- a.push(
189
+ r.push(
190
190
  f(
191
191
  "missing_card_analytics_source",
192
192
  "Multi-dataset dashboard cards must include analytics intent with a source so the materializer can choose the correct dataset.",
@@ -195,7 +195,7 @@ function he({
195
195
  );
196
196
  return;
197
197
  }
198
- t.some((i) => J(i, r)) || a.push(
198
+ t.some((n) => J(n, a)) || r.push(
199
199
  f(
200
200
  "invalid_card_analytics_source",
201
201
  "Dashboard cards with an explicit analytics source must use one of the selected datasets.",
@@ -217,7 +217,7 @@ function ue(e) {
217
217
  ) : [];
218
218
  }
219
219
  function et(e) {
220
- var a, r;
220
+ var r, a;
221
221
  if (!e)
222
222
  return [];
223
223
  const t = [e.source];
@@ -227,16 +227,16 @@ function et(e) {
227
227
  e.primaryMeasure,
228
228
  e.dateField,
229
229
  ...U(e.dimensions),
230
- ...ue(e.filters).map((i) => i.field)
230
+ ...ue(e.filters).map((n) => n.field)
231
231
  ])
232
232
  ) : e.kind === "records" ? t.push(
233
233
  ...P([
234
234
  ...U(e.fields),
235
235
  e.dateField,
236
- (a = e.orderBy) == null ? void 0 : a.field,
237
- ...ue(e.filters).map((i) => i.field)
236
+ (r = e.orderBy) == null ? void 0 : r.field,
237
+ ...ue(e.filters).map((n) => n.field)
238
238
  ])
239
- ) : e.kind === "inputOptions" ? (((r = e.population) == null ? void 0 : r.kind) === "related_population" && t.push(e.population.baseSource), t.push(
239
+ ) : e.kind === "inputOptions" ? (((a = e.population) == null ? void 0 : a.kind) === "related_population" && t.push(e.population.baseSource), t.push(
240
240
  ...P([
241
241
  e.labelField,
242
242
  e.valueField,
@@ -248,14 +248,14 @@ function et(e) {
248
248
  function ge({
249
249
  card: e,
250
250
  datasets: t,
251
- errors: a
251
+ errors: r
252
252
  }) {
253
253
  if (e.type !== "text") {
254
- for (const r of et(e.analyticsIntent))
255
- if (r && !t.some(
256
- (i) => J(i, r)
254
+ for (const a of et(e.analyticsIntent))
255
+ if (a && !t.some(
256
+ (n) => J(n, a)
257
257
  )) {
258
- a.push(
258
+ r.push(
259
259
  f(
260
260
  "invalid_card_query_source",
261
261
  "Dashboard card query field references must use one of the selected datasets.",
@@ -272,13 +272,13 @@ function be({
272
272
  }) {
273
273
  if (e.type === "text" || !e.analyticsIntent)
274
274
  return;
275
- const a = fe(e.analyticsIntent);
276
- if (!a.ok)
277
- for (const r of a.errors)
275
+ const r = fe(e.analyticsIntent);
276
+ if (!r.ok)
277
+ for (const a of r.errors)
278
278
  t.push(
279
279
  f(
280
- r.code,
281
- r.path ? `${r.path}: ${r.message}` : r.message,
280
+ a.code,
281
+ a.path ? `${a.path}: ${a.message}` : a.message,
282
282
  e.id
283
283
  )
284
284
  );
@@ -286,14 +286,14 @@ function be({
286
286
  function Ie({
287
287
  datasets: e,
288
288
  errors: t,
289
- requireAtLeastOne: a
289
+ requireAtLeastOne: r
290
290
  }) {
291
- const r = Ze({
291
+ const a = Ze({
292
292
  datasets: e,
293
- requireAtLeastOne: a
293
+ requireAtLeastOne: r
294
294
  });
295
- if (!r.ok) {
296
- if (r.issue === "invalid_dataset_count") {
295
+ if (!a.ok) {
296
+ if (a.issue === "invalid_dataset_count") {
297
297
  t.push(
298
298
  f(
299
299
  "invalid_dataset_count",
@@ -314,8 +314,8 @@ function Ce({
314
314
  input: e,
315
315
  errors: t
316
316
  }) {
317
- var a;
318
- (a = e.filter.sql) != null && a.trim() && t.push(
317
+ var r;
318
+ (r = e.filter.sql) != null && r.trim() && t.push(
319
319
  f(
320
320
  "generated_filter_sql_out_of_scope",
321
321
  `Generated dashboard filter "${e.label}" must use grounded filter configuration; custom SQL is outside the dashboard-authoring contract.`
@@ -360,20 +360,20 @@ function tt(e) {
360
360
  ],
361
361
  warnings: []
362
362
  };
363
- const a = e, r = [...a.warnings || []];
364
- a.version !== 1 && t.push(f("invalid_version", "Dashboard plan version must be 1.")), (m = a.title) != null && m.trim() || t.push(f("missing_title", "Dashboard plan needs a title."));
365
- const i = Array.isArray(a.datasets) ? a.datasets : [], o = Array.isArray(a.sheets) ? a.sheets : [];
366
- Ie({ datasets: i, errors: t, requireAtLeastOne: !0 }), o.length !== 1 && t.push(
363
+ const r = e, a = [...r.warnings || []];
364
+ r.version !== 1 && t.push(f("invalid_version", "Dashboard plan version must be 1.")), (m = r.title) != null && m.trim() || t.push(f("missing_title", "Dashboard plan needs a title."));
365
+ const n = Array.isArray(r.datasets) ? r.datasets : [], i = Array.isArray(r.sheets) ? r.sheets : [];
366
+ Ie({ datasets: n, errors: t, requireAtLeastOne: !0 }), i.length !== 1 && t.push(
367
367
  f(
368
368
  "invalid_sheet_count",
369
369
  "MVP dashboard authoring creates exactly one dashboard sheet."
370
370
  )
371
371
  );
372
- const n = o[0];
373
- n && n.kind !== "dashboard" && t.push(
372
+ const o = i[0];
373
+ o && o.kind !== "dashboard" && t.push(
374
374
  f("invalid_sheet_kind", 'Generated sheet must use kind "dashboard".')
375
375
  );
376
- const s = (n == null ? void 0 : n.cards) || [];
376
+ const s = (o == null ? void 0 : o.cards) || [];
377
377
  s.length > B && t.push(
378
378
  f(
379
379
  "too_many_cards",
@@ -398,14 +398,14 @@ function tt(e) {
398
398
  "Whole-dashboard authoring supports built-in visual types only.",
399
399
  u.id
400
400
  )
401
- ), u.type !== "text" && !u.analyticsIntent && r.push(
401
+ ), u.type !== "text" && !u.analyticsIntent && a.push(
402
402
  f(
403
403
  "missing_analytics_intent",
404
404
  "Non-text card has no analytics intent and may be skipped by the app layer.",
405
405
  u.id
406
406
  )
407
- ), he({ card: u, datasets: i, errors: t }), be({ card: u, errors: t }), ge({ card: u, datasets: i, errors: t }), Q({ card: u, errors: t });
408
- const p = Array.isArray(a.filterInputs) ? a.filterInputs : [], h = p.map((u) => u.id), y = M(h);
407
+ ), he({ card: u, datasets: n, errors: t }), be({ card: u, errors: t }), ge({ card: u, datasets: n, errors: t }), Q({ card: u, errors: t });
408
+ const p = Array.isArray(r.filterInputs) ? r.filterInputs : [], h = p.map((u) => u.id), y = M(h);
409
409
  y && t.push(
410
410
  f(
411
411
  "duplicate_input_id",
@@ -421,7 +421,7 @@ function tt(e) {
421
421
  );
422
422
  for (const u of p)
423
423
  Ce({ input: u, errors: t });
424
- const c = Array.isArray(a.calculatedFields) ? a.calculatedFields : [];
424
+ const c = Array.isArray(r.calculatedFields) ? r.calculatedFields : [];
425
425
  for (const u of c)
426
426
  u.scope === "domain" && u.reuseOnly !== !0 && t.push(
427
427
  f(
@@ -429,10 +429,10 @@ function tt(e) {
429
429
  `Creating domain calculated field "${u.name}" is outside MVP.`
430
430
  )
431
431
  );
432
- return { ok: t.length === 0, errors: t, warnings: r };
432
+ return { ok: t.length === 0, errors: t, warnings: a };
433
433
  }
434
- function at(e) {
435
- var n;
434
+ function rt(e) {
435
+ var o;
436
436
  const t = [];
437
437
  if (!e || typeof e != "object")
438
438
  return {
@@ -445,17 +445,17 @@ function at(e) {
445
445
  ],
446
446
  warnings: []
447
447
  };
448
- const a = e, r = [...a.warnings || []];
449
- a.version !== 1 && t.push(
448
+ const r = e, a = [...r.warnings || []];
449
+ r.version !== 1 && t.push(
450
450
  f("invalid_version", "Dashboard change plan version must be 1.")
451
- ), (n = a.dashboardId) != null && n.trim() || t.push(
451
+ ), (o = r.dashboardId) != null && o.trim() || t.push(
452
452
  f("missing_dashboard_id", "Dashboard change plan needs a dashboard id.")
453
453
  );
454
- const i = Array.isArray(a.datasets) ? a.datasets : [], o = Array.isArray(a.operations) ? a.operations : [];
455
- Ie({ datasets: i, errors: t, requireAtLeastOne: !1 });
456
- for (const s of o) {
454
+ const n = Array.isArray(r.datasets) ? r.datasets : [], i = Array.isArray(r.operations) ? r.operations : [];
455
+ Ie({ datasets: n, errors: t, requireAtLeastOne: !1 });
456
+ for (const s of i) {
457
457
  if (s.kind === "unsupported") {
458
- r.push(
458
+ a.push(
459
459
  f("unsupported_operation", s.reason || s.requestedAction)
460
460
  );
461
461
  continue;
@@ -468,14 +468,14 @@ function at(e) {
468
468
  )
469
469
  ), s.kind === "addCard" && (he({
470
470
  card: s.card,
471
- datasets: i,
471
+ datasets: n,
472
472
  errors: t
473
473
  }), be({
474
474
  card: s.card,
475
475
  errors: t
476
476
  }), ge({
477
477
  card: s.card,
478
- datasets: i,
478
+ datasets: n,
479
479
  errors: t
480
480
  }), Q({ card: s.card, errors: t })), s.kind === "updateCardSelectionSettings") {
481
481
  const l = s.card;
@@ -505,9 +505,9 @@ function at(e) {
505
505
  )
506
506
  );
507
507
  }
508
- return { ok: t.length === 0, errors: t, warnings: r };
508
+ return { ok: t.length === 0, errors: t, warnings: a };
509
509
  }
510
- const rt = {
510
+ const at = {
511
511
  lg: 48,
512
512
  md: 36,
513
513
  sm: 24,
@@ -515,96 +515,96 @@ const rt = {
515
515
  xxs: 6
516
516
  };
517
517
  function nt(e, t) {
518
- let a = 0, r = 0, i = 0;
519
- return e.map((o) => {
520
- const n = Math.min(o.w, t);
521
- a > 0 && a + n > t && (a = 0, r += i, i = 0);
518
+ let r = 0, a = 0, n = 0;
519
+ return e.map((i) => {
520
+ const o = Math.min(i.w, t);
521
+ r > 0 && r + o > t && (r = 0, a += n, n = 0);
522
522
  const s = {
523
- i: o.frameId,
524
- x: a,
525
- y: r,
526
- w: n,
527
- h: o.h,
528
- minW: Math.min(o.minW, t),
529
- minH: o.minH,
523
+ i: i.frameId,
524
+ x: r,
525
+ y: a,
526
+ w: o,
527
+ h: i.h,
528
+ minW: Math.min(i.minW, t),
529
+ minH: i.minH,
530
530
  static: !1
531
531
  };
532
- return a += n, i = Math.max(i, o.h), s;
532
+ return r += o, n = Math.max(n, i.h), s;
533
533
  });
534
534
  }
535
535
  function it(e) {
536
- const t = [...e].sort((l, d) => l.priority - d.priority), a = t.filter((l) => l.role === "kpi"), r = t.filter((l) => l.role === "chart"), i = t.filter((l) => l.role === "table"), o = t.filter((l) => l.role === "text"), n = o.slice(0, 1), s = o.slice(n.length);
537
- return { kpis: a, introText: n, charts: r, tables: i, supportingText: s };
536
+ const t = [...e].sort((l, d) => l.priority - d.priority), r = t.filter((l) => l.role === "kpi"), a = t.filter((l) => l.role === "chart"), n = t.filter((l) => l.role === "table"), i = t.filter((l) => l.role === "text"), o = i.slice(0, 1), s = i.slice(o.length);
537
+ return { kpis: r, introText: o, charts: a, tables: n, supportingText: s };
538
538
  }
539
- function ot(e, t, a) {
540
- return t === "xxs" || t === "xs" ? a : t === "sm" ? Math.min(12, a) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
539
+ function ot(e, t, r) {
540
+ return t === "xxs" || t === "xs" ? r : t === "sm" ? Math.min(12, r) : t === "md" ? e <= 1 || e === 2 ? 18 : 12 : e <= 1 || e === 2 ? 24 : e === 3 ? 16 : 12;
541
541
  }
542
- function st(e, t, a, r) {
543
- return a === "xxs" || a === "xs" || a === "sm" || a === "md" || t === 1 || t % 2 === 1 && e === 0 ? r : r / 2;
542
+ function st(e, t, r, a) {
543
+ return r === "xxs" || r === "xs" || r === "sm" || r === "md" || t === 1 || t % 2 === 1 && e === 0 ? a : a / 2;
544
544
  }
545
545
  function dt(e) {
546
- const { item: t, band: a, index: r, bandCount: i, breakpoint: o, columns: n } = e;
547
- return a === "kpi" ? {
546
+ const { item: t, band: r, index: a, bandCount: n, breakpoint: i, columns: o } = e;
547
+ return r === "kpi" ? {
548
548
  ...t,
549
- band: a,
550
- w: ot(i, o, n),
549
+ band: r,
550
+ w: ot(n, i, o),
551
551
  h: 15,
552
- minW: Math.min(6, n),
552
+ minW: Math.min(6, o),
553
553
  minH: 12
554
- } : a === "table" ? {
554
+ } : r === "table" ? {
555
555
  ...t,
556
- band: a,
557
- w: n,
558
- h: o === "xxs" || o === "xs" ? 34 : 38,
559
- minW: Math.min(12, n),
556
+ band: r,
557
+ w: o,
558
+ h: i === "xxs" || i === "xs" ? 34 : 38,
559
+ minW: Math.min(12, o),
560
560
  minH: 18
561
- } : a === "introText" ? {
561
+ } : r === "introText" ? {
562
562
  ...t,
563
- band: a,
564
- w: n,
565
- h: o === "xxs" || o === "xs" ? 12 : 10,
566
- minW: Math.min(12, n),
563
+ band: r,
564
+ w: o,
565
+ h: i === "xxs" || i === "xs" ? 12 : 10,
566
+ minW: Math.min(12, o),
567
567
  minH: 8
568
- } : a === "supportingText" ? {
568
+ } : r === "supportingText" ? {
569
569
  ...t,
570
- band: a,
571
- w: o === "lg" ? n / 2 : n,
572
- h: o === "xxs" || o === "xs" ? 12 : 10,
573
- minW: Math.min(12, n),
570
+ band: r,
571
+ w: i === "lg" ? o / 2 : o,
572
+ h: i === "xxs" || i === "xs" ? 12 : 10,
573
+ minW: Math.min(12, o),
574
574
  minH: 8
575
575
  } : {
576
576
  ...t,
577
- band: a,
578
- w: st(r, i, o, n),
579
- h: o === "xxs" || o === "xs" ? 28 : 30,
580
- minW: Math.min(12, n),
577
+ band: r,
578
+ w: st(a, n, i, o),
579
+ h: i === "xxs" || i === "xs" ? 28 : 30,
580
+ minW: Math.min(12, o),
581
581
  minH: 16
582
582
  };
583
583
  }
584
- function A(e, t, a, r) {
584
+ function A(e, t, r, a) {
585
585
  return e.map(
586
- (i, o) => dt({
587
- item: i,
586
+ (n, i) => dt({
587
+ item: n,
588
588
  band: t,
589
- index: o,
589
+ index: i,
590
590
  bandCount: e.length,
591
- breakpoint: a,
592
- columns: r
591
+ breakpoint: r,
592
+ columns: a
593
593
  })
594
594
  );
595
595
  }
596
596
  function Z(e) {
597
597
  const t = it(e);
598
598
  return Object.fromEntries(
599
- xe.map((a) => {
600
- const r = rt[a], i = [
601
- ...A(t.introText, "introText", a, r),
602
- ...A(t.kpis, "kpi", a, r),
603
- ...A(t.charts, "chart", a, r),
604
- ...A(t.tables, "table", a, r),
605
- ...A(t.supportingText, "supportingText", a, r)
599
+ xe.map((r) => {
600
+ const a = at[r], n = [
601
+ ...A(t.introText, "introText", r, a),
602
+ ...A(t.kpis, "kpi", r, a),
603
+ ...A(t.charts, "chart", r, a),
604
+ ...A(t.tables, "table", r, a),
605
+ ...A(t.supportingText, "supportingText", r, a)
606
606
  ];
607
- return [a, nt(i, r)];
607
+ return [r, nt(n, a)];
608
608
  })
609
609
  );
610
610
  }
@@ -631,7 +631,7 @@ function pt(e) {
631
631
  function ee(e, t) {
632
632
  if (t === void 0)
633
633
  return;
634
- const a = ct(e.dataType), r = e.operation || "in";
634
+ const r = ct(e.dataType), a = e.operation || "in";
635
635
  if (ut(t))
636
636
  return j({
637
637
  definition: e,
@@ -640,64 +640,64 @@ function ee(e, t) {
640
640
  ...t,
641
641
  filterId: e.id,
642
642
  name: t.name || e.column,
643
- valueType: a,
643
+ valueType: r,
644
644
  dataType: e.dataType,
645
645
  fieldMeta: e.fieldMeta,
646
646
  semanticContext: e.semanticContext
647
647
  }
648
648
  });
649
- if (r === "is null" || r === "is not null")
649
+ if (a === "is null" || a === "is not null")
650
650
  return j({
651
651
  definition: e,
652
652
  value: {
653
653
  filterId: e.id,
654
654
  name: e.column,
655
- operation: r,
656
- valueType: a,
655
+ operation: a,
656
+ valueType: r,
657
657
  values: [],
658
658
  dataType: e.dataType,
659
659
  fieldMeta: e.fieldMeta,
660
660
  semanticContext: e.semanticContext
661
661
  }
662
662
  });
663
- const i = Array.isArray(t) ? t : [t], o = a === "date" ? pt(i) : ft(i);
664
- if (o.length !== 0 && !((r === "between" || r === "not between") && o.length < 2))
663
+ const n = Array.isArray(t) ? t : [t], i = r === "date" ? pt(n) : ft(n);
664
+ if (i.length !== 0 && !((a === "between" || a === "not between") && i.length < 2))
665
665
  return j({
666
666
  definition: e,
667
667
  value: {
668
668
  filterId: e.id,
669
669
  name: e.column,
670
- operation: r,
671
- valueType: a,
672
- values: o,
670
+ operation: a,
671
+ valueType: r,
672
+ values: i,
673
673
  dataType: e.dataType,
674
674
  fieldMeta: e.fieldMeta,
675
675
  semanticContext: e.semanticContext
676
676
  }
677
677
  });
678
678
  }
679
- function ye(e, t, a) {
680
- return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
679
+ function ye(e, t, r) {
680
+ return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
681
681
  }
682
- function mt(e, t, a) {
683
- const r = (t || []).filter(
684
- (i) => i.scope === "card" && i.targetCardId === a
685
- ).map((i) => i.field).filter(Boolean);
686
- return r.length === 0 ? e : {
682
+ function mt(e, t, r) {
683
+ const a = (t || []).filter(
684
+ (n) => n.scope === "card" && n.targetCardId === r
685
+ ).map((n) => n.field).filter(Boolean);
686
+ return a.length === 0 ? e : {
687
687
  ...e,
688
688
  calculatedFields: [
689
689
  ...e.calculatedFields || [],
690
- ...r
690
+ ...a
691
691
  ]
692
692
  };
693
693
  }
694
- function ht(e, t, a) {
694
+ function ht(e, t, r) {
695
695
  return t.clickToFilter === void 0 && t.respondsToSelections === void 0 ? e : {
696
696
  ...e,
697
697
  ...t.clickToFilter ? {
698
698
  clickToFilter: H(
699
699
  t.clickToFilter,
700
- { cardIds: Object.fromEntries(a) }
700
+ { cardIds: Object.fromEntries(r) }
701
701
  )
702
702
  } : {},
703
703
  ...t.respondsToSelections !== void 0 ? { respondsToSelections: t.respondsToSelections } : {}
@@ -706,15 +706,15 @@ function ht(e, t, a) {
706
706
  function X(e, t) {
707
707
  return Array.from(
708
708
  new Set(
709
- (e || []).map((a) => t.get(a)).filter((a) => !!a)
709
+ (e || []).map((r) => t.get(r)).filter((r) => !!r)
710
710
  )
711
711
  );
712
712
  }
713
713
  function gt(e, t) {
714
714
  if ((e == null ? void 0 : e.kind) !== "cards")
715
715
  return e;
716
- const a = X(e.cardIds, t);
717
- return a.length > 0 ? { ...e, cardIds: a } : null;
716
+ const r = X(e.cardIds, t);
717
+ return r.length > 0 ? { ...e, cardIds: r } : null;
718
718
  }
719
719
  function bt(e, t) {
720
720
  return !e.applyToCardIds && !e.excludeCardIds ? e : {
@@ -734,23 +734,23 @@ function bt(e, t) {
734
734
  };
735
735
  }
736
736
  function It(e, t) {
737
- const a = {}, r = [];
737
+ const r = {}, a = [];
738
738
  return {
739
739
  inputs: (e.filterInputs || []).flatMap(
740
- (o, n) => {
741
- const s = gt(o.scope, t);
740
+ (i, o) => {
741
+ const s = gt(i.scope, t);
742
742
  if (s === null)
743
- return r.push(
743
+ return a.push(
744
744
  ye(
745
745
  "filter_input_scope_empty",
746
- `Filter input "${o.label}" was skipped because all scoped cards were skipped during query validation.`
746
+ `Filter input "${i.label}" was skipped because all scoped cards were skipped during query validation.`
747
747
  )
748
748
  ), [];
749
749
  const l = ee(
750
- o.filter,
751
- o.defaultValue
750
+ i.filter,
751
+ i.defaultValue
752
752
  );
753
- return l && (a.shared ?? (a.shared = {}), a.shared[o.id] = {
753
+ return l && (r.shared ?? (r.shared = {}), r.shared[i.id] = {
754
754
  status: "set",
755
755
  value: {
756
756
  kind: "filter",
@@ -758,27 +758,27 @@ function It(e, t) {
758
758
  }
759
759
  }), [
760
760
  {
761
- id: o.id,
761
+ id: i.id,
762
762
  kind: "filter",
763
- label: o.label,
764
- variableName: o.variableName,
763
+ label: i.label,
764
+ variableName: i.variableName,
765
765
  scope: s || { kind: "allSheets", sheetKinds: ["dashboard"] },
766
766
  runtimeScope: "shared",
767
767
  presentation: {
768
768
  placement: "toolbar",
769
- order: n
769
+ order: o
770
770
  },
771
771
  exports: ["label", "value", "start", "end", "range"],
772
- filter: bt(o.filter, t)
772
+ filter: bt(i.filter, t)
773
773
  }
774
774
  ];
775
775
  }
776
776
  ),
777
- warnings: r,
778
- defaultInputValues: a.shared && Object.keys(a.shared).length > 0 ? a : void 0
777
+ warnings: a,
778
+ defaultInputValues: r.shared && Object.keys(r.shared).length > 0 ? r : void 0
779
779
  };
780
780
  }
781
- function ea(e) {
781
+ function er(e) {
782
782
  var g, b;
783
783
  const t = tt(e.plan);
784
784
  if (!t.ok)
@@ -786,26 +786,26 @@ function ea(e) {
786
786
  t.errors.map((c) => c.message).join(`
787
787
  `) || "Dashboard plan is invalid."
788
788
  );
789
- const a = e.plan.sheets[0], r = [...t.warnings], i = [], o = new Map(
789
+ const r = e.plan.sheets[0], a = [...t.warnings], n = [], i = new Map(
790
790
  e.cardArtifacts.map((c) => [c.planCardId, c])
791
- ), n = new Map(
791
+ ), o = new Map(
792
792
  e.cardArtifacts.map((c) => [
793
793
  c.planCardId,
794
794
  c.card.id
795
795
  ])
796
796
  ), s = [];
797
- for (const c of a.cards) {
798
- const m = o.get(c.id);
797
+ for (const c of r.cards) {
798
+ const m = i.get(c.id);
799
799
  if (!m) {
800
800
  const u = ye(
801
801
  "missing_card_artifact",
802
802
  `Card "${c.title}" was skipped because no generated artifact was supplied.`,
803
803
  c.id
804
804
  );
805
- i.push(u);
805
+ n.push(u);
806
806
  continue;
807
807
  }
808
- r.push(...m.warnings || []);
808
+ a.push(...m.warnings || []);
809
809
  const C = ht(
810
810
  mt(
811
811
  m.card,
@@ -813,7 +813,7 @@ function ea(e) {
813
813
  c.id
814
814
  ),
815
815
  c,
816
- n
816
+ o
817
817
  );
818
818
  s.push({
819
819
  id: c.frameId,
@@ -823,10 +823,10 @@ function ea(e) {
823
823
  }
824
824
  if (s.length === 0)
825
825
  throw new Error("Dashboard plan did not produce any persistable cards.");
826
- const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, n);
827
- r.push(...p);
826
+ const { inputs: l, defaultInputValues: d, warnings: p } = It(e.plan, o);
827
+ a.push(...p);
828
828
  const h = Z(
829
- a.cards.filter((c) => s.some((m) => m.id === c.frameId)).map((c) => ({
829
+ r.cards.filter((c) => s.some((m) => m.id === c.frameId)).map((c) => ({
830
830
  frameId: c.frameId,
831
831
  priority: c.priority,
832
832
  role: c.role
@@ -841,10 +841,10 @@ function ea(e) {
841
841
  interactionDefaults: { clickToFilter: "on" },
842
842
  sheets: [
843
843
  {
844
- id: a.id,
844
+ id: r.id,
845
845
  kind: "dashboard",
846
- title: a.title,
847
- description: a.description,
846
+ title: r.title,
847
+ description: r.description,
848
848
  frames: s,
849
849
  layouts: h,
850
850
  calculatedFields: (g = e.plan.calculatedFields) == null ? void 0 : g.filter((c) => c.scope === "sheet" && c.field).map((c) => c.field)
@@ -853,10 +853,10 @@ function ea(e) {
853
853
  calculatedFields: (b = e.plan.calculatedFields) == null ? void 0 : b.filter((c) => c.scope === "dashboard" && c.field).map((c) => c.field),
854
854
  inputs: l,
855
855
  ...d ? { defaultInputValues: d } : {}
856
- }, warnings: r, skippedOperations: i };
856
+ }, warnings: a, skippedOperations: n };
857
857
  }
858
- function w(e, t, a) {
859
- return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
858
+ function w(e, t, r) {
859
+ return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
860
860
  }
861
861
  function Ct(e) {
862
862
  return JSON.parse(JSON.stringify(e));
@@ -864,42 +864,42 @@ function Ct(e) {
864
864
  function yt(e) {
865
865
  var t;
866
866
  return (t = e.sheets) == null ? void 0 : t.find(
867
- (a) => (a.kind || "dashboard") === "dashboard"
867
+ (r) => (r.kind || "dashboard") === "dashboard"
868
868
  );
869
869
  }
870
870
  function $(e, t) {
871
- var a;
872
- for (const r of e.sheets || [])
873
- for (const i of r.frames || []) {
874
- const o = (a = i.cards) == null ? void 0 : a.find((n) => n.id === t);
875
- if (o)
876
- return { sheet: r, frame: i, card: o };
871
+ var r;
872
+ for (const a of e.sheets || [])
873
+ for (const n of a.frames || []) {
874
+ const i = (r = n.cards) == null ? void 0 : r.find((o) => o.id === t);
875
+ if (i)
876
+ return { sheet: a, frame: n, card: i };
877
877
  }
878
878
  return null;
879
879
  }
880
880
  function _e(e) {
881
- var a, r;
882
- const t = (r = (a = e.cards) == null ? void 0 : a[0]) == null ? void 0 : r.type;
881
+ var r, a;
882
+ const t = (a = (r = e.cards) == null ? void 0 : r[0]) == null ? void 0 : a.type;
883
883
  return t === "kpi" ? "kpi" : t === "table" || t === "detailTable" || t === "pivotTable" ? "table" : t === "text" ? "text" : "chart";
884
884
  }
885
885
  function _t(e) {
886
886
  var t;
887
887
  return new Map(
888
- (((t = e.layouts) == null ? void 0 : t.lg) || []).map((a, r) => [a.i, r])
888
+ (((t = e.layouts) == null ? void 0 : t.lg) || []).map((r, a) => [r.i, a])
889
889
  );
890
890
  }
891
891
  function De(e, t = /* @__PURE__ */ new Map()) {
892
- const a = _t(e), r = Math.max(
893
- a.size,
892
+ const r = _t(e), a = Math.max(
893
+ r.size,
894
894
  t.size
895
- ), i = (e.frames || []).map(
896
- (o, n) => ({
897
- frameId: o.id,
898
- role: _e(o),
899
- priority: t.get(o.id) ?? a.get(o.id) ?? r + n
895
+ ), n = (e.frames || []).map(
896
+ (i, o) => ({
897
+ frameId: i.id,
898
+ role: _e(i),
899
+ priority: t.get(i.id) ?? r.get(i.id) ?? a + o
900
900
  })
901
901
  );
902
- e.layouts = Z(i);
902
+ e.layouts = Z(n);
903
903
  }
904
904
  function Dt(e) {
905
905
  return Object.values(e.layouts || {}).some((t) => t.length > 0);
@@ -909,57 +909,57 @@ function St(e, t) {
909
909
  De(e);
910
910
  return;
911
911
  }
912
- const a = Z([
912
+ const r = Z([
913
913
  { frameId: t.id, role: _e(t), priority: 0 }
914
914
  ]);
915
915
  e.layouts ?? (e.layouts = {});
916
- for (const [r, i] of Object.entries(a)) {
917
- const o = e.layouts[r] || [];
918
- if (o.some((l) => l.i === t.id))
916
+ for (const [a, n] of Object.entries(r)) {
917
+ const i = e.layouts[a] || [];
918
+ if (i.some((l) => l.i === t.id))
919
919
  continue;
920
- const n = i[0];
921
- if (!n)
920
+ const o = n[0];
921
+ if (!o)
922
922
  continue;
923
- const s = o.reduce(
923
+ const s = i.reduce(
924
924
  (l, d) => Math.max(l, d.y + d.h),
925
925
  0
926
926
  );
927
- e.layouts[r] = [
928
- ...o,
929
- { ...n, y: s }
927
+ e.layouts[a] = [
928
+ ...i,
929
+ { ...o, y: s }
930
930
  ];
931
931
  }
932
932
  }
933
933
  function vt(e, t) {
934
- var r;
935
- const a = ee(
934
+ var a;
935
+ const r = ee(
936
936
  t.filter,
937
937
  t.defaultValue
938
938
  );
939
- a && (e.defaultInputValues ?? (e.defaultInputValues = {}), (r = e.defaultInputValues).shared ?? (r.shared = {}), e.defaultInputValues.shared[t.id] = {
939
+ r && (e.defaultInputValues ?? (e.defaultInputValues = {}), (a = e.defaultInputValues).shared ?? (a.shared = {}), e.defaultInputValues.shared[t.id] = {
940
940
  status: "set",
941
941
  value: {
942
942
  kind: "filter",
943
- filterValue: a
943
+ filterValue: r
944
944
  }
945
945
  });
946
946
  }
947
- function ta(e) {
947
+ function tr(e) {
948
948
  var l;
949
- const t = at(e.changePlan);
949
+ const t = rt(e.changePlan);
950
950
  if (!t.ok)
951
951
  throw new Error(
952
952
  t.errors.map((d) => d.message).join(`
953
953
  `) || "Dashboard change plan is invalid."
954
954
  );
955
- const a = Ct(e.dashboard), r = [...t.warnings], i = [], o = new Map(
955
+ const r = Ct(e.dashboard), a = [...t.warnings], n = [], i = new Map(
956
956
  e.cardArtifacts.map((d) => [d.planCardId, d])
957
- ), n = new Map(
957
+ ), o = new Map(
958
958
  e.cardArtifacts.map((d) => [
959
959
  d.planCardId,
960
960
  d.card.id
961
961
  ])
962
- ), s = yt(a);
962
+ ), s = yt(r);
963
963
  if (!s)
964
964
  throw new Error("Dashboard has no editable dashboard sheet.");
965
965
  s.frames ?? (s.frames = []);
@@ -973,7 +973,7 @@ function ta(e) {
973
973
  },
974
974
  0
975
975
  ) >= B) {
976
- i.push(
976
+ n.push(
977
977
  w(
978
978
  "generated_card_limit_reached",
979
979
  `AI refinement is capped at ${B} cards.`,
@@ -982,9 +982,9 @@ function ta(e) {
982
982
  );
983
983
  break;
984
984
  }
985
- const h = o.get(d.card.id);
985
+ const h = i.get(d.card.id);
986
986
  if (!h) {
987
- i.push(
987
+ n.push(
988
988
  w(
989
989
  "missing_card_artifact",
990
990
  `Card "${d.card.title}" was skipped because no generated artifact was supplied.`,
@@ -998,7 +998,7 @@ function ta(e) {
998
998
  ...d.card.clickToFilter ? {
999
999
  clickToFilter: H(
1000
1000
  d.card.clickToFilter,
1001
- { cardIds: Object.fromEntries(n) }
1001
+ { cardIds: Object.fromEntries(o) }
1002
1002
  )
1003
1003
  } : {},
1004
1004
  ...d.card.respondsToSelections !== void 0 ? {
@@ -1013,7 +1013,7 @@ function ta(e) {
1013
1013
  break;
1014
1014
  }
1015
1015
  case "addFilterInput": {
1016
- a.inputs ?? (a.inputs = []);
1016
+ r.inputs ?? (r.inputs = []);
1017
1017
  const p = {
1018
1018
  id: d.input.id,
1019
1019
  kind: "filter",
@@ -1026,22 +1026,22 @@ function ta(e) {
1026
1026
  runtimeScope: "shared",
1027
1027
  presentation: {
1028
1028
  placement: "toolbar",
1029
- order: a.inputs.length
1029
+ order: r.inputs.length
1030
1030
  },
1031
1031
  exports: ["label", "value", "start", "end", "range"],
1032
1032
  filter: d.input.filter
1033
1033
  };
1034
- a.inputs.push(p), vt(a, d.input);
1034
+ r.inputs.push(p), vt(r, d.input);
1035
1035
  break;
1036
1036
  }
1037
1037
  case "addCalculatedField": {
1038
1038
  if (d.field.scope === "dashboard" && d.field.field)
1039
- a.calculatedFields ?? (a.calculatedFields = []), a.calculatedFields.push(d.field.field);
1039
+ r.calculatedFields ?? (r.calculatedFields = []), r.calculatedFields.push(d.field.field);
1040
1040
  else if (d.field.scope === "sheet" && d.field.field)
1041
1041
  s.calculatedFields ?? (s.calculatedFields = []), s.calculatedFields.push(d.field.field);
1042
1042
  else if (d.field.scope === "card" && d.field.field) {
1043
- const p = d.field.targetCardId ? $(a, d.field.targetCardId) : null;
1044
- p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) : i.push(
1043
+ const p = d.field.targetCardId ? $(r, d.field.targetCardId) : null;
1044
+ p ? ((l = p.card).calculatedFields ?? (l.calculatedFields = []), p.card.calculatedFields.push(d.field.field)) : n.push(
1045
1045
  w(
1046
1046
  "missing_calculated_field_target",
1047
1047
  `Calculated field "${d.field.name}" needs a valid target card.`
@@ -1051,9 +1051,9 @@ function ta(e) {
1051
1051
  break;
1052
1052
  }
1053
1053
  case "renameCard": {
1054
- const p = $(a, d.cardId);
1054
+ const p = $(r, d.cardId);
1055
1055
  if (!p) {
1056
- i.push(
1056
+ n.push(
1057
1057
  w(
1058
1058
  "card_not_found",
1059
1059
  `Card "${d.cardId}" could not be renamed because it was not found.`,
@@ -1066,9 +1066,9 @@ function ta(e) {
1066
1066
  break;
1067
1067
  }
1068
1068
  case "updateCardSelectionSettings": {
1069
- const p = n.get(d.cardId) ?? d.cardId, h = $(a, p);
1069
+ const p = o.get(d.cardId) ?? d.cardId, h = $(r, p);
1070
1070
  if (!h) {
1071
- i.push(
1071
+ n.push(
1072
1072
  w(
1073
1073
  "card_not_found",
1074
1074
  `Card "${d.cardId}" could not be updated because it was not found.`,
@@ -1079,21 +1079,21 @@ function ta(e) {
1079
1079
  }
1080
1080
  d.card.clickToFilter !== void 0 && (h.card.clickToFilter = H(
1081
1081
  d.card.clickToFilter,
1082
- { cardIds: Object.fromEntries(n) }
1082
+ { cardIds: Object.fromEntries(o) }
1083
1083
  )), d.card.respondsToSelections !== void 0 && (h.card.respondsToSelections = d.card.respondsToSelections);
1084
1084
  break;
1085
1085
  }
1086
1086
  case "reorderCards": {
1087
1087
  const p = /* @__PURE__ */ new Map();
1088
1088
  for (let h = 0; h < d.cardIds.length; h += 1) {
1089
- const y = d.cardIds[h], g = $(a, y);
1089
+ const y = d.cardIds[h], g = $(r, y);
1090
1090
  g && p.set(g.frame.id, h);
1091
1091
  }
1092
1092
  De(s, p);
1093
1093
  break;
1094
1094
  }
1095
1095
  case "reuseCalculatedField":
1096
- r.push(
1096
+ a.push(
1097
1097
  w(
1098
1098
  "reused_calculated_field",
1099
1099
  `Calculated field "${d.fieldId}" is reused by reference.`
@@ -1101,26 +1101,26 @@ function ta(e) {
1101
1101
  );
1102
1102
  break;
1103
1103
  case "unsupported":
1104
- i.push(
1104
+ n.push(
1105
1105
  w("unsupported_operation", d.reason || d.requestedAction)
1106
1106
  );
1107
1107
  break;
1108
1108
  }
1109
- return { dashboard: a, warnings: r, skippedOperations: i };
1109
+ return { dashboard: r, warnings: a, skippedOperations: n };
1110
1110
  }
1111
- function _(e, t, a) {
1112
- return a ? { code: e, message: t, cardId: a } : { code: e, message: t };
1111
+ function _(e, t, r) {
1112
+ return r ? { code: e, message: t, cardId: r } : { code: e, message: t };
1113
1113
  }
1114
- function O(e, t) {
1114
+ function R(e, t) {
1115
1115
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || t;
1116
1116
  }
1117
1117
  function Se(e, t) {
1118
1118
  if (!t.has(e))
1119
1119
  return t.add(e), e;
1120
- let a = 2, r = `${e}-${a}`;
1121
- for (; t.has(r); )
1122
- a += 1, r = `${e}-${a}`;
1123
- return t.add(r), r;
1120
+ let r = 2, a = `${e}-${r}`;
1121
+ for (; t.has(a); )
1122
+ r += 1, a = `${e}-${r}`;
1123
+ return t.add(a), a;
1124
1124
  }
1125
1125
  function E(e) {
1126
1126
  return !!(e && typeof e == "object");
@@ -1135,7 +1135,7 @@ function te(e) {
1135
1135
  (t) => E(t)
1136
1136
  ) : [];
1137
1137
  }
1138
- function ae(e) {
1138
+ function re(e) {
1139
1139
  return Array.isArray(e.views) ? e.views.filter(
1140
1140
  (t) => E(t)
1141
1141
  ) : [];
@@ -1144,104 +1144,104 @@ function F(e) {
1144
1144
  if (!Array.isArray(e))
1145
1145
  return [];
1146
1146
  const t = [];
1147
- for (const a of e) {
1148
- const r = v(a);
1149
- r && t.push(r);
1147
+ for (const r of e) {
1148
+ const a = v(r);
1149
+ a && t.push(a);
1150
1150
  }
1151
1151
  return t;
1152
1152
  }
1153
1153
  function Tt(e) {
1154
- var r, i, o;
1154
+ var a, n, i;
1155
1155
  if (!e)
1156
1156
  return [];
1157
1157
  const t = [];
1158
- if (R(e.source) && t.push(e.source), e.kind === "metric") {
1158
+ if (O(e.source) && t.push(e.source), e.kind === "metric") {
1159
1159
  t.push(...F(e.measures));
1160
- const n = v(e.dateField);
1161
- n && t.push(n), t.push(...F(e.dimensions)), t.push(
1160
+ const o = v(e.dateField);
1161
+ o && t.push(o), t.push(...F(e.dimensions)), t.push(
1162
1162
  ...F(
1163
- (r = e.filters) == null ? void 0 : r.map((s) => s.field)
1163
+ (a = e.filters) == null ? void 0 : a.map((s) => s.field)
1164
1164
  )
1165
1165
  );
1166
1166
  } else if (e.kind === "records") {
1167
- const n = v(e.dateField);
1168
- n && t.push(n), t.push(...F(e.fields)), t.push(
1167
+ const o = v(e.dateField);
1168
+ o && t.push(o), t.push(...F(e.fields)), t.push(
1169
1169
  ...F(
1170
- (i = e.filters) == null ? void 0 : i.map((s) => s.field)
1170
+ (n = e.filters) == null ? void 0 : n.map((s) => s.field)
1171
1171
  )
1172
1172
  );
1173
- } else e.kind === "inputOptions" ? (((o = e.population) == null ? void 0 : o.kind) === "related_population" && R(e.population.baseSource) && t.push(e.population.baseSource), t.push(
1173
+ } else e.kind === "inputOptions" ? (((i = e.population) == null ? void 0 : i.kind) === "related_population" && O(e.population.baseSource) && t.push(e.population.baseSource), t.push(
1174
1174
  ...F([
1175
1175
  e.labelField,
1176
1176
  e.valueField,
1177
1177
  e.searchField,
1178
1178
  ...e.disambiguationFields || []
1179
- ].filter((n) => !!n))
1179
+ ].filter((o) => !!o))
1180
1180
  )) : e.kind === "sql" && t.push(...F(e.fields));
1181
- const a = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
1182
- for (const n of a) {
1183
- const s = v(n.field);
1181
+ const r = "inputs" in e && Array.isArray(e.inputs) ? e.inputs : [];
1182
+ for (const o of r) {
1183
+ const s = v(o.field);
1184
1184
  s && t.push(s);
1185
1185
  }
1186
1186
  return t;
1187
1187
  }
1188
1188
  function wt(e) {
1189
1189
  const t = [];
1190
- for (const a of ve(e)) {
1191
- const r = v(a.field);
1192
- r && t.push(r);
1190
+ for (const r of ve(e)) {
1191
+ const a = v(r.field);
1192
+ a && t.push(a);
1193
1193
  }
1194
- for (const a of te(e))
1195
- for (const r of ae(a))
1196
- t.push(...Tt(r.analytics));
1194
+ for (const r of te(e))
1195
+ for (const a of re(r))
1196
+ t.push(...Tt(a.analytics));
1197
1197
  return t;
1198
1198
  }
1199
1199
  function Ft(e) {
1200
- var a;
1200
+ var r;
1201
1201
  const t = [];
1202
- for (const r of te(e))
1203
- for (const i of ae(r))
1204
- R((a = i.analytics) == null ? void 0 : a.source) && t.push(i.analytics.source);
1202
+ for (const a of te(e))
1203
+ for (const n of re(a))
1204
+ O((r = n.analytics) == null ? void 0 : r.source) && t.push(n.analytics.source);
1205
1205
  return t;
1206
1206
  }
1207
1207
  function xt(e, t) {
1208
- const a = q(e).filter(R);
1209
- if (a.length === 0)
1208
+ const r = q(e).filter(O);
1209
+ if (r.length === 0)
1210
1210
  return t.push(
1211
1211
  _(
1212
1212
  "missing_materializable_dataset",
1213
1213
  "No semantic or physical source could be converted into the current dashboard authoring dataset reference."
1214
1214
  )
1215
1215
  ), [];
1216
- const r = a.every((o) => o.kind === "semantic"), i = Array.from(
1216
+ const a = r.every((i) => i.kind === "semantic"), n = Array.from(
1217
1217
  new Set(
1218
- a.filter((o) => o.kind === "semantic").map((o) => o.domainId)
1218
+ r.filter((i) => i.kind === "semantic").map((i) => i.domainId)
1219
1219
  )
1220
1220
  );
1221
- return a.length > 1 && (!r || i.length !== 1) ? (t.push(
1221
+ return r.length > 1 && (!a || n.length !== 1) ? (t.push(
1222
1222
  _(
1223
1223
  "multiple_datasets_out_of_scope",
1224
1224
  "The dashboard authoring compiler supports multiple datasets only within one semantic domain; using the first source and deferring the rest."
1225
1225
  )
1226
- ), [a[0]]) : a;
1226
+ ), [r[0]]) : r;
1227
1227
  }
1228
1228
  function kt(e, t) {
1229
- const a = te(e), r = ve(e), i = q(wt(e)), o = q(
1229
+ const r = te(e), a = ve(e), n = q(wt(e)), i = q(
1230
1230
  Ft(e)
1231
1231
  );
1232
1232
  return {
1233
- sections: a,
1234
- inputs: r,
1235
- sources: i,
1236
- primarySources: o,
1237
- defaultSource: o.length === 1 ? o[0] : void 0,
1238
- datasets: xt(i, t)
1233
+ sections: r,
1234
+ inputs: a,
1235
+ sources: n,
1236
+ primarySources: i,
1237
+ defaultSource: i.length === 1 ? i[0] : void 0,
1238
+ datasets: xt(n, t)
1239
1239
  };
1240
1240
  }
1241
1241
  function At(e) {
1242
1242
  return e && fe(e).ok ? e : void 0;
1243
1243
  }
1244
- function Ot(e) {
1244
+ function Rt(e) {
1245
1245
  var t;
1246
1246
  switch ((t = e.presentation) == null ? void 0 : t.kind) {
1247
1247
  case "kpi":
@@ -1260,9 +1260,9 @@ function Ot(e) {
1260
1260
  return null;
1261
1261
  }
1262
1262
  }
1263
- function Rt(e) {
1264
- var t, a, r;
1265
- return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((a = e.presentation) == null ? void 0 : a.kind) === "table" ? "table" : ((r = e.presentation) == null ? void 0 : r.kind) === "text" ? "text" : "chart";
1263
+ function Ot(e) {
1264
+ var t, r, a;
1265
+ return ((t = e.presentation) == null ? void 0 : t.kind) === "kpi" ? "kpi" : ((r = e.presentation) == null ? void 0 : r.kind) === "table" ? "table" : ((a = e.presentation) == null ? void 0 : a.kind) === "text" ? "text" : "chart";
1266
1266
  }
1267
1267
  function Et(e) {
1268
1268
  const t = Be(e);
@@ -1286,29 +1286,29 @@ function Mt(e) {
1286
1286
  if (!(!e || e.kind !== "physical"))
1287
1287
  return [e.databaseName, e.schemaName, e.tableName].filter(Boolean).join(".");
1288
1288
  }
1289
- function Pt(e, t, a, r, i, o) {
1289
+ function Pt(e, t, r, a, n, i) {
1290
1290
  if (e.kind !== "filter")
1291
- return o.push(
1291
+ return i.push(
1292
1292
  _(
1293
1293
  "control_inputs_deferred",
1294
1294
  `Control input "${e.label}" is represented in the protocol but not yet materialized by the dashboard authoring adapter.`
1295
1295
  )
1296
1296
  ), null;
1297
1297
  if (!E(e.field) || typeof e.field.name != "string")
1298
- return o.push(
1298
+ return i.push(
1299
1299
  _(
1300
1300
  "filter_requires_field",
1301
1301
  `Filter "${e.label || e.id}" needs a field before the dashboard compiler can materialize it.`
1302
1302
  )
1303
1303
  ), null;
1304
- const n = Ge({
1304
+ const o = Ge({
1305
1305
  explicitSource: void 0,
1306
1306
  field: e.field,
1307
1307
  defaultSource: t,
1308
- fallbackSources: a
1309
- }), s = (n == null ? void 0 : n.kind) === "semantic" || (n == null ? void 0 : n.kind) === "physical" ? n.connectionId : void 0;
1308
+ fallbackSources: r
1309
+ }), s = (o == null ? void 0 : o.kind) === "semantic" || (o == null ? void 0 : o.kind) === "physical" ? o.connectionId : void 0;
1310
1310
  if (!s)
1311
- return o.push(
1311
+ return i.push(
1312
1312
  _(
1313
1313
  "filter_requires_connection_id",
1314
1314
  `Filter "${e.label}" needs a source connectionId before the dashboard compiler can materialize it.`
@@ -1316,41 +1316,41 @@ function Pt(e, t, a, r, i, o) {
1316
1316
  ), null;
1317
1317
  const p = {
1318
1318
  id: `filter-${Se(
1319
- O(e.id, e.field.name),
1320
- i
1319
+ R(e.id, e.field.name),
1320
+ n
1321
1321
  )}`,
1322
1322
  variableName: e.id,
1323
1323
  connectionId: s,
1324
1324
  title: e.label,
1325
1325
  column: e.field.name,
1326
1326
  dataType: Nt(e),
1327
- qualifiedTableName: Mt(n),
1327
+ qualifiedTableName: Mt(o),
1328
1328
  sql: "",
1329
1329
  operation: Et(e.operator),
1330
1330
  type: e.multi === !1 ? "single" : "multiple",
1331
1331
  location: "dashboard",
1332
1332
  displayMode: "toolbar",
1333
- fieldMeta: (n == null ? void 0 : n.kind) === "semantic" ? {
1333
+ fieldMeta: (o == null ? void 0 : o.kind) === "semantic" ? {
1334
1334
  name: e.field.name,
1335
1335
  qualifiedFieldName: e.field.name,
1336
1336
  dataType: e.field.dataType,
1337
1337
  role: e.field.role === "measure" ? "metric" : "groupby"
1338
1338
  } : void 0,
1339
- semanticContext: (n == null ? void 0 : n.kind) === "semantic" ? {
1340
- semanticDomainId: n.domainId,
1341
- connectionId: n.connectionId
1342
- } : (n == null ? void 0 : n.kind) === "physical" ? {
1343
- connectionId: n.connectionId,
1344
- connectionType: n.connectionType,
1339
+ semanticContext: (o == null ? void 0 : o.kind) === "semantic" ? {
1340
+ semanticDomainId: o.domainId,
1341
+ connectionId: o.connectionId
1342
+ } : (o == null ? void 0 : o.kind) === "physical" ? {
1343
+ connectionId: o.connectionId,
1344
+ connectionType: o.connectionType,
1345
1345
  selectedEntities: [
1346
1346
  {
1347
1347
  type: "table",
1348
- connectionId: n.connectionId,
1349
- connectionType: n.connectionType,
1350
- dialect: n.dialect,
1351
- database: n.databaseName,
1352
- schema: n.schemaName,
1353
- name: n.tableName
1348
+ connectionId: o.connectionId,
1349
+ connectionType: o.connectionType,
1350
+ dialect: o.dialect,
1351
+ database: o.databaseName,
1352
+ schema: o.schemaName,
1353
+ name: o.tableName
1354
1354
  }
1355
1355
  ]
1356
1356
  } : void 0
@@ -1359,7 +1359,7 @@ function Pt(e, t, a, r, i, o) {
1359
1359
  id: e.id,
1360
1360
  label: e.label,
1361
1361
  variableName: e.id,
1362
- scope: r,
1362
+ scope: a,
1363
1363
  filter: p,
1364
1364
  defaultValue: ee(
1365
1365
  p,
@@ -1368,28 +1368,28 @@ function Pt(e, t, a, r, i, o) {
1368
1368
  };
1369
1369
  }
1370
1370
  function G(e) {
1371
- const t = [], a = [];
1372
- for (const r of e.viewIds) {
1373
- const i = e.viewIdToCardId.get(r);
1374
- i ? t.push(i) : a.push(r);
1371
+ const t = [], r = [];
1372
+ for (const a of e.viewIds) {
1373
+ const n = e.viewIdToCardId.get(a);
1374
+ n ? t.push(n) : r.push(a);
1375
1375
  }
1376
- return a.length > 0 && e.warnings.push(
1376
+ return r.length > 0 && e.warnings.push(
1377
1377
  _(
1378
1378
  "input_scope_view_not_found",
1379
- `Filter "${e.inputLabel}" referenced unknown view ids: ${a.join(", ")}.`
1379
+ `Filter "${e.inputLabel}" referenced unknown view ids: ${r.join(", ")}.`
1380
1380
  )
1381
1381
  ), Array.from(new Set(t));
1382
1382
  }
1383
1383
  function $t(e) {
1384
- var r, i;
1384
+ var a, n;
1385
1385
  if (!e.protocolScope) {
1386
- const o = Array.from(new Set(e.boundCardIds));
1387
- return o.length > 0 && o.length < e.allCardIds.length ? { kind: "cards", cardIds: o } : void 0;
1386
+ const i = Array.from(new Set(e.boundCardIds));
1387
+ return i.length > 0 && i.length < e.allCardIds.length ? { kind: "cards", cardIds: i } : void 0;
1388
1388
  }
1389
1389
  if (e.protocolScope.level === "dashboard") {
1390
- if (!((r = e.protocolScope.excludeViewIds) != null && r.length))
1390
+ if (!((a = e.protocolScope.excludeViewIds) != null && a.length))
1391
1391
  return;
1392
- const o = new Set(
1392
+ const i = new Set(
1393
1393
  G({
1394
1394
  inputLabel: e.inputLabel,
1395
1395
  viewIds: e.protocolScope.excludeViewIds,
@@ -1399,22 +1399,22 @@ function $t(e) {
1399
1399
  );
1400
1400
  return {
1401
1401
  kind: "cards",
1402
- cardIds: e.allCardIds.filter((n) => !o.has(n))
1402
+ cardIds: e.allCardIds.filter((o) => !i.has(o))
1403
1403
  };
1404
1404
  }
1405
1405
  if (e.protocolScope.level === "view") {
1406
- const o = G({
1406
+ const i = G({
1407
1407
  inputLabel: e.inputLabel,
1408
1408
  viewIds: e.protocolScope.viewIds,
1409
1409
  viewIdToCardId: e.viewIdToCardId,
1410
1410
  warnings: e.warnings
1411
1411
  });
1412
- return o.length === 0 ? (e.warnings.push(
1412
+ return i.length === 0 ? (e.warnings.push(
1413
1413
  _(
1414
1414
  "input_scope_has_no_materialized_cards",
1415
1415
  `Filter "${e.inputLabel}" was deferred because its view scope does not match any materialized cards.`
1416
1416
  )
1417
- ), null) : { kind: "cards", cardIds: o };
1417
+ ), null) : { kind: "cards", cardIds: i };
1418
1418
  }
1419
1419
  const t = e.sectionIdToCardIds.get(e.protocolScope.sectionId) || [];
1420
1420
  if (t.length === 0)
@@ -1424,9 +1424,9 @@ function $t(e) {
1424
1424
  `Filter "${e.inputLabel}" was deferred because section "${e.protocolScope.sectionId}" does not match any materialized cards.`
1425
1425
  )
1426
1426
  ), null;
1427
- if (!((i = e.protocolScope.excludeViewIds) != null && i.length))
1427
+ if (!((n = e.protocolScope.excludeViewIds) != null && n.length))
1428
1428
  return { kind: "cards", cardIds: t };
1429
- const a = new Set(
1429
+ const r = new Set(
1430
1430
  G({
1431
1431
  inputLabel: e.inputLabel,
1432
1432
  viewIds: e.protocolScope.excludeViewIds,
@@ -1436,23 +1436,23 @@ function $t(e) {
1436
1436
  );
1437
1437
  return {
1438
1438
  kind: "cards",
1439
- cardIds: t.filter((o) => !a.has(o))
1439
+ cardIds: t.filter((i) => !r.has(i))
1440
1440
  };
1441
1441
  }
1442
- function aa(e) {
1442
+ function rr(e) {
1443
1443
  var g, b, c;
1444
- const t = [], a = Le(e);
1445
- for (const m of a.warnings)
1444
+ const t = [], r = Le(e);
1445
+ for (const m of r.warnings)
1446
1446
  t.push(_(m.code, m.message));
1447
- for (const m of a.errors)
1447
+ for (const m of r.errors)
1448
1448
  t.push(_(m.code, m.message));
1449
- const r = kt(e, t), i = [], o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1449
+ const a = kt(e, t), n = [], i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
1450
1450
  let p = 0;
1451
- for (const [m, C] of r.sections.entries()) {
1452
- const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id || O(u, `section-${m + 1}`);
1453
- n.set(ne, []);
1454
- for (const [ie, I] of ae(C).entries()) {
1455
- const oe = Ot(I), V = O(
1451
+ for (const [m, C] of a.sections.entries()) {
1452
+ const u = typeof C.title == "string" ? C.title : `Section ${m + 1}`, ne = C.id || R(u, `section-${m + 1}`);
1453
+ o.set(ne, []);
1454
+ for (const [ie, I] of re(C).entries()) {
1455
+ const oe = Rt(I), V = R(
1456
1456
  I.id || `${u}-${I.title || `View ${ie + 1}`}`,
1457
1457
  `card-${m + 1}-${ie + 1}`
1458
1458
  );
@@ -1477,19 +1477,19 @@ function aa(e) {
1477
1477
  continue;
1478
1478
  }
1479
1479
  const se = Se(V, l), N = `card-${se}`;
1480
- I.id && o.set(I.id, N), (c = n.get(ne)) == null || c.push(N);
1480
+ I.id && i.set(I.id, N), (c = o.get(ne)) == null || c.push(N);
1481
1481
  const Te = I.analytics && "inputs" in I.analytics ? I.analytics.inputs : void 0;
1482
1482
  for (const de of Te || []) {
1483
1483
  const ce = s.get(de.inputId) || [];
1484
1484
  ce.push(N), s.set(de.inputId, ce);
1485
1485
  }
1486
- i.push({
1486
+ n.push({
1487
1487
  id: N,
1488
1488
  frameId: `frame-${se}`,
1489
1489
  title: I.title,
1490
1490
  description: I.description,
1491
1491
  type: oe,
1492
- role: Rt(I),
1492
+ role: Ot(I),
1493
1493
  priority: p,
1494
1494
  section: u,
1495
1495
  analyticsIntent: At(I.analytics),
@@ -1497,20 +1497,20 @@ function aa(e) {
1497
1497
  }), p += 1;
1498
1498
  }
1499
1499
  }
1500
- const h = r.inputs.map((m) => {
1500
+ const h = a.inputs.map((m) => {
1501
1501
  const C = $t({
1502
1502
  protocolScope: m.scope,
1503
1503
  inputLabel: m.label,
1504
- allCardIds: i.map((u) => u.id),
1504
+ allCardIds: n.map((u) => u.id),
1505
1505
  boundCardIds: s.get(m.id) || [],
1506
- viewIdToCardId: o,
1507
- sectionIdToCardIds: n,
1506
+ viewIdToCardId: i,
1507
+ sectionIdToCardIds: o,
1508
1508
  warnings: t
1509
1509
  });
1510
1510
  return C === null ? null : Pt(
1511
1511
  m,
1512
- r.defaultSource,
1513
- r.sources,
1512
+ a.defaultSource,
1513
+ a.sources,
1514
1514
  C,
1515
1515
  d,
1516
1516
  t
@@ -1518,25 +1518,25 @@ function aa(e) {
1518
1518
  }).filter((m) => !!m);
1519
1519
  return { plan: {
1520
1520
  version: 1,
1521
- id: `plan-${O(e.title, "dashboard")}`,
1521
+ id: `plan-${R(e.title, "dashboard")}`,
1522
1522
  title: e.title,
1523
1523
  description: e.description,
1524
- datasets: r.datasets,
1524
+ datasets: a.datasets,
1525
1525
  sheets: [
1526
1526
  {
1527
- id: `sheet-${O(e.title, "dashboard")}`,
1527
+ id: `sheet-${R(e.title, "dashboard")}`,
1528
1528
  title: e.title,
1529
1529
  description: e.description,
1530
1530
  kind: "dashboard",
1531
- cards: i
1531
+ cards: n
1532
1532
  }
1533
1533
  ],
1534
1534
  filterInputs: h.length ? h : void 0,
1535
1535
  warnings: t.length ? t : void 0,
1536
- unresolvedRequests: a.ok ? void 0 : a.errors.map((m) => m.message)
1536
+ unresolvedRequests: r.ok ? void 0 : r.errors.map((m) => m.message)
1537
1537
  }, warnings: t };
1538
1538
  }
1539
- const ra = [
1539
+ const ar = [
1540
1540
  "cardType",
1541
1541
  "sql",
1542
1542
  "python",
@@ -1551,273 +1551,287 @@ const ra = [
1551
1551
  "resolvedPrimaryDateField",
1552
1552
  "globalDateComparison",
1553
1553
  "calendarContext"
1554
- ], na = [
1554
+ ], nr = [
1555
1555
  "cardId",
1556
1556
  "cardTitle",
1557
1557
  "cache_config",
1558
1558
  "queryConfig",
1559
1559
  "tableConfig"
1560
1560
  ];
1561
- class S extends Error {
1562
- constructor(a, r, i) {
1563
- super(a);
1561
+ class D extends Error {
1562
+ constructor(r, a, n) {
1563
+ super(r);
1564
1564
  z(this, "field");
1565
1565
  z(this, "details");
1566
- Object.setPrototypeOf(this, S.prototype), this.name = "CardQueryRequestError", this.field = r, this.details = i;
1566
+ Object.setPrototypeOf(this, D.prototype), this.name = "CardQueryRequestError", this.field = a, this.details = n;
1567
1567
  }
1568
1568
  }
1569
- function re(e) {
1569
+ function ae(e) {
1570
1570
  return e.label ? `${e.label}.` : "";
1571
1571
  }
1572
- function k(e) {
1572
+ function x(e) {
1573
1573
  return !e || typeof e != "object" || Array.isArray(e) ? {} : { ...e };
1574
1574
  }
1575
1575
  function L(e) {
1576
1576
  return typeof e == "string" ? e : "";
1577
1577
  }
1578
1578
  function Lt(e, t = {}) {
1579
- const a = k(e), r = re(t), i = {};
1580
- if (a.calendarContext !== void 0) {
1581
- const n = ze(a.calendarContext);
1582
- if (!n.ok)
1583
- throw new S(
1584
- `${r}calendarContext: ${n.issues.map((s) => s.message).join("; ")}`,
1579
+ const r = x(e), a = ae(t), n = {};
1580
+ if (r.calendarContext !== void 0) {
1581
+ const o = ze(r.calendarContext);
1582
+ if (!o.ok)
1583
+ throw new D(
1584
+ `${a}calendarContext: ${o.issues.map((s) => s.message).join("; ")}`,
1585
1585
  "calendarContext",
1586
- n.issues
1586
+ o.issues
1587
1587
  );
1588
- i.calendarContext = n.value;
1588
+ n.calendarContext = o.value;
1589
1589
  }
1590
- const o = Oe(a.resolvedPrimaryDateField);
1591
- if (!o.ok)
1592
- throw new S(
1593
- `${r}${Re(o.issues)}`,
1590
+ const i = Re(r.resolvedPrimaryDateField);
1591
+ if (!i.ok)
1592
+ throw new D(
1593
+ `${a}${Oe(i.issues)}`,
1594
1594
  "resolvedPrimaryDateField",
1595
- o.issues
1595
+ i.issues
1596
1596
  );
1597
- if (a.resolvedPrimaryDateField && (i.resolvedPrimaryDateField = a.resolvedPrimaryDateField), a.globalDateComparison !== void 0) {
1598
- const n = qe(a.globalDateComparison);
1599
- if (!n.ok)
1600
- throw new S(
1601
- `${r}Invalid globalDateComparison: ${n.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
1597
+ if (r.resolvedPrimaryDateField && (n.resolvedPrimaryDateField = r.resolvedPrimaryDateField), r.globalDateComparison !== void 0) {
1598
+ const o = qe(r.globalDateComparison);
1599
+ if (!o.ok)
1600
+ throw new D(
1601
+ `${a}Invalid globalDateComparison: ${o.errors.map((s) => `${s.path}: ${s.message}`).join("; ")}`,
1602
1602
  "globalDateComparison",
1603
- n.errors
1603
+ o.errors
1604
1604
  );
1605
- i.globalDateComparison = Ve(
1606
- a.globalDateComparison
1605
+ n.globalDateComparison = Ve(
1606
+ r.globalDateComparison
1607
1607
  );
1608
1608
  }
1609
- return i;
1610
- }
1611
- function ia(e, t = {}) {
1612
- const a = k(e), r = re(t), i = {};
1613
- if (a.pagination !== void 0) {
1614
- const o = k(a.pagination), n = o.page, s = o.pageSize;
1615
- if (!Number.isInteger(n) || n < 1 || !Number.isInteger(s) || s < 1)
1616
- throw new S(
1617
- `${r}pagination must name a page and a page size of at least 1`,
1609
+ return n;
1610
+ }
1611
+ function ir(e, t = {}) {
1612
+ const r = x(e), a = ae(t), n = {};
1613
+ if (r.pagination !== void 0) {
1614
+ const i = x(r.pagination), o = i.page, s = i.pageSize;
1615
+ if (!Number.isInteger(o) || o < 1 || !Number.isInteger(s) || s < 1)
1616
+ throw new D(
1617
+ `${a}pagination must name a page and a page size of at least 1`,
1618
1618
  "pagination"
1619
1619
  );
1620
- i.pagination = { page: n, pageSize: s };
1620
+ n.pagination = { page: o, pageSize: s };
1621
+ }
1622
+ if (r.tableTotalsRequest !== void 0) {
1623
+ if (!r.tableTotalsRequest || typeof r.tableTotalsRequest != "object" || Array.isArray(r.tableTotalsRequest))
1624
+ throw new D(`${a}tableTotalsRequest must be an object`, "tableTotalsRequest");
1625
+ n.tableTotalsRequest = r.tableTotalsRequest;
1621
1626
  }
1622
- if (a.tableTotalsRequest !== void 0) {
1623
- if (!a.tableTotalsRequest || typeof a.tableTotalsRequest != "object" || Array.isArray(a.tableTotalsRequest))
1624
- throw new S(`${r}tableTotalsRequest must be an object`, "tableTotalsRequest");
1625
- i.tableTotalsRequest = a.tableTotalsRequest;
1627
+ if (r.sourceRowProbe !== void 0) {
1628
+ const i = x(r.sourceRowProbe).limit;
1629
+ if (!Number.isInteger(i) || i < 1)
1630
+ throw new D(
1631
+ `${a}sourceRowProbe must name a limit of at least 1`,
1632
+ "sourceRowProbe"
1633
+ );
1634
+ if (n.pagination)
1635
+ throw new D(
1636
+ `${a}sourceRowProbe cannot be combined with pagination`,
1637
+ "sourceRowProbe"
1638
+ );
1639
+ n.sourceRowProbe = { limit: i };
1626
1640
  }
1627
- return i;
1628
- }
1629
- function oa(e, t = {}) {
1630
- const a = k(e), r = re(t), i = (c) => new S(`${r}${c} is required`, c), o = L(a.connection_id).trim();
1631
- if (!o) throw i("connection_id");
1632
- const n = L(a.cardType).trim();
1633
- if (!n) throw i("cardType");
1634
- const s = a.resultOwner;
1641
+ return n;
1642
+ }
1643
+ function or(e, t = {}) {
1644
+ const r = x(e), a = ae(t), n = (c) => new D(`${a}${c} is required`, c), i = L(r.connection_id).trim();
1645
+ if (!i) throw n("connection_id");
1646
+ const o = L(r.cardType).trim();
1647
+ if (!o) throw n("cardType");
1648
+ const s = r.resultOwner;
1635
1649
  if (s !== "config" && s !== "freeform" && s !== "none")
1636
- throw i("resultOwner");
1637
- const l = k(a.cardConfig), d = L(a.sql), p = L(a.python), h = !!t.configOptional || Object.keys(l).length > 0;
1638
- if (s === "config" && !h) throw i("cardConfig");
1639
- if (s === "freeform" && !d.trim()) throw i("sql");
1650
+ throw n("resultOwner");
1651
+ const l = x(r.cardConfig), d = L(r.sql), p = L(r.python), h = !!t.configOptional || Object.keys(l).length > 0;
1652
+ if (s === "config" && !h) throw n("cardConfig");
1653
+ if (s === "freeform" && !d.trim()) throw n("sql");
1640
1654
  const y = Ee({
1641
1655
  hasExecutableConfig: h,
1642
1656
  sql: d,
1643
1657
  normalizedPython: p
1644
1658
  });
1645
1659
  if (s !== y)
1646
- throw new S(
1647
- `${r}resultOwner must match the normalized execution owner "${y}"`,
1660
+ throw new D(
1661
+ `${a}resultOwner must match the normalized execution owner "${y}"`,
1648
1662
  "resultOwner"
1649
1663
  );
1650
- if (s === "none") throw i("cardConfig");
1651
- const g = k(a.cardDataSource);
1652
- if (Object.keys(g).length === 0) throw i("cardDataSource");
1664
+ if (s === "none") throw n("cardConfig");
1665
+ const g = x(r.cardDataSource);
1666
+ if (Object.keys(g).length === 0) throw n("cardDataSource");
1653
1667
  const b = Ne({
1654
- controlValues: a.controlValues,
1655
- controlDefinitions: a.controlDefinitions,
1656
- cardControlDefinitions: a.cardControlDefinitions,
1657
- controlBindings: a.controlBindings
1668
+ controlValues: r.controlValues,
1669
+ controlDefinitions: r.controlDefinitions,
1670
+ cardControlDefinitions: r.cardControlDefinitions,
1671
+ controlBindings: r.controlBindings
1658
1672
  });
1659
1673
  return {
1660
- connection_id: o,
1661
- cardType: n,
1674
+ connection_id: i,
1675
+ cardType: o,
1662
1676
  sql: d,
1663
1677
  python: p,
1664
1678
  resultOwner: s,
1665
1679
  cardConfig: l,
1666
1680
  cardDataSource: g,
1667
- active_filters: Array.isArray(a.active_filters) ? a.active_filters : [],
1681
+ active_filters: Array.isArray(r.active_filters) ? r.active_filters : [],
1668
1682
  controlValues: b.controlValues,
1669
1683
  controlDefinitions: b.controlDefinitions,
1670
1684
  cardControlDefinitions: b.cardControlDefinitions,
1671
1685
  controlBindings: b.controlBindings,
1672
- ...Lt(a, t)
1686
+ ...Lt(r, t)
1673
1687
  };
1674
1688
  }
1675
1689
  export {
1676
- wa as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1677
- na as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
1678
- ra as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
1679
- Fa as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
1680
- xa as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
1681
- ka as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
1682
- Aa as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
1683
- Oa as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
1684
- Ra as CONTROL_DEFINITION_INVALID_ERROR_CODE,
1685
- Ea as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
1686
- Na as CONTROL_REFERENCE_MISSING_ERROR_CODE,
1687
- Ma as CONTROL_VALUE_INVALID_ERROR_CODE,
1688
- Pa as CONTROL_VALUE_MISSING_ERROR_CODE,
1689
- S as CardQueryRequestError,
1690
- $a as ControlResolutionError,
1690
+ wr as AUTOMATIC_TEMPORAL_BUCKET_FORMAT,
1691
+ nr as CARD_QUERY_REQUEST_DESCRIPTIVE_FIELDS,
1692
+ ar as CARD_QUERY_REQUEST_EXECUTED_FIELDS,
1693
+ Fr as CONTROL_BINDING_MAPPING_MISSING_ERROR_CODE,
1694
+ xr as CONTROL_BINDING_TARGET_INVALID_ERROR_CODE,
1695
+ kr as CONTROL_BINDING_VALUE_INVALID_ERROR_CODE,
1696
+ Ar as CONTROL_CONTEXT_UNSUPPORTED_ERROR_CODE,
1697
+ Rr as CONTROL_DEFINITION_DUPLICATE_ERROR_CODE,
1698
+ Or as CONTROL_DEFINITION_INVALID_ERROR_CODE,
1699
+ Er as CONTROL_PLACEHOLDER_QUOTED_ERROR_CODE,
1700
+ Nr as CONTROL_REFERENCE_MISSING_ERROR_CODE,
1701
+ Mr as CONTROL_VALUE_INVALID_ERROR_CODE,
1702
+ Pr as CONTROL_VALUE_MISSING_ERROR_CODE,
1703
+ D as CardQueryRequestError,
1704
+ $r as ControlResolutionError,
1691
1705
  xe as DASHBOARD_AUTHORING_BREAKPOINTS,
1692
1706
  B as DASHBOARD_AUTHORING_MAX_GENERATED_CARDS,
1693
- xr as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
1707
+ xa as DASHBOARD_DEFAULT_OPTION_DEPENDENCIES,
1694
1708
  on as DASHBOARD_FILTER_OPERATIONS,
1695
- Jr as DOCUMENT_KPI_SECTION_MAX_CARDS,
1696
- Zr as DOCUMENT_KPI_SECTION_MAX_TILES,
1697
- kr as DashboardFilterMappingContractError,
1698
- La as ExecutionControlContractError,
1699
- ca as NEW_CARD_TYPE,
1700
- Ba as SEMAPHOR_CARTESIAN_CHART_TYPES,
1701
- la as applyCardReferenceRemapping,
1702
- ta as applyDashboardChangePlan,
1703
- ua as applyDashboardOperations,
1704
- Ar as applyGroupByOverride,
1705
- fa as applyLinkedClickToFilterOverrides,
1706
- Or as applyOptionDependencyOverride,
1707
- qa as buildControlDefinitionIndex,
1708
- Va as buildDashboardCardSourceIndex,
1709
- pa as buildLinkedClickToFilterOverrides,
1709
+ Ja as DOCUMENT_KPI_SECTION_MAX_CARDS,
1710
+ Za as DOCUMENT_KPI_SECTION_MAX_TILES,
1711
+ ka as DashboardFilterMappingContractError,
1712
+ Lr as ExecutionControlContractError,
1713
+ cr as NEW_CARD_TYPE,
1714
+ Br as SEMAPHOR_CARTESIAN_CHART_TYPES,
1715
+ lr as applyCardReferenceRemapping,
1716
+ tr as applyDashboardChangePlan,
1717
+ ur as applyDashboardOperations,
1718
+ Aa as applyGroupByOverride,
1719
+ fr as applyLinkedClickToFilterOverrides,
1720
+ Ra as applyOptionDependencyOverride,
1721
+ qr as buildControlDefinitionIndex,
1722
+ Vr as buildDashboardCardSourceIndex,
1723
+ pr as buildLinkedClickToFilterOverrides,
1710
1724
  ke as clickToFilterSettingsSchema,
1711
- ea as compileDashboardFromPlan,
1725
+ er as compileDashboardFromPlan,
1712
1726
  Z as compileResponsiveDashboardLayouts,
1713
- ma as composeCardReferenceRemapping,
1714
- za as controlBindingExecutionSchema,
1715
- ja as controlDefinitionExecutionSchema,
1716
- Rr as createDashboardFilterBindingId,
1727
+ mr as composeCardReferenceRemapping,
1728
+ zr as controlBindingExecutionSchema,
1729
+ jr as controlDefinitionExecutionSchema,
1730
+ Oa as createDashboardFilterBindingId,
1717
1731
  un as createMatrixAuthoringDraft,
1718
1732
  fn as createMatrixConfig,
1719
- ha as createNewCard,
1733
+ hr as createNewCard,
1720
1734
  J as dashboardAuthoringDatasetMatchesSource,
1721
1735
  Jt as dashboardAuthoringFieldsReferToSameTarget,
1722
1736
  v as dashboardAuthoringSourceFromField,
1723
1737
  Xt as dashboardAuthoringSourceKey,
1724
1738
  pe as dashboardAuthoringSourcesReferToSameDataset,
1725
- Ua as dashboardCardFilterSourceInventoryContains,
1726
- Er as dashboardFilterTargetMatchesLogicalValue,
1739
+ Ur as dashboardCardFilterSourceInventoryContains,
1740
+ Ea as dashboardFilterTargetMatchesLogicalValue,
1727
1741
  sn as dashboardFilterValueTypeForDataType,
1728
- aa as dashboardPlanFromSemaphorDashboardIntent,
1729
- Ga as defaultClickToFilterSettings,
1742
+ rr as dashboardPlanFromSemaphorDashboardIntent,
1743
+ Gr as defaultClickToFilterSettings,
1730
1744
  Zt as findDashboardAuthoringDatasetForSource,
1731
- Ha as findDashboardCardExecutableSource,
1732
- Wa as findDashboardCardPinnedCatalogSource,
1733
- Ka as findDashboardSqlPinnedCatalogSource,
1734
- Re as formatResolvedPrimaryDateFieldIssues,
1735
- ga as getCalculatedFieldAggregateOverrides,
1736
- Qa as getCalculatedFieldNamespace,
1737
- ba as getCalculatedFieldParameters,
1738
- Ia as getCalculatedFieldShelfOverrides,
1739
- Xa as getColumnCatalogFieldId,
1745
+ Hr as findDashboardCardExecutableSource,
1746
+ Wr as findDashboardCardPinnedCatalogSource,
1747
+ Kr as findDashboardSqlPinnedCatalogSource,
1748
+ Oe as formatResolvedPrimaryDateFieldIssues,
1749
+ gr as getCalculatedFieldAggregateOverrides,
1750
+ Qr as getCalculatedFieldNamespace,
1751
+ br as getCalculatedFieldParameters,
1752
+ Ir as getCalculatedFieldShelfOverrides,
1753
+ Xr as getColumnCatalogFieldId,
1740
1754
  Je as getDashboardAuthoringCardSource,
1741
- Ca as getDashboardFilterSubscriptionHint,
1755
+ Cr as getDashboardFilterSubscriptionHint,
1742
1756
  en as getDocumentKpiSectionShapeIssues,
1743
1757
  tn as getDocumentSectionCards,
1744
- ya as getDomainCalculatedSelectionOverrides,
1745
- Ya as getFieldAggregationOptions,
1746
- Ja as getMatrixBindingTargets,
1758
+ yr as getDomainCalculatedSelectionOverrides,
1759
+ Yr as getFieldAggregationOptions,
1760
+ Jr as getMatrixBindingTargets,
1747
1761
  pn as getMatrixLevelLabel,
1748
1762
  mn as getMatrixMeasureLabel,
1749
- Za as getStableDomainCalculatedFieldId,
1750
- er as getTemporalBucketAuthoringOptions,
1751
- tr as getTemporalBucketAuthoringSelection,
1752
- _a as hasDashboardFilterSubscription,
1763
+ Zr as getStableDomainCalculatedFieldId,
1764
+ ea as getTemporalBucketAuthoringOptions,
1765
+ ta as getTemporalBucketAuthoringSelection,
1766
+ _r as hasDashboardFilterSubscription,
1753
1767
  dn as isDashboardFilterOperationCompatible,
1754
- R as isMaterializableDashboardAuthoringSource,
1755
- ar as isPresentationCurrencyBinding,
1756
- rr as isSemaphorCartesianChartType,
1768
+ O as isMaterializableDashboardAuthoringSource,
1769
+ ra as isPresentationCurrencyBinding,
1770
+ aa as isSemaphorCartesianChartType,
1757
1771
  je as isSemaphorSourceRef,
1758
- nr as isStructuralControlBinding,
1759
- ir as isValidControlOptionPresentation,
1760
- or as linkedClickToFilterOverridesSchema,
1761
- an as listDashboardCardLocations,
1762
- rn as mapDocumentSectionCards,
1763
- Nr as matrixCatalogSources,
1772
+ na as isStructuralControlBinding,
1773
+ ia as isValidControlOptionPresentation,
1774
+ oa as linkedClickToFilterOverridesSchema,
1775
+ rn as listDashboardCardLocations,
1776
+ an as mapDocumentSectionCards,
1777
+ Na as matrixCatalogSources,
1764
1778
  In as matrixDefinitionFields,
1765
1779
  Cn as matrixDefinitionSources,
1766
- Mr as matrixExecutionSources,
1780
+ Ma as matrixExecutionSources,
1767
1781
  q as mergeDashboardAuthoringSources,
1768
1782
  hn as mergeMatrixSorts,
1769
- sr as moveMatrixLevel,
1770
- dr as normalizeClickToFilterSettings,
1771
- Pr as normalizeDashboardInputs,
1772
- Da as normalizeLegacyLinkedTargetOverrides,
1773
- oa as parseCardQueryRequest,
1783
+ sa as moveMatrixLevel,
1784
+ da as normalizeClickToFilterSettings,
1785
+ Pa as normalizeDashboardInputs,
1786
+ Dr as normalizeLegacyLinkedTargetOverrides,
1787
+ or as parseCardQueryRequest,
1774
1788
  Lt as parseCardQueryRequestContext,
1775
- ia as parseCardQueryRequestExtras,
1776
- cr as parseExecutionControlBindingsShallow,
1789
+ ir as parseCardQueryRequestExtras,
1790
+ ca as parseExecutionControlBindingsShallow,
1777
1791
  Ne as parseExecutionControlContext,
1778
- lr as parseExecutionControlContract,
1792
+ la as parseExecutionControlContract,
1779
1793
  Ue as preferDashboardAuthoringSourceMetadata,
1780
1794
  Yt as preferredDashboardAuthoringSource,
1781
- ur as previewTemporalBucketAuthoringFormat,
1782
- fr as readExactDomainCalculatedFieldReference,
1795
+ ua as previewTemporalBucketAuthoringFormat,
1796
+ fa as readExactDomainCalculatedFieldReference,
1783
1797
  yn as readMatrixCardConfig,
1784
- $r as rebindDashboardOptionDependencyInputId,
1785
- pr as reconcileMatrixSpecStructure,
1786
- mr as reconcileTemporalBucketAuthoringFormat,
1798
+ $a as rebindDashboardOptionDependencyInputId,
1799
+ pa as reconcileMatrixSpecStructure,
1800
+ ma as reconcileTemporalBucketAuthoringFormat,
1787
1801
  H as remapClickToFilterReferences,
1788
- Sa as remapLinkedClickToFilterOverrides,
1789
- Lr as requireNormalizedDashboardInputs,
1790
- hr as resolveBindingControlValue,
1791
- Kr as resolveCanonicalDetailResultRawKey,
1792
- Qr as resolveCanonicalResultOutputKey,
1793
- Xr as resolveCanonicalResultRawKey,
1802
+ Sr as remapLinkedClickToFilterOverrides,
1803
+ La as requireNormalizedDashboardInputs,
1804
+ ha as resolveBindingControlValue,
1805
+ Ka as resolveCanonicalDetailResultRawKey,
1806
+ Qa as resolveCanonicalResultOutputKey,
1807
+ Xa as resolveCanonicalResultRawKey,
1794
1808
  Ge as resolveDashboardAuthoringSource,
1795
- gr as resolveDashboardEntitySource,
1796
- Br as resolveDashboardFilterAutomaticTarget,
1797
- qr as resolveDashboardFilterInheritedTarget,
1798
- Vr as resolveDashboardOptionDependencies,
1799
- zr as resolveDashboardOptionPopulation,
1800
- jr as resolveDashboardSqlFilterTarget,
1801
- br as resolveGroupByFieldTarget,
1802
- Ur as resolveMatrixControlBindings,
1809
+ ga as resolveDashboardEntitySource,
1810
+ Ba as resolveDashboardFilterAutomaticTarget,
1811
+ qa as resolveDashboardFilterInheritedTarget,
1812
+ Va as resolveDashboardOptionDependencies,
1813
+ za as resolveDashboardOptionPopulation,
1814
+ ja as resolveDashboardSqlFilterTarget,
1815
+ ba as resolveGroupByFieldTarget,
1816
+ Ua as resolveMatrixControlBindings,
1803
1817
  gn as resolveMatrixDefinition,
1804
- Ir as resolveMetricFieldTarget,
1805
- Cr as resolveScalarMappedValue,
1806
- yr as resolveTemporalBucketAuthoringFormat,
1818
+ Ia as resolveMetricFieldTarget,
1819
+ Ca as resolveScalarMappedValue,
1820
+ ya as resolveTemporalBucketAuthoringFormat,
1807
1821
  Ee as resolveTemporalResultOwner,
1808
1822
  Ae as respondsToSelectionsSchema,
1809
- _r as retainMatrixConditionalFormatting,
1810
- Gr as selectDashboardOptionDependencyInputIds,
1811
- Dr as selectionFieldFromExplorerField,
1812
- va as stripInstanceTargetsForLibrarySave,
1813
- Sr as supportsCanonicalDashboardTemporalResult,
1814
- vr as transformComparisonDocument,
1815
- Tr as updateMatrixConfig,
1816
- wr as validateControlValue,
1823
+ _a as retainMatrixConditionalFormatting,
1824
+ Ga as selectDashboardOptionDependencyInputIds,
1825
+ Da as selectionFieldFromExplorerField,
1826
+ vr as stripInstanceTargetsForLibrarySave,
1827
+ Sa as supportsCanonicalDashboardTemporalResult,
1828
+ va as transformComparisonDocument,
1829
+ Ta as updateMatrixConfig,
1830
+ wa as validateControlValue,
1817
1831
  Ze as validateDashboardAuthoringDatasetScope,
1818
- at as validateDashboardChangePlan,
1832
+ rt as validateDashboardChangePlan,
1819
1833
  cn as validateDashboardFilterValues,
1820
1834
  tt as validateDashboardPlan,
1821
- Oe as validateResolvedPrimaryDateFieldShape,
1822
- Hr as withDashboardOptionDependencyOverride
1835
+ Re as validateResolvedPrimaryDateFieldShape,
1836
+ Ha as withDashboardOptionDependencyOverride
1823
1837
  };