react-semaphor 0.1.583 → 0.1.584

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 (86) hide show
  1. package/dist/analytics-protocol/index.js +183 -178
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +7 -7
  4. package/dist/briefings/index.js +4 -4
  5. package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
  6. package/dist/chunks/{assistant-chat-D3fm5qod.js → assistant-chat-nmycV1Se.js} +12 -12
  7. package/dist/chunks/{bookmark-impact-Dpxl46Wd.js → bookmark-impact-CI3gmxi0.js} +2 -2
  8. package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-D9-RFkDg.js} +22 -22
  9. package/dist/chunks/{card-filter-builder-IxkFVxy2.js → card-filter-builder-C7QyPqRy.js} +145 -145
  10. package/dist/chunks/{comparison-window-caption-sRFtnX1q.js → comparison-window-caption-BAnsTI8y.js} +291 -305
  11. package/dist/chunks/{dashboard-briefing-launcher-D45YfCkm.js → dashboard-briefing-launcher-DXs0XA1O.js} +13 -13
  12. package/dist/chunks/{dashboard-controls-DOvZRfof.js → dashboard-controls-6Zoo8d8Y.js} +84 -84
  13. package/dist/chunks/{dashboard-BMqG98fc.js → dashboard-inJy_V78.js} +1 -1
  14. package/dist/chunks/{dashboard-json-B_4TqF_o.js → dashboard-json-D5eJhVA9.js} +4 -4
  15. package/dist/chunks/{dates-44_rcNj2.js → dates-B3_GWc_Y.js} +8 -8
  16. package/dist/chunks/{edit-dashboard-visual-BBPKJWSe.js → edit-dashboard-visual-DR03SYeW.js} +17 -17
  17. package/dist/chunks/{filter-reach-copy-DWPq4Swi.js → filter-reach-copy-CZwzrxBp.js} +1391 -1228
  18. package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-DtOvqcjn.js} +8 -8
  19. package/dist/chunks/{index-DPRzcFp0.js → index-BgT1L0p5.js} +5 -5
  20. package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
  21. package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
  22. package/dist/chunks/{matrix-analytical-definition-D_HgptqZ.js → matrix-analytical-definition-Cs2v43FM.js} +2 -2
  23. package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
  24. package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
  25. package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-Be4uS3Ql.js} +1 -1
  26. package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
  27. package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
  28. package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-uH06jiZD.js} +1 -1
  29. package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-DvZY4eJM.js} +779 -765
  30. package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-BZexMfmL.js} +1 -1
  31. package/dist/chunks/{report-preferences-dialog-B8PhISua.js → report-preferences-dialog-DWeVe2so.js} +171 -170
  32. package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
  33. package/dist/chunks/{resolve-dashboard-input-context-BfT8y5xL.js → resolve-dashboard-input-context-uATCuOP7.js} +4988 -4892
  34. package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
  35. package/dist/chunks/{saved-dashboard-context-DH91-2B9.js → saved-dashboard-context-DSVV9iqW.js} +6 -6
  36. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
  37. package/dist/chunks/{semaphor-ready-indicator-Cg_Z2IDc.js → semaphor-ready-indicator-B9vvRMnJ.js} +45953 -44806
  38. package/dist/chunks/{shelf-drop-preview-context-C7-BgcP4.js → shelf-drop-preview-context-BHOnp5Bo.js} +5 -5
  39. package/dist/chunks/{stored-dashboard-BpyCiE49.js → stored-dashboard-xc5iidHL.js} +210 -221
  40. package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
  41. package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Cv_94obr.js} +1 -1
  42. package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
  43. package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
  44. package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
  45. package/dist/chunks/{variable-draft-D8GFhAkm.js → variable-draft-C3CjhsJQ.js} +4 -4
  46. package/dist/dashboard/index.js +2 -2
  47. package/dist/dashboard-authoring/index.js +403 -383
  48. package/dist/format-utils/index.js +140 -140
  49. package/dist/index.js +234 -231
  50. package/dist/report-runtime-context/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/surfboard/index.js +2 -2
  53. package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
  54. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
  55. package/dist/types/index.js +5 -5
  56. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  57. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
  58. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
  59. package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
  60. package/dist/types/lib/see-records/click.d.ts +79 -0
  61. package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
  62. package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
  63. package/dist/types/lib/types/common-types.d.ts +6 -0
  64. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
  65. package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
  66. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  67. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
  68. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -0
  69. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  70. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  71. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -0
  72. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  73. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  74. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  75. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  76. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +11 -0
  77. package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
  78. package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
  79. package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
  80. package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
  81. package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +46 -0
  82. package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
  83. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +61 -0
  84. package/dist/types/shared/usage-events/envelope.d.ts +4 -4
  85. package/package.json +1 -1
  86. package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
@@ -1,15 +1,15 @@
1
- import { av as Ye, i as Ze, k as j, n as Je, L as De, aw as ie, ax as Ae, ay as Qe, az as ke, aA as Ne, ai as et, an as tt, aj as rt, a as nt, b as B, a0 as pe, ac as ot, _ as at, ad as st, f as it, q as he, t as ct, S as be, U as lt, W as ut, a1 as mt, aB as A, aC as U } from "./pivot-result-contract-expectations-8tuNjRvG.js";
2
- import { h as W, e as dt, p as ft, k as pt } from "./export-file-format-C-tJsxsf.js";
3
- import { aU as K, a5 as ht, m as G, aT as bt, j as yt, r as Y } from "./validators-B8fpdinG.js";
4
- import "./matrix-operation-contract-DCVinw1o.js";
1
+ import { aC as We, i as Ye, k as j, n as Ze, T as Me, aD as ie, aE as ke, aF as Je, aG as Ae, aH as Ne, ap as Qe, au as et, aq as tt, a as rt, b as B, a7 as pe, aj as nt, a5 as ot, ak as at, f as st, q as he, t as it, Z as be, $ as ct, a1 as lt, a8 as ut, aI as k, aJ as U } from "./pivot-result-contract-expectations-DvZY4eJM.js";
2
+ import { h as W, e as mt, p as dt, k as ft } from "./export-file-format-C-tJsxsf.js";
3
+ import { aU as K, a5 as pt, m as q, aT as ht, j as bt, r as Y } from "./validators-CJ8Jh0E8.js";
4
+ import "./matrix-operation-contract-BM5TveR3.js";
5
5
  import "./analytics-base-schemas-BaIQrEzX.js";
6
- import { readPdfCapacityFacts as gt, PDF_SAFETY_LIMIT_EXCEEDED as ce, PDF_CAPACITY as D, PDF_NUMBER_COLUMN_TOO_WIDE as Re, getUtf8ByteLength as wt, FAST_PDF_POLICY as Ct, isPdfCapacityRefusalCode as vt } from "../pdf-export-policy/index.js";
7
- import { p as _t } from "./pivot-header-presentation-MvvlxtIB.js";
8
- import { c as xt, b as ye } from "./pivot-result-identity-B89X5xjb.js";
9
- import { v as Tt, c as Et } from "./raw-temporal-value-DdT0s47W.js";
10
- import { a as Oe } from "./metric-comparison-n9NsIa-2.js";
6
+ import { readPdfCapacityFacts as yt, PDF_SAFETY_LIMIT_EXCEEDED as ce, PDF_CAPACITY as M, PDF_NUMBER_COLUMN_TOO_WIDE as Re, getUtf8ByteLength as gt, FAST_PDF_POLICY as wt, isPdfCapacityRefusalCode as vt } from "../pdf-export-policy/index.js";
7
+ import { p as Ct } from "./pivot-header-presentation-uH06jiZD.js";
8
+ import { c as xt, b as ye } from "./pivot-result-identity-BZexMfmL.js";
9
+ import { v as Tt, c as _t } from "./raw-temporal-value-DdT0s47W.js";
10
+ import { a as Oe } from "./metric-comparison-Be4uS3Ql.js";
11
11
  import "../value-format-preferences/index.js";
12
- function $t(e, t, r) {
12
+ function Et(e, t, r) {
13
13
  const n = {
14
14
  ...t,
15
15
  locale: t.locale ?? r
@@ -23,12 +23,12 @@ function $t(e, t, r) {
23
23
  })}${c ?? ""}`;
24
24
  }
25
25
  function ee(e, t, r) {
26
- return e === null ? { value: e, text: null } : !t || !Ze(t) && t.type !== "duration" ? {
26
+ return e === null ? { value: e, text: null } : !t || !Ye(t) && t.type !== "duration" ? {
27
27
  value: e,
28
28
  text: j(e, { type: "number", locale: r })
29
29
  } : t.type === "duration" ? {
30
30
  value: e,
31
- text: Je(e, {
31
+ text: Ze(e, {
32
32
  inputUnit: t.inputUnit,
33
33
  outputStyle: t.outputStyle,
34
34
  largestUnit: t.largestUnit,
@@ -38,7 +38,7 @@ function ee(e, t, r) {
38
38
  suffix: t.suffix,
39
39
  negativeInParentheses: t.negativeStyle === "parentheses"
40
40
  })
41
- } : { value: e, text: $t(e, t, r) };
41
+ } : { value: e, text: Et(e, t, r) };
42
42
  }
43
43
  function ge(e, t, r, n) {
44
44
  return e === null ? { value: e, text: null } : n === "percent" ? {
@@ -67,7 +67,7 @@ function we(e, t) {
67
67
  throw new RangeError("Comparison precision must be an integer from 0 to 6.");
68
68
  return e;
69
69
  }
70
- function Or(e, t) {
70
+ function Nr(e, t) {
71
71
  const r = {
72
72
  mode: t.displayMode,
73
73
  current: ee(
@@ -83,7 +83,7 @@ function Or(e, t) {
83
83
  };
84
84
  return (t.displayMode === "difference" || t.displayMode === "both") && (r.difference = ee(
85
85
  e.delta,
86
- Ye(t.metricFormat),
86
+ We(t.metricFormat),
87
87
  t.locale
88
88
  )), (t.displayMode === "percent_change" || t.displayMode === "both") && (r.percentChange = ge(
89
89
  e.percentChange,
@@ -97,19 +97,19 @@ function Or(e, t) {
97
97
  "ratio"
98
98
  )), r;
99
99
  }
100
- const Ft = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
101
- function St(e) {
100
+ const $t = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
101
+ function Ft(e) {
102
102
  const { presentation: t } = e;
103
- return e.formattedValues ? (t == null ? void 0 : t.kind) === "text" || (t == null ? void 0 : t.kind) === "measure" && t.format.type === "duration" ? "text" : (t == null ? void 0 : t.kind) === "temporal_bucket" ? Ft.has(t.grain) ? "date" : "text" : (t == null ? void 0 : t.kind) === "datetime" ? "date" : e.dataType === "number" ? "number" : e.dataType === "boolean" ? "boolean" : e.dataType === "unknown" ? "by_value" : "text" : "by_value";
103
+ return e.formattedValues ? (t == null ? void 0 : t.kind) === "text" || (t == null ? void 0 : t.kind) === "measure" && t.format.type === "duration" ? "text" : (t == null ? void 0 : t.kind) === "temporal_bucket" ? $t.has(t.grain) ? "date" : "text" : (t == null ? void 0 : t.kind) === "datetime" ? "date" : e.dataType === "number" ? "number" : e.dataType === "boolean" ? "boolean" : e.dataType === "unknown" ? "by_value" : "text" : "by_value";
104
104
  }
105
- function Lt(e) {
105
+ function St(e) {
106
106
  const t = (o, c) => Number.isInteger(o) ? Math.min(20, Math.max(0, o)) : c, r = t(e.minimumFractionDigits, 0), n = Math.max(r, t(e.maximumFractionDigits, 2));
107
107
  return n === 0 ? "" : `.${"0".repeat(n)}`;
108
108
  }
109
109
  function te(e) {
110
110
  return `"${e.replace(/"/g, "")}"`;
111
111
  }
112
- function Pt(e) {
112
+ function Lt(e) {
113
113
  let t;
114
114
  try {
115
115
  t = new Intl.NumberFormat(e.locale ?? "en-US", {
@@ -127,25 +127,25 @@ function Pt(e) {
127
127
  text: o(n + 1, r) + t[r].value
128
128
  };
129
129
  }
130
- function It(e) {
131
- const t = Lt(e);
130
+ function Pt(e) {
131
+ const t = St(e);
132
132
  let r;
133
133
  if (e.type === "scientific")
134
134
  r = `0${t}E+00`;
135
135
  else {
136
136
  const n = `${e.useGrouping === !1 ? "0" : "#,##0"}${t}`;
137
137
  if (e.type === "currency") {
138
- const o = Pt(e);
138
+ const o = Lt(e);
139
139
  r = o ? o.side === "before" ? `${te(o.text)}${n}` : `${n}${te(o.text)}` : n;
140
140
  } else e.type === "percent" ? r = e.percentValueMode === "whole" ? `${n}${te("%")}` : `${n}%` : r = n;
141
141
  }
142
142
  return e.negativeStyle === "parentheses" ? `${r};(${r})` : r;
143
143
  }
144
- function Mt(e, t) {
144
+ function It(e, t) {
145
145
  if (!e.formattedValues) return;
146
146
  const { presentation: r } = e;
147
147
  if (t === "number" || t === "by_value")
148
- return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : It(r.format);
148
+ return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : Pt(r.format);
149
149
  if (t === "date") {
150
150
  if ((r == null ? void 0 : r.kind) === "temporal_bucket")
151
151
  return r.grain === "day" ? "yyyy-mm-dd" : r.grain === "month" ? "mmm yyyy" : "yyyy-mm-dd hh:mm";
@@ -153,8 +153,8 @@ function Mt(e, t) {
153
153
  return r.dateOnly ? "yyyy-mm-dd" : "yyyy-mm-dd hh:mm:ss";
154
154
  }
155
155
  }
156
- function Ce(e) {
157
- const t = St(e), r = Mt(e, t);
156
+ function ve(e) {
157
+ const t = Ft(e), r = It(e, t);
158
158
  return Object.freeze({
159
159
  key: e.key,
160
160
  label: e.label,
@@ -162,18 +162,18 @@ function Ce(e) {
162
162
  ...r === void 0 ? {} : { numberFormat: r }
163
163
  });
164
164
  }
165
- const Dt = 15, At = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
165
+ const Dt = 15, Mt = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
166
166
  function Ue(e) {
167
- return At.test(e) ? e : void 0;
167
+ return Mt.test(e) ? e : void 0;
168
168
  }
169
- function ve(e) {
169
+ function Ce(e) {
170
170
  const r = e.replace(/^-/, "").replace(/[eE].*$/, "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "");
171
171
  if (r.length > Dt) return !1;
172
172
  const n = Number(e);
173
173
  return Number.isFinite(n) && (n !== 0 || r.length === 0);
174
174
  }
175
- const kt = Date.UTC(1900, 2, 1), Nt = Date.UTC(1e4, 0, 1), Rt = Date.UTC(1899, 11, 30), Ot = 864e5;
176
- function Ut(e) {
175
+ const kt = Date.UTC(1900, 2, 1), At = Date.UTC(1e4, 0, 1), Nt = Date.UTC(1899, 11, 30), Rt = 864e5;
176
+ function Ot(e) {
177
177
  const t = Date.UTC(
178
178
  e.year,
179
179
  e.month - 1,
@@ -182,20 +182,20 @@ function Ut(e) {
182
182
  e.minute,
183
183
  e.second
184
184
  );
185
- if (!(e.year < 1900 || !Number.isFinite(t)) && !(t < kt || t >= Nt))
186
- return (t - Rt) / Ot;
185
+ if (!(e.year < 1900 || !Number.isFinite(t)) && !(t < kt || t >= At))
186
+ return (t - Nt) / Rt;
187
187
  }
188
- function _e(e, t, r) {
188
+ function xe(e, t, r) {
189
189
  if (typeof e == "number")
190
190
  return Number.isFinite(e) ? { kind: "number", text: t, value: e } : void 0;
191
191
  if (K(e))
192
- return ve(e.value) ? { kind: "number", text: t, value: e } : void 0;
192
+ return Ce(e.value) ? { kind: "number", text: t, value: e } : void 0;
193
193
  if (r && typeof e == "string") {
194
194
  const n = Ue(e);
195
- return n !== void 0 && ve(n) ? { kind: "number", text: t, value: n } : void 0;
195
+ return n !== void 0 && Ce(n) ? { kind: "number", text: t, value: n } : void 0;
196
196
  }
197
197
  }
198
- function X(e) {
198
+ function z(e) {
199
199
  const { value: t, text: r, column: n } = e;
200
200
  if (r === "") return { kind: "empty" };
201
201
  const o = { kind: "text", text: r };
@@ -203,32 +203,25 @@ function X(e) {
203
203
  case "text":
204
204
  return o;
205
205
  case "date": {
206
- const c = e.wallClock ? Ut(e.wallClock) : void 0;
206
+ const c = e.wallClock ? Ot(e.wallClock) : void 0;
207
207
  return c === void 0 ? o : { kind: "date", text: r, serial: c };
208
208
  }
209
209
  case "number":
210
- return _e(t, r, !0) ?? o;
210
+ return xe(t, r, !0) ?? o;
211
211
  case "boolean":
212
212
  return typeof t == "boolean" ? { kind: "boolean", text: r, value: t } : o;
213
213
  case "by_value":
214
- return typeof t == "boolean" ? { kind: "boolean", text: r, value: t } : _e(t, r, !1) ?? o;
214
+ return typeof t == "boolean" ? { kind: "boolean", text: r, value: t } : xe(t, r, !1) ?? o;
215
215
  }
216
216
  }
217
- function Ur(e) {
217
+ function Rr(e) {
218
218
  return e.kind === "empty" ? "" : e.text;
219
219
  }
220
- const je = 1e4, jt = 1e6, jr = 5e6, Kr = 1024 ** 3, Vr = 1024 ** 3;
221
- function Br(e) {
222
- return e > je;
223
- }
224
- function Xr(e) {
225
- return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= je ? "direct" : e.loadedRowCount <= jt ? "background" : "blocked";
226
- }
227
- const zr = {
220
+ const Or = {
228
221
  rowLabels: "tabular",
229
222
  subtotals: "after"
230
223
  };
231
- function Hr(e, t) {
224
+ function Ur(e, t) {
232
225
  const r = t.rowLabels === "outline" ? { kind: "compact" } : e.layout.kind === "tabular" ? e.layout : { kind: "tabular", repeatLabels: !1 }, n = e.totals.rows;
233
226
  return {
234
227
  ...e,
@@ -247,13 +240,13 @@ function Hr(e, t) {
247
240
  }
248
241
  };
249
242
  }
250
- const Kt = 2;
251
- function Vt(e) {
243
+ const Ut = 2;
244
+ function jt(e) {
252
245
  return typeof e == "number" ? Number.isInteger(e) : K(e) ? !e.value.includes(".") : !0;
253
246
  }
254
- function Bt(e, t, r) {
247
+ function Kt(e, t, r) {
255
248
  const n = e.descriptors.measures.filter(
256
- (s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && ht(s.column.dataType) === "number"
249
+ (s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && pt(s.column.dataType) === "number"
257
250
  );
258
251
  if (n.length === 0) return r;
259
252
  const o = /* @__PURE__ */ new Set();
@@ -261,7 +254,7 @@ function Bt(e, t, r) {
261
254
  if (!(s.kind !== "measure" || o.has(s.measureId)))
262
255
  for (const f of t) {
263
256
  const h = f.values[l];
264
- if ((h == null ? void 0 : h.kind) === "value" && !Vt(h.value)) {
257
+ if ((h == null ? void 0 : h.kind) === "value" && !jt(h.value)) {
265
258
  o.add(s.measureId);
266
259
  return;
267
260
  }
@@ -269,7 +262,7 @@ function Bt(e, t, r) {
269
262
  });
270
263
  const c = { ...r.measureFormats };
271
264
  for (const { id: s } of n) {
272
- const l = o.has(s) ? Kt : 0;
265
+ const l = o.has(s) ? Ut : 0;
273
266
  c[s] = {
274
267
  type: "number",
275
268
  minimumFractionDigits: l,
@@ -279,38 +272,38 @@ function Bt(e, t, r) {
279
272
  }
280
273
  return { ...r, measureFormats: c };
281
274
  }
282
- function z(e) {
283
- return G(e.slice(0, -1));
275
+ function H(e) {
276
+ return q(e.slice(0, -1));
284
277
  }
285
- function Xt(e, t) {
286
- return t.length > e.length && G(t.slice(0, e.length)) === G(e);
278
+ function Vt(e, t) {
279
+ return t.length > e.length && q(t.slice(0, e.length)) === q(e);
287
280
  }
288
- function zt(e) {
281
+ function Bt(e) {
289
282
  return e.map((t, r) => {
290
283
  if (r === 0 || t.kind !== "layout") return !1;
291
284
  const n = e[r - 1];
292
285
  if (n.kind !== "layout") return !1;
293
- if (t.role !== "member" || Xt(n.rowPath, t.rowPath)) return !0;
286
+ if (t.role !== "member" || Vt(n.rowPath, t.rowPath)) return !0;
294
287
  const o = e[r - 2];
295
- return n.role === "member" && (!o || o.kind !== "layout" || o.role !== "member" || z(o.rowPath) !== z(n.rowPath)) && t.rowPath.length === n.rowPath.length && z(t.rowPath) === z(n.rowPath);
288
+ return n.role === "member" && (!o || o.kind !== "layout" || o.role !== "member" || H(o.rowPath) !== H(n.rowPath)) && t.rowPath.length === n.rowPath.length && H(t.rowPath) === H(n.rowPath);
296
289
  });
297
290
  }
298
- const Ht = "pdf-group-continuation";
299
- function Ke(e, t, r) {
291
+ const zt = "pdf-group-continuation";
292
+ function je(e, t, r) {
300
293
  return !(r != null && r.hasTextAffixes) && t.kind === "value" && (typeof t.value == "number" || K(t.value)) ? e : W(e);
301
294
  }
302
- function Gt(e, t, r) {
303
- const n = De(e.descriptors, t.presentation, r), o = e.columns.map((u) => {
295
+ function Ht(e, t, r) {
296
+ const n = Me(e.descriptors, t.presentation, r), o = e.columns.map((u) => {
304
297
  var a;
305
298
  return u.kind === "measure" && ((a = n.measureSemantics.get(u.measureId)) == null ? void 0 : a.isNumeric) === !0;
306
- }), c = (u) => ie([u], n.levels), s = (u, a, m) => Ae(u, a, t.presentation.totals[m], n.levels), l = e.columns.map((u) => {
299
+ }), c = (u) => ie([u], n.levels), s = (u, a, m) => ke(u, a, t.presentation.totals[m], n.levels), l = e.columns.map((u) => {
307
300
  if (u.kind !== "measure") return u.label;
308
301
  const a = u.columnPath.map(c);
309
302
  return u.role !== "member" && a.push(s(u.columnPath, u.role, "columns")), [...a, u.label].join(" / ");
310
303
  }), f = Math.min(t.spec.columns.length, Math.max(
311
304
  0,
312
305
  ...e.columns.map((u) => u.kind === "measure" ? u.columnPath.length + (u.role !== "member" ? 1 : 0) : 0)
313
- )), h = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? c(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), d = (u, a) => Qe({
306
+ )), h = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? c(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), d = (u, a) => Je({
314
307
  path: u.rowPath,
315
308
  role: u.kind === "layout" ? u.role : "member",
316
309
  levelCount: Math.max(1, t.spec.rows.length),
@@ -324,17 +317,17 @@ function Gt(e, t, r) {
324
317
  if (y.kind === "hierarchy")
325
318
  return `${" ".repeat(Math.max(0, u.rowPath.length - 1))}${s(u.rowPath, u.role, "rows")}`;
326
319
  if (y.kind === "level") {
327
- const C = t.spec.rows.findIndex((S) => S.id === y.levelId), _ = m[C];
328
- return _ != null && _.visible ? _.total ? s(u.rowPath, u.role, "rows") : ie(_.path, n.levels) : "";
320
+ const v = t.spec.rows.findIndex((S) => S.id === y.levelId), x = m[v];
321
+ return x != null && x.visible ? x.total ? s(u.rowPath, u.role, "rows") : ie(x.path, n.levels) : "";
329
322
  }
330
- const v = u.values[b], w = n.measures.get(y.measureId);
331
- if (v.kind === "value" && !w)
323
+ const C = u.values[b], w = n.measures.get(y.measureId);
324
+ if (C.kind === "value" && !w)
332
325
  throw new Error("Matrix value is missing its measure descriptor.");
333
- return ke(v, w, t.presentation.absence);
326
+ return Ae(C, w, t.presentation.absence);
334
327
  });
335
- }, x = (u, a) => p(u, a).map((m, y) => {
328
+ }, T = (u, a) => p(u, a).map((m, y) => {
336
329
  const b = e.columns[y];
337
- return b.kind === "measure" ? Ke(m, u.values[y], n.measureSemantics.get(b.measureId)) : W(m);
330
+ return b.kind === "measure" ? je(m, u.values[y], n.measureSemantics.get(b.measureId)) : W(m);
338
331
  });
339
332
  return {
340
333
  headers: l,
@@ -354,14 +347,14 @@ function Gt(e, t, r) {
354
347
  const m = (b) => (b == null ? void 0 : b.kind) === "layout" && b.role === "member";
355
348
  if (!m(u) || !m(a)) return [];
356
349
  const y = d(u, a);
357
- return e.columns.flatMap((b, v) => {
358
- var C;
350
+ return e.columns.flatMap((b, C) => {
351
+ var v;
359
352
  if (b.kind !== "level") return [];
360
- const w = t.spec.rows.findIndex((_) => _.id === b.levelId);
361
- return w < u.rowPath.length && ((C = y[w]) == null ? void 0 : C.visible) === !1 ? [v] : [];
353
+ const w = t.spec.rows.findIndex((x) => x.id === b.levelId);
354
+ return w < u.rowPath.length && ((v = y[w]) == null ? void 0 : v.visible) === !1 ? [C] : [];
362
355
  });
363
356
  },
364
- csvRow: (u) => x(u),
357
+ csvRow: (u) => T(u),
365
358
  /**
366
359
  * `previousRow` is the row before `data[0]`, carried by the export's
367
360
  * continuation, so a tabular layout prints each label once across the
@@ -369,19 +362,19 @@ function Gt(e, t, r) {
369
362
  * formatter state or an earlier worker. Without it, the first row prints
370
363
  * its labels.
371
364
  */
372
- csvRows: (u, a) => u.map((m, y) => x(m, y ? u[y - 1] : a ?? void 0))
365
+ csvRows: (u, a) => u.map((m, y) => T(m, y ? u[y - 1] : a ?? void 0))
373
366
  };
374
367
  }
375
- function Gr(e) {
368
+ function jr(e) {
376
369
  return e.columns.map((t) => W(t.label));
377
370
  }
378
- function qr(e, t, r) {
379
- return qt(e, t, r).map((n, o) => {
371
+ function Kr(e, t, r) {
372
+ return Gt(e, t, r).map((n, o) => {
380
373
  const c = t.columns[o];
381
- return c.kind === "measure" ? Ke(n, e.values[o], r.measureSemantics.get(c.measureId)) : W(n);
374
+ return c.kind === "measure" ? je(n, e.values[o], r.measureSemantics.get(c.measureId)) : W(n);
382
375
  });
383
376
  }
384
- function qt(e, t, r) {
377
+ function Gt(e, t, r) {
385
378
  if (e.kind !== "flat") throw new Error("Flat Matrix CSV requires flat rows.");
386
379
  if (e.values.length !== t.columns.length) throw new Error("Matrix row does not match its frozen layout.");
387
380
  const n = [...e.rowPath, ...e.columnPath];
@@ -389,15 +382,15 @@ function qt(e, t, r) {
389
382
  if (o.kind === "measure") {
390
383
  const l = e.values[c], f = r.measures.get(o.measureId);
391
384
  if (l.kind === "value" && !f) throw new Error("Matrix value is missing its measure descriptor.");
392
- return ke(l, f, r.absence);
385
+ return Ae(l, f, r.absence);
393
386
  }
394
387
  const s = o.kind === "level" ? n.find((l) => l.levelId === o.levelId) : void 0;
395
388
  if (!s) throw new Error("Flat Matrix row does not match its frozen layout.");
396
389
  return ie([s], r.levels);
397
390
  });
398
391
  }
399
- function Wt(e) {
400
- const t = Gt(e.layout, e.request, e.report), r = e.layout.columns.map((s, l) => ({
392
+ function qt(e) {
393
+ const t = Ht(e.layout, e.request, e.report), r = e.layout.columns.map((s, l) => ({
401
394
  index: l,
402
395
  columnId: `matrix:${l}`,
403
396
  label: t.headers[l],
@@ -442,7 +435,7 @@ function Wt(e) {
442
435
  subtotalLevel: String(s.rowPath.length),
443
436
  // A tabular layout prints each label once unless it repeats them; the
444
437
  // blank cell continues its group, so a grid draws no rule above it.
445
- cells: t.row(s, e.rows[l - 1]).map((h, d) => f.has(d) ? { ...n(h, d, !1), className: Ht } : n(h, d, !1))
438
+ cells: t.row(s, e.rows[l - 1]).map((h, d) => f.has(d) ? { ...n(h, d, !1), className: zt } : n(h, d, !1))
446
439
  };
447
440
  }),
448
441
  grandTotal: null,
@@ -459,12 +452,12 @@ function Wt(e) {
459
452
  }
460
453
  };
461
454
  }
462
- function Yt(e, t, r) {
463
- const { levels: n } = De(e.descriptors, t.presentation, r), o = t.spec.columns.length > 0, c = [], s = [], l = e.columns.map((h, d) => {
455
+ function Xt(e, t, r) {
456
+ const { levels: n } = Me(e.descriptors, t.presentation, r), o = t.spec.columns.length > 0, c = [], s = [], l = e.columns.map((h, d) => {
464
457
  if (h.kind !== "measure") return null;
465
- const p = o ? `${h.role}:${G(h.columnPath)}` : `measure:${d}`;
466
- let x = c.indexOf(p);
467
- return x < 0 && (x = c.push(p) - 1, s.push(o ? Ae(h.columnPath, h.role, t.presentation.totals.columns, n) : h.label)), x;
458
+ const p = o ? `${h.role}:${q(h.columnPath)}` : `measure:${d}`;
459
+ let T = c.indexOf(p);
460
+ return T < 0 && (T = c.push(p) - 1, s.push(o ? ke(h.columnPath, h.role, t.presentation.totals.columns, n) : h.label)), T;
468
461
  }), f = t.spec.columns[t.spec.columns.length - 1];
469
462
  return {
470
463
  columnGroups: l,
@@ -473,52 +466,52 @@ function Yt(e, t, r) {
473
466
  groupLevelLabel: f ? Ne(f, t.presentation) : "Measures"
474
467
  };
475
468
  }
476
- function Wr(e) {
469
+ function Vr(e) {
477
470
  const { layout: t, rows: r, report: n } = e, o = {
478
471
  ...e.request,
479
- presentation: Bt(t, r, e.request.presentation)
480
- }, c = Wt({ layout: t, rows: r, request: o, report: n }), s = zt(r), l = Yt(t, o, n), f = {
472
+ presentation: Kt(t, r, e.request.presentation)
473
+ }, c = qt({ layout: t, rows: r, request: o, report: n }), s = Bt(r), l = Xt(t, o, n), f = {
481
474
  ...c,
482
475
  rows: c.rows.map((h, d) => ({ ...h, keepWithPrevious: s[d] })),
483
476
  metadata: { ...c.metadata, ...l }
484
477
  };
485
478
  return { request: o, table: f, ...l };
486
479
  }
487
- const F = (e) => e.toLocaleString("en-US"), H = (e) => `${F(Math.ceil(e / 1048576))} MB`, re = "export the data as CSV or Excel";
488
- function Yr(e) {
489
- const t = gt(e.facts), r = e.dataExport ? `Add a filter to narrow it, or ${re}.` : "Add a filter to narrow it, then export again.";
480
+ const F = (e) => e.toLocaleString("en-US"), G = (e) => `${F(Math.ceil(e / 1048576))} MB`, re = "export the data as CSV or Excel";
481
+ function Br(e) {
482
+ const t = yt(e.facts), r = e.dataExport ? `Add a filter to narrow it, or ${re}.` : "Add a filter to narrow it, then export again.";
490
483
  switch (e.code) {
491
484
  case "PDF_ROW_LIMIT_EXCEEDED": {
492
- const n = e.subject ?? "This table", o = t.rowLimit ?? D.maxTableRows;
485
+ const n = e.subject ?? "This table", o = t.rowLimit ?? M.maxTableRows;
493
486
  return t.rowCount !== void 0 ? `${n} has ${F(t.rowCount)} rows. A PDF holds up to ${F(o)} rows per table. ${r}` : `${n} has more than ${F(o)} rows, the most a PDF holds per table. ${r}`;
494
487
  }
495
488
  case "PDF_PAGE_LIMIT_EXCEEDED": {
496
- const n = e.subject ?? "This PDF", o = t.pageLimit ?? D.maxPages;
489
+ const n = e.subject ?? "This PDF", o = t.pageLimit ?? M.maxPages;
497
490
  return t.pageCount !== void 0 ? `${n} is ${F(t.pageCount)} pages. A PDF holds up to ${F(o)}. ${r}` : `${n} is longer than ${F(o)} pages, the most a PDF holds. ${r}`;
498
491
  }
499
492
  case "PDF_SIZE_LIMIT_EXCEEDED": {
500
- const n = e.subject ?? "This PDF", o = t.byteLimit ?? D.maxFileBytes;
501
- return t.bytes !== void 0 ? `${n} is ${H(t.bytes)}. A PDF file holds up to ${H(o)}. ${r}` : `${n} is larger than ${H(o)}, the most a PDF file holds. ${r}`;
493
+ const n = e.subject ?? "This PDF", o = t.byteLimit ?? M.maxFileBytes;
494
+ return t.bytes !== void 0 ? `${n} is ${G(t.bytes)}. A PDF file holds up to ${G(o)}. ${r}` : `${n} is larger than ${G(o)}, the most a PDF file holds. ${r}`;
502
495
  }
503
496
  case "PDF_CAPTURE_TOO_TALL":
504
497
  return `${e.subject ?? "This dashboard"} is too long to print as one PDF. Print one sheet or fewer cards${e.dataExport ? `, or ${re}` : ""}.`;
505
498
  case Re:
506
499
  return `A number in this table is too wide for its column in a PDF. Use landscape or fewer columns${e.dataExport ? `, or ${re}` : ""}.`;
507
500
  case ce:
508
- return `This PDF is over what a PDF holds: ${F(D.maxTableRows)} rows per table, ${F(
509
- D.maxPages
510
- )} pages and ${H(D.maxFileBytes)}. ${r}`;
501
+ return `This PDF is over what a PDF holds: ${F(M.maxTableRows)} rows per table, ${F(
502
+ M.maxPages
503
+ )} pages and ${G(M.maxFileBytes)}. ${r}`;
511
504
  }
512
505
  }
513
- class Zt extends Error {
506
+ class Wt extends Error {
514
507
  constructor(t, r = ce) {
515
508
  super(t), this.code = r;
516
509
  }
517
510
  }
518
- function Jt(e) {
511
+ function Yt(e) {
519
512
  return vt(e) || e === ce || e === Re;
520
513
  }
521
- function xe(e) {
514
+ function Te(e) {
522
515
  if (!e || typeof e != "object")
523
516
  return;
524
517
  const { error: t, message: r, detail: n } = e;
@@ -526,12 +519,12 @@ function xe(e) {
526
519
  if (typeof o == "string" && o.trim())
527
520
  return o.trim();
528
521
  }
529
- async function Qt(e) {
522
+ async function Zt(e) {
530
523
  const t = `PDF request failed: ${e.status} ${e.statusText}`.trim(), r = e.headers.get("content-type") || "";
531
524
  try {
532
525
  if (r.includes("application/json")) {
533
526
  const o = await e.json(), c = typeof o.code == "string" ? o.code : typeof o.errorCode == "string" ? o.errorCode : void 0;
534
- return { message: xe(o) || t, code: c };
527
+ return { message: Te(o) || t, code: c };
535
528
  }
536
529
  const n = await e.text();
537
530
  if (!n.trim())
@@ -539,7 +532,7 @@ async function Qt(e) {
539
532
  try {
540
533
  const o = JSON.parse(n), c = typeof o.code == "string" ? o.code : typeof o.errorCode == "string" ? o.errorCode : void 0;
541
534
  return {
542
- message: xe(o) || n.trim(),
535
+ message: Te(o) || n.trim(),
543
536
  code: c
544
537
  };
545
538
  } catch {
@@ -549,9 +542,9 @@ async function Qt(e) {
549
542
  return { message: t };
550
543
  }
551
544
  }
552
- async function Zr(e) {
545
+ async function zr(e) {
553
546
  if (!e.token) throw new Error("Missing auth token for PDF export");
554
- if (wt(e.serializedPayload) > Ct.maxRequestBytes)
547
+ if (gt(e.serializedPayload) > wt.maxRequestBytes)
555
548
  throw new Error("Fast-path PDF request exceeds the structured body limit");
556
549
  const t = await (e.fetchImpl ?? fetch)(e.url, {
557
550
  method: "POST",
@@ -560,8 +553,8 @@ async function Zr(e) {
560
553
  signal: e.signal
561
554
  });
562
555
  if (!t.ok) {
563
- const n = await Qt(t);
564
- throw Jt(n.code) ? new Zt(n.message, n.code) : new Error(n.message);
556
+ const n = await Zt(t);
557
+ throw Yt(n.code) ? new Wt(n.message, n.code) : new Error(n.message);
565
558
  }
566
559
  const r = await t.json();
567
560
  if (r != null && r.error) throw new Error(r.error);
@@ -569,7 +562,7 @@ async function Zr(e) {
569
562
  throw new Error("Fast-path PDF response missing download URL");
570
563
  return r;
571
564
  }
572
- const Jr = 1, Ve = ["loading", "measuring", "checking", "laidOut"], er = [
565
+ const Hr = 1, Ke = ["loading", "measuring", "checking", "laidOut"], Jt = [
573
566
  // Already emitted before these contracts; names kept.
574
567
  "document_matrix_too_large",
575
568
  "document_matrix_unavailable",
@@ -589,10 +582,10 @@ const Jr = 1, Ve = ["loading", "measuring", "checking", "laidOut"], er = [
589
582
  // PDF capacity contract PC-D3: more pages than one PDF holds.
590
583
  "document_page_limit_exceeded"
591
584
  ];
592
- function Qr(e) {
593
- return er.includes(e);
585
+ function Gr(e) {
586
+ return Jt.includes(e);
594
587
  }
595
- const tr = 64, rr = 120, nr = 3, or = 80, ar = [...Ve, "noPageStack", "unknown"];
588
+ const Qt = 64, er = 120, tr = 3, rr = 80, nr = [...Ke, "noPageStack", "unknown"];
596
589
  function ne(e, t) {
597
590
  return typeof e != "string" ? void 0 : e.trim().slice(0, t).trim() || void 0;
598
591
  }
@@ -602,7 +595,7 @@ function $(e, t) {
602
595
  function oe(e, t) {
603
596
  return t.includes(e) ? e : void 0;
604
597
  }
605
- function sr(e) {
598
+ function or(e) {
606
599
  let t = e;
607
600
  if (typeof e == "string")
608
601
  try {
@@ -611,9 +604,9 @@ function sr(e) {
611
604
  return {};
612
605
  }
613
606
  if (!t || typeof t != "object" || Array.isArray(t)) return {};
614
- const r = t, n = Array.isArray(r.inputLabels) ? r.inputLabels.map((c) => ne(c, or)).filter((c) => c !== void 0).slice(0, nr) : [], o = {
615
- sectionId: ne(r.sectionId, tr),
616
- sectionTitle: ne(r.sectionTitle, rr),
607
+ const r = t, n = Array.isArray(r.inputLabels) ? r.inputLabels.map((c) => ne(c, rr)).filter((c) => c !== void 0).slice(0, tr) : [], o = {
608
+ sectionId: ne(r.sectionId, Qt),
609
+ sectionTitle: ne(r.sectionTitle, er),
617
610
  pageNumber: $(r.pageNumber, 1),
618
611
  rowCount: $(r.rowCount, 0),
619
612
  rowLimit: $(r.rowLimit, 1),
@@ -621,7 +614,7 @@ function sr(e) {
621
614
  overflowAxis: oe(r.overflowAxis, ["height", "width"]),
622
615
  overflowPx: $(r.overflowPx, 0),
623
616
  matrixLimit: oe(r.matrixLimit, ["rows", "bytes"]),
624
- layoutStage: oe(r.layoutStage, ar),
617
+ layoutStage: oe(r.layoutStage, nr),
625
618
  loadingSectionCount: $(r.loadingSectionCount, 0),
626
619
  measuredRowCount: $(r.measuredRowCount, 0),
627
620
  totalRowCount: $(r.totalRowCount, 0),
@@ -632,8 +625,8 @@ function sr(e) {
632
625
  Object.entries(o).filter(([, c]) => c !== void 0)
633
626
  );
634
627
  }
635
- function en(e) {
636
- const t = sr(e.facts), r = t.sectionTitle ? `Section "${t.sectionTitle}"` : t.sectionId ? `Section ${t.sectionId}` : "A section", n = t.pageNumber !== void 0 ? ` on page ${t.pageNumber}` : "";
628
+ function qr(e) {
629
+ const t = or(e.facts), r = t.sectionTitle ? `Section "${t.sectionTitle}"` : t.sectionId ? `Section ${t.sectionId}` : "A section", n = t.pageNumber !== void 0 ? ` on page ${t.pageNumber}` : "";
637
630
  switch (e.code) {
638
631
  case "document_section_setup":
639
632
  return `${r} is not set up to print.`;
@@ -673,13 +666,13 @@ function en(e) {
673
666
  ].join("");
674
667
  }
675
668
  }
676
- function ir(e) {
677
- return Ve.includes(e);
669
+ function ar(e) {
670
+ return Ke.includes(e);
678
671
  }
679
672
  function ae(e) {
680
673
  return typeof e == "number" && Number.isInteger(e) && e >= 0;
681
674
  }
682
- function tn(e) {
675
+ function Xr(e) {
683
676
  let t = e;
684
677
  if (typeof e == "string")
685
678
  try {
@@ -689,27 +682,27 @@ function tn(e) {
689
682
  }
690
683
  if (!t || typeof t != "object" || Array.isArray(t)) return;
691
684
  const { stage: r, measuredRowCount: n, totalRowCount: o, pageCount: c } = t;
692
- if (!(!ir(r) || !ae(n) || o !== null && !ae(o) || c !== null && !ae(c)))
685
+ if (!(!ar(r) || !ae(n) || o !== null && !ae(o) || c !== null && !ae(c)))
693
686
  return { stage: r, measuredRowCount: n, totalRowCount: o, pageCount: c };
694
687
  }
695
- function cr(e, t) {
688
+ function sr(e, t) {
696
689
  return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === void 0;
697
690
  }
698
- function Be(e) {
691
+ function Ve(e) {
699
692
  return new Map(
700
693
  e.presentationExecutionSnapshot.resolvedFormats.flatMap(
701
- (t) => t.format.type === "raw_temporal" && t.target.kind === "column" && cr(t.scope, e.scope) ? [[t.target.columnKey, t.format]] : []
694
+ (t) => t.format.type === "raw_temporal" && t.target.kind === "column" && sr(t.scope, e.scope) ? [[t.target.columnKey, t.format]] : []
702
695
  )
703
696
  );
704
697
  }
705
- function Xe(e) {
698
+ function Be(e) {
706
699
  const t = e == null ? void 0 : e.sql, r = e == null ? void 0 : e.python;
707
700
  return (e == null ? void 0 : e.resultOwner) === "freeform" && typeof t == "string" && !!t.trim() && (typeof r != "string" || !r.trim());
708
701
  }
709
- function rn(e) {
710
- return e.formatting.useFormattedValues !== !1 && Xe(e.queryPayload) && Be(e.formatting).size > 0;
702
+ function Wr(e) {
703
+ return e.formatting.useFormattedValues !== !1 && Be(e.queryPayload) && Ve(e.formatting).size > 0;
711
704
  }
712
- function lr(e, t) {
705
+ function ir(e, t) {
713
706
  return e.map((r, n) => {
714
707
  if (!Object.prototype.hasOwnProperty.call(r, t) || r[t] === void 0)
715
708
  throw new Error(
@@ -719,13 +712,13 @@ function lr(e, t) {
719
712
  return o === null || typeof o == "string" ? o : String(o);
720
713
  });
721
714
  }
722
- function ur(e) {
715
+ function cr(e) {
723
716
  if (e.formatting.useFormattedValues === !1)
724
717
  return {
725
718
  activatedColumnKeys: /* @__PURE__ */ new Set(),
726
719
  byColumnKey: /* @__PURE__ */ new Map()
727
720
  };
728
- const t = Be(e.formatting), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
721
+ const t = Ve(e.formatting), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Map();
729
722
  if (t.size === 0)
730
723
  return { activatedColumnKeys: r, byColumnKey: n };
731
724
  const o = new Map(
@@ -733,7 +726,7 @@ function ur(e) {
733
726
  const f = l.key || l.field;
734
727
  return f ? [[f, l]] : [];
735
728
  })
736
- ), c = Xe(e.queryPayload), s = /* @__PURE__ */ new Map();
729
+ ), c = Be(e.queryPayload), s = /* @__PURE__ */ new Map();
737
730
  for (const [l, f] of t) {
738
731
  const h = o.get(l);
739
732
  let d;
@@ -743,9 +736,9 @@ function ur(e) {
743
736
  }), r.add(l);
744
737
  else if (c) {
745
738
  r.add(l);
746
- const p = et({
739
+ const p = Qe({
747
740
  columnKey: l,
748
- values: lr(e.records, l)
741
+ values: ir(e.records, l)
749
742
  });
750
743
  s.set(l, p), p.status === "classified" && (d = p.metadata);
751
744
  } else
@@ -753,18 +746,18 @@ function ur(e) {
753
746
  d && n.set(l, {
754
747
  metadata: d,
755
748
  format: f,
756
- formatValue: tt({ metadata: d, format: f })
749
+ formatValue: et({ metadata: d, format: f })
757
750
  });
758
751
  }
759
752
  return {
760
753
  activatedColumnKeys: r,
761
754
  byColumnKey: n,
762
755
  ...c ? {
763
- sqlChunkEvidence: rt(s)
756
+ sqlChunkEvidence: tt(s)
764
757
  } : {}
765
758
  };
766
759
  }
767
- function mr(e) {
760
+ function lr(e) {
768
761
  if (!e.resolution.activatedColumnKeys.has(e.columnKey))
769
762
  return;
770
763
  if (e.value === void 0)
@@ -779,12 +772,12 @@ function mr(e) {
779
772
  const r = t.formatValue(e.value);
780
773
  return r.ok && r.wallClock ? { text: r.text, wallClock: r.wallClock } : { text: r.text };
781
774
  }
782
- function Te(e, t) {
775
+ function _e(e, t) {
783
776
  const r = e.byColumnKey.get(t);
784
777
  return r ? r.metadata.valueKind === "date" : void 0;
785
778
  }
786
- const dr = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), fr = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, pr = /^\d{4}-\d{2}-\d{2}$/, ze = "MM/dd/yyyy";
787
- function q(e) {
779
+ const ur = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), mr = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, dr = /^\d{4}-\d{2}-\d{2}$/, ze = "MM/dd/yyyy";
780
+ function X(e) {
788
781
  return typeof e == "object" && e !== null && !Array.isArray(e);
789
782
  }
790
783
  function O(e) {
@@ -796,8 +789,8 @@ function Ee(e) {
796
789
  function $e(e, t) {
797
790
  var n;
798
791
  const r = (n = e.columnSettings) == null ? void 0 : n[t];
799
- if (!(!q(r) || r.type !== "date"))
800
- return q(r.dateFormat) ? r.dateFormat : {};
792
+ if (!(!X(r) || r.type !== "date"))
793
+ return X(r.dateFormat) ? r.dateFormat : {};
801
794
  }
802
795
  function Fe(e) {
803
796
  return e.useCustomFormat && e.customFormat ? e.customFormat : e.format || ze;
@@ -805,29 +798,29 @@ function Fe(e) {
805
798
  function Se(e, t) {
806
799
  return e && e !== "auto" ? e : t;
807
800
  }
808
- function hr(e) {
801
+ function fr(e) {
809
802
  return !/[HhKkmsSa]/.test(e.replace(/'[^']*'/g, ""));
810
803
  }
811
- function br(e) {
804
+ function pr(e) {
812
805
  if (typeof e == "number") return Number.isFinite(e) ? e : null;
813
806
  if (typeof e != "string" || !e.trim()) return null;
814
807
  const t = Number(e);
815
808
  return Number.isFinite(t) ? t : null;
816
809
  }
817
- function yr(e) {
810
+ function hr(e) {
818
811
  const t = Ue(e);
819
812
  if (t !== void 0)
820
813
  try {
821
- return bt(t, /[.eE]/.test(t) ? "decimal" : "integer");
814
+ return ht(t, /[.eE]/.test(t) ? "decimal" : "integer");
822
815
  } catch {
823
816
  return;
824
817
  }
825
818
  }
826
- function gr(e) {
819
+ function br(e) {
827
820
  return e.calendar.fiscalCalendar && (e.granularity === "quarter" || e.granularity === "year") ? "fiscal" : e.granularity;
828
821
  }
829
- function nn(e) {
830
- const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, c = (a) => nt({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => at({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
822
+ function Yr(e) {
823
+ const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, c = (a) => rt({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => ot({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
831
824
  function l(a) {
832
825
  var y;
833
826
  if ((y = t.visibleColumns) != null && y.length) return t.visibleColumns;
@@ -841,24 +834,24 @@ function nn(e) {
841
834
  const y = a == null ? void 0 : a.pivotIdentity;
842
835
  if (!y || !y.members || y.members.length === 0) return;
843
836
  const b = ye({ identity: y, columnKey: (a == null ? void 0 : a.key) || (a == null ? void 0 : a.field) || "" });
844
- return _t({
837
+ return Ct({
845
838
  members: b,
846
839
  metricLabel: (a == null ? void 0 : a.label) || (a == null ? void 0 : a.headerName),
847
840
  mode: n ? "formatted" : "canonical",
848
- resolveTemporalFormat: (v) => {
849
- const w = b.find((_) => _.fieldId === v);
841
+ resolveTemporalFormat: (C) => {
842
+ const w = b.find((x) => x.fieldId === C);
850
843
  if (!(w != null && w.temporalBucket)) return;
851
- const C = pe({
844
+ const v = pe({
852
845
  snapshot: t.presentationExecutionSnapshot,
853
846
  scope: o,
854
- target: { kind: "field", fieldId: v, role: "pivotby" }
847
+ target: { kind: "field", fieldId: C, role: "pivotby" }
855
848
  });
856
- return C ? d(w.temporalBucket, C) : void 0;
849
+ return v ? d(w.temporalBucket, v) : void 0;
857
850
  }
858
851
  }).flattenedLabel;
859
852
  }
860
853
  function d(a, m) {
861
- return ot({
854
+ return nt({
862
855
  metadata: a,
863
856
  cardFormat: m,
864
857
  locale: m.locale,
@@ -866,19 +859,19 @@ function nn(e) {
866
859
  }).format;
867
860
  }
868
861
  function p(a, m) {
869
- const { records: y, columns: b } = a, v = q(r.cardConfig) ? r.cardConfig : void 0, w = v == null ? void 0 : v.pivotByColumns, C = Array.isArray(w) ? w.flatMap(
870
- (i) => q(i) && typeof i.id == "string" && i.id ? [i.id] : []
862
+ const { records: y, columns: b } = a, C = X(r.cardConfig) ? r.cardConfig : void 0, w = C == null ? void 0 : C.pivotByColumns, v = Array.isArray(w) ? w.flatMap(
863
+ (i) => X(i) && typeof i.id == "string" && i.id ? [i.id] : []
871
864
  ) : [];
872
865
  xt(
873
866
  b.map((i) => ({ key: O(i) || "<unknown>", pivotIdentity: i.pivotIdentity })),
874
- { expectedPivotFieldIds: C }
867
+ { expectedPivotFieldIds: v }
875
868
  );
876
- const _ = l(a), S = new Map(
869
+ const x = l(a), S = new Map(
877
870
  b.flatMap((i) => {
878
871
  const g = O(i);
879
872
  return g ? [[g, i]] : [];
880
873
  })
881
- ), Ge = new Map(a.resultColumns.map((i) => [i.key, i.dataType])), I = ur({
874
+ ), Ge = new Map(a.resultColumns.map((i) => [i.key, i.dataType])), I = cr({
882
875
  records: y,
883
876
  columns: b,
884
877
  formatting: t,
@@ -889,42 +882,42 @@ function nn(e) {
889
882
  return g && i.temporalBucket ? [[g, i.temporalBucket]] : [];
890
883
  })
891
884
  ), ue = /* @__PURE__ */ new Map();
892
- for (const i of _) {
885
+ for (const i of x) {
893
886
  const g = pe({
894
887
  snapshot: t.presentationExecutionSnapshot,
895
888
  scope: o,
896
889
  target: { kind: "column", columnKey: i }
897
- }), T = Z.get(i);
890
+ }), _ = Z.get(i);
898
891
  if (n) {
899
- if (g && !T) throw new Error(`Missing temporal bucket metadata for column "${i}"`);
900
- if (T && !g) throw new Error(`Missing resolved temporal presentation for column "${i}"`);
892
+ if (g && !_) throw new Error(`Missing temporal bucket metadata for column "${i}"`);
893
+ if (_ && !g) throw new Error(`Missing resolved temporal presentation for column "${i}"`);
901
894
  }
902
- g && T && ue.set(i, d(T, g));
895
+ g && _ && ue.set(i, d(_, g));
903
896
  }
904
- const J = _.map((i) => {
905
- const g = Ge.get(i), T = g && dr.has(g) ? g : "unknown", E = n ? x(i, I, Z) : void 0, P = f(i, S.get(i)), k = n && I.activatedColumnKeys.has(i) && Te(I, i) === void 0;
897
+ const J = x.map((i) => {
898
+ const g = Ge.get(i), _ = g && ur.has(g) ? g : "unknown", E = n ? T(i, I, Z) : void 0, P = f(i, S.get(i)), A = n && I.activatedColumnKeys.has(i) && _e(I, i) === void 0;
906
899
  return {
907
900
  key: i,
908
901
  label: P,
909
- dataType: T,
902
+ dataType: _,
910
903
  ...E ? { presentation: E } : {},
911
- xlsx: Ce({ key: i, label: P, formattedValues: n, dataType: T, presentation: E }),
912
- ...k ? { xlsxPending: !0 } : {}
904
+ xlsx: ve({ key: i, label: P, formattedValues: n, dataType: _, presentation: E }),
905
+ ...A ? { xlsxPending: !0 } : {}
913
906
  };
914
907
  });
915
- function qe(i, g, T, E) {
908
+ function qe(i, g, _, E) {
916
909
  if (!n) return { text: Ee(i), value: i };
917
- const P = mr({ value: i, columnKey: g, rowIndex: T, resolution: I });
910
+ const P = lr({ value: i, columnKey: g, rowIndex: _, resolution: I });
918
911
  if (P !== void 0) return { text: P.text, value: i, ...P.wallClock ? { wallClock: P.wallClock } : {} };
919
- const k = Z.get(g);
920
- if (k) {
912
+ const A = Z.get(g);
913
+ if (A) {
921
914
  const L = ue.get(g);
922
915
  if (!L) throw new Error(`Missing resolved temporal presentation for column "${g}"`);
923
916
  if (i != null && typeof i != "string")
924
917
  throw new Error(`Canonical temporal column "${g}" must contain a string or null`);
925
- const N = i ?? null, R = st(N, k);
918
+ const N = i ?? null, R = at(N, A);
926
919
  return {
927
- text: it({ value: N, metadata: k, format: L }),
920
+ text: st({ value: N, metadata: A, format: L }),
928
921
  value: i,
929
922
  ...R ? { wallClock: R } : {}
930
923
  };
@@ -941,54 +934,54 @@ function nn(e) {
941
934
  ),
942
935
  value: i
943
936
  };
944
- const M = c(g);
937
+ const D = c(g);
945
938
  if (typeof i == "number")
946
- return { text: M ? B(i, M) : String(i), value: i };
939
+ return { text: D ? B(i, D) : String(i), value: i };
947
940
  if (K(i))
948
- return { text: M ? B(i, M) : i.value, value: i };
941
+ return { text: D ? B(i, D) : i.value, value: i };
949
942
  const V = $e(t, g);
950
- if (V && (i instanceof Date || typeof i == "string" && fr.test(i))) {
951
- const L = i instanceof Date ? i.toISOString() : i, N = typeof i == "string" && pr.test(i), R = N ? "UTC" : Se(V.timezone, t.timezone), de = N ? "UTC" : V.sourceTimezone || "auto", fe = ct(L, R, de);
943
+ if (V && (i instanceof Date || typeof i == "string" && mr.test(i))) {
944
+ const L = i instanceof Date ? i.toISOString() : i, N = typeof i == "string" && dr.test(i), R = N ? "UTC" : Se(V.timezone, t.timezone), de = N ? "UTC" : V.sourceTimezone || "auto", fe = it(L, R, de);
952
945
  return {
953
946
  text: he(L, Fe(V), R, de),
954
947
  value: i,
955
948
  ...fe ? { wallClock: fe } : {}
956
949
  };
957
950
  }
958
- if (typeof i == "string" && M && E.dataType === "number") {
959
- const L = yr(i);
960
- if (L) return { text: B(L, M), value: i };
951
+ if (typeof i == "string" && D && E.dataType === "number") {
952
+ const L = hr(i);
953
+ if (L) return { text: B(L, D), value: i };
961
954
  }
962
955
  return { text: Ee(i), value: i };
963
956
  }
964
- const We = y.map(
965
- (i, g) => J.map((T) => {
966
- const E = qe(i[T.key], T.key, g, T);
967
- return X({ value: E.value, text: E.text, column: T.xlsx, wallClock: E.wallClock });
957
+ const Xe = y.map(
958
+ (i, g) => J.map((_) => {
959
+ const E = qe(i[_.key], _.key, g, _);
960
+ return z({ value: E.value, text: E.text, column: _.xlsx, wallClock: E.wallClock });
968
961
  })
969
962
  ), me = (m == null ? void 0 : m.withHeader) !== !1 && t.includeHeaders;
970
963
  if (me)
971
- for (const i of _) {
964
+ for (const i of x) {
972
965
  const g = S.get(i);
973
966
  g != null && g.pivotIdentity && ye({ identity: g.pivotIdentity, columnKey: O(g) || i });
974
967
  }
975
968
  return {
976
969
  ...me ? { header: J.map((i) => i.label) } : {},
977
970
  columns: J,
978
- rows: We,
971
+ rows: Xe,
979
972
  ...I.sqlChunkEvidence ? { rawTemporalClassification: I.sqlChunkEvidence } : {}
980
973
  };
981
974
  }
982
- function x(a, m, y) {
975
+ function T(a, m, y) {
983
976
  if (m.activatedColumnKeys.has(a)) {
984
- const C = Te(m, a);
985
- return C === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: C };
977
+ const v = _e(m, a);
978
+ return v === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: v };
986
979
  }
987
980
  const b = y.get(a);
988
- if (b) return { kind: "temporal_bucket", grain: gr(b) };
981
+ if (b) return { kind: "temporal_bucket", grain: br(b) };
989
982
  if (s(a)) return { kind: "text" };
990
- const v = $e(t, a);
991
- if (v) return { kind: "datetime", dateOnly: hr(Fe(v)) };
983
+ const C = $e(t, a);
984
+ if (C) return { kind: "datetime", dateOnly: fr(Fe(C)) };
992
985
  const w = c(a);
993
986
  return w ? { kind: "measure", format: w } : void 0;
994
987
  }
@@ -996,22 +989,22 @@ function nn(e) {
996
989
  if (!Number.isInteger(m) || m < 0)
997
990
  throw new Error("totalRows must be a non-negative integer");
998
991
  return m === 0 ? void 0 : (t.visibleColumns ?? Object.keys(a)).map((b) => {
999
- const w = Object.prototype.hasOwnProperty.call(a, b) ? a[b] : b === t.tableTotalsLabelColumnKey ? "Total" : null, C = n ? c(b) : void 0, _ = Ce({
992
+ const w = Object.prototype.hasOwnProperty.call(a, b) ? a[b] : b === t.tableTotalsLabelColumnKey ? "Total" : null, v = n ? c(b) : void 0, x = ve({
1000
993
  key: b,
1001
994
  label: b,
1002
995
  formattedValues: n,
1003
996
  dataType: "unknown",
1004
- ...C ? { presentation: { kind: "measure", format: C } } : {}
997
+ ...v ? { presentation: { kind: "measure", format: v } } : {}
1005
998
  });
1006
999
  if (w == null) return { kind: "empty" };
1007
- if (!n) return X({ value: w, text: String(w), column: _ });
1008
- const S = C ? br(w) : null;
1009
- return X(C && S !== null ? { value: S, text: B(S, C), column: _ } : { value: w, text: String(w), column: _ });
1000
+ if (!n) return z({ value: w, text: String(w), column: x });
1001
+ const S = v ? pr(w) : null;
1002
+ return z(v && S !== null ? { value: S, text: B(S, v), column: x } : { value: w, text: String(w), column: x });
1010
1003
  });
1011
1004
  }
1012
1005
  return { format: p, totals: u };
1013
1006
  }
1014
- const wr = /* @__PURE__ */ new Set([
1007
+ const yr = /* @__PURE__ */ new Set([
1015
1008
  "scope",
1016
1009
  "useFormattedValues",
1017
1010
  "timezone",
@@ -1036,7 +1029,7 @@ function Le(e, t) {
1036
1029
  return e;
1037
1030
  }
1038
1031
  }
1039
- function on(e) {
1032
+ function Zr(e) {
1040
1033
  if (!le(e))
1041
1034
  throw new Error("formatting must be an object");
1042
1035
  const t = ["reportContext", "resolvedFormats"].find(
@@ -1046,23 +1039,23 @@ function on(e) {
1046
1039
  throw new be(
1047
1040
  `formatting.${t} is retired; formatting.presentationExecutionSnapshot is authoritative.`
1048
1041
  );
1049
- const r = Object.keys(e).find((a) => !wr.has(a));
1042
+ const r = Object.keys(e).find((a) => !yr.has(a));
1050
1043
  if (r)
1051
1044
  throw new Error(`formatting contains unknown property "${r}"`);
1052
1045
  const n = typeof e.timezone == "string" ? e.timezone.trim() : "";
1053
1046
  if (!n)
1054
1047
  throw new Error("formatting.timezone must be a non-empty string");
1055
- const o = dt(e.delimiter);
1048
+ const o = mt(e.delimiter);
1056
1049
  if (!o)
1057
1050
  throw new Error("formatting.delimiter must be a comma, semicolon or tab");
1058
- const c = ft(e.csvEncoding);
1051
+ const c = dt(e.csvEncoding);
1059
1052
  if (!c)
1060
1053
  throw new Error("formatting.csvEncoding must be 'utf-8-bom' or 'utf-8'");
1061
1054
  if (typeof e.includeHeaders != "boolean")
1062
1055
  throw new Error("formatting.includeHeaders must be a boolean");
1063
1056
  if (e.useFormattedValues !== void 0 && typeof e.useFormattedValues != "boolean")
1064
1057
  throw new Error("formatting.useFormattedValues must be a boolean");
1065
- const s = e.fileFormat === void 0 ? void 0 : pt(e.fileFormat);
1058
+ const s = e.fileFormat === void 0 ? void 0 : ft(e.fileFormat);
1066
1059
  if (e.fileFormat !== void 0 && !s)
1067
1060
  throw new Error("formatting.fileFormat must be 'csv' or 'xlsx'");
1068
1061
  if (e.title !== void 0 && typeof e.title != "string")
@@ -1078,20 +1071,20 @@ function on(e) {
1078
1071
  throw new Error("formatting.tableTotalsLabelColumnKey must be a non-empty string");
1079
1072
  if (d && !(l != null && l.includes(d)))
1080
1073
  throw new Error("formatting.tableTotalsLabelColumnKey must identify a visible column");
1081
- const p = lt(e.scope, "formatting.scope");
1074
+ const p = ct(e.scope, "formatting.scope");
1082
1075
  if (!p.cardId || p.attachmentIndex !== void 0)
1083
1076
  throw new Error("formatting.scope must identify exactly one dashboard card");
1084
- const x = e.useFormattedValues !== !1, u = ut(e.presentationExecutionSnapshot);
1077
+ const T = e.useFormattedValues !== !1, u = lt(e.presentationExecutionSnapshot);
1085
1078
  if (n !== u.reportContext.calendar.tz)
1086
1079
  throw new Error(
1087
1080
  "formatting.timezone must equal presentationExecutionSnapshot.reportContext.calendar.tz"
1088
1081
  );
1089
1082
  try {
1090
- mt({
1083
+ ut({
1091
1084
  snapshot: u,
1092
1085
  expectedScope: { dashboardId: p.dashboardId, cardId: p.cardId },
1093
1086
  visibleColumns: l,
1094
- useFormattedValues: x
1087
+ useFormattedValues: T
1095
1088
  });
1096
1089
  } catch (a) {
1097
1090
  throw new be(
@@ -1100,7 +1093,7 @@ function on(e) {
1100
1093
  }
1101
1094
  return {
1102
1095
  scope: { dashboardId: p.dashboardId, cardId: p.cardId },
1103
- useFormattedValues: x,
1096
+ useFormattedValues: T,
1104
1097
  timezone: n,
1105
1098
  presentationExecutionSnapshot: u,
1106
1099
  delimiter: o,
@@ -1114,7 +1107,7 @@ function on(e) {
1114
1107
  ...typeof e.title == "string" ? { title: e.title } : {}
1115
1108
  };
1116
1109
  }
1117
- function an(e) {
1110
+ function Jr(e) {
1118
1111
  const t = e.formatOptions, r = (n) => le(n) ? n : void 0;
1119
1112
  return {
1120
1113
  scope: { dashboardId: e.dashboardId, cardId: e.cardId },
@@ -1132,7 +1125,7 @@ function an(e) {
1132
1125
  ...typeof e.title == "string" ? { title: e.title } : {}
1133
1126
  };
1134
1127
  }
1135
- const Cr = /^\d{4}-\d{2}-\d{2}$/;
1128
+ const gr = /^\d{4}-\d{2}-\d{2}$/;
1136
1129
  function He(e) {
1137
1130
  const t = e.split(".");
1138
1131
  return t[t.length - 1].replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").map((o) => o.charAt(0).toUpperCase() + o.slice(1).toLowerCase()).join(" ");
@@ -1142,21 +1135,21 @@ function se(e, t) {
1142
1135
  const r = e.slice(0, Pe).map(t).join(", "), n = e.length - Pe;
1143
1136
  return n > 0 ? `${r}, and ${n} more` : r;
1144
1137
  }
1145
- function vr(e) {
1138
+ function wr(e) {
1146
1139
  if (e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between")
1147
1140
  return;
1148
1141
  const t = Y(e.relativeMeta);
1149
1142
  return t && Oe(t).printsByName ? t : void 0;
1150
1143
  }
1151
- function _r(e, t) {
1152
- if (t !== "label") return vr(e);
1144
+ function vr(e, t) {
1145
+ if (t !== "label") return wr(e);
1153
1146
  if (!(e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between"))
1154
1147
  return Y(e.relativeMeta);
1155
1148
  }
1156
1149
  function Ie(e, t = {}) {
1157
- const { name: r, operation: n, values: o, valueType: c } = e, s = t.label ?? He(r), l = _r(e, t.relativeDates);
1150
+ const { name: r, operation: n, values: o, valueType: c } = e, s = t.label ?? He(r), l = vr(e, t.relativeDates);
1158
1151
  if (l) {
1159
- const p = yt(l).label;
1152
+ const p = bt(l).label;
1160
1153
  if (p)
1161
1154
  return n === "between" ? `${s}: ${p}` : `${s} not in ${p}`;
1162
1155
  }
@@ -1164,7 +1157,7 @@ function Ie(e, t = {}) {
1164
1157
  return n === "is null" ? `${s} is empty` : n === "is not null" ? `${s} is not empty` : "";
1165
1158
  const f = Y(e.relativeMeta), h = e.temporalPrecision === "minute" || !!(f && Oe(f).subDay), d = (p) => {
1166
1159
  if (c === "date" && p) {
1167
- const x = {
1160
+ const T = {
1168
1161
  year: "numeric",
1169
1162
  month: "short",
1170
1163
  day: "numeric",
@@ -1173,7 +1166,7 @@ function Ie(e, t = {}) {
1173
1166
  minute: "2-digit"
1174
1167
  } : {}
1175
1168
  };
1176
- if (typeof p == "string" && Cr.test(p)) {
1169
+ if (typeof p == "string" && gr.test(p)) {
1177
1170
  const [a, m, y] = p.split("-").map(Number);
1178
1171
  return new Intl.DateTimeFormat(void 0, {
1179
1172
  year: "numeric",
@@ -1182,22 +1175,22 @@ function Ie(e, t = {}) {
1182
1175
  timeZone: "UTC"
1183
1176
  }).format(new Date(Date.UTC(a, m - 1, y)));
1184
1177
  }
1185
- if (typeof p == "string" && Et(p) === "wall_datetime") {
1186
- const [a, m, y, b, v] = p.split(/[-T :.]/).map(Number);
1178
+ if (typeof p == "string" && _t(p) === "wall_datetime") {
1179
+ const [a, m, y, b, C] = p.split(/[-T :.]/).map(Number);
1187
1180
  return new Intl.DateTimeFormat(void 0, {
1188
- ...x,
1181
+ ...T,
1189
1182
  timeZone: "UTC"
1190
- }).format(new Date(Date.UTC(a, m - 1, y, b, v)));
1183
+ }).format(new Date(Date.UTC(a, m - 1, y, b, C)));
1191
1184
  }
1192
1185
  const u = new Date(p);
1193
1186
  if (!isNaN(u.getTime()))
1194
1187
  try {
1195
1188
  return new Intl.DateTimeFormat(void 0, {
1196
- ...x,
1189
+ ...T,
1197
1190
  ...t.timezone ? { timeZone: t.timezone } : {}
1198
1191
  }).format(u);
1199
1192
  } catch {
1200
- return h ? u.toLocaleString(void 0, x) : u.toLocaleDateString(void 0, x);
1193
+ return h ? u.toLocaleString(void 0, T) : u.toLocaleDateString(void 0, T);
1201
1194
  }
1202
1195
  }
1203
1196
  return String(p);
@@ -1232,7 +1225,7 @@ function Ie(e, t = {}) {
1232
1225
  return `${s}: ${se(o, d)}`;
1233
1226
  }
1234
1227
  }
1235
- function sn(e, t = {}) {
1228
+ function Qr(e, t = {}) {
1236
1229
  if (!e || e.length === 0)
1237
1230
  return "";
1238
1231
  const r = /* @__PURE__ */ new Map();
@@ -1251,55 +1244,55 @@ function sn(e, t = {}) {
1251
1244
  }
1252
1245
  }), n.join(" | ");
1253
1246
  }
1254
- function cn(e) {
1255
- return ((e == null ? void 0 : e.filterValues) ?? []).filter(xr).map(Tr);
1247
+ function en(e) {
1248
+ return ((e == null ? void 0 : e.filterValues) ?? []).filter(Cr).map(xr);
1256
1249
  }
1257
- function xr(e) {
1250
+ function Cr(e) {
1258
1251
  return !!e && typeof e == "object" && typeof e.name == "string" && Array.isArray(e.values);
1259
1252
  }
1260
- function Tr(e) {
1253
+ function xr(e) {
1261
1254
  if (!("relativeMeta" in e) || e.relativeMeta === void 0) return e;
1262
1255
  const { relativeMeta: t, ...r } = e, n = Y(t);
1263
1256
  return n ? { ...r, relativeMeta: n } : r;
1264
1257
  }
1265
- const Er = /* @__PURE__ */ new Set([
1258
+ const Tr = /* @__PURE__ */ new Set([
1266
1259
  "day",
1267
1260
  "week",
1268
1261
  "month",
1269
1262
  "quarter",
1270
1263
  "year"
1271
1264
  ]);
1272
- function $r(e, t) {
1265
+ function _r(e, t) {
1273
1266
  try {
1274
- const r = A(
1267
+ const r = k(
1275
1268
  U(e),
1276
1269
  t,
1277
1270
  "yyyy-MM-dd"
1278
1271
  ), [n, o, c] = r.split("-").map(Number), s = new Date(Date.UTC(n, o - 1, c));
1279
- return s.setUTCDate(s.getUTCDate() - 1), A(s, "UTC", "yyyy-MM-dd");
1272
+ return s.setUTCDate(s.getUTCDate() - 1), k(s, "UTC", "yyyy-MM-dd");
1280
1273
  } catch {
1281
1274
  return;
1282
1275
  }
1283
1276
  }
1284
- function ln(e, t, r, n = !1) {
1285
- const o = Me(e, t, r);
1277
+ function tn(e, t, r, n = !1) {
1278
+ const o = De(e, t, r);
1286
1279
  if (o.start === o.end) return o.end;
1287
- const c = n ? Me(e, t, r, !0) : o;
1280
+ const c = n ? De(e, t, r, !0) : o;
1288
1281
  return `${c.start} – ${c.end}`;
1289
1282
  }
1290
- function Me(e, t, r, n = !1) {
1283
+ function De(e, t, r, n = !1) {
1291
1284
  try {
1292
- if (r && Er.has(r)) {
1293
- const o = $r(e.end, t);
1285
+ if (r && Tr.has(r)) {
1286
+ const o = _r(e.end, t);
1294
1287
  if (o) {
1295
1288
  const c = n ? "MMM d" : "MMM d, yyyy";
1296
1289
  return {
1297
- start: A(
1290
+ start: k(
1298
1291
  U(e.start),
1299
1292
  t,
1300
1293
  c
1301
1294
  ),
1302
- end: A(
1295
+ end: k(
1303
1296
  U(`${o}T00:00:00Z`),
1304
1297
  "UTC",
1305
1298
  "MMM d, yyyy"
@@ -1310,8 +1303,8 @@ function Me(e, t, r, n = !1) {
1310
1303
  if (r === "second" || r === "minute" || r === "hour") {
1311
1304
  const o = n ? "MMM d, h:mm a" : "MMM d, yyyy, h:mm a";
1312
1305
  return {
1313
- start: A(U(e.start), t, o),
1314
- end: `before ${A(
1306
+ start: k(U(e.start), t, o),
1307
+ end: `before ${k(
1315
1308
  U(e.end),
1316
1309
  t,
1317
1310
  o
@@ -1323,49 +1316,42 @@ function Me(e, t, r, n = !1) {
1323
1316
  return { start: e.start, end: `before ${e.end}` };
1324
1317
  }
1325
1318
  export {
1326
- er as A,
1327
- Qr as B,
1328
- sr as C,
1329
- je as D,
1330
- en as E,
1331
- jt as F,
1332
- tn as G,
1333
- nn as H,
1334
- on as I,
1335
- an as J,
1336
- rn as K,
1337
- Pe as L,
1338
- jr as M,
1339
- vr as N,
1340
- Ie as O,
1341
- Ht as P,
1342
- sn as Q,
1343
- cn as R,
1344
- Me as S,
1345
- Or as a,
1346
- Kr as b,
1347
- Vr as c,
1348
- Br as d,
1349
- Ur as e,
1350
- ln as f,
1351
- Xr as g,
1352
- Gr as h,
1353
- qr as i,
1354
- Wt as j,
1355
- Wr as k,
1356
- zr as l,
1357
- qt as m,
1358
- Hr as n,
1359
- Kt as o,
1360
- Gt as p,
1361
- Bt as q,
1362
- Ce as r,
1363
- zt as s,
1364
- X as t,
1365
- Yr as u,
1366
- Zt as v,
1367
- Jt as w,
1368
- Qt as x,
1369
- Zr as y,
1370
- Jr as z
1319
+ Zr as A,
1320
+ Jr as B,
1321
+ Wr as C,
1322
+ Hr as D,
1323
+ wr as E,
1324
+ Pe as F,
1325
+ Ie as G,
1326
+ Qr as H,
1327
+ en as I,
1328
+ De as J,
1329
+ Or as M,
1330
+ zt as P,
1331
+ Nr as a,
1332
+ jr as b,
1333
+ Kr as c,
1334
+ qt as d,
1335
+ Rr as e,
1336
+ tn as f,
1337
+ Vr as g,
1338
+ Ur as h,
1339
+ Ut as i,
1340
+ Kt as j,
1341
+ Bt as k,
1342
+ Br as l,
1343
+ Gt as m,
1344
+ Wt as n,
1345
+ Yt as o,
1346
+ Ht as p,
1347
+ Zt as q,
1348
+ ve as r,
1349
+ zr as s,
1350
+ z as t,
1351
+ Jt as u,
1352
+ Gr as v,
1353
+ or as w,
1354
+ qr as x,
1355
+ Xr as y,
1356
+ Yr as z
1371
1357
  };