@sisense/sdk-ui 2.28.0 → 2.30.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 (260) hide show
  1. package/dist/ai.cjs +57 -57
  2. package/dist/ai.js +767 -797
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +1310 -1230
  5. package/dist/analytics-composer.cjs +7 -7
  6. package/dist/analytics-composer.js +19 -18
  7. package/dist/apply-styled-options-to-query-BK1NnV4P.js +6453 -0
  8. package/dist/apply-styled-options-to-query-Dl8vVNxo.cjs +1 -0
  9. package/dist/{index-C77YCBVd.js → index-DCYw3JUB.js} +29 -7
  10. package/dist/index-DTvxJdqZ.cjs +1 -0
  11. package/dist/index.cjs +611 -518
  12. package/dist/index.js +26556 -24829
  13. package/dist/index.umd.js +952 -829
  14. package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/utils.d.ts +1 -1
  15. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-container.d.ts +1 -1
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-config.d.ts +127 -0
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-targets.d.ts +30 -0
  18. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-title.d.ts +20 -0
  19. package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header.d.ts +10 -1
  20. package/dist/packages/sdk-ui/src/domains/dashboarding/constants.d.ts +2 -2
  21. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-helpers.d.ts +21 -0
  22. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +7 -0
  23. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +45 -3
  24. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +10 -1
  25. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +36 -1
  26. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +2 -0
  27. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/dashboard-module.d.ts +34 -0
  28. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/types.d.ts +58 -0
  29. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +7 -0
  30. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-dashboard-header-menu-item.d.ts +9 -0
  31. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-updates-persistence.d.ts +27 -0
  32. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/deep-merge.d.ts +17 -0
  33. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +26 -1
  34. package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/update-types.d.ts +51 -0
  35. package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +18 -7
  36. package/dist/packages/sdk-ui/src/domains/dashboarding/utils.d.ts +9 -0
  37. package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/add-measure-data-browser.d.ts +11 -0
  38. package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/add-measure-popover.d.ts +14 -0
  39. package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/measure-ranking-title.d.ts +21 -0
  40. package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/measures.d.ts +13 -0
  41. package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  42. package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +1 -0
  43. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor-context.d.ts +1 -0
  44. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor-popover.d.ts +2 -1
  45. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor.d.ts +2 -1
  46. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/numeric-condition-section/types.d.ts +5 -0
  47. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/index.d.ts +3 -0
  48. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/ranking-condition-controls.d.ts +33 -0
  49. package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/ranking-condition-utils.d.ts +13 -0
  50. package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +2 -1
  51. package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-collapsible.d.ts +22 -4
  52. package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-top-slot-shell.d.ts +2 -0
  53. package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-trigger-button.d.ts +17 -0
  54. package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative-interactive.d.ts +20 -2
  55. package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +11 -9
  56. package/dist/packages/sdk-ui/src/domains/narrative/core/build-narrative-request.d.ts +1 -1
  57. package/dist/packages/sdk-ui/src/domains/narrative/core/get-narrative-dimensions-and-measures.d.ts +2 -2
  58. package/dist/packages/sdk-ui/src/domains/narrative/core/get-widget-narrative-from-widget-props.d.ts +18 -0
  59. package/dist/packages/sdk-ui/src/domains/narrative/core/to-nlg-api-verbosity.d.ts +7 -0
  60. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +101 -23
  61. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +35 -32
  62. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +11 -22
  63. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-line-height.d.ts +10 -0
  64. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +8 -9
  65. package/dist/packages/sdk-ui/src/domains/query-execution/core/execute-query.d.ts +34 -1
  66. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-jaql-excel-export.d.ts +13 -5
  67. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-xlsx-export-payload.d.ts +5 -0
  68. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +2 -1
  69. package/dist/packages/sdk-ui/src/domains/query-execution/types.d.ts +55 -3
  70. package/dist/packages/sdk-ui/src/domains/shared/header/header-item-size.d.ts +30 -0
  71. package/dist/packages/sdk-ui/src/domains/shared/header/header-items-renderer.d.ts +19 -0
  72. package/dist/packages/sdk-ui/src/domains/shared/header/header-spacer-item.d.ts +9 -0
  73. package/dist/packages/sdk-ui/src/domains/shared/header/index.d.ts +6 -0
  74. package/dist/packages/sdk-ui/src/domains/shared/header/resolve-header-items.d.ts +17 -0
  75. package/dist/packages/sdk-ui/src/domains/shared/header/types.d.ts +98 -0
  76. package/dist/packages/sdk-ui/src/domains/shared/header/use-resolved-header-items.d.ts +10 -0
  77. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +3 -1
  78. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data.d.ts +0 -1
  79. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/data.d.ts +3 -1
  80. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/helpers/chart-data.d.ts +3 -1
  81. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data.d.ts +3 -1
  82. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/sunburst-chart/data/index.d.ts +3 -1
  83. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/treemap-chart/data/index.d.ts +3 -1
  84. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +1 -0
  85. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/alerts/index.d.ts +5 -0
  86. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/data/index.d.ts +22 -0
  87. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/data-options/index.d.ts +33 -0
  88. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/design-options/index.d.ts +21 -0
  89. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/highchart-options/highcharts-options-builder.d.ts +3 -0
  90. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-chart-builder.d.ts +3 -0
  91. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-node-colors.d.ts +10 -0
  92. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/types.d.ts +38 -0
  93. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/types.d.ts +2 -1
  94. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +12 -9
  95. package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/formatters/data-cell-formatters/data-cell-value-formatter.d.ts +1 -1
  96. package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +1 -1
  97. package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/hooks/use-pivot-data-loading.d.ts +1 -0
  98. package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/resolve-pivot-container-size.d.ts +28 -0
  99. package/dist/packages/sdk-ui/src/domains/visualizations/components/sankey-chart.d.ts +30 -0
  100. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/helpers/format-numbers.d.ts +1 -1
  101. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/cartesian-data.d.ts +1 -1
  102. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/categorical-data.d.ts +1 -1
  103. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/chart-data-service.d.ts +1 -1
  104. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/filter-and-aggregate-chart-data.d.ts +2 -2
  105. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/scatter-data.d.ts +2 -2
  106. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/types.d.ts +2 -1
  107. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/apply-styled-options-to-query.d.ts +4 -4
  108. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +74 -30
  109. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/utils.d.ts +4 -4
  110. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +3 -0
  111. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/tooltip.d.ts +1 -1
  112. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +10 -1
  113. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/funnel-plot-options.d.ts +1 -1
  114. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/number-format-config.d.ts +12 -0
  115. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/pie-plot-options.d.ts +2 -1
  116. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +1 -1
  117. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +1 -1
  118. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +2 -2
  119. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/types.d.ts +12 -3
  120. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/filter-to-readable-label.d.ts +14 -0
  121. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +1 -0
  122. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +5 -0
  123. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +5 -0
  124. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/truncate-pill-label.d.ts +10 -0
  125. package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +6 -0
  126. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +8 -1
  127. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -1
  128. package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-narrative.d.ts +28 -0
  129. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +11 -0
  130. package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-excel-download.d.ts +1 -1
  131. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/pivot-table-widget.d.ts +15 -0
  132. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +7 -1
  133. package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-excel-download.d.ts +1 -1
  134. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
  135. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/tabber.d.ts +17 -1
  136. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +41 -2
  137. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/widget-narrative-style.d.ts +31 -0
  138. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +36 -1
  139. package/dist/packages/sdk-ui/src/domains/widgets/helpers/excel-export-map-dimensions-measures.d.ts +17 -2
  140. package/dist/packages/sdk-ui/src/domains/widgets/helpers/number-format-config-to-numeric-mask.d.ts +5 -0
  141. package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-track-widget-init.d.ts +44 -0
  142. package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-entity-id.d.ts +30 -0
  143. package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-tracking-adapters.d.ts +41 -0
  144. package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/widget-container.d.ts +7 -1
  145. package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-style-utils.d.ts +29 -0
  146. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +29 -1
  147. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +6 -1
  148. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +2 -2
  149. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +2 -1
  150. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +1 -7
  151. package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +1 -9
  152. package/dist/packages/sdk-ui/src/infra/app/types.d.ts +32 -0
  153. package/dist/packages/sdk-ui/src/infra/contexts/sisense-context/sisense-context-provider.d.ts +1 -1
  154. package/dist/packages/sdk-ui/src/infra/formatting/format-data-set.d.ts +21 -0
  155. package/dist/packages/sdk-ui/src/infra/formatting/format-date.d.ts +67 -0
  156. package/dist/packages/sdk-ui/src/infra/formatting/format-number.d.ts +24 -0
  157. package/dist/packages/sdk-ui/src/infra/formatting/index.d.ts +5 -0
  158. package/dist/packages/sdk-ui/src/infra/modules/build-module-graph.d.ts +31 -0
  159. package/dist/packages/sdk-ui/src/infra/modules/build-module-registry.d.ts +31 -0
  160. package/dist/packages/sdk-ui/src/infra/modules/core-module-providers-tree.d.ts +11 -0
  161. package/dist/packages/sdk-ui/src/infra/modules/core-module.d.ts +26 -0
  162. package/dist/packages/sdk-ui/src/infra/modules/index.d.ts +3 -0
  163. package/dist/packages/sdk-ui/src/infra/modules/module-provider.d.ts +17 -0
  164. package/dist/packages/sdk-ui/src/infra/modules/modules-context.d.ts +20 -0
  165. package/dist/packages/sdk-ui/src/infra/modules/types.d.ts +79 -0
  166. package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +34 -6
  167. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +219 -49
  168. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +3 -3
  169. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +22 -0
  170. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +22 -0
  171. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +22 -0
  172. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +22 -0
  173. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +22 -0
  174. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +22 -0
  175. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +22 -0
  176. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +22 -0
  177. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +22 -0
  178. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +22 -0
  179. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +22 -0
  180. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +22 -0
  181. package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +22 -0
  182. package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +22 -0
  183. package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +44 -0
  184. package/dist/packages/sdk-ui/src/modules/ai/common/collapsible.d.ts +38 -2
  185. package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +4 -13
  186. package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -1
  187. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/get-dimension-name.d.ts +9 -0
  188. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +4 -3
  189. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/get-filter-name.d.ts +10 -0
  190. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/translate-filters-to-json.d.ts +3 -3
  191. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/get-query-element-summary.d.ts +23 -0
  192. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/get-measure-name.d.ts +10 -0
  193. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +4 -3
  194. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +3 -1
  195. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-from-json.d.ts +1 -1
  196. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-json.d.ts +4 -3
  197. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +3 -2
  198. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +1 -1
  199. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/process-measured-value.d.ts +14 -0
  200. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +70 -9
  201. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/to-widget-props.d.ts +3 -3
  202. package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/translate-envelope-widget-from-json.d.ts +2 -3
  203. package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +1 -18
  204. package/dist/packages/sdk-ui/src/props.d.ts +55 -2
  205. package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +6 -1
  206. package/dist/packages/sdk-ui/src/public-api/beta.d.ts +6 -0
  207. package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
  208. package/dist/packages/sdk-ui/src/public-api/public.d.ts +3 -1
  209. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +5 -3
  210. package/dist/packages/sdk-ui/src/shared/components/loading-overlay.d.ts +1 -0
  211. package/dist/packages/sdk-ui/src/shared/hooks/use-element-height.d.ts +19 -0
  212. package/dist/packages/sdk-ui/src/shared/hooks/use-synced-state.d.ts +23 -2
  213. package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +8 -0
  214. package/dist/packages/sdk-ui/src/shared/utils/gradient.d.ts +5 -0
  215. package/dist/packages/sdk-ui/src/types.d.ts +78 -6
  216. package/dist/{use-hover-B6VmMb06.js → quota-notification-DqabeDbO.js} +24790 -22993
  217. package/dist/quota-notification-gYE6PTWA.cjs +750 -0
  218. package/dist/translations/de-de.cjs +1 -1
  219. package/dist/translations/de-de.js +27 -5
  220. package/dist/translations/en-us.cjs +1 -1
  221. package/dist/translations/en-us.js +1 -1
  222. package/dist/translations/es-ar.cjs +1 -1
  223. package/dist/translations/es-ar.js +27 -5
  224. package/dist/translations/es-es.cjs +1 -1
  225. package/dist/translations/es-es.js +27 -5
  226. package/dist/translations/fr-fr.cjs +1 -1
  227. package/dist/translations/fr-fr.js +27 -5
  228. package/dist/translations/it-it.cjs +1 -1
  229. package/dist/translations/it-it.js +29 -7
  230. package/dist/translations/ja-jp.cjs +1 -1
  231. package/dist/translations/ja-jp.js +27 -5
  232. package/dist/translations/ko-kr.cjs +1 -1
  233. package/dist/translations/ko-kr.js +27 -5
  234. package/dist/translations/nl-nl.cjs +1 -1
  235. package/dist/translations/nl-nl.js +29 -7
  236. package/dist/translations/pt-br.cjs +1 -1
  237. package/dist/translations/pt-br.js +27 -5
  238. package/dist/translations/ru-ru.cjs +1 -1
  239. package/dist/translations/ru-ru.js +27 -5
  240. package/dist/translations/tr-tr.cjs +1 -1
  241. package/dist/translations/tr-tr.js +27 -5
  242. package/dist/translations/zh-cn.cjs +1 -1
  243. package/dist/translations/zh-cn.js +27 -5
  244. package/dist/{types-CzgBH2kL.cjs → types-DSNnndG6.cjs} +1 -1
  245. package/dist/types-DecTaxy7.js +74 -0
  246. package/dist/{utils-BwGnDoB0.cjs → utils-Cpeyj9TN.cjs} +52 -52
  247. package/dist/{utils-CsV-iYtb.js → utils-L-HO2pCd.js} +2521 -2469
  248. package/dist/{widget-composer-C72Io-3c.cjs → widget-composer-CyWQaInf.cjs} +1 -1
  249. package/dist/{widget-composer-Bv_OVu1o.js → widget-composer-u6NMLm1C.js} +3 -3
  250. package/package.json +9 -8
  251. package/dist/apply-styled-options-to-query-23D9br-S.cjs +0 -1
  252. package/dist/apply-styled-options-to-query-BagjzMqm.js +0 -5992
  253. package/dist/dimensions-Bn1EaWiP.js +0 -204
  254. package/dist/dimensions-D8r34WRI.cjs +0 -1
  255. package/dist/index-C9G8giSk.cjs +0 -1
  256. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-dashboard-header-toolbar.d.ts +0 -25
  257. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +0 -16
  258. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +0 -10
  259. package/dist/types-D3fPN43o.js +0 -74
  260. package/dist/use-hover-CaSOzp0i.cjs +0 -720
@@ -1,54 +1,53 @@
1
- var sr = Object.defineProperty, nr = Object.defineProperties;
2
- var ir = Object.getOwnPropertyDescriptors;
3
- var ie = Object.getOwnPropertySymbols;
4
- var We = Object.prototype.hasOwnProperty, Ve = Object.prototype.propertyIsEnumerable;
5
- var Pe = (e, t, r) => t in e ? sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, l = (e, t) => {
1
+ var cr = Object.defineProperty, lr = Object.defineProperties;
2
+ var fr = Object.getOwnPropertyDescriptors;
3
+ var oe = Object.getOwnPropertySymbols;
4
+ var Ke = Object.prototype.hasOwnProperty, Ge = Object.prototype.propertyIsEnumerable;
5
+ var Je = (e, t, r) => t in e ? cr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, l = (e, t) => {
6
6
  for (var r in t || (t = {}))
7
- We.call(t, r) && Pe(e, r, t[r]);
8
- if (ie)
9
- for (var r of ie(t))
10
- Ve.call(t, r) && Pe(e, r, t[r]);
7
+ Ke.call(t, r) && Je(e, r, t[r]);
8
+ if (oe)
9
+ for (var r of oe(t))
10
+ Ge.call(t, r) && Je(e, r, t[r]);
11
11
  return e;
12
- }, F = (e, t) => nr(e, ir(t));
13
- var ye = (e, t) => {
12
+ }, E = (e, t) => lr(e, fr(t));
13
+ var Ee = (e, t) => {
14
14
  var r = {};
15
15
  for (var s in e)
16
- We.call(e, s) && t.indexOf(s) < 0 && (r[s] = e[s]);
17
- if (e != null && ie)
18
- for (var s of ie(e))
19
- t.indexOf(s) < 0 && Ve.call(e, s) && (r[s] = e[s]);
16
+ Ke.call(e, s) && t.indexOf(s) < 0 && (r[s] = e[s]);
17
+ if (e != null && oe)
18
+ for (var s of oe(e))
19
+ t.indexOf(s) < 0 && Ge.call(e, s) && (r[s] = e[s]);
20
20
  return r;
21
21
  };
22
- import { f as or, J as ar } from "../types-D3fPN43o.js";
23
- import { b as Bi, E as Li, a as zi, i as Ui, e as _i, d as Pi } from "../types-D3fPN43o.js";
24
- import { cj as ur, bs as cr, ck as lr, cl as dr, cm as fr, aw as De, cn as pr, av as mr, co as gr, bb as yr, ax as hr, cp as br, be as Er, bc as Fr, aO as Ar, ba as wr, bd as Tr, d as Sr, c as Cr, k as qr, cq as $r, cr as Or, cs as Dr, ct as xr, cu as vr, cv as Nr, cw as Mr, cx as Rr, cy as Ir, cz as kr, cA as Br, aq as Lr, cB as zr, cC as Ur, S as U, t as ee, h as _r, b as $, ai as _, at as ct, cD as Pr, cE as Wr, cF as Vr, M as j, cc as jr, cG as Jr, aK as Kr, aj as je, au as le, cg as Gr, ch as Yr, bQ as lt, cH as dt, ad as Hr, cI as ft, cJ as pt, A as Qr, b_ as mt, cK as Xr, bH as Zr, aD as es } from "../apply-styled-options-to-query-BagjzMqm.js";
25
- import { i as ts, b as rs, D as ss, d as ns, a as is } from "../dimensions-Bn1EaWiP.js";
26
- function os(e, t) {
27
- 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));
22
+ import { f as dr, J as mr } from "../types-DecTaxy7.js";
23
+ import { b as Hi, E as Qi, a as Xi, i as Zi, e as ea, d as ta } from "../types-DecTaxy7.js";
24
+ import { bt as pr, br as gr, cr as yr, bs as hr, aW as br, cs as Fr, ct as Er, aw as Me, cu as Ar, av as Tr, cv as wr, bh as Sr, ax as Cr, cw as Or, bk as $r, bi as qr, aS as Dr, bg as xr, bj as Nr, cx as vr, at as Mr, bB as Rr, cy as Ir, e as kr, cz as Lr, cA as Br, cB as _r, cC as zr, cD as Ur, cE as Pr, cF as Wr, cG as Vr, cH as jr, cI as Jr, cJ as Kr, as as Gr, cK as Yr, cL as Hr, ak as z, l as se, b as Qr, x as $, a4 as Xr, ag as U, aj as gt, cM as Zr, cN as es, cO as ts, M as J, aX as rs, cP as ss, aO as ns, am as Ye, au as me, cj as is, ck as as, bZ as yt, cQ as ht, ab as os, cR as bt, cS as Ft, A as us, c6 as Et, cT as cs, bQ as ls, aE as fs } from "../apply-styled-options-to-query-BK1NnV4P.js";
25
+ function ds(e, t) {
26
+ const r = e.length, s = t.length, n = Array.from({ length: r + 1 }, (i, a) => Array.from({ length: s + 1 }, (o, u) => a === 0 ? u : u === 0 ? a : 0));
28
27
  for (let i = 1; i <= r; i++)
29
- for (let o = 1; o <= s; o++)
30
- 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));
28
+ for (let a = 1; a <= s; a++)
29
+ n[i][a] = Math.min(n[i - 1][a] + 1, n[i][a - 1] + 1, n[i - 1][a - 1] + (e[i - 1] === t[a - 1] ? 0 : 1));
31
30
  return n[r][s];
32
31
  }
33
- function xe(e, t) {
32
+ function Re(e, t) {
34
33
  const r = [];
35
- let s = "", n = 0, i = !1, o = null;
36
- for (let a = 0; a < e.length; a++) {
37
- const u = e[a], c = e[a + 1];
34
+ let s = "", n = 0, i = !1, a = null;
35
+ for (let o = 0; o < e.length; o++) {
36
+ const u = e[o], c = e[o + 1];
38
37
  if (i) {
39
- if (u !== o) {
38
+ if (u !== a) {
40
39
  s += u;
41
40
  continue;
42
41
  }
43
- if (c === o) {
44
- s += u + c, a++;
42
+ if (c === a) {
43
+ s += u + c, o++;
45
44
  continue;
46
45
  }
47
- i = !1, o = null, s += u;
46
+ i = !1, a = null, s += u;
48
47
  continue;
49
48
  } else {
50
49
  if (u === "'" || u === '"') {
51
- i = !0, o = u, s += u;
50
+ i = !0, a = u, s += u;
52
51
  continue;
53
52
  }
54
53
  if ("([{".includes(u) && n++, ")]}".includes(u) && n--, u === t && n === 0) {
@@ -60,61 +59,61 @@ function xe(e, t) {
60
59
  }
61
60
  return s.trim() && r.push(s.trim()), r;
62
61
  }
63
- function as(e, t) {
62
+ function ms(e, t) {
64
63
  let r = 0, s = !1, n = null;
65
64
  for (let i = 0; i < e.length; i++) {
66
- const o = e[i], a = e[i + 1];
65
+ const a = e[i], o = e[i + 1];
67
66
  if (s) {
68
- if (o !== n)
67
+ if (a !== n)
69
68
  continue;
70
- if (a === n) {
69
+ if (o === n) {
71
70
  i++;
72
71
  continue;
73
72
  }
74
73
  s = !1, n = null;
75
74
  } else {
76
- if (o === "'" || o === '"') {
77
- s = !0, n = o;
75
+ if (a === "'" || a === '"') {
76
+ s = !0, n = a;
78
77
  continue;
79
78
  }
80
- if ("([{".includes(o) && r++, ")]}".includes(o) && r--, o === t && r === 0)
79
+ if ("([{".includes(a) && r++, ")]}".includes(a) && r--, a === t && r === 0)
81
80
  return i;
82
81
  }
83
82
  }
84
83
  return -1;
85
84
  }
86
- function us(e, t) {
85
+ function ps(e, t) {
87
86
  if (e[t] !== "(")
88
87
  return -1;
89
88
  let r = 1, s = t + 1, n = !1, i = null;
90
89
  for (; s < e.length; ) {
91
- const o = e[s], a = e[s + 1];
90
+ const a = e[s], o = e[s + 1];
92
91
  if (n) {
93
- if (o !== i) {
92
+ if (a !== i) {
94
93
  s++;
95
94
  continue;
96
95
  }
97
- if (a === i) {
96
+ if (o === i) {
98
97
  s += 2;
99
98
  continue;
100
99
  }
101
100
  n = !1, i = null, s++;
102
101
  } else {
103
- if (o === "'" || o === '"') {
104
- n = !0, i = o, s++;
102
+ if (a === "'" || a === '"') {
103
+ n = !0, i = a, s++;
105
104
  continue;
106
105
  }
107
- if ("([{".includes(o) && r++, ")]}".includes(o) && --r === 0)
106
+ if ("([{".includes(a) && r++, ")]}".includes(a) && --r === 0)
108
107
  return s;
109
108
  s++;
110
109
  }
111
110
  }
112
111
  return -1;
113
112
  }
114
- function cs(e) {
113
+ function gs(e) {
115
114
  return e.startsWith("'") && e.endsWith("'") || e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e;
116
115
  }
117
- function J(e) {
116
+ function K(e) {
118
117
  if (!e || typeof e != "string")
119
118
  throw new Error(`Invalid composeCode: expected non-empty string, got ${typeof e}`);
120
119
  const t = e.trim();
@@ -123,16 +122,16 @@ function J(e) {
123
122
  const r = t.match(/^([a-zA-Z_$][a-zA-Z0-9_.$]*)\s*\((.*)\)$/);
124
123
  if (!r)
125
124
  throw new Error(`Invalid composeCode format: expected function call, got '${t}'`);
126
- const s = r[1], n = r[2], i = gt(n);
125
+ const s = r[1], n = r[2], i = At(n);
127
126
  return {
128
127
  function: s,
129
128
  args: i
130
129
  };
131
130
  }
132
- function gt(e) {
133
- return e.trim() ? xe(e, ",").map(yt) : [];
131
+ function At(e) {
132
+ return e.trim() ? Re(e, ",").map(Tt) : [];
134
133
  }
135
- function yt(e) {
134
+ function Tt(e) {
136
135
  if (!e)
137
136
  throw new Error("Cannot parse empty argument value");
138
137
  if (e === "null")
@@ -153,29 +152,29 @@ function yt(e) {
153
152
  const r = e.slice(1, -1).trim();
154
153
  if (!r)
155
154
  return [];
156
- const s = gt(r);
155
+ const s = At(r);
157
156
  return s.every((n) => typeof n == "string"), s;
158
157
  }
159
158
  if (e.startsWith("{") && e.endsWith("}")) {
160
159
  const r = e.slice(1, -1).trim();
161
- return r ? ds(r) : {};
160
+ return r ? hs(r) : {};
162
161
  }
163
- return e.includes("(") && e.includes(")") ? J(e) : (e.startsWith("DM."), e);
162
+ return e.includes("(") && e.includes(")") ? K(e) : (e.startsWith("DM."), e);
164
163
  }
165
- function ls(e) {
166
- const t = as(e, ":");
164
+ function ys(e) {
165
+ const t = ms(e, ":");
167
166
  if (t === -1)
168
167
  throw new Error(`Invalid object property: expected 'key: value', got '${e}'`);
169
- const r = cs(e.slice(0, t).trim()), s = yt(e.slice(t + 1).trim());
168
+ const r = gs(e.slice(0, t).trim()), s = Tt(e.slice(t + 1).trim());
170
169
  return [r, s];
171
170
  }
172
- function ds(e) {
171
+ function hs(e) {
173
172
  if (!e.trim())
174
173
  return {};
175
- const t = xe(e, ",").map(ls).filter(([, r]) => r !== null);
174
+ const t = Re(e, ",").map(ys).filter(([, r]) => r !== null);
176
175
  return Object.fromEntries(t);
177
176
  }
178
- class fs {
177
+ class bs {
179
178
  constructor() {
180
179
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
181
180
  }
@@ -192,9 +191,9 @@ class fs {
192
191
  this.keyToValue.clear(), this.valueToKey.clear();
193
192
  }
194
193
  }
195
- class ht {
194
+ class wt {
196
195
  constructor(t) {
197
- this.generateIdentifier = t, this.kv = new fs();
196
+ this.generateIdentifier = t, this.kv = new bs();
198
197
  }
199
198
  register(t, r) {
200
199
  this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
@@ -209,7 +208,7 @@ class ht {
209
208
  return this.kv.getByKey(t);
210
209
  }
211
210
  }
212
- class ps extends ht {
211
+ class Fs extends wt {
213
212
  constructor() {
214
213
  super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
215
214
  }
@@ -220,7 +219,7 @@ class ps extends ht {
220
219
  return this.classToAllowedProps.get(t);
221
220
  }
222
221
  }
223
- function ms(e) {
222
+ function Es(e) {
224
223
  if ("values" in Object)
225
224
  return Object.values(e);
226
225
  const t = [];
@@ -228,8 +227,8 @@ function ms(e) {
228
227
  e.hasOwnProperty(r) && t.push(e[r]);
229
228
  return t;
230
229
  }
231
- function gs(e, t) {
232
- const r = ms(e);
230
+ function As(e, t) {
231
+ const r = Es(e);
233
232
  if ("find" in r)
234
233
  return r.find(t);
235
234
  const s = r;
@@ -239,20 +238,20 @@ function gs(e, t) {
239
238
  return i;
240
239
  }
241
240
  }
242
- function K(e, t) {
241
+ function G(e, t) {
243
242
  Object.entries(e).forEach(([r, s]) => t(s, r));
244
243
  }
245
- function oe(e, t) {
244
+ function ue(e, t) {
246
245
  return e.indexOf(t) !== -1;
247
246
  }
248
- function Je(e, t) {
247
+ function He(e, t) {
249
248
  for (let r = 0; r < e.length; r++) {
250
249
  const s = e[r];
251
250
  if (t(s))
252
251
  return s;
253
252
  }
254
253
  }
255
- class ys {
254
+ class Ts {
256
255
  constructor() {
257
256
  this.transfomers = {};
258
257
  }
@@ -260,13 +259,13 @@ class ys {
260
259
  this.transfomers[t.name] = t;
261
260
  }
262
261
  findApplicable(t) {
263
- return gs(this.transfomers, (r) => r.isApplicable(t));
262
+ return As(this.transfomers, (r) => r.isApplicable(t));
264
263
  }
265
264
  findByName(t) {
266
265
  return this.transfomers[t];
267
266
  }
268
267
  }
269
- const hs = (e) => Object.prototype.toString.call(e).slice(8, -1), bt = (e) => typeof e == "undefined", bs = (e) => e === null, H = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, we = (e) => H(e) && Object.keys(e).length === 0, k = (e) => Array.isArray(e), Es = (e) => typeof e == "string", Fs = (e) => typeof e == "number" && !isNaN(e), As = (e) => typeof e == "boolean", ws = (e) => e instanceof RegExp, Q = (e) => e instanceof Map, X = (e) => e instanceof Set, Et = (e) => hs(e) === "Symbol", Ts = (e) => e instanceof Date && !isNaN(e.valueOf()), Ss = (e) => e instanceof Error, Ke = (e) => typeof e == "number" && isNaN(e), Cs = (e) => As(e) || bs(e) || bt(e) || Fs(e) || Es(e) || Et(e), qs = (e) => typeof e == "bigint", $s = (e) => e === 1 / 0 || e === -1 / 0, Os = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ds = (e) => e instanceof URL, Ft = (e) => e.replace(/\./g, "\\."), he = (e) => e.map(String).map(Ft).join("."), Y = (e) => {
268
+ const ws = (e) => Object.prototype.toString.call(e).slice(8, -1), St = (e) => typeof e == "undefined", Ss = (e) => e === null, Z = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => Z(e) && Object.keys(e).length === 0, k = (e) => Array.isArray(e), Cs = (e) => typeof e == "string", Os = (e) => typeof e == "number" && !isNaN(e), $s = (e) => typeof e == "boolean", qs = (e) => e instanceof RegExp, ee = (e) => e instanceof Map, te = (e) => e instanceof Set, Ct = (e) => ws(e) === "Symbol", Ds = (e) => e instanceof Date && !isNaN(e.valueOf()), xs = (e) => e instanceof Error, Qe = (e) => typeof e == "number" && isNaN(e), Ns = (e) => $s(e) || Ss(e) || St(e) || Os(e) || Cs(e) || Ct(e), vs = (e) => typeof e == "bigint", Ms = (e) => e === 1 / 0 || e === -1 / 0, Rs = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Is = (e) => e instanceof URL, Ot = (e) => e.replace(/\./g, "\\."), Ae = (e) => e.map(String).map(Ot).join("."), Q = (e) => {
270
269
  const t = [];
271
270
  let r = "";
272
271
  for (let n = 0; n < e.length; n++) {
@@ -292,12 +291,12 @@ function I(e, t, r, s) {
292
291
  untransform: s
293
292
  };
294
293
  }
295
- const At = [
296
- I(bt, "undefined", () => null, () => {
294
+ const $t = [
295
+ I(St, "undefined", () => null, () => {
297
296
  }),
298
- I(qs, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
299
- I(Ts, "Date", (e) => e.toISOString(), (e) => new Date(e)),
300
- I(Ss, "Error", (e, t) => {
297
+ I(vs, "bigint", (e) => e.toString(), (e) => typeof BigInt != "undefined" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
298
+ I(Ds, "Date", (e) => e.toISOString(), (e) => new Date(e)),
299
+ I(xs, "Error", (e, t) => {
301
300
  const r = {
302
301
  name: e.name,
303
302
  message: e.message
@@ -311,24 +310,24 @@ const At = [
311
310
  r[s] = e[s];
312
311
  }), r;
313
312
  }),
314
- I(ws, "regexp", (e) => "" + e, (e) => {
313
+ I(qs, "regexp", (e) => "" + e, (e) => {
315
314
  const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
316
315
  return new RegExp(t, r);
317
316
  }),
318
317
  I(
319
- X,
318
+ te,
320
319
  "set",
321
320
  // (sets only exist in es6+)
322
321
  // eslint-disable-next-line es5/no-es6-methods
323
322
  (e) => [...e.values()],
324
323
  (e) => new Set(e)
325
324
  ),
326
- I(Q, "map", (e) => [...e.entries()], (e) => new Map(e)),
327
- I((e) => Ke(e) || $s(e), "number", (e) => Ke(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
325
+ I(ee, "map", (e) => [...e.entries()], (e) => new Map(e)),
326
+ I((e) => Qe(e) || Ms(e), "number", (e) => Qe(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
328
327
  I((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
329
- I(Ds, "URL", (e) => e.toString(), (e) => new URL(e))
328
+ I(Is, "URL", (e) => e.toString(), (e) => new URL(e))
330
329
  ];
331
- function de(e, t, r, s) {
330
+ function pe(e, t, r, s) {
332
331
  return {
333
332
  isApplicable: e,
334
333
  annotation: t,
@@ -336,12 +335,12 @@ function de(e, t, r, s) {
336
335
  untransform: s
337
336
  };
338
337
  }
339
- const wt = de((e, t) => Et(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
338
+ const qt = pe((e, t) => Ct(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
340
339
  const s = r.symbolRegistry.getValue(t[1]);
341
340
  if (!s)
342
341
  throw new Error("Trying to deserialize unknown symbol");
343
342
  return s;
344
- }), xs = [
343
+ }), ks = [
345
344
  Int8Array,
346
345
  Uint8Array,
347
346
  Int16Array,
@@ -351,16 +350,16 @@ const wt = de((e, t) => Et(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
351
350
  Float32Array,
352
351
  Float64Array,
353
352
  Uint8ClampedArray
354
- ].reduce((e, t) => (e[t.name] = t, e), {}), Tt = de(Os, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
355
- const r = xs[t[1]];
353
+ ].reduce((e, t) => (e[t.name] = t, e), {}), Dt = pe(Rs, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
354
+ const r = ks[t[1]];
356
355
  if (!r)
357
356
  throw new Error("Trying to deserialize unknown typed array");
358
357
  return new r(e);
359
358
  });
360
- function St(e, t) {
359
+ function xt(e, t) {
361
360
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
362
361
  }
363
- const Ct = de(St, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
362
+ const Nt = pe(xt, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
364
363
  const r = t.classRegistry.getAllowedProps(e.constructor);
365
364
  if (!r)
366
365
  return l({}, e);
@@ -373,49 +372,49 @@ const Ct = de(St, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructo
373
372
  if (!s)
374
373
  throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
375
374
  return Object.assign(Object.create(s.prototype), e);
376
- }), qt = de((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) => {
375
+ }), vt = pe((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) => {
377
376
  const s = r.customTransformerRegistry.findByName(t[1]);
378
377
  if (!s)
379
378
  throw new Error("Trying to deserialize unknown custom value");
380
379
  return s.deserialize(e);
381
- }), vs = [Ct, wt, qt, Tt], Ge = (e, t) => {
382
- const r = Je(vs, (n) => n.isApplicable(e, t));
380
+ }), Ls = [Nt, qt, vt, Dt], Xe = (e, t) => {
381
+ const r = He(Ls, (n) => n.isApplicable(e, t));
383
382
  if (r)
384
383
  return {
385
384
  value: r.transform(e, t),
386
385
  type: r.annotation(e, t)
387
386
  };
388
- const s = Je(At, (n) => n.isApplicable(e, t));
387
+ const s = He($t, (n) => n.isApplicable(e, t));
389
388
  if (s)
390
389
  return {
391
390
  value: s.transform(e, t),
392
391
  type: s.annotation
393
392
  };
394
- }, $t = {};
395
- At.forEach((e) => {
396
- $t[e.annotation] = e;
393
+ }, Mt = {};
394
+ $t.forEach((e) => {
395
+ Mt[e.annotation] = e;
397
396
  });
398
- const Ns = (e, t, r) => {
397
+ const Bs = (e, t, r) => {
399
398
  if (k(t))
400
399
  switch (t[0]) {
401
400
  case "symbol":
402
- return wt.untransform(e, t, r);
401
+ return qt.untransform(e, t, r);
403
402
  case "class":
404
- return Ct.untransform(e, t, r);
403
+ return Nt.untransform(e, t, r);
405
404
  case "custom":
406
- return qt.untransform(e, t, r);
405
+ return vt.untransform(e, t, r);
407
406
  case "typed-array":
408
- return Tt.untransform(e, t, r);
407
+ return Dt.untransform(e, t, r);
409
408
  default:
410
409
  throw new Error("Unknown transformation: " + t);
411
410
  }
412
411
  else {
413
- const s = $t[t];
412
+ const s = Mt[t];
414
413
  if (!s)
415
414
  throw new Error("Unknown transformation: " + t);
416
415
  return s.untransform(e, r);
417
416
  }
418
- }, V = (e, t) => {
417
+ }, j = (e, t) => {
419
418
  if (t > e.size)
420
419
  throw new Error("index out of bounds");
421
420
  const r = e.keys();
@@ -423,52 +422,52 @@ const Ns = (e, t, r) => {
423
422
  r.next(), t--;
424
423
  return r.next().value;
425
424
  };
426
- function Ot(e) {
427
- if (oe(e, "__proto__"))
425
+ function Rt(e) {
426
+ if (ue(e, "__proto__"))
428
427
  throw new Error("__proto__ is not allowed as a property");
429
- if (oe(e, "prototype"))
428
+ if (ue(e, "prototype"))
430
429
  throw new Error("prototype is not allowed as a property");
431
- if (oe(e, "constructor"))
430
+ if (ue(e, "constructor"))
432
431
  throw new Error("constructor is not allowed as a property");
433
432
  }
434
- const Ms = (e, t) => {
435
- Ot(t);
433
+ const _s = (e, t) => {
434
+ Rt(t);
436
435
  for (let r = 0; r < t.length; r++) {
437
436
  const s = t[r];
438
- if (X(e))
439
- e = V(e, +s);
440
- else if (Q(e)) {
441
- const n = +s, i = +t[++r] == 0 ? "key" : "value", o = V(e, n);
437
+ if (te(e))
438
+ e = j(e, +s);
439
+ else if (ee(e)) {
440
+ const n = +s, i = +t[++r] == 0 ? "key" : "value", a = j(e, n);
442
441
  switch (i) {
443
442
  case "key":
444
- e = o;
443
+ e = a;
445
444
  break;
446
445
  case "value":
447
- e = e.get(o);
446
+ e = e.get(a);
448
447
  break;
449
448
  }
450
449
  } else
451
450
  e = e[s];
452
451
  }
453
452
  return e;
454
- }, Te = (e, t, r) => {
455
- if (Ot(t), t.length === 0)
453
+ }, $e = (e, t, r) => {
454
+ if (Rt(t), t.length === 0)
456
455
  return r(e);
457
456
  let s = e;
458
457
  for (let i = 0; i < t.length - 1; i++) {
459
- const o = t[i];
458
+ const a = t[i];
460
459
  if (k(s)) {
461
- const a = +o;
462
- s = s[a];
463
- } else if (H(s))
460
+ const o = +a;
464
461
  s = s[o];
465
- else if (X(s)) {
466
- const a = +o;
467
- s = V(s, a);
468
- } else if (Q(s)) {
462
+ } else if (Z(s))
463
+ s = s[a];
464
+ else if (te(s)) {
465
+ const o = +a;
466
+ s = j(s, o);
467
+ } else if (ee(s)) {
469
468
  if (i === t.length - 2)
470
469
  break;
471
- const u = +o, c = +t[++i] == 0 ? "key" : "value", g = V(s, u);
470
+ const u = +a, c = +t[++i] == 0 ? "key" : "value", g = j(s, u);
472
471
  switch (c) {
473
472
  case "key":
474
473
  s = g;
@@ -480,130 +479,130 @@ const Ms = (e, t) => {
480
479
  }
481
480
  }
482
481
  const n = t[t.length - 1];
483
- if (k(s) ? s[+n] = r(s[+n]) : H(s) && (s[n] = r(s[n])), X(s)) {
484
- const i = V(s, +n), o = r(i);
485
- i !== o && (s.delete(i), s.add(o));
482
+ if (k(s) ? s[+n] = r(s[+n]) : Z(s) && (s[n] = r(s[n])), te(s)) {
483
+ const i = j(s, +n), a = r(i);
484
+ i !== a && (s.delete(i), s.add(a));
486
485
  }
487
- if (Q(s)) {
488
- const i = +t[t.length - 2], o = V(s, i);
486
+ if (ee(s)) {
487
+ const i = +t[t.length - 2], a = j(s, i);
489
488
  switch (+n == 0 ? "key" : "value") {
490
489
  case "key": {
491
- const u = r(o);
492
- s.set(u, s.get(o)), u !== o && s.delete(o);
490
+ const u = r(a);
491
+ s.set(u, s.get(a)), u !== a && s.delete(a);
493
492
  break;
494
493
  }
495
494
  case "value": {
496
- s.set(o, r(s.get(o)));
495
+ s.set(a, r(s.get(a)));
497
496
  break;
498
497
  }
499
498
  }
500
499
  }
501
500
  return e;
502
501
  };
503
- function Se(e, t, r = []) {
502
+ function qe(e, t, r = []) {
504
503
  if (!e)
505
504
  return;
506
505
  if (!k(e)) {
507
- K(e, (i, o) => Se(i, t, [...r, ...Y(o)]));
506
+ G(e, (i, a) => qe(i, t, [...r, ...Q(a)]));
508
507
  return;
509
508
  }
510
509
  const [s, n] = e;
511
- n && K(n, (i, o) => {
512
- Se(i, t, [...r, ...Y(o)]);
510
+ n && G(n, (i, a) => {
511
+ qe(i, t, [...r, ...Q(a)]);
513
512
  }), t(s, r);
514
513
  }
515
- function Rs(e, t, r) {
516
- return Se(t, (s, n) => {
517
- e = Te(e, n, (i) => Ns(i, s, r));
514
+ function zs(e, t, r) {
515
+ return qe(t, (s, n) => {
516
+ e = $e(e, n, (i) => Bs(i, s, r));
518
517
  }), e;
519
518
  }
520
- function Is(e, t) {
519
+ function Us(e, t) {
521
520
  function r(s, n) {
522
- const i = Ms(e, Y(n));
523
- s.map(Y).forEach((o) => {
524
- e = Te(e, o, () => i);
521
+ const i = _s(e, Q(n));
522
+ s.map(Q).forEach((a) => {
523
+ e = $e(e, a, () => i);
525
524
  });
526
525
  }
527
526
  if (k(t)) {
528
527
  const [s, n] = t;
529
528
  s.forEach((i) => {
530
- e = Te(e, Y(i), () => e);
531
- }), n && K(n, r);
529
+ e = $e(e, Q(i), () => e);
530
+ }), n && G(n, r);
532
531
  } else
533
- K(t, r);
532
+ G(t, r);
534
533
  return e;
535
534
  }
536
- const ks = (e, t) => H(e) || k(e) || Q(e) || X(e) || St(e, t);
537
- function Bs(e, t, r) {
535
+ const Ps = (e, t) => Z(e) || k(e) || ee(e) || te(e) || xt(e, t);
536
+ function Ws(e, t, r) {
538
537
  const s = r.get(e);
539
538
  s ? s.push(t) : r.set(e, [t]);
540
539
  }
541
- function Ls(e, t) {
540
+ function Vs(e, t) {
542
541
  const r = {};
543
542
  let s;
544
543
  return e.forEach((n) => {
545
544
  if (n.length <= 1)
546
545
  return;
547
- t || (n = n.map((a) => a.map(String)).sort((a, u) => a.length - u.length));
548
- const [i, ...o] = n;
549
- i.length === 0 ? s = o.map(he) : r[he(i)] = o.map(he);
550
- }), s ? we(r) ? [s] : [s, r] : we(r) ? void 0 : r;
546
+ t || (n = n.map((o) => o.map(String)).sort((o, u) => o.length - u.length));
547
+ const [i, ...a] = n;
548
+ i.length === 0 ? s = a.map(Ae) : r[Ae(i)] = a.map(Ae);
549
+ }), s ? Oe(r) ? [s] : [s, r] : Oe(r) ? void 0 : r;
551
550
  }
552
- const Dt = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
551
+ const It = (e, t, r, s, n = [], i = [], a = /* @__PURE__ */ new Map()) => {
553
552
  var h;
554
- const a = Cs(e);
555
- if (!a) {
556
- Bs(e, n, t);
557
- const b = o.get(e);
553
+ const o = Ns(e);
554
+ if (!o) {
555
+ Ws(e, n, t);
556
+ const b = a.get(e);
558
557
  if (b)
559
558
  return s ? {
560
559
  transformedValue: null
561
560
  } : b;
562
561
  }
563
- if (!ks(e, r)) {
564
- const b = Ge(e, r), p = b ? {
562
+ if (!Ps(e, r)) {
563
+ const b = Xe(e, r), m = b ? {
565
564
  transformedValue: b.value,
566
565
  annotations: [b.type]
567
566
  } : {
568
567
  transformedValue: e
569
568
  };
570
- return a || o.set(e, p), p;
569
+ return o || a.set(e, m), m;
571
570
  }
572
- if (oe(i, e))
571
+ if (ue(i, e))
573
572
  return {
574
573
  transformedValue: null
575
574
  };
576
- const u = Ge(e, r), c = (h = u == null ? void 0 : u.value) != null ? h : e, g = k(c) ? [] : {}, d = {};
577
- K(c, (b, p) => {
578
- if (p === "__proto__" || p === "constructor" || p === "prototype")
579
- throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
580
- const E = Dt(b, t, r, s, [...n, p], [...i, e], o);
581
- g[p] = E.transformedValue, k(E.annotations) ? d[p] = E.annotations : H(E.annotations) && K(E.annotations, (C, v) => {
582
- d[Ft(p) + "." + v] = C;
575
+ const u = Xe(e, r), c = (h = u == null ? void 0 : u.value) != null ? h : e, g = k(c) ? [] : {}, f = {};
576
+ G(c, (b, m) => {
577
+ if (m === "__proto__" || m === "constructor" || m === "prototype")
578
+ throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);
579
+ const F = It(b, t, r, s, [...n, m], [...i, e], a);
580
+ g[m] = F.transformedValue, k(F.annotations) ? f[m] = F.annotations : Z(F.annotations) && G(F.annotations, (O, N) => {
581
+ f[Ot(m) + "." + N] = O;
583
582
  });
584
583
  });
585
- const m = we(d) ? {
584
+ const p = Oe(f) ? {
586
585
  transformedValue: g,
587
586
  annotations: u ? [u.type] : void 0
588
587
  } : {
589
588
  transformedValue: g,
590
- annotations: u ? [u.type, d] : d
589
+ annotations: u ? [u.type, f] : f
591
590
  };
592
- return a || o.set(e, m), m;
591
+ return o || a.set(e, p), p;
593
592
  };
594
- function xt(e) {
593
+ function kt(e) {
595
594
  return Object.prototype.toString.call(e).slice(8, -1);
596
595
  }
597
- function Ye(e) {
598
- return xt(e) === "Array";
596
+ function Ze(e) {
597
+ return kt(e) === "Array";
599
598
  }
600
- function zs(e) {
601
- if (xt(e) !== "Object")
599
+ function js(e) {
600
+ if (kt(e) !== "Object")
602
601
  return !1;
603
602
  const t = Object.getPrototypeOf(e);
604
603
  return !!t && t.constructor === Object && t === Object.prototype;
605
604
  }
606
- function Us(e, t, r, s, n) {
605
+ function Js(e, t, r, s, n) {
607
606
  const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
608
607
  i === "enumerable" && (e[t] = r), n && i === "nonenumerable" && Object.defineProperty(e, t, {
609
608
  value: r,
@@ -612,17 +611,17 @@ function Us(e, t, r, s, n) {
612
611
  configurable: !0
613
612
  });
614
613
  }
615
- function Ce(e, t = {}) {
616
- if (Ye(e))
617
- return e.map((n) => Ce(n, t));
618
- if (!zs(e))
614
+ function De(e, t = {}) {
615
+ if (Ze(e))
616
+ return e.map((n) => De(n, t));
617
+ if (!js(e))
619
618
  return e;
620
619
  const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
621
620
  return [...r, ...s].reduce((n, i) => {
622
- if (Ye(t.props) && !t.props.includes(i))
621
+ if (Ze(t.props) && !t.props.includes(i))
623
622
  return n;
624
- const o = e[i], a = Ce(o, t);
625
- return Us(n, i, a, e, t.nonenumerable), n;
623
+ const a = e[i], o = De(a, t);
624
+ return Js(n, i, o, e, t.nonenumerable), n;
626
625
  }, {});
627
626
  }
628
627
  class y {
@@ -630,27 +629,27 @@ class y {
630
629
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
631
630
  */
632
631
  constructor({ dedupe: t = !1 } = {}) {
633
- this.classRegistry = new ps(), this.symbolRegistry = new ht((r) => {
632
+ this.classRegistry = new Fs(), this.symbolRegistry = new wt((r) => {
634
633
  var s;
635
634
  return (s = r.description) != null ? s : "";
636
- }), this.customTransformerRegistry = new ys(), this.allowedErrorProps = [], this.dedupe = t;
635
+ }), this.customTransformerRegistry = new Ts(), this.allowedErrorProps = [], this.dedupe = t;
637
636
  }
638
637
  serialize(t) {
639
- const r = /* @__PURE__ */ new Map(), s = Dt(t, r, this, this.dedupe), n = {
638
+ const r = /* @__PURE__ */ new Map(), s = It(t, r, this, this.dedupe), n = {
640
639
  json: s.transformedValue
641
640
  };
642
- s.annotations && (n.meta = F(l({}, n.meta), {
641
+ s.annotations && (n.meta = E(l({}, n.meta), {
643
642
  values: s.annotations
644
643
  }));
645
- const i = Ls(r, this.dedupe);
646
- return i && (n.meta = F(l({}, n.meta), {
644
+ const i = Vs(r, this.dedupe);
645
+ return i && (n.meta = E(l({}, n.meta), {
647
646
  referentialEqualities: i
648
647
  })), n;
649
648
  }
650
649
  deserialize(t) {
651
650
  const { json: r, meta: s } = t;
652
- let n = Ce(r);
653
- return s != null && s.values && (n = Rs(n, s.values, this)), s != null && s.referentialEqualities && (n = Is(n, s.referentialEqualities)), n;
651
+ let n = De(r);
652
+ return s != null && s.values && (n = zs(n, s.values, this)), s != null && s.referentialEqualities && (n = Us(n, s.referentialEqualities)), n;
654
653
  }
655
654
  stringify(t) {
656
655
  return JSON.stringify(this.serialize(t));
@@ -682,15 +681,22 @@ y.registerClass = y.defaultInstance.registerClass.bind(y.defaultInstance);
682
681
  y.registerSymbol = y.defaultInstance.registerSymbol.bind(y.defaultInstance);
683
682
  y.registerCustom = y.defaultInstance.registerCustom.bind(y.defaultInstance);
684
683
  y.allowErrorProps = y.defaultInstance.allowErrorProps.bind(y.defaultInstance);
685
- const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e.type), ve = (e) => new Sr(
684
+ const P = (e) => e === void 0 ? z.None : e, W = (e) => {
685
+ var t, r;
686
+ return (r = (t = e.title) != null ? t : e.name) != null ? r : "";
687
+ }, Ks = (e) => new mr(e.metadataItem, e.type), Ie = (e) => new vr(
686
688
  e.name,
687
689
  e.expression,
688
690
  e.type,
689
691
  e.description,
690
692
  P(e.sort),
691
693
  e.dataSource,
692
- e.composeCode
693
- ), Ne = (e) => new Cr(
694
+ e.composeCode,
695
+ e.panel,
696
+ e.indexed,
697
+ e.merged,
698
+ W(e)
699
+ ), ke = (e) => new Mr(
694
700
  e.name,
695
701
  e.expression,
696
702
  e.granularity,
@@ -698,28 +704,33 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
698
704
  e.description,
699
705
  P(e.sort),
700
706
  e.dataSource,
701
- e.composeCode
702
- ), N = (e) => {
707
+ e.composeCode,
708
+ e.panel,
709
+ e.indexed,
710
+ e.merged,
711
+ W(e)
712
+ ), v = (e) => {
703
713
  switch (e.__serializable) {
704
714
  case "DimensionalAttribute":
705
- return ve(e);
715
+ return Ie(e);
706
716
  case "DimensionalLevelAttribute":
707
- return Ne(e);
717
+ return ke(e);
708
718
  default:
709
719
  return e;
710
720
  }
711
- }, vt = (e) => new ss(
721
+ }, Lt = (e) => new Rr(
712
722
  e.name,
713
723
  e.expression,
714
- e.attributes.map(N),
715
- e.dimensions.map(Ps),
724
+ e.attributes.map(v),
725
+ e.dimensions.map(Gs),
716
726
  e.type,
717
727
  e.description,
718
728
  P(e.sort),
719
729
  e.dataSource,
720
730
  e.composeCode,
721
- e.defaultAttribute ? N(e.defaultAttribute) : void 0
722
- ), Nt = (e) => new ns(
731
+ e.defaultAttribute ? v(e.defaultAttribute) : void 0,
732
+ W(e)
733
+ ), Bt = (e) => new Ir(
723
734
  e.name,
724
735
  e.expression,
725
736
  e.description,
@@ -727,45 +738,62 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
727
738
  e.dataSource,
728
739
  e.composeCode,
729
740
  e.indexed,
730
- e.merged
731
- ), Ps = (e) => {
741
+ e.merged,
742
+ W(e)
743
+ ), Gs = (e) => {
732
744
  switch (e.__serializable) {
733
745
  case "DimensionalDimension":
734
- return vt(e);
746
+ return Lt(e);
735
747
  case "DimensionalDateDimension":
736
- return Nt(e);
748
+ return Bt(e);
737
749
  default:
738
750
  return e;
739
751
  }
740
- }, Me = (e) => new qr(
752
+ }, Le = (e) => new kr(
741
753
  e.name,
742
- N(e.attribute),
754
+ v(e.attribute),
743
755
  e.aggregation,
744
756
  e.format,
745
757
  e.description,
746
758
  P(e.sort),
747
759
  e.dataSource,
748
- e.composeCode
749
- ), Re = (e) => {
760
+ e.composeCode,
761
+ W(e)
762
+ ), Be = (e) => {
750
763
  const t = Object.fromEntries(
751
764
  Object.entries(e.context).map(([r, s]) => {
752
765
  if (s && typeof s == "object" && "__serializable" in s)
753
766
  switch (s.__serializable) {
754
767
  case "DimensionalAttribute":
755
- return [r, ve(s)];
768
+ return [r, Ie(s)];
756
769
  case "DimensionalLevelAttribute":
757
- return [r, Ne(s)];
770
+ return [r, ke(s)];
758
771
  case "DimensionalBaseMeasure":
759
- return [r, Me(s)];
772
+ return [r, Le(s)];
760
773
  case "DimensionalCalculatedMeasure":
761
- return [r, Re(s)];
774
+ return [r, Be(s)];
775
+ case "DimensionalMeasureTemplate":
776
+ return [r, _e(s)];
777
+ case "MembersFilter":
778
+ case "LogicalAttributeFilter":
779
+ case "CascadingFilter":
780
+ case "ExcludeFilter":
781
+ case "MeasureFilter":
782
+ case "RankingFilter":
783
+ case "MeasureRankingFilter":
784
+ case "NumericFilter":
785
+ case "TextFilter":
786
+ case "DateRangeFilter":
787
+ case "RelativeDateFilter":
788
+ case "CustomFilter":
789
+ return [r, S(s)];
762
790
  default:
763
791
  return [r, s];
764
792
  }
765
793
  return [r, s];
766
794
  })
767
795
  );
768
- return new $r(
796
+ return new Lr(
769
797
  e.name,
770
798
  e.expression,
771
799
  t,
@@ -773,60 +801,62 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
773
801
  e.description,
774
802
  P(e.sort),
775
803
  e.dataSource,
776
- e.composeCode
804
+ e.composeCode,
805
+ W(e)
777
806
  );
778
- }, Mt = (e) => new Or(
807
+ }, _e = (e) => new Br(
779
808
  e.name,
780
- N(e.attribute),
809
+ v(e.attribute),
781
810
  e.format,
782
811
  e.description,
783
812
  P(e.sort),
784
813
  e.dataSource,
785
- e.composeCode
786
- ), be = (e) => {
814
+ e.composeCode,
815
+ W(e)
816
+ ), Te = (e) => {
787
817
  switch (e.__serializable) {
788
818
  case "DimensionalBaseMeasure":
789
- return Me(e);
819
+ return Le(e);
790
820
  case "DimensionalCalculatedMeasure":
791
- return Re(e);
821
+ return Be(e);
792
822
  case "DimensionalMeasureTemplate":
793
- return Mt(e);
823
+ return _e(e);
794
824
  default:
795
825
  return e;
796
826
  }
797
827
  }, S = (e) => {
798
828
  switch (e.__serializable) {
799
829
  case "MembersFilter":
800
- return new Ur(
801
- N(e.attribute),
830
+ return new Hr(
831
+ v(e.attribute),
802
832
  e.members,
803
- e.config.backgroundFilter ? F(l({}, e.config), { backgroundFilter: S(e.config.backgroundFilter) }) : e.config,
833
+ e.config.backgroundFilter ? E(l({}, e.config), { backgroundFilter: S(e.config.backgroundFilter) }) : e.config,
804
834
  e.composeCode
805
835
  );
806
836
  case "LogicalAttributeFilter":
807
- return new zr(
837
+ return new Yr(
808
838
  e.filters.map((r) => S(r)),
809
839
  e.operator,
810
840
  e.config,
811
841
  e.composeCode
812
842
  );
813
843
  case "CascadingFilter":
814
- return new Lr(
844
+ return new Gr(
815
845
  e._filters.map((r) => S(r)),
816
846
  e.config,
817
847
  e.composeCode
818
848
  );
819
849
  case "ExcludeFilter":
820
- return new Br(
850
+ return new Kr(
821
851
  S(e.filter),
822
852
  e.input ? S(e.input) : void 0,
823
853
  e.config,
824
854
  e.composeCode
825
855
  );
826
856
  case "MeasureFilter":
827
- return new kr(
828
- N(e.attribute),
829
- be(e.measure),
857
+ return new Jr(
858
+ v(e.attribute),
859
+ Te(e.measure),
830
860
  e.operatorA,
831
861
  e.valueA,
832
862
  e.operatorB,
@@ -835,25 +865,25 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
835
865
  e.composeCode
836
866
  );
837
867
  case "RankingFilter":
838
- return new Ir(
839
- N(e.attribute),
840
- be(e.measure),
868
+ return new jr(
869
+ v(e.attribute),
870
+ Te(e.measure),
841
871
  e.operator,
842
872
  e.count,
843
873
  e.config,
844
874
  e.composeCode
845
875
  );
846
876
  case "MeasureRankingFilter":
847
- return new Rr(
848
- be(e.measure),
877
+ return new Vr(
878
+ Te(e.measure),
849
879
  e.operator,
850
880
  e.count,
851
881
  e.config,
852
882
  e.composeCode
853
883
  );
854
884
  case "NumericFilter":
855
- return new Mr(
856
- N(e.attribute),
885
+ return new Wr(
886
+ v(e.attribute),
857
887
  e.operatorA,
858
888
  e.valueA,
859
889
  e.operatorB,
@@ -862,8 +892,8 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
862
892
  e.composeCode
863
893
  );
864
894
  case "TextFilter":
865
- return new Nr(
866
- N(e.attribute),
895
+ return new Pr(
896
+ v(e.attribute),
867
897
  e.operatorA,
868
898
  e.valueA,
869
899
  e.config,
@@ -871,8 +901,8 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
871
901
  );
872
902
  case "DateRangeFilter": {
873
903
  const { valueA: r, valueB: s } = e;
874
- return new vr(
875
- N(e.attribute),
904
+ return new Ur(
905
+ v(e.attribute),
876
906
  r,
877
907
  s,
878
908
  e.config,
@@ -880,8 +910,8 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
880
910
  );
881
911
  }
882
912
  case "RelativeDateFilter":
883
- return new xr(
884
- N(e.attribute),
913
+ return new zr(
914
+ v(e.attribute),
885
915
  e.offset,
886
916
  e.count,
887
917
  e.operator,
@@ -890,8 +920,8 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
890
920
  e.composeCode
891
921
  );
892
922
  case "CustomFilter":
893
- return new Dr(
894
- N(e.attribute),
923
+ return new _r(
924
+ v(e.attribute),
895
925
  e.jaqlExpression,
896
926
  e.config,
897
927
  e.composeCode
@@ -902,71 +932,71 @@ const P = (e) => e === void 0 ? U.None : e, _s = (e) => new ar(e.metadataItem, e
902
932
  };
903
933
  y.registerCustom(
904
934
  {
905
- isApplicable: or,
935
+ isApplicable: dr,
906
936
  serialize: (e) => e.serialize(),
907
- deserialize: (e) => _s(e)
937
+ deserialize: (e) => Ks(e)
908
938
  },
909
939
  "JaqlElement"
910
940
  );
911
941
  y.registerCustom(
912
942
  {
913
- isApplicable: ur,
943
+ isApplicable: pr,
914
944
  serialize: (e) => e.serialize(),
915
- deserialize: (e) => ve(e)
945
+ deserialize: (e) => Ie(e)
916
946
  },
917
947
  "DimensionalAttribute"
918
948
  );
919
949
  y.registerCustom(
920
950
  {
921
- isApplicable: cr,
951
+ isApplicable: gr,
922
952
  serialize: (e) => e.serialize(),
923
- deserialize: (e) => Ne(e)
953
+ deserialize: (e) => ke(e)
924
954
  },
925
955
  "DimensionalLevelAttribute"
926
956
  );
927
957
  y.registerCustom(
928
958
  {
929
- isApplicable: ts,
959
+ isApplicable: yr,
930
960
  serialize: (e) => e.serialize(),
931
- deserialize: (e) => vt(e)
961
+ deserialize: (e) => Lt(e)
932
962
  },
933
963
  "DimensionalDimension"
934
964
  );
935
965
  y.registerCustom(
936
966
  {
937
- isApplicable: rs,
967
+ isApplicable: hr,
938
968
  serialize: (e) => e.serialize(),
939
- deserialize: (e) => Nt(e)
969
+ deserialize: (e) => Bt(e)
940
970
  },
941
971
  "DimensionalDateDimension"
942
972
  );
943
973
  y.registerCustom(
944
974
  {
945
- isApplicable: lr,
975
+ isApplicable: br,
946
976
  serialize: (e) => e.serialize(),
947
- deserialize: (e) => Me(e)
977
+ deserialize: (e) => Le(e)
948
978
  },
949
979
  "DimensionalBaseMeasure"
950
980
  );
951
981
  y.registerCustom(
952
982
  {
953
- isApplicable: dr,
983
+ isApplicable: Fr,
954
984
  serialize: (e) => e.serialize(),
955
- deserialize: (e) => Re(e)
985
+ deserialize: (e) => Be(e)
956
986
  },
957
987
  "DimensionalCalculatedMeasure"
958
988
  );
959
989
  y.registerCustom(
960
990
  {
961
- isApplicable: fr,
991
+ isApplicable: Er,
962
992
  serialize: (e) => e.serialize(),
963
- deserialize: (e) => Mt(e)
993
+ deserialize: (e) => _e(e)
964
994
  },
965
995
  "DimensionalMeasureTemplate"
966
996
  );
967
997
  y.registerCustom(
968
998
  {
969
- isApplicable: De,
999
+ isApplicable: Me,
970
1000
  serialize: (e) => e.serialize(),
971
1001
  deserialize: (e) => S(e)
972
1002
  },
@@ -974,7 +1004,7 @@ y.registerCustom(
974
1004
  );
975
1005
  y.registerCustom(
976
1006
  {
977
- isApplicable: pr,
1007
+ isApplicable: Ar,
978
1008
  serialize: (e) => e.serialize(),
979
1009
  deserialize: (e) => S(e)
980
1010
  },
@@ -982,7 +1012,7 @@ y.registerCustom(
982
1012
  );
983
1013
  y.registerCustom(
984
1014
  {
985
- isApplicable: mr,
1015
+ isApplicable: Tr,
986
1016
  serialize: (e) => e.serialize(),
987
1017
  deserialize: (e) => S(e)
988
1018
  },
@@ -990,7 +1020,7 @@ y.registerCustom(
990
1020
  );
991
1021
  y.registerCustom(
992
1022
  {
993
- isApplicable: gr,
1023
+ isApplicable: wr,
994
1024
  serialize: (e) => e.serialize(),
995
1025
  deserialize: (e) => S(e)
996
1026
  },
@@ -998,7 +1028,7 @@ y.registerCustom(
998
1028
  );
999
1029
  y.registerCustom(
1000
1030
  {
1001
- isApplicable: yr,
1031
+ isApplicable: Sr,
1002
1032
  serialize: (e) => e.serialize(),
1003
1033
  deserialize: (e) => S(e)
1004
1034
  },
@@ -1006,7 +1036,7 @@ y.registerCustom(
1006
1036
  );
1007
1037
  y.registerCustom(
1008
1038
  {
1009
- isApplicable: hr,
1039
+ isApplicable: Cr,
1010
1040
  serialize: (e) => e.serialize(),
1011
1041
  deserialize: (e) => S(e)
1012
1042
  },
@@ -1014,7 +1044,7 @@ y.registerCustom(
1014
1044
  );
1015
1045
  y.registerCustom(
1016
1046
  {
1017
- isApplicable: br,
1047
+ isApplicable: Or,
1018
1048
  serialize: (e) => e.serialize(),
1019
1049
  deserialize: (e) => S(e)
1020
1050
  },
@@ -1022,7 +1052,7 @@ y.registerCustom(
1022
1052
  );
1023
1053
  y.registerCustom(
1024
1054
  {
1025
- isApplicable: Er,
1055
+ isApplicable: $r,
1026
1056
  serialize: (e) => e.serialize(),
1027
1057
  deserialize: (e) => S(e)
1028
1058
  },
@@ -1030,7 +1060,7 @@ y.registerCustom(
1030
1060
  );
1031
1061
  y.registerCustom(
1032
1062
  {
1033
- isApplicable: Fr,
1063
+ isApplicable: qr,
1034
1064
  serialize: (e) => e.serialize(),
1035
1065
  deserialize: (e) => S(e)
1036
1066
  },
@@ -1038,7 +1068,7 @@ y.registerCustom(
1038
1068
  );
1039
1069
  y.registerCustom(
1040
1070
  {
1041
- isApplicable: Ar,
1071
+ isApplicable: Dr,
1042
1072
  serialize: (e) => e.serialize(),
1043
1073
  deserialize: (e) => S(e)
1044
1074
  },
@@ -1046,7 +1076,7 @@ y.registerCustom(
1046
1076
  );
1047
1077
  y.registerCustom(
1048
1078
  {
1049
- isApplicable: wr,
1079
+ isApplicable: xr,
1050
1080
  serialize: (e) => e.serialize(),
1051
1081
  deserialize: (e) => S(e)
1052
1082
  },
@@ -1054,64 +1084,64 @@ y.registerCustom(
1054
1084
  );
1055
1085
  y.registerCustom(
1056
1086
  {
1057
- isApplicable: Tr,
1087
+ isApplicable: Nr,
1058
1088
  serialize: (e) => e.serialize(),
1059
1089
  deserialize: (e) => S(e)
1060
1090
  },
1061
1091
  "CustomFilter"
1062
1092
  );
1063
- const Di = y, w = "DM.";
1064
- function O(e) {
1093
+ const Ui = y, T = "DM.";
1094
+ function q(e) {
1065
1095
  return typeof e == "object" && e !== null;
1066
1096
  }
1067
- function q(e) {
1097
+ function w(e) {
1068
1098
  return typeof e == "object" && e !== null && "function" in e && "args" in e;
1069
1099
  }
1070
- function Rt(e) {
1071
- return e.every(q);
1100
+ function _t(e) {
1101
+ return Array.isArray(e) && e.every(w);
1072
1102
  }
1073
- function fe(e) {
1103
+ function ge(e) {
1074
1104
  return "attribute" in e && "config" in e;
1075
1105
  }
1076
- function te(e) {
1106
+ function H(e) {
1077
1107
  return "left" in e && "right" in e && "operator" in e;
1078
1108
  }
1079
- function Ie(e) {
1080
- return !fe(e) && !te(e);
1109
+ function ze(e) {
1110
+ return !ge(e) && !H(e);
1081
1111
  }
1082
- function Ws(e) {
1083
- return O(e) && "column" in e && typeof e.column == "string" && !("function" in e && "args" in e);
1112
+ function zt(e) {
1113
+ return q(e) && "column" in e && typeof e.column == "string" && !("function" in e && "args" in e);
1084
1114
  }
1085
- function Vs(e) {
1086
- return !O(e) || !("column" in e) ? !1 : q(e.column);
1115
+ function Ut(e) {
1116
+ return !q(e) || !("column" in e) ? !1 : w(e.column);
1087
1117
  }
1088
- const T = 3;
1118
+ const C = 3;
1089
1119
  function x(e, t, r) {
1090
1120
  if (t.length === 0) return;
1091
1121
  let s = Number.MAX_SAFE_INTEGER, n;
1092
1122
  for (const i of t) {
1093
- const o = r(i), a = os(e, o);
1094
- a < s && (s = a, n = i);
1123
+ const a = r(i), o = ds(e, a);
1124
+ o < s && (s = o, n = i);
1095
1125
  }
1096
1126
  return n !== void 0 ? { best: n, distance: s } : void 0;
1097
1127
  }
1098
- const It = "en";
1099
- function Ee(e, t) {
1100
- return e.localeCompare(t, It, { sensitivity: "accent" }) === 0;
1128
+ const Pt = "en";
1129
+ function we(e, t) {
1130
+ return e.localeCompare(t, Pt, { sensitivity: "accent" }) === 0;
1101
1131
  }
1102
- function He(e, t) {
1103
- return t.length <= e.length && e.slice(0, t.length).localeCompare(t, It, { sensitivity: "accent" }) === 0;
1132
+ function et(e, t) {
1133
+ return t.length <= e.length && e.slice(0, t.length).localeCompare(t, Pt, { sensitivity: "accent" }) === 0;
1104
1134
  }
1105
- function re(e) {
1106
- const t = [...e].sort((i, o) => o.name.length - i.name.length), r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
1135
+ function ne(e) {
1136
+ const t = [...e].sort((i, a) => a.name.length - i.name.length), r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
1107
1137
  for (const i of e) {
1108
1138
  r.set(i.name, i);
1109
- const o = [...i.columns].sort((u, c) => c.name.length - u.name.length);
1110
- n.set(i.name, o);
1111
- const a = /* @__PURE__ */ new Map();
1139
+ const a = [...i.columns].sort((u, c) => c.name.length - u.name.length);
1140
+ n.set(i.name, a);
1141
+ const o = /* @__PURE__ */ new Map();
1112
1142
  for (const u of i.columns)
1113
- a.set(u.name, u);
1114
- s.set(i.name, a);
1143
+ o.set(u.name, u);
1144
+ s.set(i.name, o);
1115
1145
  }
1116
1146
  return {
1117
1147
  sortedTables: t,
@@ -1120,79 +1150,79 @@ function re(e) {
1120
1150
  columnMap: s
1121
1151
  };
1122
1152
  }
1123
- function ke(e, t) {
1124
- if (!e.startsWith(w))
1153
+ function Ue(e, t) {
1154
+ if (!e.startsWith(T))
1125
1155
  throw new Error(
1126
- `Invalid dimensional element name format: '${e}'. Expected format: '${w}TableName.ColumnName[.Level]'`
1156
+ `Invalid dimensional element name format: '${e}'. Expected format: '${T}TableName.ColumnName[.Level]'`
1127
1157
  );
1128
- const r = e.slice(w.length);
1158
+ const r = e.slice(T.length);
1129
1159
  if (!r)
1130
1160
  throw new Error(
1131
- `Invalid dimensional element name format: '${e}'. Expected format: '${w}TableName.ColumnName[.Level]'`
1161
+ `Invalid dimensional element name format: '${e}'. Expected format: '${T}TableName.ColumnName[.Level]'`
1132
1162
  );
1133
1163
  let s, n;
1134
- for (const p of t.sortedTables)
1135
- if (He(r, p.name + ".")) {
1136
- const E = r.slice(p.name.length + 1);
1137
- if (!E)
1164
+ for (const m of t.sortedTables)
1165
+ if (et(r, m.name + ".")) {
1166
+ const F = r.slice(m.name.length + 1);
1167
+ if (!F)
1138
1168
  throw new Error(
1139
- `Invalid dimensional element name format: '${e}'. Expected format: '${w}TableName.ColumnName[.Level]'`
1169
+ `Invalid dimensional element name format: '${e}'. Expected format: '${T}TableName.ColumnName[.Level]'`
1140
1170
  );
1141
- s = p, n = E;
1171
+ s = m, n = F;
1142
1172
  break;
1143
1173
  }
1144
1174
  if (!s) {
1145
- const p = r.indexOf(".");
1146
- if (p === -1)
1175
+ const m = r.indexOf(".");
1176
+ if (m === -1)
1147
1177
  throw new Error(
1148
- `Invalid dimensional element name format: '${e}'. Expected format: '${w}TableName.ColumnName[.Level]'`
1178
+ `Invalid dimensional element name format: '${e}'. Expected format: '${T}TableName.ColumnName[.Level]'`
1149
1179
  );
1150
- const E = r.slice(0, p), C = x(E, t.sortedTables, (W) => W.name), v = C && C.distance <= T ? ` Did you mean '${C.best.name}'?` : "";
1151
- throw new Error(`Table '${E}' not found in the data model.${v}`);
1180
+ const F = r.slice(0, m), O = x(F, t.sortedTables, (V) => V.name), N = O && O.distance <= C ? ` Did you mean '${O.best.name}'?` : "";
1181
+ throw new Error(`Table '${F}' not found in the data model.${N}`);
1152
1182
  }
1153
1183
  const i = t.tableColumnMap.get(s.name);
1154
1184
  if (!i)
1155
1185
  throw new Error(`Table '${s.name}' found but has no columns`);
1156
- let o, a;
1186
+ let a, o;
1157
1187
  const u = $.all;
1158
- for (const p of i) {
1159
- if (Ee(n, p.name))
1160
- return { table: s, column: p };
1161
- if (!He(n, p.name + "."))
1188
+ for (const m of i) {
1189
+ if (we(n, m.name))
1190
+ return { table: s, column: m };
1191
+ if (!et(n, m.name + "."))
1162
1192
  continue;
1163
- const E = n.slice(p.name.length + 1);
1164
- if (!E)
1193
+ const F = n.slice(m.name.length + 1);
1194
+ if (!F)
1165
1195
  continue;
1166
- const C = u.includes(E), v = ee(p.dataType);
1167
- if (C) {
1168
- if (v)
1169
- return { table: s, column: p, level: E };
1170
- o || (o = p, a = E);
1196
+ const O = u.includes(F), N = se(m.dataType);
1197
+ if (O) {
1198
+ if (N)
1199
+ return { table: s, column: m, level: F };
1200
+ a || (a = m, o = F);
1171
1201
  continue;
1172
1202
  }
1173
- v && !o && (o = p, a = E);
1203
+ N && !a && (a = m, o = F);
1174
1204
  }
1175
- if (o && a) {
1176
- if (u.includes(a))
1205
+ if (a && o) {
1206
+ if (u.includes(o))
1177
1207
  throw new Error(
1178
- `Invalid date level '${a}' in dimensional element '${e}'. Column '${s.name}.${o.name}' is not a datetime column`
1208
+ `Invalid date level '${o}' in dimensional element '${e}'. Column '${s.name}.${a.name}' is not a datetime column`
1179
1209
  );
1180
- const p = x(a, u, (C) => C), E = p && p.distance <= T ? ` Did you mean '${p.best}'?` : "";
1210
+ const m = x(o, u, (O) => O), F = m && m.distance <= C ? ` Did you mean '${m.best}'?` : "";
1181
1211
  throw new Error(
1182
- `Invalid date level '${a}' in dimensional element '${e}'. Valid levels are: ${u.join(
1212
+ `Invalid date level '${o}' in dimensional element '${e}'. Valid levels are: ${u.join(
1183
1213
  ", "
1184
- )}.${E}`
1214
+ )}.${F}`
1185
1215
  );
1186
1216
  }
1187
- const c = n.indexOf("."), g = c === -1 ? n : n.slice(0, c), d = x(n, i, (p) => p.name), m = d && d.distance <= T && !Ee(d.best.name, g), h = m ? ` Did you mean '${d.best.name}'?` : "", b = !m && n.endsWith(".") && d !== void 0 && Ee(d.best.name, g) ? ` Use '${g}' without a trailing dot.` : "";
1217
+ const c = n.indexOf("."), g = c === -1 ? n : n.slice(0, c), f = x(n, i, (m) => m.name), p = f && f.distance <= C && !we(f.best.name, g), h = p ? ` Did you mean '${f.best.name}'?` : "", b = !p && n.endsWith(".") && f !== void 0 && we(f.best.name, g) ? ` Use '${g}' without a trailing dot.` : "";
1188
1218
  throw new Error(
1189
1219
  `Column '${g}' not found in table '${s.name}'.${h}${b}`
1190
1220
  );
1191
1221
  }
1192
- function js(e, t) {
1193
- const { table: r, column: s, level: n } = ke(e, t);
1222
+ function Ys(e, t) {
1223
+ const { table: r, column: s, level: n } = Ue(e, t);
1194
1224
  if (n) {
1195
- if (!ee(s.dataType))
1225
+ if (!se(s.dataType))
1196
1226
  throw new Error(
1197
1227
  `Invalid date level '${n}' in dimensional element '${e}'. Column '${r.name}.${s.name}' is not a datetime column`
1198
1228
  );
@@ -1203,87 +1233,87 @@ function js(e, t) {
1203
1233
  ", "
1204
1234
  )}`
1205
1235
  );
1206
- const o = $.dateOnly;
1207
- if (s.dataType === "date" && !o.includes(n))
1236
+ const a = $.dateOnly;
1237
+ if (s.dataType === "date" && !a.includes(n))
1208
1238
  throw new Error(
1209
1239
  `Invalid level '${n}' in dimensional element '${e}'. Column '${r.name}.${s.name}' is only a date column, not a datetime column`
1210
1240
  );
1211
- const a = $.timeOnly;
1212
- if (s.dataType === "time" && !a.includes(n))
1241
+ const o = $.timeOnly;
1242
+ if (s.dataType === "time" && !o.includes(n))
1213
1243
  throw new Error(
1214
1244
  `Invalid level '${n}' in dimensional element '${e}'. Column '${r.name}.${s.name}' is only a time column, not a date column`
1215
1245
  );
1216
1246
  }
1217
1247
  return { table: r, column: s, level: n };
1218
1248
  }
1219
- function Z(e, t, r, s) {
1220
- const { table: n, column: i, level: o } = js(e, r);
1221
- let a = o;
1222
- if (ee(i.dataType) && a === void 0 && (s != null && s.inferredDateLevel)) {
1249
+ function re(e, t, r, s) {
1250
+ const { table: n, column: i, level: a } = Ys(e, r);
1251
+ let o = a;
1252
+ if (se(i.dataType) && o === void 0 && (s != null && s.inferredDateLevel)) {
1223
1253
  const u = s.inferredDateLevel, c = $.all;
1224
1254
  if (!c.includes(u))
1225
1255
  throw new Error(
1226
1256
  `Invalid inferred date level '${u}'. Valid levels are: ${c.join(", ")}`
1227
1257
  );
1228
- const g = `${e}.${u}`, d = $.dateOnly;
1229
- if (i.dataType === "date" && !d.includes(u))
1258
+ const g = `${e}.${u}`, f = $.dateOnly;
1259
+ if (i.dataType === "date" && !f.includes(u))
1230
1260
  throw new Error(
1231
1261
  `Invalid level '${u}' in dimensional element '${g}'. Column '${n.name}.${i.name}' is only a date column, not a datetime column`
1232
1262
  );
1233
- const m = $.timeOnly;
1234
- if (i.dataType === "time" && !m.includes(u))
1263
+ const p = $.timeOnly;
1264
+ if (i.dataType === "time" && !p.includes(u))
1235
1265
  throw new Error(
1236
1266
  `Invalid level '${u}' in dimensional element '${g}'. Column '${n.name}.${i.name}' is only a time column, not a date column`
1237
1267
  );
1238
- a = u;
1268
+ o = u;
1239
1269
  }
1240
- return _r({
1270
+ return Qr({
1241
1271
  expression: i.expression,
1242
1272
  dataType: i.dataType,
1243
- granularity: a,
1273
+ granularity: o,
1244
1274
  format: void 0,
1245
1275
  sort: void 0,
1246
1276
  dataSource: t
1247
1277
  });
1248
1278
  }
1249
- function Js(e, t, r) {
1250
- const { column: s, level: n } = ke(e, r);
1279
+ function Hs(e, t, r) {
1280
+ const { column: s, level: n } = Ue(e, r);
1251
1281
  if (n)
1252
1282
  throw new Error(
1253
- `Invalid DateDimension name format: '${e}'. Expected format: '${w}TableName.ColumnName'`
1283
+ `Invalid DateDimension name format: '${e}'. Expected format: '${T}TableName.ColumnName'`
1254
1284
  );
1255
- if (!ee(s.dataType))
1285
+ if (!se(s.dataType))
1256
1286
  throw new Error(
1257
1287
  `Invalid DateDimension name '${e}'. Column '${s.name}' is not a datetime column (got ${s.dataType}).`
1258
1288
  );
1259
- return is({
1289
+ return Xr({
1260
1290
  name: s.name,
1261
1291
  expression: s.expression,
1262
1292
  dataSource: t
1263
1293
  });
1264
1294
  }
1265
- const Ks = (e, t) => {
1295
+ const Qs = (e, t) => {
1266
1296
  if (!e) return;
1267
1297
  const r = typeof e == "object" ? e.direction : e;
1268
- if (!ct(r))
1269
- return F(l({}, t), {
1298
+ if (!gt(r))
1299
+ return E(l({}, t), {
1270
1300
  message: `Invalid sort type. Expected 'sortAsc', 'sortDesc', or 'sortNone'. Got: '${r}'.`
1271
1301
  });
1272
- }, Gs = (e, t, r, s) => {
1273
- const n = Ks(e.sortType, s);
1302
+ }, Xs = (e, t, r, s) => {
1303
+ const n = Qs(e.sortType, s);
1274
1304
  if (n)
1275
1305
  return {
1276
- attribute: Z(e.column, t, r),
1306
+ attribute: re(e.column, t, r),
1277
1307
  style: {},
1278
1308
  error: n
1279
1309
  };
1280
- const i = Z(e.column, t, r), o = _(e, "column");
1281
- return { attribute: i, style: o };
1282
- }, Ys = (e, t, r, s) => typeof e == "string" ? { attribute: Z(e, t, r) } : Ws(e) ? Gs(e, t, r, s) : {
1283
- error: F(l({}, s), {
1310
+ const i = re(e.column, t, r), a = U(e, "column");
1311
+ return { attribute: i, style: a };
1312
+ }, Zs = (e, t, r, s) => typeof e == "string" ? { attribute: re(e, t, r) } : zt(e) ? Xs(e, t, r, s) : {
1313
+ error: E(l({}, s), {
1284
1314
  message: "Invalid dimension item. Expected a string (composeCode) or object with 'column' and optional 'sortType'."
1285
1315
  })
1286
- }, kt = (e) => {
1316
+ }, Wt = (e) => {
1287
1317
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
1288
1318
  if (!t)
1289
1319
  return { success: !0, data: [] };
@@ -1299,13 +1329,13 @@ const Ks = (e, t) => {
1299
1329
  ]
1300
1330
  };
1301
1331
  const n = [], i = [];
1302
- return t.forEach((o, a) => {
1332
+ return t.forEach((a, o) => {
1303
1333
  const u = {
1304
- path: `dimensions[${a}]`,
1305
- input: o
1334
+ path: `dimensions[${o}]`,
1335
+ input: a
1306
1336
  };
1307
1337
  try {
1308
- const c = Ys(o, r, s, u);
1338
+ const c = Zs(a, r, s, u);
1309
1339
  if (c.error) {
1310
1340
  i.push(c.error);
1311
1341
  return;
@@ -1315,47 +1345,47 @@ const Ks = (e, t) => {
1315
1345
  );
1316
1346
  } catch (c) {
1317
1347
  const g = c instanceof Error ? c.message : "Unknown error";
1318
- i.push(F(l({}, u), { message: g }));
1348
+ i.push(E(l({}, u), { message: g }));
1319
1349
  }
1320
1350
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
1321
1351
  };
1322
- function Be(e, t) {
1352
+ function Pe(e, t) {
1323
1353
  const r = Reflect.get(e, t);
1324
1354
  if (typeof r != "function")
1325
1355
  throw new Error(`Function '${t}' not found or is not a function`);
1326
1356
  return r;
1327
1357
  }
1328
- function Hs(e, t) {
1329
- const r = e.replace("measureFactory.", ""), n = Be(Pr, r)(...t);
1330
- if (!Ie(n))
1358
+ function en(e, t) {
1359
+ const r = e.replace("measureFactory.", ""), n = Pe(Zr, r)(...t);
1360
+ if (!ze(n))
1331
1361
  throw new Error(`Function '${e}' did not return a valid Measure`);
1332
1362
  return n;
1333
1363
  }
1334
- function Qs(e, t) {
1335
- const r = e.replace("filterFactory.logic.", ""), n = Be(Wr, r)(...t);
1336
- if (!te(n))
1364
+ function tn(e, t) {
1365
+ const r = e.replace("filterFactory.logic.", ""), n = Pe(es, r)(...t);
1366
+ if (!H(n))
1337
1367
  throw new Error(`Function '${e}' did not return a valid FilterRelations`);
1338
1368
  return n;
1339
1369
  }
1340
- function Xs(e, t) {
1370
+ function rn(e, t) {
1341
1371
  if (e.startsWith("filterFactory.logic."))
1342
- return Qs(e, t);
1343
- const r = e.replace("filterFactory.", ""), n = Be(Vr, r)(...t);
1344
- if (!fe(n) && !te(n))
1372
+ return tn(e, t);
1373
+ const r = e.replace("filterFactory.", ""), n = Pe(ts, r)(...t);
1374
+ if (!ge(n) && !H(n))
1345
1375
  throw new Error(`Function '${e}' did not return a valid Filter or FilterRelations`);
1346
1376
  return n;
1347
1377
  }
1348
- function Zs(e, t) {
1378
+ function sn(e, t) {
1349
1379
  const s = e.split(".")[0];
1350
1380
  if (s === "measureFactory")
1351
- return Hs(e, t);
1381
+ return en(e, t);
1352
1382
  if (s === "filterFactory")
1353
- return Xs(e, t);
1383
+ return rn(e, t);
1354
1384
  throw new Error(
1355
1385
  `Unsupported factory: '${s}'. Supported factories: measureFactory, filterFactory`
1356
1386
  );
1357
1387
  }
1358
- const f = (e, t, r, s) => l({ category: e, minArgs: t, maxArgs: r }, s), en = /* @__PURE__ */ new Set([
1388
+ const d = (e, t, r, s) => l({ category: e, minArgs: t, maxArgs: r }, s), nn = /* @__PURE__ */ new Set([
1359
1389
  "CORREL",
1360
1390
  "COVARP",
1361
1391
  "COVAR",
@@ -1374,131 +1404,131 @@ const f = (e, t, r, s) => l({ category: e, minArgs: t, maxArgs: r }, s), en = /*
1374
1404
  "ORDERING",
1375
1405
  "RDOUBLE",
1376
1406
  "RINT"
1377
- ]), ue = {
1407
+ ]), le = {
1378
1408
  // ── X-diff (datetime difference operators) ──
1379
- SDIFF: f("xdiff", 2, 2, {
1409
+ SDIFF: d("xdiff", 2, 2, {
1380
1410
  requiredDateLevel: $.Seconds,
1381
1411
  argType: "datetime"
1382
1412
  }),
1383
- MNDIFF: f("xdiff", 2, 2, {
1413
+ MNDIFF: d("xdiff", 2, 2, {
1384
1414
  requiredDateLevel: $.Minutes,
1385
1415
  argType: "datetime"
1386
1416
  }),
1387
- HDIFF: f("xdiff", 2, 2, {
1417
+ HDIFF: d("xdiff", 2, 2, {
1388
1418
  requiredDateLevel: $.Hours,
1389
1419
  argType: "datetime"
1390
1420
  }),
1391
- DDIFF: f("xdiff", 2, 2, {
1421
+ DDIFF: d("xdiff", 2, 2, {
1392
1422
  requiredDateLevel: $.Days,
1393
1423
  argType: "datetime"
1394
1424
  }),
1395
- MDIFF: f("xdiff", 2, 2, {
1425
+ MDIFF: d("xdiff", 2, 2, {
1396
1426
  requiredDateLevel: $.Months,
1397
1427
  argType: "datetime"
1398
1428
  }),
1399
- QDIFF: f("xdiff", 2, 2, {
1429
+ QDIFF: d("xdiff", 2, 2, {
1400
1430
  requiredDateLevel: $.Quarters,
1401
1431
  argType: "datetime"
1402
1432
  }),
1403
- YDIFF: f("xdiff", 2, 2, {
1433
+ YDIFF: d("xdiff", 2, 2, {
1404
1434
  requiredDateLevel: $.Years,
1405
1435
  argType: "datetime"
1406
1436
  }),
1407
1437
  // ── Aggregation ──
1408
- ANYVALUE: f("aggregative", 1, 1),
1409
- SUM: f("aggregative", 1, 2),
1410
- AVG: f("aggregative", 1, 2),
1411
- MIN: f("aggregative", 1, 2),
1412
- MAX: f("aggregative", 1, 2),
1413
- COUNT: f("aggregative", 1, 2),
1414
- DUPCOUNT: f("aggregative", 1, 1),
1415
- COUNTDUPLICATES: f("aggregative", 1, 1),
1416
- STDEV: f("aggregative", 1, 2),
1417
- STDEVP: f("aggregative", 1, 2),
1418
- VAR: f("aggregative", 1, 2),
1419
- VARP: f("aggregative", 1, 2),
1420
- MEDIAN: f("aggregative", 1, 2),
1421
- QUARTILE: f("aggregative", 2, 3),
1422
- PERCENTILE: f("aggregative", 2, 3),
1423
- LOWERWHISKERMAX_IQR: f("aggregative", 1, 1),
1424
- LOWERWHISKERMAX_STDEVP: f("aggregative", 1, 1),
1425
- UPPERWHISKERMIN_IQR: f("aggregative", 1, 1),
1426
- UPPERWHISKERMIN_STDEVP: f("aggregative", 1, 1),
1427
- OUTLIERSCOUNT_IQR: f("aggregative", 1, 1),
1428
- OUTLIERSCOUNT_STDEVP: f("aggregative", 1, 1),
1429
- MODE: f("aggregative", 1, 1),
1430
- NOAGGFUNCTION: f("aggregative", 1, 1),
1438
+ ANYVALUE: d("aggregative", 1, 1),
1439
+ SUM: d("aggregative", 1, 2),
1440
+ AVG: d("aggregative", 1, 2),
1441
+ MIN: d("aggregative", 1, 2),
1442
+ MAX: d("aggregative", 1, 2),
1443
+ COUNT: d("aggregative", 1, 2),
1444
+ DUPCOUNT: d("aggregative", 1, 1),
1445
+ COUNTDUPLICATES: d("aggregative", 1, 1),
1446
+ STDEV: d("aggregative", 1, 2),
1447
+ STDEVP: d("aggregative", 1, 2),
1448
+ VAR: d("aggregative", 1, 2),
1449
+ VARP: d("aggregative", 1, 2),
1450
+ MEDIAN: d("aggregative", 1, 2),
1451
+ QUARTILE: d("aggregative", 2, 3),
1452
+ PERCENTILE: d("aggregative", 2, 3),
1453
+ LOWERWHISKERMAX_IQR: d("aggregative", 1, 1),
1454
+ LOWERWHISKERMAX_STDEVP: d("aggregative", 1, 1),
1455
+ UPPERWHISKERMIN_IQR: d("aggregative", 1, 1),
1456
+ UPPERWHISKERMIN_STDEVP: d("aggregative", 1, 1),
1457
+ OUTLIERSCOUNT_IQR: d("aggregative", 1, 1),
1458
+ OUTLIERSCOUNT_STDEVP: d("aggregative", 1, 1),
1459
+ MODE: d("aggregative", 1, 1),
1460
+ NOAGGFUNCTION: d("aggregative", 1, 1),
1431
1461
  // ── Window ──
1432
- RANK: f("window", 0, Number.POSITIVE_INFINITY),
1433
- RSUM: f("window", 1, 2),
1434
- RAVG: f("window", 1, 2),
1435
- YTDSUM: f("window", 1, 1),
1436
- QTDSUM: f("window", 1, 1),
1437
- MTDSUM: f("window", 1, 1),
1438
- WTDSUM: f("window", 1, 1),
1439
- YTDAVG: f("window", 1, 1),
1440
- QTDAVG: f("window", 1, 1),
1441
- MTDAVG: f("window", 1, 1),
1442
- WTDAVG: f("window", 1, 1),
1462
+ RANK: d("window", 0, Number.POSITIVE_INFINITY),
1463
+ RSUM: d("window", 1, 2),
1464
+ RAVG: d("window", 1, 2),
1465
+ YTDSUM: d("window", 1, 1),
1466
+ QTDSUM: d("window", 1, 1),
1467
+ MTDSUM: d("window", 1, 1),
1468
+ WTDSUM: d("window", 1, 1),
1469
+ YTDAVG: d("window", 1, 1),
1470
+ QTDAVG: d("window", 1, 1),
1471
+ MTDAVG: d("window", 1, 1),
1472
+ WTDAVG: d("window", 1, 1),
1443
1473
  // ── String ──
1444
- CONCAT: f("string", 2, Number.POSITIVE_INFINITY),
1445
- LEFT: f("string", 2, 2),
1446
- RIGHT: f("string", 2, 2),
1474
+ CONCAT: d("string", 2, Number.POSITIVE_INFINITY),
1475
+ LEFT: d("string", 2, 2),
1476
+ RIGHT: d("string", 2, 2),
1447
1477
  // ── Scalar / math ──
1448
- ABS: f("scalar", 1, 1),
1449
- ACOS: f("scalar", 1, 1),
1450
- ASIN: f("scalar", 1, 1),
1451
- ATAN: f("scalar", 1, 1),
1452
- CEILING: f("scalar", 1, 1),
1453
- CONTRIBUTION: f("scalar", 1, 1),
1454
- COS: f("scalar", 1, 1),
1455
- COT: f("scalar", 1, 1),
1456
- DIFFPASTDAY: f("scalar", 1, 1),
1457
- DIFFPASTMONTH: f("scalar", 1, 1),
1458
- DIFFPASTPERIOD: f("scalar", 1, 1),
1459
- DIFFPASTQUARTER: f("scalar", 1, 1),
1460
- DIFFPASTWEEK: f("scalar", 1, 1),
1461
- DIFFPASTYEAR: f("scalar", 1, 1),
1462
- EXP: f("scalar", 1, 1),
1463
- FLOOR: f("scalar", 1, 1),
1464
- GROWTH: f("growth", 1, 1),
1465
- GROWTHPASTMONTH: f("growth", 1, 1),
1466
- GROWTHPASTQUARTER: f("growth", 1, 1),
1467
- GROWTHPASTWEEK: f("growth", 1, 1),
1468
- GROWTHPASTYEAR: f("growth", 1, 1),
1469
- GROWTHRATE: f("growth", 1, 1),
1470
- LN: f("scalar", 1, 1),
1471
- LOG10: f("scalar", 1, 1),
1472
- MINUS: f("scalar", 1, 1),
1473
- MOD: f("scalar", 2, 2),
1474
- QUOTIENT: f("scalar", 2, 2),
1475
- PASTDAY: f("date", 1, 2),
1476
- PASTMONTH: f("date", 1, 2),
1477
- PASTPERIOD: f("date", 1, 2),
1478
- PASTQUARTER: f("date", 1, 2),
1479
- PASTWEEK: f("date", 1, 2),
1480
- PASTYEAR: f("date", 1, 2),
1481
- PERCENTILEDISCFORINTERNALUSEONLY: f("scalar", 1, 1),
1482
- PERCENTILECONTFORINTERNALUSEONLY: f("scalar", 1, 1),
1483
- POWER: f("scalar", 2, 2),
1484
- ROUND: f("scalar", 2, 2),
1485
- SIN: f("scalar", 1, 1),
1486
- SQRT: f("scalar", 1, 1),
1487
- TAN: f("scalar", 1, 1)
1488
- }, tn = Object.keys(ue).filter(
1489
- (e) => ue[e].category === "xdiff"
1478
+ ABS: d("scalar", 1, 1),
1479
+ ACOS: d("scalar", 1, 1),
1480
+ ASIN: d("scalar", 1, 1),
1481
+ ATAN: d("scalar", 1, 1),
1482
+ CEILING: d("scalar", 1, 1),
1483
+ CONTRIBUTION: d("scalar", 1, 1),
1484
+ COS: d("scalar", 1, 1),
1485
+ COT: d("scalar", 1, 1),
1486
+ DIFFPASTDAY: d("scalar", 1, 1),
1487
+ DIFFPASTMONTH: d("scalar", 1, 1),
1488
+ DIFFPASTPERIOD: d("scalar", 1, 1),
1489
+ DIFFPASTQUARTER: d("scalar", 1, 1),
1490
+ DIFFPASTWEEK: d("scalar", 1, 1),
1491
+ DIFFPASTYEAR: d("scalar", 1, 1),
1492
+ EXP: d("scalar", 1, 1),
1493
+ FLOOR: d("scalar", 1, 1),
1494
+ GROWTH: d("growth", 1, 1),
1495
+ GROWTHPASTMONTH: d("growth", 1, 1),
1496
+ GROWTHPASTQUARTER: d("growth", 1, 1),
1497
+ GROWTHPASTWEEK: d("growth", 1, 1),
1498
+ GROWTHPASTYEAR: d("growth", 1, 1),
1499
+ GROWTHRATE: d("growth", 1, 1),
1500
+ LN: d("scalar", 1, 1),
1501
+ LOG10: d("scalar", 1, 1),
1502
+ MINUS: d("scalar", 1, 1),
1503
+ MOD: d("scalar", 2, 2),
1504
+ QUOTIENT: d("scalar", 2, 2),
1505
+ PASTDAY: d("date", 1, 2),
1506
+ PASTMONTH: d("date", 1, 2),
1507
+ PASTPERIOD: d("date", 1, 2),
1508
+ PASTQUARTER: d("date", 1, 2),
1509
+ PASTWEEK: d("date", 1, 2),
1510
+ PASTYEAR: d("date", 1, 2),
1511
+ PERCENTILEDISCFORINTERNALUSEONLY: d("scalar", 1, 1),
1512
+ PERCENTILECONTFORINTERNALUSEONLY: d("scalar", 1, 1),
1513
+ POWER: d("scalar", 2, 2),
1514
+ ROUND: d("scalar", 2, 2),
1515
+ SIN: d("scalar", 1, 1),
1516
+ SQRT: d("scalar", 1, 1),
1517
+ TAN: d("scalar", 1, 1)
1518
+ }, an = Object.keys(le).filter(
1519
+ (e) => le[e].category === "xdiff"
1490
1520
  );
1491
- function Bt() {
1492
- return tn;
1521
+ function Vt() {
1522
+ return an;
1493
1523
  }
1494
- function Lt(e) {
1495
- const t = ue[e.toUpperCase()];
1524
+ function jt(e) {
1525
+ const t = le[e.toUpperCase()];
1496
1526
  return t == null ? void 0 : t.requiredDateLevel;
1497
1527
  }
1498
- function rn(e, t) {
1528
+ function on(e, t) {
1499
1529
  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`;
1500
1530
  }
1501
- const sn = /\[(\w[\w.-]*)\]/g, zt = /* @__PURE__ */ new Set([
1531
+ const un = /\[(\w[\w.-]*)\]/g, Jt = /* @__PURE__ */ new Set([
1502
1532
  // Universal – Aggregative (per Sisense doc: (A) only; Statistical CONTRIBUTION, PERCENTILE, etc. are non-aggregative)
1503
1533
  "AVG",
1504
1534
  "COUNT",
@@ -1519,30 +1549,30 @@ const sn = /\[(\w[\w.-]*)\]/g, zt = /* @__PURE__ */ new Set([
1519
1549
  "YTDSUM"
1520
1550
  // RAVG, RSUM are non-aggregative per Sisense doc (Other Functions, not (A))
1521
1551
  // CORREL, COVAR*, SKEW*, SLOPE, LARGEST are unsupported in custom formulas (see UNSUPPORTED_FORMULA_FUNCTIONS).
1522
- ]), nn = new RegExp(
1523
- `\\b(${Array.from(zt).join("|")})\\s*\\(`,
1552
+ ]), cn = new RegExp(
1553
+ `\\b(${Array.from(Jt).join("|")})\\s*\\(`,
1524
1554
  "i"
1525
1555
  );
1526
- function Ut(e) {
1527
- return q(e) ? !0 : typeof e == "string" && e.startsWith(w) ? !1 : O(e) && "kind" in e ? e.kind === "measure" : !0;
1556
+ function Kt(e) {
1557
+ return w(e) ? !0 : typeof e == "string" && e.startsWith(T) ? !1 : q(e) && "kind" in e ? e.kind === "measure" : !0;
1528
1558
  }
1529
- function on(e) {
1559
+ function ln(e) {
1530
1560
  const t = /\b(\w+)\s*\(/g, r = /* @__PURE__ */ new Set();
1531
1561
  let s;
1532
1562
  for (; (s = t.exec(e)) !== null; ) {
1533
1563
  const n = s[1];
1534
- zt.has(n.toUpperCase()) || r.add(n);
1564
+ Jt.has(n.toUpperCase()) || r.add(n);
1535
1565
  }
1536
1566
  return Array.from(r);
1537
1567
  }
1538
- function an(e) {
1568
+ function fn(e) {
1539
1569
  return e.length === 1 ? `[${e[0]}]` : e.map((t) => `[${t}]`).join(", ");
1540
1570
  }
1541
- function un(e) {
1571
+ function dn(e) {
1542
1572
  return e.length === 0 ? "" : e.length === 1 ? `${e[0]} is not an aggregative function. ` : `${e.join(", ")} are not aggregative functions. `;
1543
1573
  }
1544
- const G = (e) => e.startsWith("[") ? e : `[${e}]`, _t = (e) => e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1) : e;
1545
- function Pt(e, t) {
1574
+ const Y = (e) => e.startsWith("[") ? e : `[${e}]`, Gt = (e) => e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1) : e;
1575
+ function Yt(e, t) {
1546
1576
  if (t.length === 0) return [];
1547
1577
  const r = t.map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), s = new RegExp(
1548
1578
  `\\b(${r})\\s*\\(\\s*\\[([^\\]]+)\\]\\s*,\\s*\\[([^\\]]+)\\]\\s*\\)`,
@@ -1554,16 +1584,16 @@ function Pt(e, t) {
1554
1584
  ref2: n[3].trim()
1555
1585
  }));
1556
1586
  }
1557
- function cn(e, t, r) {
1558
- var o, a, u;
1559
- const s = Object.keys(t), n = ((o = r.errorPrefix) != null ? o : "customFormula validation").trim(), i = n === "" ? "" : n.endsWith(" ") ? n : `${n} `;
1587
+ function mn(e, t, r) {
1588
+ var a, o, u;
1589
+ const s = Object.keys(t), n = ((a = r.errorPrefix) != null ? a : "customFormula validation").trim(), i = n === "" ? "" : n.endsWith(" ") ? n : `${n} `;
1560
1590
  return {
1561
1591
  formula: e,
1562
1592
  context: t,
1563
1593
  contextKeys: s,
1564
- canonicalContextKeys: new Set(s.map(G)),
1594
+ canonicalContextKeys: new Set(s.map(Y)),
1565
1595
  errorPrefix: i,
1566
- warnUnusedContext: (a = r.warnUnusedContext) != null ? a : !0,
1596
+ warnUnusedContext: (o = r.warnUnusedContext) != null ? o : !0,
1567
1597
  errorOnUnusedContext: (u = r.errorOnUnusedContext) != null ? u : !0,
1568
1598
  schemaIndex: r.schemaIndex,
1569
1599
  result: { isValid: !0, errors: [], warnings: [], references: [], unusedContextKeys: [] }
@@ -1572,17 +1602,17 @@ function cn(e, t, r) {
1572
1602
  function R(e, t) {
1573
1603
  e.result.errors.push(t), e.result.isValid = !1;
1574
1604
  }
1575
- const ln = /* @__PURE__ */ new Set(["CASE", "WHEN", "THEN", "ELSE", "END", "AND", "OR"]);
1576
- function dn(e) {
1605
+ const pn = /* @__PURE__ */ new Set(["CASE", "WHEN", "THEN", "ELSE", "END", "AND", "OR"]);
1606
+ function gn(e) {
1577
1607
  const t = /\b(\w+)\s*\[/gi, r = [...e.formula.matchAll(t)].find(
1578
- (s) => !ln.has(s[1].toUpperCase())
1608
+ (s) => !pn.has(s[1].toUpperCase())
1579
1609
  );
1580
1610
  r && R(
1581
1611
  e,
1582
1612
  `${e.errorPrefix}args[1]: Invalid syntax: '${r[1]}' - operator cannot be used before bracket reference without parentheses`
1583
1613
  );
1584
1614
  }
1585
- function fn(e, t) {
1615
+ function yn(e, t) {
1586
1616
  const r = e[t];
1587
1617
  let s = t + 1;
1588
1618
  for (; s < e.length; ) {
@@ -1599,27 +1629,27 @@ function fn(e, t) {
1599
1629
  }
1600
1630
  return e.length;
1601
1631
  }
1602
- function pn(e) {
1603
- return xe(e, ",").filter((t) => t.trim().length > 0).length;
1632
+ function hn(e) {
1633
+ return Re(e, ",").filter((t) => t.trim().length > 0).length;
1604
1634
  }
1605
- function mn(e, t, r, s) {
1635
+ function bn(e, t, r, s) {
1606
1636
  for (; t < e.length && /\s/.test(e[t]); )
1607
1637
  t++;
1608
1638
  if (e[t] !== "(")
1609
1639
  return t;
1610
- const n = t, i = us(e, n);
1640
+ const n = t, i = ps(e, n);
1611
1641
  if (i === -1)
1612
1642
  return n + 1;
1613
- const o = e.slice(n + 1, i);
1614
- return s.push({ name: r.toUpperCase(), argCount: pn(o) }), s.push(...Wt(o)), i + 1;
1643
+ const a = e.slice(n + 1, i);
1644
+ return s.push({ name: r.toUpperCase(), argCount: hn(a) }), s.push(...Ht(a)), i + 1;
1615
1645
  }
1616
- function Wt(e) {
1646
+ function Ht(e) {
1617
1647
  const t = [];
1618
1648
  let r = 0;
1619
1649
  for (; r < e.length; ) {
1620
1650
  const s = e[r];
1621
1651
  if (s === "'" || s === '"') {
1622
- r = fn(e, r);
1652
+ r = yn(e, r);
1623
1653
  continue;
1624
1654
  }
1625
1655
  if (/[A-Za-z_]/.test(s)) {
@@ -1627,122 +1657,122 @@ function Wt(e) {
1627
1657
  for (r++; r < e.length && /[A-Za-z0-9_]/.test(e[r]); )
1628
1658
  r++;
1629
1659
  const i = e.slice(n, r);
1630
- r = mn(e, r, i, t);
1660
+ r = bn(e, r, i, t);
1631
1661
  continue;
1632
1662
  }
1633
1663
  r++;
1634
1664
  }
1635
1665
  return t;
1636
1666
  }
1637
- function gn(e) {
1638
- const t = Wt(e.formula), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
1667
+ function Fn(e) {
1668
+ const t = Ht(e.formula), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
1639
1669
  for (const { name: n, argCount: i } of t) {
1640
- if (en.has(n)) {
1670
+ if (nn.has(n)) {
1641
1671
  r.has(n) || (r.add(n), R(
1642
1672
  e,
1643
1673
  `${e.errorPrefix}args[1]: Function ${n} is not supported in custom formulas`
1644
1674
  ));
1645
1675
  continue;
1646
1676
  }
1647
- const o = ue[n];
1648
- if (o && (i < o.minArgs || i > o.maxArgs) && !s.has(n)) {
1677
+ const a = le[n];
1678
+ if (a && (i < a.minArgs || i > a.maxArgs) && !s.has(n)) {
1649
1679
  s.add(n);
1650
- const a = rn(o.minArgs, o.maxArgs);
1651
- R(e, `${e.errorPrefix}args[1]: Function ${n} accepts ${a}`);
1680
+ const o = on(a.minArgs, a.maxArgs);
1681
+ R(e, `${e.errorPrefix}args[1]: Function ${n} accepts ${o}`);
1652
1682
  }
1653
1683
  }
1654
1684
  }
1655
- function yn(e) {
1685
+ function En(e) {
1656
1686
  return [
1657
1687
  ...new Set(
1658
- [...e.matchAll(new RegExp(sn.source, "g"))].map((t) => t[1])
1688
+ [...e.matchAll(new RegExp(un.source, "g"))].map((t) => t[1])
1659
1689
  )
1660
1690
  ];
1661
1691
  }
1662
- function hn(e) {
1692
+ function An(e) {
1663
1693
  const t = e.result.references.filter(
1664
- (n) => !e.canonicalContextKeys.has(G(n))
1694
+ (n) => !e.canonicalContextKeys.has(Y(n))
1665
1695
  );
1666
1696
  if (t.length === 0) return;
1667
- const r = e.contextKeys.map((n) => `[${_t(n)}]`).join(", "), s = t.length === 1 ? `Reference [${t[0]}]` : `References [${t.join("], [")}]`;
1697
+ const r = e.contextKeys.map((n) => `[${Gt(n)}]`).join(", "), s = t.length === 1 ? `Reference [${t[0]}]` : `References [${t.join("], [")}]`;
1668
1698
  R(
1669
1699
  e,
1670
1700
  `${e.errorPrefix}args[1]: ${s} not found in context. Available keys: ${r}`
1671
1701
  );
1672
1702
  }
1673
- function bn(e) {
1674
- if (nn.test(e.formula)) return;
1703
+ function Tn(e) {
1704
+ if (cn.test(e.formula)) return;
1675
1705
  const t = e.result.references.filter((r) => {
1676
1706
  var n;
1677
- const s = (n = e.context[G(r)]) != null ? n : e.context[r];
1678
- return s !== void 0 && !Ut(s);
1707
+ const s = (n = e.context[Y(r)]) != null ? n : e.context[r];
1708
+ return s !== void 0 && !Kt(s);
1679
1709
  });
1680
1710
  t.length !== 0 && R(
1681
1711
  e,
1682
- `${e.errorPrefix}args[1]: ${un(
1683
- on(e.formula)
1684
- )}Bracket reference(s) ${an(
1712
+ `${e.errorPrefix}args[1]: ${dn(
1713
+ ln(e.formula)
1714
+ )}Bracket reference(s) ${fn(
1685
1715
  t
1686
1716
  )} point to raw attributes and must be wrapped in an aggregative function (e.g. SUM, AVG)`
1687
1717
  );
1688
1718
  }
1689
- function En(e) {
1719
+ function wn(e) {
1690
1720
  if (!e.warnUnusedContext && !e.errorOnUnusedContext || e.contextKeys.length === 0) return;
1691
- const t = new Set(e.result.references.map(G)), r = e.contextKeys.filter((i) => !t.has(G(i)));
1721
+ const t = new Set(e.result.references.map(Y)), r = e.contextKeys.filter((i) => !t.has(Y(i)));
1692
1722
  if (e.result.unusedContextKeys = r, r.length === 0) return;
1693
- const s = r.map((i) => `[${_t(i)}]`).join(", "), n = `${e.errorPrefix}args[2]: Context keys ${s} are defined but not used in formula`;
1723
+ const s = r.map((i) => `[${Gt(i)}]`).join(", "), n = `${e.errorPrefix}args[2]: Context keys ${s} are defined but not used in formula`;
1694
1724
  e.errorOnUnusedContext ? R(e, n) : e.warnUnusedContext && e.result.warnings.push(n);
1695
1725
  }
1696
- function Qe(e, t, r, s) {
1697
- var o;
1698
- const n = (o = s.context[G(e)]) != null ? o : s.context[e];
1726
+ function tt(e, t, r, s) {
1727
+ var a;
1728
+ const n = (a = s.context[Y(e)]) != null ? a : s.context[e];
1699
1729
  if (n === void 0) return;
1700
- if (!(typeof n == "string" && n.startsWith(w))) {
1701
- Ut(n) && R(
1730
+ if (!(typeof n == "string" && n.startsWith(T))) {
1731
+ Kt(n) && R(
1702
1732
  s,
1703
- `${s.errorPrefix}args[1]: ${t.functionName} requires datetime dimension attributes. Reference [${e}] points to a measure; use an attribute (e.g. ${w}Table.Column.Level).`
1733
+ `${s.errorPrefix}args[1]: ${t.functionName} requires datetime dimension attributes. Reference [${e}] points to a measure; use an attribute (e.g. ${T}Table.Column.Level).`
1704
1734
  );
1705
1735
  return;
1706
1736
  }
1707
1737
  if (s.schemaIndex)
1708
1738
  try {
1709
- const a = ke(n, s.schemaIndex);
1710
- ee(a.column.dataType) ? r && a.level && a.level !== r && R(
1739
+ const o = Ue(n, s.schemaIndex);
1740
+ se(o.column.dataType) ? r && o.level && o.level !== r && R(
1711
1741
  s,
1712
- `${s.errorPrefix}args[1]: ${t.functionName} expects date level '${r}'. Reference [${e}] has level '${a.level}'.`
1742
+ `${s.errorPrefix}args[1]: ${t.functionName} expects date level '${r}'. Reference [${e}] has level '${o.level}'.`
1713
1743
  ) : R(
1714
1744
  s,
1715
- `${s.errorPrefix}args[1]: ${t.functionName} requires datetime dimensions. Reference [${e}] resolves to non-datetime column '${a.column.name}'.`
1745
+ `${s.errorPrefix}args[1]: ${t.functionName} requires datetime dimensions. Reference [${e}] resolves to non-datetime column '${o.column.name}'.`
1716
1746
  );
1717
- } catch (a) {
1718
- const u = a instanceof Error ? a.message : "Unknown error";
1747
+ } catch (o) {
1748
+ const u = o instanceof Error ? o.message : "Unknown error";
1719
1749
  R(s, `${s.errorPrefix}args[1]: ${t.functionName} reference [${e}]: ${u}`);
1720
1750
  }
1721
1751
  }
1722
- function Fn(e) {
1723
- const t = Bt(), r = Pt(e.formula, t);
1752
+ function Sn(e) {
1753
+ const t = Vt(), r = Yt(e.formula, t);
1724
1754
  for (const s of r) {
1725
- const n = Lt(s.functionName);
1726
- Qe(s.ref1, s, n, e), Qe(s.ref2, s, n, e);
1755
+ const n = jt(s.functionName);
1756
+ tt(s.ref1, s, n, e), tt(s.ref2, s, n, e);
1727
1757
  }
1728
1758
  }
1729
- function An(e, t, r = {}) {
1759
+ function Cn(e, t, r = {}) {
1730
1760
  var n;
1731
- const s = cn(e, t, r);
1732
- return !e || e.trim().length === 0 ? ((n = r.allowEmptyFormula) != null && n || R(s, `${s.errorPrefix}args[1]: Formula cannot be empty`), s.result) : (dn(s), gn(s), s.result.references = yn(e), s.result.references.length === 0 ? (s.result.warnings.push(
1761
+ const s = mn(e, t, r);
1762
+ return !e || e.trim().length === 0 ? ((n = r.allowEmptyFormula) != null && n || R(s, `${s.errorPrefix}args[1]: Formula cannot be empty`), s.result) : (gn(s), Fn(s), s.result.references = En(e), s.result.references.length === 0 ? (s.result.warnings.push(
1733
1763
  `${s.errorPrefix}args[1]: No bracket references found in formula - ensure this is intentional`
1734
1764
  ), s.result) : s.contextKeys.length === 0 ? (R(
1735
1765
  s,
1736
1766
  `${s.errorPrefix}args[2]: Context cannot be empty - custom formulas require context definitions`
1737
- ), s.result) : (hn(s), bn(s), En(s), Fn(s), s.result));
1767
+ ), s.result) : (An(s), Tn(s), wn(s), Sn(s), s.result));
1738
1768
  }
1739
- function wn(e, t, r = {}) {
1740
- const s = An(e, t, r);
1769
+ function On(e, t, r = {}) {
1770
+ const s = Cn(e, t, r);
1741
1771
  if (!s.isValid)
1742
1772
  throw new Error(s.errors.join("; "));
1743
1773
  s.warnings.length > 0 && console.warn("Formula validation warnings:", s.warnings.join("; "));
1744
1774
  }
1745
- function Tn(e, t) {
1775
+ function $n(e, t) {
1746
1776
  if (e.length < 3 || e.length > 5)
1747
1777
  throw new Error(
1748
1778
  `${t.pathPrefix}Expected 3, 4, or 5 arguments for customFormula (title, formula, context, format?, description?)`
@@ -1753,12 +1783,12 @@ function Tn(e, t) {
1753
1783
  `${t.pathPrefix}args[1]: Expected formula string, got ${typeof r}`
1754
1784
  );
1755
1785
  const s = r, n = e[2];
1756
- if (!O(n))
1786
+ if (!q(n))
1757
1787
  throw new Error(
1758
1788
  `${t.pathPrefix}args[2]: Expected context object, got ${n === null ? "null" : typeof n}`
1759
1789
  );
1760
1790
  const i = n;
1761
- wn(s, i, {
1791
+ On(s, i, {
1762
1792
  errorPrefix: `${t.pathPrefix}`,
1763
1793
  errorOnUnusedContext: !0,
1764
1794
  // Strict validation: all context keys must be used
@@ -1766,11 +1796,11 @@ function Tn(e, t) {
1766
1796
  // Custom formulas must have content
1767
1797
  schemaIndex: t.schemaIndex
1768
1798
  });
1769
- const o = Sn(s), a = {};
1799
+ const a = qn(s), o = {};
1770
1800
  for (const [u, c] of Object.entries(i)) {
1771
1801
  const g = `args[2].${u}`;
1772
- if (q(c))
1773
- a[`${u}`] = M({
1802
+ if (w(c))
1803
+ o[`${u}`] = M({
1774
1804
  data: c,
1775
1805
  context: {
1776
1806
  dataSource: t.dataSource,
@@ -1778,191 +1808,202 @@ function Tn(e, t) {
1778
1808
  pathPrefix: g
1779
1809
  }
1780
1810
  });
1781
- else if (typeof c == "string" && c.startsWith(w)) {
1782
- const d = u.startsWith("[") && u.endsWith("]") ? u.slice(1, -1) : u, m = o[d];
1811
+ else if (typeof c == "string" && c.startsWith(T)) {
1812
+ const f = u.startsWith("[") && u.endsWith("]") ? u.slice(1, -1) : u, p = a[f];
1783
1813
  try {
1784
- a[`${u}`] = Z(
1814
+ o[`${u}`] = re(
1785
1815
  c,
1786
1816
  t.dataSource,
1787
1817
  t.schemaIndex,
1788
- m !== void 0 ? { inferredDateLevel: m } : void 0
1818
+ p !== void 0 ? { inferredDateLevel: p } : void 0
1789
1819
  );
1790
1820
  } catch (h) {
1791
1821
  const b = h instanceof Error ? h.message : "Unknown error";
1792
1822
  throw new Error(`${g}: ${b}`);
1793
1823
  }
1794
1824
  } else if (c && typeof c == "object" && "kind" in c)
1795
- a[`${u}`] = c;
1825
+ o[`${u}`] = c;
1796
1826
  else
1797
1827
  throw new Error(
1798
- `${g}: Invalid context value for key '${u}'. Expected a function call or attribute reference (${w}...), but got: ${typeof c}`
1828
+ `${g}: Invalid context value for key '${u}'. Expected a function call or attribute reference (${T}...), but got: ${typeof c}`
1799
1829
  );
1800
1830
  }
1801
- return [e[0], e[1], a, ...e.slice(3)];
1831
+ return [e[0], e[1], o, ...e.slice(3)];
1802
1832
  }
1803
- function Sn(e) {
1804
- const t = Bt(), r = Pt(e, t), s = {};
1833
+ function qn(e) {
1834
+ const t = Vt(), r = Yt(e, t), s = {};
1805
1835
  for (const n of r) {
1806
- const i = Lt(n.functionName);
1836
+ const i = jt(n.functionName);
1807
1837
  if (i !== void 0)
1808
- for (const o of [n.ref1, n.ref2]) {
1809
- const a = s[o];
1810
- if (a !== void 0 && a !== i)
1838
+ for (const a of [n.ref1, n.ref2]) {
1839
+ const o = s[a];
1840
+ if (o !== void 0 && o !== i)
1811
1841
  throw new Error(
1812
- `Reference [${o}] is used in xdiff functions with conflicting date levels ('${a}' and '${i}'). Specify the date level in the context (e.g. DM.Table.Column.${i}).`
1842
+ `Reference [${a}] is used in xdiff functions with conflicting date levels ('${o}' and '${i}'). Specify the date level in the context (e.g. DM.Table.Column.${i}).`
1813
1843
  );
1814
- s[o] = i;
1844
+ s[a] = i;
1815
1845
  }
1816
1846
  }
1817
1847
  return s;
1818
1848
  }
1819
- function Vt(e) {
1820
- return e.type === j.TextAttribute;
1849
+ function Qt(e) {
1850
+ return e.type === J.TextAttribute;
1821
1851
  }
1822
- function jt(e) {
1823
- return e.type === j.NumericAttribute;
1852
+ function Xt(e) {
1853
+ return e.type === J.NumericAttribute;
1824
1854
  }
1825
- function Cn(e) {
1826
- return e.type === j.DateLevel;
1855
+ function Dn(e) {
1856
+ return e.type === J.DateLevel;
1827
1857
  }
1828
- function qn(e) {
1829
- return Vt(e) || jt(e);
1858
+ function xn(e) {
1859
+ return Qt(e) || Xt(e);
1830
1860
  }
1831
- function pe(e) {
1832
- return e.type === j.TextAttribute ? "text" : e.type === j.NumericAttribute ? "numeric" : e.type === j.DateLevel ? "date/datetime" : "unknown";
1861
+ function ye(e) {
1862
+ return e.type === J.TextAttribute ? "text" : e.type === J.NumericAttribute ? "numeric" : e.type === J.DateLevel ? "date/datetime" : "unknown";
1833
1863
  }
1834
- function Le(e, t) {
1864
+ function We(e, t) {
1835
1865
  const r = e[0];
1836
1866
  if (!r || typeof r != "object" || !("type" in r))
1837
1867
  throw new Error(`${t.pathPrefix}args[0]: Expected attribute as first argument`);
1838
1868
  return r;
1839
1869
  }
1840
- function Xe(e, t) {
1841
- const r = Le(e, t);
1842
- if (!qn(r))
1870
+ function rt(e, t) {
1871
+ const r = We(e, t);
1872
+ if (!xn(r))
1843
1873
  throw new Error(
1844
- `${t.pathPrefix}args[0]: Attribute must be string or numeric type, got ${pe(
1874
+ `${t.pathPrefix}args[0]: Attribute must be string or numeric type, got ${ye(
1845
1875
  r
1846
1876
  )} attribute`
1847
1877
  );
1848
1878
  return e;
1849
1879
  }
1850
- function L(e, t) {
1851
- const r = Le(e, t);
1852
- if (!jt(r))
1880
+ function B(e, t) {
1881
+ const r = We(e, t);
1882
+ if (!Xt(r))
1853
1883
  throw new Error(
1854
- `${t.pathPrefix}args[0]: Attribute must be numeric type, got ${pe(
1884
+ `${t.pathPrefix}args[0]: Attribute must be numeric type, got ${ye(
1855
1885
  r
1856
1886
  )} attribute`
1857
1887
  );
1858
1888
  return e;
1859
1889
  }
1860
- function z(e, t) {
1861
- const r = Le(e, t);
1862
- if (!Vt(r))
1890
+ function _(e, t) {
1891
+ const r = We(e, t);
1892
+ if (!Qt(r))
1863
1893
  throw new Error(
1864
- `${t.pathPrefix}args[0]: Attribute must be string type, got ${pe(
1894
+ `${t.pathPrefix}args[0]: Attribute must be string type, got ${ye(
1865
1895
  r
1866
1896
  )} attribute`
1867
1897
  );
1868
1898
  return e;
1869
1899
  }
1870
- function $n(e, t) {
1900
+ function Nn(e, t) {
1871
1901
  const r = e[0];
1872
1902
  if (!r || typeof r != "object" || !("attribute" in r))
1873
1903
  throw new Error(`${t.pathPrefix}args[0]: Expected filter as first argument`);
1874
1904
  return r;
1875
1905
  }
1876
- function On(e, t) {
1877
- const r = $n(e, t);
1878
- if (!De(r))
1906
+ function vn(e, t) {
1907
+ const r = Nn(e, t);
1908
+ if (!Me(r))
1879
1909
  throw new Error(
1880
1910
  `${t.pathPrefix}args[0]: exclude filter only accepts members filter, got ${r.__serializable || "unknown"} filter`
1881
1911
  );
1882
1912
  return e;
1883
1913
  }
1884
- const Dn = {
1885
- "measureFactory.customFormula": Tn,
1914
+ const Mn = "FilterRelations (filterFactory.logic.or / filterFactory.logic.and) is not supported inside measureFactory.measuredValue filters. Use plain filters only, or apply logical relations at the query filter level.";
1915
+ function Rn(e, t) {
1916
+ const r = e[1];
1917
+ return Array.isArray(r) && r.forEach((s, n) => {
1918
+ if (!(typeof s != "object" || s === null) && H(s))
1919
+ throw new Error(
1920
+ `${t.pathPrefix}args[1][${n}]: ${Mn}`
1921
+ );
1922
+ }), e;
1923
+ }
1924
+ const In = {
1925
+ "measureFactory.customFormula": $n,
1926
+ "measureFactory.measuredValue": Rn,
1886
1927
  // String | Number filters
1887
- "filterFactory.equals": Xe,
1888
- "filterFactory.doesntEqual": Xe,
1928
+ "filterFactory.equals": rt,
1929
+ "filterFactory.doesntEqual": rt,
1889
1930
  // Numeric filters
1890
- "filterFactory.greaterThan": L,
1891
- "filterFactory.greaterThanOrEqual": L,
1892
- "filterFactory.lessThan": L,
1893
- "filterFactory.lessThanOrEqual": L,
1894
- "filterFactory.between": L,
1895
- "filterFactory.betweenNotEqual": L,
1896
- "filterFactory.numeric": L,
1931
+ "filterFactory.greaterThan": B,
1932
+ "filterFactory.greaterThanOrEqual": B,
1933
+ "filterFactory.lessThan": B,
1934
+ "filterFactory.lessThanOrEqual": B,
1935
+ "filterFactory.between": B,
1936
+ "filterFactory.betweenNotEqual": B,
1937
+ "filterFactory.numeric": B,
1897
1938
  // String filters
1898
- "filterFactory.contains": z,
1899
- "filterFactory.doesntContain": z,
1900
- "filterFactory.startsWith": z,
1901
- "filterFactory.doesntStartWith": z,
1902
- "filterFactory.endsWith": z,
1903
- "filterFactory.doesntEndWith": z,
1904
- "filterFactory.like": z,
1939
+ "filterFactory.contains": _,
1940
+ "filterFactory.doesntContain": _,
1941
+ "filterFactory.startsWith": _,
1942
+ "filterFactory.doesntStartWith": _,
1943
+ "filterFactory.endsWith": _,
1944
+ "filterFactory.doesntEndWith": _,
1945
+ "filterFactory.like": _,
1905
1946
  // Exclude filter
1906
- "filterFactory.exclude": On
1947
+ "filterFactory.exclude": vn
1907
1948
  };
1908
- function xn(e) {
1909
- return Dn[`${e}`];
1949
+ function kn(e) {
1950
+ return In[`${e}`];
1910
1951
  }
1911
- const Jt = {
1952
+ const Zt = {
1912
1953
  // ==================== MEASURE FACTORY FUNCTIONS ====================
1913
1954
  // Basic aggregations
1914
1955
  "measureFactory.sum": [
1915
1956
  { type: "Attribute", required: !0 },
1916
- { type: "string", required: !1 },
1957
+ { type: "string", required: !1, isName: !0 },
1917
1958
  // name
1918
1959
  { type: "string", required: !1 }
1919
1960
  // format
1920
1961
  ],
1921
1962
  "measureFactory.average": [
1922
1963
  { type: "Attribute", required: !0 },
1923
- { type: "string", required: !1 },
1964
+ { type: "string", required: !1, isName: !0 },
1924
1965
  // name
1925
1966
  { type: "string", required: !1 }
1926
1967
  // format
1927
1968
  ],
1928
1969
  "measureFactory.avg": [
1929
1970
  { type: "Attribute", required: !0 },
1930
- { type: "string", required: !1 },
1971
+ { type: "string", required: !1, isName: !0 },
1931
1972
  // name
1932
1973
  { type: "string", required: !1 }
1933
1974
  // format
1934
1975
  ],
1935
1976
  "measureFactory.min": [
1936
1977
  { type: "Attribute", required: !0 },
1937
- { type: "string", required: !1 },
1978
+ { type: "string", required: !1, isName: !0 },
1938
1979
  // name
1939
1980
  { type: "string", required: !1 }
1940
1981
  // format
1941
1982
  ],
1942
1983
  "measureFactory.max": [
1943
1984
  { type: "Attribute", required: !0 },
1944
- { type: "string", required: !1 },
1985
+ { type: "string", required: !1, isName: !0 },
1945
1986
  // name
1946
1987
  { type: "string", required: !1 }
1947
1988
  // format
1948
1989
  ],
1949
1990
  "measureFactory.median": [
1950
1991
  { type: "Attribute", required: !0 },
1951
- { type: "string", required: !1 },
1992
+ { type: "string", required: !1, isName: !0 },
1952
1993
  // name
1953
1994
  { type: "string", required: !1 }
1954
1995
  // format
1955
1996
  ],
1956
1997
  "measureFactory.count": [
1957
1998
  { type: "Attribute", required: !0 },
1958
- { type: "string", required: !1 },
1999
+ { type: "string", required: !1, isName: !0 },
1959
2000
  // name
1960
2001
  { type: "string", required: !1 }
1961
2002
  // format
1962
2003
  ],
1963
2004
  "measureFactory.countDistinct": [
1964
2005
  { type: "Attribute", required: !0 },
1965
- { type: "string", required: !1 },
2006
+ { type: "string", required: !1, isName: !0 },
1966
2007
  // name
1967
2008
  { type: "string", required: !1 }
1968
2009
  // format
@@ -1971,7 +2012,7 @@ const Jt = {
1971
2012
  { type: "Attribute", required: !0 },
1972
2013
  { type: "string", required: !0 },
1973
2014
  // aggregationType
1974
- { type: "string", required: !1 },
2015
+ { type: "string", required: !1, isName: !0 },
1975
2016
  // name
1976
2017
  { type: "string", required: !1 }
1977
2018
  // format
@@ -1979,7 +2020,7 @@ const Jt = {
1979
2020
  // Constants and formulas
1980
2021
  "measureFactory.constant": [{ type: "number", required: !0 }],
1981
2022
  "measureFactory.customFormula": [
1982
- { type: "string", required: !0 },
2023
+ { type: "string", required: !0, isName: !0 },
1983
2024
  // title
1984
2025
  { type: "string", required: !0 },
1985
2026
  // formula
@@ -1994,7 +2035,7 @@ const Jt = {
1994
2035
  "measureFactory.add": [
1995
2036
  { type: "Measure | number", required: !0 },
1996
2037
  { type: "Measure | number", required: !0 },
1997
- { type: "string", required: !1 },
2038
+ { type: "string", required: !1, isName: !0 },
1998
2039
  // name
1999
2040
  { type: "boolean", required: !1 }
2000
2041
  // withParentheses
@@ -2002,7 +2043,7 @@ const Jt = {
2002
2043
  "measureFactory.subtract": [
2003
2044
  { type: "Measure | number", required: !0 },
2004
2045
  { type: "Measure | number", required: !0 },
2005
- { type: "string", required: !1 },
2046
+ { type: "string", required: !1, isName: !0 },
2006
2047
  // name
2007
2048
  { type: "boolean", required: !1 }
2008
2049
  // withParentheses
@@ -2010,7 +2051,7 @@ const Jt = {
2010
2051
  "measureFactory.multiply": [
2011
2052
  { type: "Measure | number", required: !0 },
2012
2053
  { type: "Measure | number", required: !0 },
2013
- { type: "string", required: !1 },
2054
+ { type: "string", required: !1, isName: !0 },
2014
2055
  // name
2015
2056
  { type: "boolean", required: !1 }
2016
2057
  // withParentheses
@@ -2018,7 +2059,7 @@ const Jt = {
2018
2059
  "measureFactory.divide": [
2019
2060
  { type: "Measure | number", required: !0 },
2020
2061
  { type: "Measure | number", required: !0 },
2021
- { type: "string", required: !1 },
2062
+ { type: "string", required: !1, isName: !0 },
2022
2063
  // name
2023
2064
  { type: "boolean", required: !1 }
2024
2065
  // withParentheses
@@ -2027,14 +2068,14 @@ const Jt = {
2027
2068
  "measureFactory.measuredValue": [
2028
2069
  { type: "Measure", required: !0 },
2029
2070
  { type: "Filter[]", required: !0 },
2030
- { type: "string", required: !1 },
2071
+ { type: "string", required: !1, isName: !0 },
2031
2072
  // name
2032
2073
  { type: "string", required: !1 }
2033
2074
  // format
2034
2075
  ],
2035
2076
  "measureFactory.rank": [
2036
2077
  { type: "Measure", required: !0 },
2037
- { type: "string", required: !1 },
2078
+ { type: "string", required: !1, isName: !0 },
2038
2079
  // name
2039
2080
  { type: "string", required: !1 },
2040
2081
  // sort
@@ -2045,14 +2086,14 @@ const Jt = {
2045
2086
  ],
2046
2087
  "measureFactory.trend": [
2047
2088
  { type: "Measure", required: !0 },
2048
- { type: "string", required: !1 },
2089
+ { type: "string", required: !1, isName: !0 },
2049
2090
  // name
2050
2091
  { type: "any", required: !1 }
2051
2092
  // options
2052
2093
  ],
2053
2094
  "measureFactory.forecast": [
2054
2095
  { type: "Measure", required: !0 },
2055
- { type: "string", required: !1 },
2096
+ { type: "string", required: !1, isName: !0 },
2056
2097
  // name
2057
2098
  { type: "any", required: !1 }
2058
2099
  // options
@@ -2060,117 +2101,117 @@ const Jt = {
2060
2101
  // Time-based aggregations
2061
2102
  "measureFactory.yearToDateSum": [
2062
2103
  { type: "Measure", required: !0 },
2063
- { type: "string", required: !1 }
2104
+ { type: "string", required: !1, isName: !0 }
2064
2105
  // name
2065
2106
  ],
2066
2107
  "measureFactory.quarterToDateSum": [
2067
2108
  { type: "Measure", required: !0 },
2068
- { type: "string", required: !1 }
2109
+ { type: "string", required: !1, isName: !0 }
2069
2110
  // name
2070
2111
  ],
2071
2112
  "measureFactory.monthToDateSum": [
2072
2113
  { type: "Measure", required: !0 },
2073
- { type: "string", required: !1 }
2114
+ { type: "string", required: !1, isName: !0 }
2074
2115
  // name
2075
2116
  ],
2076
2117
  "measureFactory.weekToDateSum": [
2077
2118
  { type: "Measure", required: !0 },
2078
- { type: "string", required: !1 }
2119
+ { type: "string", required: !1, isName: !0 }
2079
2120
  // name
2080
2121
  ],
2081
2122
  "measureFactory.runningSum": [
2082
2123
  { type: "Measure", required: !0 },
2083
2124
  { type: "boolean", required: !1 },
2084
2125
  // continuous
2085
- { type: "string", required: !1 }
2126
+ { type: "string", required: !1, isName: !0 }
2086
2127
  // name
2087
2128
  ],
2088
2129
  // Growth and difference calculations
2089
2130
  "measureFactory.growth": [
2090
2131
  { type: "Measure", required: !0 },
2091
- { type: "string", required: !1 }
2132
+ { type: "string", required: !1, isName: !0 }
2092
2133
  // name
2093
2134
  ],
2094
2135
  "measureFactory.growthRate": [
2095
2136
  { type: "Measure", required: !0 },
2096
- { type: "string", required: !1 }
2137
+ { type: "string", required: !1, isName: !0 }
2097
2138
  // name
2098
2139
  ],
2099
2140
  "measureFactory.growthPastWeek": [
2100
2141
  { type: "Measure", required: !0 },
2101
- { type: "string", required: !1 }
2142
+ { type: "string", required: !1, isName: !0 }
2102
2143
  // name
2103
2144
  ],
2104
2145
  "measureFactory.growthPastMonth": [
2105
2146
  { type: "Measure", required: !0 },
2106
- { type: "string", required: !1 }
2147
+ { type: "string", required: !1, isName: !0 }
2107
2148
  // name
2108
2149
  ],
2109
2150
  "measureFactory.growthPastQuarter": [
2110
2151
  { type: "Measure", required: !0 },
2111
- { type: "string", required: !1 }
2152
+ { type: "string", required: !1, isName: !0 }
2112
2153
  // name
2113
2154
  ],
2114
2155
  "measureFactory.growthPastYear": [
2115
2156
  { type: "Measure", required: !0 },
2116
- { type: "string", required: !1 }
2157
+ { type: "string", required: !1, isName: !0 }
2117
2158
  // name
2118
2159
  ],
2119
2160
  "measureFactory.difference": [
2120
2161
  { type: "Measure", required: !0 },
2121
- { type: "string", required: !1 }
2162
+ { type: "string", required: !1, isName: !0 }
2122
2163
  // name
2123
2164
  ],
2124
2165
  "measureFactory.diffPastWeek": [
2125
2166
  { type: "Measure", required: !0 },
2126
- { type: "string", required: !1 }
2167
+ { type: "string", required: !1, isName: !0 }
2127
2168
  // name
2128
2169
  ],
2129
2170
  "measureFactory.diffPastMonth": [
2130
2171
  { type: "Measure", required: !0 },
2131
- { type: "string", required: !1 }
2172
+ { type: "string", required: !1, isName: !0 }
2132
2173
  // name
2133
2174
  ],
2134
2175
  "measureFactory.diffPastQuarter": [
2135
2176
  { type: "Measure", required: !0 },
2136
- { type: "string", required: !1 }
2177
+ { type: "string", required: !1, isName: !0 }
2137
2178
  // name
2138
2179
  ],
2139
2180
  "measureFactory.diffPastYear": [
2140
2181
  { type: "Measure", required: !0 },
2141
- { type: "string", required: !1 }
2182
+ { type: "string", required: !1, isName: !0 }
2142
2183
  // name
2143
2184
  ],
2144
2185
  // Past period measures
2145
2186
  "measureFactory.pastDay": [
2146
2187
  { type: "Measure", required: !0 },
2147
- { type: "string", required: !1 }
2188
+ { type: "string", required: !1, isName: !0 }
2148
2189
  // name
2149
2190
  ],
2150
2191
  "measureFactory.pastWeek": [
2151
2192
  { type: "Measure", required: !0 },
2152
- { type: "string", required: !1 }
2193
+ { type: "string", required: !1, isName: !0 }
2153
2194
  // name
2154
2195
  ],
2155
2196
  "measureFactory.pastMonth": [
2156
2197
  { type: "Measure", required: !0 },
2157
- { type: "string", required: !1 }
2198
+ { type: "string", required: !1, isName: !0 }
2158
2199
  // name
2159
2200
  ],
2160
2201
  "measureFactory.pastQuarter": [
2161
2202
  { type: "Measure", required: !0 },
2162
- { type: "string", required: !1 }
2203
+ { type: "string", required: !1, isName: !0 }
2163
2204
  // name
2164
2205
  ],
2165
2206
  "measureFactory.pastYear": [
2166
2207
  { type: "Measure", required: !0 },
2167
- { type: "string", required: !1 }
2208
+ { type: "string", required: !1, isName: !0 }
2168
2209
  // name
2169
2210
  ],
2170
2211
  // Statistics
2171
2212
  "measureFactory.contribution": [
2172
2213
  { type: "Measure", required: !0 },
2173
- { type: "string", required: !1 }
2214
+ { type: "string", required: !1, isName: !0 }
2174
2215
  // name
2175
2216
  ],
2176
2217
  // ==================== FILTER FACTORY FUNCTIONS ====================
@@ -2435,18 +2476,18 @@ const Jt = {
2435
2476
  { type: "FilterRelationsNode", required: !0 }
2436
2477
  ]
2437
2478
  };
2438
- function ze(e) {
2439
- return Jt[`${e}`];
2479
+ function he(e) {
2480
+ return Zt[`${e}`];
2440
2481
  }
2441
- function vn(e) {
2442
- const t = ze(e);
2482
+ function Ln(e) {
2483
+ const t = he(e);
2443
2484
  return t ? t.filter((r) => r.required).length : 0;
2444
2485
  }
2445
- function Nn(e) {
2446
- const t = ze(e);
2486
+ function Bn(e) {
2487
+ const t = he(e);
2447
2488
  return t ? t.length : 0;
2448
2489
  }
2449
- function Mn(e) {
2490
+ function _n(e) {
2450
2491
  if (typeof e != "string" || !/^\d{4}-\d{2}-\d{2}/.test(e))
2451
2492
  return !1;
2452
2493
  const r = Date.parse(e);
@@ -2455,319 +2496,319 @@ function Mn(e) {
2455
2496
  const s = new Date(e);
2456
2497
  return !isNaN(s.getTime());
2457
2498
  }
2458
- function Fe(e, t, r, s) {
2459
- if (e.startsWith(w))
2499
+ function Se(e, t, r, s) {
2500
+ if (e.startsWith(T))
2460
2501
  try {
2461
- return Z(e, t, r);
2502
+ return re(e, t, r);
2462
2503
  } catch (n) {
2463
2504
  const i = n instanceof Error ? n.message : "Unknown error";
2464
2505
  throw new Error(`${s}: ${i}`);
2465
2506
  }
2466
2507
  throw new Error(
2467
- `${s}: Invalid attribute '${e}'. Expected format: '${w}TableName.ColumnName[.Level]'`
2508
+ `${s}: Invalid attribute '${e}'. Expected format: '${T}TableName.ColumnName[.Level]'`
2468
2509
  );
2469
2510
  }
2470
- function Rn(e, t, r, s) {
2471
- if (e.startsWith(w))
2511
+ function zn(e, t, r, s) {
2512
+ if (e.startsWith(T))
2472
2513
  try {
2473
- return Js(e, t, r);
2514
+ return Hs(e, t, r);
2474
2515
  } catch (n) {
2475
2516
  const i = n instanceof Error ? n.message : "Unknown error";
2476
2517
  throw new Error(`${s}: ${i}`);
2477
2518
  }
2478
2519
  throw new Error(
2479
- `${s}: Invalid date dimension string '${e}'. Expected format: '${w}TableName.ColumnName'`
2520
+ `${s}: Invalid date dimension string '${e}'. Expected format: '${T}TableName.ColumnName'`
2480
2521
  );
2481
2522
  }
2482
- function In(e) {
2483
- const t = e.data, { argSchema: r, dataSource: s, schemaIndex: n, pathPrefix: i } = e.context, o = i;
2523
+ function Un(e) {
2524
+ const t = e.data, { argSchema: r, dataSource: s, schemaIndex: n, pathPrefix: i } = e.context, a = i;
2484
2525
  if (t === void 0) {
2485
2526
  if (r.required)
2486
- throw new Error(`${o}: Required argument is missing (expected ${r.type})`);
2527
+ throw new Error(`${a}: Required argument is missing (expected ${r.type})`);
2487
2528
  return;
2488
2529
  }
2489
2530
  if (!(t === null && !r.required))
2490
2531
  switch (r.type) {
2491
2532
  case "string":
2492
2533
  if (typeof t != "string")
2493
- throw new Error(`${o}: Expected string, got ${typeof t}`);
2534
+ throw new Error(`${a}: Expected string, got ${typeof t}`);
2494
2535
  return t;
2495
2536
  case "number":
2496
2537
  if (typeof t != "number")
2497
- throw new Error(`${o}: Expected number, got ${typeof t}`);
2538
+ throw new Error(`${a}: Expected number, got ${typeof t}`);
2498
2539
  return t;
2499
2540
  case "boolean":
2500
2541
  if (typeof t != "boolean")
2501
- throw new Error(`${o}: Expected boolean, got ${typeof t}`);
2542
+ throw new Error(`${a}: Expected boolean, got ${typeof t}`);
2502
2543
  return t;
2503
2544
  case "string[]":
2504
2545
  if (!Array.isArray(t))
2505
2546
  throw new Error(
2506
- `${o}: Expected array of strings, got ${typeof t}. Example: ['value1', 'value2']`
2547
+ `${a}: Expected array of strings, got ${typeof t}. Example: ['value1', 'value2']`
2507
2548
  );
2508
- if (!t.every((a) => typeof a == "string"))
2549
+ if (!t.every((o) => typeof o == "string"))
2509
2550
  throw new Error(
2510
- `${o}: Expected array of strings, but contains non-string values`
2551
+ `${a}: Expected array of strings, but contains non-string values`
2511
2552
  );
2512
2553
  return t;
2513
2554
  case "number[]":
2514
2555
  if (!Array.isArray(t))
2515
2556
  throw new Error(
2516
- `${o}: Expected array of numbers, got ${typeof t}. Example: [10, 20]`
2557
+ `${a}: Expected array of numbers, got ${typeof t}. Example: [10, 20]`
2517
2558
  );
2518
- if (!t.every((a) => typeof a == "number"))
2559
+ if (!t.every((o) => typeof o == "number"))
2519
2560
  throw new Error(
2520
- `${o}: Expected array of numbers, but contains non-number values`
2561
+ `${a}: Expected array of numbers, but contains non-number values`
2521
2562
  );
2522
2563
  return t;
2523
2564
  case "Attribute":
2524
2565
  if (typeof t != "string")
2525
2566
  throw new Error(
2526
- `${o}: Expected attribute string, got ${typeof t}. Example: 'DM.Commerce.Revenue'`
2567
+ `${a}: Expected attribute string, got ${typeof t}. Example: 'DM.Commerce.Revenue'`
2527
2568
  );
2528
- return Fe(t, s, n, o);
2569
+ return Se(t, s, n, a);
2529
2570
  case "Attribute[]":
2530
2571
  if (!Array.isArray(t))
2531
2572
  throw new Error(
2532
- `${o}: Expected array of attributes, got ${typeof t}. Example: ['DM.Commerce.AgeRange']`
2573
+ `${a}: Expected array of attributes, got ${typeof t}. Example: ['DM.Commerce.AgeRange']`
2533
2574
  );
2534
- return t.map((a, u) => {
2535
- if (typeof a != "string")
2536
- throw new Error(`${o}[${u}]: Expected attribute string, got ${typeof a}`);
2537
- return Fe(a, s, n, `${o}[${u}]`);
2575
+ return t.map((o, u) => {
2576
+ if (typeof o != "string")
2577
+ throw new Error(`${a}[${u}]: Expected attribute string, got ${typeof o}`);
2578
+ return Se(o, s, n, `${a}[${u}]`);
2538
2579
  });
2539
2580
  case "Measure":
2540
2581
  case "BaseMeasure":
2541
- if (!q(t))
2582
+ if (!w(t))
2542
2583
  throw new Error(
2543
- `${o}: Expected measure function call, got ${typeof t}. Example: {'function': 'measureFactory.sum', 'args': ['DM.Commerce.Revenue']}`
2584
+ `${a}: Expected measure function call, got ${typeof t}. Example: {'function': 'measureFactory.sum', 'args': ['DM.Commerce.Revenue']}`
2544
2585
  );
2545
2586
  return M({
2546
2587
  data: t,
2547
- context: { dataSource: s, schemaIndex: n, pathPrefix: o }
2588
+ context: { dataSource: s, schemaIndex: n, pathPrefix: a }
2548
2589
  });
2549
2590
  case "Measure[]":
2550
2591
  if (!Array.isArray(t))
2551
2592
  throw new Error(
2552
- `${o}: Expected array of measure function calls, got ${typeof t}`
2593
+ `${a}: Expected array of measure function calls, got ${typeof t}`
2553
2594
  );
2554
- return t.map((a, u) => {
2555
- if (!q(a))
2595
+ return t.map((o, u) => {
2596
+ if (!w(o))
2556
2597
  throw new Error(
2557
- `${o}[${u}]: Expected measure function call, got ${typeof a}`
2598
+ `${a}[${u}]: Expected measure function call, got ${typeof o}`
2558
2599
  );
2559
2600
  return M({
2560
- data: a,
2561
- context: { dataSource: s, schemaIndex: n, pathPrefix: `${o}[${u}]` }
2601
+ data: o,
2602
+ context: { dataSource: s, schemaIndex: n, pathPrefix: `${a}[${u}]` }
2562
2603
  });
2563
2604
  });
2564
2605
  case "Filter":
2565
- if (!q(t))
2606
+ if (!w(t))
2566
2607
  throw new Error(
2567
- `${o}: Expected filter function call, got ${typeof t}. Example: {'function': 'filterFactory.contains', 'args': ['DM.Brand.Brand', 'Apple']}`
2608
+ `${a}: Expected filter function call, got ${typeof t}. Example: {'function': 'filterFactory.contains', 'args': ['DM.Brand.Brand', 'Apple']}`
2568
2609
  );
2569
2610
  return M({
2570
2611
  data: t,
2571
- context: { dataSource: s, schemaIndex: n, pathPrefix: o }
2612
+ context: { dataSource: s, schemaIndex: n, pathPrefix: a }
2572
2613
  });
2573
2614
  case "Filter[]":
2574
2615
  if (!Array.isArray(t))
2575
2616
  throw new Error(
2576
- `${o}: Expected array of filter function calls, got ${typeof t}`
2617
+ `${a}: Expected array of filter function calls, got ${typeof t}`
2577
2618
  );
2578
- return t.map((a, u) => {
2579
- if (!q(a))
2619
+ return t.map((o, u) => {
2620
+ if (!w(o))
2580
2621
  throw new Error(
2581
- `${o}[${u}]: Expected filter function call, got ${typeof a}`
2622
+ `${a}[${u}]: Expected filter function call, got ${typeof o}`
2582
2623
  );
2583
2624
  return M({
2584
- data: a,
2585
- context: { dataSource: s, schemaIndex: n, pathPrefix: `${o}[${u}]` }
2625
+ data: o,
2626
+ context: { dataSource: s, schemaIndex: n, pathPrefix: `${a}[${u}]` }
2586
2627
  });
2587
2628
  });
2588
2629
  case "FilterRelationsNode":
2589
2630
  if (Array.isArray(t))
2590
- return t.map((a, u) => {
2591
- if (!q(a))
2631
+ return t.map((o, u) => {
2632
+ if (!w(o))
2592
2633
  throw new Error(
2593
- `${o}[${u}]: Expected filter function call, got ${typeof a}`
2634
+ `${a}[${u}]: Expected filter function call, got ${typeof o}`
2594
2635
  );
2595
2636
  return M({
2596
- data: a,
2597
- context: { dataSource: s, schemaIndex: n, pathPrefix: `${o}[${u}]` }
2637
+ data: o,
2638
+ context: { dataSource: s, schemaIndex: n, pathPrefix: `${a}[${u}]` }
2598
2639
  });
2599
2640
  });
2600
- if (q(t))
2641
+ if (w(t))
2601
2642
  return M({
2602
2643
  data: t,
2603
- context: { dataSource: s, schemaIndex: n, pathPrefix: o }
2644
+ context: { dataSource: s, schemaIndex: n, pathPrefix: a }
2604
2645
  });
2605
2646
  throw new Error(
2606
- `${o}: Expected filter function call or array of filters, got ${typeof t}`
2647
+ `${a}: Expected filter function call or array of filters, got ${typeof t}`
2607
2648
  );
2608
2649
  case "DateDimension":
2609
2650
  if (typeof t != "string")
2610
2651
  throw new Error(
2611
- `${o}: Expected date dimension string, got ${typeof t}. Example: 'DM.Commerce.Date'`
2652
+ `${a}: Expected date dimension string, got ${typeof t}. Example: 'DM.Commerce.Date'`
2612
2653
  );
2613
- return Rn(t, s, n, o);
2654
+ return zn(t, s, n, a);
2614
2655
  case "LevelAttribute": {
2615
2656
  if (typeof t != "string")
2616
2657
  throw new Error(
2617
- `${o}: Expected date attribute string, got ${typeof t}. Example: 'DM.Commerce.Date.Years'`
2658
+ `${a}: Expected date attribute string, got ${typeof t}. Example: 'DM.Commerce.Date.Years'`
2618
2659
  );
2619
- const a = Fe(
2660
+ const o = Se(
2620
2661
  t,
2621
2662
  s,
2622
2663
  n,
2623
- o
2664
+ a
2624
2665
  );
2625
- if (!Cn(a))
2666
+ if (!Dn(o))
2626
2667
  throw new Error(
2627
- `${o}: Attribute must be date/datetime type, got ${pe(
2628
- a
2668
+ `${a}: Attribute must be date/datetime type, got ${ye(
2669
+ o
2629
2670
  )} attribute`
2630
2671
  );
2631
- return a;
2672
+ return o;
2632
2673
  }
2633
2674
  case "Measure | number":
2634
2675
  if (typeof t == "number")
2635
2676
  return t;
2636
- if (q(t))
2677
+ if (w(t))
2637
2678
  return M({
2638
2679
  data: t,
2639
- context: { dataSource: s, schemaIndex: n, pathPrefix: o }
2680
+ context: { dataSource: s, schemaIndex: n, pathPrefix: a }
2640
2681
  });
2641
2682
  throw new Error(
2642
- `${o}: Expected measure function call or number, got ${typeof t}`
2683
+ `${a}: Expected measure function call or number, got ${typeof t}`
2643
2684
  );
2644
2685
  case "Date | string":
2645
2686
  if (typeof t == "string") {
2646
- if (Mn(t))
2687
+ if (_n(t))
2647
2688
  return t;
2648
2689
  throw new Error(
2649
- `${o}: Expected valid ISO date string or Date object, got invalid date string '${t}'`
2690
+ `${a}: Expected valid ISO date string or Date object, got invalid date string '${t}'`
2650
2691
  );
2651
2692
  } else {
2652
2693
  if (t instanceof Date)
2653
2694
  return t;
2654
2695
  throw new Error(
2655
- `${o}: Expected date string or Date object, got ${typeof t}`
2696
+ `${a}: Expected date string or Date object, got ${typeof t}`
2656
2697
  );
2657
2698
  }
2658
2699
  case "string | number":
2659
2700
  if (typeof t == "string" || typeof t == "number")
2660
2701
  return t;
2661
- throw new Error(`${o}: Expected string or number, got ${typeof t}`);
2702
+ throw new Error(`${a}: Expected string or number, got ${typeof t}`);
2662
2703
  case "BaseFilterConfig":
2663
2704
  case "MembersFilterConfig":
2664
2705
  case "CustomFormulaContext":
2665
2706
  case "any":
2666
2707
  if (t == null && r.required)
2667
- throw new Error(`${o}: Required argument is null/undefined`);
2708
+ throw new Error(`${a}: Required argument is null/undefined`);
2668
2709
  return t;
2669
2710
  default:
2670
2711
  return t;
2671
2712
  }
2672
2713
  }
2673
2714
  function M(e) {
2674
- const { data: t } = e, { dataSource: r, schemaIndex: s, pathPrefix: n } = e.context, { function: i, args: o } = t, a = n ? `${n}.` : "", u = ze(i);
2715
+ const { data: t } = e, { dataSource: r, schemaIndex: s, pathPrefix: n } = e.context, { function: i, args: a } = t, o = n ? `${n}.` : "", u = he(i);
2675
2716
  if (!u) {
2676
- const p = Object.keys(Jt), E = x(i, p, (v) => v), C = E && E.distance <= T ? ` Did you mean '${E.best}'?` : "";
2717
+ const m = Object.keys(Zt), F = x(i, m, (N) => N), O = F && F.distance <= C ? ` Did you mean '${F.best}'?` : "";
2677
2718
  throw new Error(
2678
- `${a}function: Unknown function '${i}'.${C}`
2719
+ `${o}function: Unknown function '${i}'.${O}`
2679
2720
  );
2680
2721
  }
2681
- const c = vn(i), g = Nn(i);
2682
- if (o.length < c)
2722
+ const c = Ln(i), g = Bn(i);
2723
+ if (a.length < c)
2683
2724
  throw new Error(
2684
- `${a}function: Expected at least ${c} arguments, got ${o.length}`
2725
+ `${o}function: Expected at least ${c} arguments, got ${a.length}`
2685
2726
  );
2686
- if (o.length > g)
2727
+ if (a.length > g)
2687
2728
  throw new Error(
2688
- `${a}function: Expected at most ${g} arguments, got ${o.length}`
2729
+ `${o}function: Expected at most ${g} arguments, got ${a.length}`
2689
2730
  );
2690
- const d = [], m = [];
2691
- for (let p = 0; p < Math.max(o.length, u.length); p++) {
2692
- const E = u[`${p}`], C = o[`${p}`], v = a ? `${a}args[${p}]` : `args[${p}]`;
2693
- if (C === void 0) {
2694
- E != null && E.required && m.push(`${v}: Missing required argument (expected ${E.type})`);
2731
+ const f = [], p = [];
2732
+ for (let m = 0; m < Math.max(a.length, u.length); m++) {
2733
+ const F = u[`${m}`], O = a[`${m}`], N = o ? `${o}args[${m}]` : `args[${m}]`;
2734
+ if (O === void 0) {
2735
+ F != null && F.required && p.push(`${N}: Missing required argument (expected ${F.type})`);
2695
2736
  continue;
2696
2737
  }
2697
- if (!E) {
2698
- m.push(`${v}: Unexpected argument`);
2738
+ if (!F) {
2739
+ p.push(`${N}: Unexpected argument`);
2699
2740
  continue;
2700
2741
  }
2701
2742
  try {
2702
- const W = In({
2703
- data: C,
2743
+ const V = Un({
2744
+ data: O,
2704
2745
  context: {
2705
2746
  dataSource: r,
2706
2747
  schemaIndex: s,
2707
- pathPrefix: v,
2708
- argSchema: E
2748
+ pathPrefix: N,
2749
+ argSchema: F
2709
2750
  }
2710
2751
  });
2711
- d.push(W);
2712
- } catch (W) {
2713
- const rr = W instanceof Error ? W.message : "Unknown error";
2714
- m.push(rr);
2752
+ f.push(V);
2753
+ } catch (V) {
2754
+ const ur = V instanceof Error ? V.message : "Unknown error";
2755
+ p.push(ur);
2715
2756
  }
2716
2757
  }
2717
- if (m.length > 0) {
2718
- const p = m.join("; ");
2719
- throw new Error(p);
2758
+ if (p.length > 0) {
2759
+ const m = p.join("; ");
2760
+ throw new Error(m);
2720
2761
  }
2721
- let h = d;
2722
- const b = xn(i);
2762
+ let h = f;
2763
+ const b = kn(i);
2723
2764
  if (b)
2724
2765
  try {
2725
- h = b(d, {
2766
+ h = b(f, {
2726
2767
  dataSource: r,
2727
2768
  schemaIndex: s,
2728
- pathPrefix: a
2769
+ pathPrefix: o
2729
2770
  });
2730
- } catch (p) {
2731
- const E = p instanceof Error ? p.message : "Unknown validation error";
2732
- throw new Error(E);
2771
+ } catch (m) {
2772
+ const F = m instanceof Error ? m.message : "Unknown validation error";
2773
+ throw new Error(F);
2733
2774
  }
2734
- return Zs(i, h);
2775
+ return sn(i, h);
2735
2776
  }
2736
- function Kt(e) {
2777
+ function er(e) {
2737
2778
  const { attribute: t, config: r } = e;
2738
- if (De(e) && jr(t)) {
2739
- const { granularity: s } = t, n = e.members.map((a) => s === "Years" && !isNaN(Number(a)) ? `${a}-01-01T00:00:00` : a), i = Jr(r), o = Object.keys(i).length === 0 ? void 0 : i;
2740
- return Kr(t, n, o);
2779
+ if (Me(e) && rs(t)) {
2780
+ const { granularity: s } = t, n = e.members.map((o) => s === "Years" && !isNaN(Number(o)) ? `${o}-01-01T00:00:00` : o), i = ss(r), a = Object.keys(i).length === 0 ? void 0 : i;
2781
+ return ns(t, n, a);
2741
2782
  }
2742
2783
  return e;
2743
2784
  }
2744
- function kn(e) {
2785
+ function Pn(e) {
2745
2786
  let t = [];
2746
2787
  for (const r of e)
2747
- te(r) ? t = je(r, t) : t = je([Kt(r)], t);
2788
+ H(r) ? t = Ye(r, t) : t = Ye([er(r)], t);
2748
2789
  return t != null ? t : [];
2749
2790
  }
2750
- const Bn = (e) => {
2791
+ const Wn = (e) => {
2751
2792
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context, n = [], i = [];
2752
- return t.forEach((o, a) => {
2793
+ return t.forEach((a, o) => {
2753
2794
  const u = {
2754
- path: `filters[${a}]`,
2755
- input: o
2795
+ path: `filters[${o}]`,
2796
+ input: a
2756
2797
  };
2757
2798
  try {
2758
2799
  const c = M({
2759
- data: o,
2800
+ data: a,
2760
2801
  context: { dataSource: r, schemaIndex: s, pathPrefix: "" }
2761
2802
  });
2762
- !te(c) && !fe(c) ? i.push(F(l({}, u), { message: "Invalid filter JSON" })) : n.push(c);
2803
+ !H(c) && !ge(c) ? i.push(E(l({}, u), { message: "Invalid filter JSON" })) : n.push(c);
2763
2804
  } catch (c) {
2764
2805
  const g = c instanceof Error ? c.message : "Unknown error";
2765
- i.push(F(l({}, u), { message: g }));
2806
+ i.push(E(l({}, u), { message: g }));
2766
2807
  }
2767
- }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: kn(n) };
2768
- }, se = (e) => {
2808
+ }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: Pn(n) };
2809
+ }, ie = (e) => {
2769
2810
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
2770
- return t ? Rt(t) ? Bn({
2811
+ return t ? _t(t) ? Wn({
2771
2812
  data: t,
2772
2813
  context: { dataSource: r, schemaIndex: s }
2773
2814
  }) : {
@@ -2780,27 +2821,27 @@ const Bn = (e) => {
2780
2821
  }
2781
2822
  ]
2782
2823
  } : { success: !0, data: [] };
2783
- }, Ln = (e) => {
2824
+ }, Vn = (e) => {
2784
2825
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context, n = [], i = [];
2785
- return t.forEach((o, a) => {
2826
+ return t.forEach((a, o) => {
2786
2827
  const u = {
2787
- path: `highlights[${a}]`,
2788
- input: o
2828
+ path: `highlights[${o}]`,
2829
+ input: a
2789
2830
  };
2790
2831
  try {
2791
2832
  const c = M({
2792
- data: o,
2833
+ data: a,
2793
2834
  context: { dataSource: r, schemaIndex: s, pathPrefix: "" }
2794
2835
  });
2795
- fe(c) ? n.push(Kt(c)) : i.push(F(l({}, u), { message: "Invalid filter JSON" }));
2836
+ ge(c) ? n.push(er(c)) : i.push(E(l({}, u), { message: "Invalid filter JSON" }));
2796
2837
  } catch (c) {
2797
2838
  const g = c instanceof Error ? c.message : "Unknown error";
2798
- i.push(F(l({}, u), { message: g }));
2839
+ i.push(E(l({}, u), { message: g }));
2799
2840
  }
2800
2841
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
2801
- }, me = (e) => {
2842
+ }, be = (e) => {
2802
2843
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
2803
- return t ? Rt(t) ? Ln({
2844
+ return t ? _t(t) ? Vn({
2804
2845
  data: t,
2805
2846
  context: { dataSource: r, schemaIndex: s }
2806
2847
  }) : {
@@ -2813,51 +2854,51 @@ const Bn = (e) => {
2813
2854
  }
2814
2855
  ]
2815
2856
  } : { success: !0, data: [] };
2816
- }, zn = (e, t) => {
2817
- if (e && !ct(e))
2818
- return F(l({}, t), {
2857
+ }, jn = (e, t) => {
2858
+ if (e && !gt(e))
2859
+ return E(l({}, t), {
2819
2860
  message: `Invalid sort type. Expected 'sortAsc', 'sortDesc', or 'sortNone'. Got: '${e}'.`
2820
2861
  });
2821
- }, Un = (e, t, r) => {
2862
+ }, Jn = (e, t, r) => {
2822
2863
  const { dataSource: s, schemaIndex: n } = t;
2823
2864
  try {
2824
2865
  const i = M({
2825
2866
  data: e,
2826
2867
  context: { dataSource: s, schemaIndex: n, pathPrefix: "" }
2827
2868
  });
2828
- return Ie(i) ? { success: !0, data: i } : {
2869
+ return ze(i) ? { success: !0, data: i } : {
2829
2870
  success: !1,
2830
- errors: [F(l({}, r), { message: "Invalid measure JSON" })]
2871
+ errors: [E(l({}, r), { message: "Invalid measure JSON" })]
2831
2872
  };
2832
2873
  } catch (i) {
2833
- const o = i instanceof Error ? i.message : "Unknown error";
2874
+ const a = i instanceof Error ? i.message : "Unknown error";
2834
2875
  return {
2835
2876
  success: !1,
2836
- errors: [F(l({}, r), { message: o })]
2877
+ errors: [E(l({}, r), { message: a })]
2837
2878
  };
2838
2879
  }
2839
- }, _n = (e, t, r, s) => {
2880
+ }, Kn = (e, t, r, s) => {
2840
2881
  const n = M({
2841
2882
  data: e.column,
2842
2883
  context: { dataSource: t, schemaIndex: r, pathPrefix: "" }
2843
2884
  });
2844
- if (!Ie(n))
2885
+ if (!ze(n))
2845
2886
  return {
2846
2887
  style: {},
2847
- error: F(l({}, s), { message: "Invalid measure JSON" })
2888
+ error: E(l({}, s), { message: "Invalid measure JSON" })
2848
2889
  };
2849
- const i = zn(e.sortType, s);
2890
+ const i = jn(e.sortType, s);
2850
2891
  if (i) {
2851
- const a = _(e, "column");
2852
- return { measure: n, style: a, error: i };
2892
+ const o = U(e, "column");
2893
+ return { measure: n, style: o, error: i };
2853
2894
  }
2854
- const o = _(e, "column");
2855
- return { measure: n, style: o };
2856
- }, Pn = (e, t, r, s) => {
2857
- if (Vs(e))
2858
- return _n(e, t, r, s);
2859
- if (q(e)) {
2860
- const n = Un(
2895
+ const a = U(e, "column");
2896
+ return { measure: n, style: a };
2897
+ }, Gn = (e, t, r, s) => {
2898
+ if (Ut(e))
2899
+ return Kn(e, t, r, s);
2900
+ if (w(e)) {
2901
+ const n = Jn(
2861
2902
  e,
2862
2903
  { dataSource: t, schemaIndex: r },
2863
2904
  s
@@ -2865,11 +2906,11 @@ const Bn = (e) => {
2865
2906
  return n.success ? { measure: n.data } : { error: n.errors[0] };
2866
2907
  }
2867
2908
  return {
2868
- error: F(l({}, s), {
2909
+ error: E(l({}, s), {
2869
2910
  message: "Invalid measure item. Expected a function call (function/args) or object with 'column' and optional 'sortType'."
2870
2911
  })
2871
2912
  };
2872
- }, Gt = (e) => {
2913
+ }, tr = (e) => {
2873
2914
  const { data: t } = e, { dataSource: r, schemaIndex: s } = e.context;
2874
2915
  if (!t)
2875
2916
  return { success: !0, data: [] };
@@ -2885,13 +2926,13 @@ const Bn = (e) => {
2885
2926
  ]
2886
2927
  };
2887
2928
  const n = [], i = [];
2888
- return t.forEach((o, a) => {
2929
+ return t.forEach((a, o) => {
2889
2930
  const u = {
2890
- path: `measures[${a}]`,
2891
- input: o
2931
+ path: `measures[${o}]`,
2932
+ input: a
2892
2933
  };
2893
2934
  try {
2894
- const c = Pn(o, r, s, u);
2935
+ const c = Gn(a, r, s, u);
2895
2936
  if (c.error) {
2896
2937
  i.push(c.error);
2897
2938
  return;
@@ -2901,14 +2942,14 @@ const Bn = (e) => {
2901
2942
  );
2902
2943
  } catch (c) {
2903
2944
  const g = c instanceof Error ? c.message : "Unknown error";
2904
- i.push(F(l({}, u), { message: g }));
2945
+ i.push(E(l({}, u), { message: g }));
2905
2946
  }
2906
2947
  }), i.length > 0 ? { success: !1, errors: i } : { success: !0, data: n };
2907
2948
  };
2908
- function ae(e) {
2949
+ function ce(e) {
2909
2950
  return typeof e == "string" ? e : e.title;
2910
2951
  }
2911
- function Wn(e) {
2952
+ function Yn(e) {
2912
2953
  const t = {};
2913
2954
  for (const [r, s] of Object.entries(e)) {
2914
2955
  const n = {};
@@ -2916,12 +2957,12 @@ function Wn(e) {
2916
2957
  }
2917
2958
  return Object.keys(t).length > 0 ? t : void 0;
2918
2959
  }
2919
- function Yt(e) {
2960
+ function rr(e) {
2920
2961
  return typeof e == "object" && e !== null && "toJSON" in e && typeof e.toJSON == "function" ? e.toJSON() : e;
2921
2962
  }
2922
- function B(e) {
2923
- return typeof e == "string" ? e.replace(/\[\[([^\]]+)\]\]/g, "$1") : Array.isArray(e) ? e.map(B) : e !== null && typeof e == "object" ? Object.fromEntries(
2924
- Object.entries(e).map(([t, r]) => [t, B(r)])
2963
+ function L(e) {
2964
+ return typeof e == "string" ? e.replace(/\[\[([^\]]+)\]\]/g, "$1") : Array.isArray(e) ? e.map(L) : e !== null && typeof e == "object" ? Object.fromEntries(
2965
+ Object.entries(e).map(([t, r]) => [t, L(r)])
2925
2966
  ) : e;
2926
2967
  }
2927
2968
  function A(e, t, r) {
@@ -2932,21 +2973,21 @@ function A(e, t, r) {
2932
2973
  }
2933
2974
  return s.data;
2934
2975
  }
2935
- const xi = (e) => {
2936
- const { data: t } = e, { dataSource: r, tables: s } = e.context, n = re(s), i = [], o = A(
2937
- () => kt({
2976
+ const Pi = (e) => {
2977
+ const { data: t } = e, { dataSource: r, tables: s } = e.context, n = ne(s), i = [], a = A(
2978
+ () => Wt({
2938
2979
  data: t.dimensions || [],
2939
2980
  context: { dataSource: r, schemaIndex: n }
2940
2981
  }),
2941
2982
  i
2942
- ), a = A(
2943
- () => Gt({
2983
+ ), o = A(
2984
+ () => tr({
2944
2985
  data: t.measures || [],
2945
2986
  context: { dataSource: r, schemaIndex: n }
2946
2987
  }),
2947
2988
  i
2948
2989
  ), u = A(
2949
- () => se({
2990
+ () => ie({
2950
2991
  data: t.filters || [],
2951
2992
  context: { dataSource: r, schemaIndex: n }
2952
2993
  }),
@@ -2954,7 +2995,7 @@ const xi = (e) => {
2954
2995
  );
2955
2996
  let c = null;
2956
2997
  return t.highlights && (c = A(
2957
- () => me({
2998
+ () => be({
2958
2999
  data: t.highlights || [],
2959
3000
  context: { dataSource: r, schemaIndex: n }
2960
3001
  }),
@@ -2965,53 +3006,53 @@ const xi = (e) => {
2965
3006
  } : {
2966
3007
  success: !0,
2967
3008
  data: l({
2968
- dataSource: le(r),
2969
- dimensions: o ? Gr(o) : [],
2970
- measures: a ? Yr(a) : [],
3009
+ dataSource: me(r),
3010
+ dimensions: a ? is(a) : [],
3011
+ measures: o ? as(o) : [],
2971
3012
  filters: u || []
2972
3013
  }, c && { highlights: c })
2973
3014
  };
2974
3015
  };
2975
- function Ze(e) {
3016
+ function st(e) {
2976
3017
  return typeof e == "object" && e !== null && "column" in e && e.column !== void 0;
2977
3018
  }
2978
- function Ue(e) {
3019
+ function Ve(e) {
2979
3020
  const t = [], r = [];
2980
3021
  return e.forEach((s, n) => {
2981
- var d, m, h;
2982
- const i = Ze(s) ? s.column : s, o = Ze(s) ? s : void 0, a = () => Yt(i);
3022
+ var f, p, h;
3023
+ const i = st(s) ? s.column : s, a = st(s) ? s : void 0, o = () => rr(i);
2983
3024
  if (!i.composeCode) {
2984
3025
  r.push({
2985
3026
  path: `dimensions[${n}]`,
2986
- input: a(),
3027
+ input: o(),
2987
3028
  message: `Dimension at index ${n} (${i.name || "unnamed"}) is missing composeCode`
2988
3029
  });
2989
3030
  return;
2990
3031
  }
2991
- if (!i.composeCode.startsWith(w)) {
3032
+ if (!i.composeCode.startsWith(T)) {
2992
3033
  r.push({
2993
3034
  path: `dimensions[${n}]`,
2994
- input: a(),
2995
- message: `Expected composeCode to start with '${w}' for dimension at index ${n} (${i.name || "unnamed"}). Got: '${i.composeCode}'`
3035
+ input: o(),
3036
+ message: `Expected composeCode to start with '${T}' for dimension at index ${n} (${i.name || "unnamed"}). Got: '${i.composeCode}'`
2996
3037
  });
2997
3038
  return;
2998
3039
  }
2999
- const u = (h = o != null && o.sortType ? lt(o.sortType) : void 0) != null ? h : ((d = i.getSort) == null ? void 0 : d.call(i)) !== void 0 && ((m = i.getSort) == null ? void 0 : m.call(i)) !== U.None ? i.getSort() : void 0, c = o ? _(o, "column") : {};
3000
- if (u !== void 0 && u !== U.None || o && Object.keys(c).length > 0) {
3040
+ const u = (h = a != null && a.sortType ? yt(a.sortType) : void 0) != null ? h : ((f = i.getSort) == null ? void 0 : f.call(i)) !== void 0 && ((p = i.getSort) == null ? void 0 : p.call(i)) !== z.None ? i.getSort() : void 0, c = a ? U(a, "column") : {};
3041
+ if (u !== void 0 && u !== z.None || a && Object.keys(c).length > 0) {
3001
3042
  const b = l(l({
3002
3043
  column: i.composeCode
3003
- }, u !== void 0 && u !== U.None && { sortType: dt(u) }), c);
3044
+ }, u !== void 0 && u !== z.None && { sortType: ht(u) }), c);
3004
3045
  t.push(b);
3005
3046
  } else
3006
3047
  t.push(i.composeCode);
3007
3048
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3008
3049
  }
3009
- const qe = "Unknown error";
3010
- function ne(e) {
3050
+ const xe = "Unknown error";
3051
+ function ae(e) {
3011
3052
  if (!e)
3012
3053
  return { success: !0, data: [] };
3013
3054
  const t = [];
3014
- if (Hr(e)) {
3055
+ if (os(e)) {
3015
3056
  if (!e.composeCode)
3016
3057
  return {
3017
3058
  success: !1,
@@ -3024,9 +3065,9 @@ function ne(e) {
3024
3065
  ]
3025
3066
  };
3026
3067
  try {
3027
- return { success: !0, data: [J(e.composeCode)] };
3068
+ return { success: !0, data: [K(e.composeCode)] };
3028
3069
  } catch (s) {
3029
- const n = s instanceof Error ? s.message : qe;
3070
+ const n = s instanceof Error ? s.message : xe;
3030
3071
  return {
3031
3072
  success: !1,
3032
3073
  errors: [
@@ -3051,19 +3092,19 @@ function ne(e) {
3051
3092
  return;
3052
3093
  }
3053
3094
  try {
3054
- const o = J(s.composeCode);
3055
- r.push(o);
3056
- } catch (o) {
3057
- const a = o instanceof Error ? o.message : qe;
3095
+ const a = K(s.composeCode);
3096
+ r.push(a);
3097
+ } catch (a) {
3098
+ const o = a instanceof Error ? a.message : xe;
3058
3099
  t.push({
3059
3100
  path: `filters[${n}]`,
3060
3101
  input: s,
3061
- message: `Failed to parse composeCode for filter at index ${n}: ${a}. ComposeCode: '${s.composeCode}'`
3102
+ message: `Failed to parse composeCode for filter at index ${n}: ${o}. ComposeCode: '${s.composeCode}'`
3062
3103
  });
3063
3104
  }
3064
3105
  }), t.length > 0 ? { success: !1, errors: t } : { success: !0, data: r };
3065
3106
  }
3066
- function ge(e) {
3107
+ function Fe(e) {
3067
3108
  if (!e)
3068
3109
  return { success: !0, data: [] };
3069
3110
  const t = [], r = [];
@@ -3078,130 +3119,130 @@ function ge(e) {
3078
3119
  return;
3079
3120
  }
3080
3121
  try {
3081
- const o = J(s.composeCode);
3082
- t.push(o);
3083
- } catch (o) {
3084
- const a = o instanceof Error ? o.message : qe;
3122
+ const a = K(s.composeCode);
3123
+ t.push(a);
3124
+ } catch (a) {
3125
+ const o = a instanceof Error ? a.message : xe;
3085
3126
  r.push({
3086
3127
  path: `highlights[${n}]`,
3087
3128
  input: s,
3088
- message: `Failed to parse composeCode for highlight filter at index ${n}: ${a}. ComposeCode: '${s.composeCode}'`
3129
+ message: `Failed to parse composeCode for highlight filter at index ${n}: ${o}. ComposeCode: '${s.composeCode}'`
3089
3130
  });
3090
3131
  }
3091
3132
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3092
3133
  }
3093
- function et(e) {
3134
+ function nt(e) {
3094
3135
  return typeof e == "object" && e !== null && "column" in e && e.column !== void 0;
3095
3136
  }
3096
- function _e(e) {
3137
+ function je(e) {
3097
3138
  const t = [], r = [];
3098
3139
  return e.forEach((s, n) => {
3099
3140
  var u, c, g;
3100
- const i = et(s) ? s.column : s, o = et(s) ? s : void 0, a = () => Yt(i);
3141
+ const i = nt(s) ? s.column : s, a = nt(s) ? s : void 0, o = () => rr(i);
3101
3142
  if (!i.composeCode) {
3102
3143
  r.push({
3103
3144
  path: `measures[${n}]`,
3104
- input: a(),
3145
+ input: o(),
3105
3146
  message: `Measure at index ${n} (${i.name || "unnamed"}) is missing composeCode`
3106
3147
  });
3107
3148
  return;
3108
3149
  }
3109
3150
  try {
3110
- const d = J(i.composeCode), m = (g = o != null && o.sortType ? lt(o.sortType) : void 0) != null ? g : ((u = i.getSort) == null ? void 0 : u.call(i)) !== void 0 && ((c = i.getSort) == null ? void 0 : c.call(i)) !== U.None ? i.getSort() : void 0;
3111
- if (m !== void 0 && m !== U.None || o && Object.keys(_(o, "column")).length > 0) {
3112
- const b = o ? _(o, "column") : {}, p = l(l({
3113
- column: d
3114
- }, m !== void 0 && m !== U.None && { sortType: dt(m) }), b);
3115
- t.push(p);
3151
+ const f = K(i.composeCode), p = (g = a != null && a.sortType ? yt(a.sortType) : void 0) != null ? g : ((u = i.getSort) == null ? void 0 : u.call(i)) !== void 0 && ((c = i.getSort) == null ? void 0 : c.call(i)) !== z.None ? i.getSort() : void 0;
3152
+ if (p !== void 0 && p !== z.None || a && Object.keys(U(a, "column")).length > 0) {
3153
+ const b = a ? U(a, "column") : {}, m = l(l({
3154
+ column: f
3155
+ }, p !== void 0 && p !== z.None && { sortType: ht(p) }), b);
3156
+ t.push(m);
3116
3157
  } else
3117
- t.push(d);
3118
- } catch (d) {
3119
- const m = d instanceof Error ? d.message : "Unknown error";
3158
+ t.push(f);
3159
+ } catch (f) {
3160
+ const p = f instanceof Error ? f.message : "Unknown error";
3120
3161
  r.push({
3121
3162
  path: `measures[${n}]`,
3122
- input: a(),
3123
- message: `Failed to parse composeCode for measure at index ${n} (${i.name || "unnamed"}): ${m}. ComposeCode: '${i.composeCode}'`
3163
+ input: o(),
3164
+ message: `Failed to parse composeCode for measure at index ${n} (${i.name || "unnamed"}): ${p}. ComposeCode: '${i.composeCode}'`
3124
3165
  });
3125
3166
  }
3126
3167
  }), r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3127
3168
  }
3128
- function tt(e) {
3169
+ function it(e) {
3129
3170
  var t, r, s, n;
3130
- return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.trend")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(ft)) != null ? n : !1);
3171
+ return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.trend")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(bt)) != null ? n : !1);
3131
3172
  }
3132
- function rt(e) {
3173
+ function at(e) {
3133
3174
  var t, r, s, n;
3134
- return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.forecast")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(pt)) != null ? n : !1);
3175
+ return ((r = (t = e.composeCode) == null ? void 0 : t.includes("measureFactory.forecast")) != null ? r : !1) || ((n = (s = e.name) == null ? void 0 : s.startsWith(Ft)) != null ? n : !1);
3135
3176
  }
3136
- function st(e) {
3177
+ function ot(e) {
3137
3178
  try {
3138
- const t = J(e.trim());
3179
+ const t = K(e.trim());
3139
3180
  return t.args[2] != null && typeof t.args[2] == "object" ? t.args[2] : void 0;
3140
3181
  } catch (t) {
3141
3182
  return;
3142
3183
  }
3143
3184
  }
3144
- function Vn(e) {
3185
+ function Hn(e) {
3145
3186
  var s, n, i;
3146
3187
  if (!(e != null && e.length)) return [];
3147
3188
  const t = /* @__PURE__ */ new Set(), r = [];
3148
- for (let o = 0; o < e.length; o++) {
3149
- if (t.has(o)) continue;
3150
- const a = e[o];
3151
- if (tt(a) || rt(a)) {
3152
- r.push(a);
3189
+ for (let a = 0; a < e.length; a++) {
3190
+ if (t.has(a)) continue;
3191
+ const o = e[a];
3192
+ if (it(o) || at(o)) {
3193
+ r.push(o);
3153
3194
  continue;
3154
3195
  }
3155
- const u = (s = a.name) != null ? s : "Measure", c = `${ft}_${u}`, g = `${pt}_${u}`;
3156
- let d, m, h = o + 1;
3157
- if (h < e.length && !t.has(h) && tt(e[h]) && e[h].name === c) {
3196
+ const u = (s = o.name) != null ? s : "Measure", c = `${bt}_${u}`, g = `${Ft}_${u}`;
3197
+ let f, p, h = a + 1;
3198
+ if (h < e.length && !t.has(h) && it(e[h]) && e[h].name === c) {
3158
3199
  const b = (n = e[h].composeCode) == null ? void 0 : n.trim();
3159
- b && (d = st(b), t.add(h), h++);
3200
+ b && (f = ot(b), t.add(h), h++);
3160
3201
  }
3161
- if (h < e.length && !t.has(h) && rt(e[h]) && e[h].name === g) {
3202
+ if (h < e.length && !t.has(h) && at(e[h]) && e[h].name === g) {
3162
3203
  const b = (i = e[h].composeCode) == null ? void 0 : i.trim();
3163
- b && (m = st(b), t.add(h));
3204
+ b && (p = ot(b), t.add(h));
3164
3205
  }
3165
- d !== void 0 || m !== void 0 ? r.push(l(l({
3166
- column: a
3167
- }, d && Object.keys(d).length > 0 && { trend: d }), m && Object.keys(m).length > 0 && { forecast: m })) : r.push(a);
3206
+ f !== void 0 || p !== void 0 ? r.push(l(l({
3207
+ column: o
3208
+ }, f && Object.keys(f).length > 0 && { trend: f }), p && Object.keys(p).length > 0 && { forecast: p })) : r.push(o);
3168
3209
  }
3169
3210
  return r;
3170
3211
  }
3171
- function vi(e) {
3212
+ function Wi(e) {
3172
3213
  const t = [], r = A(
3173
- () => Ue(e.dimensions || []),
3214
+ () => Ve(e.dimensions || []),
3174
3215
  t
3175
- ), s = Vn(e.measures || []), n = A(
3176
- () => _e(s),
3216
+ ), s = Hn(e.measures || []), n = A(
3217
+ () => je(s),
3177
3218
  t
3178
3219
  ), i = A(
3179
- () => ne(e.filters),
3220
+ () => ae(e.filters),
3180
3221
  t
3181
3222
  );
3182
- let o = null;
3183
- if (e.highlights && e.highlights.length > 0 && (o = A(
3184
- () => ge(e.highlights),
3223
+ let a = null;
3224
+ if (e.highlights && e.highlights.length > 0 && (a = A(
3225
+ () => Fe(e.highlights),
3185
3226
  t
3186
3227
  )), t.length > 0)
3187
3228
  return {
3188
3229
  success: !1,
3189
3230
  errors: t
3190
3231
  };
3191
- const a = l({
3232
+ const o = l({
3192
3233
  dimensions: r || [],
3193
3234
  measures: n || [],
3194
3235
  filters: i || []
3195
- }, o && { highlights: o });
3236
+ }, a && { highlights: a });
3196
3237
  return {
3197
3238
  success: !0,
3198
3239
  // Strip [[delimiters]] from all strings to preserve original names with spaces
3199
- data: B(a)
3240
+ data: L(o)
3200
3241
  };
3201
3242
  }
3202
- const Ht = new Set(
3203
- Qr.filter((e) => e !== "image")
3204
- ), nt = Object.freeze([...Ht]), Ae = /* @__PURE__ */ new Set([
3243
+ const sr = new Set(
3244
+ us.filter((e) => e !== "image")
3245
+ ), ut = Object.freeze([...sr]), Ce = /* @__PURE__ */ new Set([
3205
3246
  "category",
3206
3247
  "value",
3207
3248
  "breakBy",
@@ -3224,7 +3265,7 @@ const Ht = new Set(
3224
3265
  "min",
3225
3266
  "max",
3226
3267
  "seriesToColorMap"
3227
- ]), jn = {
3268
+ ]), Qn = {
3228
3269
  line: {
3229
3270
  validAxes: /* @__PURE__ */ new Set(["category", "value", "breakBy", "seriesToColorMap"]),
3230
3271
  requiredAxes: ["category", "value"]
@@ -3297,7 +3338,7 @@ const Ht = new Set(
3297
3338
  validAxes: /* @__PURE__ */ new Set(["category", "value", "breakBy", "seriesToColorMap"]),
3298
3339
  requiredAxes: ["category", "value"]
3299
3340
  }
3300
- }, Jn = /* @__PURE__ */ new Set([
3341
+ }, Xn = /* @__PURE__ */ new Set([
3301
3342
  "category",
3302
3343
  "breakBy",
3303
3344
  "breakByPoint",
@@ -3305,7 +3346,7 @@ const Ht = new Set(
3305
3346
  "geo",
3306
3347
  "details",
3307
3348
  "date"
3308
- ]), Kn = /* @__PURE__ */ new Set([
3349
+ ]), Zn = /* @__PURE__ */ new Set([
3309
3350
  "value",
3310
3351
  "size",
3311
3352
  "colorBy",
@@ -3317,34 +3358,34 @@ const Ht = new Set(
3317
3358
  "max",
3318
3359
  "color"
3319
3360
  ]);
3320
- function Gn(e) {
3321
- const t = jn[e];
3361
+ function ei(e) {
3362
+ const t = Qn[e];
3322
3363
  if (t)
3323
3364
  return {
3324
3365
  validAxes: new Set(t.validAxes),
3325
3366
  requiredAxes: Object.freeze([...t.requiredAxes])
3326
3367
  };
3327
3368
  }
3328
- function Qt(e) {
3329
- return typeof e == "string" && Ht.has(e);
3369
+ function nr(e) {
3370
+ return typeof e == "string" && sr.has(e);
3330
3371
  }
3331
- function Yn(e, t, r) {
3332
- if (r === "boxplot" && e === "value" || r === "calendar-heatmap" && e === "date" || Jn.has(e))
3372
+ function ti(e, t, r) {
3373
+ if (r === "boxplot" && e === "value" || r === "calendar-heatmap" && e === "date" || Xn.has(e))
3333
3374
  return !0;
3334
- if (Kn.has(e))
3375
+ if (Zn.has(e))
3335
3376
  return !1;
3336
3377
  const s = Array.isArray(t) ? t[0] : t;
3337
3378
  if (!s)
3338
3379
  return !0;
3339
3380
  let n;
3340
- return O(s) && "column" in s && (n = s.column), !(q(s) || n !== void 0 && q(n));
3381
+ return q(s) && "column" in s && (n = s.column), !(w(s) || n !== void 0 && w(n));
3341
3382
  }
3342
- function Hn(e) {
3383
+ function ri(e) {
3343
3384
  const t = [], r = {
3344
3385
  chartType: "",
3345
3386
  dataOptions: {}
3346
3387
  };
3347
- if (!O(e))
3388
+ if (!q(e))
3348
3389
  return t.push({
3349
3390
  path: "chartType",
3350
3391
  input: e,
@@ -3352,29 +3393,29 @@ function Hn(e) {
3352
3393
  }), { normalized: r, errors: t };
3353
3394
  const s = e.chartType;
3354
3395
  if (s === void 0) {
3355
- const i = Object.keys(e), o = x("chartType", i, (c) => c), a = o && o.distance <= T ? ` Did you mean 'chartType'? (You may have typed '${o.best}')` : "", u = o && o.distance <= T ? { [o.best]: e[o.best] } : e;
3396
+ const i = Object.keys(e), a = x("chartType", i, (c) => c), o = a && a.distance <= C ? ` Did you mean 'chartType'? (You may have typed '${a.best}')` : "", u = a && a.distance <= C ? { [a.best]: e[a.best] } : e;
3356
3397
  t.push({
3357
3398
  path: "chartType",
3358
3399
  input: u,
3359
- message: `chartType is required.${a}`
3400
+ message: `chartType is required.${o}`
3360
3401
  });
3361
- } else if (Qt(s))
3402
+ } else if (nr(s))
3362
3403
  r.chartType = s;
3363
3404
  else {
3364
- const i = x(String(s), nt, (u) => u), o = i && i.distance <= T ? ` Did you mean '${i.best}'?` : "", a = nt.slice(0, 8).join(", ");
3405
+ const i = x(String(s), ut, (u) => u), a = i && i.distance <= C ? ` Did you mean '${i.best}'?` : "", o = ut.slice(0, 8).join(", ");
3365
3406
  t.push({
3366
3407
  path: "chartType",
3367
3408
  input: s,
3368
- message: `Invalid chartType '${s}'. Valid types: ${a}, ...${o}`
3409
+ message: `Invalid chartType '${s}'. Valid types: ${o}, ...${a}`
3369
3410
  });
3370
3411
  }
3371
3412
  const n = e.dataOptions;
3372
3413
  if (n === void 0) {
3373
- const i = Object.keys(e), o = x("dataOptions", i, (c) => c), a = o && o.distance <= T ? ` Did you mean 'dataOptions'? (You may have typed '${o.best}')` : "", u = o && o.distance <= T ? { [o.best]: e[o.best] } : e;
3414
+ const i = Object.keys(e), a = x("dataOptions", i, (c) => c), o = a && a.distance <= C ? ` Did you mean 'dataOptions'? (You may have typed '${a.best}')` : "", u = a && a.distance <= C ? { [a.best]: e[a.best] } : e;
3374
3415
  t.push({
3375
3416
  path: "dataOptions",
3376
3417
  input: u,
3377
- message: `dataOptions is required.${a}`
3418
+ message: `dataOptions is required.${o}`
3378
3419
  });
3379
3420
  } else n !== null && typeof n == "object" && (r.dataOptions = n);
3380
3421
  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 };
@@ -3382,149 +3423,156 @@ function Hn(e) {
3382
3423
  function D(e, t) {
3383
3424
  return e === -1 ? "dataOptions" : typeof e == "number" ? `dataOptions[${e}]` : t !== void 0 ? `dataOptions.${e}[${t}]` : `dataOptions.${e}`;
3384
3425
  }
3385
- function Xt(e, t) {
3426
+ function ir(e, t) {
3386
3427
  return e ? t ? `${e}.${t}` : e : t != null ? t : "";
3387
3428
  }
3388
- function Qn(e) {
3389
- return (t) => F(l({}, t), {
3390
- path: Xt(e, t.path)
3429
+ function si(e) {
3430
+ return (t) => E(l({}, t), {
3431
+ path: ir(e, t.path)
3391
3432
  });
3392
3433
  }
3393
- function Zt(e) {
3394
- return Qn(`widgets[${e}]`);
3434
+ function ar(e) {
3435
+ return si(`widgets[${e}]`);
3395
3436
  }
3396
- function er(e, t) {
3437
+ function or(e, t) {
3397
3438
  return e.map(t);
3398
3439
  }
3399
- function Xn(e) {
3440
+ function ni(e) {
3400
3441
  return e.map(
3401
3442
  ({ attribute: t, style: r }) => r ? l({ column: t }, r) : t
3402
3443
  );
3403
3444
  }
3404
- function Zn(e) {
3445
+ function ii(e) {
3405
3446
  return e.map(
3406
3447
  ({ measure: t, style: r }) => r ? l({ column: t }, r) : t
3407
3448
  );
3408
3449
  }
3409
- function tr(e) {
3450
+ function ai(e) {
3451
+ return Array.isArray(e) ? e : [e];
3452
+ }
3453
+ function oi(e) {
3454
+ return Array.isArray(e) ? e : [e];
3455
+ }
3456
+ function ui(e) {
3410
3457
  return Array.isArray(e) ? e : [e];
3411
3458
  }
3412
- const ei = /^(dimensions|measures|filters|highlights)(\[\d+\])?$/;
3413
- function $e(e) {
3459
+ const ci = /^(dimensions|measures|filters|highlights)(\[\d+\])?$/;
3460
+ function Ne(e) {
3414
3461
  return (t) => {
3415
3462
  const r = t.path.match(/\[(\d+)\]$/), s = r ? Number(r[1]) : void 0, n = D(e, s);
3416
- if (ei.test(t.path) || t.path.startsWith("dataOptions"))
3417
- return F(l({}, t), { path: n });
3463
+ if (ci.test(t.path) || t.path.startsWith("dataOptions"))
3464
+ return E(l({}, t), { path: n });
3418
3465
  const i = t.path.replace(/\[\d+\]$/, "");
3419
- return F(l({}, t), {
3420
- path: Xt(i, n)
3466
+ return E(l({}, t), {
3467
+ path: ir(i, n)
3421
3468
  });
3422
3469
  };
3423
3470
  }
3424
- function ce(e, t, r, s, n) {
3425
- const i = t ? tr(
3426
- t
3427
- ) : [];
3428
- if (i.length === 0)
3429
- return [];
3471
+ function fe(e, t, r, s, n) {
3430
3472
  if (r === "dimension") {
3431
- const a = A(
3432
- () => kt({
3433
- data: i,
3473
+ const o = t ? ai(t) : [];
3474
+ if (o.length === 0)
3475
+ return [];
3476
+ const u = A(
3477
+ () => Wt({
3478
+ data: o,
3434
3479
  context: s
3435
3480
  }),
3436
3481
  n,
3437
- $e(e)
3482
+ Ne(e)
3438
3483
  );
3439
- return a !== null ? Xn(a) : null;
3484
+ return u !== null ? ni(u) : null;
3440
3485
  }
3441
- const o = A(
3442
- () => Gt({
3486
+ const i = t ? oi(t) : [];
3487
+ if (i.length === 0)
3488
+ return [];
3489
+ const a = A(
3490
+ () => tr({
3443
3491
  data: i,
3444
3492
  context: s
3445
3493
  }),
3446
3494
  n,
3447
- $e(e)
3495
+ Ne(e)
3448
3496
  );
3449
- return o !== null ? Zn(o) : null;
3497
+ return a !== null ? ii(a) : null;
3450
3498
  }
3451
- const it = (e, t) => {
3499
+ const ct = (e, t) => {
3452
3500
  const r = t.path.match(/\[(\d+)\]$/), s = r ? Number(r[1]) : void 0;
3453
- return F(l({}, t), { path: D(e, s) });
3501
+ return E(l({}, t), { path: D(e, s) });
3454
3502
  };
3455
- function ot(e, t, r) {
3503
+ function lt(e, t, r) {
3456
3504
  const s = Array.isArray(t) ? t : t != null ? [t] : [];
3457
3505
  if (r === "dimension") {
3458
- const i = Ue(
3506
+ const i = Ve(
3459
3507
  s
3460
3508
  );
3461
3509
  return i.success ? { success: !0, data: i.data } : {
3462
3510
  success: !1,
3463
- errors: i.errors.map((o) => it(e, o))
3511
+ errors: i.errors.map((a) => ct(e, a))
3464
3512
  };
3465
3513
  }
3466
- const n = _e(s);
3514
+ const n = je(s);
3467
3515
  return n.success ? { success: !0, data: n.data } : {
3468
3516
  success: !1,
3469
- errors: n.errors.map((i) => it(e, i))
3517
+ errors: n.errors.map((i) => ct(e, i))
3470
3518
  };
3471
3519
  }
3472
- function ti(e, t) {
3520
+ function li(e, t) {
3473
3521
  let r;
3474
- O(e) && "column" in e && (r = e.column);
3475
- const n = !(q(e) || r !== void 0 && q(r)) ? "dimension" : "measure", i = [], o = ce("columns", [e], n, t, i);
3476
- return o !== null ? { success: !0, data: o } : { success: !1, errors: i };
3522
+ q(e) && "column" in e && (r = e.column);
3523
+ const n = !(w(e) || r !== void 0 && w(r)) ? "dimension" : "measure", i = [], a = fe("columns", [e], n, t, i);
3524
+ return a !== null ? { success: !0, data: a } : { success: !1, errors: i };
3477
3525
  }
3478
- function ri(e, t, r, s) {
3526
+ function fi(e, t, r, s) {
3479
3527
  const n = [];
3480
3528
  for (const i of e) {
3481
- const o = A(
3482
- () => ti(i, t),
3529
+ const a = A(
3530
+ () => li(i, t),
3483
3531
  r,
3484
3532
  s
3485
3533
  );
3486
- o && n.push(...o);
3534
+ a && n.push(...a);
3487
3535
  }
3488
3536
  return n;
3489
3537
  }
3490
- function si(e, t, r) {
3491
- if (!e || !O(e))
3538
+ function di(e, t, r) {
3539
+ if (!e || !q(e))
3492
3540
  return r.push({
3493
3541
  path: D(-1),
3494
3542
  input: e,
3495
3543
  message: "dataOptions is required"
3496
3544
  }), null;
3497
- const s = {}, { chartType: n } = t, i = r.length, o = e, a = Object.keys(e), u = /* @__PURE__ */ new Map();
3498
- for (const d of a)
3499
- if (!Ae.has(d)) {
3500
- const m = x(d, [...Ae], (b) => b), h = m && m.distance <= T ? ` Did you mean '${m.best}'?` : "";
3501
- m && m.distance <= T && u.set(d, m.best), r.push({
3502
- path: D(d),
3503
- input: o[d],
3504
- message: `Unknown dataOptions key '${d}'.${h}`
3545
+ const s = {}, { chartType: n } = t, i = r.length, a = e, o = Object.keys(e), u = /* @__PURE__ */ new Map();
3546
+ for (const f of o)
3547
+ if (!Ce.has(f)) {
3548
+ const p = x(f, [...Ce], (b) => b), h = p && p.distance <= C ? ` Did you mean '${p.best}'?` : "";
3549
+ p && p.distance <= C && u.set(f, p.best), r.push({
3550
+ path: D(f),
3551
+ input: a[f],
3552
+ message: `Unknown dataOptions key '${f}'.${h}`
3505
3553
  });
3506
3554
  }
3507
- const c = n ? Gn(n) : void 0;
3555
+ const c = n ? ei(n) : void 0;
3508
3556
  if (c) {
3509
- for (const d of a)
3510
- if (d !== "seriesToColorMap" && !c.validAxes.has(d) && Ae.has(d)) {
3511
- const m = x(d, [...c.validAxes], (p) => p), h = m && m.distance <= T ? ` Did you mean '${m.best}'?` : "", b = [...c.validAxes].join(", ");
3557
+ for (const f of o)
3558
+ if (f !== "seriesToColorMap" && !c.validAxes.has(f) && Ce.has(f)) {
3559
+ const p = x(f, [...c.validAxes], (m) => m), h = p && p.distance <= C ? ` Did you mean '${p.best}'?` : "", b = [...c.validAxes].join(", ");
3512
3560
  r.push({
3513
- path: D(d),
3514
- input: o[d],
3515
- message: `Axis '${d}' is not valid for chart type '${n}'. Valid axes: ${b}.${h}`
3561
+ path: D(f),
3562
+ input: a[f],
3563
+ message: `Axis '${f}' is not valid for chart type '${n}'. Valid axes: ${b}.${h}`
3516
3564
  });
3517
3565
  }
3518
- for (const d of c.requiredAxes)
3519
- [...u.values()].includes(d) || (!(d in o) || o[d] == null) && r.push({
3520
- path: D(d),
3566
+ for (const f of c.requiredAxes)
3567
+ [...u.values()].includes(f) || (!(f in a) || a[f] == null) && r.push({
3568
+ path: D(f),
3521
3569
  input: null,
3522
3570
  message: `Chart type '${n}' requires '${c.requiredAxes.join(
3523
3571
  "' and '"
3524
- )}'. Missing: ${d}.`
3572
+ )}'. Missing: ${f}.`
3525
3573
  });
3526
3574
  n === "indicator" && (["value", "secondary", "min", "max"].some(
3527
- (h) => h in o && o[h] != null
3575
+ (h) => h in a && a[h] != null
3528
3576
  ) || r.push({
3529
3577
  path: D(-1),
3530
3578
  input: e,
@@ -3538,66 +3586,66 @@ function si(e, t, r) {
3538
3586
  if (r.length > i)
3539
3587
  return null;
3540
3588
  const g = Object.entries(e);
3541
- for (const [d, m] of g) {
3542
- if (!m) continue;
3543
- if (d === "seriesToColorMap") {
3544
- s[d] = m;
3589
+ for (const [f, p] of g) {
3590
+ if (!p) continue;
3591
+ if (f === "seriesToColorMap") {
3592
+ s[f] = p;
3545
3593
  continue;
3546
3594
  }
3547
- if (d === "columns") {
3548
- s[d] = ri(
3549
- tr(m),
3595
+ if (f === "columns") {
3596
+ s[f] = fi(
3597
+ ui(p),
3550
3598
  t,
3551
3599
  r,
3552
- $e("columns")
3600
+ Ne("columns")
3553
3601
  );
3554
3602
  continue;
3555
3603
  }
3556
- const h = Yn(d, m, n) ? "dimension" : "measure", b = ce(
3557
- d,
3558
- m,
3604
+ const h = ti(f, p, n) ? "dimension" : "measure", b = fe(
3605
+ f,
3606
+ p,
3559
3607
  h,
3560
3608
  t,
3561
3609
  r
3562
3610
  );
3563
3611
  if (b !== null) {
3564
- const p = n === "calendar-heatmap" && d === "value";
3565
- s[d] = p || !Array.isArray(m) ? b[0] : b;
3612
+ const m = n === "calendar-heatmap" && f === "value";
3613
+ s[f] = m || !Array.isArray(p) ? b[0] : b;
3566
3614
  }
3567
3615
  }
3568
3616
  return r.length > i ? null : s;
3569
3617
  }
3570
- function ni(e) {
3618
+ function mi(e) {
3571
3619
  if (typeof e != "string") return "iqr";
3572
3620
  const t = e.split("/")[1];
3573
3621
  return t === "iqr" || t === "extremums" || t === "standardDeviation" ? t : "iqr";
3574
3622
  }
3575
- const ii = (e) => {
3576
- var p;
3577
- const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = Hn(t);
3578
- if (o.length > 0)
3579
- return { success: !1, errors: o };
3580
- const a = i.chartType, u = re(n), c = [];
3581
- let g = si(
3623
+ const pi = (e) => {
3624
+ var m;
3625
+ const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: a } = ri(t);
3626
+ if (a.length > 0)
3627
+ return { success: !1, errors: a };
3628
+ const o = i.chartType, u = ne(n), c = [];
3629
+ let g = di(
3582
3630
  i.dataOptions,
3583
- { dataSource: s, schemaIndex: u, chartType: a },
3631
+ { dataSource: s, schemaIndex: u, chartType: o },
3584
3632
  c
3585
3633
  );
3586
- if (a === "boxplot" && g) {
3587
- const E = ni((p = i.styleOptions) == null ? void 0 : p.subtype), C = E === "iqr" || E === "standardDeviation";
3588
- g = F(l({}, g), { boxType: E, outliersEnabled: C });
3634
+ if (o === "boxplot" && g) {
3635
+ const F = mi((m = i.styleOptions) == null ? void 0 : m.subtype), O = F === "iqr" || F === "standardDeviation";
3636
+ g = E(l({}, g), { boxType: F, outliersEnabled: O });
3589
3637
  }
3590
- let d = null;
3591
- i.filters && i.filters.length > 0 && (d = A(
3592
- () => se({
3638
+ let f = null;
3639
+ i.filters && i.filters.length > 0 && (f = A(
3640
+ () => ie({
3593
3641
  data: i.filters || [],
3594
3642
  context: { dataSource: s, schemaIndex: u }
3595
3643
  }),
3596
3644
  c
3597
3645
  ));
3598
- let m = null;
3599
- if (i.highlights && i.highlights.length > 0 && (m = A(
3600
- () => me({
3646
+ let p = null;
3647
+ if (i.highlights && i.highlights.length > 0 && (p = A(
3648
+ () => be({
3601
3649
  data: i.highlights || [],
3602
3650
  context: { dataSource: s, schemaIndex: u }
3603
3651
  }),
@@ -3607,7 +3655,7 @@ const ii = (e) => {
3607
3655
  success: !1,
3608
3656
  errors: c
3609
3657
  };
3610
- if (!Qt(i.chartType))
3658
+ if (!nr(i.chartType))
3611
3659
  return {
3612
3660
  success: !1,
3613
3661
  errors: [
@@ -3622,15 +3670,15 @@ const ii = (e) => {
3622
3670
  return {
3623
3671
  success: !0,
3624
3672
  data: l(l(l({
3625
- dataSet: le(s),
3673
+ dataSet: me(s),
3626
3674
  chartType: h,
3627
3675
  dataOptions: g
3628
3676
  }, i.styleOptions && {
3629
3677
  // Pass-through NLQ JSON; shape matches ChartStyleOptions.
3630
3678
  styleOptions: i.styleOptions
3631
- }), d && { filters: d }), m && { highlights: m })
3679
+ }), f && { filters: f }), p && { highlights: p })
3632
3680
  };
3633
- }, oi = (e) => {
3681
+ }, gi = (e) => {
3634
3682
  const t = [];
3635
3683
  if (!e.chartType)
3636
3684
  return {
@@ -3655,27 +3703,27 @@ const ii = (e) => {
3655
3703
  ]
3656
3704
  };
3657
3705
  let r = null;
3658
- const s = ai(e.dataOptions);
3706
+ const s = yi(e.dataOptions);
3659
3707
  s.success ? r = s.data : t.push(...s.errors);
3660
3708
  let n;
3661
3709
  if (e.filters) {
3662
- const a = A(
3663
- () => ne(e.filters),
3710
+ const o = A(
3711
+ () => ae(e.filters),
3664
3712
  t
3665
3713
  );
3666
- n = a != null ? a : void 0;
3714
+ n = o != null ? o : void 0;
3667
3715
  }
3668
3716
  let i;
3669
3717
  if (e.highlights && e.highlights.length > 0) {
3670
- const a = A(
3671
- () => ge(e.highlights),
3718
+ const o = A(
3719
+ () => Fe(e.highlights),
3672
3720
  t
3673
3721
  );
3674
- i = a != null ? a : void 0;
3722
+ i = o != null ? o : void 0;
3675
3723
  }
3676
3724
  if (t.length > 0 || r === null)
3677
3725
  return { success: !1, errors: t };
3678
- const o = l(l(l({
3726
+ const a = l(l(l({
3679
3727
  chartType: e.chartType,
3680
3728
  dataOptions: r
3681
3729
  }, e.styleOptions && {
@@ -3683,10 +3731,10 @@ const ii = (e) => {
3683
3731
  }), n && n.length > 0 && { filters: n }), i && i.length > 0 && { highlights: i });
3684
3732
  return {
3685
3733
  success: !0,
3686
- data: B(o)
3734
+ data: L(a)
3687
3735
  };
3688
3736
  };
3689
- function ai(e) {
3737
+ function yi(e) {
3690
3738
  const t = {}, r = [], s = /* @__PURE__ */ new Set(["seriesToColorMap", "boxType", "outliersEnabled", "valueTitle"]);
3691
3739
  for (const [n, i] of Object.entries(e)) {
3692
3740
  if (n === "seriesToColorMap" && i) {
@@ -3697,16 +3745,16 @@ function ai(e) {
3697
3745
  i != null && (t[n] = i);
3698
3746
  continue;
3699
3747
  }
3700
- const o = Array.isArray(i) ? i : [i], a = Array.isArray(i), u = [], c = [];
3701
- for (let g = 0; g < o.length; g++) {
3702
- const d = o[g], h = ui(d) ? Ue([
3703
- d
3704
- ]) : _e([d]);
3748
+ const a = Array.isArray(i) ? i : [i], o = Array.isArray(i), u = [], c = [];
3749
+ for (let g = 0; g < a.length; g++) {
3750
+ const f = a[g], h = hi(f) ? Ve([
3751
+ f
3752
+ ]) : je([f]);
3705
3753
  h.success ? u.push(...h.data) : h.errors.forEach((b) => {
3706
- var p;
3707
- c.push(F(l({}, b), {
3754
+ var m;
3755
+ c.push(E(l({}, b), {
3708
3756
  path: D(n, g),
3709
- input: (p = b.input) != null ? p : d
3757
+ input: (m = b.input) != null ? m : f
3710
3758
  }));
3711
3759
  });
3712
3760
  }
@@ -3714,15 +3762,15 @@ function ai(e) {
3714
3762
  r.push(...c);
3715
3763
  continue;
3716
3764
  }
3717
- t[n] = a ? u : u[0];
3765
+ t[n] = o ? u : u[0];
3718
3766
  }
3719
3767
  return r.length > 0 ? { success: !1, errors: r } : { success: !0, data: t };
3720
3768
  }
3721
- function ui(e) {
3769
+ function hi(e) {
3722
3770
  const t = Array.isArray(e) ? e[0] : e;
3723
- if (!t || !O(t))
3771
+ if (!t || !q(t))
3724
3772
  return !0;
3725
- const r = "column" in t && t.column != null && O(t.column) ? t.column : t;
3773
+ const r = "column" in t && t.column != null && q(t.column) ? t.column : t;
3726
3774
  if ("composeCode" in r) {
3727
3775
  const s = r.composeCode;
3728
3776
  if (typeof s == "string" && s.startsWith("DM."))
@@ -3737,17 +3785,17 @@ function ui(e) {
3737
3785
  }
3738
3786
  return !("aggregation" in r || "attribute" in r && "aggregation" in r);
3739
3787
  }
3740
- const at = ["rows", "columns", "values", "grandTotals"];
3741
- function ci(e) {
3742
- if (!O(e)) return !1;
3788
+ const ft = ["rows", "columns", "values", "grandTotals"];
3789
+ function bi(e) {
3790
+ if (!q(e)) return !1;
3743
3791
  const t = Object.keys(e);
3744
3792
  return t.every((r) => r === "rows" || r === "columns") && t.every((r) => typeof e[r] == "boolean");
3745
3793
  }
3746
- function li(e) {
3794
+ function Fi(e) {
3747
3795
  const t = [], r = {
3748
3796
  dataOptions: {}
3749
3797
  };
3750
- if (!O(e))
3798
+ if (!q(e))
3751
3799
  return t.push({
3752
3800
  path: "dataOptions",
3753
3801
  input: e,
@@ -3755,34 +3803,34 @@ function li(e) {
3755
3803
  }), { normalized: r, errors: t };
3756
3804
  const s = e.dataOptions;
3757
3805
  if (s === void 0) {
3758
- const n = Object.keys(e), i = x("dataOptions", n, (u) => u), o = i && i.distance <= T ? ` Did you mean 'dataOptions'? (You may have typed '${i.best}')` : "", a = i && i.distance <= T ? { [i.best]: e[i.best] } : e;
3806
+ const n = Object.keys(e), i = x("dataOptions", n, (u) => u), a = i && i.distance <= C ? ` Did you mean 'dataOptions'? (You may have typed '${i.best}')` : "", o = i && i.distance <= C ? { [i.best]: e[i.best] } : e;
3759
3807
  t.push({
3760
3808
  path: "dataOptions",
3761
- input: a,
3762
- message: `dataOptions is required.${o}`
3809
+ input: o,
3810
+ message: `dataOptions is required.${a}`
3763
3811
  });
3764
- } else if (O(s)) {
3812
+ } else if (q(s)) {
3765
3813
  const n = s;
3766
3814
  r.dataOptions = n;
3767
- for (const o of Object.keys(n))
3768
- if (!at.includes(o)) {
3769
- const a = x(o, [...at], (c) => c), u = a && a.distance <= T ? ` Did you mean '${a.best}'?` : "";
3815
+ for (const a of Object.keys(n))
3816
+ if (!ft.includes(a)) {
3817
+ const o = x(a, [...ft], (c) => c), u = o && o.distance <= C ? ` Did you mean '${o.best}'?` : "";
3770
3818
  t.push({
3771
- path: D(o),
3772
- input: n[o],
3773
- message: `Unknown dataOptions key '${o}'. Valid keys: rows, columns, values, grandTotals.${u}`
3819
+ path: D(a),
3820
+ input: n[a],
3821
+ message: `Unknown dataOptions key '${a}'. Valid keys: rows, columns, values, grandTotals.${u}`
3774
3822
  });
3775
3823
  }
3776
- for (const o of ["rows", "columns", "values"]) {
3777
- const a = n[o];
3778
- a != null && !Array.isArray(a) && t.push({
3779
- path: D(o),
3780
- input: a,
3781
- message: `dataOptions.${o} must be an array`
3824
+ for (const a of ["rows", "columns", "values"]) {
3825
+ const o = n[a];
3826
+ o != null && !Array.isArray(o) && t.push({
3827
+ path: D(a),
3828
+ input: o,
3829
+ message: `dataOptions.${a} must be an array`
3782
3830
  });
3783
3831
  }
3784
3832
  const i = n.grandTotals;
3785
- i != null && !ci(i) && t.push({
3833
+ i != null && !bi(i) && t.push({
3786
3834
  path: D("grandTotals"),
3787
3835
  input: i,
3788
3836
  message: "grandTotals must be an object with optional rows?: boolean, columns?: boolean"
@@ -3790,7 +3838,7 @@ function li(e) {
3790
3838
  }
3791
3839
  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 };
3792
3840
  }
3793
- function di(e, t, r) {
3841
+ function Ei(e, t, r) {
3794
3842
  if (!e || typeof e != "object")
3795
3843
  return r.push({
3796
3844
  path: D(-1),
@@ -3798,17 +3846,17 @@ function di(e, t, r) {
3798
3846
  message: "dataOptions is required"
3799
3847
  }), null;
3800
3848
  const s = {}, n = r.length;
3801
- for (const o of ["rows", "columns"]) {
3802
- const a = ce(
3803
- o,
3804
- e[o],
3849
+ for (const a of ["rows", "columns"]) {
3850
+ const o = fe(
3851
+ a,
3852
+ e[a],
3805
3853
  "dimension",
3806
3854
  t,
3807
3855
  r
3808
3856
  );
3809
- a && (s[o] = a);
3857
+ o && (s[a] = o);
3810
3858
  }
3811
- const i = ce(
3859
+ const i = fe(
3812
3860
  "values",
3813
3861
  e.values,
3814
3862
  "measure",
@@ -3817,28 +3865,28 @@ function di(e, t, r) {
3817
3865
  );
3818
3866
  return i && (s.values = i), e.grandTotals !== void 0 && (s.grandTotals = e.grandTotals), r.length > n ? null : s;
3819
3867
  }
3820
- const fi = (e) => {
3821
- const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: o } = li(t);
3822
- if (o.length > 0)
3823
- return { success: !1, errors: o };
3824
- const a = re(n), u = [], c = di(
3868
+ const Ai = (e) => {
3869
+ const { data: t, context: r } = e, { dataSource: s, tables: n } = r, { normalized: i, errors: a } = Fi(t);
3870
+ if (a.length > 0)
3871
+ return { success: !1, errors: a };
3872
+ const o = ne(n), u = [], c = Ei(
3825
3873
  i.dataOptions,
3826
- { dataSource: s, schemaIndex: a },
3874
+ { dataSource: s, schemaIndex: o },
3827
3875
  u
3828
3876
  );
3829
3877
  let g = null;
3830
3878
  i.filters && i.filters.length > 0 && (g = A(
3831
- () => se({
3879
+ () => ie({
3832
3880
  data: i.filters || [],
3833
- context: { dataSource: s, schemaIndex: a }
3881
+ context: { dataSource: s, schemaIndex: o }
3834
3882
  }),
3835
3883
  u
3836
3884
  ));
3837
- let d = null;
3838
- return i.highlights && i.highlights.length > 0 && (d = A(
3839
- () => me({
3885
+ let f = null;
3886
+ return i.highlights && i.highlights.length > 0 && (f = A(
3887
+ () => be({
3840
3888
  data: i.highlights || [],
3841
- context: { dataSource: s, schemaIndex: a }
3889
+ context: { dataSource: s, schemaIndex: o }
3842
3890
  }),
3843
3891
  u
3844
3892
  )), u.length > 0 || c === null ? {
@@ -3847,11 +3895,11 @@ const fi = (e) => {
3847
3895
  } : {
3848
3896
  success: !0,
3849
3897
  data: l(l(l({
3850
- dataSet: le(s),
3898
+ dataSet: me(s),
3851
3899
  dataOptions: c
3852
- }, i.styleOptions && { styleOptions: i.styleOptions }), g && { filters: g }), d && { highlights: d })
3900
+ }, i.styleOptions && { styleOptions: i.styleOptions }), g && { filters: g }), f && { highlights: f })
3853
3901
  };
3854
- }, pi = (e) => {
3902
+ }, Ti = (e) => {
3855
3903
  const t = [];
3856
3904
  if (!e.dataOptions)
3857
3905
  return {
@@ -3868,54 +3916,54 @@ const fi = (e) => {
3868
3916
  for (const u of ["rows", "columns"]) {
3869
3917
  const c = r[u];
3870
3918
  if (c && c.length > 0) {
3871
- const g = ot(u, c, "dimension");
3919
+ const g = lt(u, c, "dimension");
3872
3920
  g.success ? s[u] = g.data : t.push(...g.errors);
3873
3921
  }
3874
3922
  }
3875
3923
  const n = r.values;
3876
3924
  if (n && n.length > 0) {
3877
- const u = ot("values", n, "measure");
3925
+ const u = lt("values", n, "measure");
3878
3926
  u.success ? s.values = u.data : t.push(...u.errors);
3879
3927
  }
3880
3928
  r.grandTotals !== void 0 && (s.grandTotals = r.grandTotals);
3881
3929
  let i;
3882
3930
  if (e.filters) {
3883
3931
  const u = A(
3884
- () => ne(e.filters),
3932
+ () => ae(e.filters),
3885
3933
  t
3886
3934
  );
3887
3935
  i = u != null ? u : void 0;
3888
3936
  }
3889
- let o;
3937
+ let a;
3890
3938
  if (e.highlights && e.highlights.length > 0) {
3891
3939
  const u = A(
3892
- () => ge(e.highlights),
3940
+ () => Fe(e.highlights),
3893
3941
  t
3894
3942
  );
3895
- o = u != null ? u : void 0;
3943
+ a = u != null ? u : void 0;
3896
3944
  }
3897
3945
  if (t.length > 0)
3898
3946
  return { success: !1, errors: t };
3899
- const a = l(l(l({
3947
+ const o = l(l(l({
3900
3948
  dataOptions: s
3901
- }, e.styleOptions && { styleOptions: e.styleOptions }), i && i.length > 0 && { filters: i }), o && o.length > 0 && { highlights: o });
3949
+ }, e.styleOptions && { styleOptions: e.styleOptions }), i && i.length > 0 && { filters: i }), a && a.length > 0 && { highlights: a });
3902
3950
  return {
3903
3951
  success: !0,
3904
- data: B(a)
3952
+ data: L(o)
3905
3953
  };
3906
- }, mi = (e, t, r) => {
3907
- const s = re(r.tables), n = { dataSource: r.dataSource, schemaIndex: s }, i = [], o = e && e.length > 0 ? A(
3908
- () => se({ data: e, context: n }),
3954
+ }, wi = (e, t, r) => {
3955
+ const s = ne(r.tables), n = { dataSource: r.dataSource, schemaIndex: s }, i = [], a = e && e.length > 0 ? A(
3956
+ () => ie({ data: e, context: n }),
3909
3957
  i
3910
- ) : void 0, a = t && t.length > 0 ? A(
3911
- () => me({ data: t, context: n }),
3958
+ ) : void 0, o = t && t.length > 0 ? A(
3959
+ () => be({ data: t, context: n }),
3912
3960
  i
3913
3961
  ) : void 0;
3914
3962
  return i.length > 0 ? { success: !1, errors: i } : {
3915
3963
  success: !0,
3916
- data: l(l({}, o != null && { filters: o }), a != null && { highlights: a })
3964
+ data: l(l({}, a != null && { filters: a }), o != null && { highlights: o })
3917
3965
  };
3918
- }, gi = [
3966
+ }, Si = [
3919
3967
  "widgetType",
3920
3968
  "id",
3921
3969
  "title",
@@ -3923,36 +3971,36 @@ const fi = (e) => {
3923
3971
  "dataSource",
3924
3972
  "config",
3925
3973
  "highlightSelectionDisabled"
3926
- ], ut = (e, t, r, s) => {
3927
- const { id: n, title: i, description: o, dataSource: a, config: u, highlightSelectionDisabled: c } = e, g = _(e, gi), d = r({ data: g, context: t });
3928
- return d.success ? {
3974
+ ], dt = (e, t, r, s) => {
3975
+ const { id: n, title: i, description: a, dataSource: o, config: u, highlightSelectionDisabled: c } = e, g = U(e, Si), f = r({ data: g, context: t });
3976
+ return f.success ? {
3929
3977
  success: !0,
3930
- data: s(d.data, {
3978
+ data: s(f.data, {
3931
3979
  id: n,
3932
3980
  title: i,
3933
- description: o,
3934
- dataSource: a,
3981
+ description: a,
3982
+ dataSource: o,
3935
3983
  config: u,
3936
3984
  highlightSelectionDisabled: c
3937
3985
  })
3938
- } : d;
3939
- }, yi = (e, t) => {
3940
- const n = e, { dataSet: r } = n, s = ye(n, ["dataSet"]);
3941
- return l(l(l(l(l(F(l({}, s), {
3986
+ } : f;
3987
+ }, Ci = (e, t) => {
3988
+ const n = e, { dataSet: r } = n, s = Ee(n, ["dataSet"]);
3989
+ return l(l(l(l(l(E(l({}, s), {
3942
3990
  widgetType: "chart",
3943
3991
  id: t.id
3944
- }), t.dataSource !== void 0 ? { dataSource: t.dataSource } : r !== void 0 && mt(r) && { dataSource: r }), t.config !== void 0 && { config: t.config }), t.highlightSelectionDisabled !== void 0 && {
3992
+ }), t.dataSource !== void 0 ? { dataSource: t.dataSource } : r !== void 0 && Et(r) && { dataSource: r }), t.config !== void 0 && { config: t.config }), t.highlightSelectionDisabled !== void 0 && {
3945
3993
  highlightSelectionDisabled: t.highlightSelectionDisabled
3946
3994
  }), t.title !== void 0 && { title: t.title }), t.description !== void 0 && { description: t.description });
3947
- }, hi = (e, t) => {
3948
- const n = e, { dataSet: r } = n, s = ye(n, ["dataSet"]);
3949
- return l(l(l(l(F(l({}, s), {
3995
+ }, Oi = (e, t) => {
3996
+ const n = e, { dataSet: r } = n, s = Ee(n, ["dataSet"]);
3997
+ return l(l(l(l(E(l({}, s), {
3950
3998
  widgetType: "pivot",
3951
3999
  id: t.id
3952
- }), t.dataSource !== void 0 ? { dataSource: t.dataSource } : r !== void 0 && mt(r) && { dataSource: r }), t.config !== void 0 && { config: t.config }), t.title !== void 0 && { title: t.title }), t.description !== void 0 && { description: t.description });
3953
- }, Oe = ["chart", "pivot", "text", "custom"], bi = (e) => typeof e == "string" && Oe.includes(e);
3954
- function Ei(e) {
3955
- if (!O(e))
4000
+ }), t.dataSource !== void 0 ? { dataSource: t.dataSource } : r !== void 0 && Et(r) && { dataSource: r }), t.config !== void 0 && { config: t.config }), t.title !== void 0 && { title: t.title }), t.description !== void 0 && { description: t.description });
4001
+ }, ve = ["chart", "pivot", "text", "custom"], $i = (e) => typeof e == "string" && ve.includes(e);
4002
+ function qi(e) {
4003
+ if (!q(e))
3956
4004
  return {
3957
4005
  path: "widgetType",
3958
4006
  input: e,
@@ -3960,15 +4008,15 @@ function Ei(e) {
3960
4008
  };
3961
4009
  const t = e.widgetType;
3962
4010
  if (t === void 0) {
3963
- const r = Object.keys(e), s = x("widgetType", r, (o) => o), n = s && s.distance <= T ? ` Did you mean 'widgetType'? (You may have typed '${s.best}')` : "";
4011
+ const r = Object.keys(e), s = x("widgetType", r, (a) => a), n = s && s.distance <= C ? ` Did you mean 'widgetType'? (You may have typed '${s.best}')` : "";
3964
4012
  return {
3965
4013
  path: "widgetType",
3966
- input: s && s.distance <= T ? { [s.best]: e[s.best] } : e,
4014
+ input: s && s.distance <= C ? { [s.best]: e[s.best] } : e,
3967
4015
  message: `widgetType is required.${n}`
3968
4016
  };
3969
4017
  }
3970
- if (!bi(t)) {
3971
- const r = x(String(t), Oe, (i) => i), s = r && r.distance <= T ? ` Did you mean '${r.best}'?` : "", n = Oe.join(", ");
4018
+ if (!$i(t)) {
4019
+ const r = x(String(t), ve, (i) => i), s = r && r.distance <= C ? ` Did you mean '${r.best}'?` : "", n = ve.join(", ");
3972
4020
  return {
3973
4021
  path: "widgetType",
3974
4022
  input: t,
@@ -3979,30 +4027,30 @@ function Ei(e) {
3979
4027
  }
3980
4028
  return null;
3981
4029
  }
3982
- const Fi = (e) => ({
4030
+ const Di = (e) => ({
3983
4031
  path: "id",
3984
4032
  input: e,
3985
4033
  message: "Widget id is required"
3986
- }), Ai = (e) => !!e.id, wi = (e) => {
3987
- const { data: t, context: r } = e, s = Ei(t);
4034
+ }), xi = (e) => !!e.id, Ni = (e) => {
4035
+ const { data: t, context: r } = e, s = qi(t);
3988
4036
  if (s)
3989
4037
  return { success: !1, errors: [s] };
3990
- if (!Ai(t))
3991
- return { success: !1, errors: [Fi(t)] };
4038
+ if (!xi(t))
4039
+ return { success: !1, errors: [Di(t)] };
3992
4040
  switch (t.widgetType) {
3993
4041
  case "chart":
3994
- return ut(
4042
+ return dt(
3995
4043
  t,
3996
4044
  r,
3997
- ii,
3998
- yi
4045
+ pi,
4046
+ Ci
3999
4047
  );
4000
4048
  case "pivot":
4001
- return ut(
4049
+ return dt(
4002
4050
  t,
4003
4051
  r,
4004
- fi,
4005
- hi
4052
+ Ai,
4053
+ Oi
4006
4054
  );
4007
4055
  case "text":
4008
4056
  return { success: !0, data: l({
@@ -4014,23 +4062,23 @@ const Fi = (e) => ({
4014
4062
  const {
4015
4063
  id: n,
4016
4064
  customWidgetType: i,
4017
- title: o,
4018
- description: a,
4065
+ title: a,
4066
+ description: o,
4019
4067
  dataSource: u,
4020
4068
  config: c,
4021
4069
  filters: g,
4022
- highlights: d,
4023
- dataOptions: m,
4070
+ highlights: f,
4071
+ dataOptions: p,
4024
4072
  styleOptions: h,
4025
4073
  customOptions: b
4026
- } = t, p = mi(g, d, r);
4027
- return p.success ? { success: !0, data: l(l(l(l(l(l({
4074
+ } = t, m = wi(g, f, r);
4075
+ return m.success ? { success: !0, data: l(l(l(l(l(l({
4028
4076
  widgetType: "custom",
4029
4077
  id: n,
4030
4078
  customWidgetType: i,
4031
- dataSource: u !== void 0 ? u : le(r.dataSource),
4032
- dataOptions: m != null ? m : {}
4033
- }, o !== void 0 && { title: o }), a !== void 0 && { description: a }), c !== void 0 && { config: c }), h !== void 0 && { styleOptions: h }), b !== void 0 && { customOptions: b }), p.data) } : p;
4079
+ dataSource: u !== void 0 ? u : me(r.dataSource),
4080
+ dataOptions: p != null ? p : {}
4081
+ }, a !== void 0 && { title: a }), o !== void 0 && { description: o }), c !== void 0 && { config: c }), h !== void 0 && { styleOptions: h }), b !== void 0 && { customOptions: b }), m.data) } : m;
4034
4082
  }
4035
4083
  default:
4036
4084
  return {
@@ -4046,37 +4094,37 @@ const Fi = (e) => ({
4046
4094
  ]
4047
4095
  };
4048
4096
  }
4049
- }, Ti = (e) => {
4097
+ }, vi = (e) => {
4050
4098
  const { widgetType: t } = e;
4051
4099
  switch (t) {
4052
4100
  case "chart": {
4053
- const r = oi(e);
4101
+ const r = gi(e);
4054
4102
  if (!r.success) return r;
4055
- const s = l(l(l(l(l(F(l({}, r.data), {
4103
+ const s = l(l(l(l(l(E(l({}, r.data), {
4056
4104
  widgetType: "chart",
4057
4105
  id: e.id
4058
4106
  }), e.title !== void 0 && { title: e.title }), e.description !== void 0 && { description: e.description }), e.dataSource !== void 0 && {
4059
- dataSource: ae(e.dataSource)
4107
+ dataSource: ce(e.dataSource)
4060
4108
  }), e.config !== void 0 && { config: e.config }), e.highlightSelectionDisabled !== void 0 && {
4061
4109
  highlightSelectionDisabled: e.highlightSelectionDisabled
4062
4110
  });
4063
4111
  return {
4064
4112
  success: !0,
4065
- data: B(s)
4113
+ data: L(s)
4066
4114
  };
4067
4115
  }
4068
4116
  case "pivot": {
4069
- const r = pi(e);
4117
+ const r = Ti(e);
4070
4118
  if (!r.success) return r;
4071
- const s = l(l(l(l(F(l({}, r.data), {
4119
+ const s = l(l(l(l(E(l({}, r.data), {
4072
4120
  widgetType: "pivot",
4073
4121
  id: e.id
4074
4122
  }), e.title !== void 0 && { title: e.title }), e.description !== void 0 && { description: e.description }), e.dataSource !== void 0 && {
4075
- dataSource: ae(e.dataSource)
4123
+ dataSource: ce(e.dataSource)
4076
4124
  }), e.config !== void 0 && { config: e.config });
4077
4125
  return {
4078
4126
  success: !0,
4079
- data: B(s)
4127
+ data: L(s)
4080
4128
  };
4081
4129
  }
4082
4130
  case "text":
@@ -4087,10 +4135,10 @@ const Fi = (e) => ({
4087
4135
  }, e.config !== void 0 && { config: e.config }) };
4088
4136
  case "custom": {
4089
4137
  const r = [], s = e.filters !== void 0 ? A(
4090
- () => ne(e.filters),
4138
+ () => ae(e.filters),
4091
4139
  r
4092
4140
  ) : void 0, n = e.highlights !== void 0 ? A(
4093
- () => ge(e.highlights),
4141
+ () => Fe(e.highlights),
4094
4142
  r
4095
4143
  ) : void 0;
4096
4144
  return r.length > 0 ? { success: !1, errors: r } : { success: !0, data: l(l(l(l(l(l(l(l(l({
@@ -4098,7 +4146,7 @@ const Fi = (e) => ({
4098
4146
  customWidgetType: e.customWidgetType,
4099
4147
  id: e.id
4100
4148
  }, e.title !== void 0 && { title: e.title }), e.description !== void 0 && { description: e.description }), e.dataSource !== void 0 && {
4101
- dataSource: ae(e.dataSource)
4149
+ dataSource: ce(e.dataSource)
4102
4150
  }), e.config !== void 0 && { config: e.config }), e.dataOptions !== void 0 && {
4103
4151
  dataOptions: e.dataOptions
4104
4152
  }), e.styleOptions !== void 0 && { styleOptions: e.styleOptions }), e.customOptions !== void 0 && {
@@ -4121,13 +4169,13 @@ const Fi = (e) => ({
4121
4169
  ]
4122
4170
  };
4123
4171
  }
4124
- }, Ni = (e) => {
4172
+ }, Vi = (e) => {
4125
4173
  const { data: t, context: r } = e, s = [], n = [];
4126
- Array.isArray(t.widgets) ? t.widgets.forEach((a, u) => {
4127
- const c = wi({ data: a, context: r });
4174
+ Array.isArray(t.widgets) ? t.widgets.forEach((o, u) => {
4175
+ const c = Ni({ data: o, context: r });
4128
4176
  if (!c.success) {
4129
4177
  s.push(
4130
- ...er(c.errors, Zt(u))
4178
+ ...or(c.errors, ar(u))
4131
4179
  );
4132
4180
  return;
4133
4181
  }
@@ -4139,11 +4187,11 @@ const Fi = (e) => ({
4139
4187
  });
4140
4188
  let i = null;
4141
4189
  if (t.filters && t.filters.length > 0) {
4142
- const a = re(r.tables);
4190
+ const o = ne(r.tables);
4143
4191
  i = A(
4144
- () => se({
4192
+ () => ie({
4145
4193
  data: t.filters,
4146
- context: { dataSource: r.dataSource, schemaIndex: a }
4194
+ context: { dataSource: r.dataSource, schemaIndex: o }
4147
4195
  }),
4148
4196
  s
4149
4197
  );
@@ -4157,13 +4205,13 @@ const Fi = (e) => ({
4157
4205
  }), t.styleOptions !== void 0 && { styleOptions: t.styleOptions }), t.widgetsOptions !== void 0 && {
4158
4206
  widgetsOptions: t.widgetsOptions
4159
4207
  }) };
4160
- }, Mi = (e) => {
4208
+ }, ji = (e) => {
4161
4209
  const t = [], r = [];
4162
- e.widgets.forEach((o, a) => {
4163
- const u = Ti(o);
4210
+ e.widgets.forEach((a, o) => {
4211
+ const u = vi(a);
4164
4212
  if (!u.success) {
4165
4213
  t.push(
4166
- ...er(u.errors, Zt(a))
4214
+ ...or(u.errors, ar(o))
4167
4215
  );
4168
4216
  return;
4169
4217
  }
@@ -4171,28 +4219,28 @@ const Fi = (e) => ({
4171
4219
  });
4172
4220
  let s;
4173
4221
  if (e.filters) {
4174
- const o = A(
4175
- () => ne(e.filters),
4222
+ const a = A(
4223
+ () => ae(e.filters),
4176
4224
  t
4177
4225
  );
4178
- s = o != null ? o : void 0;
4226
+ s = a != null ? a : void 0;
4179
4227
  }
4180
4228
  if (t.length > 0)
4181
4229
  return { success: !1, errors: t };
4182
- const n = e.widgetsOptions !== void 0 ? Wn(e.widgetsOptions) : void 0, i = l(l(l(l(l(l(l(l({
4230
+ const n = e.widgetsOptions !== void 0 ? Yn(e.widgetsOptions) : void 0, i = l(l(l(l(l(l(l(l({
4183
4231
  widgets: r
4184
4232
  }, e.id !== void 0 && { id: e.id }), e.title !== void 0 && { title: e.title }), s && s.length > 0 && { filters: s }), e.layoutOptions !== void 0 && {
4185
4233
  layoutOptions: e.layoutOptions
4186
4234
  }), e.config !== void 0 && { config: e.config }), e.defaultDataSource !== void 0 && {
4187
- defaultDataSource: ae(e.defaultDataSource)
4235
+ defaultDataSource: ce(e.defaultDataSource)
4188
4236
  }), e.styleOptions !== void 0 && { styleOptions: e.styleOptions }), n !== void 0 && { widgetsOptions: n });
4189
4237
  return {
4190
4238
  success: !0,
4191
- data: B(i)
4239
+ data: L(i)
4192
4240
  };
4193
4241
  };
4194
- function Si(e) {
4195
- const { filters: t, relations: r } = es(
4242
+ function Mi(e) {
4243
+ const { filters: t, relations: r } = fs(
4196
4244
  e.filters || []
4197
4245
  );
4198
4246
  return {
@@ -4205,27 +4253,59 @@ function Si(e) {
4205
4253
  // No count/offset/ungroup - these are execution concerns, not translation concerns
4206
4254
  };
4207
4255
  }
4208
- function Ri(e, t, r = !1) {
4209
- const s = Si(e), n = Xr(s, t);
4210
- return Zr(n, r);
4256
+ function Ji(e, t, r = !1) {
4257
+ const s = Mi(e), n = cs(s, t);
4258
+ return ls(n, r);
4259
+ }
4260
+ function de(e) {
4261
+ const t = e.trim();
4262
+ return t.startsWith(T) ? t.slice(T.length) : t;
4263
+ }
4264
+ function X(e) {
4265
+ var s;
4266
+ const t = he(e.function);
4267
+ if (t) {
4268
+ const n = t.findIndex((i) => i.isName);
4269
+ if (n >= 0) {
4270
+ const i = e.args[n];
4271
+ if (typeof i == "string" && i.length > 0) return i;
4272
+ }
4273
+ }
4274
+ const r = e.args[0];
4275
+ return typeof r == "string" ? de(r) : w(r) ? X(r) : (s = e.function.split(".").pop()) != null ? s : e.function;
4276
+ }
4277
+ const mt = "filterFactory.logic.";
4278
+ function pt(e) {
4279
+ var r;
4280
+ if (e.function.startsWith(mt))
4281
+ return e.function.slice(mt.length);
4282
+ const t = e.args[0];
4283
+ return typeof t == "string" ? de(t) : w(t) ? X(t) : (r = e.function.split(".").pop()) != null ? r : e.function;
4284
+ }
4285
+ const Ri = "measureFactory.", Ii = "filterFactory.", ki = (e) => e.function.startsWith(Ri), Li = (e) => e.function.startsWith(Ii);
4286
+ function Ki(e, t) {
4287
+ var s;
4288
+ const r = (s = t == null ? void 0 : t.role) != null ? s : "filter";
4289
+ return typeof e == "string" ? { name: de(e), type: "dimension" } : zt(e) ? { name: de(e.column), type: "dimension" } : Ut(e) ? { name: X(e.column), type: "measure" } : w(e) ? ki(e) ? { name: X(e), type: "measure" } : Li(e) ? { name: pt(e), type: r } : (t == null ? void 0 : t.role) !== void 0 ? { name: pt(e), type: r } : { name: X(e), type: "measure" } : null;
4211
4290
  }
4212
4291
  export {
4213
- Di as CustomSuperJSON,
4214
- Bi as EMPTY_EXPANDED_QUERY_MODEL,
4215
- Li as EMPTY_SIMPLE_QUERY_MODEL,
4216
- zi as isByIdDashboardCodeParams,
4217
- Ui as isByIdWidgetCodeParams,
4218
- _i as isClientSideDashboardCodeParams,
4219
- Pi as isClientSideWidgetCodeParams,
4220
- ii as translateChartFromJSON,
4221
- oi as translateChartToJSON,
4222
- Ni as translateDashboardFromJSON,
4223
- Mi as translateDashboardToJSON,
4224
- fi as translatePivotTableFromJSON,
4225
- pi as translatePivotTableToJSON,
4226
- xi as translateQueryFromJSON,
4227
- vi as translateQueryToJSON,
4228
- Ri as translateQueryToJaql,
4229
- wi as translateWidgetFromJSON,
4230
- Ti as translateWidgetToJSON
4292
+ Ui as CustomSuperJSON,
4293
+ Hi as EMPTY_EXPANDED_QUERY_MODEL,
4294
+ Qi as EMPTY_SIMPLE_QUERY_MODEL,
4295
+ Ki as getQueryElementSummary,
4296
+ Xi as isByIdDashboardCodeParams,
4297
+ Zi as isByIdWidgetCodeParams,
4298
+ ea as isClientSideDashboardCodeParams,
4299
+ ta as isClientSideWidgetCodeParams,
4300
+ pi as translateChartFromJSON,
4301
+ gi as translateChartToJSON,
4302
+ Vi as translateDashboardFromJSON,
4303
+ ji as translateDashboardToJSON,
4304
+ Ai as translatePivotTableFromJSON,
4305
+ Ti as translatePivotTableToJSON,
4306
+ Pi as translateQueryFromJSON,
4307
+ Wi as translateQueryToJSON,
4308
+ Ji as translateQueryToJaql,
4309
+ Ni as translateWidgetFromJSON,
4310
+ vi as translateWidgetToJSON
4231
4311
  };