react-semaphor 0.1.580 → 0.1.582

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-CUwGURJj.js → assistant-chat-CVtxjVEH.js} +6 -6
  4. package/dist/chunks/{bookmark-impact-BNyR-yDX.js → bookmark-impact-BDSeeRy7.js} +1 -1
  5. package/dist/chunks/{card-filter-builder-k9yqDSw8.js → card-filter-builder-CMZ5nwdC.js} +3 -3
  6. package/dist/chunks/{comparison-window-caption-DdLqMgiG.js → comparison-window-caption-sRFtnX1q.js} +15 -15
  7. package/dist/chunks/{dashboard-DvcAk8uJ.js → dashboard-BNn7fpDY.js} +1 -1
  8. package/dist/chunks/{dashboard-briefing-launcher-DBgS97ZH.js → dashboard-briefing-launcher-C9wf8KhD.js} +83 -83
  9. package/dist/chunks/{dashboard-controls-BiZ1rlNC.js → dashboard-controls-PDb9Gap5.js} +8 -8
  10. package/dist/chunks/{dashboard-json-B25xzYcJ.js → dashboard-json-CvtVy2UH.js} +1 -1
  11. package/dist/chunks/{dates-3Pah03_l.js → dates-B42fboJU.js} +5 -5
  12. package/dist/chunks/{edit-dashboard-visual-DYuO3mEU.js → edit-dashboard-visual-Cat0RWPp.js} +2154 -2144
  13. package/dist/chunks/{filter-reach-copy-CzLt96tq.js → filter-reach-copy-C-RH1rVx.js} +148 -148
  14. package/dist/chunks/{filter-value-text-DvvSNlho.js → filter-value-text-DXGYypEd.js} +1 -1
  15. package/dist/chunks/{index-BMZq6JT6.js → index-JWLo4R_t.js} +2 -2
  16. package/dist/chunks/pivot-header-presentation-MvvlxtIB.js +42 -0
  17. package/dist/chunks/{temporal-input-presentation-CqbJjIuu.js → pivot-result-contract-expectations-8tuNjRvG.js} +570 -560
  18. package/dist/chunks/{report-preferences-dialog-DpAetrdY.js → report-preferences-dialog-CwbsD6t6.js} +8 -8
  19. package/dist/chunks/{resolve-dashboard-input-context-CNxtkCzj.js → resolve-dashboard-input-context-6FP1-7aU.js} +6966 -6690
  20. package/dist/chunks/{saved-dashboard-context-Bnt0H7mi.js → saved-dashboard-context-D2G0uLji.js} +3 -3
  21. package/dist/chunks/{semaphor-ready-indicator-Dwmvmf0S.js → semaphor-ready-indicator-UhNS27Gy.js} +26243 -26171
  22. package/dist/chunks/{shelf-drop-preview-context-CiveteBS.js → shelf-drop-preview-context-DPksW68k.js} +2 -2
  23. package/dist/chunks/{stored-dashboard-D3gu-D7A.js → stored-dashboard-KpTy4umJ.js} +1214 -1389
  24. package/dist/chunks/{table-export-sheet-BNGSJA2N.js → table-export-sheet-wBkk17aa.js} +1 -1
  25. package/dist/chunks/{variable-draft-C3_RL2gI.js → variable-draft-CP5I66_J.js} +2 -2
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.js +950 -942
  28. package/dist/format-utils/index.js +207 -206
  29. package/dist/index.js +12 -12
  30. package/dist/style.css +1 -1
  31. package/dist/surfboard/index.js +1 -1
  32. package/dist/types/components/visual/data-table/types/data-table.d.ts +16 -6
  33. package/dist/types/lib/document/document-section-query-options.d.ts +3 -4
  34. package/dist/types/lib/hooks/use-dashboard-frame-query.d.ts +4 -1
  35. package/dist/types/lib/query-context/card-server-request.d.ts +6 -4
  36. package/dist/types/lib/table-formatting/table-totals-settings.d.ts +25 -2
  37. package/dist/types/lib/types/explorer-types.d.ts +7 -2
  38. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +19 -2
  39. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +12 -3
  40. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +4 -1
  41. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +1 -0
  42. package/dist/types/shared/dashboard-authoring/measure-calculations/table-column-total.d.ts +42 -0
  43. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +6 -1
  44. package/dist/types/shared/usage-events/details.d.ts +2 -2
  45. package/package.json +1 -1
  46. package/dist/chunks/pivot-result-contract-expectations-C-HnUKYe.js +0 -55
@@ -1,11 +1,11 @@
1
- import { J as vr, K as Ir, M as Cr, N as ln, O as Fr, P as Sr, Q as xr, R as Tr, S as wr, T as dn, U as Dr, V as kr, W as Or, X as Pe, Y as Mr, Z as _r, _ as Ar, g as Pr, k as Ie, $ as Nr, a0 as $r } from "./stored-dashboard-D3gu-D7A.js";
2
- import { fU as un, bu as Ce, fV as Er, fW as Rr, fX as Kr, fY as Lr, P as Y, fZ as fn, bw as Vr, f_ as Br, f$ as Je, ai as Ze, g0 as qr, g1 as Ur, g2 as zr, L as et, g3 as jr, bJ as Gr, Q as Wr, g4 as Hr, M as Yr, m as tt, g5 as nt, g6 as Qr, g7 as F, o as we, g8 as Z, g9 as T, ga as Xr, gb as Jr, gc as kt, gd as Zr, ge as Ot, gf as ei, aR as w, gg as mn, b0 as De, gh as ti, gi as ni, gj as ri, gk as ii, gl as ai, gm as pn, cq as gn, gn as hn, go as yn, fT as Fe, gp as Mt, a4 as Q, gq as rt, gr as _t, gs as it, t as At, gt as Pt, cd as at, gu as oi, gv as si, gw as ie, gx as ci, gy as li, gz as di, a7 as ui, bD as fi, ci as ot, aD as mi, gA as Nt, gB as bn, gC as qe, K as pi, aG as gi, ee as hi, gD as yi, gE as bi, gF as vi, gG as Ii, gH as Ci, gI as Fi, gJ as Si, gK as xi, gL as Ue, fS as Ti, fN as Ne, gM as wi, gN as Di, gO as vn, a as In, gP as ki, gQ as Oi, db as Cn, gR as $t, cL as Mi, de as Et, dd as _i, em as Ai, aV as Pi, eZ as Ni, gS as $i, gT as Ei, cx as Rt } from "./resolve-dashboard-input-context-CNxtkCzj.js";
1
+ import { J as vr, K as Ir, M as Cr, N as ln, O as Fr, P as Sr, Q as xr, R as Tr, S as wr, T as dn, U as Dr, V as Pe, W as kr, X as Or, Y as _r, g as Mr, k as Ie, Z as Ar, _ as Pr } from "./stored-dashboard-KpTy4umJ.js";
2
+ import { fZ as un, bv as Ce, f_ as Nr, f$ as $r, g0 as Er, g1 as Rr, P as Y, g2 as fn, bx as Kr, g3 as Lr, g4 as Je, aj as Ze, g5 as Vr, g6 as Br, g7 as qr, L as et, g8 as Ur, g9 as zr, ga as jr, bK as Gr, Q as Wr, gb as Hr, M as Yr, m as tt, gc as nt, gd as Xr, ge as F, o as we, gf as Z, gg as T, gh as Qr, gi as Jr, gj as kt, gk as Zr, gl as Ot, gm as ei, aS as w, gn as mn, b1 as De, go as ti, gp as ni, gq as ri, gr as ii, gs as ai, gt as pn, cr as gn, gu as hn, gv as yn, fY as Fe, gw as _t, a4 as X, gx as rt, gy as Mt, gz as it, t as At, gA as Pt, ce as at, gB as oi, gC as si, gD as ie, gE as ci, gF as li, gG as di, a7 as ui, bE as fi, cj as ot, aE as mi, gH as Nt, gI as bn, gJ as qe, K as pi, aH as gi, ef as hi, gK as yi, gL as bi, gM as vi, gN as Ii, gO as Ci, gP as Fi, gQ as Si, gR as xi, gS as Ue, fX as Ti, fS as Ne, gT as wi, gU as Di, gV as vn, a as In, gW as ki, gX as Oi, dc as Cn, gY as $t, cM as _i, df as Et, de as Mi, en as Ai, aW as Pi, e_ as Ni, gZ as $i, g_ as Ei, cy as Rt } from "./resolve-dashboard-input-context-6FP1-7aU.js";
3
3
  import { a5 as le, s as Ri, d as Ki, r as Fn, aE as Li, a2 as Sn, au as Vi, n as Bi, c as qi } from "./validators-B8fpdinG.js";
4
4
  import { M as Ui, l as $e } from "./matrix-operation-contract-DCVinw1o.js";
5
5
  import { r as zi, C as ji, a as Gi } from "./metric-comparison-n9NsIa-2.js";
6
6
  import { t as Kt, e as Lt } from "./analytics-base-schemas-BaIQrEzX.js";
7
7
  import "zod";
8
- import { b as J, i as N, aT as Wi, aU as Hi, m as Yi, h as Qi, d as ze, e as Xi, Q as _, af as Ji, am as Zi, c as ea, ah as ta, W as na, w as ra, a5 as ia } from "./temporal-input-presentation-CqbJjIuu.js";
8
+ import { c as J, i as N, aU as Wi, aV as Hi, n as Yi, j as Xi, e as ze, g as Qi, R as M, af as Ji, am as Zi, d as ea, ah as ta, X as na, w as ra, a6 as ia } from "./pivot-result-contract-expectations-8tuNjRvG.js";
9
9
  import "../value-format-preferences/index.js";
10
10
  import { z as aa, T as oa, L as sa, ag as ca, a2 as Vt, O as xn, A as Tn, ar as la, P as wn, D as da, a6 as ua, a7 as fa, G as Dn, Y as ma, Z as kn, I as st, _ as On, as as pa } from "./bookmark-state-BEl_G9vr.js";
11
11
  import { g as ga } from "./pickers-DkqmtnTL.js";
@@ -17,7 +17,7 @@ import "./index-CV_Kzou0.js";
17
17
  import "./context-BTLBjQNh.js";
18
18
  import { r as Ca, Z as Fa, v as Sa } from "./matrix-analytical-definition-dkS8szLM.js";
19
19
  import { r as je } from "./pivot-result-identity-B89X5xjb.js";
20
- import { r as Mn } from "./applied-constraints-DU-wndZ7.js";
20
+ import { r as _n } from "./applied-constraints-DU-wndZ7.js";
21
21
  function xa(e, t) {
22
22
  if (!(typeof e != "number" || typeof t != "number"))
23
23
  return e === t ? t : void 0;
@@ -72,7 +72,7 @@ function z(e, t) {
72
72
  };
73
73
  }
74
74
  }
75
- function _n(e, t) {
75
+ function Mn(e, t) {
76
76
  const n = J(e, t);
77
77
  return (n == null ? void 0 : n.type) === "duration" ? {
78
78
  style: "duration",
@@ -125,7 +125,7 @@ function Da(e, t) {
125
125
  const n = un(e.config);
126
126
  return e.sql && !n ? (a = (o = e.preferences) == null ? void 0 : o.tablePrefs) != null && a.enableDevModePagination ? "server" : "client" : n && vr(e) ? "server" : "client";
127
127
  }
128
- const An = Object.freeze({}), Mc = {
128
+ const An = Object.freeze({}), _c = {
129
129
  access: "session-only",
130
130
  printMode: !1,
131
131
  baseline: null,
@@ -136,7 +136,7 @@ const An = Object.freeze({}), Mc = {
136
136
  isFavorite: !1,
137
137
  fetchedAt: 0
138
138
  };
139
- function _c(e) {
139
+ function Mc(e) {
140
140
  return !e.viewer.printMode && e.viewer.access !== "session-only" && !!e.viewer.baseline && !!e.viewerStateClient && !e.isDashboardEditing;
141
141
  }
142
142
  function ka(e) {
@@ -149,7 +149,7 @@ function Ac(e, t, n) {
149
149
  if (!(n.isEditorPreview || e.isDashboardEditing) && aa(e.dashboard, t))
150
150
  return { settings: Oa(e, t) };
151
151
  }
152
- function Ma(e) {
152
+ function _a(e) {
153
153
  var t;
154
154
  return Ir({
155
155
  card: e.card,
@@ -165,7 +165,7 @@ function Ma(e) {
165
165
  projection: "export"
166
166
  });
167
167
  }
168
- function _a(e) {
168
+ function Ma(e) {
169
169
  if (e)
170
170
  return z(
171
171
  J(e, { preserveOmittedProperties: !0 }),
@@ -184,7 +184,7 @@ function Aa(e) {
184
184
  Ce(e, { preserveOmittedProperties: !0 })
185
185
  );
186
186
  }
187
- const ke = _a, Pc = Aa, Pa = () => ({
187
+ const ke = Ma, Pc = Aa, Pa = () => ({
188
188
  urlTemplate: "{value}",
189
189
  // Default: use cell value as-is
190
190
  labelType: "value",
@@ -198,9 +198,9 @@ const ke = _a, Pc = Aa, Pa = () => ({
198
198
  inheritMetricFormat: !0,
199
199
  textAlign: "left",
200
200
  // The table's one width rule (card appearance P2-21).
201
- width: Kr,
202
- minWidth: Rr,
203
- maxWidth: Er,
201
+ width: Er,
202
+ minWidth: $r,
203
+ maxWidth: Nr,
204
204
  textOverflow: "ellipsis",
205
205
  textWrap: "default",
206
206
  numberFormat: {
@@ -303,7 +303,7 @@ function Nn(e, t = {}) {
303
303
  );
304
304
  }
305
305
  function $n(e, t = {}) {
306
- return Xi(e, {
306
+ return Qi(e, {
307
307
  ...Se(t, {
308
308
  min: 2,
309
309
  max: 2
@@ -337,7 +337,7 @@ function $a(e, t = {}) {
337
337
  }
338
338
  }
339
339
  function Ea(e, t = {}) {
340
- return Qi(
340
+ return Xi(
341
341
  e,
342
342
  Se(t, { min: 2, max: 2 })
343
343
  );
@@ -421,7 +421,7 @@ function En(e) {
421
421
  if (!t)
422
422
  return e.authoredFormat;
423
423
  const n = dt(e.card, e.metric);
424
- return _(
424
+ return M(
425
425
  e.authoredFormat,
426
426
  t,
427
427
  n ? e.context.resolveBoundCurrency(n) : void 0
@@ -451,7 +451,7 @@ function Ba(e) {
451
451
  }
452
452
  function Rc(e) {
453
453
  const t = new Set(
454
- Lr(e.records)
454
+ Rr(e.records)
455
455
  ), n = new Set(
456
456
  e.renderedMetricKeys || e.resultKeys
457
457
  ), r = Y(e.card);
@@ -480,7 +480,7 @@ function Kc(e) {
480
480
  const d = dt(t, s), u = d ? n.resolveBoundCurrency(d) : void 0;
481
481
  return c.source === "inferred" && !u ? s : {
482
482
  ...s,
483
- format: c.source === "inferred" ? _(
483
+ format: c.source === "inferred" ? M(
484
484
  l,
485
485
  r,
486
486
  u
@@ -512,7 +512,7 @@ function Oe(e) {
512
512
  (u) => N(u.format)
513
513
  );
514
514
  return l.length < 2 || !d ? r : z(
515
- _({ type: "number" }, i),
515
+ M({ type: "number" }, i),
516
516
  { preserveOmittedProperties: !0 }
517
517
  );
518
518
  }
@@ -526,7 +526,7 @@ function Oe(e) {
526
526
  return r;
527
527
  if (d.length !== l.length)
528
528
  return z(
529
- _({ type: "number" }, i),
529
+ M({ type: "number" }, i),
530
530
  { preserveOmittedProperties: !0 }
531
531
  );
532
532
  }
@@ -540,7 +540,7 @@ function Oe(e) {
540
540
  return [];
541
541
  const d = dt(t, l);
542
542
  return [
543
- _(
543
+ M(
544
544
  o,
545
545
  i,
546
546
  d ? n.resolveBoundCurrency(d) : void 0
@@ -549,12 +549,12 @@ function Oe(e) {
549
549
  });
550
550
  if (a.length === 0)
551
551
  return z(
552
- _(o, i),
552
+ M(o, i),
553
553
  { preserveOmittedProperties: !0 }
554
554
  );
555
555
  const [s] = a;
556
556
  if (a.some((l) => !xe(l, s))) {
557
- const l = _(
557
+ const l = M(
558
558
  {
559
559
  ...o,
560
560
  type: "number",
@@ -586,8 +586,8 @@ function We(e, t) {
586
586
  }
587
587
  function de(e, t) {
588
588
  var r, i;
589
- const n = Vr(e, t);
590
- if (!(n && ((i = (r = e == null ? void 0 : e.config) == null ? void 0 : r.groupByColumns) != null && i.includes(n)) && !Br(n)))
589
+ const n = Kr(e, t);
590
+ if (!(n && ((i = (r = e == null ? void 0 : e.config) == null ? void 0 : r.groupByColumns) != null && i.includes(n)) && !Lr(n)))
591
591
  return n;
592
592
  }
593
593
  function qa(e) {
@@ -801,11 +801,11 @@ function zt(e) {
801
801
  if (t)
802
802
  return JSON.stringify(t);
803
803
  }
804
- function Qa(e, t) {
804
+ function Xa(e, t) {
805
805
  const n = zt(e), r = zt(t);
806
806
  return !!(n && r && n === r);
807
807
  }
808
- function Xa(e) {
808
+ function Qa(e) {
809
809
  if (e.length === 0)
810
810
  return;
811
811
  const t = e.map(
@@ -817,16 +817,16 @@ function Xa(e) {
817
817
  return;
818
818
  const r = t, [i] = r;
819
819
  return r.every(
820
- (a) => Qa(i, a)
820
+ (a) => Xa(i, a)
821
821
  ) ? i : void 0;
822
822
  }
823
- function Me(e) {
823
+ function _e(e) {
824
824
  if (Ge(e.overrideFormatOptions))
825
825
  return {
826
826
  formatOptions: e.overrideFormatOptions || void 0,
827
827
  source: "override"
828
828
  };
829
- const t = Xa(
829
+ const t = Qa(
830
830
  e.metrics || []
831
831
  );
832
832
  return Ge(t) ? {
@@ -868,7 +868,7 @@ function ut(e) {
868
868
  chartType: n,
869
869
  axis: r,
870
870
  preferences: i
871
- }), s = Me({
871
+ }), s = _e({
872
872
  overrideFormatOptions: ke(o == null ? void 0 : o.valueFormat),
873
873
  metrics: a
874
874
  });
@@ -883,7 +883,7 @@ function ut(e) {
883
883
  };
884
884
  }
885
885
  function Ja(e) {
886
- const { preferences: t, metric: n } = e, r = t == null ? void 0 : t.tooltipConfig, i = Me({
886
+ const { preferences: t, metric: n } = e, r = t == null ? void 0 : t.tooltipConfig, i = _e({
887
887
  overrideFormatOptions: ke(r == null ? void 0 : r.valueFormat),
888
888
  metrics: n ? [n] : []
889
889
  });
@@ -898,7 +898,7 @@ function Ja(e) {
898
898
  };
899
899
  }
900
900
  function ft(e, t, n) {
901
- return t === Ze(n, e) ? qr(n, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
901
+ return t === Ze(n, e) ? Vr(n, e) : t === "x" ? e == null ? void 0 : e.xAxisConfig : t === "y2" ? e == null ? void 0 : e.secondaryYAxisConfig : e == null ? void 0 : e.yAxisConfig;
902
902
  }
903
903
  function mt(e) {
904
904
  const { chartType: t, preferences: n } = e;
@@ -945,7 +945,7 @@ function qc(e) {
945
945
  chartType: o,
946
946
  axis: a,
947
947
  preferences: r
948
- }), c = Me({
948
+ }), c = _e({
949
949
  overrideFormatOptions: ke(i == null ? void 0 : i.valueFormat),
950
950
  metrics: s
951
951
  }), l = {
@@ -974,7 +974,7 @@ function qc(e) {
974
974
  return d.source === "override" ? d : l;
975
975
  }
976
976
  function Za(e) {
977
- const { preferences: t, dataLabelsConfig: n, metric: r } = e, i = Me({
977
+ const { preferences: t, dataLabelsConfig: n, metric: r } = e, i = _e({
978
978
  overrideFormatOptions: ke(n == null ? void 0 : n.valueFormat),
979
979
  metrics: r ? [r] : []
980
980
  });
@@ -1062,7 +1062,7 @@ function eo(e) {
1062
1062
  };
1063
1063
  }
1064
1064
  function to(e, t, n = !1) {
1065
- const r = n ? { preserveOmittedProperties: !0 } : void 0, i = J(e == null ? void 0 : e.format, r), o = _n(
1065
+ const r = n ? { preserveOmittedProperties: !0 } : void 0, i = J(e == null ? void 0 : e.format, r), o = Mn(
1066
1066
  i,
1067
1067
  r
1068
1068
  );
@@ -1134,11 +1134,11 @@ function jt(e, t, n) {
1134
1134
  }) : { type: "number" };
1135
1135
  if (!i || !N(i))
1136
1136
  return e;
1137
- const o = _(
1137
+ const o = M(
1138
1138
  i,
1139
1139
  t,
1140
1140
  n
1141
- ), a = _n(o, {
1141
+ ), a = Mn(o, {
1142
1142
  preserveOmittedProperties: !0
1143
1143
  });
1144
1144
  return a ? {
@@ -1221,7 +1221,7 @@ function ro(e) {
1221
1221
  const f = e.target, m = Tr(e.card, e.matrixCatalog).find(
1222
1222
  (y) => y.measureId === f.measureId
1223
1223
  ), p = m == null ? void 0 : m.canonical;
1224
- return p && (p.type === "number" || p.type === "currency") ? _(
1224
+ return p && (p.type === "number" || p.type === "currency") ? M(
1225
1225
  p,
1226
1226
  e.valueFormatPreferences,
1227
1227
  e.boundCurrency
@@ -1239,13 +1239,13 @@ function ro(e) {
1239
1239
  ...f ? { column: { kind: "field", fieldId: f } } : {},
1240
1240
  resultColumnKey: e.target.kind === "column" ? e.target.columnKey : void 0
1241
1241
  }), p = m.authoredFormat;
1242
- return m.currencyBindable && p && N(p) ? _(
1242
+ return m.currencyBindable && p && N(p) ? M(
1243
1243
  p,
1244
1244
  e.valueFormatPreferences,
1245
1245
  e.boundCurrency
1246
1246
  ) : void 0;
1247
1247
  }
1248
- if (!((l = e.card.sql) != null && l.trim()) && !Ur(e.card.type) && e.target.kind === "metric") {
1248
+ if (!((l = e.card.sql) != null && l.trim()) && !Br(e.card.type) && e.target.kind === "metric") {
1249
1249
  const f = e.target.metricId, m = (u = (d = e.card.config) == null ? void 0 : d.metricColumns) == null ? void 0 : u.find(
1250
1250
  (g) => g.id === f
1251
1251
  );
@@ -1255,7 +1255,7 @@ function ro(e) {
1255
1255
  e.card,
1256
1256
  m
1257
1257
  ), y = p.authoredFormat;
1258
- return p.currencyBindable && y && N(y) ? _(
1258
+ return p.currencyBindable && y && N(y) ? M(
1259
1259
  y,
1260
1260
  e.valueFormatPreferences,
1261
1261
  e.boundCurrency
@@ -1319,7 +1319,7 @@ function Gc(e) {
1319
1319
  });
1320
1320
  }
1321
1321
  function io(e) {
1322
- return zr({
1322
+ return qr({
1323
1323
  ...e,
1324
1324
  activation: et({
1325
1325
  card: e.card,
@@ -1328,7 +1328,7 @@ function io(e) {
1328
1328
  });
1329
1329
  }
1330
1330
  function Wc(e) {
1331
- return jr({
1331
+ return Ur({
1332
1332
  activation: et({
1333
1333
  card: e.card,
1334
1334
  cardConfig: e.cardConfig
@@ -1338,7 +1338,7 @@ function Wc(e) {
1338
1338
  });
1339
1339
  }
1340
1340
  function ao(e) {
1341
- const t = dn(e.card, e.effectiveCardConfig), n = Ma({
1341
+ const t = dn(e.card, e.effectiveCardConfig), n = _a({
1342
1342
  card: t,
1343
1343
  records: e.rows,
1344
1344
  keys: e.rows.length === 0 ? e.resultKeys : void 0,
@@ -1375,20 +1375,20 @@ function so(e) {
1375
1375
  const t = dn(e.card, e.effectiveCardConfig), { cardId: n, ...r } = e.requestPayloadBase, i = e.formatOptions.visibleColumns ?? [], o = [
1376
1376
  ...i,
1377
1377
  ...Object.keys(e.formatOptions.columnSettings ?? {})
1378
- ], a = Dr(
1378
+ ], a = zr(
1379
1379
  e.card,
1380
1380
  i,
1381
1381
  e.effectiveCardConfig
1382
- ), s = kr(
1382
+ ), s = jr(
1383
1383
  e.card,
1384
1384
  e.effectiveCardConfig,
1385
1385
  a
1386
- ), c = Or(
1386
+ ), c = Dr(
1387
1387
  t,
1388
1388
  o
1389
1389
  ), l = new Set(
1390
1390
  c.eligibleTargets.map(Pe)
1391
- ), d = (v) => l.has(Pe(v)) ? _r({
1391
+ ), d = (v) => l.has(Pe(v)) ? Or({
1392
1392
  bindings: r.controlBindings,
1393
1393
  controls: [
1394
1394
  ...r.controlDefinitions ?? [],
@@ -1398,7 +1398,7 @@ function so(e) {
1398
1398
  target: v,
1399
1399
  knownTargets: c.knownTargets,
1400
1400
  eligibleTargets: c.eligibleTargets
1401
- }).currency : void 0, u = Mr({
1401
+ }).currency : void 0, u = kr({
1402
1402
  card: e.card,
1403
1403
  comparisonMetadata: e.comparisonMetadata,
1404
1404
  columnKeyMap: e.columnKeyMap
@@ -1517,11 +1517,11 @@ function so(e) {
1517
1517
  ...b,
1518
1518
  persistedSettings: G,
1519
1519
  valueFormatPreferences: e.reportContext.valueFormat
1520
- }), U = (q == null ? void 0 : q.type) === "duration" ? q : q ? _(
1520
+ }), U = (q == null ? void 0 : q.type) === "duration" ? q : q ? M(
1521
1521
  q,
1522
1522
  e.reportContext.valueFormat,
1523
1523
  B
1524
- ) : _(
1524
+ ) : M(
1525
1525
  {
1526
1526
  type: "number",
1527
1527
  minimumFractionDigits: 0,
@@ -1580,7 +1580,7 @@ function so(e) {
1580
1580
  };
1581
1581
  }
1582
1582
  function co(e) {
1583
- const t = Pr(
1583
+ const t = Mr(
1584
1584
  e.card,
1585
1585
  e.requestPayloadBase
1586
1586
  ), { cardId: n, ...r } = t.requestPayloadBase, i = so(e);
@@ -1602,7 +1602,7 @@ function Hc(e) {
1602
1602
  if (t.type !== "table" && t.type !== "detailTable")
1603
1603
  return { status: "refused", reason: "not_a_table" };
1604
1604
  const r = n.modelFormats ? ra(e.effectiveCardConfig ?? t.config, n) : e.effectiveCardConfig;
1605
- if (Ar({ card: t, comparisonMetadata: n.comparisonMetadata }))
1605
+ if (_r({ card: t, comparisonMetadata: n.comparisonMetadata }))
1606
1606
  return { status: "refused", reason: "comparison_metadata_missing" };
1607
1607
  const i = ao({
1608
1608
  card: t,
@@ -1701,7 +1701,7 @@ function uo(e) {
1701
1701
  }
1702
1702
  }
1703
1703
  const fo = "table";
1704
- function Qc({ preferences: e, ...t }) {
1704
+ function Xc({ preferences: e, ...t }) {
1705
1705
  return {
1706
1706
  ...t,
1707
1707
  type: fo,
@@ -1710,7 +1710,7 @@ function Qc({ preferences: e, ...t }) {
1710
1710
  data: []
1711
1711
  };
1712
1712
  }
1713
- function Xc(e) {
1713
+ function Qc(e) {
1714
1714
  return {
1715
1715
  id: e.id,
1716
1716
  title: e.title,
@@ -1857,7 +1857,7 @@ function Co(e) {
1857
1857
  }
1858
1858
  function Yt(e) {
1859
1859
  const t = ca(e);
1860
- return t ? `, compared with ${Qr({ mode: "explicit", spec: t })}` : "";
1860
+ return t ? `, compared with ${Xr({ mode: "explicit", spec: t })}` : "";
1861
1861
  }
1862
1862
  function Fo(e) {
1863
1863
  return e.charAt(0).toUpperCase() + e.slice(1);
@@ -1881,8 +1881,8 @@ function So(e, t) {
1881
1881
  function xo(e) {
1882
1882
  return !!(e && Object.prototype.hasOwnProperty.call(e, "calculatedFields"));
1883
1883
  }
1884
- function X(...e) {
1885
- return Xr(e.flatMap((t) => t || []));
1884
+ function Q(...e) {
1885
+ return Qr(e.flatMap((t) => t || []));
1886
1886
  }
1887
1887
  function ae(e, t) {
1888
1888
  return {
@@ -1906,7 +1906,7 @@ function To(e) {
1906
1906
  }
1907
1907
  function wo(e) {
1908
1908
  if (e !== void 0)
1909
- return X(
1909
+ return Q(
1910
1910
  e.map((t) => ae(t, "dashboard"))
1911
1911
  );
1912
1912
  }
@@ -1916,7 +1916,7 @@ function Zc(e) {
1916
1916
  var o;
1917
1917
  return t.push(...To(i)), {
1918
1918
  ...i,
1919
- calculatedFields: X(
1919
+ calculatedFields: Q(
1920
1920
  pt(i),
1921
1921
  Wn(i)
1922
1922
  ),
@@ -1928,7 +1928,7 @@ function Zc(e) {
1928
1928
  return {
1929
1929
  ...e,
1930
1930
  calculatedFields: wo(
1931
- X(
1931
+ Q(
1932
1932
  (r = e.calculatedFields) == null ? void 0 : r.map(
1933
1933
  (i) => ae(i, "dashboard")
1934
1934
  ),
@@ -1938,14 +1938,14 @@ function Zc(e) {
1938
1938
  sheets: n
1939
1939
  };
1940
1940
  }
1941
- function Qt(e, t) {
1941
+ function Xt(e, t) {
1942
1942
  var i;
1943
1943
  if (!((i = e == null ? void 0 : e.frames) != null && i.length))
1944
1944
  return [];
1945
1945
  const n = t ? e.frames.find((o) => o.id === t) : void 0, r = e.frames.filter(
1946
1946
  (o) => !t || o.id !== t
1947
1947
  );
1948
- return X(
1948
+ return Q(
1949
1949
  n == null ? void 0 : n.calculatedFields,
1950
1950
  ...r.map((o) => o.calculatedFields)
1951
1951
  );
@@ -1956,18 +1956,18 @@ function Do(e, t) {
1956
1956
  function el(e, t) {
1957
1957
  if (!e)
1958
1958
  return [];
1959
- const n = pt(e), r = Wn(e), i = X(
1959
+ const n = pt(e), r = Wn(e), i = Q(
1960
1960
  n,
1961
1961
  r
1962
1962
  );
1963
- return xo(e) ? i.length === 0 ? [] : r.length === 0 ? i : X(
1963
+ return xo(e) ? i.length === 0 ? [] : r.length === 0 ? i : Q(
1964
1964
  i,
1965
- Qt(e, t)
1966
- ) : Qt(e, t);
1965
+ Xt(e, t)
1966
+ ) : Xt(e, t);
1967
1967
  }
1968
1968
  function ko(e) {
1969
1969
  if (e !== void 0)
1970
- return X(
1970
+ return Q(
1971
1971
  e.map((t) => ae(t, "sheet"))
1972
1972
  );
1973
1973
  }
@@ -2014,11 +2014,11 @@ function Oo(e, t) {
2014
2014
  ], h = ((v = i.cards) == null ? void 0 : v.find((b) => b.id === i.activeCardId)) ?? ((I = i.cards) == null ? void 0 : I[0]);
2015
2015
  return { dashboard: p, runtimeEffects: g, clauses: [T.committed(h == null ? void 0 : h.title)] };
2016
2016
  }
2017
- function Mo(e, t) {
2017
+ function _o(e, t) {
2018
2018
  const n = { ...e }, r = [];
2019
2019
  return t.title !== void 0 && t.title !== e.title && (n.title = t.title, r.push(T.plain("dashboard", `renames the dashboard to ${w(t.title)}`))), t.description === null && e.description ? (delete n.description, r.push(T.plain("dashboard", "removes the dashboard's description"))) : typeof t.description == "string" && t.description !== e.description && (n.description = t.description, r.push(T.plain("dashboard", "changes the dashboard's description"))), { dashboard: n, clauses: r.length ? r : [T.plain("dashboard", "changes nothing on the dashboard")] };
2020
2020
  }
2021
- function _o(e, t) {
2021
+ function Mo(e, t) {
2022
2022
  const n = { ...e };
2023
2023
  t.style ? n.dashboardStyle = t.style : delete n.dashboardStyle;
2024
2024
  const r = t.sentences.map((i) => T.plain("dashboard", `${i.charAt(0).toLowerCase()}${i.slice(1)}`));
@@ -2157,18 +2157,18 @@ function rl(e, t) {
2157
2157
  (n) => n.type === "image" && n.role === t
2158
2158
  );
2159
2159
  }
2160
- function Xt(e, t) {
2160
+ function Qt(e, t) {
2161
2161
  const n = {
2162
2162
  ...t,
2163
2163
  type: "text",
2164
2164
  content: typeof t.content == "string" ? Yn(t.content) : t.content
2165
2165
  };
2166
- return Qn(e, n);
2166
+ return Xn(e, n);
2167
2167
  }
2168
2168
  function il(e, t) {
2169
- return Qn(e, t);
2169
+ return Xn(e, t);
2170
2170
  }
2171
- function Qn(e, t) {
2171
+ function Xn(e, t) {
2172
2172
  const n = e.findIndex((r) => r.id === t.id);
2173
2173
  return n === -1 ? [...e, t] : e.map(
2174
2174
  (r, i) => i === n ? t : r
@@ -2237,12 +2237,12 @@ function qo(e) {
2237
2237
  }
2238
2238
  function Uo(e, t, n, r = { calendar: null }) {
2239
2239
  var bt, vt, It, Ct, Ft, St, xt, Tt;
2240
- const o = Q(e).findFilterInput(t), a = (M, x) => ({
2240
+ const o = X(e).findFilterInput(t), a = (_, x) => ({
2241
2241
  ok: !1,
2242
2242
  issues: [
2243
2243
  {
2244
2244
  code: "invalidSettings",
2245
- message: M,
2245
+ message: _,
2246
2246
  ref: t,
2247
2247
  ...o ? { inputId: o.input.id } : {},
2248
2248
  ...x ? { contractIssue: x } : {}
@@ -2280,19 +2280,19 @@ function Uo(e, t, n, r = { calendar: null }) {
2280
2280
  e,
2281
2281
  { name: n.variableName },
2282
2282
  { exclude: { source: "input", inputId: s.id } }
2283
- ) : s.variableName, p = u && (c.title || c.column) !== (l.title || l.column), y = n.label ?? (p ? l.title || l.column || l.id : void 0), g = u && c.hide !== l.hide, h = u && c.toolbarWidth !== l.toolbarWidth, C = (M) => {
2283
+ ) : s.variableName, p = u && (c.title || c.column) !== (l.title || l.column), y = n.label ?? (p ? l.title || l.column || l.id : void 0), g = u && c.hide !== l.hide, h = u && c.toolbarWidth !== l.toolbarWidth, C = (_) => {
2284
2284
  var wt, Dt;
2285
- const x = { ...M };
2285
+ const x = { ..._ };
2286
2286
  if (y !== void 0 && (x.label = y), n.variableName !== void 0 && (x.variableName = m), n.scope && (x.scope = n.scope), g || h) {
2287
2287
  const Ae = yn(l);
2288
- x.presentation = { ...M.presentation }, g && (x.presentation.placement = Ae.placement), h && (Ae.widthPx === void 0 ? delete x.presentation.widthPx : x.presentation.widthPx = Ae.widthPx);
2288
+ x.presentation = { ..._.presentation }, g && (x.presentation.placement = Ae.placement), h && (Ae.widthPx === void 0 ? delete x.presentation.widthPx : x.presentation.widthPx = Ae.widthPx);
2289
2289
  }
2290
2290
  return (n.forceSelection !== void 0 || u) && (f ? x.forceSelection = f : delete x.forceSelection), n.requiredAtExecution !== void 0 && (n.requiredAtExecution ? x.requiredAtExecution = !0 : delete x.requiredAtExecution), Ke(x, "optionSource", n.optionSource), Ke(x, "optionDependencies", n.optionDependencies), Ke(x, "optionPopulation", n.optionPopulation), ((wt = n.mapping) == null ? void 0 : wt.kind) === "save" && n.mapping.draft.acceptance.ok ? x.application = n.mapping.draft.acceptance.application : ((Dt = n.mapping) == null ? void 0 : Dt.kind) === "remove" && delete x.application, x;
2291
- }, v = n.label !== void 0 && n.label !== s.label && n.label !== l.title ? n.label : void 0, I = u || n.variableName !== void 0 || v !== void 0, b = (M) => ({
2292
- ...M,
2291
+ }, v = n.label !== void 0 && n.label !== s.label && n.label !== l.title ? n.label : void 0, I = u || n.variableName !== void 0 || v !== void 0, b = (_) => ({
2292
+ ..._,
2293
2293
  ...n.variableName !== void 0 ? { variableName: m } : {},
2294
2294
  ...v !== void 0 ? { title: v } : {}
2295
- }), S = Array.isArray(e.inputs) ? [...e.inputs] : [], A = S.findIndex((M) => M.id === s.id), k = S[A];
2295
+ }), S = Array.isArray(e.inputs) ? [...e.inputs] : [], A = S.findIndex((_) => _.id === s.id), k = S[A];
2296
2296
  if (A < 0 || (k == null ? void 0 : k.kind) !== "filter" || !k.filter)
2297
2297
  return a("This filter can not be edited here.");
2298
2298
  const B = C(
@@ -2312,7 +2312,7 @@ function Uo(e, t, n, r = { calendar: null }) {
2312
2312
  G.issues[0]
2313
2313
  );
2314
2314
  let $ = { ...e, inputs: S };
2315
- const te = Q($), O = te.findFilterInput({ filterId: l.id });
2315
+ const te = X($), O = te.findFilterInput({ filterId: l.id });
2316
2316
  if (!O)
2317
2317
  return a(
2318
2318
  ((Ct = te.issues[0]) == null ? void 0 : Ct.message) ?? "These settings could not be saved."
@@ -2345,12 +2345,12 @@ function Uo(e, t, n, r = { calendar: null }) {
2345
2345
  r.calendar ?? void 0
2346
2346
  );
2347
2347
  if (P.defaultValueChanged || P.selectionIdentityChanged || P.defaultComparisonChanged) {
2348
- const M = Xn({
2348
+ const _ = Qn({
2349
2349
  state: { ...R, dashboardInputValues: {} },
2350
2350
  input: W,
2351
2351
  settings: P
2352
2352
  });
2353
- R = { ...R, defaultInputValues: M.defaultInputValues }, P.selectionIdentityChanged && U.push({
2353
+ R = { ...R, defaultInputValues: _.defaultInputValues }, P.selectionIdentityChanged && U.push({
2354
2354
  kind: "clear",
2355
2355
  inputId: W.id,
2356
2356
  target: P.target
@@ -2366,7 +2366,7 @@ function Uo(e, t, n, r = { calendar: null }) {
2366
2366
  });
2367
2367
  }
2368
2368
  if (n.scope && O.input.runtimeScope !== "shared") {
2369
- const M = Go(
2369
+ const _ = Go(
2370
2370
  $,
2371
2371
  s,
2372
2372
  O.input,
@@ -2374,9 +2374,9 @@ function Uo(e, t, n, r = { calendar: null }) {
2374
2374
  );
2375
2375
  R = {
2376
2376
  ...R,
2377
- defaultInputValues: M.defaultInputValues
2377
+ defaultInputValues: _.defaultInputValues
2378
2378
  }, U.push(
2379
- ...M.dropped.map((x) => ({
2379
+ ..._.dropped.map((x) => ({
2380
2380
  kind: "dropTargetSlot",
2381
2381
  inputId: W.id,
2382
2382
  target: x
@@ -2391,12 +2391,12 @@ function Uo(e, t, n, r = { calendar: null }) {
2391
2391
  };
2392
2392
  }
2393
2393
  function ol(e) {
2394
- let t = Mt({
2394
+ let t = _t({
2395
2395
  dashboard: e.before,
2396
2396
  runtimeValues: e.dashboardInputValues,
2397
2397
  calendar: e.calendar
2398
2398
  });
2399
- const n = Q(e.after), r = (i) => {
2399
+ const n = X(e.after), r = (i) => {
2400
2400
  var o;
2401
2401
  return (o = n.findFilterInput({ inputId: i })) == null ? void 0 : o.input;
2402
2402
  };
@@ -2407,7 +2407,7 @@ function ol(e) {
2407
2407
  case "setDefaultComparison": {
2408
2408
  const o = r(i.inputId);
2409
2409
  if (!o) break;
2410
- t = Xn({
2410
+ t = Qn({
2411
2411
  state: { dashboardInputValues: t },
2412
2412
  input: o,
2413
2413
  settings: {
@@ -2431,7 +2431,7 @@ function ol(e) {
2431
2431
  break;
2432
2432
  }
2433
2433
  }
2434
- return Mt({
2434
+ return _t({
2435
2435
  dashboard: e.after,
2436
2436
  runtimeValues: t,
2437
2437
  calendar: e.calendar
@@ -2446,7 +2446,7 @@ function Ke(e, t, n) {
2446
2446
  }
2447
2447
  function jo(e, t) {
2448
2448
  const n = [
2449
- ...Q(e).inputs.map((i) => i.input),
2449
+ ...X(e).inputs.map((i) => i.input),
2450
2450
  ...(Array.isArray(e.inputs) ? e.inputs : []).filter(
2451
2451
  (i) => i.kind === "control"
2452
2452
  )
@@ -2515,12 +2515,12 @@ function Ho(e, t, n, r, i) {
2515
2515
  defaultFilterValue: o ? ie(t, i) : void 0
2516
2516
  };
2517
2517
  }
2518
- function Xn(e) {
2518
+ function Qn(e) {
2519
2519
  const { settings: t } = e;
2520
2520
  if (!t) return e.state;
2521
2521
  const n = e.input;
2522
2522
  let r = e.state.dashboardInputValues, i = e.state.defaultInputValues;
2523
- if (t.selectionIdentityChanged && (r = _t(
2523
+ if (t.selectionIdentityChanged && (r = Mt(
2524
2524
  r,
2525
2525
  n,
2526
2526
  t.target,
@@ -2553,7 +2553,7 @@ function Xn(e) {
2553
2553
  n,
2554
2554
  t.target,
2555
2555
  { comparisonSelection: o.comparisonSelection }
2556
- )), i = Object.keys(a).length ? a : void 0, r = _t(
2556
+ )), i = Object.keys(a).length ? a : void 0, r = Mt(
2557
2557
  r,
2558
2558
  n,
2559
2559
  t.target,
@@ -2583,7 +2583,7 @@ function Xn(e) {
2583
2583
  };
2584
2584
  }
2585
2585
  const ee = (e) => Array.isArray(e.inputs) ? e.inputs : [];
2586
- function _e(e, t) {
2586
+ function Me(e, t) {
2587
2587
  const n = ee(e).find((r) => r.id === t);
2588
2588
  if (!n || n.kind !== "filter")
2589
2589
  throw new F("filter_not_found", `No filter ${t} on this dashboard.`, "Read the outline again and use its filter ids.");
@@ -2598,21 +2598,21 @@ function Zn(e, t) {
2598
2598
  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.");
2599
2599
  }
2600
2600
  function Yo(e, t, n) {
2601
- const r = Q(e), i = r.findFilterInput({ inputId: t });
2601
+ const r = X(e), i = r.findFilterInput({ inputId: t });
2602
2602
  return i ? r.reachedCards({ inputId: t }).filter(
2603
2603
  (o) => ["bound", "automatic", "sql", "relationshipApplied"].includes(
2604
2604
  ui(i.input, o.card, n).reach
2605
2605
  )
2606
2606
  ).length : 0;
2607
2607
  }
2608
- function Qo(e, t) {
2608
+ function Xo(e, t) {
2609
2609
  return er(e, t, "relationship");
2610
2610
  }
2611
- function Xo(e, t) {
2611
+ function Qo(e, t) {
2612
2612
  return er(e, t, "sqlTemplate");
2613
2613
  }
2614
2614
  function er(e, t, n) {
2615
- const r = Q(e), i = r.findFilterInput({ inputId: t });
2615
+ const r = X(e), i = r.findFilterInput({ inputId: t });
2616
2616
  return i ? r.reachedCards({ inputId: t }).filter((o) => fi(i.input, o.card) === n).length : 0;
2617
2617
  }
2618
2618
  function tr(e, t) {
@@ -2640,9 +2640,9 @@ function Jo(e, t) {
2640
2640
  const { input: n } = t, r = ee(e);
2641
2641
  if (r.some((d) => d.id === n.id))
2642
2642
  throw new F("filter_id_taken", `A filter with id ${n.id} is already on this dashboard.`);
2643
- if (Q(e).findFilterInput({ filterId: n.filter.id }))
2643
+ if (X(e).findFilterInput({ filterId: n.filter.id }))
2644
2644
  throw new F("filter_id_taken", `A filter definition with id ${n.filter.id} is already on this dashboard.`);
2645
- const i = { ...e, inputs: [...r, n] }, o = Yo(i, n.id), a = Qo(i, n.id), s = Xo(i, n.id), c = De([
2645
+ const i = { ...e, inputs: [...r, n] }, o = Yo(i, n.id), a = Xo(i, n.id), s = Qo(i, n.id), c = De([
2646
2646
  ...a ? [`may filter ${a} more through the domain's relationships`] : [],
2647
2647
  ...s ? [`may filter ${s} more through ${s === 1 ? "its" : "their"} SQL`] : []
2648
2648
  ]), l = [nr(n), rr(n)].filter(Boolean).join(", ");
@@ -2694,7 +2694,7 @@ function es(e, t, n) {
2694
2694
  return JSON.stringify(t.scope) !== JSON.stringify(n.scope) && r.push(`applies it to ${tr(e, n)}`), r.length ? De(r) : "keeps its settings";
2695
2695
  }
2696
2696
  function ts(e, t) {
2697
- const n = _e(e, t);
2697
+ const n = Me(e, t);
2698
2698
  return {
2699
2699
  dashboard: {
2700
2700
  ...e,
@@ -2725,7 +2725,7 @@ function ns(e, t, n) {
2725
2725
  }
2726
2726
  function ir(e, t, n, r, i) {
2727
2727
  var d, u;
2728
- const o = _e(e, t);
2728
+ const o = Me(e, t);
2729
2729
  Zn(e, n);
2730
2730
  const a = [...((d = o.application) == null ? void 0 : d.cards) ?? []], s = a.findIndex((f) => f.cardId === n);
2731
2731
  s >= 0 ? a[s] = r : a.push(r);
@@ -2756,7 +2756,7 @@ function rs(e) {
2756
2756
  }
2757
2757
  }
2758
2758
  function is(e, t) {
2759
- const n = _e(e, t.filterId), r = { ...t.binding, kind: "bound", cardId: t.cardId }, i = ua(n.scope, t.cardId), o = i !== n.scope;
2759
+ const n = Me(e, t.filterId), r = { ...t.binding, kind: "bound", cardId: t.cardId }, i = ua(n.scope, t.cardId), o = i !== n.scope;
2760
2760
  return {
2761
2761
  dashboard: ir(e, t.filterId, t.cardId, r, o ? i : void 0),
2762
2762
  clauses: [
@@ -2768,7 +2768,7 @@ function is(e, t) {
2768
2768
  }
2769
2769
  function as(e, t) {
2770
2770
  var i;
2771
- const n = _e(e, t.filterId);
2771
+ const n = Me(e, t.filterId);
2772
2772
  return {
2773
2773
  dashboard: ((i = n.filter) == null ? void 0 : i.kind) === "global-date" ? ns(e, n, t.cardId) : ir(e, t.filterId, t.cardId, { kind: "excluded", cardId: t.cardId }),
2774
2774
  clauses: [ue(`stops ${w(n.label)} from filtering ${Jn(e, t.cardId)}`)]
@@ -3114,7 +3114,7 @@ function xs(e, t, n) {
3114
3114
  const a = r.findIndex(({ id: l }) => l === t.sectionId);
3115
3115
  if (a === -1) throw ye(t.sectionId);
3116
3116
  const s = [...r], [c] = s.splice(a, 1);
3117
- return s.splice(Qe(t.toIndex, s.length), 0, c), {
3117
+ return s.splice(Xe(t.toIndex, s.length), 0, c), {
3118
3118
  document: i(s),
3119
3119
  target: o(t.sectionId)
3120
3120
  };
@@ -3181,13 +3181,13 @@ function xs(e, t, n) {
3181
3181
  if (t.region === "header") {
3182
3182
  const u = (a == null ? void 0 : a.region) === "header" ? a : Eo();
3183
3183
  return {
3184
- document: { ...e, header: { ...u, enabled: !0, blocks: Xt(u.blocks, l) } },
3184
+ document: { ...e, header: { ...u, enabled: !0, blocks: Qt(u.blocks, l) } },
3185
3185
  target: { kind: "header" }
3186
3186
  };
3187
3187
  }
3188
3188
  const d = (a == null ? void 0 : a.region) === "footer" ? a : Ro();
3189
3189
  return {
3190
- document: { ...e, footer: { ...d, enabled: !0, blocks: Xt(d.blocks, l) } },
3190
+ document: { ...e, footer: { ...d, enabled: !0, blocks: Qt(d.blocks, l) } },
3191
3191
  target: { kind: "footer" }
3192
3192
  };
3193
3193
  }
@@ -3285,7 +3285,7 @@ function xs(e, t, n) {
3285
3285
  if (s === -1)
3286
3286
  throw new D(`KPI section '${a.id}' has no card '${t.cardId}'.`);
3287
3287
  const c = [...a.cards], [l] = c.splice(s, 1);
3288
- return c.splice(Qe(t.toIndex, c.length), 0, l), {
3288
+ return c.splice(Xe(t.toIndex, c.length), 0, l), {
3289
3289
  document: i(K(r, { ...a, cards: c })),
3290
3290
  target: o(a.id, t.cardId)
3291
3291
  };
@@ -3338,7 +3338,7 @@ function Le(e, t, n) {
3338
3338
  });
3339
3339
  return m.length === 0 ? { card: c } : {
3340
3340
  card: c,
3341
- calculatedFields: X(a == null ? void 0 : a.calculatedFields, m)
3341
+ calculatedFields: Q(a == null ? void 0 : a.calculatedFields, m)
3342
3342
  };
3343
3343
  }
3344
3344
  function se(e, t) {
@@ -3376,7 +3376,7 @@ function tn(e, t) {
3376
3376
  );
3377
3377
  }
3378
3378
  function Ve(e, t, n) {
3379
- const r = Qe(n, e.length);
3379
+ const r = Xe(n, e.length);
3380
3380
  return [...e.slice(0, r), t, ...e.slice(r)];
3381
3381
  }
3382
3382
  function K(e, t) {
@@ -3384,7 +3384,7 @@ function K(e, t) {
3384
3384
  (n) => n.id === t.id ? t : n
3385
3385
  );
3386
3386
  }
3387
- function Qe(e, t) {
3387
+ function Xe(e, t) {
3388
3388
  return Number.isFinite(e) ? Math.min(t, Math.max(0, Math.trunc(e))) : t;
3389
3389
  }
3390
3390
  function L(e, t) {
@@ -3413,7 +3413,7 @@ const ks = {
3413
3413
  throw new F("document_invalid", "A text edit mints no card id.");
3414
3414
  }
3415
3415
  }, Os = { title: "title", metadata: "metadata", note: "note", pageInfo: "page info" };
3416
- function Ms(e, t) {
3416
+ function _s(e, t) {
3417
3417
  const n = e.sheets ?? [], r = n.findIndex((d) => d.id === t.sheetId), i = n[r];
3418
3418
  if (!i) throw new F("sheet_not_found", `No sheet ${t.sheetId} on this dashboard.`, "Read the outline again and use its sheet ids.");
3419
3419
  if (!we(i) || !i.document)
@@ -3435,11 +3435,11 @@ function Ms(e, t) {
3435
3435
  clauses: [T.plain("document", c.join(" and "))]
3436
3436
  };
3437
3437
  }
3438
- const _s = { left: "left-aligned", center: "centered", right: "right-aligned" };
3438
+ const Ms = { left: "left-aligned", center: "centered", right: "right-aligned" };
3439
3439
  function As(e) {
3440
3440
  return [
3441
3441
  ...(e == null ? void 0 : e.fontSize) !== void 0 ? [`${e.fontSize}px`] : [],
3442
- ...(e == null ? void 0 : e.align) !== void 0 ? [_s[e.align]] : []
3442
+ ...(e == null ? void 0 : e.align) !== void 0 ? [Ms[e.align]] : []
3443
3443
  ].join(" and ");
3444
3444
  }
3445
3445
  function dl(e, t, n) {
@@ -3509,9 +3509,9 @@ function Ns(e, t, n) {
3509
3509
  case "filter.exclude":
3510
3510
  return ne(as(e, t), [t.cardId]);
3511
3511
  case "dashboard.update":
3512
- return Mo(e, t);
3513
- case "dashboard.style":
3514
3512
  return _o(e, t);
3513
+ case "dashboard.style":
3514
+ return Mo(e, t);
3515
3515
  case "sheet.add":
3516
3516
  return Lo(e, t);
3517
3517
  case "sheet.update":
@@ -3527,7 +3527,7 @@ function Ns(e, t, n) {
3527
3527
  case "variable.remove":
3528
3528
  return cs(e, t);
3529
3529
  case "document.text":
3530
- return Ms(e, t);
3530
+ return _s(e, t);
3531
3531
  }
3532
3532
  }
3533
3533
  function ne(e, t) {
@@ -3651,7 +3651,7 @@ function be(e, t) {
3651
3651
  function ur(e, t) {
3652
3652
  e.sourceLabel === void 0 ? e.sourceLabel = t : e.sourceLabel !== t && (e.sourceLabelConflict = !0);
3653
3653
  }
3654
- function Xe(e, t, n) {
3654
+ function Qe(e, t, n) {
3655
3655
  for (const r of t) {
3656
3656
  const i = r == null ? void 0 : r.trim();
3657
3657
  if (!i) continue;
@@ -3662,7 +3662,7 @@ function Xe(e, t, n) {
3662
3662
  function fr(e, t) {
3663
3663
  t.sourceLabel && ur(e, t.sourceLabel), t.sourceLabelConflict && (e.sourceLabelConflict = !0);
3664
3664
  for (const [n, r] of t.fields)
3665
- Xe(e, [n], r);
3665
+ Qe(e, [n], r);
3666
3666
  for (const n of t.fieldConflicts ?? [])
3667
3667
  e.fieldConflicts.add(n);
3668
3668
  }
@@ -3680,11 +3680,11 @@ function fl(e, t) {
3680
3680
  f && c && ur(
3681
3681
  be(n, ce(f)),
3682
3682
  c
3683
- ), !(!d || !u || u === d) && (Xe(
3683
+ ), !(!d || !u || u === d) && (Qe(
3684
3684
  be(n, o),
3685
3685
  [d, l.sourceField],
3686
3686
  u
3687
- ), f && Xe(
3687
+ ), f && Qe(
3688
3688
  be(n, ce(f)),
3689
3689
  [l.sourceField, d],
3690
3690
  u
@@ -3782,8 +3782,8 @@ function hl(e) {
3782
3782
  const { dashboard: t, target: n, calendar: r } = e, i = hr(n), o = gr(t, n, r);
3783
3783
  return {
3784
3784
  value: o,
3785
- mode: Nr(
3786
- $r(o == null ? void 0 : o.operation) ? o.operation : i.operation
3785
+ mode: Ar(
3786
+ Pr(o == null ? void 0 : o.operation) ? o.operation : i.operation
3787
3787
  )
3788
3788
  };
3789
3789
  }
@@ -3818,7 +3818,7 @@ function hr(e) {
3818
3818
  function yl(e) {
3819
3819
  var o;
3820
3820
  const { dashboard: t, filter: n, input: r, scope: i } = e;
3821
- return r && (t.inputs || []).some((a) => a.id === r.id) ? { kind: "dashboardInput", input: r, scope: i } : ((o = Q(t).findFilterInput({ filterId: n.id })) == null ? void 0 : o.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: n } : { kind: "definition", filter: n };
3821
+ return r && (t.inputs || []).some((a) => a.id === r.id) ? { kind: "dashboardInput", input: r, scope: i } : ((o = X(t).findFilterInput({ filterId: n.id })) == null ? void 0 : o.origin) === "toolbarFilter" ? { kind: "dashboardFilter", filter: n } : { kind: "definition", filter: n };
3822
3822
  }
3823
3823
  function bl(e) {
3824
3824
  const { dashboard: t, target: n, calendar: r } = e, i = hr(n), o = xi(i), a = Us(t, n);
@@ -4149,7 +4149,7 @@ function Ys(e) {
4149
4149
  ...t ? { format: t } : {}
4150
4150
  };
4151
4151
  }
4152
- function Qs(e, t) {
4152
+ function Xs(e, t) {
4153
4153
  var i, o;
4154
4154
  const n = ((i = e.nativeDataType) == null ? void 0 : i.trim()) || ((o = e.native_data_type) == null ? void 0 : o.trim());
4155
4155
  return n || ((e.dataTypeProvenance || t) === "physical" ? e.data_type : void 0);
@@ -4164,7 +4164,7 @@ function yt(e) {
4164
4164
  function on(e) {
4165
4165
  return yt(e).toLowerCase().trim();
4166
4166
  }
4167
- function Xs(e, t) {
4167
+ function Qs(e, t) {
4168
4168
  return on(e).localeCompare(on(t), void 0, {
4169
4169
  numeric: !0,
4170
4170
  sensitivity: "base"
@@ -4195,7 +4195,7 @@ function sn(e, t) {
4195
4195
  return r.startsWith(n) ? 0 : r.includes(n) ? 1 : [e.label, e.name].filter(Boolean).map(oe).some((o) => o.includes(n)) ? 2 : 3;
4196
4196
  }
4197
4197
  function xl(e, t, n) {
4198
- return sn(e, n) - sn(t, n) || Xs(e, t);
4198
+ return sn(e, n) - sn(t, n) || Qs(e, t);
4199
4199
  }
4200
4200
  function Js(e, t) {
4201
4201
  var o;
@@ -4211,12 +4211,12 @@ function Js(e, t) {
4211
4211
  qualifiedEntityName: i,
4212
4212
  columns: t.map((a) => {
4213
4213
  var m;
4214
- const s = e.type === "dataset" ? a.entityName || r : e.name, c = a.qualifiedEntityName || (e.type === "dataset" && s ? $t({ ...e, name: s }) : i), l = Qs(
4214
+ const s = e.type === "dataset" ? a.entityName || r : e.name, c = a.qualifiedEntityName || (e.type === "dataset" && s ? $t({ ...e, name: s }) : i), l = Xs(
4215
4215
  a,
4216
4216
  e.type === "dataset" ? "semantic" : "physical"
4217
4217
  ), d = (m = a.label) != null && m.trim() ? a.label : void 0, u = d ? void 0 : nt(a.column_name);
4218
4218
  return {
4219
- id: Mi(s, a.column_name),
4219
+ id: _i(s, a.column_name),
4220
4220
  name: a.column_name,
4221
4221
  qualifiedFieldName: a.qualifiedFieldName || a.column_name,
4222
4222
  dataType: a.data_type,
@@ -4285,7 +4285,7 @@ function Tl(e) {
4285
4285
  const o = Cn(i);
4286
4286
  r.has(o) || r.set(o, i);
4287
4287
  }), t.unshift({
4288
- entityId: _i,
4288
+ entityId: Mi,
4289
4289
  entityType: "dataset",
4290
4290
  entityName: Et,
4291
4291
  label: "Calculated Fields",
@@ -4391,7 +4391,7 @@ function Ol(e, t, n) {
4391
4391
  const r = Pi({ card: e, stated: t, context: n });
4392
4392
  return r.ok ? { ok: !0, card: r.update ? Ni(e, r.update).card : e, warnings: r.warnings } : r;
4393
4393
  }
4394
- function Ml({
4394
+ function _l({
4395
4395
  resolvedCardConfig: e,
4396
4396
  card: t,
4397
4397
  row: n,
@@ -4449,7 +4449,7 @@ function Ml({
4449
4449
  metrics: y.length > 0 ? y : void 0
4450
4450
  };
4451
4451
  }
4452
- function _l({
4452
+ function Ml({
4453
4453
  resolvedCardConfig: e,
4454
4454
  card: t,
4455
4455
  columnId: n,
@@ -4537,7 +4537,7 @@ function ac(e) {
4537
4537
  if (j(e))
4538
4538
  switch (e.status) {
4539
4539
  case "applied": {
4540
- const t = Mn(e.route);
4540
+ const t = _n(e.route);
4541
4541
  return t ? { status: "applied", route: t } : void 0;
4542
4542
  }
4543
4543
  case "skipped":
@@ -4560,7 +4560,7 @@ function br(e) {
4560
4560
  }
4561
4561
  function oc(e) {
4562
4562
  if (!j(e)) return;
4563
- const t = Mn(e.route), n = e.target;
4563
+ const t = _n(e.route), n = e.target;
4564
4564
  if (!(!t || !j(n) || n.kind !== "relationship" || !j(n.field) || typeof n.field.name != "string" || !j(n.field.source) || n.field.source.kind !== "semantic" || !br(n.relationshipIds)))
4565
4565
  return { route: t, target: n };
4566
4566
  }
@@ -4631,12 +4631,12 @@ export {
4631
4631
  El as R,
4632
4632
  yt as S,
4633
4633
  ro as T,
4634
- _a as U,
4634
+ Ma as U,
4635
4635
  Aa as V,
4636
4636
  ke as W,
4637
4637
  Pc as X,
4638
4638
  tl as Y,
4639
- Mc as Z,
4639
+ _c as Z,
4640
4640
  wo as _,
4641
4641
  vl as a,
4642
4642
  ml as a$,
@@ -4650,7 +4650,7 @@ export {
4650
4650
  Da as a7,
4651
4651
  ka as a8,
4652
4652
  xe as a9,
4653
- _n as aA,
4653
+ Mn as aA,
4654
4654
  Pa as aB,
4655
4655
  ct as aC,
4656
4656
  Nc as aD,
@@ -4658,7 +4658,7 @@ export {
4658
4658
  Te as aF,
4659
4659
  de as aG,
4660
4660
  Oc as aH,
4661
- _l as aI,
4661
+ Ml as aI,
4662
4662
  Vc as aJ,
4663
4663
  Bo as aK,
4664
4664
  V as aL,
@@ -4674,7 +4674,7 @@ export {
4674
4674
  gl as aV,
4675
4675
  fl as aW,
4676
4676
  Rs as aX,
4677
- Qs as aY,
4677
+ Xs as aY,
4678
4678
  bl as aZ,
4679
4679
  yl as a_,
4680
4680
  Wc as aa,
@@ -4720,13 +4720,13 @@ export {
4720
4720
  rl as bd,
4721
4721
  Eo as be,
4722
4722
  il as bf,
4723
- Xt as bg,
4723
+ Qt as bg,
4724
4724
  Ro as bh,
4725
4725
  sr as bi,
4726
4726
  or as bj,
4727
4727
  ls as bk,
4728
4728
  ll as bl,
4729
- _c as bm,
4729
+ Mc as bm,
4730
4730
  an as c,
4731
4731
  kl as d,
4732
4732
  dl as e,
@@ -4734,12 +4734,12 @@ export {
4734
4734
  Cl as g,
4735
4735
  Jc as h,
4736
4736
  al as i,
4737
- Xc as j,
4738
- Qc as k,
4737
+ Qc as j,
4738
+ Xc as k,
4739
4739
  qs as l,
4740
4740
  qo as m,
4741
4741
  Uo as n,
4742
- Ml as o,
4742
+ _l as o,
4743
4743
  ao as p,
4744
4744
  so as q,
4745
4745
  hl as r,