react-semaphor 0.1.423 → 0.1.425

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 (105) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +243 -91
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +8 -8
  7. package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
  8. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
  9. package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
  10. package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
  11. package/dist/chunks/calendar-preferences-dialog-BLaSWhLl.js +1 -0
  12. package/dist/chunks/{calendar-preferences-dialog-t5ET6MON.js → calendar-preferences-dialog-DJwV0aqn.js} +4 -4
  13. package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-DcxPLns0.js} +10 -10
  14. package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Bkk7s8hI.js} +7382 -6809
  15. package/dist/chunks/code-editor-CkXyNgYc.js +138 -0
  16. package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
  17. package/dist/chunks/comparison-document-migration-CQJ0DZlL.js +414 -0
  18. package/dist/chunks/comparison-document-migration-Db64RWYD.js +1 -0
  19. package/dist/chunks/{index-yHe0SeLO.js → dashboard-5agU0G_D.js} +56752 -55440
  20. package/dist/chunks/dashboard-MKIqgGDp.js +1402 -0
  21. package/dist/chunks/{dashboard-briefing-launcher-S2akO-ub.js → dashboard-briefing-launcher-CII8-4qo.js} +11 -6
  22. package/dist/chunks/{dashboard-briefing-launcher-Cavd0QJb.js → dashboard-briefing-launcher-qyEVfuOm.js} +226 -209
  23. package/dist/chunks/dashboard-controls-PJpeYZHw.js +36 -0
  24. package/dist/chunks/dashboard-controls-aJY0FNPP.js +2196 -0
  25. package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
  26. package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
  27. package/dist/chunks/{dashboard-json-Do2-pdPZ.js → dashboard-json-CzHSP6Fa.js} +16 -15
  28. package/dist/chunks/dashboard-json-DtmR5yCf.js +1 -0
  29. package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
  30. package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
  31. package/dist/chunks/{edit-dashboard-visual-Cw6bq4_w.js → edit-dashboard-visual-AkZzwBCV.js} +8892 -8996
  32. package/dist/chunks/edit-dashboard-visual-Cif6uDqN.js +182 -0
  33. package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
  34. package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
  35. package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
  36. package/dist/chunks/index-jSrCwPQz.js +31 -0
  37. package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
  38. package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
  39. package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
  40. package/dist/chunks/metric-comparison-4oA4ouU9.js +354 -0
  41. package/dist/chunks/metric-comparison-nQKquVnx.js +1 -0
  42. package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
  44. package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
  45. package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
  46. package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
  47. package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
  48. package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
  49. package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
  50. package/dist/chunks/{use-create-flow-overlay-state-5MDbZcs1.js → use-create-flow-overlay-state-ByOKVV2K.js} +62 -62
  51. package/dist/chunks/{use-create-flow-overlay-state-BNczg9Gj.js → use-create-flow-overlay-state-DmuReEnk.js} +2 -2
  52. package/dist/chunks/validators-B4VMLX3_.js +1 -0
  53. package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
  54. package/dist/dashboard/index.cjs +1 -1
  55. package/dist/dashboard/index.js +2 -2
  56. package/dist/dashboard-authoring/index.cjs +2 -2
  57. package/dist/dashboard-authoring/index.js +6 -4
  58. package/dist/data-app-builder/index.cjs +6 -6
  59. package/dist/data-app-builder/index.js +5 -5
  60. package/dist/data-app-codegen/index.cjs +1 -1
  61. package/dist/data-app-codegen/index.js +2 -2
  62. package/dist/data-app-codegen-node/index.cjs +1 -1
  63. package/dist/data-app-codegen-node/index.js +3 -3
  64. package/dist/data-app-sdk/index.cjs +1 -1
  65. package/dist/data-app-sdk/index.js +6 -6
  66. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  67. package/dist/data-app-sdk-adapters/index.js +1 -1
  68. package/dist/data-app-sdk-validation/index.cjs +1 -1
  69. package/dist/data-app-sdk-validation/index.js +65 -68
  70. package/dist/format-utils/index.cjs +2 -2
  71. package/dist/format-utils/index.js +59 -58
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +19 -19
  74. package/dist/style.css +1 -1
  75. package/dist/surfboard/index.cjs +1 -1
  76. package/dist/surfboard/index.js +3 -3
  77. package/dist/types/analytics-protocol.d.ts +299 -3
  78. package/dist/types/brand-studio.d.ts +2 -2
  79. package/dist/types/briefings.d.ts +65 -41
  80. package/dist/types/dashboard-assistant.d.ts +28 -7
  81. package/dist/types/dashboard-authoring.d.ts +123 -43
  82. package/dist/types/dashboard.d.ts +97 -48
  83. package/dist/types/data-app-builder.d.ts +2 -2
  84. package/dist/types/data-app-sdk.d.ts +1 -1
  85. package/dist/types/format-utils.d.ts +98 -10
  86. package/dist/types/index.js +1 -1
  87. package/dist/types/main.d.ts +229 -95
  88. package/dist/types/shared.d.ts +84 -43
  89. package/dist/types/surfboard.d.ts +99 -49
  90. package/dist/types/types.d.ts +110 -50
  91. package/package.json +2 -1
  92. package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
  93. package/dist/chunks/calendar-preferences-dialog-CTmeASaM.js +0 -1
  94. package/dist/chunks/contracts-CoCOpd_i.js +0 -11
  95. package/dist/chunks/contracts-CtB2VONT.js +0 -1
  96. package/dist/chunks/dashboard-controls-BJLrErjW.js +0 -2322
  97. package/dist/chunks/dashboard-controls-DzbP8AXA.js +0 -52
  98. package/dist/chunks/dashboard-json-5tWb5KD6.js +0 -1
  99. package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
  100. package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
  101. package/dist/chunks/edit-dashboard-visual-Yh5YFgMF.js +0 -178
  102. package/dist/chunks/index-BPM3gDRw.js +0 -1406
  103. package/dist/chunks/switch-DMT7qf_R.js +0 -138
  104. package/dist/chunks/validators-DMlVbd1p.js +0 -1
  105. package/dist/chunks/x-B6ghREd2.js +0 -31
@@ -1,8 +1,8 @@
1
- import { s as K, b as X } from "./analyze-result-contract-D7pjjYPy.js";
1
+ import { s as X, b as Z } from "./analyze-result-contract-DnfF8kBb.js";
2
2
  function a(e, i, t) {
3
3
  return t ? { code: e, message: i, path: t } : { code: e, message: i };
4
4
  }
5
- function Z(e) {
5
+ function J(e) {
6
6
  for (let i = 0; i < e.length; i += 1) {
7
7
  const t = e[i];
8
8
  if (e.some(
@@ -13,18 +13,18 @@ function Z(e) {
13
13
  return !0;
14
14
  }
15
15
  function L(e, i) {
16
- return K(e, i);
16
+ return X(e, i);
17
17
  }
18
18
  function C(e, i) {
19
19
  return L(e, i) && g(e) === g(i);
20
20
  }
21
- function J(e) {
21
+ function W(e) {
22
22
  return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${g(e)}). Use different aggregates to request both, or remove one entry.`;
23
23
  }
24
- function P(e) {
24
+ function T(e) {
25
25
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
26
26
  }
27
- function W(e, i, t) {
27
+ function ee(e, i, t) {
28
28
  if (e !== void 0) {
29
29
  if (!e || typeof e != "object" || Array.isArray(e)) {
30
30
  t.push(
@@ -47,7 +47,7 @@ function W(e, i, t) {
47
47
  );
48
48
  return;
49
49
  }
50
- (Array.isArray(o) ? o.every(P) : P(o)) || t.push(
50
+ (Array.isArray(o) ? o.every(T) : T(o)) || t.push(
51
51
  a(
52
52
  "invalid_sql_default_parameter_value",
53
53
  "SQL defaultParameters values must be strings, numbers, booleans, nulls, or arrays of those scalar values.",
@@ -57,47 +57,50 @@ function W(e, i, t) {
57
57
  });
58
58
  }
59
59
  }
60
- function ee(e, i) {
61
- return M(e, i).length === 1;
62
- }
63
60
  function ie(e, i) {
64
- return M(e, i).length === 1;
61
+ return S(e, i).length === 1;
62
+ }
63
+ function te(e, i) {
64
+ return S(e, i).length === 1;
65
65
  }
66
- function M(e, i) {
66
+ function S(e, i) {
67
67
  return i.filter(
68
- (n) => te(e, n)
68
+ (n) => ae(e, n)
69
69
  );
70
70
  }
71
- function te(e, i) {
72
- return ae(e, i) ? e.source ? L(i, e) : !0 : !1;
73
- }
74
71
  function ae(e, i) {
75
- return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ne(e, i) && g(i) !== g(e));
72
+ return ne(e, i) ? e.source ? L(i, e) : !0 : !1;
76
73
  }
77
74
  function ne(e, i) {
75
+ return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || se(e, i) && g(i) !== g(e));
76
+ }
77
+ function se(e, i) {
78
78
  return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
79
79
  }
80
80
  function g(e) {
81
- return X(e);
81
+ return Z(e);
82
82
  }
83
- const se = /^(\d{4})-(\d{2})-(\d{2})$/, oe = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})$/;
84
- function T(e) {
83
+ const oe = /^(\d{4})-(\d{2})-(\d{2})$/, U = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
84
+ function w(e) {
85
85
  if (typeof e != "string")
86
86
  return null;
87
- const i = e.trim(), t = se.exec(i);
87
+ const i = e.trim(), t = oe.exec(i);
88
88
  if (t) {
89
- const [, y, D, F] = t;
90
- return E(y, D, F) ? new Date(Date.UTC(Number(y), Number(D) - 1, Number(F))) : null;
89
+ const [, y, F, P] = t;
90
+ return E(y, F, P) ? new Date(Date.UTC(Number(y), Number(F) - 1, Number(P))) : null;
91
91
  }
92
- const n = oe.exec(i);
92
+ const n = U.exec(i);
93
93
  if (!n)
94
94
  return null;
95
- const [, o, s, r, c, d, p = "00", , f] = n;
96
- if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !re(f))
95
+ const [, o, s, r, c, d, p = "00", , m] = n;
96
+ if (!E(o, s, r) || !v(c, 0, 23) || !v(d, 0, 59) || !v(p, 0, 59) || !re(m))
97
97
  return null;
98
98
  const b = new Date(i);
99
99
  return Number.isFinite(b.getTime()) ? b : null;
100
100
  }
101
+ function Ce(e) {
102
+ return typeof e != "string" || !U.test(e.trim()) ? null : w(e);
103
+ }
101
104
  function E(e, i, t) {
102
105
  const n = Number(e), o = Number(i), s = Number(t);
103
106
  if (!Number.isInteger(n) || !Number.isInteger(o) || !Number.isInteger(s) || o < 1 || o > 12)
@@ -186,7 +189,7 @@ function N(e, i, t) {
186
189
  );
187
190
  }
188
191
  }
189
- function w(e) {
192
+ function I(e) {
190
193
  const i = /* @__PURE__ */ new Set();
191
194
  for (const t of e) {
192
195
  if (i.has(t))
@@ -196,7 +199,7 @@ function w(e) {
196
199
  return null;
197
200
  }
198
201
  function $(e, i, t, n) {
199
- w(
202
+ I(
200
203
  e.filter((s) => l(s))
201
204
  ) && n.push(
202
205
  a(
@@ -215,7 +218,7 @@ const ue = /* @__PURE__ */ new Set([
215
218
  "MEDIAN",
216
219
  "DISTINCT"
217
220
  ]);
218
- function S(e, i, t) {
221
+ function k(e, i, t) {
219
222
  if (!e || typeof e != "object") {
220
223
  t.push(
221
224
  a("missing_source", "Analytics intent needs a source.", i)
@@ -268,7 +271,7 @@ function S(e, i, t) {
268
271
  a("invalid_source_kind", "Source kind is not supported.", i)
269
272
  );
270
273
  }
271
- function m(e, i, t, n = {}) {
274
+ function f(e, i, t, n = {}) {
272
275
  if (!e || !u(e)) {
273
276
  n.required && t.push(
274
277
  a("missing_field_ref", "Field reference needs a name.", i)
@@ -281,7 +284,7 @@ function m(e, i, t, n = {}) {
281
284
  "Field reference needs a name.",
282
285
  `${i}.name`
283
286
  )
284
- ), e.source !== void 0 && S(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
287
+ ), e.source !== void 0 && k(e.source, `${i}.source`, t), _(e.aggregate, `${i}.aggregate`, t);
285
288
  }
286
289
  function ce(e, i, t) {
287
290
  if (!u(e)) {
@@ -306,13 +309,13 @@ function ce(e, i, t) {
306
309
  "Input binding kind must be filter or control.",
307
310
  `${i}.kind`
308
311
  )
309
- ), e.field !== void 0 && m(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && k(
312
+ ), e.field !== void 0 && f(e.field, `${i}.field`, t), e.relationshipHint !== void 0 && R(
310
313
  e.relationshipHint,
311
314
  `${i}.relationshipHint`,
312
315
  t
313
316
  );
314
317
  }
315
- function k(e, i, t) {
318
+ function R(e, i, t) {
316
319
  if (!u(e)) {
317
320
  t.push(
318
321
  a(
@@ -344,7 +347,7 @@ function pe(e, i) {
344
347
  "Input options intent needs a labelField.",
345
348
  "labelField"
346
349
  )
347
- ), m(e.labelField, "labelField", i, {
350
+ ), f(e.labelField, "labelField", i, {
348
351
  required: !0
349
352
  }), (!e.valueField || !l(e.valueField.name)) && i.push(
350
353
  a(
@@ -352,12 +355,12 @@ function pe(e, i) {
352
355
  "Input options intent needs a valueField.",
353
356
  "valueField"
354
357
  )
355
- ), m(e.valueField, "valueField", i, {
358
+ ), f(e.valueField, "valueField", i, {
356
359
  required: !0
357
- }), e.searchField !== void 0 && m(e.searchField, "searchField", i, {
360
+ }), e.searchField !== void 0 && f(e.searchField, "searchField", i, {
358
361
  required: !0
359
362
  }), e.disambiguationFields !== void 0 && (Array.isArray(e.disambiguationFields) ? e.disambiguationFields.forEach((t, n) => {
360
- m(t, `disambiguationFields.${n}`, i, {
363
+ f(t, `disambiguationFields.${n}`, i, {
361
364
  required: !0
362
365
  });
363
366
  }) : i.push(
@@ -394,7 +397,7 @@ function pe(e, i) {
394
397
  "dependencies.excludeInputIds",
395
398
  i,
396
399
  "Input options excludeInputIds must be non-empty strings."
397
- ), fe(e, i);
400
+ ), me(e, i);
398
401
  }
399
402
  }
400
403
  if (e.population !== void 0) {
@@ -427,11 +430,11 @@ function pe(e, i) {
427
430
  "Input options population relationshipHint is only valid for related_population.",
428
431
  "population.relationshipHint"
429
432
  )
430
- ), n === "related_population" && (S(
433
+ ), n === "related_population" && (k(
431
434
  t.baseSource,
432
435
  "population.baseSource",
433
436
  i
434
- ), t.relationshipHint !== void 0 && k(
437
+ ), t.relationshipHint !== void 0 && R(
435
438
  t.relationshipHint,
436
439
  "population.relationshipHint",
437
440
  i
@@ -439,7 +442,7 @@ function pe(e, i) {
439
442
  }
440
443
  }
441
444
  }
442
- function me(e, i) {
445
+ function fe(e, i) {
443
446
  if (!(!("inputs" in e) || e.inputs === void 0)) {
444
447
  if (!Array.isArray(e.inputs)) {
445
448
  i.push(
@@ -456,7 +459,7 @@ function me(e, i) {
456
459
  );
457
460
  }
458
461
  }
459
- function fe(e, i) {
462
+ function me(e, i) {
460
463
  var n, o;
461
464
  const t = new Set(
462
465
  Array.isArray(e.inputs) ? e.inputs.map((s) => u(s) ? s.inputId : void 0).filter((s) => typeof s == "string") : []
@@ -496,7 +499,7 @@ const _e = /* @__PURE__ */ new Set([
496
499
  "date",
497
500
  "id",
498
501
  "unknown"
499
- ]), ve = /* @__PURE__ */ new Set(["row", "aggregate"]), U = /* @__PURE__ */ new Set([
502
+ ]), ve = /* @__PURE__ */ new Set(["row", "aggregate"]), V = /* @__PURE__ */ new Set([
500
503
  "string",
501
504
  "number",
502
505
  "boolean",
@@ -524,7 +527,7 @@ const _e = /* @__PURE__ */ new Set([
524
527
  "digital",
525
528
  "long"
526
529
  ]);
527
- function R(e, i, t) {
530
+ function D(e, i, t) {
528
531
  if (e === void 0)
529
532
  return;
530
533
  if (!u(e)) {
@@ -623,7 +626,7 @@ function $e(e, i, t) {
623
626
  return;
624
627
  }
625
628
  if (e.kind === "field") {
626
- m(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
629
+ f(e.field, `${i}.field`, t, { required: !0 }), _(e.aggregate, `${i}.aggregate`, t);
627
630
  return;
628
631
  }
629
632
  t.push(
@@ -656,7 +659,7 @@ function j(e, i, t) {
656
659
  );
657
660
  return;
658
661
  }
659
- o && m(e.field, `${i}.field`, t, {
662
+ o && f(e.field, `${i}.field`, t, {
660
663
  required: !0
661
664
  });
662
665
  }
@@ -677,13 +680,13 @@ function we(e, i, t) {
677
680
  "Result calculation output needs a stable key.",
678
681
  `${i}.key`
679
682
  )
680
- ), e.dataType !== void 0 && (typeof e.dataType != "string" || !U.has(e.dataType)) && t.push(
683
+ ), e.dataType !== void 0 && (typeof e.dataType != "string" || !V.has(e.dataType)) && t.push(
681
684
  a(
682
685
  "invalid_result_calculation_output",
683
686
  "Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
684
687
  `${i}.dataType`
685
688
  )
686
- ), R(e.format, `${i}.format`, t);
689
+ ), D(e.format, `${i}.format`, t);
687
690
  }
688
691
  function Ie(e, i, t) {
689
692
  e !== void 0 && e !== "hour" && e !== "day" && e !== "week" && e !== "month" && e !== "quarter" && e !== "year" && t.push(
@@ -694,10 +697,10 @@ function Ie(e, i, t) {
694
697
  )
695
698
  );
696
699
  }
697
- function V(e, i, t, n) {
700
+ function G(e, i, t, n) {
698
701
  e !== "asc" && e !== "desc" && t.push(a(n, "Sort direction must be asc or desc.", i));
699
702
  }
700
- function G(e, i, t, n) {
703
+ function z(e, i, t, n) {
701
704
  e !== void 0 && e !== "warehouseDefault" && e !== "first" && e !== "last" && t.push(
702
705
  a(
703
706
  n,
@@ -706,7 +709,7 @@ function G(e, i, t, n) {
706
709
  )
707
710
  );
708
711
  }
709
- function z(e, i, t, n) {
712
+ function Q(e, i, t, n) {
710
713
  e !== void 0 && e !== "global" && e !== "withinParent" && t.push(
711
714
  a(n, "Sort scope must be global or withinParent.", i)
712
715
  );
@@ -733,17 +736,17 @@ function Ae(e, i, t) {
733
736
  );
734
737
  }
735
738
  function Me(e, i, t) {
736
- if (V(
739
+ if (G(
737
740
  e.direction,
738
741
  `${i}.direction`,
739
742
  t,
740
743
  "invalid_matrix_sort_direction"
741
- ), G(
744
+ ), z(
742
745
  e.nulls,
743
746
  `${i}.nulls`,
744
747
  t,
745
748
  "invalid_matrix_sort_nulls"
746
- ), z(
749
+ ), Q(
747
750
  e.scope,
748
751
  `${i}.scope`,
749
752
  t,
@@ -760,7 +763,7 @@ function Me(e, i, t) {
760
763
  }
761
764
  if (e.by.kind !== "label") {
762
765
  if (e.by.kind === "field") {
763
- m(e.by.field, `${i}.by.field`, t, {
766
+ f(e.by.field, `${i}.by.field`, t, {
764
767
  required: !0
765
768
  }), _(e.by.aggregate, `${i}.by.aggregate`, t);
766
769
  return;
@@ -816,7 +819,7 @@ function B(e, i, t, n) {
816
819
  "Matrix axis level id must be a non-empty string.",
817
820
  `${c}.id`
818
821
  )
819
- ), m(d.field, `${c}.field`, t, {
822
+ ), f(d.field, `${c}.field`, t, {
820
823
  required: !0
821
824
  }), Ie(d.grain, `${c}.grain`, t), d.label !== void 0 && typeof d.label != "string" && t.push(
822
825
  a(
@@ -917,13 +920,13 @@ function ke(e, i, t) {
917
920
  "Matrix value id must be a non-empty string.",
918
921
  `${r}.id`
919
922
  )
920
- ), m(c.field, `${r}.field`, t, {
923
+ ), f(c.field, `${r}.field`, t, {
921
924
  required: !0
922
925
  }), _(
923
926
  c.aggregate,
924
927
  `${r}.aggregate`,
925
928
  t
926
- ), R(c.format, `${r}.format`, t), c.label !== void 0 && typeof c.label != "string" && t.push(
929
+ ), D(c.format, `${r}.format`, t), c.label !== void 0 && typeof c.label != "string" && t.push(
927
930
  a(
928
931
  "invalid_matrix_value_label",
929
932
  "Matrix value label must be a string.",
@@ -991,7 +994,7 @@ function Re(e, i, t) {
991
994
  )
992
995
  );
993
996
  }
994
- function I(e, i, t, n) {
997
+ function A(e, i, t, n) {
995
998
  if (!Array.isArray(e)) {
996
999
  n.push(
997
1000
  a(
@@ -1064,7 +1067,7 @@ function q(e, i, t, n) {
1064
1067
  `${i}.lazy`
1065
1068
  )
1066
1069
  ), e.expandedPaths !== void 0 && (Array.isArray(e.expandedPaths) ? e.expandedPaths.forEach((o, s) => {
1067
- I(
1070
+ A(
1068
1071
  o,
1069
1072
  `${i}.expandedPaths.${s}`,
1070
1073
  t,
@@ -1142,17 +1145,17 @@ function Fe(e, i, t, n, o) {
1142
1145
  "Matrix sort targetId must reference an explicit public axis level id.",
1143
1146
  `${c}.targetId`
1144
1147
  )
1145
- ), V(
1148
+ ), G(
1146
1149
  d.direction,
1147
1150
  `${c}.direction`,
1148
1151
  o,
1149
1152
  "invalid_matrix_sort_direction"
1150
- ), G(
1153
+ ), z(
1151
1154
  d.nulls,
1152
1155
  `${c}.nulls`,
1153
1156
  o,
1154
1157
  "invalid_matrix_sort_nulls"
1155
- ), z(
1158
+ ), Q(
1156
1159
  d.scope,
1157
1160
  `${c}.scope`,
1158
1161
  o,
@@ -1169,7 +1172,7 @@ function Fe(e, i, t, n, o) {
1169
1172
  }
1170
1173
  if (d.by.kind !== "label") {
1171
1174
  if (d.by.kind === "field") {
1172
- m(d.by.field, `${c}.by.field`, o, {
1175
+ f(d.by.field, `${c}.by.field`, o, {
1173
1176
  required: !0
1174
1177
  }), _(
1175
1178
  d.by.aggregate,
@@ -1185,12 +1188,12 @@ function Fe(e, i, t, n, o) {
1185
1188
  "Matrix value sort must reference an explicit public value id.",
1186
1189
  `${c}.by.valueId`
1187
1190
  )
1188
- ), d.by.rowPath !== void 0 && I(
1191
+ ), d.by.rowPath !== void 0 && A(
1189
1192
  d.by.rowPath,
1190
1193
  `${c}.by.rowPath`,
1191
1194
  i,
1192
1195
  o
1193
- ), d.by.columnPath !== void 0 && I(
1196
+ ), d.by.columnPath !== void 0 && A(
1194
1197
  d.by.columnPath,
1195
1198
  `${c}.by.columnPath`,
1196
1199
  t,
@@ -1399,9 +1402,9 @@ function Ne(e, i) {
1399
1402
  )
1400
1403
  );
1401
1404
  const { timeWindow: t } = e.analysis;
1402
- t !== void 0 && A(t, "analysis.timeWindow", i);
1405
+ t !== void 0 && M(t, "analysis.timeWindow", i);
1403
1406
  }
1404
- function A(e, i, t) {
1407
+ function M(e, i, t) {
1405
1408
  if (!u(e)) {
1406
1409
  t.push(
1407
1410
  a(
@@ -1432,7 +1435,7 @@ function A(e, i, t) {
1432
1435
  `${i}.end`
1433
1436
  )
1434
1437
  ), l(e.start) && l(e.end)) {
1435
- const n = T(e.start), o = T(e.end);
1438
+ const n = w(e.start), o = w(e.end);
1436
1439
  n || t.push(
1437
1440
  a(
1438
1441
  "invalid_time_window",
@@ -1507,7 +1510,7 @@ function x(e, i, t) {
1507
1510
  return;
1508
1511
  }
1509
1512
  const r = n;
1510
- m(r.field, `${s}.field`, t, {
1513
+ f(r.field, `${s}.field`, t, {
1511
1514
  required: !0
1512
1515
  }), r.scope !== void 0 && r.scope !== "row" && r.scope !== "aggregate" && t.push(
1513
1516
  a(
@@ -1607,7 +1610,7 @@ function Oe(e) {
1607
1610
  "Derived field resultRole must be measure, dimension, date, id, or unknown.",
1608
1611
  "resultRole"
1609
1612
  )
1610
- ), U.has(e.dataType) || i.push(
1613
+ ), V.has(e.dataType) || i.push(
1611
1614
  a(
1612
1615
  "invalid_derived_field_data_type",
1613
1616
  "Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
@@ -1713,7 +1716,7 @@ function Oe(e) {
1713
1716
  );
1714
1717
  });
1715
1718
  }
1716
- return R(e.format, "format", i), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1719
+ return D(e.format, "format", i), e.tags !== void 0 && (!Array.isArray(e.tags) || e.tags.some((t) => !l(t))) && i.push(
1717
1720
  a(
1718
1721
  "invalid_derived_field_tags",
1719
1722
  "Derived field tags must be non-empty strings.",
@@ -1721,7 +1724,7 @@ function Oe(e) {
1721
1724
  )
1722
1725
  ), { ok: i.length === 0, errors: i, warnings: [] };
1723
1726
  }
1724
- function Ce(e) {
1727
+ function Ue(e) {
1725
1728
  const i = [];
1726
1729
  if (!u(e))
1727
1730
  return i.push(
@@ -1746,7 +1749,7 @@ function Ce(e) {
1746
1749
  )
1747
1750
  ), j(e.input, "input", i), we(e.output, "output", i), e.kind === "percent_of_total") {
1748
1751
  const t = e.denominator;
1749
- t !== void 0 && (u(t) ? t.scope === "population" ? (m(t.metric, "denominator.metric", i, {
1752
+ t !== void 0 && (u(t) ? t.scope === "population" ? (f(t.metric, "denominator.metric", i, {
1750
1753
  required: !0
1751
1754
  }), x(
1752
1755
  t.filters,
@@ -1774,7 +1777,7 @@ function Ce(e) {
1774
1777
  )
1775
1778
  ), (e.kind === "running_total" || e.kind === "previous_row_delta") && e.orderBy !== void 0 && j(e.orderBy, "orderBy", i), { ok: i.length === 0, errors: i, warnings: [] };
1776
1779
  }
1777
- function Q(e) {
1780
+ function Y(e) {
1778
1781
  var n;
1779
1782
  const i = [], t = [];
1780
1783
  if (!e || typeof e != "object")
@@ -1800,7 +1803,7 @@ function Q(e) {
1800
1803
  "Analytics intent version must be 1.",
1801
1804
  "version"
1802
1805
  )
1803
- ), S(e.source, "source", i), je(e, i), me(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && k(
1806
+ ), k(e.source, "source", i), je(e, i), fe(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && R(
1804
1807
  e.relationshipHint,
1805
1808
  "relationshipHint",
1806
1809
  i
@@ -1823,10 +1826,10 @@ function Q(e) {
1823
1826
  "measures"
1824
1827
  )
1825
1828
  ), o.forEach((s, r) => {
1826
- m(s, `measures.${r}`, i, {
1829
+ f(s, `measures.${r}`, i, {
1827
1830
  required: !0
1828
1831
  });
1829
- }), o.length > 0 && !Z(o)) {
1832
+ }), o.length > 0 && !J(o)) {
1830
1833
  const s = o.find(
1831
1834
  (r, c) => o.some(
1832
1835
  (d, p) => p !== c && C(d, r)
@@ -1835,12 +1838,12 @@ function Q(e) {
1835
1838
  s && i.push(
1836
1839
  a(
1837
1840
  "duplicate_measure",
1838
- J(s),
1841
+ W(s),
1839
1842
  "measures"
1840
1843
  )
1841
1844
  );
1842
1845
  }
1843
- if (u(e.primaryMeasure) && l(e.primaryMeasure.name) && M(
1846
+ if (u(e.primaryMeasure) && l(e.primaryMeasure.name) && S(
1844
1847
  e.primaryMeasure,
1845
1848
  o
1846
1849
  ).length > 1 && i.push(
@@ -1849,9 +1852,9 @@ function Q(e) {
1849
1852
  "Metric intent primaryMeasure must identify exactly one selected measure.",
1850
1853
  "primaryMeasure"
1851
1854
  )
1852
- ), e.primaryMeasure !== void 0 && (m(e.primaryMeasure, "primaryMeasure", i, {
1855
+ ), e.primaryMeasure !== void 0 && (f(e.primaryMeasure, "primaryMeasure", i, {
1853
1856
  required: !0
1854
- }), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !ee(
1857
+ }), u(e.primaryMeasure) && l(e.primaryMeasure.name) && o.length > 0 && !ie(
1855
1858
  e.primaryMeasure,
1856
1859
  o
1857
1860
  ) && i.push(
@@ -1874,14 +1877,14 @@ function Q(e) {
1874
1877
  "Metric intent dimensions must be an array of field references with names.",
1875
1878
  "dimensions"
1876
1879
  )
1877
- ), e.dateField !== void 0 && m(e.dateField, "dateField", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1880
+ ), e.dateField !== void 0 && f(e.dateField, "dateField", i), e.timeWindow !== void 0 && (M(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1878
1881
  a(
1879
1882
  "missing_time_window_date_field",
1880
1883
  "Metric timeWindow needs a dateField.",
1881
1884
  "dateField"
1882
1885
  )
1883
1886
  )), x(e.filters, "filters", i), Array.isArray(e.dimensions) && e.dimensions.forEach((s, r) => {
1884
- m(s, `dimensions.${r}`, i);
1887
+ f(s, `dimensions.${r}`, i);
1885
1888
  }), e.orderBy !== void 0) {
1886
1889
  if (!u(e.orderBy))
1887
1890
  i.push(
@@ -1891,7 +1894,7 @@ function Q(e) {
1891
1894
  "orderBy"
1892
1895
  )
1893
1896
  );
1894
- else if (m(e.orderBy.field, "orderBy.field", i, {
1897
+ else if (f(e.orderBy.field, "orderBy.field", i, {
1895
1898
  required: !0
1896
1899
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1897
1900
  a(
@@ -1907,7 +1910,7 @@ function Q(e) {
1907
1910
  (r) => u(r) && l(r.name)
1908
1911
  ) : []
1909
1912
  ];
1910
- s.length > 0 && !ie(
1913
+ s.length > 0 && !te(
1911
1914
  e.orderBy.field,
1912
1915
  s
1913
1916
  ) && i.push(
@@ -1936,8 +1939,8 @@ function Q(e) {
1936
1939
  "fields"
1937
1940
  )
1938
1941
  ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
1939
- m(o, `fields.${s}`, i);
1940
- }), e.dateField !== void 0 && m(e.dateField, "dateField", i), N(e.pagination, "pagination", i), e.timeWindow !== void 0 && (A(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1942
+ f(o, `fields.${s}`, i);
1943
+ }), e.dateField !== void 0 && f(e.dateField, "dateField", i), N(e.pagination, "pagination", i), e.timeWindow !== void 0 && (M(e.timeWindow, "timeWindow", i), e.dateField || i.push(
1941
1944
  a(
1942
1945
  "missing_time_window_date_field",
1943
1946
  "Records timeWindow needs a dateField.",
@@ -1951,7 +1954,7 @@ function Q(e) {
1951
1954
  `filters.${s}.scope`
1952
1955
  )
1953
1956
  );
1954
- }), e.orderBy !== void 0 && (u(e.orderBy) ? (m(e.orderBy.field, "orderBy.field", i, {
1957
+ }), e.orderBy !== void 0 && (u(e.orderBy) ? (f(e.orderBy.field, "orderBy.field", i, {
1955
1958
  required: !0
1956
1959
  }), e.orderBy.direction !== "asc" && e.orderBy.direction !== "desc" && i.push(
1957
1960
  a(
@@ -1990,7 +1993,7 @@ function Q(e) {
1990
1993
  "totals.measures"
1991
1994
  )
1992
1995
  ) : o.forEach((s, r) => {
1993
- m(s, `totals.measures.${r}`, i, {
1996
+ f(s, `totals.measures.${r}`, i, {
1994
1997
  required: !0
1995
1998
  }), (!u(s) || s.role !== "measure") && i.push(
1996
1999
  a(
@@ -2009,12 +2012,12 @@ function Q(e) {
2009
2012
  )
2010
2013
  ), l(e.sql) || i.push(
2011
2014
  a("missing_sql", "SQL analytics intent needs SQL text.", "sql")
2012
- ), W(
2015
+ ), ee(
2013
2016
  e.defaultParameters,
2014
2017
  "defaultParameters",
2015
2018
  i
2016
2019
  ), Array.isArray(e.fields) && e.fields.forEach((o, s) => {
2017
- m(o, `fields.${s}`, i);
2020
+ f(o, `fields.${s}`, i);
2018
2021
  }), N(e.pagination, "pagination", i)) : i.push(
2019
2022
  a(
2020
2023
  "invalid_analytics_kind",
@@ -2108,7 +2111,7 @@ function Be(e) {
2108
2111
  "instruction"
2109
2112
  )
2110
2113
  ), e.analyticsIntent) {
2111
- const n = Q(
2114
+ const n = Y(
2112
2115
  e.analyticsIntent
2113
2116
  );
2114
2117
  i.push(...n.errors), t.push(...n.warnings);
@@ -2125,10 +2128,10 @@ function Be(e) {
2125
2128
  ok: i.length === 0,
2126
2129
  errors: i,
2127
2130
  warnings: t,
2128
- repairHints: Y(i)
2131
+ repairHints: K(i)
2129
2132
  };
2130
2133
  }
2131
- function Ue(e) {
2134
+ function Ve(e) {
2132
2135
  const i = [], t = [];
2133
2136
  if (!e || typeof e != "object")
2134
2137
  return {
@@ -2169,10 +2172,10 @@ function Ue(e) {
2169
2172
  ok: i.length === 0,
2170
2173
  errors: i,
2171
2174
  warnings: t,
2172
- repairHints: Y(i)
2175
+ repairHints: K(i)
2173
2176
  };
2174
2177
  }
2175
- function Y(e) {
2178
+ function K(e) {
2176
2179
  return e.map((i) => ({
2177
2180
  code: i.code,
2178
2181
  recommendedNextStep: i.code === "missing_obligations" ? "Normalize the user request into one or more typed analytics obligations before recovery planning." : "Correct the operation/recovery contract shape before planning execution."
@@ -2307,7 +2310,7 @@ function He(e, i, t, n) {
2307
2310
  `${i}.analytics.kind`
2308
2311
  )
2309
2312
  );
2310
- const o = Q(e.analytics);
2313
+ const o = Y(e.analytics);
2311
2314
  for (const s of o.errors)
2312
2315
  t.push(
2313
2316
  a(
@@ -2325,7 +2328,7 @@ function He(e, i, t, n) {
2325
2328
  )
2326
2329
  );
2327
2330
  }
2328
- function Ve(e) {
2331
+ function Ge(e) {
2329
2332
  const i = [], t = [];
2330
2333
  if (!e || typeof e != "object")
2331
2334
  return {
@@ -2345,7 +2348,7 @@ function Ve(e) {
2345
2348
  ), l(e.title) || i.push(
2346
2349
  a("missing_title", "Dashboard intent needs a title.", "title")
2347
2350
  );
2348
- const n = Array.isArray(e.inputs) ? e.inputs : [], o = w(
2351
+ const n = Array.isArray(e.inputs) ? e.inputs : [], o = I(
2349
2352
  n.filter(u).map((d) => d.id).filter((d) => typeof d == "string")
2350
2353
  );
2351
2354
  o && i.push(
@@ -2356,20 +2359,20 @@ function Ve(e) {
2356
2359
  )
2357
2360
  );
2358
2361
  for (const [d, p] of n.entries()) {
2359
- const f = `inputs.${d}`;
2362
+ const m = `inputs.${d}`;
2360
2363
  if (!u(p)) {
2361
2364
  i.push(
2362
- a("invalid_input", "Dashboard input must be an object.", f)
2365
+ a("invalid_input", "Dashboard input must be an object.", m)
2363
2366
  );
2364
2367
  continue;
2365
2368
  }
2366
2369
  l(p.id) || i.push(
2367
- a("missing_input_id", "Input needs an id.", `${f}.id`)
2370
+ a("missing_input_id", "Input needs an id.", `${m}.id`)
2368
2371
  ), l(p.label) || i.push(
2369
- a("missing_input_label", "Input needs a label.", `${f}.label`)
2372
+ a("missing_input_label", "Input needs a label.", `${m}.label`)
2370
2373
  ), !p.field || !l(p.field.name) ? i.push(
2371
- a("missing_input_field", "Input needs a field.", `${f}.field`)
2372
- ) : m(p.field, `${f}.field`, i);
2374
+ a("missing_input_field", "Input needs a field.", `${m}.field`)
2375
+ ) : f(p.field, `${m}.field`, i);
2373
2376
  }
2374
2377
  const s = Array.isArray(e.sections) ? e.sections : [];
2375
2378
  s.length === 0 && i.push(
@@ -2381,7 +2384,7 @@ function Ve(e) {
2381
2384
  );
2382
2385
  const r = s.flatMap(
2383
2386
  (d) => d && typeof d == "object" && Array.isArray(d.views) ? d.views.filter(u).map((p) => p.id).filter((p) => !!p) : []
2384
- ), c = w(r);
2387
+ ), c = I(r);
2385
2388
  c && i.push(
2386
2389
  a(
2387
2390
  "duplicate_view_id",
@@ -2390,13 +2393,13 @@ function Ve(e) {
2390
2393
  )
2391
2394
  );
2392
2395
  for (const [d, p] of s.entries()) {
2393
- const f = `sections.${d}`;
2396
+ const m = `sections.${d}`;
2394
2397
  if (!p || typeof p != "object") {
2395
2398
  i.push(
2396
2399
  a(
2397
2400
  "invalid_section",
2398
2401
  "Dashboard section must be an object.",
2399
- f
2402
+ m
2400
2403
  )
2401
2404
  );
2402
2405
  continue;
@@ -2405,14 +2408,14 @@ function Ve(e) {
2405
2408
  a(
2406
2409
  "missing_section_title",
2407
2410
  "Dashboard section needs a title.",
2408
- f
2411
+ m
2409
2412
  )
2410
2413
  ), !Array.isArray(p.views) || p.views.length === 0) {
2411
2414
  i.push(
2412
2415
  a(
2413
2416
  "missing_section_views",
2414
2417
  "Dashboard section needs at least one view.",
2415
- `${f}.views`
2418
+ `${m}.views`
2416
2419
  )
2417
2420
  );
2418
2421
  continue;
@@ -2420,7 +2423,7 @@ function Ve(e) {
2420
2423
  for (const [b, y] of p.views.entries())
2421
2424
  He(
2422
2425
  y,
2423
- `${f}.views.${b}`,
2426
+ `${m}.views.${b}`,
2424
2427
  i,
2425
2428
  t
2426
2429
  );
@@ -2428,11 +2431,12 @@ function Ve(e) {
2428
2431
  return { ok: i.length === 0, errors: i, warnings: t };
2429
2432
  }
2430
2433
  export {
2431
- Ce as a,
2432
- Q as b,
2433
- Be as c,
2434
- Ue as d,
2435
- Ve as e,
2436
- T as p,
2437
- Oe as v
2434
+ w as a,
2435
+ Ve as b,
2436
+ Ge as c,
2437
+ Oe as d,
2438
+ Be as e,
2439
+ Ue as f,
2440
+ Ce as p,
2441
+ Y as v
2438
2442
  };