@astrato-io/visualizations 0.11.0 → 0.12.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 (135) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +129 -4
  3. package/VISUALIZATION_DEFINITIONS.md +3 -1
  4. package/chunks/{Button-CPG4WX8X.js → Button-CQdoKSXX.js} +3 -3
  5. package/chunks/{CircularProgress-PSLW8HmD.js → CircularProgress-DpT1lwWw.js} +18 -18
  6. package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
  7. package/chunks/{LinearProgress-KQ2EQlGL.js → LinearProgress-B7S0Q26A.js} +8 -8
  8. package/chunks/{MenuOption-B-6K7kks.js → MenuOption-DpKFJxmo.js} +133 -133
  9. package/chunks/{Title-BmvwZYkh.js → Title-m5damhc0.js} +10 -10
  10. package/chunks/{_createAggregator-CFmH6gUN.js → _createAggregator-BA8_iU9q.js} +7 -7
  11. package/chunks/{app-filter-bar.compiler-BY5-T16I.js → app-filter-bar.compiler--T4Qz3Wu.js} +3 -3
  12. package/chunks/{bar-layout-BNou0dZF.js → bar-layout-OFhxn2Go.js} +2 -2
  13. package/chunks/{bar.compiler-BkhO7sDd.js → bar.compiler-hWZBYYvV.js} +62 -62
  14. package/chunks/{builder-CNjuqD2z.js → builder-7w_bgV_h.js} +31 -31
  15. package/chunks/{coloring-BOiP0rmn.js → coloring-Cd6p0GQJ.js} +88 -83
  16. package/chunks/{createSimplePaletteValueFilter-BkgQ7MFE.js → createSimplePaletteValueFilter-CiJT8s1s.js} +55 -55
  17. package/chunks/defaults-CMFqXvaJ.js +3 -0
  18. package/chunks/{definitions-AS9GcavE.js → definitions-DTauTjIX.js} +412 -406
  19. package/chunks/{escobar-cQ1eQ64G.js → escobar-CMvphKSK.js} +4787 -4717
  20. package/chunks/{extend-preset-BlCbcXKR.js → extend-preset-BpXttHFk.js} +371 -372
  21. package/chunks/{filter.compiler-CI7dDNM1.js → filter.compiler-DOGFweJz.js} +4 -4
  22. package/chunks/{filtering-Dwi7hDPZ.js → filtering-NOnDcGbo.js} +183 -183
  23. package/chunks/handlers-CyYFSfhM.js +15393 -0
  24. package/chunks/{icon-picker-styles-CBlxEu3s.js → icon-picker-styles-DuSERhBU.js} +2 -2
  25. package/chunks/{isEqual-BdHo6wqq.js → isEqual-4f8yUUtC.js} +1 -1
  26. package/chunks/{isFocusVisible-C1nlVUwL.js → isFocusVisible-Czm70MGc.js} +1 -1
  27. package/chunks/line.compiler-B-4H55_T.js +203 -0
  28. package/chunks/{logger-Bc-DqDM_.js → logger-Cioob-QV.js} +71 -70
  29. package/chunks/{map.compiler-CRO6XpdI.js → map.compiler-Cv5V6EhF.js} +13 -13
  30. package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
  31. package/chunks/{measure-format-default-B6ghxih7.js → measure-format-default-B_kuGSzi.js} +7 -3
  32. package/chunks/{metadata-CtkvZEhS.js → metadata-dGSe5UWy.js} +5 -5
  33. package/chunks/{number.compiler-kV4lobCZ.js → number.compiler-D7nMcEMv.js} +8 -8
  34. package/chunks/{operations-COl9wgqi.js → operations-CgfehCad.js} +11462 -11223
  35. package/chunks/{range-CMJ5yc5Z.js → range-Dmwp9kVB.js} +2 -2
  36. package/chunks/{react-dom-BjsCbYHq.js → react-dom-CfuL-m78.js} +24 -24
  37. package/chunks/{render-wrappers-DFHi3Wkr.js → render-wrappers--g-zPFBW.js} +1 -1
  38. package/chunks/{requirements-C5YLmHKe.js → requirements-DHayNJ2C.js} +83 -83
  39. package/chunks/{shared-DyqxOie0.js → shared-DoEN9nNM.js} +282 -277
  40. package/chunks/standalone-B3hRGgYi.js +773 -0
  41. package/chunks/{standalone-BYK2U0Vd.js → standalone-BPNXgFft.js} +380 -380
  42. package/chunks/standalone-BPTT8XEu.js +424 -0
  43. package/chunks/standalone-BgAeHROc.js +2 -0
  44. package/chunks/{standalone-I5kRIsp8.js → standalone-BkQxag7M.js} +81 -81
  45. package/chunks/{standalone-DYVYccmY.js → standalone-Bxa3x6dg.js} +913 -913
  46. package/chunks/standalone-C0If-V6O.js +773 -0
  47. package/chunks/standalone-C1TOyflX.js +287 -0
  48. package/chunks/{standalone-DaNxWIKn.js → standalone-CE5PwJN0.js} +21 -21
  49. package/chunks/{standalone-K2OvRAQM.js → standalone-CG7IFN6n.js} +121 -121
  50. package/chunks/{standalone-Db_HNuWx.js → standalone-CKlgGu80.js} +44 -44
  51. package/chunks/standalone-CNf-oA2U.js +355 -0
  52. package/chunks/{standalone-9jrQ3zJT.js → standalone-CXPdWFlw.js} +10 -10
  53. package/chunks/{standalone-c4CPN6ug.js → standalone-Cf0_5tbu.js} +5783 -5785
  54. package/chunks/{standalone-Bp4G3MDx.js → standalone-DMi4-Vp3.js} +118 -118
  55. package/chunks/{standalone-BrjtMIdd.js → standalone-DTEX67C8.js} +108 -108
  56. package/chunks/{standalone-iOnJhCvA.js → standalone-DU46-kYv.js} +181 -181
  57. package/chunks/standalone-Dbn3jSH6.js +690 -0
  58. package/chunks/{standalone-CS5VGoja.js → standalone-DdcAL_k_.js} +833 -837
  59. package/chunks/standalone-DwCIA0UG.js +1057 -0
  60. package/chunks/standalone-Dz13tl3P.js +357 -0
  61. package/chunks/{standalone-CIjNYyya.js → standalone-H9GFzFk_.js} +937 -938
  62. package/chunks/{standalone-ChfEHb28.js → standalone-MduR0qre.js} +1279 -1279
  63. package/chunks/standalone-ejTz66P3.js +2 -0
  64. package/chunks/{standalone-D9k5SCd8.js → standalone-keB-0wK3.js} +189 -189
  65. package/chunks/{standalone-Bsfz5vnJ.js → standalone-nnkuQd0K.js} +35 -35
  66. package/chunks/standalone-vGGR6Vcn.js +6 -0
  67. package/chunks/{table.compiler-CMH_dtYs.js → table.compiler-mS4UvhLT.js} +12 -12
  68. package/chunks/theme-MYp6Rj1J.js +232 -0
  69. package/chunks/{useFieldName-BfxBzhhH.js → useFieldName-AdSak4Ch.js} +1 -1
  70. package/chunks/{utils-BdJrEeIQ.js → utils-CUKgR7it.js} +3265 -3133
  71. package/chunks/{view-Q-_XIrWE.js → view-BeYwpcVD.js} +478 -478
  72. package/chunks/{visualization-filters-BwS0xUqs.js → visualization-filters-B9qik5_K.js} +2706 -2384
  73. package/chunks/{with-html-element-D_ooGNWI.js → with-html-element-1GSeLT59.js} +3888 -3870
  74. package/definitions.js +2 -2
  75. package/docs/operations/astrato-app-filter-bar.md +1 -1
  76. package/docs/operations/bar.md +115 -32
  77. package/docs/operations/combo.md +50 -17
  78. package/docs/operations/date-picker.md +4 -4
  79. package/docs/operations/distribution-gauge.md +18 -16
  80. package/docs/operations/dot.md +107 -24
  81. package/docs/operations/filter.md +10 -8
  82. package/docs/operations/gauge.md +20 -18
  83. package/docs/operations/heatMap.md +73 -21
  84. package/docs/operations/histogram.md +45 -12
  85. package/docs/operations/iframe.md +1 -1
  86. package/docs/operations/image.md +1 -1
  87. package/docs/operations/index.md +11 -11
  88. package/docs/operations/line.md +57 -24
  89. package/docs/operations/map.md +16 -16
  90. package/docs/operations/number.md +10 -9
  91. package/docs/operations/pie.md +23 -21
  92. package/docs/operations/radar.md +13 -11
  93. package/docs/operations/sankey.md +19 -17
  94. package/docs/operations/scatter.md +111 -28
  95. package/docs/operations/shape.md +5 -5
  96. package/docs/operations/simpleTextObject.md +4 -4
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +27 -25
  99. package/docs/operations/tree.md +5 -3
  100. package/docs/operations/treemap.md +70 -18
  101. package/docs/operations/waterfall.md +40 -7
  102. package/docs/operations/word-cloud.md +69 -17
  103. package/getters.js +2 -2
  104. package/index.js +474 -525
  105. package/metadata.js +2 -2
  106. package/operations.js +24 -17
  107. package/package.json +71 -72
  108. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1 -1
  109. package/src/definitions/model/definitions/schema-registry.d.ts +13 -12
  110. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -2
  111. package/src/definitions/model/definitions/schemas/common.schema.d.ts +5 -4
  112. package/src/definitions/model/definitions/schemas/line.schema.d.ts +3 -2
  113. package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
  114. package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
  115. package/src/index.d.ts +1 -1
  116. package/src/operations/index.d.ts +11 -1
  117. package/src/types.d.ts +166 -1
  118. package/chunks/FieldTypeIcon-5k2bkqd0.js +0 -22
  119. package/chunks/category-axis-D1OVyMrr.js +0 -20
  120. package/chunks/color-rules-DYJL4fIW.js +0 -15
  121. package/chunks/color-settings-DJFoFTip.js +0 -5
  122. package/chunks/defaults-B5_8S-J-.js +0 -3
  123. package/chunks/handlers-C63NVo7i.js +0 -15433
  124. package/chunks/line.compiler-DCv3h42f.js +0 -198
  125. package/chunks/standalone-06i1wmIX.js +0 -6
  126. package/chunks/standalone-B6zUvxNQ.js +0 -357
  127. package/chunks/standalone-Be5APcVv.js +0 -762
  128. package/chunks/standalone-BuXpKMnc.js +0 -2
  129. package/chunks/standalone-CUGt2FUF.js +0 -2
  130. package/chunks/standalone-CnF2OYLQ.js +0 -355
  131. package/chunks/standalone-CznEEiq3.js +0 -422
  132. package/chunks/standalone-DcuE8KBa.js +0 -287
  133. package/chunks/standalone-pCrzBiTy.js +0 -773
  134. package/chunks/standalone-qrZaimgC.js +0 -689
  135. package/chunks/standalone-yqDJ8h3K.js +0 -1012
@@ -1,8 +1,8 @@
1
- import { As as e, Es as t, Ls as n, Rs as r, Ts as i, Uo as a, Wo as o, bl as s, ks as c, r as l, vs as u } from "./visualization-filters-BwS0xUqs.js";
2
- import { Bg as d, Fh as ee, Gh as te, Jg as ne, Kh as re, Nh as ie, Ph as ae, S_ as oe, Tm as f, Wg as se, Zg as ce, Zm as p, _h as le, fh as ue, gh as de, h_ as m, hh as fe, ih as pe, im as h, l_ as me, lh as he, lm as ge, mh as _e, o_ as ve, oh as ye, om as g, qh as be, sm as xe, tm as _, uh as Se, um as Ce, v_ as we, vh as Te, wg as Ee, yh as v, zh as De, zm as Oe } from "./handlers-C63NVo7i.js";
3
- import { E as ke, b as y, d as Ae, t as je } from "./operations-COl9wgqi.js";
1
+ import { $s as e, Gs as t, Jl as n, Qs as r, Wa as i, d as a, dc as o, hs as s, ms as c, nc as l, rc as u, uc as d } from "./visualization-filters-B9qik5_K.js";
2
+ import { $g as ee, Bh as te, Ch as ne, E_ as re, Gg as f, Om as p, Qh as ie, Rh as ae, Sh as oe, T_ as se, Um as ce, Wh as le, Xh as ue, Yg as de, Zh as fe, _h as pe, bh as me, cm as m, d_ as he, dh as ge, dm as _e, fm as ve, hh as ye, kg as be, lh as xe, lm as Se, m_ as Ce, mh as we, n_ as Te, nh as h, om as g, rm as _, wh as v, x_ as Ee, xh as De, yh as Oe, zh as ke } from "./handlers-CyYFSfhM.js";
3
+ import { F as Ae, k as y, m as je, t as Me } from "./operations-CgfehCad.js";
4
4
  import { z as b } from "zod";
5
- var x = s(), Me = b.object({
5
+ var x = n(), Ne = b.object({
6
6
  orientation: b.enum(["horizontal", "vertical"]).optional(),
7
7
  selectionMode: b.enum([
8
8
  "inherit",
@@ -14,17 +14,17 @@ var x = s(), Me = b.object({
14
14
  showClearAll: b.boolean().optional(),
15
15
  showChartBreakdown: b.boolean().optional(),
16
16
  selectableFieldKeys: b.array(b.string()).optional()
17
- }).strict(), Ne = b.object({
18
- settings: Me.optional(),
17
+ }).strict(), Pe = b.object({
18
+ settings: Ne.optional(),
19
19
  type: b.literal("astrato-app-filter-bar"),
20
20
  version: b.literal(1)
21
- }).strict(), S = (e) => e, C = b.string().trim().min(1).max(100), w = b.string().min(1).refine((e) => e.trim().length > 0, "Field key cannot be blank."), Pe = S(me.shape.dataType), Fe = S(ve.shape.formatType), Ie = b.object({
21
+ }).strict(), S = (e) => e, C = b.string().trim().min(1).max(100), w = b.string().min(1).refine((e) => e.trim().length > 0, "Field key cannot be blank."), Fe = S(Ce.shape.dataType), Ie = S(he.shape.formatType), Le = b.object({
22
22
  distinct: b.boolean().optional(),
23
23
  name: b.string().trim().min(1),
24
24
  resultType: b.string().optional()
25
- }).strict(), Le = b.object({
26
- aggregations: b.array(Ie).default([]),
27
- dataType: Pe,
25
+ }).strict(), Re = b.object({
26
+ aggregations: b.array(Le).default([]),
27
+ dataType: Fe,
28
28
  fieldKey: w,
29
29
  isManualData: b.boolean().optional(),
30
30
  kind: b.literal("field").default("field"),
@@ -36,48 +36,48 @@ var x = s(), Me = b.object({
36
36
  key: w,
37
37
  name: b.string().min(1),
38
38
  views: b.array(b.string()).optional()
39
- }).passthrough(), Re = T.extend({
39
+ }).passthrough(), ze = T.extend({
40
40
  dimension: b.record(b.string(), b.unknown()),
41
41
  type: b.literal("dimension")
42
- }), ze = T.extend({
42
+ }), Be = T.extend({
43
43
  measure: b.object({ aggregation: b.string().min(1) }).passthrough(),
44
44
  type: b.literal("measure")
45
- }), Be = T.extend({
45
+ }), Ve = T.extend({
46
46
  calculation: b.record(b.string(), b.unknown()),
47
47
  type: b.literal("calculation")
48
- }), Ve = b.object({
48
+ }), He = b.object({
49
49
  fieldKey: w,
50
- item: Re,
50
+ item: ze,
51
51
  kind: b.literal("dimension"),
52
52
  name: b.string().min(1)
53
- }).strict(), He = b.object({
53
+ }).strict(), Ue = b.object({
54
54
  fieldKey: w,
55
- item: ze,
55
+ item: Be,
56
56
  kind: b.literal("measure"),
57
57
  name: b.string().min(1)
58
- }).strict(), Ue = b.object({
58
+ }).strict(), We = b.object({
59
59
  fieldKey: w,
60
- item: Be,
60
+ item: Ve,
61
61
  kind: b.literal("calculation"),
62
62
  name: b.string().min(1)
63
63
  }).strict(), E = b.union([
64
- Le,
65
- Ve,
64
+ Re,
66
65
  He,
67
- Ue
66
+ Ue,
67
+ We
68
68
  ]).superRefine((e, t) => {
69
69
  e.kind !== "field" && e.item.key !== e.fieldKey && t.addIssue({
70
70
  code: "custom",
71
71
  message: "Semantic item key must match fieldKey.",
72
72
  path: ["item", "key"]
73
73
  });
74
- }), We = b.object({
74
+ }), Ge = b.object({
75
75
  currency: b.string().min(1).optional(),
76
76
  currencyIsPrefix: b.boolean().optional(),
77
77
  formatString: b.string().optional(),
78
- formatType: Fe.optional(),
79
- negativeType: S(ve.shape.negativeType.unwrap()).optional()
80
- }).strict(), Ge = b.discriminatedUnion("mode", [b.object({
78
+ formatType: Ie.optional(),
79
+ negativeType: S(he.shape.negativeType.unwrap()).optional()
80
+ }).strict(), Ke = b.discriminatedUnion("mode", [b.object({
81
81
  dateLevel: S(b.enum(x.DateLevel)).describe("Year-aware bucket, such as month over time."),
82
82
  mode: b.literal("level")
83
83
  }).strict(), b.object({
@@ -85,61 +85,61 @@ var x = s(), Me = b.object({
85
85
  mode: b.literal("part")
86
86
  }).strict()]), D = b.object({
87
87
  fieldKey: w,
88
- format: We.pick({
88
+ format: Ge.pick({
89
89
  formatString: !0,
90
90
  formatType: !0
91
91
  }).optional(),
92
92
  ref: C,
93
93
  showNullValues: b.boolean().optional(),
94
- temporalGrouping: Ge.describe("Groups a date dimension. Applied before format; format must then suit the grouping.").optional()
95
- }).strict(), Ke = b.object({
96
- placements: b.array(S(b.enum(we))).min(1).describe("Positions tried in order. Inside labels sit at the end of the bar.").optional(),
97
- textColor: m.describe("Label text color in every placement. Omit to keep the automatic contrast color.").optional(),
94
+ temporalGrouping: Ke.describe("Groups a date dimension. Applied before format; format must then suit the grouping.").optional()
95
+ }).strict(), qe = b.object({
96
+ placements: b.array(S(b.enum(Ee))).min(1).describe("Positions tried in order. Inside labels sit at the end of the bar.").optional(),
97
+ textColor: i.describe("Label text color in every placement. Omit to keep the automatic contrast color.").optional(),
98
98
  visible: b.boolean()
99
99
  }).strict(), O = b.object({
100
100
  aggregation: b.string().trim().min(1).describe("Required for a raw field measure; omit for a predefined measure or calculation.").optional(),
101
- dataLabels: Ke.optional(),
101
+ dataLabels: qe.optional(),
102
102
  fieldKey: w,
103
- format: We.optional(),
103
+ format: Ge.optional(),
104
104
  ref: C
105
- }).strict(), qe = b.object({
105
+ }).strict(), Je = b.object({
106
106
  fieldKey: w,
107
- operator: S(b.enum(De)),
107
+ operator: S(b.enum(le)),
108
108
  value: b.string()
109
- }).strict(), Je = b.object({
109
+ }).strict(), Ye = b.object({
110
110
  fieldKey: w,
111
- operator: S(b.enum(ee)),
111
+ operator: S(b.enum(te)),
112
112
  valueFrom: b.string(),
113
113
  valueTo: b.string()
114
- }).strict(), Ye = b.object({
114
+ }).strict(), Xe = b.object({
115
115
  fieldKey: w,
116
- operator: S(b.enum(ie)),
116
+ operator: S(b.enum(ae)),
117
117
  values: b.array(b.string()).min(1)
118
- }).strict(), Xe = b.object({
118
+ }).strict(), Ze = b.object({
119
119
  fieldKey: w,
120
- operator: S(b.enum(ae))
121
- }).strict(), Ze = b.union([
122
- qe,
120
+ operator: S(b.enum(ke))
121
+ }).strict(), Qe = b.union([
123
122
  Je,
124
123
  Ye,
125
- Xe
124
+ Xe,
125
+ Ze
126
126
  ]), k = b.lazy(() => b.object({
127
- filters: b.array(b.union([Ze, k])),
127
+ filters: b.array(b.union([Qe, k])),
128
128
  operator: b.enum(["and", "or"])
129
129
  }).strict()), A = b.object({
130
130
  by: C,
131
- direction: S(d.shape.sortDirection),
131
+ direction: S(f.shape.sortDirection),
132
132
  enabled: b.boolean().optional()
133
- }).strict(), Qe = b.object({
133
+ }).strict(), $e = b.object({
134
134
  by: C,
135
135
  count: b.number().int().positive(),
136
- direction: S(d.shape.sortDirection),
136
+ direction: S(f.shape.sortDirection),
137
137
  showOthers: b.boolean().optional()
138
- }).strict(), $e = b.object({
139
- queryLimit: b.number().int().positive().optional(),
140
- topN: Qe.optional()
141
138
  }).strict(), et = b.object({
142
- position: S(ce.shape.position).optional(),
139
+ queryLimit: b.number().int().positive().optional(),
140
+ topN: $e.optional()
141
+ }).strict(), tt = b.object({
142
+ position: S(Te.shape.position).optional(),
143
143
  title: b.string().optional(),
144
144
  visible: b.boolean().optional()
145
145
  }).strict(), j = b.object({
@@ -148,72 +148,76 @@ var x = s(), Me = b.object({
148
148
  ticksVisible: b.boolean().optional(),
149
149
  title: b.string().optional(),
150
150
  titleVisible: b.boolean().optional()
151
- }).strict(), tt = j.extend({
151
+ }).strict(), nt = j.extend({
152
152
  labelWrap: b.boolean().describe("Wrap category labels onto several lines instead of tilting them. Helps a few long, multi-word names.").optional(),
153
153
  labelWrapLines: b.number().int().min(1).max(10).describe("Most lines a wrapped category label uses; turns wrapping on. Defaults to 2.").optional()
154
- }).strict(), nt = b.union([b.object({
154
+ }).strict(), rt = b.union([b.object({
155
155
  max: b.number().optional(),
156
156
  min: b.number().optional().describe("Must be less than max when both are set")
157
- }).strict(), b.object({ startsAtZero: b.boolean() }).strict()]).describe("Fix min, max or both, or set startsAtZero on an axis fitted to the data"), rt = b.array(Ee).optional().describe("Shaded ranges drawn across the plot between two primary measure axis values"), it = te({}), at = te({ dimension: C.describe(`Alias of a dimension in data.dimensions. ${be}`) }), ot = re({ measure: C.describe("Alias of the measure in data.measures whose value is compared") }), st = "Colors bound to dimension values, eg. \"Happy\" is dark teal. The first matching entry wins, ahead of rules and the palette. For ordered bands, add one entry per band with colors taken along a ramp.", ct = b.array(ot).min(1).describe("Colors bound to measure thresholds, eg. red when sales is below 100. The first matching rule wins."), M = (e) => b.object({
158
- overwrites: b.array(e.requiresOverwriteDimension ? at : it).min(1).describe(st).optional(),
159
- ...e.rules ? { rules: ct.optional() } : {}
160
- }).strict(), lt = {
157
+ }).strict(), b.object({ startsAtZero: b.boolean() }).strict()]).describe("Fix min, max or both, or set startsAtZero on an axis fitted to the data"), it = b.array(be).optional().describe("Shaded ranges drawn across the plot between two primary measure axis values"), at = ue({}), ot = ue({ dimension: C.describe(`Alias of a dimension in data.dimensions. ${ie}`) }), st = fe({ measure: C.describe("Alias of the measure in data.measures whose value is compared") }), ct = "Colors bound to dimension values, eg. \"Happy\" is dark teal. The first matching entry wins, ahead of rules and the palette. For ordered bands, add one entry per band with colors taken along a ramp.", lt = b.array(st).min(1).describe("Colors bound to measure thresholds, eg. red when sales is below 100. The first matching rule wins."), M = (e) => b.object({
158
+ overwrites: b.array(e.requiresOverwriteDimension ? ot : at).min(1).describe(ct).optional(),
159
+ ...e.rules ? { rules: lt.optional() } : {}
160
+ }).strict(), ut = {
161
161
  inverted: b.boolean().optional().describe("Reverse the direction of the axis values, eg. to put rank 1 at the top"),
162
- range: nt.optional()
163
- }, ut = { bands: rt }, dt = { scale: S(b.enum(oe)).optional() };
162
+ range: rt.optional()
163
+ }, dt = { labelFormat: S(b.enum(se)).optional().describe("Defaults to compact, which prints axis values as 40M or $1.5M. value prints them with the measure's format, eg. 40,000,000.00. Labels and tooltips always use the measure's format, and percent or date axes are never compacted.") }, ft = { bands: it }, pt = { scale: S(b.enum(re)).optional() };
164
164
  j.extend({
165
- ...lt,
166
165
  ...ut,
167
- ...dt
166
+ ...dt,
167
+ ...ft,
168
+ ...pt
168
169
  }).strict();
169
170
  var N = ({ dimensionLabelWrap: e = !1, logScale: t = !1, primaryMeasureBands: n = !1, rangedMeasureAxes: r = [] } = {}) => {
170
171
  let i = (e, n) => j.extend({
171
- ...r.includes(e) ? lt : {},
172
- ...n ? ut : {},
173
- ...t ? dt : {}
172
+ ...r.includes(e) ? {
173
+ ...ut,
174
+ ...dt
175
+ } : {},
176
+ ...n ? ft : {},
177
+ ...t ? pt : {}
174
178
  }).strict();
175
179
  return b.object({
176
- dimension: (e ? tt : j).optional(),
180
+ dimension: (e ? nt : j).optional(),
177
181
  primaryMeasure: i("primaryMeasure", n).optional(),
178
182
  secondaryMeasure: i("secondaryMeasure", !1).optional()
179
183
  }).strict();
180
184
  };
181
185
  N();
182
- var ft = b.object({
186
+ var mt = b.object({
183
187
  axes: N({
184
188
  dimensionLabelWrap: !0,
185
189
  logScale: !0,
186
190
  primaryMeasureBands: !0,
187
191
  rangedMeasureAxes: ["primaryMeasure", "secondaryMeasure"]
188
192
  }).optional(),
189
- legend: et.optional(),
190
- orientation: S(b.enum(o)).optional()
191
- }).strict(), pt = S(b.enum([i.Groups, i.Stacked])).describe("How several measures, or a series dimension, share a category: \"groups\" side by side, \"stacked\" into one bar. Ignored for one dimension with one measure. Defaults to groups for several measures on one dimension, otherwise stacked."), mt = O.extend({ axis: b.enum(["primary", "secondary"]).optional() }), ht = b.object({
193
+ legend: tt.optional(),
194
+ orientation: S(b.enum(s)).optional()
195
+ }).strict(), ht = S(b.enum([r.Groups, r.Stacked])).describe("How several measures, or a series dimension, share a category: \"groups\" side by side, \"stacked\" into one bar. Ignored for one dimension with one measure. Defaults to groups for several measures on one dimension, otherwise stacked."), gt = O.extend({ axis: b.enum(["primary", "secondary"]).optional() }), _t = b.object({
192
196
  data: b.object({
193
197
  dimensions: b.array(D),
194
- measures: b.array(mt).min(1)
198
+ measures: b.array(gt).min(1)
195
199
  }).strict(),
196
200
  filterGroup: k.optional(),
197
- limiting: $e.optional(),
198
- presentation: ft.extend({
201
+ limiting: et.optional(),
202
+ presentation: mt.extend({
199
203
  coloring: M({ rules: !0 }).optional(),
200
- layout: pt.optional()
204
+ layout: ht.optional()
201
205
  }).optional(),
202
206
  sorting: b.array(A).optional(),
203
207
  type: b.literal("bar"),
204
208
  version: b.literal(1)
205
- }).strict(), gt = b.object({ visible: b.boolean() }).strict(), _t = (e, t) => b.array(e).min(t.min).max(t.max), P = (e, t) => {
209
+ }).strict(), vt = b.object({ visible: b.boolean() }).strict(), yt = (e, t) => b.array(e).min(t.min).max(t.max), P = (e, t) => {
206
210
  let n = {};
207
211
  if (t.dimensions.max > 0) {
208
- let e = _t(D, t.dimensions);
212
+ let e = yt(D, t.dimensions);
209
213
  n.dimensions = t.dimensions.min === 0 ? e.optional() : e;
210
214
  }
211
215
  if (t.measures.max > 0) {
212
- let e = t.dataLabels ? O.omit({ dataLabels: !0 }).extend({ dataLabels: gt.optional() }) : O.omit({ dataLabels: !0 }), r = t.comboSeriesTypes ? e.extend({ seriesType: b.enum([
216
+ let e = t.dataLabels ? O.omit({ dataLabels: !0 }).extend({ dataLabels: vt.optional() }) : O.omit({ dataLabels: !0 }), r = t.comboSeriesTypes ? e.extend({ seriesType: b.enum([
213
217
  "bar",
214
218
  "line",
215
219
  "point"
216
- ]).optional() }) : e, i = _t(t.measureAxis ? r.extend({ axis: b.enum(["primary", "secondary"]).optional() }) : r, t.measures);
220
+ ]).optional() }) : e, i = yt(t.measureAxis ? r.extend({ axis: b.enum(["primary", "secondary"]).optional() }) : r, t.measures);
217
221
  n.measures = t.measures.min === 0 ? i.optional() : i;
218
222
  }
219
223
  let r = {};
@@ -226,7 +230,7 @@ var ft = b.object({
226
230
  });
227
231
  r.axes = (t.secondaryDimensionAxis ? e.extend({ secondaryDimension: j.optional() }) : e).optional();
228
232
  }
229
- t.conditionalColoring && (r.coloring = M(t.conditionalColoring).optional()), t.dataLabels && (r.dataLabels = gt.optional()), t.gaugeDisplayMode && (r.displayMode = b.enum(["bar", "radial"]).optional()), t.legend && (r.legend = et.optional()), t.orientation && (r.orientation = S(b.enum(o)).optional()), t.treeLayout && (r.layout = b.object({
233
+ t.conditionalColoring && (r.coloring = M(t.conditionalColoring).optional()), t.dataLabels && (r.dataLabels = vt.optional()), t.gaugeDisplayMode && (r.displayMode = b.enum(["bar", "radial"]).optional()), t.legend && (r.legend = tt.optional()), t.orientation && (r.orientation = S(b.enum(s)).optional()), t.treeLayout && (r.layout = b.object({
230
234
  compact: b.boolean().optional(),
231
235
  direction: b.enum([
232
236
  "bottom",
@@ -257,7 +261,7 @@ var ft = b.object({
257
261
  path: ["presentation", "coloring"]
258
262
  }), t.validateDefinition?.(n, r);
259
263
  });
260
- }, vt = P("combo", {
264
+ }, bt = P("combo", {
261
265
  axes: !0,
262
266
  dimensionLabelWrap: !0,
263
267
  comboSeriesTypes: !0,
@@ -308,7 +312,7 @@ var ft = b.object({
308
312
  });
309
313
  });
310
314
  }
311
- }), yt = P("dot", {
315
+ }), xt = P("dot", {
312
316
  conditionalColoring: { rules: !0 },
313
317
  axes: !0,
314
318
  dimensions: {
@@ -322,7 +326,7 @@ var ft = b.object({
322
326
  },
323
327
  orientation: !0,
324
328
  rangedMeasureAxes: ["primaryMeasure"]
325
- }), bt = P("scatter", {
329
+ }), St = P("scatter", {
326
330
  conditionalColoring: { rules: !0 },
327
331
  axes: !0,
328
332
  dimensions: {
@@ -337,7 +341,7 @@ var ft = b.object({
337
341
  queryLimit: !0,
338
342
  rangedMeasureAxes: ["primaryMeasure", "secondaryMeasure"],
339
343
  sorting: !0
340
- }), xt = P("histogram", {
344
+ }), Ct = P("histogram", {
341
345
  axes: !0,
342
346
  dimensions: {
343
347
  min: 1,
@@ -351,7 +355,7 @@ var ft = b.object({
351
355
  },
352
356
  orientation: !0,
353
357
  rangedMeasureAxes: ["primaryMeasure"]
354
- }), St = P("heatMap", {
358
+ }), wt = P("heatMap", {
355
359
  conditionalColoring: { rules: !0 },
356
360
  axes: !0,
357
361
  dimensions: {
@@ -366,7 +370,7 @@ var ft = b.object({
366
370
  queryLimit: !0,
367
371
  secondaryDimensionAxis: !0,
368
372
  sorting: !0
369
- }), Ct = P("radar", {
373
+ }), Tt = P("radar", {
370
374
  conditionalColoring: {
371
375
  minDimensions: 2,
372
376
  rules: !1
@@ -384,7 +388,7 @@ var ft = b.object({
384
388
  if (e === 0 && t < 2) return "Radar charts without dimensions require at least two measures.";
385
389
  if (e > 0 && t > 1) return "Radar charts with dimensions support exactly one measure.";
386
390
  }
387
- }), wt = P("gauge", {
391
+ }), Et = P("gauge", {
388
392
  conditionalColoring: { rules: !0 },
389
393
  dimensions: {
390
394
  min: 0,
@@ -397,7 +401,7 @@ var ft = b.object({
397
401
  max: 20
398
402
  },
399
403
  validateCounts: (e, t) => e === 1 && t > 2 ? "Gauge charts with a dimension support at most two measures." : void 0
400
- }), Tt = P("distribution-gauge", {
404
+ }), Dt = P("distribution-gauge", {
401
405
  conditionalColoring: { rules: !0 },
402
406
  dimensions: {
403
407
  min: 0,
@@ -409,7 +413,7 @@ var ft = b.object({
409
413
  min: 1,
410
414
  max: 20
411
415
  }
412
- }), Et = P("pie", {
416
+ }), Ot = P("pie", {
413
417
  conditionalColoring: { rules: !0 },
414
418
  dimensions: {
415
419
  min: 1,
@@ -422,7 +426,7 @@ var ft = b.object({
422
426
  },
423
427
  queryLimit: !0,
424
428
  sorting: !0
425
- }), Dt = P("tree", {
429
+ }), kt = P("tree", {
426
430
  dimensions: {
427
431
  min: 0,
428
432
  max: 10
@@ -435,7 +439,7 @@ var ft = b.object({
435
439
  sorting: !0,
436
440
  treeLayout: !0,
437
441
  validateCounts: (e, t) => e + t === 0 ? "Tree charts require at least one dimension or measure." : e > 0 && t > 1 ? "Tree charts with dimensions support at most one measure." : void 0
438
- }), Ot = P("treemap", {
442
+ }), At = P("treemap", {
439
443
  conditionalColoring: { rules: !0 },
440
444
  dimensions: {
441
445
  min: 1,
@@ -446,7 +450,7 @@ var ft = b.object({
446
450
  min: 1,
447
451
  max: 1
448
452
  }
449
- }), kt = P("sankey", {
453
+ }), jt = P("sankey", {
450
454
  conditionalColoring: {
451
455
  requiresOverwriteDimension: !0,
452
456
  rules: !0
@@ -459,7 +463,7 @@ var ft = b.object({
459
463
  min: 1,
460
464
  max: 1
461
465
  }
462
- }), At = P("waterfall", {
466
+ }), Mt = P("waterfall", {
463
467
  axes: !0,
464
468
  dataLabels: !0,
465
469
  dimensions: {
@@ -474,7 +478,7 @@ var ft = b.object({
474
478
  orientation: !0,
475
479
  rangedMeasureAxes: ["primaryMeasure"],
476
480
  validateCounts: (e, t) => e === 1 && t !== 2 ? "Waterfall charts with a dimension require exactly two measures." : void 0
477
- }), jt = P("word-cloud", {
481
+ }), Nt = P("word-cloud", {
478
482
  conditionalColoring: { rules: !0 },
479
483
  dimensions: {
480
484
  min: 1,
@@ -484,38 +488,39 @@ var ft = b.object({
484
488
  min: 1,
485
489
  max: 1
486
490
  }
487
- }), Mt = b.enum(["dropdown", "listbox"]), Nt = b.object({
488
- mode: Mt.optional(),
491
+ }), Pt = b.enum(["dropdown", "listbox"]), Ft = b.object({
492
+ mode: Pt.optional(),
489
493
  quickSelect: b.boolean().optional(),
490
494
  responsive: b.boolean().optional(),
491
495
  searchable: b.boolean().optional(),
492
496
  showProgressBar: b.boolean().optional()
493
- }).strict(), Pt = b.object({
497
+ }).strict(), It = b.object({
494
498
  data: b.object({ field: D.omit({
495
499
  format: !0,
496
500
  showNullValues: !0,
497
501
  temporalGrouping: !0
498
502
  }) }).strict(),
499
- presentation: Nt.optional(),
503
+ presentation: Ft.optional(),
500
504
  type: b.literal("filter"),
501
505
  version: b.literal(1)
502
- }).strict(), Ft = O.omit({ dataLabels: !0 }).extend({
506
+ }).strict(), Lt = O.omit({ dataLabels: !0 }).extend({
503
507
  axis: b.enum(["primary", "secondary"]).optional(),
504
- dataPointShape: S(ne.shape.dataPointShape)
505
- }), It = b.object({
506
- density: se.optional(),
508
+ dataPointShape: S(ee.shape.dataPointShape)
509
+ }), Rt = b.object({
510
+ density: de.optional(),
507
511
  visible: b.boolean()
508
- }).strict(), Lt = ft.extend({
512
+ }).strict(), zt = mt.extend({
509
513
  coloring: M({ rules: !1 }).optional(),
510
- dataLabels: It.describe("Value labels on every line point. Omit to show none.").optional()
511
- }), Rt = b.object({
514
+ selectOnClick: b.boolean().describe("Select an axis value when a point, the nearby line or its axis label is clicked. Defaults to the base vSpec setting, or true.").optional(),
515
+ dataLabels: Rt.describe("Value labels on every line point. Omit to show none.").optional()
516
+ }), Bt = b.object({
512
517
  data: b.object({
513
518
  dimensions: b.array(D).min(1),
514
- measures: b.array(Ft).min(1)
519
+ measures: b.array(Lt).min(1)
515
520
  }).strict(),
516
521
  filterGroup: k.optional(),
517
522
  limiting: b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional(),
518
- presentation: Lt.optional(),
523
+ presentation: zt.optional(),
519
524
  sorting: b.array(A).optional(),
520
525
  type: b.literal("line"),
521
526
  version: b.literal(1)
@@ -536,14 +541,14 @@ var ft = b.object({
536
541
  ]
537
542
  });
538
543
  });
539
- }), zt = D.pick({
544
+ }), Vt = D.pick({
540
545
  fieldKey: !0,
541
546
  ref: !0
542
- }), Bt = O.pick({
547
+ }), Ht = O.pick({
543
548
  aggregation: !0,
544
549
  fieldKey: !0,
545
550
  ref: !0
546
- }), Vt = Bt.extend({ role: b.enum([
551
+ }), Ut = Ht.extend({ role: b.enum([
547
552
  "geo",
548
553
  "secondGeo",
549
554
  "thirdGeo",
@@ -558,19 +563,19 @@ var ft = b.object({
558
563
  name: b.string().trim().min(1).optional(),
559
564
  ref: C.describe("Reference unique among all layers and data items; resolvedLayerRefs returns it as { kind: \"layer\", id }."),
560
565
  visible: b.boolean().optional()
561
- }), Ht = b.object({
562
- dimensions: b.array(zt).length(1),
563
- measures: b.array(Vt).min(1),
564
- supportingMeasures: b.array(Bt).optional()
566
+ }), Wt = b.object({
567
+ dimensions: b.array(Vt).length(1),
568
+ measures: b.array(Ut).min(1),
569
+ supportingMeasures: b.array(Ht).optional()
565
570
  }).strict(), L = I.extend({
566
- data: Ht,
571
+ data: Wt,
567
572
  filterGroup: k.optional()
568
- }), Ut = ye.partial().strict(), R = b.object({
569
- color: m.optional(),
570
- opacity: de
571
- }).strict(), Wt = I.extend({
573
+ }), Gt = ge.partial().strict(), R = b.object({
574
+ color: i.optional(),
575
+ opacity: De
576
+ }).strict(), Kt = I.extend({
572
577
  type: b.literal("map"),
573
- presentation: S(ue.pick({
578
+ presentation: S(pe.pick({
574
579
  mapType: !0,
575
580
  opacity: !0,
576
581
  apiKey: !0,
@@ -589,20 +594,20 @@ var ft = b.object({
589
594
  "dark"
590
595
  ])
591
596
  }).partial().strict()).optional()
592
- }).strict(), Gt = I.extend({
597
+ }).strict(), qt = I.extend({
593
598
  type: b.literal("image"),
594
- image: Se.shape.image.strict(),
595
- position: Se.shape.position.strict(),
596
- opacity: de
597
- }).strict(), Kt = L.extend({
599
+ image: ye.shape.image.strict(),
600
+ position: ye.shape.position.strict(),
601
+ opacity: De
602
+ }).strict(), Jt = L.extend({
598
603
  type: b.literal("point"),
599
604
  locationType: F,
600
605
  presentation: S(R.extend({
601
- shape: Te.shape.shape,
602
- sizing: Ut.optional(),
606
+ shape: ne.shape.shape,
607
+ sizing: Gt.optional(),
603
608
  labelsVisible: b.boolean().optional()
604
609
  }).strict()).optional()
605
- }).strict(), qt = L.extend({
610
+ }).strict(), Yt = L.extend({
606
611
  type: b.literal("shape"),
607
612
  presentation: S(R.extend({
608
613
  strokeEnabled: v.shape.strokeEnabled,
@@ -610,47 +615,47 @@ var ft = b.object({
610
615
  strokeWidth: v.shape.strokeWidth,
611
616
  labelsVisible: b.boolean().optional()
612
617
  }).strict()).optional()
613
- }).strict(), Jt = L.extend({
618
+ }).strict(), Xt = L.extend({
614
619
  type: b.literal("heatMap"),
615
620
  locationType: F,
616
621
  presentation: S(b.object({
617
- heat: he.pick({
622
+ heat: we.pick({
618
623
  radius: !0,
619
624
  maxZoom: !0,
620
625
  blur: !0,
621
626
  changeHeatWhenZooming: !0
622
627
  }).partial().strict().optional(),
623
- value: fe.partial().strict().optional()
628
+ value: me.partial().strict().optional()
624
629
  }).strict()).optional()
625
- }).strict(), Yt = L.extend({
630
+ }).strict(), Zt = L.extend({
626
631
  type: b.literal("pointConnection"),
627
- data: Ht.extend({ dimensions: b.array(zt).length(2) }).strict(),
632
+ data: Wt.extend({ dimensions: b.array(Vt).length(2) }).strict(),
628
633
  locationType: F,
629
634
  secondLocationType: F,
630
635
  presentation: S(R.extend({
631
- sizing: Ut.optional(),
636
+ sizing: Gt.optional(),
632
637
  useGeodesicLines: b.boolean().optional(),
633
- lineStyle: le.shape.lineStyle.optional(),
634
- arrow: pe.partial().strict().optional()
638
+ lineStyle: oe.shape.lineStyle.optional(),
639
+ arrow: xe.partial().strict().optional()
635
640
  }).strict()).optional()
636
- }).strict(), Xt = b.discriminatedUnion("type", [
637
- Wt,
638
- Gt,
641
+ }).strict(), Qt = b.discriminatedUnion("type", [
639
642
  Kt,
640
643
  qt,
641
644
  Jt,
642
- Yt
643
- ]), Zt = b.object({
645
+ Yt,
646
+ Xt,
647
+ Zt
648
+ ]), $t = b.object({
644
649
  type: b.literal("map"),
645
650
  version: b.literal(1),
646
- layers: b.array(Xt).min(1).describe("Layers in stacking order, topmost first. Include a map layer explicitly when a basemap is wanted."),
647
- view: S(_e.partial().strict()).optional()
648
- }).strict(), Qt = b.object({
651
+ layers: b.array(Qt).min(1).describe("Layers in stacking order, topmost first. Include a map layer explicitly when a basemap is wanted."),
652
+ view: S(Oe.partial().strict()).optional()
653
+ }).strict(), en = b.object({
649
654
  data: b.object({ measure: O.omit({ dataLabels: !0 }) }).strict(),
650
655
  filterGroup: k.optional(),
651
656
  type: b.literal("number"),
652
657
  version: b.literal(1)
653
- }).strict(), $t = S(Oe.pick({
658
+ }).strict(), tn = S(ce.pick({
654
659
  endDateLabel: !0,
655
660
  pickerState: !0,
656
661
  pickerType: !0,
@@ -659,32 +664,32 @@ var ft = b.object({
659
664
  startDateLabel: !0,
660
665
  timePickerVisibility: !0,
661
666
  weekStart: !0
662
- }).partial()), en = b.object({
667
+ }).partial()), nn = b.object({
663
668
  data: b.object({ field: D.omit({
664
669
  format: !0,
665
670
  showNullValues: !0,
666
671
  temporalGrouping: !0
667
672
  }) }).strict(),
668
- settings: $t.optional(),
673
+ settings: tn.optional(),
669
674
  type: b.literal("date-picker"),
670
675
  version: b.literal(1)
671
- }).strict(), tn = b.object({
676
+ }).strict(), rn = b.object({
672
677
  settings: b.object({ url: b.string().url().nullable() }).strict(),
673
678
  type: b.literal("iframe"),
674
679
  version: b.literal(1)
675
- }).strict(), nn = b.object({
680
+ }).strict(), an = b.object({
676
681
  settings: S(b.object({
677
- blur: f.shape.blur.optional(),
678
- fit: f.shape.image.unwrap().shape.imageFit.optional(),
679
- opacity: f.shape.opacity.optional(),
680
- saturation: f.shape.saturation.optional(),
681
- shadow: f.shape.shadow.optional(),
682
- source: Ae.optional()
682
+ blur: p.shape.blur.optional(),
683
+ fit: p.shape.image.unwrap().shape.imageFit.optional(),
684
+ opacity: p.shape.opacity.optional(),
685
+ saturation: p.shape.saturation.optional(),
686
+ shadow: p.shape.shadow.optional(),
687
+ source: je.optional()
683
688
  }).strict()),
684
689
  type: b.literal("image"),
685
690
  version: b.literal(1)
686
- }).strict(), rn = b.object({
687
- settings: S(Ce.pick({
691
+ }).strict(), on = b.object({
692
+ settings: S(ve.pick({
688
693
  backgroundColor: !0,
689
694
  backgroundType: !0,
690
695
  borderEnabled: !0,
@@ -701,7 +706,7 @@ var ft = b.object({
701
706
  }).partial().strict()),
702
707
  type: b.literal("shape"),
703
708
  version: b.literal(1)
704
- }).strict(), z = ge.shape.simpleTextObjectSettings, an = b.object({
709
+ }).strict(), z = _e.shape.simpleTextObjectSettings, sn = b.object({
705
710
  settings: S(b.object({
706
711
  align: z.shape.align.optional(),
707
712
  content: b.string().optional(),
@@ -715,24 +720,24 @@ var ft = b.object({
715
720
  }).strict()),
716
721
  type: b.literal("simpleTextObject"),
717
722
  version: b.literal(1)
718
- }).strict(), on = b.object({
723
+ }).strict(), cn = b.object({
719
724
  settings: S(b.object({
720
- customLabel: p.shape.commonSettings.shape.customLabel.optional(),
721
- hideLabel: p.shape.commonSettings.shape.hideLabel.optional(),
722
- inputType: p.shape.type.optional(),
723
- placeholder: p.shape.commonSettings.shape.placeholder.optional(),
724
- responsive: p.shape.commonSettings.shape.responsive.optional(),
725
- variableId: p.shape.commonSettings.shape.variableId.optional()
725
+ customLabel: h.shape.commonSettings.shape.customLabel.optional(),
726
+ hideLabel: h.shape.commonSettings.shape.hideLabel.optional(),
727
+ inputType: h.shape.type.optional(),
728
+ placeholder: h.shape.commonSettings.shape.placeholder.optional(),
729
+ responsive: h.shape.commonSettings.shape.responsive.optional(),
730
+ variableId: h.shape.commonSettings.shape.variableId.optional()
726
731
  }).strict()),
727
732
  type: b.literal("atomic-input"),
728
733
  version: b.literal(1)
729
- }).strict(), sn = b.object({
734
+ }).strict(), ln = b.object({
730
735
  data: b.object({ field: D.omit({
731
736
  format: !0,
732
737
  showNullValues: !0,
733
738
  temporalGrouping: !0
734
739
  }) }).strict(),
735
- settings: S(xe.pick({
740
+ settings: S(Se.pick({
736
741
  layout: !0,
737
742
  quickSelect: !0,
738
743
  range: !0,
@@ -740,38 +745,38 @@ var ft = b.object({
740
745
  }).partial()).optional(),
741
746
  type: b.literal("slider"),
742
747
  version: b.literal(1)
743
- }).strict(), cn = D.extend({ role: b.literal("dimension") }), B = O.omit({ dataLabels: !0 }), ln = B.extend({ role: b.literal("measure") }), un = b.object({
744
- columns: b.array(b.discriminatedUnion("role", [cn, ln])).min(1),
748
+ }).strict(), un = D.extend({ role: b.literal("dimension") }), B = O.omit({ dataLabels: !0 }), dn = B.extend({ role: b.literal("measure") }), fn = b.object({
749
+ columns: b.array(b.discriminatedUnion("role", [un, dn])).min(1),
745
750
  structure: b.literal("normal").optional()
746
- }).strict(), dn = b.object({
751
+ }).strict(), pn = b.object({
747
752
  dimensions: b.array(D).min(1),
748
753
  measures: b.array(B).min(1),
749
754
  structure: b.literal("expandable")
750
- }).strict(), fn = b.object({
755
+ }).strict(), mn = b.object({
751
756
  columnDimensions: b.array(D).min(1),
752
757
  measures: b.array(B).min(1),
753
758
  rowDimensions: b.array(D).min(1),
754
759
  structure: b.literal("pivot")
755
- }).strict(), pn = b.union([
756
- un,
757
- dn,
758
- fn
759
- ]), mn = b.object({
760
+ }).strict(), hn = b.union([
761
+ fn,
762
+ pn,
763
+ mn
764
+ ]), gn = b.object({
760
765
  applyTo: _.shape.applyTo,
761
766
  enabled: _.shape.enabled,
762
767
  showRecordsCount: _.shape.showRecordsCount,
763
768
  style: b.object({
764
- backgroundColor: g.shape.backgroundColor.optional(),
765
- fontColor: g.shape.fontColor.optional(),
766
- fontStyle: h.optional(),
767
- position: g.shape.position.optional(),
768
- responsiveHeight: g.shape.responsive
769
+ backgroundColor: m.shape.backgroundColor.optional(),
770
+ fontColor: m.shape.fontColor.optional(),
771
+ fontStyle: g.optional(),
772
+ position: m.shape.position.optional(),
773
+ responsiveHeight: m.shape.responsive
769
774
  }).strict().optional()
770
- }).strict(), hn = b.object({
775
+ }).strict(), _n = b.object({
771
776
  background: b.object({
772
- color: m.optional(),
773
- evenColor: m.optional(),
774
- oddColor: m.optional(),
777
+ color: i.optional(),
778
+ evenColor: i.optional(),
779
+ oddColor: i.optional(),
775
780
  type: b.enum([
776
781
  "none",
777
782
  "single",
@@ -779,10 +784,10 @@ var ft = b.object({
779
784
  ])
780
785
  }).strict().optional(),
781
786
  body: b.object({
782
- fontColor: m.optional(),
787
+ fontColor: i.optional(),
783
788
  fontFamily: b.string().trim().min(1).optional(),
784
789
  fontSize: b.number().positive().optional(),
785
- fontStyle: h.optional(),
790
+ fontStyle: g.optional(),
786
791
  horizontalAlign: b.enum([
787
792
  "auto",
788
793
  "center",
@@ -797,8 +802,8 @@ var ft = b.object({
797
802
  ]).optional()
798
803
  }).strict().optional(),
799
804
  borders: b.object({
800
- color: m.optional(),
801
- dividerColor: m.optional(),
805
+ color: i.optional(),
806
+ dividerColor: i.optional(),
802
807
  dividers: b.enum([
803
808
  "all",
804
809
  "auto",
@@ -816,41 +821,41 @@ var ft = b.object({
816
821
  strokeWidth: b.number().nonnegative().optional()
817
822
  }).strict().optional(),
818
823
  header: b.object({
819
- backgroundColor: m.optional(),
820
- borderColor: m.optional(),
821
- fontColor: m.optional(),
824
+ backgroundColor: i.optional(),
825
+ borderColor: i.optional(),
826
+ fontColor: i.optional(),
822
827
  fontFamily: b.string().trim().min(1).optional(),
823
828
  fontSize: b.number().positive().optional(),
824
- fontStyle: h.optional(),
829
+ fontStyle: g.optional(),
825
830
  responsiveHeight: b.boolean().optional()
826
831
  }).strict().optional(),
827
832
  highlight: b.object({
828
- backgroundColor: m.optional(),
833
+ backgroundColor: i.optional(),
829
834
  mode: b.enum([
830
835
  "column",
831
836
  "none",
832
837
  "row",
833
838
  "row-and-column"
834
839
  ]),
835
- textColor: m.optional()
840
+ textColor: i.optional()
836
841
  }).strict().optional(),
837
842
  layout: b.object({
838
843
  columnWidthBehavior: b.enum(["responsive", "static"]).optional(),
839
844
  rowHeight: b.number().positive().optional()
840
845
  }).strict().optional()
841
- }).strict(), gn = b.object({
842
- data: pn,
846
+ }).strict(), vn = b.object({
847
+ data: hn,
843
848
  filterGroup: k.optional(),
844
849
  limiting: b.object({ queryLimit: b.number().int().positive().optional() }).strict().optional(),
845
- presentation: hn.optional(),
850
+ presentation: _n.optional(),
846
851
  sorting: b.array(A).optional(),
847
- totals: mn.optional(),
852
+ totals: gn.optional(),
848
853
  type: b.literal("table"),
849
854
  version: b.literal(1)
850
- }).strict(), V = (e) => typeof e == "object" && !!e && !Array.isArray(e), _n = (e) => {
855
+ }).strict(), V = (e) => typeof e == "object" && !!e && !Array.isArray(e), yn = (e) => {
851
856
  let t = e.fieldKey ?? e.key;
852
857
  return typeof t == "string" ? t : void 0;
853
- }, vn = (e) => {
858
+ }, bn = (e) => {
854
859
  if (Array.isArray(e)) return e;
855
860
  if (!V(e)) throw Error("Available field metadata must be an array or an object.");
856
861
  return [
@@ -863,7 +868,7 @@ var ft = b.object({
863
868
  if (!Array.isArray(n)) throw Error(`Available field metadata "${t}" must be an array.`);
864
869
  return n;
865
870
  });
866
- }, yn = (e, t) => {
871
+ }, xn = (e, t) => {
867
872
  let n = e.type;
868
873
  if (!(n === "dimension" && V(e.dimension) || n === "measure" && V(e.measure) || n === "calculation" && V(e.calculation))) return;
869
874
  let r = E.safeParse({
@@ -874,11 +879,11 @@ var ft = b.object({
874
879
  });
875
880
  if (!r.success) throw Error(`Invalid available semantic item at index ${t}: ${r.error.message}`);
876
881
  return r.data;
877
- }, bn = (e, t) => {
882
+ }, Sn = (e, t) => {
878
883
  if (!V(e)) throw Error(`Available field at index ${t} must be an object.`);
879
884
  let n = E.safeParse(e);
880
885
  if (n.success) return n.data;
881
- let r = yn(e, t);
886
+ let r = xn(e, t);
882
887
  if (r) return r;
883
888
  let i = Array.isArray(e.aggregations) ? e.aggregations : Array.isArray(e.aggregators) ? e.aggregators : [], a = E.safeParse({
884
889
  aggregations: i.map((e) => V(e) ? {
@@ -887,7 +892,7 @@ var ft = b.object({
887
892
  resultType: e.resultType
888
893
  } : e),
889
894
  dataType: e.dataType,
890
- fieldKey: _n(e),
895
+ fieldKey: yn(e),
891
896
  isManualData: e.isManualData,
892
897
  kind: "field",
893
898
  name: e.name,
@@ -895,35 +900,35 @@ var ft = b.object({
895
900
  });
896
901
  if (!a.success) throw Error(`Invalid available field at index ${t}: ${a.error.message}`);
897
902
  return a.data;
898
- }, xn = (e) => {
899
- let t = vn(e).map(bn), n = /* @__PURE__ */ new Map();
903
+ }, Cn = (e) => {
904
+ let t = bn(e).map(Sn), n = /* @__PURE__ */ new Map();
900
905
  return t.forEach((e, t) => {
901
906
  let r = n.get(e.fieldKey);
902
907
  if (r !== void 0) throw Error(`Duplicate available field key "${e.fieldKey}" at indexes ${r} and ${t}.`);
903
908
  n.set(e.fieldKey, t);
904
909
  }), t;
905
- }, Sn = (e) => e.kind === "field" ? [...new Set(e.aggregations.flatMap((e) => [e.name, ...e.distinct ? [`${e.name}_DISTINCT`] : []]))] : [], Cn = (e, t) => e.kind === "field" || t === "dimension" && e.kind === "dimension" || t === "measure" && (e.kind === "measure" || e.kind === "calculation"), wn = (e) => {
910
+ }, wn = (e) => e.kind === "field" ? [...new Set(e.aggregations.flatMap((e) => [e.name, ...e.distinct ? [`${e.name}_DISTINCT`] : []]))] : [], Tn = (e, t) => e.kind === "field" || t === "dimension" && e.kind === "dimension" || t === "measure" && (e.kind === "measure" || e.kind === "calculation"), En = (e) => {
906
911
  if (e.kind !== "dimension") return e.kind;
907
- }, Tn = (e) => ({
908
- ...t(e.item),
909
- id: e.item.id ?? e.fieldKey
910
- }), En = (t) => t.map((t) => t.kind === "dimension" ? e(Tn(t)) : t.kind === "measure" || t.kind === "calculation" ? c(Tn(t)) : {
911
- aggregators: n(t.aggregations.map((e) => ({
912
+ }, Dn = (t) => ({
913
+ ...e(t.item),
914
+ id: t.item.id ?? t.fieldKey
915
+ }), On = (e) => e.map((e) => e.kind === "dimension" ? u(Dn(e)) : e.kind === "measure" || e.kind === "calculation" ? l(Dn(e)) : {
916
+ aggregators: d(e.aggregations.map((e) => ({
912
917
  distinct: e.distinct ?? !1,
913
918
  name: e.name,
914
919
  resultType: e.resultType
915
920
  }))),
916
- dataType: t.dataType,
917
- isManualData: t.isManualData,
918
- key: t.fieldKey,
919
- name: t.name,
920
- view: t.view,
921
- views: [t.view]
922
- }), Dn = (e, t) => {
921
+ dataType: e.dataType,
922
+ isManualData: e.isManualData,
923
+ key: e.fieldKey,
924
+ name: e.name,
925
+ view: e.view,
926
+ views: [e.view]
927
+ }), kn = (e, t) => {
923
928
  let n = Math.min(e.length, t.length), r = 0;
924
929
  for (; r < n && e[r].toLocaleLowerCase() === t[r].toLocaleLowerCase();) r += 1;
925
930
  return r;
926
- }, On = (e, t) => [...t].sort((t, n) => Dn(e, n.fieldKey) - Dn(e, t.fieldKey) || t.fieldKey.localeCompare(n.fieldKey)).slice(0, 5).map((e) => e.fieldKey), kn = [
931
+ }, An = (e, t) => [...t].sort((t, n) => kn(e, n.fieldKey) - kn(e, t.fieldKey) || t.fieldKey.localeCompare(n.fieldKey)).slice(0, 5).map((e) => e.fieldKey), jn = [
927
932
  x.FieldType.DATE,
928
933
  x.FieldType.TIME,
929
934
  x.FieldType.TIMESTAMP,
@@ -933,14 +938,14 @@ var ft = b.object({
933
938
  code: e,
934
939
  message: n,
935
940
  path: t
936
- }), An = (e) => Sn(e).filter((e) => !!r(e)), U = (e, t) => {
941
+ }), Mn = (e) => wn(e).filter((e) => !!o(e)), U = (e, t) => {
937
942
  let n = t.find((t) => t.fieldKey === e.fieldKey);
938
- return n?.kind === "field" ? An(n).find((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) : void 0;
939
- }, jn = (e, t) => {
943
+ return n?.kind === "field" ? Mn(n).find((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) : void 0;
944
+ }, Nn = (e, t) => {
940
945
  let n = t.find((t) => t.fieldKey === e.fieldKey);
941
946
  return n?.kind === "measure" ? n.item.measure.aggregation : U(e, t);
942
- }, Mn = (e, t, n = {}) => {
943
- let r = t.find((t) => t.fieldKey === e.fieldKey), i = r ? wn(r) : void 0, a = U(e, t);
947
+ }, Pn = (e, t, n = {}) => {
948
+ let r = t.find((t) => t.fieldKey === e.fieldKey), i = r ? En(r) : void 0, a = U(e, t);
944
949
  return {
945
950
  ...n,
946
951
  key: e.fieldKey,
@@ -949,28 +954,28 @@ var ft = b.object({
949
954
  };
950
955
  }, W = (e, t, n, r) => {
951
956
  let i = t.find((t) => t.fieldKey === e.fieldKey);
952
- if (!i) return [H("unknown_field_key", [...n, "fieldKey"], `Field key "${e.fieldKey}" is not available.`, On(e.fieldKey, t))];
953
- if (!Cn(i, r)) return [H("invalid_field_role", [...n, "fieldKey"], `Available item "${e.fieldKey}" of kind "${i.kind}" cannot be used as a ${r}.`)];
954
- if (r !== "measure") return e.temporalGrouping ? Pn(e, t, n, kn, "a temporally grouped dimension") : [];
957
+ if (!i) return [H("unknown_field_key", [...n, "fieldKey"], `Field key "${e.fieldKey}" is not available.`, An(e.fieldKey, t))];
958
+ if (!Tn(i, r)) return [H("invalid_field_role", [...n, "fieldKey"], `Available item "${e.fieldKey}" of kind "${i.kind}" cannot be used as a ${r}.`)];
959
+ if (r !== "measure") return e.temporalGrouping ? In(e, t, n, jn, "a temporally grouped dimension") : [];
955
960
  if (i.kind !== "field") return e.aggregation === void 0 ? [] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation must be omitted for semantic ${i.kind} "${e.fieldKey}".`)];
956
- let a = An(i);
961
+ let a = Mn(i);
957
962
  return e.aggregation ? a.some((t) => t.toLocaleUpperCase() === e.aggregation?.toLocaleUpperCase()) ? [] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation "${e.aggregation}" is not available for field key "${e.fieldKey}".`, a)] : [H("invalid_aggregation", [...n, "aggregation"], `Aggregation is required for raw field "${e.fieldKey}" when it is used as a measure.`, a)];
958
- }, Nn = (e, t, n, r) => e.flatMap((e, i) => W(e, t, [...n, i], r)), Pn = (e, t, n, r, i) => {
963
+ }, Fn = (e, t, n, r) => e.flatMap((e, i) => W(e, t, [...n, i], r)), In = (e, t, n, r, i) => {
959
964
  let a = t.find((t) => t.fieldKey === e.fieldKey);
960
965
  return a?.kind !== "field" || r.includes(a.dataType) ? [] : [H("invalid_field_role", [...n, "fieldKey"], `Raw field "${e.fieldKey}" has data type "${a.dataType}" and cannot be used as ${i}.`, [...r])];
961
- }, Fn = (e, t, n = ["filterGroup"]) => e ? e.filters.flatMap((e, r) => {
966
+ }, Ln = (e, t, n = ["filterGroup"]) => e ? e.filters.flatMap((e, r) => {
962
967
  let i = [
963
968
  ...n,
964
969
  "filters",
965
970
  r
966
971
  ];
967
- if ("filters" in e) return Fn(e, t, i);
972
+ if ("filters" in e) return Ln(e, t, i);
968
973
  let a = W({
969
974
  fieldKey: e.fieldKey,
970
975
  ref: `filter:${r}`
971
976
  }, t, i, "dimension");
972
- return a.length > 0 ? a : In(e.fieldKey, t, i);
973
- }) : [], In = (e, t, n) => {
977
+ return a.length > 0 ? a : Rn(e.fieldKey, t, i);
978
+ }) : [], Rn = (e, t, n) => {
974
979
  let r = t.find((t) => t.fieldKey === e);
975
980
  return r?.kind !== "field" || r.dataType === void 0 || r.dataType === x.FieldType.STRING ? [] : [H("invalid_filter", [...n, "fieldKey"], `Static filters only support string fields, but "${e}" has data type "${r.dataType}". Filter a string field instead.`)];
976
981
  }, G = (e) => e.reduce((e, t) => typeof t == "number" ? `${e}[${t}]` : /^[A-Za-z_$][\w$]*$/.test(t) ? e ? `${e}.${t}` : t : `${e}[${JSON.stringify(t)}]`, "") || "definition", K = (e) => {
@@ -980,14 +985,14 @@ var ft = b.object({
980
985
  } catch {
981
986
  return String(e);
982
987
  }
983
- }, q = (e, t) => t.reduce((e, t) => typeof e == "object" && e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, e), Ln = (e) => {
988
+ }, q = (e, t) => t.reduce((e, t) => typeof e == "object" && e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0, e), zn = (e) => {
984
989
  if (e.code === "invalid_value") return e.values;
985
990
  if (e.code !== "invalid_union" || e.errors.length === 0) return;
986
- let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ? Ln(e[0]) : void 0);
991
+ let t = e.errors.map((e) => e.length === 1 && e[0].path.length === 0 ? zn(e[0]) : void 0);
987
992
  return t.every((e) => e !== void 0) ? [...new Set(t.flat())] : void 0;
988
- }, Rn = (e) => e.filter((e) => typeof e != "symbol"), zn = (e, t, n = []) => {
989
- let r = (e, n) => e.code === "invalid_union" && e.path.length === 0 ? e.errors.length > 0 && e.errors.every((e) => e.some((e) => r(e, n))) : e.code === "invalid_value" && e.path.length === 1 && q(t, [...n, ...Rn(e.path)]) !== void 0, i = (e, a) => {
990
- let o = [...a, ...Rn(e.path)];
993
+ }, Bn = (e) => e.filter((e) => typeof e != "symbol"), Vn = (e, t, n = []) => {
994
+ let r = (e, n) => e.code === "invalid_union" && e.path.length === 0 ? e.errors.length > 0 && e.errors.every((e) => e.some((e) => r(e, n))) : e.code === "invalid_value" && e.path.length === 1 && q(t, [...n, ...Bn(e.path)]) !== void 0, i = (e, a) => {
995
+ let o = [...a, ...Bn(e.path)];
991
996
  if (e.code === "unrecognized_keys") return e.keys.map((r) => {
992
997
  let i = [
993
998
  ...n,
@@ -1004,7 +1009,7 @@ var ft = b.object({
1004
1009
  }
1005
1010
  };
1006
1011
  });
1007
- let s = [...n, ...o], c = q(t, o), l = Ln(e), u = {
1012
+ let s = [...n, ...o], c = q(t, o), l = zn(e), u = {
1008
1013
  received: c,
1009
1014
  zodCode: e.code
1010
1015
  }, d = l ? `Unsupported value ${K(c)}. Allowed values: ${l.map(K).join(", ")}.` : `${e.message}. Received: ${K(c)}.`;
@@ -1024,8 +1029,8 @@ var ft = b.object({
1024
1029
  };
1025
1030
  return e.issues.flatMap((e) => i(e, []));
1026
1031
  };
1027
- l();
1028
- var Bn = (e, t) => {
1032
+ a();
1033
+ var Hn = (e, t) => {
1029
1034
  let n = "legend" in e && !!e.legend, r = t.position !== void 0 || t.title !== void 0, i = [];
1030
1035
  return t.visible !== void 0 && (t.visible || r || n) ? i.push({
1031
1036
  name: "setLegendEnabled",
@@ -1035,7 +1040,7 @@ var Bn = (e, t) => {
1035
1040
  payload: !0
1036
1041
  }), t.position === void 0 ? (t.visible === !0 || r && !n) && i.push({
1037
1042
  name: "setLegendPosition",
1038
- payload: a.Right
1043
+ payload: c.Right
1039
1044
  }) : i.push({
1040
1045
  name: "setLegendPosition",
1041
1046
  payload: t.position
@@ -1048,7 +1053,7 @@ var Bn = (e, t) => {
1048
1053
  message: n,
1049
1054
  path: t,
1050
1055
  ...r
1051
- }), Vn = (e, t, n, r, i, a) => ({
1056
+ }), Un = (e, t, n, r, i, a) => ({
1052
1057
  name: e,
1053
1058
  payload: {
1054
1059
  ...Y(t),
@@ -1064,7 +1069,7 @@ var Bn = (e, t) => {
1064
1069
  ref: n,
1065
1070
  kind: t.kind
1066
1071
  }
1067
- }), Hn = (e, t, n, r, i, a, o) => ({
1072
+ }), Wn = (e, t, n, r, i, a, o) => ({
1068
1073
  name: e,
1069
1074
  payload: {
1070
1075
  name: t,
@@ -1083,7 +1088,7 @@ var Bn = (e, t) => {
1083
1088
  }), Y = (e) => ({
1084
1089
  dataItemInternalKey: e.dataItemInternalKey,
1085
1090
  dataItemUniqueSignature: e.dataItemUniqueSignature
1086
- }), Un = (e) => {
1091
+ }), Gn = (e) => {
1087
1092
  let t = [], n = /* @__PURE__ */ new Set();
1088
1093
  return e.forEach(({ items: e, path: r }) => {
1089
1094
  e.forEach((e, i) => {
@@ -1094,15 +1099,15 @@ var Bn = (e, t) => {
1094
1099
  ], `Reference "${e.ref}" is duplicated.`)), n.add(e.ref);
1095
1100
  });
1096
1101
  }), t;
1097
- }, Wn = (e, t) => {
1102
+ }, Kn = (e, t) => {
1098
1103
  let n = e, r = n.referencedData;
1099
1104
  return t.every((e) => !Array.isArray(n[e]) || n[e].length === 0) && (typeof r != "object" || !r || Object.keys(r).length === 0);
1100
- }, Gn = (e, t) => ({
1101
- availableFields: En(e.availableFields),
1105
+ }, qn = (e, t) => ({
1106
+ availableFields: On(e.availableFields),
1102
1107
  input: e,
1103
1108
  resolvedRefs: {},
1104
1109
  vSpec: t
1105
- }), Kn = (e, t, n, r, i) => ({
1110
+ }), Jn = (e, t, n, r, i) => ({
1106
1111
  name: e,
1107
1112
  payload: {
1108
1113
  ...Y(t),
@@ -1114,7 +1119,7 @@ var Bn = (e, t) => {
1114
1119
  ref: n,
1115
1120
  kind: t.kind
1116
1121
  }
1117
- }), qn = (e) => "value" in e ? { value: e.value } : "values" in e ? {
1122
+ }), Yn = (e) => "value" in e ? { value: e.value } : "values" in e ? {
1118
1123
  secondValue: e.values.join(","),
1119
1124
  value: ","
1120
1125
  } : "valueFrom" in e ? {
@@ -1124,14 +1129,14 @@ var Bn = (e, t) => {
1124
1129
  filters: e.filters.map((e) => "filters" in e ? X(e) : {
1125
1130
  fieldKey: e.fieldKey,
1126
1131
  operator: e.operator,
1127
- values: qn(e)
1132
+ values: Yn(e)
1128
1133
  }),
1129
1134
  operator: e.operator
1130
- }), Jn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [J("unknown_alias", [
1135
+ }), Xn = (e, t) => (e ?? []).flatMap((e, n) => t.includes(e.by) ? [] : [J("unknown_alias", [
1131
1136
  "sorting",
1132
1137
  n,
1133
1138
  "by"
1134
- ], `Reference "${e.by}" does not exist.`, { allowedValues: t })]), Z = ["presentation", "coloring"], Yn = (e, t, n) => [...(e?.overwrites ?? []).flatMap(({ dimension: e }, n) => e === void 0 || t.includes(e) ? [] : [J("unknown_alias", [
1139
+ ], `Reference "${e.by}" does not exist.`, { allowedValues: t })]), Z = ["presentation", "coloring"], Zn = (e, t, n) => [...(e?.overwrites ?? []).flatMap(({ dimension: e }, n) => e === void 0 || t.includes(e) ? [] : [J("unknown_alias", [
1135
1140
  ...Z,
1136
1141
  "overwrites",
1137
1142
  n,
@@ -1141,7 +1146,7 @@ var Bn = (e, t) => {
1141
1146
  "rules",
1142
1147
  t,
1143
1148
  "measure"
1144
- ], `Measure reference "${e}" does not exist.`, { allowedValues: n })])], Xn = (e, t) => {
1149
+ ], `Measure reference "${e}" does not exist.`, { allowedValues: n })])], Qn = (e, t) => {
1145
1150
  let n = t.safeParse(e.vSpec);
1146
1151
  return n.success ? {
1147
1152
  resolvedRefs: e.resolvedRefs,
@@ -1151,10 +1156,10 @@ var Bn = (e, t) => {
1151
1156
  issues: [J("invalid_compiled_vspec", [], "Compiled vSpec failed final validation.", { details: { issues: n.error.issues } })],
1152
1157
  success: !1
1153
1158
  };
1154
- }, Q = (e) => "startsAtZero" in e ? {} : e, Zn = (e) => {
1155
- let { max: t, min: n } = Q(e);
1156
- return n !== void 0 && t !== void 0 ? u.MinMax : n === void 0 ? t === void 0 ? u.Auto : u.Max : u.Min;
1157
- }, Qn = (e) => {
1159
+ }, Q = (e) => "startsAtZero" in e ? {} : e, $n = (e) => {
1160
+ let { max: n, min: r } = Q(e);
1161
+ return r !== void 0 && n !== void 0 ? t.MinMax : r === void 0 ? n === void 0 ? t.Auto : t.Max : t.Min;
1162
+ }, er = (e) => {
1158
1163
  for (let [t, n] of Object.entries(e ?? {})) {
1159
1164
  let { max: e, min: r } = n?.range ? Q(n.range) : {};
1160
1165
  if (r !== void 0 && e !== void 0 && r >= e) return J("invalid_structure", [
@@ -1165,7 +1170,7 @@ var Bn = (e, t) => {
1165
1170
  "min"
1166
1171
  ], `Axis range min (${r}) must be less than max (${e}).`);
1167
1172
  }
1168
- }, $n = (e, t) => {
1173
+ }, tr = (e, t) => {
1169
1174
  let n = [];
1170
1175
  t.inverted !== void 0 && n.push({
1171
1176
  name: y.SET_INVERT_AXIS,
@@ -1180,7 +1185,7 @@ var Bn = (e, t) => {
1180
1185
  name: y.SET_AXIS_RANGE_OPTION,
1181
1186
  payload: {
1182
1187
  axisName: e,
1183
- axisRangeOption: Zn(r)
1188
+ axisRangeOption: $n(r)
1184
1189
  }
1185
1190
  });
1186
1191
  let { max: t, min: i } = Q(r);
@@ -1205,7 +1210,7 @@ var Bn = (e, t) => {
1205
1210
  });
1206
1211
  }
1207
1212
  return n;
1208
- }, er = (e) => {
1213
+ }, nr = (e) => {
1209
1214
  let t = Object.entries(e).find(([, e]) => e.success === !1);
1210
1215
  return t ? {
1211
1216
  id: t[0],
@@ -1215,11 +1220,11 @@ var Bn = (e, t) => {
1215
1220
  let r = t.map((e, t) => ({
1216
1221
  ...e,
1217
1222
  id: e.id ?? `definition:${t}`
1218
- })), i = await je(e.vSpec, e.availableFields, r.map(({ id: e, name: t, payload: n }) => ({
1223
+ })), i = await Me(e.vSpec, e.availableFields, r.map(({ id: e, name: t, payload: n }) => ({
1219
1224
  id: e,
1220
1225
  name: t,
1221
1226
  payload: n
1222
- })), e.input.variables ?? [], [], e.input.theme), a = er(i.results);
1227
+ })), e.input.variables ?? [], [], e.input.theme), a = nr(i.results);
1223
1228
  if (!a) return {
1224
1229
  state: {
1225
1230
  ...e,
@@ -1241,7 +1246,7 @@ var Bn = (e, t) => {
1241
1246
  } }),
1242
1247
  success: !1
1243
1248
  };
1244
- }, tr = (e, t) => {
1249
+ }, rr = (e, t) => {
1245
1250
  if (!e || typeof e.data != "object" || e.data === null || !("dataItem" in e.data)) return;
1246
1251
  let n = e.data.dataItem;
1247
1252
  if (!(typeof n != "object" || !n || !("internalKey" in n) || typeof n.internalKey != "string" || !("uniqueSignature" in n) || typeof n.uniqueSignature != "string")) return {
@@ -1249,12 +1254,12 @@ var Bn = (e, t) => {
1249
1254
  dataItemUniqueSignature: n.uniqueSignature,
1250
1255
  kind: t
1251
1256
  };
1252
- }, nr = async (e, t, n, r, i, a) => {
1253
- let o = `${n}:${t.ref}`, s = await je(e.vSpec, e.availableFields, [{
1257
+ }, ir = async (e, t, n, r, i, a) => {
1258
+ let o = `${n}:${t.ref}`, s = await Me(e.vSpec, e.availableFields, [{
1254
1259
  id: o,
1255
1260
  name: r,
1256
1261
  payload: i
1257
- }], e.input.variables ?? [], [], e.input.theme), c = er(s.results), l = tr(s.results[o], n);
1262
+ }], e.input.variables ?? [], [], e.input.theme), c = nr(s.results), l = rr(s.results[o], n);
1258
1263
  return c || !l ? {
1259
1264
  issue: J("operation_failed", a, c?.result.error ?? `${n} operation did not return the created data-item identity.`),
1260
1265
  success: !1
@@ -1269,7 +1274,7 @@ var Bn = (e, t) => {
1269
1274
  },
1270
1275
  success: !0
1271
1276
  };
1272
- }, rr = (e, t, n, r) => {
1277
+ }, ar = (e, t, n, r) => {
1273
1278
  let i = [
1274
1279
  "formatType",
1275
1280
  "formatString",
@@ -1281,23 +1286,23 @@ var Bn = (e, t) => {
1281
1286
  let o = e.resolvedRefs[t.ref];
1282
1287
  return i.flatMap((e) => {
1283
1288
  let i = t.format?.[e], s = n[e];
1284
- return i !== void 0 && s ? [Vn(s, o, t.ref, t.path ?? [...r, a], e, i)] : [];
1289
+ return i !== void 0 && s ? [Un(s, o, t.ref, t.path ?? [...r, a], e, i)] : [];
1285
1290
  });
1286
1291
  }), r);
1287
- }, ir = (e, t, n, r) => $(e, t.flatMap((t, i) => t.temporalGrouping ? [Kn(n, e.resolvedRefs[t.ref], t.ref, t.path ?? [...r, i], t.temporalGrouping)] : []), r), ar = (e, t, n, r) => $(e, t.flatMap((t) => t.showNullValues === void 0 ? [] : [{
1292
+ }, or = (e, t, n, r) => $(e, t.flatMap((t, i) => t.temporalGrouping ? [Jn(n, e.resolvedRefs[t.ref], t.ref, t.path ?? [...r, i], t.temporalGrouping)] : []), r), sr = (e, t, n, r) => $(e, t.flatMap((t) => t.showNullValues === void 0 ? [] : [{
1288
1293
  name: n,
1289
1294
  payload: {
1290
1295
  ...Y(e.resolvedRefs[t.ref]),
1291
1296
  changes: { showNullValues: t.showNullValues }
1292
1297
  }
1293
- }]), r), or = (e, t) => t ? $(e, [{
1298
+ }]), r), cr = (e, t) => t ? $(e, [{
1294
1299
  id: "filterGroup",
1295
1300
  name: "setStaticFilterGroup",
1296
1301
  payload: X(t)
1297
1302
  }], ["filterGroup"]) : Promise.resolve({
1298
1303
  state: e,
1299
1304
  success: !0
1300
- }), sr = (e, t, n, r) => {
1305
+ }), lr = (e, t, n, r) => {
1301
1306
  if (!t?.length) return Promise.resolve({
1302
1307
  state: e,
1303
1308
  success: !0
@@ -1324,20 +1329,20 @@ var Bn = (e, t) => {
1324
1329
  enabled: t.enabled ?? !0
1325
1330
  }
1326
1331
  }))], ["sorting"]);
1327
- }, cr = (e, t) => {
1332
+ }, ur = (e, t) => {
1328
1333
  let n = [];
1329
1334
  return t?.overwrites && n.push({
1330
- name: ke.SET_COLORING_OVERWRITES,
1335
+ name: Ae.SET_COLORING_OVERWRITES,
1331
1336
  payload: { overwrites: t.overwrites.map(({ dimension: t, ...n }) => t === void 0 ? n : {
1332
1337
  ...n,
1333
1338
  dimension: Y(e.resolvedRefs[t])
1334
1339
  }) }
1335
1340
  }), t?.rules && n.push({
1336
- name: ke.SET_COLORING_RULES,
1341
+ name: Ae.SET_COLORING_RULES,
1337
1342
  payload: { rules: t.rules.map(({ measure: t, ...n }) => ({
1338
1343
  ...n,
1339
1344
  measure: Y(e.resolvedRefs[t])
1340
1345
  })) }
1341
1346
  }), $(e, n, Z);
1342
1347
  };
1343
- export { Et as $, Nn as A, rn as B, Un as C, Mn as D, U as E, gn as F, Rt as G, an as H, on as I, Tt as J, Pt as K, en as L, Pn as M, xn as N, jn as O, En as P, xt as Q, tn as R, Yn as S, zn as T, Qt as U, sn as V, Zt as W, wt as X, yt as Y, St as Z, Qn as _, rr as a, At as at, X as b, $n as c, E as ct, J as d, Ct as et, Bn as f, Xn as g, $ as h, or as i, Ot as it, Fn as j, W as k, Vn as l, Ne as lt, Kn as m, cr as n, bt as nt, sr as o, jt as ot, Hn as p, vt as q, ar as r, Dt as rt, ir as s, ht as st, nr as t, kt as tt, Gn as u, Wn as v, G as w, Jn as x, Y as y, nn as z };
1348
+ export { Ot as $, Fn as A, on as B, Gn as C, Pn as D, U as E, vn as F, Bt as G, sn as H, cn as I, Dt as J, It as K, nn as L, In as M, Cn as N, Nn as O, On as P, Ct as Q, rn as R, Zn as S, Vn as T, en as U, ln as V, $t as W, Et as X, xt as Y, wt as Z, er as _, ar as a, Mt as at, X as b, tr as c, E as ct, J as d, Tt as et, Hn as f, Qn as g, $ as h, cr as i, At as it, Ln as j, W as k, Un as l, Pe as lt, Jn as m, ur as n, St as nt, lr as o, Nt as ot, Wn as p, bt as q, sr as r, kt as rt, or as s, _t as st, ir as t, jt as tt, qn as u, Kn as v, G as w, Xn as x, Y as y, an as z };