react-semaphor 0.1.496 → 0.1.498

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 (122) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +10 -10
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.cjs +1 -1
  6. package/dist/briefings/index.js +5 -5
  7. package/dist/chunks/{calculated-field-identity-Cq9GwHfE.js → calculated-field-identity-BGIPbwBx.js} +26 -26
  8. package/dist/chunks/{calculated-field-identity-DTfyvvLC.cjs → calculated-field-identity-CEzmY7Bi.cjs} +1 -1
  9. package/dist/chunks/{constants-CC3WKmqC.js → constants-CKoIADZx.js} +9 -9
  10. package/dist/chunks/{constants-DIuhVR6J.cjs → constants-CpBVuEea.cjs} +1 -1
  11. package/dist/chunks/{dashboard-briefing-launcher-CM6LTGw5.cjs → dashboard-briefing-launcher-BEmyxEd8.cjs} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-Bbz4cwHb.js → dashboard-briefing-launcher-C8eAX-JN.js} +9 -9
  13. package/dist/chunks/{dashboard-controls-BsgADy-S.js → dashboard-controls-C_v7sbq4.js} +11 -11
  14. package/dist/chunks/{dashboard-controls-B2nrczJl.cjs → dashboard-controls-YvJe7cPL.cjs} +1 -1
  15. package/dist/chunks/{dashboard-date-comparison-definition-C69F-zaC.cjs → dashboard-date-comparison-definition-Er8D33iq.cjs} +1 -1
  16. package/dist/chunks/{dashboard-date-comparison-definition-Bqti6YAo.js → dashboard-date-comparison-definition-aANgeL-E.js} +1 -1
  17. package/dist/chunks/{dashboard-json-CA-BChbt.js → dashboard-json-BaT3Yy8x.js} +7 -7
  18. package/dist/chunks/{dashboard-json-CwRRBSSL.cjs → dashboard-json-CSp5bXIV.cjs} +1 -1
  19. package/dist/chunks/{edit-dashboard-visual-CEiPgdkX.js → edit-dashboard-visual-GWiW0jjy.js} +7088 -7103
  20. package/dist/chunks/edit-dashboard-visual-_Wap0YGu.cjs +172 -0
  21. package/dist/chunks/{editor-action-buttons-kk2BNiTe.cjs → editor-action-buttons-BSC0nwgV.cjs} +1 -1
  22. package/dist/chunks/{editor-action-buttons-6HBjjcfK.js → editor-action-buttons-CfZITZwQ.js} +6 -6
  23. package/dist/chunks/{field-aggregations-C8kZqMTD.js → field-aggregations-CxJWY4Ny.js} +11 -11
  24. package/dist/chunks/{field-aggregations-naKZ7S2Q.cjs → field-aggregations-DLWbqnBW.cjs} +1 -1
  25. package/dist/chunks/field-dependencies-BiyQuGxZ.cjs +1 -0
  26. package/dist/chunks/field-dependencies-CNOgt39w.js +182 -0
  27. package/dist/chunks/{index-oll4m-qi.js → index-BJfUMDHc.js} +42 -42
  28. package/dist/chunks/{index-CCa-A-Yx.cjs → index-C3RHKD3d.cjs} +1 -1
  29. package/dist/chunks/index-DhBGtRkR.cjs +1417 -0
  30. package/dist/chunks/{index-Cgoz65yM.js → index-DjbQVfS6.js} +40875 -40268
  31. package/dist/chunks/{matrix-analytical-definition-BK5y9XHH.cjs → matrix-analytical-definition-DbaMwlWM.cjs} +1 -1
  32. package/dist/chunks/{matrix-analytical-definition-B1xhoCak.js → matrix-analytical-definition-s10yOPft.js} +1 -1
  33. package/dist/chunks/{matrix-card-Ii8yYSnw.cjs → matrix-card-BitrcBVw.cjs} +1 -1
  34. package/dist/chunks/{matrix-card-BEb6hr8i.js → matrix-card-DGpXdK_Y.js} +2 -2
  35. package/dist/chunks/{matrix-control-sources-CdegRBcA.cjs → matrix-control-sources-DdfST7Fo.cjs} +1 -1
  36. package/dist/chunks/{matrix-control-sources-cbYmqWNg.js → matrix-control-sources-Dxh6hOU9.js} +10 -10
  37. package/dist/chunks/{matrix-definition-CZM5-YJX.js → matrix-definition-AP5W3wGc.js} +1 -1
  38. package/dist/chunks/{matrix-definition-CSNthxru.cjs → matrix-definition-C33isJ3k.cjs} +1 -1
  39. package/dist/chunks/{matrix-formatter-CiXzpX6X.js → matrix-formatter-CZYFhdZ0.js} +44 -44
  40. package/dist/chunks/{matrix-formatter-C19PZAal.cjs → matrix-formatter-UCXQxvV3.cjs} +1 -1
  41. package/dist/chunks/{matrix-member-presentation-CabW8mJc.js → matrix-member-presentation-5-M0obIa.js} +1 -1
  42. package/dist/chunks/{matrix-member-presentation-CQHvq18l.cjs → matrix-member-presentation-DgIq9UG9.cjs} +1 -1
  43. package/dist/chunks/{matrix-operation-contract-0Nor-C71.js → matrix-operation-contract-BFumahBa.js} +21 -21
  44. package/dist/chunks/{matrix-operation-contract-o9GXbiHw.cjs → matrix-operation-contract-C0-V685e.cjs} +1 -1
  45. package/dist/chunks/{metric-comparison-DeiOjEm5.cjs → metric-comparison-ClKUI7Tu.cjs} +1 -1
  46. package/dist/chunks/{metric-comparison-Br8l0WkK.js → metric-comparison-Df3HmmUE.js} +1 -1
  47. package/dist/chunks/{pivot-header-presentation-DW-ti5ek.js → pivot-header-presentation-CAmKYLgn.js} +3 -3
  48. package/dist/chunks/{pivot-header-presentation-DRv-cSIP.cjs → pivot-header-presentation-CGWDx1V_.cjs} +1 -1
  49. package/dist/chunks/{pivot-result-identity-DEenUrMj.cjs → pivot-result-identity-0grcK7bY.cjs} +1 -1
  50. package/dist/chunks/{pivot-result-identity-sZc1RaIz.js → pivot-result-identity-DBeK76wx.js} +1 -1
  51. package/dist/chunks/{pivot-result-lifecycle-D81qcCcZ.cjs → pivot-result-lifecycle-CC0jWMFT.cjs} +1 -1
  52. package/dist/chunks/{pivot-result-lifecycle-DJ40gdwk.js → pivot-result-lifecycle-DVPJg7Gg.js} +7 -7
  53. package/dist/chunks/{raw-temporal-DDTt2yv5.cjs → raw-temporal-Kc3mdzH7.cjs} +1 -1
  54. package/dist/chunks/{raw-temporal-DHCZrFe7.js → raw-temporal-T3PEaGmJ.js} +2 -2
  55. package/dist/chunks/{raw-temporal-contract-CkvdtPYA.js → raw-temporal-contract-Ck5vJoQ6.js} +1 -1
  56. package/dist/chunks/{raw-temporal-contract-BcbV56Rc.cjs → raw-temporal-contract-SwtP1jSh.cjs} +1 -1
  57. package/dist/chunks/{report-preferences-dialog-CVRJOCQu.js → report-preferences-dialog-B8DdDM7q.js} +6 -6
  58. package/dist/chunks/{report-preferences-dialog-DGEq-iBF.cjs → report-preferences-dialog-BcaEOgn2.cjs} +1 -1
  59. package/dist/chunks/{report-runtime-context-BlDpc-F-.js → report-runtime-context-BziN1eg9.js} +1 -1
  60. package/dist/chunks/{report-runtime-context-lSIvyKm2.cjs → report-runtime-context-D3t8vyl9.cjs} +1 -1
  61. package/dist/chunks/{semantic-format-ew5zviaT.js → semantic-format-A3k--fpE.js} +2 -2
  62. package/dist/chunks/{semantic-format--_VEin18.cjs → semantic-format-Ca-sdETk.cjs} +1 -1
  63. package/dist/chunks/{source-entity-resolution-DPjslVgx.cjs → source-entity-resolution-CTUzMH2S.cjs} +1 -1
  64. package/dist/chunks/{source-entity-resolution-79Rihbk3.js → source-entity-resolution-DX9C1ebK.js} +20 -20
  65. package/dist/chunks/switch-CgycqpWv.cjs +139 -0
  66. package/dist/chunks/{switch-BmyuyM7e.js → switch-DV8zX7rV.js} +4785 -4610
  67. package/dist/chunks/{temporal-bucket-contract-BYR6tj6F.cjs → temporal-bucket-contract-BBdvWsY0.cjs} +1 -1
  68. package/dist/chunks/{temporal-bucket-contract-C-kKQ_W4.js → temporal-bucket-contract-lq7Jrif0.js} +1 -1
  69. package/dist/chunks/{update-policy-BCtFr2Qh.cjs → update-policy-DIw_H9RT.cjs} +1 -1
  70. package/dist/chunks/{update-policy-CP_A1IVD.js → update-policy-EgZ1nRbd.js} +2 -2
  71. package/dist/chunks/{validators-D-_IT-Xw.js → validators-CvLOGzT3.js} +291 -286
  72. package/dist/chunks/validators-mhiJSia7.cjs +1 -0
  73. package/dist/dashboard/index.cjs +1 -1
  74. package/dist/dashboard/index.js +1 -1
  75. package/dist/dashboard-authoring/index.cjs +1 -1
  76. package/dist/dashboard-authoring/index.js +9 -9
  77. package/dist/data-app-builder/index.cjs +1 -1
  78. package/dist/data-app-builder/index.js +2 -2
  79. package/dist/data-app-codegen/index.cjs +1 -1
  80. package/dist/data-app-codegen/index.js +2 -2
  81. package/dist/data-app-codegen-node/index.cjs +1 -1
  82. package/dist/data-app-codegen-node/index.js +3 -3
  83. package/dist/data-app-sdk/index.cjs +1 -1
  84. package/dist/data-app-sdk/index.js +232 -232
  85. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  86. package/dist/data-app-sdk-adapters/index.js +2 -2
  87. package/dist/data-app-sdk-validation/index.cjs +1 -1
  88. package/dist/data-app-sdk-validation/index.js +5 -5
  89. package/dist/format-utils/index.cjs +1 -1
  90. package/dist/format-utils/index.js +16 -16
  91. package/dist/index.cjs +1 -1
  92. package/dist/index.js +57 -56
  93. package/dist/report-runtime-context/index.cjs +1 -1
  94. package/dist/report-runtime-context/index.js +2 -2
  95. package/dist/style.css +1 -1
  96. package/dist/surfboard/index.cjs +1 -1
  97. package/dist/surfboard/index.js +2 -2
  98. package/dist/types/analytics-protocol.d.ts +634 -634
  99. package/dist/types/briefings.d.ts +172 -172
  100. package/dist/types/dashboard-assistant.d.ts +106 -106
  101. package/dist/types/dashboard-authoring.d.ts +134 -134
  102. package/dist/types/dashboard.d.ts +84 -84
  103. package/dist/types/data-app-builder.d.ts +62 -62
  104. package/dist/types/data-app-codegen-node.d.ts +84 -84
  105. package/dist/types/data-app-codegen.d.ts +84 -84
  106. package/dist/types/data-app-sdk-adapters.d.ts +84 -84
  107. package/dist/types/data-app-sdk-validation.d.ts +84 -84
  108. package/dist/types/data-app-sdk.d.ts +370 -370
  109. package/dist/types/format-utils.d.ts +109 -109
  110. package/dist/types/index.cjs +1 -1
  111. package/dist/types/index.js +31 -21
  112. package/dist/types/main.d.ts +160 -134
  113. package/dist/types/shared.d.ts +84 -84
  114. package/dist/types/surfboard.d.ts +84 -84
  115. package/dist/types/types.d.ts +191 -84
  116. package/package.json +1 -1
  117. package/dist/chunks/edit-dashboard-visual-BlS27LDw.cjs +0 -172
  118. package/dist/chunks/index-BSRwdFTN.cjs +0 -1417
  119. package/dist/chunks/switch-nDjQC2y3.cjs +0 -139
  120. package/dist/chunks/token-types-BIYFAsGq.js +0 -8
  121. package/dist/chunks/token-types-CkAGFhiW.cjs +0 -1
  122. package/dist/chunks/validators-ux2obZB9.cjs +0 -1
@@ -5,7 +5,7 @@ const jt = [
5
5
  "population_required",
6
6
  "ambiguous_relationship"
7
7
  ];
8
- function Qn(e) {
8
+ function Wn(e) {
9
9
  return jt.includes(
10
10
  e
11
11
  );
@@ -20,7 +20,7 @@ const Re = 200, G = [
20
20
  "quarter",
21
21
  "year"
22
22
  ];
23
- function Wn(e) {
23
+ function Xn(e) {
24
24
  return typeof e == "string" && G.includes(e);
25
25
  }
26
26
  const $t = [
@@ -30,17 +30,17 @@ const $t = [
30
30
  "quarter_long",
31
31
  "fiscal_quarter_short",
32
32
  "fiscal_year"
33
- ], Xn = {
33
+ ], Zn = {
34
34
  invalidMetadata: "invalid_raw_temporal_metadata"
35
35
  };
36
36
  function Ct(e) {
37
37
  return e === "second" || e === "minute" || e === "hour" ? "datetime" : "date";
38
38
  }
39
- const Zn = {
39
+ const Jn = {
40
40
  missingMetadata: "missing_temporal_bucket_metadata",
41
41
  invalidMetadata: "invalid_temporal_bucket_metadata",
42
42
  invalidValue: "invalid_temporal_bucket_value"
43
- }, Jn = "__auto_count__";
43
+ }, ea = "__auto_count__";
44
44
  function Ot(e) {
45
45
  return typeof e == "string" || typeof e == "number" && Number.isFinite(e) || typeof e == "boolean";
46
46
  }
@@ -252,7 +252,7 @@ const ge = i.object({
252
252
  ]).optional(),
253
253
  format: fe.optional(),
254
254
  tags: i.array(i.string()).optional()
255
- }).passthrough(), We = Qe, ea = Ke.and(
255
+ }).passthrough(), We = Qe, ta = Ke.and(
256
256
  i.object({
257
257
  derivedField: We.optional()
258
258
  }).passthrough()
@@ -274,7 +274,7 @@ const ge = i.object({
274
274
  Kt,
275
275
  Qt,
276
276
  Wt
277
- ]), ta = i.object({
277
+ ]), ia = i.object({
278
278
  key: i.string().optional(),
279
279
  name: i.string(),
280
280
  label: i.string().optional(),
@@ -328,10 +328,10 @@ const ge = i.object({
328
328
  message: `${e.rawTemporal.valueKind} raw temporal values require dataType ${n}.`
329
329
  });
330
330
  }
331
- }), ia = i.object({
331
+ }), na = i.object({
332
332
  records: O,
333
333
  columns: i.array(j).optional()
334
- }).passthrough(), na = i.object({
334
+ }).passthrough(), aa = i.object({
335
335
  records: O,
336
336
  columns: i.array(j)
337
337
  }).passthrough(), Xe = i.object({
@@ -349,7 +349,7 @@ const ge = i.object({
349
349
  path: i.string().optional(),
350
350
  fieldRole: i.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
351
351
  repairHint: Xe.optional()
352
- }).passthrough(), aa = i.object({
352
+ }).passthrough(), oa = i.object({
353
353
  ok: i.boolean(),
354
354
  errors: i.array(Te),
355
355
  warnings: i.array(Te),
@@ -369,7 +369,7 @@ const ge = i.object({
369
369
  rowLimitExceeded: i.boolean().optional(),
370
370
  limit: i.number().optional(),
371
371
  pagination: Zt.optional()
372
- }, oa = i.object({
372
+ }, sa = i.object({
373
373
  ...X,
374
374
  kind: i.literal("metric"),
375
375
  primaryValue: ee,
@@ -382,7 +382,7 @@ const ge = i.object({
382
382
  deltaPercent: i.union([i.number(), i.null()]).optional()
383
383
  }).passthrough().optional(),
384
384
  records: O.optional()
385
- }).passthrough(), sa = i.object({
385
+ }).passthrough(), ra = i.object({
386
386
  ...X,
387
387
  kind: i.literal("records"),
388
388
  columns: i.array(j),
@@ -409,7 +409,7 @@ const ge = i.object({
409
409
  }), ei = i.object({
410
410
  complete: i.boolean(),
411
411
  reason: i.enum(["unsupported", "truncated"]).optional()
412
- }), ra = i.object({
412
+ }), la = i.object({
413
413
  ...X,
414
414
  kind: i.literal("inputOptions"),
415
415
  dependencyOutcomes: i.array(Jt).optional(),
@@ -425,7 +425,7 @@ const ge = i.object({
425
425
  ["value"]
426
426
  )
427
427
  )
428
- }).passthrough(), la = i.object({
428
+ }).passthrough(), da = i.object({
429
429
  ...X,
430
430
  kind: i.literal("sql"),
431
431
  columns: i.array(j),
@@ -1025,10 +1025,10 @@ function dt(e, t = {}) {
1025
1025
  e.dataType || e.data_type
1026
1026
  ) === "number" && (!t.excludeIdentifiers || !Ne(e));
1027
1027
  }
1028
- function da(e) {
1028
+ function ua(e) {
1029
1029
  return !dt(e) && !st(e);
1030
1030
  }
1031
- function ua(e) {
1031
+ function ca(e) {
1032
1032
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
1033
1033
  for (const a of e) {
1034
1034
  if (rt(a))
@@ -1110,7 +1110,7 @@ function ut(e, t) {
1110
1110
  }
1111
1111
  return c === 0 ? 0 : n ? -c : c;
1112
1112
  }
1113
- function ca(e, t) {
1113
+ function pa(e, t) {
1114
1114
  if (typeof t == "number" && !Number.isFinite(t))
1115
1115
  throw new TypeError("Numeric scale must be finite.");
1116
1116
  const n = [e, A(String(t))].map((r) => {
@@ -1145,7 +1145,7 @@ function Ri(e, t) {
1145
1145
  function V(e) {
1146
1146
  return typeof e == "object" && e !== null && "kind" in e && e.kind === "exact_number" && "type" in e && (e.type === "integer" || e.type === "decimal") && "value" in e && typeof e.value == "string";
1147
1147
  }
1148
- function pa(e) {
1148
+ function ma(e) {
1149
1149
  const t = ki(e.nativeDataType);
1150
1150
  if (!t) throw new TypeError("Numeric result type is not established.");
1151
1151
  if (e.value === null) return null;
@@ -1173,7 +1173,7 @@ const Se = i.string().uuid(), Ie = i.enum(["rows", "columns"]), Ti = i.enum(["me
1173
1173
  path: [],
1174
1174
  message: "Others is terminal."
1175
1175
  });
1176
- }), ma = i.object({
1176
+ }), fa = i.object({
1177
1177
  rowPath: x,
1178
1178
  columnPath: x,
1179
1179
  measureId: Se
@@ -1187,7 +1187,7 @@ function pt(e) {
1187
1187
  );
1188
1188
  }
1189
1189
  const re = "SEMAPHOR_CALCULATED_FIELD", Di = "calculated_fields";
1190
- function fa(e) {
1190
+ function ga(e) {
1191
1191
  return (e == null ? void 0 : e.sourceField) || (e == null ? void 0 : e.name) || "";
1192
1192
  }
1193
1193
  const Ni = [
@@ -1225,34 +1225,38 @@ const Ni = [
1225
1225
  // Custom format
1226
1226
  "custom"
1227
1227
  ];
1228
- function ga(e) {
1229
- return e.role === "metric" && "expression" in e && !!e.expression;
1230
- }
1231
1228
  function ha(e) {
1232
- return !!e.expression;
1229
+ return e.role === "metric" && "expression" in e && !!e.expression;
1233
1230
  }
1234
1231
  function _a(e) {
1235
1232
  return !!e.expression;
1236
1233
  }
1237
1234
  function ba(e) {
1235
+ return !!e.expression;
1236
+ }
1237
+ function ya(e) {
1238
+ var t, n;
1239
+ return e ? !!(e.expression || e.derivedField || (n = (t = e.calculatedFormula) == null ? void 0 : t.inputFields) != null && n.length || Ei(e)) : !1;
1240
+ }
1241
+ function va(e) {
1238
1242
  var n, o;
1239
1243
  const t = e;
1240
1244
  return !!(t != null && t.expression && ((o = (n = t.calculatedFormula) == null ? void 0 : n.inputFields) != null && o.length));
1241
1245
  }
1242
- function ya(e) {
1246
+ function Sa(e) {
1243
1247
  return !!(e && (e.entityName === re || e.entityId === re));
1244
1248
  }
1245
- function va(e) {
1249
+ function Ei(e) {
1246
1250
  return e ? [e.entityName, e.entityId, e.qualifiedEntityName].some(
1247
1251
  (t) => t === re || t === Di
1248
1252
  ) : !1;
1249
1253
  }
1250
- var Ei = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(Ei || {});
1251
- const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1252
- ji.innerType().strict(),
1253
- $i.extend({ type: i.literal("date") }).strict(),
1254
- Ci.strict(),
1254
+ var ji = /* @__PURE__ */ ((e) => (e.SUBTOTAL = "__SUBTOTAL__", e.TOTAL = "__TOTAL__", e.ALL = "__ALL__", e))(ji || {});
1255
+ const [$i, Ci, Oi, Yi] = fe.options, Pi = i.union([
1256
+ $i.innerType().strict(),
1257
+ Ci.extend({ type: i.literal("date") }).strict(),
1255
1258
  Oi.strict(),
1259
+ Yi.strict(),
1256
1260
  W
1257
1261
  ]), y = i.string().min(1), mt = i.enum([
1258
1262
  "table",
@@ -1327,7 +1331,7 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1327
1331
  role: i.enum(["groupby", "metric", "sortby", "pivotby", "detail"]).optional(),
1328
1332
  expression: i.string().optional(),
1329
1333
  derivedField: ye.optional(),
1330
- format: Yi.optional(),
1334
+ format: Pi.optional(),
1331
1335
  semanticTemporalPresentation: i.object({
1332
1336
  granularity: L,
1333
1337
  format: W
@@ -1349,13 +1353,13 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1349
1353
  constant: i.number().finite().optional()
1350
1354
  }).strict().optional()
1351
1355
  }).strict()
1352
- ), Pi = i.union([
1356
+ ), Bi = i.union([
1353
1357
  i.string(),
1354
1358
  i.number().finite(),
1355
1359
  i.boolean(),
1356
1360
  i.date(),
1357
1361
  i.null()
1358
- ]), Bi = i.object({
1362
+ ]), qi = i.object({
1359
1363
  id: y,
1360
1364
  field: H,
1361
1365
  operator: i.enum([
@@ -1377,7 +1381,7 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1377
1381
  "isNull",
1378
1382
  "isNotNull"
1379
1383
  ]),
1380
- value: i.union([Pi, i.array(i.string()), i.array(i.number().finite())]),
1384
+ value: i.union([Bi, i.array(i.string()), i.array(i.number().finite())]),
1381
1385
  label: i.string().optional(),
1382
1386
  temporalBucket: se.optional()
1383
1387
  }).strict().superRefine((e, t) => {
@@ -1396,10 +1400,10 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1396
1400
  id: y,
1397
1401
  logicalOperator: i.enum(["AND", "OR"]),
1398
1402
  negate: i.boolean(),
1399
- conditions: i.array(Bi),
1403
+ conditions: i.array(qi),
1400
1404
  groups: i.array(ft)
1401
1405
  }).strict()
1402
- ), qi = i.object({
1406
+ ), Li = i.object({
1403
1407
  baseEntity: ne,
1404
1408
  joins: i.array(
1405
1409
  i.object({
@@ -1428,14 +1432,14 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1428
1432
  ).min(1)
1429
1433
  }).strict()
1430
1434
  )
1431
- }).strict(), Li = i.object({
1435
+ }).strict(), Ui = i.object({
1432
1436
  axis: Ie,
1433
1437
  levelId: i.string().uuid().optional(),
1434
1438
  // Persisted table preferences are edited through Immer; runtime paths remain readonly.
1435
1439
  oppositePath: x.transform((e) => [...e]).optional()
1436
- }).strict(), I = i.string().min(1), Ui = i.array(
1440
+ }).strict(), I = i.string().min(1), Vi = i.array(
1437
1441
  i.enum(["body", "header", "footer", "subtotal", "grandTotal"])
1438
- ), Vi = i.enum(["normal", "medium", "semibold", "bold"]), Hi = i.enum(["none", "underline", "line-through"]), gt = i.object({
1442
+ ), Hi = i.enum(["normal", "medium", "semibold", "bold"]), Gi = i.enum(["none", "underline", "line-through"]), gt = i.object({
1439
1443
  version: i.literal(1),
1440
1444
  rules: i.array(
1441
1445
  i.object({
@@ -1444,11 +1448,11 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1444
1448
  enabled: i.boolean().optional(),
1445
1449
  target: i.object({
1446
1450
  level: i.enum(["cell", "row"]),
1447
- matrix: Li.optional(),
1451
+ matrix: Ui.optional(),
1448
1452
  columnIds: i.array(I).optional(),
1449
1453
  conditionColumnId: I.optional(),
1450
1454
  applyToColumnIds: i.array(I).optional(),
1451
- tableParts: Ui.optional(),
1455
+ tableParts: Vi.optional(),
1452
1456
  rowRoles: i.array(i.string()).optional(),
1453
1457
  depth: i.number().int().nonnegative().optional(),
1454
1458
  includeTotals: i.boolean().optional(),
@@ -1512,16 +1516,16 @@ const [ji, $i, Ci, Oi] = fe.options, Yi = i.union([
1512
1516
  style: i.object({
1513
1517
  backgroundColor: i.string().optional(),
1514
1518
  textColor: i.string().optional(),
1515
- fontWeight: Vi.optional(),
1519
+ fontWeight: Hi.optional(),
1516
1520
  italic: i.boolean().optional(),
1517
- textDecoration: Hi.optional(),
1521
+ textDecoration: Gi.optional(),
1518
1522
  icon: i.enum(["arrowUp", "arrowDown", "warning", "check", "x"]).optional(),
1519
1523
  dataBar: i.object({ color: i.string(), showValue: i.boolean() }).strict().optional()
1520
1524
  }).strict().optional()
1521
1525
  }).strict()
1522
1526
  )
1523
1527
  }).strict();
1524
- function Sa(e, t) {
1528
+ function Ia(e, t) {
1525
1529
  const n = (r) => {
1526
1530
  if (V(r)) return r.value;
1527
1531
  const l = typeof r == "string" ? Ai(r.trim()) ?? le(r) : le(r);
@@ -1534,11 +1538,11 @@ function Sa(e, t) {
1534
1538
  }, o = n(e), a = n(t);
1535
1539
  return o === null || a === null ? null : ut(o, a);
1536
1540
  }
1537
- function Ia(e, t, n) {
1538
- const o = Ki(e);
1541
+ function ka(e, t, n) {
1542
+ const o = Qi(e);
1539
1543
  if (o === null) return null;
1540
1544
  if (typeof o == "number" && typeof t == "number" && typeof n == "number") {
1541
- const _ = Qi(o, t, n);
1545
+ const _ = Wi(o, t, n);
1542
1546
  return { ratio: _, midpointComparison: Math.sign(_ - 0.5) };
1543
1547
  }
1544
1548
  if ([t, n].some((_) => typeof _ == "number" && !Number.isFinite(_))) return null;
@@ -1556,20 +1560,20 @@ function Ia(e, t, n) {
1556
1560
  const h = m * 2n - u, v = h < 0n ? -1 : h > 0n ? 1 : 0;
1557
1561
  return { ratio: m <= 0n ? 0 : m >= u ? 1 : Number(m * 1000000000n / u) / 1e9, midpointComparison: v };
1558
1562
  }
1559
- function ka(e) {
1563
+ function wa(e) {
1560
1564
  return !!e && typeof e == "object" && !Array.isArray(e);
1561
1565
  }
1562
- function wa(e) {
1566
+ function Aa(e) {
1563
1567
  return e.enabled !== !1;
1564
1568
  }
1565
- function Aa(e) {
1569
+ function xa(e) {
1566
1570
  return e.kind === "topBottom" || e.kind === "colorScale" && e.range === "auto" || e.kind === "dataBar" && e.range === "auto";
1567
1571
  }
1568
- function Gi(e) {
1572
+ function zi(e) {
1569
1573
  return e.columnId;
1570
1574
  }
1571
- function zi(e) {
1572
- const t = [Gi(e.condition)];
1575
+ function Ki(e) {
1576
+ const t = [zi(e.condition)];
1573
1577
  return { validationRefs: [.../* @__PURE__ */ new Set([
1574
1578
  ...t,
1575
1579
  ...e.target.conditionColumnId === void 0 ? [] : [e.target.conditionColumnId],
@@ -1586,10 +1590,10 @@ function le(e) {
1586
1590
  }
1587
1591
  return null;
1588
1592
  }
1589
- function Ki(e) {
1593
+ function Qi(e) {
1590
1594
  return V(e) ? e : le(e);
1591
1595
  }
1592
- function xa(e) {
1596
+ function Fa(e) {
1593
1597
  const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
1594
1598
  for (const o of e)
1595
1599
  V(o) ? n.add(o.value) : t.add(o);
@@ -1597,19 +1601,19 @@ function xa(e) {
1597
1601
  has: (o) => V(o) ? n.has(o.value) : t.has(o)
1598
1602
  };
1599
1603
  }
1600
- function Fa(e, t) {
1604
+ function Ra(e, t) {
1601
1605
  return typeof e == "number" && typeof t == "number" ? Math.sign(e - t) : ut(
1602
1606
  typeof e == "number" ? A(String(e)) : e.value,
1603
1607
  typeof t == "number" ? A(String(t)) : t.value
1604
1608
  );
1605
1609
  }
1606
- function Ra(e) {
1610
+ function Ta(e) {
1607
1611
  return e == null || e === "";
1608
1612
  }
1609
- function Qi(e, t, n) {
1613
+ function Wi(e, t, n) {
1610
1614
  return !Number.isFinite(e) || !Number.isFinite(t) || !Number.isFinite(n) ? 0 : n === t ? e >= n ? 1 : 0 : Math.max(0, Math.min(1, (e - t) / (n - t)));
1611
1615
  }
1612
- function Wi(e) {
1616
+ function Xi(e) {
1613
1617
  switch (e) {
1614
1618
  case "bold":
1615
1619
  return 700;
@@ -1623,16 +1627,16 @@ function Wi(e) {
1623
1627
  return;
1624
1628
  }
1625
1629
  }
1626
- function Ta(e) {
1630
+ function Ma(e) {
1627
1631
  return e ? ht({
1628
- fontWeight: Wi(e.fontWeight),
1632
+ fontWeight: Xi(e.fontWeight),
1629
1633
  fontStyle: e.italic ? "italic" : void 0,
1630
1634
  color: e.textColor,
1631
1635
  backgroundColor: e.backgroundColor,
1632
1636
  textDecoration: e.textDecoration
1633
1637
  }) : {};
1634
1638
  }
1635
- function Ma(...e) {
1639
+ function Da(...e) {
1636
1640
  return Object.assign(
1637
1641
  {},
1638
1642
  ...e.filter((t) => !!t).map(ht)
@@ -1643,7 +1647,7 @@ function ht(e) {
1643
1647
  Object.entries(e).filter(([, t]) => t !== void 0)
1644
1648
  );
1645
1649
  }
1646
- const S = i.string().uuid(), Xi = i.string().min(1), Zi = i.number().int().positive().max(Number.MAX_SAFE_INTEGER), Ji = i.enum([
1650
+ const S = i.string().uuid(), Zi = i.string().min(1), Ji = i.number().int().positive().max(Number.MAX_SAFE_INTEGER), en = i.enum([
1647
1651
  "SUM",
1648
1652
  "COUNT",
1649
1653
  "DISTINCT",
@@ -1652,20 +1656,20 @@ const S = i.string().uuid(), Xi = i.string().min(1), Zi = i.number().int().posit
1652
1656
  "MAX"
1653
1657
  ]), _t = _i.omit({
1654
1658
  aggregate: !0
1655
- }), en = {
1659
+ }), tn = {
1656
1660
  id: S,
1657
1661
  field: _t,
1658
1662
  grain: L.optional()
1659
- }, de = i.object(en).strict(), tn = i.object({
1663
+ }, de = i.object(tn).strict(), nn = i.object({
1660
1664
  id: S,
1661
1665
  kind: i.literal("aggregate"),
1662
1666
  field: _t,
1663
- aggregate: Ji
1664
- }).strict(), nn = i.object({
1667
+ aggregate: en
1668
+ }).strict(), an = i.object({
1665
1669
  id: S,
1666
1670
  kind: i.literal("calculated"),
1667
1671
  definition: ye
1668
- }).strict(), bt = i.discriminatedUnion("kind", [tn, nn]), an = i.discriminatedUnion("kind", [
1672
+ }).strict(), bt = i.discriminatedUnion("kind", [nn, an]), on = i.discriminatedUnion("kind", [
1669
1673
  i.object({ kind: i.literal("member") }).strict(),
1670
1674
  i.object({
1671
1675
  kind: i.literal("measure"),
@@ -1679,15 +1683,15 @@ const S = i.string().uuid(), Xi = i.string().min(1), Zi = i.number().int().posit
1679
1683
  i.object({ kind: i.literal("level") }).strict(),
1680
1684
  i.object({ kind: i.literal("branch"), parent: x }).strict()
1681
1685
  ]),
1682
- target: an,
1686
+ target: on,
1683
1687
  direction: i.enum(["asc", "desc"]),
1684
1688
  nulls: i.enum(["first", "last"])
1685
- }).strict(), on = i.object({
1689
+ }).strict(), sn = i.object({
1686
1690
  id: S,
1687
1691
  axis: Ie,
1688
1692
  levelId: S,
1689
1693
  direction: i.enum(["top", "bottom"]),
1690
- count: Zi,
1694
+ count: Ji,
1691
1695
  measureId: S,
1692
1696
  oppositePath: x,
1693
1697
  others: i.boolean()
@@ -1697,10 +1701,10 @@ const S = i.string().uuid(), Xi = i.string().min(1), Zi = i.number().int().posit
1697
1701
  columns: i.array(de).readonly(),
1698
1702
  measures: i.array(bt).min(1).readonly(),
1699
1703
  filters: ft.optional(),
1700
- joinPlan: qi.optional(),
1701
- relationshipHint: i.object({ relationshipIds: i.array(Xi).optional() }).strict().optional(),
1704
+ joinPlan: Li.optional(),
1705
+ relationshipHint: i.object({ relationshipIds: i.array(Zi).optional() }).strict().optional(),
1702
1706
  sorts: i.array(yt).readonly(),
1703
- rankings: i.array(on).readonly()
1707
+ rankings: i.array(sn).readonly()
1704
1708
  }).strict();
1705
1709
  function St(e) {
1706
1710
  return JSON.stringify([
@@ -1857,10 +1861,10 @@ function kt(e, t) {
1857
1861
  );
1858
1862
  });
1859
1863
  }
1860
- const Y = vt.superRefine(kt), sn = vt.extend({
1864
+ const Y = vt.superRefine(kt), rn = vt.extend({
1861
1865
  rows: i.array(de).readonly(),
1862
1866
  measures: i.array(bt).readonly()
1863
- }), rn = sn.superRefine(kt), ln = Y.innerType().extend({ kind: i.literal("matrix") }), dn = ln.superRefine(({ kind: e, ...t }, n) => {
1867
+ }), ln = rn.superRefine(kt), dn = Y.innerType().extend({ kind: i.literal("matrix") }), un = dn.superRefine(({ kind: e, ...t }, n) => {
1864
1868
  const o = Y.safeParse(t);
1865
1869
  o.success || o.error.issues.forEach((a) => n.addIssue(a));
1866
1870
  }), je = i.object({
@@ -1870,7 +1874,7 @@ const Y = vt.superRefine(kt), sn = vt.extend({
1870
1874
  }).strict(), $e = i.object({
1871
1875
  grand: je,
1872
1876
  levels: i.record(S, je).readonly()
1873
- }).strict(), Ce = gt.shape.rules.element, un = gt.extend({
1877
+ }).strict(), Ce = gt.shape.rules.element, cn = gt.extend({
1874
1878
  rules: i.array(Ce.extend({
1875
1879
  target: Ce.shape.target.extend({
1876
1880
  rowRoles: i.array(Ti).optional()
@@ -1900,13 +1904,13 @@ const Y = vt.superRefine(kt), sn = vt.extend({
1900
1904
  );
1901
1905
  }
1902
1906
  });
1903
- function cn(e, t, n, o, a = []) {
1907
+ function pn(e, t, n, o, a = []) {
1904
1908
  for (const r of e.rules) {
1905
1909
  const l = [...a, "rules", r.id], d = r.target.matrix;
1906
- d && (d.levelId !== void 0 && !t[d.axis].some((c) => c.id === d.levelId) && g(o, [...l, "target", "matrix", "levelId"], "Conditional-format level is not on the selected axis."), d.oppositePath !== void 0 && $(t, d.axis === "rows" ? "columns" : "rows", d.oppositePath, o, [...l, "target", "matrix", "oppositePath"])), zi(r).validationRefs.some((c) => !n.has(c)) && g(o, l, "Conditional rules must reference displayed measures.");
1910
+ d && (d.levelId !== void 0 && !t[d.axis].some((c) => c.id === d.levelId) && g(o, [...l, "target", "matrix", "levelId"], "Conditional-format level is not on the selected axis."), d.oppositePath !== void 0 && $(t, d.axis === "rows" ? "columns" : "rows", d.oppositePath, o, [...l, "target", "matrix", "oppositePath"])), Ki(r).validationRefs.some((c) => !n.has(c)) && g(o, l, "Conditional rules must reference displayed measures.");
1907
1911
  }
1908
1912
  }
1909
- const pn = {
1913
+ const mn = {
1910
1914
  layout: i.discriminatedUnion("kind", [
1911
1915
  i.object({ kind: i.literal("compact") }).strict(),
1912
1916
  i.object({ kind: i.literal("tabular"), repeatLabels: i.boolean() }).strict()
@@ -1917,19 +1921,19 @@ const pn = {
1917
1921
  levelFormats: i.record(S, Me).readonly(),
1918
1922
  measureFormats: i.record(S, Me).readonly(),
1919
1923
  totals: i.object({ rows: $e, columns: $e }).strict(),
1920
- conditionalFormatting: un.optional()
1921
- }, ke = i.object(pn).strict(), mn = i.object({
1924
+ conditionalFormatting: cn.optional()
1925
+ }, ke = i.object(mn).strict(), fn = i.object({
1922
1926
  depth: i.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
1923
1927
  overrides: i.array(
1924
1928
  i.object({ path: x, expanded: i.boolean() }).strict()
1925
1929
  ).readonly()
1926
- }).strict(), Oe = mn.superRefine(
1930
+ }).strict(), Oe = fn.superRefine(
1927
1931
  (e, t) => w(
1928
1932
  e.overrides.map((n) => pt(n.path)),
1929
1933
  t,
1930
1934
  ["overrides"]
1931
1935
  )
1932
- ), fn = { rows: Oe, columns: Oe }, Z = i.object(fn).strict(), gn = Z.extend({ sorts: i.array(yt).readonly() }).strict(), hn = gn.superRefine(
1936
+ ), gn = { rows: Oe, columns: Oe }, Z = i.object(gn).strict(), hn = Z.extend({ sorts: i.array(yt).readonly() }).strict(), _n = hn.superRefine(
1933
1937
  (e, t) => w(e.sorts.map(St), t, ["sorts"])
1934
1938
  );
1935
1939
  function J(e, t) {
@@ -1983,7 +1987,7 @@ function J(e, t) {
1983
1987
  "Use depth to expand/collapse the root."
1984
1988
  );
1985
1989
  }
1986
- r && It(n, r.sorts, t, ["session", "sorts"]), o.conditionalFormatting && cn(
1990
+ r && It(n, r.sorts, t, ["session", "sorts"]), o.conditionalFormatting && pn(
1987
1991
  o.conditionalFormatting,
1988
1992
  n,
1989
1993
  d,
@@ -1991,21 +1995,21 @@ function J(e, t) {
1991
1995
  ["presentation", "conditionalFormatting"]
1992
1996
  );
1993
1997
  }
1994
- const _n = i.object({
1998
+ const bn = i.object({
1995
1999
  spec: Y,
1996
2000
  presentation: ke,
1997
2001
  defaults: Z,
1998
- session: hn.optional()
1999
- }).strict(), Da = _n.superRefine(J), bn = i.object({
2002
+ session: _n.optional()
2003
+ }).strict(), Na = bn.superRefine(J), yn = i.object({
2000
2004
  version: i.literal(1),
2001
2005
  spec: Y,
2002
2006
  presentation: ke,
2003
2007
  defaultView: Z
2004
- }).strict(), yn = bn.superRefine(
2008
+ }).strict(), vn = yn.superRefine(
2005
2009
  (e, t) => J({ ...e, defaults: e.defaultView }, t)
2006
- ), vn = yn.innerType().extend({
2007
- spec: rn
2008
- }), Na = vn.superRefine((e, t) => J({ ...e, defaults: e.defaultView }, t)), Ye = i.object({ spec: Y, presentation: ke }).strict(), Sn = i.union([
2010
+ ), Sn = vn.innerType().extend({
2011
+ spec: ln
2012
+ }), Ea = Sn.superRefine((e, t) => J({ ...e, defaults: e.defaultView }, t)), Ye = i.object({ spec: Y, presentation: ke }).strict(), In = i.union([
2009
2013
  Ye.extend({
2010
2014
  mode: i.literal("layout"),
2011
2015
  format: i.enum(["csv", "xlsx", "pdf"]),
@@ -2015,7 +2019,7 @@ const _n = i.object({
2015
2019
  ])
2016
2020
  }).strict(),
2017
2021
  Ye.extend({ mode: i.literal("flat"), format: i.literal("csv") }).strict()
2018
- ]), Ea = Sn.superRefine(
2022
+ ]), ja = In.superRefine(
2019
2023
  (e, t) => J(
2020
2024
  {
2021
2025
  ...e,
@@ -2027,17 +2031,17 @@ const _n = i.object({
2027
2031
  t
2028
2032
  )
2029
2033
  );
2030
- function ja(e) {
2034
+ function $a(e) {
2031
2035
  return e && "id" in e ? e.id : void 0;
2032
2036
  }
2033
- const In = "SUM";
2037
+ const kn = "SUM";
2034
2038
  function k(e) {
2035
2039
  return typeof e == "string" && e.trim().length > 0;
2036
2040
  }
2037
2041
  function N(e) {
2038
2042
  return k(e) ? e.trim().toLowerCase() : "";
2039
2043
  }
2040
- function $a(e) {
2044
+ function Ca(e) {
2041
2045
  const t = k(e.id) ? e.id.trim() : void 0;
2042
2046
  if (!t) return;
2043
2047
  const n = N(t), o = k(e.table) ? e.table.trim() : void 0;
@@ -2057,7 +2061,7 @@ function wt(e) {
2057
2061
  ...t ? { datasetId: t } : {}
2058
2062
  };
2059
2063
  }
2060
- function Ca(e) {
2064
+ function Oa(e) {
2061
2065
  return e ? e.kind === "semantic" ? !!(k(e.domainId) && (k(e.datasetId) || k(e.datasetName))) : e.kind === "physical" ? k(e.connectionId) && k(e.tableName) : k(e.connectionId) : !1;
2062
2066
  }
2063
2067
  function ue(e) {
@@ -2106,7 +2110,7 @@ function At(e, t) {
2106
2110
  connectionId: e.connectionId || t.connectionId
2107
2111
  });
2108
2112
  }
2109
- function Oa(e) {
2113
+ function Ya(e) {
2110
2114
  const t = [];
2111
2115
  for (const n of e) {
2112
2116
  const o = wt(
@@ -2125,10 +2129,10 @@ function Oa(e) {
2125
2129
  }
2126
2130
  return t;
2127
2131
  }
2128
- function kn(e, t) {
2132
+ function wn(e, t) {
2129
2133
  return e.name === t.name && we(e.source, t.source);
2130
2134
  }
2131
- function Ya(e) {
2135
+ function Pa(e) {
2132
2136
  return [
2133
2137
  e.source ? ue(e.source) : "unknown",
2134
2138
  xt(e),
@@ -2136,14 +2140,14 @@ function Ya(e) {
2136
2140
  ].filter(Boolean).join(":");
2137
2141
  }
2138
2142
  function xt(e) {
2139
- return wn(
2140
- e.aggregate || In
2143
+ return An(
2144
+ e.aggregate || kn
2141
2145
  );
2142
2146
  }
2143
- function wn(e) {
2147
+ function An(e) {
2144
2148
  return e.trim().toUpperCase();
2145
2149
  }
2146
- function Pa(e, t) {
2150
+ function Ba(e, t) {
2147
2151
  return {
2148
2152
  ...e,
2149
2153
  label: e.label || t.label,
@@ -2152,7 +2156,7 @@ function Pa(e, t) {
2152
2156
  source: e.source && t.source ? At(e.source, t.source) : e.source || t.source
2153
2157
  };
2154
2158
  }
2155
- function An(e) {
2159
+ function xn(e) {
2156
2160
  for (let t = 0; t < e.length; t += 1) {
2157
2161
  const n = e[t];
2158
2162
  if (e.some(
@@ -2163,18 +2167,18 @@ function An(e) {
2163
2167
  return !0;
2164
2168
  }
2165
2169
  function Ft(e, t) {
2166
- return kn(e, t);
2170
+ return wn(e, t);
2167
2171
  }
2168
2172
  function Rt(e, t) {
2169
2173
  return Ft(e, t) && C(e) === C(t);
2170
2174
  }
2171
- function xn(e) {
2175
+ function Fn(e) {
2172
2176
  return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${C(e)}). Use different aggregates to request both, or remove one entry.`;
2173
2177
  }
2174
2178
  function Pe(e) {
2175
2179
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
2176
2180
  }
2177
- function Fn(e, t, n) {
2181
+ function Rn(e, t, n) {
2178
2182
  if (e !== void 0) {
2179
2183
  if (!e || typeof e != "object" || Array.isArray(e)) {
2180
2184
  n.push(
@@ -2207,34 +2211,34 @@ function Fn(e, t, n) {
2207
2211
  });
2208
2212
  }
2209
2213
  }
2210
- function Rn(e, t) {
2214
+ function Tn(e, t) {
2211
2215
  return Ae(e, t).length === 1;
2212
2216
  }
2213
- function Tn(e, t) {
2217
+ function Mn(e, t) {
2214
2218
  return Ae(e, t).length === 1;
2215
2219
  }
2216
2220
  function Ae(e, t) {
2217
2221
  return t.filter(
2218
- (o) => Mn(e, o)
2222
+ (o) => Dn(e, o)
2219
2223
  );
2220
2224
  }
2221
- function Mn(e, t) {
2222
- return Dn(e, t) ? e.source ? Ft(t, e) : !0 : !1;
2223
- }
2224
2225
  function Dn(e, t) {
2225
- return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role || Nn(e, t) && C(t) !== C(e));
2226
+ return Nn(e, t) ? e.source ? Ft(t, e) : !0 : !1;
2226
2227
  }
2227
2228
  function Nn(e, t) {
2229
+ return !(t.name !== e.name || e.role !== void 0 && t.role !== void 0 && t.role !== e.role || En(e, t) && C(t) !== C(e));
2230
+ }
2231
+ function En(e, t) {
2228
2232
  return e.role === "measure" || t.role === "measure" || e.aggregate !== void 0 || t.aggregate !== void 0;
2229
2233
  }
2230
2234
  function C(e) {
2231
2235
  return xt(e);
2232
2236
  }
2233
- const En = /^(\d{4})-(\d{2})-(\d{2})$/, Tt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
2237
+ const jn = /^(\d{4})-(\d{2})-(\d{2})$/, Tt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
2234
2238
  function ce(e) {
2235
2239
  if (typeof e != "string")
2236
2240
  return null;
2237
- const t = e.trim(), n = En.exec(t);
2241
+ const t = e.trim(), n = jn.exec(t);
2238
2242
  if (n) {
2239
2243
  const [, v, R, _] = n;
2240
2244
  return Be(v, R, _) ? new Date(Date.UTC(Number(v), Number(R) - 1, Number(_))) : null;
@@ -2243,12 +2247,12 @@ function ce(e) {
2243
2247
  if (!o)
2244
2248
  return null;
2245
2249
  const [, a, r, l, d, c, u = "00", , m] = o;
2246
- if (!Be(a, r, l) || !E(d, 0, 23) || !E(c, 0, 59) || !E(u, 0, 59) || !jn(m))
2250
+ if (!Be(a, r, l) || !E(d, 0, 23) || !E(c, 0, 59) || !E(u, 0, 59) || !$n(m))
2247
2251
  return null;
2248
2252
  const h = new Date(t);
2249
2253
  return Number.isFinite(h.getTime()) ? h : null;
2250
2254
  }
2251
- function Ba(e) {
2255
+ function qa(e) {
2252
2256
  return typeof e != "string" || !Tt.test(e.trim()) ? null : ce(e);
2253
2257
  }
2254
2258
  function Be(e, t, n) {
@@ -2262,7 +2266,7 @@ function E(e, t, n) {
2262
2266
  const o = Number(e);
2263
2267
  return Number.isInteger(o) && o >= t && o <= n;
2264
2268
  }
2265
- function jn(e) {
2269
+ function $n(e) {
2266
2270
  if (e === "Z")
2267
2271
  return !0;
2268
2272
  const t = /^([+-])(\d{2}):(\d{2})$/.exec(e);
@@ -2304,7 +2308,7 @@ function Le(e) {
2304
2308
  }
2305
2309
  return null;
2306
2310
  }
2307
- function $n(e, t, n) {
2311
+ function Cn(e, t, n) {
2308
2312
  if (!f(e)) {
2309
2313
  n.push(
2310
2314
  s(
@@ -2352,7 +2356,7 @@ function xe(e, t, n) {
2352
2356
  )
2353
2357
  );
2354
2358
  }
2355
- function Cn(e, t) {
2359
+ function On(e, t) {
2356
2360
  var o, a;
2357
2361
  if (((o = e.source) == null ? void 0 : o.kind) !== "semantic" && ((a = e.source) == null ? void 0 : a.kind) !== "physical" && t.push(
2358
2362
  s(
@@ -2435,10 +2439,10 @@ function Cn(e, t) {
2435
2439
  )
2436
2440
  );
2437
2441
  }), e.dependencies !== void 0) {
2438
- const r = Yn(
2442
+ const r = Pn(
2439
2443
  e.dependencies
2440
2444
  );
2441
- t.push(...r.errors), r.ok && Bn(e, t);
2445
+ t.push(...r.errors), r.ok && qn(e, t);
2442
2446
  }
2443
2447
  if (e.population !== void 0) {
2444
2448
  const r = e.population;
@@ -2482,7 +2486,7 @@ function Cn(e, t) {
2482
2486
  }
2483
2487
  }
2484
2488
  }
2485
- function On(e, t) {
2489
+ function Yn(e, t) {
2486
2490
  if (!(!("inputs" in e) || e.inputs === void 0)) {
2487
2491
  if (!Array.isArray(e.inputs)) {
2488
2492
  t.push(
@@ -2495,11 +2499,11 @@ function On(e, t) {
2495
2499
  return;
2496
2500
  }
2497
2501
  e.inputs.forEach(
2498
- (n, o) => $n(n, `inputs.${o}`, t)
2502
+ (n, o) => Cn(n, `inputs.${o}`, t)
2499
2503
  );
2500
2504
  }
2501
2505
  }
2502
- function Yn(e, t = "protocol") {
2506
+ function Pn(e, t = "protocol") {
2503
2507
  const n = [];
2504
2508
  if (!f(e))
2505
2509
  return n.push(
@@ -2549,9 +2553,9 @@ function Yn(e, t = "protocol") {
2549
2553
  )
2550
2554
  );
2551
2555
  }
2552
- return t === "dashboard" && Pn(o, n), { ok: n.length === 0, errors: n, warnings: [] };
2556
+ return t === "dashboard" && Bn(o, n), { ok: n.length === 0, errors: n, warnings: [] };
2553
2557
  }
2554
- function Pn(e, t) {
2558
+ function Bn(e, t) {
2555
2559
  const { mode: n, includeInputIds: o, excludeInputIds: a } = e;
2556
2560
  n === void 0 && t.push(
2557
2561
  s(
@@ -2585,7 +2589,7 @@ function Pn(e, t) {
2585
2589
  )
2586
2590
  );
2587
2591
  }
2588
- function Bn(e, t) {
2592
+ function qn(e, t) {
2589
2593
  var a, r, l;
2590
2594
  const n = new Set(
2591
2595
  Array.isArray(e.inputs) ? e.inputs.map((d) => f(d) ? d.inputId : void 0).filter((d) => typeof d == "string") : []
@@ -2610,8 +2614,8 @@ function Bn(e, t) {
2610
2614
  function oe(e, t, n, o) {
2611
2615
  e !== void 0 && (!Array.isArray(e) || e.some((a) => !p(a))) && n.push(s("invalid_input_options_dependencies", o, t));
2612
2616
  }
2613
- const qn = new Set(G);
2614
- function Ln(e, t, n) {
2617
+ const Ln = new Set(G);
2618
+ function Un(e, t, n) {
2615
2619
  if (f(e) && e.type === "temporal_bucket") {
2616
2620
  n.push(
2617
2621
  s(
@@ -2650,7 +2654,7 @@ function Ue(e, t, n) {
2650
2654
  required: !0
2651
2655
  });
2652
2656
  }
2653
- function Un(e, t, n) {
2657
+ function Vn(e, t, n) {
2654
2658
  if (!f(e)) {
2655
2659
  n.push(
2656
2660
  s(
@@ -2673,9 +2677,9 @@ function Un(e, t, n) {
2673
2677
  "Result calculation output dataType must be string, number, boolean, date, datetime, or unknown.",
2674
2678
  `${t}.dataType`
2675
2679
  )
2676
- ), Ln(e.format, `${t}.format`, n);
2680
+ ), Un(e.format, `${t}.format`, n);
2677
2681
  }
2678
- function Vn(e, t) {
2682
+ function Hn(e, t) {
2679
2683
  if (e.analysis === void 0)
2680
2684
  return;
2681
2685
  if (!f(e.analysis)) {
@@ -2774,7 +2778,7 @@ function pe(e, t, n) {
2774
2778
  }
2775
2779
  return;
2776
2780
  }
2777
- (typeof e.unit != "string" || !qn.has(e.unit)) && n.push(
2781
+ (typeof e.unit != "string" || !Ln.has(e.unit)) && n.push(
2778
2782
  s(
2779
2783
  "invalid_time_window",
2780
2784
  `Time window unit must be one of: ${G.join(", ")}.`,
@@ -2897,7 +2901,7 @@ function me(e, t, n) {
2897
2901
  });
2898
2902
  }
2899
2903
  }
2900
- function qa(e) {
2904
+ function La(e) {
2901
2905
  const t = [];
2902
2906
  if (!f(e))
2903
2907
  return t.push(
@@ -2924,7 +2928,7 @@ function qa(e) {
2924
2928
  "Result calculation kind must be percent_of_total, rank, running_total, or previous_row_delta.",
2925
2929
  "kind"
2926
2930
  )
2927
- ), Ue(e.input, "input", t), Un(e.output, "output", t), e.kind === "percent_of_total") {
2931
+ ), Ue(e.input, "input", t), Vn(e.output, "output", t), e.kind === "percent_of_total") {
2928
2932
  const n = e.denominator;
2929
2933
  n !== void 0 && (f(n) ? n.scope === "population" ? (b(n.metric, "denominator.metric", t, {
2930
2934
  required: !0
@@ -2975,7 +2979,7 @@ function Mt(e) {
2975
2979
  ]
2976
2980
  };
2977
2981
  if (e.kind === "matrix") {
2978
- const a = dn.safeParse(e);
2982
+ const a = un.safeParse(e);
2979
2983
  return a.success || t.push(...a.error.issues.map((r) => s("invalid_matrix_intent", r.message, r.path.join(".")))), { ok: t.length === 0, errors: t, warnings: n, repairHints: Ve(t) };
2980
2984
  }
2981
2985
  if (e.version !== void 0 && e.version !== 1 && t.push(
@@ -2984,7 +2988,7 @@ function Mt(e) {
2984
2988
  "Analytics intent version must be 1.",
2985
2989
  "version"
2986
2990
  )
2987
- ), he(e.source, "source", t), Hn(e, t), On(e, t), "relationshipHint" in e && e.relationshipHint !== void 0 && xe(
2991
+ ), he(e.source, "source", t), Gn(e, t), Yn(e, t), "relationshipHint" in e && e.relationshipHint !== void 0 && xe(
2988
2992
  e.relationshipHint,
2989
2993
  "relationshipHint",
2990
2994
  t
@@ -3010,7 +3014,7 @@ function Mt(e) {
3010
3014
  b(r, `measures.${l}`, t, {
3011
3015
  required: !0
3012
3016
  });
3013
- }), a.length > 0 && !An(a)) {
3017
+ }), a.length > 0 && !xn(a)) {
3014
3018
  const r = a.find(
3015
3019
  (l, d) => a.some(
3016
3020
  (c, u) => u !== d && Rt(c, l)
@@ -3019,7 +3023,7 @@ function Mt(e) {
3019
3023
  r && t.push(
3020
3024
  s(
3021
3025
  "duplicate_measure",
3022
- xn(r),
3026
+ Fn(r),
3023
3027
  "measures"
3024
3028
  )
3025
3029
  );
@@ -3035,7 +3039,7 @@ function Mt(e) {
3035
3039
  )
3036
3040
  ), e.primaryMeasure !== void 0 && (b(e.primaryMeasure, "primaryMeasure", t, {
3037
3041
  required: !0
3038
- }), f(e.primaryMeasure) && p(e.primaryMeasure.name) && a.length > 0 && !Rn(
3042
+ }), f(e.primaryMeasure) && p(e.primaryMeasure.name) && a.length > 0 && !Tn(
3039
3043
  e.primaryMeasure,
3040
3044
  a
3041
3045
  ) && t.push(
@@ -3091,7 +3095,7 @@ function Mt(e) {
3091
3095
  (l) => f(l) && p(l.name)
3092
3096
  ) : []
3093
3097
  ];
3094
- r.length > 0 && !Tn(
3098
+ r.length > 0 && !Mn(
3095
3099
  e.orderBy.field,
3096
3100
  r
3097
3101
  ) && t.push(
@@ -3103,7 +3107,7 @@ function Mt(e) {
3103
3107
  );
3104
3108
  }
3105
3109
  }
3106
- Vn(e, t);
3110
+ Hn(e, t);
3107
3111
  } else if (e.kind === "records") {
3108
3112
  if (!Array.isArray(e.fields) || e.fields.length === 0 ? t.push(
3109
3113
  s(
@@ -3185,7 +3189,7 @@ function Mt(e) {
3185
3189
  );
3186
3190
  });
3187
3191
  }
3188
- } else e.kind === "inputOptions" ? Cn(e, t) : e.kind === "sql" ? (((o = e.source) == null ? void 0 : o.kind) !== "sql" && t.push(
3192
+ } else e.kind === "inputOptions" ? On(e, t) : e.kind === "sql" ? (((o = e.source) == null ? void 0 : o.kind) !== "sql" && t.push(
3189
3193
  s(
3190
3194
  "invalid_sql_source",
3191
3195
  "SQL analytics intent must use a SQL execution source.",
@@ -3193,7 +3197,7 @@ function Mt(e) {
3193
3197
  )
3194
3198
  ), p(e.sql) || t.push(
3195
3199
  s("missing_sql", "SQL analytics intent needs SQL text.", "sql")
3196
- ), Fn(
3200
+ ), Rn(
3197
3201
  e.defaultParameters,
3198
3202
  "defaultParameters",
3199
3203
  t
@@ -3213,7 +3217,7 @@ function Mt(e) {
3213
3217
  repairHints: Ve(t)
3214
3218
  };
3215
3219
  }
3216
- function Hn(e, t) {
3220
+ function Gn(e, t) {
3217
3221
  if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
3218
3222
  if (!Array.isArray(e.derivedFields)) {
3219
3223
  t.push(
@@ -3237,7 +3241,7 @@ function Hn(e, t) {
3237
3241
  });
3238
3242
  }
3239
3243
  }
3240
- function Gn(e) {
3244
+ function zn(e) {
3241
3245
  const t = [], n = [];
3242
3246
  if (!e || typeof e != "object")
3243
3247
  return {
@@ -3312,7 +3316,7 @@ function Gn(e) {
3312
3316
  repairHints: Dt(t)
3313
3317
  };
3314
3318
  }
3315
- function La(e) {
3319
+ function Ua(e) {
3316
3320
  const t = [], n = [];
3317
3321
  if (!e || typeof e != "object")
3318
3322
  return {
@@ -3340,7 +3344,7 @@ function La(e) {
3340
3344
  "kind"
3341
3345
  )
3342
3346
  );
3343
- const o = Gn(
3347
+ const o = zn(
3344
3348
  e.operationIntent
3345
3349
  );
3346
3350
  return t.push(...o.errors), n.push(...o.warnings), Array.isArray(e.plannedToolCalls) || t.push(
@@ -3450,7 +3454,7 @@ function Ve(e) {
3450
3454
  }
3451
3455
  }).filter((t) => !!t);
3452
3456
  }
3453
- function zn(e, t, n, o) {
3457
+ function Kn(e, t, n, o) {
3454
3458
  if (!e || typeof e != "object") {
3455
3459
  n.push(
3456
3460
  s("invalid_view", "Dashboard view must be an object.", t)
@@ -3514,7 +3518,7 @@ function zn(e, t, n, o) {
3514
3518
  )
3515
3519
  );
3516
3520
  }
3517
- function Ua(e) {
3521
+ function Va(e) {
3518
3522
  const t = [], n = [];
3519
3523
  if (!e || typeof e != "object")
3520
3524
  return {
@@ -3607,7 +3611,7 @@ function Ua(e) {
3607
3611
  continue;
3608
3612
  }
3609
3613
  for (const [h, v] of u.views.entries())
3610
- zn(
3614
+ Kn(
3611
3615
  v,
3612
3616
  `${m}.views.${h}`,
3613
3617
  t,
@@ -3617,149 +3621,150 @@ function Ua(e) {
3617
3621
  return { ok: t.length === 0, errors: t, warnings: n };
3618
3622
  }
3619
3623
  export {
3620
- G as $,
3621
- _t as A,
3622
- de as B,
3624
+ Re as $,
3625
+ en as A,
3626
+ _t as B,
3623
3627
  re as C,
3624
3628
  Ni as D,
3625
- bt as E,
3626
- Mi as F,
3627
- x as G,
3628
- ma as H,
3629
- an as I,
3630
- yt as J,
3631
- on as K,
3629
+ de as E,
3630
+ bt as F,
3631
+ Mi as G,
3632
+ x as H,
3633
+ fa as I,
3634
+ on as J,
3635
+ yt as K,
3632
3636
  Di as L,
3633
- pt as M,
3634
- Y as N,
3635
- je as O,
3636
- Ei as P,
3637
- ke as Q,
3638
- Xn as R,
3639
- Oe as S,
3640
- Zn as T,
3641
- Z as U,
3642
- hn as V,
3643
- Ea as W,
3644
- be as X,
3645
- jt as Y,
3646
- Qn as Z,
3647
- Re as _,
3648
- ha as a,
3649
- Ri as a$,
3650
- Wn as a0,
3651
- $t as a1,
3652
- Jn as a2,
3653
- Ot as a3,
3654
- Yt as a4,
3655
- ce as a5,
3656
- Yn as a6,
3657
- qa as a7,
3658
- Mt as a8,
3659
- Gn as a9,
3660
- Ge as aA,
3661
- ze as aB,
3662
- Ke as aC,
3663
- Qe as aD,
3664
- We as aE,
3665
- ea as aF,
3637
+ sn as M,
3638
+ pt as N,
3639
+ Y as O,
3640
+ ji as P,
3641
+ je as Q,
3642
+ Zn as R,
3643
+ ke as S,
3644
+ Jn as T,
3645
+ Oe as U,
3646
+ Z as V,
3647
+ _n as W,
3648
+ ja as X,
3649
+ be as Y,
3650
+ jt as Z,
3651
+ Wn as _,
3652
+ _a as a,
3653
+ q as a$,
3654
+ G as a0,
3655
+ Xn as a1,
3656
+ $t as a2,
3657
+ ea as a3,
3658
+ Ot as a4,
3659
+ Yt as a5,
3660
+ ce as a6,
3661
+ Pn as a7,
3662
+ La as a8,
3663
+ Mt as a9,
3664
+ Gt as aA,
3665
+ Ge as aB,
3666
+ ze as aC,
3667
+ Ke as aD,
3668
+ Qe as aE,
3669
+ We as aF,
3666
3670
  ta as aG,
3667
- j as aH,
3668
- ia as aI,
3671
+ ia as aH,
3672
+ j as aI,
3669
3673
  na as aJ,
3670
- Te as aK,
3671
- aa as aL,
3674
+ aa as aK,
3675
+ Te as aL,
3672
3676
  oa as aM,
3673
3677
  sa as aN,
3674
- Jt as aO,
3675
- ei as aP,
3676
- ra as aQ,
3678
+ ra as aO,
3679
+ Jt as aP,
3680
+ ei as aQ,
3677
3681
  la as aR,
3678
- ja as aS,
3682
+ da as aS,
3679
3683
  $a as aT,
3680
- T as aU,
3681
- wt as aV,
3682
- we as aW,
3683
- At as aX,
3684
- Ya as aY,
3685
- ct as aZ,
3686
- q as a_,
3687
- La as aa,
3684
+ Ca as aU,
3685
+ T as aV,
3686
+ wt as aW,
3687
+ we as aX,
3688
+ At as aY,
3689
+ Pa as aZ,
3690
+ ct as a_,
3691
+ zn as aa,
3688
3692
  Ua as ab,
3689
- et as ac,
3690
- ve as ad,
3691
- bi as ae,
3692
- yi as af,
3693
- nt as ag,
3694
- ki as ah,
3695
- wi as ai,
3696
- st as aj,
3697
- rt as ak,
3698
- Ne as al,
3699
- dt as am,
3700
- da as an,
3693
+ Va as ac,
3694
+ et as ad,
3695
+ ve as ae,
3696
+ bi as af,
3697
+ yi as ag,
3698
+ nt as ah,
3699
+ ki as ai,
3700
+ wi as aj,
3701
+ st as ak,
3702
+ rt as al,
3703
+ Ne as am,
3704
+ dt as an,
3701
3705
  ua as ao,
3702
- Bt as ap,
3703
- O as aq,
3704
- F as ar,
3705
- L as as,
3706
- ee as at,
3707
- W as au,
3708
- Vt as av,
3709
- fe as aw,
3710
- ge as ax,
3711
- He as ay,
3712
- Gt as az,
3713
- _a as b,
3714
- V as b0,
3715
- pa as b1,
3716
- A as b2,
3717
- Ai as b3,
3718
- ca as b4,
3719
- ut as b5,
3720
- $ as b6,
3721
- Me as b7,
3722
- zi as b8,
3723
- un as b9,
3724
- ka as ba,
3725
- Li as bb,
3726
- Ma as bc,
3727
- Ta as bd,
3728
- wa as be,
3706
+ ca as ap,
3707
+ Bt as aq,
3708
+ O as ar,
3709
+ F as as,
3710
+ L as at,
3711
+ ee as au,
3712
+ W as av,
3713
+ Vt as aw,
3714
+ fe as ax,
3715
+ ge as ay,
3716
+ He as az,
3717
+ ba as b,
3718
+ Ri as b0,
3719
+ V as b1,
3720
+ ma as b2,
3721
+ A as b3,
3722
+ Ai as b4,
3723
+ pa as b5,
3724
+ ut as b6,
3725
+ $ as b7,
3726
+ Me as b8,
3727
+ Ki as b9,
3728
+ cn as ba,
3729
+ wa as bb,
3730
+ Ui as bc,
3731
+ Da as bd,
3732
+ Ma as be,
3729
3733
  Aa as bf,
3730
- Gi as bg,
3731
- Ki as bh,
3732
- Fa as bi,
3733
- xa as bj,
3734
- Ra as bk,
3735
- Sa as bl,
3736
- le as bm,
3737
- Ia as bn,
3738
- cn as bo,
3739
- ye as bp,
3740
- ii as bq,
3734
+ xa as bg,
3735
+ zi as bh,
3736
+ Qi as bi,
3737
+ Ra as bj,
3738
+ Fa as bk,
3739
+ Ta as bl,
3740
+ Ia as bm,
3741
+ le as bn,
3742
+ ka as bo,
3743
+ pn as bp,
3744
+ ye as bq,
3745
+ ii as br,
3741
3746
  ya as c,
3742
- va as d,
3743
- Pt as e,
3744
- xt as f,
3745
- fa as g,
3746
- ba as h,
3747
- ga as i,
3748
- St as j,
3749
- ue as k,
3750
- Na as l,
3751
- dn as m,
3752
- yn as n,
3753
- Oa as o,
3754
- Pa as p,
3755
- Ct as q,
3756
- rn as r,
3757
- kn as s,
3747
+ Sa as d,
3748
+ Ei as e,
3749
+ Pt as f,
3750
+ ga as g,
3751
+ va as h,
3752
+ ha as i,
3753
+ xt as j,
3754
+ St as k,
3755
+ ue as l,
3756
+ un as m,
3757
+ Ea as n,
3758
+ vn as o,
3759
+ Ba as p,
3760
+ Ya as q,
3761
+ Ct as r,
3762
+ wn as s,
3758
3763
  se as t,
3759
- Da as u,
3760
- Ba as v,
3761
- Ca as w,
3762
- Ti as x,
3763
- Ie as y,
3764
- Ji as z
3764
+ ln as u,
3765
+ Na as v,
3766
+ qa as w,
3767
+ Oa as x,
3768
+ Ti as y,
3769
+ Ie as z
3765
3770
  };