@sisense/sdk-ui 2.16.1 → 2.17.0

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 (60) hide show
  1. package/dist/ai.cjs +54 -54
  2. package/dist/ai.js +779 -741
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +410 -379
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{derive-chart-family-d7eaC45K.cjs → derive-chart-family-B_cR1yhw.cjs} +3 -3
  8. package/dist/{derive-chart-family-DLwnWblo.js → derive-chart-family-DkuTQGOE.js} +333 -333
  9. package/dist/{dimensions-BUWtZxix.cjs → dimensions-DI9h9IJH.cjs} +1 -1
  10. package/dist/{dimensions-DvDgZ8RW.js → dimensions-Gma5tFmd.js} +1 -1
  11. package/dist/execute-query-CdhSHTTA.cjs +1 -0
  12. package/dist/{execute-query-CFK2R_1S.js → execute-query-l7jejslh.js} +867 -865
  13. package/dist/index.cjs +970 -246
  14. package/dist/index.js +70584 -18085
  15. package/dist/index.umd.js +1269 -1267
  16. package/dist/packages/sdk-ui/src/ai/get-nlg-insights-from-widget.d.ts +46 -0
  17. package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -0
  18. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/common.d.ts +2 -1
  19. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/process-function/filter-processors.d.ts +0 -9
  20. package/dist/packages/sdk-ui/src/analytics-composer/nlq-v3-translator/types.d.ts +1 -1
  21. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +2 -2
  22. package/dist/packages/sdk-ui/src/api/rest-api.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/app/client-application.d.ts +5 -5
  24. package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +3 -4
  25. package/dist/packages/sdk-ui/src/dashboard/hooks/use-jtd.d.ts +1 -2
  26. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +78 -0
  27. package/dist/packages/sdk-ui/src/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +23 -0
  28. package/dist/packages/sdk-ui/src/data-source-dimensional-model/index.d.ts +2 -0
  29. package/dist/packages/sdk-ui/src/index.d.ts +1 -1
  30. package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/widget-model-translator.d.ts +4 -1
  31. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +2 -1
  32. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +2 -1
  33. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-totals-formatter.d.ts +1 -1
  34. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +2 -1
  35. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +1 -1
  36. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-get-pivot-table-query.d.ts +1 -1
  37. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-builder.d.ts +1 -1
  38. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-client.d.ts +8 -0
  39. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-loading.d.ts +2 -1
  40. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-pivot-data-service.d.ts +2 -1
  41. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +1 -1
  42. package/dist/packages/sdk-ui/src/pivot-table/pivot-table.d.ts +32 -2
  43. package/dist/packages/sdk-ui/src/pivot-table/sorting-utils.d.ts +1 -1
  44. package/dist/packages/sdk-ui/src/props.d.ts +11 -0
  45. package/dist/packages/sdk-ui/src/query-execution/use-execute-pivot-query.d.ts +0 -1
  46. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +1 -1
  47. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +2 -2
  48. package/dist/packages/sdk-ui/src/types.d.ts +40 -25
  49. package/dist/packages/sdk-ui/src/widgets/pivot-table-widget.d.ts +19 -1
  50. package/dist/{types-Clbnx4mQ.cjs → types-Hki4GrUY.cjs} +1 -1
  51. package/dist/{types-D1mqt0Mg.js → types-ofTjqFFK.js} +1 -1
  52. package/dist/use-common-filters-Bh4KYWy_.cjs +604 -0
  53. package/dist/use-common-filters-D5yiZCTg.js +56547 -0
  54. package/dist/{widget-composer-Dhl_nmhq.js → widget-composer-By61s921.js} +3 -3
  55. package/dist/{widget-composer-BaOTPn5w.cjs → widget-composer-BzzTf8UH.cjs} +1 -1
  56. package/package.json +8 -7
  57. package/dist/execute-query-CB4XfUng.cjs +0 -1
  58. package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +0 -17
  59. package/dist/use-common-filters-CCeRLdGB.js +0 -103405
  60. package/dist/use-common-filters-DOn2HdBv.cjs +0 -1325
@@ -1,20 +1,20 @@
1
- var _e = Object.defineProperty, Le = Object.defineProperties;
2
- var Ve = Object.getOwnPropertyDescriptors;
3
- var le = Object.getOwnPropertySymbols;
4
- var Ue = Object.prototype.hasOwnProperty, Je = Object.prototype.propertyIsEnumerable;
5
- var ce = (e, r, t) => r in e ? _e(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, h = (e, r) => {
1
+ var Ve = Object.defineProperty, Ue = Object.defineProperties;
2
+ var Je = Object.getOwnPropertyDescriptors;
3
+ var ue = Object.getOwnPropertySymbols;
4
+ var je = Object.prototype.hasOwnProperty, We = Object.prototype.propertyIsEnumerable;
5
+ var le = (e, r, t) => r in e ? Ve(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, h = (e, r) => {
6
6
  for (var t in r || (r = {}))
7
- Ue.call(r, t) && ce(e, t, r[t]);
8
- if (le)
9
- for (var t of le(r))
10
- Je.call(r, t) && ce(e, t, r[t]);
7
+ je.call(r, t) && le(e, t, r[t]);
8
+ if (ue)
9
+ for (var t of ue(r))
10
+ We.call(r, t) && le(e, t, r[t]);
11
11
  return e;
12
- }, q = (e, r) => Le(e, Ve(r));
13
- import { f as We, J as je } from "../types-D1mqt0Mg.js";
14
- import { b as si, E as ni, a as ai, i as oi, e as ui, d as li } from "../types-D1mqt0Mg.js";
15
- import { bW as Ke, bB as Qe, bX as Ye, bY as He, bZ as Xe, av as ee, b_ as Ze, au as Ge, b$ as ve, b6 as er, aw as rr, c0 as tr, b9 as ir, b7 as sr, aI as nr, b5 as ar, b8 as or, e as ur, d as lr, l as cr, c1 as fr, c2 as dr, c3 as yr, c4 as pr, c5 as mr, c6 as gr, c7 as br, c8 as hr, c9 as Fr, ca as qr, cb as wr, at as Er, cc as Ar, cd as xr, S as Cr, i as $r, s as Dr, c as K, M as N, ce as Mr, cf as Rr, cg as Sr, ch as zr, aE as Nr, am as fe, al as Or, ci as Tr, x as Br, w as Pr } from "../execute-query-CFK2R_1S.js";
16
- import { i as kr, b as Ir, D as _r, d as Lr } from "../dimensions-DvDgZ8RW.js";
17
- class Vr {
12
+ }, q = (e, r) => Ue(e, Je(r));
13
+ import { f as Ke, J as Qe } from "../types-ofTjqFFK.js";
14
+ import { b as oi, E as ui, a as li, i as ci, e as fi, d as di } from "../types-ofTjqFFK.js";
15
+ import { bX as Ye, bC as He, bY as Xe, bZ as Ze, b_ as Ge, aw as G, b$ as ve, av as er, c0 as rr, b7 as tr, ax as ir, c1 as sr, ba as nr, b8 as ar, aJ as or, b6 as ur, b9 as lr, e as cr, d as fr, l as dr, c2 as pr, c3 as yr, c4 as mr, c5 as gr, c6 as br, c7 as hr, c8 as Fr, c9 as qr, ca as wr, cb as Er, cc as Ar, au as xr, cd as Cr, ce as $r, S as Dr, i as Mr, s as ge, c as j, M as z, cf as Rr, cg as Nr, ch as Sr, ci as zr, aF as Or, an as ce, am as Tr, cj as Br, x as Pr, w as kr } from "../execute-query-l7jejslh.js";
16
+ import { i as Ir, b as _r, D as Lr, d as Vr, a as Ur } from "../dimensions-Gma5tFmd.js";
17
+ class Jr {
18
18
  constructor() {
19
19
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
20
20
  }
@@ -33,7 +33,7 @@ class Vr {
33
33
  }
34
34
  class be {
35
35
  constructor(r) {
36
- this.generateIdentifier = r, this.kv = new Vr();
36
+ this.generateIdentifier = r, this.kv = new Jr();
37
37
  }
38
38
  register(r, t) {
39
39
  this.kv.getByValue(r) || (t || (t = this.generateIdentifier(r)), this.kv.set(t, r));
@@ -48,7 +48,7 @@ class be {
48
48
  return this.kv.getByKey(r);
49
49
  }
50
50
  }
51
- class Ur extends be {
51
+ class jr extends be {
52
52
  constructor() {
53
53
  super((r) => r.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
54
54
  }
@@ -59,7 +59,7 @@ class Ur extends be {
59
59
  return this.classToAllowedProps.get(r);
60
60
  }
61
61
  }
62
- function Jr(e) {
62
+ function Wr(e) {
63
63
  if ("values" in Object)
64
64
  return Object.values(e);
65
65
  const r = [];
@@ -67,8 +67,8 @@ function Jr(e) {
67
67
  e.hasOwnProperty(t) && r.push(e[t]);
68
68
  return r;
69
69
  }
70
- function Wr(e, r) {
71
- const t = Jr(e);
70
+ function Kr(e, r) {
71
+ const t = Wr(e);
72
72
  if ("find" in t)
73
73
  return t.find(r);
74
74
  const i = t;
@@ -81,17 +81,17 @@ function Wr(e, r) {
81
81
  function O(e, r) {
82
82
  Object.entries(e).forEach(([t, i]) => r(i, t));
83
83
  }
84
- function V(e, r) {
84
+ function L(e, r) {
85
85
  return e.indexOf(r) !== -1;
86
86
  }
87
- function de(e, r) {
87
+ function fe(e, r) {
88
88
  for (let t = 0; t < e.length; t++) {
89
89
  const i = e[t];
90
90
  if (r(i))
91
91
  return i;
92
92
  }
93
93
  }
94
- class jr {
94
+ class Qr {
95
95
  constructor() {
96
96
  this.transfomers = {};
97
97
  }
@@ -99,13 +99,13 @@ class jr {
99
99
  this.transfomers[r.name] = r;
100
100
  }
101
101
  findApplicable(r) {
102
- return Wr(this.transfomers, (t) => t.isApplicable(r));
102
+ return Kr(this.transfomers, (t) => t.isApplicable(r));
103
103
  }
104
104
  findByName(r) {
105
105
  return this.transfomers[r];
106
106
  }
107
107
  }
108
- const Kr = (e) => Object.prototype.toString.call(e).slice(8, -1), he = (e) => typeof e == "undefined", Qr = (e) => e === null, k = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, X = (e) => k(e) && Object.keys(e).length === 0, $ = (e) => Array.isArray(e), Yr = (e) => typeof e == "string", Hr = (e) => typeof e == "number" && !isNaN(e), Xr = (e) => typeof e == "boolean", Zr = (e) => e instanceof RegExp, I = (e) => e instanceof Map, _ = (e) => e instanceof Set, Fe = (e) => Kr(e) === "Symbol", Gr = (e) => e instanceof Date && !isNaN(e.valueOf()), vr = (e) => e instanceof Error, ye = (e) => typeof e == "number" && isNaN(e), et = (e) => Xr(e) || Qr(e) || he(e) || Hr(e) || Yr(e) || Fe(e), rt = (e) => typeof e == "bigint", tt = (e) => e === 1 / 0 || e === -1 / 0, it = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), st = (e) => e instanceof URL, qe = (e) => e.replace(/\./g, "\\."), Q = (e) => e.map(String).map(qe).join("."), P = (e) => {
108
+ const Yr = (e) => Object.prototype.toString.call(e).slice(8, -1), he = (e) => typeof e == "undefined", Hr = (e) => e === null, P = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Y = (e) => P(e) && Object.keys(e).length === 0, $ = (e) => Array.isArray(e), Xr = (e) => typeof e == "string", Zr = (e) => typeof e == "number" && !isNaN(e), Gr = (e) => typeof e == "boolean", vr = (e) => e instanceof RegExp, k = (e) => e instanceof Map, I = (e) => e instanceof Set, Fe = (e) => Yr(e) === "Symbol", et = (e) => e instanceof Date && !isNaN(e.valueOf()), rt = (e) => e instanceof Error, de = (e) => typeof e == "number" && isNaN(e), tt = (e) => Gr(e) || Hr(e) || he(e) || Zr(e) || Xr(e) || Fe(e), it = (e) => typeof e == "bigint", st = (e) => e === 1 / 0 || e === -1 / 0, nt = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), at = (e) => e instanceof URL, qe = (e) => e.replace(/\./g, "\\."), W = (e) => e.map(String).map(qe).join("."), B = (e) => {
109
109
  const r = [];
110
110
  let t = "";
111
111
  for (let s = 0; s < e.length; s++) {
@@ -134,9 +134,9 @@ function E(e, r, t, i) {
134
134
  const we = [
135
135
  E(he, "undefined", () => null, () => {
136
136
  }),
137
- E(rt, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
138
- E(Gr, "Date", (e) => e.toISOString(), (e) => new Date(e)),
139
- E(vr, "Error", (e, r) => {
137
+ E(it, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
138
+ E(et, "Date", (e) => e.toISOString(), (e) => new Date(e)),
139
+ E(rt, "Error", (e, r) => {
140
140
  const t = {
141
141
  name: e.name,
142
142
  message: e.message
@@ -150,24 +150,24 @@ const we = [
150
150
  t[i] = e[i];
151
151
  }), t;
152
152
  }),
153
- E(Zr, "regexp", (e) => "" + e, (e) => {
153
+ E(vr, "regexp", (e) => "" + e, (e) => {
154
154
  const r = e.slice(1, e.lastIndexOf("/")), t = e.slice(e.lastIndexOf("/") + 1);
155
155
  return new RegExp(r, t);
156
156
  }),
157
157
  E(
158
- _,
158
+ I,
159
159
  "set",
160
160
  // (sets only exist in es6+)
161
161
  // eslint-disable-next-line es5/no-es6-methods
162
162
  (e) => [...e.values()],
163
163
  (e) => new Set(e)
164
164
  ),
165
- E(I, "map", (e) => [...e.entries()], (e) => new Map(e)),
166
- E((e) => ye(e) || tt(e), "number", (e) => ye(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
165
+ E(k, "map", (e) => [...e.entries()], (e) => new Map(e)),
166
+ E((e) => de(e) || st(e), "number", (e) => de(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
167
167
  E((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
168
- E(st, "URL", (e) => e.toString(), (e) => new URL(e))
168
+ E(at, "URL", (e) => e.toString(), (e) => new URL(e))
169
169
  ];
170
- function U(e, r, t, i) {
170
+ function V(e, r, t, i) {
171
171
  return {
172
172
  isApplicable: e,
173
173
  annotation: r,
@@ -175,12 +175,12 @@ function U(e, r, t, i) {
175
175
  untransform: i
176
176
  };
177
177
  }
178
- const Ee = U((e, r) => Fe(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
178
+ const Ee = V((e, r) => Fe(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
179
179
  const i = t.symbolRegistry.getValue(r[1]);
180
180
  if (!i)
181
181
  throw new Error("Trying to deserialize unknown symbol");
182
182
  return i;
183
- }), nt = [
183
+ }), ot = [
184
184
  Int8Array,
185
185
  Uint8Array,
186
186
  Int16Array,
@@ -190,8 +190,8 @@ const Ee = U((e, r) => Fe(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r)
190
190
  Float32Array,
191
191
  Float64Array,
192
192
  Uint8ClampedArray
193
- ].reduce((e, r) => (e[r.name] = r, e), {}), Ae = U(it, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
194
- const t = nt[r[1]];
193
+ ].reduce((e, r) => (e[r.name] = r, e), {}), Ae = V(nt, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
194
+ const t = ot[r[1]];
195
195
  if (!t)
196
196
  throw new Error("Trying to deserialize unknown typed array");
197
197
  return new t(e);
@@ -199,7 +199,7 @@ const Ee = U((e, r) => Fe(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r)
199
199
  function xe(e, r) {
200
200
  return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
201
201
  }
202
- const Ce = U(xe, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
202
+ const Ce = V(xe, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
203
203
  const t = r.classRegistry.getAllowedProps(e.constructor);
204
204
  if (!t)
205
205
  return h({}, e);
@@ -212,19 +212,19 @@ const Ce = U(xe, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor
212
212
  if (!i)
213
213
  throw new Error(`Trying to deserialize unknown class '${r[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
214
214
  return Object.assign(Object.create(i.prototype), e);
215
- }), $e = U((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
215
+ }), $e = V((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
216
216
  const i = t.customTransformerRegistry.findByName(r[1]);
217
217
  if (!i)
218
218
  throw new Error("Trying to deserialize unknown custom value");
219
219
  return i.deserialize(e);
220
- }), at = [Ce, Ee, $e, Ae], pe = (e, r) => {
221
- const t = de(at, (s) => s.isApplicable(e, r));
220
+ }), ut = [Ce, Ee, $e, Ae], pe = (e, r) => {
221
+ const t = fe(ut, (s) => s.isApplicable(e, r));
222
222
  if (t)
223
223
  return {
224
224
  value: t.transform(e, r),
225
225
  type: t.annotation(e, r)
226
226
  };
227
- const i = de(we, (s) => s.isApplicable(e, r));
227
+ const i = fe(we, (s) => s.isApplicable(e, r));
228
228
  if (i)
229
229
  return {
230
230
  value: i.transform(e, r),
@@ -234,7 +234,7 @@ const Ce = U(xe, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor
234
234
  we.forEach((e) => {
235
235
  De[e.annotation] = e;
236
236
  });
237
- const ot = (e, r, t) => {
237
+ const lt = (e, r, t) => {
238
238
  if ($(r))
239
239
  switch (r[0]) {
240
240
  case "symbol":
@@ -254,7 +254,7 @@ const ot = (e, r, t) => {
254
254
  throw new Error("Unknown transformation: " + r);
255
255
  return i.untransform(e, t);
256
256
  }
257
- }, z = (e, r) => {
257
+ }, S = (e, r) => {
258
258
  if (r > e.size)
259
259
  throw new Error("index out of bounds");
260
260
  const t = e.keys();
@@ -263,21 +263,21 @@ const ot = (e, r, t) => {
263
263
  return t.next().value;
264
264
  };
265
265
  function Me(e) {
266
- if (V(e, "__proto__"))
266
+ if (L(e, "__proto__"))
267
267
  throw new Error("__proto__ is not allowed as a property");
268
- if (V(e, "prototype"))
268
+ if (L(e, "prototype"))
269
269
  throw new Error("prototype is not allowed as a property");
270
- if (V(e, "constructor"))
270
+ if (L(e, "constructor"))
271
271
  throw new Error("constructor is not allowed as a property");
272
272
  }
273
- const ut = (e, r) => {
273
+ const ct = (e, r) => {
274
274
  Me(r);
275
275
  for (let t = 0; t < r.length; t++) {
276
276
  const i = r[t];
277
- if (_(e))
278
- e = z(e, +i);
279
- else if (I(e)) {
280
- const s = +i, a = +r[++t] == 0 ? "key" : "value", n = z(e, s);
277
+ if (I(e))
278
+ e = S(e, +i);
279
+ else if (k(e)) {
280
+ const s = +i, a = +r[++t] == 0 ? "key" : "value", n = S(e, s);
281
281
  switch (a) {
282
282
  case "key":
283
283
  e = n;
@@ -290,7 +290,7 @@ const ut = (e, r) => {
290
290
  e = e[i];
291
291
  }
292
292
  return e;
293
- }, Z = (e, r, t) => {
293
+ }, H = (e, r, t) => {
294
294
  if (Me(r), r.length === 0)
295
295
  return t(e);
296
296
  let i = e;
@@ -299,15 +299,15 @@ const ut = (e, r) => {
299
299
  if ($(i)) {
300
300
  const o = +n;
301
301
  i = i[o];
302
- } else if (k(i))
302
+ } else if (P(i))
303
303
  i = i[n];
304
- else if (_(i)) {
304
+ else if (I(i)) {
305
305
  const o = +n;
306
- i = z(i, o);
307
- } else if (I(i)) {
306
+ i = S(i, o);
307
+ } else if (k(i)) {
308
308
  if (a === r.length - 2)
309
309
  break;
310
- const u = +n, c = +r[++a] == 0 ? "key" : "value", d = z(i, u);
310
+ const u = +n, c = +r[++a] == 0 ? "key" : "value", d = S(i, u);
311
311
  switch (c) {
312
312
  case "key":
313
313
  i = d;
@@ -319,12 +319,12 @@ const ut = (e, r) => {
319
319
  }
320
320
  }
321
321
  const s = r[r.length - 1];
322
- if ($(i) ? i[+s] = t(i[+s]) : k(i) && (i[s] = t(i[s])), _(i)) {
323
- const a = z(i, +s), n = t(a);
322
+ if ($(i) ? i[+s] = t(i[+s]) : P(i) && (i[s] = t(i[s])), I(i)) {
323
+ const a = S(i, +s), n = t(a);
324
324
  a !== n && (i.delete(a), i.add(n));
325
325
  }
326
- if (I(i)) {
327
- const a = +r[r.length - 2], n = z(i, a);
326
+ if (k(i)) {
327
+ const a = +r[r.length - 2], n = S(i, a);
328
328
  switch (+s == 0 ? "key" : "value") {
329
329
  case "key": {
330
330
  const u = t(n);
@@ -339,45 +339,45 @@ const ut = (e, r) => {
339
339
  }
340
340
  return e;
341
341
  };
342
- function G(e, r, t = []) {
342
+ function X(e, r, t = []) {
343
343
  if (!e)
344
344
  return;
345
345
  if (!$(e)) {
346
- O(e, (a, n) => G(a, r, [...t, ...P(n)]));
346
+ O(e, (a, n) => X(a, r, [...t, ...B(n)]));
347
347
  return;
348
348
  }
349
349
  const [i, s] = e;
350
350
  s && O(s, (a, n) => {
351
- G(a, r, [...t, ...P(n)]);
351
+ X(a, r, [...t, ...B(n)]);
352
352
  }), r(i, t);
353
353
  }
354
- function lt(e, r, t) {
355
- return G(r, (i, s) => {
356
- e = Z(e, s, (a) => ot(a, i, t));
354
+ function ft(e, r, t) {
355
+ return X(r, (i, s) => {
356
+ e = H(e, s, (a) => lt(a, i, t));
357
357
  }), e;
358
358
  }
359
- function ct(e, r) {
359
+ function dt(e, r) {
360
360
  function t(i, s) {
361
- const a = ut(e, P(s));
362
- i.map(P).forEach((n) => {
363
- e = Z(e, n, () => a);
361
+ const a = ct(e, B(s));
362
+ i.map(B).forEach((n) => {
363
+ e = H(e, n, () => a);
364
364
  });
365
365
  }
366
366
  if ($(r)) {
367
367
  const [i, s] = r;
368
368
  i.forEach((a) => {
369
- e = Z(e, P(a), () => e);
369
+ e = H(e, B(a), () => e);
370
370
  }), s && O(s, t);
371
371
  } else
372
372
  O(r, t);
373
373
  return e;
374
374
  }
375
- const ft = (e, r) => k(e) || $(e) || I(e) || _(e) || xe(e, r);
376
- function dt(e, r, t) {
375
+ const pt = (e, r) => P(e) || $(e) || k(e) || I(e) || xe(e, r);
376
+ function yt(e, r, t) {
377
377
  const i = t.get(e);
378
378
  i ? i.push(r) : t.set(e, [r]);
379
379
  }
380
- function yt(e, r) {
380
+ function mt(e, r) {
381
381
  const t = {};
382
382
  let i;
383
383
  return e.forEach((s) => {
@@ -385,64 +385,64 @@ function yt(e, r) {
385
385
  return;
386
386
  r || (s = s.map((o) => o.map(String)).sort((o, u) => o.length - u.length));
387
387
  const [a, ...n] = s;
388
- a.length === 0 ? i = n.map(Q) : t[Q(a)] = n.map(Q);
389
- }), i ? X(t) ? [i] : [i, t] : X(t) ? void 0 : t;
388
+ a.length === 0 ? i = n.map(W) : t[W(a)] = n.map(W);
389
+ }), i ? Y(t) ? [i] : [i, t] : Y(t) ? void 0 : t;
390
390
  }
391
391
  const Re = (e, r, t, i, s = [], a = [], n = /* @__PURE__ */ new Map()) => {
392
392
  var b;
393
- const o = et(e);
393
+ const o = tt(e);
394
394
  if (!o) {
395
- dt(e, s, r);
395
+ yt(e, s, r);
396
396
  const f = n.get(e);
397
397
  if (f)
398
398
  return i ? {
399
399
  transformedValue: null
400
400
  } : f;
401
401
  }
402
- if (!ft(e, t)) {
403
- const f = pe(e, t), y = f ? {
402
+ if (!pt(e, t)) {
403
+ const f = pe(e, t), p = f ? {
404
404
  transformedValue: f.value,
405
405
  annotations: [f.type]
406
406
  } : {
407
407
  transformedValue: e
408
408
  };
409
- return o || n.set(e, y), y;
409
+ return o || n.set(e, p), p;
410
410
  }
411
- if (V(a, e))
411
+ if (L(a, e))
412
412
  return {
413
413
  transformedValue: null
414
414
  };
415
415
  const u = pe(e, t), c = (b = u == null ? void 0 : u.value) != null ? b : e, d = $(c) ? [] : {}, g = {};
416
- O(c, (f, y) => {
417
- if (y === "__proto__" || y === "constructor" || y === "prototype")
418
- throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
419
- const C = Re(f, r, t, i, [...s, y], [...a, e], n);
420
- d[y] = C.transformedValue, $(C.annotations) ? g[y] = C.annotations : k(C.annotations) && O(C.annotations, (B, S) => {
421
- g[qe(y) + "." + S] = B;
416
+ O(c, (f, p) => {
417
+ if (p === "__proto__" || p === "constructor" || p === "prototype")
418
+ throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
419
+ const C = Re(f, r, t, i, [...s, p], [...a, e], n);
420
+ d[p] = C.transformedValue, $(C.annotations) ? g[p] = C.annotations : P(C.annotations) && O(C.annotations, (T, N) => {
421
+ g[qe(p) + "." + N] = T;
422
422
  });
423
423
  });
424
- const p = X(g) ? {
424
+ const y = Y(g) ? {
425
425
  transformedValue: d,
426
426
  annotations: u ? [u.type] : void 0
427
427
  } : {
428
428
  transformedValue: d,
429
429
  annotations: u ? [u.type, g] : g
430
430
  };
431
- return o || n.set(e, p), p;
431
+ return o || n.set(e, y), y;
432
432
  };
433
- function Se(e) {
433
+ function Ne(e) {
434
434
  return Object.prototype.toString.call(e).slice(8, -1);
435
435
  }
436
- function me(e) {
437
- return Se(e) === "Array";
436
+ function ye(e) {
437
+ return Ne(e) === "Array";
438
438
  }
439
- function pt(e) {
440
- if (Se(e) !== "Object")
439
+ function gt(e) {
440
+ if (Ne(e) !== "Object")
441
441
  return !1;
442
442
  const r = Object.getPrototypeOf(e);
443
443
  return !!r && r.constructor === Object && r === Object.prototype;
444
444
  }
445
- function mt(e, r, t, i, s) {
445
+ function bt(e, r, t, i, s) {
446
446
  const a = {}.propertyIsEnumerable.call(i, r) ? "enumerable" : "nonenumerable";
447
447
  a === "enumerable" && (e[r] = t), s && a === "nonenumerable" && Object.defineProperty(e, r, {
448
448
  value: t,
@@ -451,17 +451,17 @@ function mt(e, r, t, i, s) {
451
451
  configurable: !0
452
452
  });
453
453
  }
454
- function v(e, r = {}) {
455
- if (me(e))
456
- return e.map((s) => v(s, r));
457
- if (!pt(e))
454
+ function Z(e, r = {}) {
455
+ if (ye(e))
456
+ return e.map((s) => Z(s, r));
457
+ if (!gt(e))
458
458
  return e;
459
459
  const t = Object.getOwnPropertyNames(e), i = Object.getOwnPropertySymbols(e);
460
460
  return [...t, ...i].reduce((s, a) => {
461
- if (me(r.props) && !r.props.includes(a))
461
+ if (ye(r.props) && !r.props.includes(a))
462
462
  return s;
463
- const n = e[a], o = v(n, r);
464
- return mt(s, a, o, e, r.nonenumerable), s;
463
+ const n = e[a], o = Z(n, r);
464
+ return bt(s, a, o, e, r.nonenumerable), s;
465
465
  }, {});
466
466
  }
467
467
  class l {
@@ -469,10 +469,10 @@ class l {
469
469
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
470
470
  */
471
471
  constructor({ dedupe: r = !1 } = {}) {
472
- this.classRegistry = new Ur(), this.symbolRegistry = new be((t) => {
472
+ this.classRegistry = new jr(), this.symbolRegistry = new be((t) => {
473
473
  var i;
474
474
  return (i = t.description) != null ? i : "";
475
- }), this.customTransformerRegistry = new jr(), this.allowedErrorProps = [], this.dedupe = r;
475
+ }), this.customTransformerRegistry = new Qr(), this.allowedErrorProps = [], this.dedupe = r;
476
476
  }
477
477
  serialize(r) {
478
478
  const t = /* @__PURE__ */ new Map(), i = Re(r, t, this, this.dedupe), s = {
@@ -481,15 +481,15 @@ class l {
481
481
  i.annotations && (s.meta = q(h({}, s.meta), {
482
482
  values: i.annotations
483
483
  }));
484
- const a = yt(t, this.dedupe);
484
+ const a = mt(t, this.dedupe);
485
485
  return a && (s.meta = q(h({}, s.meta), {
486
486
  referentialEqualities: a
487
487
  })), s;
488
488
  }
489
489
  deserialize(r) {
490
490
  const { json: t, meta: i } = r;
491
- let s = v(t);
492
- return i != null && i.values && (s = lt(s, i.values, this)), i != null && i.referentialEqualities && (s = ct(s, i.referentialEqualities)), s;
491
+ let s = Z(t);
492
+ return i != null && i.values && (s = ft(s, i.values, this)), i != null && i.referentialEqualities && (s = dt(s, i.referentialEqualities)), s;
493
493
  }
494
494
  stringify(r) {
495
495
  return JSON.stringify(this.serialize(r));
@@ -521,7 +521,7 @@ l.registerClass = l.defaultInstance.registerClass.bind(l.defaultInstance);
521
521
  l.registerSymbol = l.defaultInstance.registerSymbol.bind(l.defaultInstance);
522
522
  l.registerCustom = l.defaultInstance.registerCustom.bind(l.defaultInstance);
523
523
  l.allowErrorProps = l.defaultInstance.allowErrorProps.bind(l.defaultInstance);
524
- const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem, e.type), re = (e) => new ur(
524
+ const R = (e) => e === void 0 ? Dr.None : e, ht = (e) => new Qe(e.metadataItem, e.type), v = (e) => new cr(
525
525
  e.name,
526
526
  e.expression,
527
527
  e.type,
@@ -529,7 +529,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
529
529
  R(e.sort),
530
530
  e.dataSource,
531
531
  e.composeCode
532
- ), te = (e) => new lr(
532
+ ), ee = (e) => new fr(
533
533
  e.name,
534
534
  e.expression,
535
535
  e.granularity,
@@ -541,40 +541,40 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
541
541
  ), F = (e) => {
542
542
  switch (e.__serializable) {
543
543
  case "DimensionalAttribute":
544
- return re(e);
544
+ return v(e);
545
545
  case "DimensionalLevelAttribute":
546
- return te(e);
546
+ return ee(e);
547
547
  default:
548
548
  return e;
549
549
  }
550
- }, ze = (e) => new _r(
550
+ }, Se = (e) => new Lr(
551
551
  e.name,
552
552
  e.expression,
553
553
  e.attributes.map(F),
554
- e.dimensions.map(bt),
554
+ e.dimensions.map(Ft),
555
555
  e.type,
556
556
  e.description,
557
557
  R(e.sort),
558
558
  e.dataSource,
559
559
  e.composeCode,
560
560
  e.defaultAttribute ? F(e.defaultAttribute) : void 0
561
- ), Ne = (e) => new Lr(
561
+ ), ze = (e) => new Vr(
562
562
  e.name,
563
563
  e.expression,
564
564
  e.description,
565
565
  R(e.sort),
566
566
  e.dataSource,
567
567
  e.composeCode
568
- ), bt = (e) => {
568
+ ), Ft = (e) => {
569
569
  switch (e.__serializable) {
570
570
  case "DimensionalDimension":
571
- return ze(e);
571
+ return Se(e);
572
572
  case "DimensionalDateDimension":
573
- return Ne(e);
573
+ return ze(e);
574
574
  default:
575
575
  return e;
576
576
  }
577
- }, ie = (e) => new cr(
577
+ }, re = (e) => new dr(
578
578
  e.name,
579
579
  F(e.attribute),
580
580
  e.aggregation,
@@ -583,26 +583,26 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
583
583
  R(e.sort),
584
584
  e.dataSource,
585
585
  e.composeCode
586
- ), se = (e) => {
586
+ ), te = (e) => {
587
587
  const r = Object.fromEntries(
588
588
  Object.entries(e.context).map(([t, i]) => {
589
589
  if (i && typeof i == "object" && "__serializable" in i)
590
590
  switch (i.__serializable) {
591
591
  case "DimensionalAttribute":
592
- return [t, re(i)];
592
+ return [t, v(i)];
593
593
  case "DimensionalLevelAttribute":
594
- return [t, te(i)];
594
+ return [t, ee(i)];
595
595
  case "DimensionalBaseMeasure":
596
- return [t, ie(i)];
596
+ return [t, re(i)];
597
597
  case "DimensionalCalculatedMeasure":
598
- return [t, se(i)];
598
+ return [t, te(i)];
599
599
  default:
600
600
  return [t, i];
601
601
  }
602
602
  return [t, i];
603
603
  })
604
604
  );
605
- return new fr(
605
+ return new pr(
606
606
  e.name,
607
607
  e.expression,
608
608
  r,
@@ -612,7 +612,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
612
612
  e.dataSource,
613
613
  e.composeCode
614
614
  );
615
- }, Oe = (e) => new dr(
615
+ }, Oe = (e) => new yr(
616
616
  e.name,
617
617
  F(e.attribute),
618
618
  e.format,
@@ -620,12 +620,12 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
620
620
  R(e.sort),
621
621
  e.dataSource,
622
622
  e.composeCode
623
- ), Y = (e) => {
623
+ ), K = (e) => {
624
624
  switch (e.__serializable) {
625
625
  case "DimensionalBaseMeasure":
626
- return ie(e);
626
+ return re(e);
627
627
  case "DimensionalCalculatedMeasure":
628
- return se(e);
628
+ return te(e);
629
629
  case "DimensionalMeasureTemplate":
630
630
  return Oe(e);
631
631
  default:
@@ -634,36 +634,36 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
634
634
  }, m = (e) => {
635
635
  switch (e.__serializable) {
636
636
  case "MembersFilter":
637
- return new xr(
637
+ return new $r(
638
638
  F(e.attribute),
639
639
  e.members,
640
640
  e.config.backgroundFilter ? q(h({}, e.config), { backgroundFilter: m(e.config.backgroundFilter) }) : e.config,
641
641
  e.composeCode
642
642
  );
643
643
  case "LogicalAttributeFilter":
644
- return new Ar(
644
+ return new Cr(
645
645
  e.filters.map((t) => m(t)),
646
646
  e.operator,
647
647
  e.config,
648
648
  e.composeCode
649
649
  );
650
650
  case "CascadingFilter":
651
- return new Er(
651
+ return new xr(
652
652
  e._filters.map((t) => m(t)),
653
653
  e.config,
654
654
  e.composeCode
655
655
  );
656
656
  case "ExcludeFilter":
657
- return new wr(
657
+ return new Ar(
658
658
  m(e.filter),
659
659
  e.input ? m(e.input) : void 0,
660
660
  e.config,
661
661
  e.composeCode
662
662
  );
663
663
  case "MeasureFilter":
664
- return new qr(
664
+ return new Er(
665
665
  F(e.attribute),
666
- Y(e.measure),
666
+ K(e.measure),
667
667
  e.operatorA,
668
668
  e.valueA,
669
669
  e.operatorB,
@@ -672,24 +672,24 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
672
672
  e.composeCode
673
673
  );
674
674
  case "RankingFilter":
675
- return new Fr(
675
+ return new wr(
676
676
  F(e.attribute),
677
- Y(e.measure),
677
+ K(e.measure),
678
678
  e.operator,
679
679
  e.count,
680
680
  e.config,
681
681
  e.composeCode
682
682
  );
683
683
  case "MeasureRankingFilter":
684
- return new hr(
685
- Y(e.measure),
684
+ return new qr(
685
+ K(e.measure),
686
686
  e.operator,
687
687
  e.count,
688
688
  e.config,
689
689
  e.composeCode
690
690
  );
691
691
  case "NumericFilter":
692
- return new br(
692
+ return new Fr(
693
693
  F(e.attribute),
694
694
  e.operatorA,
695
695
  e.valueA,
@@ -699,7 +699,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
699
699
  e.composeCode
700
700
  );
701
701
  case "TextFilter":
702
- return new gr(
702
+ return new hr(
703
703
  F(e.attribute),
704
704
  e.operatorA,
705
705
  e.valueA,
@@ -708,7 +708,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
708
708
  );
709
709
  case "DateRangeFilter": {
710
710
  const { valueA: t, valueB: i } = e;
711
- return new mr(
711
+ return new br(
712
712
  F(e.attribute),
713
713
  t,
714
714
  i,
@@ -717,7 +717,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
717
717
  );
718
718
  }
719
719
  case "RelativeDateFilter":
720
- return new pr(
720
+ return new gr(
721
721
  F(e.attribute),
722
722
  e.offset,
723
723
  e.count,
@@ -727,7 +727,7 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
727
727
  e.composeCode
728
728
  );
729
729
  case "CustomFilter":
730
- return new yr(
730
+ return new mr(
731
731
  F(e.attribute),
732
732
  e.jaqlExpression,
733
733
  e.config,
@@ -739,63 +739,63 @@ const R = (e) => e === void 0 ? Cr.None : e, gt = (e) => new je(e.metadataItem,
739
739
  };
740
740
  l.registerCustom(
741
741
  {
742
- isApplicable: We,
742
+ isApplicable: Ke,
743
743
  serialize: (e) => e.serialize(),
744
- deserialize: (e) => gt(e)
744
+ deserialize: (e) => ht(e)
745
745
  },
746
746
  "JaqlElement"
747
747
  );
748
748
  l.registerCustom(
749
749
  {
750
- isApplicable: Ke,
750
+ isApplicable: Ye,
751
751
  serialize: (e) => e.serialize(),
752
- deserialize: (e) => re(e)
752
+ deserialize: (e) => v(e)
753
753
  },
754
754
  "DimensionalAttribute"
755
755
  );
756
756
  l.registerCustom(
757
757
  {
758
- isApplicable: Qe,
758
+ isApplicable: He,
759
759
  serialize: (e) => e.serialize(),
760
- deserialize: (e) => te(e)
760
+ deserialize: (e) => ee(e)
761
761
  },
762
762
  "DimensionalLevelAttribute"
763
763
  );
764
764
  l.registerCustom(
765
765
  {
766
- isApplicable: kr,
766
+ isApplicable: Ir,
767
767
  serialize: (e) => e.serialize(),
768
- deserialize: (e) => ze(e)
768
+ deserialize: (e) => Se(e)
769
769
  },
770
770
  "DimensionalDimension"
771
771
  );
772
772
  l.registerCustom(
773
773
  {
774
- isApplicable: Ir,
774
+ isApplicable: _r,
775
775
  serialize: (e) => e.serialize(),
776
- deserialize: (e) => Ne(e)
776
+ deserialize: (e) => ze(e)
777
777
  },
778
778
  "DimensionalDateDimension"
779
779
  );
780
780
  l.registerCustom(
781
781
  {
782
- isApplicable: Ye,
782
+ isApplicable: Xe,
783
783
  serialize: (e) => e.serialize(),
784
- deserialize: (e) => ie(e)
784
+ deserialize: (e) => re(e)
785
785
  },
786
786
  "DimensionalBaseMeasure"
787
787
  );
788
788
  l.registerCustom(
789
789
  {
790
- isApplicable: He,
790
+ isApplicable: Ze,
791
791
  serialize: (e) => e.serialize(),
792
- deserialize: (e) => se(e)
792
+ deserialize: (e) => te(e)
793
793
  },
794
794
  "DimensionalCalculatedMeasure"
795
795
  );
796
796
  l.registerCustom(
797
797
  {
798
- isApplicable: Xe,
798
+ isApplicable: Ge,
799
799
  serialize: (e) => e.serialize(),
800
800
  deserialize: (e) => Oe(e)
801
801
  },
@@ -803,7 +803,7 @@ l.registerCustom(
803
803
  );
804
804
  l.registerCustom(
805
805
  {
806
- isApplicable: ee,
806
+ isApplicable: G,
807
807
  serialize: (e) => e.serialize(),
808
808
  deserialize: (e) => m(e)
809
809
  },
@@ -811,7 +811,7 @@ l.registerCustom(
811
811
  );
812
812
  l.registerCustom(
813
813
  {
814
- isApplicable: Ze,
814
+ isApplicable: ve,
815
815
  serialize: (e) => e.serialize(),
816
816
  deserialize: (e) => m(e)
817
817
  },
@@ -819,7 +819,7 @@ l.registerCustom(
819
819
  );
820
820
  l.registerCustom(
821
821
  {
822
- isApplicable: Ge,
822
+ isApplicable: er,
823
823
  serialize: (e) => e.serialize(),
824
824
  deserialize: (e) => m(e)
825
825
  },
@@ -827,7 +827,7 @@ l.registerCustom(
827
827
  );
828
828
  l.registerCustom(
829
829
  {
830
- isApplicable: ve,
830
+ isApplicable: rr,
831
831
  serialize: (e) => e.serialize(),
832
832
  deserialize: (e) => m(e)
833
833
  },
@@ -835,7 +835,7 @@ l.registerCustom(
835
835
  );
836
836
  l.registerCustom(
837
837
  {
838
- isApplicable: er,
838
+ isApplicable: tr,
839
839
  serialize: (e) => e.serialize(),
840
840
  deserialize: (e) => m(e)
841
841
  },
@@ -843,7 +843,7 @@ l.registerCustom(
843
843
  );
844
844
  l.registerCustom(
845
845
  {
846
- isApplicable: rr,
846
+ isApplicable: ir,
847
847
  serialize: (e) => e.serialize(),
848
848
  deserialize: (e) => m(e)
849
849
  },
@@ -851,7 +851,7 @@ l.registerCustom(
851
851
  );
852
852
  l.registerCustom(
853
853
  {
854
- isApplicable: tr,
854
+ isApplicable: sr,
855
855
  serialize: (e) => e.serialize(),
856
856
  deserialize: (e) => m(e)
857
857
  },
@@ -859,7 +859,7 @@ l.registerCustom(
859
859
  );
860
860
  l.registerCustom(
861
861
  {
862
- isApplicable: ir,
862
+ isApplicable: nr,
863
863
  serialize: (e) => e.serialize(),
864
864
  deserialize: (e) => m(e)
865
865
  },
@@ -867,7 +867,7 @@ l.registerCustom(
867
867
  );
868
868
  l.registerCustom(
869
869
  {
870
- isApplicable: sr,
870
+ isApplicable: ar,
871
871
  serialize: (e) => e.serialize(),
872
872
  deserialize: (e) => m(e)
873
873
  },
@@ -875,7 +875,7 @@ l.registerCustom(
875
875
  );
876
876
  l.registerCustom(
877
877
  {
878
- isApplicable: nr,
878
+ isApplicable: or,
879
879
  serialize: (e) => e.serialize(),
880
880
  deserialize: (e) => m(e)
881
881
  },
@@ -883,7 +883,7 @@ l.registerCustom(
883
883
  );
884
884
  l.registerCustom(
885
885
  {
886
- isApplicable: ar,
886
+ isApplicable: ur,
887
887
  serialize: (e) => e.serialize(),
888
888
  deserialize: (e) => m(e)
889
889
  },
@@ -891,91 +891,95 @@ l.registerCustom(
891
891
  );
892
892
  l.registerCustom(
893
893
  {
894
- isApplicable: or,
894
+ isApplicable: lr,
895
895
  serialize: (e) => e.serialize(),
896
896
  deserialize: (e) => m(e)
897
897
  },
898
898
  "CustomFilter"
899
899
  );
900
- const vt = l, T = "DM.";
901
- function x(e) {
900
+ const ti = l, x = "DM.";
901
+ function A(e) {
902
902
  return typeof e == "object" && e !== null && "function" in e && "args" in e;
903
903
  }
904
- function ne(e) {
905
- return e.every(x);
904
+ function ie(e) {
905
+ return e.every(A);
906
906
  }
907
- function J(e) {
907
+ function U(e) {
908
908
  return "attribute" in e && "config" in e;
909
909
  }
910
- function L(e) {
910
+ function _(e) {
911
911
  return "left" in e && "right" in e && "operator" in e;
912
912
  }
913
913
  function Te(e) {
914
- return !J(e) && !L(e);
914
+ return !U(e) && !_(e);
915
915
  }
916
- function ht(e) {
916
+ function qt(e) {
917
917
  return e.every((r) => typeof r == "string");
918
918
  }
919
- function Ft(e) {
919
+ function Be(e) {
920
920
  const r = e.split(".");
921
- if (r.length < 3 || `${r[0]}.` !== T)
921
+ if (r.length < 3 || `${r[0]}.` !== x)
922
922
  throw new Error(
923
- `Invalid attribute name format: "${e}". Expected format: "${T}TableName.ColumnName[.Level]"`
923
+ `Invalid dimensional element name format: "${e}". Expected format: "${x}TableName.ColumnName[.Level]"`
924
924
  );
925
925
  const t = r[1], i = r[2];
926
926
  let s;
927
927
  return r.length === 4 && (s = r[3]), { tableName: t, columnName: i, level: s };
928
928
  }
929
- function qt(e, r) {
930
- const { tableName: t, columnName: i, level: s } = Ft(e), a = r.find((o) => o.name === t);
931
- if (!a)
932
- throw new Error(`Table "${t}" not found in the data model`);
933
- const n = a.columns.find((o) => o.name === i);
934
- if (!n)
935
- throw new Error(`Column "${i}" not found in table "${t}"`);
929
+ function Pe(e, r, t) {
930
+ const i = t.find((a) => a.name === e);
931
+ if (!i)
932
+ throw new Error(`Table "${e}" not found in the data model`);
933
+ const s = i.columns.find((a) => a.name === r);
934
+ if (!s)
935
+ throw new Error(`Column "${r}" not found in table "${e}"`);
936
+ return { table: i, column: s };
937
+ }
938
+ function wt(e, r) {
939
+ const { tableName: t, columnName: i, level: s } = Be(e), { column: a } = Pe(t, i, r);
936
940
  if (s) {
937
- if (!Dr(n.dataType))
941
+ if (!ge(a.dataType))
938
942
  throw new Error(
939
- `Invalid date level "${s}" in attribute "${e}". Column "${t}.${i}" is not a datetime column`
943
+ `Invalid date level "${s}" in dimensional element "${e}". Column "${t}.${i}" is not a datetime column`
940
944
  );
941
- const o = K.all;
942
- if (!o.includes(s))
945
+ const n = j.all;
946
+ if (!n.includes(s))
943
947
  throw new Error(
944
- `Invalid date level "${s}" in attribute "${e}". Valid levels are: ${o.join(
948
+ `Invalid date level "${s}" in dimensional element "${e}". Valid levels are: ${n.join(
945
949
  ", "
946
950
  )}`
947
951
  );
948
- const u = K.dateOnly;
949
- if (n.dataType === "date" && !u.includes(s))
952
+ const o = j.dateOnly;
953
+ if (a.dataType === "date" && !o.includes(s))
950
954
  throw new Error(
951
- `Invalid level "${s}" in attribute "${e}". Column "${t}.${i}" is only a date column, not a datetime column`
955
+ `Invalid level "${s}" in dimensional element "${e}". Column "${t}.${i}" is only a date column, not a datetime column`
952
956
  );
953
- const c = K.timeOnly;
954
- if (n.dataType === "time" && !c.includes(s))
957
+ const u = j.timeOnly;
958
+ if (a.dataType === "time" && !u.includes(s))
955
959
  throw new Error(
956
- `Invalid level "${s}" in attribute "${e}". Column "${t}.${i}" is only a time column, not a date column`
960
+ `Invalid level "${s}" in dimensional element "${e}". Column "${t}.${i}" is only a time column, not a date column`
957
961
  );
958
962
  }
959
- return { field: n, level: s };
963
+ return { column: a, level: s };
960
964
  }
961
- function Be(e) {
962
- return e.type === N.TextAttribute;
963
- }
964
- function Pe(e) {
965
- return e.type === N.NumericAttribute;
965
+ function ke(e) {
966
+ return e.type === z.TextAttribute;
966
967
  }
967
- function wt(e) {
968
- return e.type === N.DateLevel;
968
+ function Ie(e) {
969
+ return e.type === z.NumericAttribute;
969
970
  }
970
971
  function Et(e) {
971
- return Be(e) || Pe(e);
972
+ return e.type === z.DateLevel;
972
973
  }
973
- function W(e) {
974
- return e.type === N.TextAttribute ? "text" : e.type === N.NumericAttribute ? "numeric" : e.type === N.DateLevel ? "date/datetime" : "unknown";
974
+ function At(e) {
975
+ return ke(e) || Ie(e);
975
976
  }
976
- function ae(e, r, t) {
977
- const { field: i, level: s } = qt(e, t);
978
- return $r({
977
+ function J(e) {
978
+ return e.type === z.TextAttribute ? "text" : e.type === z.NumericAttribute ? "numeric" : e.type === z.DateLevel ? "date/datetime" : "unknown";
979
+ }
980
+ function se(e, r, t) {
981
+ const { column: i, level: s } = wt(e, t);
982
+ return Mr({
979
983
  expression: i.expression,
980
984
  dataType: i.dataType,
981
985
  granularity: s,
@@ -984,11 +988,28 @@ function ae(e, r, t) {
984
988
  dataSource: r
985
989
  });
986
990
  }
987
- const At = (e) => {
991
+ function xt(e, r, t) {
992
+ const { tableName: i, columnName: s, level: a } = Be(e);
993
+ if (a)
994
+ throw new Error(
995
+ `Invalid DateDimension name format: "${e}". Expected format: "${x}TableName.ColumnName"`
996
+ );
997
+ const { column: n } = Pe(i, s, t);
998
+ if (!ge(n.dataType))
999
+ throw new Error(
1000
+ `Invalid DateDimension name "${e}". Column "${i}.${s}" is not a datetime column (got ${n.dataType}).`
1001
+ );
1002
+ return Ur({
1003
+ name: s,
1004
+ expression: n.expression,
1005
+ dataSource: r
1006
+ });
1007
+ }
1008
+ const Ct = (e) => {
988
1009
  const { data: r } = e, { dataSource: t, tables: i } = e.context;
989
1010
  if (!r)
990
1011
  return { success: !0, data: [] };
991
- if (!ht(r))
1012
+ if (!qt(r))
992
1013
  return {
993
1014
  success: !1,
994
1015
  errors: [
@@ -1008,7 +1029,7 @@ const At = (e) => {
1008
1029
  input: n
1009
1030
  };
1010
1031
  try {
1011
- const c = ae(n, t, i);
1032
+ const c = se(n, t, i);
1012
1033
  s.push(c);
1013
1034
  } catch (c) {
1014
1035
  const d = c instanceof Error ? c.message : "Unknown error";
@@ -1016,44 +1037,44 @@ const At = (e) => {
1016
1037
  }
1017
1038
  }), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
1018
1039
  };
1019
- function oe(e, r) {
1040
+ function ne(e, r) {
1020
1041
  const t = Reflect.get(e, r);
1021
1042
  if (typeof t != "function")
1022
1043
  throw new Error(`Function "${r}" not found or is not a function`);
1023
1044
  return t;
1024
1045
  }
1025
- function xt(e, r) {
1026
- const t = e.replace("measureFactory.", ""), s = oe(Mr, t)(...r);
1046
+ function $t(e, r) {
1047
+ const t = e.replace("measureFactory.", ""), s = ne(Rr, t)(...r);
1027
1048
  if (!Te(s))
1028
1049
  throw new Error(`Function "${e}" did not return a valid Measure`);
1029
1050
  return s;
1030
1051
  }
1031
- function Ct(e, r) {
1032
- const t = e.replace("filterFactory.logic.", ""), s = oe(Rr, t)(...r);
1033
- if (!L(s))
1052
+ function Dt(e, r) {
1053
+ const t = e.replace("filterFactory.logic.", ""), s = ne(Nr, t)(...r);
1054
+ if (!_(s))
1034
1055
  throw new Error(`Function "${e}" did not return a valid FilterRelations`);
1035
1056
  return s;
1036
1057
  }
1037
- function $t(e, r) {
1058
+ function Mt(e, r) {
1038
1059
  if (e.startsWith("filterFactory.logic."))
1039
- return Ct(e, r);
1040
- const t = e.replace("filterFactory.", ""), s = oe(Sr, t)(...r);
1041
- if (!J(s) && !L(s))
1060
+ return Dt(e, r);
1061
+ const t = e.replace("filterFactory.", ""), s = ne(Sr, t)(...r);
1062
+ if (!U(s) && !_(s))
1042
1063
  throw new Error(`Function "${e}" did not return a valid Filter or FilterRelations`);
1043
1064
  return s;
1044
1065
  }
1045
- function Dt(e, r) {
1066
+ function Rt(e, r) {
1046
1067
  const i = e.split(".")[0];
1047
1068
  if (i === "measureFactory")
1048
- return xt(e, r);
1049
- if (i === "filterFactory")
1050
1069
  return $t(e, r);
1070
+ if (i === "filterFactory")
1071
+ return Mt(e, r);
1051
1072
  throw new Error(
1052
1073
  `Unsupported factory: "${i}". Supported factories: measureFactory, filterFactory`
1053
1074
  );
1054
1075
  }
1055
- const Mt = /\[([a-zA-Z_][a-zA-Z0-9_.-]*)\]/g;
1056
- function Rt(e, r, t = {}) {
1076
+ const Nt = /\[([a-zA-Z_][a-zA-Z0-9_.-]*)\]/g;
1077
+ function St(e, r, t = {}) {
1057
1078
  const {
1058
1079
  warnUnusedContext: i = !0,
1059
1080
  errorOnUnusedContext: s = !0,
@@ -1073,7 +1094,7 @@ function Rt(e, r, t = {}) {
1073
1094
  return o.errors.push(
1074
1095
  `${n}args[2]: Context cannot be empty - custom formulas require context definitions`
1075
1096
  ), o.isValid = !1, o;
1076
- const c = Mt, d = /* @__PURE__ */ new Set();
1097
+ const c = Nt, d = /* @__PURE__ */ new Set();
1077
1098
  let g;
1078
1099
  for (; (g = c.exec(e)) !== null; ) {
1079
1100
  const b = g[1];
@@ -1082,13 +1103,13 @@ function Rt(e, r, t = {}) {
1082
1103
  o.references = Array.from(d), o.references.length === 0 && o.warnings.push(
1083
1104
  `${n}args[1]: No bracket references found in formula - ensure this is intentional`
1084
1105
  );
1085
- const p = [];
1106
+ const y = [];
1086
1107
  for (const b of o.references)
1087
- u.includes(b) || p.push(b);
1088
- if (p.length > 0 && (o.isValid = !1, p.length === 1 ? o.errors.push(
1089
- `${n}args[1]: Reference [${p[0]}] not found in context. Available keys: ${u.join(", ")}`
1108
+ u.includes(b) || y.push(b);
1109
+ if (y.length > 0 && (o.isValid = !1, y.length === 1 ? o.errors.push(
1110
+ `${n}args[1]: Reference [${y[0]}] not found in context. Available keys: ${u.join(", ")}`
1090
1111
  ) : o.errors.push(
1091
- `${n}args[1]: References [${p.join(
1112
+ `${n}args[1]: References [${y.join(
1092
1113
  "], ["
1093
1114
  )}] not found in context. Available keys: ${u.join(", ")}`
1094
1115
  )), (i || s) && u.length > 0) {
@@ -1102,17 +1123,17 @@ function Rt(e, r, t = {}) {
1102
1123
  }
1103
1124
  return o;
1104
1125
  }
1105
- function St(e, r, t = {}) {
1106
- const i = Rt(e, r, t);
1126
+ function zt(e, r, t = {}) {
1127
+ const i = St(e, r, t);
1107
1128
  if (!i.isValid)
1108
1129
  throw new Error(i.errors.join("; "));
1109
1130
  i.warnings.length > 0 && console.warn("Formula validation warnings:", i.warnings.join("; "));
1110
1131
  }
1111
- function zt(e, r) {
1132
+ function Ot(e, r) {
1112
1133
  if (e.length < 3)
1113
1134
  throw new Error(`${r.pathPrefix}Expected at least 3 arguments for customFormula`);
1114
1135
  const t = e[1], i = e[2];
1115
- St(t, i, {
1136
+ zt(t, i, {
1116
1137
  errorPrefix: `${r.pathPrefix}`,
1117
1138
  errorOnUnusedContext: !0,
1118
1139
  // Strict validation: all context keys must be used
@@ -1122,7 +1143,7 @@ function zt(e, r) {
1122
1143
  const s = {};
1123
1144
  for (const [a, n] of Object.entries(i)) {
1124
1145
  const o = `args[2].${a}`;
1125
- if (x(n))
1146
+ if (A(n))
1126
1147
  s[`${a}`] = w({
1127
1148
  data: n,
1128
1149
  context: {
@@ -1131,9 +1152,9 @@ function zt(e, r) {
1131
1152
  pathPrefix: o
1132
1153
  }
1133
1154
  });
1134
- else if (typeof n == "string" && n.startsWith(T))
1155
+ else if (typeof n == "string" && n.startsWith(x))
1135
1156
  try {
1136
- s[`${a}`] = ae(
1157
+ s[`${a}`] = se(
1137
1158
  n,
1138
1159
  r.dataSource,
1139
1160
  r.tables
@@ -1146,71 +1167,62 @@ function zt(e, r) {
1146
1167
  s[`${a}`] = n;
1147
1168
  else
1148
1169
  throw new Error(
1149
- `${o}: Invalid context value for key '${a}'. Expected a function call or attribute reference (${T}...), but got: ${typeof n}`
1170
+ `${o}: Invalid context value for key '${a}'. Expected a function call or attribute reference (${x}...), but got: ${typeof n}`
1150
1171
  );
1151
1172
  }
1152
1173
  e[2] = s;
1153
1174
  }
1154
- function j(e, r) {
1175
+ function ae(e, r) {
1155
1176
  const t = e[0];
1156
1177
  if (!t || typeof t != "object" || !("type" in t))
1157
1178
  throw new Error(`${r.pathPrefix}args[0]: Expected attribute as first argument`);
1158
1179
  return t;
1159
1180
  }
1160
- function ge(e, r) {
1161
- const t = j(e, r);
1162
- if (!Et(t))
1181
+ function me(e, r) {
1182
+ const t = ae(e, r);
1183
+ if (!At(t))
1163
1184
  throw new Error(
1164
- `${r.pathPrefix}args[0]: Attribute must be string or numeric type, got ${W(
1185
+ `${r.pathPrefix}args[0]: Attribute must be string or numeric type, got ${J(
1165
1186
  t
1166
1187
  )} attribute`
1167
1188
  );
1168
1189
  }
1169
1190
  function D(e, r) {
1170
- const t = j(e, r);
1171
- if (!Pe(t))
1191
+ const t = ae(e, r);
1192
+ if (!Ie(t))
1172
1193
  throw new Error(
1173
- `${r.pathPrefix}args[0]: Attribute must be numeric type, got ${W(
1194
+ `${r.pathPrefix}args[0]: Attribute must be numeric type, got ${J(
1174
1195
  t
1175
1196
  )} attribute`
1176
1197
  );
1177
1198
  }
1178
1199
  function M(e, r) {
1179
- const t = j(e, r);
1180
- if (!Be(t))
1181
- throw new Error(
1182
- `${r.pathPrefix}args[0]: Attribute must be string type, got ${W(
1183
- t
1184
- )} attribute`
1185
- );
1186
- }
1187
- function A(e, r) {
1188
- const t = j(e, r);
1189
- if (!wt(t))
1200
+ const t = ae(e, r);
1201
+ if (!ke(t))
1190
1202
  throw new Error(
1191
- `${r.pathPrefix}args[0]: Attribute must be date/datetime type, got ${W(
1203
+ `${r.pathPrefix}args[0]: Attribute must be string type, got ${J(
1192
1204
  t
1193
1205
  )} attribute`
1194
1206
  );
1195
1207
  }
1196
- function Nt(e, r) {
1208
+ function Tt(e, r) {
1197
1209
  const t = e[0];
1198
1210
  if (!t || typeof t != "object" || !("attribute" in t))
1199
1211
  throw new Error(`${r.pathPrefix}args[0]: Expected filter as first argument`);
1200
1212
  return t;
1201
1213
  }
1202
- function Ot(e, r) {
1203
- const t = Nt(e, r);
1204
- if (!ee(t))
1214
+ function Bt(e, r) {
1215
+ const t = Tt(e, r);
1216
+ if (!G(t))
1205
1217
  throw new Error(
1206
1218
  `${r.pathPrefix}args[0]: exclude filter only accepts members filter, got ${t.__serializable || "unknown"} filter`
1207
1219
  );
1208
1220
  }
1209
- const Tt = {
1210
- "measureFactory.customFormula": zt,
1221
+ const Pt = {
1222
+ "measureFactory.customFormula": Ot,
1211
1223
  // String | Number filters
1212
- "filterFactory.equals": ge,
1213
- "filterFactory.doesntEqual": ge,
1224
+ "filterFactory.equals": me,
1225
+ "filterFactory.doesntEqual": me,
1214
1226
  // Numeric filters
1215
1227
  "filterFactory.greaterThan": D,
1216
1228
  "filterFactory.greaterThanOrEqual": D,
@@ -1227,24 +1239,13 @@ const Tt = {
1227
1239
  "filterFactory.endsWith": M,
1228
1240
  "filterFactory.doesntEndWith": M,
1229
1241
  "filterFactory.like": M,
1230
- // Date filters
1231
- "filterFactory.dateFrom": A,
1232
- "filterFactory.dateTo": A,
1233
- "filterFactory.dateRange": A,
1234
- "filterFactory.dateRelative": A,
1235
- "filterFactory.dateRelativeFrom": A,
1236
- "filterFactory.dateRelativeTo": A,
1237
- "filterFactory.thisYear": A,
1238
- "filterFactory.thisMonth": A,
1239
- "filterFactory.thisQuarter": A,
1240
- "filterFactory.today": A,
1241
1242
  // Exclude filter
1242
- "filterFactory.exclude": Ot
1243
+ "filterFactory.exclude": Bt
1243
1244
  };
1244
- function Bt(e) {
1245
- return Tt[`${e}`];
1245
+ function kt(e) {
1246
+ return Pt[`${e}`];
1246
1247
  }
1247
- const Pt = {
1248
+ const It = {
1248
1249
  // ==================== MEASURE FACTORY FUNCTIONS ====================
1249
1250
  // Basic aggregations
1250
1251
  "measureFactory.sum": [
@@ -1767,39 +1768,51 @@ const Pt = {
1767
1768
  { type: "FilterRelationsNode", required: !0 }
1768
1769
  ]
1769
1770
  };
1770
- function ue(e) {
1771
- return Pt[`${e}`];
1771
+ function oe(e) {
1772
+ return It[`${e}`];
1772
1773
  }
1773
- function kt(e) {
1774
- const r = ue(e);
1774
+ function _t(e) {
1775
+ const r = oe(e);
1775
1776
  return r ? r.filter((t) => t.required).length : 0;
1776
1777
  }
1777
- function It(e) {
1778
- const r = ue(e);
1778
+ function Lt(e) {
1779
+ const r = oe(e);
1779
1780
  return r ? r.length : 0;
1780
1781
  }
1781
- function _t(e) {
1782
- if (typeof e != "string")
1782
+ function Vt(e) {
1783
+ if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}/.test(e))
1783
1784
  return !1;
1784
- const r = Date.parse(e);
1785
- if (!(!isNaN(r) && e.length >= 10))
1785
+ const t = Date.parse(e);
1786
+ if (isNaN(t) || e.length < 10)
1786
1787
  return !1;
1787
1788
  const i = new Date(e);
1788
- return !isNaN(i.getTime()) && i.toISOString().startsWith(e.substring(0, 10));
1789
+ return !isNaN(i.getTime());
1789
1790
  }
1790
- function H(e, r, t, i) {
1791
- if (e.startsWith(T))
1791
+ function Q(e, r, t, i) {
1792
+ if (e.startsWith(x))
1792
1793
  try {
1793
- return ae(e, r, t);
1794
+ return se(e, r, t);
1794
1795
  } catch (s) {
1795
1796
  const a = s instanceof Error ? s.message : "Unknown error";
1796
1797
  throw new Error(`${i}: ${a}`);
1797
1798
  }
1798
1799
  throw new Error(
1799
- `${i}: Invalid attribute "${e}". Expected format: "${T}TableName.ColumnName[.Level]"`
1800
+ `${i}: Invalid attribute "${e}". Expected format: "${x}TableName.ColumnName[.Level]"`
1800
1801
  );
1801
1802
  }
1802
- function Lt(e) {
1803
+ function Ut(e, r, t, i) {
1804
+ if (e.startsWith(x))
1805
+ try {
1806
+ return xt(e, r, t);
1807
+ } catch (s) {
1808
+ const a = s instanceof Error ? s.message : "Unknown error";
1809
+ throw new Error(`${i}: ${a}`);
1810
+ }
1811
+ throw new Error(
1812
+ `${i}: Invalid date dimension string "${e}". Expected format: "${x}TableName.ColumnName"`
1813
+ );
1814
+ }
1815
+ function Jt(e) {
1803
1816
  const r = e.data, { argSchema: t, dataSource: i, tables: s, pathPrefix: a } = e.context, n = a;
1804
1817
  if (r === void 0) {
1805
1818
  if (t.required)
@@ -1844,7 +1857,7 @@ function Lt(e) {
1844
1857
  throw new Error(
1845
1858
  `${n}: Expected attribute string, got ${typeof r}. Example: "DM.Commerce.Revenue"`
1846
1859
  );
1847
- return H(r, i, s, n);
1860
+ return Q(r, i, s, n);
1848
1861
  case "Attribute[]":
1849
1862
  if (!Array.isArray(r))
1850
1863
  throw new Error(
@@ -1853,11 +1866,11 @@ function Lt(e) {
1853
1866
  return r.map((o, u) => {
1854
1867
  if (typeof o != "string")
1855
1868
  throw new Error(`${n}[${u}]: Expected attribute string, got ${typeof o}`);
1856
- return H(o, i, s, `${n}[${u}]`);
1869
+ return Q(o, i, s, `${n}[${u}]`);
1857
1870
  });
1858
1871
  case "Measure":
1859
1872
  case "BaseMeasure":
1860
- if (!x(r))
1873
+ if (!A(r))
1861
1874
  throw new Error(
1862
1875
  `${n}: Expected measure function call, got ${typeof r}. Example: {"function": "measureFactory.sum", "args": ["DM.Commerce.Revenue"]}`
1863
1876
  );
@@ -1871,7 +1884,7 @@ function Lt(e) {
1871
1884
  `${n}: Expected array of measure function calls, got ${typeof r}`
1872
1885
  );
1873
1886
  return r.map((o, u) => {
1874
- if (!x(o))
1887
+ if (!A(o))
1875
1888
  throw new Error(
1876
1889
  `${n}[${u}]: Expected measure function call, got ${typeof o}`
1877
1890
  );
@@ -1881,7 +1894,7 @@ function Lt(e) {
1881
1894
  });
1882
1895
  });
1883
1896
  case "Filter":
1884
- if (!x(r))
1897
+ if (!A(r))
1885
1898
  throw new Error(
1886
1899
  `${n}: Expected filter function call, got ${typeof r}. Example: {"function": "filterFactory.contains", "args": ["DM.Brand.Brand", "Apple"]}`
1887
1900
  );
@@ -1895,7 +1908,7 @@ function Lt(e) {
1895
1908
  `${n}: Expected array of filter function calls, got ${typeof r}`
1896
1909
  );
1897
1910
  return r.map((o, u) => {
1898
- if (!x(o))
1911
+ if (!A(o))
1899
1912
  throw new Error(
1900
1913
  `${n}[${u}]: Expected filter function call, got ${typeof o}`
1901
1914
  );
@@ -1907,7 +1920,7 @@ function Lt(e) {
1907
1920
  case "FilterRelationsNode":
1908
1921
  if (Array.isArray(r))
1909
1922
  return r.map((o, u) => {
1910
- if (!x(o))
1923
+ if (!A(o))
1911
1924
  throw new Error(
1912
1925
  `${n}[${u}]: Expected filter function call, got ${typeof o}`
1913
1926
  );
@@ -1916,7 +1929,7 @@ function Lt(e) {
1916
1929
  context: { dataSource: i, tables: s, pathPrefix: `${n}[${u}]: ` }
1917
1930
  });
1918
1931
  });
1919
- if (x(r))
1932
+ if (A(r))
1920
1933
  return w({
1921
1934
  data: r,
1922
1935
  context: { dataSource: i, tables: s, pathPrefix: n }
@@ -1925,16 +1938,34 @@ function Lt(e) {
1925
1938
  `${n}: Expected filter function call or array of filters, got ${typeof r}`
1926
1939
  );
1927
1940
  case "DateDimension":
1928
- case "LevelAttribute":
1941
+ if (typeof r != "string")
1942
+ throw new Error(
1943
+ `${n}: Expected date dimension string, got ${typeof r}. Example: "DM.Commerce.Date"`
1944
+ );
1945
+ return Ut(r, i, s, n);
1946
+ case "LevelAttribute": {
1929
1947
  if (typeof r != "string")
1930
1948
  throw new Error(
1931
1949
  `${n}: Expected date attribute string, got ${typeof r}. Example: "DM.Commerce.Date.Years"`
1932
1950
  );
1933
- return H(r, i, s, n);
1951
+ const o = Q(
1952
+ r,
1953
+ i,
1954
+ s,
1955
+ n
1956
+ );
1957
+ if (!Et(o))
1958
+ throw new Error(
1959
+ `${n}: Attribute must be date/datetime type, got ${J(
1960
+ o
1961
+ )} attribute`
1962
+ );
1963
+ return o;
1964
+ }
1934
1965
  case "Measure | number":
1935
1966
  if (typeof r == "number")
1936
1967
  return r;
1937
- if (x(r))
1968
+ if (A(r))
1938
1969
  return w({
1939
1970
  data: r,
1940
1971
  context: { dataSource: i, tables: s, pathPrefix: n }
@@ -1944,7 +1975,7 @@ function Lt(e) {
1944
1975
  );
1945
1976
  case "Date | string":
1946
1977
  if (typeof r == "string") {
1947
- if (_t(r))
1978
+ if (Vt(r))
1948
1979
  return r;
1949
1980
  throw new Error(
1950
1981
  `${n}: Expected valid ISO date string or Date object, got invalid date string "${r}"`
@@ -1972,10 +2003,10 @@ function Lt(e) {
1972
2003
  }
1973
2004
  }
1974
2005
  function w(e) {
1975
- const { data: r } = e, { dataSource: t, tables: i, pathPrefix: s } = e.context, { function: a, args: n } = r, o = s ? `${s}.` : "", u = ue(a);
2006
+ const { data: r } = e, { dataSource: t, tables: i, pathPrefix: s } = e.context, { function: a, args: n } = r, o = s ? `${s}.` : "", u = oe(a);
1976
2007
  if (!u)
1977
2008
  throw new Error(`${o}function: Unknown function "${a}"`);
1978
- const c = kt(a), d = It(a);
2009
+ const c = _t(a), d = Lt(a);
1979
2010
  if (n.length < c)
1980
2011
  throw new Error(
1981
2012
  `${o}function: Expected at least ${c} arguments, got ${n.length}`
@@ -1984,38 +2015,38 @@ function w(e) {
1984
2015
  throw new Error(
1985
2016
  `${o}function: Expected at most ${d} arguments, got ${n.length}`
1986
2017
  );
1987
- const g = [], p = [];
2018
+ const g = [], y = [];
1988
2019
  for (let f = 0; f < Math.max(n.length, u.length); f++) {
1989
- const y = u[`${f}`], C = n[`${f}`], B = o ? `${o}args[${f}]` : `args[${f}]`;
2020
+ const p = u[`${f}`], C = n[`${f}`], T = o ? `${o}args[${f}]` : `args[${f}]`;
1990
2021
  if (C === void 0) {
1991
- y != null && y.required && p.push(`${B}: Missing required argument (expected ${y.type})`);
2022
+ p != null && p.required && y.push(`${T}: Missing required argument (expected ${p.type})`);
1992
2023
  continue;
1993
2024
  }
1994
- if (!y) {
1995
- p.push(`${B}: Unexpected argument`);
2025
+ if (!p) {
2026
+ y.push(`${T}: Unexpected argument`);
1996
2027
  continue;
1997
2028
  }
1998
2029
  try {
1999
- const S = Lt({
2030
+ const N = Jt({
2000
2031
  data: C,
2001
2032
  context: {
2002
2033
  dataSource: t,
2003
2034
  tables: i,
2004
- pathPrefix: B,
2005
- argSchema: y
2035
+ pathPrefix: T,
2036
+ argSchema: p
2006
2037
  }
2007
2038
  });
2008
- g.push(S);
2009
- } catch (S) {
2010
- const Ie = S instanceof Error ? S.message : "Unknown error";
2011
- p.push(Ie);
2039
+ g.push(N);
2040
+ } catch (N) {
2041
+ const Le = N instanceof Error ? N.message : "Unknown error";
2042
+ y.push(Le);
2012
2043
  }
2013
2044
  }
2014
- if (p.length > 0) {
2015
- const f = p.join("; ");
2045
+ if (y.length > 0) {
2046
+ const f = y.join("; ");
2016
2047
  throw new Error(f);
2017
2048
  }
2018
- const b = Bt(a);
2049
+ const b = kt(a);
2019
2050
  if (b)
2020
2051
  try {
2021
2052
  b(g, {
@@ -2024,16 +2055,16 @@ function w(e) {
2024
2055
  pathPrefix: o
2025
2056
  });
2026
2057
  } catch (f) {
2027
- const y = f instanceof Error ? f.message : "Unknown validation error";
2028
- throw new Error(y);
2058
+ const p = f instanceof Error ? f.message : "Unknown validation error";
2059
+ throw new Error(p);
2029
2060
  }
2030
- return Dt(a, g);
2061
+ return Rt(a, g);
2031
2062
  }
2032
- function ke(e) {
2063
+ function _e(e) {
2033
2064
  const { attribute: r, config: t } = e;
2034
- if (ee(e) && zr(r)) {
2065
+ if (G(e) && zr(r)) {
2035
2066
  const { granularity: i } = r;
2036
- return Nr(
2067
+ return Or(
2037
2068
  r,
2038
2069
  e.members.map((s) => i === "Years" && !isNaN(Number(s)) ? `${s}-01-01T00:00:00` : s),
2039
2070
  t
@@ -2041,13 +2072,13 @@ function ke(e) {
2041
2072
  }
2042
2073
  return e;
2043
2074
  }
2044
- function Vt(e) {
2075
+ function jt(e) {
2045
2076
  let r = [];
2046
2077
  for (const t of e)
2047
- L(t) ? r = fe(t, r) : r = fe([ke(t)], r);
2078
+ _(t) ? r = ce(t, r) : r = ce([_e(t)], r);
2048
2079
  return r != null ? r : [];
2049
2080
  }
2050
- const Ut = (e) => {
2081
+ const Wt = (e) => {
2051
2082
  const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
2052
2083
  return r.forEach((n, o) => {
2053
2084
  const u = {
@@ -2060,15 +2091,15 @@ const Ut = (e) => {
2060
2091
  data: n,
2061
2092
  context: { dataSource: t, tables: i, pathPrefix: "" }
2062
2093
  });
2063
- !L(c) && !J(c) ? a.push(q(h({}, u), { message: "Invalid filter JSON" })) : s.push(c);
2094
+ !_(c) && !U(c) ? a.push(q(h({}, u), { message: "Invalid filter JSON" })) : s.push(c);
2064
2095
  } catch (c) {
2065
2096
  const d = c instanceof Error ? c.message : "Unknown error";
2066
2097
  a.push(q(h({}, u), { message: d }));
2067
2098
  }
2068
- }), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: Vt(s) };
2069
- }, Jt = (e) => {
2099
+ }), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: jt(s) };
2100
+ }, Kt = (e) => {
2070
2101
  const { data: r } = e, { dataSource: t, tables: i } = e.context;
2071
- return r ? ne(r) ? Ut({
2102
+ return r ? ie(r) ? Wt({
2072
2103
  data: r,
2073
2104
  context: { dataSource: t, tables: i }
2074
2105
  }) : {
@@ -2082,7 +2113,7 @@ const Ut = (e) => {
2082
2113
  }
2083
2114
  ]
2084
2115
  } : { success: !0, data: [] };
2085
- }, Wt = (e) => {
2116
+ }, Qt = (e) => {
2086
2117
  const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
2087
2118
  return r.forEach((n, o) => {
2088
2119
  const u = {
@@ -2095,15 +2126,15 @@ const Ut = (e) => {
2095
2126
  data: n,
2096
2127
  context: { dataSource: t, tables: i, pathPrefix: "" }
2097
2128
  });
2098
- J(c) ? s.push(ke(c)) : a.push(q(h({}, u), { message: "Invalid filter JSON" }));
2129
+ U(c) ? s.push(_e(c)) : a.push(q(h({}, u), { message: "Invalid filter JSON" }));
2099
2130
  } catch (c) {
2100
2131
  const d = c instanceof Error ? c.message : "Unknown error";
2101
2132
  a.push(q(h({}, u), { message: d }));
2102
2133
  }
2103
2134
  }), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
2104
- }, jt = (e) => {
2135
+ }, Yt = (e) => {
2105
2136
  const { data: r } = e, { dataSource: t, tables: i } = e.context;
2106
- return r ? ne(r) ? Wt({
2137
+ return r ? ie(r) ? Qt({
2107
2138
  data: r,
2108
2139
  context: { dataSource: t, tables: i }
2109
2140
  }) : {
@@ -2117,7 +2148,7 @@ const Ut = (e) => {
2117
2148
  }
2118
2149
  ]
2119
2150
  } : { success: !0, data: [] };
2120
- }, Kt = (e) => {
2151
+ }, Ht = (e) => {
2121
2152
  const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = [];
2122
2153
  return r.forEach((n, o) => {
2123
2154
  const u = {
@@ -2136,9 +2167,9 @@ const Ut = (e) => {
2136
2167
  a.push(q(h({}, u), { message: d }));
2137
2168
  }
2138
2169
  }), a.length > 0 ? { success: !1, errors: a } : { success: !0, data: s };
2139
- }, Qt = (e) => {
2170
+ }, Xt = (e) => {
2140
2171
  const { data: r } = e, { dataSource: t, tables: i } = e.context;
2141
- return r ? ne(r) ? Kt({
2172
+ return r ? ie(r) ? Ht({
2142
2173
  data: r,
2143
2174
  context: { dataSource: t, tables: i }
2144
2175
  }) : {
@@ -2152,29 +2183,29 @@ const Ut = (e) => {
2152
2183
  }
2153
2184
  ]
2154
2185
  } : { success: !0, data: [] };
2155
- }, ei = (e) => {
2186
+ }, ii = (e) => {
2156
2187
  const { data: r } = e, { dataSource: t, tables: i } = e.context, s = [], a = (g) => {
2157
- const p = g();
2158
- return p.success ? p.data : (s.push(...p.errors), null);
2188
+ const y = g();
2189
+ return y.success ? y.data : (s.push(...y.errors), null);
2159
2190
  }, n = a(
2160
- () => At({
2191
+ () => Ct({
2161
2192
  data: r.dimensions || [],
2162
2193
  context: { dataSource: t, tables: i }
2163
2194
  })
2164
2195
  ), o = a(
2165
- () => Qt({
2196
+ () => Xt({
2166
2197
  data: r.measures || [],
2167
2198
  context: { dataSource: t, tables: i }
2168
2199
  })
2169
2200
  ), u = a(
2170
- () => Jt({
2201
+ () => Kt({
2171
2202
  data: r.filters || [],
2172
2203
  context: { dataSource: t, tables: i }
2173
2204
  })
2174
2205
  );
2175
2206
  let c = null;
2176
2207
  return r.highlights && (c = a(
2177
- () => jt({
2208
+ () => Yt({
2178
2209
  data: r.highlights || [],
2179
2210
  context: { dataSource: t, tables: i }
2180
2211
  })
@@ -2184,15 +2215,15 @@ const Ut = (e) => {
2184
2215
  } : {
2185
2216
  success: !0,
2186
2217
  data: h({
2187
- dataSource: Or(t),
2218
+ dataSource: Tr(t),
2188
2219
  dimensions: n || [],
2189
2220
  measures: o || [],
2190
2221
  filters: u || []
2191
2222
  }, c && { highlights: c })
2192
2223
  };
2193
2224
  };
2194
- function Yt(e) {
2195
- const { filters: r, relations: t } = Pr(
2225
+ function Zt(e) {
2226
+ const { filters: r, relations: t } = kr(
2196
2227
  e.filters || []
2197
2228
  );
2198
2229
  return {
@@ -2205,18 +2236,18 @@ function Yt(e) {
2205
2236
  // No count/offset/ungroup - these are execution concerns, not translation concerns
2206
2237
  };
2207
2238
  }
2208
- function ri(e, r, t = !1) {
2209
- const i = Yt(e), s = Tr(i, r);
2210
- return Br(s, t);
2239
+ function si(e, r, t = !1) {
2240
+ const i = Zt(e), s = Br(i, r);
2241
+ return Pr(s, t);
2211
2242
  }
2212
2243
  export {
2213
- vt as CustomSuperJSON,
2214
- si as EMPTY_EXPANDED_QUERY_MODEL,
2215
- ni as EMPTY_SIMPLE_QUERY_MODEL,
2216
- ai as isByIdDashboardCodeParams,
2217
- oi as isByIdWidgetCodeParams,
2218
- ui as isClientSideDashboardCodeParams,
2219
- li as isClientSideWidgetCodeParams,
2220
- ei as translateQueryJSON,
2221
- ri as translateQueryToJaql
2244
+ ti as CustomSuperJSON,
2245
+ oi as EMPTY_EXPANDED_QUERY_MODEL,
2246
+ ui as EMPTY_SIMPLE_QUERY_MODEL,
2247
+ li as isByIdDashboardCodeParams,
2248
+ ci as isByIdWidgetCodeParams,
2249
+ fi as isClientSideDashboardCodeParams,
2250
+ di as isClientSideWidgetCodeParams,
2251
+ ii as translateQueryJSON,
2252
+ si as translateQueryToJaql
2222
2253
  };