@astrato-io/visualizations 0.0.0-stage → 0.6.4

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 (145) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +93 -0
  3. package/README.md +843 -2
  4. package/THIRD_PARTY_NOTICES.md +8387 -0
  5. package/VISUALIZATION_DEFINITIONS.md +2378 -0
  6. package/chunks/LinearProgress-CUZ0D8_t.js +253 -0
  7. package/chunks/Radio-Ciu-F4CU.js +957 -0
  8. package/chunks/ToggleButton-BCJc3Jlc.js +153 -0
  9. package/chunks/_baseFlatten-DPXPOrea.js +7076 -0
  10. package/chunks/accessors-DemrDevR.js +128 -0
  11. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +55 -0
  12. package/chunks/bar.compiler-oqaPzIut.js +370 -0
  13. package/chunks/color-settings-ZIvgNTq1.js +10 -0
  14. package/chunks/coloring-C16AUZEi.js +663 -0
  15. package/chunks/data-item-resolution-1lvYB5ln.js +53 -0
  16. package/chunks/debounce-fn-CUixuz45.js +7 -0
  17. package/chunks/escobar-BGqT1EsE.js +34580 -0
  18. package/chunks/event-bus-KiSiCJrC.js +2683 -0
  19. package/chunks/events-WZut5Ow6.js +4 -0
  20. package/chunks/extend-BKUkc4_i.js +37 -0
  21. package/chunks/filter.compiler-CuLtc_02.js +60 -0
  22. package/chunks/filtering-Yq4DEa0t.js +953 -0
  23. package/chunks/gauge-target-type-BkKXAqkX.js +4 -0
  24. package/chunks/grouping-type-BX_9Ix5q.js +3 -0
  25. package/chunks/interfaces-VUY4_yVO.js +8742 -0
  26. package/chunks/line-settings-DfYTUyPz.js +4 -0
  27. package/chunks/line.compiler-BpA_6Tc7.js +188 -0
  28. package/chunks/metadata-CPXdYoln.js +28 -0
  29. package/chunks/number.compiler-DbkWcG4S.js +44 -0
  30. package/chunks/pie-uv42Eqal.js +10 -0
  31. package/chunks/range-DrzdfBX4.js +22 -0
  32. package/chunks/registry-CExpGJ1N.js +920 -0
  33. package/chunks/requirements-DNhuShLS.js +6 -0
  34. package/chunks/rolldown-runtime-DleVn1XH.js +28 -0
  35. package/chunks/set-coloring-datafield-B3uIS1Pe.js +8 -0
  36. package/chunks/shared-CKDL4hx9.js +1171 -0
  37. package/chunks/src-BC7cGcJ-.js +2024 -0
  38. package/chunks/src-BOS6SqkZ.js +67 -0
  39. package/chunks/src-C0LgoUWY.js +26105 -0
  40. package/chunks/src-Cum_2NLV.js +12145 -0
  41. package/chunks/src-D9XogOrc.js +422 -0
  42. package/chunks/src-Dun_jXtz.js +10295 -0
  43. package/chunks/src-DvX5LU9T.js +14742 -0
  44. package/chunks/standalone-87YV_m9n.js +687 -0
  45. package/chunks/standalone-BDCwI6Hn.js +4619 -0
  46. package/chunks/standalone-BH5NqDwp.js +1763 -0
  47. package/chunks/standalone-BLVAWLNJ.js +385 -0
  48. package/chunks/standalone-BPomtAVs.js +2 -0
  49. package/chunks/standalone-BXyBcUOQ.js +2 -0
  50. package/chunks/standalone-BYm1UjLr.js +140 -0
  51. package/chunks/standalone-BllF4rDp.js +383 -0
  52. package/chunks/standalone-BmfMt74U.js +726 -0
  53. package/chunks/standalone-BqWyrnZI.js +281 -0
  54. package/chunks/standalone-C85u7U6I.js +340 -0
  55. package/chunks/standalone-CCNtaJ7s.js +741 -0
  56. package/chunks/standalone-CDQnr6qT.js +345 -0
  57. package/chunks/standalone-CNyNHKVx.js +674 -0
  58. package/chunks/standalone-CY57qwZ-.js +1129 -0
  59. package/chunks/standalone-CZynjFG7.js +12979 -0
  60. package/chunks/standalone-D5vnf-9y.js +3943 -0
  61. package/chunks/standalone-DFPva_ku.js +299 -0
  62. package/chunks/standalone-DQxxNwF8.js +675 -0
  63. package/chunks/standalone-DS9T0FZ-.js +830 -0
  64. package/chunks/standalone-Dx3MLlrO.js +512 -0
  65. package/chunks/standalone-DzixzZAL.js +411 -0
  66. package/chunks/standalone-QJ1kKMnO.js +6 -0
  67. package/chunks/standalone-jiz0L2Dg.js +3855 -0
  68. package/chunks/standalone-lBm9hQ-q.js +179 -0
  69. package/chunks/standalone-rJ45Zfl1.js +68 -0
  70. package/chunks/stroke-dash-UgMEcCS4.js +6 -0
  71. package/chunks/table.compiler-BrXkm4Fz.js +213 -0
  72. package/chunks/toInteger-DVZr-D1j.js +11 -0
  73. package/chunks/treemap-x_zmJoG7.js +23 -0
  74. package/chunks/typeof-CJDtcySz.js +13 -0
  75. package/chunks/types-dVVCsDWD.js +4 -0
  76. package/chunks/ui-D1HQNIBy.js +54039 -0
  77. package/chunks/url-utils-B17gj_mr.js +5501 -0
  78. package/chunks/useFieldName-oqQ3bvnO.js +7 -0
  79. package/chunks/utils-Ba9T0TqC.js +31097 -0
  80. package/chunks/view-CLqWMV7Z.js +156 -0
  81. package/definitions.js +3 -0
  82. package/docs/operations/astrato-app-filter-bar.md +161 -0
  83. package/docs/operations/bar.md +7050 -0
  84. package/docs/operations/combo.md +5825 -0
  85. package/docs/operations/date-picker.md +644 -0
  86. package/docs/operations/distribution-gauge.md +3218 -0
  87. package/docs/operations/dot.md +5662 -0
  88. package/docs/operations/filter.md +1507 -0
  89. package/docs/operations/gauge.md +3452 -0
  90. package/docs/operations/heatMap.md +6026 -0
  91. package/docs/operations/histogram.md +1870 -0
  92. package/docs/operations/iframe.md +56 -0
  93. package/docs/operations/image.md +177 -0
  94. package/docs/operations/index.md +46 -0
  95. package/docs/operations/line.md +6468 -0
  96. package/docs/operations/number.md +3969 -0
  97. package/docs/operations/pie.md +6089 -0
  98. package/docs/operations/radar.md +4646 -0
  99. package/docs/operations/sankey.md +3210 -0
  100. package/docs/operations/scatter.md +6075 -0
  101. package/docs/operations/shape.md +315 -0
  102. package/docs/operations/simpleTextObject.md +706 -0
  103. package/docs/operations/slider.md +230 -0
  104. package/docs/operations/table.md +8790 -0
  105. package/docs/operations/tree.md +2874 -0
  106. package/docs/operations/treemap.md +3619 -0
  107. package/docs/operations/waterfall.md +2938 -0
  108. package/docs/operations/word-cloud.md +3071 -0
  109. package/getters.js +18 -0
  110. package/index.js +1183 -0
  111. package/metadata.js +20 -0
  112. package/operations.js +64 -0
  113. package/package.json +191 -4
  114. package/src/definitions/index.d.ts +2 -0
  115. package/src/definitions/shared/index.d.ts +5 -0
  116. package/src/definitions/shared/lib/available-fields.d.ts +36 -0
  117. package/src/definitions/shared/lib/compilers/index.d.ts +7 -0
  118. package/src/definitions/shared/lib/registry/compile.d.ts +2 -0
  119. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +587 -0
  120. package/src/definitions/shared/lib/registry/index.d.ts +3 -0
  121. package/src/definitions/shared/lib/registry/validation.d.ts +3 -0
  122. package/src/definitions/shared/lib/schemas/app-filter-bar.schema.d.ts +22 -0
  123. package/src/definitions/shared/lib/schemas/bar.schema.d.ts +73 -0
  124. package/src/definitions/shared/lib/schemas/broad-chart.schema.d.ts +68 -0
  125. package/src/definitions/shared/lib/schemas/common.schema.d.ts +304 -0
  126. package/src/definitions/shared/lib/schemas/filter.schema.d.ts +22 -0
  127. package/src/definitions/shared/lib/schemas/index.d.ts +9 -0
  128. package/src/definitions/shared/lib/schemas/line.schema.d.ts +72 -0
  129. package/src/definitions/shared/lib/schemas/number.schema.d.ts +21 -0
  130. package/src/definitions/shared/lib/schemas/object.schema.d.ts +215 -0
  131. package/src/definitions/shared/lib/schemas/table.schema.d.ts +458 -0
  132. package/src/definitions/shared/lib/types/compilation.types.d.ts +36 -0
  133. package/src/definitions/shared/lib/types/definition.types.d.ts +2 -0
  134. package/src/definitions/shared/lib/types/descriptor.types.d.ts +39 -0
  135. package/src/definitions/shared/lib/types/index.d.ts +3 -0
  136. package/src/getters/index.d.ts +30 -0
  137. package/src/index.d.ts +4 -0
  138. package/src/metadata/index.d.ts +4 -0
  139. package/src/operations/index.d.ts +30 -0
  140. package/src/registry/index.d.ts +6 -0
  141. package/src/runtime/index.d.ts +2 -0
  142. package/src/types.d.ts +307 -0
  143. package/src/visualization-catalog.d.ts +82 -0
  144. package/src/web-components/index.d.ts +12 -0
  145. package/styles.css +2 -0
@@ -0,0 +1,830 @@
1
+ import { o as e, r as t } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Fs as n, Ia as r, Lo as i, No as a, Oa as o, On as s, Pn as c, Po as l, Rc as u, Ta as d, Ti as f, Ts as p, Wc as m, Xa as h, Xs as g, Yn as _, Zr as v, ds as y, hc as b, pc as x, qs as S, ti as ee, zn as te } from "./interfaces-VUY4_yVO.js";
3
+ import { I as ne, Ki as re, P as ie, Zt as ae, o as oe, wi as se } from "./utils-Ba9T0TqC.js";
4
+ import { Hn as C, Rn as w, Un as ce } from "./event-bus-KiSiCJrC.js";
5
+ import { t as T } from "./types-dVVCsDWD.js";
6
+ import { n as le, t as ue } from "./grouping-type-BX_9Ix5q.js";
7
+ import { At as de, Bt as fe, Ct as pe, Ft as E, G as me, Gt as D, Ht as O, I as he, Jt as k, M as ge, Mt as _e, N as ve, Nt as ye, Ot as A, Pt as be, Q as xe, Qt as j, Rt as Se, St as Ce, Tt as we, U as Te, V as Ee, Wt as De, X as Oe, Xt as M, Yt as N, Z as P, Zt as F, _t as ke, at as Ae, et as I, i as je, in as L, j as Me, jt as Ne, mt as R, n as Pe, nn as z, nt as Fe, on as B, q as Ie, rn as Le, rt as V, st as Re, tt as H, un as U, ut as ze, vt as Be, zt as Ve } from "./escobar-BGqT1EsE.js";
8
+ import { l as W, vt as G } from "./_baseFlatten-DPXPOrea.js";
9
+ import { t as He } from "./coloring-C16AUZEi.js";
10
+ import { t as Ue } from "./set-coloring-datafield-B3uIS1Pe.js";
11
+ var We = /* @__PURE__ */ e(re()), Ge = (e, t, n) => {
12
+ let r = e.dimensions.filter((e) => f(e)), i = e.measures.filter((e) => f(e)), a = {
13
+ showAxisTooltip: e?.axes?.dimension?.showAxisTooltip,
14
+ formatter: r[0]?.formatter || {
15
+ type: "string",
16
+ format: ""
17
+ },
18
+ scale: N(e),
19
+ key: `${A.Dimension}-${e.orientation ?? l.Vertical}`,
20
+ settings: { direction: de(e) }
21
+ }, o = i[0], [s, c] = ye([a, {
22
+ showAxisTooltip: e?.axes?.primaryMeasure?.showAxisTooltip,
23
+ formatter: o?.formatter,
24
+ scale: M(e, o),
25
+ key: `${A.Measure}-${e.orientation ?? l.Vertical}`,
26
+ settings: {
27
+ direction: _e(e),
28
+ labelDock: Ne(F(e), o?.secondaryAxis)
29
+ }
30
+ }]);
31
+ return {
32
+ ...n,
33
+ components: [...n.components ?? [], ...s],
34
+ interactions: [...n.interactions ?? [], ...c]
35
+ };
36
+ }, Ke = y(), qe = (e, t, n) => {
37
+ let r = le(e, t), i = ue(n);
38
+ return r.includes(i) || (i = r[0]), {
39
+ grouped: i === T.Groups,
40
+ stacked: i === T.Stacked,
41
+ offset: i === T.Offset,
42
+ single: i === T.Bars
43
+ };
44
+ }, Je = (e, t) => {
45
+ let n = [
46
+ w.Inside,
47
+ w.Outside,
48
+ w.Opposite
49
+ ];
50
+ return t && (n = [w.Inside]), (e || [
51
+ {
52
+ position: w.Inside,
53
+ justify: 1
54
+ },
55
+ {
56
+ position: w.Outside,
57
+ justify: 0
58
+ },
59
+ {
60
+ position: w.Opposite,
61
+ justify: 0
62
+ }
63
+ ]).map((e) => ({
64
+ ...e,
65
+ possible: n.includes(e.position)
66
+ }));
67
+ }, K = (e) => {
68
+ let t = e.measures.filter((e) => f(e)), n = e.dimensions.filter((e) => f(e)), r = t.length > 1, i = n.length > 1, a = t.length > 0 && n.length === 0, { grouped: o, stacked: s, offset: l } = qe(n.length, t.length, e.barSettings), u = {
69
+ ...e.barSettings.offset,
70
+ enabled: l
71
+ }, d = o ? e.barSettings.groupPadding : e.barSettings.barPadding, p = e.barSettings.barPadding, m = e.coloring?.type !== g.Gradient && e.barSettings.translucentBars, h = c(e.barSettings.barRadius, 0);
72
+ return {
73
+ isMeasureOnly: a,
74
+ isMultiMeasure: r,
75
+ isMultiDimension: i,
76
+ stacked: s,
77
+ stackedOffset: e.barSettings.stackedOffset,
78
+ offset: u,
79
+ barRadius: h,
80
+ grouped: o,
81
+ barPadding: d ?? B.scale.padding,
82
+ groupPadding: p ?? B.scale.padding,
83
+ translucentBars: m,
84
+ roundAllEdges: e.barSettings.roundAllEdges,
85
+ useCustomBoxRounding: !!h,
86
+ ignoreOutOfBounds: e.barSettings.ignoreOutOfBounds
87
+ };
88
+ }, Ye = (e, t) => {
89
+ let [, n] = e.dimensions.filter((e) => f(e)), r = K(e);
90
+ return e.coloring?.type === g.Categorical ? r.isMultiDimension ? x(n?.dataItem) : pe(e, t) : we(e);
91
+ }, Xe = (e) => {
92
+ let { stacked: t } = K(e);
93
+ if (t && "barSettings" in e && e.barSettings?.stackedOffset === C.Expand) {
94
+ let t = e.measures.map((e) => ({
95
+ ...e,
96
+ formatter: {
97
+ type: "excel-format",
98
+ format: { formatType: i.Percentage1Decimal }
99
+ }
100
+ }));
101
+ return {
102
+ ...e,
103
+ measures: t
104
+ };
105
+ }
106
+ return { ...e };
107
+ }, Ze = (e, t) => {
108
+ if (t.min && t.max) {
109
+ let n = t.min(), r = t.max(), i = e.data.start?.value, a = e.data.end?.value;
110
+ return i < n && a < n || i > r && a > r;
111
+ }
112
+ return !1;
113
+ }, Qe = (e) => {
114
+ let t = F(e);
115
+ return (u(e) ? e.measures.filter((e) => f(e) && !e.secondaryAxis) : []).length > 0 ? t ? j.XAxisScale : j.YAxisScale : t ? j.X2AxisScale : j.Y2AxisScale;
116
+ }, q = (e) => {
117
+ if (typeof e == "number") return e;
118
+ if (e && typeof e == "object" && "value" in e && typeof e.value == "number") return e.value;
119
+ }, $e = (e) => {
120
+ if (typeof e == "string" || typeof e == "number") return e;
121
+ if (e && typeof e == "object" && "value" in e) {
122
+ let t = e.value;
123
+ return typeof t == "string" || typeof t == "number" ? t : void 0;
124
+ }
125
+ }, J = (e) => String($e(e.stackKey) ?? $e(e.value)), Y = (e, t) => {
126
+ let n = q(e.start), r = q(e.end);
127
+ return typeof n == "number" && typeof r == "number" ? r - n : t ? q(e[t]) : void 0;
128
+ }, et = (e, t, n, r, i, o, s, c) => {
129
+ let l = e.dimensions.filter((e) => f(e)), { stacked: u, isMeasureOnly: d } = K(e), h = e;
130
+ u && !d && (h = Xe(e), h.measures = h.measures.filter((e) => e.secondaryAxis !== !0)), n = Se(h, t, n, r, i, o, s, c);
131
+ let g = [], _ = [];
132
+ if (!l.length && "axes" in e) {
133
+ let n = e.axes?.dimension || {};
134
+ if (!n.disabled) {
135
+ let r;
136
+ if (r = F(e) ? e.axes?.dimension?.secondaryAxis ? a.Right : a.Left : e.axes?.dimension?.secondaryAxis ? a.Top : a.Bottom, g.push(Ve("onlyMeasures", n, {
137
+ ...t.axis.measure,
138
+ ...t.fonts
139
+ }, r)), n.showAxisName) {
140
+ let i = ee(e.dimensions, e.enableAlternate, o?.isPrintMode);
141
+ _.push(fe([{ dataItem: {
142
+ internalKey: "Measures",
143
+ uniqueSignature: p(),
144
+ name: "Measures",
145
+ schema: "",
146
+ view: "",
147
+ type: m.Dimension,
148
+ dataType: Ke.FieldType.FLOAT
149
+ } }], i, r, {
150
+ ...t.axis.measure,
151
+ ...t.fonts
152
+ }, void 0, void 0, n?.titleFontSize));
153
+ }
154
+ }
155
+ }
156
+ return {
157
+ ...n,
158
+ components: [
159
+ ...n.components,
160
+ ...g,
161
+ ..._
162
+ ]
163
+ };
164
+ }, tt = .2, nt = (e, t) => ({ data: n }) => {
165
+ let r = /* @__PURE__ */ new Map();
166
+ return (n.items || []).forEach((e) => {
167
+ if (!e || typeof e != "object") return;
168
+ let n = e, i = Y(n, t);
169
+ if (typeof i == "number") {
170
+ let e = J(n);
171
+ r.set(e, (r.get(e) || 0) + i);
172
+ }
173
+ }), (r.size ? [...r.values()].some((t) => e ? t < 0 : t > 0) : (n.fields || []).some((t) => e ? t.min() < 0 : t.max() > 0)) ? tt : 0;
174
+ }, rt = (e, t, n, r, i, a, o) => {
175
+ let c = e.dimensions.filter((e) => f(e)), l = e.measures.filter((e) => f(e)), u = K(e), d = Ye(e, o), p = c[0], m = c.length, h = l.length, g = !1, v = {};
176
+ if (p && "axes" in e && e?.axes?.dimension?.continuousAxis) {
177
+ let e = b(p?.dataItem), t = !!p.datePart, n = s(e) || te(e);
178
+ g = !t && n;
179
+ }
180
+ let y = g ? L.Linear : L.Band;
181
+ if (v = Ce(Ue(e, d), t, v, n.collections, o), v = me(e, v, n.collections, g), u.grouped) {
182
+ let e, t;
183
+ u.isMultiDimension ? (e = x(c[1]?.dataItem), t = { extract: { field: e } }) : u.isMultiMeasure && (e = "measures", t = l.map((e) => x(e.dataItem))), v[e] = {
184
+ data: t,
185
+ type: y,
186
+ min: 0,
187
+ max: 1,
188
+ padding: u.groupPadding
189
+ };
190
+ }
191
+ if (u.stacked || u.offset?.enabled && m === 1 && h === 1) {
192
+ let t = l[0].secondaryAxis ? e.axes?.secondaryMeasure : e.axes?.primaryMeasure, n = Ee(t);
193
+ v[M(e, l[0])] = {
194
+ invert: Te(!F(e), t),
195
+ data: { collection: j.Collection },
196
+ ...n,
197
+ ...u.stacked && e.barSettings.showTotal && n.type !== L.Log ? {
198
+ expandMin: nt(!0, x(l[0]?.dataItem)),
199
+ expandMax: nt(!1, x(l[0]?.dataItem))
200
+ } : {}
201
+ };
202
+ }
203
+ return u.isMeasureOnly && (v.onlyMeasures = {
204
+ data: { items: l.map((e) => {
205
+ let t = _(e) || e.label || e.dataItem.name;
206
+ return {
207
+ value: x(e.dataItem),
208
+ label: t
209
+ };
210
+ }) },
211
+ padding: u.barPadding,
212
+ type: y,
213
+ value: (e) => `${e.datum.value.value}`,
214
+ label: (e) => `${e.datum.value.label}`
215
+ }, u.stacked && (v[M(e, l[0])].data = { collection: "collection-no-dimension" }, v.onlyMeasures.data = { items: [{
216
+ value: "measures",
217
+ label: "measures"
218
+ }] })), e.type === S.Bar && l.forEach((t) => {
219
+ let n = t.secondaryAxis ? e.axes?.secondaryMeasure : e.axes?.primaryMeasure;
220
+ if (n?.axisRange || n?.scale === ce.Log) return;
221
+ let r = v[M(e, t)];
222
+ r && (r.include = [0]);
223
+ }), {
224
+ ...n,
225
+ scales: v
226
+ };
227
+ }, it = { outOfRangeTitle: "axis out range" }, X = {
228
+ StackTotal: "stackTotal",
229
+ StackTotalLabel: "stackTotalLabel",
230
+ Ratio: "ratio"
231
+ }, Z = { Share: "share" }, at = (e, t, n, r, a, o, s) => {
232
+ let c = e.dimensions.filter((e) => f(e)), l = e.measures.filter((e) => f(e)), u = ge((e.supportingMeasures ?? []).filter((e) => f(e))), [d, p] = c, m = l[0], h = K(e), _ = x(d?.dataItem), v = x(p?.dataItem), y = x(m?.dataItem);
233
+ if (h.isMeasureOnly) {
234
+ let e = [];
235
+ l.forEach((t) => {
236
+ let n = x(t.dataItem);
237
+ e.push({
238
+ field: n,
239
+ props: {
240
+ stackKey: "measures",
241
+ [n]: { field: n },
242
+ ...u,
243
+ series: n,
244
+ [D.property]: O(t),
245
+ start: 0,
246
+ color: n,
247
+ end: { field: n },
248
+ secondaryAxis: t.secondaryAxis,
249
+ isMultipleMeasures: h.isMultiMeasure
250
+ }
251
+ });
252
+ });
253
+ let t = {
254
+ key: "collection-no-dimension",
255
+ data: {
256
+ extract: e,
257
+ filter: (e) => (e[D.property].source = {
258
+ field: D.field,
259
+ key: D.sourceKey
260
+ }, !0)
261
+ }
262
+ };
263
+ return h.stacked && (t.data.stack = {
264
+ stackKey: (e) => `${e.stackKey.value}`,
265
+ value: (e) => e.end.value,
266
+ offset: C.Diverging
267
+ }), {
268
+ ...n,
269
+ collections: [t]
270
+ };
271
+ }
272
+ let b = {
273
+ key: "collection",
274
+ data: { extract: [] }
275
+ };
276
+ if (h.isMultiMeasure) {
277
+ let e = l.reduce((e, t) => {
278
+ let n = x(t.dataItem);
279
+ return e[n] = { field: n }, e;
280
+ }, {});
281
+ b.data.extract = l.map((t) => {
282
+ let n = x(t.dataItem);
283
+ return {
284
+ field: _,
285
+ props: {
286
+ end: { field: n },
287
+ series: n,
288
+ color: n,
289
+ ...e,
290
+ ...u,
291
+ start: 0,
292
+ secondaryAxis: t.secondaryAxis,
293
+ isMultipleMeasures: h.isMultiMeasure,
294
+ [D.property]: O(t)
295
+ }
296
+ };
297
+ }), b.data.filter = (e) => (e[D.property].source = {
298
+ field: D.field,
299
+ key: D.sourceKey
300
+ }, !0);
301
+ } else {
302
+ let t = Ye(e, s), n = "coloring" in e && e.coloring?.type === g.Single;
303
+ b.data.extract.push({
304
+ field: _,
305
+ props: {
306
+ ...h.isMultiDimension && { series: { field: v } },
307
+ start: 0,
308
+ end: { field: y },
309
+ color: n ? y : { field: t },
310
+ [y]: { field: y },
311
+ ...u,
312
+ secondaryAxis: m.secondaryAxis,
313
+ isMultipleMeasures: h.isMultiMeasure
314
+ }
315
+ });
316
+ }
317
+ if (h.stacked && "barSettings" in e) b.data.stack = {
318
+ stackKey: (e) => `${e.value}`,
319
+ value: (e) => e.end.value,
320
+ offset: e.barSettings?.stackedOffset || C.Diverging
321
+ };
322
+ else if (h.offset?.enabled) {
323
+ let e = h.offset?.totalLabel ?? "Total";
324
+ b.data.stack = {
325
+ stackKey: h.offset?.showTotal ? (t) => +(t.value === e) : () => 0,
326
+ value: (e) => e.end.value
327
+ };
328
+ }
329
+ let S = { [Z.Share]: {
330
+ type: "excel-format",
331
+ format: { formatType: i.Percentage1Decimal }
332
+ } };
333
+ return l?.forEach((e, t) => {
334
+ S[`measure-${t}`] = e.formatter || {
335
+ type: "excel-format",
336
+ format: { formatType: i.None }
337
+ };
338
+ }), {
339
+ ...n,
340
+ collections: [b],
341
+ formatters: S
342
+ };
343
+ }, ot = (e, t) => t || e.colors.brandColors[0], st = (e, t, n, r) => {
344
+ let i = e.dimensions.filter((e) => f(e)), a = e.measures.filter((e) => f(e));
345
+ if (!i?.[0] || !r.offset?.enabled || !r.offset?.showLine) return null;
346
+ let o = N(e), s = M(e, a[0]), c = {
347
+ scale: o,
348
+ fn: n.scales[o]?.type === L.Linear ? void 0 : (e) => e.scale(e.datum.value) + e.scale.bandwidth()
349
+ }, u = {
350
+ scale: o,
351
+ fn: (e, t) => e.data.items[t + 1] ? e.scale(e.data.items[t + 1].value) : 1
352
+ }, d = {
353
+ scale: s,
354
+ ref: "end"
355
+ }, p = e.orientation === l.Horizontal ? {
356
+ y0: c,
357
+ y1: u,
358
+ x0: d,
359
+ x1: d
360
+ } : {
361
+ y0: d,
362
+ y1: d,
363
+ x0: c,
364
+ x1: u
365
+ };
366
+ return {
367
+ key: "bar-bridge",
368
+ type: U.LineCoord,
369
+ data: { collection: "collection" },
370
+ settings: {
371
+ ...p,
372
+ show: (e, t) => !!e.data.items[t + 1],
373
+ stroke: r.offset.lineColor ?? t.axis.dimension.lineColor,
374
+ strokeWidth: 1,
375
+ strokeDasharray: "2 2",
376
+ opacity: 1
377
+ },
378
+ animations: {
379
+ enabled: !0,
380
+ presetId: "simple-opacity"
381
+ }
382
+ };
383
+ }, ct = (e, t) => (n) => {
384
+ if (typeof n.datum.end.value != "number") return null;
385
+ let r = new W(typeof t == "function" ? t(n) : t), i = [{
386
+ color: r.rgb(),
387
+ opacity: 1,
388
+ offset: +(n.datum.end.value < 0)
389
+ }, {
390
+ color: r.rgb(),
391
+ opacity: .65,
392
+ offset: n.datum.end.value < 0 ? 0 : 1
393
+ }];
394
+ return n.datum.end.value < 0 && i.reverse(), {
395
+ type: "gradient",
396
+ degree: F(e) ? 0 : 90,
397
+ stops: i
398
+ };
399
+ }, lt = (e, t, r, i, a, o) => {
400
+ let s = e.dimensions.filter((e) => f(e)), c = e.measures.filter((e) => f(e)), l = K(e), u = { scale: N(e) };
401
+ l.isMeasureOnly && (u = {
402
+ scale: "onlyMeasures",
403
+ ref: l.stacked ? "stackKey" : "series"
404
+ });
405
+ let d = new He(e, t, a?.[0]?.itemsNotAffectedByFiltering), p = s.reduce((e, t) => (e[x(t.dataItem)] = !0, e), {}), m = c.reduce((n, r, i) => {
406
+ if (l.stacked && i !== 0) return n;
407
+ let a = { collection: j.Collection };
408
+ if (l.isMeasureOnly && (a = {
409
+ collection: "collection-no-dimension",
410
+ filter: (e) => l.stacked || e?.source?.field === x(r.dataItem)
411
+ }), l.grouped) {
412
+ let e = x(r.dataItem);
413
+ a = {
414
+ ...a,
415
+ filter: (t) => t.series?.source?.field ? p[t.series?.source?.field] : t.series?.value === e
416
+ };
417
+ }
418
+ let s = { overwriteSources: [d.MAIN_FIELD, "series"] };
419
+ (e.coloring?.type === g.Categorical || e.coloring?.type === g.Gradient) && (s.ref = "color");
420
+ let c = d.getColorDefinition(s);
421
+ l?.translucentBars && (c = ct(e, c));
422
+ let f = {
423
+ scale: M(e, r),
424
+ ref: "end"
425
+ }, m = pt(e, t, u, f, c);
426
+ return [...n, ft(e, r, m, a, o)];
427
+ }, []);
428
+ if (n(e)) {
429
+ let n = st(e, t, r, l);
430
+ n && m.push(n);
431
+ }
432
+ return {
433
+ ...r,
434
+ components: [...r.components, ...m]
435
+ };
436
+ }, ut = (e) => {
437
+ let t = [], n = e.dimensions.filter((e) => f(e)), r = e.measures.filter((e) => f(e));
438
+ return n.length || t.push(D.property), n?.[0] && t.push(""), n?.[1] && t.push("series"), r.length > 1 && t.push(D.property), t;
439
+ }, dt = (e) => {
440
+ let t, n = K(e), r = e.measures.filter((e) => f(e));
441
+ if (n.stacked && r.length > 0) {
442
+ let e = x(r[0].dataItem);
443
+ t = function() {
444
+ let t = {}, r = {}, i = {}, a = (e) => {
445
+ let t = e.end?.value;
446
+ return typeof t == "number" ? t : void 0;
447
+ }, o = this.data.items;
448
+ o.forEach((n) => {
449
+ let o = J(n), s = Y(n, e);
450
+ if (r[o] || (r[o] = {
451
+ positive: void 0,
452
+ negative: void 0
453
+ }), i[o] || (i[o] = {
454
+ highest: void 0,
455
+ lowest: void 0
456
+ }), typeof s == "number") {
457
+ t[o] = (t[o] || 0) + s, s > 0 ? r[o].positive = n : s < 0 && (r[o].negative = n);
458
+ let e = a(n);
459
+ if (typeof e == "number") {
460
+ let { highest: t, lowest: r } = i[o];
461
+ (!t || e > a(t)) && (i[o].highest = n), (!r || e < a(r)) && (i[o].lowest = n);
462
+ }
463
+ }
464
+ }), o.forEach((a) => {
465
+ let o = J(a), s = t[o] || 0, c = (s >= 0 ? i[o].highest : i[o].lowest) ?? (s >= 0 ? r[o].positive : r[o].negative);
466
+ if (a[X.StackTotal] = { value: s }, a[X.StackTotalLabel] = { value: +(c === a) }, n.isMultiDimension) {
467
+ let t = Y(a, e), n = typeof t == "number" && s !== 0 ? t / s : 0;
468
+ a[X.Ratio] = { value: Number.isFinite(n) ? n : 0 };
469
+ }
470
+ });
471
+ };
472
+ }
473
+ return t;
474
+ }, ft = (e, t, n, r, i) => {
475
+ let a = dt(e);
476
+ return {
477
+ type: U.Box,
478
+ layout: { displayOrder: E.VisualizationElement },
479
+ key: R(e, t, S.Bar),
480
+ data: r,
481
+ settings: n,
482
+ animations: {
483
+ enabled: !0,
484
+ presetId: "bar-chart"
485
+ },
486
+ beforeRender: a,
487
+ brush: De(ut(e), i, { valuePickerMode: i?.valuePickerMode })
488
+ };
489
+ }, pt = (e, t, n, r, i) => {
490
+ let a = e.dimensions.filter((e) => f(e)), s = e.measures.filter((e) => f(e)), [, u] = a, d = K(e), p = {
491
+ orientation: e.orientation ?? l.Vertical,
492
+ major: n,
493
+ minor: r,
494
+ box: {
495
+ minWidthPx: 2,
496
+ ref: "",
497
+ rx: c(d.barRadius, 0),
498
+ fill: i,
499
+ stacked: d.stacked,
500
+ grouped: d.grouped,
501
+ boxPadding: d.barPadding,
502
+ groupPadding: d.groupPadding,
503
+ itemsInStackCount: s?.length,
504
+ roundAllEdges: d.roundAllEdges ?? !1,
505
+ useCustomBoxRounding: d.useCustomBoxRounding ?? !1,
506
+ ignoreOutOfBounds: d.ignoreOutOfBounds ?? !1
507
+ }
508
+ };
509
+ if (e.barSettings?.strokeEnabled ? (p.box.stroke = ot(t, e.barSettings?.strokeColor), p.box.strokeWidth = e.barSettings?.strokeWidth) : p.box.stroke = o.transparent, !d.isMeasureOnly && d.grouped && !e?.axes?.dimension?.continuousAxis) {
510
+ let t = d.isMultiDimension ? x(u?.dataItem) : "measures";
511
+ p.major.fn = (n) => {
512
+ let r = n.resources.scale(N(e)), i = n.resources.scale(t), a = r.bandwidth(), o = i.bandwidth();
513
+ return Number(r(n.datum.value)) + .5 * a - .5 * (1 / o - 1) * o * a + a * Number(i(n.datum.series.value));
514
+ }, p.box.width = (e) => e.resources.scale(t).bandwidth();
515
+ }
516
+ return p;
517
+ }, mt = new W(G.fontLight), ht = new W(G.fontDark), gt = (e) => {
518
+ switch (!0) {
519
+ case e.grouped: return "grouped";
520
+ case e.stacked: return "stacked";
521
+ default: return "normal";
522
+ }
523
+ }, _t = (e, t, n, i, a, o) => {
524
+ let s = K(e), c = e.measures.filter(f)?.[0];
525
+ if (!c?.dataLabels?.show) return n;
526
+ let l = x(c.dataItem), u = new W(t.fonts.general.color), d = ({ node: e }) => {
527
+ let t = e.attrs?.fill && e.attrs.fill !== "transparent", n = t && e.attrs.fill?.type === "gradient" ? e.attrs.fill?.stops?.[0]?.color : e.attrs.fill;
528
+ return new W(t ? n : "#ffffff").betterContrast(u, mt, ht).rgb();
529
+ }, p = [], m = c.dataLabels.displayParts?.includes(r.Value), h = c.dataLabels.displayParts?.includes(r.Ratio);
530
+ (m || !c.dataLabels.displayParts && s.stackedOffset !== C.Expand) && p.push({
531
+ id({ node: e }) {
532
+ return `${e.data._ID}::value`;
533
+ },
534
+ linkData({ node: e }) {
535
+ return e.data;
536
+ },
537
+ fill: d,
538
+ label({ node: e, formatter: t }) {
539
+ return t("measure-0")(e.data[l].value, void 0, e.data);
540
+ },
541
+ hideEllipsed: !0
542
+ }), (h || !c.dataLabels.displayParts && s.stackedOffset === C.Expand) && p.push({
543
+ id({ node: e }) {
544
+ return `${e.data._ID}::ratio`;
545
+ },
546
+ linkData({ node: e }) {
547
+ return e.data;
548
+ },
549
+ fill: d,
550
+ label({ node: e, formatter: t }) {
551
+ return t(Z.Share)(e.data[X.Ratio].value);
552
+ },
553
+ hideEllipsed: !0
554
+ });
555
+ let g = {
556
+ key: "bar-labels-stacked-0",
557
+ type: U.Labels,
558
+ layout: { displayOrder: E.Labels },
559
+ settings: { sources: [{
560
+ component: R(e, e.measures.filter(f)?.[0], S.Bar),
561
+ selector: z.Rect,
562
+ strategy: {
563
+ type: "rows",
564
+ settings: {
565
+ justify: .5,
566
+ align: .5,
567
+ fontSize: k(c.dataLabels?.size),
568
+ fontFamily: t.fonts.general.fontFamily,
569
+ labels: p
570
+ }
571
+ }
572
+ }] },
573
+ ...o?.disable?.brushing ? {} : { brush: { consume: [{
574
+ context: Le.Selection,
575
+ data: ["", "series"],
576
+ mode: "and",
577
+ style: { inactive: { opacity: .3 } }
578
+ }] } },
579
+ animations: {
580
+ presetId: "simple-opacity",
581
+ enabled: !0
582
+ }
583
+ };
584
+ return {
585
+ ...n,
586
+ components: [...n.components, g]
587
+ };
588
+ }, vt = (e, t, n) => {
589
+ let r = K(e), i = ({ data: t }) => t ? t.end.value > t.start.value ? F(e) ? "right" : "up" : F(e) ? "left" : "down" : null, a = F(e), o = [], s = e.measures.filter(f);
590
+ return e.measures.forEach((n, c) => {
591
+ if (n.dataLabels?.show) {
592
+ let l = s.indexOf(n), u = r.stacked ? e.measures.filter(f)?.[0] : n, d = gt(r), p = Je(n.dataLabels.barLabelPlacements, r.stacked).filter((e) => e.possible).map((e) => ({
593
+ position: e.position,
594
+ justify: e.justify,
595
+ overflow: [w.Outside, w.Opposite].includes(e.position),
596
+ fill: e.position === w.Inside ? "#fff" : "#242424"
597
+ }));
598
+ n.dataLabels?.showBackdrop && !r.stacked && (p = p.map((e) => ve(e, t, a, n.dataLabels.backdropColor))), o.push({
599
+ key: `bar-labels-${d}-${c}`,
600
+ type: U.Labels,
601
+ layout: { displayOrder: E.Labels },
602
+ settings: { sources: [{
603
+ component: R(e, u, S.Bar),
604
+ selector: z.Rect,
605
+ strategy: {
606
+ type: "bar",
607
+ settings: {
608
+ direction: i,
609
+ fontSize: k(n.dataLabels?.size),
610
+ fontFamily: t.fonts.general.fontFamily,
611
+ labels: [{
612
+ label: he(n, l >= 0 ? `measure-${l}` : void 0),
613
+ placements: p
614
+ }]
615
+ }
616
+ }
617
+ }] },
618
+ animations: {
619
+ enabled: !0,
620
+ presetId: "chart-labels"
621
+ }
622
+ });
623
+ }
624
+ }), {
625
+ ...n,
626
+ components: [...n.components, ...o]
627
+ };
628
+ }, yt = (e, t, n, r, i, a) => {
629
+ let o = K(e);
630
+ return o.isMultiDimension && o.stacked ? _t(e, t, n, r, i, a) : vt(e, t, n, null);
631
+ }, bt = (e) => {
632
+ let t = e.measures.filter(f), n = t[t.length - 1];
633
+ return !!n?.formatter && v(n.formatter);
634
+ }, xt = (e, t) => {
635
+ let n = t.data[X.StackTotal]?.value;
636
+ return typeof n == "number" ? n : e.measures.filter(f).reduce((e, n) => {
637
+ let r = t.data[x(n.dataItem)]?.value;
638
+ return e + (typeof r == "number" ? r : 0);
639
+ }, 0) || void 0;
640
+ }, St = (e) => ({ node: t }) => {
641
+ let n = xt(e, t);
642
+ if (typeof n != "number") return null;
643
+ let r = n >= 0;
644
+ return F(e) ? r ? "right" : "left" : r ? "up" : "down";
645
+ }, Ct = (e, t, n) => {
646
+ if (t.data[X.StackTotalLabel]) return Math.round(t.data[X.StackTotalLabel].value) === 1;
647
+ let r = t.data.end?.value;
648
+ if (typeof r != "number" || e.barSettings.stackedOffset === C.Expand) return !1;
649
+ if (t.data[X.StackTotal]) return Math.round(r) === Math.round(n);
650
+ let i = [...e.measures.filter(f)].reverse().find((e) => {
651
+ let r = t.data[x(e.dataItem)]?.value;
652
+ return typeof r == "number" && (n >= 0 ? r > 0 : r < 0);
653
+ });
654
+ return t.data.series?.value === x(i?.dataItem);
655
+ }, wt = (e, t) => {
656
+ if (!e.barSettings.showTotal || !K(e).stacked) return;
657
+ let n = e.measures.filter(f), r = n[0], i = n.length - 1;
658
+ if (!(!r || i < 0)) return {
659
+ key: "bar-labels-stacked-total",
660
+ type: U.Labels,
661
+ layout: { displayOrder: E.Labels },
662
+ settings: { sources: [{
663
+ component: R(e, r, S.Bar),
664
+ selector: z.Rect,
665
+ strategy: {
666
+ type: "bar",
667
+ settings: {
668
+ direction: St(e),
669
+ fontSize: k(r.dataLabels?.size),
670
+ fontFamily: t.fonts.general.fontFamily,
671
+ labels: [{
672
+ label({ node: t, formatter: n }) {
673
+ let r = xt(e, t);
674
+ if (r === void 0 || !Ct(e, t, r)) return "";
675
+ if (e.barSettings.stackedOffset === C.Expand) {
676
+ let t = r < 0 ? -1 : 1;
677
+ return bt(e) ? n(Z.Share)(t) : String(t);
678
+ }
679
+ return n(`measure-${i}`)(r);
680
+ },
681
+ placements: [{
682
+ position: w.Outside,
683
+ fill: "#242424",
684
+ justify: 0,
685
+ overflow: !0
686
+ }]
687
+ }]
688
+ }
689
+ }
690
+ }] },
691
+ animations: {
692
+ enabled: !0,
693
+ presetId: "chart-labels"
694
+ }
695
+ };
696
+ }, Tt = (e, t, n) => {
697
+ let r = wt(e, t);
698
+ return r ? {
699
+ ...n,
700
+ components: [...n.components, r]
701
+ } : n;
702
+ }, Et = (e, t, n, r, i) => {
703
+ let a = e.measures.filter((e) => f(e)), o = K(e), s = a.map((t) => R(e, t, S.Bar)), c = Dt(e), l = o.grouped && o.isMultiMeasure ? H(e, i) : void 0, u = P(e, t, Fe, c, i && i[0] ? i[0].sum : void 0, l);
704
+ if (o.stacked) {
705
+ let n = H(e, i), r = o?.stackedOffset === C.Expand, a = o.isMultiDimension ? kt(n, r) : At(n, r);
706
+ u = P(Xe(e), t, a, c);
707
+ }
708
+ return o.isMeasureOnly && (u = P(e, t, jt, c)), Oe(e, t, n, {
709
+ filter: (e) => e.filter((e) => s.findIndex((t) => t === e.key) !== -1),
710
+ placement: {
711
+ type: "bounds",
712
+ area: "target"
713
+ },
714
+ extract: u
715
+ }, `tooltip-${U.Box}`);
716
+ }, Dt = (e) => (t, n, r) => [Ot(e, n, r), xe(t, n, r)].filter((e) => e?.length > 0).join("\n"), Ot = (e, t, n) => {
717
+ let r = Qe(e);
718
+ return Ze(t, n.scale(r)) ? it.outOfRangeTitle : "";
719
+ }, Q = (e, t, n, r, i) => {
720
+ let a = i && !h(e.formatter) ? V(e.formatter) : e.formatter;
721
+ return r.formatter(a)(t, void 0, n.data);
722
+ }, kt = (e, t = !1) => (n, r, i, a, o, s, c, l) => {
723
+ let u = n.filter((e) => f(e)), d = I(i), p = u.filter((e) => !d.has(x(e.dataItem))), m = u.map((e) => {
724
+ let t = x(e.dataItem), n = Object.keys(r.data).find((t) => r.data[t]?.source?.field === x(e.dataItem)), a;
725
+ if (r.data.end?.value !== void 0 && r.data.start?.value !== void 0 && !d.has(t)) a = r.data.end.value - r.data.start.value;
726
+ else if (n) a = r.data[n].value;
727
+ else return {
728
+ label: "",
729
+ value: ""
730
+ };
731
+ let o = _(e), s = a;
732
+ return (e.formatter || l) && (s = Q(e, a, r, i, l)), {
733
+ label: o || e.label || e.dataItem.name || "",
734
+ value: s
735
+ };
736
+ });
737
+ if (!c && e && e[r?.data?.value]) {
738
+ let n, a = p[0]?.formatter?.format?.formatType;
739
+ t && Mt(a) ? n = "100%" : (n = e[r?.data?.value], !l && p[0]?.formatter ? n = i.formatter(p[0].formatter)(e[r?.data?.value]) : l && (n = i.formatter(V(p[0]?.formatter))(e[r?.data?.value]))), m.push({
740
+ label: "Total",
741
+ value: n
742
+ });
743
+ }
744
+ return m;
745
+ }, At = (e, t = !1) => (n, r, i, a, o, s, c, l) => {
746
+ let u = n.filter((e) => f(e)), d = I(i), p = u.filter((e) => !d.has(x(e.dataItem))), m = u.map((e) => {
747
+ let t = r.data.end?.value !== void 0 && r.data.start?.value !== void 0, n = x(e.dataItem), a = d.has(n), o;
748
+ if (t && r.data.series?.value.toString() === n) o = r.data.end.value - r.data.start.value;
749
+ else if (a) {
750
+ let e = Object.keys(r.data).find((e) => r.data[e]?.source?.field === n);
751
+ o = e ? r.data[e]?.value : void 0;
752
+ }
753
+ if (o === void 0) return {
754
+ label: "",
755
+ value: ""
756
+ };
757
+ let s = _(e), c = o;
758
+ return (e.formatter || l) && (c = Q(e, o, r, i, l)), {
759
+ label: s || e.label || e.dataItem.name || "",
760
+ value: c
761
+ };
762
+ });
763
+ if (!c && e && e[r?.data?.value]) {
764
+ let n = p[p.length - 1], a, o = n?.formatter?.format?.formatType;
765
+ t && Mt(o) ? a = "100%" : (a = e[r?.data?.value], !l && n?.formatter ? a = i.formatter(n.formatter)(e[r?.data?.value]) : l && (a = i.formatter(V(n?.formatter))(e[r?.data?.value]))), m.push({
766
+ label: "Total",
767
+ value: a
768
+ });
769
+ }
770
+ return m;
771
+ }, jt = (e, t, n) => {
772
+ let r = e.filter((e) => f(e)), i = I(n), a = t.data.series?.value?.toString(), o = a ? t.data[a]?.value : void 0, s = r.find((e) => x(e.dataItem) === a), c = _(s) || s?.label || s?.dataItem?.name, l = [];
773
+ return c && o !== void 0 && l.push({
774
+ label: c,
775
+ value: s?.formatter && n ? Q(s, o, t, n) : o
776
+ }), r.filter((e) => i.has(x(e.dataItem))).forEach((e) => {
777
+ let r = x(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r), a = i ? t.data[i]?.value : void 0;
778
+ if (a === void 0) return;
779
+ let o = _(e) || e.label || e.dataItem.name || "";
780
+ l.push({
781
+ label: o,
782
+ value: e.formatter && n ? Q(e, a, t, n) : a
783
+ });
784
+ }), l;
785
+ }, Mt = (e) => e === i.PercentageNoDecimal || e === i.Percentage1Decimal || e === i.Percentage2Decimal, Nt = (e, t, n) => {
786
+ let r = e.barSettings?.offset?.enabled ?? !1, i = e.dimensions.filter((e) => f(e)), a = e.measures.filter((e) => f(e));
787
+ return i.length === 1 && a.length === 1 && !r ? Ie(e, t, n) : n;
788
+ }, $ = class extends Me {
789
+ constructor() {
790
+ super([
791
+ at,
792
+ rt,
793
+ et,
794
+ Be,
795
+ ke,
796
+ Re,
797
+ lt,
798
+ yt,
799
+ Tt,
800
+ Ae,
801
+ Nt,
802
+ Et,
803
+ Ge,
804
+ be,
805
+ ze
806
+ ]);
807
+ }
808
+ preCompile(e) {
809
+ let t = e, { stacked: n } = K(t);
810
+ n && (t.measures = t.measures.map((e) => ({
811
+ ...e,
812
+ secondaryAxis: !1
813
+ })));
814
+ }
815
+ }, Pt = se(), Ft = ae(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
816
+ let a = ie(), [o] = (0, We.useState)(() => new $()), { activeKey: s } = oe(), c = ne(), l = {
817
+ ...i,
818
+ valuePickerMode: !!s
819
+ }, u = t || d, f = o.compile(e, u, n, r, l, S.Bar, a, c, Pe());
820
+ return f ? /* @__PURE__ */ (0, Pt.jsx)(je, {
821
+ config: l,
822
+ definition: f,
823
+ size: r,
824
+ vSpec: e
825
+ }) : null;
826
+ }), It = /* @__PURE__ */ t({
827
+ BarChart: () => Ft,
828
+ BarChartCompiler: () => $
829
+ });
830
+ export { Ft as n, $ as r, It as t };