react-semaphor 0.1.602 → 0.1.603

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 (107) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
  12. package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
  16. package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
  20. package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
  22. package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
  28. package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
  37. package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
  41. package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
  43. package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
  48. package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2466 -2343
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +20 -20
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  57. package/dist/types/index.js +5 -5
  58. package/dist/types/lib/document/document-edits.d.ts +0 -4
  59. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  60. package/dist/types/lib/types/common-types.d.ts +0 -2
  61. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  62. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  63. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  64. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  65. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  66. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  67. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  68. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  69. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  70. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  71. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  72. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  73. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
  79. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  81. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  82. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  84. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  85. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  86. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  87. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  88. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  89. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  91. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
  92. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
  93. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  94. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  95. package/dist/types/shared/format-utils/index.d.ts +1 -0
  96. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  97. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  98. package/dist/types/shared/temporal/index.d.ts +2 -0
  99. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  100. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  101. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  102. package/dist/usage-events/index.js +1 -1
  103. package/package.json +3 -2
  104. package/dist/chunks/dates-Bz-qM5px.js +0 -164
  105. package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
  106. package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
  107. package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
@@ -1,23 +1,23 @@
1
- import { a6 as Y, f as Pe, k as Le, aE as qe } from "./validators-ClWHpYql.js";
2
- import { z as l } from "zod";
3
- import { Q as B, E as Be, q as je } from "./matrix-operation-contract--DkNCOzd.js";
4
- import { D as Ue, C as ze, r as j, a as We, e as Qe } from "./metric-comparison-zMylnIkc.js";
5
- import "./analytics-base-schemas-DevrgqQb.js";
6
- import { a as N } from "./applied-constraints-DU-wndZ7.js";
7
- import { r as Ge } from "./pivot-result-identity-C1AOH1PS.js";
8
- const re = 8, se = 6, V = Object.freeze([]);
9
- function Ye(e) {
1
+ import { a6 as J, f as Le, k as qe, aE as je } from "./validators-Baf3VIf5.js";
2
+ import { z as f } from "zod";
3
+ import { Q as j, E as Be, q as Ue } from "./matrix-operation-contract-DPBj69D8.js";
4
+ import { c as ze, D as We, b as be, e as Qe, r as B, a as Ye, k as Ge } from "./metric-comparison-B0FR-Q8I.js";
5
+ import "./analytics-base-schemas-DsUh5Q3C.js";
6
+ import { a as D } from "./applied-constraints-DU-wndZ7.js";
7
+ import { r as Je } from "./pivot-result-identity-CAP4--iq.js";
8
+ const se = 8, ae = 6, $ = Object.freeze([]);
9
+ function He(e) {
10
10
  switch (e.type) {
11
11
  case "table":
12
12
  case "chart":
13
- return e.card ? [e.card] : V;
13
+ return e.card ? [e.card] : $;
14
14
  case "kpi":
15
- return Array.isArray(e.cards) ? e.cards : V;
15
+ return Array.isArray(e.cards) ? e.cards : $;
16
16
  default:
17
- return V;
17
+ return $;
18
18
  }
19
19
  }
20
- function Je(e, t) {
20
+ function Xe(e, t) {
21
21
  switch (e.type) {
22
22
  case "table":
23
23
  case "chart": {
@@ -34,7 +34,7 @@ function Je(e, t) {
34
34
  return e;
35
35
  }
36
36
  }
37
- function _(e) {
37
+ function F(e) {
38
38
  var n;
39
39
  const t = [];
40
40
  for (const r of e.sheets || []) {
@@ -51,7 +51,7 @@ function _(e) {
51
51
  card: i
52
52
  });
53
53
  for (const a of ((n = r.document) == null ? void 0 : n.sections) || [])
54
- for (const i of Ye(a))
54
+ for (const i of He(a))
55
55
  t.push({
56
56
  kind: "documentSectionCard",
57
57
  sheetId: s,
@@ -62,28 +62,28 @@ function _(e) {
62
62
  }
63
63
  return t;
64
64
  }
65
- function nn(e, t, n) {
65
+ function sn(e, t, n) {
66
66
  let r = !1;
67
- const s = He(e, (i) => i.id !== n.id ? i : (r = !0, i === n ? i : n));
67
+ const s = Ze(e, (i) => i.id !== n.id ? i : (r = !0, i === n ? i : n));
68
68
  if (r || !t) return s;
69
69
  const a = (s.sheets || []).map(
70
70
  (i) => i.id === t && i.kind !== "document" ? { ...i, cards: [...i.cards ?? [], n] } : i
71
71
  );
72
72
  return { ...s, sheets: a };
73
73
  }
74
- function He(e, t) {
74
+ function Ze(e, t) {
75
75
  const n = (s, a) => {
76
76
  const i = s.map((o) => t(o, a(o)));
77
77
  return i.every((o, c) => o === s[c]) ? s : i;
78
78
  }, r = (e.sheets || []).map((s) => {
79
- var f, y, h;
80
- const a = s.id, i = s.cards && n(s.cards, (p) => ({ kind: "sheetCard", sheetId: a, cardId: p.id, card: p })), o = (f = s.frames) == null ? void 0 : f.map((p) => {
81
- if (!p.cards) return p;
82
- const I = n(p.cards, (g) => ({ kind: "frameCard", sheetId: a, frameId: p.id, cardId: g.id, card: g }));
83
- return I === p.cards ? p : { ...p, cards: I };
84
- }), c = (h = (y = s.document) == null ? void 0 : y.sections) == null ? void 0 : h.map(
85
- (p) => Je(p, (I) => t(I, { kind: "documentSectionCard", sheetId: a, sectionId: p.id, cardId: I.id, card: I }))
86
- ), u = !!o && o.some((p, I) => p !== s.frames[I]), d = !!c && c.some((p, I) => p !== s.document.sections[I]);
79
+ var m, I, y;
80
+ const a = s.id, i = s.cards && n(s.cards, (l) => ({ kind: "sheetCard", sheetId: a, cardId: l.id, card: l })), o = (m = s.frames) == null ? void 0 : m.map((l) => {
81
+ if (!l.cards) return l;
82
+ const h = n(l.cards, (C) => ({ kind: "frameCard", sheetId: a, frameId: l.id, cardId: C.id, card: C }));
83
+ return h === l.cards ? l : { ...l, cards: h };
84
+ }), c = (y = (I = s.document) == null ? void 0 : I.sections) == null ? void 0 : y.map(
85
+ (l) => Xe(l, (h) => t(h, { kind: "documentSectionCard", sheetId: a, sectionId: l.id, cardId: h.id, card: h }))
86
+ ), u = !!o && o.some((l, h) => l !== s.frames[h]), d = !!c && c.some((l, h) => l !== s.document.sections[h]);
87
87
  return i === s.cards && !u && !d ? s : {
88
88
  ...s,
89
89
  ...i === s.cards ? {} : { cards: i },
@@ -93,11 +93,11 @@ function He(e, t) {
93
93
  });
94
94
  return r.every((s, a) => s === e.sheets[a]) ? e : { ...e, sheets: r };
95
95
  }
96
- function $(e) {
96
+ function P(e) {
97
97
  return !!e && typeof e == "object" && !Array.isArray(e);
98
98
  }
99
- function rn(e) {
100
- if (!$(e))
99
+ function an(e) {
100
+ if (!P(e))
101
101
  return [{ path: "", message: "must be an object." }];
102
102
  const t = [];
103
103
  e.title !== void 0 && typeof e.title != "string" && t.push({ path: "title", message: "must be a string." });
@@ -105,13 +105,13 @@ function rn(e) {
105
105
  if (!Array.isArray(n))
106
106
  t.push({ path: "cards", message: "must be an array of KPI cards." });
107
107
  else {
108
- (n.length < 1 || n.length > re) && t.push({
108
+ (n.length < 1 || n.length > se) && t.push({
109
109
  path: "cards",
110
- message: `must hold 1 to ${re} KPI cards.`
110
+ message: `must hold 1 to ${se} KPI cards.`
111
111
  });
112
112
  const s = /* @__PURE__ */ new Set();
113
113
  n.forEach((a, i) => {
114
- if (!$(a)) {
114
+ if (!P(a)) {
115
115
  t.push({ path: `cards[${i}]`, message: "must be a card." });
116
116
  return;
117
117
  }
@@ -125,45 +125,45 @@ function rn(e) {
125
125
  });
126
126
  }
127
127
  const r = e.kpi;
128
- return $(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
128
+ return P(r) ? (r.layout !== "tiles" && r.layout !== "lines" ? t.push({
129
129
  path: "kpi.layout",
130
130
  message: "must be 'tiles' or 'lines'."
131
- }) : r.layout === "tiles" && Array.isArray(n) && n.length > se && t.push({
131
+ }) : r.layout === "tiles" && Array.isArray(n) && n.length > ae && t.push({
132
132
  path: "kpi.layout",
133
- message: `must be 'lines' for more than ${se} KPI cards.`
133
+ message: `must be 'lines' for more than ${ae} KPI cards.`
134
134
  }), r.columns !== void 0 && r.columns !== 1 && r.columns !== 2 && t.push({ path: "kpi.columns", message: "must be 1 or 2." })) : t.push({ path: "kpi", message: "must be an object." }), t;
135
135
  }
136
- const Ie = "dashboardInput";
137
- function ae(e) {
136
+ const Se = "dashboardInput";
137
+ function ie(e) {
138
138
  return e === "label" || e === "value" || e === "start" || e === "end" || e === "range";
139
139
  }
140
- function Xe(e) {
140
+ function et(e) {
141
141
  return e === "generatedAt" || e === "pageNumber" || e === "pageCount";
142
142
  }
143
143
  function v(e) {
144
144
  if (!e || typeof e != "object" || Array.isArray(e)) return;
145
145
  const t = e;
146
- if (t.source === "input" || t.source === Ie)
147
- return typeof t.inputId == "string" && ae(t.export) ? { source: "input", inputId: t.inputId, export: t.export } : void 0;
146
+ if (t.source === "input" || t.source === Se)
147
+ return typeof t.inputId == "string" && ie(t.export) ? { source: "input", inputId: t.inputId, export: t.export } : void 0;
148
148
  if (t.source === "dashboardInputAlias")
149
- return typeof t.variableName != "string" || t.export !== void 0 && !ae(t.export) ? void 0 : {
149
+ return typeof t.variableName != "string" || t.export !== void 0 && !ie(t.export) ? void 0 : {
150
150
  source: "dashboardInputAlias",
151
151
  variableName: t.variableName,
152
152
  ...t.export ? { export: t.export } : {}
153
153
  };
154
154
  if (t.source === "documentMeta")
155
- return Xe(t.key) ? { source: "documentMeta", key: t.key } : void 0;
155
+ return et(t.key) ? { source: "documentMeta", key: t.key } : void 0;
156
156
  if (t.source === "data")
157
157
  return typeof t.variableId == "string" && typeof t.export == "string" ? { source: "data", variableId: t.variableId, export: t.export } : void 0;
158
158
  }
159
- function sn(e, t) {
159
+ function on(e, t) {
160
160
  const n = v(e), r = v(t);
161
161
  return !n || !r ? JSON.stringify(e) === JSON.stringify(t) : [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].every((a) => n[a] === r[a]);
162
162
  }
163
- function Ze(e) {
163
+ function tt(e) {
164
164
  return x(e) ? e.type === "variable" ? e.ref === void 0 ? [] : [e.ref] : e.type === "when" && x(e.test) && e.test.ref !== void 0 ? [e.test.ref] : [] : [];
165
165
  }
166
- function et(e, t) {
166
+ function nt(e, t) {
167
167
  if (!x(e)) return e;
168
168
  if (e.type === "variable" && e.ref !== void 0) {
169
169
  const n = t(e.ref);
@@ -178,10 +178,10 @@ function et(e, t) {
178
178
  function x(e) {
179
179
  return !!e && typeof e == "object" && !Array.isArray(e);
180
180
  }
181
- function ie(e) {
182
- return !!e && typeof e == "object" && e.source === Ie;
181
+ function oe(e) {
182
+ return !!e && typeof e == "object" && e.source === Se;
183
183
  }
184
- function an(e) {
184
+ function cn(e) {
185
185
  return U(e);
186
186
  }
187
187
  function U(e) {
@@ -198,15 +198,15 @@ function U(e) {
198
198
  let n;
199
199
  const r = (a, i) => {
200
200
  i !== t[a] && (n ?? (n = { ...t }), n[a] = i);
201
- }, s = et(
201
+ }, s = nt(
202
202
  t,
203
- (a) => ie(a) ? v(a) ?? a : a
203
+ (a) => oe(a) ? v(a) ?? a : a
204
204
  );
205
205
  if (s !== t && (s.ref !== t.ref && r("ref", s.ref), s.test !== t.test && r("test", s.test)), t.inputAliases && typeof t.inputAliases == "object") {
206
206
  const a = t.inputAliases;
207
207
  let i = !1;
208
208
  const o = Object.fromEntries(
209
- Object.entries(a).map(([c, u]) => ie(u) ? (i = !0, [c, v(u) ?? u]) : [c, u])
209
+ Object.entries(a).map(([c, u]) => oe(u) ? (i = !0, [c, v(u) ?? u]) : [c, u])
210
210
  );
211
211
  i && r("inputAliases", o);
212
212
  }
@@ -214,14 +214,14 @@ function U(e) {
214
214
  a === "ref" && t.type === "variable" || a === "test" && t.type === "when" || a === "inputAliases" || r(a, U(i));
215
215
  return n ?? e;
216
216
  }
217
- function on(e) {
217
+ function un(e) {
218
218
  return b(e);
219
219
  }
220
220
  function b(e) {
221
221
  const t = [];
222
222
  for (const n of Array.isArray(e) ? e : [])
223
223
  if (!(!n || typeof n != "object")) {
224
- for (const r of Ze(n)) {
224
+ for (const r of tt(n)) {
225
225
  const s = v(r);
226
226
  s && t.push(s);
227
227
  }
@@ -229,14 +229,14 @@ function b(e) {
229
229
  }
230
230
  return t;
231
231
  }
232
- function tt(e) {
232
+ function rt(e) {
233
233
  var r;
234
234
  const t = (r = e.preferences) == null ? void 0 : r.textVisualOptions, n = t == null ? void 0 : t.richContent;
235
235
  return n && Array.isArray(n.blocks) ? n.blocks.flatMap(
236
236
  (s) => (s == null ? void 0 : s.type) === "list" ? (Array.isArray(s.items) ? s.items : []).flatMap((a) => b(a)) : b(s == null ? void 0 : s.children)
237
237
  ) : b(t == null ? void 0 : t.content);
238
238
  }
239
- function be(e, t) {
239
+ function Ce(e, t) {
240
240
  var s;
241
241
  const n = [], r = { kind: "document", sheetId: e };
242
242
  for (const a of ["header", "footer"])
@@ -250,45 +250,45 @@ function be(e, t) {
250
250
  n.push({ ref: i, place: r, where: { kind: "section", sectionId: a.id } });
251
251
  return n;
252
252
  }
253
- const oe = /* @__PURE__ */ new WeakMap();
254
- function Se(e) {
255
- const t = oe.get(e);
253
+ const ce = /* @__PURE__ */ new WeakMap();
254
+ function ge(e) {
255
+ const t = ce.get(e);
256
256
  if (t) return t;
257
257
  const n = [];
258
258
  for (const r of e.sheets ?? []) {
259
259
  if (r.kind === "document") {
260
- r.document && n.push(...be(r.id, r.document));
260
+ r.document && n.push(...Ce(r.id, r.document));
261
261
  continue;
262
262
  }
263
263
  const s = { kind: "sheet", sheetId: r.id }, a = [...r.cards ?? [], ...(r.frames ?? []).flatMap((i) => i.cards ?? [])];
264
264
  for (const i of a)
265
265
  if (i.type === "text")
266
- for (const o of tt(i))
266
+ for (const o of rt(i))
267
267
  n.push({ ref: o, place: s, where: { kind: "card", cardId: i.id } });
268
268
  }
269
- return oe.set(e, n), n;
269
+ return ce.set(e, n), n;
270
270
  }
271
- function Ce(e, t) {
271
+ function ke(e, t) {
272
272
  return e.kind === t.kind && e.sheetId === t.sheetId;
273
273
  }
274
- function ge(e, t) {
275
- const n = Se(e);
276
- return t ? n.filter((r) => Ce(r.place, t)) : [...n];
274
+ function we(e, t) {
275
+ const n = ge(e);
276
+ return t ? n.filter((r) => ke(r.place, t)) : [...n];
277
277
  }
278
- function nt(e, t) {
278
+ function st(e, t) {
279
279
  const n = [];
280
- for (const { ref: r, place: s } of Se(e))
281
- r.source !== "data" || r.variableId !== t || n.some((a) => Ce(a, s)) || n.push(s);
280
+ for (const { ref: r, place: s } of ge(e))
281
+ r.source !== "data" || r.variableId !== t || n.some((a) => ke(a, s)) || n.push(s);
282
282
  return n;
283
283
  }
284
- function cn(e, t) {
284
+ function dn(e, t) {
285
285
  const n = /* @__PURE__ */ new Set();
286
- for (const { ref: r } of ge(e, t))
286
+ for (const { ref: r } of we(e, t))
287
287
  r.source === "data" && n.add(r.variableId);
288
288
  return [...n];
289
289
  }
290
- function un(e, t) {
291
- const n = be("", e).filter(
290
+ function ln(e, t) {
291
+ const n = Ce("", e).filter(
292
292
  ({ ref: r }) => r.source === "input" && r.inputId === t
293
293
  );
294
294
  return {
@@ -299,24 +299,24 @@ function un(e, t) {
299
299
  ).size
300
300
  };
301
301
  }
302
- function ke(e, t) {
303
- const n = nt(e, t);
302
+ function Ae(e, t) {
303
+ const n = st(e, t);
304
304
  return n.length ? n.map((r) => ({
305
305
  sheetId: r.sheetId,
306
306
  cardId: t,
307
307
  sheetKind: r.kind === "document" ? "document" : "dashboard"
308
308
  })) : (e.sheets ?? []).filter((r) => r.kind !== "document").map((r) => ({ sheetId: r.id, cardId: t, sheetKind: "dashboard" }));
309
309
  }
310
- function C(e, t) {
310
+ function g(e, t) {
311
311
  var r;
312
- if (!it(e, t))
312
+ if (!ct(e, t))
313
313
  return !1;
314
314
  const n = e.scope;
315
315
  switch (n.kind) {
316
316
  case "allSheets":
317
- return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !at(n.exceptSheetIds, t) && !de(n.exceptCardIds, t);
317
+ return ((r = n.sheetKinds) != null && r.length ? t.sheetKind ? n.sheetKinds.includes(t.sheetKind) : !1 : !!t.sheetId || !!t.cardId) && !ot(n.exceptSheetIds, t) && !le(n.exceptCardIds, t);
318
318
  case "sheets":
319
- return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !de(n.exceptCardIds, t);
319
+ return !!t.sheetId && n.sheetIds.includes(t.sheetId) && !le(n.exceptCardIds, t);
320
320
  case "cards":
321
321
  return !!t.cardId && n.cardIds.includes(t.cardId);
322
322
  case "documentSections":
@@ -325,8 +325,8 @@ function C(e, t) {
325
325
  return !1;
326
326
  }
327
327
  }
328
- function dn(e, t) {
329
- if (C(e, {
328
+ function fn(e, t) {
329
+ if (g(e, {
330
330
  sheetId: t.sheetId,
331
331
  sheetKind: t.sheetKind
332
332
  }))
@@ -334,7 +334,7 @@ function dn(e, t) {
334
334
  switch (e.scope.kind) {
335
335
  case "cards":
336
336
  for (const n of [...t.cardIds, ...t.variableIds ?? []])
337
- if (C(e, {
337
+ if (g(e, {
338
338
  sheetId: t.sheetId,
339
339
  cardId: n,
340
340
  sheetKind: t.sheetKind
@@ -347,17 +347,17 @@ function dn(e, t) {
347
347
  return !1;
348
348
  }
349
349
  }
350
- const ce = /* @__PURE__ */ new WeakMap();
351
- function rt(e) {
352
- const t = ce.get(e);
350
+ const ue = /* @__PURE__ */ new WeakMap();
351
+ function at(e) {
352
+ const t = ue.get(e);
353
353
  if (t) return t;
354
354
  const n = /* @__PURE__ */ new Map();
355
- for (const a of _(e)) {
355
+ for (const a of F(e)) {
356
356
  const i = n.get(a.sheetId) ?? /* @__PURE__ */ new Set();
357
357
  i.add(a.cardId), n.set(a.sheetId, i);
358
358
  }
359
359
  const r = /* @__PURE__ */ new Map();
360
- for (const { ref: a, place: i } of ge(e)) {
360
+ for (const { ref: a, place: i } of we(e)) {
361
361
  if (a.source !== "data") continue;
362
362
  const o = r.get(i.sheetId) ?? /* @__PURE__ */ new Set();
363
363
  o.add(a.variableId), r.set(i.sheetId, o);
@@ -370,48 +370,48 @@ function rt(e) {
370
370
  cardIds: n.get(a.id) ?? /* @__PURE__ */ new Set(),
371
371
  variableIds: r.get(a.id) ?? /* @__PURE__ */ new Set()
372
372
  });
373
- return ce.set(e, s), s;
373
+ return ue.set(e, s), s;
374
374
  }
375
- function ln(e, t) {
375
+ function mn(e, t) {
376
376
  var s, a;
377
- const n = /* @__PURE__ */ new Set(), r = rt(e);
377
+ const n = /* @__PURE__ */ new Set(), r = at(e);
378
378
  for (const i of r.values())
379
- C(t, {
379
+ g(t, {
380
380
  sheetId: i.sheetId,
381
381
  sheetKind: i.sheetKind
382
382
  }) && n.add(`sheet:${i.sheetId}`);
383
- for (const i of _(e))
384
- C(t, {
383
+ for (const i of F(e))
384
+ g(t, {
385
385
  sheetId: i.sheetId,
386
386
  cardId: i.cardId,
387
387
  ...i.kind === "documentSectionCard" ? { sectionId: i.sectionId } : {},
388
388
  sheetKind: ((s = r.get(i.sheetId)) == null ? void 0 : s.sheetKind) ?? "dashboard"
389
389
  }) && n.add(`card:${i.cardId}`);
390
390
  for (const i of e.variables ?? [])
391
- ke(e, i.id).some(
392
- (o) => C(t, o)
391
+ Ae(e, i.id).some(
392
+ (o) => g(t, o)
393
393
  ) && n.add(`card:${i.id}`);
394
394
  for (const i of e.sheets ?? [])
395
395
  if (i.kind === "document")
396
396
  for (const o of ((a = i.document) == null ? void 0 : a.sections) ?? [])
397
- C(t, {
397
+ g(t, {
398
398
  sheetId: i.id,
399
399
  sectionId: o.id,
400
400
  sheetKind: "document"
401
401
  }) && n.add(`section:${o.id}`);
402
402
  return n;
403
403
  }
404
- function fn(e) {
404
+ function pn(e) {
405
405
  return e.kind === "filter" && e.scope.kind === "cards";
406
406
  }
407
- function mn(e, t) {
407
+ function hn(e, t) {
408
408
  var a, i, o;
409
409
  const n = (c) => {
410
410
  var u, d;
411
- return ue(c, t.removedSheetIds, t.renamedSheetIds, !1, (u = t.copiedTab) == null ? void 0 : u.sheetIds, (d = t.copiedTab) == null ? void 0 : d.mode);
411
+ return de(c, t.removedSheetIds, t.renamedSheetIds, !1, (u = t.copiedTab) == null ? void 0 : u.sheetIds, (d = t.copiedTab) == null ? void 0 : d.mode);
412
412
  }, r = (c) => {
413
413
  var u, d;
414
- return ue(
414
+ return de(
415
415
  c,
416
416
  t.removedCardIds,
417
417
  t.renamedCardIds,
@@ -459,25 +459,25 @@ function mn(e, t) {
459
459
  default:
460
460
  return e;
461
461
  }
462
- return st(e, s) ? e : s;
462
+ return it(e, s) ? e : s;
463
463
  }
464
- function ue(e, t, n, r, s, a) {
464
+ function de(e, t, n, r, s, a) {
465
465
  let i = e;
466
466
  return t != null && t.size && (i = i.filter((o) => !t.has(o))), r && (i = i.filter((o) => n == null ? void 0 : n.has(o))), n != null && n.size && (i = i.map((o) => n.get(o) ?? o)), s != null && s.size && (i = a === "extend" ? [.../* @__PURE__ */ new Set([...i, ...i.flatMap((o) => s.has(o) ? [s.get(o)] : [])])] : i.map((o) => s.get(o) ?? o)), i;
467
467
  }
468
- function st(e, t) {
468
+ function it(e, t) {
469
469
  return JSON.stringify(e) === JSON.stringify(t);
470
470
  }
471
- function at(e, t) {
471
+ function ot(e, t) {
472
472
  return !!t.sheetId && !!(e != null && e.includes(t.sheetId));
473
473
  }
474
- function de(e, t) {
474
+ function le(e, t) {
475
475
  return !!t.cardId && !!(e != null && e.includes(t.cardId));
476
476
  }
477
- function it(e, t) {
477
+ function ct(e, t) {
478
478
  return t.sheetKind !== "document" || !e.compatibility || e.compatibility.source === "documentInput" ? !0 : e.compatibility.source === "cardInlineFilter" || e.compatibility.source === "cardControl" ? !!t.cardId && e.compatibility.cardId === t.cardId : !1;
479
479
  }
480
- function pn(e, t, n) {
480
+ function yn(e, t, n) {
481
481
  switch (e.kind) {
482
482
  case "sheets":
483
483
  return e.sheetIds.length > 0 && e.sheetIds.every((r) => r === t);
@@ -489,25 +489,25 @@ function pn(e, t, n) {
489
489
  return !1;
490
490
  }
491
491
  }
492
- function hn(e) {
492
+ function In(e) {
493
493
  return e.kind === "sheets" && e.sheetIds.length === 0 || e.kind === "cards" && e.cardIds.length === 0;
494
494
  }
495
- function ot(e) {
495
+ function ut(e) {
496
496
  return e.kind === "allSheets" || e.kind === "sheets" ? e.exceptCardIds ?? [] : [];
497
497
  }
498
- function yn(e) {
498
+ function bn(e) {
499
499
  return e.kind === "allSheets" ? e.exceptSheetIds ?? [] : [];
500
500
  }
501
- function In(e, t) {
501
+ function Sn(e, t) {
502
502
  var a;
503
503
  if (e.kind !== "allSheets" && e.kind !== "sheets" || !((a = e.exceptCardIds) != null && a.includes(t))) return e;
504
504
  const n = e.exceptCardIds.filter((i) => i !== t), { exceptCardIds: r, ...s } = e;
505
505
  return n.length ? { ...s, exceptCardIds: n } : s;
506
506
  }
507
- function bn(e, t, n) {
507
+ function Cn(e, t, n) {
508
508
  var o;
509
509
  if (t.kind !== "allSheets" && t.kind !== "sheets") return t;
510
- const r = ot(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && le(e) ? [...n].filter((c) => {
510
+ const r = ut(e), s = e.kind === "sheets" ? e.sheetIds.filter((c) => n.has(c)) : e.kind === "allSheets" && fe(e) ? [...n].filter((c) => {
511
511
  var u;
512
512
  return !((u = e.exceptSheetIds) != null && u.includes(c));
513
513
  }) : [], a = [...n].filter((c) => !s.includes(c));
@@ -520,7 +520,7 @@ function bn(e, t, n) {
520
520
  const i = e.kind === "allSheets" ? ((o = e.exceptSheetIds) == null ? void 0 : o.filter((c) => n.has(c))) ?? [] : [];
521
521
  return {
522
522
  kind: "allSheets",
523
- ...e.kind === "allSheets" && le(e) ? {
523
+ ...e.kind === "allSheets" && fe(e) ? {
524
524
  ...e.sheetKinds ? { sheetKinds: e.sheetKinds } : {},
525
525
  ...i.length ? { exceptSheetIds: i } : {}
526
526
  } : s.length ? {
@@ -530,11 +530,11 @@ function bn(e, t, n) {
530
530
  ...r.length ? { exceptCardIds: [...r] } : {}
531
531
  };
532
532
  }
533
- function le(e) {
533
+ function fe(e) {
534
534
  var t;
535
535
  return e.kind === "allSheets" && (!((t = e.sheetKinds) != null && t.length) || e.sheetKinds.includes("document"));
536
536
  }
537
- function Sn(e, t) {
537
+ function gn(e, t) {
538
538
  switch (e.kind) {
539
539
  case "allSheets":
540
540
  case "sheets": {
@@ -547,32 +547,32 @@ function Sn(e, t) {
547
547
  return;
548
548
  }
549
549
  }
550
- const ct = 6;
551
- function Cn(e) {
550
+ const dt = 6;
551
+ function kn(e) {
552
552
  if (!(e === void 0 || !Number.isFinite(e)) && Number.isInteger(e))
553
- return Math.max(0, Math.min(ct, e));
553
+ return Math.max(0, Math.min(dt, e));
554
554
  }
555
- function we(e) {
555
+ function ve(e) {
556
556
  var t;
557
- return ((t = e == null ? void 0 : e.comparison) == null ? void 0 : t.mode) === "explicit" ? e.comparison.spec : void 0;
557
+ return ((t = e == null ? void 0 : e.comparison) == null ? void 0 : t.mode) === "explicit" ? be(e.comparison.spec) : void 0;
558
558
  }
559
- function ut(e) {
560
- var t;
561
- return ((t = we(e)) == null ? void 0 : t.kind) || "none";
559
+ function lt(e) {
560
+ const t = ve(e);
561
+ return t ? ze(t) : "none";
562
562
  }
563
- function gn(e) {
564
- const t = we(e);
563
+ function wn(e) {
564
+ const t = ve(e);
565
565
  return (t == null ? void 0 : t.kind) === "target" ? t.targetValue : void 0;
566
566
  }
567
- function kn(e) {
568
- return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || Ue;
567
+ function An(e) {
568
+ return (e == null ? void 0 : e.semanticComparisonPolarity) || (e == null ? void 0 : e.comparisonPolarity) || We;
569
569
  }
570
- function J(e, t) {
570
+ function H(e, t) {
571
571
  const n = Object.entries(e || {}).filter(
572
572
  ([a, i]) => i.output.outputId === a
573
573
  );
574
574
  if (!t.name) return;
575
- const r = j({
575
+ const r = B({
576
576
  ...t,
577
577
  name: t.name
578
578
  }), s = n.filter(
@@ -580,17 +580,17 @@ function J(e, t) {
580
580
  );
581
581
  return s.length === 1 ? s[0][1] : void 0;
582
582
  }
583
- function wn(e, t) {
584
- const n = J(e, t);
583
+ function vn(e, t) {
584
+ const n = H(e, t);
585
585
  return {
586
- comparisonKind: (n == null ? void 0 : n.type) ?? ut(t),
586
+ comparisonKind: (n == null ? void 0 : n.type) ?? lt(t),
587
587
  metadata: n
588
588
  };
589
589
  }
590
- function An(e) {
591
- return (e == null ? void 0 : e.showComparison) ?? ze.showComparison;
590
+ function Tn(e) {
591
+ return (e == null ? void 0 : e.showComparison) ?? Qe.showComparison;
592
592
  }
593
- function vn(e) {
593
+ function En(e) {
594
594
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
595
595
  return Object.entries(e || {}).forEach(([c, u]) => {
596
596
  const d = u.output;
@@ -611,14 +611,14 @@ function vn(e) {
611
611
  comparisonSeriesLabels: o
612
612
  };
613
613
  }
614
- const dt = "SEMAPHOR_CALCULATED_FIELD";
615
- function H(e, t, n) {
614
+ const ft = "SEMAPHOR_CALCULATED_FIELD";
615
+ function X(e, t, n) {
616
616
  if (n && (t === "groupby" || t === "pivotby"))
617
617
  return n;
618
618
  if (t === "metric" && e.name === "*" && !e.expression)
619
619
  return e.alias || "count";
620
620
  if (e.alias) return e.alias;
621
- const r = e.entityName && e.entityName !== dt ? e.entityName : void 0;
621
+ const r = e.entityName && e.entityName !== ft ? e.entityName : void 0;
622
622
  if (e.role === "metric") {
623
623
  let s = e.aggregate || "metric";
624
624
  if (e.expression) {
@@ -632,23 +632,23 @@ function H(e, t, n) {
632
632
  }
633
633
  return r && r !== e.name ? `${r}_${e.name}` : e.name;
634
634
  }
635
- function Ae(e) {
636
- return H(e, "detail");
635
+ function Te(e) {
636
+ return X(e, "detail");
637
637
  }
638
- function lt(e) {
638
+ function mt(e) {
639
639
  const t = e.label;
640
640
  return t && e.labelCount === 1 && (t === e.rawKey || !e.rawKeys.has(t)) ? t : e.rawKey;
641
641
  }
642
- function Tn(e) {
642
+ function Kn(e) {
643
643
  const t = [
644
644
  ...(e.groupByColumns ?? []).map((o) => ({ field: o, role: "groupby" })),
645
645
  ...(e.metricColumns ?? []).map((o) => ({ field: o, role: "metric" })),
646
646
  ...(e.pivotByColumns ?? []).map((o) => ({ field: o, role: "pivotby" })),
647
647
  ...(e.detailColumns ?? []).map((o) => ({ field: o, role: "detail" }))
648
- ], n = ve(e.detailColumns ?? []), r = new Map((e.detailColumns ?? []).map((o, c) => [o, c])), s = new Map(
648
+ ], n = Ee(e.detailColumns ?? []), r = new Map((e.detailColumns ?? []).map((o, c) => [o, c])), s = new Map(
649
649
  t.map(({ field: o, role: c }) => [
650
650
  o,
651
- c === "detail" ? n[r.get(o)] : H(o, c)
651
+ c === "detail" ? n[r.get(o)] : X(o, c)
652
652
  ])
653
653
  ), a = new Set(s.values()), i = /* @__PURE__ */ new Map();
654
654
  for (const { field: o } of t)
@@ -656,7 +656,7 @@ function Tn(e) {
656
656
  return new Map(
657
657
  t.map(({ field: o }) => [
658
658
  o,
659
- lt({
659
+ mt({
660
660
  label: o.label,
661
661
  labelCount: o.label ? i.get(o.label) ?? 0 : 0,
662
662
  rawKey: s.get(o),
@@ -665,8 +665,8 @@ function Tn(e) {
665
665
  ])
666
666
  );
667
667
  }
668
- function ve(e) {
669
- const t = e.map((s) => Ae(s)), n = new Set(t), r = /* @__PURE__ */ new Map();
668
+ function Ee(e) {
669
+ const t = e.map((s) => Te(s)), n = new Set(t), r = /* @__PURE__ */ new Map();
670
670
  return t.forEach((s, a) => {
671
671
  r.has(s) || r.set(s, a);
672
672
  }), t.map((s, a) => {
@@ -676,76 +676,76 @@ function ve(e) {
676
676
  return n.add(`${s}_${i}`), `${s}_${i}`;
677
677
  });
678
678
  }
679
- function En(e) {
679
+ function Nn(e) {
680
680
  const t = e.detailColumns;
681
681
  if (!t || t.length < 2) return e;
682
- const n = ve(t);
682
+ const n = Ee(t);
683
683
  let r = !1;
684
- const s = t.map((a, i) => Ae(a) === n[i] ? a : (r = !0, { ...a, alias: n[i] }));
684
+ const s = t.map((a, i) => Te(a) === n[i] ? a : (r = !0, { ...a, alias: n[i] }));
685
685
  return r ? { ...e, detailColumns: s } : e;
686
686
  }
687
- const Te = "text", M = 100, ft = 10, S = "value", Ee = ["previous", "change", "percentChange"];
688
- function mt(e) {
689
- return Ee.includes(e);
687
+ const Ke = "text", R = 100, pt = 10, S = "value", Ne = ["previous", "change", "percentChange"];
688
+ function ht(e) {
689
+ return Ne.includes(e);
690
690
  }
691
- const pt = ["up", "down", "flat"];
692
- function Kn(e, t, n) {
691
+ const yt = ["up", "down", "flat"];
692
+ function On(e, t, n) {
693
693
  const { signWords: r, absolute: s, percent: a, ...i } = t ?? {};
694
694
  return e !== "change" && e !== "percentChange" ? i : {
695
695
  ...i,
696
- ...(n == null ? void 0 : n.signWords) === void 0 ? { signWords: pt } : {},
696
+ ...(n == null ? void 0 : n.signWords) === void 0 ? { signWords: yt } : {},
697
697
  ...(n == null ? void 0 : n.absolute) === void 0 ? { absolute: !0 } : {},
698
698
  ...e === "percentChange" && (n == null ? void 0 : n.percent) === void 0 ? { percent: !0 } : {}
699
699
  };
700
700
  }
701
- function X(e) {
701
+ function Z(e) {
702
702
  var r, s, a, i;
703
703
  if (e.get.kind !== "aggregate" || (r = e.query.sql) != null && r.trim()) return;
704
704
  const t = (i = (a = (s = e.query.config) == null ? void 0 : s.metricColumns) == null ? void 0 : a[0]) == null ? void 0 : i.comparison;
705
705
  if ((t == null ? void 0 : t.mode) !== "explicit") return;
706
- const n = t.spec;
707
- return n.kind === "previous_period" || n.kind === "previous_year" ? n : void 0;
706
+ const n = be(t.spec);
707
+ return n.kind === "shift" ? n : void 0;
708
708
  }
709
- function fe(e, t) {
709
+ function me(e, t) {
710
710
  if (t === "preview" && e.get.kind !== "aggregate")
711
- return M + 1;
711
+ return R + 1;
712
712
  switch (e.get.kind) {
713
713
  case "only":
714
714
  return 2;
715
715
  case "list":
716
- return M + 1;
716
+ return R + 1;
717
717
  default:
718
718
  return 1;
719
719
  }
720
720
  }
721
- const me = {
721
+ const pe = {
722
722
  answer: /* @__PURE__ */ new WeakMap(),
723
723
  preview: /* @__PURE__ */ new WeakMap()
724
724
  };
725
- function ht(e, t = "answer") {
725
+ function It(e, t = "answer") {
726
726
  var a;
727
- const n = me[t].get(e);
727
+ const n = pe[t].get(e);
728
728
  if (n) return n;
729
729
  const { query: r } = e, s = {
730
730
  id: e.id,
731
731
  title: e.name,
732
- type: Te,
732
+ type: Ke,
733
733
  respondsToSelections: !1,
734
- dataVariableId: e.id,
735
734
  // The viewer's dashboard comparison never changes a variable: its own
736
- // measure says whether it compares (P3b-03).
737
- preferences: { inheritGlobalComparison: !1 },
735
+ // measure says whether it compares (P3b-03); the request builder gives a
736
+ // variable no Date filter comparison (compare-with CW-D22).
737
+ dataVariableId: e.id,
738
738
  ...r.connectionId ? { connectionId: r.connectionId } : {},
739
739
  ...r.dataSource ? { dataSource: r.dataSource } : {},
740
740
  ...r.calculatedFields ? { calculatedFields: r.calculatedFields } : {},
741
- ...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit: fe(e, t) } } : { config: { ...r.config, rowLimit: fe(e, t) } }
741
+ ...(a = r.sql) != null && a.trim() ? { sql: r.sql, config: { rowLimit: me(e, t) } } : { config: { ...r.config, rowLimit: me(e, t) } }
742
742
  };
743
- return me[t].set(e, s), s;
743
+ return pe[t].set(e, s), s;
744
744
  }
745
745
  function Dn(e) {
746
- return e.type === Te && typeof e.dataVariableId == "string" && e.dataVariableId.length > 0;
746
+ return e.type === Ke && typeof e.dataVariableId == "string" && e.dataVariableId.length > 0;
747
747
  }
748
- function Nn(e, t, n) {
748
+ function Mn(e, t, n) {
749
749
  var r;
750
750
  if (n === S && ((r = e.query.sql) != null && r.trim())) {
751
751
  const s = Object.keys(t)[0];
@@ -754,78 +754,78 @@ function Nn(e, t, n) {
754
754
  return n in t ? t[n] : void 0;
755
755
  }
756
756
  function z(e) {
757
- const t = Y(e);
757
+ const t = J(e);
758
758
  return t === "string" || t === "unknown" ? "text" : t;
759
759
  }
760
- function yt(e) {
760
+ function bt(e) {
761
761
  return typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : "text";
762
762
  }
763
- function It(e, t, n, r) {
763
+ function St(e, t, n, r) {
764
764
  var i, o;
765
- const s = Ge(r, e.id, t);
765
+ const s = Je(r, e.id, t);
766
766
  return [
767
767
  s == null ? void 0 : s.outputKey,
768
768
  s == null ? void 0 : s.rawKey,
769
- t === "metric" ? ((o = (i = r == null ? void 0 : r.byMetricAlias) == null ? void 0 : i[j(e)]) == null ? void 0 : o.outputKey) ?? j(e) : void 0,
770
- H(e, t === "metric" ? "metric" : "groupby"),
769
+ t === "metric" ? ((o = (i = r == null ? void 0 : r.byMetricAlias) == null ? void 0 : i[B(e)]) == null ? void 0 : o.outputKey) ?? B(e) : void 0,
770
+ X(e, t === "metric" ? "metric" : "groupby"),
771
771
  e.label,
772
772
  e.name
773
773
  ].find((c) => !!c && n.has(c));
774
774
  }
775
- function On(e, t) {
775
+ function xn(e, t) {
776
776
  var r;
777
777
  if (e.get.kind === "aggregate")
778
- return X(e) ? [S, ...Ee] : [S];
778
+ return Z(e) ? [S, ...Ne] : [S];
779
779
  if (e.get.kind === "list") return [S];
780
780
  if ((r = e.query.sql) != null && r.trim()) return [...t ?? []];
781
781
  const n = e.query.config;
782
- return bt([
782
+ return Ct([
783
783
  ...((n == null ? void 0 : n.groupByColumns) ?? []).map((s) => s.name),
784
784
  ...((n == null ? void 0 : n.metricColumns) ?? []).map((s) => s.name)
785
785
  ]);
786
786
  }
787
- function xn(e, t) {
787
+ function Rn(e, t) {
788
788
  var a, i, o, c;
789
789
  if (e.get.kind === "list") return "list";
790
790
  if ((a = e.query.sql) != null && a.trim()) return;
791
791
  const n = e.query.config, r = (u, d) => {
792
792
  if (!u) return;
793
- const f = d === "metric" ? B(u) : u.dataType;
794
- return Y(f) === "unknown" ? void 0 : z(f);
793
+ const m = d === "metric" ? j(u) : u.dataType;
794
+ return J(m) === "unknown" ? void 0 : z(m);
795
795
  };
796
796
  if (e.get.kind === "aggregate")
797
- return mt(t) && X(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
797
+ return ht(t) && Z(e) ? "number" : t === S ? r((i = n == null ? void 0 : n.metricColumns) == null ? void 0 : i[0], "metric") : void 0;
798
798
  const s = (o = n == null ? void 0 : n.groupByColumns) == null ? void 0 : o.find((u) => u.name === t);
799
799
  return s ? r(s, "groupby") : r((c = n == null ? void 0 : n.metricColumns) == null ? void 0 : c.find((u) => u.name === t), "metric");
800
800
  }
801
- function bt(e) {
801
+ function Ct(e) {
802
802
  return [...new Set(e)];
803
803
  }
804
- function St(e, t, n) {
805
- var p, I, g;
804
+ function gt(e, t, n) {
805
+ var l, h, C;
806
806
  const r = t[0] ?? {}, s = new Set(
807
- (p = n.columns) != null && p.length ? n.columns.map((m) => m.key) : Object.keys(r)
807
+ (l = n.columns) != null && l.length ? n.columns.map((p) => p.key) : Object.keys(r)
808
808
  ), a = new Map(
809
- (n.columns ?? []).map((m) => [m.key, m.dataType])
810
- ), i = (m, k) => a.has(m) ? z(a.get(m)) : k !== void 0 ? z(k) : yt(r[m]);
811
- if ((I = e.query.sql) != null && I.trim())
812
- return [...s].map((m) => ({ part: m, key: m, type: i(m, void 0) }));
813
- const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", f = (m, k, ne) => {
814
- if (c.some(($e) => $e.part === ne)) return;
815
- const K = It(m, k, s, n.columnKeyMap) ?? (d ? u : void 0);
809
+ (n.columns ?? []).map((p) => [p.key, p.dataType])
810
+ ), i = (p, k) => a.has(p) ? z(a.get(p)) : k !== void 0 ? z(k) : bt(r[p]);
811
+ if ((h = e.query.sql) != null && h.trim())
812
+ return [...s].map((p) => ({ part: p, key: p, type: i(p, void 0) }));
813
+ const o = e.query.config ?? {}, c = [], u = s.size === 1 ? [...s][0] : void 0, d = e.get.kind === "aggregate" || e.get.kind === "list", m = (p, k, re) => {
814
+ if (c.some((Pe) => Pe.part === re)) return;
815
+ const K = St(p, k, s, n.columnKeyMap) ?? (d ? u : void 0);
816
816
  if (!K) return;
817
- const Ve = k === "metric" ? i(K, B(m)) : i(K, m.dataType);
818
- c.push({ part: ne, key: K, type: Ve });
819
- }, y = o.metricColumns ?? [];
817
+ const $e = k === "metric" ? i(K, j(p)) : i(K, p.dataType);
818
+ c.push({ part: re, key: K, type: $e });
819
+ }, I = o.metricColumns ?? [];
820
820
  if (e.get.kind === "aggregate") {
821
- const m = y[0] ? (g = J(n.comparisonMetadata, y[0])) == null ? void 0 : g.output.currentColumnKey : void 0;
822
- return m && s.has(m) ? c.push({ part: S, key: m, type: i(m, B(y[0])) }) : y[0] && f(y[0], "metric", S), c;
821
+ const p = I[0] ? (C = H(n.comparisonMetadata, I[0])) == null ? void 0 : C.output.currentColumnKey : void 0;
822
+ return p && s.has(p) ? c.push({ part: S, key: p, type: i(p, j(I[0])) }) : I[0] && m(I[0], "metric", S), c;
823
823
  }
824
- const h = o.groupByColumns ?? [];
824
+ const y = o.groupByColumns ?? [];
825
825
  if (e.get.kind === "list")
826
- return h[0] && f(h[0], "groupby", S), c;
827
- for (const m of h) f(m, "groupby", m.name);
828
- for (const m of y) f(m, "metric", m.name);
826
+ return y[0] && m(y[0], "groupby", S), c;
827
+ for (const p of y) m(p, "groupby", p.name);
828
+ for (const p of I) m(p, "metric", p.name);
829
829
  return c;
830
830
  }
831
831
  function W(e, t) {
@@ -834,9 +834,9 @@ function W(e, t) {
834
834
  function w(e) {
835
835
  return !!e && typeof e == "object" && !Array.isArray(e);
836
836
  }
837
- function Mn(e) {
837
+ function _n(e) {
838
838
  if (!w(e)) return {};
839
- const t = w(e.data) ? e.data : e, n = N(e).length ? N(e) : N(t), r = w(t.metadata) ? t.metadata : void 0;
839
+ const t = w(e.data) ? e.data : e, n = D(e).length ? D(e) : D(t), r = w(t.metadata) ? t.metadata : void 0;
840
840
  return {
841
841
  ...t.records !== void 0 ? { records: t.records } : {},
842
842
  ...Array.isArray(t.columns) ? { columns: t.columns } : {},
@@ -846,21 +846,21 @@ function Mn(e) {
846
846
  ...typeof t.error == "string" && t.error ? { error: t.error } : {}
847
847
  };
848
848
  }
849
- function Rn(e, t, n = "answer") {
849
+ function Fn(e, t, n = "answer") {
850
850
  var d;
851
851
  const r = (Array.isArray(t.records) ? t.records : []).filter(
852
- (f) => !!f && typeof f == "object"
853
- ), s = N(t), a = n === "preview" ? { matched: r.length > M ? "beyondCap" : r.length } : {};
852
+ (m) => !!m && typeof m == "object"
853
+ ), s = D(t), a = n === "preview" ? { matched: r.length > R ? "beyondCap" : r.length } : {};
854
854
  if (!r.length) return { status: "none", why: "noRows", filterReach: s, ...a };
855
- const i = St(e, r, t);
855
+ const i = gt(e, r, t);
856
856
  if (e.get.kind === "list") {
857
- const f = i[0], y = r.length > M, h = f ? r.map((I) => W(I[f.key], f.type)).filter((I) => I.value !== null) : [];
858
- if (!h.length && !y) return { status: "none", why: "noRows", filterReach: s, ...a };
859
- const p = Math.max(1, e.get.limit ?? ft);
857
+ const m = i[0], I = r.length > R, y = m ? r.map((h) => W(h[m.key], m.type)).filter((h) => h.value !== null) : [];
858
+ if (!y.length && !I) return { status: "none", why: "noRows", filterReach: s, ...a };
859
+ const l = Math.max(1, e.get.limit ?? pt);
860
860
  return {
861
861
  status: "listed",
862
- items: h.slice(0, p),
863
- more: y ? "beyondCap" : Math.max(0, h.length - p),
862
+ items: y.slice(0, l),
863
+ more: I ? "beyondCap" : Math.max(0, y.length - l),
864
864
  filterReach: s,
865
865
  ...a
866
866
  };
@@ -868,11 +868,11 @@ function Rn(e, t, n = "answer") {
868
868
  if (e.get.kind === "only" && r.length > 1)
869
869
  return { status: "none", why: "moreThanOne", filterReach: s, ...a };
870
870
  const o = r[0], c = Object.fromEntries(
871
- i.map((f) => [f.part, W(o[f.key], f.type)])
871
+ i.map((m) => [m.part, W(o[m.key], m.type)])
872
872
  );
873
873
  if (e.get.kind === "aggregate" && ((d = c[S]) == null ? void 0 : d.value) == null)
874
874
  return { status: "none", why: "noRows", filterReach: s, ...a };
875
- const u = X(e) ? Ct(e, o, t) : void 0;
875
+ const u = Z(e) ? kt(e, o, t) : void 0;
876
876
  return {
877
877
  status: "answered",
878
878
  parts: u && "parts" in u ? { ...c, ...u.parts } : c,
@@ -881,14 +881,14 @@ function Rn(e, t, n = "answer") {
881
881
  ...a
882
882
  };
883
883
  }
884
- function Ct(e, t, n) {
884
+ function kt(e, t, n) {
885
885
  var o, c;
886
- const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ? J(n.comparisonMetadata, r) : void 0, a = s == null ? void 0 : s.output;
886
+ const r = (c = (o = e.query.config) == null ? void 0 : o.metricColumns) == null ? void 0 : c[0], s = r ? H(n.comparisonMetadata, r) : void 0, a = s == null ? void 0 : s.output;
887
887
  if (!a || a.availability.status !== "available" || !a.comparisonColumnKey)
888
888
  return { unavailable: (a == null ? void 0 : a.availability.status) === "unavailable" ? a.availability.reason : "temporal_binding_missing" };
889
889
  const i = (u) => {
890
- const d = t[u], f = typeof d == "string" && d.trim() !== "" ? Number(d) : d;
891
- return W(typeof f == "number" && !Number.isFinite(f) ? null : f, "number");
890
+ const d = t[u], m = typeof d == "string" && d.trim() !== "" ? Number(d) : d;
891
+ return W(typeof m == "number" && !Number.isFinite(m) ? null : m, "number");
892
892
  };
893
893
  return {
894
894
  parts: {
@@ -898,16 +898,16 @@ function Ct(e, t, n) {
898
898
  }
899
899
  };
900
900
  }
901
- const pe = /* @__PURE__ */ new WeakMap();
902
- function Z(e) {
903
- const t = pe.get(e);
901
+ const he = /* @__PURE__ */ new WeakMap();
902
+ function ee(e) {
903
+ const t = he.get(e);
904
904
  if (t) return t;
905
905
  const n = new Map(
906
906
  (e.sheets ?? []).map(
907
907
  (a) => [a.id, a.kind === "document" ? "document" : "dashboard"]
908
908
  )
909
909
  ), r = [
910
- ..._(e).map(
910
+ ...F(e).map(
911
911
  (a) => ({
912
912
  kind: "card",
913
913
  id: a.cardId,
@@ -922,22 +922,22 @@ function Z(e) {
922
922
  kind: "variable",
923
923
  id: a.id,
924
924
  variable: a,
925
- card: ht(a)
925
+ card: It(a)
926
926
  })
927
927
  )
928
928
  ], s = { targets: r, byId: new Map(r.map((a) => [a.id, a])) };
929
- return pe.set(e, s), s;
929
+ return he.set(e, s), s;
930
930
  }
931
- function gt(e) {
932
- return Z(e).targets;
931
+ function wt(e) {
932
+ return ee(e).targets;
933
933
  }
934
- function _n(e, t) {
935
- return Z(e).byId.get(t);
934
+ function Vn(e, t) {
935
+ return ee(e).byId.get(t);
936
936
  }
937
- function kt(e, t) {
938
- return Z(e).byId.has(t);
937
+ function At(e, t) {
938
+ return ee(e).byId.has(t);
939
939
  }
940
- function wt(e, t) {
940
+ function vt(e, t) {
941
941
  return t.kind === "card" ? [
942
942
  {
943
943
  sheetId: t.sheetId,
@@ -945,22 +945,22 @@ function wt(e, t) {
945
945
  sheetKind: t.sheetKind,
946
946
  ...t.sectionId ? { sectionId: t.sectionId } : {}
947
947
  }
948
- ] : ke(e, t.id);
948
+ ] : Ae(e, t.id);
949
949
  }
950
- function At(e, t, n) {
951
- return wt(e, n).some(
952
- (r) => C(t, r)
950
+ function Tt(e, t, n) {
951
+ return vt(e, n).some(
952
+ (r) => g(t, r)
953
953
  );
954
954
  }
955
- function Fn(e, t) {
956
- return gt(e).filter(
957
- (n) => n.kind === "variable" && At(e, t, n)
955
+ function $n(e, t) {
956
+ return wt(e).filter(
957
+ (n) => n.kind === "variable" && Tt(e, t, n)
958
958
  );
959
959
  }
960
- const vt = ["new", "edit", "delete", "create", "update", "remove"];
961
- function Ke(e, t) {
960
+ const Et = ["new", "edit", "delete", "create", "update", "remove"];
961
+ function Oe(e, t) {
962
962
  return (e.sheets || []).flatMap(
963
- (n) => _({ sheets: [n] }).filter(t).map((r) => ({
963
+ (n) => F({ sheets: [n] }).filter(t).map((r) => ({
964
964
  card: r.card,
965
965
  sheet: n,
966
966
  ...r.kind === "frameCard" && { frameId: r.frameId },
@@ -971,22 +971,22 @@ function Ke(e, t) {
971
971
  );
972
972
  }
973
973
  function T(e) {
974
- return Ke(e, (t) => t.kind !== "documentSectionCard");
974
+ return Oe(e, (t) => t.kind !== "documentSectionCard");
975
975
  }
976
- function Vn(e) {
976
+ function Pn(e) {
977
977
  return [
978
978
  ...T(e),
979
- ...Ke(e, (t) => t.kind === "documentSectionCard")
979
+ ...Oe(e, (t) => t.kind === "documentSectionCard")
980
980
  ];
981
981
  }
982
- function $n(e) {
982
+ function Ln(e) {
983
983
  return T(e).map((t) => t.card);
984
984
  }
985
- function Pn(e, t, n) {
986
- return n && t === n ? !0 : !kt(e, t);
985
+ function qn(e, t, n) {
986
+ return n && t === n ? !0 : !At(e, t);
987
987
  }
988
- function Ln(e) {
989
- return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ? vt.includes(e.toLowerCase()) ? {
988
+ function jn(e) {
989
+ return !e || e.trim().length === 0 ? { isValid: !1, error: "Card ID cannot be empty" } : e.length < 3 ? { isValid: !1, error: "Card ID must be at least 3 characters" } : e.length > 50 ? { isValid: !1, error: "Card ID must be less than 50 characters" } : /^[a-zA-Z0-9-_]+$/.test(e) ? /^[a-zA-Z0-9]/.test(e) ? Et.includes(e.toLowerCase()) ? {
990
990
  isValid: !1,
991
991
  error: `"${e}" is a reserved keyword and cannot be used`
992
992
  } : { isValid: !0 } : {
@@ -997,27 +997,27 @@ function Ln(e) {
997
997
  error: "Card ID can only contain letters, numbers, hyphens, and underscores"
998
998
  };
999
999
  }
1000
- function qn(e, t) {
1000
+ function Bn(e, t) {
1001
1001
  var n;
1002
- return (n = Tt(e, t)) == null ? void 0 : n.card;
1002
+ return (n = Kt(e, t)) == null ? void 0 : n.card;
1003
1003
  }
1004
- function Tt(e, t) {
1004
+ function Kt(e, t) {
1005
1005
  for (const n of T(e))
1006
1006
  if (n.card.id === t)
1007
1007
  return n;
1008
1008
  }
1009
- function Bn(e, t) {
1009
+ function Un(e, t) {
1010
1010
  for (const n of e.sheets || [])
1011
1011
  for (const r of n.frames || [])
1012
1012
  for (const s of r.cards || [])
1013
1013
  if (s.id === t)
1014
1014
  return { card: s, sheet: n };
1015
1015
  }
1016
- const R = {
1016
+ const _ = {
1017
1017
  includeMetricFilterDatasets: !0,
1018
1018
  preferQualifiedIdentity: !1
1019
1019
  };
1020
- function De(e) {
1020
+ function Q(e) {
1021
1021
  if (!e) return;
1022
1022
  if (e.kind === "semantic")
1023
1023
  return { entityName: e.datasetName, entityId: e.datasetId, label: e.label };
@@ -1028,12 +1028,12 @@ function De(e) {
1028
1028
  label: e.label
1029
1029
  };
1030
1030
  }
1031
- function Et(e) {
1031
+ function Nt(e) {
1032
1032
  var n;
1033
- const t = De(e.source);
1033
+ const t = Q(e.source);
1034
1034
  return t ? `${(n = e.source) == null ? void 0 : n.kind}:${t.qualifiedEntityName || t.entityName}` : "";
1035
1035
  }
1036
- function Kt(e) {
1036
+ function Ot(e) {
1037
1037
  return [
1038
1038
  e.id,
1039
1039
  e.qualifiedEntityName,
@@ -1043,36 +1043,36 @@ function Kt(e) {
1043
1043
  e.name,
1044
1044
  // Source-only fields from different datasets can otherwise share a key
1045
1045
  // and the second dataset would be silently dropped.
1046
- Et(e)
1046
+ Nt(e)
1047
1047
  ].join("|");
1048
1048
  }
1049
1049
  function Dt(e) {
1050
1050
  return [e.entityName, e.qualifiedEntityName || "", e.entityId || ""].join("|");
1051
1051
  }
1052
- function jn(e) {
1052
+ function zn(e) {
1053
1053
  return e.entityName || e.qualifiedEntityName || "";
1054
1054
  }
1055
- function Nt(e) {
1055
+ function Mt(e) {
1056
1056
  var t, n;
1057
1057
  return !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length);
1058
1058
  }
1059
- function Ot(e) {
1060
- return Pe(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || Nt(e);
1059
+ function xt(e) {
1060
+ return Le(e) ? !0 : e.entityName || e.qualifiedEntityName ? !1 : !e.source || Mt(e);
1061
1061
  }
1062
- function P(e, t) {
1062
+ function N(e, t) {
1063
1063
  const n = Dt(t);
1064
1064
  e.found.has(n) || e.found.set(n, t);
1065
1065
  }
1066
1066
  function E(e, t) {
1067
- var u, d, f;
1067
+ var d, m, I;
1068
1068
  if (!e) return;
1069
- const n = Kt(e);
1069
+ const n = Ot(e);
1070
1070
  if (t.visitedFields.has(n)) return;
1071
1071
  t.visitedFields.add(n);
1072
- const r = Ot(e);
1072
+ const r = xt(e);
1073
1073
  if (!r) {
1074
- const y = !e.entityName && !e.qualifiedEntityName ? De(e.source) : void 0;
1075
- P(
1074
+ const y = !e.entityName && !e.qualifiedEntityName ? Q(e.source) : void 0;
1075
+ N(
1076
1076
  t,
1077
1077
  y || {
1078
1078
  // May be empty for qualified-only metadata; identity then comes from
@@ -1084,50 +1084,51 @@ function E(e, t) {
1084
1084
  }
1085
1085
  );
1086
1086
  }
1087
- t.includeMetricFilterDatasets && "parameters" in e && ((u = e.parameters) != null && u.filters) && ee(e.parameters.filters, t);
1088
- const s = (d = e.calculatedFormula) == null ? void 0 : d.inputFields, a = !!(s && s.length > 0);
1087
+ t.includeMetricFilterDatasets && "parameters" in e && ((d = e.parameters) != null && d.filters) && te(e.parameters.filters, t);
1088
+ const s = (m = e.calculatedFormula) == null ? void 0 : m.inputFields, a = !!(s && s.length > 0);
1089
1089
  a && s.forEach((y) => E(y, t));
1090
1090
  let i = !1, o = !1;
1091
- const c = a || (f = e.derivedField) == null ? void 0 : f.inputs;
1091
+ const c = a || (I = e.derivedField) == null ? void 0 : I.inputs;
1092
1092
  if (c && Object.keys(c).length > 0)
1093
1093
  for (const y of Object.values(c)) {
1094
- const h = y.field.source;
1095
- if (!h) {
1094
+ const l = y.field.source;
1095
+ if (!l) {
1096
1096
  a || (o = !0);
1097
1097
  continue;
1098
1098
  }
1099
- if (h.kind === "sql") {
1099
+ if (l.kind === "sql") {
1100
1100
  o = !0;
1101
1101
  continue;
1102
1102
  }
1103
- if (h.kind === "semantic")
1104
- P(t, {
1105
- entityName: h.datasetName,
1106
- entityId: h.datasetId,
1107
- label: h.label
1103
+ if (l.kind === "semantic")
1104
+ N(t, {
1105
+ entityName: l.datasetName,
1106
+ entityId: l.datasetId,
1107
+ label: l.label
1108
1108
  });
1109
1109
  else {
1110
- const p = [h.databaseName, h.schemaName, h.tableName].filter((I) => !!(I && I.trim())).join(".");
1111
- P(t, {
1112
- entityName: h.tableName,
1113
- qualifiedEntityName: p.includes(".") ? p : void 0,
1114
- label: h.label
1110
+ const h = [l.databaseName, l.schemaName, l.tableName].filter((C) => !!(C && C.trim())).join(".");
1111
+ N(t, {
1112
+ entityName: l.tableName,
1113
+ qualifiedEntityName: h.includes(".") ? h : void 0,
1114
+ label: l.label
1115
1115
  });
1116
1116
  }
1117
1117
  i = !0;
1118
1118
  }
1119
- o && (t.complete = !1), r && !a && !i && (t.complete = !1);
1119
+ const u = r && !a && !(c && Object.keys(c).length > 0) ? Q(e.source) : void 0;
1120
+ (u != null && u.entityName || u != null && u.qualifiedEntityName) && (N(t, u), i = !0), o && (t.complete = !1), r && !a && !i && (t.complete = !1);
1120
1121
  }
1121
- function ee(e, t) {
1122
+ function te(e, t) {
1122
1123
  if (e && !t.visitedGroups.has(e.id)) {
1123
1124
  t.visitedGroups.add(e.id);
1124
1125
  for (const n of e.conditions || [])
1125
1126
  E(n.field, t);
1126
1127
  for (const n of e.groups || [])
1127
- ee(n, t);
1128
+ te(n, t);
1128
1129
  }
1129
1130
  }
1130
- function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
1131
+ function V(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
1131
1132
  return {
1132
1133
  found: /* @__PURE__ */ new Map(),
1133
1134
  complete: !0,
@@ -1136,54 +1137,54 @@ function F(e, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set()) {
1136
1137
  includeMetricFilterDatasets: e
1137
1138
  };
1138
1139
  }
1139
- function te(e, t) {
1140
+ function ne(e, t) {
1140
1141
  var r;
1141
1142
  const n = (r = e.qualifiedEntityName) != null && r.includes(".") ? e.qualifiedEntityName : void 0;
1142
1143
  return t === "qualifiedOnly" ? n : t === "preferQualified" ? n || e.entityName || void 0 : e.entityName || void 0;
1143
1144
  }
1144
- function Un(e) {
1145
- const t = F(!1);
1145
+ function Wn(e) {
1146
+ const t = V(!1);
1146
1147
  return E(e, t), { datasets: Array.from(t.found.values()), complete: t.complete };
1147
1148
  }
1148
- function Ne(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
1149
- const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
1149
+ function De(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = _) {
1150
+ const a = { ..._, ...s }, i = V(a.includeMetricFilterDatasets, n, r);
1150
1151
  E(e, i), i.found.forEach((o) => {
1151
- const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1152
+ const c = ne(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1152
1153
  c && t.add(c);
1153
1154
  });
1154
1155
  }
1155
- function zn(e, t) {
1156
- Ne(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
1156
+ function Qn(e, t) {
1157
+ De(e, t, /* @__PURE__ */ new Set(), /* @__PURE__ */ new Set(), {
1157
1158
  preferQualifiedIdentity: !0
1158
1159
  });
1159
1160
  }
1160
- function Wn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
1161
- const s = F(!0, n, r);
1161
+ function Yn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
1162
+ const s = V(!0, n, r);
1162
1163
  E(e, s), s.found.forEach((a) => {
1163
- const i = te(a, "qualifiedOnly");
1164
+ const i = ne(a, "qualifiedOnly");
1164
1165
  i && t.add(i);
1165
1166
  });
1166
1167
  }
1167
- function Qn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
1168
- Ne(e, t, n, r, {
1168
+ function Gn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set()) {
1169
+ De(e, t, n, r, {
1169
1170
  includeMetricFilterDatasets: !1
1170
1171
  });
1171
1172
  }
1172
- function Gn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = R) {
1173
- const a = { ...R, ...s }, i = F(a.includeMetricFilterDatasets, n, r);
1174
- ee(e, i), i.found.forEach((o) => {
1175
- const c = te(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1173
+ function Jn(e, t, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = _) {
1174
+ const a = { ..._, ...s }, i = V(a.includeMetricFilterDatasets, n, r);
1175
+ te(e, i), i.found.forEach((o) => {
1176
+ const c = ne(o, a.preferQualifiedIdentity ? "preferQualified" : "name");
1176
1177
  c && t.add(c);
1177
1178
  });
1178
1179
  }
1179
- function Yn(e, t) {
1180
+ function Hn(e, t) {
1180
1181
  return t != null && t[e] ? t[e] : (e.includes(".") ? e.slice(e.lastIndexOf(".") + 1) : e).replace(/[_-]+/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim().replace(/\b\w/g, (r) => r.toUpperCase());
1181
1182
  }
1182
- const Jn = {
1183
+ const Xn = {
1183
1184
  database: null,
1184
1185
  schema: null,
1185
1186
  table: null
1186
- }, Hn = "__card_default__", Q = {
1187
+ }, Zn = "__card_default__", Y = {
1187
1188
  bookmarksPerViewerPerDashboard: 20,
1188
1189
  bookmarkNameMaxChars: 100,
1189
1190
  columnLabelMaxChars: 120,
@@ -1191,11 +1192,11 @@ const Jn = {
1191
1192
  tableSettingsMaxBytes: 65536,
1192
1193
  rememberedTableSettingsMaxBytes: 262144,
1193
1194
  bookmarkStateMaxBytes: 65536
1194
- }, Oe = 1;
1195
- function Xn(e) {
1195
+ }, Me = 1;
1196
+ function er(e) {
1196
1197
  return new TextEncoder().encode(JSON.stringify(e ?? null)).length;
1197
1198
  }
1198
- function xt(e) {
1199
+ function Rt(e) {
1199
1200
  const t = encodeURIComponent;
1200
1201
  switch (e.kind) {
1201
1202
  case "dimension":
@@ -1208,7 +1209,7 @@ function xt(e) {
1208
1209
  return `result:${t(e.key)}`;
1209
1210
  }
1210
1211
  }
1211
- function D(e) {
1212
+ function O(e) {
1212
1213
  if (e)
1213
1214
  try {
1214
1215
  return decodeURIComponent(e);
@@ -1216,47 +1217,47 @@ function D(e) {
1216
1217
  return;
1217
1218
  }
1218
1219
  }
1219
- function Mt(e) {
1220
+ function _t(e) {
1220
1221
  if (typeof e != "string") return;
1221
1222
  const t = e.split(":");
1222
1223
  let n;
1223
1224
  if (t[0] === "dim" && t.length === 3) {
1224
- const r = t[1], s = D(t[2]);
1225
+ const r = t[1], s = O(t[2]);
1225
1226
  (r === "detail" || r === "groupby") && s && (n = { kind: "dimension", role: r, fieldId: s });
1226
1227
  } else if (t[0] === "metric" && t.length === 3) {
1227
- const r = D(t[1]), s = D(t[2]);
1228
+ const r = O(t[1]), s = O(t[2]);
1228
1229
  r && s && (n = { kind: "metric", metricId: r, metricAlias: s });
1229
1230
  } else if (t[0] === "result" && t.length === 2) {
1230
- const r = D(t[1]);
1231
+ const r = O(t[1]);
1231
1232
  r && (n = { kind: "result", key: r });
1232
1233
  }
1233
- return n && xt(n) === e ? n : void 0;
1234
- }
1235
- function O(e) {
1236
- return typeof e == "string" && Mt(e) !== void 0;
1237
- }
1238
- const he = l.array(l.string()).max(2e3), Rt = l.object({
1239
- order: he.optional(),
1240
- hidden: he.optional(),
1241
- labels: l.record(l.string(), l.string().max(Q.columnLabelMaxChars)).optional(),
1242
- sort: l.array(
1243
- l.object({
1244
- columnId: l.string(),
1245
- direction: l.enum(["asc", "desc"])
1234
+ return n && Rt(n) === e ? n : void 0;
1235
+ }
1236
+ function M(e) {
1237
+ return typeof e == "string" && _t(e) !== void 0;
1238
+ }
1239
+ const ye = f.array(f.string()).max(2e3), Ft = f.object({
1240
+ order: ye.optional(),
1241
+ hidden: ye.optional(),
1242
+ labels: f.record(f.string(), f.string().max(Y.columnLabelMaxChars)).optional(),
1243
+ sort: f.array(
1244
+ f.object({
1245
+ columnId: f.string(),
1246
+ direction: f.enum(["asc", "desc"])
1246
1247
  }).strict()
1247
1248
  ).max(2e3).optional(),
1248
- widths: l.record(
1249
- l.string(),
1250
- l.number().int().min(1).max(Q.columnWidthMaxPx)
1249
+ widths: f.record(
1250
+ f.string(),
1251
+ f.number().int().min(1).max(Y.columnWidthMaxPx)
1251
1252
  ).optional()
1252
1253
  }).strict();
1253
1254
  function G(e) {
1254
1255
  const t = /* @__PURE__ */ new Set(), n = [];
1255
1256
  for (const r of e)
1256
- !O(r) || t.has(r) || (t.add(r), n.push(r));
1257
+ !M(r) || t.has(r) || (t.add(r), n.push(r));
1257
1258
  return n;
1258
1259
  }
1259
- function Zn(e) {
1260
+ function tr(e) {
1260
1261
  if (!Array.isArray(e)) return;
1261
1262
  const t = G(
1262
1263
  e.filter((n) => typeof n == "string")
@@ -1268,74 +1269,74 @@ function xe(e) {
1268
1269
  const t = e.order ? G(e.order) : void 0, n = e.hidden ? G(e.hidden) : void 0, r = Object.entries(e.labels ?? {}).flatMap(
1269
1270
  ([c, u]) => {
1270
1271
  const d = typeof u == "string" ? u.trim() : "";
1271
- return O(c) && d ? [
1272
+ return M(c) && d ? [
1272
1273
  [
1273
1274
  c,
1274
- d.slice(0, Q.columnLabelMaxChars)
1275
+ d.slice(0, Y.columnLabelMaxChars)
1275
1276
  ]
1276
1277
  ] : [];
1277
1278
  }
1278
- ), s = /* @__PURE__ */ new Set(), a = e.sort ? e.sort.filter((c) => !O(c.columnId) || s.has(c.columnId) ? !1 : (s.add(c.columnId), !0)) : void 0, i = Object.entries(e.widths ?? {}).filter(
1279
- ([c]) => O(c)
1279
+ ), s = /* @__PURE__ */ new Set(), a = e.sort ? e.sort.filter((c) => !M(c.columnId) || s.has(c.columnId) ? !1 : (s.add(c.columnId), !0)) : void 0, i = Object.entries(e.widths ?? {}).filter(
1280
+ ([c]) => M(c)
1280
1281
  ), o = {};
1281
1282
  return t != null && t.length && (o.order = t), n != null && n.length && (o.hidden = n), r.length && (o.labels = Object.fromEntries(r)), a && (o.sort = a.map(({ columnId: c, direction: u }) => ({
1282
1283
  columnId: c,
1283
1284
  direction: u
1284
1285
  }))), i.length && (o.widths = Object.fromEntries(i)), Object.keys(o).length ? o : void 0;
1285
1286
  }
1286
- function er(e) {
1287
+ function nr(e) {
1287
1288
  var t, n;
1288
1289
  return !!((t = e == null ? void 0 : e.order) != null && t.length) || !!((n = e == null ? void 0 : e.hidden) != null && n.length) || Object.keys((e == null ? void 0 : e.labels) ?? {}).length > 0 || Object.keys((e == null ? void 0 : e.widths) ?? {}).length > 0;
1289
1290
  }
1290
- function Me(e) {
1291
+ function Re(e) {
1291
1292
  return xe(e) === void 0;
1292
1293
  }
1293
- function Re(e, t) {
1294
- if (t !== Oe)
1294
+ function _e(e, t) {
1295
+ if (t !== Me)
1295
1296
  return {
1296
1297
  ok: !1,
1297
1298
  error: `Unsupported table settings version ${t}.`
1298
1299
  };
1299
- const n = Rt.safeParse(e);
1300
+ const n = Ft.safeParse(e);
1300
1301
  return n.success ? {
1301
1302
  ok: !0,
1302
1303
  value: xe(n.data) ?? {}
1303
1304
  } : { ok: !1, error: "Table settings are invalid." };
1304
1305
  }
1305
- function tr(e, t, n) {
1306
+ function rr(e, t, n) {
1306
1307
  if (!e || typeof e != "object" || Array.isArray(e)) return {};
1307
1308
  const r = {};
1308
1309
  for (const [s, a] of Object.entries(
1309
1310
  e
1310
1311
  )) {
1311
1312
  if (!n.has(s)) continue;
1312
- const i = Re(a, t);
1313
- i.ok && !Me(i.value) && (r[s] = i.value);
1313
+ const i = _e(a, t);
1314
+ i.ok && !Re(i.value) && (r[s] = i.value);
1314
1315
  }
1315
1316
  return r;
1316
1317
  }
1317
- const _t = /* @__PURE__ */ new Set([
1318
+ const Vt = /* @__PURE__ */ new Set([
1318
1319
  "table",
1319
1320
  "detailTable"
1320
1321
  ]);
1321
- function _e(e) {
1322
- return _t.has(e.type);
1322
+ function Fe(e) {
1323
+ return Vt.has(e.type);
1323
1324
  }
1324
- function Ft(e) {
1325
+ function $t(e) {
1325
1326
  var t, n;
1326
- return _e(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
1327
+ return Fe(e) && ((n = (t = e.preferences) == null ? void 0 : t.tablePrefs) == null ? void 0 : n.allowViewerColumnCustomization) !== !1;
1327
1328
  }
1328
- function nr(e) {
1329
+ function sr(e) {
1329
1330
  return new Set(
1330
- T(e).filter(({ card: t }) => _e(t)).map(({ card: t }) => t.id)
1331
+ T(e).filter(({ card: t }) => Fe(t)).map(({ card: t }) => t.id)
1331
1332
  );
1332
1333
  }
1333
- function rr(e) {
1334
+ function ar(e) {
1334
1335
  return new Set(
1335
- T(e).filter(({ card: t }) => Ft(t)).map(({ card: t }) => t.id)
1336
+ T(e).filter(({ card: t }) => $t(t)).map(({ card: t }) => t.id)
1336
1337
  );
1337
1338
  }
1338
- const Vt = {
1339
+ const Pt = {
1339
1340
  date: /* @__PURE__ */ new Set([
1340
1341
  "between",
1341
1342
  "not between",
@@ -1374,14 +1375,14 @@ const Vt = {
1374
1375
  ]),
1375
1376
  boolean: /* @__PURE__ */ new Set(["=", "!=", "in", "not in", "is null", "is not null"])
1376
1377
  };
1377
- function $t(e) {
1378
- const t = Y(e);
1378
+ function Lt(e) {
1379
+ const t = J(e);
1379
1380
  return t === "number" || t === "boolean" ? t : t === "date" || t === "datetime" ? "date" : "string";
1380
1381
  }
1381
- function sr(e, t) {
1382
- return typeof t != "string" ? !1 : Vt[$t(e)].has(t);
1382
+ function ir(e, t) {
1383
+ return typeof t != "string" ? !1 : Pt[Lt(e)].has(t);
1383
1384
  }
1384
- const Pt = /* @__PURE__ */ new Set([
1385
+ const qt = /* @__PURE__ */ new Set([
1385
1386
  "=",
1386
1387
  ">",
1387
1388
  "<",
@@ -1397,26 +1398,26 @@ const Pt = /* @__PURE__ */ new Set([
1397
1398
  "is null",
1398
1399
  "is not null"
1399
1400
  ]);
1400
- function Lt(e, t) {
1401
+ function jt(e, t) {
1401
1402
  return t === "number" ? typeof e == "number" && Number.isFinite(e) : t === "boolean" ? typeof e == "boolean" : t === "date" ? e instanceof Date || typeof e == "string" && e.trim().length > 0 : typeof e == "string" || typeof e == "number" || typeof e == "boolean";
1402
1403
  }
1403
- function qt(e, t, n, r) {
1404
- const s = Le(e.relativeMeta);
1405
- if (s && We(s).dataAnchored) {
1404
+ function Bt(e, t, n, r) {
1405
+ const s = qe(e.relativeMeta);
1406
+ if (s && Ye(s).dataAnchored) {
1406
1407
  r.push(
1407
1408
  `${n}.relativeMeta counts back from the latest data; a dashboard filter's dates run to now. Use a period counted back from today.`
1408
1409
  );
1409
1410
  return;
1410
1411
  }
1411
- if (s && !qe(String(e.operation), s)) {
1412
+ if (s && !je(String(e.operation), s)) {
1412
1413
  r.push(
1413
1414
  `${n}.relativeMeta runs only under between, not between, before, after, on or before, or on or after.`
1414
1415
  );
1415
1416
  return;
1416
1417
  }
1417
- Bt(e.operation, e.values, t, `${n}.values`, r);
1418
+ Ut(e.operation, e.values, t, `${n}.values`, r);
1418
1419
  }
1419
- function Bt(e, t, n, r, s) {
1420
+ function Ut(e, t, n, r, s) {
1420
1421
  if (e === "is null" || e === "is not null") {
1421
1422
  t.length !== 0 && s.push(`${r} must be empty for null filter operations.`);
1422
1423
  return;
@@ -1442,46 +1443,46 @@ function Bt(e, t, n, r, s) {
1442
1443
  return;
1443
1444
  }
1444
1445
  for (const a of t)
1445
- if (!Lt(a, n)) {
1446
+ if (!jt(a, n)) {
1446
1447
  s.push(
1447
1448
  `${r} contains a value that is incompatible with valueType '${n}'.`
1448
1449
  );
1449
1450
  return;
1450
1451
  }
1451
1452
  }
1452
- const L = 1, ar = ["PRIVATE", "TEAM", "DASHBOARD"], jt = l.object({
1453
- filterId: l.string().min(1),
1454
- name: l.string(),
1455
- operation: l.string(),
1456
- valueType: l.enum(["string", "number", "date", "boolean"]),
1457
- values: l.array(l.unknown())
1453
+ const L = 1, or = ["PRIVATE", "TEAM", "DASHBOARD"], zt = f.object({
1454
+ filterId: f.string().min(1),
1455
+ name: f.string(),
1456
+ operation: f.string(),
1457
+ valueType: f.enum(["string", "number", "date", "boolean"]),
1458
+ values: f.array(f.unknown())
1458
1459
  }).passthrough().superRefine((e, t) => {
1459
1460
  const n = [];
1460
- Pt.has(e.operation) ? qt(e, e.valueType, "filterValue", n) : n.push("filterValue.operation must be a valid filter operation.");
1461
+ qt.has(e.operation) ? Bt(e, e.valueType, "filterValue", n) : n.push("filterValue.operation must be a valid filter operation.");
1461
1462
  for (const r of n) t.addIssue({ code: "custom", message: r });
1462
- }), q = l.unknown().superRefine((e, t) => {
1463
- for (const n of Qe(e).errors)
1463
+ }), q = f.unknown().superRefine((e, t) => {
1464
+ for (const n of Ge(e).errors)
1464
1465
  t.addIssue({ code: "custom", message: n.message });
1465
- }), Ut = l.discriminatedUnion("kind", [
1466
- l.object({ kind: l.literal("filter"), filterValue: jt }).strict(),
1467
- l.object({ kind: l.literal("control"), value: l.unknown() }).strict(),
1468
- l.object({
1469
- kind: l.literal("selection"),
1466
+ }), Wt = f.discriminatedUnion("kind", [
1467
+ f.object({ kind: f.literal("filter"), filterValue: zt }).strict(),
1468
+ f.object({ kind: f.literal("control"), value: f.unknown() }).strict(),
1469
+ f.object({
1470
+ kind: f.literal("selection"),
1470
1471
  selection: Be
1471
1472
  }).strict()
1472
- ]), zt = l.union([
1473
- l.object({
1474
- status: l.literal("set"),
1475
- value: Ut,
1473
+ ]), Qt = f.union([
1474
+ f.object({
1475
+ status: f.literal("set"),
1476
+ value: Wt,
1476
1477
  comparisonSelection: q.optional()
1477
1478
  }).strict(),
1478
- l.object({
1479
- status: l.literal("cleared"),
1479
+ f.object({
1480
+ status: f.literal("cleared"),
1480
1481
  comparisonSelection: q.optional()
1481
1482
  }).strict(),
1482
- l.object({ comparisonSelection: q }).strict()
1483
- ]), Fe = ["bySheetId", "byCardId", "byDocumentSectionId"], Wt = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), Qt = /* @__PURE__ */ new Set(["shared", ...Fe]), A = (e) => !!e && typeof e == "object" && !Array.isArray(e);
1484
- function ye(e, t, n) {
1483
+ f.object({ comparisonSelection: q }).strict()
1484
+ ]), Ve = ["bySheetId", "byCardId", "byDocumentSectionId"], Yt = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), Gt = /* @__PURE__ */ new Set(["shared", ...Ve]), A = (e) => !!e && typeof e == "object" && !Array.isArray(e);
1485
+ function Ie(e, t, n) {
1485
1486
  if (e === void 0) return;
1486
1487
  if (!A(e)) {
1487
1488
  t.push({ target: "input", id: n });
@@ -1489,30 +1490,30 @@ function ye(e, t, n) {
1489
1490
  }
1490
1491
  const r = {};
1491
1492
  for (const [s, a] of Object.entries(e)) {
1492
- const i = s ? zt.safeParse(a) : void 0;
1493
+ const i = s ? Qt.safeParse(a) : void 0;
1493
1494
  i != null && i.success ? r[s] = i.data : t.push({
1494
- target: je(s) ? "selection" : "input",
1495
+ target: Ue(s) ? "selection" : "input",
1495
1496
  id: s
1496
1497
  });
1497
1498
  }
1498
1499
  return Object.keys(r).length ? r : void 0;
1499
1500
  }
1500
- function Gt(e, t) {
1501
+ function Jt(e, t) {
1501
1502
  if (t !== L)
1502
1503
  return { ok: !1, error: `Unsupported bookmark version ${t}.` };
1503
1504
  if (!A(e) || e.version !== L)
1504
1505
  return { ok: !1, error: "The bookmark state is invalid." };
1505
- const n = [], r = Object.keys(e).filter((o) => !Wt.has(o));
1506
+ const n = [], r = Object.keys(e).filter((o) => !Yt.has(o));
1506
1507
  let s;
1507
1508
  typeof e.selectedSheetId == "string" && e.selectedSheetId ? s = e.selectedSheetId : e.selectedSheetId !== void 0 && n.push({ target: "sheet", id: String(e.selectedSheetId) });
1508
1509
  const a = {};
1509
1510
  if (A(e.inputs)) {
1510
1511
  r.push(
1511
- ...Object.keys(e.inputs).filter((c) => !Qt.has(c)).map((c) => `inputs.${c}`)
1512
+ ...Object.keys(e.inputs).filter((c) => !Gt.has(c)).map((c) => `inputs.${c}`)
1512
1513
  );
1513
- const o = ye(e.inputs.shared, n, "shared");
1514
+ const o = Ie(e.inputs.shared, n, "shared");
1514
1515
  o && (a.shared = o);
1515
- for (const c of Fe) {
1516
+ for (const c of Ve) {
1516
1517
  const u = e.inputs[c];
1517
1518
  if (u === void 0) continue;
1518
1519
  if (!A(u)) {
@@ -1520,9 +1521,9 @@ function Gt(e, t) {
1520
1521
  continue;
1521
1522
  }
1522
1523
  const d = {};
1523
- for (const [f, y] of Object.entries(u)) {
1524
- const h = ye(y, n, `${c}.${f}`);
1525
- h && (d[f] = h);
1524
+ for (const [m, I] of Object.entries(u)) {
1525
+ const y = Ie(I, n, `${c}.${m}`);
1526
+ y && (d[m] = y);
1526
1527
  }
1527
1528
  Object.keys(d).length && (a[c] = d);
1528
1529
  }
@@ -1530,8 +1531,8 @@ function Gt(e, t) {
1530
1531
  const i = {};
1531
1532
  if (A(e.tableSettings))
1532
1533
  for (const [o, c] of Object.entries(e.tableSettings)) {
1533
- const u = o ? Re(c, Oe) : void 0;
1534
- u != null && u.ok ? Me(u.value) || (i[o] = u.value) : n.push({ target: "card", id: o });
1534
+ const u = o ? _e(c, Me) : void 0;
1535
+ u != null && u.ok ? Re(u.value) || (i[o] = u.value) : n.push({ target: "card", id: o });
1535
1536
  }
1536
1537
  else e.tableSettings !== void 0 && r.push("tableSettings");
1537
1538
  return {
@@ -1546,121 +1547,121 @@ function Gt(e, t) {
1546
1547
  unknownKeys: r
1547
1548
  };
1548
1549
  }
1549
- function ir(e, t) {
1550
- const n = Gt(e, t);
1550
+ function cr(e, t) {
1551
+ const n = Jt(e, t);
1551
1552
  return n.ok ? n.issues.some((r) => r.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : n.issues.length || n.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: n.value } : n;
1552
1553
  }
1553
1554
  export {
1554
- re as $,
1555
- qn as A,
1555
+ Nn as $,
1556
+ Bn as A,
1556
1557
  L as B,
1557
- Hn as C,
1558
- _ as D,
1559
- Jn as E,
1560
- C as F,
1561
- fn as G,
1562
- _n as H,
1563
- Tn as I,
1564
- Ye as J,
1565
- Tt as K,
1566
- ot as L,
1567
- gt as M,
1568
- yn as N,
1569
- le as O,
1570
- rt as P,
1571
- dn as Q,
1572
- ge as R,
1573
- bn as S,
1574
- On as T,
1575
- Cn as U,
1576
- Q as V,
1577
- H as W,
1578
- Ae as X,
1579
- lt as Y,
1580
- ve as Z,
1581
- En as _,
1582
- jn as a,
1558
+ Zn as C,
1559
+ F as D,
1560
+ Xn as E,
1561
+ Vn as F,
1562
+ dn as G,
1563
+ g as H,
1564
+ pn as I,
1565
+ Kn as J,
1566
+ He as K,
1567
+ Kt as L,
1568
+ wt as M,
1569
+ ut as N,
1570
+ bn as O,
1571
+ fe as P,
1572
+ at as Q,
1573
+ fn as R,
1574
+ we as S,
1575
+ Cn as T,
1576
+ xn as U,
1577
+ Y as V,
1578
+ kn as W,
1579
+ X,
1580
+ Te as Y,
1581
+ mt as Z,
1582
+ Ee as _,
1583
+ zn as a,
1583
1584
  se as a0,
1584
- Je as a1,
1585
- nn as a2,
1586
- He as a3,
1587
- rn as a4,
1588
- ln as a5,
1585
+ ae as a1,
1586
+ Xe as a2,
1587
+ sn as a3,
1588
+ Ze as a4,
1589
+ an as a5,
1589
1590
  mn as a6,
1590
- pn as a7,
1591
- hn as a8,
1591
+ hn as a7,
1592
+ yn as a8,
1592
1593
  In as a9,
1593
- sr as aA,
1594
- Pt as aB,
1595
- qt as aC,
1596
- $n as aD,
1597
- an as aE,
1598
- et as aF,
1594
+ ir as aA,
1595
+ qt as aB,
1596
+ Bt as aC,
1597
+ Ln as aD,
1598
+ cn as aE,
1599
+ nt as aF,
1599
1600
  v as aG,
1600
1601
  T as aH,
1601
- ut as aI,
1602
- kn as aJ,
1603
- J as aK,
1604
- ae as aL,
1605
- wn as aM,
1606
- gn as aN,
1607
- vn as aO,
1608
- An as aP,
1609
- Vn as aQ,
1610
- Xe as aR,
1611
- Pn as aS,
1612
- Ln as aT,
1613
- Bn as aU,
1614
- sn as aV,
1602
+ lt as aI,
1603
+ H as aJ,
1604
+ An as aK,
1605
+ ie as aL,
1606
+ vn as aM,
1607
+ wn as aN,
1608
+ En as aO,
1609
+ Tn as aP,
1610
+ Pn as aQ,
1611
+ et as aR,
1612
+ qn as aS,
1613
+ jn as aT,
1614
+ Un as aU,
1615
+ on as aV,
1615
1616
  Sn as aa,
1616
- Te as ab,
1617
- M as ac,
1618
- ft as ad,
1619
- S as ae,
1620
- Ee as af,
1621
- mt as ag,
1622
- pt as ah,
1623
- Kn as ai,
1624
- X as aj,
1625
- ht as ak,
1626
- Dn as al,
1627
- Nn as am,
1628
- xn as an,
1629
- Mn as ao,
1630
- Rn as ap,
1631
- on as aq,
1632
- nt as ar,
1633
- cn as as,
1634
- un as at,
1635
- ke as au,
1636
- kt as av,
1637
- wt as aw,
1638
- At as ax,
1639
- Fn as ay,
1640
- $t as az,
1641
- zn as b,
1642
- Ne as c,
1643
- De as d,
1644
- Wn as e,
1645
- Qn as f,
1646
- Gn as g,
1647
- Yn as h,
1648
- Gt as i,
1649
- Oe as j,
1650
- Mt as k,
1617
+ gn as ab,
1618
+ Ke as ac,
1619
+ R as ad,
1620
+ pt as ae,
1621
+ S as af,
1622
+ Ne as ag,
1623
+ ht as ah,
1624
+ yt as ai,
1625
+ On as aj,
1626
+ Z as ak,
1627
+ It as al,
1628
+ Dn as am,
1629
+ Mn as an,
1630
+ Rn as ao,
1631
+ _n as ap,
1632
+ Fn as aq,
1633
+ un as ar,
1634
+ st as as,
1635
+ ln as at,
1636
+ Ae as au,
1637
+ At as av,
1638
+ vt as aw,
1639
+ Tt as ax,
1640
+ $n as ay,
1641
+ Lt as az,
1642
+ Qn as b,
1643
+ De as c,
1644
+ Q as d,
1645
+ Yn as e,
1646
+ Gn as f,
1647
+ Jn as g,
1648
+ Hn as h,
1649
+ Jt as i,
1650
+ Me as j,
1651
+ _t as k,
1651
1652
  xe as l,
1652
- Xn as m,
1653
- Zn as n,
1654
- er as o,
1655
- ir as p,
1656
- Me as q,
1657
- Un as r,
1658
- Re as s,
1659
- xt as t,
1660
- tr as u,
1661
- _e as v,
1662
- Ft as w,
1663
- nr as x,
1664
- rr as y,
1665
- ar as z
1653
+ er as m,
1654
+ tr as n,
1655
+ nr as o,
1656
+ cr as p,
1657
+ Re as q,
1658
+ Wn as r,
1659
+ _e as s,
1660
+ Rt as t,
1661
+ rr as u,
1662
+ Fe as v,
1663
+ $t as w,
1664
+ sr as x,
1665
+ ar as y,
1666
+ or as z
1666
1667
  };