react-semaphor 0.1.561 → 0.1.563

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 (138) hide show
  1. package/dist/analytics-protocol/index.js +452 -429
  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-CB3oFAXk.js → analytics-base-schemas-BaIQrEzX.js} +139 -134
  7. package/dist/chunks/{assistant-chat-DiVHY3Hw.js → assistant-chat-iIp02_77.js} +104 -104
  8. package/dist/chunks/{bookmark-impact-CR09dpkn.js → bookmark-impact-D4Kl4amw.js} +2 -2
  9. package/dist/chunks/{bookmark-state-BusLpkb7.js → bookmark-state-CWeoGbrx.js} +25 -25
  10. package/dist/chunks/{braces-u8VorWJc.js → braces-DzgoQC64.js} +1 -1
  11. package/dist/chunks/{comparison-window-caption-DDsIWJYT.js → comparison-window-caption-D1EUXzaR.js} +562 -437
  12. package/dist/chunks/{context-TUjw9eqr.js → context-R31TSL5V.js} +1 -1
  13. package/dist/chunks/{dashboard-BRdZBPqr.js → dashboard-CmqeP3QZ.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-CgvTLndW.js → dashboard-briefing-launcher-TYlSW77S.js} +155 -154
  15. package/dist/chunks/{dashboard-controls-B4vfSzTF.js → dashboard-controls-B253nJS-.js} +970 -968
  16. package/dist/chunks/{dashboard-json-Y3MF59g7.js → dashboard-json-osQuinUZ.js} +5 -5
  17. package/dist/chunks/dates-DFY7Gfss.js +91 -0
  18. package/dist/chunks/{edit-dashboard-visual-DwjZcxj-.js → edit-dashboard-visual-CMar-NhA.js} +4636 -4681
  19. package/dist/chunks/{filter-reach-copy-bijwf_-b.js → filter-reach-copy-CvV7W5dd.js} +1470 -1101
  20. package/dist/chunks/{filter-value-text-DFnhwuEW.js → filter-value-text-CPwFkrMz.js} +11 -10
  21. package/dist/chunks/{global-date-filter-utils-BXgCpvQM.js → global-date-filter-utils-N1kcsOFE.js} +8997 -7417
  22. package/dist/chunks/{index-ClwbY3BL.js → index-CNGkfUp4.js} +91 -85
  23. package/dist/chunks/{layout-grid-CtvCBfOm.js → layout-grid-BM65viQh.js} +1 -1
  24. package/dist/chunks/{list-filter-BklYgciR.js → list-filter-BoeLBfL3.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-pU51-JmY.js → matrix-analytical-definition-hEucouWM.js} +4 -4
  26. package/dist/chunks/{matrix-card-CUorIB7Q.js → matrix-card-CCh9JjP1.js} +3 -3
  27. package/dist/chunks/{matrix-member-presentation-Df5UgCGN.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
  28. package/dist/chunks/{matrix-operation-contract-BSiGEXVC.js → matrix-operation-contract-DsLdFdSa.js} +339 -330
  29. package/dist/chunks/{metric-comparison-95aC0uEO.js → metric-comparison-Bnso1cm1.js} +2 -2
  30. package/dist/chunks/{model-change-B5wQhg5G.js → model-change-T1cRkh3m.js} +1 -1
  31. package/dist/chunks/{palette-DTnMhipt.js → palette-p1XSJFgB.js} +1 -1
  32. package/dist/chunks/{pivot-result-contract-expectations-Bo-86vwS.js → pivot-result-contract-expectations-B53jqszr.js} +5 -5
  33. package/dist/chunks/{pivot-result-identity-olvXJoB9.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
  34. package/dist/chunks/{zoned-wall-clock-CGLVI40Q.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
  35. package/dist/chunks/{report-preferences-dialog-C2YUIwKG.js → report-preferences-dialog-l54wJyYE.js} +68 -63
  36. package/dist/chunks/{report-runtime-context-DoIUr3MP.js → report-runtime-context-BITkNSDa.js} +2 -2
  37. package/dist/chunks/{resolve-dashboard-input-context-q_iiNXE1.js → resolve-dashboard-input-context-DaDrZGuA.js} +3455 -1744
  38. package/dist/chunks/{save-DH4RyrnG.js → save-CHV1B1fL.js} +1 -1
  39. package/dist/chunks/{saved-dashboard-context-8jqfI7hI.js → saved-dashboard-context-DFYBrE6O.js} +94 -95
  40. package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
  41. package/dist/chunks/{selection-reducer-CV7K4FI6.js → selection-reducer-Bz5aywT4.js} +1 -1
  42. package/dist/chunks/{semaphor-ready-indicator-E2XWyibu.js → semaphor-ready-indicator-C3EQEiD9.js} +36434 -37732
  43. package/dist/chunks/{shelf-drop-preview-context-C29EUzDp.js → shelf-drop-preview-context-BODiBlqT.js} +81 -82
  44. package/dist/chunks/{source-entity-resolution-BXI3nQ5Z.js → source-entity-resolution-DdDVXFB8.js} +6 -6
  45. package/dist/chunks/{switch-balDSHc7.js → switch-BW4yXSYs.js} +3 -3
  46. package/dist/chunks/{table-export-sheet-CK8tvh4d.js → table-export-sheet-bSXxGn-v.js} +1 -1
  47. package/dist/chunks/{temporal-input-presentation-B77JsAzU.js → temporal-input-presentation-sk9gqLi6.js} +699 -741
  48. package/dist/chunks/{token-types-DhYH5YKb.js → token-types-BUK06hU2.js} +1 -1
  49. package/dist/chunks/{upload-Ufj8vjyn.js → upload-BnmuyPqW.js} +1 -1
  50. package/dist/chunks/{use-create-flow-overlay-state-9WsnzEO5.js → use-create-flow-overlay-state-BXY8-Cyz.js} +6 -6
  51. package/dist/chunks/{validators-BtaCFIEB.js → validators-BIM0FE31.js} +764 -885
  52. package/dist/dashboard/index.js +2 -2
  53. package/dist/dashboard-authoring/index.js +2278 -3030
  54. package/dist/data-app-sdk/index.js +43 -43
  55. package/dist/data-app-sdk-adapters/index.js +3 -3
  56. package/dist/data-app-sdk-validation/index.js +22 -22
  57. package/dist/format-utils/index.js +215 -209
  58. package/dist/index.js +225 -224
  59. package/dist/report-runtime-context/index.js +2 -2
  60. package/dist/style.css +1 -1
  61. package/dist/surfboard/index.js +2 -2
  62. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  63. package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
  64. package/dist/types/components/index.d.ts +1 -2
  65. package/dist/types/components/surfboard/filter/types.d.ts +3 -1
  66. package/dist/types/index.js +5 -5
  67. package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
  68. package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
  69. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
  70. package/dist/types/lib/print/print-inputs.d.ts +2 -1
  71. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
  72. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
  73. package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
  74. package/dist/types/lib/types/common-types.d.ts +6 -0
  75. package/dist/types/lib/types/explorer-types.d.ts +7 -1
  76. package/dist/types/lib/types/interaction-types.d.ts +3 -1
  77. package/dist/types/lib/types/token-types.d.ts +0 -1
  78. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +3 -1
  79. package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
  80. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
  81. package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
  82. package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
  83. package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
  84. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  86. package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
  87. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +4 -2
  88. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +15 -0
  89. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +12 -1
  90. package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +5 -3
  91. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3230 -4658
  92. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +24 -2
  93. package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
  94. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
  95. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +27 -1
  96. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
  97. package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
  98. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  99. package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
  100. package/dist/types/shared/dashboard-authoring/index.d.ts +8 -6
  101. package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
  102. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
  103. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
  104. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
  105. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
  106. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
  107. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
  108. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
  109. package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
  110. package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
  111. package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
  112. package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
  113. package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
  114. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
  115. package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
  116. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +52 -2
  117. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +13 -1
  118. package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
  119. package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
  120. package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
  121. package/dist/types/shared/format-utils/document-print.d.ts +82 -0
  122. package/dist/types/shared/format-utils/index.d.ts +1 -0
  123. package/dist/types/shared/format-utils/raw-temporal.d.ts +2 -7
  124. package/dist/types/shared/temporal/index.d.ts +1 -0
  125. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
  126. package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
  127. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
  128. package/package.json +1 -1
  129. package/dist/chunks/custom-visual-inputs-DfolidZ9.js +0 -292
  130. package/dist/chunks/document-dashboard-inputs-CvBbFTUA.js +0 -1718
  131. package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
  132. package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
  133. package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
  134. package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
  135. package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
  136. package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
  137. package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
  138. package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
@@ -1,4 +1,4 @@
1
- import { c as a } from "./switch-balDSHc7.js";
1
+ import { c as a } from "./switch-BW4yXSYs.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -1,34 +1,32 @@
1
1
  var Z = Object.defineProperty;
2
2
  var G = (e, t, r) => t in e ? Z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var k = (e, t, r) => G(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { c as Q, e as M, r as U, d as H, g as K, p as E, j as W, k as X } from "./resolve-dashboard-input-context-q_iiNXE1.js";
5
- import { r as Y, a as ee, b as L, c as te, g as re } from "./document-dashboard-inputs-CvBbFTUA.js";
6
- import { z as v } from "./bookmark-state-BusLpkb7.js";
7
- import { s as ae, n as ne, g as se, d as oe, a as ie, i as de, b as le } from "./global-date-filter-utils-BXgCpvQM.js";
8
- import { f as g, A as P, c as ce, d as ue, e as D } from "./context-TUjw9eqr.js";
9
- import { a as me, T as fe, P as pe, o as I, d as O, b as _ } from "./filter-value-text-DFnhwuEW.js";
10
- import { v as he, al as ge } from "./validators-BtaCFIEB.js";
11
- import { a as be } from "./metric-comparison-95aC0uEO.js";
12
- import { i as Ce } from "./custom-visual-inputs-DfolidZ9.js";
4
+ import { c as Q, e as M, d as U, g as H, j as K, k as W, p as E, m as X, n as Y, r as L, o as ee, q as te, s as re } from "./resolve-dashboard-input-context-DaDrZGuA.js";
5
+ import { z as v } from "./bookmark-state-CWeoGbrx.js";
6
+ import { s as ae, i as ne, n as se, c as oe, d as ie, e as de, f as le, j as ce } from "./global-date-filter-utils-N1kcsOFE.js";
7
+ import { f as g, A as P, c as ue, d as fe, e as D } from "./context-R31TSL5V.js";
8
+ import { a as me, T as he, P as pe, o as I, d as j, b as q } from "./filter-value-text-CPwFkrMz.js";
9
+ import { v as ge, am as be } from "./validators-BIM0FE31.js";
10
+ import { a as Ce } from "./metric-comparison-Bnso1cm1.js";
13
11
  function Ie(e) {
14
12
  const t = e.qualifiedFieldName || e.name;
15
13
  return e.label && e.label !== t ? `${e.label} (field ${t})` : t;
16
14
  }
17
15
  function ye(e, t = {}) {
18
16
  if (!e) return [];
19
- const r = R(e, t);
20
- return r.length === 0 ? [] : e.logicalOperator === "AND" && !e.negate ? r : [j(e, r)];
17
+ const r = O(e, t);
18
+ return r.length === 0 ? [] : e.logicalOperator === "AND" && !e.negate ? r : [R(e, r)];
21
19
  }
22
- function R(e, t) {
20
+ function O(e, t) {
23
21
  const r = e.groups.flatMap((a) => {
24
- const n = R(a, t);
22
+ const n = O(a, t);
25
23
  if (n.length === 0) return [];
26
- const s = j(a, n);
24
+ const s = R(a, n);
27
25
  return [n.length > 1 && !a.negate ? { ...s, text: `(${s.text})` } : s];
28
26
  });
29
27
  return [...e.conditions.map((a) => xe(a, t)), ...r];
30
28
  }
31
- function j(e, t) {
29
+ function R(e, t) {
32
30
  const r = t.map((a) => a.text).join(e.logicalOperator === "OR" ? " or " : " and ");
33
31
  return {
34
32
  text: e.negate ? `not (${r})` : r,
@@ -42,13 +40,13 @@ function xe(e, t) {
42
40
  operator: e.operator,
43
41
  values: r,
44
42
  reading: Se(e),
45
- relative: he(e.relativeMeta),
43
+ relative: ge(e.relativeMeta),
46
44
  latestValue: e.latestValue,
47
45
  shownAs: e.label
48
46
  }, t);
49
47
  }
50
48
  function Se(e) {
51
- return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } : ge(e.field.dataType) ? fe : pe;
49
+ return e.temporalBucket ? { kind: "bucket", bucket: e.temporalBucket } : be(e.field.dataType) ? he : pe;
52
50
  }
53
51
  function B(e) {
54
52
  if (e.kind === "target") return `a target of ${e.targetValue}`;
@@ -79,54 +77,54 @@ function w(e, t) {
79
77
  }
80
78
  const u = P;
81
79
  function $e(e, t, r) {
82
- var q;
83
- const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n = _e(e, t);
80
+ var _;
81
+ const a = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n = qe(e, t);
84
82
  if (n) {
85
- const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ? qe(t) : void 0, V = y ? g(y, u.textChars) : void 0;
83
+ const y = t !== "pending" && (t == null ? void 0 : t.status) === "blocked" ? _e(t) : void 0, V = y ? g(y, u.textChars) : void 0;
86
84
  return {
87
85
  // A card that runs but is not described still changes when it runs differently.
88
86
  fingerprint: $(a ? F(a, r.calendar) : { reason: n, message: V }),
89
87
  description: { status: "not_described", reason: n, ...V ? { message: V } : {} }
90
88
  };
91
89
  }
92
- const s = a, d = s.queryContext, c = De(s), o = Ae(s, r), f = Me(s), i = we(s), l = d.drillSteps.map((y) => g(
90
+ const s = a, d = s.queryContext, c = De(s), o = Ae(s, r), m = Me(s), i = we(s), l = d.drillSteps.map((y) => g(
93
91
  `${JSON.stringify(y.label)} (then by ${y.toField.label || y.toField.name})`,
94
92
  u.textChars
95
- )), m = (q = s.card.sql) == null ? void 0 : q.trim(), h = m ? Ee(s) : [], b = {
93
+ )), f = (_ = s.card.sql) == null ? void 0 : _.trim(), p = f ? Ee(s) : [], b = {
96
94
  fields: I(c.length, u.cardFields),
97
95
  filters: I(o.length, u.cardFilters),
98
- controls: I(f.length, u.cardControls),
96
+ controls: I(m.length, u.cardControls),
99
97
  drillSteps: I(l.length, u.drillSteps),
100
- sqlParameters: I(h.length, u.sqlParameters),
98
+ sqlParameters: I(p.length, u.sqlParameters),
101
99
  comparisons: I(i.length, u.cardFields)
102
- }, p = Object.fromEntries(Object.entries(b).filter(([, y]) => y > 0));
100
+ }, h = Object.fromEntries(Object.entries(b).filter(([, y]) => y > 0));
103
101
  return {
104
102
  fingerprint: $(F(s, r.calendar)),
105
103
  description: {
106
104
  status: "described",
107
105
  fields: c.slice(0, u.cardFields),
108
106
  filters: o.slice(0, u.cardFilters),
109
- controls: f.slice(0, u.cardControls),
107
+ controls: m.slice(0, u.cardControls),
110
108
  drillPath: l.slice(0, u.drillSteps),
111
- ...m ? {
109
+ ...f ? {
112
110
  sql: {
113
- text: g(m, u.sqlChars),
114
- parameters: h.slice(0, u.sqlParameters)
111
+ text: g(f, u.sqlChars),
112
+ parameters: p.slice(0, u.sqlParameters)
115
113
  }
116
114
  } : {},
117
115
  ...i.length ? { comparisons: i.slice(0, u.cardFields) } : {},
118
- ...Object.keys(p).length ? { omitted: p } : {}
116
+ ...Object.keys(h).length ? { omitted: h } : {}
119
117
  }
120
118
  };
121
119
  }
122
- function _e(e, t) {
120
+ function qe(e, t) {
123
121
  if (e.type === "matrixTable") return "matrix";
124
- if (e.type === "custom" || Ce(e)) return "custom_visual";
125
- if (ne(e.python ?? "").trim()) return "python";
122
+ if (e.type === "custom" || ne(e)) return "custom_visual";
123
+ if (se(e.python ?? "").trim()) return "python";
126
124
  if (t === "pending") return "snapshot_pending";
127
125
  if ((t == null ? void 0 : t.status) !== "ready") return "snapshot_blocked";
128
126
  }
129
- function qe(e) {
127
+ function _e(e) {
130
128
  if (e.message) return e.message;
131
129
  const t = e.mappingDispositions.flatMap((r) => r.status === "block" ? [`${r.inputId} (${r.reason})`] : []);
132
130
  return t.length ? `dashboard inputs that cannot apply to this card: ${t.join(", ")}` : void 0;
@@ -141,7 +139,7 @@ const ke = [
141
139
  ["detail", "details"]
142
140
  ];
143
141
  function De(e) {
144
- const { fields: t } = se({
142
+ const { fields: t } = oe({
145
143
  type: e.card.type,
146
144
  config: e.queryContext.finalConfig
147
145
  });
@@ -159,7 +157,7 @@ function De(e) {
159
157
  function we(e) {
160
158
  const t = e.queryContext;
161
159
  return (t.finalConfig.metricColumns ?? []).flatMap((r) => {
162
- const a = be({
160
+ const a = Ce({
163
161
  metricComparison: r.comparison,
164
162
  globalDateComparison: t.globalDateComparison
165
163
  });
@@ -173,18 +171,18 @@ function Ae(e, { calendar: t }) {
173
171
  const r = e.queryContext, a = { maxListedValues: u.inputValues, timeZone: t.tz }, n = e.card.inlineFilters ?? [], s = new Set(n.map((i) => i.id)), d = new Map(
174
172
  [...r.queryFilterDefinitions, ...n].map((i) => [i.id, i.title])
175
173
  ), c = r.cardFilterValues.map((i) => {
176
- const l = d.get(i.filterId) || i.name, m = i.dateOwner === "global_date" ? `${l} (the dashboard date, on this card's field ${i.name})` : `${l} (field ${i.name})`, h = O(i, m, a);
174
+ const l = d.get(i.filterId) || i.name, f = i.dateOwner === "global_date" ? `${l} (the dashboard date, on this card's field ${i.name})` : `${l} (field ${i.name})`, p = j(i, f, a);
177
175
  return {
178
176
  origin: s.has(i.filterId) ? "card_input" : "dashboard_input",
179
- text: g(h.text, u.textChars),
180
- ...h.omittedValues ? { omittedValues: h.omittedValues } : {}
177
+ text: g(p.text, u.textChars),
178
+ ...p.omittedValues ? { omittedValues: p.omittedValues } : {}
181
179
  };
182
- }), o = r.resolvedFilterParts, f = [["card", o.authored], ["drill", o.drill], ["selection", o.selections]].flatMap(([i, l]) => ye(l, a).map((m) => ({
180
+ }), o = r.resolvedFilterParts, m = [["card", o.authored], ["drill", o.drill], ["selection", o.selections]].flatMap(([i, l]) => ye(l, a).map((f) => ({
183
181
  origin: i,
184
- text: g(m.text, u.textChars),
185
- ...m.omittedValues ? { omittedValues: m.omittedValues } : {}
182
+ text: g(f.text, u.textChars),
183
+ ...f.omittedValues ? { omittedValues: f.omittedValues } : {}
186
184
  })));
187
- return [...c, ...f];
185
+ return [...c, ...m];
188
186
  }
189
187
  function Te(e) {
190
188
  const t = e.queryContext, r = M({
@@ -207,13 +205,13 @@ function Me(e) {
207
205
  return Te(e).map(({ id: a, bindings: n, sqlParameterIds: s }) => {
208
206
  var o;
209
207
  const d = t.controlValues[a], c = /* @__PURE__ */ new Set([
210
- ...n.filter((f) => f.target !== "sql_param").map((f) => Le(f, d)),
211
- ...s.map((f) => `SQL parameter ${f}`)
208
+ ...n.filter((m) => m.target !== "sql_param").map((m) => Le(m, d)),
209
+ ...s.map((m) => `SQL parameter ${m}`)
212
210
  ]);
213
211
  return {
214
212
  label: g(((o = r.get(a)) == null ? void 0 : o.label) || a, u.labelChars),
215
213
  valueText: g(
216
- `${_(d, { maxListedValues: u.inputValues }).text}${c.size ? `; ${[...c].join("; ")}` : ""}`,
214
+ `${q(d, { maxListedValues: u.inputValues }).text}${c.size ? `; ${[...c].join("; ")}` : ""}`,
217
215
  u.textChars
218
216
  )
219
217
  };
@@ -224,7 +222,7 @@ function Ee(e) {
224
222
  return M({ sql: e.card.sql, controlBindings: t.controlBindings }).map((r) => ({
225
223
  name: g(r.paramId, u.labelChars),
226
224
  valueText: g(
227
- _(t.controlValues[r.controlId], { maxListedValues: u.inputValues }).text,
225
+ q(t.controlValues[r.controlId], { maxListedValues: u.inputValues }).text,
228
226
  u.textChars
229
227
  )
230
228
  }));
@@ -257,7 +255,7 @@ class S extends Error {
257
255
  }
258
256
  }
259
257
  const C = P, Pe = "Untitled";
260
- function Oe(e) {
258
+ function je(e) {
261
259
  var b;
262
260
  if (e.surface === "none")
263
261
  return A({
@@ -268,20 +266,20 @@ function Oe(e) {
268
266
  cards: [],
269
267
  timeZone: e.timeZone
270
268
  });
271
- const { dashboard: t, sheetId: r, calendar: a } = e, n = t.sheets ?? [], s = n.find((p) => p.id === r);
269
+ const { dashboard: t, sheetId: r, calendar: a } = e, n = t.sheets ?? [], s = n.find((h) => h.id === r);
272
270
  if (r !== null && !s)
273
271
  throw new S("sheet_not_found", `sheet ${r} is not on dashboard ${t.id}`);
274
- const d = n.filter((p) => p.id !== r), c = s ? v(t).filter((p) => p.sheetId === r) : [], o = c.slice(0, C.summaryCards), f = e.selectedCard ? c.find((p) => p.cardId === e.selectedCard.cardId) : void 0, i = ((b = e.selectedCard) == null ? void 0 : b.card) ?? (f == null ? void 0 : f.card);
272
+ const d = n.filter((h) => h.id !== r), c = s ? v(t).filter((h) => h.sheetId === r) : [], o = c.slice(0, C.summaryCards), m = e.selectedCard ? c.find((h) => h.cardId === e.selectedCard.cardId) : void 0, i = ((b = e.selectedCard) == null ? void 0 : b.card) ?? (m == null ? void 0 : m.card);
275
273
  if (e.selectedCard && !i)
276
274
  throw new S(
277
275
  "card_not_on_sheet",
278
276
  `card ${e.selectedCard.cardId} is not on sheet ${r}`
279
277
  );
280
- const l = s ? Be(e, s, c) : [], m = {
278
+ const l = s ? Be(e, s, c) : [], f = {
281
279
  otherSheets: I(d.length, C.otherSheets),
282
280
  activeInputs: I(l.length, C.activeInputs),
283
281
  cards: I(c.length, C.summaryCards)
284
- }, h = Object.fromEntries(Object.entries(m).filter(([, p]) => p > 0));
282
+ }, p = Object.fromEntries(Object.entries(f).filter(([, h]) => h > 0));
285
283
  return A({
286
284
  version: D,
287
285
  surface: e.editing ? "editor" : "dashboard",
@@ -291,28 +289,28 @@ function Oe(e) {
291
289
  unsavedEdits: e.unsavedEdits
292
290
  },
293
291
  ...s ? { sheet: { id: s.id, title: x(s.title) } } : {},
294
- otherSheets: d.slice(0, C.otherSheets).map((p) => ({ id: p.id, title: x(p.title) })),
292
+ otherSheets: d.slice(0, C.otherSheets).map((h) => ({ id: h.id, title: x(h.title) })),
295
293
  activeInputs: l.slice(0, C.activeInputs),
296
- cards: o.map((p) => N(p.card)),
297
- ...i && e.selectedCard ? { selectedCard: Re(i, e.selectedCard.snapshot, a) } : {},
294
+ cards: o.map((h) => N(h.card)),
295
+ ...i && e.selectedCard ? { selectedCard: Oe(i, e.selectedCard.snapshot, a) } : {},
298
296
  ...e.editing ? { editing: e.editing } : {},
299
- ...Object.keys(h).length ? { omitted: h } : {},
297
+ ...Object.keys(p).length ? { omitted: p } : {},
300
298
  timeZone: a.tz
301
299
  });
302
300
  }
303
- function Re(e, t, r) {
301
+ function Oe(e, t, r) {
304
302
  return { ...N(e), ...$e(e, t, { calendar: r }) };
305
303
  }
306
304
  function A(e) {
307
- const t = ce(e);
308
- if (t > C.contextBytes) throw new ue(t);
305
+ const t = ue(e);
306
+ if (t > C.contextBytes) throw new fe(t);
309
307
  return e;
310
308
  }
311
309
  function x(e) {
312
310
  return g((e == null ? void 0 : e.trim()) || Pe, C.labelChars);
313
311
  }
314
312
  function N(e) {
315
- const t = je(e);
313
+ const t = Re(e);
316
314
  return {
317
315
  id: e.id,
318
316
  title: x(e.title),
@@ -320,9 +318,9 @@ function N(e) {
320
318
  ...t ? { source: t } : {}
321
319
  };
322
320
  }
323
- function je(e) {
321
+ function Re(e) {
324
322
  var r;
325
- const t = le(e);
323
+ const t = ce(e);
326
324
  if (t.kind === "config")
327
325
  return t.executableSources.length === 1 ? t.executableSources[0] : void 0;
328
326
  if (t.kind === "sql") {
@@ -331,45 +329,45 @@ function je(e) {
331
329
  }
332
330
  }
333
331
  function Be(e, t, r) {
334
- const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters: d } = Y(s), c = (l, m) => U({
332
+ const { dashboard: a } = e, n = t.kind === "document" ? "document" : "dashboard", s = n === "document" ? void 0 : e.transientContexts, { shouldApplyDashboardFilters: d } = U(s), c = (l, f) => H({
335
333
  dashboard: a,
336
334
  sheetId: t.id,
337
335
  card: l,
338
- sectionId: m,
336
+ sectionId: f,
339
337
  runtimeValues: e.runtimeValues,
340
338
  transientContexts: s,
341
339
  calendar: e.calendar
342
- }), o = /* @__PURE__ */ new Map(), f = (l) => {
343
- l.inputs.forEach((m, h) => {
344
- if (T(m)) return;
345
- const b = l.resolvedInputs[h], p = o.get(m.id) ?? { input: m };
346
- !p.resolved && b && Ne(b) && (p.resolved = b), o.set(m.id, p);
340
+ }), o = /* @__PURE__ */ new Map(), m = (l) => {
341
+ l.inputs.forEach((f, p) => {
342
+ if (T(f)) return;
343
+ const b = l.resolvedInputs[p], h = o.get(f.id) ?? { input: f };
344
+ !h.resolved && b && Ne(b) && (h.resolved = b), o.set(f.id, h);
347
345
  });
348
346
  };
349
- f(c(null));
350
- let i = H(a).filter((l) => {
351
- var m;
352
- return !T(l) && !((m = o.get(l.id)) != null && m.resolved);
347
+ m(c(null));
348
+ let i = K(a).filter((l) => {
349
+ var f;
350
+ return !T(l) && !((f = o.get(l.id)) != null && f.resolved);
353
351
  });
354
352
  for (const l of r) {
355
353
  if (i.length === 0) break;
356
- const m = l.kind === "documentSectionCard" ? l.sectionId : void 0, h = { sheetId: t.id, sheetKind: n, cardId: l.cardId, sectionId: m };
357
- if (i.some((b) => oe(b, h))) {
354
+ const f = l.kind === "documentSectionCard" ? l.sectionId : void 0, p = { sheetId: t.id, sheetKind: n, cardId: l.cardId, sectionId: f };
355
+ if (i.some((b) => ie(b, p))) {
358
356
  try {
359
- f(c(l.card, m));
357
+ m(c(l.card, f));
360
358
  } catch {
361
359
  continue;
362
360
  }
363
361
  i = i.filter((b) => {
364
- var p;
365
- return !((p = o.get(b.id)) != null && p.resolved);
362
+ var h;
363
+ return !((h = o.get(b.id)) != null && h.resolved);
366
364
  });
367
365
  }
368
366
  }
369
367
  return [...o.values()].flatMap((l) => {
370
368
  if (!l.resolved) return [];
371
- const m = l.input.kind === "filter" && !d && !ie(l.input), h = ze(l, e.calendar.tz, m);
372
- return h ? [h] : [];
369
+ const f = l.input.kind === "filter" && !d && !de(l.input), p = ze(l, e.calendar.tz, f);
370
+ return p ? [p] : [];
373
371
  });
374
372
  }
375
373
  function T(e) {
@@ -386,21 +384,21 @@ function ze(e, t, r) {
386
384
  const { input: a, resolved: n } = e, s = x(a.label), d = {
387
385
  inputId: a.id,
388
386
  label: s,
389
- ...a.kind === "filter" && de(a.filter) ? { globalDate: !0 } : {}
387
+ ...a.kind === "filter" && le(a.filter) ? { globalDate: !0 } : {}
390
388
  };
391
389
  if (a.runtimeScope === "perCard" || a.runtimeScope === "perDocumentSection")
392
390
  return { ...d, value: { kind: "varies" } };
393
391
  const c = { maxListedValues: C.inputValues, timeZone: t };
394
392
  let o;
395
393
  if ((n == null ? void 0 : n.kind) === "filter" && n.filterValue)
396
- o = O(n.filterValue, s, c);
394
+ o = j(n.filterValue, s, c);
397
395
  else if ((n == null ? void 0 : n.kind) === "control") {
398
- const i = _(n.controlValue, c);
396
+ const i = q(n.controlValue, c);
399
397
  o = { text: `${s} is set to ${i.text}`, omittedValues: i.omittedValues };
400
398
  }
401
399
  if (!o) return;
402
- const f = (n == null ? void 0 : n.kind) === "filter" ? n.comparisonSelection : void 0;
403
- return (f == null ? void 0 : f.mode) === "period" && (o = { ...o, text: `${o.text}; compared with ${B(f.spec)}` }), {
400
+ const m = (n == null ? void 0 : n.kind) === "filter" ? n.comparisonSelection : void 0;
401
+ return (m == null ? void 0 : m.mode) === "period" && (o = { ...o, text: `${o.text}; compared with ${B(m.spec)}` }), {
404
402
  ...d,
405
403
  value: {
406
404
  kind: "set",
@@ -415,11 +413,11 @@ function ze(e, t, r) {
415
413
  }
416
414
  };
417
415
  }
418
- function nt(e) {
416
+ function rt(e) {
419
417
  return Je(e).context;
420
418
  }
421
419
  function Je(e) {
422
- const { place: t, calendar: r } = e, a = E(e.dashboard), n = X({ dashboard: a, host: {}, calendar: r, materializeInputs: !1 }), s = {
420
+ const { place: t, calendar: r } = e, a = E(e.dashboard), n = ee({ dashboard: a, host: {}, calendar: r, materializeInputs: !1 }), s = {
423
421
  ...L({ dashboard: a, capture: {}, calendar: r }).runtimeValues,
424
422
  cardViewState: t.cardViewState ?? {}
425
423
  }, d = t.cardId ? Ge(a, t.cardId) : void 0, c = d ? z({
@@ -429,7 +427,7 @@ function Je(e) {
429
427
  semanticExecutionPayload: e.semanticExecutionPayload,
430
428
  calendar: r,
431
429
  withRequest: !0
432
- }) : void 0, o = Oe({
430
+ }) : void 0, o = je({
433
431
  surface: "dashboard",
434
432
  dashboard: a,
435
433
  // A sheet that does not hold the card is refused by the projection.
@@ -502,19 +500,19 @@ function J(e) {
502
500
  if (t.matrix) return { status: "unavailable", reason: "matrix" };
503
501
  if (!t.request) return { status: "unavailable", reason: "no_query" };
504
502
  try {
505
- const { connectionId: a, requestPayloadBase: n } = K(t.card, t.request);
503
+ const { connectionId: a, requestPayloadBase: n } = W(t.card, t.request);
506
504
  return { status: "ready", request: { cardId: t.card.id, connectionId: a, payload: n } };
507
505
  } catch {
508
506
  return { status: "unavailable", reason: "no_query" };
509
507
  }
510
508
  }
511
- function st(e) {
509
+ function at(e) {
512
510
  const { calendar: t } = e, r = e.host ?? {}, a = E(
513
- r.controlContract ? ee(W(e.dashboard), {
511
+ r.controlContract ? X(Y(e.dashboard), {
514
512
  controlContractOverrides: r.controlContract,
515
513
  cardId: e.cardId
516
514
  }) : e.dashboard
517
- ), n = v(a).find((f) => f.cardId === e.cardId);
515
+ ), n = v(a).find((m) => m.cardId === e.cardId);
518
516
  if (!n) return { status: "refused", reason: "card_not_found" };
519
517
  if (n.kind === "documentSectionCard") return { status: "refused", reason: "document_section" };
520
518
  const { runtimeValues: s, transientContexts: d } = L({
@@ -557,9 +555,10 @@ function Qe(e, t) {
557
555
  export {
558
556
  S as A,
559
557
  Ze as a,
560
- st as b,
558
+ at as b,
561
559
  J as c,
562
- nt as d,
560
+ rt as d,
563
561
  Je as e,
564
- Oe as p
562
+ z as f,
563
+ je as p
565
564
  };
@@ -1,40 +1,41 @@
1
- function c(e) {
1
+ function u(e) {
2
2
  var o;
3
3
  return JSON.stringify([
4
4
  ((o = e.field) == null ? void 0 : o.id) ?? "",
5
5
  e.operator,
6
6
  e.value ?? null,
7
- e.temporalBucket ?? null
7
+ e.temporalBucket ?? null,
8
+ e.rawTemporal ?? null
8
9
  ]);
9
10
  }
10
11
  function p(e) {
11
- return JSON.stringify(e.map(c).sort());
12
+ return JSON.stringify(e.map(u).sort());
12
13
  }
13
- function u(e) {
14
+ function c(e) {
14
15
  const o = /* @__PURE__ */ new Map();
15
16
  for (const t of e)
16
17
  for (const r of t.tuples) {
17
18
  const n = r.conditions.filter(
18
19
  (a) => {
19
- var s;
20
- return (s = a.field) == null ? void 0 : s.id;
20
+ var i;
21
+ return (i = a.field) == null ? void 0 : i.id;
21
22
  }
22
23
  );
23
24
  if (n.length === 0) continue;
24
- let i = o.get(t.sourceCardId);
25
- i || (i = /* @__PURE__ */ new Map(), o.set(t.sourceCardId, i));
25
+ let s = o.get(t.sourceCardId);
26
+ s || (s = /* @__PURE__ */ new Map(), o.set(t.sourceCardId, s));
26
27
  const l = [...n].sort(
27
- (a, s) => c(a).localeCompare(c(s))
28
+ (a, i) => u(a).localeCompare(u(i))
28
29
  );
29
- i.set(p(l), l);
30
+ s.set(p(l), l);
30
31
  }
31
32
  return [...o.entries()].sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => ({
32
33
  sourceCardId: t,
33
- tuples: [...r.entries()].sort(([n], [i]) => n.localeCompare(i)).map(([, n]) => ({ conditions: n }))
34
+ tuples: [...r.entries()].sort(([n], [s]) => n.localeCompare(s)).map(([, n]) => ({ conditions: n }))
34
35
  }));
35
36
  }
36
37
  function d(e) {
37
- const o = u(e);
38
+ const o = c(e);
38
39
  if (o.length !== 0)
39
40
  return {
40
41
  id: "selection",
@@ -48,15 +49,15 @@ function d(e) {
48
49
  logicalOperator: "OR",
49
50
  negate: !1,
50
51
  conditions: [],
51
- groups: t.tuples.map((n, i) => {
52
- const l = `${r}:${i}`;
52
+ groups: t.tuples.map((n, s) => {
53
+ const l = `${r}:${s}`;
53
54
  return {
54
55
  id: l,
55
56
  logicalOperator: "AND",
56
57
  negate: !1,
57
- conditions: n.conditions.map((a, s) => ({
58
+ conditions: n.conditions.map((a, i) => ({
58
59
  ...a,
59
- id: `${l}:${s}`
60
+ id: `${l}:${i}`
60
61
  })),
61
62
  groups: []
62
63
  };
@@ -67,9 +68,9 @@ function d(e) {
67
68
  }
68
69
  function f(e) {
69
70
  return JSON.stringify(
70
- u(e).map((o) => [
71
+ c(e).map((o) => [
71
72
  o.sourceCardId,
72
- o.tuples.map((t) => t.conditions.map(c))
73
+ o.tuples.map((t) => t.conditions.map(u))
73
74
  ])
74
75
  );
75
76
  }
@@ -1,4 +1,4 @@
1
- import { s as p, S as h } from "./matrix-operation-contract-BSiGEXVC.js";
1
+ import { s as p, S as h } from "./matrix-operation-contract-DsLdFdSa.js";
2
2
  function f(e, l, t) {
3
3
  return e.length === 1 && t(e[0]) === t(l) ? { tuples: [], outcome: "cleared" } : { tuples: [l], outcome: "selected" };
4
4
  }