@mobileaction/action-kit 1.59.0-beta.20260824072801 → 1.59.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 (32) hide show
  1. package/dist/action-kit.mjs +1 -1
  2. package/dist/annotations-BotVbqYk.js +1275 -0
  3. package/dist/components/badge/stories/basic.stories.d.ts +2 -2
  4. package/dist/components/badge/stories/blue.stories.d.ts +2 -2
  5. package/dist/components/badge/stories/dark.stories.d.ts +2 -2
  6. package/dist/components/badge/stories/green.stories.d.ts +2 -2
  7. package/dist/components/badge/stories/orange.stories.d.ts +2 -2
  8. package/dist/components/badge/stories/pink.stories.d.ts +2 -2
  9. package/dist/components/badge/stories/purple.stories.d.ts +2 -2
  10. package/dist/components/badge/stories/red.stories.d.ts +2 -2
  11. package/dist/components/badge/stories/teal.stories.d.ts +2 -2
  12. package/dist/components/badge/stories/yellow.stories.d.ts +2 -2
  13. package/dist/components/cascader/stories/default.stories.d.ts +16 -16
  14. package/dist/export-data-BR_-2Q3f.js +332 -0
  15. package/dist/exporting-DR0s0ify.js +601 -0
  16. package/dist/funnel-DL7kiG31.js +134 -0
  17. package/dist/{index-6Py-WZ9e.js → index-CBkR2AwI.js} +2355 -2349
  18. package/dist/map-CMb83okh.js +1731 -0
  19. package/dist/offline-exporting-YDP5IlMX.js +192 -0
  20. package/dist/stock-CBVAQBFc.js +2054 -0
  21. package/dist/venn-D6eKe_-O.js +453 -0
  22. package/dist/wordcloud-t7GdM2hM.js +227 -0
  23. package/package.json +30 -15
  24. package/dist/annotations-DSkf_ftr.js +0 -1496
  25. package/dist/export-data-DCTe5P_S.js +0 -404
  26. package/dist/exporting-DQGEobM-.js +0 -739
  27. package/dist/funnel-CqFEWYxB.js +0 -201
  28. package/dist/map-DAB70ark.js +0 -1928
  29. package/dist/offline-exporting-aCzMDQAJ.js +0 -203
  30. package/dist/stock-CYJWuEFp.js +0 -2216
  31. package/dist/venn-Dec0FzLN.js +0 -498
  32. package/dist/wordcloud-CjsQdxnL.js +0 -268
@@ -1,1928 +0,0 @@
1
- import { g as Co } from "./index-6Py-WZ9e.js";
2
- function Po(nt, Nt) {
3
- for (var V = 0; V < Nt.length; V++) {
4
- const Z = Nt[V];
5
- if (typeof Z != "string" && !Array.isArray(Z)) {
6
- for (const K in Z)
7
- if (K !== "default" && !(K in nt)) {
8
- const lt = Object.getOwnPropertyDescriptor(Z, K);
9
- lt && Object.defineProperty(nt, K, lt.get ? lt : {
10
- enumerable: !0,
11
- get: () => Z[K]
12
- });
13
- }
14
- }
15
- }
16
- return Object.freeze(Object.defineProperty(nt, Symbol.toStringTag, { value: "Module" }));
17
- }
18
- var Rt = { exports: {} }, To = Rt.exports, Ke;
19
- function Lo() {
20
- return Ke || (Ke = 1, (function(nt, Nt) {
21
- /**
22
- * Highmaps JS v12.6.0 (2026-04-13)
23
- * @module highcharts/modules/map
24
- * @requires highcharts
25
- *
26
- * Highmaps as a plugin for Highcharts or Highcharts Stock.
27
- *
28
- * (c) 2011-2026 Highsoft AS
29
- * Author: Torstein Hønsi
30
- *
31
- * A commercial license may be required depending on use.
32
- * See www.highcharts.com/license
33
- */
34
- (function(V, Z) {
35
- nt.exports = Z(V._Highcharts, V._Highcharts.Axis, V._Highcharts.Color, V._Highcharts.SeriesRegistry, V._Highcharts.SVGElement, V._Highcharts.Series, V._Highcharts.Chart, V._Highcharts.SVGRenderer, V._Highcharts.Templating, V._Highcharts.Series.types.scatter, V._Highcharts.Point);
36
- })("u" < typeof window ? To : window, (V, Z, K, lt, Je, Qe, ti, ei, ii, oi, si) => (() => {
37
- let Mt;
38
- var vt, pe, wt, Ct, Yt, Gt, Ft, Wt, Zt, Ut, Ht, ri = { 28: (a) => {
39
- a.exports = Je;
40
- }, 260: (a) => {
41
- a.exports = si;
42
- }, 512: (a) => {
43
- a.exports = lt;
44
- }, 532: (a) => {
45
- a.exports = Z;
46
- }, 540: (a) => {
47
- a.exports = ei;
48
- }, 620: (a) => {
49
- a.exports = K;
50
- }, 632: (a) => {
51
- a.exports = oi;
52
- }, 820: (a) => {
53
- a.exports = Qe;
54
- }, 944: (a) => {
55
- a.exports = V;
56
- }, 960: (a) => {
57
- a.exports = ti;
58
- }, 984: (a) => {
59
- a.exports = ii;
60
- } }, de = {};
61
- function T(a) {
62
- var t = de[a];
63
- if (t !== void 0) return t.exports;
64
- var e = de[a] = { exports: {} };
65
- return ri[a](e, e.exports, T), e.exports;
66
- }
67
- T.n = (a) => {
68
- var t = a && a.__esModule ? () => a.default : () => a;
69
- return T.d(t, { a: t }), t;
70
- }, T.d = (a, t) => {
71
- for (var e in t) T.o(t, e) && !T.o(a, e) && Object.defineProperty(a, e, { enumerable: !0, get: t[e] });
72
- }, T.o = (a, t) => Object.prototype.hasOwnProperty.call(a, t);
73
- var ce = {};
74
- T.d(ce, { default: () => Mo });
75
- var _t = T(944), z = T.n(_t), ai = T(532), ue = T.n(ai), ni = T(620), $t = T.n(ni);
76
- let { doc: me, win: li } = z();
77
- function L(a, t, e, i = {}) {
78
- let o = typeof a == "function" && a.prototype || a;
79
- Object.hasOwnProperty.call(o, "hcEvents") || (o.hcEvents = {});
80
- let r = o.hcEvents;
81
- z().Point && a instanceof z().Point && a.series && a.series.chart && (a.series.chart.runTrackerClick = !0);
82
- let n = a.addEventListener;
83
- n && n.call(a, t, e, !!z().supportsPassiveEvents && { passive: i.passive === void 0 ? t.indexOf("touch") !== -1 : i.passive, capture: !1 }), r[t] || (r[t] = []);
84
- let s = { fn: e, order: typeof i.order == "number" ? i.order : 1 / 0 };
85
- return r[t].push(s), r[t].sort((l, h) => l.order - h.order), function() {
86
- (function(l, h, p) {
87
- function d(g, m) {
88
- let f = l.removeEventListener;
89
- f && f.call(l, g, m, !1);
90
- }
91
- function c(g) {
92
- let m, f;
93
- l.nodeName && (h ? (m = {})[h] = !0 : m = g, ht(m, function(y, b) {
94
- if (g[b]) for (f = g[b].length; f--; ) d(b, g[b][f].fn);
95
- }));
96
- }
97
- let u = typeof l == "function" && l.prototype || l;
98
- if (Object.hasOwnProperty.call(u, "hcEvents")) {
99
- let g = u.hcEvents;
100
- if (h) {
101
- let m = g[h] || [];
102
- p ? (g[h] = m.filter(function(f) {
103
- return p !== f.fn;
104
- }), d(h, p)) : (c(g), g[h] = []);
105
- } else c(g), delete u.hcEvents;
106
- }
107
- })(a, t, e);
108
- };
109
- }
110
- function fe(a) {
111
- let t = a.length, e = a[0];
112
- for (; t--; ) a[t] < e && (e = a[t]);
113
- return e;
114
- }
115
- function ge(a) {
116
- let t = a.length, e = a[0];
117
- for (; t--; ) a[t] > e && (e = a[t]);
118
- return e;
119
- }
120
- function q(a, t, e) {
121
- return a > t ? a < e ? a : e : t;
122
- }
123
- function ye(a, t = 0, e) {
124
- let i = t % 2 / 2, o = 1;
125
- return (Math.round(a * o - i) + i) * o;
126
- }
127
- function N(a) {
128
- return a != null;
129
- }
130
- function k(a, t) {
131
- let e;
132
- for (e in a || (a = {}), t) a[e] = t[e];
133
- return a;
134
- }
135
- function H(a, t, e, i) {
136
- if (e = e || {}, me?.createEvent && (a.dispatchEvent || a.fireEvent && a !== z())) {
137
- let o = me.createEvent("Events");
138
- o.initEvent(t, !0, !0), e = k(o, e), a.dispatchEvent ? a.dispatchEvent(e) : a.fireEvent(t, e);
139
- } else if (a.hcEvents) {
140
- e.target || k(e, { preventDefault: function() {
141
- e.defaultPrevented = !0;
142
- }, target: a, type: t });
143
- let o = [], r = a, n = !1;
144
- for (; r.hcEvents; ) Object.hasOwnProperty.call(r, "hcEvents") && r.hcEvents[t] && (o.length && (n = !0), o.unshift.apply(o, r.hcEvents[t])), r = Object.getPrototypeOf(r);
145
- n && o.sort((s, l) => s.order - l.order), o.forEach((s) => {
146
- s.fn.call(a, e, a) === !1 && e.preventDefault();
147
- });
148
- }
149
- i && !e.defaultPrevented && i.call(a, e);
150
- }
151
- function be(a, t) {
152
- let e = a.split(".");
153
- for (; e.length && N(t); ) {
154
- let i = e.shift();
155
- if (i === void 0 || i === "__proto__") return;
156
- if (i === "this") {
157
- let r;
158
- return et(t) && (r = t["@this"]), r ?? t;
159
- }
160
- let o = t[i.replace(/[\\'"]/g, "")];
161
- if (!N(o) || typeof o == "function" || typeof o.nodeType == "number" || o === li) return;
162
- t = o;
163
- }
164
- return t;
165
- }
166
- let hi = Array.prototype.find ? function(a, t) {
167
- return a.find(t);
168
- } : function(a, t) {
169
- let e, i = a.length;
170
- for (e = 0; e < i; e++) if (t(a[e], e)) return a[e];
171
- };
172
- function xe(a) {
173
- N(a) && clearTimeout(a);
174
- }
175
- function Me(a) {
176
- return et(a) && typeof a.nodeType == "number";
177
- }
178
- function M(a) {
179
- return typeof a == "number" && !isNaN(a) && a < 1 / 0 && a > -1 / 0;
180
- }
181
- function _(a) {
182
- let t = Object.prototype.toString.call(a);
183
- return t === "[object Array]" || t === "[object Array Iterator]";
184
- }
185
- function et(a, t) {
186
- return !!a && typeof a == "object" && (!t || !_(a));
187
- }
188
- function P(a, ...t) {
189
- let e, i = [a, ...t], o = {}, r = function(s, l) {
190
- return typeof s != "object" && (s = {}), ht(l, function(h, p) {
191
- if (p !== "__proto__" && p !== "constructor") {
192
- let d;
193
- !et(h, !0) || (d = h?.constructor, et(h, !0) && !Me(h) && d?.name && d.name !== "Object") || Me(h) ? s[p] = l[p] : s[p] = r(s[p] || {}, h);
194
- }
195
- }), s;
196
- };
197
- a === !0 && (o = i[1], i = Array.prototype.slice.call(i, 2));
198
- let n = i.length;
199
- for (e = 0; e < n; e++) o = r(o, i[e]);
200
- return o;
201
- }
202
- function ht(a, t, e) {
203
- for (let i in a) Object.hasOwnProperty.call(a, i) && t.call(a[i], a[i], i, a);
204
- }
205
- function C() {
206
- let a = arguments, t = a.length;
207
- for (let e = 0; e < t; e++) {
208
- let i = a[e];
209
- if (i != null) return i;
210
- }
211
- }
212
- function Pt(a, t) {
213
- return 0 > a.indexOf(t) && !!a.push(t);
214
- }
215
- function Y(a, t, e) {
216
- return /%$/.test(a) ? t * parseFloat(a) / 100 + (e || 0) : parseFloat(a);
217
- }
218
- function Tt(a, t, e) {
219
- let i = a[t];
220
- a[t] = function() {
221
- let o = arguments, r = this;
222
- return e.apply(this, [function() {
223
- return i.apply(r, arguments.length ? arguments : o);
224
- }].concat([].slice.call(arguments)));
225
- };
226
- }
227
- let { parse: Kt } = $t();
228
- (vt = Yt || (Yt = {})).initDataClasses = function(a) {
229
- let t = this.chart, e = this.legendItem = this.legendItem || {}, i = this.options, o = a.dataClasses || [], r, n, s = t.options.chart.colorCount, l = 0, h;
230
- this.dataClasses = n = [], e.labels = [];
231
- for (let p = 0, d = o.length; p < d; ++p) r = P(r = o[p]), n.push(r), (t.styledMode || !r.color) && (i.dataClassColor === "category" ? (t.styledMode || (s = (h = t.options.colors || []).length, r.color = h[l]), r.colorIndex = l, ++l === s && (l = 0)) : r.color = Kt(i.minColor).tweenTo(Kt(i.maxColor), d < 2 ? 0.5 : p / (d - 1)));
232
- }, vt.initStops = function() {
233
- let a = this.options, t = this.stops = a.stops || [[0, a.minColor || ""], [1, a.maxColor || ""]];
234
- for (let e = 0, i = t.length; e < i; ++e) t[e].color = Kt(t[e][1]);
235
- }, vt.normalizedValue = function(a) {
236
- let t = this.max || 0, e = this.min || 0;
237
- return this.logarithmic && (a = this.logarithmic.log2lin(a)), 1 - (t - a) / (t - e || 1);
238
- }, vt.toColor = function(a, t) {
239
- let e, i, o, r, n, s, l = this.dataClasses, h = this.stops;
240
- if (l) {
241
- for (s = l.length; s--; ) if (i = (n = l[s]).from, o = n.to, (i === void 0 || a >= i) && (o === void 0 || a <= o)) {
242
- r = n.color, t && (t.dataClass = s, t.colorIndex = n.colorIndex);
243
- break;
244
- }
245
- } else {
246
- for (e = this.normalizedValue(a), s = h.length; s-- && !(e > h[s][0]); ) ;
247
- i = h[s] || h[s + 1], e = 1 - ((o = h[s + 1] || i)[0] - e) / (o[0] - i[0] || 1), r = i.color.tweenTo(o.color, e);
248
- }
249
- return r;
250
- };
251
- let pi = Yt, { parse: Lt } = $t();
252
- (function(a) {
253
- let t;
254
- function e() {
255
- let { userOptions: c } = this;
256
- if (this.colorAxis = [], c.colorAxis) {
257
- var u;
258
- c.colorAxis = _(u = c.colorAxis) ? u : [u], c.colorAxis.map((g) => new t(this, g));
259
- }
260
- }
261
- function i(c) {
262
- let u = this.chart.colorAxis || [], g = (b) => {
263
- let x = c.allItems.indexOf(b);
264
- x !== -1 && (this.destroyItem(c.allItems[x]), c.allItems.splice(x, 1));
265
- }, m = [], f, y;
266
- for (u.forEach(function(b) {
267
- f = b.options, f?.showInLegend && (f.dataClasses && f.visible ? m = m.concat(b.getDataClassLegendSymbols()) : f.visible && m.push(b), b.series.forEach(function(x) {
268
- (!x.options.showInLegend || f.dataClasses) && (x.options.legendType === "point" ? x.points.forEach(function(v) {
269
- g(v);
270
- }) : g(x));
271
- }));
272
- }), y = m.length; y--; ) c.allItems.unshift(m[y]);
273
- }
274
- function o(c) {
275
- c.visible && c.item.legendColor && c.item.legendItem.symbol.attr({ fill: c.item.legendColor });
276
- }
277
- function r(c) {
278
- this.chart.colorAxis?.forEach((u) => {
279
- u.update({}, c.redraw);
280
- });
281
- }
282
- function n() {
283
- (this.chart.colorAxis?.length || this.colorAttribs) && this.translateColors();
284
- }
285
- function s() {
286
- let c = this.axisTypes;
287
- c ? c.indexOf("colorAxis") === -1 && c.push("colorAxis") : this.axisTypes = ["colorAxis"];
288
- }
289
- function l(c) {
290
- let u = this, g = c ? "show" : "hide";
291
- u.visible = u.options.visible = !!c, ["graphic", "dataLabel"].forEach(function(m) {
292
- u[m] && u[m][g]();
293
- }), this.series.buildKDTree();
294
- }
295
- function h() {
296
- let c = this, u = this.getPointsCollection(), g = this.options.nullColor, m = this.colorAxis, f = this.colorKey;
297
- u.forEach((y) => {
298
- let b = y.getNestedProperty(f), x = y.options.color || (y.isNull || y.value === null ? g : m && b !== void 0 ? m.toColor(b, y) : y.color || c.color);
299
- x && y.color !== x && (y.color = x, c.options.legendType === "point" && y.legendItem && y.legendItem.label && c.chart.legend.colorizeItem(y, y.visible));
300
- });
301
- }
302
- function p() {
303
- this.elem.attr("fill", Lt(this.start).tweenTo(Lt(this.end), this.pos), void 0, !0);
304
- }
305
- function d() {
306
- this.elem.attr("stroke", Lt(this.start).tweenTo(Lt(this.end), this.pos), void 0, !0);
307
- }
308
- a.compose = function(c, u, g, m, f) {
309
- var y;
310
- let b, x = u.prototype, v = g.prototype, w = f.prototype;
311
- x.collectionsWithUpdate.includes("colorAxis") || (t = c, x.collectionsWithUpdate.push("colorAxis"), x.collectionsWithInit.colorAxis = [x.addColorAxis], L(u, "afterCreateAxes", e), b = (y = u).prototype.createAxis, y.prototype.createAxis = function(A, E) {
312
- if (A !== "colorAxis") return b.apply(this, arguments);
313
- let S = new t(this, P(E.axis, { index: this[A].length, isX: !1 }));
314
- return this.isDirtyLegend = !0, this.axes.forEach((j) => {
315
- j.series = [];
316
- }), this.series.forEach((j) => {
317
- j.bindAxes(), j.isDirtyData = !0;
318
- }), C(E.redraw, !0) && this.redraw(E.animation), S;
319
- }, v.fillSetter = p, v.strokeSetter = d, L(m, "afterGetAllItems", i), L(m, "afterColorizeItem", o), L(m, "afterUpdate", r), k(w, { optionalAxis: "colorAxis", translateColors: h }), k(w.pointClass.prototype, { setVisible: l }), L(f, "afterTranslate", n, { order: 1 }), L(f, "bindAxes", s));
320
- }, a.pointSetVisible = l;
321
- })(Gt || (Gt = {}));
322
- let di = Gt;
323
- var ci = T(512), D = T.n(ci);
324
- let { defaultOptions: qt } = z(), { series: Jt } = D();
325
- qt.colorAxis = P(qt.xAxis, { lineWidth: 0, minPadding: 0, maxPadding: 0, gridLineColor: "#ffffff", gridLineWidth: 1, tickPixelInterval: 72, startOnTick: !0, endOnTick: !0, offset: 0, marker: { animation: { duration: 50 }, width: 0.01, color: "#999999" }, labels: { distance: 8, overflow: "justify", rotation: 0 }, minColor: "#e6e9ff", maxColor: "#0022ff", tickLength: 5, title: { margin: 5 }, showInLegend: !0 });
326
- class G extends ue() {
327
- static compose(t, e, i, o) {
328
- di.compose(G, t, e, i, o);
329
- }
330
- constructor(t, e) {
331
- super(t, e), this.coll = "colorAxis", this.visible = !0, this.init(t, e);
332
- }
333
- init(t, e) {
334
- let i = t.options.legend || {}, o = e.layout ? e.layout !== "vertical" : i.layout !== "vertical";
335
- this.side = e.side || o ? 2 : 1, this.reversed = e.reversed, this.opposite = !o, super.init(t, e, "colorAxis"), this.userOptions = e, _(t.userOptions.colorAxis) && (t.userOptions.colorAxis[this.index] = e), e.dataClasses && this.initDataClasses(e), this.initStops(), this.horiz = o, this.zoomEnabled = !1;
336
- }
337
- hasData() {
338
- return !!(this.tickPositions || []).length;
339
- }
340
- setTickPositions() {
341
- if (!this.dataClasses) return super.setTickPositions();
342
- }
343
- setOptions(t) {
344
- let e = this.chart.options.legend || {}, i = qt.colorAxis, o = P((t.layout || e.layout || i.layout) !== "vertical" ? { title: { rotation: 0 } } : { title: { rotation: 90, margin: 10 } }, i, t, { showEmpty: !1, visible: this.chart.options.legend.enabled && t.visible !== !1 });
345
- super.setOptions(o), this.options.crosshair = this.options.marker;
346
- }
347
- setAxisSize() {
348
- let t = this.chart, e = this.legendItem?.symbol, { width: i, height: o } = this.getSize();
349
- e && (this.left = +e.attr("x"), this.top = +e.attr("y"), this.width = i = +e.attr("width"), this.height = o = +e.attr("height"), this.right = t.chartWidth - this.left - i, this.bottom = t.chartHeight - this.top - o, this.pos = this.horiz ? this.left : this.top), this.len = (this.horiz ? i : o) || G.defaultLegendLength;
350
- }
351
- getOffset() {
352
- let t = this.legendItem?.group, e = this.chart.axisOffset[this.side];
353
- if (t) {
354
- this.axisParent = t, super.getOffset();
355
- let i = this.chart.legend;
356
- i.allItems.forEach(function(o) {
357
- o instanceof G && o.drawLegendSymbol(i, o);
358
- }), i.render(), this.chart.getMargins(!0), this.added || (this.added = !0), this.labelLeft = 0, this.labelRight = this.width, this.chart.axisOffset[this.side] = e;
359
- }
360
- }
361
- setLegendColor() {
362
- let t = this.horiz, e = this.reversed, i = +!!e, o = +!e, r = t ? [i, 0, o, 0] : [0, o, 0, i];
363
- this.legendColor = { linearGradient: { x1: r[0], y1: r[1], x2: r[2], y2: r[3] }, stops: this.stops };
364
- }
365
- drawLegendSymbol(t, e) {
366
- let i = e.legendItem || {}, o = t.padding, r = t.options, n = this.options.labels, s = C(r.itemDistance, 10), l = this.horiz, { width: h, height: p } = this.getSize(), d = C(r.labelPadding, l ? 16 : 30);
367
- this.setLegendColor();
368
- let c = 0, u = 0;
369
- if (this.options.title?.text && !this.axisTitle) {
370
- this.axisGroup || (this.axisParent = i.group, this.createGroups());
371
- let y = this.len, b = this.top, x = this.left, v = this.width;
372
- this.len = l ? h : p, this.top = 0, this.left = 0, this.width = h, this.addTitle(!0), this.len = y, this.top = b, this.left = x, this.width = v;
373
- }
374
- if (this.axisTitle) {
375
- let y = this.axisTitle.getBBox();
376
- c = y.height, u = y.width;
377
- }
378
- let g = this.options.title || {}, m = this.axisTitle ? g.margin ?? 0 : 0, f = l ? c + m : 0;
379
- i.symbol || (i.symbol = this.chart.renderer.symbol("roundedRect").attr({ r: r.symbolRadius ?? 3, zIndex: 1 }).add(i.group)), i.symbol.attr({ x: 0, y: (t.baseline || 0) - 11 + f, width: h, height: p }), l ? (i.labelWidth = Math.max(h + o + s, u || 0), i.labelHeight = p + o + d + c + m) : (i.labelWidth = h + o + (n.x ?? n.distance ?? 0) + (this.maxLabelLength || 0) + (u || 0) + m, i.labelHeight = Math.max(p + o, c || 0));
380
- }
381
- getTitlePosition(t) {
382
- let e = super.getTitlePosition(t), i = this.options.title?.margin ?? 0;
383
- if (this.horiz && t) e.y = this.top - i;
384
- else if (!this.horiz && t) {
385
- let o = this.options.labels || {}, r = o.x ?? o.distance ?? 0;
386
- e.x = this.left + this.width + r + (this.maxLabelLength || 0) + i;
387
- }
388
- return e;
389
- }
390
- setState(t) {
391
- this.series.forEach(function(e) {
392
- e.setState(t);
393
- });
394
- }
395
- setVisible() {
396
- }
397
- getSeriesExtremes() {
398
- let t = this.series, e, i, o, r, n = t.length;
399
- for (this.dataMin = 1 / 0, this.dataMax = -1 / 0; n--; ) {
400
- for (let s of (i = (r = t[n]).colorKey = C(r.options.colorKey, r.colorKey, r.pointValKey, r.zoneAxis, "y"), o = r[i + "Min"] && r[i + "Max"], [i, "value", "y"])) if ((e = r.getColumn(s)).length) break;
401
- if (o) r.minColorValue = r[i + "Min"], r.maxColorValue = r[i + "Max"];
402
- else {
403
- let s = Jt.prototype.getExtremes.call(r, e);
404
- r.minColorValue = s.dataMin, r.maxColorValue = s.dataMax;
405
- }
406
- N(r.minColorValue) && N(r.maxColorValue) && (this.dataMin = Math.min(this.dataMin, r.minColorValue), this.dataMax = Math.max(this.dataMax, r.maxColorValue)), o || Jt.prototype.applyExtremes.call(r);
407
- }
408
- }
409
- drawCrosshair(t, e) {
410
- let i, o = this.legendItem || {}, r = e?.plotX, n = e?.plotY, s = this.pos, l = this.len;
411
- e && ((i = this.toPixels(e.getNestedProperty(e.series.colorKey))) < s ? i = s - 2 : i > s + l && (i = s + l + 2), e.plotX = i, e.plotY = this.len - i, super.drawCrosshair(t, e), e.plotX = r, e.plotY = n, this.cross && !this.cross.addedToColorAxis && o.group && (this.cross.addClass("highcharts-coloraxis-marker").add(o.group), this.cross.addedToColorAxis = !0, this.chart.styledMode || typeof this.crosshair != "object" || this.cross.attr({ fill: this.crosshair.color })));
412
- }
413
- getPlotLinePath(t) {
414
- let e = this.left, i = t.translatedValue, o = this.top;
415
- return M(i) ? this.horiz ? [["M", i - 4, o - 6], ["L", i + 4, o - 6], ["L", i, o], ["Z"]] : [["M", e, i], ["L", e - 6, i + 6], ["L", e - 6, i - 6], ["Z"]] : super.getPlotLinePath(t);
416
- }
417
- update(t, e) {
418
- let i = this.chart.legend;
419
- this.series.forEach((o) => {
420
- o.isDirtyData = !0;
421
- }), (t.dataClasses && i.allItems || this.dataClasses) && this.destroyItems(), super.update(t, e), this.legendItem?.label && (this.setLegendColor(), i.colorizeItem(this, !0));
422
- }
423
- destroyItems() {
424
- let t = this.chart, e = this.legendItem || {};
425
- if (e.label) t.legend.destroyItem(this);
426
- else if (e.labels) for (let i of e.labels) t.legend.destroyItem(i);
427
- t.isDirtyLegend = !0;
428
- }
429
- destroy() {
430
- this.chart.isDirtyLegend = !0, this.destroyItems(), super.destroy(...[].slice.call(arguments));
431
- }
432
- remove(t) {
433
- this.destroyItems(), super.remove(t);
434
- }
435
- getDataClassLegendSymbols() {
436
- let t, e = this, i = e.chart, o = e.legendItem && e.legendItem.labels || [], r = i.options.legend, n = C(r.valueDecimals, -1), s = C(r.valueSuffix, ""), l = (h) => e.series.reduce((p, d) => (p.push(...d.points.filter((c) => c.dataClass === h)), p), []);
437
- return o.length || e.dataClasses.forEach((h, p) => {
438
- let d = h.from, c = h.to, { numberFormatter: u } = i, g = !0;
439
- t = "", d === void 0 ? t = "< " : c === void 0 && (t = "> "), d !== void 0 && (t += u(d, n) + s), d !== void 0 && c !== void 0 && (t += " - "), c !== void 0 && (t += u(c, n) + s), o.push(k({ chart: i, name: t, options: {}, drawLegendSymbol: Jt.prototype.drawLegendSymbol, visible: !0, isDataClass: !0, setState: (m) => {
440
- for (let f of l(p)) f.setState(m);
441
- }, setVisible: function() {
442
- this.visible = g = e.visible = !g;
443
- let m = [];
444
- for (let f of l(p)) f.setVisible(g), f.hiddenInDataClass = !g, m.indexOf(f.series) === -1 && m.push(f.series);
445
- i.legend.colorizeItem(this, g), m.forEach((f) => {
446
- H(f, "afterDataClassLegendClick");
447
- });
448
- } }, h));
449
- }), o;
450
- }
451
- getSize() {
452
- let { chart: t, horiz: e } = this, { height: i, width: o } = this.options, { legend: r } = t.options;
453
- return { width: C(N(o) ? Y(o, t.chartWidth) : void 0, r?.symbolWidth, e ? G.defaultLegendLength : 12), height: C(N(i) ? Y(i, t.chartHeight) : void 0, r?.symbolHeight, e ? 12 : G.defaultLegendLength) };
454
- }
455
- }
456
- G.defaultLegendLength = 200, G.keepProps = ["legendItem"], k(G.prototype, pi), Array.prototype.push.apply(ue().keepProps, G.keepProps);
457
- let J = z();
458
- J.ColorAxis = J.ColorAxis || G, J.ColorAxis.compose(J.Chart, J.Fx, J.Legend, J.Series);
459
- let ui = { lang: { zoomIn: "Zoom in", zoomOut: "Zoom out" }, mapNavigation: { buttonOptions: { alignTo: "plotBox", align: "left", verticalAlign: "top", x: 0, width: 18, height: 18, padding: 5, style: { color: "#666666", fontSize: "1em", fontWeight: "bold" }, theme: { fill: "#ffffff", stroke: "#e6e6e6", "stroke-width": 1, "text-align": "center" } }, buttons: { zoomIn: { onclick: function() {
460
- this.mapZoom(0.5);
461
- }, text: "+", y: 0 }, zoomOut: { onclick: function() {
462
- this.mapZoom(2);
463
- }, text: "-", y: 28 } }, mouseWheelSensitivity: 1.1 } };
464
- (function(a) {
465
- let t, e = 0;
466
- function i(s) {
467
- let l = this.chart;
468
- s = this.normalize(s), l.options.mapNavigation.enableDoubleClickZoomTo ? l.pointer.inClass(s.target, "highcharts-tracker") && l.hoverPoint && l.hoverPoint.zoomTo() : l.isInsidePlot(s.chartX - l.plotLeft, s.chartY - l.plotTop) && l.mapZoom(0.5, void 0, void 0, s.chartX, s.chartY);
469
- }
470
- function o(s) {
471
- let l = this.chart, h = N((s = this.normalize(s)).wheelDelta) && -s.wheelDelta / 120 || s.deltaY || s.detail;
472
- Math.abs(h) >= 1 && (e += Math.abs(h), t && xe(t), t = setTimeout(() => {
473
- e = 0;
474
- }, 50)), e < 10 && l.isInsidePlot(s.chartX - l.plotLeft, s.chartY - l.plotTop) && l.mapView && l.mapView.zoomBy(-((l.options.mapNavigation.mouseWheelSensitivity - 1) * h), void 0, [s.chartX, s.chartY], !(1 > Math.abs(h)) && void 0);
475
- }
476
- function r(s, l, h) {
477
- let p = this.chart;
478
- if (l = s.call(this, l, h), p && p.mapView) {
479
- let d = p.mapView.pixelsToLonLat({ x: l.chartX - p.plotLeft, y: l.chartY - p.plotTop });
480
- d && k(l, d);
481
- }
482
- return l;
483
- }
484
- function n(s) {
485
- let l = this.chart.options.mapNavigation;
486
- l && C(l.enableTouchZoom, l.enabled) && (this.chart.zooming.pinchType = "xy"), s.apply(this, [].slice.call(arguments, 1));
487
- }
488
- a.compose = function(s) {
489
- let l = s.prototype;
490
- l.onContainerDblClick || (k(l, { onContainerDblClick: i, onContainerMouseWheel: o }), Tt(l, "normalize", r), Tt(l, "zoomOption", n));
491
- };
492
- })(Ft || (Ft = {}));
493
- let mi = Ft;
494
- function fi(a, t, e, i, o) {
495
- if (o) {
496
- let r = o?.r || 0;
497
- o.brBoxY = t - r, o.brBoxHeight = i + r;
498
- }
499
- return Mt.roundedRect(a, t, e, i, o);
500
- }
501
- function gi(a, t, e, i, o) {
502
- if (o) {
503
- let r = o?.r || 0;
504
- o.brBoxHeight = i + r;
505
- }
506
- return Mt.roundedRect(a, t, e, i, o);
507
- }
508
- let yi = function(a) {
509
- (Mt = a.prototype.symbols).bottombutton = fi, Mt.topbutton = gi;
510
- }, { setOptions: bi } = z(), { composed: xi } = z();
511
- function Qt(a) {
512
- a && (a.preventDefault?.(), a.stopPropagation?.(), a.cancelBubble = !0);
513
- }
514
- class At {
515
- static compose(t, e, i) {
516
- mi.compose(e), yi(i), Pt(xi, "Map.Navigation") && (L(t, "beforeRender", function() {
517
- this.mapNavigation = new At(this), this.mapNavigation.update();
518
- }), bi(ui));
519
- }
520
- constructor(t) {
521
- this.chart = t, this.navButtons = [];
522
- }
523
- update(t) {
524
- let e = this, i = e.chart, o = e.navButtons, r = function(s) {
525
- this.handler.call(i, s), Qt(s);
526
- }, n = i.options.mapNavigation;
527
- for (t && (n = i.options.mapNavigation = P(i.options.mapNavigation, t)); o.length; ) o.pop()?.destroy();
528
- !i.renderer.forExport && C(n.enableButtons, n.enabled) && (e.navButtonsGroup || (e.navButtonsGroup = i.renderer.g().attr({ zIndex: 7 }).add()), ht(n.buttons, (s, l) => {
529
- let h = { padding: (s = P(n.buttonOptions, s)).padding };
530
- !i.styledMode && s.theme && (k(h, s.theme), h.style = P(s.theme.style, s.style));
531
- let { text: p, width: d = 0, height: c = 0, padding: u = 0 } = s, g = i.renderer.button(p !== "+" && p !== "-" && p || "", 0, 0, r, h, void 0, void 0, void 0, l === "zoomIn" ? "topbutton" : "bottombutton").addClass("highcharts-map-navigation highcharts-" + { zoomIn: "zoom-in", zoomOut: "zoom-out" }[l]).attr({ width: d, height: c, title: i.options.lang[l], zIndex: 5 }).add(e.navButtonsGroup);
532
- if (p === "+" || p === "-") {
533
- let m = d + 1, f = [["M", u + 3, u + c / 2], ["L", u + m - 3, u + c / 2]];
534
- p === "+" && f.push(["M", u + m / 2, u + 3], ["L", u + m / 2, u + c - 3]), i.renderer.path(f).addClass("highcharts-button-symbol").attr(i.styledMode ? {} : { stroke: s.style?.color, "stroke-width": 3, "stroke-linecap": "round" }).add(g);
535
- }
536
- if (g.handler = s.onclick, L(g.element, "dblclick", Qt), o.push(g), k(s, { width: g.width, height: 2 * (g.height || 0) }), i.hasLoaded) g.align(s, !1, s.alignTo);
537
- else {
538
- let m = L(i, "load", () => {
539
- g.element && g.align(s, !1, s.alignTo), m();
540
- });
541
- }
542
- }), i.hasLoaded || L(i, "render", function() {
543
- let s = i.exporting?.group?.getBBox();
544
- if (s) {
545
- let l = e.navButtonsGroup.getBBox();
546
- if (!(l.x >= s.x + s.width || l.x + l.width <= s.x || l.y >= s.y + s.height || l.y + l.height <= s.y)) {
547
- let h = -l.y - l.height + s.y - 5, p = s.y + s.height - l.y + 5, d = n.buttonOptions && n.buttonOptions.verticalAlign;
548
- e.navButtonsGroup.attr({ translateY: d === "bottom" ? h : p });
549
- }
550
- }
551
- })), this.updateEvents(n);
552
- }
553
- updateEvents(t) {
554
- let e = this.chart;
555
- C(t.enableDoubleClickZoom, t.enabled) || t.enableDoubleClickZoomTo ? this.unbindDblClick = this.unbindDblClick || L(e.container, "dblclick", function(i) {
556
- e.pointer.onContainerDblClick(i);
557
- }) : this.unbindDblClick && (this.unbindDblClick = this.unbindDblClick()), C(t.enableMouseWheelZoom, t.enabled) ? this.unbindMouseWheel = this.unbindMouseWheel || L(e.container, "wheel", function(i) {
558
- if (!e.pointer.inClass(i.target, "highcharts-no-mousewheel")) {
559
- let o = e.mapView?.zoom;
560
- e.pointer.onContainerMouseWheel(i), o !== e.mapView?.zoom && Qt(i);
561
- }
562
- return !1;
563
- }) : this.unbindMouseWheel && (this.unbindMouseWheel = this.unbindMouseWheel());
564
- }
565
- }
566
- var Mi = T(28), vi = T.n(Mi);
567
- let { column: { prototype: wi } } = D().seriesTypes;
568
- var te = Wt || (Wt = {});
569
- function Ci(a) {
570
- let t = this.series, e = t.chart.renderer;
571
- this.moveToTopOnHover && this.graphic && (t.stateMarkerGraphic || (t.stateMarkerGraphic = new (vi())(e, "use").css({ pointerEvents: "none" }).add(this.graphic.parentGroup)), a?.state === "hover" ? (this.graphic.attr({ id: this.id }), t.stateMarkerGraphic.attr({ href: `${e.url}#${this.id}`, visibility: "visible" })) : t.stateMarkerGraphic.attr({ href: "" }));
572
- }
573
- te.pointMembers = { dataLabelOnNull: !0, moveToTopOnHover: !0, isValid: function() {
574
- return this.value !== null && this.value !== 1 / 0 && this.value !== -1 / 0 && (this.value === void 0 || !isNaN(this.value));
575
- } }, te.seriesMembers = { colorKey: "value", axisTypes: ["xAxis", "yAxis", "colorAxis"], parallelArrays: ["x", "y", "value"], pointArrayMap: ["value"], trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], colorAttribs: function(a) {
576
- let t = {};
577
- return N(a.color) && (!a.state || a.state === "normal") && (t[this.colorProp || "fill"] = a.color), t;
578
- }, pointAttribs: wi.pointAttribs }, te.compose = function(a) {
579
- return L(a.prototype.pointClass, "afterSetState", Ci), a;
580
- };
581
- let X = Wt;
582
- var Pi = T(820), Ti = T.n(Pi);
583
- let { deg2rad: ve } = z();
584
- (pe = Zt || (Zt = {})).getCenter = function() {
585
- let a = this.options, t = this.chart, e = 2 * (a.slicedOffset || 0), i = t.plotWidth - 2 * e, o = t.plotHeight - 2 * e, r = a.center, n = Math.min(i, o), s = a.thickness, l, h = a.size, p = a.innerSize || 0, d, c;
586
- typeof h == "string" && (h = parseFloat(h)), typeof p == "string" && (p = parseFloat(p));
587
- let u = [C(r?.[0], "50%"), C(r?.[1], "50%"), C(h && h < 0 ? void 0 : a.size, "100%"), C(p && p < 0 ? void 0 : a.innerSize || 0, "0%")];
588
- for (!t.angular || this instanceof Ti() || (u[3] = 0), d = 0; d < 4; ++d) c = u[d], l = d < 2 || d === 2 && /%$/.test(c), u[d] = Y(c, [i, o, n, u[2]][d]) + (l ? e : 0);
589
- return u[3] > u[2] && (u[3] = u[2]), M(s) && 2 * s < u[2] && s > 0 && (u[3] = u[2] - 2 * s), H(this, "afterGetCenter", { positions: u }), u;
590
- }, pe.getStartAndEndRadians = function(a, t) {
591
- let e = M(a) ? a : 0, i = M(t) && t > e && t - e < 360 ? t : e + 360;
592
- return { start: ve * (e + -90), end: ve * (i + -90) };
593
- };
594
- let Li = Zt;
595
- var Ai = T(960), ji = T.n(Ai), zi = T(540), ee = T.n(zi);
596
- let { getOptions: ki } = z();
597
- class ie extends ji() {
598
- init(t, e) {
599
- let i = ki().credits, o = P({ chart: { panning: { enabled: !0, type: "xy" }, type: "map" }, credits: { mapText: C(i.mapText, ' © <a href="{geojson.copyrightUrl}">{geojson.copyrightShort}</a>'), mapTextFull: C(i.mapTextFull, "{geojson.copyright}") }, mapView: {}, tooltip: { followTouchMove: !1 } }, t);
600
- super.init(o, e);
601
- }
602
- mapZoom(t, e, i, o, r) {
603
- this.mapView && (M(t) && (t = Math.log(t) / Math.log(0.5)), this.mapView.zoomBy(t, M(e) && M(i) ? this.mapView.projection.inverse([e, i]) : void 0, M(o) && M(r) ? [o, r] : void 0));
604
- }
605
- update(t) {
606
- t.chart && "map" in t.chart && this.mapView?.recommendMapView(this, [t.chart.map, ...(this.options.series || []).map((e) => e.mapData)], !0), super.update.apply(this, arguments);
607
- }
608
- }
609
- (wt = ie || (ie = {})).maps = {}, wt.mapChart = function(a, t, e) {
610
- return new wt(a, t, e);
611
- }, wt.splitPath = function(a) {
612
- let t;
613
- return t = typeof a == "string" ? (a = a.replace(/([A-Z])/gi, " $1 ").replace(/^\s*/, "").replace(/\s*$/, "")).split(/[ ,;]+/).map((e) => /[A-Z]/i.test(e) ? e : parseFloat(e)) : a, ee().prototype.pathToSegments(t);
614
- };
615
- let jt = ie, we = { boundsFromPath: function(a) {
616
- let t = -Number.MAX_VALUE, e = Number.MAX_VALUE, i = -Number.MAX_VALUE, o = Number.MAX_VALUE, r;
617
- if (a.forEach((n) => {
618
- let s = n[n.length - 2], l = n[n.length - 1];
619
- typeof s == "number" && typeof l == "number" && (e = Math.min(e, s), t = Math.max(t, s), o = Math.min(o, l), i = Math.max(i, l), r = !0);
620
- }), r) return { x1: e, y1: o, x2: t, y2: i };
621
- } }, { boundsFromPath: Si } = we, Ii = D().seriesTypes.scatter.prototype.pointClass;
622
- class it extends Ii {
623
- static getProjectedPath(t, e) {
624
- return t.projectedPath || (e && t.geometry ? (e.hasCoordinates = !0, t.projectedPath = e.path(t.geometry)) : t.projectedPath = t.path), t.projectedPath || [];
625
- }
626
- applyOptions(t, e) {
627
- let i = this.series, o = super.applyOptions(t, e), r = i.joinBy;
628
- if (i.mapData && i.mapMap) {
629
- let n = r[1], s = super.getNestedProperty(n), l = s !== void 0 && i.mapMap[s];
630
- l ? k(o, { ...l, name: o.name ?? l.name }) : i.pointArrayMap.indexOf("value") !== -1 && (o.value = o.value || null);
631
- }
632
- return o;
633
- }
634
- getProjectedBounds(t) {
635
- let e = Si(it.getProjectedPath(this, t)), i = this.properties, o = this.series.chart.mapView;
636
- if (e) {
637
- let r = i?.["hc-middle-lon"], n = i?.["hc-middle-lat"];
638
- if (o && M(r) && M(n)) {
639
- let s = t.forward([r, n]);
640
- e.midX = s[0], e.midY = s[1];
641
- } else {
642
- let s = i?.["hc-middle-x"], l = i?.["hc-middle-y"];
643
- e.midX = e.x1 + (e.x2 - e.x1) * C(this.middleX, M(s) ? s : 0.5);
644
- let h = C(this.middleY, M(l) ? l : 0.5);
645
- this.geometry || (h = 1 - h), e.midY = e.y2 - (e.y2 - e.y1) * h;
646
- }
647
- return e;
648
- }
649
- }
650
- onMouseOver(t) {
651
- xe(this.colorInterval), !this.isNull && this.visible || this.series.options.nullInteraction ? super.onMouseOver.call(this, t) : this.series.onMouseOut();
652
- }
653
- setVisible(t) {
654
- this.visible = this.options.visible = !!t, this.dataLabel && this.dataLabel[t ? "show" : "hide"](), this.graphic && this.graphic.attr(this.series.pointAttribs(this));
655
- }
656
- zoomTo(t) {
657
- let e = this.series.chart, i = e.mapView, o = this.bounds;
658
- if (i && o) {
659
- let r = M(this.insetIndex) && i.insets[this.insetIndex];
660
- if (r) {
661
- let n = r.projectedUnitsToPixels({ x: o.x1, y: o.y1 }), s = r.projectedUnitsToPixels({ x: o.x2, y: o.y2 }), l = i.pixelsToProjectedUnits({ x: n.x, y: n.y }), h = i.pixelsToProjectedUnits({ x: s.x, y: s.y });
662
- o = { x1: l.x, y1: l.y, x2: h.x, y2: h.y };
663
- }
664
- i.fitToBounds(o, void 0, !1), this.series.isDirty = !0, e.redraw(t);
665
- }
666
- }
667
- }
668
- k(it.prototype, { dataLabelOnNull: X.pointMembers.dataLabelOnNull, moveToTopOnHover: X.pointMembers.moveToTopOnHover, isValid: X.pointMembers.isValid });
669
- let Ei = { center: [0, 0], fitToGeometry: void 0, maxZoom: void 0, padding: 0, projection: { name: void 0, parallels: void 0, rotation: void 0 }, zoom: void 0, insetOptions: { borderColor: "#cccccc", borderWidth: 1, padding: "10%", relativeTo: "mapBoundingBox", units: "percent" } };
670
- var Oi = T(984), Ce = T.n(Oi);
671
- let { win: Pe } = z(), { format: Te } = Ce();
672
- (function(a) {
673
- function t(s) {
674
- return this.mapView?.lonLatToProjectedUnits(s);
675
- }
676
- function e(s) {
677
- return this.mapView?.projectedUnitsToLonLat(s);
678
- }
679
- function i(s, l) {
680
- let h = this.options.chart.proj4 || Pe.proj4;
681
- if (!h) return void (0, _t.error)(21, !1, this);
682
- let { jsonmarginX: p = 0, jsonmarginY: d = 0, jsonres: c = 1, scale: u = 1, xoffset: g = 0, xpan: m = 0, yoffset: f = 0, ypan: y = 0 } = l, b = h(l.crs, [s.lon, s.lat]), x = l.cosAngle || l.rotation && Math.cos(l.rotation), v = l.sinAngle || l.rotation && Math.sin(l.rotation), w = l.rotation ? [b[0] * x + b[1] * v, -b[0] * v + b[1] * x] : b;
683
- return { x: ((w[0] - g) * u + m) * c + p, y: -(((f - w[1]) * u + y) * c - d) };
684
- }
685
- function o(s, l) {
686
- let h = this.options.chart.proj4 || Pe.proj4;
687
- if (!h) return void (0, _t.error)(21, !1, this);
688
- if (s.y === null) return;
689
- let { jsonmarginX: p = 0, jsonmarginY: d = 0, jsonres: c = 1, scale: u = 1, xoffset: g = 0, xpan: m = 0, yoffset: f = 0, ypan: y = 0 } = l, b = { x: ((s.x - p) / c - m) / u + g, y: ((s.y - d) / c + y) / u + f }, x = l.cosAngle || l.rotation && Math.cos(l.rotation), v = l.sinAngle || l.rotation && Math.sin(l.rotation), w = h(l.crs, "WGS84", l.rotation ? { x: b.x * x + -(b.y * v), y: b.x * v + b.y * x } : b);
690
- return { lat: w.y, lon: w.x };
691
- }
692
- function r(s, l) {
693
- l || (l = Object.keys(s.objects)[0]);
694
- let h = s.objects[l];
695
- if (h["hc-decoded-geojson"] && h["hc-decoded-geojson"].title === s.title) return h["hc-decoded-geojson"];
696
- let p = s.arcs;
697
- if (s.transform) {
698
- let m, f, y, b = s.arcs, { scale: x, translate: v } = s.transform;
699
- p = [];
700
- for (let w = 0, A = b.length; w < A; ++w) {
701
- let E = b[w];
702
- p.push(m = []), f = 0, y = 0;
703
- for (let S = 0, j = E.length; S < j; ++S) m.push([(f += E[S][0]) * x[0] + v[0], (y += E[S][1]) * x[1] + v[1]]);
704
- }
705
- }
706
- let d = (m) => typeof m[0] == "number" ? m.reduce((f, y, b) => {
707
- let x = y < 0 ? p[~y] : p[y];
708
- return y < 0 ? (x = x.slice(0, b === 0 ? x.length : x.length - 1)).reverse() : b && (x = x.slice(1)), f.concat(x);
709
- }, []) : m.map(d), c = h.geometries, u = [];
710
- for (let m = 0, f = c.length; m < f; ++m) u.push({ type: "Feature", properties: c[m].properties, geometry: { type: c[m].type, coordinates: c[m].coordinates || d(c[m].arcs) } });
711
- let g = { type: "FeatureCollection", copyright: s.copyright, copyrightShort: s.copyrightShort, copyrightUrl: s.copyrightUrl, features: u, "hc-recommended-mapview": h["hc-recommended-mapview"], bbox: s.bbox, title: s.title };
712
- return h["hc-decoded-geojson"] = g, g;
713
- }
714
- function n(s, l) {
715
- l = P(!0, this.options.credits, l), s.call(this, l), this.credits && this.mapCreditsFull && this.credits.attr({ title: this.mapCreditsFull });
716
- }
717
- a.compose = function(s) {
718
- let l = s.prototype;
719
- l.transformFromLatLon || (l.fromLatLonToPoint = t, l.fromPointToLatLon = e, l.transformFromLatLon = i, l.transformToLatLon = o, Tt(l, "addCredits", n));
720
- }, a.geojson = function(s, l = "map", h) {
721
- let p = [], d = s.type === "Topology" ? r(s) : s, c = d.features;
722
- for (let u = 0, g = c.length; u < g; ++u) {
723
- let m, f = c[u], y = f.geometry || {}, b = y.type, x = y.coordinates, v = f.properties;
724
- if ((l === "map" || l === "mapbubble") && (b === "Polygon" || b === "MultiPolygon") || l === "mapline" && (b === "LineString" || b === "MultiLineString") ? x.length && (m = { geometry: { coordinates: x, type: b } }) : l === "mappoint" && b === "Point" && x.length && (m = { geometry: { coordinates: x, type: b } }), m) {
725
- let w = v && (v.name || v.NAME), A = v && v.lon, E = v && v.lat;
726
- p.push(k(m, { lat: typeof E == "number" ? E : void 0, lon: typeof A == "number" ? A : void 0, name: typeof w == "string" ? w : void 0, properties: v }));
727
- }
728
- }
729
- return h && d.copyrightShort && (h.chart.mapCredits = Te(h.chart.options.credits?.mapText, { geojson: d }), h.chart.mapCreditsFull = Te(h.chart.options.credits?.mapTextFull, { geojson: d })), p;
730
- }, a.topo2geo = r;
731
- })(Ut || (Ut = {}));
732
- let zt = Ut;
733
- (Ct = Ht || (Ht = {})).getCenterOfPoints = function(a) {
734
- let t = a.reduce((e, i) => (e.x += i.x, e.y += i.y, e), { x: 0, y: 0 });
735
- return { x: t.x / a.length, y: t.y / a.length };
736
- }, Ct.getDistanceBetweenPoints = function(a, t) {
737
- return Math.sqrt(Math.pow(t.x - a.x, 2) + Math.pow(t.y - a.y, 2));
738
- }, Ct.getAngleBetweenPoints = function(a, t) {
739
- return Math.atan2(t.x - a.x, t.y - a.y);
740
- }, Ct.pointInPolygon = function({ x: a, y: t }, e) {
741
- let i = e.length, o, r, n = !1;
742
- for (o = 0, r = i - 1; o < i; r = o++) {
743
- let [s, l] = e[o], [h, p] = e[r];
744
- l > t != p > t && a < (h - s) * (t - l) / (p - l) + s && (n = !n);
745
- }
746
- return n;
747
- };
748
- let Bi = Ht;
749
- function Le(a, t, e = !0) {
750
- let i = t[t.length - 1], o, r, n, s = a;
751
- for (let l = 0; l < t.length; l++) {
752
- let h = s;
753
- o = t[l], s = [], r = e ? h[h.length - 1] : h[0];
754
- for (let p = 0; p < h.length; p++) oe(i, o, n = h[p]) ? (oe(i, o, r) || s.push(Ae(i, o, r, n)), s.push(n)) : oe(i, o, r) && s.push(Ae(i, o, r, n)), r = n;
755
- i = o;
756
- }
757
- return s;
758
- }
759
- function oe(a, t, e) {
760
- return (t[0] - a[0]) * (e[1] - a[1]) > (t[1] - a[1]) * (e[0] - a[0]);
761
- }
762
- function Ae(a, t, e, i) {
763
- let o = [a[0] - t[0], a[1] - t[1]], r = [e[0] - i[0], e[1] - i[1]], n = a[0] * t[1] - a[1] * t[0], s = e[0] * i[1] - e[1] * i[0], l = 1 / (o[0] * r[1] - o[1] * r[0]), h = [(n * r[0] - s * o[0]) * l, (n * r[1] - s * o[1]) * l];
764
- return h.isIntersection = !0, h;
765
- }
766
- let pt = Math.sign || ((a) => a === 0 ? 0 : a > 0 ? 1 : -1), dt = Math.PI / 180, ot = Math.PI / 2, kt = (a) => Math.tan((ot + a) / 2), Di = class {
767
- constructor(a) {
768
- const t = (a.parallels || []).map((n) => n * dt), e = t[0] || 0, i = t[1] ?? e, o = Math.cos(e);
769
- typeof a.projectedBounds == "object" && (this.projectedBounds = a.projectedBounds);
770
- let r = e === i ? Math.sin(e) : Math.log(o / Math.cos(i)) / Math.log(kt(i) / kt(e));
771
- 1e-10 > Math.abs(r) && (r = 1e-10 * (pt(r) || 1)), this.n = r, this.c = o * Math.pow(kt(e), r) / r;
772
- }
773
- forward(a) {
774
- let { c: t, n: e, projectedBounds: i } = this, o = a[0] * dt, r = a[1] * dt;
775
- t > 0 ? r < -ot + 1e-6 && (r = -ot + 1e-6) : r > ot - 1e-6 && (r = ot - 1e-6);
776
- let n = t / Math.pow(kt(r), e), s = n * Math.sin(e * o) * 63.78137, l = (t - n * Math.cos(e * o)) * 63.78137, h = [s, l];
777
- return i && (s < i.x1 || s > i.x2 || l < i.y1 || l > i.y2) && (h.outside = !0), h;
778
- }
779
- inverse(a) {
780
- let { c: t, n: e } = this, i = a[0] / 63.78137, o = t - a[1] / 63.78137, r = pt(e) * Math.sqrt(i * i + o * o), n = Math.atan2(i, Math.abs(o)) * pt(o);
781
- return o * e < 0 && (n -= Math.PI * pt(i) * pt(o)), [n / e / dt, (2 * Math.atan(Math.pow(t / r, 1 / e)) - ot) / dt];
782
- }
783
- }, St = Math.sqrt(3) / 2, Vi = class {
784
- constructor() {
785
- this.bounds = { x1: -200.37508342789243, x2: 200.37508342789243, y1: -97.52595454902263, y2: 97.52595454902263 };
786
- }
787
- forward(a) {
788
- let t = Math.PI / 180, e = Math.asin(St * Math.sin(a[1] * t)), i = e * e, o = i * i * i;
789
- return [a[0] * t * Math.cos(e) * 74.03120656864502 / (St * (1.340264 + -0.24331799999999998 * i + o * (0.0062510000000000005 + 0.034164 * i))), 74.03120656864502 * e * (1.340264 + -0.081106 * i + o * (893e-6 + 3796e-6 * i))];
790
- }
791
- inverse(a) {
792
- let t = a[0] / 74.03120656864502, e = a[1] / 74.03120656864502, i = 180 / Math.PI, o = e, r, n, s, l;
793
- for (let d = 0; d < 12 && (n = (r = o * o) * r * r, s = o * (1.340264 + -0.081106 * r + n * (893e-6 + 3796e-6 * r)) - e, o -= l = s / (1.340264 + -0.24331799999999998 * r + n * (0.0062510000000000005 + 0.034164 * r)), !(1e-9 > Math.abs(l))); ++d) ;
794
- n = (r = o * o) * r * r;
795
- let h = i * St * t * (1.340264 + -0.24331799999999998 * r + n * (0.0062510000000000005 + 0.034164 * r)) / Math.cos(o), p = i * Math.asin(Math.sin(o) / St);
796
- return Math.abs(h) > 180 ? [NaN, NaN] : [h, p];
797
- }
798
- }, je = Math.PI / 4, It = Math.PI / 180, Xi = class {
799
- constructor() {
800
- this.bounds = { x1: -200.37508342789243, x2: 200.37508342789243, y1: -146.91480769173063, y2: 146.91480769173063 };
801
- }
802
- forward(a) {
803
- return [a[0] * It * 63.78137, 79.7267125 * Math.log(Math.tan(je + 0.4 * a[1] * It))];
804
- }
805
- inverse(a) {
806
- return [a[0] / 63.78137 / It, 2.5 * (Math.atan(Math.exp(0.8 * (a[1] / 63.78137))) - je) / It];
807
- }
808
- }, Et = Math.PI / 180, Ri = class {
809
- constructor() {
810
- this.antimeridianCutting = !1, this.bounds = { x1: -63.78460826781007, x2: 63.78460826781007, y1: -63.78460826781007, y2: 63.78460826781007 };
811
- }
812
- forward(a) {
813
- let t = a[0], e = a[1] * Et, i = [Math.cos(e) * Math.sin(t * Et) * 63.78460826781007, 63.78460826781007 * Math.sin(e)];
814
- return (t < -90 || t > 90) && (i.outside = !0), i;
815
- }
816
- inverse(a) {
817
- let t = a[0] / 63.78460826781007, e = a[1] / 63.78460826781007, i = Math.sqrt(t * t + e * e), o = Math.asin(i), r = Math.sin(o);
818
- return [Math.atan2(t * r, i * Math.cos(o)) / Et, Math.asin(i && e * r / i) / Et];
819
- }
820
- }, Ot = Math.PI / 180, Ni = class {
821
- constructor() {
822
- this.bounds = { x1: -200.37508342789243, x2: 200.37508342789243, y1: -200.3750834278071, y2: 200.3750834278071 }, this.maxLatitude = 85.0511287798;
823
- }
824
- forward(a) {
825
- let t = Math.sin(a[1] * Ot), e = [63.78137 * a[0] * Ot, 63.78137 * Math.log((1 + t) / (1 - t)) / 2];
826
- return Math.abs(a[1]) > this.maxLatitude && (e.outside = !0), e;
827
- }
828
- inverse(a) {
829
- return [a[0] / (63.78137 * Ot), (2 * Math.atan(Math.exp(a[1] / 63.78137)) - Math.PI / 2) / Ot];
830
- }
831
- }, { clipLineString: Yi, clipPolygon: Gi } = { clipLineString: function(a, t) {
832
- let e = [], i = Le(a, t, !1);
833
- for (let o = 1; o < i.length; o++) i[o].isIntersection && i[o - 1].isIntersection && (e.push(i.splice(0, o)), o = 0), o === i.length - 1 && e.push(i);
834
- return e;
835
- }, clipPolygon: Le }, O = 2 * Math.PI / 360, st = (a) => (a < -180 && (a += 360), a > 180 && (a -= 360), a), ze = (a) => (1 - Math.cos(a)) / 2;
836
- class R {
837
- static add(t, e) {
838
- R.registry[t] = e;
839
- }
840
- static distance(t, e) {
841
- let i, o, r, n, s, { atan2: l, sqrt: h } = Math, p = (i = Math.cos, o = t[1] * O, r = t[0] * O, n = e[1] * O, s = e[0] * O, ze(n - o) + i(o) * i(n) * ze(s - r));
842
- return 6371e3 * (2 * l(h(p), h(1 - p)));
843
- }
844
- static geodesic(t, e, i, o = 5e5) {
845
- let { atan2: r, cos: n, sin: s, sqrt: l } = Math, h = R.distance, p = t[1] * O, d = t[0] * O, c = e[1] * O, u = e[0] * O, g = n(p) * n(d), m = n(c) * n(u), f = n(p) * s(d), y = n(c) * s(u), b = s(p), x = s(c), v = h(t, e), w = v / 6371e3, A = s(w), E = Math.round(v / o), S = [];
846
- if (i && S.push(t), E > 1) {
847
- let j = 1 / E;
848
- for (let B = j; B < 0.999; B += j) {
849
- let F = s((1 - B) * w) / A, U = s(B * w) / A, gt = F * g + U * m, yt = F * f + U * y, bt = r(F * b + U * x, l(gt * gt + yt * yt)), xt = r(yt, gt);
850
- S.push([xt / O, bt / O]);
851
- }
852
- }
853
- return i && S.push(e), S;
854
- }
855
- static insertGeodesics(t) {
856
- let e = t.length - 1;
857
- for (; e--; ) if (Math.max(Math.abs(t[e][0] - t[e + 1][0]), Math.abs(t[e][1] - t[e + 1][1])) > 10) {
858
- let i = R.geodesic(t[e], t[e + 1]);
859
- i.length && t.splice(e + 1, 0, ...i);
860
- }
861
- }
862
- static toString(t) {
863
- let { name: e, rotation: i } = t || {};
864
- return [e, i && i.join(",")].join(";");
865
- }
866
- constructor(t = {}) {
867
- this.hasCoordinates = !1, this.hasGeoProjection = !1, this.maxLatitude = 90, this.options = t;
868
- const { name: e, projectedBounds: i, rotation: o } = t;
869
- this.rotator = o ? this.getRotator(o) : void 0;
870
- const r = e ? R.registry[e] : void 0;
871
- r && (this.def = new r(t));
872
- const { def: n, rotator: s } = this;
873
- n && (this.maxLatitude = n.maxLatitude || 90, this.hasGeoProjection = !0), s && n ? (this.forward = (l) => n.forward(s.forward(l)), this.inverse = (l) => s.inverse(n.inverse(l))) : n ? (this.forward = (l) => n.forward(l), this.inverse = (l) => n.inverse(l)) : s && (this.forward = s.forward, this.inverse = s.inverse), this.bounds = i === "world" ? n && n.bounds : i;
874
- }
875
- lineIntersectsBounds(t) {
876
- let { x1: e, x2: i, y1: o, y2: r } = this.bounds || {}, n = (h, p, d) => {
877
- let [c, u] = h, g = +!p;
878
- if (typeof d == "number" && c[p] >= d != u[p] >= d) {
879
- let m = (d - c[p]) / (u[p] - c[p]), f = c[g] + m * (u[g] - c[g]);
880
- return p ? [f, d] : [d, f];
881
- }
882
- }, s, l = t[0];
883
- return ((s = n(t, 0, e)) || (s = n(t, 0, i))) && (l = s, t[1] = s), ((s = n(t, 1, o)) || (s = n(t, 1, r))) && (l = s), l;
884
- }
885
- getRotator(t) {
886
- let e = t[0] * O, i = (t[1] || 0) * O, o = (t[2] || 0) * O, r = Math.cos(i), n = Math.sin(i), s = Math.cos(o), l = Math.sin(o);
887
- if (e !== 0 || i !== 0 || o !== 0) return { forward: (h) => {
888
- let p = h[0] * O + e, d = h[1] * O, c = Math.cos(d), u = Math.cos(p) * c, g = Math.sin(p) * c, m = Math.sin(d), f = m * r + u * n;
889
- return [Math.atan2(g * s - f * l, u * r - m * n) / O, Math.asin(f * s + g * l) / O];
890
- }, inverse: (h) => {
891
- let p = h[0] * O, d = h[1] * O, c = Math.cos(d), u = Math.cos(p) * c, g = Math.sin(p) * c, m = Math.sin(d), f = m * s - g * l;
892
- return [(Math.atan2(g * s + m * l, u * r + f * n) - e) / O, Math.asin(f * r - u * n) / O];
893
- } };
894
- }
895
- forward(t) {
896
- return t;
897
- }
898
- inverse(t) {
899
- return t;
900
- }
901
- cutOnAntimeridian(t, e) {
902
- let i, o = [], r = [t];
903
- for (let s = 0, l = t.length; s < l; ++s) {
904
- let h = t[s], p = t[s - 1];
905
- if (!s) {
906
- if (!e) continue;
907
- p = t[t.length - 1];
908
- }
909
- let d = p[0], c = h[0];
910
- if ((d < -90 || d > 90) && (c < -90 || c > 90) && d > 0 != c > 0) {
911
- let u = q((180 - (d + 360) % 360) / ((c + 360) % 360 - (d + 360) % 360), 0, 1), g = p[1] + u * (h[1] - p[1]);
912
- o.push({ i: s, lat: g, direction: d < 0 ? 1 : -1, previousLonLat: p, lonLat: h });
913
- }
914
- }
915
- if (o.length) if (e) {
916
- if (o.length % 2 == 1) {
917
- var n = i = o.slice().sort((h, p) => Math.abs(p.lat) - Math.abs(h.lat))[0];
918
- let l = o.length;
919
- for (; l--; ) if (o[l] === n) {
920
- o.splice(l, 1);
921
- break;
922
- }
923
- }
924
- let s = o.length - 2;
925
- for (; s >= 0; ) {
926
- let l = o[s].i, h = st(180 + 1e-6 * o[s].direction), p = st(180 - 1e-6 * o[s].direction), d = t.splice(l, o[s + 1].i - l, ...R.geodesic([h, o[s].lat], [h, o[s + 1].lat], !0));
927
- d.push(...R.geodesic([p, o[s + 1].lat], [p, o[s].lat], !0)), r.push(d), s -= 2;
928
- }
929
- if (i) for (let l = 0; l < r.length; l++) {
930
- let { direction: h, lat: p } = i, d = r[l], c = d.indexOf(i.lonLat);
931
- if (c > -1) {
932
- let u = (p < 0 ? -1 : 1) * this.maxLatitude, g = st(180 + 1e-6 * h), m = st(180 - 1e-6 * h), f = R.geodesic([g, p], [g, u], !0);
933
- for (let y = g + 120 * h; y > -180 && y < 180; y += 120 * h) f.push([y, u]);
934
- f.push(...R.geodesic([m, u], [m, i.lat], !0)), d.splice(c, 0, ...f);
935
- break;
936
- }
937
- }
938
- } else {
939
- let s = o.length;
940
- for (; s--; ) {
941
- let l = o[s].i, h = t.splice(l, t.length, [st(180 + 1e-6 * o[s].direction), o[s].lat]);
942
- h.unshift([st(180 - 1e-6 * o[s].direction), o[s].lat]), r.push(h);
943
- }
944
- }
945
- return r;
946
- }
947
- path(t) {
948
- let e, { bounds: i, def: o, rotator: r } = this, n = [], s = t.type === "Polygon" || t.type === "MultiPolygon", l = this.hasGeoProjection, h = !o || o.antimeridianCutting !== !1, p = h ? r : void 0, d = h && o || this;
949
- i && (e = [[i.x1, i.y1], [i.x2, i.y1], [i.x2, i.y2], [i.x1, i.y2]]);
950
- let c = (u) => {
951
- let g = u.map((f) => {
952
- if (h) {
953
- p && (f = p.forward(f));
954
- let y = f[0];
955
- 1e-6 > Math.abs(y - 180) && (y = y < 180 ? 179.999999 : 180.000001), f = [y, f[1]];
956
- }
957
- return f;
958
- }), m = [g];
959
- l && (R.insertGeodesics(g), h && (m = this.cutOnAntimeridian(g, s))), m.forEach((f) => {
960
- let y, b;
961
- if (f.length < 2) return;
962
- let x = !1, v = !1, w = (j) => {
963
- x ? n.push(["L", j[0], j[1]]) : (n.push(["M", j[0], j[1]]), x = !0);
964
- }, A = !1, E = !1, S = f.map((j) => {
965
- let B = d.forward(j);
966
- return B.outside ? A = !0 : E = !0, B[1] === 1 / 0 ? B[1] = 1e10 : B[1] === -1 / 0 && (B[1] = -1e10), B;
967
- });
968
- if (h) {
969
- if (s && S.push(S[0]), A) {
970
- if (!E) return;
971
- if (e) {
972
- if (s) S = Gi(S, e);
973
- else if (i) return void Yi(S, e).forEach((j) => {
974
- x = !1, j.forEach(w);
975
- });
976
- }
977
- }
978
- S.forEach(w);
979
- } else for (let j = 0; j < S.length; j++) {
980
- let B = f[j], F = S[j];
981
- F.outside ? v = !0 : (s && !y && (y = B, f.push(B), S.push(F)), v && b && (s && l ? R.geodesic(b, B).forEach((U) => w(d.forward(U))) : x = !1), w(F), b = B, v = !1);
982
- }
983
- });
984
- };
985
- return t.type === "LineString" ? c(t.coordinates) : t.type === "MultiLineString" ? t.coordinates.forEach((u) => c(u)) : t.type === "Polygon" ? (t.coordinates.forEach((u) => c(u)), n.length && n.push(["Z"])) : t.type === "MultiPolygon" && (t.coordinates.forEach((u) => {
986
- u.forEach((g) => c(g));
987
- }), n.length && n.push(["Z"])), n;
988
- }
989
- }
990
- R.registry = { EqualEarth: Vi, LambertConformalConic: Di, Miller: Xi, Orthographic: Ri, WebMercator: Ni };
991
- let { composed: Fi } = z(), { pointInPolygon: ct } = Bi, { topo2geo: ke } = zt, { boundsFromPath: Se } = we, ut = {};
992
- function Ie(a, t) {
993
- let { width: e, height: i } = t;
994
- return Math.log(400.979322 / Math.max((a.x2 - a.x1) / (e / 256), (a.y2 - a.y1) / (i / 256))) / Math.log(2);
995
- }
996
- function Ee(a) {
997
- a.seriesOptions.mapData && this.mapView?.recommendMapView(this, [this.options.chart.map, a.seriesOptions.mapData], this.options.drilldown?.mapZooming);
998
- }
999
- class W {
1000
- static compose(t) {
1001
- Pt(Fi, "MapView") && (ut = t.maps, L(t, "afterInit", function() {
1002
- this.mapView = new W(this, this.options.mapView);
1003
- }, { order: 0 }), L(t, "addSeriesAsDrilldown", Ee), L(t, "afterDrillUp", Ee));
1004
- }
1005
- static compositeBounds(t) {
1006
- if (t.length) return t.slice(1).reduce((e, i) => (e.x1 = Math.min(e.x1, i.x1), e.y1 = Math.min(e.y1, i.y1), e.x2 = Math.max(e.x2, i.x2), e.y2 = Math.max(e.y2, i.y2), e), P(t[0]));
1007
- }
1008
- static mergeInsets(t, e) {
1009
- let i = (r) => {
1010
- let n = {};
1011
- return r.forEach((s, l) => {
1012
- n[s && s.id || `i${l}`] = s;
1013
- }), n;
1014
- }, o = P(i(t), i(e));
1015
- return Object.keys(o).map((r) => o[r]);
1016
- }
1017
- constructor(t, e) {
1018
- this.allowTransformAnimation = !0, this.eventsToUnbind = [], this.insets = [], this.padding = [0, 0, 0, 0], this.recommendedMapView = {}, this instanceof Oe || this.recommendMapView(t, [t.options.chart.map, ...(t.options.series || []).map((n) => n.mapData)]), this.userOptions = e || {};
1019
- const i = P(Ei, this.recommendedMapView, e), o = this.recommendedMapView?.insets, r = e && e.insets;
1020
- o && r && (i.insets = W.mergeInsets(o, r)), this.chart = t, this.center = i.center, this.options = i, this.projection = new R(i.projection), this.playingField = t.plotBox, this.zoom = i.zoom || 0, this.minZoom = i.minZoom, this.createInsets(), this.eventsToUnbind.push(L(t, "afterSetChartSize", () => {
1021
- this.playingField = this.getField(), (this.minZoom === void 0 || this.minZoom === this.zoom) && (this.fitToBounds(void 0, void 0, !1), !this.chart.hasRendered && M(this.userOptions.zoom) && (this.zoom = this.userOptions.zoom), this.userOptions.center && P(!0, this.center, this.userOptions.center));
1022
- })), this.setUpEvents();
1023
- }
1024
- createInsets() {
1025
- let t = this.options, e = t.insets;
1026
- e && e.forEach((i) => {
1027
- let o = new Oe(this, P(t.insetOptions, i));
1028
- this.insets.push(o);
1029
- });
1030
- }
1031
- fitToBounds(t, e, i = !0, o) {
1032
- let r = t || this.getProjectedBounds();
1033
- if (r) {
1034
- let n = C(e, t ? 0 : this.options.padding), s = this.getField(!1), l = _(n) ? n : [n, n, n, n];
1035
- this.padding = [Y(l[0], s.height), Y(l[1], s.width), Y(l[2], s.height), Y(l[3], s.width)], this.playingField = this.getField();
1036
- let h = Ie(r, this.playingField);
1037
- t || (this.minZoom = h);
1038
- let p = this.projection.inverse([(r.x2 + r.x1) / 2, (r.y2 + r.y1) / 2]);
1039
- this.setView(p, h, i, o);
1040
- }
1041
- }
1042
- getField(t = !0) {
1043
- let e = t ? this.padding : [0, 0, 0, 0];
1044
- return { x: e[3], y: e[0], width: this.chart.plotWidth - e[1] - e[3], height: this.chart.plotHeight - e[0] - e[2] };
1045
- }
1046
- getGeoMap(t) {
1047
- if (typeof t == "string") return ut[t] && ut[t].type === "Topology" ? ke(ut[t]) : ut[t];
1048
- if (et(t, !0)) {
1049
- if (t.type === "FeatureCollection") return t;
1050
- if (t.type === "Topology") return ke(t);
1051
- }
1052
- }
1053
- getMapBBox() {
1054
- let t = this.getProjectedBounds(), e = this.getScale();
1055
- if (t) {
1056
- let i = this.padding, o = this.projectedUnitsToPixels({ x: t.x1, y: t.y2 });
1057
- return { width: (t.x2 - t.x1) * e + i[1] + i[3], height: (t.y2 - t.y1) * e + i[0] + i[2], x: o.x - i[3], y: o.y - i[0] };
1058
- }
1059
- }
1060
- getProjectedBounds() {
1061
- let t = this.projection, e = this.chart.series.reduce((o, r) => {
1062
- let n = r.getProjectedBounds && r.getProjectedBounds();
1063
- return n && r.options.affectsMapView !== !1 && o.push(n), o;
1064
- }, []), i = this.options.fitToGeometry;
1065
- if (i) {
1066
- if (!this.fitToGeometryCache) if (i.type === "MultiPoint") {
1067
- let o = i.coordinates.map((s) => t.forward(s)), r = o.map((s) => s[0]), n = o.map((s) => s[1]);
1068
- this.fitToGeometryCache = { x1: Math.min.apply(0, r), x2: Math.max.apply(0, r), y1: Math.min.apply(0, n), y2: Math.max.apply(0, n) };
1069
- } else this.fitToGeometryCache = Se(t.path(i));
1070
- return this.fitToGeometryCache;
1071
- }
1072
- return this.projection.bounds || W.compositeBounds(e);
1073
- }
1074
- getScale() {
1075
- return 256 / 400.979322 * Math.pow(2, this.zoom);
1076
- }
1077
- getSVGTransform() {
1078
- let { x: t, y: e, width: i, height: o } = this.playingField, r = this.projection.forward(this.center), n = this.projection.hasCoordinates ? -1 : 1, s = this.getScale(), l = s * n, h = t + i / 2 - r[0] * s, p = e + o / 2 - r[1] * l;
1079
- return { scaleX: s, scaleY: l, translateX: h, translateY: p };
1080
- }
1081
- lonLatToPixels(t) {
1082
- let e = this.lonLatToProjectedUnits(t);
1083
- if (e) return this.projectedUnitsToPixels(e);
1084
- }
1085
- lonLatToProjectedUnits(t) {
1086
- let e = this.chart, i = e.mapTransforms;
1087
- if (i) {
1088
- for (let r in i) if (Object.hasOwnProperty.call(i, r) && i[r].hitZone) {
1089
- let n = e.transformFromLatLon(t, i[r]);
1090
- if (n && ct(n, i[r].hitZone.coordinates[0])) return n;
1091
- }
1092
- return e.transformFromLatLon(t, i.default);
1093
- }
1094
- for (let r of this.insets) if (r.options.geoBounds && ct({ x: t.lon, y: t.lat }, r.options.geoBounds.coordinates[0])) {
1095
- let n = r.projection.forward([t.lon, t.lat]), s = r.projectedUnitsToPixels({ x: n[0], y: n[1] });
1096
- return this.pixelsToProjectedUnits(s);
1097
- }
1098
- let o = this.projection.forward([t.lon, t.lat]);
1099
- if (!o.outside) return { x: o[0], y: o[1] };
1100
- }
1101
- pixelsToLonLat(t) {
1102
- return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(t));
1103
- }
1104
- pixelsToProjectedUnits(t) {
1105
- let { x: e, y: i } = t, o = this.getScale(), r = this.projection.forward(this.center), n = this.playingField, s = n.x + n.width / 2, l = n.y + n.height / 2;
1106
- return { x: r[0] + (e - s) / o, y: r[1] - (i - l) / o };
1107
- }
1108
- projectedUnitsToLonLat(t) {
1109
- let e = this.chart, i = e.mapTransforms;
1110
- if (i) {
1111
- for (let n in i) if (Object.hasOwnProperty.call(i, n) && i[n].hitZone && ct(t, i[n].hitZone.coordinates[0])) return e.transformToLatLon(t, i[n]);
1112
- return e.transformToLatLon(t, i.default);
1113
- }
1114
- let o = this.projectedUnitsToPixels(t);
1115
- for (let n of this.insets) if (n.hitZone && ct(o, n.hitZone.coordinates[0])) {
1116
- let s = n.pixelsToProjectedUnits(o), l = n.projection.inverse([s.x, s.y]);
1117
- return { lon: l[0], lat: l[1] };
1118
- }
1119
- let r = this.projection.inverse([t.x, t.y]);
1120
- return { lon: r[0], lat: r[1] };
1121
- }
1122
- projectedUnitsToPixels(t) {
1123
- let e = this.getScale(), i = this.projection.forward(this.center), o = this.playingField, r = o.x + o.width / 2, n = o.y + o.height / 2;
1124
- return { x: r - e * (i[0] - t.x), y: n + e * (i[1] - t.y) };
1125
- }
1126
- recommendMapView(t, e, i = !1) {
1127
- this.recommendedMapView = {};
1128
- let o = e.map((s) => this.getGeoMap(s)), r = [];
1129
- o.forEach((s) => {
1130
- if (s && (Object.keys(this.recommendedMapView).length || (this.recommendedMapView = s["hc-recommended-mapview"] || {}), s.bbox)) {
1131
- let [l, h, p, d] = s.bbox;
1132
- r.push({ x1: l, y1: h, x2: p, y2: d });
1133
- }
1134
- });
1135
- let n = r.length && W.compositeBounds(r);
1136
- H(this, "onRecommendMapView", { geoBounds: n, chart: t }, function() {
1137
- if (n && this.recommendedMapView) {
1138
- if (!this.recommendedMapView.projection) {
1139
- let { x1: s, y1: l, x2: h, y2: p } = n;
1140
- this.recommendedMapView.projection = h - s > 180 && p - l > 90 ? { name: "EqualEarth", parallels: [0, 0], rotation: [0] } : { name: "LambertConformalConic", parallels: [l, p], rotation: [-(s + h) / 2] };
1141
- }
1142
- this.recommendedMapView.insets || (this.recommendedMapView.insets = void 0);
1143
- }
1144
- }), this.geoMap = o[0], i && t.hasRendered && !t.userOptions.mapView?.projection && this.recommendedMapView && this.update(this.recommendedMapView);
1145
- }
1146
- redraw(t) {
1147
- this.chart.series.forEach((e) => {
1148
- e.useMapGeometry && (e.isDirty = !0);
1149
- }), this.chart.redraw(t);
1150
- }
1151
- setView(t, e, i = !0, o) {
1152
- t && (this.center = t), typeof e == "number" && (typeof this.minZoom == "number" && (e = Math.max(e, this.minZoom)), typeof this.options.maxZoom == "number" && (e = Math.min(e, this.options.maxZoom)), M(e) && (this.zoom = e));
1153
- let r = this.getProjectedBounds();
1154
- if (r) {
1155
- let n = this.projection.forward(this.center), { x: s, y: l, width: h, height: p } = this.playingField, d = this.getScale(), c = this.projectedUnitsToPixels({ x: r.x1, y: r.y1 }), u = this.projectedUnitsToPixels({ x: r.x2, y: r.y2 }), g = [(r.x1 + r.x2) / 2, (r.y1 + r.y2) / 2];
1156
- if (!this.chart.series.some((m) => m.isDrilling)) {
1157
- let m = c.x, f = u.y, y = u.x, b = c.y;
1158
- y - m < h ? n[0] = g[0] : m < s && y < s + h ? n[0] += Math.max(m - s, y - h - s) / d : y > s + h && m > s && (n[0] += Math.min(y - h - s, m - s) / d), b - f < p ? n[1] = g[1] : f < l && b < l + p ? n[1] -= Math.max(f - l, b - p - l) / d : b > l + p && f > l && (n[1] -= Math.min(b - p - l, f - l) / d), this.center = this.projection.inverse(n);
1159
- }
1160
- this.insets.forEach((m) => {
1161
- m.options.field && (m.hitZone = m.getHitZone(), m.playingField = m.getField());
1162
- }), this.render();
1163
- }
1164
- H(this, "afterSetView"), i && this.redraw(o);
1165
- }
1166
- setUpEvents() {
1167
- let t, e, i, { chart: o } = this, r = (n) => {
1168
- let { lastTouches: s, pinchDown: l } = o.pointer, h = this.projection, p = n.touches, { mouseDownX: d, mouseDownY: c } = o, u = 0;
1169
- if (l?.length === 1 ? (d = l[0].chartX, c = l[0].chartY) : l?.length === 2 && (d = (l[0].chartX + l[1].chartX) / 2, c = (l[0].chartY + l[1].chartY) / 2), p?.length === 2 && s && (u = Math.log(Math.sqrt(Math.pow(s[0].chartX - s[1].chartX, 2) + Math.pow(s[0].chartY - s[1].chartY, 2)) / Math.sqrt(Math.pow(p[0].chartX - p[1].chartX, 2) + Math.pow(p[0].chartY - p[1].chartY, 2))) / Math.log(0.5)), M(d) && M(c)) {
1170
- let g = `${d},${c}`, { chartX: m, chartY: f } = n.originalEvent;
1171
- p?.length === 2 && (m = (p[0].chartX + p[1].chartX) / 2, f = (p[0].chartY + p[1].chartY) / 2), g !== e && (e = g, t = this.projection.forward(this.center), i = (this.projection.options.rotation || [0, 0]).slice());
1172
- let y = h.def && h.def.bounds, b = y && Ie(y, this.playingField) || -1 / 0;
1173
- if (h.options.name === "Orthographic" && 2 > (p?.length || 0) && (this.minZoom || 1 / 0) < 1.3 * b) {
1174
- let x = 440 / (this.getScale() * Math.min(o.plotWidth, o.plotHeight));
1175
- if (i) {
1176
- let v = (d - m) * x - i[0], w = q(-i[1] - (c - f) * x, -80, 80), A = this.zoom;
1177
- this.update({ projection: { rotation: [-v, -w] } }, !1), this.fitToBounds(void 0, void 0, !1), this.zoom = A, o.redraw(!1);
1178
- }
1179
- } else if (M(m) && M(f)) {
1180
- let x = this.getScale(), v = this.projection.hasCoordinates ? 1 : -1, w = this.projection.inverse([t[0] + (d - m) / x, t[1] - (c - f) / x * v]);
1181
- isNaN(w[0] + w[1]) || this.zoomBy(u, w, void 0, !1);
1182
- }
1183
- n.preventDefault();
1184
- }
1185
- };
1186
- L(o, "pan", r), L(o, "touchpan", r), L(o, "selection", (n) => {
1187
- if (n.resetSelection) this.zoomBy();
1188
- else {
1189
- let s = n.x - o.plotLeft, l = n.y - o.plotTop, { y: h, x: p } = this.pixelsToProjectedUnits({ x: s, y: l }), { y: d, x: c } = this.pixelsToProjectedUnits({ x: s + n.width, y: l + n.height });
1190
- this.fitToBounds({ x1: p, y1: h, x2: c, y2: d }, void 0, !0, !n.originalEvent.touches && void 0), /^touch/.test(n.originalEvent.type) || o.showResetZoom(), n.preventDefault();
1191
- }
1192
- });
1193
- }
1194
- render() {
1195
- let t = this.chart;
1196
- this.group ? this.groupClipRect && this.groupClipRect.animate(t.plotBox) : (this.groupClipRect = t.renderer.clipRect(t.plotBox), this.group = t.renderer.g("map-view").attr({ zIndex: 4 }).clip(this.groupClipRect).add());
1197
- }
1198
- update(t, e = !0, i) {
1199
- let o = t.projection, r = o && R.toString(o) !== R.toString(this.options.projection), n = !1;
1200
- P(!0, this.userOptions, t), P(!0, this.options, t), "insets" in t && (this.insets.forEach((s) => s.destroy()), this.insets.length = 0, n = !0), (r || "fitToGeometry" in t) && delete this.fitToGeometryCache, (r || n) && (this.chart.series.forEach((s) => {
1201
- let l = s.transformGroups;
1202
- if (s.clearBounds && s.clearBounds(), s.isDirty = !0, s.isDirtyData = !0, n && l) for (; l.length > 1; ) {
1203
- let h = l.pop();
1204
- h && h.destroy();
1205
- }
1206
- }), r && (this.projection = new R(this.options.projection)), n && this.createInsets(), !t.center && Object.hasOwnProperty.call(t, "zoom") && !M(t.zoom) && this.fitToBounds(void 0, void 0, !1)), t.center || M(t.zoom) ? this.setView(this.options.center, t.zoom, !1) : "fitToGeometry" in t && this.fitToBounds(void 0, void 0, !1), e && this.chart.redraw(i);
1207
- }
1208
- zoomBy(t, e, i, o) {
1209
- let r = this.chart, n = this.projection.forward(this.center);
1210
- if (typeof t == "number") {
1211
- let s, l, h, p = this.zoom + t;
1212
- if (i) {
1213
- let [d, c] = i, u = this.getScale(), g = d - r.plotLeft - r.plotWidth / 2, m = c - r.plotTop - r.plotHeight / 2;
1214
- l = n[0] + g / u, h = n[1] + m / u;
1215
- }
1216
- if (typeof l == "number" && typeof h == "number") {
1217
- let d = 1 - Math.pow(2, this.zoom) / Math.pow(2, p), c = n[0] - l, u = n[1] - h;
1218
- n[0] -= c * d, n[1] += u * d, s = this.projection.inverse(n);
1219
- }
1220
- this.setView(e || s, p, void 0, o);
1221
- } else this.fitToBounds(void 0, void 0, void 0, o);
1222
- }
1223
- }
1224
- class Oe extends W {
1225
- constructor(t, e) {
1226
- if (super(t.chart, e), this.id = e.id, this.mapView = t, this.options = P({ center: [0, 0] }, t.options.insetOptions, e), this.allBounds = [], this.options.geoBounds) {
1227
- const i = t.projection.path(this.options.geoBounds);
1228
- this.geoBoundsProjectedBox = Se(i), this.geoBoundsProjectedPolygon = i.map((o) => [o[1] || 0, o[2] || 0]);
1229
- }
1230
- }
1231
- getField(t = !0) {
1232
- let e = this.hitZone;
1233
- if (e) {
1234
- let i = t ? this.padding : [0, 0, 0, 0], o = e.coordinates[0], r = o.map((d) => d[0]), n = o.map((d) => d[1]), s = Math.min.apply(0, r) + i[3], l = Math.max.apply(0, r) - i[1], h = Math.min.apply(0, n) + i[0], p = Math.max.apply(0, n) - i[2];
1235
- if (M(s) && M(h)) return { x: s, y: h, width: l - s, height: p - h };
1236
- }
1237
- return super.getField.call(this, t);
1238
- }
1239
- getHitZone() {
1240
- let { chart: t, mapView: e, options: i } = this, { coordinates: o } = i.field || {};
1241
- if (o) {
1242
- let r = o[0];
1243
- if (i.units === "percent") {
1244
- let n = i.relativeTo === "mapBoundingBox" && e.getMapBBox() || P(t.plotBox, { x: 0, y: 0 });
1245
- r = r.map((s) => [Y(`${s[0]}%`, n.width, n.x), Y(`${s[1]}%`, n.height, n.y)]);
1246
- }
1247
- return { type: "Polygon", coordinates: [r] };
1248
- }
1249
- }
1250
- getProjectedBounds() {
1251
- return W.compositeBounds(this.allBounds);
1252
- }
1253
- isInside(t) {
1254
- let { geoBoundsProjectedBox: e, geoBoundsProjectedPolygon: i } = this;
1255
- return !!(e && t.x >= e.x1 && t.x <= e.x2 && t.y >= e.y1 && t.y <= e.y2 && i && ct(t, i));
1256
- }
1257
- render() {
1258
- let { chart: t, mapView: e, options: i } = this, o = i.borderPath || i.field;
1259
- if (o && e.group) {
1260
- let r = !0;
1261
- this.border || (this.border = t.renderer.path().addClass("highcharts-mapview-inset-border").add(e.group), r = !1), t.styledMode || this.border.attr({ stroke: i.borderColor, "stroke-width": i.borderWidth });
1262
- let n = this.border.strokeWidth(), s = i.relativeTo === "mapBoundingBox" && e.getMapBBox() || e.playingField, l = (o.coordinates || []).reduce((h, p) => p.reduce((d, c, u) => {
1263
- let [g, m] = c;
1264
- return i.units === "percent" && (g = t.plotLeft + Y(`${g}%`, s.width, s.x), m = t.plotTop + Y(`${m}%`, s.height, s.y)), g = ye(g, n), m = ye(m, n), d.push(u === 0 ? ["M", g, m] : ["L", g, m]), d;
1265
- }, h), []);
1266
- this.border[r ? "animate" : "attr"]({ d: l });
1267
- }
1268
- }
1269
- destroy() {
1270
- this.border && (this.border = this.border.destroy()), this.eventsToUnbind.forEach((t) => t());
1271
- }
1272
- setUpEvents() {
1273
- }
1274
- }
1275
- let { animObject: Be, stop: Wi } = z(), { noop: Bt } = z(), { splitPath: Zi } = jt, { column: De, scatter: Ve } = D().seriesTypes;
1276
- class mt extends Ve {
1277
- constructor() {
1278
- super(...arguments), this.processedData = [];
1279
- }
1280
- animate(t) {
1281
- let { chart: e, group: i } = this, o = Be(this.options.animation);
1282
- t ? i.attr({ translateX: e.plotLeft + e.plotWidth / 2, translateY: e.plotTop + e.plotHeight / 2, scaleX: 1e-3, scaleY: 1e-3 }) : i.animate({ translateX: e.plotLeft, translateY: e.plotTop, scaleX: 1, scaleY: 1 }, o);
1283
- }
1284
- clearBounds() {
1285
- this.points.forEach((t) => {
1286
- delete t.bounds, delete t.insetIndex, delete t.projectedPath;
1287
- }), delete this.bounds;
1288
- }
1289
- doFullTranslate() {
1290
- return !!(this.isDirtyData || this.chart.isResizing || !this.hasRendered);
1291
- }
1292
- drawMapDataLabels() {
1293
- super.drawDataLabels(), this.dataLabelsGroups?.forEach((t) => t?.clip(this.chart.clipRect));
1294
- }
1295
- drawPoints() {
1296
- let t = this, { chart: e, group: i, transformGroups: o = [] } = this, { mapView: r, renderer: n } = e;
1297
- if (r) {
1298
- this.transformGroups = o, o[0] || (o[0] = n.g().add(i));
1299
- for (let s = 0, l = r.insets.length; s < l; ++s) o[s + 1] || o.push(n.g().add(i));
1300
- this.doFullTranslate() && (this.points.forEach((s) => {
1301
- let { graphic: l } = s;
1302
- s.group = o[typeof s.insetIndex == "number" ? s.insetIndex + 1 : 0], l && l.parentGroup !== s.group && l.add(s.group);
1303
- }), De.prototype.drawPoints.apply(this), this.points.forEach((s) => {
1304
- let l = s.graphic;
1305
- if (l) {
1306
- let h = l.animate, p = "";
1307
- s.name && (p += "highcharts-name-" + s.name.replace(/ /g, "-").toLowerCase()), s.properties?.["hc-key"] && (p += " highcharts-key-" + s.properties["hc-key"].toString().toLowerCase()), p && l.addClass(p), e.styledMode && l.css(this.pointAttribs(s, s.selected && "select" || void 0)), l.attr({ visibility: !s.visible && (s.visible || s.isNull) ? "hidden" : "inherit" }), l.animate = function(d, c, u) {
1308
- let g = M(d["stroke-width"]) && !M(l["stroke-width"]), m = M(l["stroke-width"]) && !M(d["stroke-width"]);
1309
- if (g || m) {
1310
- let f = C(t.getStrokeWidth(t.options), 1) / (e.mapView?.getScale() || 1);
1311
- g && (l["stroke-width"] = f), m && (d["stroke-width"] = f);
1312
- }
1313
- return h.call(l, d, c, m ? function() {
1314
- l.element.removeAttribute("stroke-width"), delete l["stroke-width"], u && u.apply(this, arguments);
1315
- } : u);
1316
- };
1317
- }
1318
- })), o.forEach((s, l) => {
1319
- let h = (l === 0 ? r : r.insets[l - 1]).getSVGTransform(), p = C(this.getStrokeWidth(this.options), 1), d = h.scaleX, c = h.scaleY > 0 ? 1 : -1, u = (g) => {
1320
- (t.points || []).forEach((m) => {
1321
- let f, y = m.graphic;
1322
- y?.["stroke-width"] && (f = this.getStrokeWidth(m.options)) && y.attr({ "stroke-width": f / g });
1323
- });
1324
- };
1325
- if (n.globalAnimation && e.hasRendered && r.allowTransformAnimation) {
1326
- let g = Number(s.attr("translateX")), m = Number(s.attr("translateY")), f = Number(s.attr("scaleX")), y = (v, w) => {
1327
- let A = f + (d - f) * w.pos;
1328
- s.attr({ translateX: g + (h.translateX - g) * w.pos, translateY: m + (h.translateY - m) * w.pos, scaleX: A, scaleY: A * c, "stroke-width": p / A }), u(A);
1329
- }, b = P(Be(n.globalAnimation)), x = b.step;
1330
- b.step = function() {
1331
- x && x.apply(this, arguments), y.apply(this, arguments);
1332
- }, s.attr({ animator: 0 }).animate({ animator: 1 }, b, (function() {
1333
- typeof n.globalAnimation != "boolean" && n.globalAnimation.complete && n.globalAnimation.complete({ applyDrilldown: !0 }), H(this, "mapZoomComplete");
1334
- }).bind(this));
1335
- } else Wi(s), s.attr(P(h, { "stroke-width": p / d })), u(d);
1336
- }), this.isDrilling || this.drawMapDataLabels();
1337
- }
1338
- }
1339
- getProjectedBounds() {
1340
- if (!this.bounds && this.chart.mapView) {
1341
- let { insets: t, projection: e } = this.chart.mapView, i = [];
1342
- (this.points || []).forEach((o) => {
1343
- if (o.path || o.geometry) {
1344
- if (typeof o.path == "string" ? o.path = Zi(o.path) : _(o.path) && o.path[0] === "M" && (o.path = this.chart.renderer.pathToSegments(o.path)), !o.bounds) {
1345
- let r = o.getProjectedBounds(e);
1346
- if (r) {
1347
- o.labelrank = C(o.labelrank, (r.x2 - r.x1) * (r.y2 - r.y1));
1348
- let { midX: n, midY: s } = r;
1349
- if (t && M(n) && M(s)) {
1350
- let l = hi(t, (h) => h.isInside({ x: n, y: s }));
1351
- l && (delete o.projectedPath, (r = o.getProjectedBounds(l.projection)) && l.allBounds.push(r), o.insetIndex = t.indexOf(l));
1352
- }
1353
- o.bounds = r;
1354
- }
1355
- }
1356
- o.bounds && o.insetIndex === void 0 && i.push(o.bounds);
1357
- }
1358
- }), this.bounds = W.compositeBounds(i);
1359
- }
1360
- return this.bounds;
1361
- }
1362
- getStrokeWidth(t) {
1363
- let e = this.pointAttrToOptions;
1364
- return t[e?.["stroke-width"] || "borderWidth"];
1365
- }
1366
- hasData() {
1367
- return !!this.dataTable.rowCount;
1368
- }
1369
- pointAttribs(t, e) {
1370
- let { mapView: i, styledMode: o } = t.series.chart, r = o ? this.colorAttribs(t) : De.prototype.pointAttribs.call(this, t, e), n = this.getStrokeWidth(t.options);
1371
- if (e) {
1372
- let l = P(this.options.states?.[e], t.options.states?.[e] || {}), h = this.getStrokeWidth(l);
1373
- N(h) && (n = h), r.stroke = l.borderColor ?? t.color;
1374
- }
1375
- n && i && (n /= i.getScale());
1376
- let s = this.getStrokeWidth(this.options);
1377
- return r.dashstyle && i && M(s) && (n = s / i.getScale()), t.visible || (r.fill = this.options.nullColor), t.isNull && this.options.nullInteraction && (r.opacity = 1), N(n) ? r["stroke-width"] = n : delete r["stroke-width"], r["stroke-linecap"] = r["stroke-linejoin"] = this.options.linecap, r;
1378
- }
1379
- updateData() {
1380
- return !this.processedData && super.updateData.apply(this, arguments);
1381
- }
1382
- setData(t, e = !0, i, o) {
1383
- delete this.bounds, super.setData(t, !1, void 0, o), this.processData(), this.generatePoints(), e && this.chart.redraw(i);
1384
- }
1385
- dataColumnKeys() {
1386
- return this.pointArrayMap;
1387
- }
1388
- processData() {
1389
- let t, e, i, o = this.options, r = o.data, n = this.chart, s = n.options.chart, l = this.joinBy, h = o.keys || this.pointArrayMap, p = [], d = {}, c = this.chart.mapView, u = c && (et(o.mapData, !0) ? c.getGeoMap(o.mapData) : c.geoMap), g = n.mapTransforms = s.mapTransforms || u?.["hc-transform"] || n.mapTransforms;
1390
- g && ht(g, (f) => {
1391
- f.rotation && (f.cosAngle = Math.cos(f.rotation), f.sinAngle = Math.sin(f.rotation));
1392
- }), _(o.mapData) ? i = o.mapData : u && u.type === "FeatureCollection" && (this.mapTitle = u.title, i = z().geojson(u, this.type, this)), this.processedData = [];
1393
- let m = this.processedData;
1394
- if (r) {
1395
- let f;
1396
- for (let y = 0, b = r.length; y < b; ++y) {
1397
- if (M(f = r[y])) m[y] = { value: f };
1398
- else if (_(f)) {
1399
- let x = 0;
1400
- m[y] = {}, !o.keys && f.length > h.length && typeof f[0] == "string" && (m[y]["hc-key"] = f[0], ++x);
1401
- for (let v = 0; v < h.length; ++v, ++x) h[v] && f[x] !== void 0 && (h[v].indexOf(".") > 0 ? it.prototype.setNestedProperty(m[y], f[x], h[v]) : m[y][h[v]] = f[x]);
1402
- } else m[y] = r[y];
1403
- l && l[0] === "_i" && (m[y]._i = y);
1404
- }
1405
- }
1406
- if (i) {
1407
- this.mapData = i, this.mapMap = {};
1408
- for (let f = 0; f < i.length; f++) e = (t = i[f]).properties, t._i = f, l[0] && e && e[l[0]] && (t[l[0]] = e[l[0]]), d[t[l[0]]] = t;
1409
- if (this.mapMap = d, l[1]) {
1410
- let f = l[1];
1411
- m.forEach((y) => {
1412
- let b = be(f, y);
1413
- d[b] && p.push(d[b]);
1414
- });
1415
- }
1416
- if (o.allAreas) {
1417
- if (l[1]) {
1418
- let y = l[1];
1419
- m.forEach((b) => {
1420
- p.push(be(y, b));
1421
- });
1422
- }
1423
- let f = "|" + p.map(function(y) {
1424
- return y && y[l[0]];
1425
- }).join("|") + "|";
1426
- i.forEach((y) => {
1427
- l[0] && f.indexOf("|" + y[l[0]] + "|") !== -1 || m.push(P(y, { value: null }));
1428
- });
1429
- }
1430
- }
1431
- this.dataTable.rowCount = m.length;
1432
- }
1433
- setOptions(t) {
1434
- let e = super.setOptions(t), i = e.joinBy;
1435
- if (e.joinBy === null && (i = "_i"), i) {
1436
- var o;
1437
- this.joinBy = _(o = i) ? o : [o], this.joinBy[1] || (this.joinBy[1] = this.joinBy[0]);
1438
- }
1439
- return e;
1440
- }
1441
- translate() {
1442
- let t = this.doFullTranslate(), e = this.chart.mapView, i = e?.projection;
1443
- if (this.chart.hasRendered && (this.isDirtyData || !this.hasRendered) && (this.processData(), this.generatePoints(), delete this.bounds, !e || e.userOptions.center || M(e.userOptions.zoom) || e.zoom !== e.minZoom ? this.getProjectedBounds() : e.fitToBounds(void 0, void 0, !1)), e) {
1444
- let o = e.getSVGTransform();
1445
- this.points.forEach((r) => {
1446
- let n = M(r.insetIndex) && e.insets[r.insetIndex].getSVGTransform() || o;
1447
- n && r.bounds && M(r.bounds.midX) && M(r.bounds.midY) && (r.plotX = r.bounds.midX * n.scaleX + n.translateX, r.plotY = r.bounds.midY * n.scaleY + n.translateY), t && (r.shapeType = "path", r.shapeArgs = { d: it.getProjectedPath(r, i) }), !r.hiddenInDataClass && (r.projectedPath && !r.projectedPath.length ? r.setVisible(!1) : r.visible || r.setVisible(!0));
1448
- });
1449
- }
1450
- H(this, "afterTranslate");
1451
- }
1452
- update(t) {
1453
- t.mapData && this.chart.mapView?.recommendMapView(this.chart, [this.chart.options.chart.map, ...(this.chart.options.series || []).map((e, i) => i === this._i ? t.mapData : e.mapData)], !0), super.update.apply(this, arguments);
1454
- }
1455
- }
1456
- mt.defaultOptions = P(Ve.defaultOptions, { affectsMapView: !0, animation: !1, dataLabels: { crop: !1, formatter: function() {
1457
- let { numberFormatter: a } = this.series.chart, { value: t } = this.point;
1458
- return M(t) ? a(t, -1) : this.point.name || "";
1459
- }, inside: !0, overflow: !1, padding: 0, verticalAlign: "middle" }, linecap: "round", marker: null, nullColor: "#f7f7f7", stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "{point.name}: {point.value}<br/>" }, turboThreshold: 0, allAreas: !0, borderColor: "#e6e6e6", borderWidth: 1, joinBy: "hc-key", states: { hover: { halo: void 0, borderColor: "#666666", borderWidth: 2 }, normal: { animation: !0 }, select: { color: "#cccccc" } }, legendSymbol: "rectangle" }), k(mt.prototype, { type: "map", axisTypes: X.seriesMembers.axisTypes, colorAttribs: X.seriesMembers.colorAttribs, colorKey: X.seriesMembers.colorKey, directTouch: !0, drawDataLabels: Bt, drawGraph: Bt, forceDL: !0, getCenter: Li.getCenter, getExtremesFromAll: !0, getSymbol: Bt, isCartesian: !1, parallelArrays: X.seriesMembers.parallelArrays, pointArrayMap: X.seriesMembers.pointArrayMap, pointClass: it, preserveAspectRatio: !0, searchPoint: Bt, trackerGroups: X.seriesMembers.trackerGroups, useMapGeometry: !0 }), X.compose(mt), D().registerSeriesType("map", mt);
1460
- let Xe = mt;
1461
- class se extends Xe {
1462
- pointAttribs(t, e) {
1463
- let i = super.pointAttribs(t, e);
1464
- return i.fill = this.options.fillColor, i;
1465
- }
1466
- }
1467
- se.defaultOptions = P(Xe.defaultOptions, { lineWidth: 1, fillColor: "none", legendSymbol: "lineMarker" }), k(se.prototype, { type: "mapline", colorProp: "stroke", pointAttrToOptions: { stroke: "color", "stroke-width": "lineWidth" } }), D().registerSeriesType("mapline", se);
1468
- let { scatter: Ui } = D().seriesTypes;
1469
- class Hi extends Ui.prototype.pointClass {
1470
- isValid() {
1471
- return !!(this.options.geometry || M(this.x) && M(this.y) || M(this.options.lon) && M(this.options.lat));
1472
- }
1473
- }
1474
- T(632);
1475
- let { noop: _i } = z(), { map: $i, scatter: Re } = D().seriesTypes;
1476
- class re extends Re {
1477
- constructor() {
1478
- super(...arguments), this.clearBounds = $i.prototype.clearBounds;
1479
- }
1480
- drawDataLabels() {
1481
- super.drawDataLabels(), this.dataLabelsGroups?.forEach((t) => {
1482
- t?.clip(this.chart.clipRect);
1483
- });
1484
- }
1485
- projectPoint(t) {
1486
- let e = this.chart.mapView;
1487
- if (e) {
1488
- let { geometry: i, lon: o, lat: r } = t, n = i && i.type === "Point" && i.coordinates;
1489
- if (M(o) && M(r) && (n = [o, r]), n) return e.lonLatToProjectedUnits({ lon: n[0], lat: n[1] });
1490
- }
1491
- }
1492
- translate() {
1493
- let t = this.chart.mapView;
1494
- if (this.generatePoints(), this.getProjectedBounds && this.isDirtyData && (delete this.bounds, this.getProjectedBounds()), t) {
1495
- let e = t.getSVGTransform(), { hasCoordinates: i } = t.projection;
1496
- this.points.forEach((o) => {
1497
- let r, { x: n, y: s } = o, l = M(o.insetIndex) && t.insets[o.insetIndex].getSVGTransform() || e, h = this.projectPoint(o.options) || o.properties && this.projectPoint(o.properties);
1498
- if (h ? (n = h.x, s = h.y) : o.bounds && (n = o.bounds.midX, s = o.bounds.midY, l && M(n) && M(s) && (o.plotX = n * l.scaleX + l.translateX, o.plotY = s * l.scaleY + l.translateY, r = !0)), M(n) && M(s)) {
1499
- if (!r) {
1500
- let p = t.projectedUnitsToPixels({ x: n, y: s });
1501
- o.plotX = p.x, o.plotY = i ? p.y : this.chart.plotHeight - p.y;
1502
- }
1503
- } else o.y = o.plotX = o.plotY = void 0;
1504
- o.isInside = this.isPointInside(o), o.zone = this.zones.length ? o.getZone() : void 0;
1505
- });
1506
- }
1507
- H(this, "afterTranslate");
1508
- }
1509
- }
1510
- re.defaultOptions = P(Re.defaultOptions, { dataLabels: { crop: !1, defer: !1, enabled: !0, formatter: function() {
1511
- return this.point.name;
1512
- }, overflow: !1, style: { color: "#000000" } }, legendSymbol: "lineMarker", stickyTracking: !0, tooltip: { pointFormat: "{#if point.name}{point.name}{else}Lat: {point.lat}, Lon: {point.lon}{/if}" } }), ee().prototype.symbols.mapmarker = (a, t, e, i, o) => {
1513
- let r, n, s = o && o.context === "legend";
1514
- s ? (r = a + e / 2, n = t + i) : o && typeof o.anchorX == "number" && typeof o.anchorY == "number" ? (r = o.anchorX, n = o.anchorY) : (r = a + e / 2, n = t + i / 2, t -= i);
1515
- let l = s ? i / 3 : i / 2;
1516
- return [["M", r, n], ["C", r, n, r - l, t + 1.5 * l, r - l, t + l], ["A", l, l, 1, 1, 1, r + l, t + l], ["C", r + l, t + 1.5 * l, r, n, r, n], ["Z"]];
1517
- }, k(re.prototype, { type: "mappoint", axisTypes: ["colorAxis"], forceDL: !0, isCartesian: !1, pointClass: Hi, searchPoint: _i, useMapGeometry: !0 }), D().registerSeriesType("mappoint", re);
1518
- let Ki = { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: { className: void 0, allowOverlap: !1, format: "", formatter: void 0, align: "right", style: { fontSize: "0.9em", color: "#000000" }, x: 0, y: 0 }, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 }, { noop: qi } = z(), Ji = class {
1519
- constructor(a, t) {
1520
- this.setState = qi, this.init(a, t);
1521
- }
1522
- init(a, t) {
1523
- this.options = a, this.visible = !0, this.chart = t.chart, this.legend = t;
1524
- }
1525
- addToLegend(a) {
1526
- a.splice(this.options.legendIndex, 0, this);
1527
- }
1528
- drawLegendSymbol(a) {
1529
- let t, e = C(a.options.itemDistance, 20), i = this.legendItem || {}, o = this.options, r = o.ranges, n = o.connectorDistance;
1530
- if (!r || !r.length || !M(r[0].value)) {
1531
- a.options.bubbleLegend.autoRanges = !0;
1532
- return;
1533
- }
1534
- (function(p, d) {
1535
- let c, u, g = p.length;
1536
- for (u = 0; u < g; u++) p[u].safeI = u;
1537
- for (p.sort(function(m, f) {
1538
- return (c = d(m, f)) === 0 ? m.safeI - f.safeI : c;
1539
- }), u = 0; u < g; u++) delete p[u].safeI;
1540
- })(r, function(p, d) {
1541
- return d.value - p.value;
1542
- }), this.ranges = r, this.setOptions(), this.render();
1543
- let s = this.getMaxLabelSize(), l = this.ranges[0].radius, h = 2 * l;
1544
- t = (t = n - l + s.width) > 0 ? t : 0, this.maxLabel = s, this.movementX = o.labels.align === "left" ? t : 0, i.labelWidth = h + t + e, i.labelHeight = h + s.height / 2;
1545
- }
1546
- setOptions() {
1547
- let a = this.ranges, t = this.options, e = this.chart.series[t.seriesIndex], i = this.legend.baseline, o = { zIndex: t.zIndex, "stroke-width": t.borderWidth }, r = { zIndex: t.zIndex, "stroke-width": t.connectorWidth }, n = { align: this.legend.options.rtl || t.labels.align === "left" ? "right" : "left", zIndex: t.zIndex }, s = e.options.marker.fillOpacity, l = this.chart.styledMode;
1548
- a.forEach(function(h, p) {
1549
- l || (o.stroke = C(h.borderColor, t.borderColor, e.color), o.fill = h.color || t.color, o.fill || (o.fill = e.color, o["fill-opacity"] = s ?? 1), r.stroke = C(h.connectorColor, t.connectorColor, e.color)), a[p].radius = this.getRangeRadius(h.value), a[p] = P(a[p], { center: a[0].radius - a[p].radius + i }), l || P(!0, a[p], { bubbleAttribs: P(o), connectorAttribs: P(r), labelAttribs: n });
1550
- }, this);
1551
- }
1552
- getRangeRadius(a) {
1553
- let t = this.options, e = this.options.seriesIndex, i = this.chart.series[e], o = t.ranges[0].value, r = t.ranges[t.ranges.length - 1].value, n = t.minSize, s = t.maxSize;
1554
- return i.getRadius.call(this, r, o, n, s, a);
1555
- }
1556
- render() {
1557
- let a = this.legendItem || {}, t = this.chart.renderer, e = this.options.zThreshold;
1558
- for (let i of (this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), a.symbol = t.g("bubble-legend"), a.label = t.g("bubble-legend-item").css(this.legend.itemStyle || {}), a.symbol.translateX = 0, a.symbol.translateY = 0, a.symbol.add(a.label), a.label.add(a.group), this.ranges)) i.value >= e && this.renderRange(i);
1559
- this.hideOverlappingLabels();
1560
- }
1561
- renderRange(a) {
1562
- let t = this.ranges[0], e = this.legend, i = this.options, o = i.labels, r = this.chart, n = r.series[i.seriesIndex], s = r.renderer, l = this.symbols, h = l.labels, p = a.center, d = Math.abs(a.radius), c = i.connectorDistance || 0, u = o.align, g = e.options.rtl, m = i.borderWidth, f = i.connectorWidth, y = t.radius || 0, b = p - d - m / 2 + f / 2, x = (b % 1 ? 1 : 0.5) - (f % 2 ? 0 : 0.5), v = s.styledMode, w = g || u === "left" ? -c : c;
1563
- u === "center" && (w = 0, i.connectorDistance = 0, a.labelAttribs.align = "center"), l.bubbleItems.push(s.circle(y, p + x, d).attr(v ? {} : a.bubbleAttribs).addClass((v ? "highcharts-color-" + n.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (i.className || "")).add(this.legendItem.symbol)), l.connectors.push(s.path(s.crispLine([["M", y, b], ["L", y + w, b]], i.connectorWidth)).attr(v ? {} : a.connectorAttribs).addClass((v ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (i.connectorClassName || "")).add(this.legendItem.symbol));
1564
- let A = s.text(this.formatLabel(a)).attr(v ? {} : a.labelAttribs).css(v ? {} : o.style).addClass("highcharts-bubble-legend-labels " + (i.labels.className || "")).add(this.legendItem.symbol), E = { x: y + w + i.labels.x, y: b + i.labels.y + 0.4 * A.getBBox().height };
1565
- A.attr(E), h.push(A), A.placed = !0, A.alignAttr = E;
1566
- }
1567
- getMaxLabelSize() {
1568
- let a, t;
1569
- return this.symbols.labels.forEach(function(e) {
1570
- t = e.getBBox(!0), a = a ? t.width > a.width ? t : a : t;
1571
- }), a || {};
1572
- }
1573
- formatLabel(a) {
1574
- let t = this.options, e = t.labels.formatter, i = t.labels.format, { numberFormatter: o } = this.chart;
1575
- return i ? Ce().format(i, a, this.chart) : e ? e.call(a, a) : o(a.value, 1);
1576
- }
1577
- hideOverlappingLabels() {
1578
- let a = this.chart, t = this.options.labels.allowOverlap, e = this.symbols;
1579
- !t && e && (a.hideOverlappingLabels(e.labels), e.labels.forEach(function(i, o) {
1580
- i.newOpacity ? i.newOpacity !== i.oldOpacity && e.connectors[o].show() : e.connectors[o].hide();
1581
- }));
1582
- }
1583
- getRanges() {
1584
- let a = this.legend.bubbleLegend, t = a.chart.series, e = a.options.ranges, i, o, r = Number.MAX_VALUE, n = -Number.MAX_VALUE;
1585
- return t.forEach(function(s) {
1586
- s.isBubble && !s.ignoreSeries && (o = s.getColumn("z").filter(M)).length && (r = C(s.options.zMin, Math.min(r, Math.max(fe(o), s.options.displayNegative === !1 ? s.options.zThreshold : -Number.MAX_VALUE))), n = C(s.options.zMax, Math.max(n, ge(o))));
1587
- }), i = r === n ? [{ value: n }] : [{ value: r }, { value: (r + n) / 2 }, { value: n, autoRanges: !0 }], e.length && e[0].radius && i.reverse(), i.forEach(function(s, l) {
1588
- e && e[l] && (i[l] = P(e[l], s));
1589
- }), i;
1590
- }
1591
- predictBubbleSizes() {
1592
- let a = this.chart, t = a.legend.options, e = t.floating, i = t.layout === "horizontal", o = i ? a.legend.lastLineHeight : 0, r = a.plotSizeX, n = a.plotSizeY, s = a.series[this.options.seriesIndex], l = s.getPxExtremes(), h = Math.ceil(l.minPxSize), p = Math.ceil(l.maxPxSize), d = Math.min(n, r), c, u = s.options.maxSize;
1593
- return e || !/%$/.test(u) ? c = p : (c = (d + o) * (u = parseFloat(u)) / 100 / (u / 100 + 1), (i && n - c >= r || !i && r - c >= n) && (c = p)), [h, Math.ceil(c)];
1594
- }
1595
- updateRanges(a, t) {
1596
- let e = this.legend.options.bubbleLegend;
1597
- e.minSize = a, e.maxSize = t, e.ranges = this.getRanges();
1598
- }
1599
- correctSizes() {
1600
- let a = this.legend, t = this.chart.series[this.options.seriesIndex].getPxExtremes();
1601
- Math.abs(Math.ceil(t.maxPxSize) - this.options.maxSize) > 1 && (this.updateRanges(this.options.minSize, t.maxPxSize), a.render());
1602
- }
1603
- }, { setOptions: Qi } = z(), { composed: to } = z();
1604
- function eo(a, t, e) {
1605
- let i, o, r, n = this.legend, s = ae(this) >= 0;
1606
- n && n.options.enabled && n.bubbleLegend && n.options.bubbleLegend.autoRanges && s ? (i = n.bubbleLegend.options, o = n.bubbleLegend.predictBubbleSizes(), n.bubbleLegend.updateRanges(o[0], o[1]), i.placed || (n.group.placed = !1, n.allItems.forEach((l) => {
1607
- (r = l.legendItem || {}).group && (r.group.translateY = void 0);
1608
- })), n.render(), i.placed || (this.getMargins(), this.axes.forEach((l) => {
1609
- l.setScale(), l.updateNames(), ht(l.ticks, function(h) {
1610
- h.isNew = !0, h.isNewLabel = !0;
1611
- });
1612
- }), this.getMargins()), i.placed = !0, a.call(this, t, e), n.bubbleLegend.correctSizes()) : (a.call(this, t, e), n && n.options.enabled && n.bubbleLegend && n.render());
1613
- }
1614
- function ae(a) {
1615
- let t = a.series, e = 0;
1616
- for (; e < t.length; ) {
1617
- if (t[e] && t[e].isBubble && t[e].visible && t[e].dataTable.rowCount) return e;
1618
- e++;
1619
- }
1620
- return -1;
1621
- }
1622
- function io(a) {
1623
- let t = this.bubbleLegend, e = this.options, i = e.bubbleLegend, o = ae(this.chart);
1624
- t && t.ranges && t.ranges.length && (i.ranges.length && (i.autoRanges = !!i.ranges[0].autoRanges), this.destroyItem(t)), o >= 0 && e.enabled && i.enabled && (i.seriesIndex = o, this.bubbleLegend = new Ji(i, this), this.bubbleLegend.addToLegend(a.allItems));
1625
- }
1626
- function oo() {
1627
- if (this.bubbleLegend) {
1628
- let a = this.allItems, t = this.options.rtl, e = (function(l) {
1629
- let h = l.allItems, p = [], d = h.length, c, u, g, m = 0, f = 0;
1630
- for (m = 0; m < d; m++) if (u = h[m].legendItem || {}, g = (h[m + 1] || {}).legendItem || {}, u.labelHeight && (h[m].itemHeight = u.labelHeight), h[m] === h[d - 1] || u.y !== g.y) {
1631
- for (p.push({ height: 0 }), c = p[p.length - 1]; f <= m; f++) h[f].itemHeight > c.height && (c.height = h[f].itemHeight);
1632
- c.step = m;
1633
- }
1634
- return p;
1635
- })(this), i, o, r, n, s = 0;
1636
- a.forEach((l, h) => {
1637
- (n = l.legendItem || {}).group && (i = n.group.translateX || 0, o = n.y || 0, ((r = l.movementX) || t && l.ranges) && (r = t ? i - l.options.maxSize / 2 : i + r, n.group.attr({ translateX: r })), h > e[s].step && s++, n.group.attr({ translateY: Math.round(o + e[s].height / 2) }), n.y = o + e[s].height / 2);
1638
- });
1639
- }
1640
- }
1641
- function so(a) {
1642
- let t;
1643
- if (a.defaultPrevented) return !1;
1644
- let e = a.legendItem, i = this.chart, o = e.visible;
1645
- this && this.bubbleLegend && (e.visible = !o, e.ignoreSeries = o, t = ae(i) >= 0, this.bubbleLegend.visible !== t && (this.update({ bubbleLegend: { enabled: t } }), this.bubbleLegend.visible = t), e.visible = o);
1646
- }
1647
- let ro = function(a, t) {
1648
- Pt(to, "Series.BubbleLegend") && (Qi({ legend: { bubbleLegend: Ki } }), Tt(a.prototype, "drawChartBox", eo), L(t, "afterGetAllItems", io), L(t, "afterRender", oo), L(t, "itemClick", so));
1649
- };
1650
- var ao = T(260), no = T.n(ao);
1651
- let { seriesTypes: { scatter: { prototype: { pointClass: lo } } } } = D();
1652
- class Ne extends lo {
1653
- haloPath(t) {
1654
- let e = (t && this.marker && this.marker.radius || 0) + t;
1655
- if (this.series.chart.inverted) {
1656
- let i = this.pos() || [0, 0], { xAxis: o, yAxis: r, chart: n } = this.series, s = 2 * e;
1657
- return n.renderer.symbols.circle((o?.len || 0) - i[1] - e, (r?.len || 0) - i[0] - e, s, s);
1658
- }
1659
- return no().prototype.haloPath.call(this, e);
1660
- }
1661
- }
1662
- k(Ne.prototype, { ttBelow: !1 });
1663
- let Ye = Ne, { composed: ho, noop: ne } = z(), { series: po, seriesTypes: { column: { prototype: co }, scatter: Ge } } = D();
1664
- function uo() {
1665
- let a = this.len, { coll: t, isXAxis: e, min: i } = this, o = (this.max || 0) - (i || 0), r = 0, n = a, s = a / o, l;
1666
- (t === "xAxis" || t === "yAxis") && (this.series.forEach((h) => {
1667
- if (h.bubblePadding && h.reserveSpace()) {
1668
- this.allowZoomOutside = !0, l = !0;
1669
- let p = h.getColumn(e ? "x" : "y");
1670
- if (e && ((h.onPoint || h).getRadii(0, 0, h), h.onPoint && (h.radii = h.onPoint.radii)), o > 0) {
1671
- let d = p.length;
1672
- for (; d--; ) if (M(p[d]) && this.dataMin <= p[d] && p[d] <= this.max) {
1673
- let c = h.radii && h.radii[d] || 0;
1674
- r = Math.min((p[d] - i) * s - c, r), n = Math.max((p[d] - i) * s + c, n);
1675
- }
1676
- }
1677
- }
1678
- }), l && o > 0 && !this.logarithmic && (n -= a, s *= (a + Math.max(0, r) - Math.min(n, a)) / a, [["min", "userMin", r], ["max", "userMax", n]].forEach((h) => {
1679
- C(this.options[h[0]], this[h[1]]) === void 0 && (this[h[0]] += h[2] / s);
1680
- })));
1681
- }
1682
- function mo() {
1683
- let { ticks: a, tickPositions: t, dataMin: e = 0, dataMax: i = 0, categories: o } = this, r = this.options.type;
1684
- if ((o?.length || r === "category") && this.series.find((n) => n.bubblePadding)) {
1685
- let n = t.length;
1686
- for (; n--; ) {
1687
- let s = a[t[n]], l = s.pos || 0;
1688
- (l > i || l < e) && s.label?.hide();
1689
- }
1690
- }
1691
- }
1692
- class Q extends Ge {
1693
- static compose(t, e, i) {
1694
- ro(e, i), Pt(ho, "Series.Bubble") && (L(t, "foundExtremes", uo), L(t, "afterRender", mo));
1695
- }
1696
- animate(t) {
1697
- !t && this.points.length < this.options.animationLimit && this.points.forEach(function(e) {
1698
- let { graphic: i, plotX: o = 0, plotY: r = 0 } = e;
1699
- i && i.width && (this.hasRendered || i.attr({ x: o, y: r, width: 1, height: 1 }), i.animate(this.markerAttribs(e), this.options.animation));
1700
- }, this);
1701
- }
1702
- getRadii() {
1703
- let t = this.getColumn("z"), e = this.getColumn("y"), i = [], o, r, n, s = this.chart.bubbleZExtremes, { minPxSize: l, maxPxSize: h } = this.getPxExtremes();
1704
- if (!s) {
1705
- let p, d = Number.MAX_VALUE, c = -Number.MAX_VALUE;
1706
- this.chart.series.forEach((u) => {
1707
- if (u.bubblePadding && u.reserveSpace()) {
1708
- let g = (u.onPoint || u).getZExtremes();
1709
- g && (d = Math.min(C(d, g.zMin), g.zMin), c = Math.max(C(c, g.zMax), g.zMax), p = !0);
1710
- }
1711
- }), p ? (s = { zMin: d, zMax: c }, this.chart.bubbleZExtremes = s) : s = { zMin: 0, zMax: 0 };
1712
- }
1713
- for (r = 0, o = t.length; r < o; r++) n = t[r], i.push(this.getRadius(s.zMin, s.zMax, l, h, n, e && e[r]));
1714
- this.radii = i;
1715
- }
1716
- getRadius(t, e, i, o, r, n) {
1717
- let s = this.options, l = s.sizeBy !== "width", h = s.zThreshold, p = e - t, d = 0.5;
1718
- if (n === null || r === null) return null;
1719
- if (M(r)) {
1720
- if (s.sizeByAbsoluteValue && (r = Math.abs(r - h), e = p = Math.max(e - h, Math.abs(t - h)), t = 0), r < t) return i / 2 - 1;
1721
- p > 0 && (d = (r - t) / p);
1722
- }
1723
- return l && d >= 0 && (d = Math.sqrt(d)), Math.ceil(i + d * (o - i)) / 2;
1724
- }
1725
- hasData() {
1726
- return !!this.dataTable.rowCount;
1727
- }
1728
- markerAttribs(t, e) {
1729
- let i = super.markerAttribs(t, e), { height: o = 0, width: r = 0 } = i;
1730
- return this.chart.inverted ? k(i, { x: (t.plotX || 0) - r / 2, y: (t.plotY || 0) - o / 2 }) : i;
1731
- }
1732
- pointAttribs(t, e) {
1733
- let i = this.options.marker, o = i?.fillOpacity, r = po.prototype.pointAttribs.call(this, t, e);
1734
- return r["fill-opacity"] = o ?? 1, r;
1735
- }
1736
- translate() {
1737
- super.translate.call(this), this.getRadii(), this.translateBubble();
1738
- }
1739
- translateBubble() {
1740
- let { data: t, options: e, radii: i } = this, { minPxSize: o } = this.getPxExtremes(), r = t.length;
1741
- for (; r--; ) {
1742
- let n = t[r], s = i ? i[r] : 0;
1743
- this.zoneAxis === "z" && (n.negative = (n.z || 0) < (e.zThreshold || 0)), M(s) && (n.marker = k(n.marker, { radius: s, width: 2 * s, height: 2 * s })), M(s) && s >= o / 2 ? n.dlBox = { x: n.plotX - s, y: n.plotY - s, width: 2 * s, height: 2 * s } : (n.shapeArgs = n.plotY = n.dlBox = void 0, n.isInside = !1);
1744
- }
1745
- }
1746
- getPxExtremes() {
1747
- let t = Math.min(this.chart.plotWidth, this.chart.plotHeight), e = (r) => {
1748
- let n;
1749
- return typeof r == "string" && (n = /%$/.test(r), r = parseInt(r, 10)), n ? t * r / 100 : r;
1750
- }, i = e(C(this.options.minSize, 8)), o = Math.max(e(C(this.options.maxSize, "20%")), i);
1751
- return { minPxSize: i, maxPxSize: o };
1752
- }
1753
- getZExtremes() {
1754
- let t = this.options, e = this.getColumn("z").filter(M);
1755
- if (e.length) {
1756
- let i = C(t.zMin, q(fe(e), t.displayNegative === !1 ? t.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE)), o = C(t.zMax, ge(e));
1757
- if (M(i) && M(o)) return { zMin: i, zMax: o };
1758
- }
1759
- }
1760
- searchKDTree(t, e, i, o = ne, r = ne) {
1761
- return o = (n, s, l) => {
1762
- let h = n[l] || 0, p = s[l] || 0, d, c = !1;
1763
- return h === p ? d = n.index > s.index ? n : s : h < 0 && p < 0 ? (d = h - (n.marker?.radius || 0) >= p - (s.marker?.radius || 0) ? n : s, c = !0) : d = h < p ? n : s, [d, c];
1764
- }, r = (n, s, l) => !l && n > s || n < s, super.searchKDTree(t, e, i, o, r);
1765
- }
1766
- }
1767
- Q.defaultOptions = P(Ge.defaultOptions, { dataLabels: { formatter: function() {
1768
- let { numberFormatter: a } = this.series.chart, { z: t } = this.point;
1769
- return M(t) ? a(t, -1) : "";
1770
- }, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: { lineColor: null, lineWidth: 1, fillOpacity: 0.5, radius: null, states: { hover: { radiusPlus: 0 } }, symbol: "circle" }, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), k(Q.prototype, { alignDataLabel: co.alignDataLabel, applyZones: ne, bubblePadding: !0, isBubble: !0, keysAffectYAxis: ["y"], pointArrayMap: ["y", "z"], pointClass: Ye, parallelArrays: ["x", "y", "z"], trackerGroups: ["group", "dataLabelsGroup"], specialGroup: "group", zoneAxis: "z" }), L(Q, "updatedData", (a) => {
1771
- delete a.target.chart.bubbleZExtremes;
1772
- }), L(Q, "remove", (a) => {
1773
- delete a.target.chart.bubbleZExtremes;
1774
- }), L(Q, "update", (a) => {
1775
- let t = a.target.options;
1776
- (N(t.zMin) || N(t.zMax)) && delete a.target.chart.bubbleZExtremes;
1777
- }), D().registerSeriesType("bubble", Q);
1778
- let Fe = Q, { seriesTypes: { map: { prototype: { pointClass: { prototype: We } } } } } = D();
1779
- class Ze extends Ye {
1780
- isValid() {
1781
- return typeof this.z == "number";
1782
- }
1783
- }
1784
- k(Ze.prototype, { applyOptions: We.applyOptions, getProjectedBounds: We.getProjectedBounds });
1785
- let { seriesTypes: { map: { prototype: rt }, mappoint: { prototype: Ue } } } = D();
1786
- class Dt extends Fe {
1787
- constructor() {
1788
- super(...arguments), this.clearBounds = rt.clearBounds;
1789
- }
1790
- searchPoint(t, e) {
1791
- return this.searchKDTree({ plotX: t.chartX - this.chart.plotLeft, plotY: t.chartY - this.chart.plotTop }, e, t);
1792
- }
1793
- translate() {
1794
- Ue.translate.call(this), this.getRadii(), this.translateBubble();
1795
- }
1796
- }
1797
- Dt.defaultOptions = P(Fe.defaultOptions, { lineWidth: 0, animationLimit: 500, joinBy: "hc-key", tooltip: { pointFormat: "{point.name}: {point.z}" }, stickyTracking: !0 }), k(Dt.prototype, { type: "mapbubble", axisTypes: ["colorAxis"], getProjectedBounds: rt.getProjectedBounds, isCartesian: !1, pointArrayMap: ["z"], pointClass: Ze, processData: rt.processData, projectPoint: Ue.projectPoint, kdAxisArray: ["plotX", "plotY"], setData: rt.setData, setOptions: rt.setOptions, updateData: rt.updateData, useMapGeometry: !0, xyFromShape: !0 }), D().registerSeriesType("mapbubble", Dt);
1798
- let { scatter: { prototype: { pointClass: fo } } } = D().seriesTypes;
1799
- class He extends fo {
1800
- applyOptions(t, e) {
1801
- return (this.isNull || this.value === null) && delete this.color, super.applyOptions(t, e), this.formatPrefix = this.isNull || this.value === null ? "null" : "point", this;
1802
- }
1803
- getCellAttributes() {
1804
- let t = this.series, e = t.options, i = (e.colsize || 1) / 2, o = (e.rowsize || 1) / 2, r = t.xAxis, n = t.yAxis, s = this.options.marker || t.options.marker, l = t.pointPlacementToXValue(), h = C(this.pointPadding, e.pointPadding, 0), p = { x1: q(Math.round(r.len - r.translate(this.x - i, !1, !0, !1, !0, -l)), -r.len, 2 * r.len), x2: q(Math.round(r.len - r.translate(this.x + i, !1, !0, !1, !0, -l)), -r.len, 2 * r.len), y1: q(Math.round(n.translate(this.y - o, !1, !0, !1, !0)), -n.len, 2 * n.len), y2: q(Math.round(n.translate(this.y + o, !1, !0, !1, !0)), -n.len, 2 * n.len) };
1805
- for (let d of [["width", "x"], ["height", "y"]]) {
1806
- let c = d[0], u = d[1], g = u + "1", m = u + "2", f = Math.abs(p[g] - p[m]), y = s && s.lineWidth || 0, b = Math.abs(p[g] + p[m]) / 2, x = s && s[c];
1807
- if (N(x) && x < f) {
1808
- let v = x / 2 + y / 2;
1809
- p[g] = b - v, p[m] = b + v;
1810
- }
1811
- h && ((u === "x" && r.reversed || u === "y" && !n.reversed) && (g = m, m = u + "1"), p[g] += h, p[m] -= h);
1812
- }
1813
- return p;
1814
- }
1815
- haloPath(t) {
1816
- if (!t) return [];
1817
- let { x: e = 0, y: i = 0, width: o = 0, height: r = 0 } = this.shapeArgs || {};
1818
- return [["M", e - t, i - t], ["L", e - t, i + r + t], ["L", e + o + t, i + r + t], ["L", e + o + t, i - t], ["Z"]];
1819
- }
1820
- isValid() {
1821
- return this.value !== 1 / 0 && this.value !== -1 / 0;
1822
- }
1823
- }
1824
- k(He.prototype, { dataLabelOnNull: !0, moveToTopOnHover: !0, ttBelow: !1 });
1825
- let { doc: go } = z(), { series: at, seriesTypes: { column: yo, scatter: _e } } = D(), { prototype: { symbols: Vt } } = ee(), { colorFromPoint: bo, getContext: xo } = { colorFromPoint: function(a, t) {
1826
- let e = t.series.colorAxis;
1827
- if (e) {
1828
- let i = e.toColor(a || 0, t).split(")")[0].split("(")[1].split(",").map((o) => C(parseFloat(o), parseInt(o, 10)));
1829
- return i[3] = 255 * C(i[3], 1), N(a) && t.visible || (i[3] = 0), i;
1830
- }
1831
- return [0, 0, 0, 0];
1832
- }, getContext: function(a) {
1833
- let { canvas: t, context: e } = a;
1834
- return t && e?.clearRect ? (e.clearRect(0, 0, t.width, t.height), e) : (a.canvas = go.createElement("canvas"), a.context = a.canvas.getContext("2d", { willReadFrequently: !0 }) || void 0, a.context);
1835
- } };
1836
- class ft extends _e {
1837
- constructor() {
1838
- super(...arguments), this.valueMax = NaN, this.valueMin = NaN, this.isDirtyCanvas = !0;
1839
- }
1840
- drawPoints() {
1841
- let t = this, e = t.options, i = e.interpolation, o = e.marker || {};
1842
- if (i) {
1843
- let { image: r, chart: n, xAxis: s, yAxis: l } = t, { reversed: h = !1, len: p } = s, { reversed: d = !1, len: c } = l, u = { width: p, height: c };
1844
- if (!r || t.isDirtyData || t.isDirtyCanvas) {
1845
- let g = xo(t), { canvas: m, options: { colsize: f = 1, rowsize: y = 1 }, points: b, points: { length: x } } = t, v = n.colorAxis && n.colorAxis[0];
1846
- if (m && g && v) {
1847
- let { min: w, max: A } = s.getExtremes(), { min: E, max: S } = l.getExtremes(), j = A - w, B = S - E, F = Math.round(j / f / 8 * 8), U = Math.round(B / y / 8 * 8), [gt, yt] = [[F, F / j, h, "ceil"], [U, U / B, !d, "floor"]].map(([tt, $, le, Xt]) => le ? (he) => Math[Xt](tt - $ * he) : (he) => Math[Xt]($ * he)), bt = m.width = F + 1, xt = bt * (m.height = U + 1), vo = (x - 1) / xt, $e = new Uint8ClampedArray(4 * xt), wo = (tt, $) => 4 * Math.ceil(bt * yt($ - E) + gt(tt - w));
1848
- t.buildKDTree();
1849
- for (let tt = 0; tt < xt; tt++) {
1850
- let $ = b[Math.ceil(vo * tt)], { x: le, y: Xt } = $;
1851
- $e.set(bo($.value, $), wo(le, Xt));
1852
- }
1853
- g.putImageData(new ImageData($e, bt), 0, 0), r ? r.attr({ ...u, href: m.toDataURL("image/png", 1) }) : (t.directTouch = !1, t.image = n.renderer.image(m.toDataURL("image/png", 1)).attr(u).add(t.group));
1854
- }
1855
- t.isDirtyCanvas = !1;
1856
- } else (r.width !== p || r.height !== c) && r.attr(u);
1857
- } else (o.enabled || t._hasPointMarkers) && (at.prototype.drawPoints.call(t), t.points.forEach((r) => {
1858
- r.graphic && (r.graphic[t.chart.styledMode ? "css" : "animate"](t.colorAttribs(r)), r.value === null && r.graphic.addClass("highcharts-null-point"));
1859
- }));
1860
- }
1861
- getExtremes() {
1862
- let { dataMin: t, dataMax: e } = at.prototype.getExtremes.call(this, this.getColumn("value"));
1863
- return M(t) && (this.valueMin = t), M(e) && (this.valueMax = e), at.prototype.getExtremes.call(this);
1864
- }
1865
- getValidPoints(t, e) {
1866
- return at.prototype.getValidPoints.call(this, t, e, !0);
1867
- }
1868
- hasData() {
1869
- return !!this.dataTable.rowCount;
1870
- }
1871
- init() {
1872
- super.init.apply(this, arguments);
1873
- let t = this.options;
1874
- t.pointRange = C(t.pointRange, t.colsize || 1), this.yAxis.axisPointRange = t.rowsize || 1, Vt.ellipse = Vt.circle, t.marker && M(t.borderRadius) && (t.marker.r = t.borderRadius);
1875
- let e = this.canvas = document.createElement("canvas");
1876
- e && (this.context = e?.getContext("webgpu"));
1877
- }
1878
- markerAttribs(t, e) {
1879
- let i = t.shapeArgs || {};
1880
- if (t.hasImage) return { x: t.plotX, y: t.plotY };
1881
- if (e && e !== "normal") {
1882
- let o = t.options.marker || {}, r = this.options.marker || {}, n = r.states?.[e] || {}, s = o.states?.[e] || {}, l = (s.width || n.width || i.width || 0) + (s.widthPlus || n.widthPlus || 0), h = (s.height || n.height || i.height || 0) + (s.heightPlus || n.heightPlus || 0);
1883
- return { x: (i.x || 0) + ((i.width || 0) - l) / 2, y: (i.y || 0) + ((i.height || 0) - h) / 2, width: l, height: h };
1884
- }
1885
- return i;
1886
- }
1887
- pointAttribs(t, e) {
1888
- let i = at.prototype.pointAttribs.call(this, t, e), o = this.options || {}, r = this.chart.options.plotOptions || {}, n = r.series || {}, s = r.heatmap || {}, l = t?.options.borderColor || o.borderColor || s.borderColor || n.borderColor, h = t?.options.borderWidth || o.borderWidth || s.borderWidth || n.borderWidth || i["stroke-width"];
1889
- if (i.stroke = t?.marker?.lineColor || o.marker?.lineColor || l || this.color, i["stroke-width"] = h, e && e !== "normal") {
1890
- let p = P(o.states?.[e], o.marker?.states?.[e], t?.options.marker?.states?.[e] || {});
1891
- i.fill = p.color || $t().parse(i.fill).brighten(p.brightness || 0).get(), i.stroke = p.lineColor || i.stroke;
1892
- }
1893
- return i;
1894
- }
1895
- translate() {
1896
- let { borderRadius: t, marker: e } = this.options, i = e?.symbol || "rect", o = Vt[i] ? i : "rect", r = ["circle", "square"].indexOf(o) !== -1;
1897
- for (let n of (this.generatePoints(), this.points)) {
1898
- let s = n.getCellAttributes(), l = Math.min(s.x1, s.x2), h = Math.min(s.y1, s.y2), p = Math.max(Math.abs(s.x2 - s.x1), 0), d = Math.max(Math.abs(s.y2 - s.y1), 0);
1899
- if (n.hasImage = (n.marker?.symbol || i).indexOf("url") === 0, r) {
1900
- let c = Math.abs(p - d);
1901
- l = Math.min(s.x1, s.x2) + (p < d ? 0 : c / 2), h = Math.min(s.y1, s.y2) + (p < d ? c / 2 : 0), p = d = Math.min(p, d);
1902
- }
1903
- n.hasImage && (n.marker = { width: p, height: d }), n.plotX = n.clientX = (s.x1 + s.x2) / 2, n.plotY = (s.y1 + s.y2) / 2, n.shapeType = "path", n.shapeArgs = P(!0, { x: l, y: h, width: p, height: d }, { d: Vt[o](l, h, p, d, { r: M(t) ? t : 0 }) });
1904
- }
1905
- H(this, "afterTranslate");
1906
- }
1907
- }
1908
- ft.defaultOptions = P(_e.defaultOptions, { animation: !1, borderRadius: 0, borderWidth: 0, interpolation: !1, nullColor: "#f7f7f7", dataLabels: { formatter: function() {
1909
- let { numberFormatter: a } = this.series.chart, { value: t } = this.point;
1910
- return M(t) ? a(t, -1) : "";
1911
- }, inside: !0, verticalAlign: "middle", crop: !1, overflow: "allow", padding: 0 }, marker: { symbol: "rect", radius: 0, lineColor: void 0, states: { hover: { lineWidthPlus: 0 }, select: {} } }, clip: !0, pointRange: null, tooltip: { pointFormat: "{point.x}, {point.y}: {point.value}<br/>" }, states: { hover: { halo: !1, brightness: 0.2 } }, legendSymbol: "rectangle" }), L(ft, "afterDataClassLegendClick", function() {
1912
- this.isDirtyCanvas = !0, this.drawPoints(), this.options.enableMouseTracking && this.drawTracker();
1913
- }), k(ft.prototype, { axisTypes: X.seriesMembers.axisTypes, colorKey: X.seriesMembers.colorKey, directTouch: !0, getExtremesFromAll: !0, keysAffectYAxis: ["y"], parallelArrays: X.seriesMembers.parallelArrays, pointArrayMap: ["y", "value"], pointClass: He, specialGroup: "group", trackerGroups: X.seriesMembers.trackerGroups, alignDataLabel: yo.prototype.alignDataLabel, colorAttribs: X.seriesMembers.colorAttribs, getSymbol: at.prototype.getSymbol }), X.compose(ft), D().registerSeriesType("heatmap", ft);
1914
- let I = z();
1915
- I.ColorMapComposition = X, I.MapChart = I.MapChart || jt, I.MapNavigation = I.MapNavigation || At, I.MapView = I.MapView || W, I.Projection = I.Projection || R, I.mapChart = I.Map = I.MapChart.mapChart, I.maps = I.MapChart.maps, I.geojson = zt.geojson, I.topo2geo = zt.topo2geo, zt.compose(I.Chart), Dt.compose(I.Axis, I.Chart, I.Legend), At.compose(jt, I.Pointer, I.SVGRenderer), W.compose(jt);
1916
- let Mo = z();
1917
- return ce.default;
1918
- })());
1919
- })(Rt)), Rt.exports;
1920
- }
1921
- var qe = Lo();
1922
- const Ao = /* @__PURE__ */ Co(qe), zo = /* @__PURE__ */ Po({
1923
- __proto__: null,
1924
- default: Ao
1925
- }, [qe]);
1926
- export {
1927
- zo as m
1928
- };