@devgateway/dvz-ui-react 1.5.4 → 1.6.1

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 (70) hide show
  1. package/dist/cjs/common.css +1 -1
  2. package/dist/cjs/embeddable/chart/Bar.js +1 -1
  3. package/dist/cjs/embeddable/chart/Line.js +1 -1
  4. package/dist/cjs/embeddable/chart/Pie.js +1 -1
  5. package/dist/cjs/embeddable/chart/colors/ManualColors.js +1 -1
  6. package/dist/cjs/embeddable/chart/data/Bar.js +1 -1
  7. package/dist/cjs/embeddable/chart/index.js +1 -1
  8. package/dist/cjs/embeddable/common/colors/ManualColors.js +1 -1
  9. package/dist/cjs/embeddable/d3Map/BaseLayer.js +1 -1
  10. package/dist/cjs/embeddable/d3Map/DataLayer.js +1 -1
  11. package/dist/cjs/embeddable/filtered-posts/NoData.js +2 -2
  12. package/dist/cjs/embeddable/filtered-posts/index.js +1 -1
  13. package/dist/cjs/embeddable/filtered-posts/utils.js +1 -1
  14. package/dist/cjs/embeddable/posts-filter/CategoricalFilter.js +1 -0
  15. package/dist/cjs/embeddable/posts-filter/PostsFilterDropdown.js +1 -1
  16. package/dist/cjs/embeddable/posts-filter/YearFilter.js +1 -0
  17. package/dist/cjs/embeddable/posts-filter/index.js +1 -1
  18. package/dist/cjs/embeddable/posts-filters-reset-button/index.js +1 -1
  19. package/dist/cjs/embeddable/posts-pagination/index.js +1 -1
  20. package/dist/cjs/embeddable/reducers/data-api.js +1 -1
  21. package/dist/cjs/embeddable/reducers/data.js +1 -1
  22. package/dist/cjs/embeddable/reducers/embeddable-api.js +1 -1
  23. package/dist/cjs/embeddable/time-line/mobile.js +1 -1
  24. package/dist/cjs/embeddable/vertical-featuredtabs/index.js +2 -2
  25. package/dist/cjs/index.js +1 -1
  26. package/dist/cjs/layout/Layout.js +1 -1
  27. package/dist/cjs/styles.css +1 -1
  28. package/dist/esm/common.css +1 -1
  29. package/dist/esm/embeddable/chart/Bar.js +253 -235
  30. package/dist/esm/embeddable/chart/Line.js +122 -121
  31. package/dist/esm/embeddable/chart/Pie.js +82 -81
  32. package/dist/esm/embeddable/chart/colors/ManualColors.js +33 -33
  33. package/dist/esm/embeddable/chart/data/Bar.js +18 -16
  34. package/dist/esm/embeddable/chart/index.js +298 -286
  35. package/dist/esm/embeddable/common/colors/ManualColors.js +22 -22
  36. package/dist/esm/embeddable/d3Map/BaseLayer.js +4 -1
  37. package/dist/esm/embeddable/d3Map/DataLayer.js +5 -1
  38. package/dist/esm/embeddable/filtered-posts/NoData.js +25 -18
  39. package/dist/esm/embeddable/filtered-posts/index.js +136 -92
  40. package/dist/esm/embeddable/filtered-posts/utils.js +3 -2
  41. package/dist/esm/embeddable/posts-filter/CategoricalFilter.js +72 -0
  42. package/dist/esm/embeddable/posts-filter/PostsFilterDropdown.js +106 -92
  43. package/dist/esm/embeddable/posts-filter/YearFilter.js +60 -0
  44. package/dist/esm/embeddable/posts-filter/index.js +160 -191
  45. package/dist/esm/embeddable/posts-filters-reset-button/index.js +21 -15
  46. package/dist/esm/embeddable/posts-pagination/index.js +36 -33
  47. package/dist/esm/embeddable/reducers/data-api.js +35 -35
  48. package/dist/esm/embeddable/reducers/data.js +116 -107
  49. package/dist/esm/embeddable/reducers/embeddable-api.js +8 -8
  50. package/dist/esm/embeddable/time-line/mobile.js +119 -118
  51. package/dist/esm/embeddable/vertical-featuredtabs/index.js +202 -131
  52. package/dist/esm/index.js +66 -64
  53. package/dist/esm/layout/Layout.js +8 -6
  54. package/dist/esm/styles.css +1 -1
  55. package/dist/types/dvz-ui/src/embeddable/chart/colors/ManualColors.d.ts +1 -1
  56. package/dist/types/dvz-ui/src/embeddable/filtered-posts/NoData.d.ts +1 -0
  57. package/dist/types/dvz-ui/src/embeddable/filtered-posts/index.d.ts +2 -1
  58. package/dist/types/dvz-ui/src/embeddable/filtered-posts/utils.d.ts +3 -0
  59. package/dist/types/dvz-ui/src/embeddable/posts-filter/CategoricalFilter.d.ts +9 -0
  60. package/dist/types/dvz-ui/src/embeddable/posts-filter/PostsFilterDropdown.d.ts +1 -0
  61. package/dist/types/dvz-ui/src/embeddable/posts-filter/YearFilter.d.ts +12 -0
  62. package/dist/types/dvz-ui/src/embeddable/posts-filter/index.d.ts +2 -0
  63. package/dist/types/dvz-ui/src/embeddable/reducers/data-api.d.ts +3 -1
  64. package/dist/types/dvz-ui/src/embeddable/reducers/data.d.ts +5 -0
  65. package/dist/types/dvz-ui/src/embeddable/time-line/mobile.d.ts +2 -1
  66. package/dist/types/dvz-ui/src/translations/af.json.d.ts +1 -2
  67. package/dist/types/dvz-ui/src/translations/am.json.d.ts +35 -35
  68. package/dist/types/dvz-ui/src/translations/index.d.ts +2 -1
  69. package/dist/types/dvz-ui/src/utils/data.d.ts +2 -0
  70. package/package.json +3 -2
@@ -1,92 +1,107 @@
1
1
  import { jsx as c, jsxs as p, Fragment as pe } from "react/jsx-runtime";
2
- import { useState as S, useEffect as Ht, Fragment as He } from "react";
2
+ import { useState as B, useEffect as be, Fragment as Se } from "react";
3
3
  import Wt from "./Tooltip.js";
4
- import { ResponsiveBar as Tt } from "@nivo/bar";
5
- import { injectIntl as _t } from "react-intl";
6
- import { useTheme as St } from "@nivo/theming";
7
- import { line as We } from "d3-shape";
8
- import Te from "./LineLayer.js";
9
- import be from "papaparse";
10
- import At from "../../layout/FlexWrapDetector.js";
11
- import ge from "../../utils/deviceType.js";
12
- const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U = "_Color", Yt = ({
13
- editing: x,
14
- legends: R,
15
- marginLeft: Se,
16
- marginTop: q,
17
- marginRight: Ae,
18
- marginBottom: Q,
4
+ import { ResponsiveBar as At } from "@nivo/bar";
5
+ import { injectIntl as Tt } from "react-intl";
6
+ import { useTheme as _t } from "@nivo/theming";
7
+ import { line as je } from "d3-shape";
8
+ import Re from "./LineLayer.js";
9
+ import ge from "papaparse";
10
+ import St from "../../layout/FlexWrapDetector.js";
11
+ import ve from "../../utils/deviceType.js";
12
+ const jt = "middle", Rt = "top", U = "#66676d", Ye = "#dddddd", Yt = "none", Q = "_Color", Kt = ({
13
+ editing: y,
14
+ legends: P,
15
+ marginLeft: Ke,
16
+ marginTop: S,
17
+ marginRight: Pe,
18
+ marginBottom: j,
19
19
  options: u,
20
20
  intl: g,
21
21
  format: b,
22
- colors: $,
23
- groupMode: F,
24
- height: je,
22
+ colors: H,
23
+ groupMode: O,
24
+ height: Xe,
25
25
  showLegends: G,
26
- legendPosition: D,
26
+ legendPosition: v,
27
27
  tickRotation: E,
28
28
  offsetText: ee,
29
29
  tickColor: te,
30
30
  layout: o,
31
- reverse: H,
32
- offsetY: Pe,
33
- csvLineLayerData: ve,
31
+ reverse: W,
32
+ offsetY: Ce,
33
+ csvLineLayerData: Ne,
34
34
  tooltip: ae,
35
35
  lineLayerEnabled: ne,
36
- overlays: W,
36
+ overlays: A,
37
37
  maxValue: re,
38
- valueScale: Re,
39
- colorGenerator: v,
40
- legendLabel: Ne,
41
- overrideTickColor: Ye,
38
+ valueScale: qe,
39
+ colorGenerator: N,
40
+ legendLabel: Ie,
41
+ overrideTickColor: Ze,
42
42
  fixedMinValue: le,
43
43
  fixedMaxValue: se,
44
- barPadding: Ke,
45
- barLabelPosition: Ie,
46
- barInnerPadding: Xe,
47
- tooltipEnabled: Ce,
48
- xLabelColor: w,
49
- barLabelColor: Y,
50
- legendCheckBack: I,
44
+ barPadding: Je,
45
+ barLabelPosition: Le,
46
+ barInnerPadding: Ue,
47
+ tooltipEnabled: Qe,
48
+ xLabelColor: D,
49
+ barLabelColor: X,
50
+ legendCheckBack: L,
51
51
  legendLabelBack: ie,
52
52
  legendLabelColor: ce,
53
- highlightXAxisLine: Ze,
54
- showTickLine: A,
55
- showRightAxis: Je,
56
- offsetRight: Ue,
57
- offsetBottom: Le,
53
+ highlightXAxisLine: Ge,
54
+ showTickLine: R,
55
+ showRightAxis: et,
56
+ offsetRight: tt,
57
+ offsetBottom: ke,
58
58
  confidenceIntervals: de,
59
- showGroupTotal: qe,
60
- groupTotalLabel: ke,
59
+ showGroupTotal: at,
60
+ groupTotalLabel: we,
61
61
  groupTotalFormat: De,
62
- groupTotalMeasure: we,
63
- groupTotalOffset: z,
64
- groupTotalFixedPosition: K,
65
- tooltipEnableMarkdown: Qe,
66
- xAxisTickValues: Ge,
67
- yAxisTickValues: et,
68
- mobileCustomization: tt,
69
- minMaxClamp: Kt,
70
- reverseLegend: at,
71
- enableGridY: nt,
72
- enableGridX: rt,
73
- customAxisFormat: M,
74
- previewMode: B,
75
- showLegendsInColumns: lt = !1,
76
- numberOfLegendColumns: st = 4
62
+ groupTotalMeasure: Fe,
63
+ groupTotalOffset: $,
64
+ groupTotalFixedPosition: C,
65
+ tooltipEnableMarkdown: nt,
66
+ xAxisTickValues: rt,
67
+ yAxisTickValues: lt,
68
+ mobileCustomization: st,
69
+ minMaxClamp: Pt,
70
+ reverseLegend: it,
71
+ enableGridY: ct,
72
+ enableGridX: dt,
73
+ customAxisFormat: F,
74
+ previewMode: z,
75
+ showLegendsInColumns: Xt = !1,
76
+ numberOfLegendColumns: Ct = 4
77
77
  }) => {
78
- var $e;
79
- const it = ["mobile", "tablet", "midTablet"].includes(
80
- ge()
81
- ), X = ["tablet", "midTablet"].includes(ge()), C = ge() === "mobile", he = 30, me = 15, m = JSON.parse(decodeURIComponent(tt)), Me = it && ((m == null ? void 0 : m.showCustomization) ?? !1), T = Me && B !== "Desktop", _ = !x && Me, ue = () => Y === "null" || Y === null || !Y ? "#000000" : Y, [L, ct] = S([]), { colorBy: j } = $, Oe = {};
82
- W.forEach((e, t) => {
78
+ var _e;
79
+ const ht = ["mobile", "tablet", "midTablet"].includes(
80
+ ve()
81
+ ), q = ["tablet", "midTablet"].includes(ve()), Z = ve() === "mobile", he = 30, me = 15, m = JSON.parse(
82
+ decodeURIComponent(st)
83
+ ), Me = ht && ((m == null ? void 0 : m.showCustomization) ?? !1), T = Me && z !== "Desktop", _ = !y && Me, ue = () => X === "null" || X === null || !X ? "#000000" : X, [k, mt] = B([]), { colorBy: Y } = H, Oe = {};
84
+ A.forEach((e, t) => {
83
85
  Oe[t] = !0;
84
86
  });
85
- const [N, dt] = S(Oe), [Fe, ht] = S(50), [Xt, mt] = S(q), [Ct, Ee] = S(0), [ut, ft] = S(Q), P = ((e, t, i, n, l) => {
87
+ const [I, ut] = B(Oe), [Ee, ft] = B(50), [qt, $e] = B(S), [Zt, ze] = B(0), [Ve, Be] = B(j), [He, ot] = B(!1);
88
+ be(() => {
89
+ let e, t;
90
+ return e = requestAnimationFrame(() => {
91
+ e = requestAnimationFrame(() => {
92
+ t = setTimeout(() => {
93
+ ot(!0);
94
+ }, 50);
95
+ });
96
+ }), () => {
97
+ cancelAnimationFrame(e), clearTimeout(t);
98
+ };
99
+ }, []);
100
+ const K = ((e, t, i, n, l) => {
86
101
  let s = [];
87
102
  return e.data && (s = t.colorBy === "index" ? e.data.map((r) => {
88
103
  let a, h = !0;
89
- return i.indexOf(r[e.indexBy]) > -1 ? (h = !1, a = n) : a = r[U] ? r[U] : l.getColor(r.id, r), {
104
+ return i.indexOf(r[e.indexBy]) > -1 ? (h = !1, a = n) : a = r[Q] ? r[Q] : l.getColor(r.id, r), {
90
105
  enabled: h,
91
106
  color: a,
92
107
  id: r[e.indexBy],
@@ -103,30 +118,30 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
103
118
  })), s;
104
119
  })(
105
120
  u,
106
- $,
107
- L,
108
- Rt,
109
- v
110
- ), ze = () => (at && P.reverse(), /* @__PURE__ */ p(pe, { children: [
111
- G && P.map((e) => /* @__PURE__ */ p(
121
+ H,
122
+ k,
123
+ Yt,
124
+ N
125
+ ), We = () => (it && K.reverse(), /* @__PURE__ */ p(pe, { children: [
126
+ G && K.map((e) => /* @__PURE__ */ p(
112
127
  "div",
113
128
  {
114
129
  className: `legend item ${e.enabled ? "" : "ignore"}`,
115
- onClick: () => Lt(e.id),
130
+ onClick: () => kt(e.id),
116
131
  children: [
117
- I && /* @__PURE__ */ c(
132
+ L && /* @__PURE__ */ c(
118
133
  "input",
119
134
  {
120
135
  className: e.enabled ? "" : "ignore",
121
136
  type: "checkbox",
122
137
  checked: e.enabled,
123
138
  style: {
124
- backgroundColor: I ? j === "values" ? te : e.color : "none",
139
+ backgroundColor: L ? Y === "values" ? te : e.color : "none",
125
140
  color: "#000"
126
141
  }
127
142
  }
128
143
  ),
129
- !I && /* @__PURE__ */ c(
144
+ !L && /* @__PURE__ */ c(
130
145
  "input",
131
146
  {
132
147
  type: "checkbox",
@@ -136,20 +151,20 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
136
151
  }
137
152
  }
138
153
  ),
139
- I && /* @__PURE__ */ c(
154
+ L && /* @__PURE__ */ c(
140
155
  "span",
141
156
  {
142
157
  className: "checkmark-with-bg",
143
158
  style: { backgroundColor: e.color }
144
159
  }
145
160
  ),
146
- !I && /* @__PURE__ */ c("span", { className: "checkmark" }),
161
+ !L && /* @__PURE__ */ c("span", { className: "checkmark" }),
147
162
  ie && /* @__PURE__ */ c(
148
163
  "label",
149
164
  {
150
165
  className: e.enabled ? "" : "ignore",
151
166
  style: {
152
- backgroundColor: j === "values" ? te : e.color,
167
+ backgroundColor: Y === "values" ? te : e.color,
153
168
  color: ce
154
169
  },
155
170
  children: e.label
@@ -168,35 +183,35 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
168
183
  ]
169
184
  }
170
185
  )),
171
- j === "values" && /* @__PURE__ */ p("div", { className: "legend item", children: [
186
+ Y === "values" && /* @__PURE__ */ p("div", { className: "legend item", children: [
172
187
  /* @__PURE__ */ c(
173
188
  "label",
174
189
  {
175
190
  className: "range min",
176
191
  style: {
177
- backgroundColor: v.getColorByValue(
178
- v.minValue
192
+ backgroundColor: N.getColorByValue(
193
+ N.minValue
179
194
  ),
180
195
  color: "#fff"
181
196
  }
182
197
  }
183
198
  ),
184
199
  /* @__PURE__ */ c("label", { children: g.formatNumber(
185
- b.style === "percent" ? v.minValue / 100 : v.minValue,
200
+ b.style === "percent" ? N.minValue / 100 : N.minValue,
186
201
  {
187
202
  ...b,
188
203
  minimumFractionDigits: 0
189
204
  }
190
205
  ) })
191
206
  ] }),
192
- j === "values" && /* @__PURE__ */ p("div", { className: "legend item", children: [
207
+ Y === "values" && /* @__PURE__ */ p("div", { className: "legend item", children: [
193
208
  /* @__PURE__ */ c(
194
209
  "label",
195
210
  {
196
211
  className: "range max",
197
212
  style: {
198
- backgroundColor: v.getColorByValue(
199
- v.maxValue
213
+ backgroundColor: N.getColorByValue(
214
+ N.maxValue
200
215
  ),
201
216
  color: "#fff"
202
217
  },
@@ -204,22 +219,22 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
204
219
  }
205
220
  ),
206
221
  /* @__PURE__ */ c("label", { children: g.formatNumber(
207
- b.style === "percent" ? v.maxValue / 100 : v.maxValue,
222
+ b.style === "percent" ? N.maxValue / 100 : N.maxValue,
208
223
  {
209
224
  ...b,
210
225
  minimumFractionDigits: 0
211
226
  }
212
227
  ) })
213
228
  ] }),
214
- G && ne && W.map((e, t) => /* @__PURE__ */ p("div", { className: "legend item", onClick: () => kt(t), children: [
229
+ G && ne && A.map((e, t) => /* @__PURE__ */ p("div", { className: "legend item", onClick: () => wt(t), children: [
215
230
  /* @__PURE__ */ c(
216
231
  "input",
217
232
  {
218
- className: I && N[t] ? "" : "ignore",
233
+ className: L && I[t] ? "" : "ignore",
219
234
  type: "checkbox",
220
- checked: N[t],
235
+ checked: I[t],
221
236
  style: {
222
- backgroundColor: N[t] && I === !0 ? e.lineColor : "none",
237
+ backgroundColor: I[t] && L === !0 ? e.lineColor : "none",
223
238
  color: "#000"
224
239
  }
225
240
  }
@@ -227,18 +242,18 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
227
242
  /* @__PURE__ */ c(
228
243
  "span",
229
244
  {
230
- className: I ? "checkmark-with-bg" : "checkmark",
245
+ className: L ? "checkmark-with-bg" : "checkmark",
231
246
  style: {
232
- backgroundColor: N[t] && I === !0 ? e.lineColor : "none"
247
+ backgroundColor: I[t] && L === !0 ? e.lineColor : "none"
233
248
  }
234
249
  }
235
250
  ),
236
251
  /* @__PURE__ */ c(
237
252
  "label",
238
253
  {
239
- className: N[t] ? "" : "ignore",
254
+ className: I[t] ? "" : "ignore",
240
255
  style: {
241
- backgroundColor: N[t] && ie === !0 ? e.lineColor : "none",
256
+ backgroundColor: I[t] && ie === !0 ? e.lineColor : "none",
242
257
  color: ce
243
258
  },
244
259
  children: e.title
@@ -246,24 +261,26 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
246
261
  )
247
262
  ] }))
248
263
  ] }));
249
- Ht(() => {
264
+ be(() => {
250
265
  (() => {
251
- const i = 5 * Math.max(P.length - 5, 0);
252
- ht(i);
266
+ const i = 5 * Math.max(K.length - 5, 0);
267
+ ft(i);
253
268
  })();
254
- }, [P]);
255
- const ot = {
256
- bottom: `-${Fe}px`
269
+ }, [K]), be(() => {
270
+ $e(S), Be(j);
271
+ }, [v, S, j]);
272
+ const yt = {
273
+ bottom: `-${Ee}px`
257
274
  }, xt = {
258
- bottom: `-${Fe}px`,
275
+ bottom: `-${Ee}px`,
259
276
  gap: "0px"
260
277
  // top: "0px",
261
- }, yt = (e) => fe(e, "1 0", _e, "Y"), pt = (e) => fe(e, "4 4", J, "X"), bt = (e) => fe(e, "1 0", _e, "X"), gt = (e) => {
262
- const t = P.find((i) => i.id === e.value);
278
+ }, pt = (e) => fe(e, "1 0", Ye, "Y"), bt = (e) => fe(e, "4 4", U, "X"), gt = (e) => fe(e, "1 0", Ye, "X"), vt = (e) => {
279
+ const t = K.find((i) => i.id === e.value);
263
280
  return t ? t.color : "#FFFFFF";
264
- }, vt = (e) => {
281
+ }, Nt = (e) => {
265
282
  const { yScale: t, bars: i } = e;
266
- return /* @__PURE__ */ c(He, { children: i.filter((n) => n.data.value != null).map((n) => {
283
+ return /* @__PURE__ */ c(Se, { children: i.filter((n) => n.data.value != null).map((n) => {
267
284
  let l = n.data.indexValue;
268
285
  u.dimensionsMetadata && u.dimensionsMetadata.size > 1 && (l = n.data.id);
269
286
  const s = de.filter(
@@ -280,7 +297,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
280
297
  x1: n.x + n.width / 2,
281
298
  x2: n.x + n.width / 2,
282
299
  strokeWidth: 1,
283
- stroke: J
300
+ stroke: U
284
301
  }
285
302
  ),
286
303
  /* @__PURE__ */ c(
@@ -291,7 +308,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
291
308
  x1: n.x + n.width / 2 - 3,
292
309
  x2: n.x + n.width / 2 + 3,
293
310
  strokeWidth: 1,
294
- stroke: J
311
+ stroke: U
295
312
  }
296
313
  ),
297
314
  /* @__PURE__ */ c(
@@ -302,7 +319,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
302
319
  x1: n.x + n.width / 2 - 3,
303
320
  x2: n.x + n.width / 2 + 3,
304
321
  strokeWidth: 1,
305
- stroke: J
322
+ stroke: U
306
323
  }
307
324
  )
308
325
  ] });
@@ -311,7 +328,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
311
328
  }, fe = (e, t, i, n) => {
312
329
  const { yScale: l, innerWidth: s, innerHeight: r } = e;
313
330
  let a, h;
314
- return n == "X" ? (a = [0, s], h = We().x((f, V) => V === 0 ? -10 : f).y(() => l(0))) : (a = [0, r], h = We().x(() => 0).y((f) => f)), /* @__PURE__ */ c(He, { children: /* @__PURE__ */ c(
331
+ return n == "X" ? (a = [0, s], h = je().x((f, V) => V === 0 ? -10 : f).y(() => l(0))) : (a = [0, r], h = je().x(() => 0).y((f) => f)), /* @__PURE__ */ c(Se, { children: /* @__PURE__ */ c(
315
332
  "path",
316
333
  {
317
334
  d: h(a),
@@ -320,25 +337,25 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
320
337
  style: { pointerEvents: "none", strokeDasharray: t }
321
338
  }
322
339
  ) });
323
- }, O = (e, t) => L ? ($.colorBy === "index" || $.colorBy === "id" || $.colorBy === "values") && !t ? e.filter((i) => L.indexOf(i[u.indexBy]) === -1) : e ? e.filter((i) => L.indexOf(i) === -1) : [] : e, Nt = (e) => {
324
- const t = St();
340
+ }, M = (e, t) => k ? (H.colorBy === "index" || H.colorBy === "id" || H.colorBy === "values") && !t ? e.filter((i) => k.indexOf(i[u.indexBy]) === -1) : e ? e.filter((i) => k.indexOf(i) === -1) : [] : e, It = (e) => {
341
+ const t = _t();
325
342
  if (!e.value) return "";
326
343
  const i = Object.assign({}, e);
327
- (_ || T) && ye.includes(String(i.value)) && (i.value = "");
344
+ (_ || T) && xe.includes(String(i.value)) && (i.value = "");
328
345
  let n;
329
- Ye ? n = te : n = gt(e);
346
+ Ze ? n = te : n = vt(e);
330
347
  let l = [], s = "";
331
348
  if (T || _) {
332
349
  const a = String(i.value).split(" ");
333
350
  let h = 25;
334
- x && B === "Mobile" || C && !x ? h = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : x && B === "Tablet" || X && !x ? h = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !x && (h = 15), a.forEach((f) => {
351
+ y && z === "Mobile" || Z && !y ? h = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : y && z === "Tablet" || q && !y ? h = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (h = 15), a.forEach((f) => {
335
352
  s.length + String(f).length <= h ? s += (s ? " " : "") + f : (l.push(s), s = f);
336
353
  }), s && l.push(s);
337
354
  } else
338
355
  l = [i.value];
339
356
  let r = 12;
340
- return C ? r = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : X && (r = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), E > 0 && E < 180 ? /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
341
- A && /* @__PURE__ */ c(
357
+ return Z ? r = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : q && (r = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), E > 0 && E < 180 ? /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
358
+ R && /* @__PURE__ */ c(
342
359
  "line",
343
360
  {
344
361
  stroke: n,
@@ -356,7 +373,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
356
373
  dominantBaseline: "middle",
357
374
  style: {
358
375
  ...t.axis.ticks.text,
359
- fill: w === "null" ? "black" : w,
376
+ fill: D === "null" ? "black" : D,
360
377
  fontSize: "12px",
361
378
  fontFamily: "sans-serif"
362
379
  },
@@ -365,7 +382,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
365
382
  a
366
383
  )) })
367
384
  ] }) : E > 180 && E < 360 ? /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
368
- A && /* @__PURE__ */ c(
385
+ R && /* @__PURE__ */ c(
369
386
  "line",
370
387
  {
371
388
  stroke: n,
@@ -383,7 +400,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
383
400
  dominantBaseline: "middle",
384
401
  style: {
385
402
  ...t.axis.ticks.text,
386
- fill: w === "null" ? "black" : w,
403
+ fill: D === "null" ? "black" : D,
387
404
  fontSize: "12px",
388
405
  fontFamily: "sans-serif"
389
406
  },
@@ -392,7 +409,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
392
409
  h
393
410
  )) })
394
411
  ] }) : /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y + 30})`, children: [
395
- A && /* @__PURE__ */ c(
412
+ R && /* @__PURE__ */ c(
396
413
  "line",
397
414
  {
398
415
  stroke: n,
@@ -410,7 +427,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
410
427
  dominantBaseline: "middle",
411
428
  style: {
412
429
  ...t.axis.ticks.text,
413
- fill: w === "null" ? "black" : w,
430
+ fill: D === "null" ? "black" : D,
414
431
  fontSize: "12px",
415
432
  fontFamily: "sans-serif"
416
433
  },
@@ -419,12 +436,12 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
419
436
  h
420
437
  )) })
421
438
  ] });
422
- }, It = (e) => {
423
- if (!e.value || (T || _) && ye.includes(String(e.value)))
439
+ }, Lt = (e) => {
440
+ if (!e.value || (T || _) && xe.includes(String(e.value)))
424
441
  return "";
425
442
  let t = e.value;
426
443
  if (o === "vertical") {
427
- const a = M || b;
444
+ const a = F || b;
428
445
  t = g.formatNumber(
429
446
  a.style === "percent" ? t / 100 : t,
430
447
  {
@@ -433,14 +450,14 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
433
450
  );
434
451
  }
435
452
  let i = 25;
436
- x && B === "Mobile" || C && !x ? i = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : x && B === "Tablet" || X && !x ? i = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !x && (i = 15);
453
+ y && z === "Mobile" || Z && !y ? i = (m == null ? void 0 : m.mobileMaxTickLength) ?? 25 : y && z === "Tablet" || q && !y ? i = (m == null ? void 0 : m.tabletMaxTickLength) ?? 25 : window.matchMedia("(min-width: 768px) and (max-width: 1250px)").matches && !y && (i = 15);
437
454
  const n = typeof t == "string" ? t.split(" ") : [t], l = [];
438
455
  let s = "";
439
456
  n.forEach((a) => {
440
457
  s.length + String(a).length <= i ? s += (s ? " " : "") + a : (l.push(s), s = a);
441
458
  }), s && l.push(s);
442
459
  let r = 12;
443
- return x && B === "Mobile" || C && !x ? r = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : (x && B === "Tablet" || X && !x) && (r = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y})`, children: [
460
+ return y && z === "Mobile" || Z && !y ? r = (m == null ? void 0 : m.mobileYAxisLineHeight) ?? 12 : (y && z === "Tablet" || q && !y) && (r = (m == null ? void 0 : m.tabletYAxisLineHeight) ?? 12), /* @__PURE__ */ p("g", { transform: `translate(${e.x},${e.y})`, children: [
444
461
  /* @__PURE__ */ c("line", { x1: -5, x2: 0, y1: 0, y2: 0, stroke: "#000", strokeWidth: 1 }),
445
462
  l.map((a, h) => /* @__PURE__ */ c(
446
463
  "text",
@@ -450,7 +467,7 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
450
467
  textAnchor: "end",
451
468
  dominantBaseline: "middle",
452
469
  style: {
453
- fill: w === "null" ? "black" : w,
470
+ fill: D === "null" ? "black" : D,
454
471
  fontSize: "12px",
455
472
  fontFamily: "sans-serif"
456
473
  },
@@ -459,17 +476,17 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
459
476
  a
460
477
  ))
461
478
  ] });
462
- }, Lt = (e) => {
463
- const t = L.slice();
479
+ }, kt = (e) => {
480
+ const t = k.slice();
464
481
  if (t.indexOf(e) > -1) {
465
482
  const i = t.indexOf(e);
466
483
  t.splice(i, 1);
467
484
  } else
468
485
  t.push(e);
469
- ct(t);
470
- }, kt = (e) => {
471
- const t = Object.assign({}, N);
472
- t[e] = !t[e], dt(t);
486
+ mt(t);
487
+ }, wt = (e) => {
488
+ const t = Object.assign({}, I);
489
+ t[e] = !t[e], ut(t);
473
490
  }, Dt = ({ bars: e }) => /* @__PURE__ */ c("g", { children: e.map((t) => {
474
491
  const { width: i, height: n, y: l, x: s, data: r } = t;
475
492
  if (o === "horizontal" && n <= me || o === "vertical" && i <= he)
@@ -489,20 +506,20 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
489
506
  children: `${a}`
490
507
  }
491
508
  );
492
- }) }), wt = (e) => {
493
- const t = u.data.filter((n) => L.indexOf(n[u.indexBy]) == -1).map((n) => n[u.indexBy]), { bars: i } = e;
509
+ }) }), Ft = (e) => {
510
+ const t = u.data.filter((n) => k.indexOf(n[u.indexBy]) == -1).map((n) => n[u.indexBy]), { bars: i } = e;
494
511
  return /* @__PURE__ */ c("g", { children: t.filter(
495
512
  (n) => i.filter((l) => l.data.indexValue == n).length > 0
496
513
  ).map((n) => {
497
- var Z;
514
+ var J;
498
515
  const l = i.filter((d) => d.data.indexValue == n);
499
516
  let s = "right", r = 0, a = 0;
500
517
  if (o == "horizontal")
501
- F === "stacked" ? (K ? r = e.innerWidth - 20 : (r = l.map((d) => d.width).reduce((d, y) => d + y), H && (r = e.innerWidth - r)), a = e.yScale(n) + l[0].height / 2) : (K ? r = e.innerWidth : (r = l.map((d) => d.width).reduce((d, y) => d > y ? d : y), H && (r = e.innerWidth - r)), a = e.yScale(n) + l.map((d) => d.height).reduce((d, y) => d + y) / 2), r = r + parseInt(z) + 5;
502
- else if (s = "middle", F === "stacked")
503
- r = e.xScale(n) + l[0].width / 2, K ? a = a - parseInt(z) : H ? a = parseInt(z) + l.map((d) => d.height).reduce((d, y) => d + y) + 14 : a = e.innerHeight - parseInt(z) - l.map((d) => d.height).reduce((d, y) => d + y) - 5;
504
- else if (r = e.xScale(n) + l.map((d) => d.width).reduce((d, y) => d + y) / 2, H && (a = e.innerHeight), K)
505
- a = a - parseInt(z);
518
+ O === "stacked" ? (C ? r = e.innerWidth - 20 : (r = l.map((d) => d.width).reduce((d, x) => d + x), W && (r = e.innerWidth - r)), a = e.yScale(n) + l[0].height / 2) : (C ? r = e.innerWidth : (r = l.map((d) => d.width).reduce((d, x) => d > x ? d : x), W && (r = e.innerWidth - r)), a = e.yScale(n) + l.map((d) => d.height).reduce((d, x) => d + x) / 2), r = r + parseInt($) + 5;
519
+ else if (s = "middle", O === "stacked")
520
+ r = e.xScale(n) + l[0].width / 2, C ? a = a - parseInt($) : W ? a = parseInt($) + l.map((d) => d.height).reduce((d, x) => d + x) + 14 : a = e.innerHeight - parseInt($) - l.map((d) => d.height).reduce((d, x) => d + x) - 5;
521
+ else if (r = e.xScale(n) + l.map((d) => d.width).reduce((d, x) => d + x) / 2, W && (a = e.innerHeight), C)
522
+ a = a - parseInt($);
506
523
  else {
507
524
  if (l.length % 2 == 1) {
508
525
  const d = Math.floor(l.length / 2);
@@ -514,15 +531,15 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
514
531
  l[d - 1].height
515
532
  );
516
533
  }
517
- H ? a = a + 14 + parseInt(z) : a = e.innerHeight - a - parseInt(z) - 5;
534
+ W ? a = a + 14 + parseInt($) : a = e.innerHeight - a - parseInt($) - 5;
518
535
  }
519
536
  const h = u.data.filter(
520
537
  (d) => d[u.indexBy] === n
521
538
  )[0];
522
- let f = h.parent_variables ? h.parent_variables[we] : h[we];
523
- const V = j !== "index" ? (Z = L == null ? void 0 : L.map((d) => h[d])) == null ? void 0 : Z.reduce((d, y) => d + y, 0) : 0;
539
+ let f = h.parent_variables ? h.parent_variables[Fe] : h[Fe];
540
+ const V = Y !== "index" ? (J = k == null ? void 0 : k.map((d) => h[d])) == null ? void 0 : J.reduce((d, x) => d + x, 0) : 0;
524
541
  return f -= V, /* @__PURE__ */ c("text", { y: a, x: r, style: { fill: ue() }, children: /* @__PURE__ */ p("tspan", { textAnchor: s, children: [
525
- ke ? ke + " " : "",
542
+ we ? we + " " : "",
526
543
  g.formatNumber(
527
544
  De.style === "percent" ? f / 100 : f,
528
545
  De
@@ -530,32 +547,32 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
530
547
  ] }) });
531
548
  }) });
532
549
  }, Mt = {
533
- top: q,
534
- right: Ae,
535
- bottom: Q,
536
- left: Se
550
+ top: S,
551
+ right: Pe,
552
+ bottom: j,
553
+ left: Ke
537
554
  };
538
555
  let oe;
539
- ve && (oe = be.parse(ve, {
556
+ Ne && (oe = ge.parse(Ne, {
540
557
  header: !1,
541
558
  dynamicTyping: !0
542
559
  }), Math.max(...oe.data.map((e) => e[1])), Math.min(...oe.data.map((e) => e[1])));
543
- const Be = () => {
560
+ const Ae = () => {
544
561
  const e = [];
545
562
  if (de && de.forEach((t) => {
546
563
  t.low && e.push(parseFloat(t.low)), t.high && e.push(parseFloat(t.high));
547
564
  }), u.data) {
548
- const t = O(u.data, !1), i = O(u.keys, !0);
565
+ const t = M(u.data, !1), i = M(u.keys, !0);
549
566
  t.forEach((n) => {
550
567
  i.forEach((l) => {
551
568
  n[l] && e.push(n[l]);
552
569
  });
553
570
  });
554
571
  }
555
- return ne && W && W.forEach((t, i) => {
556
- if (N[i] !== !1)
572
+ return ne && A && A.forEach((t, i) => {
573
+ if (I[i] !== !1)
557
574
  if (t.app === "csv" && t.csvLineLayerData) {
558
- const n = be.parse(t.csvLineLayerData, {
575
+ const n = ge.parse(t.csvLineLayerData, {
559
576
  header: !1,
560
577
  dynamicTyping: !0
561
578
  });
@@ -567,45 +584,45 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
567
584
  });
568
585
  }), e;
569
586
  }, Ot = () => {
570
- const e = Be(), t = e.length > 0 ? Math.max(...e) : 0;
587
+ const e = Ae(), t = e.length > 0 ? Math.max(...e) : 0;
571
588
  if (re === "fixed" && se !== null && se !== "")
572
589
  return Number(se);
573
- if (F === "stacked" && re !== "fixed") {
574
- const i = O(u.data, !1), n = O(u.keys, !0);
590
+ if (O === "stacked" && re !== "fixed") {
591
+ const i = M(u.data, !1), n = M(u.keys, !0);
575
592
  let l = n.length > 0 ? n : u.keys;
576
593
  const s = Math.max(
577
- ...i.map((r) => l.map((a) => r[a] ? r[a] : 0)).map(
578
- (r) => r.length > 0 ? r.reduce((a, h) => a + h, 0) : 0
579
- )
594
+ ...i.map((r) => l.map((a) => r[a] ? r[a] : 0)).map((r) => r.length > 0 ? r.reduce((a, h) => a + h, 0) : 0)
580
595
  );
581
596
  return Math.max(s, t) * 1.1;
582
597
  }
583
598
  return t * 1.05;
584
- }, Ft = () => {
585
- const e = Be(), t = e.length > 0 ? Math.min(...e) : 0;
599
+ }, Et = () => {
600
+ const e = Ae(), t = e.length > 0 ? Math.min(...e) : 0;
586
601
  return re === "fixed" && le !== null && String(le) !== "" ? Number(le) : t > 0 ? t * 0.9 : t * 1.1;
587
- }, Et = Number(Ot()), zt = Number(Ft()), Bt = Math.min(0, zt), Vt = Math.max(0, Et), k = ["grid", "axes", "bars"];
588
- qe && k.push(wt), k.push(yt), k.push(bt), ne && W && W.forEach((e, t) => {
589
- if (N[t] == !0 || N[t] == null) {
602
+ }, $t = Number(Ot()), zt = Number(Et()), Vt = Math.min(0, zt), Bt = Math.max(0, $t), w = ["grid", "axes", "bars"];
603
+ at && w.push(Ft), w.push(pt), w.push(gt), ne && A && A.forEach((e, t) => {
604
+ if (I[t] == !0 || I[t] == null) {
590
605
  const { csvLineLayerData: i, lineColor: n, tooltip: l } = e;
591
606
  if (e.app == "csv") {
592
- const s = be.parse(i, {
607
+ const s = ge.parse(i, {
593
608
  header: !1,
594
609
  dynamicTyping: !0
595
610
  });
596
611
  if (s.data && s.data.filter((r) => r[1] !== null).length > 0) {
597
- s.data = s.data.filter((a) => a[1] !== null);
598
- const r = Te(
612
+ s.data = s.data.filter(
613
+ (a) => a[1] !== null
614
+ );
615
+ const r = Re(
599
616
  s,
600
617
  n,
601
618
  o,
602
- F,
603
- O(u.keys, !0),
619
+ O,
620
+ M(u.keys, !0),
604
621
  l,
605
622
  e.title,
606
623
  ""
607
624
  );
608
- k.push(r);
625
+ w.push(r);
609
626
  }
610
627
  } else if (e.measure[0]) {
611
628
  const s = {}, r = u.data.map((f) => [
@@ -613,61 +630,63 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
613
630
  f.variables[e.measure[0]]
614
631
  ]), a = u.metadata.measures ? u.metadata.measures.filter((f) => f.value == e.measure[0]) : [];
615
632
  s.data = r;
616
- const h = Te(
633
+ const h = Re(
617
634
  s,
618
635
  n,
619
636
  o,
620
- F,
621
- O(u.keys, !0),
637
+ O,
638
+ M(u.keys, !0),
622
639
  l,
623
640
  e.title,
624
641
  a.length > 0 ? a[0].label : ""
625
642
  );
626
- k.push(h);
643
+ w.push(h);
627
644
  }
628
645
  }
629
- }), Ie === Pt && k.push(Dt), Ze && k.push(pt), k.push(vt);
630
- let xe = parseInt(et);
631
- const Ve = () => /* @__PURE__ */ c(pe, { children: G && Ne && /* @__PURE__ */ c("div", { className: "legend item", children: /* @__PURE__ */ c("label", { className: "legend-title", children: Ne }) }) }), ye = [];
646
+ }), Le === Rt && w.push(Dt), Ge && w.push(bt), w.push(Nt);
647
+ let ye = parseInt(lt);
648
+ const Te = () => /* @__PURE__ */ c(pe, { children: G && Ie && /* @__PURE__ */ c("div", { className: "legend item", children: /* @__PURE__ */ c("label", { className: "legend-title", children: Ie }) }) }), xe = [];
632
649
  if (_ || T) {
633
- xe = Number.parseInt(m.yAxisTickValues);
634
- const e = new Map(Object.entries((($e = m == null ? void 0 : m.labels) == null ? void 0 : $e.xAxis) ?? {}));
650
+ ye = Number.parseInt(m.yAxisTickValues);
651
+ const e = new Map(
652
+ Object.entries(((_e = m == null ? void 0 : m.labels) == null ? void 0 : _e.xAxis) ?? {})
653
+ );
635
654
  for (const [t, i] of e)
636
- i || ye.push(t);
655
+ i || xe.push(t);
637
656
  }
638
- let $t = parseInt(je + "") - ut;
639
- return /* @__PURE__ */ c("div", { style: { height: $t + "px" }, className: "bar-chart", children: (u == null ? void 0 : u.data) && u.data.length > 0 && /* @__PURE__ */ p(pe, { children: [
657
+ let Ht = parseInt(Xe + "") - Ve;
658
+ return /* @__PURE__ */ c("div", { style: { height: Ht + "px" }, className: "bar-chart", children: (u == null ? void 0 : u.data) && u.data.length > 0 && /* @__PURE__ */ p(pe, { children: [
640
659
  /* @__PURE__ */ c(
641
- Tt,
660
+ At,
642
661
  {
643
- colorBy: $.colorBy,
662
+ colorBy: H.colorBy,
644
663
  animate: !0,
645
- enableLabel: Ie == jt,
664
+ enableLabel: Le == jt,
646
665
  ...u,
647
- maxValue: Vt,
648
- minValue: Bt,
649
- keys: O(u.keys, !0),
650
- data: O(u.data, !1),
651
- groupMode: F || "grouped",
666
+ maxValue: Bt,
667
+ minValue: Vt,
668
+ keys: M(u.keys, !0),
669
+ data: M(u.data, !1),
670
+ groupMode: O || "grouped",
652
671
  margin: Mt,
653
- innerPadding: Xe,
654
- valueScale: { type: Re, clamp: !0 },
655
- colors: (e) => e && e.data[U] ? e.data[U] : v.getColor(e.id, e.data),
672
+ innerPadding: Ue,
673
+ valueScale: { type: qe, clamp: !0 },
674
+ colors: (e) => e && e.data[Q] ? e.data[Q] : N.getColor(e.id, e.data),
656
675
  borderColor: "#000",
657
- reverse: H,
676
+ reverse: W,
658
677
  axisTop: null,
659
- axisRight: Je ? {
660
- tickSize: o == "horizontal" && A || o === "vertical" ? 5 : 0,
678
+ axisRight: et ? {
679
+ tickSize: o == "horizontal" && R || o === "vertical" ? 5 : 0,
661
680
  tickPadding: 5,
662
681
  tickRotation: 0,
663
- tickValues: xe,
664
- legend: R.right,
682
+ tickValues: ye,
683
+ legend: P.right,
665
684
  legendPosition: "middle",
666
- legendOffset: parseInt(Ue),
685
+ legendOffset: parseInt(tt),
667
686
  format: (e) => {
668
687
  if (!e) return "";
669
688
  if (o == "vertical") {
670
- const t = M || b;
689
+ const t = F || b;
671
690
  return g.formatNumber(
672
691
  t.style === "percent" ? e / 100 : e,
673
692
  {
@@ -679,16 +698,16 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
679
698
  }
680
699
  } : null,
681
700
  axisBottom: (T || _) && (m == null ? void 0 : m.xAxisDisabled) === !0 ? null : o === "horizontal" ? {
682
- legend: R.bottom,
701
+ legend: P.bottom,
683
702
  legendPosition: "middle",
684
- legendOffset: parseInt(Le),
703
+ legendOffset: parseInt(ke),
685
704
  tickPadding: 5,
686
705
  tickRotation: 0,
687
- tickValues: parseInt(Ge),
706
+ tickValues: parseInt(rt),
688
707
  format: (e) => {
689
708
  if (!e) return "";
690
709
  if (o == "horizontal") {
691
- const t = M || b;
710
+ const t = F || b;
692
711
  return g.formatNumber(
693
712
  t.style === "percent" ? e / 100 : e,
694
713
  {
@@ -699,24 +718,24 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
699
718
  return e;
700
719
  }
701
720
  } : {
702
- legend: R.bottom,
721
+ legend: P.bottom,
703
722
  legendPosition: "middle",
704
- legendOffset: parseInt(Le),
705
- renderTick: Nt
723
+ legendOffset: parseInt(ke),
724
+ renderTick: It
706
725
  },
707
726
  axisLeft: {
708
- tickSize: o === "horizontal" && A || o === "vertical" ? 5 : 0,
727
+ tickSize: o === "horizontal" && R || o === "vertical" ? 5 : 0,
709
728
  tickPadding: 5,
710
729
  tickRotation: 0,
711
- tickValues: xe,
712
- legend: R.left,
730
+ tickValues: ye,
731
+ legend: P.left,
713
732
  legendPosition: "middle",
714
- legendOffset: Number.parseInt(Pe),
715
- ...T || _ ? { renderTick: It } : {
733
+ legendOffset: Number.parseInt(Ce),
734
+ ...T || _ ? { renderTick: Lt } : {
716
735
  format: (e) => {
717
736
  if (!e) return "";
718
737
  if (o === "vertical") {
719
- const t = M || b;
738
+ const t = F || b;
720
739
  return g.formatNumber(
721
740
  t.style === "percent" ? e / 100 : e,
722
741
  {
@@ -728,32 +747,32 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
728
747
  }
729
748
  }
730
749
  },
731
- enableGridY: nt,
732
- enableGridX: rt,
750
+ enableGridY: ct,
751
+ enableGridX: dt,
733
752
  layout: o,
734
753
  labelSkipWidth: he,
735
754
  labelSkipHeight: me,
736
- padding: Ke,
755
+ padding: Je,
737
756
  labelTextColor: ue(),
738
757
  label: (e) => g.formatNumber(
739
758
  b.style === "percent" && e.value ? e.value / 100 : e.value,
740
759
  b
741
760
  ),
742
- layers: k,
761
+ layers: w,
743
762
  onMouseEnter: (e) => {
744
763
  },
745
764
  onMouseLeave: (e) => {
746
765
  },
747
766
  motionStiffness: 130,
748
767
  motionDamping: 15,
749
- tooltip: (e) => Ce && ae && ae.trim().length > 0 ? /* @__PURE__ */ c(
768
+ tooltip: (e) => Qe && ae && ae.trim().length > 0 ? /* @__PURE__ */ c(
750
769
  Wt,
751
770
  {
752
771
  intl: g,
753
772
  format: b,
754
773
  d: e,
755
774
  tooltip: ae,
756
- tooltipEnableMarkdown: Qe
775
+ tooltipEnableMarkdown: nt
757
776
  }
758
777
  ) : null,
759
778
  theme: {
@@ -773,40 +792,39 @@ const jt = "middle", Pt = "top", J = "#66676d", _e = "#dddddd", Rt = "none", U =
773
792
  }
774
793
  }
775
794
  ),
776
- (D === "top" || D === "bottom") && /* @__PURE__ */ c(
795
+ (v === "top" || v === "bottom") && He && /* @__PURE__ */ c(
777
796
  "div",
778
797
  {
779
- className: `legends container has-standard-12-font-size ${D}`,
798
+ className: `legends container has-standard-12-font-size ${v}`,
799
+ style: v === "bottom" ? { marginBottom: `${Ve}px` } : {},
780
800
  children: /* @__PURE__ */ p("div", { className: "legend-sections", children: [
781
- /* @__PURE__ */ c("div", { className: "title-section", children: Ve() }),
801
+ /* @__PURE__ */ c("div", { className: "title-section", children: Te() }),
782
802
  /* @__PURE__ */ c(
783
- At,
803
+ St,
784
804
  {
785
805
  onWrapChange: (e) => {
786
- D === "top" ? (mt(q + e / 2 * 40), Ee(e)) : (ft(Q + e / 2 * 25), Ee(e));
806
+ v === "top" ? ($e(S + e / 2 * 40), ze(e)) : (Be(j + e / 2 * 25), ze(e));
787
807
  },
788
808
  className: "legends container has-standard-12-font-size items-section",
789
- useColumns: lt,
790
- numberOfLegendColumns: st,
791
- children: ze()
809
+ children: We()
792
810
  }
793
811
  )
794
812
  ] })
795
813
  }
796
814
  ),
797
- (D === "right" || D === "left") && /* @__PURE__ */ p(
815
+ (v === "right" || v === "left") && He && /* @__PURE__ */ p(
798
816
  "div",
799
817
  {
800
- className: `legends container has-standard-12-font-size ${D}`,
801
- style: D === "right" ? ot : xt,
818
+ className: `legends container has-standard-12-font-size ${v}`,
819
+ style: v === "right" ? yt : xt,
802
820
  children: [
803
- Ve(),
804
- ze()
821
+ Te(),
822
+ We()
805
823
  ]
806
824
  }
807
825
  )
808
826
  ] }) });
809
- }, sa = _t(Yt);
827
+ }, ca = Tt(Kt);
810
828
  export {
811
- sa as default
829
+ ca as default
812
830
  };