@dpuse/dpuse-tool-highcharts-visualiser 0.0.80 → 0.0.82

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 (35) hide show
  1. package/dist/{AnimationUtilities-Bby2idBR.js → AnimationUtilities-CJw-tdb_.js} +74 -83
  2. package/dist/AnimationUtilities-CJw-tdb_.js.map +1 -0
  3. package/dist/BorderRadius-CqHYi9va.js +135 -0
  4. package/dist/BorderRadius-CqHYi9va.js.map +1 -0
  5. package/dist/CenteredUtilities-BTUT7_Ld.js +1316 -0
  6. package/dist/CenteredUtilities-BTUT7_Ld.js.map +1 -0
  7. package/dist/{SVGElement-BmvC_qu3.js → SVGElement-uTuGcjav.js} +101 -103
  8. package/dist/SVGElement-uTuGcjav.js.map +1 -0
  9. package/dist/SeriesRegistry-CXsAINSj.js +376 -0
  10. package/dist/SeriesRegistry-CXsAINSj.js.map +1 -0
  11. package/dist/{TextPath-DK4Jkzd7.js → TextPath-Coabnrz0.js} +32 -34
  12. package/dist/{TextPath-DK4Jkzd7.js.map → TextPath-Coabnrz0.js.map} +1 -1
  13. package/dist/{dependency-wheel.src-BHmwx9rW.js → dependency-wheel.src-ByNiAiZS.js} +26 -27
  14. package/dist/dependency-wheel.src-ByNiAiZS.js.map +1 -0
  15. package/dist/dpuse-tool-highcharts-visualiser.es.js +2437 -2415
  16. package/dist/dpuse-tool-highcharts-visualiser.es.js.map +1 -1
  17. package/dist/highchartsMoreCustom-Cm6MkFMu.js +1178 -0
  18. package/dist/highchartsMoreCustom-Cm6MkFMu.js.map +1 -0
  19. package/dist/{pattern-fill.src-BPmr3DQg.js → pattern-fill.src-CGZp553r.js} +30 -32
  20. package/dist/{pattern-fill.src-BPmr3DQg.js.map → pattern-fill.src-CGZp553r.js.map} +1 -1
  21. package/dist/{sankey.src-DocCurOx.js → sankey.src-Buj1zAlU.js} +115 -117
  22. package/dist/sankey.src-Buj1zAlU.js.map +1 -0
  23. package/dist/{streamgraph.src-Bn6PY8Fd.js → streamgraph.src-DjMW1U2g.js} +4 -6
  24. package/dist/{streamgraph.src-Bn6PY8Fd.js.map → streamgraph.src-DjMW1U2g.js.map} +1 -1
  25. package/package.json +12 -12
  26. package/dist/AnimationUtilities-Bby2idBR.js.map +0 -1
  27. package/dist/BorderRadius-2zMZW_aK.js +0 -1445
  28. package/dist/BorderRadius-2zMZW_aK.js.map +0 -1
  29. package/dist/SVGElement-BmvC_qu3.js.map +0 -1
  30. package/dist/SeriesRegistry-0cj0ZJqn.js +0 -374
  31. package/dist/SeriesRegistry-0cj0ZJqn.js.map +0 -1
  32. package/dist/dependency-wheel.src-BHmwx9rW.js.map +0 -1
  33. package/dist/highchartsMoreCustom-CcpfmVny.js +0 -1110
  34. package/dist/highchartsMoreCustom-CcpfmVny.js.map +0 -1
  35. package/dist/sankey.src-DocCurOx.js.map +0 -1
@@ -1,1445 +0,0 @@
1
- import { A as e, B as t, C as n, E as r, F as i, G as a, H as o, I as s, Q as c, S as l, T as u, U as d, V as f, X as p, Y as m, Z as h, _ as g, a as _, c as v, f as y, g as b, i as x, j as S, k as C, m as w, n as T, nt as E, ot as D, p as O, s as k, u as A, x as j, y as M, z as ee } from "./AnimationUtilities-Bby2idBR.js";
2
- import { n as te, r as N, t as P } from "./SeriesRegistry-0cj0ZJqn.js";
3
- import { t as ne } from "./SVGElement-BmvC_qu3.js";
4
- //#region node_modules/highcharts/es-modules/Core/Foundation.js
5
- var F;
6
- (function(e) {
7
- function t(e, t) {
8
- e.eventOptions = e.eventOptions || {}, a(t.events, function(t, n) {
9
- e.eventOptions[n] !== t && (e.eventOptions[n] && (c(e, n, e.eventOptions[n]), delete e.eventOptions[n]), ee(t) && (e.eventOptions[n] = t, y(e, n, t, { order: 0 })));
10
- });
11
- }
12
- e.registerEventOptions = t;
13
- })(F ||= {});
14
- var I = F;
15
- //#endregion
16
- //#region node_modules/highcharts/es-modules/Data/ColumnUtils.js
17
- function re(e, t, n) {
18
- return Array.isArray(e) ? (e.length = t, e) : e[n ? "subarray" : "slice"](0, t);
19
- }
20
- function ie(e, t, n, r, i = []) {
21
- if (Array.isArray(e)) return Array.isArray(i) || (i = Array.from(i)), {
22
- removed: e.splice(t, n, ...i),
23
- array: e
24
- };
25
- let a = Object.getPrototypeOf(e).constructor, o = e[r ? "subarray" : "slice"](t, t + n), s = new a(e.length - n + i.length);
26
- return s.set(e.subarray(0, t), 0), s.set(i, t), s.set(e.subarray(t + n), t + i.length), {
27
- removed: o,
28
- array: s
29
- };
30
- }
31
- function L(e, t) {
32
- switch (typeof e) {
33
- case "boolean": return +!!e;
34
- case "number": return isNaN(e) && !t ? null : e;
35
- default: return e = parseFloat(`${e ?? ""}`), isNaN(e) && !t ? null : e;
36
- }
37
- }
38
- //#endregion
39
- //#region node_modules/highcharts/es-modules/Data/DataTableCore.js
40
- var { setLength: ae, splice: R } = {
41
- convertToNumber: L,
42
- setLength: re,
43
- splice: ie
44
- }, z = class {
45
- constructor(e = {}) {
46
- this.isDataTable = !0, this.autoId = !e.id, this.columns = {}, this.id = e.id || A(), this.rowCount = 0, this.versionTag = A();
47
- let t = 0;
48
- a(e.columns || {}, (e, n) => {
49
- this.columns[n] = e.slice(), t = Math.max(t, e.length);
50
- }), this.applyRowCount(t);
51
- }
52
- applyRowCount(e) {
53
- this.rowCount = e, a(this.columns, (t, n) => {
54
- t.length !== e && (this.columns[n] = ae(t, e));
55
- });
56
- }
57
- deleteRows(e, t = 1) {
58
- if (t > 0 && e < this.rowCount) {
59
- let n = 0;
60
- a(this.columns, (r, i) => {
61
- this.columns[i] = R(r, e, t).array, n = r.length;
62
- }), this.rowCount = n;
63
- }
64
- C(this, "afterDeleteRows", {
65
- rowIndex: e,
66
- rowCount: t
67
- }), this.versionTag = A();
68
- }
69
- getColumn(e, t) {
70
- return this.columns[e];
71
- }
72
- getColumns(e, t) {
73
- return (e || Object.keys(this.columns)).reduce((e, t) => (e[t] = this.columns[t], e), {});
74
- }
75
- getRowObject(e, t) {
76
- let n = {}, r = this.columns;
77
- t ??= Object.keys(this.columns);
78
- for (let i of t) n[i] = r[i]?.[e];
79
- return n;
80
- }
81
- setColumn(e, t = [], n = 0, r) {
82
- this.setColumns({ [e]: t }, n, r);
83
- }
84
- setColumns(e, t, n) {
85
- let r = this.rowCount;
86
- a(e, (e, t) => {
87
- this.columns[t] = e.slice(), r = e.length;
88
- }), this.applyRowCount(r), n?.silent || (C(this, "afterSetColumns"), this.versionTag = A());
89
- }
90
- setRow(e, t = this.rowCount, n, r) {
91
- var i;
92
- let { columns: o } = this, s = n ? this.rowCount + 1 : t + 1, c = Object.keys(e);
93
- if (r?.addColumns !== !1) for (let e = 0, t = c.length; e < t; e++) o[i = c[e]] || (o[i] = Array(this.rowCount));
94
- a(o, (r, i) => {
95
- r && (n ? r = R(r, t, 0, !0, [e[i]]).array : r[t] = i in e ? e[i] : r[t], o[i] = r);
96
- }), this.applyRowCount(Math.max(s, this.rowCount)), r?.silent || (C(this, "afterSetRows", { rowIndex: t }), this.versionTag = A());
97
- }
98
- getModified() {
99
- return this.modified || this;
100
- }
101
- }, B;
102
- (function(e) {
103
- function t(e, t) {
104
- n.call(this, e, t, !0);
105
- }
106
- e.areaMarker = t;
107
- function n(e, t, n) {
108
- let i = this.legendItem = this.legendItem || {}, { chart: a, options: o } = this, { baseline: s = 0, symbolWidth: c, symbolHeight: l } = e, u = this.symbol || "circle", f = l / 2, p = a.renderer, h = i.group, g = s - Math.round((e.fontMetrics?.b || l) * (n ? .4 : .3)), _ = {}, v, y = o.marker, b = 0;
109
- if (a.styledMode || (_["stroke-width"] = Math.min(o.lineWidth || 0, 24), o.dashStyle ? _.dashstyle = o.dashStyle : o.linecap !== "square" && (_["stroke-linecap"] = "round")), i.line = p.path().addClass("highcharts-graph").attr(_).add(h), n && (i.area = p.path().addClass("highcharts-area").add(h)), _["stroke-linecap"] && (b = Math.min(i.line.strokeWidth(), c) / 2), c) {
110
- let e = [[
111
- "M",
112
- b,
113
- g
114
- ], [
115
- "L",
116
- c - b,
117
- g
118
- ]];
119
- i.line.attr({ d: e }), i.area?.attr({ d: [
120
- ...e,
121
- [
122
- "L",
123
- c - b,
124
- s
125
- ],
126
- [
127
- "L",
128
- b,
129
- s
130
- ]
131
- ] });
132
- }
133
- if (y && y.enabled !== !1 && c) {
134
- let e = Math.min(m(y.radius, f), f);
135
- u.indexOf("url") === 0 && (y = d(y, {
136
- width: l,
137
- height: l
138
- }), e = 0), i.symbol = v = p.symbol(u, c / 2 - e, g - e, 2 * e, 2 * e, r({ context: "legend" }, y)).addClass("highcharts-point").add(h), v.isMarker = !0;
139
- }
140
- }
141
- e.lineMarker = n;
142
- })(B ||= {});
143
- var V = B, oe = {
144
- lineWidth: 2,
145
- allowPointSelect: !1,
146
- crisp: !0,
147
- showCheckbox: !1,
148
- animation: { duration: 1e3 },
149
- enableMouseTracking: !0,
150
- events: {},
151
- marker: {
152
- enabledThreshold: 2,
153
- lineColor: "var(--highcharts-background-color)",
154
- lineWidth: 0,
155
- radius: 4,
156
- states: {
157
- normal: { animation: !0 },
158
- hover: {
159
- animation: { duration: 150 },
160
- enabled: !0,
161
- radiusPlus: 2,
162
- lineWidthPlus: 1
163
- },
164
- select: {
165
- fillColor: "var(--highcharts-neutral-color-20)",
166
- lineColor: "var(--highcharts-neutral-color-100)",
167
- lineWidth: 2
168
- }
169
- }
170
- },
171
- point: { events: {} },
172
- dataLabels: {
173
- animation: {},
174
- align: "center",
175
- borderWidth: 0,
176
- defer: !0,
177
- distance: 4,
178
- formatter: function() {
179
- let { numberFormatter: e } = this.series.chart;
180
- return typeof this.y == "number" ? e(this.y, -1) : "";
181
- },
182
- padding: [1, 3],
183
- style: {
184
- fontSize: "0.7em",
185
- fontWeight: "bold",
186
- color: "contrast",
187
- textOutline: "1px contrast"
188
- },
189
- verticalAlign: "bottom",
190
- x: 0,
191
- y: 0
192
- },
193
- cropThreshold: 300,
194
- opacity: 1,
195
- pointRange: 0,
196
- softThreshold: !0,
197
- states: {
198
- normal: { animation: !0 },
199
- hover: {
200
- animation: { duration: 150 },
201
- lineWidthPlus: 1,
202
- marker: {},
203
- halo: {
204
- size: 10,
205
- opacity: .25
206
- }
207
- },
208
- select: { animation: { duration: 0 } },
209
- inactive: {
210
- animation: { duration: 150 },
211
- opacity: .2
212
- }
213
- },
214
- stickyTracking: !0,
215
- turboThreshold: 1e3,
216
- findNearestPointBy: "x"
217
- }, { animObject: H, setAnimation: se } = T, { defaultOptions: U } = _, { registerEventOptions: ce } = I, { svg: le, win: ue } = D, { seriesTypes: W } = P, { format: de } = N, G = class e {
218
- constructor() {
219
- this.zoneAxis = "y";
220
- }
221
- init(e, t) {
222
- C(this, "init", { options: t });
223
- let n = this, i = e.series;
224
- this.eventsToUnbind = [], this.condemnedPoints ||= [], n.chart = e, n.options = n.setOptions(t);
225
- let a = n.options, o = a.visible !== !1;
226
- this.dataTable ??= a.dataTable?.isDataTable ? a.dataTable : new z(a.dataTable), n.linkedSeries = [], n.bindAxes(), r(n, {
227
- name: a.name,
228
- state: "",
229
- visible: o,
230
- selected: a.selected === !0
231
- }), ce(this, a), (a.events?.click || a.point?.events?.click || a.allowPointSelect) && (e.runTrackerClick = !0), n.getColor(), n.getSymbol(), n.isCartesian && (e.hasCartesianSeries = !0);
232
- let s;
233
- i.length && (s = i[i.length - 1]), n._i = m(s?._i, -1) + 1, n.opacity = n.options.opacity, e.orderItems("series", v(this, i)), !n.points && !n.data && n.setData(a.data, !1), C(this, "afterInit");
234
- }
235
- is(e) {
236
- return W[e] && this instanceof W[e];
237
- }
238
- bindAxes() {
239
- let e = this, t = e.options, n = e.chart, r;
240
- C(this, "bindAxes", null, function() {
241
- (e.axisTypes || []).forEach(function(i) {
242
- (n[i] || []).forEach(function(n) {
243
- r = n.options, (m(t[i], 0) === n.index || t[i] !== void 0 && t[i] === r.id) && (v(e, n.series), e[i] = n, n.isDirty = !0);
244
- }), !e[i] && e.optionalAxis !== i && k(18, !0, n);
245
- });
246
- }), C(this, "afterBindAxes");
247
- }
248
- hasData() {
249
- return this.visible && this.dataMax !== void 0 && this.dataMin !== void 0 || this.visible && this.dataTable.rowCount > 0;
250
- }
251
- hasMarkerChanged(e, t) {
252
- let n = e.marker, r = t.marker || {};
253
- return n && (r.enabled && !n.enabled || r.symbol !== n.symbol || r.height !== n.height || r.width !== n.width);
254
- }
255
- autoIncrement(e) {
256
- let n = this.options, { pointIntervalUnit: r, relativeXValue: i } = this.options, a = this.chart.time, o = this.xIncrement ?? a.parse(n.pointStart) ?? 0, s;
257
- if (this.pointInterval = s = m(this.pointInterval, n.pointInterval, 1), i && t(e) && (s *= e), r) {
258
- let e = a.toParts(o);
259
- r === "day" ? e[2] += s : r === "month" ? e[1] += s : r === "year" && (e[0] += s), s = a.makeTime.apply(a, e) - o;
260
- }
261
- return i && t(e) ? o + s : (this.xIncrement = o + s, o);
262
- }
263
- setOptions(e) {
264
- let t = this.chart, n = t.options.plotOptions, r = t.userOptions || {}, i = d(e), a = t.styledMode, o = {
265
- plotOptions: n,
266
- userOptions: i
267
- }, s;
268
- C(this, "setOptions", o);
269
- let c = o.plotOptions[this.type], l = r.plotOptions || {}, u = l.series || {}, f = U.plotOptions[this.type] || {}, p = l[this.type] || {};
270
- c.dataLabels = this.mergeArrays(f.dataLabels, c.dataLabels), this.userOptions = o.userOptions;
271
- let h = d(c, n.series, p, i), { negativeColor: g, negativeFillColor: _, zoneAxis: v = "y", zones: y } = h, b = (y || []).map((e) => ({ ...e }));
272
- return this.tooltipOptions = d(U.tooltip, U.plotOptions.series?.tooltip, f?.tooltip, t.userOptions.tooltip, l.series?.tooltip, p.tooltip, i.tooltip), this.stickyTracking = m(i.stickyTracking, p.stickyTracking, u.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : h.stickyTracking), c.marker === null && delete h.marker, this.zones ||= b, this.zoneAxis = v, (g || _) && !y && (s = {
273
- value: h[v + "Threshold"] || h.threshold || 0,
274
- className: "highcharts-negative"
275
- }, a || (typeof g != "boolean" && (s.color = g), s.fillColor = _), b.push(s)), b.length && j(b[b.length - 1].value) && b.push(a ? {} : {
276
- color: this.color,
277
- fillColor: this.fillColor
278
- }), C(this, "afterSetOptions", { options: h }), h;
279
- }
280
- getName() {
281
- let { chart: e, options: t } = this, { dataMapping: n, name: r } = t, i = n?.y || n?.value, a = o(i) ? i : i?.column;
282
- return r ?? (o(a) ? a : de(e.options.lang.seriesName, this, e));
283
- }
284
- getCyclic(e, t, n) {
285
- let r = this.chart, i = `${e}Index`, a = `${e}Counter`, o = n?.length || r.options.chart.colorCount, s, c;
286
- t || (c = m(e === "color" ? this.options.colorIndex : void 0, this[i]), j(c) ? s = c : (r.series.length || (r[a] = 0), s = r[a] % o, r[a] += 1), n && (t = n[s])), s !== void 0 && (this[i] = s), this[e] = t;
287
- }
288
- getColor() {
289
- let e = this.chart;
290
- e.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "var(--highcharts-neutral-color-20)" : this.getCyclic("color", this.options.color || U.plotOptions[this.type]?.color, e.options.colors);
291
- }
292
- getPointsCollection() {
293
- return (this.hasGroupedData ? this.points : this.data) || [];
294
- }
295
- getSymbol() {
296
- let e = this.options.marker;
297
- this.getCyclic("symbol", e.symbol, this.chart.options.symbols);
298
- }
299
- getColumn(e, t, n) {
300
- let r = t ? this.dataTable.getModified() : this.dataTable, i = r.rowCount, a = this.dataTable !== r, o = r.getColumn(e, !0);
301
- if (e === "x" && !a) {
302
- if (this.xColumn) return this.xColumn;
303
- let e = r.getColumn("name", !0), t = this.options, n = (e) => {
304
- if (this.xColumnIsNumbers !== void 0) return this.xColumnIsNumbers;
305
- for (let t of e) if (typeof t != "number") return this.xColumnIsNumbers = !1;
306
- return this.xColumnIsNumbers = !0;
307
- };
308
- if (this.xIncrement = null, !o || this.xAxis?.hasNames || t.relativeXValue || o.length < (t.turboThreshold || Infinity) && !this.boosted && !n(o)) {
309
- let t = [];
310
- for (let n = 0; n < i; n++) {
311
- let r = o?.[n];
312
- j(r) || (this.xIncrement ??= t[t.length - 1] ?? null), t.push(this.getX(r, e?.[n]));
313
- }
314
- return this.xColumn = t;
315
- }
316
- }
317
- return o || Array(n ? i : 0);
318
- }
319
- getX(e, n) {
320
- return this.xAxis?.hasNames && this.dataTable.getColumn("name", !0) && j(n) ? this.xAxis.nameToX({
321
- name: n,
322
- series: this
323
- }, e) : e === void 0 || t(e) && this.options.relativeXValue ? this.autoIncrement(e) : (typeof e == "string" && (e = this.chart.time.parse(e), t(e)), e);
324
- }
325
- matchPoints(e, t, n, r) {
326
- let { dataTable: i, options: a, requireSorting: o } = this, s = a.dataSorting, c = this.data, l = [], u = [], d = i.rowCount === c.length, f, p, m, h = 0, g = !0;
327
- this.xIncrement = null, delete this.xColumn;
328
- let _ = i.getColumn("x"), v = i.getColumn("id"), y = s?.matchByName ? i.getColumn("name") : void 0, b = i.getColumn("index");
329
- for (p = 0; p < i.rowCount; p++) {
330
- let a = _?.[p], m = v?.[p], g = y?.[p], x = b?.[p], [S, C] = m && t ? [m, t] : g && n ? [g, n] : j(x) && r ? [x, r] : j(a) && e ? [a, e] : [], w = -1;
331
- if (C) {
332
- if (w = C.indexOf(S, h), w === -1) {
333
- let t = _?.[p], n = e?.length ?? i.rowCount;
334
- for (; n && e && typeof t == "number" && e[n - 1] > t;) n--;
335
- l.push({
336
- newIndex: n,
337
- oldIndex: p
338
- });
339
- } else c[w] && (u.push({
340
- newIndex: w,
341
- oldIndex: p
342
- }), c[w].touched = !0, o && (h = w + 1));
343
- (!d || p !== w || s?.enabled || this.hasDerivedData) && (f = !0);
344
- } else l.push({
345
- newIndex: p,
346
- oldIndex: p
347
- });
348
- }
349
- if (f) {
350
- for (u.forEach((e) => {
351
- c[e.newIndex].applyOptions(i.getRowObject(e.oldIndex));
352
- }), l.sort((e, t) => t.newIndex - e.newIndex), l.forEach((e) => {
353
- c.splice(e.newIndex, 0, void 0);
354
- }), p = c.length; p--;) m = c[p], m && !m.touched && (m.destroy(), c.splice(p, 1));
355
- this.isDirtyData = this.isDirty = !0;
356
- } else if (d && !s?.enabled) {
357
- for (p = 0; p < i.rowCount; p++) if (!c[p].destroyed && !c[p].condemned) {
358
- let e = i.getRowObject(p);
359
- e && (Object.keys(e).forEach((t) => {
360
- j(e[t]) || delete e[t];
361
- }), Object.keys(e).length && c[p].update(e, !1, void 0, !1));
362
- }
363
- } else g = !1;
364
- if (c.forEach((e) => {
365
- e && (e.touched = !1);
366
- }), !g) return !1;
367
- let x = this.getColumn("x");
368
- return this.xIncrement === null && x.length && (this.xIncrement = O(x), this.autoIncrement()), !0;
369
- }
370
- getDataColumnKeys() {
371
- return this.dataColumnKeys || ["x", ...this.pointArrayMap || ["y"]];
372
- }
373
- setData(e, t = !0, n, r) {
374
- let i = this, a = this.dataTable, c = i.options, l = i.points, u = l?.length || 0, f = a.getColumn("x"), p = a.getColumn("id"), m = c.dataSorting?.matchByName && l?.map((e) => e.name) || a.getColumn("name"), h = a.getColumn("index"), g = i.chart, _ = i.xAxis, v, y, b;
375
- if (g.options.chart.allowMutatingData || (c.data && delete i.options.data, i.userOptions.data && delete i.userOptions.data, b = d(!0, e)), e = b || e, i.xIncrement = null, delete i.xColumn, delete i.xColumnIsNumbers, a !== c.dataTable && delete a.columns.x, i.colorCounter = 0, s(e) ? this.setDataFromArray(e) : this.setDataFromTable(e), r !== !1 && u && !i.cropped && !i.hasGroupedData && i.visible && !i.boosted && (v = this.matchPoints(f, p, m, h)), !v) {
376
- for (o(this.getColumn("y")[0]) && k(14, !0, g), i.data = [], y = u; y--;) l[y]?.destroy();
377
- _ && (_.minRange = _.userMinRange), i.isDirty = g.isDirtyBox = !0, i.isDirtyData = !!l, n = !1;
378
- }
379
- s(e) && (i.options.data = i.userOptions.data = e), c.legendType === "point" && (this.processData(), this.generatePoints()), t && g.redraw(n);
380
- }
381
- setDataFromArray(e) {
382
- let n = e.length, { keys: r, turboThreshold: i } = this.options, { pointValKey: a = "y", pointArrayMap: o = [] } = this, c = o.length, l = this.dataTable, u = this.getDataColumnKeys(), d = i && n > i, f = 0, p = 1;
383
- if (d) {
384
- let i = this.getFirstValidPoint(e), m = this.getFirstValidPoint(e, n - 1, -1), h = (e) => !!(s(e) && (r || t(e[0])));
385
- if (t(i) && t(m)) l.setColumn(a, e);
386
- else if (h(i) && h(m)) if (c) {
387
- let t = i.length === c, n = Array(i.length).fill(0).map(() => []);
388
- for (let t of e) for (let e = 0; e <= c; e++) n[e]?.push(t[e]);
389
- l.setColumns((t ? o : u).reduce((e, t, r) => (e[t] = n[r], e), {}));
390
- } else {
391
- r && (f = r.indexOf("x"), p = r.indexOf("y"), f = f >= 0 ? f : 0, p = p >= 0 ? p : 1), i.length === 1 && (p = 0);
392
- let t = [], n = [];
393
- if (f === p) {
394
- for (let t of e) n.push(t[p]);
395
- l.setColumn(a, n);
396
- } else {
397
- for (let r of e) t.push(r[f]), n.push(r[p]);
398
- l.setColumns({
399
- x: t,
400
- [a]: n
401
- });
402
- }
403
- }
404
- else d = !1;
405
- }
406
- if (!d) {
407
- let t = {};
408
- for (let r = 0; r < n; r++) {
409
- let i = this.pointClass.prototype.optionsToObject.call({ series: this }, e[r]);
410
- for (let e of Object.keys(i)) t[e] || (t[e] = Array(n)), t[e][r] = i[e];
411
- }
412
- n ? l.setColumns(t) : l.deleteRows(0, l.rowCount);
413
- }
414
- }
415
- setDataFromTable(e) {
416
- let { chart: n, options: r, dataTable: i } = this, a = n.getDataTable(r), s = e ? [e] : a.length ? a : n.dataTable, c = this.getDataColumnKeys(), l = r.dataMapping, u = c.slice();
417
- l && (Object.keys(l).forEach((e) => {
418
- p(u, e);
419
- }), this.dataColumnKeys = u), s.forEach((e, n) => {
420
- let r = u.reduce((r, i) => {
421
- let a = l?.[i], s = e.columns || {}, c = e.id, u = o(a) ? n === 0 && s[a] : ((a?.dataTable || 0) === n || c && a?.dataTable === c) && (t(a?.column) ? Object.values(s)[a.column] : s[a?.column || i]);
422
- return u && (r[i] = u), r;
423
- }, {});
424
- (l || e) && i.setColumns(r), e.isDataTable && this.bindDataTableEvents(e, r);
425
- });
426
- }
427
- bindDataTableEvents(e, n) {
428
- if (this.hasBoundDataTableEvents) return;
429
- let { chart: r, eventsToUnbind: i } = this, a = () => {
430
- clearTimeout(r.redrawTimeout), r.redrawTimeout = setTimeout(() => r.renderer && r.redraw(), 0);
431
- };
432
- i.push(y(e, "afterSetRows", (e) => {
433
- let r = e.rowIndex;
434
- if (t(r)) {
435
- let e = z.prototype.getRowObject.call({ columns: n }, r), t = this.data[r];
436
- e && (this.currentDataGrouping ? this.setData() : (t ? t.update(e, !1) : this.addPoint(e, !1), a()));
437
- }
438
- })), i.push(y(e, "afterDeleteRows", (e) => {
439
- let { rowCount: n, rowIndex: r } = e;
440
- if (t(r)) {
441
- for (let e = r + n - 1; e >= r; e--) this.removePoint(e, !1);
442
- a();
443
- }
444
- })), i.push(y(e, "afterSetColumns", (e) => {
445
- this.setData(e.target);
446
- })), this.hasBoundDataTableEvents = !0;
447
- }
448
- getProcessedData(e) {
449
- let t = this, { dataTable: n, isCartesian: r, options: i, xAxis: a } = t, o = i.cropThreshold, s = e || t.getExtremesFromAll, c = a?.logarithmic, l = n.rowCount, u, d, f = 0, p, m, h, g = t.getColumn("x"), _ = n, v = !1;
450
- a && (p = a.getExtremes(), m = p.min, h = p.max, v = !!(a.categories && !a.names.length), r && t.sorted && !s && (!o || l > o || t.forceCrop) && (g[l - 1] < m || g[0] > h ? _ = new z() : t.getColumn(t.pointValKey || "y").length && (g[0] < m || g[l - 1] > h) && (u = this.cropData(n, m, h), _ = u.modified, f = u.start, d = !0))), g = this.getColumn("x", !0);
451
- let y = S([c ? g.map(c.log2lin) : g], () => t.requireSorting && !v && k(15, !1, t.chart));
452
- return {
453
- modified: _,
454
- cropped: d,
455
- cropStart: f,
456
- closestPointRange: y
457
- };
458
- }
459
- processData(e) {
460
- let t = this, n = t.xAxis, r = t.dataTable;
461
- if (t.isCartesian && !t.isDirty && !n.isDirty && !t.yAxis.isDirty && !e) return !1;
462
- let i = t.getProcessedData();
463
- r.modified = i.modified, t.cropped = i.cropped, t.cropStart = i.cropStart, t.closestPointRange = t.basePointRange = i.closestPointRange, C(t, "afterProcessData");
464
- }
465
- cropData(e, t, n) {
466
- let r = e === this.dataTable ? this.getColumn("x") : e.getColumn("x", !0), i = r.length, a, o, s = 0, c = i;
467
- for (a = 0; a < i; a++) if (r[a] >= t) {
468
- s = Math.max(0, a - 1);
469
- break;
470
- }
471
- for (o = a; o < i; o++) if (r[o] > n) {
472
- c = o + 1;
473
- break;
474
- }
475
- let l = Object.keys(e.columns).reduce((t, n) => (t[n] = (e.getColumn(n, !0) || []).slice(s, c), t), {});
476
- return l.x = r.slice(s, c), {
477
- modified: new z({ columns: l }),
478
- start: s,
479
- end: c
480
- };
481
- }
482
- generatePoints() {
483
- let e = this, t = e.options, n = e.hasProcessedDataTable ? void 0 : t.data, i = e.dataTable.getModified(), a = e.getColumn("x", !0), o = e.pointClass, s = i.rowCount, c = e.cropStart || 0, l = e.hasGroupedData, u = t.keys, d = [], f = t.dataGrouping?.groupAll ? c : 0, p = this.getDataColumnKeys(), m, h, g, _, v = e.data, y;
484
- if (!v && !l) {
485
- let t = [];
486
- t.length = n?.length || 0, v = e.data = t;
487
- }
488
- for (u && l && (e.options.keys = !1), _ = 0; _ < s; _++) h = c + _, l ? (g = new o(e, i.getRowObject(_, p)), g.dataGroup = e.groupMap?.[f + _], g.dataGroup?.options && (g.options = g.dataGroup.options, r(g, g.dataGroup.options), delete g.dataLabels, g.key = g.name ?? g.category)) : (g = v[h], y = n ? n[h] : i.getRowObject(_), !g && y !== void 0 ? v[h] = g = new o(e, y, a[_]) : g && (g.category = e.xAxis?.categories?.[g.x] ?? g.x, g.key = g.name ?? g.category)), g && (g.index = l ? f + _ : h, d[_] = g);
489
- if (e.options.keys = u, v && (s !== (m = v.length) || l)) for (_ = 0; _ < m; _++) _ === c && !l && (_ += s), v[_] && (v[_].destroyElements(), v[_].plotX = void 0);
490
- e.data = v, e.points = d, C(this, "afterGeneratePoints");
491
- }
492
- getXExtremes(e) {
493
- return {
494
- min: w(e),
495
- max: O(e)
496
- };
497
- }
498
- getExtremes(e, n) {
499
- let { xAxis: r, yAxis: i } = this, a = n || this.getExtremesFromAll || this.options.getExtremesFromAll, o = a && this.cropped ? this.dataTable : this.dataTable.getModified(), s = o.rowCount, c = e || this.stackedYData, l = c ? [c] : (this.keysAffectYAxis || this.pointArrayMap || ["y"])?.map((e) => o.getColumn(e, !0) || []) || [], u = this.getColumn("x", !0), d = [], f = this.requireSorting && !this.is("column") ? 1 : 0, p = i ? i.positiveValuesOnly : !1, m = a || this.cropped || !r, h, g, _, v = 0, y = 0;
500
- for (r && (h = r.getExtremes(), v = h.min, y = h.max), _ = 0; _ < s; _++) if (g = u[_], m || (u[_ + f] || g) >= v && (u[_ - f] || g) <= y) for (let e of l) {
501
- let n = e[_];
502
- t(n) && (n > 0 || !p) && d.push(n);
503
- }
504
- let b = {
505
- activeYData: d,
506
- dataMin: w(d),
507
- dataMax: O(d)
508
- };
509
- return C(this, "afterGetExtremes", { dataExtremes: b }), b;
510
- }
511
- applyExtremes() {
512
- let e = this.getExtremes();
513
- return this.dataMin = e.dataMin, this.dataMax = e.dataMax, e;
514
- }
515
- getFirstValidPoint(e, t = 0, n = 1) {
516
- let r = e.length, i = t;
517
- for (; i >= 0 && i < r;) {
518
- if (j(e[i])) return e[i];
519
- i += n;
520
- }
521
- }
522
- translate() {
523
- this.generatePoints();
524
- let e = this, { options: n, xAxis: r, yAxis: i } = e, { stacking: a, threshold: o } = n, { hasRendered: c, polar: l } = e.chart, u = e.points.concat(e.condemnedPoints), d = u.length, f = e.pointPlacementToXValue(), p = !!f, h = n.startFromThreshold ? o : 0, _ = n?.nullInteraction && i.len, v, y, x, S, w = Number.MAX_VALUE;
525
- function T(e) {
526
- return b(e, -1e9, 1e9);
527
- }
528
- let E = (e, n) => {
529
- let i = r.translate(e, !1, !1, n, !0, f);
530
- return t(i) ? g(T(i)) : void 0;
531
- }, D = (e, n, r) => {
532
- if (t(e) && n.plotX !== void 0) {
533
- let n = i.translate(e, !1, !0, r, !0);
534
- return t(n) ? T(n) : void 0;
535
- }
536
- if (!t(e) && _) return _;
537
- };
538
- for (v = 0; v < d; v++) {
539
- let n = u[v], d = n.x, _, b, C = n.y, O = n.low, k = a && i.stacking?.stacks[(e.negStacks && C < (h ? 0 : o) ? "-" : "") + e.stackKey];
540
- n.plotX = y = E(d), a && e.visible && k && k[d] && (S = e.getStackIndicator(S, d, e.index), !n.isNull && S.key && (_ = k[d], b = _.points[S.key]), _ && s(b) && (O = b[0], C = b[1], O === h && S.key === k[d].base && (O = m(t(o) ? o : i.min)), i.positiveValuesOnly && j(O) && O <= 0 && (O = void 0), n.total = n.stackTotal = m(_.total), n.percentage = j(n.y) && _.total ? n.y / _.total * 100 : void 0, n.stackY = C, e.irregularWidths || _.setOffset(e.pointXOffset || 0, e.barW || 0, void 0, void 0, void 0, e.xAxis))), n.yBottom = j(O) ? T(i.translate(O, !1, !0, !1, !0)) : void 0, e.dataModify && (C = e.dataModify.modifyValue(C, v)), n.plotY = D(C, n), n.origin = c && !n.graphic && !l ? {
541
- x: E(d, !0),
542
- y: D(C, n, !0)
543
- } : void 0, n.isInside = this.isPointInside(n), n.clientX = p ? g(r.translate(d, !1, !1, !1, !0, f)) : y, n.negative = (n.y || 0) < (o || 0), !n.isNull && n.visible !== !1 && t(y) && (t(x) && (w = Math.min(w, Math.abs(y - x))), x = y), n.zone = this.zones.length ? n.getZone() : void 0;
544
- }
545
- e.closestPointRangePx = w, C(this, "afterTranslate");
546
- }
547
- getValidPoints(e, n, r) {
548
- let i = this.chart;
549
- return (e || this.points || []).filter(function(e) {
550
- let { plotX: a, plotY: o } = e;
551
- return !r && (e.isNull || !t(o)) || n && !i.isInsidePlot(a, o, { inverted: i.inverted }) ? !1 : e.visible !== !1;
552
- });
553
- }
554
- getSharedClipKey() {
555
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0), this.sharedClipKey;
556
- }
557
- setClip() {
558
- let { chart: e, group: t, markerGroup: n, options: r, plotClipGroup: i } = this, a = e.sharedClips, o = e.renderer, s = e.getClipBox(this), c = r.clip ?? !0, l = this.getSharedClipKey(), u = a[l];
559
- u ? u.animate(s) : a[l] = u = o.clipRect(s), t?.clip(c ? u : void 0), n?.clip(), i?.clip(c && this.yAxis.clippable ? e.plotClipInner : void 0);
560
- }
561
- animate(e) {
562
- let { chart: t, group: n, markerGroup: r } = this, i = t.inverted, a = H(this.options.animation), o = [
563
- this.getSharedClipKey(),
564
- a.duration,
565
- a.easing,
566
- a.defer
567
- ].join(","), s = t.sharedClips[o], c = t.sharedClips[o + "m"];
568
- if (e && n) {
569
- let e = t.getClipBox(this);
570
- if (s) s.attr("height", e.height);
571
- else {
572
- e.width = 0, i && (e.x = t.plotHeight), s = t.renderer.clipRect(e), t.sharedClips[o] = s;
573
- let n = {
574
- x: -99,
575
- y: -99,
576
- width: i ? t.plotWidth + 199 : 99,
577
- height: i ? 99 : t.plotHeight + 199
578
- };
579
- c = t.renderer.clipRect(n), t.sharedClips[o + "m"] = c;
580
- }
581
- n.clip(s), r?.clip(c);
582
- } else if (s && !s.hasClass("highcharts-animating")) {
583
- let e = t.getClipBox(this), n = a.step;
584
- (r?.element.childNodes.length || t.series.length > 1) && (a.step = function(e, t) {
585
- n && n.apply(t, arguments), t.prop === "width" && c?.element && c.attr(i ? "height" : "width", e + 99);
586
- }), s.addClass("highcharts-animating").animate(e, a);
587
- }
588
- }
589
- afterAnimate() {
590
- this.setClip(), a(this.chart.sharedClips, (e, t, n) => {
591
- e && !this.chart.container.querySelector(`[clip-path="url(#${e.id})"]`) && (e.destroy(), delete n[t]);
592
- }), this.finishedAnimating = !0, C(this, "afterAnimate");
593
- }
594
- drawPoints(e) {
595
- e ||= this.points.concat(this.condemnedPoints);
596
- let t = this, n = t.chart, r = n.styledMode, { colorAxis: i, options: a } = t, o = a.marker, s = a.nullInteraction, c = t[t.specialGroup || "markerGroup"], l = t.xAxis, u = m(o.enabled, !l || l.isRadial ? !0 : null, t.closestPointRangePx >= o.enabledThreshold * o.radius), d, f, p, h, g, _, v;
597
- if (o.enabled !== !1 || t._hasPointMarkers) for (d = 0; d < e.length; d++) {
598
- f = e[d], p = f.graphic, h = p ? "animate" : "attr", g = f.marker || {}, _ = !!f.marker;
599
- let a = f.isNull;
600
- if ((u && !j(g.enabled) || g.enabled) && (!a || s) && f.visible !== !1) {
601
- let e = m(g.symbol, t.symbol, "rect");
602
- v = t.markerAttribs(f, f.selected && "select");
603
- let a = f.isInside !== !1;
604
- if (!p && a && ((v.width || 0) > 0 || f.hasImage) && (f.graphic = p = n.renderer.symbol(e, v.x, v.y, v.width, v.height, _ ? g : o).add(c), f.origin)) {
605
- let e = f.getOrigin(f.origin, v);
606
- r || (e.opacity = 0), p.attr(e), h = "animate";
607
- }
608
- if (p) {
609
- h === "animate" && p?.animate(v);
610
- let e = t.pointAttribs(f, r || !f.selected ? void 0 : "select");
611
- r ? i && p.css({ fill: e.fill }) : p[h](e), p.addClass(f.getClassName(), !0);
612
- }
613
- } else p && (f.graphic = p.destroy());
614
- }
615
- }
616
- markerAttribs(e, n) {
617
- let r = this.options, i = r.marker, a = e.marker || {}, o = a.symbol || i.symbol, s = {}, c, l, u = m(a.radius, i?.radius);
618
- n && (c = i?.states?.[n], l = a.states?.[n], u = m(l?.radius, c?.radius, u && u + (c?.radiusPlus || 0))), e.hasImage = o && o.indexOf("url") === 0, e.hasImage && (u = 0);
619
- let d = e.pos();
620
- return t(u) && d && (r.crisp && (d[0] = M(d[0], e.hasImage ? 0 : o === "rect" ? i?.lineWidth || 0 : 1)), s.x = d[0] - u, s.y = d[1] - u), u && (s.width = s.height = 2 * u), s;
621
- }
622
- pointAttribs(e, t) {
623
- let n = this.options, r = n.marker, i = e?.options, a = i?.marker || {}, o = i?.color, s = e?.color, c = e?.zone?.color, l, u, d = this.color, f, p, h = m(a.lineWidth, r.lineWidth), g = e?.isNull && n.nullInteraction ? 0 : 1;
624
- return d = o || c || s || d, f = a.fillColor || r.fillColor || d, p = a.lineColor || r.lineColor || d, t ||= "normal", t && (l = r.states[t] || {}, u = a.states && a.states[t] || {}, h = m(u.lineWidth, l.lineWidth, h + m(u.lineWidthPlus, l.lineWidthPlus, 0)), f = u.fillColor || l.fillColor || f, p = u.lineColor || l.lineColor || p, g = m(u.opacity, l.opacity, g)), {
625
- stroke: p,
626
- "stroke-width": h,
627
- fill: f,
628
- opacity: e?.condemned || e?.isInside === !1 ? 0 : g
629
- };
630
- }
631
- destroy(e) {
632
- let t = this, n = t.chart, r = /AppleWebKit\/533/.test(ue.navigator.userAgent), o = t.data || [], s, c, d;
633
- for (C(t, "destroy", { keepEventsForUpdate: e }), this.removeEvents(e), (t.axisTypes || []).forEach(function(e) {
634
- d = t[e], d?.series && (u(d.series, t), d.isDirty = d.forceRedraw = !0);
635
- }), t.legendItem && t.chart.legend.destroyItem(t), c = o.length; c--;) o[c]?.destroy?.();
636
- for (let e of t.zones || []) l(e, void 0, !0);
637
- i(t.animationTimeout), a(t, function(e, t) {
638
- e instanceof ne && !e.survive && (s = r && t === "group" ? "hide" : "destroy", e[s]());
639
- }), n.hoverSeries === t && (n.hoverSeries = void 0), u(n.series, t), n.orderItems("series"), a(t, function(n, r) {
640
- (!e || r !== "hcEvents") && delete t[r];
641
- });
642
- }
643
- applyZones() {
644
- let e = this, { area: n, chart: r, graph: i, zones: a, points: o, xAxis: s, yAxis: c, zoneAxis: l } = e, { inverted: u, renderer: d } = r, f = this[`${l}Axis`], { isXAxis: p, len: h = 0, minPointOffset: g = 0 } = f || {}, _ = (i?.strokeWidth() || 0) / 2 + 1, v = (e, t = 0, n = 0) => {
645
- u && (n = h - n);
646
- let { translated: r = 0, lineClip: i, value: a } = e, o = n - r;
647
- i?.push([
648
- "L",
649
- t,
650
- Math.abs(o) < _ ? n - _ * (o < 0 || o === 0 && j(a) ? -1 : 1) : r
651
- ]);
652
- };
653
- if (a.length && (i || n) && f && t(f.min)) {
654
- let e = f.getExtremes().max + g, t = (e) => {
655
- e.forEach((t, n) => {
656
- (t[0] === "M" || t[0] === "L") && (e[n] = [
657
- t[0],
658
- p ? h - t[1] : t[1],
659
- p ? t[2] : h - t[2]
660
- ]);
661
- });
662
- };
663
- if (a.forEach((t) => {
664
- t.lineClip = [], t.translated = b(f.toPixels(m(t.value, e), !0) || 0, 0, h);
665
- }), i && !this.showLine && i.hide(), n && n.hide(), l === "y" && o.length < s.len) for (let e of o) {
666
- let { plotX: t, plotY: n, zone: r } = e, i = r && a[a.indexOf(r) - 1];
667
- r && v(r, t, n), i && v(i, t, n);
668
- }
669
- let r = [], _ = f.toPixels(f.getExtremes().min - g, !0);
670
- a.forEach((e) => {
671
- let a = e.lineClip || [], o = Math.round(e.translated || 0);
672
- s.reversed && a.reverse();
673
- let { clip: l, simpleClip: f } = e, m = 0, h = 0, g = s.len, v = c.len;
674
- p ? (m = o, g = _) : (h = o, v = _);
675
- let y = [
676
- [
677
- "M",
678
- m,
679
- h
680
- ],
681
- [
682
- "L",
683
- g,
684
- h
685
- ],
686
- [
687
- "L",
688
- g,
689
- v
690
- ],
691
- [
692
- "L",
693
- m,
694
- v
695
- ],
696
- ["Z"]
697
- ], b = [
698
- y[0],
699
- ...a,
700
- y[1],
701
- y[2],
702
- ...r,
703
- y[3],
704
- y[4]
705
- ];
706
- r = a.reverse(), _ = o, u && (t(b), n && t(y)), l ? (l.animate({ d: b }), f?.animate({ d: y })) : (l = e.clip = d.path(b), n && (f = e.simpleClip = d.path(y))), i && e.graph?.clip(l), n && e.area?.clip(f);
707
- });
708
- } else e.visible && (i && i.show(), n && n.show());
709
- }
710
- plotGroup(e, t, n, r, i) {
711
- let a = this[e], o = !a, s = {
712
- visibility: n,
713
- zIndex: r || .1
714
- };
715
- return j(this.opacity) && !this.chart.styledMode && this.state !== "inactive" && (s.opacity = this.opacity), a || (this[e] = a = this.chart.renderer.g().add(i)), a.addClass("highcharts-" + t + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (j(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (a.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), a.attr(s)[o ? "attr" : "animate"](this.getPlotBox(t)), a;
716
- }
717
- getPlotBox(e) {
718
- let t = this.xAxis, n = this.yAxis, r = this.chart, i = r.inverted && !r.polar && t && this.invertible && e === "series";
719
- r.inverted && (t = n, n = this.xAxis);
720
- let a = {
721
- scale: 1,
722
- translateX: t ? t.left : r.plotLeft,
723
- translateY: n ? n.top : r.plotTop,
724
- name: e
725
- };
726
- C(this, "getPlotBox", a);
727
- let { scale: o, translateX: s, translateY: c } = a;
728
- return {
729
- translateX: s,
730
- translateY: c,
731
- rotation: i ? 90 : 0,
732
- rotationOriginX: i ? o * (t.len - n.len) / 2 : 0,
733
- rotationOriginY: i ? o * (t.len + n.len) / 2 : 0,
734
- scaleX: i ? -o : o,
735
- scaleY: o
736
- };
737
- }
738
- removeEvents(e) {
739
- let { eventsToUnbind: t } = this;
740
- e || c(this), t.length &&= (t.forEach((e) => {
741
- e();
742
- }), 0);
743
- }
744
- render() {
745
- let e = this, { chart: t, options: n, hasRendered: r } = e, i = H(n.animation), a = e.visible ? "inherit" : "hidden", o = n.zIndex, s = t.seriesGroup, c = e.finishedAnimating ? 0 : i.duration;
746
- C(this, "render"), t.plotClipInner && (e.plotClipGroup ||= t.renderer.g().add(s)), e.plotGroup("group", "series", a, o, e.plotClipGroup || s), e.markerGroup = e.plotGroup("markerGroup", "markers", a, o, s), n.clip !== !1 && e.setClip(), c && e.animate?.(!0), e.drawGraph && (e.drawGraph(), e.applyZones()), e.visible && e.drawPoints(), e.drawDataLabels?.(), e.redrawPoints?.(), n.enableMouseTracking && e.drawTracker?.(), c && e.animate?.(), r || (c && i.defer && (c += i.defer), e.animationTimeout = E(() => {
747
- e.afterAnimate();
748
- }, c || 0)), e.isDirty = !1, e.hasRendered = !0, C(e, "afterRender");
749
- }
750
- redraw() {
751
- let e = this.isDirty || this.isDirtyData;
752
- this.translate(), this.render(), e && delete this.kdTree, this.condemnedPoints.length = 0;
753
- }
754
- reserveSpace() {
755
- return this.visible || !this.chart.options.chart.ignoreHiddenSeries;
756
- }
757
- searchPoint(e, t) {
758
- let { xAxis: n, yAxis: r } = this, i = this.chart.inverted;
759
- return this.searchKDTree({
760
- clientX: i ? n.len - e.chartY + n.pos : e.chartX - n.pos,
761
- plotY: i ? r.len - e.chartX + r.pos : e.chartY - r.pos
762
- }, t, e);
763
- }
764
- buildKDTree(e) {
765
- this.buildingKdTree = !0;
766
- let t = this, n = t.options, r = n.findNearestPointBy.indexOf("y") > -1 ? 2 : 1;
767
- function i(e, n, r) {
768
- let a = e?.length, o, s;
769
- if (a) return o = t.kdAxisArray[n % r], e.sort((e, t) => (e[o] || 0) - (t[o] || 0)), s = Math.floor(a / 2), {
770
- point: e[s],
771
- left: i(e.slice(0, s), n + 1, r),
772
- right: i(e.slice(s + 1), n + 1, r)
773
- };
774
- }
775
- function a() {
776
- t.kdTree = i(t.getValidPoints(void 0, !t.directTouch, n?.nullInteraction), r, r), t.buildingKdTree = !1;
777
- }
778
- delete t.kdTree, E(a, n.kdNow || e?.type === "touchstart" ? 0 : 1);
779
- }
780
- searchKDTree(e, t, n, r, i) {
781
- let a = this, [o, s] = this.kdAxisArray, c = t ? "distX" : "dist", l = (a.options.findNearestPointBy || "").indexOf("y") > -1 ? 2 : 1, u = !!a.isBubble, d = r || ((e, t, n) => {
782
- let r = e[n] || 0, i = t[n] || 0;
783
- return [r === i && e.index > t.index || r < i ? e : t, !1];
784
- }), f = i || ((e, t) => e < t);
785
- function p(e, t) {
786
- let n = e[o], r = t[o], i = j(n) && j(r) ? n - r : null, a = e[s], c = t[s], l = j(a) && j(c) ? a - c : 0, d = u && t.marker?.radius || 0;
787
- t.dist = Math.sqrt((i && i * i || 0) + l * l) - d, t.distX = j(i) ? Math.abs(i) - d : Number.MAX_VALUE;
788
- }
789
- function m(e, t, n, r) {
790
- let i = t.point, o = a.kdAxisArray[n % r], s = i, l = !1;
791
- p(e, i);
792
- let h = (e[o] || 0) - (i[o] || 0) + (u && i.marker?.radius || 0), g = h < 0 ? "left" : "right", _ = h < 0 ? "right" : "left";
793
- if (t[g] && ([s, l] = d(i, m(e, t[g], n + 1, r), c)), t[_]) {
794
- let i = Math.sqrt(h * h), a = s[c];
795
- f(i, a, l) && (s = d(s, m(e, t[_], n + 1, r), c)[0]);
796
- }
797
- return s;
798
- }
799
- if (!this.kdTree && !this.buildingKdTree && this.buildKDTree(n), this.kdTree) return m(e, this.kdTree, l, l);
800
- }
801
- pointPlacementToXValue() {
802
- let { options: e, xAxis: n } = this, r = e.pointPlacement;
803
- return r === "between" && (r = n.reversed ? -.5 : .5), t(r) ? r * (e.pointRange || n.pointRange) : 0;
804
- }
805
- isPointInside(e) {
806
- let { chart: t, xAxis: n, yAxis: r } = this, { plotX: i = -1, plotY: a = -1 } = e;
807
- return a >= 0 && a <= (r ? r.len : t.plotHeight) && i >= 0 && i <= (n ? n.len : t.plotWidth);
808
- }
809
- drawTracker() {
810
- let e = this, t = e.options, n = t.trackByArea, r = [].concat((n ? e.areaPath : e.graphPath) || []), i = e.chart, a = i.pointer, o = i.renderer, s = i.options.tooltip?.snap || 0, c = () => {
811
- t.enableMouseTracking && i.hoverSeries !== e && e.onMouseOver();
812
- }, l = "rgba(192,192,192," + (le ? 1e-4 : .002) + ")", u = e.tracker;
813
- u ? u.attr({ d: r }) : e.graph && (e.tracker = u = o.path(r).attr({
814
- visibility: e.visible ? "inherit" : "hidden",
815
- zIndex: 2
816
- }).addClass(n ? "highcharts-tracker-area" : "highcharts-tracker-line").add(e.group), i.styledMode || u.attr({
817
- "stroke-linecap": "round",
818
- "stroke-linejoin": "round",
819
- stroke: l,
820
- fill: n ? l : "none",
821
- "stroke-width": e.graph.strokeWidth() + (n ? 0 : 2 * s)
822
- }), [
823
- e.tracker,
824
- e.markerGroup,
825
- ...e.dataLabelsGroups || []
826
- ].forEach((e) => {
827
- e && (e.addClass("highcharts-tracker").on("mouseover", c).on("mouseout", (e) => {
828
- a?.onTrackerMouseOut(e);
829
- }), t.cursor && !i.styledMode && e.css({ cursor: t.cursor }), e.on("touchstart", c));
830
- })), C(this, "afterDrawTracker");
831
- }
832
- addPoint(e, t, n, r, i) {
833
- let a = this, o = a.options, { chart: s, data: c, dataTable: l, xAxis: u } = a, d = u?.hasNames && u.names, f = o.data, p = a.getColumn("x"), h, g;
834
- t = m(t, !0);
835
- let { applyOptions: _, optionsToObject: v } = a.pointClass.prototype, y = { series: a }, b = v.call(y, e);
836
- _.call(y, b, void 0, !1);
837
- let x = y.x;
838
- if (g = p.length, a.requireSorting && x < p[g - 1]) for (h = !0; g && p[g - 1] > x;) g--;
839
- l.setRow(b, g, !0), this.xColumn?.splice(g, 0, this.getX(x)), d && y.name && (d[x] = y.name), f?.splice(g, 0, e), (h || a.hasProcessedDataTable) && (a.data.splice(g, 0, null), a.processData()), o.legendType === "point" && a.generatePoints(), n && (c[0] && c[0].remove ? c[0].remove(!1) : ([
840
- c,
841
- f,
842
- this.xColumn
843
- ].filter(j).forEach((e) => {
844
- e.shift();
845
- }), l.deleteRows(0))), i !== !1 && C(a, "addPoint", { point: y }), a.isDirty = !0, a.isDirtyData = !0, t && s.redraw(r);
846
- }
847
- removePoint(e, t, n) {
848
- let r = this, { chart: i, data: a, points: o, dataTable: s } = r, c = a[e], l = function() {
849
- [
850
- o?.length === a.length ? o : void 0,
851
- a,
852
- r.options.data,
853
- r.xColumn
854
- ].filter(j).forEach((t) => {
855
- t.splice(e, 1);
856
- }), s.deleteRows(e), s.modified = s, c?.destroy(), r.isDirty = !0, r.isDirtyData = !0, t && i.redraw();
857
- };
858
- se(n, i), t = m(t, !0), c ? c.firePointEvent("remove", null, l) : l();
859
- }
860
- remove(e, t, n, r) {
861
- let i = this, a = i.chart;
862
- function o() {
863
- i.destroy(r), a.isDirtyLegend = a.isDirtyBox = !0, a.linkSeries(r), m(e, !0) && a.redraw(t);
864
- }
865
- n === !1 ? o() : C(i, "remove", null, o);
866
- }
867
- update(t, i) {
868
- t = n(t, this.userOptions), C(this, "update", { options: t });
869
- let a = this, o = a.chart, s = a.userOptions, c = a.initialType || a.type, l = o.options.plotOptions, u = W[c].prototype, f = [
870
- "dataLabelsGroup",
871
- "dataLabelsGroups",
872
- "dataLabelsParentGroups",
873
- "group",
874
- "markerGroup",
875
- "plotClipGroup",
876
- "transformGroup"
877
- ], p = [
878
- "dataGrouping",
879
- "pointStart",
880
- "pointInterval",
881
- "pointIntervalUnit",
882
- "keys"
883
- ], h = a.finishedAnimating && { animation: !1 }, g = {}, _ = t.data || t.dataTable, v, y, b = e.keepProps.slice(), x = t.type || s.type || o.options.chart.type, S = !(this.hasDerivedData || x && x !== this.type || t.keys !== void 0 || t.pointStart !== void 0 || t.pointInterval !== void 0 || t.relativeXValue !== void 0 || t.joinBy || t.mapData || p.some((e) => a.hasOptionChanged(e)));
884
- x ||= c, S ? (b.push.apply(b, e.keepPropsForPoints), t.visible !== !1 && (b.push("area", "graph"), "zones" in t || b.push("zones")), a.parallelArrays.forEach(function(e) {
885
- b.push(e + "Data");
886
- }), _ && (t.dataSorting && r(a.options.dataSorting, t.dataSorting), this.setData(_, !1))) : this.dataTable.modified = this.dataTable, t.dataLabels && s.dataLabels && (t.dataLabels = this.mergeArrays(s.dataLabels, t.dataLabels)), t = d(s, {
887
- index: s.index === void 0 ? a.index : s.index,
888
- pointStart: l?.series?.pointStart ?? s.pointStart
889
- }, !S && { data: a.options.data }, t, h), S && t.data && (t.data = a.options.data), b = f.concat(b), b.forEach(function(e) {
890
- b[e] = a[e], delete a[e];
891
- });
892
- let w = !1;
893
- if (W[x]) {
894
- if (w = x !== a.type, a.remove(!1, !1, !1, !0), w) if (o.propFromSeries(), Object.setPrototypeOf) Object.setPrototypeOf(a, W[x].prototype);
895
- else {
896
- let e = Object.hasOwnProperty.call(a, "hcEvents") && a.hcEvents;
897
- for (y in u) a[y] = void 0;
898
- r(a, W[x].prototype), e ? a.hcEvents = e : delete a.hcEvents;
899
- }
900
- } else k(17, !0, o, { missingModuleFor: x });
901
- if (b.forEach(function(e) {
902
- a[e] = b[e];
903
- }), a.init(o, t), S && this.points) {
904
- v = a.options, v.visible === !1 ? (g.graphic = 1, g.dataLabel = 1) : (this.hasMarkerChanged(v, s) && (g.graphic = 1), a.hasDataLabels?.() || (g.dataLabel = 1));
905
- for (let e of this.points) e?.series && (e.resolveColor(), Object.keys(g).length && e.destroyElements(g), v.showInLegend === !1 && e.legendItem && o.legend.destroyItem(e));
906
- }
907
- a.initialType = c, o.linkSeries(), w && a.linkedSeries.length && (a.isDirtyData = !0), C(this, "afterUpdate"), m(i, !0) && o.redraw(S ? void 0 : !1);
908
- }
909
- setName(e) {
910
- this.name = this.options.name = this.userOptions.name = e, this.chart.isDirtyLegend = !0;
911
- }
912
- hasOptionChanged(e) {
913
- let t = this.chart, n = this.options[e], r = t.options.plotOptions, i = this.userOptions[e], a = m(r?.[this.type]?.[e], r?.series?.[e]);
914
- return i && !j(a) ? n !== i : n !== m(a, n);
915
- }
916
- onMouseOver() {
917
- let e = this, t = e.chart, n = t.hoverSeries;
918
- t.pointer?.setHoverChartIndex(), n && n !== e && n.onMouseOut(), C(e, "mouseOver"), e.setState("hover"), t.hoverSeries = e;
919
- }
920
- onMouseOut() {
921
- let e = this, t = e.chart, n = t.tooltip, r = t.hoverPoint;
922
- t.hoverSeries = null, r && r.onMouseOut(), C(e, "mouseOut"), n && !e.stickyTracking && (!n.shared || e.noSharedTooltip) && n.hide(), t.series.forEach(function(e) {
923
- e.setState("", !0);
924
- });
925
- }
926
- setState(e, n) {
927
- let r = this, { graph: i, options: a } = r, { inactiveOtherPoints: o, states: s } = a, c = m(s?.[e || "normal"]?.animation, r.chart.options.chart.animation), { lineWidth: l, opacity: u } = a;
928
- if (e ||= "", r.state !== e && ([
929
- r.group,
930
- r.markerGroup,
931
- ...r.dataLabelsGroups || []
932
- ].forEach(function(t) {
933
- t && (r.state && t.removeClass("highcharts-series-" + r.state), e && t.addClass("highcharts-series-" + e));
934
- }), r.state = e, !r.chart.styledMode)) {
935
- if (s[e]?.enabled === !1) return;
936
- if (e && (l = s[e].lineWidth || l + (s[e].lineWidthPlus || 0), u = m(s[e].opacity, u)), i && !i.dashstyle && t(l)) for (let e of [i, ...this.zones.map((e) => e.graph)]) e?.animate({ "stroke-width": l }, c);
937
- o || [
938
- r.group,
939
- r.markerGroup,
940
- ...r.dataLabelsGroups || [],
941
- r.labelBySeries
942
- ].forEach(function(e) {
943
- e?.animate({ opacity: u }, c);
944
- });
945
- }
946
- n && o && r.points && r.setAllPointsToState(e || void 0);
947
- }
948
- setAllPointsToState(e) {
949
- this.points.forEach(function(t) {
950
- t.setState && t.setState(e);
951
- });
952
- }
953
- setVisible(e, t) {
954
- let n = this, r = n.chart, i = r.options.chart.ignoreHiddenSeries, a = n.visible;
955
- n.visible = e = n.options.visible = n.userOptions.visible = e === void 0 ? !a : e;
956
- let o = e ? "show" : "hide";
957
- [
958
- "group",
959
- "markerGroup",
960
- "tracker",
961
- "tt"
962
- ].forEach((e) => {
963
- n[e]?.[o]();
964
- }), n.dataLabelsGroups?.forEach((e) => {
965
- e?.[o]();
966
- }), (r.hoverSeries === n || r.hoverPoint?.series === n) && n.onMouseOut(), n.legendItem && r.legend.colorizeItem(n, e), n.isDirty = !0, n.options.stacking && r.series.forEach((e) => {
967
- e.options.stacking && e.visible && (e.isDirty = !0);
968
- }), n.linkedSeries.forEach((t) => {
969
- t.setVisible(e, !1);
970
- }), i && (r.isDirtyBox = !0), C(n, o), t !== !1 && r.redraw();
971
- }
972
- show() {
973
- this.setVisible(!0);
974
- }
975
- hide() {
976
- this.setVisible(!1);
977
- }
978
- select(e) {
979
- let t = this;
980
- t.selected = e = this.options.selected = e === void 0 ? !t.selected : e, t.checkbox && (t.checkbox.checked = e), C(t, e ? "select" : "unselect");
981
- }
982
- shouldShowTooltip(e, t, n = {}) {
983
- return n.series = this, n.visiblePlotOnly = !0, this.chart.isInsidePlot(e, t, n);
984
- }
985
- drawLegendSymbol(e, t) {
986
- let n = this.chart.renderer, r = this.options.legendSymbol || "rectangle", i = t.legendItem || {}, { options: a, symbolHeight: o, symbolWidth: s } = e, c = a.squareSymbol, l = c ? o : s, u = c ? (s - o) / 2 : 0, d = (e.baseline || 0) - o + 1, f = l, p = o, m = a.symbolRadius ?? o, h = r === "rectangle" ? n.rect(u, d, f, p, m) : n.symbols[r] && n.symbol(r, u, d, f, p, { r: m });
987
- h ? i.symbol = h.addClass("highcharts-point").attr({ zIndex: 3 }).add(i.group) : V[r]?.call(this, e, t);
988
- }
989
- };
990
- G.defaultOptions = oe, G.types = P.seriesTypes, G.registerType = P.registerSeriesType, G.keepProps = [
991
- "colorIndex",
992
- "eventOptions",
993
- "navigatorSeries",
994
- "symbolIndex",
995
- "baseSeries"
996
- ], G.keepPropsForPoints = [
997
- "data",
998
- "isDirtyData",
999
- "isDirtyCanvas",
1000
- "points",
1001
- "condemnedPoints",
1002
- "dataTable",
1003
- "hasProcessedDataTable",
1004
- "xIncrement",
1005
- "cropped",
1006
- "_hasPointMarkers",
1007
- "hasDataLabels",
1008
- "nodes",
1009
- "layout",
1010
- "level",
1011
- "mapMap",
1012
- "mapData",
1013
- "minY",
1014
- "maxY",
1015
- "minX",
1016
- "maxX",
1017
- "transformGroups"
1018
- ], r(G.prototype, {
1019
- axisTypes: ["xAxis", "yAxis"],
1020
- coll: "series",
1021
- colorCounter: 0,
1022
- directTouch: !1,
1023
- invertible: !0,
1024
- isCartesian: !0,
1025
- kdAxisArray: ["clientX", "plotY"],
1026
- parallelArrays: ["x", "y"],
1027
- pointClass: te,
1028
- requireSorting: !0,
1029
- sorted: !0
1030
- }), P.series = G;
1031
- //#endregion
1032
- //#region node_modules/highcharts/es-modules/Core/Axis/Stacking/StackItem.js
1033
- var { format: fe } = N, { series: pe } = P, me = class {
1034
- constructor(e, t, n, r, i) {
1035
- let a = e.chart.inverted, o = e.reversed;
1036
- this.axis = e;
1037
- let s = this.isNegative = !!n != !!o;
1038
- this.options = t ||= {}, this.x = r, this.total = null, this.cumulative = null, this.points = {}, this.hasValidPoints = !1, this.stack = i, this.leftCliff = 0, this.rightCliff = 0, this.alignOptions = {
1039
- align: t.align || (a ? s ? "left" : "right" : "center"),
1040
- verticalAlign: t.verticalAlign || (a ? "middle" : s ? "bottom" : "top"),
1041
- y: t.y,
1042
- x: t.x
1043
- }, this.textAlign = t.textAlign || (a ? s ? "right" : "left" : "center");
1044
- }
1045
- destroy() {
1046
- l(this, this.axis);
1047
- }
1048
- render(e) {
1049
- let t = this.axis.chart, n = this.options, r = n.format, i = (r ? fe(r, this, t) : n.formatter?.call(this, this)) || "";
1050
- if (this.label) this.label.attr({
1051
- text: i,
1052
- visibility: "hidden"
1053
- });
1054
- else {
1055
- this.label = t.renderer.label(i, null, void 0, n.shape, void 0, void 0, n.useHTML, !1, "stack-labels");
1056
- let r = {
1057
- r: n.borderRadius || 0,
1058
- text: i,
1059
- padding: m(n.padding, 5),
1060
- visibility: "hidden"
1061
- };
1062
- t.styledMode || (r.fill = n.backgroundColor, r.stroke = n.borderColor, r["stroke-width"] = n.borderWidth, this.label.css(n.style || {})), this.label.attr(r), this.label.added || this.label.add(e);
1063
- }
1064
- this.label.labelrank = t.plotSizeY, C(this, "afterRender");
1065
- }
1066
- setOffset(n, r, i, a, o, s) {
1067
- let { alignOptions: c, axis: l, label: u, options: d, textAlign: f } = this, p = l.chart, h = this.getStackBox({
1068
- xOffset: n,
1069
- width: r,
1070
- boxBottom: i,
1071
- boxTop: a,
1072
- defaultX: o,
1073
- xAxis: s
1074
- }), { verticalAlign: g } = c;
1075
- if (u && h) {
1076
- let n = u.getBBox(void 0, 0), r = u.padding, i = m(d.overflow, "justify") === "justify", a;
1077
- c.x = d.x || 0, c.y = d.y || 0;
1078
- let { x: o, y: s } = this.adjustStackPosition({
1079
- labelBox: n,
1080
- verticalAlign: g,
1081
- textAlign: f
1082
- });
1083
- h.x -= o, h.y -= s, u.align(c, !1, h), a = p.isInsidePlot(u.alignAttr.x + c.x + o, u.alignAttr.y + c.y + s), a || (i = !1), i && pe.prototype.justifyDataLabel.call(l, u, c, u.alignAttr, n, h), u.attr({
1084
- x: u.alignAttr.x,
1085
- y: u.alignAttr.y,
1086
- rotation: d.rotation,
1087
- rotationOriginX: n.width * e(d.textAlign || "center"),
1088
- rotationOriginY: n.height / 2
1089
- }), m(!i && d.crop, !0) && (a = t(u.x) && t(u.y) && p.isInsidePlot(u.x - r + (u.width || 0), u.y) && p.isInsidePlot(u.x + r, u.y)), u[a ? "show" : "hide"]();
1090
- }
1091
- C(this, "afterSetOffset", {
1092
- xOffset: n,
1093
- width: r
1094
- });
1095
- }
1096
- adjustStackPosition({ labelBox: t, verticalAlign: n, textAlign: r }) {
1097
- return {
1098
- x: t.width / 2 + t.width / 2 * (2 * e(r) - 1),
1099
- y: t.height / 2 * 2 * (1 - e(n))
1100
- };
1101
- }
1102
- getStackBox(e) {
1103
- let n = this, r = this.axis, i = r.chart, { boxTop: a, defaultX: o, xOffset: s, width: c, boxBottom: l } = e, u = r.stacking.usePercentage ? 100 : m(a, this.total, 0), d = r.toPixels(u), f = e.xAxis || i.xAxis[0], p = m(o, f.translate(this.x)) + s, h = r.toPixels(l || t(r.min) && r.logarithmic && r.logarithmic.lin2log(r.min) || 0), g = Math.abs(d - h), _ = i.inverted, v = n.isNegative;
1104
- return _ ? {
1105
- x: (v ? d : d - g) - i.plotLeft,
1106
- y: f.height - p - c + f.top - i.plotTop,
1107
- width: g,
1108
- height: c
1109
- } : {
1110
- x: p + f.transB - i.plotLeft,
1111
- y: (v ? d - g : d) - i.plotTop,
1112
- width: c,
1113
- height: g
1114
- };
1115
- }
1116
- }, K = {
1117
- borderRadius: 3,
1118
- centerInCategory: !1,
1119
- groupPadding: .2,
1120
- marker: null,
1121
- pointPadding: .1,
1122
- minPointLength: 0,
1123
- cropThreshold: 50,
1124
- pointRange: null,
1125
- states: {
1126
- hover: {
1127
- halo: !1,
1128
- brightness: .2
1129
- },
1130
- select: {
1131
- color: "var(--highcharts-neutral-color-20)",
1132
- borderColor: "var(--highcharts-neutral-color-100)"
1133
- }
1134
- },
1135
- dataLabels: {
1136
- align: void 0,
1137
- verticalAlign: void 0,
1138
- y: void 0
1139
- },
1140
- startFromThreshold: !0,
1141
- stickyTracking: !1,
1142
- tooltip: { distance: 6 },
1143
- threshold: 0,
1144
- borderColor: "var(--highcharts-background-color)"
1145
- }, { animObject: he } = T, { parse: ge } = x, { noop: _e } = D, q = class extends G {
1146
- animate(e) {
1147
- let t = this, n = this.yAxis, i = n.pos, a = n.reversed, o = t.options, { clipOffset: s, inverted: c } = this.chart, l = {}, u = c ? "translateX" : "translateY", d, f;
1148
- e && s ? (l.scaleY = .001, f = b(n.toPixels(o.threshold || 0), i, i + n.len), c ? (f += a ? -Math.floor(s[+!!c]) : Math.ceil(s[c ? 3 : 2]), l.translateX = f - n.len) : (f += a ? Math.ceil(s[+!!c]) : -Math.floor(s[c ? 3 : 2]), l.translateY = f), t.clipBox && t.setClip(), t.group.attr(l)) : (d = Number(t.group.attr(u)), t.group.animate({ scaleY: 1 }, r(he(t.options.animation), { step: function(e, n) {
1149
- t.group && (l[u] = d + n.pos * (i - d), t.group.attr(l));
1150
- } })));
1151
- }
1152
- init(e, t) {
1153
- super.init.apply(this, arguments);
1154
- let n = this;
1155
- e = n.chart, e.hasRendered && e.series.forEach(function(e) {
1156
- e.type === n.type && (e.isDirty = !0);
1157
- });
1158
- }
1159
- getColumnMetrics() {
1160
- let e = this, t = e.options, n = e.xAxis, r = e.yAxis, i = n.options.reversedStacks, a = n.reversed && !i || !n.reversed && i, o = {}, s, c = 0;
1161
- t.grouping === !1 ? c = 1 : e.chart.series.forEach(function(t) {
1162
- let n = t.yAxis, i = t.options, a;
1163
- t.type === e.type && t.reserveSpace() && r.len === n.len && r.pos === n.pos && (i.stacking && i.stacking !== "group" ? (s = t.stackKey, o[s] === void 0 && (o[s] = c++), a = o[s]) : i.grouping !== !1 && (a = c++), t.columnIndex = a);
1164
- });
1165
- let l = Math.min(Math.abs(n.transA) * (!n.brokenAxis?.hasBreaks && n.ordinal?.slope || t.pointRange || n.closestPointRange || n.tickInterval || 1), n.len), u = l * t.groupPadding, d = (l - 2 * u) / (c || 1), f = Math.min(t.maxPointWidth || n.len, m(t.pointWidth, d * (1 - 2 * t.pointPadding)));
1166
- return e.columnMetrics = {
1167
- width: f,
1168
- offset: (d - f) / 2 + (u + ((e.columnIndex || 0) + +!!a) * d - l / 2) * (a ? -1 : 1),
1169
- paddedWidth: d,
1170
- columnCount: c
1171
- }, e.columnMetrics;
1172
- }
1173
- crispCol(e, t, n, r) {
1174
- let i = this.borderWidth, a = this.chart.inverted, o = M(t + r, i, a);
1175
- if (t = M(t, i, a), r = o - t, this.options.crisp) {
1176
- let t = M(e + n, i);
1177
- e = M(e, i), n = t - e;
1178
- }
1179
- return {
1180
- x: e,
1181
- y: t,
1182
- width: n,
1183
- height: r
1184
- };
1185
- }
1186
- adjustForMissingColumns(e, n, r, i) {
1187
- if (!r.isNull && i.columnCount > 1) {
1188
- let o = this.xAxis.series.filter((e) => e.visible).map((e) => e.index), c = 0, l = 0;
1189
- a(this.xAxis.stacking?.stacks, (e) => {
1190
- let n = typeof r.x == "number" ? e[r.x.toString()]?.points : void 0, i = n?.[this.index], a = {};
1191
- if (n && s(i)) {
1192
- let e = this.index, r = Object.keys(n).filter((e) => !e.match(",") && n[e] && n[e].length > 1).map(parseFloat).filter((e) => o.indexOf(e) !== -1).filter((n) => {
1193
- let r = this.chart.series[n].options, i = r.stacking && r.stack;
1194
- if (j(i)) {
1195
- if (t(a[i])) return e === n && (e = a[i]), !1;
1196
- a[i] = n;
1197
- }
1198
- return !0;
1199
- }).sort((e, t) => t - e);
1200
- c = r.indexOf(e), l = r.length;
1201
- }
1202
- }), c = this.xAxis.reversed ? l - 1 - c : c;
1203
- let u = (l - 1) * i.paddedWidth + n;
1204
- e = (r.plotX || 0) + u / 2 - n - c * i.paddedWidth;
1205
- }
1206
- return e;
1207
- }
1208
- translate() {
1209
- let e = this, n = e.chart, r = e.options, i = e.dense = e.closestPointRange * e.xAxis.transA < 2, a = e.borderWidth = r.borderWidth ?? +!i, o = e.xAxis, s = e.yAxis, c = r.threshold, l = r.minPointLength ?? 5, u = e.getColumnMetrics(), d = u.width, f = e.pointXOffset = u.offset, p = e.dataMin, m = e.dataMax, h = e.translatedThreshold = s.getThreshold(c), g = e.barW = Math.max(d, 1 + 2 * a);
1210
- r.pointPadding && r.crisp && (g = Math.ceil(g)), G.prototype.translate.apply(e), e.points.concat(e.condemnedPoints).forEach(function(i) {
1211
- let a = i.yBottom ?? h, _ = 999 + Math.abs(a), v = i.plotX || 0, y = b(i.plotY, -_, s.len + _), x, S = Math.min(y, a), C = Math.max(y, a) - S, w = d, T = v + f, E = g;
1212
- l && Math.abs(C) < l && (C = l, x = !s.reversed && !i.negative || s.reversed && i.negative, t(c) && t(m) && i.y === c && m <= c && (s.min || 0) < c && (p !== m || (s.max || 0) <= c) && (x = !x, i.negative = !i.negative), S = Math.abs(S - h) > l ? a - (x ? l : 0) : h - (x ? l : 0)), j(i.options.pointWidth) && (w = E = Math.ceil(i.options.pointWidth), T -= Math.round((w - d) / 2)), r.centerInCategory && (T = e.adjustForMissingColumns(T, w, i, u)), i.barX = T, i.pointWidth = w, i.tooltipPos = n.inverted ? [
1213
- b(s.len + s.pos - n.plotLeft - y, s.pos - n.plotLeft, s.len + s.pos - n.plotLeft),
1214
- o.len + o.pos - n.plotTop - T - E / 2,
1215
- C
1216
- ] : [
1217
- o.left - n.plotLeft + T + E / 2,
1218
- b(y + s.pos - n.plotTop, s.pos - n.plotTop, s.len + s.pos - n.plotTop),
1219
- C
1220
- ], i.shapeType = e.pointClass.prototype.shapeType || "roundedRect", i.shapeArgs = e.crispCol(T, S, E, i.isNull ? 0 : C);
1221
- }), C(this, "afterColumnTranslate");
1222
- }
1223
- drawGraph() {
1224
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
1225
- }
1226
- pointAttribs(e, t) {
1227
- let n = this.options, r = this.pointAttrToOptions || {}, i = r.stroke || "borderColor", a = r["stroke-width"] || "borderWidth", o, s, c, l = e && e.color || this.color, u = e && e[i] || n[i] || l, f = e && e.options.dashStyle || n.dashStyle, p = e?.[a] ?? n[a] ?? this[a] ?? 1, h = e?.isNull && n.nullInteraction ? 0 : e?.opacity ?? n.opacity ?? 1;
1228
- e && this.zones.length && (s = e.getZone(), l = e.options.color || s && (s.color || e.nonZonedColor) || this.color, s && (u = s.borderColor || u, f = s.dashStyle || f, p = s.borderWidth || p)), t && e && (o = d(n.states[t], e.options.states?.[t] || {}), c = o.brightness, l = o.color || c !== void 0 && ge(l).brighten(o.brightness).get() || l, u = o[i] || u, p = o[a] || p, f = o.dashStyle || f, h = m(o.opacity, h));
1229
- let g = {
1230
- fill: l,
1231
- stroke: u,
1232
- "stroke-width": p,
1233
- opacity: e?.condemned ? 0 : h
1234
- };
1235
- return f && (g.dashstyle = f), g;
1236
- }
1237
- drawPoints(e) {
1238
- e ||= this.points.concat(this.condemnedPoints);
1239
- let n = this, r = this.chart, i = n.options, a = i.nullInteraction, { styledMode: o, renderer: s } = r, c = i.animationLimit || 250, l;
1240
- e.forEach(function(e) {
1241
- let u = e.plotY, f = e.graphic, p = !!f, m = f && r.pointCount < c ? "animate" : "attr";
1242
- if (t(u) && (e.y !== null || a)) {
1243
- if (l = e.shapeArgs, f && e.hasNewShapeType() && (f = f.destroy()), !f) {
1244
- let t = l;
1245
- e.origin && r.pointCount < c && (t = d(l, e.getOrigin(e.origin, l)), o || (t.opacity = 0), p = !0, m = "animate"), e.graphic = f = s[e.shapeType](t).add(e.group || n.group);
1246
- }
1247
- p && f[m](d(l)), o || f[m](n.pointAttribs(e, e.selected && "select")).shadow(e.allowShadow !== !1 && i.shadow), f.addClass(e.getClassName(), !0).attr({ visibility: e.visible ? "inherit" : "hidden" });
1248
- } else f && (e.graphic = f.destroy());
1249
- });
1250
- }
1251
- drawTracker(e = this.points) {
1252
- let t = this, n = t.chart, r = n.pointer, i = function(e) {
1253
- r?.normalize(e);
1254
- let i = r?.getPointFromEvent(e);
1255
- r && i && t.options.enableMouseTracking && (n.isInsidePlot(e.chartX - n.plotLeft, e.chartY - n.plotTop, { visiblePlotOnly: !0 }) || t.allowOutsidePlotInteraction && r?.inClass(e.target, "highcharts-point") || r?.inClass(e.target, "highcharts-data-label")) && (r.isDirectTouch = !0, i.onMouseOver(e));
1256
- }, a;
1257
- e.forEach(function(e) {
1258
- a = s(e.dataLabels) ? e.dataLabels : e.dataLabel ? [e.dataLabel] : [], e.graphic && (e.graphic.element.point = e), a.forEach(function(t) {
1259
- (t.div || t.element).point = e;
1260
- });
1261
- }), t._hasTracking ||= (t.trackerGroups?.reduce((e, n) => (n === "dataLabelsGroup" ? e.push(...t.dataLabelsGroups || []) : e.push(t[n]), e), []).forEach((e) => {
1262
- e && (e.addClass("highcharts-tracker").on("mouseover", i).on("mouseout", function(e) {
1263
- r?.onTrackerMouseOut(e);
1264
- }).on("touchstart", i), !n.styledMode && t.options.cursor && e.css({ cursor: t.options.cursor }));
1265
- }), !0), C(this, "afterDrawTracker");
1266
- }
1267
- remove() {
1268
- let e = this, t = e.chart;
1269
- t.hasRendered && t.series.forEach(function(t) {
1270
- t.type === e.type && (t.isDirty = !0);
1271
- }), G.prototype.remove.apply(e, arguments);
1272
- }
1273
- };
1274
- q.defaultOptions = d(G.defaultOptions, K), r(q.prototype, {
1275
- directTouch: !0,
1276
- getSymbol: _e,
1277
- negStacks: !0,
1278
- trackerGroups: ["group", "dataLabelsGroup"]
1279
- }), P.registerSeriesType("column", q);
1280
- //#endregion
1281
- //#region node_modules/highcharts/es-modules/Series/CenteredUtilities.js
1282
- var { deg2rad: J } = D, Y;
1283
- (function(e) {
1284
- function n() {
1285
- let e = this.options, n = this.chart, r = 2 * (e.slicedOffset || 0), i = n.plotWidth - 2 * r, a = n.plotHeight - 2 * r, o = e.center, s = Math.min(i, a), c = e.thickness, l, u = e.size, d = e.innerSize || 0, f, p;
1286
- typeof u == "string" && (u = parseFloat(u)), typeof d == "string" && (d = parseFloat(d));
1287
- let g = [
1288
- m(o?.[0], "50%"),
1289
- m(o?.[1], "50%"),
1290
- m(u && u < 0 ? void 0 : e.size, "100%"),
1291
- m(d && d < 0 ? void 0 : e.innerSize || 0, "0%")
1292
- ];
1293
- for (f = 0; f < 4; ++f) p = g[f], l = f < 2 || f === 2 && /%$/.test(p), g[f] = h(p, [
1294
- i,
1295
- a,
1296
- s,
1297
- g[2]
1298
- ][f]) + (l ? r : 0);
1299
- return g[3] > g[2] && (g[3] = g[2]), t(c) && c * 2 < g[2] && c > 0 && (g[3] = g[2] - c * 2), C(this, "afterGetCenter", { positions: g }), g;
1300
- }
1301
- e.getCenter = n;
1302
- function r(e, n) {
1303
- let r = t(e) ? e : 0, i = t(n) && n > r && n - r < 360 ? n : r + 360;
1304
- return {
1305
- start: J * (r + -90),
1306
- end: J * (i + -90)
1307
- };
1308
- }
1309
- e.getStartAndEndRadians = r;
1310
- })(Y ||= {});
1311
- var ve = Y, { defaultOptions: ye } = _, { noop: X } = D, be = {
1312
- radius: 0,
1313
- scope: "stack",
1314
- where: void 0
1315
- }, Z = X, Q = X;
1316
- function xe(e, t, n) {
1317
- let r = e[t], i = e[t + 1];
1318
- i[0] === "Z" && (i = e[0]);
1319
- let a, o, s;
1320
- if ((r[0] === "M" || r[0] === "L") && i[0] === "A" ? (a = r, o = i, s = !0) : r[0] === "A" && (i[0] === "M" || i[0] === "L") && (a = i, o = r), a && o && o.params) {
1321
- let r = o[1], i = o[5], c = o.params, { start: l, end: u, cx: d, cy: f } = c, p = i ? r - n : r + n, m = p ? Math.asin(n / p) : 0, h = i ? m : -m, g = Math.cos(m) * p;
1322
- s ? (c.start = l + h, a[1] = d + g * Math.cos(l), a[2] = f + g * Math.sin(l), e.splice(t + 1, 0, [
1323
- "A",
1324
- n,
1325
- n,
1326
- 0,
1327
- 0,
1328
- 1,
1329
- d + r * Math.cos(c.start),
1330
- f + r * Math.sin(c.start)
1331
- ])) : (c.end = u - h, o[6] = d + r * Math.cos(c.end), o[7] = f + r * Math.sin(c.end), e.splice(t + 1, 0, [
1332
- "A",
1333
- n,
1334
- n,
1335
- 0,
1336
- 0,
1337
- 1,
1338
- d + g * Math.cos(u),
1339
- f + g * Math.sin(u)
1340
- ])), o[4] = Math.abs(c.end - c.start) < Math.PI ? 0 : 1;
1341
- }
1342
- }
1343
- function Se(e, t, n, r, i = {}) {
1344
- let a = Z(e, t, n, r, i), { brStart: o = !0, brEnd: s = !0, innerR: c = 0, r: l = n, start: u = 0, end: d = 0 } = i;
1345
- if (i.open || !i.borderRadius) return a;
1346
- let f = d - u, p = Math.sin(f / 2), m = Math.max(Math.min(h(i.borderRadius || 0, l - c), (l - c) / 2, l * p / (1 + p)), 0), g = Math.min(m, f / Math.PI * 2 * c), _ = a.length - 1;
1347
- for (; _--;) !o && (_ === 0 || _ === 3) || !s && (_ === 1 || _ === 2) || xe(a, _, _ > 1 ? g : m);
1348
- return a;
1349
- }
1350
- function Ce() {
1351
- if (this.options.borderRadius && !(this.chart.is3d && this.chart.is3d())) {
1352
- let { options: e, yAxis: t } = this, n = e.stacking === "percent", i = ye.plotOptions?.[this.type]?.borderRadius, a = $(e.borderRadius, f(i) ? i : {}), o = t.options.reversed;
1353
- for (let i of this.points) {
1354
- let { shapeArgs: s } = i;
1355
- if (i.shapeType === "roundedRect" && s) {
1356
- let { width: c = 0, height: l = 0, y: u = 0 } = s, d = u, f = l;
1357
- if (a.scope === "stack" && i.stackTotal) {
1358
- let r = t.translate(n ? 100 : i.stackTotal, !1, !0, !1, !0), a = t.translate(e.threshold || 0, !1, !0, !1, !0), o = this.crispCol(0, Math.min(r, a), 0, Math.abs(r - a));
1359
- d = o.y, f = o.height;
1360
- }
1361
- let p = (i.negative ? -1 : 1) * (o ? -1 : 1) == -1, m = a.where;
1362
- !m && this.is("waterfall") && Math.abs((i.yBottom || 0) - (this.translatedThreshold || 0)) > this.borderWidth && (m = "all"), m ||= "end";
1363
- let g = Math.min(h(a.radius, c), c / 2, m === "all" ? f / 2 : Infinity) || 0;
1364
- m === "end" && (p && (d -= g), f += g), r(s, {
1365
- brBoxHeight: f,
1366
- brBoxY: d,
1367
- r: g
1368
- });
1369
- }
1370
- }
1371
- }
1372
- }
1373
- function we(e, t, n) {
1374
- let r = e.types.pie;
1375
- if (!t.symbolCustomAttribs.includes("borderRadius")) {
1376
- let i = n.prototype.symbols;
1377
- y(e, "afterColumnTranslate", Ce, { order: 9 }), y(r, "afterTranslate", Te), t.symbolCustomAttribs.push("borderRadius", "brBoxHeight", "brBoxY", "brEnd", "brStart"), Z = i.arc, Q = i.roundedRect, i.arc = Se, i.roundedRect = Ee;
1378
- }
1379
- }
1380
- function $(e, t) {
1381
- return f(e) || (e = { radius: e || 0 }), d(be, t, e);
1382
- }
1383
- function Te() {
1384
- let e = $(this.options.borderRadius);
1385
- for (let t of this.points) {
1386
- let n = t.shapeArgs;
1387
- n && (n.borderRadius = h(e.radius, (n.r || 0) - (n.innerR || 0)));
1388
- }
1389
- }
1390
- function Ee(e, t, n, r, i = {}) {
1391
- let a = Q(e, t, n, r, i), { r: o = 0, brBoxHeight: s = r, brBoxY: c = t } = i, l = t - c, u = c + s - (t + r), d = l - o > -.1 ? 0 : o, f = u - o > -.1 ? 0 : o, p = Math.max(d && l, 0), m = Math.max(f && u, 0), h = [e + d, t], g = [e + n - d, t], _ = [e + n, t + d], v = [e + n, t + r - f], y = [e + n - f, t + r], b = [e + f, t + r], x = [e, t + r - f], S = [e, t + d], C = (e, t) => Math.sqrt(e ** 2 - t ** 2);
1392
- if (p) {
1393
- let e = C(d, d - p);
1394
- h[0] -= e, g[0] += e, _[1] = S[1] = t + d - p;
1395
- }
1396
- if (r < d - p) {
1397
- let i = C(d, d - p - r);
1398
- _[0] = v[0] = e + n - d + i, y[0] = Math.min(_[0], y[0]), b[0] = Math.max(v[0], b[0]), x[0] = S[0] = e + d - i, _[1] = S[1] = t + r;
1399
- }
1400
- if (m) {
1401
- let e = C(f, f - m);
1402
- y[0] += e, b[0] -= e, v[1] = x[1] = t + r - f + m;
1403
- }
1404
- if (r < f - m) {
1405
- let i = C(f, f - m - r);
1406
- _[0] = v[0] = e + n - f + i, g[0] = Math.min(_[0], g[0]), h[0] = Math.max(v[0], h[0]), x[0] = S[0] = e + f - i, v[1] = x[1] = t;
1407
- }
1408
- return a.length = 0, a.push(["M", ...h], ["L", ...g], [
1409
- "A",
1410
- d,
1411
- d,
1412
- 0,
1413
- 0,
1414
- 1,
1415
- ..._
1416
- ], ["L", ...v], [
1417
- "A",
1418
- f,
1419
- f,
1420
- 0,
1421
- 0,
1422
- 1,
1423
- ...y
1424
- ], ["L", ...b], [
1425
- "A",
1426
- f,
1427
- f,
1428
- 0,
1429
- 0,
1430
- 1,
1431
- ...x
1432
- ], ["L", ...S], [
1433
- "A",
1434
- d,
1435
- d,
1436
- 0,
1437
- 0,
1438
- 1,
1439
- ...h
1440
- ], ["Z"]), a;
1441
- }
1442
- //#endregion
1443
- export { me as a, z as c, q as i, I as l, $ as n, G as o, ve as r, V as s, we as t };
1444
-
1445
- //# sourceMappingURL=BorderRadius-2zMZW_aK.js.map