react-semaphor 0.1.540 → 0.1.542

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 (118) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +50 -45
  5. package/dist/chunks/apply-dashboard-operations-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-ya7xopaC.js → assistant-chat-oHF5lTjA.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DJI-zfEq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-Dh7HqoKy.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-BnmlB71h.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6Bithfl.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-BrYYlRVo.js → document-dashboard-inputs-C6MJVyoI.js} +2357 -4948
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CydOkSko.js → edit-dashboard-visual-DLdereA7.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/index-CV5rHq5D.js +2673 -0
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-BSAqPpHt.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-neMDolLg.js → report-preferences-dialog-MRUWpMcJ.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CCrLpfSQ.js → saved-dashboard-context-DjPqgFly.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator--4DWtVBu.js → semaphor-ready-indicator-BWSpRsPj.js} +38555 -40449
  37. package/dist/chunks/{shelf-drop-preview-context-CpdB5ois.js → shelf-drop-preview-context-CQbFLm3q.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BHSnuZHd.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-8g6Zhphh.js → use-create-flow-overlay-state-BJDNqdOh.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +399 -380
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -238
  53. package/dist/index.js +174 -175
  54. package/dist/pdf-export-policy/index.js +20 -10
  55. package/dist/report-runtime-context/index.js +1 -1
  56. package/dist/surfboard/index.js +2 -2
  57. package/dist/types/briefings/attachment-outcomes.d.ts +23 -0
  58. package/dist/types/briefings/attachments.d.ts +17 -1
  59. package/dist/types/briefings/index.d.ts +6 -3
  60. package/dist/types/index.js +48 -48
  61. package/dist/types/lib/api/exports-api.d.ts +11 -65
  62. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  63. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  64. package/dist/types/lib/hooks/use-dashboard-card.d.ts +2 -0
  65. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  66. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  67. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  68. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  69. package/dist/types/lib/query-context/card-server-request.d.ts +5 -1
  70. package/dist/types/lib/types/common-types.d.ts +7 -0
  71. package/dist/types/lib/types/explorer-types.d.ts +8 -2
  72. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  73. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  74. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  75. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  76. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +20 -0
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  78. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  79. package/dist/types/shared/format-utils/attachment-filter-line.d.ts +14 -0
  80. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  81. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  82. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  83. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  84. package/dist/types/shared/format-utils/filter-line.d.ts +7 -0
  85. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  86. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  87. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  88. package/dist/types/shared/format-utils/index.d.ts +3 -0
  89. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  90. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  91. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  92. package/dist/types/shared/format-utils/pdf-export-policy.d.ts +9 -0
  93. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  94. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  95. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  96. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  97. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  98. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  99. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  100. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  101. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  102. package/package.json +2 -1
  103. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +0 -979
  104. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  105. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  106. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  107. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  108. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  109. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  110. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  111. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  112. package/dist/chunks/index-CqMiAkay.js +0 -3164
  113. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  114. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  115. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  116. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  117. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  118. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,4 +1,4 @@
1
- import { w as d } from "./validators-Ej1DdCXa.js";
1
+ import { w as d } from "./validators-DMHTpf7a.js";
2
2
  const h = [
3
3
  "=",
4
4
  "!=",
@@ -1,7 +1,7 @@
1
1
  import { z as t } from "zod";
2
- import { z as je, E as Fe, F as Le, I as Ue, J as qe, s as U, x as K, n as De, C as Me, D as ce, f as Be, r as Ge, y as ze, m as Ve, o as We, t as le, u as Xe } from "./analytics-base-schemas-BFAoRlkU.js";
3
- import { Z as k, T as ue, a2 as G, aH as ee, w as A, _ as Ze, aB as $, aI as Ke, U as $e, s as He, q as de, B as Ye, v as Qe, m as Je } from "./validators-Ej1DdCXa.js";
4
- const H = {
2
+ import { z as je, E as Fe, F as Le, I as Ue, J as qe, s as U, x as Z, n as De, C as Me, D as ce, f as Be, r as Ge, y as ze, m as Ve, o as We, t as le, u as Xe } from "./analytics-base-schemas-BFAoRlkU.js";
3
+ import { X as k, Q as ue, a0 as G, aH as ee, w as b, Y as Ke, aA as $, aI as Ze, R as $e, s as Ye, q as de, z as He, v as Qe, m as Je } from "./validators-DMHTpf7a.js";
4
+ const Y = {
5
5
  answerSummary: "string",
6
6
  responseDetail: "responseDetail",
7
7
  mode: "string",
@@ -214,34 +214,34 @@ const it = t.object({
214
214
  }
215
215
  )
216
216
  ).size > 1 && f(n, ["members"], "One page must contain one child level."), v(
217
- e.members.map((r) => A(r.path)),
217
+ e.members.map((r) => b(r.path)),
218
218
  n,
219
219
  ["members"]
220
220
  );
221
221
  for (const r of e.members)
222
- (r.path.length !== e.parent.length + 1 || A(r.path.slice(0, -1)) !== A(e.parent)) && f(n, ["members"], "Page members must be immediate children.");
222
+ (r.path.length !== e.parent.length + 1 || b(r.path.slice(0, -1)) !== b(e.parent)) && f(n, ["members"], "Page members must be immediate children.");
223
223
  }), he = t.object({
224
224
  rowPaths: t.array(k).readonly(),
225
225
  columnPaths: t.array(k).readonly(),
226
226
  measureIds: t.array(O).readonly()
227
227
  }).strict();
228
228
  function fe(e, n) {
229
- const a = e.rowPaths.map(A), r = e.columnPaths.map(A);
229
+ const a = e.rowPaths.map(b), r = e.columnPaths.map(b);
230
230
  return v(a, n, ["coverage", "rowPaths"]), v(r, n, ["coverage", "columnPaths"]), v(e.measureIds, n, ["coverage", "measureIds"]), { rows: a, columns: r };
231
231
  }
232
232
  const ut = t.object({
233
233
  requestId: y,
234
234
  coverage: he,
235
235
  cells: t.array(
236
- Ze.extend({ value: $ }).strict()
236
+ Ke.extend({ value: $ }).strict()
237
237
  ).readonly()
238
238
  }).strict().superRefine((e, n) => {
239
239
  const { rows: a, columns: r } = fe(e.coverage, n), s = new Set(a), c = new Set(r), i = new Set(e.coverage.measureIds);
240
240
  v(
241
241
  e.cells.map(
242
242
  (l) => JSON.stringify([
243
- A(l.rowPath),
244
- A(l.columnPath),
243
+ b(l.rowPath),
244
+ b(l.columnPath),
245
245
  l.measureId
246
246
  ])
247
247
  ),
@@ -249,7 +249,7 @@ const ut = t.object({
249
249
  ["cells"]
250
250
  );
251
251
  for (const l of e.cells)
252
- (!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
252
+ (!s.has(b(l.rowPath)) || !c.has(b(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
253
253
  }), q = t.number().int().nonnegative(), dt = t.object({
254
254
  requestId: y,
255
255
  coverage: he,
@@ -271,11 +271,11 @@ const ut = t.object({
271
271
  id: O,
272
272
  column: je,
273
273
  nativeDataType: y,
274
- semanticFormat: Ke.optional()
274
+ semanticFormat: Ze.optional()
275
275
  }).strict(), ge = t.object({
276
276
  levels: t.array(ne).readonly(),
277
277
  measures: t.array(ne).readonly()
278
- }).strict(), Y = t.object({
278
+ }).strict(), H = t.object({
279
279
  code: t.enum(st),
280
280
  message: y,
281
281
  /** Technical cause for dashboard owners; never shown as the primary copy. */
@@ -299,7 +299,7 @@ function ye(e) {
299
299
  capabilities: mt,
300
300
  pages: t.array(lt).readonly(),
301
301
  blocks: t.array(e).readonly(),
302
- failures: t.array(Y).readonly()
302
+ failures: t.array(H).readonly()
303
303
  }).strict().superRefine((n, a) => {
304
304
  const r = new Set(
305
305
  n.descriptors.levels.map((i) => i.id)
@@ -360,13 +360,13 @@ const Se = ye(
360
360
  ), pt = ye(
361
361
  dt
362
362
  );
363
- function be(e) {
363
+ function Ae(e) {
364
364
  return t.union([
365
365
  t.object({
366
366
  status: t.enum(["success", "partial"]),
367
367
  window: e
368
368
  }).strict(),
369
- t.object({ status: t.literal("failed"), failure: Y }).strict()
369
+ t.object({ status: t.literal("failed"), failure: H }).strict()
370
370
  ]).superRefine((n, a) => {
371
371
  const r = n;
372
372
  if (r.status === "failed") return;
@@ -378,18 +378,18 @@ function be(e) {
378
378
  ), r.status === "success" != (s.failures.length === 0) && f(a, ["status"], "Status must match failure coverage.");
379
379
  });
380
380
  }
381
- const un = be(
381
+ const un = Ae(
382
382
  Se
383
- ), dn = be(
383
+ ), dn = Ae(
384
384
  pt
385
385
  );
386
386
  function ht(e) {
387
- const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage, s = (m) => new Map(m.map((o, d) => [o, d])), c = s(n.map(A)), i = s(a.map(A)), l = s(r);
387
+ const { rowPaths: n, columnPaths: a, measureIds: r } = e.coverage, s = (m) => new Map(m.map((o, d) => [o, d])), c = s(n.map(b)), i = s(a.map(b)), l = s(r);
388
388
  return {
389
389
  requestId: e.requestId,
390
390
  coverage: e.coverage,
391
391
  values: e.cells.map((m) => {
392
- const o = c.get(A(m.rowPath)), d = i.get(A(m.columnPath)), p = l.get(m.measureId);
392
+ const o = c.get(b(m.rowPath)), d = i.get(b(m.columnPath)), p = l.get(m.measureId);
393
393
  if (o === void 0 || d === void 0 || p === void 0)
394
394
  throw new Error("Cell is outside certified coverage.");
395
395
  return [o, d, p, m.value];
@@ -418,7 +418,7 @@ function mn(e) {
418
418
  function pn(e) {
419
419
  return e.status === "failed" ? e : { status: e.status, window: gt(e.window) };
420
420
  }
421
- const Ae = t.object({
421
+ const be = t.object({
422
422
  kind: t.literal("matrix"),
423
423
  window: Se
424
424
  }).strict(), Ie = t.enum(["member", "subtotal", "grand_total"]), yt = t.discriminatedUnion("kind", [
@@ -442,7 +442,7 @@ const Ae = t.object({
442
442
  )
443
443
  }).strict(),
444
444
  t.object({ kind: t.enum(["null", "empty"]) }).strict()
445
- ]), bt = t.discriminatedUnion("kind", [
445
+ ]), At = t.discriminatedUnion("kind", [
446
446
  t.object({
447
447
  kind: t.literal("layout"),
448
448
  rowPath: k,
@@ -463,15 +463,15 @@ const Ae = t.object({
463
463
  }).strict(),
464
464
  t.object({
465
465
  kind: t.literal("rows"),
466
- rows: t.array(bt).readonly(),
466
+ rows: t.array(At).readonly(),
467
467
  next: y.nullable()
468
468
  }).strict()
469
- ]), At = t.union([
469
+ ]), bt = t.union([
470
470
  Fe,
471
471
  Le,
472
472
  Ue,
473
473
  qe,
474
- Ae
474
+ be
475
475
  ]), It = t.object({
476
476
  status: t.enum([
477
477
  "not_required",
@@ -516,7 +516,7 @@ const Ae = t.object({
516
516
  queryId: t.string().optional(),
517
517
  summary: t.string(),
518
518
  evidenceIds: t.array(t.string()).optional(),
519
- fieldsUsed: t.array(K).optional()
519
+ fieldsUsed: t.array(Z).optional()
520
520
  }).passthrough()
521
521
  ),
522
522
  blocked: t.array(
@@ -563,8 +563,8 @@ const Ae = t.object({
563
563
  ]).optional(),
564
564
  intent: t.unknown().optional(),
565
565
  compiledQuery: t.unknown().optional(),
566
- fieldsUsed: t.array(K).optional(),
567
- result: At.optional(),
566
+ fieldsUsed: t.array(Z).optional(),
567
+ result: bt.optional(),
568
568
  validation: ce,
569
569
  coverage: ke.optional(),
570
570
  missingFields: t.array(t.string()).optional(),
@@ -585,7 +585,7 @@ function wt(e) {
585
585
  case "diagnosticFeedback":
586
586
  return _e.optional();
587
587
  case "executionFieldArray":
588
- return t.array(K).optional();
588
+ return t.array(Z).optional();
589
589
  case "executionResult":
590
590
  return _t.optional();
591
591
  case "number":
@@ -611,15 +611,15 @@ function wt(e) {
611
611
  }
612
612
  }
613
613
  const kt = Object.fromEntries(
614
- Object.entries(H).map(
614
+ Object.entries(Y).map(
615
615
  ([e, n]) => [e, wt(n)]
616
616
  )
617
617
  ), vt = t.object(kt).strict(), Tt = new Set(
618
- Object.keys(H)
618
+ Object.keys(Y)
619
619
  );
620
620
  function fn() {
621
621
  return Object.keys(
622
- H
622
+ Y
623
623
  );
624
624
  }
625
625
  function Rt(e) {
@@ -641,7 +641,7 @@ const Te = 100, F = "selection:";
641
641
  function Re(e) {
642
642
  return [
643
643
  de(e.source),
644
- Ye(e.name),
644
+ He(e.name),
645
645
  e.sourceField ?? ""
646
646
  ].join("::");
647
647
  }
@@ -689,7 +689,7 @@ function oe(e) {
689
689
  e.conditions.map(z).sort()
690
690
  );
691
691
  }
692
- function bn(e) {
692
+ function An(e) {
693
693
  const n = e.map((a) => a.id);
694
694
  if (new Set(n).size !== n.length)
695
695
  throw new Error("Data App selections require one active selection per id.");
@@ -714,7 +714,7 @@ function bn(e) {
714
714
  function D(e, n) {
715
715
  return e < n ? -1 : e > n ? 1 : 0;
716
716
  }
717
- function An(e, n) {
717
+ function bn(e, n) {
718
718
  return se(e) === se(n);
719
719
  }
720
720
  const Nt = "(Blank)";
@@ -771,7 +771,7 @@ const Ot = t.union([
771
771
  for (let a = 0; a < e.conditions.length; a += 1) {
772
772
  const r = e.conditions[a];
773
773
  e.conditions.findIndex(
774
- (c, i) => i < a && He(c.field, r.field)
774
+ (c, i) => i < a && Ye(c.field, r.field)
775
775
  ) !== -1 && n.addIssue({
776
776
  code: t.ZodIssueCode.custom,
777
777
  message: "A selection tuple can contain only one condition per field.",
@@ -954,7 +954,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
954
954
  e[h] === "'" || e[h] === '"' ? h = V(e, h) - 1 : e[h] === "(" ? h = P(e, h) - 1 : e[h] === "," && x++;
955
955
  const C = /^\s*DISTINCT\b/i.test(T);
956
956
  W(C ? T.replace(/^\s*DISTINCT\b/i, "") : T).calls.length > 0 && (s = !0);
957
- let b = !1, _ = !1;
957
+ let A = !1, _ = !1;
958
958
  for (; ; ) {
959
959
  const h = j(e, g);
960
960
  if (!ie.test(e[h] || "")) break;
@@ -967,7 +967,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
967
967
  }
968
968
  }
969
969
  if ((R === "FILTER" || R === "OVER") && e[u] === "(") {
970
- b = b || R === "OVER", _ = _ || R === "FILTER", g = P(e, u);
970
+ A = A || R === "OVER", _ = _ || R === "FILTER", g = P(e, u);
971
971
  continue;
972
972
  }
973
973
  break;
@@ -976,7 +976,7 @@ function W(e, n = /* @__PURE__ */ new Set()) {
976
976
  name: d.toUpperCase(),
977
977
  kind: Ne(d, C),
978
978
  distinct: C,
979
- windowed: b,
979
+ windowed: A,
980
980
  tokens: Wt(e.slice(p, g)),
981
981
  span: { start: l, end: E, argumentStart: p + 1, argumentEnd: I },
982
982
  argumentCount: x,
@@ -1043,7 +1043,7 @@ function Xt(e, n) {
1043
1043
  };
1044
1044
  return i() && s === a.length;
1045
1045
  }
1046
- function Zt(e) {
1046
+ function Kt(e) {
1047
1047
  const n = [];
1048
1048
  let a = 0;
1049
1049
  for (; a < e.length; ) {
@@ -1087,8 +1087,8 @@ function Zt(e) {
1087
1087
  }
1088
1088
  return n;
1089
1089
  }
1090
- function Kt(e) {
1091
- const n = Zt(e), a = n.some((o) => o.type === "op" && o.value === "/");
1090
+ function Zt(e) {
1091
+ const n = Kt(e), a = n.some((o) => o.type === "op" && o.value === "/");
1092
1092
  if (n.some((o) => o.type === "other"))
1093
1093
  return { kind: "other", hasDivision: a };
1094
1094
  let r = 0, s = !0;
@@ -1178,7 +1178,7 @@ const Q = {
1178
1178
  identity: "unresolved",
1179
1179
  unresolved: !0
1180
1180
  }, Pe = { ...Q, stage: "row" };
1181
- function Z(e) {
1181
+ function K(e) {
1182
1182
  return {
1183
1183
  stage: "row",
1184
1184
  outer: e,
@@ -1196,23 +1196,23 @@ function B(e, n) {
1196
1196
  const a = (r = n.derivedField) == null ? void 0 : r.aggregationBehavior;
1197
1197
  return !a || e.unresolved ? e : a === "additive" ? e.reaggregation.kind === "additive" ? e : { ...e, reaggregation: { kind: "additive" } } : { ...e, reaggregation: { kind: "none", reason: "declared" } };
1198
1198
  }
1199
- function Ht(e, n) {
1199
+ function Yt(e, n) {
1200
1200
  if (!e) return Q;
1201
1201
  if (typeof e.expression == "string" && e.expression.trim()) {
1202
1202
  const r = J(e, n + 1);
1203
1203
  return r === "row_input" ? "raw" : r.unresolved || r.stage === "aggregate" || r.outer ? r : "raw";
1204
1204
  }
1205
1205
  const a = X(e.aggregate);
1206
- return a ? Z(a) : "raw";
1206
+ return a ? K(a) : "raw";
1207
1207
  }
1208
- const Yt = 12;
1208
+ const Ht = 12;
1209
1209
  function J(e, n) {
1210
1210
  var R;
1211
- if (n > Yt) return Q;
1211
+ if (n > Ht) return Q;
1212
1212
  const a = typeof e.expression == "string" ? e.expression.trim() : "";
1213
1213
  if (!a)
1214
1214
  return B(
1215
- Z(X(e.aggregate) ?? "sum"),
1215
+ K(X(e.aggregate) ?? "sum"),
1216
1216
  e
1217
1217
  );
1218
1218
  const r = W(a), s = ((R = e.calculatedFormula) == null ? void 0 : R.inputFields) || [], c = (u) => {
@@ -1220,7 +1220,7 @@ function J(e, n) {
1220
1220
  return S ? s[Number(S[1])] : void 0;
1221
1221
  }, i = /* @__PURE__ */ new Map();
1222
1222
  for (const u of r.tokensOutsideAggregates)
1223
- i.has(u) || i.set(u, Ht(c(u), n));
1223
+ i.has(u) || i.set(u, Yt(c(u), n));
1224
1224
  const l = r.calls.some(
1225
1225
  (u) => u.tokens.some((S) => {
1226
1226
  const w = c(S);
@@ -1238,7 +1238,7 @@ function J(e, n) {
1238
1238
  if (!d) {
1239
1239
  if (!g) return Pe;
1240
1240
  const u = X(e.aggregate);
1241
- return u ? B(Z(u), e) : "row_input";
1241
+ return u ? B(K(u), e) : "row_input";
1242
1242
  }
1243
1243
  const I = !g || o || r.nestedAggregate || l || m.some((u) => u.unresolved) || r.calls.length === 0 && m.length === 0, E = [
1244
1244
  ...r.calls.map((u) => ({ kind: u.kind, distinct: u.distinct })),
@@ -1250,21 +1250,21 @@ function J(e, n) {
1250
1250
  }
1251
1251
  const S = i.get(u.token);
1252
1252
  return S && S !== "raw" ? S.reaggregation : { kind: "none", reason: "unresolved" };
1253
- }, b = Kt(r.skeleton);
1253
+ }, A = Zt(r.skeleton);
1254
1254
  let _, h, N = "numeric";
1255
1255
  if (I)
1256
1256
  _ = { kind: "none", reason: "unresolved" }, h = "unresolved";
1257
1257
  else if (T)
1258
1258
  _ = { kind: "none", reason: "window" }, h = "expression";
1259
- else if (b.kind === "single")
1260
- if (_ = C(b.unit), b.unit.kind === "call") {
1261
- const u = r.calls[b.unit.index];
1259
+ else if (A.kind === "single")
1260
+ if (_ = C(A.unit), A.unit.kind === "call") {
1261
+ const u = r.calls[A.unit.index];
1262
1262
  h = u.kind, (u.kind === "min" || u.kind === "max") && (N = "input");
1263
1263
  } else {
1264
- const u = i.get(b.unit.token);
1264
+ const u = i.get(A.unit.token);
1265
1265
  h = u.identity, N = u.outputType;
1266
1266
  }
1267
- else b.kind === "linear" ? (_ = b.units.every((S) => C(S).kind === "additive") ? { kind: "additive" } : { kind: "none", reason: "other" }, h = "linear") : (_ = { kind: "none", reason: b.hasDivision ? "ratio" : "other" }, h = b.hasDivision ? "ratio" : "expression");
1267
+ else A.kind === "linear" ? (_ = A.units.every((S) => C(S).kind === "additive") ? { kind: "additive" } : { kind: "none", reason: "other" }, h = "linear") : (_ = { kind: "none", reason: A.hasDivision ? "ratio" : "other" }, h = A.hasDivision ? "ratio" : "expression");
1268
1268
  return B(
1269
1269
  {
1270
1270
  stage: "aggregate",
@@ -1298,15 +1298,15 @@ const en = {
1298
1298
  compiledQuery: t.never().optional(),
1299
1299
  intent: Qt.shape.intent,
1300
1300
  resultShape: t.literal("matrix"),
1301
- result: Ae.optional(),
1302
- metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: Y.optional() }).passthrough()
1301
+ result: be.optional(),
1302
+ metadata: t.object({ rowLimitExceeded: t.boolean(), matrixFailure: H.optional() }).passthrough()
1303
1303
  }, tn = ve.extend(en), Rn = tn.superRefine((e, n) => {
1304
1304
  e.status === "failed" == !!e.result && n.addIssue({ code: "custom", message: "Only answered or partial Matrix execution carries a window." }), e.result && e.status === "partial" != e.result.window.failures.length > 0 && n.addIssue({ code: "custom", message: "Matrix execution status must match acquired window failures." });
1305
1305
  });
1306
1306
  export {
1307
1307
  lt as $,
1308
1308
  oe as A,
1309
- An as B,
1309
+ bn as B,
1310
1310
  In as C,
1311
1311
  xt as D,
1312
1312
  Pt as E,
@@ -1318,12 +1318,12 @@ export {
1318
1318
  Mt as K,
1319
1319
  Ne as L,
1320
1320
  W as M,
1321
- Kt as N,
1321
+ Zt as N,
1322
1322
  vn as O,
1323
1323
  me as P,
1324
1324
  nt as Q,
1325
1325
  at as R,
1326
- H as S,
1326
+ Y as S,
1327
1327
  sn as T,
1328
1328
  on as U,
1329
1329
  st as V,
@@ -1336,7 +1336,7 @@ export {
1336
1336
  ut as a0,
1337
1337
  dt as a1,
1338
1338
  ne as a2,
1339
- Y as a3,
1339
+ H as a3,
1340
1340
  mt as a4,
1341
1341
  Se as a5,
1342
1342
  pt as a6,
@@ -1350,15 +1350,15 @@ export {
1350
1350
  yt as ae,
1351
1351
  St as af,
1352
1352
  ae as ag,
1353
- bt as ah,
1353
+ At as ah,
1354
1354
  hn as ai,
1355
1355
  Jt as aj,
1356
1356
  Tn as ak,
1357
1357
  Rn as al,
1358
1358
  Qt as am,
1359
1359
  Sn as b,
1360
- bn as c,
1361
- At as d,
1360
+ An as c,
1361
+ bt as d,
1362
1362
  It as e,
1363
1363
  _e as f,
1364
1364
  fn as g,
@@ -1371,7 +1371,7 @@ export {
1371
1371
  kt as n,
1372
1372
  vt as o,
1373
1373
  gn as p,
1374
- Ae as q,
1374
+ be as q,
1375
1375
  Te as r,
1376
1376
  _n as s,
1377
1377
  Re as t,