@sisense/sdk-ui 2.24.0 → 2.26.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 (173) hide show
  1. package/dist/ai.cjs +59 -59
  2. package/dist/ai.js +1097 -1171
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +587 -616
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{execute-query-b9oy2Egy.js → apply-styled-options-to-query-Bzt2GrgO.js} +1635 -1530
  8. package/dist/apply-styled-options-to-query-COD9fRYD.cjs +1 -0
  9. package/dist/{dimensions-C1R5YRt-.js → dimensions-Ce2zWFrs.js} +1 -1
  10. package/dist/dimensions-u3w5qNF0.cjs +1 -0
  11. package/dist/{index-Ck-0gJC9.cjs → index-BX9p-XrU.cjs} +1 -1
  12. package/dist/{index-r66Tjiqj.js → index-D7mHzfx0.js} +9 -0
  13. package/dist/index.cjs +467 -452
  14. package/dist/index.js +27214 -34168
  15. package/dist/index.umd.js +718 -706
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -0
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +12 -1
  18. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +17 -5
  19. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +16 -1
  20. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
  21. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +1 -1
  22. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +1 -1
  23. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
  24. package/dist/packages/sdk-ui/src/domains/dashboarding/index.d.ts +2 -0
  25. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/persistence-manager.d.ts +11 -0
  26. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +52 -0
  27. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +5 -28
  28. package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +6 -5
  29. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
  30. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
  31. package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
  32. package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-collapsible.d.ts +13 -0
  33. package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-top-slot-shell.d.ts +21 -0
  34. package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative-interactive.d.ts +11 -0
  35. package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +40 -0
  36. package/dist/packages/sdk-ui/src/domains/narrative/core/build-narrative-request.d.ts +36 -0
  37. package/dist/packages/sdk-ui/src/domains/narrative/core/get-narrative-dimensions-and-measures.d.ts +22 -0
  38. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +29 -0
  39. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +36 -0
  40. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +62 -0
  41. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +39 -0
  42. package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
  43. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
  44. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
  45. package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
  46. package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
  47. package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
  48. package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
  49. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
  50. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
  51. package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
  52. package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
  53. package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
  54. package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
  55. package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
  56. package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
  57. package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
  58. package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
  59. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
  60. package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
  61. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/apply-styled-options-to-query.d.ts +87 -0
  62. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/translate-data-options.d.ts +13 -1
  63. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
  64. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
  65. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
  66. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
  67. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
  68. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
  69. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +32 -0
  70. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +9 -0
  71. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +26 -0
  72. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +16 -0
  73. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill-bubble-tooltip.d.ts +12 -0
  74. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +18 -0
  75. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/types.d.ts +51 -0
  76. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +166 -2
  77. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +18 -0
  78. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
  79. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +9 -0
  80. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
  81. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
  82. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
  83. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +170 -0
  84. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/utils.d.ts +9 -0
  85. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +13 -16
  86. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-api-types.d.ts +32 -0
  87. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-constants.d.ts +6 -0
  88. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +26 -0
  89. package/dist/packages/sdk-ui/src/infra/api/narrative/send-ai-feedback.d.ts +8 -0
  90. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
  91. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +10 -2
  92. package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
  93. package/dist/packages/sdk-ui/src/infra/contexts/emotion-cache-provider/emotion-cache-provider.d.ts +31 -3
  94. package/dist/packages/sdk-ui/src/infra/contexts/emotion-cache-provider/stylis-plugins/css-selector-prefix-plugin.d.ts +18 -0
  95. package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
  96. package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
  97. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +9 -0
  98. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +9 -0
  99. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +9 -0
  100. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +9 -0
  101. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +9 -0
  102. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +9 -0
  103. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +9 -0
  104. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +9 -0
  105. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +9 -0
  106. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +9 -0
  107. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +9 -0
  108. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +9 -0
  109. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +9 -0
  110. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +9 -0
  111. package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +9 -0
  112. package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +18 -0
  113. package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
  114. package/dist/packages/sdk-ui/src/modules/ai/api/types.d.ts +5 -18
  115. package/dist/packages/sdk-ui/src/modules/ai/chart/nlq-chart-widget.d.ts +2 -0
  116. package/dist/packages/sdk-ui/src/modules/ai/common/collapsible.d.ts +3 -0
  117. package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +5 -13
  118. package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +2 -1
  119. package/dist/packages/sdk-ui/src/modules/ai/use-get-nlg-insights.d.ts +4 -26
  120. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +3 -7
  121. package/dist/packages/sdk-ui/src/props.d.ts +1 -1
  122. package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
  123. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +7 -1
  124. package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
  125. package/dist/packages/sdk-ui/src/types.d.ts +8 -8
  126. package/dist/translations/de-de.cjs +1 -1
  127. package/dist/translations/de-de.js +10 -1
  128. package/dist/translations/en-us.cjs +1 -1
  129. package/dist/translations/en-us.js +1 -1
  130. package/dist/translations/es-ar.cjs +1 -1
  131. package/dist/translations/es-ar.js +10 -1
  132. package/dist/translations/es-es.cjs +1 -1
  133. package/dist/translations/es-es.js +10 -1
  134. package/dist/translations/fr-fr.cjs +1 -1
  135. package/dist/translations/fr-fr.js +10 -1
  136. package/dist/translations/it-it.cjs +1 -1
  137. package/dist/translations/it-it.js +12 -3
  138. package/dist/translations/ja-jp.cjs +1 -1
  139. package/dist/translations/ja-jp.js +12 -3
  140. package/dist/translations/ko-kr.cjs +1 -1
  141. package/dist/translations/ko-kr.js +12 -3
  142. package/dist/translations/nl-nl.cjs +1 -1
  143. package/dist/translations/nl-nl.js +12 -3
  144. package/dist/translations/pt-br.cjs +1 -1
  145. package/dist/translations/pt-br.js +10 -1
  146. package/dist/translations/ru-ru.cjs +1 -1
  147. package/dist/translations/ru-ru.js +12 -3
  148. package/dist/translations/tr-tr.cjs +1 -1
  149. package/dist/translations/tr-tr.js +10 -1
  150. package/dist/translations/zh-cn.cjs +1 -1
  151. package/dist/translations/zh-cn.js +12 -3
  152. package/dist/types-COBvZZm_.cjs +1 -0
  153. package/dist/{types-DJtC8_5_.js → types-D6jCGncV.js} +1 -1
  154. package/dist/{quota-notification-CeKnEyQG.js → use-hover-B1HPf4hF.js} +27827 -19390
  155. package/dist/use-hover-CaQrW_gv.cjs +721 -0
  156. package/dist/{utils-BCp2ISWh.js → utils-BQtueE3Z.js} +13632 -13251
  157. package/dist/utils-CAubp1g1.cjs +179 -0
  158. package/dist/{widget-composer-CDNL9_XF.js → widget-composer-BAJFWk3t.js} +3 -3
  159. package/dist/{widget-composer-BkHZISs7.cjs → widget-composer-C75b-E6W.cjs} +1 -1
  160. package/package.json +11 -10
  161. package/dist/dimensions-C7yXAoZs.cjs +0 -1
  162. package/dist/execute-query-0Y9Fn9Pf.cjs +0 -1
  163. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
  164. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
  165. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
  166. package/dist/packages/sdk-ui/src/infra/styled/index.d.ts +0 -4
  167. package/dist/packages/sdk-ui/src/infra/styled/with-css-selector-prefix.d.ts +0 -2
  168. package/dist/packages/sdk-ui/src/modules/ai/api/narration-endpoints.d.ts +0 -25
  169. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +0 -8
  170. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/parse-compose-code.d.ts +0 -34
  171. package/dist/quota-notification-BqRYSJ7r.cjs +0 -713
  172. package/dist/types-C0QU2tsE.cjs +0 -1
  173. package/dist/utils-D8O1_kl3.cjs +0 -190
@@ -1,19 +1,19 @@
1
1
  var Vt = Object.defineProperty, Wt = Object.defineProperties;
2
2
  var jt = Object.getOwnPropertyDescriptors;
3
- var Ue = Object.getOwnPropertySymbols;
3
+ var ke = Object.getOwnPropertySymbols;
4
4
  var Kt = Object.prototype.hasOwnProperty, Gt = Object.prototype.propertyIsEnumerable;
5
- var _e = (e, t, r) => t in e ? Vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, y = (e, t) => {
5
+ var Be = (e, t, r) => t in e ? Vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, y = (e, t) => {
6
6
  for (var r in t || (t = {}))
7
- Kt.call(t, r) && _e(e, r, t[r]);
8
- if (Ue)
9
- for (var r of Ue(t))
10
- Gt.call(t, r) && _e(e, r, t[r]);
7
+ Kt.call(t, r) && Be(e, r, t[r]);
8
+ if (ke)
9
+ for (var r of ke(t))
10
+ Gt.call(t, r) && Be(e, r, t[r]);
11
11
  return e;
12
- }, F = (e, t) => Wt(e, jt(t));
13
- import { f as Yt, J as Jt } from "../types-DJtC8_5_.js";
14
- import { b as pi, E as gi, a as yi, i as hi, e as bi, d as Ai } from "../types-DJtC8_5_.js";
15
- import { cb as Ht, bK as Qt, cc as Xt, cd as Zt, ce as er, aG as Fe, cf as tr, aF as rr, cg as sr, bi as nr, aH as ir, ch as or, bl as ar, bj as ur, aV as cr, bh as lr, bk as fr, d as dr, c as mr, k as pr, ci as gr, cj as yr, ck as hr, cl as br, cm as Ar, cn as Fr, co as wr, cp as Er, cq as Cr, cr as Tr, cs as qr, aE as xr, ct as $r, cu as Sr, S as B, t as X, h as Or, b as $, av as _, at as se, cv as Dr, cw as Mr, cx as Nr, M as U, cy as Rr, cz as vr, aR as Ir, ax as Ve, aw as we, bQ as ne, U as Pr, V as kr, cA as it, ag as Br, A as zr, cB as Lr, y as Ur, x as _r } from "../execute-query-b9oy2Egy.js";
16
- import { i as Vr, b as Wr, D as jr, d as Kr, a as Gr } from "../dimensions-C1R5YRt-.js";
12
+ }, w = (e, t) => Wt(e, jt(t));
13
+ import { f as Yt, J as Jt } from "../types-D6jCGncV.js";
14
+ import { b as li, E as fi, a as di, i as mi, e as pi, d as gi } from "../types-D6jCGncV.js";
15
+ import { cg as Ht, bs as Qt, ch as Xt, ci as Zt, cj as er, aw as be, ck as tr, av as rr, cl as sr, bb as nr, ax as ir, cm as or, be as ar, bc as ur, aO as cr, ba as lr, bd as fr, d as dr, c as mr, k as pr, cn as gr, co as yr, cp as hr, cq as br, cr as Ar, cs as wr, ct as Fr, cu as Er, cv as Cr, cw as qr, cx as Tr, au as xr, cy as $r, cz as Sr, S as B, t as X, h as Or, b as $, al as _, ak as tt, cA as Dr, cB as Mr, cC as Nr, M as U, cD as Rr, cE as vr, aK as Ir, an as ze, am as Ae, cd as Pr, ce as kr, bP as rt, cF as st, ad as Br, cG as nt, cH as it, A as zr, cI as Lr, bG as Ur, aD as _r } from "../apply-styled-options-to-query-Bzt2GrgO.js";
16
+ import { i as Vr, b as Wr, D as jr, d as Kr, a as Gr } from "../dimensions-Ce2zWFrs.js";
17
17
  function Yr(e, t) {
18
18
  const r = e.length, s = t.length, n = Array.from({ length: r + 1 }, (i, o) => Array.from({ length: s + 1 }, (a, u) => o === 0 ? u : u === 0 ? o : 0));
19
19
  for (let i = 1; i <= r; i++)
@@ -21,7 +21,152 @@ function Yr(e, t) {
21
21
  n[i][o] = Math.min(n[i - 1][o] + 1, n[i][o - 1] + 1, n[i - 1][o - 1] + (e[i - 1] === t[o - 1] ? 0 : 1));
22
22
  return n[r][s];
23
23
  }
24
- class Jr {
24
+ function we(e, t) {
25
+ const r = [];
26
+ let s = "", n = 0, i = !1, o = null;
27
+ for (let a = 0; a < e.length; a++) {
28
+ const u = e[a], c = e[a + 1];
29
+ if (i) {
30
+ if (u !== o) {
31
+ s += u;
32
+ continue;
33
+ }
34
+ if (c === o) {
35
+ s += u + c, a++;
36
+ continue;
37
+ }
38
+ i = !1, o = null, s += u;
39
+ continue;
40
+ } else {
41
+ if (u === "'" || u === '"') {
42
+ i = !0, o = u, s += u;
43
+ continue;
44
+ }
45
+ if ("([{".includes(u) && n++, ")]}".includes(u) && n--, u === t && n === 0) {
46
+ r.push(s.trim()), s = "";
47
+ continue;
48
+ }
49
+ }
50
+ s += u;
51
+ }
52
+ return s.trim() && r.push(s.trim()), r;
53
+ }
54
+ function Jr(e, t) {
55
+ let r = 0, s = !1, n = null;
56
+ for (let i = 0; i < e.length; i++) {
57
+ const o = e[i], a = e[i + 1];
58
+ if (s) {
59
+ if (o !== n)
60
+ continue;
61
+ if (a === n) {
62
+ i++;
63
+ continue;
64
+ }
65
+ s = !1, n = null;
66
+ } else {
67
+ if (o === "'" || o === '"') {
68
+ s = !0, n = o;
69
+ continue;
70
+ }
71
+ if ("([{".includes(o) && r++, ")]}".includes(o) && r--, o === t && r === 0)
72
+ return i;
73
+ }
74
+ }
75
+ return -1;
76
+ }
77
+ function Hr(e, t) {
78
+ if (e[t] !== "(")
79
+ return -1;
80
+ let r = 1, s = t + 1, n = !1, i = null;
81
+ for (; s < e.length; ) {
82
+ const o = e[s], a = e[s + 1];
83
+ if (n) {
84
+ if (o !== i) {
85
+ s++;
86
+ continue;
87
+ }
88
+ if (a === i) {
89
+ s += 2;
90
+ continue;
91
+ }
92
+ n = !1, i = null, s++;
93
+ } else {
94
+ if (o === "'" || o === '"') {
95
+ n = !0, i = o, s++;
96
+ continue;
97
+ }
98
+ if ("([{".includes(o) && r++, ")]}".includes(o) && --r === 0)
99
+ return s;
100
+ s++;
101
+ }
102
+ }
103
+ return -1;
104
+ }
105
+ function Qr(e) {
106
+ return e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e;
107
+ }
108
+ function V(e) {
109
+ if (!e || typeof e != "string")
110
+ throw new Error(`Invalid composeCode: expected non-empty string, got ${typeof e}`);
111
+ const t = e.trim();
112
+ if (!t)
113
+ throw new Error("Invalid composeCode: empty string");
114
+ const r = t.match(/^([a-zA-Z_$][a-zA-Z0-9_.$]*)\s*\((.*)\)$/);
115
+ if (!r)
116
+ throw new Error(`Invalid composeCode format: expected function call, got '${t}'`);
117
+ const s = r[1], n = r[2], i = ot(n);
118
+ return {
119
+ function: s,
120
+ args: i
121
+ };
122
+ }
123
+ function ot(e) {
124
+ return e.trim() ? we(e, ",").map(at) : [];
125
+ }
126
+ function at(e) {
127
+ if (!e)
128
+ throw new Error("Cannot parse empty argument value");
129
+ if (e === "null")
130
+ return null;
131
+ if (e === "undefined")
132
+ return;
133
+ if (e === "true")
134
+ return !0;
135
+ if (e === "false")
136
+ return !1;
137
+ if (e.match(/^-?\d+(\.\d+)?$/))
138
+ return parseFloat(e);
139
+ if (e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"')) {
140
+ const r = e[0];
141
+ return e.slice(1, -1).replace(new RegExp(`${r}${r}`, "g"), r);
142
+ }
143
+ if (e.startsWith("[") && e.endsWith("]")) {
144
+ const r = e.slice(1, -1).trim();
145
+ if (!r)
146
+ return [];
147
+ const s = ot(r);
148
+ return s.every((n) => typeof n == "string"), s;
149
+ }
150
+ if (e.startsWith("{") && e.endsWith("}")) {
151
+ const r = e.slice(1, -1).trim();
152
+ return r ? Zr(r) : {};
153
+ }
154
+ return e.includes("(") && e.includes(")") ? V(e) : (e.startsWith("DM."), e);
155
+ }
156
+ function Xr(e) {
157
+ const t = Jr(e, ":");
158
+ if (t === -1)
159
+ throw new Error(`Invalid object property: expected 'key: value', got '${e}'`);
160
+ const r = Qr(e.slice(0, t).trim()), s = at(e.slice(t + 1).trim());
161
+ return [r, s];
162
+ }
163
+ function Zr(e) {
164
+ if (!e.trim())
165
+ return {};
166
+ const t = we(e, ",").map(Xr).filter(([, r]) => r !== null);
167
+ return Object.fromEntries(t);
168
+ }
169
+ class es {
25
170
  constructor() {
26
171
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
27
172
  }
@@ -38,9 +183,9 @@ class Jr {
38
183
  this.keyToValue.clear(), this.valueToKey.clear();
39
184
  }
40
185
  }
41
- class ot {
186
+ class ut {
42
187
  constructor(t) {
43
- this.generateIdentifier = t, this.kv = new Jr();
188
+ this.generateIdentifier = t, this.kv = new es();
44
189
  }
45
190
  register(t, r) {
46
191
  this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
@@ -55,7 +200,7 @@ class ot {
55
200
  return this.kv.getByKey(t);
56
201
  }
57
202
  }
58
- class Hr extends ot {
203
+ class ts extends ut {
59
204
  constructor() {
60
205
  super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
61
206
  }
@@ -66,7 +211,7 @@ class Hr extends ot {
66
211
  return this.classToAllowedProps.get(t);
67
212
  }
68
213
  }
69
- function Qr(e) {
214
+ function rs(e) {
70
215
  if ("values" in Object)
71
216
  return Object.values(e);
72
217
  const t = [];
@@ -74,8 +219,8 @@ function Qr(e) {
74
219
  e.hasOwnProperty(r) && t.push(e[r]);
75
220
  return t;
76
221
  }
77
- function Xr(e, t) {
78
- const r = Qr(e);
222
+ function ss(e, t) {
223
+ const r = rs(e);
79
224
  if ("find" in r)
80
225
  return r.find(t);
81
226
  const s = r;
@@ -85,20 +230,20 @@ function Xr(e, t) {
85
230
  return i;
86
231
  }
87
232
  }
88
- function V(e, t) {
233
+ function W(e, t) {
89
234
  Object.entries(e).forEach(([r, s]) => t(s, r));
90
235
  }
91
236
  function ee(e, t) {
92
237
  return e.indexOf(t) !== -1;
93
238
  }
94
- function We(e, t) {
239
+ function Le(e, t) {
95
240
  for (let r = 0; r < e.length; r++) {
96
241
  const s = e[r];
97
242
  if (t(s))
98
243
  return s;
99
244
  }
100
245
  }
101
- class Zr {
246
+ class ns {
102
247
  constructor() {
103
248
  this.transfomers = {};
104
249
  }
@@ -106,13 +251,13 @@ class Zr {
106
251
  this.transfomers[t.name] = t;
107
252
  }
108
253
  findApplicable(t) {
109
- return Xr(this.transfomers, (r) => r.isApplicable(t));
254
+ return ss(this.transfomers, (r) => r.isApplicable(t));
110
255
  }
111
256
  findByName(t) {
112
257
  return this.transfomers[t];
113
258
  }
114
259
  }
115
- const es = (e) => Object.prototype.toString.call(e).slice(8, -1), at = (e) => typeof e == "undefined", ts = (e) => e === null, G = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, pe = (e) => G(e) && Object.keys(e).length === 0, I = (e) => Array.isArray(e), rs = (e) => typeof e == "string", ss = (e) => typeof e == "number" && !isNaN(e), ns = (e) => typeof e == "boolean", is = (e) => e instanceof RegExp, Y = (e) => e instanceof Map, J = (e) => e instanceof Set, ut = (e) => es(e) === "Symbol", os = (e) => e instanceof Date && !isNaN(e.valueOf()), as = (e) => e instanceof Error, je = (e) => typeof e == "number" && isNaN(e), us = (e) => ns(e) || ts(e) || at(e) || ss(e) || rs(e) || ut(e), cs = (e) => typeof e == "bigint", ls = (e) => e === 1 / 0 || e === -1 / 0, fs = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ds = (e) => e instanceof URL, ct = (e) => e.replace(/\./g, "\\."), ce = (e) => e.map(String).map(ct).join("."), K = (e) => {
260
+ const is = (e) => Object.prototype.toString.call(e).slice(8, -1), ct = (e) => typeof e == "undefined", os = (e) => e === null, G = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, de = (e) => G(e) && Object.keys(e).length === 0, I = (e) => Array.isArray(e), as = (e) => typeof e == "string", us = (e) => typeof e == "number" && !isNaN(e), cs = (e) => typeof e == "boolean", ls = (e) => e instanceof RegExp, Y = (e) => e instanceof Map, J = (e) => e instanceof Set, lt = (e) => is(e) === "Symbol", fs = (e) => e instanceof Date && !isNaN(e.valueOf()), ds = (e) => e instanceof Error, Ue = (e) => typeof e == "number" && isNaN(e), ms = (e) => cs(e) || os(e) || ct(e) || us(e) || as(e) || lt(e), ps = (e) => typeof e == "bigint", gs = (e) => e === 1 / 0 || e === -1 / 0, ys = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), hs = (e) => e instanceof URL, ft = (e) => e.replace(/\./g, "\\."), ae = (e) => e.map(String).map(ft).join("."), K = (e) => {
116
261
  const t = [];
117
262
  let r = "";
118
263
  for (let n = 0; n < e.length; n++) {
@@ -138,12 +283,12 @@ function v(e, t, r, s) {
138
283
  untransform: s
139
284
  };
140
285
  }
141
- const lt = [
142
- v(at, "undefined", () => null, () => {
286
+ const dt = [
287
+ v(ct, "undefined", () => null, () => {
143
288
  }),
144
- v(cs, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
145
- v(os, "Date", (e) => e.toISOString(), (e) => new Date(e)),
146
- v(as, "Error", (e, t) => {
289
+ v(ps, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
290
+ v(fs, "Date", (e) => e.toISOString(), (e) => new Date(e)),
291
+ v(ds, "Error", (e, t) => {
147
292
  const r = {
148
293
  name: e.name,
149
294
  message: e.message
@@ -157,7 +302,7 @@ const lt = [
157
302
  r[s] = e[s];
158
303
  }), r;
159
304
  }),
160
- v(is, "regexp", (e) => "" + e, (e) => {
305
+ v(ls, "regexp", (e) => "" + e, (e) => {
161
306
  const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
162
307
  return new RegExp(t, r);
163
308
  }),
@@ -170,11 +315,11 @@ const lt = [
170
315
  (e) => new Set(e)
171
316
  ),
172
317
  v(Y, "map", (e) => [...e.entries()], (e) => new Map(e)),
173
- v((e) => je(e) || ls(e), "number", (e) => je(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
318
+ v((e) => Ue(e) || gs(e), "number", (e) => Ue(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
174
319
  v((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
175
- v(ds, "URL", (e) => e.toString(), (e) => new URL(e))
320
+ v(hs, "URL", (e) => e.toString(), (e) => new URL(e))
176
321
  ];
177
- function ie(e, t, r, s) {
322
+ function se(e, t, r, s) {
178
323
  return {
179
324
  isApplicable: e,
180
325
  annotation: t,
@@ -182,12 +327,12 @@ function ie(e, t, r, s) {
182
327
  untransform: s
183
328
  };
184
329
  }
185
- const ft = ie((e, t) => ut(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
330
+ const mt = se((e, t) => lt(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
186
331
  const s = r.symbolRegistry.getValue(t[1]);
187
332
  if (!s)
188
333
  throw new Error("Trying to deserialize unknown symbol");
189
334
  return s;
190
- }), ms = [
335
+ }), bs = [
191
336
  Int8Array,
192
337
  Uint8Array,
193
338
  Int16Array,
@@ -197,16 +342,16 @@ const ft = ie((e, t) => ut(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
197
342
  Float32Array,
198
343
  Float64Array,
199
344
  Uint8ClampedArray
200
- ].reduce((e, t) => (e[t.name] = t, e), {}), dt = ie(fs, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
201
- const r = ms[t[1]];
345
+ ].reduce((e, t) => (e[t.name] = t, e), {}), pt = se(ys, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
346
+ const r = bs[t[1]];
202
347
  if (!r)
203
348
  throw new Error("Trying to deserialize unknown typed array");
204
349
  return new r(e);
205
350
  });
206
- function mt(e, t) {
351
+ function gt(e, t) {
207
352
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
208
353
  }
209
- const pt = ie(mt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
354
+ const yt = se(gt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
210
355
  const r = t.classRegistry.getAllowedProps(e.constructor);
211
356
  if (!r)
212
357
  return y({}, e);
@@ -219,44 +364,44 @@ const pt = ie(mt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructo
219
364
  if (!s)
220
365
  throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
221
366
  return Object.assign(Object.create(s.prototype), e);
222
- }), gt = ie((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
367
+ }), ht = se((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
223
368
  const s = r.customTransformerRegistry.findByName(t[1]);
224
369
  if (!s)
225
370
  throw new Error("Trying to deserialize unknown custom value");
226
371
  return s.deserialize(e);
227
- }), ps = [pt, ft, gt, dt], Ke = (e, t) => {
228
- const r = We(ps, (n) => n.isApplicable(e, t));
372
+ }), As = [yt, mt, ht, pt], _e = (e, t) => {
373
+ const r = Le(As, (n) => n.isApplicable(e, t));
229
374
  if (r)
230
375
  return {
231
376
  value: r.transform(e, t),
232
377
  type: r.annotation(e, t)
233
378
  };
234
- const s = We(lt, (n) => n.isApplicable(e, t));
379
+ const s = Le(dt, (n) => n.isApplicable(e, t));
235
380
  if (s)
236
381
  return {
237
382
  value: s.transform(e, t),
238
383
  type: s.annotation
239
384
  };
240
- }, yt = {};
241
- lt.forEach((e) => {
242
- yt[e.annotation] = e;
385
+ }, bt = {};
386
+ dt.forEach((e) => {
387
+ bt[e.annotation] = e;
243
388
  });
244
- const gs = (e, t, r) => {
389
+ const ws = (e, t, r) => {
245
390
  if (I(t))
246
391
  switch (t[0]) {
247
392
  case "symbol":
248
- return ft.untransform(e, t, r);
393
+ return mt.untransform(e, t, r);
249
394
  case "class":
250
- return pt.untransform(e, t, r);
395
+ return yt.untransform(e, t, r);
251
396
  case "custom":
252
- return gt.untransform(e, t, r);
397
+ return ht.untransform(e, t, r);
253
398
  case "typed-array":
254
- return dt.untransform(e, t, r);
399
+ return pt.untransform(e, t, r);
255
400
  default:
256
401
  throw new Error("Unknown transformation: " + t);
257
402
  }
258
403
  else {
259
- const s = yt[t];
404
+ const s = bt[t];
260
405
  if (!s)
261
406
  throw new Error("Unknown transformation: " + t);
262
407
  return s.untransform(e, r);
@@ -269,7 +414,7 @@ const gs = (e, t, r) => {
269
414
  r.next(), t--;
270
415
  return r.next().value;
271
416
  };
272
- function ht(e) {
417
+ function At(e) {
273
418
  if (ee(e, "__proto__"))
274
419
  throw new Error("__proto__ is not allowed as a property");
275
420
  if (ee(e, "prototype"))
@@ -277,8 +422,8 @@ function ht(e) {
277
422
  if (ee(e, "constructor"))
278
423
  throw new Error("constructor is not allowed as a property");
279
424
  }
280
- const ys = (e, t) => {
281
- ht(t);
425
+ const Fs = (e, t) => {
426
+ At(t);
282
427
  for (let r = 0; r < t.length; r++) {
283
428
  const s = t[r];
284
429
  if (J(e))
@@ -297,8 +442,8 @@ const ys = (e, t) => {
297
442
  e = e[s];
298
443
  }
299
444
  return e;
300
- }, ge = (e, t, r) => {
301
- if (ht(t), t.length === 0)
445
+ }, me = (e, t, r) => {
446
+ if (At(t), t.length === 0)
302
447
  return r(e);
303
448
  let s = e;
304
449
  for (let i = 0; i < t.length - 1; i++) {
@@ -346,45 +491,45 @@ const ys = (e, t) => {
346
491
  }
347
492
  return e;
348
493
  };
349
- function ye(e, t, r = []) {
494
+ function pe(e, t, r = []) {
350
495
  if (!e)
351
496
  return;
352
497
  if (!I(e)) {
353
- V(e, (i, o) => ye(i, t, [...r, ...K(o)]));
498
+ W(e, (i, o) => pe(i, t, [...r, ...K(o)]));
354
499
  return;
355
500
  }
356
501
  const [s, n] = e;
357
- n && V(n, (i, o) => {
358
- ye(i, t, [...r, ...K(o)]);
502
+ n && W(n, (i, o) => {
503
+ pe(i, t, [...r, ...K(o)]);
359
504
  }), t(s, r);
360
505
  }
361
- function hs(e, t, r) {
362
- return ye(t, (s, n) => {
363
- e = ge(e, n, (i) => gs(i, s, r));
506
+ function Es(e, t, r) {
507
+ return pe(t, (s, n) => {
508
+ e = me(e, n, (i) => ws(i, s, r));
364
509
  }), e;
365
510
  }
366
- function bs(e, t) {
511
+ function Cs(e, t) {
367
512
  function r(s, n) {
368
- const i = ys(e, K(n));
513
+ const i = Fs(e, K(n));
369
514
  s.map(K).forEach((o) => {
370
- e = ge(e, o, () => i);
515
+ e = me(e, o, () => i);
371
516
  });
372
517
  }
373
518
  if (I(t)) {
374
519
  const [s, n] = t;
375
520
  s.forEach((i) => {
376
- e = ge(e, K(i), () => e);
377
- }), n && V(n, r);
521
+ e = me(e, K(i), () => e);
522
+ }), n && W(n, r);
378
523
  } else
379
- V(t, r);
524
+ W(t, r);
380
525
  return e;
381
526
  }
382
- const As = (e, t) => G(e) || I(e) || Y(e) || J(e) || mt(e, t);
383
- function Fs(e, t, r) {
527
+ const qs = (e, t) => G(e) || I(e) || Y(e) || J(e) || gt(e, t);
528
+ function Ts(e, t, r) {
384
529
  const s = r.get(e);
385
530
  s ? s.push(t) : r.set(e, [t]);
386
531
  }
387
- function ws(e, t) {
532
+ function xs(e, t) {
388
533
  const r = {};
389
534
  let s;
390
535
  return e.forEach((n) => {
@@ -392,22 +537,22 @@ function ws(e, t) {
392
537
  return;
393
538
  t || (n = n.map((a) => a.map(String)).sort((a, u) => a.length - u.length));
394
539
  const [i, ...o] = n;
395
- i.length === 0 ? s = o.map(ce) : r[ce(i)] = o.map(ce);
396
- }), s ? pe(r) ? [s] : [s, r] : pe(r) ? void 0 : r;
540
+ i.length === 0 ? s = o.map(ae) : r[ae(i)] = o.map(ae);
541
+ }), s ? de(r) ? [s] : [s, r] : de(r) ? void 0 : r;
397
542
  }
398
- const bt = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
543
+ const wt = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
399
544
  var b;
400
- const a = us(e);
545
+ const a = ms(e);
401
546
  if (!a) {
402
- Fs(e, n, t);
547
+ Ts(e, n, t);
403
548
  const g = o.get(e);
404
549
  if (g)
405
550
  return s ? {
406
551
  transformedValue: null
407
552
  } : g;
408
553
  }
409
- if (!As(e, r)) {
410
- const g = Ke(e, r), m = g ? {
554
+ if (!qs(e, r)) {
555
+ const g = _e(e, r), m = g ? {
411
556
  transformedValue: g.value,
412
557
  annotations: [g.type]
413
558
  } : {
@@ -419,16 +564,16 @@ const bt = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
419
564
  return {
420
565
  transformedValue: null
421
566
  };
422
- const u = Ke(e, r), c = (b = u == null ? void 0 : u.value) != null ? b : e, p = I(c) ? [] : {}, l = {};
423
- V(c, (g, m) => {
567
+ const u = _e(e, r), c = (b = u == null ? void 0 : u.value) != null ? b : e, p = I(c) ? [] : {}, l = {};
568
+ W(c, (g, m) => {
424
569
  if (m === "__proto__" || m === "constructor" || m === "prototype")
425
570
  throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);
426
- const A = bt(g, t, r, s, [...n, m], [...i, e], o);
427
- p[m] = A.transformedValue, I(A.annotations) ? l[m] = A.annotations : G(A.annotations) && V(A.annotations, (C, N) => {
428
- l[ct(m) + "." + N] = C;
571
+ const A = wt(g, t, r, s, [...n, m], [...i, e], o);
572
+ p[m] = A.transformedValue, I(A.annotations) ? l[m] = A.annotations : G(A.annotations) && W(A.annotations, (C, N) => {
573
+ l[ft(m) + "." + N] = C;
429
574
  });
430
575
  });
431
- const d = pe(l) ? {
576
+ const d = de(l) ? {
432
577
  transformedValue: p,
433
578
  annotations: u ? [u.type] : void 0
434
579
  } : {
@@ -437,19 +582,19 @@ const bt = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
437
582
  };
438
583
  return a || o.set(e, d), d;
439
584
  };
440
- function At(e) {
585
+ function Ft(e) {
441
586
  return Object.prototype.toString.call(e).slice(8, -1);
442
587
  }
443
- function Ge(e) {
444
- return At(e) === "Array";
588
+ function Ve(e) {
589
+ return Ft(e) === "Array";
445
590
  }
446
- function Es(e) {
447
- if (At(e) !== "Object")
591
+ function $s(e) {
592
+ if (Ft(e) !== "Object")
448
593
  return !1;
449
594
  const t = Object.getPrototypeOf(e);
450
595
  return !!t && t.constructor === Object && t === Object.prototype;
451
596
  }
452
- function Cs(e, t, r, s, n) {
597
+ function Ss(e, t, r, s, n) {
453
598
  const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
454
599
  i === "enumerable" && (e[t] = r), n && i === "nonenumerable" && Object.defineProperty(e, t, {
455
600
  value: r,
@@ -458,17 +603,17 @@ function Cs(e, t, r, s, n) {
458
603
  configurable: !0
459
604
  });
460
605
  }
461
- function he(e, t = {}) {
462
- if (Ge(e))
463
- return e.map((n) => he(n, t));
464
- if (!Es(e))
606
+ function ge(e, t = {}) {
607
+ if (Ve(e))
608
+ return e.map((n) => ge(n, t));
609
+ if (!$s(e))
465
610
  return e;
466
611
  const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
467
612
  return [...r, ...s].reduce((n, i) => {
468
- if (Ge(t.props) && !t.props.includes(i))
613
+ if (Ve(t.props) && !t.props.includes(i))
469
614
  return n;
470
- const o = e[i], a = he(o, t);
471
- return Cs(n, i, a, e, t.nonenumerable), n;
615
+ const o = e[i], a = ge(o, t);
616
+ return Ss(n, i, a, e, t.nonenumerable), n;
472
617
  }, {});
473
618
  }
474
619
  class h {
@@ -476,27 +621,27 @@ class h {
476
621
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
477
622
  */
478
623
  constructor({ dedupe: t = !1 } = {}) {
479
- this.classRegistry = new Hr(), this.symbolRegistry = new ot((r) => {
624
+ this.classRegistry = new ts(), this.symbolRegistry = new ut((r) => {
480
625
  var s;
481
626
  return (s = r.description) != null ? s : "";
482
- }), this.customTransformerRegistry = new Zr(), this.allowedErrorProps = [], this.dedupe = t;
627
+ }), this.customTransformerRegistry = new ns(), this.allowedErrorProps = [], this.dedupe = t;
483
628
  }
484
629
  serialize(t) {
485
- const r = /* @__PURE__ */ new Map(), s = bt(t, r, this, this.dedupe), n = {
630
+ const r = /* @__PURE__ */ new Map(), s = wt(t, r, this, this.dedupe), n = {
486
631
  json: s.transformedValue
487
632
  };
488
- s.annotations && (n.meta = F(y({}, n.meta), {
633
+ s.annotations && (n.meta = w(y({}, n.meta), {
489
634
  values: s.annotations
490
635
  }));
491
- const i = ws(r, this.dedupe);
492
- return i && (n.meta = F(y({}, n.meta), {
636
+ const i = xs(r, this.dedupe);
637
+ return i && (n.meta = w(y({}, n.meta), {
493
638
  referentialEqualities: i
494
639
  })), n;
495
640
  }
496
641
  deserialize(t) {
497
642
  const { json: r, meta: s } = t;
498
- let n = he(r);
499
- return s != null && s.values && (n = hs(n, s.values, this)), s != null && s.referentialEqualities && (n = bs(n, s.referentialEqualities)), n;
643
+ let n = ge(r);
644
+ return s != null && s.values && (n = Es(n, s.values, this)), s != null && s.referentialEqualities && (n = Cs(n, s.referentialEqualities)), n;
500
645
  }
501
646
  stringify(t) {
502
647
  return JSON.stringify(this.serialize(t));
@@ -528,7 +673,7 @@ h.registerClass = h.defaultInstance.registerClass.bind(h.defaultInstance);
528
673
  h.registerSymbol = h.defaultInstance.registerSymbol.bind(h.defaultInstance);
529
674
  h.registerCustom = h.defaultInstance.registerCustom.bind(h.defaultInstance);
530
675
  h.allowErrorProps = h.defaultInstance.allowErrorProps.bind(h.defaultInstance);
531
- const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e.type), Ee = (e) => new dr(
676
+ const z = (e) => e === void 0 ? B.None : e, Os = (e) => new Jt(e.metadataItem, e.type), Fe = (e) => new dr(
532
677
  e.name,
533
678
  e.expression,
534
679
  e.type,
@@ -536,7 +681,7 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
536
681
  z(e.sort),
537
682
  e.dataSource,
538
683
  e.composeCode
539
- ), Ce = (e) => new mr(
684
+ ), Ee = (e) => new mr(
540
685
  e.name,
541
686
  e.expression,
542
687
  e.granularity,
@@ -548,24 +693,24 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
548
693
  ), O = (e) => {
549
694
  switch (e.__serializable) {
550
695
  case "DimensionalAttribute":
551
- return Ee(e);
696
+ return Fe(e);
552
697
  case "DimensionalLevelAttribute":
553
- return Ce(e);
698
+ return Ee(e);
554
699
  default:
555
700
  return e;
556
701
  }
557
- }, Ft = (e) => new jr(
702
+ }, Et = (e) => new jr(
558
703
  e.name,
559
704
  e.expression,
560
705
  e.attributes.map(O),
561
- e.dimensions.map(qs),
706
+ e.dimensions.map(Ds),
562
707
  e.type,
563
708
  e.description,
564
709
  z(e.sort),
565
710
  e.dataSource,
566
711
  e.composeCode,
567
712
  e.defaultAttribute ? O(e.defaultAttribute) : void 0
568
- ), wt = (e) => new Kr(
713
+ ), Ct = (e) => new Kr(
569
714
  e.name,
570
715
  e.expression,
571
716
  e.description,
@@ -574,16 +719,16 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
574
719
  e.composeCode,
575
720
  e.indexed,
576
721
  e.merged
577
- ), qs = (e) => {
722
+ ), Ds = (e) => {
578
723
  switch (e.__serializable) {
579
724
  case "DimensionalDimension":
580
- return Ft(e);
725
+ return Et(e);
581
726
  case "DimensionalDateDimension":
582
- return wt(e);
727
+ return Ct(e);
583
728
  default:
584
729
  return e;
585
730
  }
586
- }, Te = (e) => new pr(
731
+ }, Ce = (e) => new pr(
587
732
  e.name,
588
733
  O(e.attribute),
589
734
  e.aggregation,
@@ -598,11 +743,11 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
598
743
  if (s && typeof s == "object" && "__serializable" in s)
599
744
  switch (s.__serializable) {
600
745
  case "DimensionalAttribute":
601
- return [r, Ee(s)];
746
+ return [r, Fe(s)];
602
747
  case "DimensionalLevelAttribute":
603
- return [r, Ce(s)];
748
+ return [r, Ee(s)];
604
749
  case "DimensionalBaseMeasure":
605
- return [r, Te(s)];
750
+ return [r, Ce(s)];
606
751
  case "DimensionalCalculatedMeasure":
607
752
  return [r, qe(s)];
608
753
  default:
@@ -621,7 +766,7 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
621
766
  e.dataSource,
622
767
  e.composeCode
623
768
  );
624
- }, Et = (e) => new yr(
769
+ }, qt = (e) => new yr(
625
770
  e.name,
626
771
  O(e.attribute),
627
772
  e.format,
@@ -629,50 +774,50 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
629
774
  z(e.sort),
630
775
  e.dataSource,
631
776
  e.composeCode
632
- ), le = (e) => {
777
+ ), ue = (e) => {
633
778
  switch (e.__serializable) {
634
779
  case "DimensionalBaseMeasure":
635
- return Te(e);
780
+ return Ce(e);
636
781
  case "DimensionalCalculatedMeasure":
637
782
  return qe(e);
638
783
  case "DimensionalMeasureTemplate":
639
- return Et(e);
784
+ return qt(e);
640
785
  default:
641
786
  return e;
642
787
  }
643
- }, T = (e) => {
788
+ }, q = (e) => {
644
789
  switch (e.__serializable) {
645
790
  case "MembersFilter":
646
791
  return new Sr(
647
792
  O(e.attribute),
648
793
  e.members,
649
- e.config.backgroundFilter ? F(y({}, e.config), { backgroundFilter: T(e.config.backgroundFilter) }) : e.config,
794
+ e.config.backgroundFilter ? w(y({}, e.config), { backgroundFilter: q(e.config.backgroundFilter) }) : e.config,
650
795
  e.composeCode
651
796
  );
652
797
  case "LogicalAttributeFilter":
653
798
  return new $r(
654
- e.filters.map((r) => T(r)),
799
+ e.filters.map((r) => q(r)),
655
800
  e.operator,
656
801
  e.config,
657
802
  e.composeCode
658
803
  );
659
804
  case "CascadingFilter":
660
805
  return new xr(
661
- e._filters.map((r) => T(r)),
806
+ e._filters.map((r) => q(r)),
662
807
  e.config,
663
808
  e.composeCode
664
809
  );
665
810
  case "ExcludeFilter":
666
- return new qr(
667
- T(e.filter),
668
- e.input ? T(e.input) : void 0,
811
+ return new Tr(
812
+ q(e.filter),
813
+ e.input ? q(e.input) : void 0,
669
814
  e.config,
670
815
  e.composeCode
671
816
  );
672
817
  case "MeasureFilter":
673
- return new Tr(
818
+ return new qr(
674
819
  O(e.attribute),
675
- le(e.measure),
820
+ ue(e.measure),
676
821
  e.operatorA,
677
822
  e.valueA,
678
823
  e.operatorB,
@@ -683,7 +828,7 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
683
828
  case "RankingFilter":
684
829
  return new Cr(
685
830
  O(e.attribute),
686
- le(e.measure),
831
+ ue(e.measure),
687
832
  e.operator,
688
833
  e.count,
689
834
  e.config,
@@ -691,14 +836,14 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
691
836
  );
692
837
  case "MeasureRankingFilter":
693
838
  return new Er(
694
- le(e.measure),
839
+ ue(e.measure),
695
840
  e.operator,
696
841
  e.count,
697
842
  e.config,
698
843
  e.composeCode
699
844
  );
700
845
  case "NumericFilter":
701
- return new wr(
846
+ return new Fr(
702
847
  O(e.attribute),
703
848
  e.operatorA,
704
849
  e.valueA,
@@ -708,7 +853,7 @@ const z = (e) => e === void 0 ? B.None : e, Ts = (e) => new Jt(e.metadataItem, e
708
853
  e.composeCode
709
854
  );
710
855
  case "TextFilter":
711
- return new Fr(
856
+ return new wr(
712
857
  O(e.attribute),
713
858
  e.operatorA,
714
859
  e.valueA,
@@ -750,7 +895,7 @@ h.registerCustom(
750
895
  {
751
896
  isApplicable: Yt,
752
897
  serialize: (e) => e.serialize(),
753
- deserialize: (e) => Ts(e)
898
+ deserialize: (e) => Os(e)
754
899
  },
755
900
  "JaqlElement"
756
901
  );
@@ -758,7 +903,7 @@ h.registerCustom(
758
903
  {
759
904
  isApplicable: Ht,
760
905
  serialize: (e) => e.serialize(),
761
- deserialize: (e) => Ee(e)
906
+ deserialize: (e) => Fe(e)
762
907
  },
763
908
  "DimensionalAttribute"
764
909
  );
@@ -766,7 +911,7 @@ h.registerCustom(
766
911
  {
767
912
  isApplicable: Qt,
768
913
  serialize: (e) => e.serialize(),
769
- deserialize: (e) => Ce(e)
914
+ deserialize: (e) => Ee(e)
770
915
  },
771
916
  "DimensionalLevelAttribute"
772
917
  );
@@ -774,7 +919,7 @@ h.registerCustom(
774
919
  {
775
920
  isApplicable: Vr,
776
921
  serialize: (e) => e.serialize(),
777
- deserialize: (e) => Ft(e)
922
+ deserialize: (e) => Et(e)
778
923
  },
779
924
  "DimensionalDimension"
780
925
  );
@@ -782,7 +927,7 @@ h.registerCustom(
782
927
  {
783
928
  isApplicable: Wr,
784
929
  serialize: (e) => e.serialize(),
785
- deserialize: (e) => wt(e)
930
+ deserialize: (e) => Ct(e)
786
931
  },
787
932
  "DimensionalDateDimension"
788
933
  );
@@ -790,7 +935,7 @@ h.registerCustom(
790
935
  {
791
936
  isApplicable: Xt,
792
937
  serialize: (e) => e.serialize(),
793
- deserialize: (e) => Te(e)
938
+ deserialize: (e) => Ce(e)
794
939
  },
795
940
  "DimensionalBaseMeasure"
796
941
  );
@@ -806,15 +951,15 @@ h.registerCustom(
806
951
  {
807
952
  isApplicable: er,
808
953
  serialize: (e) => e.serialize(),
809
- deserialize: (e) => Et(e)
954
+ deserialize: (e) => qt(e)
810
955
  },
811
956
  "DimensionalMeasureTemplate"
812
957
  );
813
958
  h.registerCustom(
814
959
  {
815
- isApplicable: Fe,
960
+ isApplicable: be,
816
961
  serialize: (e) => e.serialize(),
817
- deserialize: (e) => T(e)
962
+ deserialize: (e) => q(e)
818
963
  },
819
964
  "MembersFilter"
820
965
  );
@@ -822,7 +967,7 @@ h.registerCustom(
822
967
  {
823
968
  isApplicable: tr,
824
969
  serialize: (e) => e.serialize(),
825
- deserialize: (e) => T(e)
970
+ deserialize: (e) => q(e)
826
971
  },
827
972
  "LogicalAttributeFilter"
828
973
  );
@@ -830,7 +975,7 @@ h.registerCustom(
830
975
  {
831
976
  isApplicable: rr,
832
977
  serialize: (e) => e.serialize(),
833
- deserialize: (e) => T(e)
978
+ deserialize: (e) => q(e)
834
979
  },
835
980
  "CascadingFilter"
836
981
  );
@@ -838,7 +983,7 @@ h.registerCustom(
838
983
  {
839
984
  isApplicable: sr,
840
985
  serialize: (e) => e.serialize(),
841
- deserialize: (e) => T(e)
986
+ deserialize: (e) => q(e)
842
987
  },
843
988
  "ExcludeFilter"
844
989
  );
@@ -846,7 +991,7 @@ h.registerCustom(
846
991
  {
847
992
  isApplicable: nr,
848
993
  serialize: (e) => e.serialize(),
849
- deserialize: (e) => T(e)
994
+ deserialize: (e) => q(e)
850
995
  },
851
996
  "MeasureFilter"
852
997
  );
@@ -854,7 +999,7 @@ h.registerCustom(
854
999
  {
855
1000
  isApplicable: ir,
856
1001
  serialize: (e) => e.serialize(),
857
- deserialize: (e) => T(e)
1002
+ deserialize: (e) => q(e)
858
1003
  },
859
1004
  "RankingFilter"
860
1005
  );
@@ -862,7 +1007,7 @@ h.registerCustom(
862
1007
  {
863
1008
  isApplicable: or,
864
1009
  serialize: (e) => e.serialize(),
865
- deserialize: (e) => T(e)
1010
+ deserialize: (e) => q(e)
866
1011
  },
867
1012
  "MeasureRankingFilter"
868
1013
  );
@@ -870,7 +1015,7 @@ h.registerCustom(
870
1015
  {
871
1016
  isApplicable: ar,
872
1017
  serialize: (e) => e.serialize(),
873
- deserialize: (e) => T(e)
1018
+ deserialize: (e) => q(e)
874
1019
  },
875
1020
  "NumericFilter"
876
1021
  );
@@ -878,7 +1023,7 @@ h.registerCustom(
878
1023
  {
879
1024
  isApplicable: ur,
880
1025
  serialize: (e) => e.serialize(),
881
- deserialize: (e) => T(e)
1026
+ deserialize: (e) => q(e)
882
1027
  },
883
1028
  "TextFilter"
884
1029
  );
@@ -886,7 +1031,7 @@ h.registerCustom(
886
1031
  {
887
1032
  isApplicable: cr,
888
1033
  serialize: (e) => e.serialize(),
889
- deserialize: (e) => T(e)
1034
+ deserialize: (e) => q(e)
890
1035
  },
891
1036
  "DateRangeFilter"
892
1037
  );
@@ -894,7 +1039,7 @@ h.registerCustom(
894
1039
  {
895
1040
  isApplicable: lr,
896
1041
  serialize: (e) => e.serialize(),
897
- deserialize: (e) => T(e)
1042
+ deserialize: (e) => q(e)
898
1043
  },
899
1044
  "RelativeDateFilter"
900
1045
  );
@@ -902,34 +1047,34 @@ h.registerCustom(
902
1047
  {
903
1048
  isApplicable: fr,
904
1049
  serialize: (e) => e.serialize(),
905
- deserialize: (e) => T(e)
1050
+ deserialize: (e) => q(e)
906
1051
  },
907
1052
  "CustomFilter"
908
1053
  );
909
- const ni = h, E = "DM.";
1054
+ const ei = h, E = "DM.";
910
1055
  function S(e) {
911
1056
  return typeof e == "object" && e !== null;
912
1057
  }
913
- function q(e) {
1058
+ function T(e) {
914
1059
  return typeof e == "object" && e !== null && "function" in e && "args" in e;
915
1060
  }
916
- function Ct(e) {
917
- return e.every(q);
1061
+ function Tt(e) {
1062
+ return e.every(T);
918
1063
  }
919
- function oe(e) {
1064
+ function ne(e) {
920
1065
  return "attribute" in e && "config" in e;
921
1066
  }
922
1067
  function Z(e) {
923
1068
  return "left" in e && "right" in e && "operator" in e;
924
1069
  }
925
- function xe(e) {
926
- return !oe(e) && !Z(e);
1070
+ function Te(e) {
1071
+ return !ne(e) && !Z(e);
927
1072
  }
928
- function xs(e) {
1073
+ function Ms(e) {
929
1074
  return S(e) && "column" in e && typeof e.column == "string" && !("function" in e && "args" in e);
930
1075
  }
931
- function $s(e) {
932
- return !S(e) || !("column" in e) ? !1 : q(e.column);
1076
+ function Ns(e) {
1077
+ return !S(e) || !("column" in e) ? !1 : T(e.column);
933
1078
  }
934
1079
  const x = 3;
935
1080
  function R(e, t, r) {
@@ -941,14 +1086,14 @@ function R(e, t, r) {
941
1086
  }
942
1087
  return n !== void 0 ? { best: n, distance: s } : void 0;
943
1088
  }
944
- const Tt = "en";
945
- function fe(e, t) {
946
- return e.localeCompare(t, Tt, { sensitivity: "accent" }) === 0;
1089
+ const xt = "en";
1090
+ function ce(e, t) {
1091
+ return e.localeCompare(t, xt, { sensitivity: "accent" }) === 0;
947
1092
  }
948
- function Ye(e, t) {
949
- return t.length <= e.length && e.slice(0, t.length).localeCompare(t, Tt, { sensitivity: "accent" }) === 0;
1093
+ function We(e, t) {
1094
+ return t.length <= e.length && e.slice(0, t.length).localeCompare(t, xt, { sensitivity: "accent" }) === 0;
950
1095
  }
951
- function $e(e) {
1096
+ function xe(e) {
952
1097
  const t = [...e].sort((i, o) => o.name.length - i.name.length), r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
953
1098
  for (const i of e) {
954
1099
  r.set(i.name, i);
@@ -966,7 +1111,7 @@ function $e(e) {
966
1111
  columnMap: s
967
1112
  };
968
1113
  }
969
- function Se(e, t) {
1114
+ function $e(e, t) {
970
1115
  if (!e.startsWith(E))
971
1116
  throw new Error(
972
1117
  `Invalid dimensional element name format: '${e}'. Expected format: '${E}TableName.ColumnName[.Level]'`
@@ -978,7 +1123,7 @@ function Se(e, t) {
978
1123
  );
979
1124
  let s, n;
980
1125
  for (const m of t.sortedTables)
981
- if (Ye(r, m.name + ".")) {
1126
+ if (We(r, m.name + ".")) {
982
1127
  const A = r.slice(m.name.length + 1);
983
1128
  if (!A)
984
1129
  throw new Error(
@@ -993,7 +1138,7 @@ function Se(e, t) {
993
1138
  throw new Error(
994
1139
  `Invalid dimensional element name format: '${e}'. Expected format: '${E}TableName.ColumnName[.Level]'`
995
1140
  );
996
- const A = r.slice(0, m), C = R(A, t.sortedTables, (ue) => ue.name), N = C && C.distance <= x ? ` Did you mean '${C.best.name}'?` : "";
1141
+ const A = r.slice(0, m), C = R(A, t.sortedTables, (oe) => oe.name), N = C && C.distance <= x ? ` Did you mean '${C.best.name}'?` : "";
997
1142
  throw new Error(`Table '${A}' not found in the data model.${N}`);
998
1143
  }
999
1144
  const i = t.tableColumnMap.get(s.name);
@@ -1002,9 +1147,9 @@ function Se(e, t) {
1002
1147
  let o, a;
1003
1148
  const u = $.all;
1004
1149
  for (const m of i) {
1005
- if (fe(n, m.name))
1150
+ if (ce(n, m.name))
1006
1151
  return { table: s, column: m };
1007
- if (!Ye(n, m.name + "."))
1152
+ if (!We(n, m.name + "."))
1008
1153
  continue;
1009
1154
  const A = n.slice(m.name.length + 1);
1010
1155
  if (!A)
@@ -1030,13 +1175,13 @@ function Se(e, t) {
1030
1175
  )}.${A}`
1031
1176
  );
1032
1177
  }
1033
- const c = n.indexOf("."), p = c === -1 ? n : n.slice(0, c), l = R(n, i, (m) => m.name), d = l && l.distance <= x && !fe(l.best.name, p), b = d ? ` Did you mean '${l.best.name}'?` : "", g = !d && n.endsWith(".") && l !== void 0 && fe(l.best.name, p) ? ` Use '${p}' without a trailing dot.` : "";
1178
+ const c = n.indexOf("."), p = c === -1 ? n : n.slice(0, c), l = R(n, i, (m) => m.name), d = l && l.distance <= x && !ce(l.best.name, p), b = d ? ` Did you mean '${l.best.name}'?` : "", g = !d && n.endsWith(".") && l !== void 0 && ce(l.best.name, p) ? ` Use '${p}' without a trailing dot.` : "";
1034
1179
  throw new Error(
1035
1180
  `Column '${p}' not found in table '${s.name}'.${b}${g}`
1036
1181
  );
1037
1182
  }
1038
- function Ss(e, t) {
1039
- const { table: r, column: s, level: n } = Se(e, t);
1183
+ function Rs(e, t) {
1184
+ const { table: r, column: s, level: n } = $e(e, t);
1040
1185
  if (n) {
1041
1186
  if (!X(s.dataType))
1042
1187
  throw new Error(
@@ -1063,7 +1208,7 @@ function Ss(e, t) {
1063
1208
  return { table: r, column: s, level: n };
1064
1209
  }
1065
1210
  function H(e, t, r, s) {
1066
- const { table: n, column: i, level: o } = Ss(e, r);
1211
+ const { table: n, column: i, level: o } = Rs(e, r);
1067
1212
  let a = o;
1068
1213
  if (X(i.dataType) && a === void 0 && (s != null && s.inferredDateLevel)) {
1069
1214
  const u = s.inferredDateLevel, c = $.all;
@@ -1092,8 +1237,8 @@ function H(e, t, r, s) {
1092
1237
  dataSource: t
1093
1238
  });
1094
1239
  }
1095
- function Os(e, t, r) {
1096
- const { column: s, level: n } = Se(e, r);
1240
+ function vs(e, t, r) {
1241
+ const { column: s, level: n } = $e(e, r);
1097
1242
  if (n)
1098
1243
  throw new Error(
1099
1244
  `Invalid DateDimension name format: '${e}'. Expected format: '${E}TableName.ColumnName'`
@@ -1108,15 +1253,15 @@ function Os(e, t, r) {
1108
1253
  dataSource: t
1109
1254
  });
1110
1255
  }
1111
- const Ds = (e, t) => {
1256
+ const Is = (e, t) => {
1112
1257
  if (!e) return;
1113
1258
  const r = typeof e == "object" ? e.direction : e;
1114
- if (!se(r))
1115
- return F(y({}, t), {
1259
+ if (!tt(r))
1260
+ return w(y({}, t), {
1116
1261
  message: `Invalid sort type. Expected 'sortAsc', 'sortDesc', or 'sortNone'. Got: '${r}'.`
1117
1262
  });
1118
- }, Ms = (e, t, r, s) => {
1119
- const n = Ds(e.sortType, s);
1263
+ }, Ps = (e, t, r, s) => {
1264
+ const n = Is(e.sortType, s);
1120
1265
  if (n)
1121
1266
  return {
1122
1267
  attribute: H(e.column, t, r),
@@ -1125,11 +1270,11 @@ const Ds = (e, t) => {
1125
1270
  };
1126
1271
  const i = H(e.column, t, r), o = _(e, "column");
1127
1272
  return { attribute: i, style: o };
1128
- }, Ns = (e, t, r, s) => typeof e == "string" ? { attribute: H(e, t, r) } : xs(e) ? Ms(e, t, r, s) : {
1129
- error: F(y({}, s), {
1273
+ }, ks = (e, t, r, s) => typeof e == "string" ? { attribute: H(e, t, r) } : Ms(e) ? Ps(e, t, r, s) : {
1274
+ error: w(y({}, s), {
1130
1275
  message: "Invalid dimension item. Expected a string (composeCode) or object with 'column' and optional 'sortType'."
1131
1276
  })
1132
- }, qt = (e) => {
1277
+ }, $t = (e) => {
1133
1278
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
1134
1279
  if (!t)
1135
1280
  return { success: !0, data: [] };
@@ -1153,7 +1298,7 @@ const Ds = (e, t) => {
1153
1298
  input: o
1154
1299
  };
1155
1300
  try {
1156
- const c = Ns(o, r, s, u);
1301
+ const c = ks(o, r, s, u);
1157
1302
  if (c.error) {
1158
1303
  i.push(c.error);
1159
1304
  return;
@@ -1163,47 +1308,47 @@ const Ds = (e, t) => {
1163
1308
  );
1164
1309
  } catch (c) {
1165
1310
  const p = c instanceof Error ? c.message : "Unknown error";
1166
- i.push(F(y({}, u), { message: p }));
1311
+ i.push(w(y({}, u), { message: p }));
1167
1312
  }
1168
1313
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
1169
1314
  };
1170
- function Oe(e, t) {
1315
+ function Se(e, t) {
1171
1316
  const r = Reflect.get(e, t);
1172
1317
  if (typeof r != "function")
1173
1318
  throw new Error(`Function '${t}' not found or is not a function`);
1174
1319
  return r;
1175
1320
  }
1176
- function Rs(e, t) {
1177
- const r = e.replace("measureFactory.", ""), n = Oe(Dr, r)(...t);
1178
- if (!xe(n))
1321
+ function Bs(e, t) {
1322
+ const r = e.replace("measureFactory.", ""), n = Se(Dr, r)(...t);
1323
+ if (!Te(n))
1179
1324
  throw new Error(`Function '${e}' did not return a valid Measure`);
1180
1325
  return n;
1181
1326
  }
1182
- function vs(e, t) {
1183
- const r = e.replace("filterFactory.logic.", ""), n = Oe(Mr, r)(...t);
1327
+ function zs(e, t) {
1328
+ const r = e.replace("filterFactory.logic.", ""), n = Se(Mr, r)(...t);
1184
1329
  if (!Z(n))
1185
1330
  throw new Error(`Function '${e}' did not return a valid FilterRelations`);
1186
1331
  return n;
1187
1332
  }
1188
- function Is(e, t) {
1333
+ function Ls(e, t) {
1189
1334
  if (e.startsWith("filterFactory.logic."))
1190
- return vs(e, t);
1191
- const r = e.replace("filterFactory.", ""), n = Oe(Nr, r)(...t);
1192
- if (!oe(n) && !Z(n))
1335
+ return zs(e, t);
1336
+ const r = e.replace("filterFactory.", ""), n = Se(Nr, r)(...t);
1337
+ if (!ne(n) && !Z(n))
1193
1338
  throw new Error(`Function '${e}' did not return a valid Filter or FilterRelations`);
1194
1339
  return n;
1195
1340
  }
1196
- function Ps(e, t) {
1341
+ function Us(e, t) {
1197
1342
  const s = e.split(".")[0];
1198
1343
  if (s === "measureFactory")
1199
- return Rs(e, t);
1344
+ return Bs(e, t);
1200
1345
  if (s === "filterFactory")
1201
- return Is(e, t);
1346
+ return Ls(e, t);
1202
1347
  throw new Error(
1203
1348
  `Unsupported factory: '${s}'. Supported factories: measureFactory, filterFactory`
1204
1349
  );
1205
1350
  }
1206
- const f = (e, t, r, s) => y({ category: e, minArgs: t, maxArgs: r }, s), ks = /* @__PURE__ */ new Set([
1351
+ const f = (e, t, r, s) => y({ category: e, minArgs: t, maxArgs: r }, s), _s = /* @__PURE__ */ new Set([
1207
1352
  "CORREL",
1208
1353
  "COVARP",
1209
1354
  "COVAR",
@@ -1333,159 +1478,19 @@ const f = (e, t, r, s) => y({ category: e, minArgs: t, maxArgs: r }, s), ks = /*
1333
1478
  SIN: f("scalar", 1, 1),
1334
1479
  SQRT: f("scalar", 1, 1),
1335
1480
  TAN: f("scalar", 1, 1)
1336
- }, Bs = Object.keys(te).filter(
1481
+ }, Vs = Object.keys(te).filter(
1337
1482
  (e) => te[e].category === "xdiff"
1338
1483
  );
1339
- function xt() {
1340
- return Bs;
1484
+ function St() {
1485
+ return Vs;
1341
1486
  }
1342
- function $t(e) {
1487
+ function Ot(e) {
1343
1488
  const t = te[e.toUpperCase()];
1344
1489
  return t == null ? void 0 : t.requiredDateLevel;
1345
1490
  }
1346
- function zs(e, t) {
1491
+ function Ws(e, t) {
1347
1492
  return e === t ? e === 1 ? "1 parameter" : `${e} parameters` : t === Number.POSITIVE_INFINITY ? e <= 1 ? "any number of parameters" : `at least ${e} parameters` : `${e} or ${t} parameters`;
1348
1493
  }
1349
- function De(e, t) {
1350
- const r = [];
1351
- let s = "", n = 0, i = !1, o = null;
1352
- for (let a = 0; a < e.length; a++) {
1353
- const u = e[a], c = e[a + 1];
1354
- if (i) {
1355
- if (u !== o) {
1356
- s += u;
1357
- continue;
1358
- }
1359
- if (c === o) {
1360
- s += u + c, a++;
1361
- continue;
1362
- }
1363
- i = !1, o = null, s += u;
1364
- continue;
1365
- } else {
1366
- if (u === "'" || u === '"') {
1367
- i = !0, o = u, s += u;
1368
- continue;
1369
- }
1370
- if ("([{".includes(u) && n++, ")]}".includes(u) && n--, u === t && n === 0) {
1371
- r.push(s.trim()), s = "";
1372
- continue;
1373
- }
1374
- }
1375
- s += u;
1376
- }
1377
- return s.trim() && r.push(s.trim()), r;
1378
- }
1379
- function Ls(e, t) {
1380
- let r = 0, s = !1, n = null;
1381
- for (let i = 0; i < e.length; i++) {
1382
- const o = e[i], a = e[i + 1];
1383
- if (s) {
1384
- if (o !== n) continue;
1385
- if (a === n) {
1386
- i++;
1387
- continue;
1388
- }
1389
- s = !1, n = null;
1390
- } else {
1391
- if (o === "'" || o === '"') {
1392
- s = !0, n = o;
1393
- continue;
1394
- }
1395
- if ("([{".includes(o) && r++, ")]}".includes(o) && r--, o === t && r === 0) return i;
1396
- }
1397
- }
1398
- return -1;
1399
- }
1400
- function Us(e, t) {
1401
- if (e[t] !== "(") return -1;
1402
- let r = 1, s = t + 1, n = !1, i = null;
1403
- for (; s < e.length; ) {
1404
- const o = e[s], a = e[s + 1];
1405
- if (n) {
1406
- if (o !== i) {
1407
- s++;
1408
- continue;
1409
- }
1410
- if (a === i) {
1411
- s += 2;
1412
- continue;
1413
- }
1414
- n = !1, i = null, s++;
1415
- } else {
1416
- if (o === "'" || o === '"') {
1417
- n = !0, i = o, s++;
1418
- continue;
1419
- }
1420
- if ("([{".includes(o) && r++, ")]}".includes(o) && --r === 0) return s;
1421
- s++;
1422
- }
1423
- }
1424
- return -1;
1425
- }
1426
- function _s(e) {
1427
- return e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e;
1428
- }
1429
- function W(e) {
1430
- if (!e || typeof e != "string")
1431
- throw new Error(`Invalid composeCode: expected non-empty string, got ${typeof e}`);
1432
- const t = e.trim();
1433
- if (!t)
1434
- throw new Error("Invalid composeCode: empty string");
1435
- const r = t.match(/^([a-zA-Z_$][a-zA-Z0-9_.$]*)\s*\((.*)\)$/);
1436
- if (!r)
1437
- throw new Error(`Invalid composeCode format: expected function call, got '${t}'`);
1438
- const s = r[1], n = r[2], i = St(n);
1439
- return {
1440
- function: s,
1441
- args: i
1442
- };
1443
- }
1444
- function St(e) {
1445
- return e.trim() ? De(e, ",").map(Ot) : [];
1446
- }
1447
- function Ot(e) {
1448
- if (!e)
1449
- throw new Error("Cannot parse empty argument value");
1450
- if (e === "null")
1451
- return null;
1452
- if (e === "undefined")
1453
- return;
1454
- if (e === "true")
1455
- return !0;
1456
- if (e === "false")
1457
- return !1;
1458
- if (e.match(/^-?\d+(\.\d+)?$/))
1459
- return parseFloat(e);
1460
- if (e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"')) {
1461
- const r = e[0];
1462
- return e.slice(1, -1).replace(new RegExp(`${r}${r}`, "g"), r);
1463
- }
1464
- if (e.startsWith("[") && e.endsWith("]")) {
1465
- const r = e.slice(1, -1).trim();
1466
- if (!r)
1467
- return [];
1468
- const s = St(r);
1469
- return s.every((n) => typeof n == "string"), s;
1470
- }
1471
- if (e.startsWith("{") && e.endsWith("}")) {
1472
- const r = e.slice(1, -1).trim();
1473
- return r ? Ws(r) : {};
1474
- }
1475
- return e.includes("(") && e.includes(")") ? W(e) : (e.startsWith("DM."), e);
1476
- }
1477
- function Vs(e) {
1478
- const t = Ls(e, ":");
1479
- if (t === -1)
1480
- throw new Error(`Invalid object property: expected 'key: value', got '${e}'`);
1481
- const r = _s(e.slice(0, t).trim()), s = Ot(e.slice(t + 1).trim());
1482
- return [r, s];
1483
- }
1484
- function Ws(e) {
1485
- if (!e.trim()) return {};
1486
- const t = De(e, ",").map(Vs).filter(([, r]) => r !== null);
1487
- return Object.fromEntries(t);
1488
- }
1489
1494
  const js = /\[(\w[\w.-]*)\]/g, Dt = /* @__PURE__ */ new Set([
1490
1495
  // Universal – Aggregative (per Sisense doc: (A) only; Statistical CONTRIBUTION, PERCENTILE, etc. are non-aggregative)
1491
1496
  "AVG",
@@ -1512,7 +1517,7 @@ const js = /\[(\w[\w.-]*)\]/g, Dt = /* @__PURE__ */ new Set([
1512
1517
  "i"
1513
1518
  );
1514
1519
  function Mt(e) {
1515
- return q(e) ? !0 : typeof e == "string" && e.startsWith(E) ? !1 : S(e) && "kind" in e ? e.kind === "measure" : !0;
1520
+ return T(e) ? !0 : typeof e == "string" && e.startsWith(E) ? !1 : S(e) && "kind" in e ? e.kind === "measure" : !0;
1516
1521
  }
1517
1522
  function Gs(e) {
1518
1523
  const t = /\b(\w+)\s*\(/g, r = /* @__PURE__ */ new Set();
@@ -1588,14 +1593,14 @@ function Zs(e, t) {
1588
1593
  return e.length;
1589
1594
  }
1590
1595
  function en(e) {
1591
- return De(e, ",").filter((t) => t.trim().length > 0).length;
1596
+ return we(e, ",").filter((t) => t.trim().length > 0).length;
1592
1597
  }
1593
1598
  function tn(e, t, r, s) {
1594
1599
  for (; t < e.length && /\s/.test(e[t]); )
1595
1600
  t++;
1596
1601
  if (e[t] !== "(")
1597
1602
  return t;
1598
- const n = t, i = Us(e, n);
1603
+ const n = t, i = Hr(e, n);
1599
1604
  if (i === -1)
1600
1605
  return n + 1;
1601
1606
  const o = e.slice(n + 1, i);
@@ -1625,7 +1630,7 @@ function vt(e) {
1625
1630
  function rn(e) {
1626
1631
  const t = vt(e.formula), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
1627
1632
  for (const { name: n, argCount: i } of t) {
1628
- if (ks.has(n)) {
1633
+ if (_s.has(n)) {
1629
1634
  r.has(n) || (r.add(n), M(
1630
1635
  e,
1631
1636
  `${e.errorPrefix}args[1]: Function ${n} is not supported in custom formulas`
@@ -1635,7 +1640,7 @@ function rn(e) {
1635
1640
  const o = te[n];
1636
1641
  if (o && (i < o.minArgs || i > o.maxArgs) && !s.has(n)) {
1637
1642
  s.add(n);
1638
- const a = zs(o.minArgs, o.maxArgs);
1643
+ const a = Ws(o.minArgs, o.maxArgs);
1639
1644
  M(e, `${e.errorPrefix}args[1]: Function ${n} accepts ${a}`);
1640
1645
  }
1641
1646
  }
@@ -1681,7 +1686,7 @@ function an(e) {
1681
1686
  const s = r.map((i) => `[${Nt(i)}]`).join(", "), n = `${e.errorPrefix}args[2]: Context keys ${s} are defined but not used in formula`;
1682
1687
  e.errorOnUnusedContext ? M(e, n) : e.warnUnusedContext && e.result.warnings.push(n);
1683
1688
  }
1684
- function Je(e, t, r, s) {
1689
+ function je(e, t, r, s) {
1685
1690
  var o;
1686
1691
  const n = (o = s.context[j(e)]) != null ? o : s.context[e];
1687
1692
  if (n === void 0) return;
@@ -1694,7 +1699,7 @@ function Je(e, t, r, s) {
1694
1699
  }
1695
1700
  if (s.schemaIndex)
1696
1701
  try {
1697
- const a = Se(n, s.schemaIndex);
1702
+ const a = $e(n, s.schemaIndex);
1698
1703
  X(a.column.dataType) ? r && a.level && a.level !== r && M(
1699
1704
  s,
1700
1705
  `${s.errorPrefix}args[1]: ${t.functionName} expects date level '${r}'. Reference [${e}] has level '${a.level}'.`
@@ -1708,10 +1713,10 @@ function Je(e, t, r, s) {
1708
1713
  }
1709
1714
  }
1710
1715
  function un(e) {
1711
- const t = xt(), r = Rt(e.formula, t);
1716
+ const t = St(), r = Rt(e.formula, t);
1712
1717
  for (const s of r) {
1713
- const n = $t(s.functionName);
1714
- Je(s.ref1, s, n, e), Je(s.ref2, s, n, e);
1718
+ const n = Ot(s.functionName);
1719
+ je(s.ref1, s, n, e), je(s.ref2, s, n, e);
1715
1720
  }
1716
1721
  }
1717
1722
  function cn(e, t, r = {}) {
@@ -1757,7 +1762,7 @@ function fn(e, t) {
1757
1762
  const o = dn(s), a = {};
1758
1763
  for (const [u, c] of Object.entries(i)) {
1759
1764
  const p = `args[2].${u}`;
1760
- if (q(c))
1765
+ if (T(c))
1761
1766
  a[`${u}`] = D({
1762
1767
  data: c,
1763
1768
  context: {
@@ -1789,9 +1794,9 @@ function fn(e, t) {
1789
1794
  e[2] = a;
1790
1795
  }
1791
1796
  function dn(e) {
1792
- const t = xt(), r = Rt(e, t), s = {};
1797
+ const t = St(), r = Rt(e, t), s = {};
1793
1798
  for (const n of r) {
1794
- const i = $t(n.functionName);
1799
+ const i = Ot(n.functionName);
1795
1800
  if (i !== void 0)
1796
1801
  for (const o of [n.ref1, n.ref2]) {
1797
1802
  const a = s[o];
@@ -1816,38 +1821,38 @@ function mn(e) {
1816
1821
  function pn(e) {
1817
1822
  return It(e) || Pt(e);
1818
1823
  }
1819
- function ae(e) {
1824
+ function ie(e) {
1820
1825
  return e.type === U.TextAttribute ? "text" : e.type === U.NumericAttribute ? "numeric" : e.type === U.DateLevel ? "date/datetime" : "unknown";
1821
1826
  }
1822
- function Me(e, t) {
1827
+ function Oe(e, t) {
1823
1828
  const r = e[0];
1824
1829
  if (!r || typeof r != "object" || !("type" in r))
1825
1830
  throw new Error(`${t.pathPrefix}args[0]: Expected attribute as first argument`);
1826
1831
  return r;
1827
1832
  }
1828
- function He(e, t) {
1829
- const r = Me(e, t);
1833
+ function Ke(e, t) {
1834
+ const r = Oe(e, t);
1830
1835
  if (!pn(r))
1831
1836
  throw new Error(
1832
- `${t.pathPrefix}args[0]: Attribute must be string or numeric type, got ${ae(
1837
+ `${t.pathPrefix}args[0]: Attribute must be string or numeric type, got ${ie(
1833
1838
  r
1834
1839
  )} attribute`
1835
1840
  );
1836
1841
  }
1837
1842
  function P(e, t) {
1838
- const r = Me(e, t);
1843
+ const r = Oe(e, t);
1839
1844
  if (!Pt(r))
1840
1845
  throw new Error(
1841
- `${t.pathPrefix}args[0]: Attribute must be numeric type, got ${ae(
1846
+ `${t.pathPrefix}args[0]: Attribute must be numeric type, got ${ie(
1842
1847
  r
1843
1848
  )} attribute`
1844
1849
  );
1845
1850
  }
1846
1851
  function k(e, t) {
1847
- const r = Me(e, t);
1852
+ const r = Oe(e, t);
1848
1853
  if (!It(r))
1849
1854
  throw new Error(
1850
- `${t.pathPrefix}args[0]: Attribute must be string type, got ${ae(
1855
+ `${t.pathPrefix}args[0]: Attribute must be string type, got ${ie(
1851
1856
  r
1852
1857
  )} attribute`
1853
1858
  );
@@ -1860,7 +1865,7 @@ function gn(e, t) {
1860
1865
  }
1861
1866
  function yn(e, t) {
1862
1867
  const r = gn(e, t);
1863
- if (!Fe(r))
1868
+ if (!be(r))
1864
1869
  throw new Error(
1865
1870
  `${t.pathPrefix}args[0]: exclude filter only accepts members filter, got ${r.__serializable || "unknown"} filter`
1866
1871
  );
@@ -1868,8 +1873,8 @@ function yn(e, t) {
1868
1873
  const hn = {
1869
1874
  "measureFactory.customFormula": fn,
1870
1875
  // String | Number filters
1871
- "filterFactory.equals": He,
1872
- "filterFactory.doesntEqual": He,
1876
+ "filterFactory.equals": Ke,
1877
+ "filterFactory.doesntEqual": Ke,
1873
1878
  // Numeric filters
1874
1879
  "filterFactory.greaterThan": P,
1875
1880
  "filterFactory.greaterThanOrEqual": P,
@@ -2419,18 +2424,18 @@ const kt = {
2419
2424
  { type: "FilterRelationsNode", required: !0 }
2420
2425
  ]
2421
2426
  };
2422
- function Ne(e) {
2427
+ function De(e) {
2423
2428
  return kt[`${e}`];
2424
2429
  }
2425
2430
  function An(e) {
2426
- const t = Ne(e);
2431
+ const t = De(e);
2427
2432
  return t ? t.filter((r) => r.required).length : 0;
2428
2433
  }
2429
- function Fn(e) {
2430
- const t = Ne(e);
2434
+ function wn(e) {
2435
+ const t = De(e);
2431
2436
  return t ? t.length : 0;
2432
2437
  }
2433
- function wn(e) {
2438
+ function Fn(e) {
2434
2439
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}/.test(e))
2435
2440
  return !1;
2436
2441
  const r = Date.parse(e);
@@ -2439,7 +2444,7 @@ function wn(e) {
2439
2444
  const s = new Date(e);
2440
2445
  return !isNaN(s.getTime());
2441
2446
  }
2442
- function de(e, t, r, s) {
2447
+ function le(e, t, r, s) {
2443
2448
  if (e.startsWith(E))
2444
2449
  try {
2445
2450
  return H(e, t, r);
@@ -2454,7 +2459,7 @@ function de(e, t, r, s) {
2454
2459
  function En(e, t, r, s) {
2455
2460
  if (e.startsWith(E))
2456
2461
  try {
2457
- return Os(e, t, r);
2462
+ return vs(e, t, r);
2458
2463
  } catch (n) {
2459
2464
  const i = n instanceof Error ? n.message : "Unknown error";
2460
2465
  throw new Error(`${s}: ${i}`);
@@ -2509,7 +2514,7 @@ function Cn(e) {
2509
2514
  throw new Error(
2510
2515
  `${o}: Expected attribute string, got ${typeof t}. Example: 'DM.Commerce.Revenue'`
2511
2516
  );
2512
- return de(t, s, n, o);
2517
+ return le(t, s, n, o);
2513
2518
  case "Attribute[]":
2514
2519
  if (!Array.isArray(t))
2515
2520
  throw new Error(
@@ -2518,11 +2523,11 @@ function Cn(e) {
2518
2523
  return t.map((a, u) => {
2519
2524
  if (typeof a != "string")
2520
2525
  throw new Error(`${o}[${u}]: Expected attribute string, got ${typeof a}`);
2521
- return de(a, s, n, `${o}[${u}]`);
2526
+ return le(a, s, n, `${o}[${u}]`);
2522
2527
  });
2523
2528
  case "Measure":
2524
2529
  case "BaseMeasure":
2525
- if (!q(t))
2530
+ if (!T(t))
2526
2531
  throw new Error(
2527
2532
  `${o}: Expected measure function call, got ${typeof t}. Example: {'function': 'measureFactory.sum', 'args': ['DM.Commerce.Revenue']}`
2528
2533
  );
@@ -2536,7 +2541,7 @@ function Cn(e) {
2536
2541
  `${o}: Expected array of measure function calls, got ${typeof t}`
2537
2542
  );
2538
2543
  return t.map((a, u) => {
2539
- if (!q(a))
2544
+ if (!T(a))
2540
2545
  throw new Error(
2541
2546
  `${o}[${u}]: Expected measure function call, got ${typeof a}`
2542
2547
  );
@@ -2546,7 +2551,7 @@ function Cn(e) {
2546
2551
  });
2547
2552
  });
2548
2553
  case "Filter":
2549
- if (!q(t))
2554
+ if (!T(t))
2550
2555
  throw new Error(
2551
2556
  `${o}: Expected filter function call, got ${typeof t}. Example: {'function': 'filterFactory.contains', 'args': ['DM.Brand.Brand', 'Apple']}`
2552
2557
  );
@@ -2560,7 +2565,7 @@ function Cn(e) {
2560
2565
  `${o}: Expected array of filter function calls, got ${typeof t}`
2561
2566
  );
2562
2567
  return t.map((a, u) => {
2563
- if (!q(a))
2568
+ if (!T(a))
2564
2569
  throw new Error(
2565
2570
  `${o}[${u}]: Expected filter function call, got ${typeof a}`
2566
2571
  );
@@ -2572,7 +2577,7 @@ function Cn(e) {
2572
2577
  case "FilterRelationsNode":
2573
2578
  if (Array.isArray(t))
2574
2579
  return t.map((a, u) => {
2575
- if (!q(a))
2580
+ if (!T(a))
2576
2581
  throw new Error(
2577
2582
  `${o}[${u}]: Expected filter function call, got ${typeof a}`
2578
2583
  );
@@ -2581,7 +2586,7 @@ function Cn(e) {
2581
2586
  context: { dataSource: s, schemaIndex: n, pathPrefix: `${o}[${u}]` }
2582
2587
  });
2583
2588
  });
2584
- if (q(t))
2589
+ if (T(t))
2585
2590
  return D({
2586
2591
  data: t,
2587
2592
  context: { dataSource: s, schemaIndex: n, pathPrefix: o }
@@ -2600,7 +2605,7 @@ function Cn(e) {
2600
2605
  throw new Error(
2601
2606
  `${o}: Expected date attribute string, got ${typeof t}. Example: 'DM.Commerce.Date.Years'`
2602
2607
  );
2603
- const a = de(
2608
+ const a = le(
2604
2609
  t,
2605
2610
  s,
2606
2611
  n,
@@ -2608,7 +2613,7 @@ function Cn(e) {
2608
2613
  );
2609
2614
  if (!mn(a))
2610
2615
  throw new Error(
2611
- `${o}: Attribute must be date/datetime type, got ${ae(
2616
+ `${o}: Attribute must be date/datetime type, got ${ie(
2612
2617
  a
2613
2618
  )} attribute`
2614
2619
  );
@@ -2617,7 +2622,7 @@ function Cn(e) {
2617
2622
  case "Measure | number":
2618
2623
  if (typeof t == "number")
2619
2624
  return t;
2620
- if (q(t))
2625
+ if (T(t))
2621
2626
  return D({
2622
2627
  data: t,
2623
2628
  context: { dataSource: s, schemaIndex: n, pathPrefix: o }
@@ -2627,7 +2632,7 @@ function Cn(e) {
2627
2632
  );
2628
2633
  case "Date | string":
2629
2634
  if (typeof t == "string") {
2630
- if (wn(t))
2635
+ if (Fn(t))
2631
2636
  return t;
2632
2637
  throw new Error(
2633
2638
  `${o}: Expected valid ISO date string or Date object, got invalid date string '${t}'`
@@ -2655,14 +2660,14 @@ function Cn(e) {
2655
2660
  }
2656
2661
  }
2657
2662
  function D(e) {
2658
- const { data: t } = e, { dataSource: r, schemaIndex: s, pathPrefix: n } = e.context, { function: i, args: o } = t, a = n ? `${n}.` : "", u = Ne(i);
2663
+ const { data: t } = e, { dataSource: r, schemaIndex: s, pathPrefix: n } = e.context, { function: i, args: o } = t, a = n ? `${n}.` : "", u = De(i);
2659
2664
  if (!u) {
2660
2665
  const g = Object.keys(kt), m = R(i, g, (C) => C), A = m && m.distance <= x ? ` Did you mean '${m.best}'?` : "";
2661
2666
  throw new Error(
2662
2667
  `${a}function: Unknown function '${i}'.${A}`
2663
2668
  );
2664
2669
  }
2665
- const c = An(i), p = Fn(i);
2670
+ const c = An(i), p = wn(i);
2666
2671
  if (o.length < c)
2667
2672
  throw new Error(
2668
2673
  `${a}function: Expected at least ${c} arguments, got ${o.length}`
@@ -2694,8 +2699,8 @@ function D(e) {
2694
2699
  });
2695
2700
  l.push(N);
2696
2701
  } catch (N) {
2697
- const ue = N instanceof Error ? N.message : "Unknown error";
2698
- d.push(ue);
2702
+ const oe = N instanceof Error ? N.message : "Unknown error";
2703
+ d.push(oe);
2699
2704
  }
2700
2705
  }
2701
2706
  if (d.length > 0) {
@@ -2714,23 +2719,23 @@ function D(e) {
2714
2719
  const m = g instanceof Error ? g.message : "Unknown validation error";
2715
2720
  throw new Error(m);
2716
2721
  }
2717
- return Ps(i, l);
2722
+ return Us(i, l);
2718
2723
  }
2719
2724
  function Bt(e) {
2720
2725
  const { attribute: t, config: r } = e;
2721
- if (Fe(e) && Rr(t)) {
2726
+ if (be(e) && Rr(t)) {
2722
2727
  const { granularity: s } = t, n = e.members.map((a) => s === "Years" && !isNaN(Number(a)) ? `${a}-01-01T00:00:00` : a), i = vr(r), o = Object.keys(i).length === 0 ? void 0 : i;
2723
2728
  return Ir(t, n, o);
2724
2729
  }
2725
2730
  return e;
2726
2731
  }
2727
- function Tn(e) {
2732
+ function qn(e) {
2728
2733
  let t = [];
2729
2734
  for (const r of e)
2730
- Z(r) ? t = Ve(r, t) : t = Ve([Bt(r)], t);
2735
+ Z(r) ? t = ze(r, t) : t = ze([Bt(r)], t);
2731
2736
  return t != null ? t : [];
2732
2737
  }
2733
- const qn = (e) => {
2738
+ const Tn = (e) => {
2734
2739
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context, n = [], i = [];
2735
2740
  return t.forEach((o, a) => {
2736
2741
  const u = {
@@ -2743,15 +2748,15 @@ const qn = (e) => {
2743
2748
  data: o,
2744
2749
  context: { dataSource: r, schemaIndex: s, pathPrefix: "" }
2745
2750
  });
2746
- !Z(c) && !oe(c) ? i.push(F(y({}, u), { message: "Invalid filter JSON" })) : n.push(c);
2751
+ !Z(c) && !ne(c) ? i.push(w(y({}, u), { message: "Invalid filter JSON" })) : n.push(c);
2747
2752
  } catch (c) {
2748
2753
  const p = c instanceof Error ? c.message : "Unknown error";
2749
- i.push(F(y({}, u), { message: p }));
2754
+ i.push(w(y({}, u), { message: p }));
2750
2755
  }
2751
- }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: Tn(n) };
2752
- }, Re = (e) => {
2756
+ }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: qn(n) };
2757
+ }, Me = (e) => {
2753
2758
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
2754
- return t ? Ct(t) ? qn({
2759
+ return t ? Tt(t) ? Tn({
2755
2760
  data: t,
2756
2761
  context: { dataSource: r, schemaIndex: s }
2757
2762
  }) : {
@@ -2778,15 +2783,15 @@ const qn = (e) => {
2778
2783
  data: o,
2779
2784
  context: { dataSource: r, schemaIndex: s, pathPrefix: "" }
2780
2785
  });
2781
- oe(c) ? n.push(Bt(c)) : i.push(F(y({}, u), { message: "Invalid filter JSON" }));
2786
+ ne(c) ? n.push(Bt(c)) : i.push(w(y({}, u), { message: "Invalid filter JSON" }));
2782
2787
  } catch (c) {
2783
2788
  const p = c instanceof Error ? c.message : "Unknown error";
2784
- i.push(F(y({}, u), { message: p }));
2789
+ i.push(w(y({}, u), { message: p }));
2785
2790
  }
2786
2791
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
2787
- }, ve = (e) => {
2792
+ }, Ne = (e) => {
2788
2793
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
2789
- return t ? Ct(t) ? xn({
2794
+ return t ? Tt(t) ? xn({
2790
2795
  data: t,
2791
2796
  context: { dataSource: r, schemaIndex: s }
2792
2797
  }) : {
@@ -2801,8 +2806,8 @@ const qn = (e) => {
2801
2806
  ]
2802
2807
  } : { success: !0, data: [] };
2803
2808
  }, $n = (e, t) => {
2804
- if (e && !se(e))
2805
- return F(y({}, t), {
2809
+ if (e && !tt(e))
2810
+ return w(y({}, t), {
2806
2811
  message: `Invalid sort type. Expected 'sortAsc', 'sortDesc', or 'sortNone'. Got: '${e}'.`
2807
2812
  });
2808
2813
  }, Sn = (e, t, r) => {
@@ -2812,15 +2817,15 @@ const qn = (e) => {
2812
2817
  data: e,
2813
2818
  context: { dataSource: s, schemaIndex: n, pathPrefix: "" }
2814
2819
  });
2815
- return xe(i) ? { success: !0, data: i } : {
2820
+ return Te(i) ? { success: !0, data: i } : {
2816
2821
  success: !1,
2817
- errors: [F(y({}, r), { message: "Invalid measure JSON" })]
2822
+ errors: [w(y({}, r), { message: "Invalid measure JSON" })]
2818
2823
  };
2819
2824
  } catch (i) {
2820
2825
  const o = i instanceof Error ? i.message : "Unknown error";
2821
2826
  return {
2822
2827
  success: !1,
2823
- errors: [F(y({}, r), { message: o })]
2828
+ errors: [w(y({}, r), { message: o })]
2824
2829
  };
2825
2830
  }
2826
2831
  }, On = (e, t, r, s) => {
@@ -2828,10 +2833,10 @@ const qn = (e) => {
2828
2833
  data: e.column,
2829
2834
  context: { dataSource: t, schemaIndex: r, pathPrefix: "" }
2830
2835
  });
2831
- if (!xe(n))
2836
+ if (!Te(n))
2832
2837
  return {
2833
2838
  style: {},
2834
- error: F(y({}, s), { message: "Invalid measure JSON" })
2839
+ error: w(y({}, s), { message: "Invalid measure JSON" })
2835
2840
  };
2836
2841
  const i = $n(e.sortType, s);
2837
2842
  if (i) {
@@ -2841,9 +2846,9 @@ const qn = (e) => {
2841
2846
  const o = _(e, "column");
2842
2847
  return { measure: n, style: o };
2843
2848
  }, Dn = (e, t, r, s) => {
2844
- if ($s(e))
2849
+ if (Ns(e))
2845
2850
  return On(e, t, r, s);
2846
- if (q(e)) {
2851
+ if (T(e)) {
2847
2852
  const n = Sn(
2848
2853
  e,
2849
2854
  { dataSource: t, schemaIndex: r },
@@ -2852,7 +2857,7 @@ const qn = (e) => {
2852
2857
  return n.success ? { measure: n.data } : { error: n.errors[0] };
2853
2858
  }
2854
2859
  return {
2855
- error: F(y({}, s), {
2860
+ error: w(y({}, s), {
2856
2861
  message: "Invalid measure item. Expected a function call (function/args) or object with 'column' and optional 'sortType'."
2857
2862
  })
2858
2863
  };
@@ -2890,7 +2895,7 @@ const qn = (e) => {
2890
2895
  );
2891
2896
  } catch (c) {
2892
2897
  const p = c instanceof Error ? c.message : "Unknown error";
2893
- i.push(F(y({}, u), { message: p }));
2898
+ i.push(w(y({}, u), { message: p }));
2894
2899
  }
2895
2900
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
2896
2901
  };
@@ -2899,7 +2904,7 @@ function Q(e) {
2899
2904
  Object.entries(e).map(([t, r]) => [t, Q(r)])
2900
2905
  ) : e;
2901
2906
  }
2902
- function w(e, t, r) {
2907
+ function F(e, t, r) {
2903
2908
  const s = e();
2904
2909
  if (!s.success) {
2905
2910
  const n = r ? s.errors.map(r) : s.errors;
@@ -2907,63 +2912,29 @@ function w(e, t, r) {
2907
2912
  }
2908
2913
  return s.data;
2909
2914
  }
2910
- const Ie = "$trend", Pe = "$forecast";
2911
- function Mn(e) {
2912
- return e.map(({ attribute: t, style: r }) => {
2913
- const s = r == null ? void 0 : r.sortType;
2914
- if (!s) return t;
2915
- const n = typeof s == "object" ? s.direction : s;
2916
- return se(n) ? t.sort(ne(n)) : t;
2917
- });
2918
- }
2919
- function Nn(e) {
2920
- var t, r;
2921
- return (r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.trend")) != null ? r : !1;
2922
- }
2923
- function Rn(e) {
2924
- var t, r;
2925
- return (r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.forecast")) != null ? r : !1;
2926
- }
2927
- function vn(e) {
2928
- var r, s;
2929
- const t = [];
2930
- for (const { measure: n, style: i } of e) {
2931
- const o = i == null ? void 0 : i.sortType, a = o && se(o) ? n.sort(ne(o)) : n;
2932
- t.push(a), i != null && i.trend && !Nn(n) && t.push(
2933
- Pr(n, `${Ie}_${(r = n.name) != null ? r : "Measure"}`, i.trend)
2934
- ), i != null && i.forecast && !Rn(n) && t.push(
2935
- kr(
2936
- n,
2937
- `${Pe}_${(s = n.name) != null ? s : "Measure"}`,
2938
- i.forecast
2939
- )
2940
- );
2941
- }
2942
- return t;
2943
- }
2944
- const ii = (e) => {
2945
- const { data: t } = e, { dataSource: r, tables: s } = e.context, n = $e(s), i = [], o = w(
2946
- () => qt({
2915
+ const ti = (e) => {
2916
+ const { data: t } = e, { dataSource: r, tables: s } = e.context, n = xe(s), i = [], o = F(
2917
+ () => $t({
2947
2918
  data: t.dimensions || [],
2948
2919
  context: { dataSource: r, schemaIndex: n }
2949
2920
  }),
2950
2921
  i
2951
- ), a = w(
2922
+ ), a = F(
2952
2923
  () => zt({
2953
2924
  data: t.measures || [],
2954
2925
  context: { dataSource: r, schemaIndex: n }
2955
2926
  }),
2956
2927
  i
2957
- ), u = w(
2958
- () => Re({
2928
+ ), u = F(
2929
+ () => Me({
2959
2930
  data: t.filters || [],
2960
2931
  context: { dataSource: r, schemaIndex: n }
2961
2932
  }),
2962
2933
  i
2963
2934
  );
2964
2935
  let c = null;
2965
- return t.highlights && (c = w(
2966
- () => ve({
2936
+ return t.highlights && (c = F(
2937
+ () => Ne({
2967
2938
  data: t.highlights || [],
2968
2939
  context: { dataSource: r, schemaIndex: n }
2969
2940
  }),
@@ -2974,21 +2945,21 @@ const ii = (e) => {
2974
2945
  } : {
2975
2946
  success: !0,
2976
2947
  data: y({
2977
- dataSource: we(r),
2978
- dimensions: o ? Mn(o) : [],
2979
- measures: a ? vn(a) : [],
2948
+ dataSource: Ae(r),
2949
+ dimensions: o ? Pr(o) : [],
2950
+ measures: a ? kr(a) : [],
2980
2951
  filters: u || []
2981
2952
  }, c && { highlights: c })
2982
2953
  };
2983
2954
  };
2984
- function Qe(e) {
2955
+ function Ge(e) {
2985
2956
  return typeof e == "object" && e !== null && "column" in e && e.column !== void 0;
2986
2957
  }
2987
- function ke(e) {
2958
+ function Re(e) {
2988
2959
  const t = [], r = [];
2989
2960
  return e.forEach((s, n) => {
2990
2961
  var l, d, b;
2991
- const i = Qe(s) ? s.column : s, o = Qe(s) ? s : void 0, a = () => typeof i.toJSON == "function" ? i.toJSON() : i;
2962
+ const i = Ge(s) ? s.column : s, o = Ge(s) ? s : void 0, a = () => typeof i.toJSON == "function" ? i.toJSON() : i;
2992
2963
  if (!i.composeCode) {
2993
2964
  r.push({
2994
2965
  category: "dimensions",
@@ -3007,18 +2978,18 @@ function ke(e) {
3007
2978
  });
3008
2979
  return;
3009
2980
  }
3010
- const u = (b = o != null && o.sortType ? ne(o.sortType) : void 0) != null ? b : ((l = i.getSort) == null ? void 0 : l.call(i)) !== void 0 && ((d = i.getSort) == null ? void 0 : d.call(i)) !== B.None ? i.getSort() : void 0, c = o ? _(o, "column") : {};
2981
+ const u = (b = o != null && o.sortType ? rt(o.sortType) : void 0) != null ? b : ((l = i.getSort) == null ? void 0 : l.call(i)) !== void 0 && ((d = i.getSort) == null ? void 0 : d.call(i)) !== B.None ? i.getSort() : void 0, c = o ? _(o, "column") : {};
3011
2982
  if (u !== void 0 && u !== B.None || o && Object.keys(c).length > 0) {
3012
2983
  const g = y(y({
3013
2984
  column: i.composeCode
3014
- }, u !== void 0 && u !== B.None && { sortType: it(u) }), c);
2985
+ }, u !== void 0 && u !== B.None && { sortType: st(u) }), c);
3015
2986
  t.push(g);
3016
2987
  } else
3017
2988
  t.push(i.composeCode);
3018
2989
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3019
2990
  }
3020
- const be = "Unknown error";
3021
- function Be(e) {
2991
+ const ye = "Unknown error";
2992
+ function ve(e) {
3022
2993
  if (!e)
3023
2994
  return { success: !0, data: [] };
3024
2995
  const t = [];
@@ -3036,9 +3007,9 @@ function Be(e) {
3036
3007
  ]
3037
3008
  };
3038
3009
  try {
3039
- return { success: !0, data: [W(e.composeCode)] };
3010
+ return { success: !0, data: [V(e.composeCode)] };
3040
3011
  } catch (s) {
3041
- const n = s instanceof Error ? s.message : be;
3012
+ const n = s instanceof Error ? s.message : ye;
3042
3013
  return {
3043
3014
  success: !1,
3044
3015
  errors: [
@@ -3065,10 +3036,10 @@ function Be(e) {
3065
3036
  return;
3066
3037
  }
3067
3038
  try {
3068
- const o = W(s.composeCode);
3039
+ const o = V(s.composeCode);
3069
3040
  r.push(o);
3070
3041
  } catch (o) {
3071
- const a = o instanceof Error ? o.message : be;
3042
+ const a = o instanceof Error ? o.message : ye;
3072
3043
  t.push({
3073
3044
  category: "filters",
3074
3045
  index: n,
@@ -3078,7 +3049,7 @@ function Be(e) {
3078
3049
  }
3079
3050
  }), t.length > 0 ? { success: !1, errors: t } : { success: !0, data: r };
3080
3051
  }
3081
- function ze(e) {
3052
+ function Ie(e) {
3082
3053
  if (!e)
3083
3054
  return { success: !0, data: [] };
3084
3055
  const t = [], r = [];
@@ -3094,10 +3065,10 @@ function ze(e) {
3094
3065
  return;
3095
3066
  }
3096
3067
  try {
3097
- const o = W(s.composeCode);
3068
+ const o = V(s.composeCode);
3098
3069
  t.push(o);
3099
3070
  } catch (o) {
3100
- const a = o instanceof Error ? o.message : be;
3071
+ const a = o instanceof Error ? o.message : ye;
3101
3072
  r.push({
3102
3073
  category: "highlights",
3103
3074
  index: n,
@@ -3107,14 +3078,14 @@ function ze(e) {
3107
3078
  }
3108
3079
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3109
3080
  }
3110
- function Xe(e) {
3081
+ function Ye(e) {
3111
3082
  return typeof e == "object" && e !== null && "column" in e && e.column !== void 0;
3112
3083
  }
3113
- function Le(e) {
3084
+ function Pe(e) {
3114
3085
  const t = [], r = [];
3115
3086
  return e.forEach((s, n) => {
3116
3087
  var u, c, p;
3117
- const i = Xe(s) ? s.column : s, o = Xe(s) ? s : void 0, a = () => typeof i.toJSON == "function" ? i.toJSON() : i;
3088
+ const i = Ye(s) ? s.column : s, o = Ye(s) ? s : void 0, a = () => typeof i.toJSON == "function" ? i.toJSON() : i;
3118
3089
  if (!i.composeCode) {
3119
3090
  r.push({
3120
3091
  category: "measures",
@@ -3125,11 +3096,11 @@ function Le(e) {
3125
3096
  return;
3126
3097
  }
3127
3098
  try {
3128
- const l = W(i.composeCode), d = (p = o != null && o.sortType ? ne(o.sortType) : void 0) != null ? p : ((u = i.getSort) == null ? void 0 : u.call(i)) !== void 0 && ((c = i.getSort) == null ? void 0 : c.call(i)) !== B.None ? i.getSort() : void 0;
3099
+ const l = V(i.composeCode), d = (p = o != null && o.sortType ? rt(o.sortType) : void 0) != null ? p : ((u = i.getSort) == null ? void 0 : u.call(i)) !== void 0 && ((c = i.getSort) == null ? void 0 : c.call(i)) !== B.None ? i.getSort() : void 0;
3129
3100
  if (d !== void 0 && d !== B.None || o && Object.keys(_(o, "column")).length > 0) {
3130
3101
  const g = o ? _(o, "column") : {}, m = y(y({
3131
3102
  column: l
3132
- }, d !== void 0 && d !== B.None && { sortType: it(d) }), g);
3103
+ }, d !== void 0 && d !== B.None && { sortType: st(d) }), g);
3133
3104
  t.push(m);
3134
3105
  } else
3135
3106
  t.push(l);
@@ -3144,42 +3115,42 @@ function Le(e) {
3144
3115
  }
3145
3116
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3146
3117
  }
3147
- function Ze(e) {
3118
+ function Je(e) {
3148
3119
  var t, r, s, n;
3149
- return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.trend")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(Ie)) != null ? n : !1);
3120
+ return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.trend")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(nt)) != null ? n : !1);
3150
3121
  }
3151
- function et(e) {
3122
+ function He(e) {
3152
3123
  var t, r, s, n;
3153
- return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.forecast")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(Pe)) != null ? n : !1);
3124
+ return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.forecast")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(it)) != null ? n : !1);
3154
3125
  }
3155
- function tt(e) {
3126
+ function Qe(e) {
3156
3127
  try {
3157
- const t = W(e.trim());
3128
+ const t = V(e.trim());
3158
3129
  return t.args[2] != null && typeof t.args[2] == "object" ? t.args[2] : void 0;
3159
3130
  } catch (t) {
3160
3131
  return;
3161
3132
  }
3162
3133
  }
3163
- function In(e) {
3134
+ function Mn(e) {
3164
3135
  var s, n, i;
3165
3136
  if (!(e != null && e.length)) return [];
3166
3137
  const t = /* @__PURE__ */ new Set(), r = [];
3167
3138
  for (let o = 0; o < e.length; o++) {
3168
3139
  if (t.has(o)) continue;
3169
3140
  const a = e[o];
3170
- if (Ze(a) || et(a)) {
3141
+ if (Je(a) || He(a)) {
3171
3142
  r.push(a);
3172
3143
  continue;
3173
3144
  }
3174
- const u = (s = a.name) != null ? s : "Measure", c = `${Ie}_${u}`, p = `${Pe}_${u}`;
3145
+ const u = (s = a.name) != null ? s : "Measure", c = `${nt}_${u}`, p = `${it}_${u}`;
3175
3146
  let l, d, b = o + 1;
3176
- if (b < e.length && !t.has(b) && Ze(e[b]) && e[b].name === c) {
3147
+ if (b < e.length && !t.has(b) && Je(e[b]) && e[b].name === c) {
3177
3148
  const g = (n = e[b].composeCode) == null ? void 0 : n.trim();
3178
- g && (l = tt(g), t.add(b), b++);
3149
+ g && (l = Qe(g), t.add(b), b++);
3179
3150
  }
3180
- if (b < e.length && !t.has(b) && et(e[b]) && e[b].name === p) {
3151
+ if (b < e.length && !t.has(b) && He(e[b]) && e[b].name === p) {
3181
3152
  const g = (i = e[b].composeCode) == null ? void 0 : i.trim();
3182
- g && (d = tt(g), t.add(b));
3153
+ g && (d = Qe(g), t.add(b));
3183
3154
  }
3184
3155
  l !== void 0 || d !== void 0 ? r.push(y(y({
3185
3156
  column: a
@@ -3187,20 +3158,20 @@ function In(e) {
3187
3158
  }
3188
3159
  return r;
3189
3160
  }
3190
- function oi(e) {
3191
- const t = [], r = w(
3192
- () => ke(e.dimensions || []),
3161
+ function ri(e) {
3162
+ const t = [], r = F(
3163
+ () => Re(e.dimensions || []),
3193
3164
  t
3194
- ), s = In(e.measures || []), n = w(
3195
- () => Le(s),
3165
+ ), s = Mn(e.measures || []), n = F(
3166
+ () => Pe(s),
3196
3167
  t
3197
- ), i = w(
3198
- () => Be(e.filters),
3168
+ ), i = F(
3169
+ () => ve(e.filters),
3199
3170
  t
3200
3171
  );
3201
3172
  let o = null;
3202
- if (e.highlights && e.highlights.length > 0 && (o = w(
3203
- () => ze(e.highlights),
3173
+ if (e.highlights && e.highlights.length > 0 && (o = F(
3174
+ () => Ie(e.highlights),
3204
3175
  t
3205
3176
  )), t.length > 0)
3206
3177
  return {
@@ -3220,7 +3191,7 @@ function oi(e) {
3220
3191
  }
3221
3192
  const Lt = new Set(
3222
3193
  zr.filter((e) => e !== "image")
3223
- ), rt = Object.freeze([...Lt]), me = /* @__PURE__ */ new Set([
3194
+ ), Xe = Object.freeze([...Lt]), fe = /* @__PURE__ */ new Set([
3224
3195
  "category",
3225
3196
  "value",
3226
3197
  "breakBy",
@@ -3243,7 +3214,7 @@ const Lt = new Set(
3243
3214
  "min",
3244
3215
  "max",
3245
3216
  "seriesToColorMap"
3246
- ]), Pn = {
3217
+ ]), Nn = {
3247
3218
  line: {
3248
3219
  validAxes: /* @__PURE__ */ new Set(["category", "value", "breakBy", "seriesToColorMap"]),
3249
3220
  requiredAxes: ["category", "value"]
@@ -3316,7 +3287,7 @@ const Lt = new Set(
3316
3287
  validAxes: /* @__PURE__ */ new Set(["category", "value", "breakBy", "seriesToColorMap"]),
3317
3288
  requiredAxes: ["category", "value"]
3318
3289
  }
3319
- }, kn = /* @__PURE__ */ new Set([
3290
+ }, Rn = /* @__PURE__ */ new Set([
3320
3291
  "category",
3321
3292
  "breakBy",
3322
3293
  "breakByPoint",
@@ -3324,7 +3295,7 @@ const Lt = new Set(
3324
3295
  "geo",
3325
3296
  "details",
3326
3297
  "date"
3327
- ]), Bn = /* @__PURE__ */ new Set([
3298
+ ]), vn = /* @__PURE__ */ new Set([
3328
3299
  "value",
3329
3300
  "size",
3330
3301
  "colorBy",
@@ -3336,8 +3307,8 @@ const Lt = new Set(
3336
3307
  "max",
3337
3308
  "color"
3338
3309
  ]);
3339
- function zn(e) {
3340
- const t = Pn[e];
3310
+ function In(e) {
3311
+ const t = Nn[e];
3341
3312
  if (t)
3342
3313
  return {
3343
3314
  validAxes: new Set(t.validAxes),
@@ -3347,18 +3318,18 @@ function zn(e) {
3347
3318
  function Ut(e) {
3348
3319
  return typeof e == "string" && Lt.has(e);
3349
3320
  }
3350
- function Ln(e, t, r) {
3351
- if (r === "boxplot" && e === "value" || r === "calendar-heatmap" && e === "date" || kn.has(e))
3321
+ function Pn(e, t, r) {
3322
+ if (r === "boxplot" && e === "value" || r === "calendar-heatmap" && e === "date" || Rn.has(e))
3352
3323
  return !0;
3353
- if (Bn.has(e))
3324
+ if (vn.has(e))
3354
3325
  return !1;
3355
3326
  const s = Array.isArray(t) ? t[0] : t;
3356
3327
  if (!s)
3357
3328
  return !0;
3358
3329
  let n;
3359
- return S(s) && "column" in s && (n = s.column), !(q(s) || n !== void 0 && q(n));
3330
+ return S(s) && "column" in s && (n = s.column), !(T(s) || n !== void 0 && T(n));
3360
3331
  }
3361
- function Un(e) {
3332
+ function kn(e) {
3362
3333
  const t = [], r = {
3363
3334
  chartType: "",
3364
3335
  dataOptions: {}
@@ -3382,7 +3353,7 @@ function Un(e) {
3382
3353
  } else if (Ut(s))
3383
3354
  r.chartType = s;
3384
3355
  else {
3385
- const i = R(String(s), rt, (u) => u), o = i && i.distance <= x ? ` Did you mean '${i.best}'?` : "", a = rt.slice(0, 8).join(", ");
3356
+ const i = R(String(s), Xe, (u) => u), o = i && i.distance <= x ? ` Did you mean '${i.best}'?` : "", a = Xe.slice(0, 8).join(", ");
3386
3357
  t.push({
3387
3358
  category: "chartType",
3388
3359
  index: -1,
@@ -3402,12 +3373,12 @@ function Un(e) {
3402
3373
  } else n !== null && typeof n == "object" && (r.dataOptions = n);
3403
3374
  return e.styleOptions !== void 0 && (r.styleOptions = e.styleOptions), e.filters !== void 0 && Array.isArray(e.filters) && (r.filters = e.filters), e.highlights !== void 0 && Array.isArray(e.highlights) && (r.highlights = e.highlights), { normalized: r, errors: t };
3404
3375
  }
3405
- function _n(e) {
3376
+ function Bn(e) {
3406
3377
  return e.map(
3407
3378
  ({ attribute: t, style: r }) => r ? y({ column: t }, r) : t
3408
3379
  );
3409
3380
  }
3410
- function Vn(e) {
3381
+ function zn(e) {
3411
3382
  return e.map(
3412
3383
  ({ measure: t, style: r }) => r ? y({ column: t }, r) : t
3413
3384
  );
@@ -3415,8 +3386,8 @@ function Vn(e) {
3415
3386
  function _t(e) {
3416
3387
  return Array.isArray(e) ? e : [e];
3417
3388
  }
3418
- function Ae(e) {
3419
- return (t) => F(y({}, t), {
3389
+ function he(e) {
3390
+ return (t) => w(y({}, t), {
3420
3391
  category: "dataOptions",
3421
3392
  index: e
3422
3393
  });
@@ -3428,60 +3399,60 @@ function re(e, t, r, s, n) {
3428
3399
  if (i.length === 0)
3429
3400
  return [];
3430
3401
  if (r === "dimension") {
3431
- const a = w(
3432
- () => qt({
3402
+ const a = F(
3403
+ () => $t({
3433
3404
  data: i,
3434
3405
  context: s
3435
3406
  }),
3436
3407
  n,
3437
- Ae(e)
3408
+ he(e)
3438
3409
  );
3439
- return a !== null ? _n(a) : null;
3410
+ return a !== null ? Bn(a) : null;
3440
3411
  }
3441
- const o = w(
3412
+ const o = F(
3442
3413
  () => zt({
3443
3414
  data: i,
3444
3415
  context: s
3445
3416
  }),
3446
3417
  n,
3447
- Ae(e)
3418
+ he(e)
3448
3419
  );
3449
- return o !== null ? Vn(o) : null;
3420
+ return o !== null ? zn(o) : null;
3450
3421
  }
3451
- function st(e, t, r) {
3422
+ function Ze(e, t, r) {
3452
3423
  const s = Array.isArray(t) ? t : t != null ? [t] : [];
3453
3424
  if (r === "dimension") {
3454
- const i = ke(
3425
+ const i = Re(
3455
3426
  s
3456
3427
  );
3457
3428
  return i.success ? { success: !0, data: i.data } : {
3458
3429
  success: !1,
3459
- errors: i.errors.map((o) => F(y({}, o), {
3430
+ errors: i.errors.map((o) => w(y({}, o), {
3460
3431
  category: "dataOptions",
3461
3432
  index: e
3462
3433
  }))
3463
3434
  };
3464
3435
  }
3465
- const n = Le(s);
3436
+ const n = Pe(s);
3466
3437
  return n.success ? { success: !0, data: n.data } : {
3467
3438
  success: !1,
3468
- errors: n.errors.map((i) => F(y({}, i), {
3439
+ errors: n.errors.map((i) => w(y({}, i), {
3469
3440
  category: "dataOptions",
3470
3441
  index: e
3471
3442
  }))
3472
3443
  };
3473
3444
  }
3474
- function Wn(e, t) {
3445
+ function Ln(e, t) {
3475
3446
  let r;
3476
3447
  S(e) && "column" in e && (r = e.column);
3477
- const n = !(q(e) || r !== void 0 && q(r)) ? "dimension" : "measure", i = [], o = re("columns", [e], n, t, i);
3448
+ const n = !(T(e) || r !== void 0 && T(r)) ? "dimension" : "measure", i = [], o = re("columns", [e], n, t, i);
3478
3449
  return o !== null ? { success: !0, data: o } : { success: !1, errors: i };
3479
3450
  }
3480
- function jn(e, t, r, s) {
3451
+ function Un(e, t, r, s) {
3481
3452
  const n = [];
3482
3453
  for (const i of e) {
3483
- const o = w(
3484
- () => Wn(i, t),
3454
+ const o = F(
3455
+ () => Ln(i, t),
3485
3456
  r,
3486
3457
  s
3487
3458
  );
@@ -3489,7 +3460,7 @@ function jn(e, t, r, s) {
3489
3460
  }
3490
3461
  return n;
3491
3462
  }
3492
- function Kn(e, t, r) {
3463
+ function _n(e, t, r) {
3493
3464
  if (!e || !S(e))
3494
3465
  return r.push({
3495
3466
  category: "dataOptions",
@@ -3499,8 +3470,8 @@ function Kn(e, t, r) {
3499
3470
  }), null;
3500
3471
  const s = {}, { chartType: n } = t, i = r.length, o = e, a = Object.keys(e), u = /* @__PURE__ */ new Map();
3501
3472
  for (const l of a)
3502
- if (!me.has(l)) {
3503
- const d = R(l, [...me], (g) => g), b = d && d.distance <= x ? ` Did you mean '${d.best}'?` : "";
3473
+ if (!fe.has(l)) {
3474
+ const d = R(l, [...fe], (g) => g), b = d && d.distance <= x ? ` Did you mean '${d.best}'?` : "";
3504
3475
  d && d.distance <= x && u.set(l, d.best), r.push({
3505
3476
  category: "dataOptions",
3506
3477
  index: l,
@@ -3508,10 +3479,10 @@ function Kn(e, t, r) {
3508
3479
  message: `Unknown dataOptions key '${l}'.${b}`
3509
3480
  });
3510
3481
  }
3511
- const c = n ? zn(n) : void 0;
3482
+ const c = n ? In(n) : void 0;
3512
3483
  if (c) {
3513
3484
  for (const l of a)
3514
- if (l !== "seriesToColorMap" && !c.validAxes.has(l) && me.has(l)) {
3485
+ if (l !== "seriesToColorMap" && !c.validAxes.has(l) && fe.has(l)) {
3515
3486
  const d = R(l, [...c.validAxes], (m) => m), b = d && d.distance <= x ? ` Did you mean '${d.best}'?` : "", g = [...c.validAxes].join(", ");
3516
3487
  r.push({
3517
3488
  category: "dataOptions",
@@ -3553,15 +3524,15 @@ function Kn(e, t, r) {
3553
3524
  continue;
3554
3525
  }
3555
3526
  if (l === "columns") {
3556
- s[l] = jn(
3527
+ s[l] = Un(
3557
3528
  _t(d),
3558
3529
  t,
3559
3530
  r,
3560
- Ae("columns")
3531
+ he("columns")
3561
3532
  );
3562
3533
  continue;
3563
3534
  }
3564
- const b = Ln(l, d, n) ? "dimension" : "measure", g = re(
3535
+ const b = Pn(l, d, n) ? "dimension" : "measure", g = re(
3565
3536
  l,
3566
3537
  d,
3567
3538
  b,
@@ -3575,37 +3546,37 @@ function Kn(e, t, r) {
3575
3546
  }
3576
3547
  return r.length > i ? null : s;
3577
3548
  }
3578
- function Gn(e) {
3549
+ function Vn(e) {
3579
3550
  if (typeof e != "string") return "iqr";
3580
3551
  const t = e.split("/")[1];
3581
3552
  return t === "iqr" || t === "extremums" || t === "standardDeviation" ? t : "iqr";
3582
3553
  }
3583
- const ai = (e) => {
3554
+ const si = (e) => {
3584
3555
  var m;
3585
- const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = Un(t);
3556
+ const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = kn(t);
3586
3557
  if (o.length > 0)
3587
3558
  return { success: !1, errors: o };
3588
- const a = i.chartType, u = $e(n), c = [];
3589
- let p = Kn(
3559
+ const a = i.chartType, u = xe(n), c = [];
3560
+ let p = _n(
3590
3561
  i.dataOptions,
3591
3562
  { dataSource: s, schemaIndex: u, chartType: a },
3592
3563
  c
3593
3564
  );
3594
3565
  if (a === "boxplot" && p) {
3595
- const A = Gn((m = i.styleOptions) == null ? void 0 : m.subtype), C = A === "iqr" || A === "standardDeviation";
3596
- p = F(y({}, p), { boxType: A, outliersEnabled: C });
3566
+ const A = Vn((m = i.styleOptions) == null ? void 0 : m.subtype), C = A === "iqr" || A === "standardDeviation";
3567
+ p = w(y({}, p), { boxType: A, outliersEnabled: C });
3597
3568
  }
3598
3569
  let l = null;
3599
- i.filters && i.filters.length > 0 && (l = w(
3600
- () => Re({
3570
+ i.filters && i.filters.length > 0 && (l = F(
3571
+ () => Me({
3601
3572
  data: i.filters || [],
3602
3573
  context: { dataSource: s, schemaIndex: u }
3603
3574
  }),
3604
3575
  c
3605
3576
  ));
3606
3577
  let d = null;
3607
- if (i.highlights && i.highlights.length > 0 && (d = w(
3608
- () => ve({
3578
+ if (i.highlights && i.highlights.length > 0 && (d = F(
3579
+ () => Ne({
3609
3580
  data: i.highlights || [],
3610
3581
  context: { dataSource: s, schemaIndex: u }
3611
3582
  }),
@@ -3631,7 +3602,7 @@ const ai = (e) => {
3631
3602
  return {
3632
3603
  success: !0,
3633
3604
  data: y(y(y({
3634
- dataSet: we(s),
3605
+ dataSet: Ae(s),
3635
3606
  chartType: b,
3636
3607
  dataOptions: p
3637
3608
  }, i.styleOptions && {
@@ -3639,7 +3610,7 @@ const ai = (e) => {
3639
3610
  styleOptions: i.styleOptions
3640
3611
  }), l && { filters: l }), d && { highlights: d })
3641
3612
  };
3642
- }, ui = (e) => {
3613
+ }, ni = (e) => {
3643
3614
  const t = [];
3644
3615
  if (!e.chartType)
3645
3616
  return {
@@ -3666,20 +3637,20 @@ const ai = (e) => {
3666
3637
  ]
3667
3638
  };
3668
3639
  let r = null;
3669
- const s = Yn(e.dataOptions);
3640
+ const s = Wn(e.dataOptions);
3670
3641
  s.success ? r = s.data : t.push(...s.errors);
3671
3642
  let n;
3672
3643
  if (e.filters) {
3673
- const u = w(
3674
- () => Be(e.filters),
3644
+ const u = F(
3645
+ () => ve(e.filters),
3675
3646
  t
3676
3647
  );
3677
3648
  n = u != null ? u : void 0;
3678
3649
  }
3679
3650
  let i;
3680
3651
  if (e.highlights && e.highlights.length > 0) {
3681
- const u = w(
3682
- () => ze(e.highlights),
3652
+ const u = F(
3653
+ () => Ie(e.highlights),
3683
3654
  t
3684
3655
  );
3685
3656
  i = u != null ? u : void 0;
@@ -3699,7 +3670,7 @@ const ai = (e) => {
3699
3670
  )
3700
3671
  };
3701
3672
  };
3702
- function Yn(e) {
3673
+ function Wn(e) {
3703
3674
  const t = {}, r = [], s = /* @__PURE__ */ new Set(["seriesToColorMap", "boxType", "outliersEnabled", "valueTitle"]);
3704
3675
  for (const [n, i] of Object.entries(e)) {
3705
3676
  if (n === "seriesToColorMap" && i) {
@@ -3712,12 +3683,12 @@ function Yn(e) {
3712
3683
  }
3713
3684
  const o = Array.isArray(i) ? i : [i], a = Array.isArray(i), u = [], c = [];
3714
3685
  for (let p = 0; p < o.length; p++) {
3715
- const l = o[p], b = Jn(l) ? ke([
3686
+ const l = o[p], b = jn(l) ? Re([
3716
3687
  l
3717
- ]) : Le([l]);
3688
+ ]) : Pe([l]);
3718
3689
  b.success ? u.push(...b.data) : b.errors.forEach((g) => {
3719
3690
  var m;
3720
- c.push(F(y({}, g), { index: p, input: (m = g.input) != null ? m : l }));
3691
+ c.push(w(y({}, g), { index: p, input: (m = g.input) != null ? m : l }));
3721
3692
  });
3722
3693
  }
3723
3694
  if (c.length > 0) {
@@ -3728,7 +3699,7 @@ function Yn(e) {
3728
3699
  }
3729
3700
  return r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3730
3701
  }
3731
- function Jn(e) {
3702
+ function jn(e) {
3732
3703
  const t = Array.isArray(e) ? e[0] : e;
3733
3704
  if (!t || !S(t))
3734
3705
  return !0;
@@ -3747,13 +3718,13 @@ function Jn(e) {
3747
3718
  }
3748
3719
  return !("aggregation" in r || "attribute" in r && "aggregation" in r);
3749
3720
  }
3750
- const nt = ["rows", "columns", "values", "grandTotals"];
3751
- function Hn(e) {
3721
+ const et = ["rows", "columns", "values", "grandTotals"];
3722
+ function Kn(e) {
3752
3723
  if (!S(e)) return !1;
3753
3724
  const t = Object.keys(e);
3754
3725
  return t.every((r) => r === "rows" || r === "columns") && t.every((r) => typeof e[r] == "boolean");
3755
3726
  }
3756
- function Qn(e) {
3727
+ function Gn(e) {
3757
3728
  const t = [], r = {
3758
3729
  dataOptions: {}
3759
3730
  };
@@ -3777,8 +3748,8 @@ function Qn(e) {
3777
3748
  const n = s;
3778
3749
  r.dataOptions = n;
3779
3750
  for (const o of Object.keys(n))
3780
- if (!nt.includes(o)) {
3781
- const a = R(o, [...nt], (c) => c), u = a && a.distance <= x ? ` Did you mean '${a.best}'?` : "";
3751
+ if (!et.includes(o)) {
3752
+ const a = R(o, [...et], (c) => c), u = a && a.distance <= x ? ` Did you mean '${a.best}'?` : "";
3782
3753
  t.push({
3783
3754
  category: "dataOptions",
3784
3755
  index: o,
@@ -3796,7 +3767,7 @@ function Qn(e) {
3796
3767
  });
3797
3768
  }
3798
3769
  const i = n.grandTotals;
3799
- i != null && !Hn(i) && t.push({
3770
+ i != null && !Kn(i) && t.push({
3800
3771
  category: "dataOptions",
3801
3772
  index: "grandTotals",
3802
3773
  input: i,
@@ -3805,7 +3776,7 @@ function Qn(e) {
3805
3776
  }
3806
3777
  return e.styleOptions !== void 0 && (r.styleOptions = e.styleOptions), e.filters !== void 0 && Array.isArray(e.filters) && (r.filters = e.filters), e.highlights !== void 0 && Array.isArray(e.highlights) && (r.highlights = e.highlights), { normalized: r, errors: t };
3807
3778
  }
3808
- function Xn(e, t, r) {
3779
+ function Yn(e, t, r) {
3809
3780
  if (!e || typeof e != "object")
3810
3781
  return r.push({
3811
3782
  category: "dataOptions",
@@ -3833,26 +3804,26 @@ function Xn(e, t, r) {
3833
3804
  );
3834
3805
  return i && (s.values = i), e.grandTotals !== void 0 && (s.grandTotals = e.grandTotals), r.length > n ? null : s;
3835
3806
  }
3836
- const ci = (e) => {
3837
- const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = Qn(t);
3807
+ const ii = (e) => {
3808
+ const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = Gn(t);
3838
3809
  if (o.length > 0)
3839
3810
  return { success: !1, errors: o };
3840
- const a = $e(n), u = [], c = Xn(
3811
+ const a = xe(n), u = [], c = Yn(
3841
3812
  i.dataOptions,
3842
3813
  { dataSource: s, schemaIndex: a },
3843
3814
  u
3844
3815
  );
3845
3816
  let p = null;
3846
- i.filters && i.filters.length > 0 && (p = w(
3847
- () => Re({
3817
+ i.filters && i.filters.length > 0 && (p = F(
3818
+ () => Me({
3848
3819
  data: i.filters || [],
3849
3820
  context: { dataSource: s, schemaIndex: a }
3850
3821
  }),
3851
3822
  u
3852
3823
  ));
3853
3824
  let l = null;
3854
- return i.highlights && i.highlights.length > 0 && (l = w(
3855
- () => ve({
3825
+ return i.highlights && i.highlights.length > 0 && (l = F(
3826
+ () => Ne({
3856
3827
  data: i.highlights || [],
3857
3828
  context: { dataSource: s, schemaIndex: a }
3858
3829
  }),
@@ -3863,11 +3834,11 @@ const ci = (e) => {
3863
3834
  } : {
3864
3835
  success: !0,
3865
3836
  data: y(y(y({
3866
- dataSet: we(s),
3837
+ dataSet: Ae(s),
3867
3838
  dataOptions: c
3868
3839
  }, i.styleOptions && { styleOptions: i.styleOptions }), p && { filters: p }), l && { highlights: l })
3869
3840
  };
3870
- }, li = (e) => {
3841
+ }, oi = (e) => {
3871
3842
  const t = [];
3872
3843
  if (!e.dataOptions)
3873
3844
  return {
@@ -3885,28 +3856,28 @@ const ci = (e) => {
3885
3856
  for (const c of ["rows", "columns"]) {
3886
3857
  const p = r[c];
3887
3858
  if (p && p.length > 0) {
3888
- const l = st(c, p, "dimension");
3859
+ const l = Ze(c, p, "dimension");
3889
3860
  l.success ? s[c] = l.data : t.push(...l.errors);
3890
3861
  }
3891
3862
  }
3892
3863
  const n = r.values;
3893
3864
  if (n && n.length > 0) {
3894
- const c = st("values", n, "measure");
3865
+ const c = Ze("values", n, "measure");
3895
3866
  c.success ? s.values = c.data : t.push(...c.errors);
3896
3867
  }
3897
3868
  r.grandTotals !== void 0 && (s.grandTotals = r.grandTotals);
3898
3869
  let i;
3899
3870
  if (e.filters) {
3900
- const c = w(
3901
- () => Be(e.filters),
3871
+ const c = F(
3872
+ () => ve(e.filters),
3902
3873
  t
3903
3874
  );
3904
3875
  i = c != null ? c : void 0;
3905
3876
  }
3906
3877
  let o;
3907
3878
  if (e.highlights && e.highlights.length > 0) {
3908
- const c = w(
3909
- () => ze(e.highlights),
3879
+ const c = F(
3880
+ () => Ie(e.highlights),
3910
3881
  t
3911
3882
  );
3912
3883
  o = c != null ? c : void 0;
@@ -3923,7 +3894,7 @@ const ci = (e) => {
3923
3894
  )
3924
3895
  };
3925
3896
  };
3926
- function Zn(e) {
3897
+ function Jn(e) {
3927
3898
  const { filters: t, relations: r } = _r(
3928
3899
  e.filters || []
3929
3900
  );
@@ -3937,23 +3908,23 @@ function Zn(e) {
3937
3908
  // No count/offset/ungroup - these are execution concerns, not translation concerns
3938
3909
  };
3939
3910
  }
3940
- function fi(e, t, r = !1) {
3941
- const s = Zn(e), n = Lr(s, t);
3911
+ function ai(e, t, r = !1) {
3912
+ const s = Jn(e), n = Lr(s, t);
3942
3913
  return Ur(n, r);
3943
3914
  }
3944
3915
  export {
3945
- ni as CustomSuperJSON,
3946
- pi as EMPTY_EXPANDED_QUERY_MODEL,
3947
- gi as EMPTY_SIMPLE_QUERY_MODEL,
3948
- yi as isByIdDashboardCodeParams,
3949
- hi as isByIdWidgetCodeParams,
3950
- bi as isClientSideDashboardCodeParams,
3951
- Ai as isClientSideWidgetCodeParams,
3952
- ai as translateChartFromJSON,
3953
- ui as translateChartToJSON,
3954
- ci as translatePivotTableFromJSON,
3955
- li as translatePivotTableToJSON,
3956
- ii as translateQueryFromJSON,
3957
- oi as translateQueryToJSON,
3958
- fi as translateQueryToJaql
3916
+ ei as CustomSuperJSON,
3917
+ li as EMPTY_EXPANDED_QUERY_MODEL,
3918
+ fi as EMPTY_SIMPLE_QUERY_MODEL,
3919
+ di as isByIdDashboardCodeParams,
3920
+ mi as isByIdWidgetCodeParams,
3921
+ pi as isClientSideDashboardCodeParams,
3922
+ gi as isClientSideWidgetCodeParams,
3923
+ si as translateChartFromJSON,
3924
+ ni as translateChartToJSON,
3925
+ ii as translatePivotTableFromJSON,
3926
+ oi as translatePivotTableToJSON,
3927
+ ti as translateQueryFromJSON,
3928
+ ri as translateQueryToJSON,
3929
+ ai as translateQueryToJaql
3959
3930
  };