react-semaphor 0.1.591 → 0.1.593

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 (46) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/briefings/index.js +2 -2
  3. package/dist/chunks/{assistant-chat-Cazikwyh.js → assistant-chat-D05uNAeO.js} +7 -7
  4. package/dist/chunks/bookmark-impact-B0k90wq8.js +76 -0
  5. package/dist/chunks/{bookmark-state-Bt_eQEqt.js → bookmark-state-Be2W3s6t.js} +174 -166
  6. package/dist/chunks/{card-filter-builder-DFR-6Jpm.js → card-filter-builder-CiafWE26.js} +73 -73
  7. package/dist/chunks/{comparison-window-caption-CFaw-kIV.js → comparison-window-caption-h8w3ySL6.js} +88 -89
  8. package/dist/chunks/{dashboard-DCh9hKnJ.js → dashboard-T-gYKGTF.js} +1 -1
  9. package/dist/chunks/{dashboard-briefing-launcher-ob8G1b58.js → dashboard-briefing-launcher-CPh2B3Rf.js} +84 -84
  10. package/dist/chunks/{dashboard-controls-Nszg0k1A.js → dashboard-controls-Cijc9c3G.js} +9 -9
  11. package/dist/chunks/{dashboard-json-BpwnG23b.js → dashboard-json-D3m7h4VL.js} +1 -1
  12. package/dist/chunks/{dates-BOLBSBpn.js → dates-Bb0sn54j.js} +6 -6
  13. package/dist/chunks/{edit-dashboard-visual-BvM7br5P.js → edit-dashboard-visual-C0iSuX9t.js} +374 -374
  14. package/dist/chunks/{filter-reach-copy-By3r7O3G.js → filter-reach-copy-CifrEFxj.js} +221 -221
  15. package/dist/chunks/{filter-value-text-CFiIZWJP.js → filter-value-text-CHBm4IU7.js} +10 -10
  16. package/dist/chunks/{index-CsQYlwhU.js → index-CzM2w1kY.js} +22 -22
  17. package/dist/chunks/{pivot-result-contract-expectations-BkMRCjzf.js → pivot-result-contract-expectations-CaS0y823.js} +588 -552
  18. package/dist/chunks/{report-preferences-dialog-ChXt8wCt.js → report-preferences-dialog-GHvai50w.js} +9 -9
  19. package/dist/chunks/{resolve-dashboard-input-context-BlyFX8He.js → resolve-dashboard-input-context-BcQHmMlw.js} +7585 -6490
  20. package/dist/chunks/{saved-dashboard-context-BPSdH2jW.js → saved-dashboard-context-BHHEzmwM.js} +16 -16
  21. package/dist/chunks/{semaphor-ready-indicator-BZUMCHRU.js → semaphor-ready-indicator-AOUJrUAJ.js} +21334 -21330
  22. package/dist/chunks/{shelf-drop-preview-context-yJheoeTC.js → shelf-drop-preview-context-Cs62lWI1.js} +2 -2
  23. package/dist/chunks/stored-dashboard-Cmtl_Obh.js +4029 -0
  24. package/dist/chunks/{table-export-sheet-h7wm5TwP.js → table-export-sheet-Cd6z7SsG.js} +1 -1
  25. package/dist/chunks/{variable-draft-OpYyaVCW.js → variable-draft-CSK9Ps1o.js} +2 -2
  26. package/dist/dashboard/index.js +2 -2
  27. package/dist/dashboard-authoring/index.js +1097 -1105
  28. package/dist/format-utils/index.js +215 -216
  29. package/dist/index.js +56 -56
  30. package/dist/surfboard/index.js +2 -2
  31. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +3 -3
  32. package/dist/types/components/visual/data-table/types/data-table.d.ts +24 -2
  33. package/dist/types/index.js +30 -29
  34. package/dist/types/lib/dashboard-viewer/table-view-edit.d.ts +27 -0
  35. package/dist/types/lib/dashboard-viewer/table-view.d.ts +37 -1
  36. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  37. package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +3 -0
  38. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +6 -0
  39. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +11 -0
  40. package/dist/types/shared/dashboard-viewer/table-column-move.d.ts +56 -0
  41. package/dist/types/shared/dashboard-viewer/table-settings.d.ts +7 -0
  42. package/package.json +1 -1
  43. package/dist/chunks/bookmark-impact-rWjQgk8h.js +0 -75
  44. package/dist/chunks/pivot-header-presentation-gUxhdIdr.js +0 -42
  45. package/dist/chunks/stored-dashboard-CxQl9g0l.js +0 -4994
  46. package/dist/types/components/visual/shared/utils/table-column-order.d.ts +0 -53
@@ -1,24 +1,24 @@
1
- import { J as Hr, K as Yr, M as Qr, N as Tn, O as Xr, P as Jr, Q as Zr, R as ei, S as ti, T as Dn, U as ni, V as Re, W as ri, X as ii, Y as ai, g as oi, k as we, Z as si, _ as ci } from "./stored-dashboard-CxQl9g0l.js";
2
- import { gM as kn, bz as xe, gN as li, gO as di, gP as ui, gQ as fi, P as J, gR as _n, bB as mi, gS as pi, gT as ct, aj as lt, gU as hi, gV as gi, gW as yi, L as dt, gX as bi, gY as vi, gZ as Ii, bO as Ci, Q as Fi, g_ as Si, M as wi, m as ut, g$ as ft, h0 as xi, h1 as F, o as Me, h2 as ne, h3 as x, h4 as Ti, h5 as Di, h6 as Vt, h7 as ki, h8 as Bt, h9 as _i, aT as T, ha as Mn, b3 as Oe, hb as Mi, hc as Oi, hd as Ai, he as $i, hf as Pi, gB as On, cF as An, hg as $n, hh as Pn, gw as Te, hi as qt, a4 as Z, hj as mt, hk as Ut, hl as pt, t as zt, hm as jt, cs as ht, hn as Ni, ho as Ei, hp as ce, hq as Ri, hr as Ki, hs as Li, a7 as Nn, cx as gt, aF as Vi, ht as Wt, hu as En, hv as Ge, K as Bi, aI as qi, eB as Ui, hw as zi, hx as ji, hy as Wi, hz as Gi, hA as Hi, hB as Yi, hC as Qi, hD as Xi, hE as He, gv as Ji, gq as Ke, hF as Zi, hG as ea, hH as Rn, a as Kn, hI as ta, hJ as na, dz as Ln, hK as Gt, d4 as ra, dC as Ht, dB as ia, eQ as aa, fc as oa, N as sa, f4 as ca, aY as la, fx as da, bW as Yt, hL as ua, hM as fa, cP as Qt } from "./resolve-dashboard-input-context-BlyFX8He.js";
3
- import { a7 as me, s as ma, d as pa, aG as ha, a4 as Vn, aw as ga, r as Ye, n as ya, c as ba, j as Bn } from "./validators-BlEWWX9O.js";
4
- import { s as yt, P as va, N as Ia, n as Le } from "./matrix-operation-contract-CAanJeCj.js";
5
- import { a as Ca, C as Fa } from "./metric-comparison-BeKnUD08.js";
6
- import { t as Xt, e as Jt } from "./analytics-base-schemas-8wz9vqn_.js";
1
+ import { gQ as Tn, gR as Hr, gS as Yr, bD as we, gT as Qr, gU as Jr, gV as Xr, gW as Zr, S as X, gX as Dn, bF as ei, gY as ti, gZ as ct, an as lt, g_ as ni, g$ as ri, h0 as ii, O as dt, h1 as ai, h2 as kn, h3 as oi, h4 as si, h5 as ci, bS as li, T as di, h6 as ui, P as fi, h7 as mi, q as ut, h8 as ft, h9 as pi, ha as F, t as Me, hb as ne, hc as x, hd as hi, he as gi, hf as Vt, hg as yi, hh as Bt, hi as bi, aX as T, hj as _n, b7 as Oe, hk as vi, hl as Ii, hm as Ci, hn as Fi, ho as Si, gF as Mn, cJ as On, hp as An, hq as $n, gA as xe, hr as qt, a7 as Z, hs as mt, ht as Ut, hu as pt, w as zt, hv as jt, cw as ht, hw as wi, hx as xi, hy as ce, hz as Ti, hA as Di, hB as ki, aa as Pn, cB as gt, aJ as _i, hC as Wt, hD as Nn, hE as Ge, N as Mi, aM as Oi, eF as Ai, hF as $i, hG as Pi, hH as Ni, hI as Ei, hJ as Ri, hK as Ki, hL as Li, hM as Vi, hN as He, gz as Bi, gu as Re, hO as qi, hP as Ui, hQ as En, a as Rn, hR as zi, hS as ji, dD as Kn, hT as Gt, d8 as Wi, dG as Ht, dF as Gi, eU as Hi, fg as Yi, Q as Qi, f8 as Ji, b0 as Xi, fB as Zi, b_ as Yt, hU as ea, hV as ta, cT as Qt } from "./resolve-dashboard-input-context-BcQHmMlw.js";
2
+ import { a7 as me, s as na, d as ra, aG as ia, a4 as Ln, aw as aa, r as Ye, n as oa, c as sa, j as Vn } from "./validators-BlEWWX9O.js";
3
+ import { s as yt, P as ca, N as la, n as Ke } from "./matrix-operation-contract-CAanJeCj.js";
4
+ import { a as da, C as ua } from "./metric-comparison-BeKnUD08.js";
5
+ import { t as Jt, e as Xt } from "./analytics-base-schemas-8wz9vqn_.js";
7
6
  import "zod";
8
- import { c as te, i as N, b2 as Sa, b3 as wa, n as xa, j as Ta, e as Qe, g as Da, Y as A, ap as ka, aw as _a, d as Ma, ar as Oa, a2 as Aa, w as $a, ad as Pa, aL as M, ag as qn, f as Na, ae as Ea } from "./pivot-result-contract-expectations-BkMRCjzf.js";
7
+ import { b as te, i as N, b4 as fa, b5 as ma, m as pa, h as ha, d as Qe, e as ga, X as A, ap as ya, aw as ba, c as va, ar as Ia, a1 as Ca, w as Fa, ac as Sa, aN as M, af as Bn, an as wa, ad as xa } from "./pivot-result-contract-expectations-CaS0y823.js";
9
8
  import "../value-format-preferences/index.js";
10
- import { z as Ra, T as Ka, L as La, ai as Va, a4 as Zt, O as Un, A as zn, at as Ba, P as jn, D as qa, a8 as Ua, a9 as za, G as Wn, _ as ja, $ as Gn, I as bt, a0 as Hn, au as Wa } from "./bookmark-state-Bt_eQEqt.js";
9
+ import { A as Ta, U as Da, M as ka, aj as _a, a5 as Zt, P as qn, D as Un, au as Ma, Q as zn, F as Oa, a9 as Aa, aa as $a, H as jn, $ as Pa, a0 as Wn, J as bt, a1 as Gn, av as Na } from "./bookmark-state-Be2W3s6t.js";
10
+ import { G as Ea, H as Hn, I as Ra, J as Ka, K as La, M as Va, N as Ba, O as qa, P as Le, Q as Ua, d as za, g as Te, R as ja, S as Wa } from "./stored-dashboard-Cmtl_Obh.js";
11
11
  import { g as Ga } from "./pickers-DkqmtnTL.js";
12
12
  import { n as Ha } from "./index-BVKzKl5d.js";
13
- import { f as Ya, D as Qa, g as Xa, C as ye, i as en } from "./edit-9df1zOWe.js";
14
- import { D as Ja } from "./resolver-DG_tfEpt.js";
13
+ import { f as Ya, D as Qa, g as Ja, C as ye, i as en } from "./edit-9df1zOWe.js";
14
+ import { D as Xa } from "./resolver-DG_tfEpt.js";
15
15
  import "./schema-C9NPiIru.js";
16
16
  import "./index-CV_Kzou0.js";
17
17
  import "./context-CVXTFljo.js";
18
18
  import { r as Za, L as eo, x as to } from "./matrix-analytical-definition-CyWOwLmE.js";
19
19
  import { f as no } from "./filter-line-CYT7KIXb.js";
20
20
  import { i as ro } from "./aggregate-measure-field-DHlDj0Pc.js";
21
- import { r as Xe } from "./pivot-result-identity-BKUjYO1u.js";
21
+ import { r as Je } from "./pivot-result-identity-BKUjYO1u.js";
22
22
  import { r as Yn } from "./applied-constraints-DU-wndZ7.js";
23
23
  function io(e, t) {
24
24
  if (!(typeof e != "number" || typeof t != "number"))
@@ -91,7 +91,7 @@ function Qn(e, t) {
91
91
  } : !n || !N(n) ? void 0 : {
92
92
  style: n.type === "currency" ? "currency" : n.type === "percent" ? "percent" : n.type === "scientific" ? "scientific" : "decimal",
93
93
  currency: n.type === "currency" && n.currency || (t != null && t.preserveOmittedProperties ? void 0 : "USD"),
94
- locale: n.locale || (t != null && t.preserveOmittedProperties ? void 0 : Sa),
94
+ locale: n.locale || (t != null && t.preserveOmittedProperties ? void 0 : fa),
95
95
  minimumFractionDigits: n.minimumFractionDigits ?? (t != null && t.preserveOmittedProperties ? void 0 : 0),
96
96
  maximumFractionDigits: n.maximumFractionDigits ?? (t != null && t.preserveOmittedProperties ? void 0 : 2),
97
97
  useGrouping: typeof n.useGrouping == "boolean" ? n.useGrouping : !0,
@@ -116,7 +116,7 @@ function $l(e) {
116
116
  }
117
117
  function Pl(e) {
118
118
  var t, n;
119
- return !!((e.type === "table" || e.type === "detailTable") && e.sql && !kn(e.config) && !((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) != null && n.forceClientPagination));
119
+ return !!((e.type === "table" || e.type === "detailTable") && e.sql && !Tn(e.config) && !((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) != null && n.forceClientPagination));
120
120
  }
121
121
  function so(e, t) {
122
122
  var r, i, o, a;
@@ -124,16 +124,16 @@ function so(e, t) {
124
124
  return "disabled";
125
125
  if ((i = (r = e.preferences) == null ? void 0 : r.tablePrefs) != null && i.forceClientPagination)
126
126
  return "client";
127
- const n = kn(e.config);
128
- return e.sql && !n ? (a = (o = e.preferences) == null ? void 0 : o.tablePrefs) != null && a.enableDevModePagination ? "server" : "client" : n && Hr(e) ? "server" : "client";
127
+ const n = Tn(e.config);
128
+ return e.sql && !n ? (a = (o = e.preferences) == null ? void 0 : o.tablePrefs) != null && a.enableDevModePagination ? "server" : "client" : n && Ea(e) ? "server" : "client";
129
129
  }
130
- const Xn = Object.freeze({}), Nl = {
130
+ const Jn = Object.freeze({}), Nl = {
131
131
  access: "session-only",
132
132
  printMode: !1,
133
133
  baseline: null,
134
134
  applied: null,
135
135
  appliedBookmark: null,
136
- tableSettings: Xn,
136
+ tableSettings: Jn,
137
137
  notices: [],
138
138
  isFavorite: !1,
139
139
  fetchedAt: 0
@@ -142,22 +142,22 @@ function El(e) {
142
142
  return !e.viewer.printMode && e.viewer.access !== "session-only" && !!e.viewer.baseline && !!e.viewerStateClient && !e.isDashboardEditing;
143
143
  }
144
144
  function co(e) {
145
- return e.isDashboardEditing ? Xn : e.viewer.tableSettings;
145
+ return e.isDashboardEditing ? Jn : e.viewer.tableSettings;
146
146
  }
147
147
  function lo(e, t) {
148
148
  return co(e)[t];
149
149
  }
150
150
  function Rl(e, t, n) {
151
- if (!(n.isEditorPreview || e.isDashboardEditing) && Ra(e.dashboard, t))
151
+ if (!(n.isEditorPreview || e.isDashboardEditing) && Ta(e.dashboard, t))
152
152
  return { settings: lo(e, t) };
153
153
  }
154
154
  function uo(e) {
155
155
  var t;
156
- return Yr({
156
+ return Hr({
157
157
  card: e.card,
158
158
  paginationMode: so(e.card) === "server" ? "server" : "client",
159
159
  result: {
160
- keys: e.keys ?? Qr(e.records),
160
+ keys: e.keys ?? Yr(e.records),
161
161
  rows: e.records,
162
162
  columns: e.resultColumns,
163
163
  columnKeyMap: e.columnKeyMap,
@@ -178,12 +178,12 @@ function mo(e) {
178
178
  if (e.type === "percent") {
179
179
  const { multiplyBy: t, percentValueMode: n, ...r } = e, i = t === 100 ? "fraction" : t === 1 ? "whole" : t === void 0 ? n : void 0;
180
180
  if (i || t === void 0)
181
- return Xt(
182
- xe({ ...r, ...i ? { percentValueMode: i } : {} }, { preserveOmittedProperties: !0 })
181
+ return Jt(
182
+ we({ ...r, ...i ? { percentValueMode: i } : {} }, { preserveOmittedProperties: !0 })
183
183
  );
184
184
  }
185
- return Xt(
186
- xe(e, { preserveOmittedProperties: !0 })
185
+ return Jt(
186
+ we(e, { preserveOmittedProperties: !0 })
187
187
  );
188
188
  }
189
189
  const Ae = fo, Kl = mo, po = () => ({
@@ -200,9 +200,9 @@ const Ae = fo, Kl = mo, po = () => ({
200
200
  inheritMetricFormat: !0,
201
201
  textAlign: "left",
202
202
  // The table's one width rule (card appearance P2-21).
203
- width: ui,
204
- minWidth: di,
205
- maxWidth: li,
203
+ width: Xr,
204
+ minWidth: Jr,
205
+ maxWidth: Qr,
206
206
  textOverflow: "ellipsis",
207
207
  textWrap: "default",
208
208
  numberFormat: {
@@ -240,7 +240,7 @@ const Vl = (e) => !e || e === "auto" ? "local time" : {
240
240
  "Asia/Shanghai": "China Time",
241
241
  UTC: "UTC"
242
242
  }[e] || e;
243
- function Jn(e, t) {
243
+ function Xn(e, t) {
244
244
  const n = typeof e.decimalPlaces == "number", r = typeof e.minimumFractionDigits == "number" ? e.minimumFractionDigits : n ? e.decimalPlaces : t.min, i = typeof e.maximumFractionDigits == "number" ? e.maximumFractionDigits : n ? e.decimalPlaces : t.max;
245
245
  return {
246
246
  minimumFractionDigits: r,
@@ -248,7 +248,7 @@ function Jn(e, t) {
248
248
  };
249
249
  }
250
250
  function De(e, t) {
251
- const n = Jn(e, t), r = typeof e.suffix == "string" && e.suffix.length > 0;
251
+ const n = Xn(e, t), r = typeof e.suffix == "string" && e.suffix.length > 0;
252
252
  return {
253
253
  style: "decimal",
254
254
  locale: e.locale,
@@ -267,7 +267,7 @@ function De(e, t) {
267
267
  }
268
268
  function It(e, t = "auto", n = {}) {
269
269
  if (t === "auto" && (t = vo(e, n)), (t === "number" || t === "currency" || t === "percent" || t === "scientific") && n.signDisplay && n.signDisplay !== "auto" && Number.isFinite(Number(e))) {
270
- const i = typeof n.multiplyBy == "number" && Number.isFinite(n.multiplyBy) ? n.multiplyBy : 1, o = Number(e) * i, a = wa(o, n.signDisplay), s = It(a.value === o ? e : -Number(e), t, { ...n, signDisplay: void 0 });
270
+ const i = typeof n.multiplyBy == "number" && Number.isFinite(n.multiplyBy) ? n.multiplyBy : 1, o = Number(e) * i, a = ma(o, n.signDisplay), s = It(a.value === o ? e : -Number(e), t, { ...n, signDisplay: void 0 });
271
271
  if (!a.plus) return s;
272
272
  const c = n.prefix ?? "";
273
273
  return c && s.startsWith(c) ? `${c}+${s.slice(c.length)}` : `+${s}`;
@@ -305,7 +305,7 @@ function Zn(e, t = {}) {
305
305
  );
306
306
  }
307
307
  function er(e, t = {}) {
308
- return Da(e, {
308
+ return ga(e, {
309
309
  ...De(t, {
310
310
  min: 2,
311
311
  max: 2
@@ -315,7 +315,7 @@ function er(e, t = {}) {
315
315
  });
316
316
  }
317
317
  function ho(e, t = {}) {
318
- const n = Jn(t, { min: 1, max: 1 }), i = typeof t.multiplyBy == "number" && Number.isFinite(t.multiplyBy) ? t.multiplyBy : t.percentValueMode === "whole" ? 1 : 100, o = e * i;
318
+ const n = Xn(t, { min: 1, max: 1 }), i = typeof t.multiplyBy == "number" && Number.isFinite(t.multiplyBy) ? t.multiplyBy : t.percentValueMode === "whole" ? 1 : 100, o = e * i;
319
319
  return Qe(o, {
320
320
  locale: t.locale,
321
321
  minimumFractionDigits: n.minimumFractionDigits,
@@ -339,13 +339,13 @@ function go(e, t = {}) {
339
339
  }
340
340
  }
341
341
  function yo(e, t = {}) {
342
- return Ta(
342
+ return ha(
343
343
  e,
344
344
  De(t, { min: 2, max: 2 })
345
345
  );
346
346
  }
347
347
  function bo(e, t = {}) {
348
- return xa(e, {
348
+ return pa(e, {
349
349
  inputUnit: t.durationInputUnit,
350
350
  outputStyle: t.durationDisplayStyle,
351
351
  largestUnit: t.durationLargestUnit,
@@ -430,7 +430,7 @@ function tr(e) {
430
430
  );
431
431
  }
432
432
  function Fo(e) {
433
- const t = J(e.card)[e.columnKey], n = (t == null ? void 0 : t.type) === "number" ? Xr(
433
+ const t = X(e.card)[e.columnKey], n = (t == null ? void 0 : t.type) === "number" ? Ra(
434
434
  { dataType: "number", format: void 0 },
435
435
  t
436
436
  ) : void 0, r = n == null ? void 0 : n.authoredFormat, i = N(r) ? tr({
@@ -453,10 +453,10 @@ function Fo(e) {
453
453
  }
454
454
  function ql(e) {
455
455
  const t = new Set(
456
- fi(e.records)
456
+ Zr(e.records)
457
457
  ), n = new Set(
458
458
  e.renderedMetricKeys || e.resultKeys
459
- ), r = J(e.card);
459
+ ), r = X(e.card);
460
460
  return e.resultKeys.filter(
461
461
  (i) => {
462
462
  var o;
@@ -467,7 +467,7 @@ function ql(e) {
467
467
  function Ul(e) {
468
468
  var o, a;
469
469
  const { card: t, context: n } = e;
470
- if (!(n != null && n.preferences) || !_n(t.type))
470
+ if (!(n != null && n.preferences) || !Dn(t.type))
471
471
  return t;
472
472
  const r = n.preferences, i = (o = t.sql) != null && o.trim() ? e.resultMetricKeys.map(
473
473
  (s) => Fo({
@@ -476,7 +476,7 @@ function Ul(e) {
476
476
  context: n
477
477
  })
478
478
  ) : (((a = t.config) == null ? void 0 : a.metricColumns) || []).map((s) => {
479
- const c = Tn(t, s), l = c.authoredFormat;
479
+ const c = Hn(t, s), l = c.authoredFormat;
480
480
  if (!N(l))
481
481
  return s;
482
482
  const d = Ct(t, s), u = d ? n.resolveBoundCurrency(d) : void 0;
@@ -505,7 +505,7 @@ function Ul(e) {
505
505
  function $e(e) {
506
506
  var c;
507
507
  const { card: t, context: n, formatOptions: r } = e, i = n == null ? void 0 : n.preferences;
508
- if (!t || !i || !_n(t.type))
508
+ if (!t || !i || !Dn(t.type))
509
509
  return r;
510
510
  if (!r) {
511
511
  const l = e.metrics.filter(
@@ -532,7 +532,7 @@ function $e(e) {
532
532
  { preserveOmittedProperties: !0 }
533
533
  );
534
534
  }
535
- const o = xe(r, {
535
+ const o = we(r, {
536
536
  preserveOmittedProperties: !0
537
537
  });
538
538
  if (!N(o))
@@ -572,7 +572,7 @@ function $e(e) {
572
572
  preserveOmittedProperties: !0
573
573
  });
574
574
  }
575
- function Je(e) {
575
+ function Xe(e) {
576
576
  return e ? Object.entries(e).some(([t, n]) => n == null || n === "" ? !1 : t === "type" ? n !== "auto" : !0) : !1;
577
577
  }
578
578
  function nr(e) {
@@ -588,8 +588,8 @@ function Ze(e, t) {
588
588
  }
589
589
  function pe(e, t) {
590
590
  var r, i;
591
- const n = mi(e, t);
592
- if (!(n && ((i = (r = e == null ? void 0 : e.config) == null ? void 0 : r.groupByColumns) != null && i.includes(n)) && !pi(n)))
591
+ const n = ei(e, t);
592
+ if (!(n && ((i = (r = e == null ? void 0 : e.config) == null ? void 0 : r.groupByColumns) != null && i.includes(n)) && !ti(n)))
593
593
  return n;
594
594
  }
595
595
  function So(e) {
@@ -667,11 +667,11 @@ function jl(e) {
667
667
  if (e.enforceDeclaredSqlTemporalFormat && e.next.type === "date" && !e.next.dateFormat.useRelativeTime && e.next.dateFormat.useCustomFormat) {
668
668
  const n = e.next.dateFormat.customFormat;
669
669
  if (!(n != null && n.trim()))
670
- throw new ka(
670
+ throw new ya(
671
671
  "invalid_raw_temporal_format",
672
672
  "Custom table date formatting requires a non-empty pattern."
673
673
  );
674
- _a({
674
+ ba({
675
675
  dialect: "date_fns",
676
676
  pattern: n,
677
677
  valueKind: e.rawTemporalValueKind
@@ -726,7 +726,7 @@ function Do(e) {
726
726
  }
727
727
  function ko(e, t) {
728
728
  return t.metricAlias ? e.find(
729
- (n) => Ca(n) === t.metricAlias
729
+ (n) => da(n) === t.metricAlias
730
730
  ) : t.metricId ? e.find((n) => n.id === t.metricId) : void 0;
731
731
  }
732
732
  function _o(e) {
@@ -799,7 +799,7 @@ function nn(e, t) {
799
799
  });
800
800
  }
801
801
  function rn(e) {
802
- const t = xe(e);
802
+ const t = we(e);
803
803
  if (t)
804
804
  return JSON.stringify(t);
805
805
  }
@@ -814,7 +814,7 @@ function Ao(e) {
814
814
  (a) => Mo(a)
815
815
  );
816
816
  if (!t.every(
817
- (a) => Je(a)
817
+ (a) => Xe(a)
818
818
  ))
819
819
  return;
820
820
  const r = t, [i] = r;
@@ -823,7 +823,7 @@ function Ao(e) {
823
823
  ) ? i : void 0;
824
824
  }
825
825
  function Pe(e) {
826
- if (Je(e.overrideFormatOptions))
826
+ if (Xe(e.overrideFormatOptions))
827
827
  return {
828
828
  formatOptions: e.overrideFormatOptions || void 0,
829
829
  source: "override"
@@ -831,7 +831,7 @@ function Pe(e) {
831
831
  const t = Ao(
832
832
  e.metrics || []
833
833
  );
834
- return Je(t) ? {
834
+ return Xe(t) ? {
835
835
  formatOptions: t,
836
836
  source: "metric"
837
837
  } : {
@@ -900,7 +900,7 @@ function $o(e) {
900
900
  };
901
901
  }
902
902
  function St(e, t, n) {
903
- return t === lt(n, e) ? hi(n, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
903
+ return t === lt(n, e) ? ni(n, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
904
904
  }
905
905
  function wt(e) {
906
906
  const { chartType: t, preferences: n } = e;
@@ -1100,7 +1100,7 @@ function cr(e) {
1100
1100
  valueFormatPreferences: u,
1101
1101
  boundCurrency: f,
1102
1102
  preserveOmittedProperties: m
1103
- } = e, p = r ?? J(t)[n], y = !((k = t == null ? void 0 : t.sql) != null && k.trim()) || Jr(p), h = y ? u : null, g = y ? f : void 0, C = i ?? rr(p);
1103
+ } = e, p = r ?? X(t)[n], y = !((k = t == null ? void 0 : t.sql) != null && k.trim()) || Ka(p), h = y ? u : null, g = y ? f : void 0, C = i ?? rr(p);
1104
1104
  if (C && C.inheritMetricFormat !== !0)
1105
1105
  return an(
1106
1106
  C,
@@ -1160,7 +1160,7 @@ function _e(e) {
1160
1160
  const n = ct(t.numberFormat, {
1161
1161
  preserveOmittedProperties: !0
1162
1162
  });
1163
- if (!(!n || !Ma(n)))
1163
+ if (!(!n || !va(n)))
1164
1164
  return n;
1165
1165
  }
1166
1166
  function Ro(e) {
@@ -1184,7 +1184,7 @@ function Ro(e) {
1184
1184
  columnKeyMap: e.columnKeyMap,
1185
1185
  metricAlias: e.metricAlias ?? (t == null ? void 0 : t.alias),
1186
1186
  valueFormatPreferences: e.presentation.preferences
1187
- }), a = Ka(e.comparisonPrecision) ?? (N(o) ? o.maximumFractionDigits : void 0) ?? (e.comparisonValueKind === "percent_change" ? 1 : 2);
1187
+ }), a = Da(e.comparisonPrecision) ?? (N(o) ? o.maximumFractionDigits : void 0) ?? (e.comparisonValueKind === "percent_change" ? 1 : 2);
1188
1188
  return e.comparisonValueKind === "percent_change" ? {
1189
1189
  type: "percent",
1190
1190
  locale: e.presentation.preferences.locale,
@@ -1199,7 +1199,7 @@ function Ro(e) {
1199
1199
  suffix: "×"
1200
1200
  };
1201
1201
  }
1202
- const n = Zr({
1202
+ const n = La({
1203
1203
  card: e.card,
1204
1204
  columnKey: e.columnId,
1205
1205
  metricId: e.metricId ?? (t && !((i = (r = e.card.config) == null ? void 0 : r.groupByColumns) != null && i.includes(t)) ? t.id : void 0)
@@ -1220,7 +1220,7 @@ function Ro(e) {
1220
1220
  function Ko(e) {
1221
1221
  var s, c, l, d, u;
1222
1222
  if (e.card.type === "matrixTable" && e.target.kind === "matrix_measure") {
1223
- const f = e.target, m = ei(e.card, e.matrixCatalog).find(
1223
+ const f = e.target, m = Va(e.card, e.matrixCatalog).find(
1224
1224
  (y) => y.measureId === f.measureId
1225
1225
  ), p = m == null ? void 0 : m.canonical;
1226
1226
  return p && (p.type === "number" || p.type === "currency") ? A(
@@ -1237,7 +1237,7 @@ function Ko(e) {
1237
1237
  (y) => y.id === f
1238
1238
  )))
1239
1239
  return;
1240
- const m = ti(e.card, {
1240
+ const m = Ba(e.card, {
1241
1241
  ...f ? { column: { kind: "field", fieldId: f } } : {},
1242
1242
  resultColumnKey: e.target.kind === "column" ? e.target.columnKey : void 0
1243
1243
  }), p = m.authoredFormat;
@@ -1247,13 +1247,13 @@ function Ko(e) {
1247
1247
  e.boundCurrency
1248
1248
  ) : void 0;
1249
1249
  }
1250
- if (!((l = e.card.sql) != null && l.trim()) && !gi(e.card.type) && e.target.kind === "metric") {
1250
+ if (!((l = e.card.sql) != null && l.trim()) && !ri(e.card.type) && e.target.kind === "metric") {
1251
1251
  const f = e.target.metricId, m = (u = (d = e.card.config) == null ? void 0 : d.metricColumns) == null ? void 0 : u.find(
1252
1252
  (h) => h.id === f
1253
1253
  );
1254
1254
  if (!m)
1255
1255
  return;
1256
- const p = Tn(
1256
+ const p = Hn(
1257
1257
  e.card,
1258
1258
  m
1259
1259
  ), y = p.authoredFormat;
@@ -1263,7 +1263,7 @@ function Ko(e) {
1263
1263
  e.boundCurrency
1264
1264
  ) : void 0;
1265
1265
  }
1266
- const n = J(e.card), r = e.target.kind === "metric" ? e.target.metricId : void 0, i = e.target.kind === "column" ? [e.target.columnKey] : [
1266
+ const n = X(e.card), r = e.target.kind === "metric" ? e.target.metricId : void 0, i = e.target.kind === "column" ? [e.target.columnKey] : [
1267
1267
  ...e.resultColumnKeys || [],
1268
1268
  ...Object.keys(n),
1269
1269
  e.target.metricId
@@ -1286,7 +1286,7 @@ function Ko(e) {
1286
1286
  }
1287
1287
  function Ql(e) {
1288
1288
  var n, r;
1289
- const t = e.persistedSettings ?? J(e.card)[e.columnId];
1289
+ const t = e.persistedSettings ?? X(e.card)[e.columnId];
1290
1290
  if (!t && !e.resolvedSettings || (t == null ? void 0 : t.inheritMetricFormat) === !0 || ((n = e.resolvedSettings) == null ? void 0 : n.inheritMetricFormat) === !0) {
1291
1291
  const i = te(
1292
1292
  (r = pe(e.card, {
@@ -1309,7 +1309,7 @@ function Ql(e) {
1309
1309
  })
1310
1310
  );
1311
1311
  }
1312
- function Xl(e) {
1312
+ function Jl(e) {
1313
1313
  const { value: t, formatOptions: n, preferences: r } = e;
1314
1314
  return n != null && n.type && n.type !== "auto" ? It(t, n.type, n) : Io({
1315
1315
  number: t,
@@ -1321,7 +1321,7 @@ function Xl(e) {
1321
1321
  });
1322
1322
  }
1323
1323
  function Lo(e) {
1324
- return yi({
1324
+ return ii({
1325
1325
  ...e,
1326
1326
  activation: dt({
1327
1327
  card: e.card,
@@ -1329,8 +1329,8 @@ function Lo(e) {
1329
1329
  })
1330
1330
  });
1331
1331
  }
1332
- function Jl(e) {
1333
- return bi({
1332
+ function Xl(e) {
1333
+ return ai({
1334
1334
  activation: dt({
1335
1335
  card: e.card,
1336
1336
  cardConfig: e.cardConfig
@@ -1340,7 +1340,7 @@ function Jl(e) {
1340
1340
  });
1341
1341
  }
1342
1342
  function Vo(e) {
1343
- const t = Dn(e.card, e.effectiveCardConfig), n = uo({
1343
+ const t = kn(e.card, e.effectiveCardConfig), n = uo({
1344
1344
  card: t,
1345
1345
  records: e.rows,
1346
1346
  keys: e.rows.length === 0 ? e.resultKeys : void 0,
@@ -1357,7 +1357,7 @@ function Vo(e) {
1357
1357
  delimiter: e.file.delimiter,
1358
1358
  csvEncoding: e.file.csvEncoding,
1359
1359
  includeHeaders: e.file.includeHeaders,
1360
- columnSettings: J(e.card),
1360
+ columnSettings: X(e.card),
1361
1361
  visibleColumns: [...n.visibleKeys],
1362
1362
  columnLabels: Object.fromEntries(n.visibleKeys.map((r) => [r, n.labels[r] ?? r]))
1363
1363
  }
@@ -1367,30 +1367,30 @@ function Bo(e) {
1367
1367
  var n;
1368
1368
  const t = (n = e.preferences) == null ? void 0 : n.comparisonPresentation;
1369
1369
  return {
1370
- ...Fa,
1370
+ ...ua,
1371
1371
  ...t,
1372
1372
  ...t != null && t.conditionalLabels ? { conditionalLabels: { ...t.conditionalLabels } } : {},
1373
1373
  ...t != null && t.colors ? { colors: { ...t.colors } } : {}
1374
1374
  };
1375
1375
  }
1376
1376
  function qo(e) {
1377
- const t = Dn(e.card, e.effectiveCardConfig), { cardId: n, ...r } = e.requestPayloadBase, i = e.formatOptions.visibleColumns ?? [], o = [
1377
+ const t = kn(e.card, e.effectiveCardConfig), { cardId: n, ...r } = e.requestPayloadBase, i = e.formatOptions.visibleColumns ?? [], o = [
1378
1378
  ...i,
1379
1379
  ...Object.keys(e.formatOptions.columnSettings ?? {})
1380
- ], a = vi(
1380
+ ], a = oi(
1381
1381
  e.card,
1382
1382
  i,
1383
1383
  e.effectiveCardConfig
1384
- ), s = Ii(
1384
+ ), s = si(
1385
1385
  e.card,
1386
1386
  e.effectiveCardConfig,
1387
1387
  a
1388
- ), c = ni(
1388
+ ), c = qa(
1389
1389
  t,
1390
1390
  o
1391
1391
  ), l = new Set(
1392
- c.eligibleTargets.map(Re)
1393
- ), d = (v) => l.has(Re(v)) ? ii({
1392
+ c.eligibleTargets.map(Le)
1393
+ ), d = (v) => l.has(Le(v)) ? Ua({
1394
1394
  bindings: r.controlBindings,
1395
1395
  controls: [
1396
1396
  ...r.controlDefinitions ?? [],
@@ -1400,7 +1400,7 @@ function qo(e) {
1400
1400
  target: v,
1401
1401
  knownTargets: c.knownTargets,
1402
1402
  eligibleTargets: c.eligibleTargets
1403
- }).currency : void 0, u = ri({
1403
+ }).currency : void 0, u = ci({
1404
1404
  card: e.card,
1405
1405
  comparisonMetadata: e.comparisonMetadata,
1406
1406
  columnKeyMap: e.columnKeyMap
@@ -1429,7 +1429,7 @@ function qo(e) {
1429
1429
  throw new Error(
1430
1430
  "Canonical raw temporal export requires an authoritative columnKeyMap."
1431
1431
  );
1432
- const b = Ci({
1432
+ const b = li({
1433
1433
  cardType: e.card.type,
1434
1434
  resultOwner: r.resultOwner,
1435
1435
  effectiveCardConfig: e.effectiveCardConfig,
@@ -1448,13 +1448,13 @@ function qo(e) {
1448
1448
  }
1449
1449
  } else if (r.resultOwner === "freeform" && r.sql.trim() && !r.python.trim())
1450
1450
  for (const [v, I] of Object.entries(
1451
- J(e.card)
1451
+ X(e.card)
1452
1452
  )) {
1453
1453
  if (I.type !== "date") continue;
1454
- const b = Fi(I.dateFormat);
1454
+ const b = di(I.dateFormat);
1455
1455
  b && h.set(
1456
1456
  v,
1457
- Oa({
1457
+ Ia({
1458
1458
  format: b,
1459
1459
  preferences: e.reportContext.valueFormat,
1460
1460
  calendar: e.reportContext.calendar
@@ -1468,14 +1468,14 @@ function qo(e) {
1468
1468
  if (m.byColumnKey.has(v) || h.has(v))
1469
1469
  return [];
1470
1470
  const I = u.columnPresentationOwners.get(v), b = {
1471
- ...Si(t, v, {
1471
+ ...ui(t, v, {
1472
1472
  columnKeyMap: e.columnKeyMap,
1473
1473
  resultColumns: e.resultColumns
1474
1474
  }),
1475
1475
  ...I ? { metricId: I.metricId, metricAlias: I.metricAlias } : {}
1476
1476
  }, S = (H = t.sql) != null && H.trim() ? void 0 : pe(t, b), $ = S ? { kind: "metric", metricId: S.id } : { kind: "column", columnKey: v }, k = l.has(
1477
- Re($)
1478
- ), q = d($), G = J(t)[v], E = {
1477
+ Le($)
1478
+ ), q = d($), G = X(t)[v], E = {
1479
1479
  dashboardId: e.dashboardId,
1480
1480
  cardId: t.id
1481
1481
  }, ae = { kind: "column", columnKey: v }, _ = S && (!G || G.inheritMetricFormat === !0) ? te(S.format, {
@@ -1550,7 +1550,7 @@ function qo(e) {
1550
1550
  cardId: e.card.id
1551
1551
  },
1552
1552
  target: { kind: "column", columnKey: v.columnKey },
1553
- format: wi(
1553
+ format: fi(
1554
1554
  I,
1555
1555
  {
1556
1556
  dateStyle: e.reportContext.valueFormat.dateStyle,
@@ -1568,7 +1568,7 @@ function qo(e) {
1568
1568
  format: I
1569
1569
  }))
1570
1570
  );
1571
- const C = Aa({
1571
+ const C = Ca({
1572
1572
  reportContext: e.reportContext,
1573
1573
  resolvedFormats: g
1574
1574
  });
@@ -1583,7 +1583,7 @@ function qo(e) {
1583
1583
  };
1584
1584
  }
1585
1585
  function Uo(e) {
1586
- const t = oi(
1586
+ const t = za(
1587
1587
  e.card,
1588
1588
  e.requestPayloadBase
1589
1589
  ), { cardId: n, ...r } = t.requestPayloadBase, i = qo(e);
@@ -1604,8 +1604,8 @@ function Zl(e) {
1604
1604
  const { card: t, result: n } = e;
1605
1605
  if (t.type !== "table" && t.type !== "detailTable")
1606
1606
  return { status: "refused", reason: "not_a_table" };
1607
- const r = n.modelFormats ? $a(e.effectiveCardConfig ?? t.config, n) : e.effectiveCardConfig;
1608
- if (ai({ card: t, comparisonMetadata: n.comparisonMetadata }))
1607
+ const r = n.modelFormats ? Fa(e.effectiveCardConfig ?? t.config, n) : e.effectiveCardConfig;
1608
+ if (mi({ card: t, comparisonMetadata: n.comparisonMetadata }))
1609
1609
  return { status: "refused", reason: "comparison_metadata_missing" };
1610
1610
  const i = Vo({
1611
1611
  card: t,
@@ -1635,8 +1635,8 @@ function Zl(e) {
1635
1635
  } : { status: "refused", reason: "columns_unresolved" };
1636
1636
  }
1637
1637
  function lr(e, t, n) {
1638
- if (ma(
1639
- pa(t),
1638
+ if (na(
1639
+ ra(t),
1640
1640
  e.aggregateOrigin
1641
1641
  ))
1642
1642
  return { aggregate: void 0, aggregateOrigin: void 0 };
@@ -1734,19 +1734,19 @@ function Qo(e) {
1734
1734
  return { style: void 0, issues: [{ field: "dashboardStyle", code: "invalid_value", message: "The dashboard style must be an object." }] };
1735
1735
  const t = [], n = {};
1736
1736
  for (const [r, i] of Object.entries(e)) {
1737
- if (!Ja.includes(r)) {
1737
+ if (!Xa.includes(r)) {
1738
1738
  t.push({ field: r, code: "unknown_field", message: `${r} is not a dashboard style field.` });
1739
1739
  continue;
1740
1740
  }
1741
- const o = Xo(r, i, t);
1741
+ const o = Jo(r, i, t);
1742
1742
  o !== void 0 && (n[r] = o);
1743
1743
  }
1744
1744
  return { style: Object.keys(n).length > 0 ? n : void 0, issues: t };
1745
1745
  }
1746
- function Xo(e, t, n) {
1746
+ function Jo(e, t, n) {
1747
1747
  if (Ya(e)) {
1748
1748
  const { min: r, max: i, label: o } = Qa[e];
1749
- return typeof t != "number" || !Number.isFinite(t) ? R(n, e, "invalid_value", `${o} must be a number of px.`) : Number.isInteger(t) ? t < r || t > i ? R(n, e, "out_of_range", `${Xa(e)}.`) : t : R(n, e, "not_integer", `${o} must be a whole number of px.`);
1749
+ return typeof t != "number" || !Number.isFinite(t) ? R(n, e, "invalid_value", `${o} must be a number of px.`) : Number.isInteger(t) ? t < r || t > i ? R(n, e, "out_of_range", `${Ja(e)}.`) : t : R(n, e, "not_integer", `${o} must be a whole number of px.`);
1750
1750
  }
1751
1751
  switch (e) {
1752
1752
  case "cardBorder":
@@ -1786,7 +1786,7 @@ function rd(e, t) {
1786
1786
  const n = t ?? null;
1787
1787
  return { style: e.dashboardStyle !== void 0 ? Yo(e.dashboardStyle, "lenient").style : void 0, organizationAppearance: n ? Ha(n).spec : null };
1788
1788
  }
1789
- const Jo = {
1789
+ const Xo = {
1790
1790
  SUM: "total",
1791
1791
  AVG: "average",
1792
1792
  MIN: "lowest",
@@ -1807,7 +1807,7 @@ function sn(e) {
1807
1807
  }
1808
1808
  function Zo(e) {
1809
1809
  var i, o, a;
1810
- const t = La({ variables: [e] })[0];
1810
+ const t = ka({ variables: [e] })[0];
1811
1811
  if (!t) return;
1812
1812
  const n = ut(t.card), r = n.kind === "config" ? n.executableSources[0] : n.kind === "sql" ? (i = n.pinnedCatalogSources[0]) == null ? void 0 : i.source : void 0;
1813
1813
  if (!r) {
@@ -1842,7 +1842,7 @@ function ts(e) {
1842
1842
  switch (e.get.kind) {
1843
1843
  case "aggregate": {
1844
1844
  const d = a[0];
1845
- return d ? d.aggregate ? `The ${Jo[String(d.aggregate).toUpperCase()] ?? String(d.aggregate).toLowerCase()} ${ve(d)}${n}${r}${ln(e)}` : `The ${se(d)}${n}${r}${ln(e)}` : "An aggregate, with no measure chosen yet";
1845
+ return d ? d.aggregate ? `The ${Xo[String(d.aggregate).toUpperCase()] ?? String(d.aggregate).toLowerCase()} ${ve(d)}${n}${r}${ln(e)}` : `The ${se(d)}${n}${r}${ln(e)}` : "An aggregate, with no measure chosen yet";
1846
1846
  }
1847
1847
  case "list": {
1848
1848
  const d = o[0];
@@ -1859,8 +1859,8 @@ function ts(e) {
1859
1859
  }
1860
1860
  }
1861
1861
  function ln(e) {
1862
- const t = Va(e);
1863
- return t ? `, compared with ${xi({ mode: "explicit", spec: t })}` : "";
1862
+ const t = _a(e);
1863
+ return t ? `, compared with ${pi({ mode: "explicit", spec: t })}` : "";
1864
1864
  }
1865
1865
  function ns(e) {
1866
1866
  return e.charAt(0).toUpperCase() + e.slice(1);
@@ -1885,7 +1885,7 @@ function is(e) {
1885
1885
  return !!(e && Object.prototype.hasOwnProperty.call(e, "calculatedFields"));
1886
1886
  }
1887
1887
  function ee(...e) {
1888
- return Ti(e.flatMap((t) => t || []));
1888
+ return hi(e.flatMap((t) => t || []));
1889
1889
  }
1890
1890
  function le(e, t) {
1891
1891
  return {
@@ -1976,7 +1976,7 @@ function cs(e) {
1976
1976
  }
1977
1977
  function od(e) {
1978
1978
  const { field: t, sheetFields: n = [], dashboardFields: r = [] } = e, i = (s) => s.find(
1979
- (c) => Di(c, t, {
1979
+ (c) => gi(c, t, {
1980
1980
  allowComparableFallback: !0
1981
1981
  })
1982
1982
  );
@@ -2003,14 +2003,14 @@ function ls(e, t) {
2003
2003
  return b.some((S) => S.id === i.id) ? b : [i, ...b];
2004
2004
  })() : [i], u = new Map(d.map((b) => [b.id, b])), f = ne(r, { kind: "frame_updated", frame: i, resizeForNewKind: t.resizeLayouts });
2005
2005
  let m = /* @__PURE__ */ new Set();
2006
- const p = ki.produce(e, (b) => {
2006
+ const p = yi.produce(e, (b) => {
2007
2007
  const S = b.sheets[n];
2008
2008
  f.layouts !== r.layouts && (S.layouts = Bt(f.layouts)), f.customizedBreakpoints !== r.customizedBreakpoints && (S.customizedBreakpoints = f.customizedBreakpoints), t.sheetCalculatedFields !== void 0 && (S.calculatedFields = cs(t.sheetCalculatedFields)), S.frames = S.frames.map((k) => {
2009
2009
  const q = u.get(k.id);
2010
2010
  return q ? Bt(c(q)) : k.calculatedFields === void 0 ? k : { ...k, calculatedFields: void 0 };
2011
2011
  });
2012
2012
  const $ = Vt(S);
2013
- m = new Set([...s].filter((k) => !$.has(k))), _i(b, m), t.dashboardCalculatedFields && (b.calculatedFields = t.dashboardCalculatedFields);
2013
+ m = new Set([...s].filter((k) => !$.has(k))), bi(b, m), t.dashboardCalculatedFields && (b.calculatedFields = t.dashboardCalculatedFields);
2014
2014
  }), y = p.sheets[n].frames.find((b) => b.id === i.id), h = [
2015
2015
  ...m.size ? [{ kind: "cards_removed", cardIds: [...m] }] : [],
2016
2016
  { kind: "frame_committed", sheetId: t.sheetId, before: a, after: y }
@@ -2035,7 +2035,7 @@ function fs(e, t, n) {
2035
2035
  const a = n.map((s) => {
2036
2036
  const c = (o.frames ?? []).find((l) => l.cards.some((d) => d.id === s));
2037
2037
  if (!c)
2038
- throw new F("card_not_found", `No card ${s} on ${Mi(o)}.`, "Read the outline again and use its card ids.");
2038
+ throw new F("card_not_found", `No card ${s} on ${vi(o)}.`, "Read the outline again and use its card ids.");
2039
2039
  return c.cards.find((l) => l.id === s);
2040
2040
  });
2041
2041
  return { sheets: r, sheetIndex: i, sheet: o, cards: a };
@@ -2054,7 +2054,7 @@ function ms(e, t) {
2054
2054
  for (const y of t.cardIds.slice(1)) {
2055
2055
  const h = Ie(s, y);
2056
2056
  if (h.id === a) continue;
2057
- const g = Mn(h, y);
2057
+ const g = _n(h, y);
2058
2058
  if (!g.cards.length) {
2059
2059
  h.visualId && c.push(Be(T(h.cards[0].title))), s = ne(s, { kind: "frame_removed", frameId: h.id });
2060
2060
  continue;
@@ -2084,7 +2084,7 @@ function ps(e, t) {
2084
2084
  const i = n[r], o = Ie(i, t.cardId), a = o.cards.find((u) => u.id === t.cardId);
2085
2085
  if (o.cards.length < 2)
2086
2086
  throw new F("frame_not_found", `${T(a.title)} already has its own spot.`);
2087
- const s = Mn(o, t.cardId);
2087
+ const s = _n(o, t.cardId);
2088
2088
  let c = ne(i, {
2089
2089
  kind: "frame_updated",
2090
2090
  frame: o.visualId ? et(s) : s,
@@ -2120,7 +2120,7 @@ function hs() {
2120
2120
  }
2121
2121
  },
2122
2122
  runtime: {
2123
- generatedAtFormat: Oi
2123
+ generatedAtFormat: Ii
2124
2124
  },
2125
2125
  inputs: [],
2126
2126
  sections: []
@@ -2148,7 +2148,7 @@ function pr(e) {
2148
2148
  return [{ type: "text", value: e }];
2149
2149
  }
2150
2150
  function sd(e, t = []) {
2151
- return Ai(e, { by: "then" }).flatMap((n) => n.type === "link" ? n.children ?? [] : [n]).map((n) => n.type === "text" ? n.value : `{{${$i(n.ref, Pi({ kind: "document", inputs: t }))}}}`).join("") || "";
2151
+ return Ci(e, { by: "then" }).flatMap((n) => n.type === "link" ? n.children ?? [] : [n]).map((n) => n.type === "text" ? n.value : `{{${Fi(n.ref, Si({ kind: "document", inputs: t }))}}}`).join("") || "";
2152
2152
  }
2153
2153
  function bs(e, t) {
2154
2154
  return e.find(
@@ -2202,10 +2202,10 @@ function Cs(e, t, n) {
2202
2202
  var o;
2203
2203
  if (!e || !t || t.customFilterPreferences) return;
2204
2204
  const r = t.defaultDateFilter;
2205
- return (t.dateSelectionMode === "day" ? Ni(r) : t.dateSelectionMode === "months" && Ei(r)) && ((o = ce(t, n)) == null ? void 0 : o.valueType) === "date" ? !0 : void 0;
2205
+ return (t.dateSelectionMode === "day" ? wi(r) : t.dateSelectionMode === "months" && xi(r)) && ((o = ce(t, n)) == null ? void 0 : o.valueType) === "date" ? !0 : void 0;
2206
2206
  }
2207
2207
  function dd(e) {
2208
- const t = e.createId ?? Te, n = t(), r = Ki({
2208
+ const t = e.createId ?? xe, n = t(), r = Di({
2209
2209
  field: e.field,
2210
2210
  dataSource: e.dataSource,
2211
2211
  connectionId: e.connectionId,
@@ -2221,8 +2221,8 @@ function dd(e) {
2221
2221
  });
2222
2222
  }
2223
2223
  function Fs(e) {
2224
- const t = e.createId ?? Te, n = e.label || e.filter.title || e.filter.column || e.filter.id, r = On(e.dashboard, { label: n }), i = {
2225
- ...An(e.filter),
2224
+ const t = e.createId ?? xe, n = e.label || e.filter.title || e.filter.column || e.filter.id, r = Mn(e.dashboard, { label: n }), i = {
2225
+ ...On(e.filter),
2226
2226
  variableName: r
2227
2227
  };
2228
2228
  return {
@@ -2233,9 +2233,9 @@ function Fs(e) {
2233
2233
  requiredAtExecution: !1,
2234
2234
  scope: e.scope,
2235
2235
  runtimeScope: "shared",
2236
- presentation: Pn(i),
2236
+ presentation: $n(i),
2237
2237
  filter: i,
2238
- exports: $n(i)
2238
+ exports: An(i)
2239
2239
  };
2240
2240
  }
2241
2241
  function Ss(e, t, n, r = { calendar: null }) {
@@ -2272,14 +2272,14 @@ function Ss(e, t, n, r = { calendar: null }) {
2272
2272
  if (n.mapping.draft.inputId !== s.id)
2273
2273
  return a("The card mapping was prepared for another filter.");
2274
2274
  }
2275
- const l = n.definition ? An(n.definition) : c;
2275
+ const l = n.definition ? On(n.definition) : c;
2276
2276
  if (l.kind === "global-date" && n.scope && !ws(n.scope))
2277
2277
  return a("The Global Date filter applies to regular tabs only.");
2278
2278
  const d = (Ot = r.calendar) == null ? void 0 : Ot.tz, u = n.definition !== void 0, f = n.forceSelection !== void 0 || u ? Cs(
2279
2279
  n.forceSelection ?? s.forceSelection,
2280
2280
  l,
2281
2281
  d
2282
- ) : s.forceSelection ? !0 : void 0, m = n.variableName !== void 0 ? On(
2282
+ ) : s.forceSelection ? !0 : void 0, m = n.variableName !== void 0 ? Mn(
2283
2283
  e,
2284
2284
  { name: n.variableName },
2285
2285
  { exclude: { source: "input", inputId: s.id } }
@@ -2287,7 +2287,7 @@ function Ss(e, t, n, r = { calendar: null }) {
2287
2287
  var Kt, Lt;
2288
2288
  const w = { ...O };
2289
2289
  if (y !== void 0 && (w.label = y), n.variableName !== void 0 && (w.variableName = m), n.scope && (w.scope = n.scope), h || g) {
2290
- const Ee = Pn(l);
2290
+ const Ee = $n(l);
2291
2291
  w.presentation = { ...O.presentation }, h && (w.presentation.placement = Ee.placement), g && (Ee.widthPx === void 0 ? delete w.presentation.widthPx : w.presentation.widthPx = Ee.widthPx);
2292
2292
  }
2293
2293
  return (n.forceSelection !== void 0 || u) && (f ? w.forceSelection = f : delete w.forceSelection), n.requiredAtExecution !== void 0 && (n.requiredAtExecution ? w.requiredAtExecution = !0 : delete w.requiredAtExecution), qe(w, "optionSource", n.optionSource), qe(w, "optionDependencies", n.optionDependencies), qe(w, "optionPopulation", n.optionPopulation), ((Kt = n.mapping) == null ? void 0 : Kt.kind) === "save" && n.mapping.draft.acceptance.ok ? w.application = n.mapping.draft.acceptance.application : ((Lt = n.mapping) == null ? void 0 : Lt.kind) === "remove" && delete w.application, w;
@@ -2304,7 +2304,7 @@ function Ss(e, t, n, r = { calendar: null }) {
2304
2304
  filter: b(l)
2305
2305
  } : k
2306
2306
  );
2307
- u && (q.exports = $n(l)), S[$] = q;
2307
+ u && (q.exports = An(l)), S[$] = q;
2308
2308
  const G = ht({
2309
2309
  inputs: [q],
2310
2310
  dashboardFilters: []
@@ -2466,19 +2466,19 @@ function xs(e, t) {
2466
2466
  }
2467
2467
  function Ts(e, t, n, r) {
2468
2468
  var d, u;
2469
- const i = [], o = Un(e), a = (f) => fn(t, f, o), s = (f) => fn(n, f, o), c = [];
2469
+ const i = [], o = qn(e), a = (f) => fn(t, f, o), s = (f) => fn(n, f, o), c = [];
2470
2470
  if (n.runtimeScope === "perSheet")
2471
2471
  for (const f of o.values())
2472
2472
  c.push({ sheetId: f.sheetId, sheetKind: f.sheetKind });
2473
2473
  else if (n.runtimeScope === "perCard") {
2474
- for (const f of zn(e))
2474
+ for (const f of Un(e))
2475
2475
  c.push({
2476
2476
  sheetId: f.sheetId,
2477
2477
  cardId: f.cardId,
2478
2478
  sheetKind: (d = o.get(f.sheetId)) == null ? void 0 : d.sheetKind
2479
2479
  });
2480
2480
  for (const f of e.variables ?? [])
2481
- c.push(...Ba(e, f.id));
2481
+ c.push(...Ma(e, f.id));
2482
2482
  } else if (n.runtimeScope === "perDocumentSection")
2483
2483
  for (const f of e.sheets ?? [])
2484
2484
  for (const m of ((u = f.document) == null ? void 0 : u.sections) ?? [])
@@ -2501,16 +2501,16 @@ function Ts(e, t, n, r) {
2501
2501
  function fn(e, t, n) {
2502
2502
  if (e.runtimeScope === "perSheet" && t.sheetId && !t.cardId && !t.sectionId) {
2503
2503
  const r = n.get(t.sheetId);
2504
- return r ? jn(e, r) : !1;
2504
+ return r ? zn(e, r) : !1;
2505
2505
  }
2506
- return qa(e, t);
2506
+ return Oa(e, t);
2507
2507
  }
2508
2508
  function Ds(e, t) {
2509
2509
  const n = { ...e };
2510
2510
  return t.defaultInputValues && Object.keys(t.defaultInputValues).length ? n.defaultInputValues = t.defaultInputValues : e.defaultInputValues !== void 0 && delete n.defaultInputValues, n;
2511
2511
  }
2512
2512
  function ks(e, t, n, r, i) {
2513
- const o = !!(n != null && n.defaultValueChanged || n != null && n.selectionIdentityChanged) || Ri(e, t);
2513
+ const o = !!(n != null && n.defaultValueChanged || n != null && n.selectionIdentityChanged) || Ti(e, t);
2514
2514
  return {
2515
2515
  ...n,
2516
2516
  target: (n == null ? void 0 : n.target) ?? r,
@@ -2593,18 +2593,18 @@ function Ne(e, t) {
2593
2593
  return n;
2594
2594
  }
2595
2595
  function yr(e, t) {
2596
- const n = Wn(e, t);
2596
+ const n = jn(e, t);
2597
2597
  return (n == null ? void 0 : n.kind) === "variable" ? `the variable ${n.variable.name}` : T(n == null ? void 0 : n.card.title);
2598
2598
  }
2599
2599
  function br(e, t) {
2600
- if (!Wn(e, t))
2600
+ if (!jn(e, t))
2601
2601
  throw new F("card_not_found", `No card or variable ${t} on this dashboard.`, "Read the outline again and use its card ids and variable names.");
2602
2602
  }
2603
2603
  function _s(e, t, n) {
2604
2604
  const r = Z(e), i = r.findFilterInput({ inputId: t });
2605
2605
  return i ? r.reachedCards({ inputId: t }).filter(
2606
2606
  (o) => ["bound", "automatic", "sql", "relationshipApplied"].includes(
2607
- Nn(i.input, o.card, n).reach
2607
+ Pn(i.input, o.card, n).reach
2608
2608
  )
2609
2609
  ).length : 0;
2610
2610
  }
@@ -2616,12 +2616,12 @@ function Os(e, t) {
2616
2616
  }
2617
2617
  function vr(e, t, n, r) {
2618
2618
  const i = Z(e), o = i.findFilterInput({ inputId: t });
2619
- return o ? i.reachedCards({ inputId: t }).filter((a) => Nn(o.input, a.card, r).reach === n).length : 0;
2619
+ return o ? i.reachedCards({ inputId: t }).filter((a) => Pn(o.input, a.card, r).reach === n).length : 0;
2620
2620
  }
2621
2621
  function Ir(e, t) {
2622
2622
  if (t.scope.kind === "allSheets") return "every sheet";
2623
2623
  if (t.scope.kind !== "sheets") return "its cards";
2624
- const n = [...Un(e).values()].filter((r) => jn(t, r));
2624
+ const n = [...qn(e).values()].filter((r) => zn(t, r));
2625
2625
  return Oe(n.map((r) => {
2626
2626
  var i, o;
2627
2627
  return ((o = (i = e.sheets) == null ? void 0 : i.find((a) => a.id === r.sheetId)) == null ? void 0 : o.title) ?? r.sheetId;
@@ -2690,7 +2690,7 @@ function Ps(e, t, n) {
2690
2690
  var o, a, s, c, l, d;
2691
2691
  if (!t) return "updates its settings";
2692
2692
  const r = [];
2693
- if (t.label !== n.label && r.push(`renames it ${T(n.label)}`), (((o = t.filter) == null ? void 0 : o.type) ?? "multiple") !== (((a = n.filter) == null ? void 0 : a.type) ?? "multiple") && r.push(`makes it ${Cr(n)}`), JSON.stringify(((s = t.filter) == null ? void 0 : s.defaultValues) ?? null) !== JSON.stringify(((c = n.filter) == null ? void 0 : c.defaultValues) ?? null) || !ha((l = t.filter) == null ? void 0 : l.defaultDateFilter, (d = n.filter) == null ? void 0 : d.defaultDateFilter)) {
2693
+ if (t.label !== n.label && r.push(`renames it ${T(n.label)}`), (((o = t.filter) == null ? void 0 : o.type) ?? "multiple") !== (((a = n.filter) == null ? void 0 : a.type) ?? "multiple") && r.push(`makes it ${Cr(n)}`), JSON.stringify(((s = t.filter) == null ? void 0 : s.defaultValues) ?? null) !== JSON.stringify(((c = n.filter) == null ? void 0 : c.defaultValues) ?? null) || !ia((l = t.filter) == null ? void 0 : l.defaultDateFilter, (d = n.filter) == null ? void 0 : d.defaultDateFilter)) {
2694
2694
  const u = Fr(n);
2695
2695
  r.push(u ? `sets its ${u.replace(/^default /, "default to ").replace(/^a default period$/, "default period")}` : "removes its default");
2696
2696
  }
@@ -2702,7 +2702,7 @@ function Ns(e, t) {
2702
2702
  dashboard: {
2703
2703
  ...e,
2704
2704
  inputs: re(e).filter((i) => i.id !== t),
2705
- defaultInputValues: Li(e.defaultInputValues, t)
2705
+ defaultInputValues: ki(e.defaultInputValues, t)
2706
2706
  },
2707
2707
  runtimeEffects: [{ kind: "input_removed", inputId: t }],
2708
2708
  clauses: [he(`removes the filter ${T(n.label)}`)]
@@ -2711,7 +2711,7 @@ function Ns(e, t) {
2711
2711
  function Es(e, t, n) {
2712
2712
  var a;
2713
2713
  br(e, n);
2714
- const r = za(t.scope, n);
2714
+ const r = $a(t.scope, n);
2715
2715
  if (!r)
2716
2716
  throw new F(
2717
2717
  "filter_invalid",
@@ -2759,7 +2759,7 @@ function Rs(e) {
2759
2759
  }
2760
2760
  }
2761
2761
  function Ks(e, t) {
2762
- const n = Ne(e, t.filterId), r = { ...t.binding, kind: "bound", cardId: t.cardId }, i = Ua(n.scope, t.cardId), o = i !== n.scope;
2762
+ const n = Ne(e, t.filterId), r = { ...t.binding, kind: "bound", cardId: t.cardId }, i = Aa(n.scope, t.cardId), o = i !== n.scope;
2763
2763
  return {
2764
2764
  dashboard: Sr(e, t.filterId, t.cardId, r, o ? i : void 0),
2765
2765
  clauses: [
@@ -2830,10 +2830,10 @@ function qs(e, t) {
2830
2830
  };
2831
2831
  }
2832
2832
  function xr(e) {
2833
- return e.cards.length < ja;
2833
+ return e.cards.length < Pa;
2834
2834
  }
2835
2835
  function Us(e) {
2836
- return e.kpi.layout === "tiles" && e.cards.length + 1 > Gn;
2836
+ return e.kpi.layout === "tiles" && e.cards.length + 1 > Wn;
2837
2837
  }
2838
2838
  function zs(e, t) {
2839
2839
  return !xr(e) || t.type !== "kpi" || e.cards.some(({ id: n }) => n === t.id) ? e : {
@@ -2848,7 +2848,7 @@ function js(e, t) {
2848
2848
  return n.length === e.cards.length ? e : { ...e, cards: n };
2849
2849
  }
2850
2850
  function Tr(e) {
2851
- return e.cards.length <= Gn;
2851
+ return e.cards.length <= Wn;
2852
2852
  }
2853
2853
  function Ws(e, t) {
2854
2854
  const n = { ...e.kpi, ...t };
@@ -3001,12 +3001,12 @@ function Qs(e, t, n) {
3001
3001
  const r = _r(e, n.type);
3002
3002
  if (r)
3003
3003
  throw new Error(r);
3004
- return Hn(
3004
+ return Gn(
3005
3005
  e,
3006
3006
  (i) => i.id === t ? n : i
3007
3007
  );
3008
3008
  }
3009
- const Xs = [
3009
+ const Js = [
3010
3010
  { id: "data", label: "Data" },
3011
3011
  { id: "content", label: "Content" },
3012
3012
  { id: "layout", label: "Layout" }
@@ -3015,12 +3015,12 @@ function fd() {
3015
3015
  const e = Object.values(B).filter(
3016
3016
  (t) => t.addable
3017
3017
  );
3018
- return Xs.map((t) => ({
3018
+ return Js.map((t) => ({
3019
3019
  ...t,
3020
3020
  kinds: e.filter((n) => n.group === t.id)
3021
3021
  })).filter((t) => t.kinds.length > 0);
3022
3022
  }
3023
- const Js = {
3023
+ const Xs = {
3024
3024
  header: ["title", "metadata"],
3025
3025
  footer: ["note", "pageInfo"]
3026
3026
  };
@@ -3032,8 +3032,8 @@ class D extends Error {
3032
3032
  const pn = 8, Zs = 240;
3033
3033
  function md() {
3034
3034
  return {
3035
- section: () => `doc_section_${Te()}`,
3036
- card: () => `doc_card_${Te()}`
3035
+ section: () => `doc_section_${xe()}`,
3036
+ card: () => `doc_card_${xe()}`
3037
3037
  };
3038
3038
  }
3039
3039
  function ec(e) {
@@ -3057,8 +3057,8 @@ function nc(e, t = {}) {
3057
3057
  )
3058
3058
  )
3059
3059
  );
3060
- return zn(e).filter(
3061
- (r) => tc.has(r.card.type) && !r.card.linkedSourceCardId && !(r.kind === "frameCard" && n.has(r.frameId)) && !(r.kind === "documentSectionCard" && r.sectionId === t.excludeSectionId) && !Bi(r.card)
3060
+ return Un(e).filter(
3061
+ (r) => tc.has(r.card.type) && !r.card.linkedSourceCardId && !(r.kind === "frameCard" && n.has(r.frameId)) && !(r.kind === "documentSectionCard" && r.sectionId === t.excludeSectionId) && !Mi(r.card)
3062
3062
  );
3063
3063
  }
3064
3064
  function rc(e) {
@@ -3168,11 +3168,11 @@ function ic(e, t, n) {
3168
3168
  };
3169
3169
  }
3170
3170
  case "updateRegionText": {
3171
- if (!Js[t.region].includes(t.role))
3171
+ if (!Xs[t.region].includes(t.role))
3172
3172
  throw new D(
3173
3173
  `The ${t.region} has ${t.region === "header" ? "a title and a metadata line" : "a note and a page info line"}, not a ${t.role} line.`
3174
3174
  );
3175
- if (t.style !== void 0 && !Vi(t.role))
3175
+ if (t.style !== void 0 && !_i(t.role))
3176
3176
  throw new D(`The footer's ${t.role === "pageInfo" ? "page info" : t.role} line has no size or alignment; only the header's title and metadata lines do.`);
3177
3177
  const a = e[t.region], s = a ? bs(a.blocks, t.role) : void 0, c = t.style !== void 0 ? Wt(s == null ? void 0 : s.style, t.style) : s == null ? void 0 : s.style, l = {
3178
3178
  id: (s == null ? void 0 : s.id) ?? `${t.region}_${t.role}`,
@@ -3305,8 +3305,8 @@ function Ue(e, t, n) {
3305
3305
  throw new D(
3306
3306
  `Card '${e.cardId}' cannot be copied into this document.`
3307
3307
  );
3308
- const i = t.dashboard.sheets || [], o = i.find(({ id: p }) => p === e.sheetId), a = i.find(({ id: p }) => p === t.sheetId), s = t.ids.card(), c = we({ ...r.card, id: s });
3309
- En(c, /* @__PURE__ */ new Map([[e.cardId, s]]));
3308
+ const i = t.dashboard.sheets || [], o = i.find(({ id: p }) => p === e.sheetId), a = i.find(({ id: p }) => p === t.sheetId), s = t.ids.card(), c = Te({ ...r.card, id: s });
3309
+ Nn(c, /* @__PURE__ */ new Map([[e.cardId, s]]));
3310
3310
  const l = /* @__PURE__ */ new Set();
3311
3311
  if (ue(c, {
3312
3312
  oldCardId: e.cardId,
@@ -3324,7 +3324,7 @@ function Ue(e, t, n) {
3324
3324
  (g) => Ge(g.id) === p
3325
3325
  );
3326
3326
  if (!y) continue;
3327
- const h = we(y);
3327
+ const h = Te(y);
3328
3328
  ue(h, {
3329
3329
  oldCardId: e.cardId,
3330
3330
  newCardId: s,
@@ -3354,12 +3354,12 @@ function ue(e, t) {
3354
3354
  typeof n.entityId == "string" && (n.fieldScope === "card" && n.entityId === t.oldCardId ? n.entityId = t.newCardId : n.fieldScope === "sheet" && n.entityId === t.sourceSheetId && (typeof n.id == "string" && t.onSheetField(Ge(n.id) ?? n.id), n.entityId = t.targetSheetId)), Object.values(n).forEach((r) => ue(r, t));
3355
3355
  }
3356
3356
  function ac(e, t) {
3357
- const n = { ...we(e), id: t.section() }, r = new Map(
3357
+ const n = { ...Te(e), id: t.section() }, r = new Map(
3358
3358
  bt(n).map((i) => [i.id, t.card()])
3359
3359
  );
3360
- return Hn(n, (i) => {
3361
- const o = r.get(i.id), a = we({ ...i, id: o });
3362
- return En(a, r), ue(a, {
3360
+ return Gn(n, (i) => {
3361
+ const o = r.get(i.id), a = Te({ ...i, id: o });
3362
+ return Nn(a, r), ue(a, {
3363
3363
  oldCardId: i.id,
3364
3364
  newCardId: o,
3365
3365
  sourceSheetId: "",
@@ -3373,7 +3373,7 @@ function oc(e, t) {
3373
3373
  return e.kind !== t.kind || e.sheetId !== t.sheetId || e.cardId !== t.cardId ? !1 : e.kind === "frameCard" && t.kind === "frameCard" ? e.frameId === t.frameId : e.kind === "documentSectionCard" && t.kind === "documentSectionCard" ? e.sectionId === t.sectionId : !0;
3374
3374
  }
3375
3375
  function hn(e, t) {
3376
- if (Wa(e.dashboard, t))
3376
+ if (Na(e.dashboard, t))
3377
3377
  throw new D(
3378
3378
  `Card id '${t}' is already used by another card in this dashboard.`
3379
3379
  );
@@ -3429,8 +3429,8 @@ function dc(e, t) {
3429
3429
  }
3430
3430
  const a = { ...e, sheets: n.map((d, u) => u === r ? { ...d, document: o } : d) }, s = t.edit.type === "updateRegionText" ? `the ${lc[t.edit.role]} line of the ${T(i.title)} ${t.edit.region}` : `a text section of ${T(i.title)}`, c = [];
3431
3431
  if (t.edit.content !== void 0) {
3432
- const d = qi(t.edit.content, { inputs: a.inputs, variables: a.variables }), u = Ui(d);
3433
- c.push(`sets ${s} to ${T(zi(d))}${u ? `, ${u}` : ""}`);
3432
+ const d = Oi(t.edit.content, { inputs: a.inputs, variables: a.variables }), u = Ai(d);
3433
+ c.push(`sets ${s} to ${T($i(d))}${u ? `, ${u}` : ""}`);
3434
3434
  }
3435
3435
  const l = fc(t.edit.style);
3436
3436
  return l && c.push(c.length ? `makes it ${l}` : `makes ${s} ${l}`), {
@@ -3492,11 +3492,11 @@ function mc(e, t, n) {
3492
3492
  function pc(e, t, n) {
3493
3493
  switch (t.op) {
3494
3494
  case "card.add":
3495
- return Gi(e, t);
3495
+ return Ei(e, t);
3496
3496
  case "card.remove":
3497
- return Wi(e, t.cardId);
3497
+ return Ni(e, t.cardId);
3498
3498
  case "card.update":
3499
- return oe(ji(e, t.cardId, t.update), [t.cardId]);
3499
+ return oe(Pi(e, t.cardId, t.update), [t.cardId]);
3500
3500
  case "layout.arrange":
3501
3501
  return rs(e, t);
3502
3502
  case "frame.commit":
@@ -3553,7 +3553,7 @@ function hc(e) {
3553
3553
  }
3554
3554
  return t.map(({ clauses: n, ...r }) => ({
3555
3555
  ...r,
3556
- sentence: Hi(gc(n))
3556
+ sentence: Ri(gc(n))
3557
3557
  }));
3558
3558
  }
3559
3559
  function gc(e) {
@@ -3589,7 +3589,7 @@ function yc(e, t) {
3589
3589
  request: gn({
3590
3590
  connection_id: e.connectionId,
3591
3591
  domain_id: e.domainId,
3592
- dataset_id: ga(e),
3592
+ dataset_id: aa(e),
3593
3593
  dataset_name: e.datasetName
3594
3594
  })
3595
3595
  };
@@ -3658,7 +3658,7 @@ function rt(e, t, n) {
3658
3658
  for (const r of t) {
3659
3659
  const i = r == null ? void 0 : r.trim();
3660
3660
  if (!i) continue;
3661
- const o = Vn(i), a = e.fields.get(o);
3661
+ const o = Ln(i), a = e.fields.get(o);
3662
3662
  a === void 0 ? e.fields.set(o, n) : a !== n && e.fieldConflicts.add(o);
3663
3663
  }
3664
3664
  }
@@ -3724,7 +3724,7 @@ function $r(e, t) {
3724
3724
  function Ic(e, t) {
3725
3725
  var i;
3726
3726
  if (!e) return;
3727
- const n = Vn(t.name), r = $r(e, t.source);
3727
+ const n = Ln(t.name), r = $r(e, t.source);
3728
3728
  return r && !((i = r.fieldConflicts) != null && i.has(n)) ? r.fields.get(n) : void 0;
3729
3729
  }
3730
3730
  function Cc(e, t) {
@@ -3785,8 +3785,8 @@ function Cd(e) {
3785
3785
  const { dashboard: t, target: n, calendar: r } = e, i = Nr(n), o = Pr(t, n, r);
3786
3786
  return {
3787
3787
  value: o,
3788
- mode: si(
3789
- ci(o == null ? void 0 : o.operation) ? o.operation : i.operation
3788
+ mode: ja(
3789
+ Wa(o == null ? void 0 : o.operation) ? o.operation : i.operation
3790
3790
  )
3791
3791
  };
3792
3792
  }
@@ -3794,7 +3794,7 @@ function Pr(e, t, n) {
3794
3794
  var r;
3795
3795
  switch (t.kind) {
3796
3796
  case "dashboardInput": {
3797
- const i = Qi({
3797
+ const i = Li({
3798
3798
  dashboard: e,
3799
3799
  input: t.input,
3800
3800
  target: t.scope,
@@ -3806,7 +3806,7 @@ function Pr(e, t, n) {
3806
3806
  const i = (r = e.defaultFilterValues) == null ? void 0 : r.find(
3807
3807
  (o) => o.filterId === t.filter.id
3808
3808
  );
3809
- return i ? Yi({
3809
+ return i ? Ki({
3810
3810
  filterDefinitions: [t.filter],
3811
3811
  filterValues: [i]
3812
3812
  })[0] : ce(t.filter, n);
@@ -3824,7 +3824,7 @@ function Fd(e) {
3824
3824
  return r && (t.inputs || []).some((a) => a.id === r.id) ? { kind: "dashboardInput", input: r, scope: i } : ((o = Z(t).findFilterInput({ filterId: n.id })) == null ? void 0 : o.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: n } : { kind: "definition", filter: n };
3825
3825
  }
3826
3826
  function Sd(e) {
3827
- const { dashboard: t, target: n, calendar: r } = e, i = Nr(n), o = Xi(i), a = Sc(t, n);
3827
+ const { dashboard: t, target: n, calendar: r } = e, i = Nr(n), o = Vi(i), a = Sc(t, n);
3828
3828
  if (!a) return o;
3829
3829
  if (a === "cleared")
3830
3830
  return {
@@ -3878,7 +3878,7 @@ function yn(e) {
3878
3878
  );
3879
3879
  }
3880
3880
  function xc(e, t, n) {
3881
- const r = Ji(n == null ? void 0 : n.tz), i = Ke(t.values[0], r);
3881
+ const r = Bi(n == null ? void 0 : n.tz), i = Re(t.values[0], r);
3882
3882
  if (!i) return;
3883
3883
  const [o, a, s] = new Intl.DateTimeFormat("en-CA", {
3884
3884
  timeZone: r,
@@ -3895,7 +3895,7 @@ function xc(e, t, n) {
3895
3895
  ], l = t.values.map(
3896
3896
  (d) => {
3897
3897
  var u;
3898
- return (u = Ke(d, r)) == null ? void 0 : u.getTime();
3898
+ return (u = Re(d, r)) == null ? void 0 : u.getTime();
3899
3899
  }
3900
3900
  );
3901
3901
  return c.find((d) => {
@@ -3907,7 +3907,7 @@ function xc(e, t, n) {
3907
3907
  u.values.map(
3908
3908
  (f) => {
3909
3909
  var m;
3910
- return (m = Ke(f, r)) == null ? void 0 : m.getTime();
3910
+ return (m = Re(f, r)) == null ? void 0 : m.getTime();
3911
3911
  }
3912
3912
  ),
3913
3913
  l
@@ -3925,7 +3925,7 @@ function Dc(e) {
3925
3925
  const t = me(e.dataType);
3926
3926
  if (!["date", "datetime"].includes(t))
3927
3927
  return e;
3928
- const n = e.granularity !== void 0 || e.format !== void 0, r = Zi({
3928
+ const n = e.granularity !== void 0 || e.format !== void 0, r = qi({
3929
3929
  fieldId: e.id,
3930
3930
  dataType: e.dataType,
3931
3931
  granularity: e.granularity,
@@ -3947,7 +3947,7 @@ function wd(e, t) {
3947
3947
  return `${e}-${t.qualifiedEntityName}-${t.name}-${Date.now()}-${n}`;
3948
3948
  }
3949
3949
  function kc(e, t) {
3950
- const n = Rn(e.replace(/_/g, " "));
3950
+ const n = En(e.replace(/_/g, " "));
3951
3951
  switch (t) {
3952
3952
  case "SUM":
3953
3953
  return `Sum of ${n}`;
@@ -3967,13 +3967,13 @@ function kc(e, t) {
3967
3967
  }
3968
3968
  function xd(e, t, n) {
3969
3969
  var i;
3970
- const r = Kn(e.dataType);
3970
+ const r = Rn(e.dataType);
3971
3971
  return n === "detailTable" ? "detailColumns" : n === "matrixTable" ? ((i = e.derivedField) == null ? void 0 : i.computeStage) === "aggregate" || me(e.dataType) === "number" ? "metrics" : "groupBy" : n === "kpi" ? r === "date" ? "groupBy" : "metrics" : t.length === 0 || r === "number" ? "metrics" : r === "date" || r === "string" || r === "boolean" ? "groupBy" : "metrics";
3972
3972
  }
3973
3973
  function Td(e, t, n, r) {
3974
- const i = Kn(e.dataType), o = i === "date";
3975
- e = ya(e);
3976
- const a = ba(e), s = a.representation !== "physical", c = a.computeStage, l = s ? e.fieldScope === "domain" ? e.calculatedFieldOrigin : e.calculatedFieldOrigin || {
3974
+ const i = Rn(e.dataType), o = i === "date";
3975
+ e = oa(e);
3976
+ const a = sa(e), s = a.representation !== "physical", c = a.computeStage, l = s ? e.fieldScope === "domain" ? e.calculatedFieldOrigin : e.calculatedFieldOrigin || {
3977
3977
  id: e.id,
3978
3978
  role: e.role
3979
3979
  } : void 0;
@@ -4052,7 +4052,7 @@ function Td(e, t, n, r) {
4052
4052
  const p = e.aggregate || bn(i), y = kc(
4053
4053
  e.label,
4054
4054
  p
4055
- ), h = ta(
4055
+ ), h = zi(
4056
4056
  { ...m, label: y },
4057
4057
  n,
4058
4058
  t
@@ -4079,7 +4079,7 @@ function Td(e, t, n, r) {
4079
4079
  ...m,
4080
4080
  role: "groupby",
4081
4081
  ...o && {
4082
- granularity: Jt(e.granularity) ? e.granularity : "month",
4082
+ granularity: Xt(e.granularity) ? e.granularity : "month",
4083
4083
  // A new shelf placement does not author a presentation override.
4084
4084
  // Same-grain semantic presentation may therefore win; otherwise the
4085
4085
  // viewer's resolved automatic locale/style policy applies.
@@ -4093,13 +4093,13 @@ function Td(e, t, n, r) {
4093
4093
  ...m,
4094
4094
  role: "pivotby",
4095
4095
  ...o && {
4096
- granularity: Jt(e.granularity) ? e.granularity : "month",
4096
+ granularity: Xt(e.granularity) ? e.granularity : "month",
4097
4097
  format: void 0,
4098
4098
  formatOrigin: void 0
4099
4099
  }
4100
4100
  };
4101
4101
  if (t === "detailColumns") {
4102
- const p = na(m, "detail");
4102
+ const p = ji(m, "detail");
4103
4103
  if (d) {
4104
4104
  const y = e;
4105
4105
  return {
@@ -4129,13 +4129,13 @@ function Td(e, t, n, r) {
4129
4129
  } : null;
4130
4130
  }
4131
4131
  function Dd(e) {
4132
- return Object.values(ea(e)).some((t) => t.length > 0);
4132
+ return Object.values(Ui(e)).some((t) => t.length > 0);
4133
4133
  }
4134
4134
  function _c(e) {
4135
4135
  const t = te(e.format);
4136
4136
  if ((t == null ? void 0 : t.type) === "temporal_bucket") {
4137
4137
  if (!e.granularity) return {};
4138
- const n = Pa(
4138
+ const n = Sa(
4139
4139
  t,
4140
4140
  e.granularity
4141
4141
  );
@@ -4219,7 +4219,7 @@ function Ac(e, t) {
4219
4219
  e.type === "dataset" ? "semantic" : "physical"
4220
4220
  ), d = (m = a.label) != null && m.trim() ? a.label : void 0, u = d ? void 0 : ft(a.column_name);
4221
4221
  return {
4222
- id: ra(s, a.column_name),
4222
+ id: Wi(s, a.column_name),
4223
4223
  name: a.column_name,
4224
4224
  qualifiedFieldName: a.qualifiedFieldName || a.column_name,
4225
4225
  dataType: a.data_type,
@@ -4252,14 +4252,14 @@ function Ac(e, t) {
4252
4252
  function $c(e) {
4253
4253
  return e.map((t) => ({
4254
4254
  ...t,
4255
- id: Ln({ ...t }),
4255
+ id: Kn({ ...t }),
4256
4256
  fieldScope: "domain"
4257
4257
  }));
4258
4258
  }
4259
4259
  function Pc(e) {
4260
4260
  return e.flatMap(
4261
4261
  (t) => t.columns.map((n) => {
4262
- const r = Er(n) ? n.label : void 0, i = r ? void 0 : n.derivedLabel ?? Rn(n.name), o = r ?? i ?? n.name;
4262
+ const r = Er(n) ? n.label : void 0, i = r ? void 0 : n.derivedLabel ?? En(n.name), o = r ?? i ?? n.name;
4263
4263
  return {
4264
4264
  ...n,
4265
4265
  id: n.id || `${t.entityId}-${n.name}`,
@@ -4285,10 +4285,10 @@ function Md(e) {
4285
4285
  if (n.length > 0) {
4286
4286
  const r = /* @__PURE__ */ new Map();
4287
4287
  n.forEach((i) => {
4288
- const o = Ln(i);
4288
+ const o = Kn(i);
4289
4289
  r.has(o) || r.set(o, i);
4290
4290
  }), t.unshift({
4291
- entityId: ia,
4291
+ entityId: Gi,
4292
4292
  entityType: "dataset",
4293
4293
  entityName: Ht,
4294
4294
  label: "Calculated Fields",
@@ -4359,7 +4359,7 @@ function Od(e, t) {
4359
4359
  }
4360
4360
  function Ad(e, t, n) {
4361
4361
  var a, s, c, l, d;
4362
- const r = aa(e);
4362
+ const r = Hi(e);
4363
4363
  if (r.includes("matrixMeasure"))
4364
4364
  return (s = (a = e.config) == null ? void 0 : a.matrix) != null && s.spec.measures.some((u) => u.id === t) ? { kind: "matrixMeasure", measureId: t } : void 0;
4365
4365
  if (r.includes("sqlKpiValue")) return { kind: "sqlKpiValue" };
@@ -4450,10 +4450,10 @@ function ie(e, t = /* @__PURE__ */ new Date()) {
4450
4450
  const Fn = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
4451
4451
  function Lc(e, t) {
4452
4452
  try {
4453
- return Na({
4453
+ return wa({
4454
4454
  value: e,
4455
4455
  metadata: t,
4456
- format: { type: "temporal_bucket", locale: "en-US", presentation: { mode: "auto", styles: Ea } }
4456
+ format: { type: "temporal_bucket", locale: "en-US", presentation: { mode: "auto", styles: xa } }
4457
4457
  });
4458
4458
  } catch {
4459
4459
  return;
@@ -4461,14 +4461,14 @@ function Lc(e, t) {
4461
4461
  }
4462
4462
  function Rr(e, t, n) {
4463
4463
  if (!t || typeof e != "string") return;
4464
- const r = qn(e, t);
4464
+ const r = Bn(e, t);
4465
4465
  if (!(!r.ok || !r.value))
4466
4466
  return String(r.value.year) === M(n, t.calendar.tz || "UTC", "yyyy") ? void 0 : r.value.year;
4467
4467
  }
4468
4468
  function Vc(e, t, n) {
4469
4469
  if (e === null) return "(Blank)";
4470
4470
  if (t && typeof e == "string") {
4471
- const r = qn(e, t);
4471
+ const r = Bn(e, t);
4472
4472
  if (r.ok && r.value) {
4473
4473
  const { year: i, month: o, day: a, hour: s } = r.value, c = `${Fn[o - 1]} ${a}${Rr(e, t, n) ? `, ${i}` : ""}`;
4474
4474
  switch (t.granularity) {
@@ -4506,7 +4506,7 @@ function Vr(e, t) {
4506
4506
  return e.map((n) => n.compared.map((r) => Kr(r, n.temporalBucket, t)).join(", ")).join(" and ");
4507
4507
  }
4508
4508
  function qc(e, t) {
4509
- return e.relative ? Bn(e.relative).label : e.window ? ie(e.window, t) : "A date range";
4509
+ return e.relative ? Vn(e.relative).label : e.window ? ie(e.window, t) : "A date range";
4510
4510
  }
4511
4511
  const Uc = {
4512
4512
  dashboard_filter: "Dashboard · Date filter",
@@ -4617,7 +4617,7 @@ function Pd(e, t = {}) {
4617
4617
  function Nd(e, t = {}) {
4618
4618
  var a;
4619
4619
  const n = t.now ?? /* @__PURE__ */ new Date(), r = e.counted.kind === "no_date" && !e.selections.length ? void 0 : {
4620
- text: !e.selections.length && e.counted.kind === "window" && e.counted.relative ? `${Bn(e.counted.relative).label} · ${ie(e.counted.window, n)}` : Ur(e, n, !1),
4620
+ text: !e.selections.length && e.counted.kind === "window" && e.counted.relative ? `${Vn(e.counted.relative).label} · ${ie(e.counted.window, n)}` : Ur(e, n, !1),
4621
4621
  clicked: e.selections.length > 0
4622
4622
  }, i = e.compared ? Vr(e.selections, n) ?? ie(e.compared.window, n) : void 0, o = (a = Br(e)) == null ? void 0 : a.tile;
4623
4623
  return {
@@ -4647,13 +4647,13 @@ function Qc(e, t) {
4647
4647
  const r = n.slice(1, -1);
4648
4648
  return r.includes("{") || r.includes("}") ? void 0 : _t(e, r);
4649
4649
  }
4650
- function Xc(e, t, n) {
4650
+ function Jc(e, t, n) {
4651
4651
  if (!e.expression) return t.length === 1 ? at(t[0]) : void 0;
4652
4652
  if (!n) return;
4653
4653
  const r = Qc(e, n);
4654
- return r ? at(r) : Jc(e, n);
4654
+ return r ? at(r) : Xc(e, n);
4655
4655
  }
4656
- function Jc(e, t) {
4656
+ function Xc(e, t) {
4657
4657
  return {
4658
4658
  ...at(e),
4659
4659
  id: `${e.id}:row`,
@@ -4691,7 +4691,7 @@ function Zc(e, t) {
4691
4691
  }
4692
4692
  if (n.calls.length === 1) {
4693
4693
  if (n.nestedAggregate || !n.aggregateInputsComplete) return "unknown";
4694
- const [i] = n.calls, o = Ia(e.expression, i);
4694
+ const [i] = n.calls, o = la(e.expression, i);
4695
4695
  if (o === void 0) return "unknown";
4696
4696
  const a = Sn(e, i.tokens);
4697
4697
  return a === "unknown" ? a : { fields: a, rowExpression: o };
@@ -4711,7 +4711,7 @@ function ot(e) {
4711
4711
  var s;
4712
4712
  if ((s = e.parameters) != null && s.windowTransform)
4713
4713
  return { kind: "unlistable", reason: "table_calculation" };
4714
- const t = va(e);
4714
+ const t = ca(e);
4715
4715
  if (t.windowed || t.unresolved || t.calls.length === 0)
4716
4716
  return Q;
4717
4717
  if (t.calls.length > 1) {
@@ -4729,7 +4729,7 @@ function ot(e) {
4729
4729
  const { fields: i } = r, o = el(e, t.stage);
4730
4730
  if (n.kind === "count" && i.length === 0) return { kind: "rowCount", valueIsTheAggregate: o };
4731
4731
  if (i.length === 0) return Q;
4732
- const a = Xc(e, i, r.rowExpression);
4732
+ const a = Jc(e, i, r.rowExpression);
4733
4733
  return a ? n.kind === "count_distinct" ? { kind: "distinct", rowField: a, valueIsTheAggregate: o } : Yc.has(n.kind) ? { kind: "rows", aggregate: n.kind, rowField: a, valueIsTheAggregate: o } : Q : Q;
4734
4734
  }
4735
4735
  const tl = {
@@ -4743,7 +4743,7 @@ const tl = {
4743
4743
  card_updating: "This card is updating. Try again when it finishes.",
4744
4744
  records_repeat: "Each record appears more than once in this card's data, so its records can't be listed yet."
4745
4745
  }, st = { available: !0 };
4746
- function X(e) {
4746
+ function J(e) {
4747
4747
  return { available: !1, reason: e, message: tl[e] };
4748
4748
  }
4749
4749
  function Wr(e) {
@@ -4763,23 +4763,23 @@ function rl(e, t) {
4763
4763
  if (t.measure.kind !== "metric") return;
4764
4764
  const { resultId: n } = t.measure;
4765
4765
  return (((r = e.config) == null ? void 0 : r.metricColumns) ?? []).find(
4766
- (i) => i.id === n || ca(i) === n
4766
+ (i) => i.id === n || Ji(i) === n
4767
4767
  );
4768
4768
  }
4769
4769
  function il(e, t) {
4770
- return e.seeRecords === !1 ? X("switched_off") : oa(e.type) ? sa(e) !== "config" ? X("sql_card") : t.isCurrentQueryResult ? st : X("card_updating") : X("unsupported_visual");
4770
+ return e.seeRecords === !1 ? J("switched_off") : Yi(e.type) ? Qi(e) !== "config" ? J("sql_card") : t.isCurrentQueryResult ? st : J("card_updating") : J("unsupported_visual");
4771
4771
  }
4772
4772
  function Rd(e, t, n) {
4773
4773
  var a;
4774
4774
  const r = il(e, n);
4775
4775
  if (!r.available) return r;
4776
- if (t.comparison) return X("comparison_value");
4776
+ if (t.comparison) return J("comparison_value");
4777
4777
  if (e.type === "matrixTable" ? nl(e, t) : (t.kind === "subtotal" || t.kind === "grandTotal") && Wr((a = e.config) == null ? void 0 : a.filters))
4778
- return X("total_under_measure_filter");
4778
+ return J("total_under_measure_filter");
4779
4779
  const i = rl(e, t);
4780
4780
  if (!i) return st;
4781
4781
  const o = ot(i);
4782
- return o.kind === "unlistable" ? X(o.reason) : o.kind === "calculation" && o.inputs.every((s) => ot(s).kind === "unlistable") ? X("measure_not_listable") : st;
4782
+ return o.kind === "unlistable" ? J(o.reason) : o.kind === "calculation" && o.inputs.every((s) => ot(s).kind === "unlistable") ? J("measure_not_listable") : st;
4783
4783
  }
4784
4784
  function Kd(e) {
4785
4785
  return e === "switched_off" || e === "unsupported_visual";
@@ -4795,8 +4795,8 @@ function Ld(e, t) {
4795
4795
  return n && r.has(n) ? n : e.column;
4796
4796
  }
4797
4797
  function Vd(e, t, n) {
4798
- const r = la({ card: e, stated: t, context: n });
4799
- return r.ok ? { ok: !0, card: r.update ? da(e, r.update).card : e, warnings: r.warnings } : r;
4798
+ const r = Xi({ card: e, stated: t, context: n });
4799
+ return r.ok ? { ok: !0, card: r.update ? Zi(e, r.update).card : e, warnings: r.warnings } : r;
4800
4800
  }
4801
4801
  function Bd({
4802
4802
  resolvedCardConfig: e,
@@ -4808,7 +4808,7 @@ function Bd({
4808
4808
  }) {
4809
4809
  const a = e || t.config, { groupByColumns: s = [], metricColumns: c = [], detailColumns: l = [] } = a || {}, d = t.type === "detailTable", u = d ? "detail" : "groupby", f = d ? l : s, m = d ? [] : c, p = [];
4810
4810
  for (const h of f) {
4811
- const g = r ? Xe(r, h.id, u) : void 0, C = (g == null ? void 0 : g.outputKey) || (g == null ? void 0 : g.rawKey) || h.label, v = n.getValue(C), I = i == null ? void 0 : i.byColumnKey.get(C);
4811
+ const g = r ? Je(r, h.id, u) : void 0, C = (g == null ? void 0 : g.outputKey) || (g == null ? void 0 : g.rawKey) || h.label, v = n.getValue(C), I = i == null ? void 0 : i.byColumnKey.get(C);
4812
4812
  if (v == null)
4813
4813
  p.push({
4814
4814
  field: Yt(h, I == null ? void 0 : I.metadata),
@@ -4826,14 +4826,14 @@ function Bd({
4826
4826
  value: String(v),
4827
4827
  // Convert to string for consistency
4828
4828
  ...I ? {
4829
- label: fa({
4829
+ label: ta({
4830
4830
  value: String(v),
4831
4831
  presentation: I
4832
4832
  }),
4833
4833
  temporalBucket: I.metadata
4834
4834
  } : {},
4835
4835
  ...b ? {
4836
- label: ua({ value: String(v), presentation: b }).label,
4836
+ label: ea({ value: String(v), presentation: b }).label,
4837
4837
  rawTemporal: { ...b.metadata, tz: b.format.calendarTimezone }
4838
4838
  } : {}
4839
4839
  });
@@ -4843,7 +4843,7 @@ function Bd({
4843
4843
  return;
4844
4844
  const y = [];
4845
4845
  for (const h of m) {
4846
- const g = r ? Xe(r, h.id, "metric") : void 0, C = n.getValue(
4846
+ const g = r ? Je(r, h.id, "metric") : void 0, C = n.getValue(
4847
4847
  (g == null ? void 0 : g.outputKey) || (g == null ? void 0 : g.rawKey) || h.label
4848
4848
  );
4849
4849
  C != null && y.push({
@@ -4866,7 +4866,7 @@ function qd({
4866
4866
  }) {
4867
4867
  const i = e || t.config, o = t.type === "detailTable", a = o ? "detail" : "groupby";
4868
4868
  return ((o ? i == null ? void 0 : i.detailColumns : i == null ? void 0 : i.groupByColumns) || []).find((c) => {
4869
- const l = r ? Xe(r, c.id, a) : void 0;
4869
+ const l = r ? Je(r, c.id, a) : void 0;
4870
4870
  return ((l == null ? void 0 : l.outputKey) || (l == null ? void 0 : l.rawKey) || c.label) === n;
4871
4871
  });
4872
4872
  }
@@ -4910,10 +4910,10 @@ function Ud(e) {
4910
4910
  i.push(c);
4911
4911
  }
4912
4912
  else {
4913
- const s = r.kind === "clickedCell" && e.clickedField ? Qt(e.clickedField, e.sourceIndex) : void 0, c = r.kind === "chosenColumns" ? r.clickedFieldKeys : s ? [Le(s)] : [];
4913
+ const s = r.kind === "clickedCell" && e.clickedField ? Qt(e.clickedField, e.sourceIndex) : void 0, c = r.kind === "chosenColumns" ? r.clickedFieldKeys : s ? [Ke(s)] : [];
4914
4914
  for (const l of t) {
4915
4915
  const d = n(l);
4916
- typeof d != "string" && c.includes(Le(d.field)) && i.push(d);
4916
+ typeof d != "string" && c.includes(Ke(d.field)) && i.push(d);
4917
4917
  }
4918
4918
  if (!i.length)
4919
4919
  return We(
@@ -4922,7 +4922,7 @@ function Ud(e) {
4922
4922
  }
4923
4923
  const o = /* @__PURE__ */ new Set();
4924
4924
  return { status: "ready", tuple: { conditions: i.filter((s) => {
4925
- const c = Le(s.field);
4925
+ const c = Ke(s.field);
4926
4926
  return o.has(c) ? !1 : (o.add(c), !0);
4927
4927
  }) } };
4928
4928
  }
@@ -5039,7 +5039,7 @@ export {
5039
5039
  jo as A,
5040
5040
  Zo as B,
5041
5041
  Ac as C,
5042
- Js as D,
5042
+ Xs as D,
5043
5043
  $c as E,
5044
5044
  Pc as F,
5045
5045
  Md as G,
@@ -5075,7 +5075,7 @@ export {
5075
5075
  Ae as a7,
5076
5076
  Kl as a8,
5077
5077
  od as a9,
5078
- Xl as aA,
5078
+ Jl as aA,
5079
5079
  j as aB,
5080
5080
  Ze as aC,
5081
5081
  Mo as aD,
@@ -5115,7 +5115,7 @@ export {
5115
5115
  so as ak,
5116
5116
  co as al,
5117
5117
  ke as am,
5118
- Jl as an,
5118
+ Xl as an,
5119
5119
  Ft as ao,
5120
5120
  Bl as ap,
5121
5121
  Gl as aq,