react-semaphor 0.1.559 → 0.1.560

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 (134) hide show
  1. package/dist/analytics-protocol/index.js +368 -361
  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 +9 -9
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/analytics-base-schemas-CHLxsPfX.js +630 -0
  7. package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-Bu2fFm_I.js} +206 -207
  8. package/dist/chunks/{bookmark-state-ssqrs5oP.js → bookmark-state-BFY9oNmr.js} +3 -3
  9. package/dist/chunks/{braces-Rdxa3H-s.js → braces-Da41xfUd.js} +1 -1
  10. package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-4FNkMrzE.js} +166 -166
  11. package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
  12. package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
  13. package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-_MeBuy67.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
  15. package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-Bi7fyG-4.js} +98 -98
  16. package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-B1mU_OMa.js} +5 -5
  17. package/dist/chunks/{document-dashboard-inputs-ChVkcBuu.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
  18. package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-0CJN31Y3.js} +8375 -8615
  19. package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
  20. package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-CRC-K_l_.js} +3 -3
  21. package/dist/chunks/{global-date-filter-utils-DBzEOX9M.js → global-date-filter-utils-D8365uPH.js} +4068 -3401
  22. package/dist/chunks/{index-B1Xr7W24.js → index-DtHidOPV.js} +579 -604
  23. package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-BvsH4RY2.js} +1 -1
  24. package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-Dg0otx5E.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-CM18W8w6.js} +4 -4
  26. package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-HPskLaPy.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-WPv4R-H_.js} +110 -110
  29. package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-ljMKYZKa.js} +2 -2
  30. package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
  31. package/dist/chunks/{palette-DMJtp3Vn.js → palette-Bsh376zO.js} +1 -1
  32. package/dist/chunks/{pivot-result-contract-expectations-DOYhqeZb.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
  33. package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-vS9TSh4f.js} +1 -1
  34. package/dist/chunks/{raw-temporal-presentation-BmT7z6NH.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
  35. package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
  36. package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-BZQh9ywy.js} +2 -2
  37. package/dist/chunks/{resolve-dashboard-input-context-B_C_VAJH.js → resolve-dashboard-input-context-CAMiWvyR.js} +1749 -1989
  38. package/dist/chunks/{save-DSb1jTtG.js → save-B5EAsgQF.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
  40. package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-D0YnaAD9.js} +1 -1
  41. package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-XLBLOJ2V.js} +38374 -39104
  42. package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
  43. package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-dUG5VWRm.js} +1 -1
  44. package/dist/chunks/{switch-Dq8XPFpT.js → switch-ByxH4M7t.js} +3 -3
  45. package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-C_GdeTYU.js} +1 -1
  46. package/dist/chunks/{table-settings-DXj_zXwS.js → table-settings-Imz0FgWi.js} +6 -6
  47. package/dist/chunks/{temporal-input-presentation-AhLSkGPf.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
  48. package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-CQtXUVMy.js} +1 -1
  49. package/dist/chunks/{upload-Dr_WAxHQ.js → upload-wbR-NVzq.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
  51. package/dist/chunks/{validators-C87JPd-_.js → validators-CXTneCA4.js} +1206 -1579
  52. package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +2207 -1497
  55. package/dist/data-app-sdk/index.js +5 -5
  56. package/dist/data-app-sdk-adapters/index.js +3 -3
  57. package/dist/data-app-sdk-validation/index.js +6 -6
  58. package/dist/format-utils/index.js +181 -176
  59. package/dist/index.js +22 -22
  60. package/dist/report-runtime-context/index.js +2 -2
  61. package/dist/style.css +1 -1
  62. package/dist/surfboard/index.js +2 -2
  63. package/dist/types/components/editor/editor-aside/utils.d.ts +1 -1
  64. package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
  65. package/dist/types/index.js +6 -6
  66. package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
  67. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
  68. package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
  69. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
  70. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
  71. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
  72. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  73. package/dist/types/lib/stores/editor-store.d.ts +39 -9
  74. package/dist/types/lib/stores/table-actions.d.ts +9 -3
  75. package/dist/types/lib/table-formatting/index.d.ts +0 -2
  76. package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
  77. package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
  78. package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
  79. package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
  80. package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
  81. package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
  82. package/dist/types/lib/types/common-types.d.ts +40 -47
  83. package/dist/types/lib/types/explorer-types.d.ts +11 -43
  84. package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
  85. package/dist/types/lib/utils/card-definition.d.ts +9 -187
  86. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
  87. package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
  88. package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
  89. package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
  90. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
  91. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
  92. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
  93. package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
  94. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
  95. package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
  96. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
  97. package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
  98. package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
  99. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
  100. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
  101. package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
  102. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
  103. package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
  104. package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
  105. package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
  106. package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
  107. package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
  108. package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
  109. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
  110. package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
  111. package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
  112. package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
  113. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
  114. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  115. package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
  116. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
  117. package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
  118. package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
  119. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
  120. package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
  121. package/dist/types/shared/format-utils/index.d.ts +2 -0
  122. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
  123. package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
  124. package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
  125. package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
  126. package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
  127. package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
  128. package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
  129. package/package.json +1 -1
  130. package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
  131. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
  132. package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
  133. package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
  134. package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
@@ -1,17 +1,17 @@
1
1
  var Ke = Object.defineProperty;
2
2
  var Ve = (e, t, r) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var ae = (e, t, r) => Ve(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { i as Ue, k as N, n as je, ad as Ee, c as Be, p as ze, a6 as Xe, a as He, b as V, Q as se, a1 as Ge, O as qe, a2 as We, a3 as Ye, P as ie, I as Ze, K as Je, S as Qe, a5 as et, aj as R } from "./temporal-input-presentation-AhLSkGPf.js";
5
- import { i as Se, m as J, l as Fe, n as tt, o as ke, a as le, d as rt, j as nt, q as L } from "./pivot-result-contract-expectations-DOYhqeZb.js";
6
- import { h as X, e as ot, p as at, k as st } from "./export-file-format-C-tJsxsf.js";
7
- import { aW as O, aj as it, t as B, aV as lt, v as Q, u as ct } from "./validators-C87JPd-_.js";
8
- import "./matrix-operation-contract-COxrfQTS.js";
9
- import "./analytics-base-schemas-BUFUoO6G.js";
4
+ import { ag as Ue, i as je, l as N, o as Be, ah as Ee, c as ze, p as Xe, a8 as He, a as Ge, b as V, T as se, a3 as qe, S as We, a4 as Ye, a5 as Ze, P as ie, K as Je, N as Qe, U as et, a7 as tt, ai as R } from "./temporal-input-presentation-uvNK_tM0.js";
5
+ import { j as Se, m as J, n as Fe, o as rt, q as ke, f as le, d as nt, k as ot, s as L } from "./pivot-result-contract-expectations-Bl5suy4-.js";
6
+ import { h as X, e as at, p as st, k as it } from "./export-file-format-C-tJsxsf.js";
7
+ import { aW as O, aj as lt, t as B, aV as ct, v as Q, u as ut } from "./validators-CXTneCA4.js";
8
+ import "./matrix-operation-contract-WPv4R-H_.js";
9
+ import "./analytics-base-schemas-CHLxsPfX.js";
10
10
  import "zod";
11
- import { PDF_SAFETY_LIMIT_EXCEEDED as Me, getUtf8ByteLength as ut, FAST_PDF_POLICY as mt } from "../pdf-export-policy/index.js";
12
- import { c as dt, b as ce } from "./pivot-result-identity-CAj8SiRL.js";
13
- import { v as ft, g as pt } from "./zoned-wall-clock-E35Frf9v.js";
14
- function yt(e, t, r) {
11
+ import { PDF_SAFETY_LIMIT_EXCEEDED as Me, getUtf8ByteLength as mt, FAST_PDF_POLICY as dt } from "../pdf-export-policy/index.js";
12
+ import { c as ft, b as ce } from "./pivot-result-identity-vS9TSh4f.js";
13
+ import { v as pt, g as yt } from "./zoned-wall-clock-B1n_WjW3.js";
14
+ function ht(e, t, r) {
15
15
  const n = {
16
16
  ...t,
17
17
  locale: t.locale ?? r
@@ -25,12 +25,12 @@ function yt(e, t, r) {
25
25
  })}${l ?? ""}`;
26
26
  }
27
27
  function W(e, t, r) {
28
- return e === null ? { value: e, text: null } : !t || !Ue(t) && t.type !== "duration" ? {
28
+ return e === null ? { value: e, text: null } : !t || !je(t) && t.type !== "duration" ? {
29
29
  value: e,
30
30
  text: N(e, { type: "number", locale: r })
31
31
  } : t.type === "duration" ? {
32
32
  value: e,
33
- text: je(e, {
33
+ text: Be(e, {
34
34
  inputUnit: t.inputUnit,
35
35
  outputStyle: t.outputStyle,
36
36
  largestUnit: t.largestUnit,
@@ -40,7 +40,7 @@ function W(e, t, r) {
40
40
  suffix: t.suffix,
41
41
  negativeInParentheses: t.negativeStyle === "parentheses"
42
42
  })
43
- } : { value: e, text: yt(e, t, r) };
43
+ } : { value: e, text: ht(e, t, r) };
44
44
  }
45
45
  function ue(e, t, r, n) {
46
46
  return e === null ? { value: e, text: null } : n === "percent" ? {
@@ -69,7 +69,7 @@ function me(e, t) {
69
69
  throw new RangeError("Comparison precision must be an integer from 0 to 6.");
70
70
  return e;
71
71
  }
72
- function wr(e, t) {
72
+ function vr(e, t) {
73
73
  const r = {
74
74
  mode: t.displayMode,
75
75
  current: W(
@@ -85,7 +85,7 @@ function wr(e, t) {
85
85
  };
86
86
  return (t.displayMode === "difference" || t.displayMode === "both") && (r.difference = W(
87
87
  e.delta,
88
- t.metricFormat,
88
+ Ue(t.metricFormat),
89
89
  t.locale
90
90
  )), (t.displayMode === "percent_change" || t.displayMode === "both") && (r.percentChange = ue(
91
91
  e.percentChange,
@@ -99,19 +99,19 @@ function wr(e, t) {
99
99
  "ratio"
100
100
  )), r;
101
101
  }
102
- const ht = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
103
- function bt(e) {
102
+ const bt = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
103
+ function gt(e) {
104
104
  const { presentation: t } = e;
105
- 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" ? ht.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";
105
+ 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" ? bt.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";
106
106
  }
107
- function gt(e) {
107
+ function wt(e) {
108
108
  const t = (o, l) => Number.isInteger(o) ? Math.min(20, Math.max(0, o)) : l, r = t(e.minimumFractionDigits, 0), n = Math.max(r, t(e.maximumFractionDigits, 2));
109
109
  return n === 0 ? "" : `.${"0".repeat(n)}`;
110
110
  }
111
111
  function Y(e) {
112
112
  return `"${e.replace(/"/g, "")}"`;
113
113
  }
114
- function wt(e) {
114
+ function vt(e) {
115
115
  let t;
116
116
  try {
117
117
  t = new Intl.NumberFormat(e.locale ?? "en-US", {
@@ -129,25 +129,25 @@ function wt(e) {
129
129
  text: o(n + 1, r) + t[r].value
130
130
  };
131
131
  }
132
- function vt(e) {
133
- const t = gt(e);
132
+ function Ct(e) {
133
+ const t = wt(e);
134
134
  let r;
135
135
  if (e.type === "scientific")
136
136
  r = `0${t}E+00`;
137
137
  else {
138
138
  const n = `${e.useGrouping === !1 ? "0" : "#,##0"}${t}`;
139
139
  if (e.type === "currency") {
140
- const o = wt(e);
140
+ const o = vt(e);
141
141
  r = o ? o.side === "before" ? `${Y(o.text)}${n}` : `${n}${Y(o.text)}` : n;
142
142
  } else e.type === "percent" ? r = e.percentValueMode === "whole" ? `${n}${Y("%")}` : `${n}%` : r = n;
143
143
  }
144
144
  return e.negativeStyle === "parentheses" ? `${r};(${r})` : r;
145
145
  }
146
- function Ct(e, t) {
146
+ function xt(e, t) {
147
147
  if (!e.formattedValues) return;
148
148
  const { presentation: r } = e;
149
149
  if (t === "number" || t === "by_value")
150
- return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : vt(r.format);
150
+ return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : Ct(r.format);
151
151
  if (t === "date") {
152
152
  if ((r == null ? void 0 : r.kind) === "temporal_bucket")
153
153
  return r.grain === "day" ? "yyyy-mm-dd" : r.grain === "month" ? "mmm yyyy" : "yyyy-mm-dd hh:mm";
@@ -156,7 +156,7 @@ function Ct(e, t) {
156
156
  }
157
157
  }
158
158
  function de(e) {
159
- const t = bt(e), r = Ct(e, t);
159
+ const t = gt(e), r = xt(e, t);
160
160
  return Object.freeze({
161
161
  key: e.key,
162
162
  label: e.label,
@@ -164,18 +164,18 @@ function de(e) {
164
164
  ...r === void 0 ? {} : { numberFormat: r }
165
165
  });
166
166
  }
167
- const xt = 15, Tt = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
167
+ const Tt = 15, Et = /^-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/;
168
168
  function Ie(e) {
169
- return Tt.test(e) ? e : void 0;
169
+ return Et.test(e) ? e : void 0;
170
170
  }
171
171
  function fe(e) {
172
172
  const r = e.replace(/^-/, "").replace(/[eE].*$/, "").replace(".", "").replace(/^0+/, "").replace(/0+$/, "");
173
- if (r.length > xt) return !1;
173
+ if (r.length > Tt) return !1;
174
174
  const n = Number(e);
175
175
  return Number.isFinite(n) && (n !== 0 || r.length === 0);
176
176
  }
177
- const Et = Date.UTC(1900, 2, 1), St = Date.UTC(1e4, 0, 1), Ft = Date.UTC(1899, 11, 30), kt = 864e5;
178
- function Mt(e) {
177
+ const St = Date.UTC(1900, 2, 1), Ft = Date.UTC(1e4, 0, 1), kt = Date.UTC(1899, 11, 30), Mt = 864e5;
178
+ function It(e) {
179
179
  const t = Date.UTC(
180
180
  e.year,
181
181
  e.month - 1,
@@ -184,8 +184,8 @@ function Mt(e) {
184
184
  e.minute,
185
185
  e.second
186
186
  );
187
- if (!(e.year < 1900 || !Number.isFinite(t)) && !(t < Et || t >= St))
188
- return (t - Ft) / kt;
187
+ if (!(e.year < 1900 || !Number.isFinite(t)) && !(t < St || t >= Ft))
188
+ return (t - kt) / Mt;
189
189
  }
190
190
  function pe(e, t, r) {
191
191
  if (typeof e == "number")
@@ -205,7 +205,7 @@ function U(e) {
205
205
  case "text":
206
206
  return o;
207
207
  case "date": {
208
- const l = e.wallClock ? Mt(e.wallClock) : void 0;
208
+ const l = e.wallClock ? It(e.wallClock) : void 0;
209
209
  return l === void 0 ? o : { kind: "date", text: r, serial: l };
210
210
  }
211
211
  case "number":
@@ -216,21 +216,21 @@ function U(e) {
216
216
  return typeof t == "boolean" ? { kind: "boolean", text: r, value: t } : pe(t, r, !1) ?? o;
217
217
  }
218
218
  }
219
- function vr(e) {
219
+ function Cr(e) {
220
220
  return e.kind === "empty" ? "" : e.text;
221
221
  }
222
- const $e = 1e4, It = 1e6, Cr = 5e6, xr = 1024 ** 3, Tr = 1024 ** 3;
223
- function Er(e) {
222
+ const $e = 1e4, $t = 1e6, xr = 5e6, Tr = 1024 ** 3, Er = 1024 ** 3;
223
+ function Sr(e) {
224
224
  return e > $e;
225
225
  }
226
- function Sr(e) {
227
- return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= $e ? "direct" : e.loadedRowCount <= It ? "background" : "blocked";
226
+ function Fr(e) {
227
+ return e.cardType === "matrixTable" ? "try-direct" : e.loadedRowCount === null || e.loadedRowCount <= $e ? "direct" : e.loadedRowCount <= $t ? "background" : "blocked";
228
228
  }
229
- const Fr = {
229
+ const kr = {
230
230
  rowLabels: "tabular",
231
231
  subtotals: "after"
232
232
  };
233
- function kr(e, t) {
233
+ function Mr(e, t) {
234
234
  const r = t.rowLabels === "outline" ? { kind: "compact" } : e.layout.kind === "tabular" ? e.layout : { kind: "tabular", repeatLabels: !1 }, n = e.totals.rows;
235
235
  return {
236
236
  ...e,
@@ -249,13 +249,13 @@ function kr(e, t) {
249
249
  }
250
250
  };
251
251
  }
252
- const $t = 2;
253
- function Lt(e) {
252
+ const Lt = 2;
253
+ function Pt(e) {
254
254
  return typeof e == "number" ? Number.isInteger(e) : O(e) ? !e.value.includes(".") : !0;
255
255
  }
256
- function Pt(e, t, r) {
256
+ function Dt(e, t, r) {
257
257
  const n = e.descriptors.measures.filter(
258
- (s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && it(s.column.dataType) === "number"
258
+ (s) => r.measureFormats[s.id] === void 0 && s.semanticFormat === void 0 && lt(s.column.dataType) === "number"
259
259
  );
260
260
  if (n.length === 0) return r;
261
261
  const o = /* @__PURE__ */ new Set();
@@ -263,7 +263,7 @@ function Pt(e, t, r) {
263
263
  if (!(s.kind !== "measure" || o.has(s.measureId)))
264
264
  for (const f of t) {
265
265
  const d = f.values[c];
266
- if ((d == null ? void 0 : d.kind) === "value" && !Lt(d.value)) {
266
+ if ((d == null ? void 0 : d.kind) === "value" && !Pt(d.value)) {
267
267
  o.add(s.measureId);
268
268
  return;
269
269
  }
@@ -271,7 +271,7 @@ function Pt(e, t, r) {
271
271
  });
272
272
  const l = { ...r.measureFormats };
273
273
  for (const { id: s } of n) {
274
- const c = o.has(s) ? $t : 0;
274
+ const c = o.has(s) ? Lt : 0;
275
275
  l[s] = {
276
276
  type: "number",
277
277
  minimumFractionDigits: c,
@@ -284,24 +284,24 @@ function Pt(e, t, r) {
284
284
  function j(e) {
285
285
  return B(e.slice(0, -1));
286
286
  }
287
- function Dt(e, t) {
287
+ function _t(e, t) {
288
288
  return t.length > e.length && B(t.slice(0, e.length)) === B(e);
289
289
  }
290
- function _t(e) {
290
+ function At(e) {
291
291
  return e.map((t, r) => {
292
292
  if (r === 0 || t.kind !== "layout") return !1;
293
293
  const n = e[r - 1];
294
294
  if (n.kind !== "layout") return !1;
295
- if (t.role !== "member" || Dt(n.rowPath, t.rowPath)) return !0;
295
+ if (t.role !== "member" || _t(n.rowPath, t.rowPath)) return !0;
296
296
  const o = e[r - 2];
297
297
  return n.role === "member" && (!o || o.kind !== "layout" || o.role !== "member" || j(o.rowPath) !== j(n.rowPath)) && t.rowPath.length === n.rowPath.length && j(t.rowPath) === j(n.rowPath);
298
298
  });
299
299
  }
300
- const At = "pdf-group-continuation";
300
+ const Rt = "pdf-group-continuation";
301
301
  function Le(e, t, r) {
302
302
  return !(r != null && r.hasTextAffixes) && t.kind === "value" && (typeof t.value == "number" || O(t.value)) ? e : X(e);
303
303
  }
304
- function Rt(e, t, r) {
304
+ function Nt(e, t, r) {
305
305
  const n = Se(e.descriptors, t.presentation, r), o = e.columns.map((u) => {
306
306
  var a;
307
307
  return u.kind === "measure" && ((a = n.measureSemantics.get(u.measureId)) == null ? void 0 : a.isNumeric) === !0;
@@ -312,7 +312,7 @@ function Rt(e, t, r) {
312
312
  }), f = Math.min(t.spec.columns.length, Math.max(
313
313
  0,
314
314
  ...e.columns.map((u) => u.kind === "measure" ? u.columnPath.length + (u.role !== "member" ? 1 : 0) : 0)
315
- )), d = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? l(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), b = (u, a) => tt({
315
+ )), d = Array.from({ length: f + 1 }, (u, a) => e.columns.map((m) => a === f ? m.label : m.kind !== "measure" ? "" : a < m.columnPath.length ? l(m.columnPath[a]) : a === m.columnPath.length && m.role !== "member" ? s(m.columnPath, m.role, "columns") : "")), b = (u, a) => rt({
316
316
  path: u.rowPath,
317
317
  role: u.kind === "layout" ? u.role : "member",
318
318
  levelCount: Math.max(1, t.spec.rows.length),
@@ -374,16 +374,16 @@ function Rt(e, t, r) {
374
374
  csvRows: (u, a) => u.map((m, h) => x(m, h ? u[h - 1] : a ?? void 0))
375
375
  };
376
376
  }
377
- function Mr(e) {
377
+ function Ir(e) {
378
378
  return e.columns.map((t) => X(t.label));
379
379
  }
380
- function Ir(e, t, r) {
381
- return Nt(e, t, r).map((n, o) => {
380
+ function $r(e, t, r) {
381
+ return Ot(e, t, r).map((n, o) => {
382
382
  const l = t.columns[o];
383
383
  return l.kind === "measure" ? Le(n, e.values[o], r.measureSemantics.get(l.measureId)) : X(n);
384
384
  });
385
385
  }
386
- function Nt(e, t, r) {
386
+ function Ot(e, t, r) {
387
387
  if (e.kind !== "flat") throw new Error("Flat Matrix CSV requires flat rows.");
388
388
  if (e.values.length !== t.columns.length) throw new Error("Matrix row does not match its frozen layout.");
389
389
  const n = [...e.rowPath, ...e.columnPath];
@@ -398,8 +398,8 @@ function Nt(e, t, r) {
398
398
  return J([s], r.levels);
399
399
  });
400
400
  }
401
- function Ot(e) {
402
- const t = Rt(e.layout, e.request, e.report), r = e.layout.columns.map((s, c) => ({
401
+ function Kt(e) {
402
+ const t = Nt(e.layout, e.request, e.report), r = e.layout.columns.map((s, c) => ({
403
403
  index: c,
404
404
  columnId: `matrix:${c}`,
405
405
  label: t.headers[c],
@@ -444,7 +444,7 @@ function Ot(e) {
444
444
  subtotalLevel: String(s.rowPath.length),
445
445
  // A tabular layout prints each label once unless it repeats them; the
446
446
  // blank cell continues its group, so a grid draws no rule above it.
447
- cells: t.row(s, e.rows[c - 1]).map((d, b) => f.has(b) ? { ...n(d, b, !1), className: At } : n(d, b, !1))
447
+ cells: t.row(s, e.rows[c - 1]).map((d, b) => f.has(b) ? { ...n(d, b, !1), className: Rt } : n(d, b, !1))
448
448
  };
449
449
  }),
450
450
  grandTotal: null,
@@ -461,7 +461,7 @@ function Ot(e) {
461
461
  }
462
462
  };
463
463
  }
464
- function Kt(e, t, r) {
464
+ function Vt(e, t, r) {
465
465
  const { levels: n } = Se(e.descriptors, t.presentation, r), o = t.spec.columns.length > 0, l = [], s = [], c = e.columns.map((d, b) => {
466
466
  if (d.kind !== "measure") return null;
467
467
  const w = o ? `${d.role}:${B(d.columnPath)}` : `measure:${b}`;
@@ -475,18 +475,18 @@ function Kt(e, t, r) {
475
475
  groupLevelLabel: f ? Ee(f, t.presentation) : "Measures"
476
476
  };
477
477
  }
478
- function $r(e) {
478
+ function Lr(e) {
479
479
  const { layout: t, rows: r, report: n } = e, o = {
480
480
  ...e.request,
481
- presentation: Pt(t, r, e.request.presentation)
482
- }, l = Ot({ layout: t, rows: r, request: o, report: n }), s = _t(r), c = Kt(t, o, n), f = {
481
+ presentation: Dt(t, r, e.request.presentation)
482
+ }, l = Kt({ layout: t, rows: r, request: o, report: n }), s = At(r), c = Vt(t, o, n), f = {
483
483
  ...l,
484
484
  rows: l.rows.map((d, b) => ({ ...d, keepWithPrevious: s[b] })),
485
485
  metadata: { ...l.metadata, ...c }
486
486
  };
487
487
  return { request: o, table: f, ...c };
488
488
  }
489
- class Vt extends Error {
489
+ class Ut extends Error {
490
490
  constructor() {
491
491
  super(...arguments);
492
492
  ae(this, "code", Me);
@@ -500,7 +500,7 @@ function ye(e) {
500
500
  if (typeof o == "string" && o.trim())
501
501
  return o.trim();
502
502
  }
503
- async function Ut(e) {
503
+ async function jt(e) {
504
504
  const t = `PDF request failed: ${e.status} ${e.statusText}`.trim(), r = e.headers.get("content-type") || "";
505
505
  try {
506
506
  if (r.includes("application/json")) {
@@ -523,9 +523,9 @@ async function Ut(e) {
523
523
  return { message: t };
524
524
  }
525
525
  }
526
- async function Lr(e) {
526
+ async function Pr(e) {
527
527
  if (!e.token) throw new Error("Missing auth token for PDF export");
528
- if (ut(e.serializedPayload) > mt.maxRequestBytes)
528
+ if (mt(e.serializedPayload) > dt.maxRequestBytes)
529
529
  throw new Error("Fast-path PDF request exceeds the structured body limit");
530
530
  const t = await (e.fetchImpl ?? fetch)(e.url, {
531
531
  method: "POST",
@@ -534,8 +534,8 @@ async function Lr(e) {
534
534
  signal: e.signal
535
535
  });
536
536
  if (!t.ok) {
537
- const n = await Ut(t);
538
- throw n.code === Me ? new Vt(n.message) : new Error(n.message);
537
+ const n = await jt(t);
538
+ throw n.code === Me ? new Ut(n.message) : new Error(n.message);
539
539
  }
540
540
  const r = await t.json();
541
541
  if (r != null && r.error) throw new Error(r.error);
@@ -543,13 +543,13 @@ async function Lr(e) {
543
543
  throw new Error("Fast-path PDF response missing download URL");
544
544
  return r;
545
545
  }
546
- function jt(e, t) {
546
+ function Bt(e, t) {
547
547
  return e.dashboardId === t.dashboardId && e.cardId === t.cardId && e.attachmentIndex === void 0;
548
548
  }
549
549
  function Pe(e) {
550
550
  return new Map(
551
551
  e.presentationExecutionSnapshot.resolvedFormats.flatMap(
552
- (t) => t.format.type === "raw_temporal" && t.target.kind === "column" && jt(t.scope, e.scope) ? [[t.target.columnKey, t.format]] : []
552
+ (t) => t.format.type === "raw_temporal" && t.target.kind === "column" && Bt(t.scope, e.scope) ? [[t.target.columnKey, t.format]] : []
553
553
  )
554
554
  );
555
555
  }
@@ -557,10 +557,10 @@ function De(e) {
557
557
  const t = e == null ? void 0 : e.sql, r = e == null ? void 0 : e.python;
558
558
  return (e == null ? void 0 : e.resultOwner) === "freeform" && typeof t == "string" && !!t.trim() && (typeof r != "string" || !r.trim());
559
559
  }
560
- function Pr(e) {
560
+ function Dr(e) {
561
561
  return e.formatting.useFormattedValues !== !1 && De(e.queryPayload) && Pe(e.formatting).size > 0;
562
562
  }
563
- function Bt(e, t) {
563
+ function zt(e, t) {
564
564
  return e.map((r, n) => {
565
565
  if (!Object.prototype.hasOwnProperty.call(r, t) || r[t] === void 0)
566
566
  throw new Error(
@@ -570,7 +570,7 @@ function Bt(e, t) {
570
570
  return o === null || typeof o == "string" ? o : String(o);
571
571
  });
572
572
  }
573
- function zt(e) {
573
+ function Xt(e) {
574
574
  if (e.formatting.useFormattedValues === !1)
575
575
  return {
576
576
  activatedColumnKeys: /* @__PURE__ */ new Set(),
@@ -589,14 +589,14 @@ function zt(e) {
589
589
  const d = o.get(c);
590
590
  let b;
591
591
  if (d != null && d.rawTemporal)
592
- b = ft(d, {
592
+ b = pt(d, {
593
593
  metadataRequired: !0
594
594
  }), r.add(c);
595
595
  else if (l) {
596
596
  r.add(c);
597
- const w = Be({
597
+ const w = ze({
598
598
  columnKey: c,
599
- values: Bt(e.records, c)
599
+ values: zt(e.records, c)
600
600
  });
601
601
  s.set(c, w), w.status === "classified" && (b = w.metadata);
602
602
  } else
@@ -604,18 +604,18 @@ function zt(e) {
604
604
  b && n.set(c, {
605
605
  metadata: b,
606
606
  format: f,
607
- formatValue: ze({ metadata: b, format: f })
607
+ formatValue: Xe({ metadata: b, format: f })
608
608
  });
609
609
  }
610
610
  return {
611
611
  activatedColumnKeys: r,
612
612
  byColumnKey: n,
613
613
  ...l ? {
614
- sqlChunkEvidence: Xe(s)
614
+ sqlChunkEvidence: He(s)
615
615
  } : {}
616
616
  };
617
617
  }
618
- function Xt(e) {
618
+ function Ht(e) {
619
619
  if (!e.resolution.activatedColumnKeys.has(e.columnKey))
620
620
  return;
621
621
  if (e.value === void 0)
@@ -634,7 +634,7 @@ function he(e, t) {
634
634
  const r = e.byColumnKey.get(t);
635
635
  return r ? r.metadata.valueKind === "date" : void 0;
636
636
  }
637
- const Ht = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), Gt = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, qt = /^\d{4}-\d{2}-\d{2}$/, _e = "MM/dd/yyyy";
637
+ const Gt = /* @__PURE__ */ new Set(["string", "number", "boolean", "date", "datetime"]), qt = /^\d{4}-\d{2}-\d{2}|^\d{2}\/\d{2}\/\d{4}/, Wt = /^\d{4}-\d{2}-\d{2}$/, _e = "MM/dd/yyyy";
638
638
  function z(e) {
639
639
  return typeof e == "object" && e !== null && !Array.isArray(e);
640
640
  }
@@ -656,29 +656,29 @@ function we(e) {
656
656
  function ve(e, t) {
657
657
  return e && e !== "auto" ? e : t;
658
658
  }
659
- function Wt(e) {
659
+ function Yt(e) {
660
660
  return !/[HhKkmsSa]/.test(e.replace(/'[^']*'/g, ""));
661
661
  }
662
- function Yt(e) {
662
+ function Zt(e) {
663
663
  if (typeof e == "number") return Number.isFinite(e) ? e : null;
664
664
  if (typeof e != "string" || !e.trim()) return null;
665
665
  const t = Number(e);
666
666
  return Number.isFinite(t) ? t : null;
667
667
  }
668
- function Zt(e) {
668
+ function Jt(e) {
669
669
  const t = Ie(e);
670
670
  if (t !== void 0)
671
671
  try {
672
- return lt(t, /[.eE]/.test(t) ? "decimal" : "integer");
672
+ return ct(t, /[.eE]/.test(t) ? "decimal" : "integer");
673
673
  } catch {
674
674
  return;
675
675
  }
676
676
  }
677
- function Jt(e) {
677
+ function Qt(e) {
678
678
  return e.calendar.fiscalCalendar && (e.granularity === "quarter" || e.granularity === "year") ? "fiscal" : e.granularity;
679
679
  }
680
- function Dr(e) {
681
- const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, l = (a) => He({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => qe({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
680
+ function _r(e) {
681
+ const { formatting: t, queryPayload: r } = e, n = t.useFormattedValues, o = t.scope, l = (a) => Ge({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } }), s = (a) => We({ snapshot: t.presentationExecutionSnapshot, scope: o, target: { kind: "column", columnKey: a } });
682
682
  function c(a) {
683
683
  var h;
684
684
  if ((h = t.visibleColumns) != null && h.length) return t.visibleColumns;
@@ -692,7 +692,7 @@ function Dr(e) {
692
692
  const h = a == null ? void 0 : a.pivotIdentity;
693
693
  if (!h || !h.members || h.members.length === 0) return;
694
694
  const p = ce({ identity: h, columnKey: (a == null ? void 0 : a.key) || (a == null ? void 0 : a.field) || "" });
695
- return nt({
695
+ return ot({
696
696
  members: p,
697
697
  metricLabel: (a == null ? void 0 : a.label) || (a == null ? void 0 : a.headerName),
698
698
  mode: n ? "formatted" : "canonical",
@@ -709,7 +709,7 @@ function Dr(e) {
709
709
  }).flattenedLabel;
710
710
  }
711
711
  function b(a, m) {
712
- return Ge({
712
+ return qe({
713
713
  metadata: a,
714
714
  cardFormat: m,
715
715
  locale: m.locale,
@@ -720,7 +720,7 @@ function Dr(e) {
720
720
  const { records: h, columns: p } = a, T = z(r.cardConfig) ? r.cardConfig : void 0, g = T == null ? void 0 : T.pivotByColumns, v = Array.isArray(g) ? g.flatMap(
721
721
  (i) => z(i) && typeof i.id == "string" && i.id ? [i.id] : []
722
722
  ) : [];
723
- dt(
723
+ ft(
724
724
  p.map((i) => ({ key: A(i) || "<unknown>", pivotIdentity: i.pivotIdentity })),
725
725
  { expectedPivotFieldIds: v }
726
726
  );
@@ -729,7 +729,7 @@ function Dr(e) {
729
729
  const y = A(i);
730
730
  return y ? [[y, i]] : [];
731
731
  })
732
- ), Re = new Map(a.resultColumns.map((i) => [i.key, i.dataType])), I = zt({
732
+ ), Re = new Map(a.resultColumns.map((i) => [i.key, i.dataType])), I = Xt({
733
733
  records: h,
734
734
  columns: p,
735
735
  formatting: t,
@@ -753,7 +753,7 @@ function Dr(e) {
753
753
  y && E && te.set(i, b(E, y));
754
754
  }
755
755
  const G = C.map((i) => {
756
- const y = Re.get(i), E = y && Ht.has(y) ? y : "unknown", S = n ? x(i, I, H) : void 0, M = f(i, F.get(i)), P = n && I.activatedColumnKeys.has(i) && he(I, i) === void 0;
756
+ const y = Re.get(i), E = y && Gt.has(y) ? y : "unknown", S = n ? x(i, I, H) : void 0, M = f(i, F.get(i)), P = n && I.activatedColumnKeys.has(i) && he(I, i) === void 0;
757
757
  return {
758
758
  key: i,
759
759
  label: M,
@@ -765,7 +765,7 @@ function Dr(e) {
765
765
  });
766
766
  function Ne(i, y, E, S) {
767
767
  if (!n) return { text: be(i), value: i };
768
- const M = Xt({ value: i, columnKey: y, rowIndex: E, resolution: I });
768
+ const M = Ht({ value: i, columnKey: y, rowIndex: E, resolution: I });
769
769
  if (M !== void 0) return { text: M.text, value: i, ...M.wallClock ? { wallClock: M.wallClock } : {} };
770
770
  const P = H.get(y);
771
771
  if (P) {
@@ -773,9 +773,9 @@ function Dr(e) {
773
773
  if (!k) throw new Error(`Missing resolved temporal presentation for column "${y}"`);
774
774
  if (i != null && typeof i != "string")
775
775
  throw new Error(`Canonical temporal column "${y}" must contain a string or null`);
776
- const D = i ?? null, _ = We(D, P);
776
+ const D = i ?? null, _ = Ye(D, P);
777
777
  return {
778
- text: Ye({ value: D, metadata: P, format: k }),
778
+ text: Ze({ value: D, metadata: P, format: k }),
779
779
  value: i,
780
780
  ..._ ? { wallClock: _ } : {}
781
781
  };
@@ -798,8 +798,8 @@ function Dr(e) {
798
798
  if (O(i))
799
799
  return { text: $ ? V(i, $) : i.value, value: i };
800
800
  const K = ge(t, y);
801
- if (K && (i instanceof Date || typeof i == "string" && Gt.test(i))) {
802
- const k = i instanceof Date ? i.toISOString() : i, D = typeof i == "string" && qt.test(i), _ = D ? "UTC" : ve(K.timezone, t.timezone), ne = D ? "UTC" : K.sourceTimezone || "auto", oe = rt(k, _, ne);
801
+ if (K && (i instanceof Date || typeof i == "string" && qt.test(i))) {
802
+ const k = i instanceof Date ? i.toISOString() : i, D = typeof i == "string" && Wt.test(i), _ = D ? "UTC" : ve(K.timezone, t.timezone), ne = D ? "UTC" : K.sourceTimezone || "auto", oe = nt(k, _, ne);
803
803
  return {
804
804
  text: le(k, we(K), _, ne),
805
805
  value: i,
@@ -807,7 +807,7 @@ function Dr(e) {
807
807
  };
808
808
  }
809
809
  if (typeof i == "string" && $ && S.dataType === "number") {
810
- const k = Zt(i);
810
+ const k = Jt(i);
811
811
  if (k) return { text: V(k, $), value: i };
812
812
  }
813
813
  return { text: be(i), value: i };
@@ -836,10 +836,10 @@ function Dr(e) {
836
836
  return v === void 0 ? { kind: "text" } : { kind: "datetime", dateOnly: v };
837
837
  }
838
838
  const p = h.get(a);
839
- if (p) return { kind: "temporal_bucket", grain: Jt(p) };
839
+ if (p) return { kind: "temporal_bucket", grain: Qt(p) };
840
840
  if (s(a)) return { kind: "text" };
841
841
  const T = ge(t, a);
842
- if (T) return { kind: "datetime", dateOnly: Wt(we(T)) };
842
+ if (T) return { kind: "datetime", dateOnly: Yt(we(T)) };
843
843
  const g = l(a);
844
844
  return g ? { kind: "measure", format: g } : void 0;
845
845
  }
@@ -856,13 +856,13 @@ function Dr(e) {
856
856
  });
857
857
  if (g == null) return { kind: "empty" };
858
858
  if (!n) return U({ value: g, text: String(g), column: C });
859
- const F = v ? Yt(g) : null;
859
+ const F = v ? Zt(g) : null;
860
860
  return U(v && F !== null ? { value: F, text: V(F, v), column: C } : { value: g, text: String(g), column: C });
861
861
  });
862
862
  }
863
863
  return { format: w, totals: u };
864
864
  }
865
- const Qt = /* @__PURE__ */ new Set([
865
+ const er = /* @__PURE__ */ new Set([
866
866
  "scope",
867
867
  "useFormattedValues",
868
868
  "timezone",
@@ -887,7 +887,7 @@ function Ce(e, t) {
887
887
  return e;
888
888
  }
889
889
  }
890
- function _r(e) {
890
+ function Ar(e) {
891
891
  if (!ee(e))
892
892
  throw new Error("formatting must be an object");
893
893
  const t = ["reportContext", "resolvedFormats"].find(
@@ -897,23 +897,23 @@ function _r(e) {
897
897
  throw new ie(
898
898
  `formatting.${t} is retired; formatting.presentationExecutionSnapshot is authoritative.`
899
899
  );
900
- const r = Object.keys(e).find((a) => !Qt.has(a));
900
+ const r = Object.keys(e).find((a) => !er.has(a));
901
901
  if (r)
902
902
  throw new Error(`formatting contains unknown property "${r}"`);
903
903
  const n = typeof e.timezone == "string" ? e.timezone.trim() : "";
904
904
  if (!n)
905
905
  throw new Error("formatting.timezone must be a non-empty string");
906
- const o = ot(e.delimiter);
906
+ const o = at(e.delimiter);
907
907
  if (!o)
908
908
  throw new Error("formatting.delimiter must be a comma, semicolon or tab");
909
- const l = at(e.csvEncoding);
909
+ const l = st(e.csvEncoding);
910
910
  if (!l)
911
911
  throw new Error("formatting.csvEncoding must be 'utf-8-bom' or 'utf-8'");
912
912
  if (typeof e.includeHeaders != "boolean")
913
913
  throw new Error("formatting.includeHeaders must be a boolean");
914
914
  if (e.useFormattedValues !== void 0 && typeof e.useFormattedValues != "boolean")
915
915
  throw new Error("formatting.useFormattedValues must be a boolean");
916
- const s = e.fileFormat === void 0 ? void 0 : st(e.fileFormat);
916
+ const s = e.fileFormat === void 0 ? void 0 : it(e.fileFormat);
917
917
  if (e.fileFormat !== void 0 && !s)
918
918
  throw new Error("formatting.fileFormat must be 'csv' or 'xlsx'");
919
919
  if (e.title !== void 0 && typeof e.title != "string")
@@ -929,16 +929,16 @@ function _r(e) {
929
929
  throw new Error("formatting.tableTotalsLabelColumnKey must be a non-empty string");
930
930
  if (b && !(c != null && c.includes(b)))
931
931
  throw new Error("formatting.tableTotalsLabelColumnKey must identify a visible column");
932
- const w = Ze(e.scope, "formatting.scope");
932
+ const w = Je(e.scope, "formatting.scope");
933
933
  if (!w.cardId || w.attachmentIndex !== void 0)
934
934
  throw new Error("formatting.scope must identify exactly one dashboard card");
935
- const x = e.useFormattedValues !== !1, u = Je(e.presentationExecutionSnapshot);
935
+ const x = e.useFormattedValues !== !1, u = Qe(e.presentationExecutionSnapshot);
936
936
  if (n !== u.reportContext.calendar.tz)
937
937
  throw new Error(
938
938
  "formatting.timezone must equal presentationExecutionSnapshot.reportContext.calendar.tz"
939
939
  );
940
940
  try {
941
- Qe({
941
+ et({
942
942
  snapshot: u,
943
943
  expectedScope: { dashboardId: w.dashboardId, cardId: w.cardId },
944
944
  visibleColumns: c,
@@ -965,7 +965,7 @@ function _r(e) {
965
965
  ...typeof e.title == "string" ? { title: e.title } : {}
966
966
  };
967
967
  }
968
- function Ar(e) {
968
+ function Rr(e) {
969
969
  const t = e.formatOptions, r = (n) => ee(n) ? n : void 0;
970
970
  return {
971
971
  scope: { dashboardId: e.dashboardId, cardId: e.cardId },
@@ -983,7 +983,7 @@ function Ar(e) {
983
983
  ...typeof e.title == "string" ? { title: e.title } : {}
984
984
  };
985
985
  }
986
- const er = /^\d{4}-\d{2}-\d{2}$/;
986
+ const tr = /^\d{4}-\d{2}-\d{2}$/;
987
987
  function Ae(e) {
988
988
  const t = e.split(".");
989
989
  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(" ");
@@ -993,22 +993,22 @@ function Z(e, t) {
993
993
  const r = e.slice(0, xe).map(t).join(", "), n = e.length - xe;
994
994
  return n > 0 ? `${r}, and ${n} more` : r;
995
995
  }
996
- function tr(e) {
996
+ function rr(e) {
997
997
  if (e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between")
998
998
  return;
999
999
  const t = Q(e.relativeMeta);
1000
1000
  if (t)
1001
- return ct(t) || t.unit === "quarter" || t.unit === "year" ? t : void 0;
1001
+ return ut(t) || t.unit === "quarter" || t.unit === "year" ? t : void 0;
1002
1002
  }
1003
- function rr(e, t) {
1004
- if (t !== "label") return tr(e);
1003
+ function nr(e, t) {
1004
+ if (t !== "label") return rr(e);
1005
1005
  if (!(e.valueType !== "date" || e.operation !== "between" && e.operation !== "not between"))
1006
1006
  return Q(e.relativeMeta);
1007
1007
  }
1008
1008
  function Te(e, t = {}) {
1009
- const { name: r, operation: n, values: o, valueType: l } = e, s = t.label ?? Ae(r), c = rr(e, t.relativeDates);
1009
+ const { name: r, operation: n, values: o, valueType: l } = e, s = t.label ?? Ae(r), c = nr(e, t.relativeDates);
1010
1010
  if (c) {
1011
- const d = pt(c);
1011
+ const d = yt(c);
1012
1012
  if (d)
1013
1013
  return n === "between" ? `${s}: ${d}` : `${s} not in ${d}`;
1014
1014
  }
@@ -1025,7 +1025,7 @@ function Te(e, t = {}) {
1025
1025
  minute: "2-digit"
1026
1026
  } : {}
1027
1027
  };
1028
- if (typeof d == "string" && er.test(d)) {
1028
+ if (typeof d == "string" && tr.test(d)) {
1029
1029
  const [u, a, m] = d.split("-").map(Number);
1030
1030
  return new Intl.DateTimeFormat(void 0, {
1031
1031
  year: "numeric",
@@ -1034,7 +1034,7 @@ function Te(e, t = {}) {
1034
1034
  timeZone: "UTC"
1035
1035
  }).format(new Date(Date.UTC(u, a - 1, m)));
1036
1036
  }
1037
- if (typeof d == "string" && et(d) === "wall_datetime") {
1037
+ if (typeof d == "string" && tt(d) === "wall_datetime") {
1038
1038
  const [u, a, m, h, p] = d.split(/[-T :.]/).map(Number);
1039
1039
  return new Intl.DateTimeFormat(void 0, {
1040
1040
  ...w,
@@ -1084,7 +1084,7 @@ function Te(e, t = {}) {
1084
1084
  return `${s}: ${Z(o, f)}`;
1085
1085
  }
1086
1086
  }
1087
- function Rr(e, t = {}) {
1087
+ function Nr(e, t = {}) {
1088
1088
  if (!e || e.length === 0)
1089
1089
  return "";
1090
1090
  const r = /* @__PURE__ */ new Map();
@@ -1103,25 +1103,25 @@ function Rr(e, t = {}) {
1103
1103
  }
1104
1104
  }), n.join(" | ");
1105
1105
  }
1106
- function Nr(e) {
1107
- return ((e == null ? void 0 : e.filterValues) ?? []).filter(nr).map(or);
1106
+ function Or(e) {
1107
+ return ((e == null ? void 0 : e.filterValues) ?? []).filter(or).map(ar);
1108
1108
  }
1109
- function nr(e) {
1109
+ function or(e) {
1110
1110
  return !!e && typeof e == "object" && typeof e.name == "string" && Array.isArray(e.values);
1111
1111
  }
1112
- function or(e) {
1112
+ function ar(e) {
1113
1113
  if (!("relativeMeta" in e) || e.relativeMeta === void 0) return e;
1114
1114
  const { relativeMeta: t, ...r } = e, n = Q(t);
1115
1115
  return n ? { ...r, relativeMeta: n } : r;
1116
1116
  }
1117
- const ar = /* @__PURE__ */ new Set([
1117
+ const sr = /* @__PURE__ */ new Set([
1118
1118
  "day",
1119
1119
  "week",
1120
1120
  "month",
1121
1121
  "quarter",
1122
1122
  "year"
1123
1123
  ]);
1124
- function sr(e, t) {
1124
+ function ir(e, t) {
1125
1125
  try {
1126
1126
  const r = L(
1127
1127
  R(e),
@@ -1133,8 +1133,8 @@ function sr(e, t) {
1133
1133
  return;
1134
1134
  }
1135
1135
  }
1136
- function Or(e, t, r, n = !1) {
1137
- const o = ir(
1136
+ function Kr(e, t, r, n = !1) {
1137
+ const o = lr(
1138
1138
  e,
1139
1139
  t,
1140
1140
  r,
@@ -1142,10 +1142,10 @@ function Or(e, t, r, n = !1) {
1142
1142
  );
1143
1143
  return `${o.start} - ${o.end}`;
1144
1144
  }
1145
- function ir(e, t, r, n = !1) {
1145
+ function lr(e, t, r, n = !1) {
1146
1146
  try {
1147
- if (r && ar.has(r)) {
1148
- const o = sr(e.end, t);
1147
+ if (r && sr.has(r)) {
1148
+ const o = ir(e.end, t);
1149
1149
  if (o) {
1150
1150
  const l = n ? "MMM d" : "MMM d, yyyy";
1151
1151
  return {
@@ -1178,41 +1178,41 @@ function ir(e, t, r, n = !1) {
1178
1178
  return { start: e.start, end: `before ${e.end}` };
1179
1179
  }
1180
1180
  export {
1181
- Pr as A,
1181
+ Dr as A,
1182
1182
  xe as B,
1183
- tr as C,
1183
+ rr as C,
1184
1184
  $e as D,
1185
1185
  Te as E,
1186
- It as F,
1187
- Rr as G,
1188
- Nr as H,
1189
- ir as I,
1190
- Cr as M,
1191
- At as P,
1192
- wr as a,
1193
- xr as b,
1194
- Tr as c,
1195
- Er as d,
1196
- vr as e,
1197
- Or as f,
1198
- Sr as g,
1199
- Mr as h,
1200
- Ir as i,
1201
- Ot as j,
1202
- $r as k,
1203
- Fr as l,
1204
- Nt as m,
1205
- kr as n,
1206
- $t as o,
1207
- Rt as p,
1208
- Pt as q,
1186
+ $t as F,
1187
+ Nr as G,
1188
+ Or as H,
1189
+ lr as I,
1190
+ xr as M,
1191
+ Rt as P,
1192
+ vr as a,
1193
+ Tr as b,
1194
+ Er as c,
1195
+ Sr as d,
1196
+ Cr as e,
1197
+ Kr as f,
1198
+ Fr as g,
1199
+ Ir as h,
1200
+ $r as i,
1201
+ Kt as j,
1202
+ Lr as k,
1203
+ kr as l,
1204
+ Ot as m,
1205
+ Mr as n,
1206
+ Lt as o,
1207
+ Nt as p,
1208
+ Dt as q,
1209
1209
  de as r,
1210
- _t as s,
1210
+ At as s,
1211
1211
  U as t,
1212
- Vt as u,
1213
- Ut as v,
1214
- Lr as w,
1215
- Dr as x,
1216
- _r as y,
1217
- Ar as z
1212
+ Ut as u,
1213
+ jt as v,
1214
+ Pr as w,
1215
+ _r as x,
1216
+ Ar as y,
1217
+ Rr as z
1218
1218
  };