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