@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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
function
|
|
3
|
-
for (var C = 0; C <
|
|
4
|
-
const B =
|
|
1
|
+
import { g as ss } from "./index-bTz35Vhl.js";
|
|
2
|
+
function os(W, _) {
|
|
3
|
+
for (var C = 0; C < _.length; C++) {
|
|
4
|
+
const B = _[C];
|
|
5
5
|
if (typeof B != "string" && !Array.isArray(B)) {
|
|
6
6
|
for (const I in B)
|
|
7
7
|
if (I !== "default" && !(I in W)) {
|
|
@@ -15,24 +15,26 @@ function is(W, Z) {
|
|
|
15
15
|
}
|
|
16
16
|
return Object.freeze(Object.defineProperty(W, Symbol.toStringTag, { value: "Module" }));
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
18
|
+
var Z = { exports: {} }, ns = Z.exports, xi;
|
|
19
|
+
function as() {
|
|
20
|
+
return xi || (xi = 1, function(W, _) {
|
|
21
21
|
/**
|
|
22
|
-
* Highcharts JS v12.
|
|
22
|
+
* Highcharts JS v12.5.0 (2026-01-12)
|
|
23
23
|
* @module highcharts/modules/annotations
|
|
24
24
|
* @requires highcharts
|
|
25
25
|
*
|
|
26
26
|
* Annotations module
|
|
27
27
|
*
|
|
28
|
-
* (c) 2009-
|
|
28
|
+
* (c) 2009-2026 Highsoft AS
|
|
29
|
+
* Author: Torstein Honsi
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
+
* A commercial license may be required depending on use.
|
|
32
|
+
* See www.highcharts.com/license
|
|
31
33
|
*/
|
|
32
34
|
(function(C, B) {
|
|
33
35
|
W.exports = B(C._Highcharts, C._Highcharts.SeriesRegistry, C._Highcharts.Templating, C._Highcharts.AST);
|
|
34
|
-
})(typeof window
|
|
35
|
-
var
|
|
36
|
+
})("u" < typeof window ? ns : window, (C, B, I, j) => (() => {
|
|
37
|
+
var H, J, Q, tt, it, bi = { 512: (o) => {
|
|
36
38
|
o.exports = B;
|
|
37
39
|
}, 660: (o) => {
|
|
38
40
|
o.exports = j;
|
|
@@ -40,12 +42,12 @@ function ss() {
|
|
|
40
42
|
o.exports = C;
|
|
41
43
|
}, 984: (o) => {
|
|
42
44
|
o.exports = I;
|
|
43
|
-
} },
|
|
45
|
+
} }, yt = {};
|
|
44
46
|
function A(o) {
|
|
45
|
-
var t =
|
|
47
|
+
var t = yt[o];
|
|
46
48
|
if (t !== void 0) return t.exports;
|
|
47
|
-
var i =
|
|
48
|
-
return
|
|
49
|
+
var i = yt[o] = { exports: {} };
|
|
50
|
+
return bi[o](i, i.exports, A), i.exports;
|
|
49
51
|
}
|
|
50
52
|
A.n = (o) => {
|
|
51
53
|
var t = o && o.__esModule ? () => o.default : () => o;
|
|
@@ -54,41 +56,41 @@ function ss() {
|
|
|
54
56
|
for (var i in t) A.o(t, i) && !A.o(o, i) && Object.defineProperty(o, i, { enumerable: !0, get: t[i] });
|
|
55
57
|
}, A.o = (o, t) => Object.prototype.hasOwnProperty.call(o, t);
|
|
56
58
|
var xt = {};
|
|
57
|
-
A.d(xt, { default: () =>
|
|
58
|
-
var
|
|
59
|
-
let { addEvent:
|
|
60
|
-
function
|
|
59
|
+
A.d(xt, { default: () => es });
|
|
60
|
+
var Ai = A(944), m = A.n(Ai);
|
|
61
|
+
let { addEvent: V, erase: vt, find: ki, fireEvent: wi, isArray: Ci, isObject: bt, pick: Ei, wrap: Pi } = m();
|
|
62
|
+
function At(o, t) {
|
|
61
63
|
let i = this.initAnnotation(o);
|
|
62
|
-
return this.options.annotations.push(i.options),
|
|
64
|
+
return this.options.annotations.push(i.options), Ei(t, !0) && (i.redraw(), i.graphic.attr({ opacity: 1 })), i;
|
|
63
65
|
}
|
|
64
|
-
function
|
|
66
|
+
function Oi() {
|
|
65
67
|
let o = this;
|
|
66
68
|
o.plotBoxClip = this.renderer.clipRect(this.plotBox), o.controlPointsGroup = o.renderer.g("control-points").attr({ zIndex: 99 }).clip(o.plotBoxClip).add(), o.options.annotations.forEach((t, i) => {
|
|
67
69
|
if (!o.annotations.some((e) => e.options === t)) {
|
|
68
70
|
let e = o.initAnnotation(t);
|
|
69
71
|
o.options.annotations[i] = e.options;
|
|
70
72
|
}
|
|
71
|
-
}), o.drawAnnotations(),
|
|
73
|
+
}), o.drawAnnotations(), V(o, "redraw", o.drawAnnotations), V(o, "destroy", function() {
|
|
72
74
|
o.plotBoxClip.destroy(), o.controlPointsGroup.destroy();
|
|
73
|
-
}),
|
|
74
|
-
let i = o.annotations, e = (this.options.exporting && this.options.exporting.csv || {}).columnHeaderFormatter, s = !t.dataRows[1].xValues, n = o.options.lang && o.options.lang.exportData && o.options.lang.exportData.annotationHeader, a = t.dataRows[0].length, r = o.options.exporting
|
|
75
|
+
}), V(o, "exportData", function(t) {
|
|
76
|
+
let i = o.annotations, e = (this.options.exporting && this.options.exporting.csv || {}).columnHeaderFormatter, s = !t.dataRows[1].xValues, n = o.options.lang && o.options.lang.exportData && o.options.lang.exportData.annotationHeader, a = t.dataRows[0].length, r = o.options.exporting?.csv?.annotations?.itemDelimiter, h = o.options.exporting?.csv?.annotations?.join;
|
|
75
77
|
i.forEach((g) => {
|
|
76
|
-
g.options.labelOptions
|
|
77
|
-
if (
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
let
|
|
81
|
-
if (
|
|
78
|
+
g.options.labelOptions?.includeInDataExport && g.labels.forEach((u) => {
|
|
79
|
+
if (u.options.text) {
|
|
80
|
+
let p = u.options.text;
|
|
81
|
+
u.points.forEach((d) => {
|
|
82
|
+
let f = d.x, y = d.series.xAxis ? d.series.xAxis.index : -1, x = !1;
|
|
83
|
+
if (y === -1) {
|
|
82
84
|
let v = t.dataRows[0].length, b = Array(v);
|
|
83
85
|
for (let D = 0; D < v; ++D) b[D] = "";
|
|
84
|
-
b.push(
|
|
86
|
+
b.push(p), b.xValues = [], b.xValues[y] = f, t.dataRows.push(b), x = !0;
|
|
85
87
|
}
|
|
86
|
-
if (
|
|
87
|
-
!
|
|
88
|
-
}), !
|
|
88
|
+
if (x || t.dataRows.forEach((v) => {
|
|
89
|
+
!x && v.xValues && y !== void 0 && f === v.xValues[y] && (h && v.length > a ? v[v.length - 1] += r + p : v.push(p), x = !0);
|
|
90
|
+
}), !x) {
|
|
89
91
|
let v = t.dataRows[0].length, b = Array(v);
|
|
90
92
|
for (let D = 0; D < v; ++D) b[D] = "";
|
|
91
|
-
b[0] =
|
|
93
|
+
b[0] = f, b.push(p), b.xValues = [], y !== void 0 && (b.xValues[y] = f), t.dataRows.push(b);
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
96
|
}
|
|
@@ -100,68 +102,68 @@ function ss() {
|
|
|
100
102
|
});
|
|
101
103
|
let l = c - t.dataRows[0].length;
|
|
102
104
|
for (let g = 0; g < l; g++) {
|
|
103
|
-
let
|
|
104
|
-
let
|
|
105
|
-
return e && (
|
|
105
|
+
let u = function(p) {
|
|
106
|
+
let d;
|
|
107
|
+
return e && (d = e(p)) !== !1 ? d : (d = n + " " + p, s ? { columnTitle: d, topLevelColumnTitle: d } : d);
|
|
106
108
|
}(g + 1);
|
|
107
|
-
s ? (t.dataRows[0].push(
|
|
109
|
+
s ? (t.dataRows[0].push(u.topLevelColumnTitle), t.dataRows[1].push(u.columnTitle)) : t.dataRows[0].push(u);
|
|
108
110
|
}
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
|
-
function
|
|
113
|
+
function Bi() {
|
|
112
114
|
this.plotBoxClip.attr(this.plotBox), this.annotations.forEach((o) => {
|
|
113
115
|
o.redraw(), o.graphic.animate({ opacity: 1 }, o.animationConfig);
|
|
114
116
|
});
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
let t = this.annotations, i = o.coll === "annotations" ? o :
|
|
118
|
+
function Ni(o) {
|
|
119
|
+
let t = this.annotations, i = o.coll === "annotations" ? o : ki(t, function(e) {
|
|
118
120
|
return e.options.id === o;
|
|
119
121
|
});
|
|
120
|
-
i && (
|
|
122
|
+
i && (wi(i, "remove"), vt(this.options.annotations, i.options), vt(t, i), i.destroy());
|
|
121
123
|
}
|
|
122
|
-
function
|
|
124
|
+
function Mi() {
|
|
123
125
|
let o = this.options.annotations, t = this.userOptions.annotations;
|
|
124
|
-
this.annotations = [],
|
|
126
|
+
this.annotations = [], Ci(this.options.annotations) || (this.options.annotations = []), bt(t, !0) && bt(o, !0) && this.options.annotations.push(o);
|
|
125
127
|
}
|
|
126
|
-
function
|
|
128
|
+
function Ti(o) {
|
|
127
129
|
this.chart.hasDraggedAnnotation || o.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
128
130
|
}
|
|
129
|
-
(
|
|
131
|
+
(J || (J = {})).compose = function(o, t, i) {
|
|
130
132
|
let e = t.prototype;
|
|
131
133
|
if (!e.addAnnotation) {
|
|
132
134
|
let s = i.prototype;
|
|
133
|
-
|
|
135
|
+
V(t, "afterInit", Mi), e.addAnnotation = At, e.callbacks.push(Oi), e.collectionsWithInit.annotations = [At], e.collectionsWithUpdate.push("annotations"), e.drawAnnotations = Bi, e.removeAnnotation = Ni, e.initAnnotation = function(n) {
|
|
134
136
|
let a = new (o.types[n.type] || o)(this, n);
|
|
135
137
|
return this.annotations.push(a), a;
|
|
136
|
-
},
|
|
138
|
+
}, Pi(s, "onContainerMouseDown", Ti);
|
|
137
139
|
}
|
|
138
140
|
};
|
|
139
|
-
let
|
|
140
|
-
return
|
|
141
|
-
}, includeInDataExport: !0, overflow: "justify", padding: 5, shadow: !1, shape: "callout", style: { fontSize: "0.7em", fontWeight: "normal", color: "contrast" }, useHTML: !1, verticalAlign: "bottom", x: 0, y: -16 }, shapeOptions: { stroke: "rgba(0, 0, 0, 0.75)", strokeWidth: 1, fill: "rgba(0, 0, 0, 0.75)", r: 0, snap: 2 }, controlPointOptions: { events: {}, style: { cursor: "pointer", fill: "#ffffff", stroke: "#000000", "stroke-width": 2 }, height: 10, symbol: "circle", visible: !1, width: 10 }, events: {}, types: {}, zIndex: 6 }, { doc:
|
|
141
|
+
let Di = J, { defined: Ii } = m(), kt = { visible: !0, animation: {}, crop: !0, draggable: "xy", labelOptions: { align: "center", allowOverlap: !1, backgroundColor: "rgba(0, 0, 0, 0.75)", borderColor: "#000000", borderRadius: 3, borderWidth: 1, className: "highcharts-no-tooltip", crop: !1, formatter: function() {
|
|
142
|
+
return Ii(this.y) ? "" + this.y : "Annotation label";
|
|
143
|
+
}, includeInDataExport: !0, overflow: "justify", padding: 5, shadow: !1, shape: "callout", style: { fontSize: "0.7em", fontWeight: "normal", color: "contrast" }, useHTML: !1, verticalAlign: "bottom", x: 0, y: -16 }, shapeOptions: { stroke: "rgba(0, 0, 0, 0.75)", strokeWidth: 1, fill: "rgba(0, 0, 0, 0.75)", r: 0, snap: 2 }, controlPointOptions: { events: {}, style: { cursor: "pointer", fill: "#ffffff", stroke: "#000000", "stroke-width": 2 }, height: 10, symbol: "circle", visible: !1, width: 10 }, events: {}, typeOptions: {}, types: {}, zIndex: 6 }, { doc: wt, isTouchDevice: q } = m(), { addEvent: L, fireEvent: et, objectEach: Li, pick: Ct, removeEvent: Yi } = m(), Et = class {
|
|
142
144
|
addEvents() {
|
|
143
145
|
let o = this, t = function(i) {
|
|
144
|
-
|
|
146
|
+
L(i, q ? "touchstart" : "mousedown", (e) => {
|
|
145
147
|
o.onMouseDown(e);
|
|
146
148
|
}, { passive: !1 });
|
|
147
149
|
};
|
|
148
150
|
if (t(this.graphic.element), (o.labels || []).forEach((i) => {
|
|
149
151
|
i.options.useHTML && i.graphic.text && !i.graphic.text.foreignObject && t(i.graphic.text.element);
|
|
150
|
-
}),
|
|
152
|
+
}), Li(o.options.events, (i, e) => {
|
|
151
153
|
let s = function(n) {
|
|
152
154
|
e === "click" && o.cancelClick || i.call(o, o.chart.pointer?.normalize(n), o.target);
|
|
153
155
|
};
|
|
154
|
-
(o.nonDOMEvents || []).indexOf(e) === -1 ? (
|
|
155
|
-
}), o.options.draggable && (
|
|
156
|
+
(o.nonDOMEvents || []).indexOf(e) === -1 ? (L(o.graphic.element, e, s, { passive: !1 }), o.graphic.div && L(o.graphic.div, e, s, { passive: !1 })) : L(o, e, s, { passive: !1 });
|
|
157
|
+
}), o.options.draggable && (L(o, "drag", o.onDrag), !o.graphic.renderer.styledMode)) {
|
|
156
158
|
let i = { cursor: { x: "ew-resize", y: "ns-resize", xy: "move" }[o.options.draggable] };
|
|
157
159
|
o.graphic.css(i), (o.labels || []).forEach((e) => {
|
|
158
160
|
e.options.useHTML && e.graphic.text && !e.graphic.text.foreignObject && e.graphic.text.css(i);
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
|
-
o.isUpdating ||
|
|
163
|
+
o.isUpdating || et(o, "add");
|
|
162
164
|
}
|
|
163
165
|
destroy() {
|
|
164
|
-
this.removeDocEvents(),
|
|
166
|
+
this.removeDocEvents(), Yi(this), this.hcEvents = null;
|
|
165
167
|
}
|
|
166
168
|
mouseMoveToRadians(o, t, i) {
|
|
167
169
|
let e = o.prevChartY - i, s = o.prevChartX - t, n = o.chartY - i, a = o.chartX - t, r;
|
|
@@ -188,11 +190,11 @@ function ss() {
|
|
|
188
190
|
onMouseDown(o) {
|
|
189
191
|
if (o.preventDefault && o.preventDefault(), o.button === 2) return;
|
|
190
192
|
let t = this, i = t.chart.pointer, e = o?.sourceCapabilities?.firesTouchEvents || !1, s = (o = i?.normalize(o) || o).chartX, n = o.chartY;
|
|
191
|
-
t.cancelClick = !1, t.chart.hasDraggedAnnotation = !0, t.removeDrag =
|
|
192
|
-
t.hasDragged = !0, (a = i?.normalize(a) || a).prevChartX = s, a.prevChartY = n,
|
|
193
|
-
}, q || e ? { passive: !1 } : void 0), t.removeMouseUp =
|
|
194
|
-
let a =
|
|
195
|
-
a && (a.cancelClick = t.hasDragged), t.cancelClick = t.hasDragged, t.chart.hasDraggedAnnotation = !1, t.hasDragged &&
|
|
193
|
+
t.cancelClick = !1, t.chart.hasDraggedAnnotation = !0, t.removeDrag = L(wt, q || e ? "touchmove" : "mousemove", function(a) {
|
|
194
|
+
t.hasDragged = !0, (a = i?.normalize(a) || a).prevChartX = s, a.prevChartY = n, et(t, "drag", a), s = a.chartX, n = a.chartY;
|
|
195
|
+
}, q || e ? { passive: !1 } : void 0), t.removeMouseUp = L(wt, q || e ? "touchend" : "mouseup", function() {
|
|
196
|
+
let a = Ct(t.target && t.target.annotation, t.target);
|
|
197
|
+
a && (a.cancelClick = t.hasDragged), t.cancelClick = t.hasDragged, t.chart.hasDraggedAnnotation = !1, t.hasDragged && et(Ct(a, t), "afterUpdate"), t.hasDragged = !1, t.onMouseUp();
|
|
196
198
|
}, q || e ? { passive: !1 } : void 0);
|
|
197
199
|
}
|
|
198
200
|
onMouseUp() {
|
|
@@ -201,9 +203,9 @@ function ss() {
|
|
|
201
203
|
removeDocEvents() {
|
|
202
204
|
this.removeDrag && (this.removeDrag = this.removeDrag()), this.removeMouseUp && (this.removeMouseUp = this.removeMouseUp());
|
|
203
205
|
}
|
|
204
|
-
}, { merge:
|
|
206
|
+
}, { merge: Si, pick: Xi } = m(), Pt = class extends Et {
|
|
205
207
|
constructor(o, t, i, e) {
|
|
206
|
-
super(), this.nonDOMEvents = ["drag"], this.chart = o, this.target = t, this.options = i, this.index =
|
|
208
|
+
super(), this.nonDOMEvents = ["drag"], this.chart = o, this.target = t, this.options = i, this.index = Xi(i.index, e);
|
|
207
209
|
}
|
|
208
210
|
destroy() {
|
|
209
211
|
super.destroy(), this.graphic && (this.graphic = this.graphic.destroy()), this.chart = null, this.target = null, this.options = null;
|
|
@@ -219,12 +221,12 @@ function ss() {
|
|
|
219
221
|
this.graphic[o ? "show" : "hide"](), this.options.visible = o;
|
|
220
222
|
}
|
|
221
223
|
update(o) {
|
|
222
|
-
let t = this.chart, i = this.target, e = this.index, s =
|
|
224
|
+
let t = this.chart, i = this.target, e = this.index, s = Si(!0, this.options, o);
|
|
223
225
|
this.destroy(), this.constructor(t, i, s, e), this.render(t.controlPointsGroup), this.redraw();
|
|
224
226
|
}
|
|
225
227
|
};
|
|
226
|
-
var
|
|
227
|
-
let { series: { prototype:
|
|
228
|
+
var Fi = A(512), Ot = A.n(Fi);
|
|
229
|
+
let { series: { prototype: Ri } } = Ot(), { defined: st, fireEvent: Ui } = m();
|
|
228
230
|
class Y {
|
|
229
231
|
static fromPoint(t) {
|
|
230
232
|
return new Y(t.series.chart, null, { x: t.x, y: t.y, xAxis: t.series.xAxis, yAxis: t.series.yAxis });
|
|
@@ -237,20 +239,20 @@ function ss() {
|
|
|
237
239
|
return { x: t.x, y: t.y, xAxis: t.series.xAxis, yAxis: t.series.yAxis };
|
|
238
240
|
}
|
|
239
241
|
constructor(t, i, e) {
|
|
240
|
-
this.mock = !0, this.point = this, this.series = { visible: !0, chart: t, getPlotBox:
|
|
242
|
+
this.mock = !0, this.point = this, this.series = { visible: !0, chart: t, getPlotBox: Ri.getPlotBox }, this.target = i || null, this.options = e, this.applyOptions(this.getOptions());
|
|
241
243
|
}
|
|
242
244
|
applyOptions(t) {
|
|
243
245
|
this.command = t.command, this.setAxis(t, "x"), this.setAxis(t, "y"), this.refresh();
|
|
244
246
|
}
|
|
245
247
|
getOptions() {
|
|
246
|
-
return this.hasDynamicOptions() ? this.options(this.target) : this.options;
|
|
248
|
+
return this.hasDynamicOptions() && typeof this.options == "function" ? this.options(this.target) : this.options;
|
|
247
249
|
}
|
|
248
250
|
hasDynamicOptions() {
|
|
249
251
|
return typeof this.options == "function";
|
|
250
252
|
}
|
|
251
253
|
isInsidePlot() {
|
|
252
254
|
let t = this.plotX, i = this.plotY, e = this.series.xAxis, s = this.series.yAxis, n = { x: t, y: i, isInsidePlot: !0, options: {} };
|
|
253
|
-
return e && (n.isInsidePlot =
|
|
255
|
+
return e && (n.isInsidePlot = st(t) && t >= 0 && t <= e.len), s && (n.isInsidePlot = n.isInsidePlot && st(i) && i >= 0 && i <= s.len), Ui(this.series.chart, "afterIsInsidePlot", n), n.isInsidePlot;
|
|
254
256
|
}
|
|
255
257
|
refresh() {
|
|
256
258
|
let t = this.series, i = t.xAxis, e = t.yAxis, s = this.getOptions();
|
|
@@ -274,7 +276,7 @@ function ss() {
|
|
|
274
276
|
}
|
|
275
277
|
setAxis(t, i) {
|
|
276
278
|
let e = i + "Axis", s = t[e], n = this.series.chart;
|
|
277
|
-
this.series[e] = typeof s == "object" ? s :
|
|
279
|
+
this.series[e] = typeof s == "object" ? s : st(s) ? n[e][s] || n.get(s) : null;
|
|
278
280
|
}
|
|
279
281
|
toAnchor() {
|
|
280
282
|
let t = [this.plotX, this.plotY, 0, 0];
|
|
@@ -286,80 +288,80 @@ function ss() {
|
|
|
286
288
|
}
|
|
287
289
|
(function(o) {
|
|
288
290
|
function t() {
|
|
289
|
-
let
|
|
290
|
-
|
|
291
|
-
let
|
|
292
|
-
|
|
291
|
+
let p = this.controlPoints, d = this.options.controlPoints || [];
|
|
292
|
+
d.forEach((f, y) => {
|
|
293
|
+
let x = m().merge(this.options.controlPointOptions, f);
|
|
294
|
+
x.index || (x.index = y), d[y] = x, p.push(new Pt(this.chart, this, x));
|
|
293
295
|
});
|
|
294
296
|
}
|
|
295
|
-
function i(
|
|
296
|
-
let
|
|
297
|
-
return { relativePosition:
|
|
297
|
+
function i(p) {
|
|
298
|
+
let d = p.series.getPlotBox(), f = p.series.chart, y = p.mock ? p.toAnchor() : f.tooltip && f.tooltip.getAnchor.call({ chart: p.series.chart }, p) || [0, 0, 0, 0], x = { x: y[0] + (this.options.x || 0), y: y[1] + (this.options.y || 0), height: y[2] || 0, width: y[3] || 0 };
|
|
299
|
+
return { relativePosition: x, absolutePosition: m().merge(x, { x: x.x + (p.mock ? d.translateX : f.plotLeft), y: x.y + (p.mock ? d.translateY : f.plotTop) }) };
|
|
298
300
|
}
|
|
299
301
|
function e() {
|
|
300
|
-
this.controlPoints.forEach((
|
|
302
|
+
this.controlPoints.forEach((p) => p.destroy()), this.chart = null, this.controlPoints = null, this.points = null, this.options = null, this.annotation && (this.annotation = null);
|
|
301
303
|
}
|
|
302
304
|
function s() {
|
|
303
|
-
let
|
|
304
|
-
return
|
|
305
|
+
let p = this.options;
|
|
306
|
+
return p.points || p.point && m().splat(p.point);
|
|
305
307
|
}
|
|
306
308
|
function n() {
|
|
307
|
-
let
|
|
308
|
-
for (
|
|
309
|
-
if (!(
|
|
310
|
-
|
|
309
|
+
let p, d, f = this.getPointsOptions(), y = this.points, x = f?.length || 0;
|
|
310
|
+
for (p = 0; p < x; p++) {
|
|
311
|
+
if (!(d = this.point(f[p], y[p]))) {
|
|
312
|
+
y.length = 0;
|
|
311
313
|
return;
|
|
312
314
|
}
|
|
313
|
-
|
|
315
|
+
d.mock && d.refresh(), y[p] = d;
|
|
314
316
|
}
|
|
315
|
-
return
|
|
316
|
-
}
|
|
317
|
-
function a(
|
|
318
|
-
if (
|
|
319
|
-
if (!
|
|
320
|
-
if (
|
|
321
|
-
else if (
|
|
322
|
-
else if (typeof
|
|
323
|
-
let
|
|
324
|
-
|
|
317
|
+
return y;
|
|
318
|
+
}
|
|
319
|
+
function a(p, d) {
|
|
320
|
+
if (p && p.series) return p;
|
|
321
|
+
if (!d || d.series === null) {
|
|
322
|
+
if (m().isObject(p)) d = new Y(this.chart, this, p);
|
|
323
|
+
else if (m().isString(p)) d = this.chart.get(p) || null;
|
|
324
|
+
else if (typeof p == "function") {
|
|
325
|
+
let f = p.call(d, this);
|
|
326
|
+
d = f.series ? f : new Y(this.chart, this, p);
|
|
325
327
|
}
|
|
326
328
|
}
|
|
327
|
-
return
|
|
329
|
+
return d;
|
|
328
330
|
}
|
|
329
|
-
function r(
|
|
330
|
-
this.controlPoints.forEach((
|
|
331
|
+
function r(p) {
|
|
332
|
+
this.controlPoints.forEach((d) => d.redraw(p));
|
|
331
333
|
}
|
|
332
334
|
function h() {
|
|
333
|
-
this.controlPoints.forEach((
|
|
335
|
+
this.controlPoints.forEach((p) => p.render());
|
|
334
336
|
}
|
|
335
|
-
function c(
|
|
337
|
+
function c(p, d, f, y, x) {
|
|
336
338
|
if (this.chart.inverted) {
|
|
337
|
-
let v =
|
|
338
|
-
|
|
339
|
+
let v = d;
|
|
340
|
+
d = f, f = v;
|
|
339
341
|
}
|
|
340
|
-
this.points.forEach((v, b) => this.transformPoint(
|
|
342
|
+
this.points.forEach((v, b) => this.transformPoint(p, d, f, y, x, b), this);
|
|
341
343
|
}
|
|
342
|
-
function l(
|
|
344
|
+
function l(p, d, f, y, x, v) {
|
|
343
345
|
let b = this.points[v];
|
|
344
|
-
b.mock || (b = this.points[v] = Y.fromPoint(b)), b[
|
|
346
|
+
b.mock || (b = this.points[v] = Y.fromPoint(b)), b[p](d, f, y, x);
|
|
345
347
|
}
|
|
346
|
-
function g(
|
|
347
|
-
this.transform("translate", null, null,
|
|
348
|
+
function g(p, d) {
|
|
349
|
+
this.transform("translate", null, null, p, d);
|
|
348
350
|
}
|
|
349
|
-
function
|
|
350
|
-
this.transformPoint("translate", null, null,
|
|
351
|
+
function u(p, d, f) {
|
|
352
|
+
this.transformPoint("translate", null, null, p, d, f);
|
|
351
353
|
}
|
|
352
|
-
o.compose = function(
|
|
353
|
-
let
|
|
354
|
-
|
|
354
|
+
o.compose = function(p) {
|
|
355
|
+
let d = p.prototype;
|
|
356
|
+
d.addControlPoints || m().merge(!0, d, { addControlPoints: t, anchor: i, destroyControlTarget: e, getPointsOptions: s, linkPoints: n, point: a, redrawControlPoints: r, renderControlPoints: h, transform: c, transformPoint: l, translate: g, translatePoint: u });
|
|
355
357
|
};
|
|
356
|
-
})(
|
|
357
|
-
let
|
|
358
|
-
class
|
|
358
|
+
})(Q || (Q = {}));
|
|
359
|
+
let Bt = Q, { merge: Nt } = m();
|
|
360
|
+
class Mt {
|
|
359
361
|
constructor(t, i, e, s) {
|
|
360
362
|
this.annotation = t, this.chart = t.chart, this.collection = s === "label" ? "labels" : "shapes", this.controlPoints = [], this.options = i, this.points = [], this.index = e, this.itemType = s, this.init(t, i, e);
|
|
361
363
|
}
|
|
362
|
-
attr(
|
|
364
|
+
attr() {
|
|
363
365
|
this.graphic.attr.apply(this.graphic, arguments);
|
|
364
366
|
}
|
|
365
367
|
attrsFromOptions(t) {
|
|
@@ -398,32 +400,32 @@ function ss() {
|
|
|
398
400
|
this.translatePoint(t, i, 0), e && this.translatePoint(t, i, 1), r[this.collection][this.index].point = this.options.point, n[this.collection][this.index].point = this.options.point;
|
|
399
401
|
}
|
|
400
402
|
update(t) {
|
|
401
|
-
let i = this.annotation, e =
|
|
402
|
-
this.destroy(),
|
|
403
|
+
let i = this.annotation, e = Nt(!0, this.options, t), s = this.graphic.parentGroup, n = this.constructor;
|
|
404
|
+
this.destroy(), Nt(!0, this, new n(i, e, this.index, this.itemType)), this.render(s), this.redraw();
|
|
403
405
|
}
|
|
404
406
|
}
|
|
405
|
-
|
|
406
|
-
let R =
|
|
407
|
-
function
|
|
407
|
+
Bt.compose(Mt);
|
|
408
|
+
let R = Mt, { defaultMarkers: Wi } = { defaultMarkers: { arrow: { tagName: "marker", attributes: { id: "arrow", refY: 5, refX: 9, markerWidth: 10, markerHeight: 10 }, children: [{ tagName: "path", attributes: { d: "M 0 0 L 10 5 L 0 10 Z", "stroke-width": 0 } }] }, "reverse-arrow": { tagName: "marker", attributes: { id: "reverse-arrow", refY: 5, refX: 1, markerWidth: 10, markerHeight: 10 }, children: [{ tagName: "path", attributes: { d: "M 0 5 L 10 0 L 10 10 Z", "stroke-width": 0 } }] } } }, { addEvent: ji, defined: qi, extend: Hi, merge: z, uniqueKey: Vi } = m(), zi = Dt("marker-end"), Ki = Dt("marker-start"), Tt = "rgba(192,192,192," + (m().svg ? 1e-4 : 2e-3) + ")";
|
|
409
|
+
function Dt(o) {
|
|
408
410
|
return function(t) {
|
|
409
411
|
this.attr(o, "url(#" + t + ")");
|
|
410
412
|
};
|
|
411
413
|
}
|
|
412
|
-
function
|
|
413
|
-
this.options.defs =
|
|
414
|
+
function Gi() {
|
|
415
|
+
this.options.defs = z(Wi, this.options.defs || {});
|
|
414
416
|
}
|
|
415
|
-
function
|
|
417
|
+
function $i(o, t) {
|
|
416
418
|
let i = { attributes: { id: o } }, e = { stroke: t.color || "none", fill: t.color || "rgba(0, 0, 0, 0.75)" };
|
|
417
419
|
i.children = t.children && t.children.map(function(a) {
|
|
418
|
-
return
|
|
420
|
+
return z(e, a);
|
|
419
421
|
});
|
|
420
|
-
let s =
|
|
422
|
+
let s = z(!0, { attributes: { markerWidth: 20, markerHeight: 20, refX: 0, refY: 0, orient: "auto" } }, t, i), n = this.definition(s);
|
|
421
423
|
return n.id = o, n;
|
|
422
424
|
}
|
|
423
425
|
class U extends R {
|
|
424
426
|
static compose(t, i) {
|
|
425
427
|
let e = i.prototype;
|
|
426
|
-
e.addMarker || (
|
|
428
|
+
e.addMarker || (ji(t, "afterGetContainer", Gi), e.addMarker = $i);
|
|
427
429
|
}
|
|
428
430
|
constructor(t, i, e) {
|
|
429
431
|
super(t, i, e, "shape"), this.type = "path";
|
|
@@ -440,7 +442,7 @@ function ss() {
|
|
|
440
442
|
}
|
|
441
443
|
render(t) {
|
|
442
444
|
let i = this.options, e = this.attrsFromOptions(i);
|
|
443
|
-
this.graphic = this.annotation.chart.renderer.path([["M", 0, 0]]).attr(e).add(t), this.tracker = this.annotation.chart.renderer.path([["M", 0, 0]]).addClass("highcharts-tracker-line").attr({ zIndex: 2 }).add(t), this.annotation.chart.styledMode || this.tracker.attr({ "stroke-linejoin": "round", stroke:
|
|
445
|
+
this.graphic = this.annotation.chart.renderer.path([["M", 0, 0]]).attr(e).add(t), this.tracker = this.annotation.chart.renderer.path([["M", 0, 0]]).addClass("highcharts-tracker-line").attr({ zIndex: 2 }).add(t), this.annotation.chart.styledMode || this.tracker.attr({ "stroke-linejoin": "round", stroke: Tt, fill: Tt, "stroke-width": this.graphic.strokeWidth() + 2 * i.snap }), super.render(), Hi(this.graphic, { markerStartSetter: Ki, markerEndSetter: zi }), this.setMarkers(this);
|
|
444
446
|
}
|
|
445
447
|
redraw(t) {
|
|
446
448
|
if (this.graphic) {
|
|
@@ -450,22 +452,22 @@ function ss() {
|
|
|
450
452
|
super.redraw(t);
|
|
451
453
|
}
|
|
452
454
|
setMarkers(t) {
|
|
453
|
-
let i = t.options, e = t.chart, s = e.options.defs, n = i.fill, a =
|
|
455
|
+
let i = t.options, e = t.chart, s = e.options.defs, n = i.fill, a = qi(n) && n !== "none" ? n : i.stroke;
|
|
454
456
|
["markerStart", "markerEnd"].forEach(function(r) {
|
|
455
|
-
let h, c, l, g,
|
|
456
|
-
if (
|
|
457
|
-
for (l in s) if ((
|
|
457
|
+
let h, c, l, g, u = i[r];
|
|
458
|
+
if (u) {
|
|
459
|
+
for (l in s) if ((u === ((h = s[l]).attributes && h.attributes.id) || u === h.id) && h.tagName === "marker") {
|
|
458
460
|
c = h;
|
|
459
461
|
break;
|
|
460
462
|
}
|
|
461
|
-
c && (g = t[r] = e.renderer.addMarker((i.id ||
|
|
463
|
+
c && (g = t[r] = e.renderer.addMarker((i.id || Vi()) + "-" + u, z(c, { color: a })), t.attr(r, g.getAttribute("id")));
|
|
462
464
|
}
|
|
463
465
|
});
|
|
464
466
|
}
|
|
465
467
|
}
|
|
466
468
|
U.attrsMap = { dashStyle: "dashstyle", strokeWidth: "stroke-width", stroke: "stroke", fill: "fill", zIndex: "zIndex" };
|
|
467
|
-
let { merge:
|
|
468
|
-
class
|
|
469
|
+
let { merge: Zi } = m();
|
|
470
|
+
class It extends R {
|
|
469
471
|
constructor(t, i, e) {
|
|
470
472
|
super(t, i, e, "shape"), this.type = "rect", this.translate = super.translateShape;
|
|
471
473
|
}
|
|
@@ -481,9 +483,9 @@ function ss() {
|
|
|
481
483
|
super.redraw(t);
|
|
482
484
|
}
|
|
483
485
|
}
|
|
484
|
-
|
|
485
|
-
let { merge:
|
|
486
|
-
class
|
|
486
|
+
It.attrsMap = Zi(U.attrsMap, { width: "width", height: "height" });
|
|
487
|
+
let { merge: _i } = m();
|
|
488
|
+
class Lt extends R {
|
|
487
489
|
constructor(t, i, e) {
|
|
488
490
|
super(t, i, e, "shape"), this.type = "circle", this.translate = super.translateShape;
|
|
489
491
|
}
|
|
@@ -502,16 +504,16 @@ function ss() {
|
|
|
502
504
|
this.options.r = t;
|
|
503
505
|
}
|
|
504
506
|
}
|
|
505
|
-
|
|
506
|
-
let { merge:
|
|
507
|
-
class
|
|
507
|
+
Lt.attrsMap = _i(U.attrsMap, { r: "r" });
|
|
508
|
+
let { merge: Ji, defined: ot } = m();
|
|
509
|
+
class Yt extends R {
|
|
508
510
|
constructor(t, i, e) {
|
|
509
511
|
super(t, i, e, "shape"), this.type = "ellipse";
|
|
510
512
|
}
|
|
511
513
|
init(t, i, e) {
|
|
512
|
-
|
|
514
|
+
ot(i.yAxis) && i.points.forEach((s) => {
|
|
513
515
|
s.yAxis = i.yAxis;
|
|
514
|
-
}),
|
|
516
|
+
}), ot(i.xAxis) && i.points.forEach((s) => {
|
|
515
517
|
s.xAxis = i.xAxis;
|
|
516
518
|
}), super.init(t, i, e);
|
|
517
519
|
}
|
|
@@ -530,7 +532,7 @@ function ss() {
|
|
|
530
532
|
}
|
|
531
533
|
getRY() {
|
|
532
534
|
let t = this.getYAxis();
|
|
533
|
-
return
|
|
535
|
+
return ot(t) ? Math.abs(t.toPixels(this.options.ry) - t.toPixels(0)) : this.options.ry;
|
|
534
536
|
}
|
|
535
537
|
getYAxis() {
|
|
536
538
|
let t = this.options.yAxis;
|
|
@@ -551,23 +553,23 @@ function ss() {
|
|
|
551
553
|
this.options.ry = t, i && i[0] && (i[0].ry = t, i[0].ry = t);
|
|
552
554
|
}
|
|
553
555
|
}
|
|
554
|
-
|
|
555
|
-
var
|
|
556
|
-
let { format:
|
|
557
|
-
function
|
|
556
|
+
Yt.attrsMap = Ji(U.attrsMap, { ry: "ry" });
|
|
557
|
+
var Qi = A(984), St = A.n(Qi);
|
|
558
|
+
let { format: te } = St(), { extend: ie, getAlignFactor: Xt, isNumber: Ft, pick: ee } = m();
|
|
559
|
+
function se(o, t, i, e, s) {
|
|
558
560
|
let n = s && s.anchorX, a = s && s.anchorY, r, h, c = i / 2;
|
|
559
|
-
return
|
|
561
|
+
return Ft(n) && Ft(a) && (r = [["M", n, a]], (h = t - a) < 0 && (h = -e - h), h < i && (c = n < o + i / 2 ? h : i - h), a > t + e ? r.push(["L", o + c, t + e]) : a < t ? r.push(["L", o + c, t]) : n < o ? r.push(["L", o, t + e / 2]) : n > o + i && r.push(["L", o + i, t + e / 2])), r || [];
|
|
560
562
|
}
|
|
561
563
|
class E extends R {
|
|
562
564
|
static alignedPosition(t, i) {
|
|
563
|
-
return { x: Math.round((i.x || 0) + (t.x || 0) + (i.width - (t.width || 0)) *
|
|
565
|
+
return { x: Math.round((i.x || 0) + (t.x || 0) + (i.width - (t.width || 0)) * Xt(t.align)), y: Math.round((i.y || 0) + (t.y || 0) + (i.height - (t.height || 0)) * Xt(t.verticalAlign)) };
|
|
564
566
|
}
|
|
565
567
|
static compose(t) {
|
|
566
|
-
t.prototype.symbols.connector =
|
|
568
|
+
t.prototype.symbols.connector = se;
|
|
567
569
|
}
|
|
568
570
|
static justifiedOptions(t, i, e, s) {
|
|
569
|
-
let n, a = e.align, r = e.verticalAlign, h = i.box ? 0 : i.padding || 0, c = i.getBBox(), l = { align: a, verticalAlign: r, x: e.x, y: e.y, width: i.width, height: i.height }, g = (s.x || 0) - t.plotLeft,
|
|
570
|
-
return (n = g + h) < 0 && (a === "right" ? l.align = "left" : l.x = (l.x || 0) - n), (n = g + c.width - h) > t.plotWidth && (a === "left" ? l.align = "right" : l.x = (l.x || 0) + t.plotWidth - n), (n =
|
|
571
|
+
let n, a = e.align, r = e.verticalAlign, h = i.box ? 0 : i.padding || 0, c = i.getBBox(), l = { align: a, verticalAlign: r, x: e.x, y: e.y, width: i.width, height: i.height }, g = (s.x || 0) - t.plotLeft, u = (s.y || 0) - t.plotTop;
|
|
572
|
+
return (n = g + h) < 0 && (a === "right" ? l.align = "left" : l.x = (l.x || 0) - n), (n = g + c.width - h) > t.plotWidth && (a === "left" ? l.align = "right" : l.x = (l.x || 0) + t.plotWidth - n), (n = u + h) < 0 && (r === "bottom" ? l.verticalAlign = "top" : l.y = (l.y || 0) - n), (n = u + c.height - h) > t.plotHeight && (r === "top" ? l.verticalAlign = "bottom" : l.y = (l.y || 0) + t.plotHeight - n), l;
|
|
571
573
|
}
|
|
572
574
|
constructor(t, i, e) {
|
|
573
575
|
super(t, i, e, "label");
|
|
@@ -576,28 +578,29 @@ function ss() {
|
|
|
576
578
|
super.translatePoint(t, i, 0);
|
|
577
579
|
}
|
|
578
580
|
translate(t, i) {
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
var e, s;
|
|
582
|
+
let n = this.annotation.chart, a = this.annotation.userOptions, r = n.annotations.indexOf(this.annotation), h = n.options.annotations[r];
|
|
583
|
+
if (n.inverted) {
|
|
584
|
+
let c = t;
|
|
585
|
+
t = i, i = c;
|
|
583
586
|
}
|
|
584
|
-
this.options.x += t, this.options.y += i,
|
|
587
|
+
(e = this.options).x || (e.x = 0), (s = this.options).y || (s.y = 0), this.options.x += t, this.options.y += i, h[this.collection][this.index].x = this.options.x, h[this.collection][this.index].y = this.options.y, a[this.collection][this.index].x = this.options.x, a[this.collection][this.index].y = this.options.y;
|
|
585
588
|
}
|
|
586
589
|
render(t) {
|
|
587
590
|
let i = this.options, e = this.attrsFromOptions(i), s = i.style, n = this.annotation.chart.options.chart, a = n.plotBackgroundColor || n.backgroundColor;
|
|
588
591
|
if (this.graphic = this.annotation.chart.renderer.label("", 0, -9999, i.shape, void 0, void 0, i.useHTML, void 0, "annotation-label").attr(e).add(t), !this.annotation.chart.styledMode) {
|
|
589
|
-
if (s
|
|
590
|
-
let r = E.shapesWithoutBackground.indexOf(i.shape) > -1 || i.backgroundColor === "none" ? a : i.backgroundColor;
|
|
592
|
+
if (s?.color === "contrast") {
|
|
593
|
+
let r = !i.shape || E.shapesWithoutBackground.indexOf(i.shape) > -1 || i.backgroundColor === "none" ? a : i.backgroundColor;
|
|
591
594
|
s.color = this.annotation.chart.renderer.getContrast(typeof r == "string" ? r : typeof a == "string" ? a : "#ffffff");
|
|
592
595
|
}
|
|
593
|
-
this.graphic.css(i.style).shadow(i.shadow);
|
|
596
|
+
this.graphic.css(i.style || {}).shadow(i.shadow);
|
|
594
597
|
}
|
|
595
598
|
this.graphic.labelrank = i.labelrank, super.render();
|
|
596
599
|
}
|
|
597
600
|
redraw(t) {
|
|
598
601
|
let i = this.options, e = this.text || i.format || i.text, s = this.graphic, n = this.points[0];
|
|
599
602
|
if (!s) return void this.redraw(t);
|
|
600
|
-
s.attr({ text: e ?
|
|
603
|
+
s.attr({ text: e ? te(String(e), n, this.annotation.chart) : i.formatter.call(n, this) });
|
|
601
604
|
let a = this.anchor(n), r = this.position(a);
|
|
602
605
|
r ? (s.alignAttr = r, r.anchorX = a.absolutePosition.x, r.anchorY = a.absolutePosition.y, s[t ? "animate" : "attr"](r)) : s.attr({ x: 0, y: -9999 }), s.placed = !!r, super.redraw(t);
|
|
603
606
|
}
|
|
@@ -606,16 +609,16 @@ function ss() {
|
|
|
606
609
|
return i.absolutePosition.x -= e, i.absolutePosition.y -= s, i.relativePosition.x -= e, i.relativePosition.y -= s, i;
|
|
607
610
|
}
|
|
608
611
|
position(t) {
|
|
609
|
-
let i = this.graphic, e = this.annotation.chart, s = e.tooltip, n = this.points[0], a = this.options, r = t.absolutePosition, h = t.relativePosition, c, l, g,
|
|
610
|
-
if (i &&
|
|
611
|
-
let { width:
|
|
612
|
-
a.distance && s ? c = s.getPosition.call({ chart: e, distance:
|
|
612
|
+
let i = this.graphic, e = this.annotation.chart, s = e.tooltip, n = this.points[0], a = this.options, r = t.absolutePosition, h = t.relativePosition, c, l, g, u, p = n.series.visible && Y.prototype.isInsidePlot.call(n);
|
|
613
|
+
if (i && p) {
|
|
614
|
+
let { width: d = 0, height: f = 0 } = i;
|
|
615
|
+
a.distance && s ? c = s.getPosition.call({ chart: e, distance: ee(a.distance, 16), getPlayingField: s.getPlayingField, pointer: s.pointer }, d, f, { plotX: h.x, plotY: h.y, negative: n.negative, ttBelow: n.ttBelow, h: h.height || h.width }) : a.positioner ? c = a.positioner.call(this) : (l = { x: r.x, y: r.y, width: 0, height: 0 }, c = E.alignedPosition(ie(a, { width: d, height: f }), l), this.options.overflow === "justify" && (c = E.alignedPosition(E.justifiedOptions(e, i, a, c), l))), a.crop && (g = c.x - e.plotLeft, u = c.y - e.plotTop, p = e.isInsidePlot(g, u) && e.isInsidePlot(g + d, u + f));
|
|
613
616
|
}
|
|
614
|
-
return
|
|
617
|
+
return p ? c : null;
|
|
615
618
|
}
|
|
616
619
|
}
|
|
617
620
|
E.attrsMap = { backgroundColor: "fill", borderColor: "stroke", borderWidth: "stroke-width", zIndex: "zIndex", borderRadius: "r", padding: "padding" }, E.shapesWithoutBackground = ["connector"];
|
|
618
|
-
class
|
|
621
|
+
class Rt extends R {
|
|
619
622
|
constructor(t, i, e) {
|
|
620
623
|
super(t, i, e, "shape"), this.type = "image", this.translate = super.translateShape;
|
|
621
624
|
}
|
|
@@ -631,20 +634,20 @@ function ss() {
|
|
|
631
634
|
super.redraw(t);
|
|
632
635
|
}
|
|
633
636
|
}
|
|
634
|
-
|
|
635
|
-
var
|
|
636
|
-
let { addEvent:
|
|
637
|
+
Rt.attrsMap = { width: "width", height: "height", zIndex: "zIndex" };
|
|
638
|
+
var oe = A(660), nt = A.n(oe);
|
|
639
|
+
let { addEvent: Ut, createElement: at } = m(), ne = class {
|
|
637
640
|
constructor(o, t) {
|
|
638
641
|
this.iconsURL = t, this.container = this.createPopupContainer(o), this.closeButton = this.addCloseButton();
|
|
639
642
|
}
|
|
640
643
|
createPopupContainer(o, t = "highcharts-popup highcharts-no-tooltip") {
|
|
641
|
-
return
|
|
644
|
+
return at("div", { className: t }, void 0, o);
|
|
642
645
|
}
|
|
643
646
|
addCloseButton(o = "highcharts-popup-close") {
|
|
644
|
-
let t = this, i = this.iconsURL, e =
|
|
645
|
-
return
|
|
646
|
-
|
|
647
|
-
}),
|
|
647
|
+
let t = this, i = this.iconsURL, e = at("button", { className: o }, void 0, this.container);
|
|
648
|
+
return at("span", { className: "highcharts-icon" }, { backgroundImage: "url(" + (i.match(/png|svg|jpeg|jpg|gif/ig) ? i : i + "close.svg") + ")" }, e), ["click", "touchstart"].forEach((s) => {
|
|
649
|
+
Ut(e, s, t.closeButtonEvents.bind(t));
|
|
650
|
+
}), Ut(document, "keydown", function(s) {
|
|
648
651
|
s.code === "Escape" && t.closeButtonEvents();
|
|
649
652
|
}), e;
|
|
650
653
|
}
|
|
@@ -653,163 +656,161 @@ function ss() {
|
|
|
653
656
|
}
|
|
654
657
|
showPopup(o = "highcharts-annotation-toolbar") {
|
|
655
658
|
let t = this.container, i = this.closeButton;
|
|
656
|
-
this.type = void 0, t.innerHTML =
|
|
659
|
+
this.type = void 0, t.innerHTML = nt().emptyHTML, t.className.indexOf(o) >= 0 && (t.classList.remove(o), t.removeAttribute("style")), t.appendChild(i), t.style.display = "block", t.style.height = "";
|
|
657
660
|
}
|
|
658
661
|
closePopup() {
|
|
659
662
|
this.container.style.display = "none";
|
|
660
663
|
}
|
|
661
|
-
}, { doc:
|
|
662
|
-
function
|
|
664
|
+
}, { doc: rt, isFirefox: ae } = m(), { createElement: S, isArray: Wt, isObject: jt, objectEach: re, pick: he, stableSort: le } = m();
|
|
665
|
+
function qt(o, t, i, e, s, n) {
|
|
663
666
|
let a, r;
|
|
664
667
|
if (!t) return;
|
|
665
668
|
let h = this.addInput, c = this.lang;
|
|
666
|
-
|
|
667
|
-
a = i !== "" ? i + "." + g : g,
|
|
668
|
-
}), n && (
|
|
669
|
-
l[0] === !0 ?
|
|
669
|
+
re(e, (l, g) => {
|
|
670
|
+
a = i !== "" ? i + "." + g : g, jt(l) && (!Wt(l) || Wt(l) && jt(l[0]) ? ((r = c[g] || g).match(/\d/g) || s.push([!0, r, o]), qt.call(this, o, t, a, l, s, !1)) : s.push([this, a, "annotation", o, l]));
|
|
671
|
+
}), n && (le(s, (l) => l[1].match(/format/g) ? -1 : 1), ae && s.reverse(), s.forEach((l) => {
|
|
672
|
+
l[0] === !0 ? S("span", { className: "highcharts-annotation-title" }, void 0, l[2]).appendChild(rt.createTextNode(l[1])) : (l[4] = { value: l[4][0], type: l[4][1] }, h.apply(l[0], l.splice(1)));
|
|
670
673
|
}));
|
|
671
674
|
}
|
|
672
|
-
let { doc:
|
|
673
|
-
(
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
let le = { "algorithm-pivotpoints": ["standard", "fibonacci", "camarilla"], "average-disparityindex": ["sma", "ema", "dema", "tema", "wma"] };
|
|
677
|
-
function Vt(o) {
|
|
675
|
+
let { doc: K } = m(), { seriesTypes: Ht } = Ot(), { addEvent: ht, createElement: k, defined: G, isArray: lt, isObject: ce, objectEach: Vt, stableSort: pe } = m();
|
|
676
|
+
(H = tt || (tt = {}))[H["params.algorithm"] = 0] = "params.algorithm", H[H["params.average"] = 1] = "params.average";
|
|
677
|
+
let de = { "algorithm-pivotpoints": ["standard", "fibonacci", "camarilla"], "average-disparityindex": ["sma", "ema", "dema", "tema", "wma"] };
|
|
678
|
+
function zt(o) {
|
|
678
679
|
let t = k("div", { className: "highcharts-popup-lhs-col" }, void 0, o), i = k("div", { className: "highcharts-popup-rhs-col" }, void 0, o);
|
|
679
680
|
return k("div", { className: "highcharts-popup-rhs-col-wrapper" }, void 0, i), { lhsCol: t, rhsCol: i };
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
+
function ue(o, t, i, e) {
|
|
682
683
|
let s = t.params || t.options.params;
|
|
683
|
-
e.innerHTML =
|
|
684
|
+
e.innerHTML = nt().emptyHTML, k("h3", { className: "highcharts-indicator-title" }, void 0, e).appendChild(K.createTextNode(Zt(t, i).indicatorFullName)), k("input", { type: "hidden", name: "highcharts-type-" + i, value: i }, void 0, e), _t.call(this, i, "series", o, e, t, t.linkedParent && t.linkedParent.options.id), s.volumeSeriesID && _t.call(this, i, "volume", o, e, t, t.linkedParent && s.volumeSeriesID), Kt.call(this, o, "params", s, i, e);
|
|
684
685
|
}
|
|
685
|
-
function
|
|
686
|
-
function s(
|
|
687
|
-
let
|
|
688
|
-
|
|
686
|
+
function ct(o, t, i, e) {
|
|
687
|
+
function s(f, y) {
|
|
688
|
+
let x = d.parentNode.children[1];
|
|
689
|
+
ue.call(n, o, f, y, d), x && (x.style.display = "block"), c && f.options && k("input", { type: "hidden", name: "highcharts-id-" + y, value: f.options.id }, void 0, d).setAttribute("highcharts-data-series-id", f.options.id);
|
|
689
690
|
}
|
|
690
691
|
let n = this, a = n.lang, r = t.querySelectorAll(".highcharts-popup-lhs-col")[0], h = t.querySelectorAll(".highcharts-popup-rhs-col")[0], c = i === "edit", l = c ? o.series : o.options.plotOptions || {};
|
|
691
692
|
if (!o && l) return;
|
|
692
|
-
let g,
|
|
693
|
-
c ||
|
|
694
|
-
let
|
|
695
|
-
return
|
|
693
|
+
let g, u = [];
|
|
694
|
+
c || lt(l) ? lt(l) && (u = me.call(this, l)) : u = fe.call(this, l, e), pe(u, (f, y) => {
|
|
695
|
+
let x = f.indicatorFullName.toLowerCase(), v = y.indicatorFullName.toLowerCase();
|
|
696
|
+
return x < v ? -1 : +(x > v);
|
|
696
697
|
}), r.children[1] && r.children[1].remove();
|
|
697
|
-
let
|
|
698
|
-
if (
|
|
699
|
-
let { indicatorFullName:
|
|
700
|
-
g = k("li", { className: "highcharts-indicator-list" }, void 0,
|
|
701
|
-
let b = k("button", { className: "highcharts-indicator-list-item", textContent:
|
|
698
|
+
let p = k("ul", { className: "highcharts-indicator-list" }, void 0, r), d = h.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];
|
|
699
|
+
if (u.forEach((f) => {
|
|
700
|
+
let { indicatorFullName: y, indicatorType: x, series: v } = f;
|
|
701
|
+
g = k("li", { className: "highcharts-indicator-list" }, void 0, p);
|
|
702
|
+
let b = k("button", { className: "highcharts-indicator-list-item", textContent: y }, void 0, g);
|
|
702
703
|
["click", "touchstart"].forEach((D) => {
|
|
703
|
-
|
|
704
|
-
s(v,
|
|
704
|
+
ht(b, D, function() {
|
|
705
|
+
s(v, x);
|
|
705
706
|
});
|
|
706
707
|
});
|
|
707
|
-
}),
|
|
708
|
-
let { series:
|
|
709
|
-
s(
|
|
710
|
-
} else c || (
|
|
708
|
+
}), u.length > 0) {
|
|
709
|
+
let { series: f, indicatorType: y } = u[0];
|
|
710
|
+
s(f, y);
|
|
711
|
+
} else c || (nt().setElementHTML(d.parentNode.children[0], a.noFilterMatch || ""), d.parentNode.children[1].style.display = "none");
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
+
function Kt(o, t, i, e, s) {
|
|
713
714
|
if (!o) return;
|
|
714
715
|
let n = this.addInput;
|
|
715
|
-
|
|
716
|
+
Vt(i, (a, r) => {
|
|
716
717
|
let h = t + "." + r;
|
|
717
|
-
if (G(a) && h) if (
|
|
718
|
+
if (G(a) && h) if (ce(a) && (n.call(this, h, e, s, {}), Kt.call(this, o, h, a, e, s)), h in tt) {
|
|
718
719
|
let c = Gt.call(this, e, h, s);
|
|
719
|
-
|
|
720
|
-
} else h === "params.volumeSeriesID" ||
|
|
720
|
+
$t.call(this, o, t, c, e, r, a);
|
|
721
|
+
} else h === "params.volumeSeriesID" || lt(a) || n.call(this, h, e, s, { value: a, type: "number" });
|
|
721
722
|
});
|
|
722
723
|
}
|
|
723
|
-
function
|
|
724
|
+
function ge(o, t) {
|
|
724
725
|
let i = this, e = t.querySelectorAll(".highcharts-popup-lhs-col")[0], s = this.lang.clearFilter, n = k("div", { className: "highcharts-input-wrapper" }, void 0, e), a = function(c) {
|
|
725
|
-
|
|
726
|
+
ct.call(i, o, i.container, "add", c);
|
|
726
727
|
}, r = this.addInput("searchIndicators", "input", n, { value: "", type: "text", htmlFor: "search-indicators", labelClassName: "highcharts-input-search-indicators-label" }), h = k("a", { textContent: s }, void 0, n);
|
|
727
|
-
r.classList.add("highcharts-input-search-indicators"), h.classList.add("clear-filter-button"),
|
|
728
|
+
r.classList.add("highcharts-input-search-indicators"), h.classList.add("clear-filter-button"), ht(r, "input", function() {
|
|
728
729
|
a(this.value), this.value.length ? h.style.display = "inline-block" : h.style.display = "none";
|
|
729
730
|
}), ["click", "touchstart"].forEach((c) => {
|
|
730
|
-
|
|
731
|
+
ht(h, c, function() {
|
|
731
732
|
r.value = "", a(""), h.style.display = "none";
|
|
732
733
|
});
|
|
733
734
|
});
|
|
734
735
|
}
|
|
735
736
|
function Gt(o, t, i) {
|
|
736
737
|
let e = t.split("."), s = e[e.length - 1], n = "highcharts-" + t + "-type-" + o, a = this.lang;
|
|
737
|
-
k("label", { htmlFor: n }, null, i).appendChild(
|
|
738
|
+
k("label", { htmlFor: n }, null, i).appendChild(K.createTextNode(a[s] || t));
|
|
738
739
|
let r = k("select", { name: n, className: "highcharts-popup-field", id: "highcharts-select-" + t }, null, i);
|
|
739
740
|
return r.setAttribute("id", "highcharts-select-" + t), r;
|
|
740
741
|
}
|
|
741
|
-
function
|
|
742
|
+
function $t(o, t, i, e, s, n, a) {
|
|
742
743
|
t === "series" || t === "volume" ? o.series.forEach((r) => {
|
|
743
744
|
let h = r.options, c = h.name || h.params ? r.name : h.id || "";
|
|
744
|
-
h.id !== "highcharts-navigator-series" && h.id !== (a && a.options && a.options.id) && (G(n) || t !== "volume" || r.type !== "column" || (n = h.id), k("option", { value: h.id }, void 0, i).appendChild(
|
|
745
|
-
}) : e && s &&
|
|
746
|
-
k("option", { value: r }, void 0, i).appendChild(
|
|
745
|
+
h.id !== "highcharts-navigator-series" && h.id !== (a && a.options && a.options.id) && (G(n) || t !== "volume" || r.type !== "column" || (n = h.id), k("option", { value: h.id }, void 0, i).appendChild(K.createTextNode(c)));
|
|
746
|
+
}) : e && s && de[s + "-" + e].forEach((r) => {
|
|
747
|
+
k("option", { value: r }, void 0, i).appendChild(K.createTextNode(r));
|
|
747
748
|
}), G(n) && (i.value = n);
|
|
748
749
|
}
|
|
749
|
-
function
|
|
750
|
+
function fe(o, t) {
|
|
750
751
|
let i, e = this.chart && this.chart.options.lang, s = e && e.navigation && e.navigation.popup && e.navigation.popup.indicatorAliases, n = [];
|
|
751
|
-
return
|
|
752
|
+
return Vt(o, (a, r) => {
|
|
752
753
|
let h = a && a.options;
|
|
753
754
|
if (a.params || h && h.params) {
|
|
754
|
-
let { indicatorFullName: c, indicatorType: l } =
|
|
755
|
+
let { indicatorFullName: c, indicatorType: l } = Zt(a, r);
|
|
755
756
|
if (t) {
|
|
756
|
-
let g = RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i"),
|
|
757
|
-
(c.match(g) ||
|
|
757
|
+
let g = RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i"), u = s && s[l] && s[l].join(" ") || "";
|
|
758
|
+
(c.match(g) || u.match(g)) && (i = { indicatorFullName: c, indicatorType: l, series: a }, n.push(i));
|
|
758
759
|
} else i = { indicatorFullName: c, indicatorType: l, series: a }, n.push(i);
|
|
759
760
|
}
|
|
760
761
|
}), n;
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
+
function me(o) {
|
|
763
764
|
let t = [];
|
|
764
765
|
return o.forEach((i) => {
|
|
765
766
|
i.is("sma") && t.push({ indicatorFullName: i.name, indicatorType: i.type, series: i });
|
|
766
767
|
}), t;
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
-
let i = o.options, e =
|
|
769
|
+
function Zt(o, t) {
|
|
770
|
+
let i = o.options, e = Ht[t] && Ht[t].prototype.nameBase || t.toUpperCase(), s = t;
|
|
770
771
|
return i && i.type && (s = o.options.type, e = o.name), { indicatorFullName: e, indicatorType: s };
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
+
function _t(o, t, i, e, s, n) {
|
|
773
774
|
if (!i) return;
|
|
774
775
|
let a = Gt.call(this, o, t, e);
|
|
775
|
-
|
|
776
|
+
$t.call(this, i, t, a, void 0, void 0, void 0, s), G(n) && (a.value = n);
|
|
776
777
|
}
|
|
777
|
-
let { doc:
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
let { doc: ye } = m(), { addEvent: xe, createElement: Jt } = m();
|
|
779
|
+
function Qt() {
|
|
780
|
+
return Jt("div", { className: "highcharts-tab-item-content highcharts-no-mousewheel" }, void 0, this.container);
|
|
780
781
|
}
|
|
781
|
-
function
|
|
782
|
+
function ti(o, t) {
|
|
782
783
|
let i = this.container, e = this.lang, s = "highcharts-tab-item";
|
|
783
784
|
t === 0 && (s += " highcharts-tab-disabled");
|
|
784
|
-
let n =
|
|
785
|
-
return n.appendChild(
|
|
785
|
+
let n = Jt("button", { className: s }, void 0, i);
|
|
786
|
+
return n.appendChild(ye.createTextNode(e[o + "Button"] || o)), n.setAttribute("highcharts-data-tab-type", o), n;
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
+
function ve() {
|
|
788
789
|
let o = this.container, t = o.querySelectorAll(".highcharts-tab-item"), i = o.querySelectorAll(".highcharts-tab-item-content");
|
|
789
790
|
for (let e = 0; e < t.length; e++) t[e].classList.remove("highcharts-tab-item-active"), i[e].classList.remove("highcharts-tab-item-show");
|
|
790
791
|
}
|
|
791
|
-
function
|
|
792
|
+
function ii(o, t) {
|
|
792
793
|
let i = this.container.querySelectorAll(".highcharts-tab-item-content");
|
|
793
794
|
o.className += " highcharts-tab-item-active", i[t].className += " highcharts-tab-item-show";
|
|
794
795
|
}
|
|
795
|
-
function
|
|
796
|
+
function be(o) {
|
|
796
797
|
let t = this;
|
|
797
798
|
this.container.querySelectorAll(".highcharts-tab-item").forEach((i, e) => {
|
|
798
799
|
(o !== 0 || i.getAttribute("highcharts-data-tab-type") !== "edit") && ["click", "touchstart"].forEach((s) => {
|
|
799
|
-
|
|
800
|
-
|
|
800
|
+
xe(i, s, function() {
|
|
801
|
+
ve.call(t), ii.call(t, this, e);
|
|
801
802
|
});
|
|
802
803
|
});
|
|
803
804
|
});
|
|
804
805
|
}
|
|
805
|
-
let { doc:
|
|
806
|
-
class
|
|
806
|
+
let { doc: pt } = m(), { getOptions: Ae } = m(), { addEvent: dt, createElement: ut, extend: ke, fireEvent: ei, pick: we } = m();
|
|
807
|
+
class si extends ne {
|
|
807
808
|
constructor(t, i, e) {
|
|
808
|
-
super(t, i), this.chart = e, this.lang = (
|
|
809
|
+
super(t, i), this.chart = e, this.lang = (Ae().lang.navigation || {}).popup || {}, dt(this.container, "mousedown", () => {
|
|
809
810
|
let s = e && e.navigationBindings && e.navigationBindings.activeAnnotation;
|
|
810
811
|
if (s) {
|
|
811
812
|
s.cancelClick = !0;
|
|
812
|
-
let n = pt
|
|
813
|
+
let n = dt(pt, "click", () => {
|
|
813
814
|
setTimeout(() => {
|
|
814
815
|
s.cancelClick = !1;
|
|
815
816
|
}, 0), n();
|
|
@@ -818,60 +819,60 @@ function ss() {
|
|
|
818
819
|
});
|
|
819
820
|
}
|
|
820
821
|
addInput(t, i, e, s) {
|
|
821
|
-
let n = t.split("."), a = n[n.length - 1], r = this.lang, h = "highcharts-" + i + "-" +
|
|
822
|
-
a.match(/^\d+$/) ||
|
|
823
|
-
let c =
|
|
822
|
+
let n = t.split("."), a = n[n.length - 1], r = this.lang, h = "highcharts-" + i + "-" + we(s.htmlFor, a);
|
|
823
|
+
a.match(/^\d+$/) || ut("label", { htmlFor: h, className: s.labelClassName }, void 0, e).appendChild(pt.createTextNode(r[a] || a));
|
|
824
|
+
let c = ut("input", { name: h, value: s.value, type: s.type, className: "highcharts-popup-field" }, void 0, e);
|
|
824
825
|
return c.setAttribute("highcharts-data-name", t), c;
|
|
825
826
|
}
|
|
826
827
|
closeButtonEvents() {
|
|
827
828
|
if (this.chart) {
|
|
828
829
|
let t = this.chart.navigationBindings;
|
|
829
|
-
|
|
830
|
+
ei(t, "closePopup"), t && t.selectedButtonElement && ei(t, "deselectButton", { button: t.selectedButtonElement });
|
|
830
831
|
} else super.closeButtonEvents();
|
|
831
832
|
}
|
|
832
833
|
addButton(t, i, e, s, n) {
|
|
833
|
-
let a =
|
|
834
|
-
return a.appendChild(
|
|
835
|
-
|
|
836
|
-
let
|
|
837
|
-
return l.
|
|
838
|
-
let
|
|
839
|
-
|
|
840
|
-
}),
|
|
841
|
-
let
|
|
842
|
-
if (
|
|
843
|
-
let
|
|
844
|
-
|
|
834
|
+
let a = ut("button", void 0, void 0, t);
|
|
835
|
+
return a.appendChild(pt.createTextNode(i)), n && ["click", "touchstart"].forEach((r) => {
|
|
836
|
+
dt(a, r, () => {
|
|
837
|
+
let h, c, l, g, u;
|
|
838
|
+
return this.closePopup(), n((h = Array.prototype.slice.call(s.querySelectorAll("input")), c = Array.prototype.slice.call(s.querySelectorAll("select")), l = s.querySelectorAll("#highcharts-select-series > option:checked")[0], g = s.querySelectorAll("#highcharts-select-volume > option:checked")[0], u = { actionType: e, linkedTo: l && l.getAttribute("value") || "", fields: {} }, h.forEach((p) => {
|
|
839
|
+
let d = p.getAttribute("highcharts-data-name");
|
|
840
|
+
p.getAttribute("highcharts-data-series-id") ? u.seriesId = p.value : d ? u.fields[d] = p.value : u.type = p.value;
|
|
841
|
+
}), c.forEach((p) => {
|
|
842
|
+
let d = p.id;
|
|
843
|
+
if (d !== "highcharts-select-series" && d !== "highcharts-select-volume") {
|
|
844
|
+
let f = d.split("highcharts-select-")[1];
|
|
845
|
+
u.fields[f] = p.value;
|
|
845
846
|
}
|
|
846
|
-
}),
|
|
847
|
-
}
|
|
847
|
+
}), g && (u.fields["params.volumeSeriesID"] = g.getAttribute("value") || ""), u));
|
|
848
|
+
});
|
|
848
849
|
}), a;
|
|
849
850
|
}
|
|
850
851
|
showForm(t, i, e, s) {
|
|
851
852
|
i && (this.showPopup(), t === "indicators" && this.indicators.addForm.call(this, i, e, s), t === "annotation-toolbar" && this.annotations.addToolbar.call(this, i, e, s), t === "annotation-edit" && this.annotations.addForm.call(this, i, e, s), t === "flag" && this.annotations.addForm.call(this, i, e, s, !0), this.type = t, this.container.style.height = this.container.offsetHeight + "px");
|
|
852
853
|
}
|
|
853
854
|
}
|
|
854
|
-
|
|
855
|
+
ke(si.prototype, { annotations: { addForm: function(o, t, i, e) {
|
|
855
856
|
if (!o) return;
|
|
856
|
-
let s = this.container, n = this.lang, a =
|
|
857
|
-
a.appendChild(
|
|
858
|
-
let r =
|
|
859
|
-
|
|
857
|
+
let s = this.container, n = this.lang, a = S("h2", { className: "highcharts-popup-main-title" }, void 0, s);
|
|
858
|
+
a.appendChild(rt.createTextNode(n[t.langKey] || t.langKey || "")), a = S("div", { className: "highcharts-popup-lhs-col highcharts-popup-lhs-full" }, void 0, s);
|
|
859
|
+
let r = S("div", { className: "highcharts-popup-bottom-row" }, void 0, s);
|
|
860
|
+
qt.call(this, a, o, "", t, [], !0), this.addButton(r, e ? n.addButton || "Add" : n.saveButton || "Save", e ? "add" : "save", s, i);
|
|
860
861
|
}, addToolbar: function(o, t, i) {
|
|
861
862
|
let e = this.lang, s = this.container, n = this.showForm, a = "highcharts-annotation-toolbar";
|
|
862
863
|
s.className.indexOf(a) === -1 && (s.className += " " + a + " highcharts-no-mousewheel"), o && (s.style.top = o.plotTop + 10 + "px");
|
|
863
|
-
let r =
|
|
864
|
-
r.setAttribute("aria-label", "Annotation type"), r.appendChild(
|
|
864
|
+
let r = S("p", { className: "highcharts-annotation-label" }, void 0, s);
|
|
865
|
+
r.setAttribute("aria-label", "Annotation type"), r.appendChild(rt.createTextNode(he(e[t.langKey] || t.langKey, t.shapes && t.shapes[0].type, "")));
|
|
865
866
|
let h = this.addButton(s, e.editButton || "Edit", "edit", s, () => {
|
|
866
867
|
n.call(this, "annotation-edit", o, t, i);
|
|
867
868
|
});
|
|
868
|
-
h.className += " highcharts-annotation-edit-button",
|
|
869
|
+
h.className += " highcharts-annotation-edit-button", S("span", { className: "highcharts-icon" }, { backgroundImage: `url(${this.iconsURL}edit.svg)` }, h), h = this.addButton(s, e.removeButton || "Remove", "remove", s, i), h.className += " highcharts-annotation-remove-button", S("span", { className: "highcharts-icon" }, { backgroundImage: `url(${this.iconsURL}destroy.svg)` }, h);
|
|
869
870
|
} }, indicators: { addForm: function(o, t, i) {
|
|
870
871
|
let e, s = this.lang;
|
|
871
872
|
if (!o) return;
|
|
872
873
|
this.tabs.init.call(this, o);
|
|
873
874
|
let n = this.container.querySelectorAll(".highcharts-tab-item-content");
|
|
874
|
-
|
|
875
|
+
zt(n[0]), ge.call(this, o, n[0]), ct.call(this, o, n[0], "add"), e = n[0].querySelectorAll(".highcharts-popup-rhs-col")[0], this.addButton(e, s.addButton || "add", "add", e, i), zt(n[1]), ct.call(this, o, n[1], "edit"), e = n[1].querySelectorAll(".highcharts-popup-rhs-col")[0], this.addButton(e, s.saveButton || "save", "edit", e, i), this.addButton(e, s.removeButton || "remove", "remove", e, i);
|
|
875
876
|
}, getAmount: function() {
|
|
876
877
|
let o = 0;
|
|
877
878
|
return this.series.forEach((t) => {
|
|
@@ -879,36 +880,36 @@ function ss() {
|
|
|
879
880
|
}), o;
|
|
880
881
|
} }, tabs: { init: function(o) {
|
|
881
882
|
if (!o) return;
|
|
882
|
-
let t = this.indicators.getAmount.call(o), i =
|
|
883
|
-
|
|
883
|
+
let t = this.indicators.getAmount.call(o), i = ti.call(this, "add");
|
|
884
|
+
ti.call(this, "edit", t), Qt.call(this), Qt.call(this), be.call(this, t), ii.call(this, i, 0);
|
|
884
885
|
} } });
|
|
885
|
-
let { composed:
|
|
886
|
-
function
|
|
886
|
+
let { composed: Ce } = m(), { addEvent: oi, pushUnique: Ee, wrap: Pe } = m();
|
|
887
|
+
function Oe() {
|
|
887
888
|
this.popup && this.popup.closePopup();
|
|
888
889
|
}
|
|
889
|
-
function
|
|
890
|
-
this.popup || (this.popup = new
|
|
890
|
+
function Be(o) {
|
|
891
|
+
this.popup || (this.popup = new si(this.chart.container, this.chart.options.navigation.iconsURL || this.chart.options.stockTools && this.chart.options.stockTools.gui.iconsURL || "https://code.highcharts.com/12.5.0/gfx/stock-icons/", this.chart)), this.popup.showForm(o.formType, this.chart, o.options, o.onSubmit);
|
|
891
892
|
}
|
|
892
|
-
function
|
|
893
|
+
function Ne(o, t) {
|
|
893
894
|
this.inClass(t.target, "highcharts-popup") || o.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
894
895
|
}
|
|
895
|
-
let
|
|
896
|
-
|
|
897
|
-
}
|
|
898
|
-
function
|
|
896
|
+
let Me = function(o, t) {
|
|
897
|
+
Ee(Ce, "Popup") && (oi(o, "closePopup", Oe), oi(o, "showPopup", Be), Pe(t.prototype, "onContainerMouseDown", Ne));
|
|
898
|
+
}, { getDeferredAnimation: Te } = m(), { defaultOptions: De } = m(), { destroyObjectProperties: Ie, erase: ni, fireEvent: ai, merge: X, pick: gt, splat: Le } = m();
|
|
899
|
+
function ft(o, t) {
|
|
899
900
|
let i = {};
|
|
900
901
|
return ["labels", "shapes"].forEach((e) => {
|
|
901
902
|
let s = o[e], n = t[e];
|
|
902
|
-
s && (n ? i[e] =
|
|
903
|
+
s && (n ? i[e] = Le(n).map((a, r) => X(s[r], a)) : i[e] = o[e]);
|
|
903
904
|
}), i;
|
|
904
905
|
}
|
|
905
|
-
class w extends
|
|
906
|
+
class w extends Et {
|
|
906
907
|
static compose(t, i, e, s) {
|
|
907
|
-
|
|
908
|
+
Di.compose(w, t, e), E.compose(s), U.compose(t, s), i.compose(w, t), Me(i, e);
|
|
908
909
|
}
|
|
909
910
|
constructor(t, i) {
|
|
910
911
|
super(), this.coll = "annotations", this.chart = t, this.points = [], this.controlPoints = [], this.coll = "annotations", this.index = -1, this.labels = [], this.shapes = [], this.setOptions(i), this.userOptions = i;
|
|
911
|
-
|
|
912
|
+
const e = ft(this.options, i);
|
|
912
913
|
this.options.labels = e.labels, this.options.shapes = e.shapes, this.init(t, this.options);
|
|
913
914
|
}
|
|
914
915
|
addClipPaths() {
|
|
@@ -932,39 +933,40 @@ function ss() {
|
|
|
932
933
|
let t = this.chart, i = function(e) {
|
|
933
934
|
e.destroy();
|
|
934
935
|
};
|
|
935
|
-
this.labels.forEach(i), this.shapes.forEach(i), this.clipXAxis = null, this.clipYAxis = null,
|
|
936
|
+
this.labels.forEach(i), this.shapes.forEach(i), this.clipXAxis = null, this.clipYAxis = null, ni(t.labelCollectors, this.labelCollector), super.destroy(), this.destroyControlTarget(), Ie(this, t);
|
|
936
937
|
}
|
|
937
938
|
destroyItem(t) {
|
|
938
|
-
|
|
939
|
+
ni(this[t.itemType + "s"], t), t.destroy();
|
|
939
940
|
}
|
|
940
941
|
getClipBox() {
|
|
941
942
|
if (this.clipXAxis && this.clipYAxis) return { x: this.clipXAxis.left, y: this.clipYAxis.top, width: this.clipXAxis.width, height: this.clipYAxis.height };
|
|
942
943
|
}
|
|
943
944
|
initProperties(t, i) {
|
|
944
945
|
this.setOptions(i);
|
|
945
|
-
let e =
|
|
946
|
+
let e = ft(this.options, i);
|
|
946
947
|
this.options.labels = e.labels, this.options.shapes = e.shapes, this.chart = t, this.points = [], this.controlPoints = [], this.coll = "annotations", this.userOptions = i, this.labels = [], this.shapes = [];
|
|
947
948
|
}
|
|
948
949
|
init(t, i, e = this.index) {
|
|
949
950
|
let s = this.chart, n = this.options.animation;
|
|
950
|
-
this.index = e, this.linkPoints(), this.addControlPoints(), this.addShapes(), this.addLabels(), this.setLabelCollector(), this.animationConfig =
|
|
951
|
+
this.index = e, this.linkPoints(), this.addControlPoints(), this.addShapes(), this.addLabels(), this.setLabelCollector(), this.animationConfig = Te(s, n);
|
|
951
952
|
}
|
|
952
953
|
initLabel(t, i) {
|
|
954
|
+
this.options.labelOptions?.align;
|
|
953
955
|
let e = new E(this, X(this.options.labelOptions, { controlPointOptions: this.options.controlPointOptions }, t), i);
|
|
954
956
|
return e.itemType = "label", this.labels.push(e), e;
|
|
955
957
|
}
|
|
956
958
|
initShape(t, i) {
|
|
957
|
-
let e = X(this.options.shapeOptions, { controlPointOptions: this.options.controlPointOptions }, t), s = new w.shapesMap[e.type](this, e, i);
|
|
959
|
+
let e = X(this.options.shapeOptions, { controlPointOptions: this.options.controlPointOptions }, t), s = new w.shapesMap[e.type || "rect"](this, e, i);
|
|
958
960
|
return s.itemType = "shape", this.shapes.push(s), s;
|
|
959
961
|
}
|
|
960
962
|
redraw(t) {
|
|
961
963
|
this.linkPoints(), this.graphic || this.render(), this.clipRect && this.clipRect.animate(this.getClipBox()), this.redrawItems(this.shapes, t), this.redrawItems(this.labels, t), this.redrawControlPoints(t);
|
|
962
964
|
}
|
|
963
965
|
redrawItem(t, i) {
|
|
964
|
-
t.linkPoints(), t.shouldBeDrawn()
|
|
965
|
-
let
|
|
966
|
-
|
|
967
|
-
}
|
|
966
|
+
if (t.linkPoints(), t.shouldBeDrawn()) {
|
|
967
|
+
let e, s;
|
|
968
|
+
t.graphic || this.renderItem(t), t.redraw(gt(i, !0) && t.graphic.placed), t.points.length && (e = t.graphic, s = t.points.some((n) => n.series.visible !== !1 && n.visible !== !1), e && (s ? e.visibility === "hidden" && e.show() : e.hide()));
|
|
969
|
+
} else this.destroyItem(t);
|
|
968
970
|
}
|
|
969
971
|
redrawItems(t, i) {
|
|
970
972
|
let e = t.length;
|
|
@@ -975,7 +977,7 @@ function ss() {
|
|
|
975
977
|
}
|
|
976
978
|
render() {
|
|
977
979
|
let t = this.chart.renderer;
|
|
978
|
-
this.graphic = t.g("annotation").attr({ opacity: 0, zIndex: this.options.zIndex, visibility: this.options.visible ? "inherit" : "hidden" }).add(), this.shapesGroup = t.g("annotation-shapes").add(this.graphic), this.options.crop && this.shapesGroup.clip(this.chart.plotBoxClip), this.labelsGroup = t.g("annotation-labels").attr({ translateX: 0, translateY: 0 }).add(this.graphic), this.addClipPaths(), this.clipRect && this.graphic.clip(this.clipRect), this.renderItems(this.shapes), this.renderItems(this.labels), this.addEvents(), this.renderControlPoints();
|
|
980
|
+
this.graphic = t.g("annotation").addClass(this.options.className || "").attr({ opacity: 0, zIndex: this.options.zIndex, visibility: this.options.visible ? "inherit" : "hidden" }).add(), this.shapesGroup = t.g("annotation-shapes").add(this.graphic), this.options.crop && this.shapesGroup.clip(this.chart.plotBoxClip), this.labelsGroup = t.g("annotation-labels").attr({ translateX: 0, translateY: 0 }).add(this.graphic), this.addClipPaths(), this.clipRect && this.graphic.clip(this.clipRect), this.renderItems(this.shapes), this.renderItems(this.labels), this.addEvents(), this.renderControlPoints();
|
|
979
981
|
}
|
|
980
982
|
renderItem(t) {
|
|
981
983
|
t.render(t.itemType === "label" ? this.labelsGroup : this.shapesGroup);
|
|
@@ -985,8 +987,8 @@ function ss() {
|
|
|
985
987
|
for (; i--; ) this.renderItem(t[i]);
|
|
986
988
|
}
|
|
987
989
|
setClipAxes() {
|
|
988
|
-
let t = this.chart.xAxis, i = this.chart.yAxis, e =
|
|
989
|
-
let a = n && (n.point ||
|
|
990
|
+
let t = this.chart.xAxis, i = this.chart.yAxis, e = [...this.options.labels ?? [], ...this.options.shapes ?? []].reduce((s, n) => {
|
|
991
|
+
let a = n && (n.point || "points" in n && n.points?.[0]);
|
|
990
992
|
return [t[a && a.xAxis] || s[0], i[a && a.yAxis] || s[1]];
|
|
991
993
|
}, []);
|
|
992
994
|
this.clipXAxis = e[0], this.clipYAxis = e[1];
|
|
@@ -1008,63 +1010,64 @@ function ss() {
|
|
|
1008
1010
|
}, t.chart.labelCollectors.push(t.labelCollector);
|
|
1009
1011
|
}
|
|
1010
1012
|
setOptions(t) {
|
|
1011
|
-
|
|
1013
|
+
var i;
|
|
1014
|
+
this.options = X(this.defaultOptions, t.type && this.defaultOptions.types?.[t.type] || {}, t), (i = this.options).typeOptions || (i.typeOptions = {});
|
|
1012
1015
|
}
|
|
1013
1016
|
setVisibility(t) {
|
|
1014
|
-
let i = this.options, e = this.chart.navigationBindings, s =
|
|
1017
|
+
let i = this.options, e = this.chart.navigationBindings, s = gt(t, !i.visible);
|
|
1015
1018
|
if (this.graphic.attr("visibility", s ? "inherit" : "hidden"), !s) {
|
|
1016
1019
|
let n = function(a) {
|
|
1017
1020
|
a.setControlPointsVisibility(s);
|
|
1018
1021
|
};
|
|
1019
|
-
this.shapes.forEach(n), this.labels.forEach(n), e.activeAnnotation === this && e.popup && e.popup.type === "annotation-toolbar" &&
|
|
1022
|
+
this.shapes.forEach(n), this.labels.forEach(n), e.activeAnnotation === this && e.popup && e.popup.type === "annotation-toolbar" && ai(e, "closePopup");
|
|
1020
1023
|
}
|
|
1021
1024
|
i.visible = s;
|
|
1022
1025
|
}
|
|
1023
1026
|
update(t, i) {
|
|
1024
|
-
let e = this.chart, s =
|
|
1025
|
-
a.labels = s.labels, a.shapes = s.shapes, this.destroy(), this.initProperties(e, a), this.init(e, a), e.options.annotations[n] = this.options, this.isUpdating = !0,
|
|
1027
|
+
let e = this.chart, s = ft(this.userOptions, t), n = e.annotations.indexOf(this), a = X(!0, this.userOptions, t);
|
|
1028
|
+
a.labels = s.labels, a.shapes = s.shapes, this.destroy(), this.initProperties(e, a), this.init(e, a), e.options.annotations[n] = this.options, this.isUpdating = !0, gt(i, !0) && e.drawAnnotations(), ai(this, "afterUpdate"), this.isUpdating = !1;
|
|
1026
1029
|
}
|
|
1027
1030
|
}
|
|
1028
|
-
w.ControlPoint =
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
addUpdate(e) {
|
|
1037
|
-
this.chart.navigation.updates.push(e);
|
|
1038
|
-
}
|
|
1039
|
-
update(e, s) {
|
|
1040
|
-
this.updates.forEach((n) => {
|
|
1041
|
-
n.call(this.chart, e, s);
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1031
|
+
w.ControlPoint = Pt, w.MockPoint = Y, w.shapesMap = { rect: It, circle: Lt, ellipse: Yt, path: U, image: Rt }, w.types = {}, w.prototype.defaultOptions = kt, De.annotations = kt, w.prototype.nonDOMEvents = ["add", "afterUpdate", "drag", "remove"], Bt.compose(w);
|
|
1032
|
+
var ri = it || (it = {});
|
|
1033
|
+
ri.compose = function(o) {
|
|
1034
|
+
return o.navigation || (o.navigation = new hi(o)), o;
|
|
1035
|
+
};
|
|
1036
|
+
class hi {
|
|
1037
|
+
constructor(t) {
|
|
1038
|
+
this.updates = [], this.chart = t;
|
|
1044
1039
|
}
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1040
|
+
addUpdate(t) {
|
|
1041
|
+
this.chart.navigation.updates.push(t);
|
|
1042
|
+
}
|
|
1043
|
+
update(t, i) {
|
|
1044
|
+
this.updates.forEach((e) => {
|
|
1045
|
+
e.call(this.chart, t, i);
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
ri.Additions = hi;
|
|
1050
|
+
let Ye = it, { defined: Se, isNumber: li, pick: Xe } = m(), Fe = { backgroundColor: "string", borderColor: "string", borderRadius: "string", color: "string", fill: "string", fontSize: "string", labels: "string", name: "string", stroke: "string", title: "string" }, ci = { getAssignedAxis: function(o) {
|
|
1048
1051
|
return o.filter((t) => {
|
|
1049
|
-
let i = t.axis.getExtremes(), e = i.min, s = i.max, n =
|
|
1050
|
-
return
|
|
1052
|
+
let i = t.axis.getExtremes(), e = i.min, s = i.max, n = Xe(t.axis.minPointOffset, 0);
|
|
1053
|
+
return li(e) && li(s) && t.value >= e - n && t.value <= s + n && !t.axis.options.isInternal;
|
|
1051
1054
|
})[0];
|
|
1052
1055
|
}, getFieldType: function(o, t) {
|
|
1053
|
-
let i =
|
|
1054
|
-
return
|
|
1055
|
-
} }, { getAssignedAxis: P } =
|
|
1056
|
+
let i = Fe[o], e = typeof t;
|
|
1057
|
+
return Se(i) && (e = i), { string: "text", number: "number", boolean: "checkbox" }[e];
|
|
1058
|
+
} }, { getAssignedAxis: P } = ci, { isNumber: pi, merge: $ } = m(), Re = { lang: { navigation: { popup: { simpleShapes: "Simple shapes", lines: "Lines", circle: "Circle", ellipse: "Ellipse", rectangle: "Rectangle", label: "Label", shapeOptions: "Shape options", typeOptions: "Details", fill: "Fill", format: "Text", strokeWidth: "Line width", stroke: "Line color", title: "Title", name: "Name", labelOptions: "Label options", labels: "Labels", backgroundColor: "Background color", backgroundColors: "Background colors", borderColor: "Border color", borderRadius: "Border radius", borderWidth: "Border width", style: "Style", padding: "Padding", fontSize: "Font size", color: "Color", height: "Height", shapes: "Shape options" } } }, navigation: { bindingsClassName: "highcharts-bindings-container", bindings: { circleAnnotation: { className: "highcharts-circle-annotation", start: function(o) {
|
|
1056
1059
|
let t = this.chart.pointer?.getCoordinates(o), i = t && P(t.xAxis), e = t && P(t.yAxis), s = this.chart.options.navigation;
|
|
1057
|
-
if (i && e) return this.chart.addAnnotation(
|
|
1060
|
+
if (i && e) return this.chart.addAnnotation($({ langKey: "circle", type: "basicAnnotation", shapes: [{ type: "circle", point: { x: i.value, y: e.value, xAxis: i.axis.index, yAxis: e.axis.index }, r: 5 }] }, s.annotationsOptions, s.bindings.circleAnnotation.annotationsOptions));
|
|
1058
1061
|
}, steps: [function(o, t) {
|
|
1059
1062
|
let i, e = t.options.shapes, s = e && e[0] && e[0].point || {};
|
|
1060
|
-
if (
|
|
1063
|
+
if (pi(s.xAxis) && pi(s.yAxis)) {
|
|
1061
1064
|
let n = this.chart.inverted, a = this.chart.xAxis[s.xAxis].toPixels(s.x), r = this.chart.yAxis[s.yAxis].toPixels(s.y);
|
|
1062
1065
|
i = Math.max(Math.sqrt(Math.pow(n ? r - o.chartX : a - o.chartX, 2) + Math.pow(n ? a - o.chartY : r - o.chartY, 2)), 5);
|
|
1063
1066
|
}
|
|
1064
1067
|
t.update({ shapes: [{ r: i }] });
|
|
1065
1068
|
}] }, ellipseAnnotation: { className: "highcharts-ellipse-annotation", start: function(o) {
|
|
1066
1069
|
let t = this.chart.pointer?.getCoordinates(o), i = t && P(t.xAxis), e = t && P(t.yAxis), s = this.chart.options.navigation;
|
|
1067
|
-
if (i && e) return this.chart.addAnnotation(
|
|
1070
|
+
if (i && e) return this.chart.addAnnotation($({ langKey: "ellipse", type: "basicAnnotation", shapes: [{ type: "ellipse", xAxis: i.axis.index, yAxis: e.axis.index, points: [{ x: i.value, y: e.value }, { x: i.value, y: e.value }], ry: 1 }] }, s.annotationsOptions, s.bindings.ellipseAnnotation.annotationsOptions));
|
|
1068
1071
|
}, steps: [function(o, t) {
|
|
1069
1072
|
let i = t.shapes[0], e = i.getAbsolutePosition(i.points[1]);
|
|
1070
1073
|
i.translatePoint(o.chartX - e.x, o.chartY - e.y, 1), i.redraw(!1);
|
|
@@ -1075,7 +1078,7 @@ function ss() {
|
|
|
1075
1078
|
let t = this.chart.pointer?.getCoordinates(o), i = t && P(t.xAxis), e = t && P(t.yAxis);
|
|
1076
1079
|
if (!i || !e) return;
|
|
1077
1080
|
let s = i.value, n = e.value, a = i.axis.index, r = e.axis.index, h = this.chart.options.navigation;
|
|
1078
|
-
return this.chart.addAnnotation(
|
|
1081
|
+
return this.chart.addAnnotation($({ langKey: "rectangle", type: "basicAnnotation", shapes: [{ type: "path", points: [{ xAxis: a, yAxis: r, x: s, y: n }, { xAxis: a, yAxis: r, x: s, y: n }, { xAxis: a, yAxis: r, x: s, y: n }, { xAxis: a, yAxis: r, x: s, y: n }, { command: "Z" }] }] }, h.annotationsOptions, h.bindings.rectangleAnnotation.annotationsOptions));
|
|
1079
1082
|
}, steps: [function(o, t) {
|
|
1080
1083
|
let i = t.options.shapes, e = i && i[0] && i[0].points || [], s = this.chart.pointer?.getCoordinates(o), n = s && P(s.xAxis), a = s && P(s.yAxis);
|
|
1081
1084
|
if (n && a) {
|
|
@@ -1084,19 +1087,19 @@ function ss() {
|
|
|
1084
1087
|
}
|
|
1085
1088
|
}] }, labelAnnotation: { className: "highcharts-label-annotation", start: function(o) {
|
|
1086
1089
|
let t = this.chart.pointer?.getCoordinates(o), i = t && P(t.xAxis), e = t && P(t.yAxis), s = this.chart.options.navigation;
|
|
1087
|
-
if (i && e) return this.chart.addAnnotation(
|
|
1088
|
-
} } }, events: {}, annotationsOptions: { animation: { defer: 0 } } } }, { setOptions:
|
|
1089
|
-
function
|
|
1090
|
+
if (i && e) return this.chart.addAnnotation($({ langKey: "label", type: "basicAnnotation", labelOptions: { format: "{y:.2f}", overflow: "none", crop: !0 }, labels: [{ point: { xAxis: i.axis.index, yAxis: e.axis.index, x: i.value, y: e.value } }] }, s.annotationsOptions, s.bindings.labelAnnotation.annotationsOptions));
|
|
1091
|
+
} } }, events: {}, annotationsOptions: { animation: { defer: 0 } } } }, { setOptions: Ue } = m(), { format: We } = St(), { composed: je, doc: qe, win: He } = m(), { getAssignedAxis: di, getFieldType: ui } = ci, { addEvent: O, attr: Ve, defined: ze, fireEvent: F, isArray: mt, isFunction: Ke, isNumber: Ge, isObject: gi, merge: fi, objectEach: N, pick: mi, pushUnique: $e } = m();
|
|
1092
|
+
function Ze() {
|
|
1090
1093
|
this.chart.navigationBindings && this.chart.navigationBindings.deselectAnnotation();
|
|
1091
1094
|
}
|
|
1092
|
-
function
|
|
1095
|
+
function _e() {
|
|
1093
1096
|
this.navigationBindings && this.navigationBindings.destroy();
|
|
1094
1097
|
}
|
|
1095
|
-
function
|
|
1098
|
+
function Je() {
|
|
1096
1099
|
let o = this.options;
|
|
1097
1100
|
o && o.navigation && o.navigation.bindings && (this.navigationBindings = new M(this, o.navigation), this.navigationBindings.initEvents(), this.navigationBindings.initUpdate());
|
|
1098
1101
|
}
|
|
1099
|
-
function
|
|
1102
|
+
function Qe() {
|
|
1100
1103
|
let o = this.navigationBindings, t = "highcharts-disabled-btn";
|
|
1101
1104
|
if (this && o) {
|
|
1102
1105
|
let i = !1;
|
|
@@ -1114,13 +1117,13 @@ function ss() {
|
|
|
1114
1117
|
}
|
|
1115
1118
|
}
|
|
1116
1119
|
}
|
|
1117
|
-
function
|
|
1120
|
+
function ts() {
|
|
1118
1121
|
this.deselectAnnotation();
|
|
1119
1122
|
}
|
|
1120
|
-
function
|
|
1123
|
+
function is() {
|
|
1121
1124
|
this.selectedButtonElement = null;
|
|
1122
1125
|
}
|
|
1123
|
-
function
|
|
1126
|
+
function yi(o) {
|
|
1124
1127
|
let t, i, e = o.prototype.defaultOptions.events && o.prototype.defaultOptions.events.click;
|
|
1125
1128
|
function s(n) {
|
|
1126
1129
|
let a = this, r = a.chart.navigationBindings, h = r.activeAnnotation;
|
|
@@ -1134,7 +1137,7 @@ function ss() {
|
|
|
1134
1137
|
}
|
|
1135
1138
|
} })) : F(r, "closePopup"), n.activeAnnotation = !0;
|
|
1136
1139
|
}
|
|
1137
|
-
|
|
1140
|
+
fi(!0, o.prototype.defaultOptions.events, { click: s, touchstart: function(n) {
|
|
1138
1141
|
t = n.touches[0].clientX, i = n.touches[0].clientY;
|
|
1139
1142
|
}, touchend: function(n) {
|
|
1140
1143
|
t && Math.sqrt(Math.pow(t - n.changedTouches[0].clientX, 2) + Math.pow(i - n.changedTouches[0].clientY, 2)) >= 4 || s.call(this, n);
|
|
@@ -1142,16 +1145,16 @@ function ss() {
|
|
|
1142
1145
|
}
|
|
1143
1146
|
class M {
|
|
1144
1147
|
static compose(t, i) {
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
}), O(i, "destroy",
|
|
1148
|
+
$e(je, "NavigationBindings") && (O(t, "remove", Ze), yi(t), N(t.types, (e) => {
|
|
1149
|
+
yi(e);
|
|
1150
|
+
}), O(i, "destroy", _e), O(i, "load", Je), O(i, "render", Qe), O(M, "closePopup", ts), O(M, "deselectButton", is), Ue(Re));
|
|
1148
1151
|
}
|
|
1149
1152
|
constructor(t, i) {
|
|
1150
|
-
this.boundClassNames = void 0, this.chart = t, this.options = i, this.eventsToUnbind = [], this.container = this.chart.container.getElementsByClassName(this.options.bindingsClassName || ""), this.container.length || (this.container =
|
|
1153
|
+
this.boundClassNames = void 0, this.chart = t, this.options = i, this.eventsToUnbind = [], this.container = this.chart.container.getElementsByClassName(this.options.bindingsClassName || ""), this.container.length || (this.container = qe.getElementsByClassName(this.options.bindingsClassName || ""));
|
|
1151
1154
|
}
|
|
1152
1155
|
getCoords(t) {
|
|
1153
1156
|
let i = this.chart.pointer?.getCoordinates(t);
|
|
1154
|
-
return [i &&
|
|
1157
|
+
return [i && di(i.xAxis), i && di(i.yAxis)];
|
|
1155
1158
|
}
|
|
1156
1159
|
initEvents() {
|
|
1157
1160
|
let t = this, i = t.chart, e = t.container, s = t.options;
|
|
@@ -1163,16 +1166,16 @@ function ss() {
|
|
|
1163
1166
|
r && !r.button.classList.contains("highcharts-disabled-btn") && t.bindingsButtonClick(r.button, r.events, a);
|
|
1164
1167
|
}));
|
|
1165
1168
|
}), N(s.events || {}, (n, a) => {
|
|
1166
|
-
|
|
1169
|
+
Ke(n) && t.eventsToUnbind.push(O(t, a, n, { passive: !1 }));
|
|
1167
1170
|
}), t.eventsToUnbind.push(O(i.container, "click", function(n) {
|
|
1168
1171
|
!i.cancelClick && i.isInsidePlot(n.chartX - i.plotLeft, n.chartY - i.plotTop, { visiblePlotOnly: !0 }) && t.bindingsChartClick(this, n);
|
|
1169
|
-
})), t.eventsToUnbind.push(O(i.container,
|
|
1172
|
+
})), t.eventsToUnbind.push(O(i.container, m().isTouchDevice ? "touchmove" : "mousemove", function(n) {
|
|
1170
1173
|
t.bindingsContainerMouseMove(this, n);
|
|
1171
|
-
},
|
|
1174
|
+
}, m().isTouchDevice ? { passive: !1 } : void 0));
|
|
1172
1175
|
}
|
|
1173
1176
|
initUpdate() {
|
|
1174
1177
|
let t = this;
|
|
1175
|
-
|
|
1178
|
+
Ye.compose(this.chart).navigation.addUpdate((i) => {
|
|
1176
1179
|
t.update(i);
|
|
1177
1180
|
});
|
|
1178
1181
|
}
|
|
@@ -1184,7 +1187,7 @@ function ss() {
|
|
|
1184
1187
|
t = this.chart;
|
|
1185
1188
|
let e = this.activeAnnotation, s = this.selectedButton, n = t.renderer.boxWrapper;
|
|
1186
1189
|
e && (e.cancelClick || i.activeAnnotation || !i.target.parentNode || function(a, r) {
|
|
1187
|
-
let h =
|
|
1190
|
+
let h = He.Element.prototype, c = h.matches || h.msMatchesSelector || h.webkitMatchesSelector, l = null;
|
|
1188
1191
|
if (h.closest) l = h.closest.call(a, r);
|
|
1189
1192
|
else do {
|
|
1190
1193
|
if (c.call(a, r)) return a;
|
|
@@ -1201,11 +1204,11 @@ function ss() {
|
|
|
1201
1204
|
fieldsToOptions(t, i) {
|
|
1202
1205
|
return N(t, (e, s) => {
|
|
1203
1206
|
let n = parseFloat(e), a = s.split("."), r = a.length - 1;
|
|
1204
|
-
if (!
|
|
1207
|
+
if (!Ge(n) || e.match(/px|em/g) || s.match(/format/g) || (e = n), e !== "undefined") {
|
|
1205
1208
|
let h = i;
|
|
1206
1209
|
a.forEach((c, l) => {
|
|
1207
1210
|
if (c !== "__proto__" && c !== "constructor") {
|
|
1208
|
-
let g =
|
|
1211
|
+
let g = mi(a[l + 1], "");
|
|
1209
1212
|
r === l ? h[c] = e : (h[c] || (h[c] = g.match(/\d/g) ? [] : {}), h = h[c]);
|
|
1210
1213
|
}
|
|
1211
1214
|
});
|
|
@@ -1216,26 +1219,26 @@ function ss() {
|
|
|
1216
1219
|
this.activeAnnotation && (this.activeAnnotation.setControlPointsVisibility(!1), this.activeAnnotation = !1);
|
|
1217
1220
|
}
|
|
1218
1221
|
annotationToFields(t) {
|
|
1219
|
-
let i = t.options, e = M.annotationsEditable, s = e.nestedOptions, n =
|
|
1220
|
-
function h(c, l, g,
|
|
1221
|
-
let
|
|
1222
|
-
g &&
|
|
1223
|
-
|
|
1224
|
-
h(
|
|
1225
|
-
})) : h(
|
|
1226
|
-
})) :
|
|
1227
|
-
h(
|
|
1228
|
-
})) : l === "format" ?
|
|
1222
|
+
let i = t.options, e = M.annotationsEditable, s = e.nestedOptions, n = mi(i.type, i.shapes?.[0]?.type, i.labels?.[0]?.type, "label"), a = M.annotationsNonEditable[i.langKey] || [], r = { langKey: i.langKey, type: n };
|
|
1223
|
+
function h(c, l, g, u, p) {
|
|
1224
|
+
let d;
|
|
1225
|
+
g && ze(c) && a.indexOf(l) === -1 && ((g.indexOf && g.indexOf(l)) >= 0 || g[l] || g === !0) && (mt(c) ? (u[l] = [], c.forEach((f, y) => {
|
|
1226
|
+
gi(f) ? (u[l][y] = {}, N(f, (x, v) => {
|
|
1227
|
+
h(x, v, s[l], u[l][y], l);
|
|
1228
|
+
})) : h(f, 0, s[l], u[l], l);
|
|
1229
|
+
})) : gi(c) ? (d = {}, mt(u) ? (u.push(d), d[l] = {}, d = d[l]) : u[l] = d, N(c, (f, y) => {
|
|
1230
|
+
h(f, y, l === 0 ? g : s[l], d, l);
|
|
1231
|
+
})) : l === "format" ? u[l] = [We(c, t.labels[0].points[0]).toString(), "text"] : mt(u) ? u.push([c, ui(p, c)]) : u[l] = [c, ui(l, c)]);
|
|
1229
1232
|
}
|
|
1230
1233
|
return N(i, (c, l) => {
|
|
1231
|
-
l === "typeOptions" ? (r[l] = {}, N(i[l], (g,
|
|
1232
|
-
h(g,
|
|
1234
|
+
l === "typeOptions" && r.type !== "basicAnnotation" ? (r[l] = {}, N(i[l], (g, u) => {
|
|
1235
|
+
h(g, u, s, r[l], u);
|
|
1233
1236
|
})) : h(c, l, e[n], r, l);
|
|
1234
1237
|
}), r;
|
|
1235
1238
|
}
|
|
1236
1239
|
getClickedClassNames(t, i) {
|
|
1237
1240
|
let e = i.target, s = [], n;
|
|
1238
|
-
for (; e && e.tagName && ((n =
|
|
1241
|
+
for (; e && e.tagName && ((n = Ve(e, "class")) && (s = s.concat(n.split(" ").map((a) => [a, e]))), (e = e.parentNode) !== t); ) ;
|
|
1239
1242
|
return s;
|
|
1240
1243
|
}
|
|
1241
1244
|
getButtonEvents(t, i) {
|
|
@@ -1245,7 +1248,7 @@ function ss() {
|
|
|
1245
1248
|
}), e;
|
|
1246
1249
|
}
|
|
1247
1250
|
update(t) {
|
|
1248
|
-
this.options =
|
|
1251
|
+
this.options = fi(!0, this.options, t), this.removeEvents(), this.initEvents();
|
|
1249
1252
|
}
|
|
1250
1253
|
removeEvents() {
|
|
1251
1254
|
this.eventsToUnbind.forEach((t) => t());
|
|
@@ -1255,18 +1258,18 @@ function ss() {
|
|
|
1255
1258
|
}
|
|
1256
1259
|
}
|
|
1257
1260
|
M.annotationsEditable = { nestedOptions: { labelOptions: ["style", "format", "backgroundColor"], labels: ["style"], label: ["style"], style: ["fontSize", "color"], background: ["fill", "strokeWidth", "stroke"], innerBackground: ["fill", "strokeWidth", "stroke"], outerBackground: ["fill", "strokeWidth", "stroke"], shapeOptions: ["fill", "strokeWidth", "stroke"], shapes: ["fill", "strokeWidth", "stroke"], line: ["strokeWidth", "stroke"], backgroundColors: [!0], connector: ["fill", "strokeWidth", "stroke"], crosshairX: ["strokeWidth", "stroke"], crosshairY: ["strokeWidth", "stroke"] }, circle: ["shapes"], ellipse: ["shapes"], verticalLine: [], label: ["labelOptions"], measure: ["background", "crosshairY", "crosshairX"], fibonacci: [], tunnel: ["background", "line", "height"], pitchfork: ["innerBackground", "outerBackground"], rect: ["shapes"], crookedLine: [], basicAnnotation: ["shapes", "labelOptions"] }, M.annotationsNonEditable = { rectangle: ["crosshairX", "crosshairY", "labelOptions"], ellipse: ["labelOptions"], circle: ["labelOptions"] };
|
|
1258
|
-
let T =
|
|
1261
|
+
let T = m();
|
|
1259
1262
|
T.Annotation = T.Annotation || w, T.NavigationBindings = T.NavigationBindings || M, T.Annotation.compose(T.Chart, T.NavigationBindings, T.Pointer, T.SVGRenderer);
|
|
1260
|
-
let
|
|
1263
|
+
let es = m();
|
|
1261
1264
|
return xt.default;
|
|
1262
1265
|
})());
|
|
1263
|
-
}(
|
|
1266
|
+
}(Z)), Z.exports;
|
|
1264
1267
|
}
|
|
1265
|
-
var
|
|
1266
|
-
const
|
|
1268
|
+
var vi = as();
|
|
1269
|
+
const rs = /* @__PURE__ */ ss(vi), ls = /* @__PURE__ */ os({
|
|
1267
1270
|
__proto__: null,
|
|
1268
|
-
default:
|
|
1269
|
-
}, [
|
|
1271
|
+
default: rs
|
|
1272
|
+
}, [vi]);
|
|
1270
1273
|
export {
|
|
1271
|
-
|
|
1274
|
+
ls as a
|
|
1272
1275
|
};
|