@mobileaction/action-kit 1.59.0-beta.20260824072801 → 1.59.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-kit.mjs +1 -1
- package/dist/annotations-BotVbqYk.js +1275 -0
- package/dist/components/badge/stories/basic.stories.d.ts +2 -2
- package/dist/components/badge/stories/blue.stories.d.ts +2 -2
- package/dist/components/badge/stories/dark.stories.d.ts +2 -2
- package/dist/components/badge/stories/green.stories.d.ts +2 -2
- package/dist/components/badge/stories/orange.stories.d.ts +2 -2
- package/dist/components/badge/stories/pink.stories.d.ts +2 -2
- package/dist/components/badge/stories/purple.stories.d.ts +2 -2
- package/dist/components/badge/stories/red.stories.d.ts +2 -2
- package/dist/components/badge/stories/teal.stories.d.ts +2 -2
- package/dist/components/badge/stories/yellow.stories.d.ts +2 -2
- package/dist/components/cascader/stories/default.stories.d.ts +16 -16
- package/dist/export-data-BR_-2Q3f.js +332 -0
- package/dist/exporting-DR0s0ify.js +601 -0
- package/dist/funnel-DL7kiG31.js +134 -0
- package/dist/{index-6Py-WZ9e.js → index-CBkR2AwI.js} +2355 -2349
- package/dist/map-CMb83okh.js +1731 -0
- package/dist/offline-exporting-YDP5IlMX.js +192 -0
- package/dist/stock-CBVAQBFc.js +2054 -0
- package/dist/venn-D6eKe_-O.js +453 -0
- package/dist/wordcloud-t7GdM2hM.js +227 -0
- package/package.json +30 -15
- package/dist/annotations-DSkf_ftr.js +0 -1496
- package/dist/export-data-DCTe5P_S.js +0 -404
- package/dist/exporting-DQGEobM-.js +0 -739
- package/dist/funnel-CqFEWYxB.js +0 -201
- package/dist/map-DAB70ark.js +0 -1928
- package/dist/offline-exporting-aCzMDQAJ.js +0 -203
- package/dist/stock-CYJWuEFp.js +0 -2216
- package/dist/venn-Dec0FzLN.js +0 -498
- package/dist/wordcloud-CjsQdxnL.js +0 -268
|
@@ -1,1496 +0,0 @@
|
|
|
1
|
-
import { g as pi } from "./index-6Py-WZ9e.js";
|
|
2
|
-
function di(_, ot) {
|
|
3
|
-
for (var I = 0; I < ot.length; I++) {
|
|
4
|
-
const Y = ot[I];
|
|
5
|
-
if (typeof Y != "string" && !Array.isArray(Y)) {
|
|
6
|
-
for (const j in Y)
|
|
7
|
-
if (j !== "default" && !(j in _)) {
|
|
8
|
-
const Z = Object.getOwnPropertyDescriptor(Y, j);
|
|
9
|
-
Z && Object.defineProperty(_, j, Z.get ? Z : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => Y[j]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(_, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var st = { exports: {} }, ui = st.exports, re;
|
|
19
|
-
function gi() {
|
|
20
|
-
return re || (re = 1, (function(_, ot) {
|
|
21
|
-
/**
|
|
22
|
-
* Highcharts JS v12.6.0 (2026-04-13)
|
|
23
|
-
* @module highcharts/modules/annotations
|
|
24
|
-
* @requires highcharts
|
|
25
|
-
*
|
|
26
|
-
* Annotations module
|
|
27
|
-
*
|
|
28
|
-
* (c) 2009-2026 Highsoft AS
|
|
29
|
-
* Author: Torstein Hønsi
|
|
30
|
-
*
|
|
31
|
-
* A commercial license may be required depending on use.
|
|
32
|
-
* See www.highcharts.com/license
|
|
33
|
-
*/
|
|
34
|
-
(function(I, Y) {
|
|
35
|
-
_.exports = Y(I._Highcharts, I._Highcharts.SeriesRegistry, I._Highcharts.Templating, I._Highcharts.AST, I._Highcharts.Color);
|
|
36
|
-
})("u" < typeof window ? ui : window, (I, Y, j, Z, he) => (() => {
|
|
37
|
-
var tt, nt, at, rt, lt, ce = { 512: (o) => {
|
|
38
|
-
o.exports = Y;
|
|
39
|
-
}, 620: (o) => {
|
|
40
|
-
o.exports = he;
|
|
41
|
-
}, 660: (o) => {
|
|
42
|
-
o.exports = Z;
|
|
43
|
-
}, 944: (o) => {
|
|
44
|
-
o.exports = I;
|
|
45
|
-
}, 984: (o) => {
|
|
46
|
-
o.exports = j;
|
|
47
|
-
} }, vt = {};
|
|
48
|
-
function E(o) {
|
|
49
|
-
var t = vt[o];
|
|
50
|
-
if (t !== void 0) return t.exports;
|
|
51
|
-
var e = vt[o] = { exports: {} };
|
|
52
|
-
return ce[o](e, e.exports, E), e.exports;
|
|
53
|
-
}
|
|
54
|
-
E.n = (o) => {
|
|
55
|
-
var t = o && o.__esModule ? () => o.default : () => o;
|
|
56
|
-
return E.d(t, { a: t }), t;
|
|
57
|
-
}, E.d = (o, t) => {
|
|
58
|
-
for (var e in t) E.o(t, e) && !E.o(o, e) && Object.defineProperty(o, e, { enumerable: !0, get: t[e] });
|
|
59
|
-
}, E.o = (o, t) => Object.prototype.hasOwnProperty.call(o, t);
|
|
60
|
-
var xt = {};
|
|
61
|
-
E.d(xt, { default: () => li });
|
|
62
|
-
var bt = E(944), P = E.n(bt);
|
|
63
|
-
let { doc: ht, win: yi } = P();
|
|
64
|
-
function m(o, t, e, i = {}) {
|
|
65
|
-
let s = typeof o == "function" && o.prototype || o;
|
|
66
|
-
Object.hasOwnProperty.call(s, "hcEvents") || (s.hcEvents = {});
|
|
67
|
-
let n = s.hcEvents;
|
|
68
|
-
P().Point && o instanceof P().Point && o.series && o.series.chart && (o.series.chart.runTrackerClick = !0);
|
|
69
|
-
let a = o.addEventListener;
|
|
70
|
-
a && a.call(o, t, e, !!P().supportsPassiveEvents && { passive: i.passive === void 0 ? t.indexOf("touch") !== -1 : i.passive, capture: !1 }), n[t] || (n[t] = []);
|
|
71
|
-
let r = { fn: e, order: typeof i.order == "number" ? i.order : 1 / 0 };
|
|
72
|
-
return n[t].push(r), n[t].sort((l, c) => l.order - c.order), function() {
|
|
73
|
-
Ct(o, t, e);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function v(o, t, e, i, s) {
|
|
77
|
-
var n, a;
|
|
78
|
-
let r = ht.createElement(o);
|
|
79
|
-
return t && z(r, t), e && (n = r, a = e, z(n.style, a)), i && i.appendChild(r), r;
|
|
80
|
-
}
|
|
81
|
-
function A(o) {
|
|
82
|
-
return o != null;
|
|
83
|
-
}
|
|
84
|
-
function et(o, t) {
|
|
85
|
-
let e = o.length;
|
|
86
|
-
for (; e--; ) if (o[e] === t) {
|
|
87
|
-
o.splice(e, 1);
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
function z(o, t) {
|
|
92
|
-
let e;
|
|
93
|
-
for (e in o || (o = {}), t) o[e] = t[e];
|
|
94
|
-
return o;
|
|
95
|
-
}
|
|
96
|
-
function N(o, t, e, i) {
|
|
97
|
-
if (e = e || {}, ht?.createEvent && (o.dispatchEvent || o.fireEvent && o !== P())) {
|
|
98
|
-
let s = ht.createEvent("Events");
|
|
99
|
-
s.initEvent(t, !0, !0), e = z(s, e), o.dispatchEvent ? o.dispatchEvent(e) : o.fireEvent(t, e);
|
|
100
|
-
} else if (o.hcEvents) {
|
|
101
|
-
e.target || z(e, { preventDefault: function() {
|
|
102
|
-
e.defaultPrevented = !0;
|
|
103
|
-
}, target: o, type: t });
|
|
104
|
-
let s = [], n = o, a = !1;
|
|
105
|
-
for (; n.hcEvents; ) Object.hasOwnProperty.call(n, "hcEvents") && n.hcEvents[t] && (s.length && (a = !0), s.unshift.apply(s, n.hcEvents[t])), n = Object.getPrototypeOf(n);
|
|
106
|
-
a && s.sort((r, l) => r.order - l.order), s.forEach((r) => {
|
|
107
|
-
r.fn.call(o, e, o) === !1 && e.preventDefault();
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
let At = (o = "") => ({ center: 0.5, right: 1, middle: 0.5, bottom: 1 })[o] || 0, pe = Array.prototype.find ? function(o, t) {
|
|
112
|
-
return o.find(t);
|
|
113
|
-
} : function(o, t) {
|
|
114
|
-
let e, i = o.length;
|
|
115
|
-
for (e = 0; e < i; e++) if (t(o[e], e)) return o[e];
|
|
116
|
-
};
|
|
117
|
-
function kt(o) {
|
|
118
|
-
return S(o) && typeof o.nodeType == "number";
|
|
119
|
-
}
|
|
120
|
-
function q(o) {
|
|
121
|
-
return typeof o == "number" && !isNaN(o) && o < 1 / 0 && o > -1 / 0;
|
|
122
|
-
}
|
|
123
|
-
function ct(o) {
|
|
124
|
-
return typeof o == "string";
|
|
125
|
-
}
|
|
126
|
-
function M(o) {
|
|
127
|
-
let t = Object.prototype.toString.call(o);
|
|
128
|
-
return t === "[object Array]" || t === "[object Array Iterator]";
|
|
129
|
-
}
|
|
130
|
-
function S(o, t) {
|
|
131
|
-
return !!o && typeof o == "object" && (!t || !M(o));
|
|
132
|
-
}
|
|
133
|
-
function w(o, ...t) {
|
|
134
|
-
let e, i = [o, ...t], s = {}, n = function(r, l) {
|
|
135
|
-
return typeof r != "object" && (r = {}), O(l, function(c, h) {
|
|
136
|
-
if (h !== "__proto__" && h !== "constructor") {
|
|
137
|
-
let u;
|
|
138
|
-
!S(c, !0) || (u = c?.constructor, S(c, !0) && !kt(c) && u?.name && u.name !== "Object") || kt(c) ? r[h] = l[h] : r[h] = n(r[h] || {}, c);
|
|
139
|
-
}
|
|
140
|
-
}), r;
|
|
141
|
-
};
|
|
142
|
-
o === !0 && (s = i[1], i = Array.prototype.slice.call(i, 2));
|
|
143
|
-
let a = i.length;
|
|
144
|
-
for (e = 0; e < a; e++) s = n(s, i[e]);
|
|
145
|
-
return s;
|
|
146
|
-
}
|
|
147
|
-
function O(o, t, e) {
|
|
148
|
-
for (let i in o) Object.hasOwnProperty.call(o, i) && t.call(o[i], o[i], i, o);
|
|
149
|
-
}
|
|
150
|
-
function B() {
|
|
151
|
-
let o = arguments, t = o.length;
|
|
152
|
-
for (let e = 0; e < t; e++) {
|
|
153
|
-
let i = o[e];
|
|
154
|
-
if (i != null) return i;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function wt(o, t) {
|
|
158
|
-
return 0 > o.indexOf(t) && !!o.push(t);
|
|
159
|
-
}
|
|
160
|
-
function Ct(o, t, e) {
|
|
161
|
-
function i(a, r) {
|
|
162
|
-
let l = o.removeEventListener;
|
|
163
|
-
l && l.call(o, a, r, !1);
|
|
164
|
-
}
|
|
165
|
-
function s(a) {
|
|
166
|
-
let r, l;
|
|
167
|
-
o.nodeName && (t ? (r = {})[t] = !0 : r = a, O(r, function(c, h) {
|
|
168
|
-
if (a[h]) for (l = a[h].length; l--; ) i(h, a[h][l].fn);
|
|
169
|
-
}));
|
|
170
|
-
}
|
|
171
|
-
let n = typeof o == "function" && o.prototype || o;
|
|
172
|
-
if (Object.hasOwnProperty.call(n, "hcEvents")) {
|
|
173
|
-
let a = n.hcEvents;
|
|
174
|
-
if (t) {
|
|
175
|
-
let r = a[t] || [];
|
|
176
|
-
e ? (a[t] = r.filter(function(l) {
|
|
177
|
-
return e !== l.fn;
|
|
178
|
-
}), i(t, e)) : (s(a), a[t] = []);
|
|
179
|
-
} else s(a), delete n.hcEvents;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function Pt(o, t) {
|
|
183
|
-
let e, i, s = o.length;
|
|
184
|
-
for (i = 0; i < s; i++) o[i].safeI = i;
|
|
185
|
-
for (o.sort(function(n, a) {
|
|
186
|
-
return (e = t(n, a)) === 0 ? n.safeI - a.safeI : e;
|
|
187
|
-
}), i = 0; i < s; i++) delete o[i].safeI;
|
|
188
|
-
}
|
|
189
|
-
function Et(o, t, e) {
|
|
190
|
-
let i = o[t];
|
|
191
|
-
o[t] = function() {
|
|
192
|
-
let s = arguments, n = this;
|
|
193
|
-
return e.apply(this, [function() {
|
|
194
|
-
return i.apply(n, arguments.length ? arguments : s);
|
|
195
|
-
}].concat([].slice.call(arguments)));
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function Ot(o, t) {
|
|
199
|
-
let e = this.initAnnotation(o);
|
|
200
|
-
return this.options.annotations.push(e.options), B(t, !0) && (e.redraw(), e.graphic.attr({ opacity: 1 })), e;
|
|
201
|
-
}
|
|
202
|
-
function de() {
|
|
203
|
-
let o = this;
|
|
204
|
-
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, e) => {
|
|
205
|
-
if (!o.annotations.some((i) => i.options === t)) {
|
|
206
|
-
let i = o.initAnnotation(t);
|
|
207
|
-
o.options.annotations[e] = i.options;
|
|
208
|
-
}
|
|
209
|
-
}), o.drawAnnotations(), m(o, "redraw", o.drawAnnotations), m(o, "destroy", function() {
|
|
210
|
-
o.plotBoxClip.destroy(), o.controlPointsGroup.destroy();
|
|
211
|
-
}), m(o, "exportData", function(t) {
|
|
212
|
-
let e = o.annotations, i = (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, l = o.options.exporting?.csv?.annotations?.join;
|
|
213
|
-
e.forEach((u) => {
|
|
214
|
-
u.options.labelOptions?.includeInDataExport && u.labels.forEach((g) => {
|
|
215
|
-
if (g.options.text) {
|
|
216
|
-
let d = g.options.text;
|
|
217
|
-
g.points.forEach((p) => {
|
|
218
|
-
let f = p.x, y = p.series.xAxis ? p.series.xAxis.index : -1, x = !1;
|
|
219
|
-
if (y === -1) {
|
|
220
|
-
let b = t.dataRows[0].length, C = Array(b);
|
|
221
|
-
for (let k = 0; k < b; ++k) C[k] = "";
|
|
222
|
-
C.push(d), C.xValues = [], C.xValues[y] = f, t.dataRows.push(C), x = !0;
|
|
223
|
-
}
|
|
224
|
-
if (x || t.dataRows.forEach((b) => {
|
|
225
|
-
!x && b.xValues && y !== void 0 && f === b.xValues[y] && (l && b.length > a ? b[b.length - 1] += r + d : b.push(d), x = !0);
|
|
226
|
-
}), !x) {
|
|
227
|
-
let b = t.dataRows[0].length, C = Array(b);
|
|
228
|
-
for (let k = 0; k < b; ++k) C[k] = "";
|
|
229
|
-
C[0] = f, C.push(d), C.xValues = [], y !== void 0 && (C.xValues[y] = f), t.dataRows.push(C);
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
let c = 0;
|
|
236
|
-
t.dataRows.forEach((u) => {
|
|
237
|
-
c = Math.max(c, u.length);
|
|
238
|
-
});
|
|
239
|
-
let h = c - t.dataRows[0].length;
|
|
240
|
-
for (let u = 0; u < h; u++) {
|
|
241
|
-
let g = (function(d) {
|
|
242
|
-
let p;
|
|
243
|
-
return i && (p = i(d)) !== !1 ? p : (p = n + " " + d, s ? { columnTitle: p, topLevelColumnTitle: p } : p);
|
|
244
|
-
})(u + 1);
|
|
245
|
-
s ? (t.dataRows[0].push(g.topLevelColumnTitle), t.dataRows[1].push(g.columnTitle)) : t.dataRows[0].push(g);
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
function ue() {
|
|
250
|
-
this.plotBoxClip.attr(this.plotBox), this.annotations.forEach((o) => {
|
|
251
|
-
o.redraw(), o.graphic.animate({ opacity: 1 }, o.animationConfig);
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
function ge(o) {
|
|
255
|
-
let t = this.annotations, e = o.coll === "annotations" ? o : pe(t, function(i) {
|
|
256
|
-
return i.options.id === o;
|
|
257
|
-
});
|
|
258
|
-
e && (N(e, "remove"), et(this.options.annotations, e.options), et(t, e), e.destroy());
|
|
259
|
-
}
|
|
260
|
-
function fe() {
|
|
261
|
-
let o = this.options.annotations, t = this.userOptions.annotations;
|
|
262
|
-
this.annotations = [], M(this.options.annotations) || (this.options.annotations = []), S(t, !0) && S(o, !0) && this.options.annotations.push(o);
|
|
263
|
-
}
|
|
264
|
-
function ye(o) {
|
|
265
|
-
this.chart.hasDraggedAnnotation || o.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
266
|
-
}
|
|
267
|
-
(nt || (nt = {})).compose = function(o, t, e) {
|
|
268
|
-
let i = t.prototype;
|
|
269
|
-
if (!i.addAnnotation) {
|
|
270
|
-
let s = e.prototype;
|
|
271
|
-
m(t, "afterInit", fe), i.addAnnotation = Ot, i.callbacks.push(de), i.collectionsWithInit.annotations = [Ot], i.collectionsWithUpdate.push("annotations"), i.drawAnnotations = ue, i.removeAnnotation = ge, i.initAnnotation = function(n) {
|
|
272
|
-
let a = new (o.types[n.type] || o)(this, n);
|
|
273
|
-
return this.annotations.push(a), a;
|
|
274
|
-
}, Et(s, "onContainerMouseDown", ye);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
let me = nt, Nt = { 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() {
|
|
278
|
-
return A(this.y) ? "" + this.y : "Annotation label";
|
|
279
|
-
}, 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: Bt, isTouchDevice: J } = P(), Mt = class {
|
|
280
|
-
addEvents() {
|
|
281
|
-
let o = this, t = function(e) {
|
|
282
|
-
m(e, J ? "touchstart" : "mousedown", (i) => {
|
|
283
|
-
o.onMouseDown(i);
|
|
284
|
-
}, { passive: !1 });
|
|
285
|
-
};
|
|
286
|
-
if (t(this.graphic.element), (o.labels || []).forEach((e) => {
|
|
287
|
-
e.options.useHTML && e.graphic.text && !e.graphic.text.foreignObject && t(e.graphic.text.element);
|
|
288
|
-
}), O(o.options.events, (e, i) => {
|
|
289
|
-
let s = function(n) {
|
|
290
|
-
i === "click" && o.cancelClick || e.call(o, o.chart.pointer?.normalize(n), o.target, o);
|
|
291
|
-
};
|
|
292
|
-
(o.nonDOMEvents || []).indexOf(i) === -1 ? (m(o.graphic.element, i, s, { passive: !1 }), o.graphic.div && m(o.graphic.div, i, s, { passive: !1 })) : m(o, i, s, { passive: !1 });
|
|
293
|
-
}), o.options.draggable && (m(o, "drag", o.onDrag), !o.graphic.renderer.styledMode)) {
|
|
294
|
-
let e = { cursor: { x: "ew-resize", y: "ns-resize", xy: "move" }[o.options.draggable] };
|
|
295
|
-
o.graphic.css(e), (o.labels || []).forEach((i) => {
|
|
296
|
-
i.options.useHTML && i.graphic.text && !i.graphic.text.foreignObject && i.graphic.text.css(e);
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
o.isUpdating || N(o, "add");
|
|
300
|
-
}
|
|
301
|
-
destroy() {
|
|
302
|
-
this.removeDocEvents(), Ct(this), this.hcEvents = null;
|
|
303
|
-
}
|
|
304
|
-
mouseMoveToRadians(o, t, e) {
|
|
305
|
-
let i = o.prevChartY - e, s = o.prevChartX - t, n = o.chartY - e, a = o.chartX - t, r;
|
|
306
|
-
return this.chart.inverted && (r = s, s = i, i = r, r = a, a = n, n = r), Math.atan2(n, a) - Math.atan2(i, s);
|
|
307
|
-
}
|
|
308
|
-
mouseMoveToScale(o, t, e) {
|
|
309
|
-
let i = o.prevChartX - t, s = o.prevChartY - e, n = o.chartX - t, a = o.chartY - e, r = (n || 1) / (i || 1), l = (a || 1) / (s || 1);
|
|
310
|
-
if (this.chart.inverted) {
|
|
311
|
-
let c = l;
|
|
312
|
-
l = r, r = c;
|
|
313
|
-
}
|
|
314
|
-
return { x: r, y: l };
|
|
315
|
-
}
|
|
316
|
-
mouseMoveToTranslation(o) {
|
|
317
|
-
let t = o.chartX - o.prevChartX, e = o.chartY - o.prevChartY, i;
|
|
318
|
-
return this.chart.inverted && (i = e, e = t, t = i), { x: t, y: e };
|
|
319
|
-
}
|
|
320
|
-
onDrag(o) {
|
|
321
|
-
if (this.chart.isInsidePlot(o.chartX - this.chart.plotLeft, o.chartY - this.chart.plotTop, { visiblePlotOnly: !0 })) {
|
|
322
|
-
let t = this.mouseMoveToTranslation(o);
|
|
323
|
-
this.options.draggable === "x" && (t.y = 0), this.options.draggable === "y" && (t.x = 0), this.points.length ? this.translate(t.x, t.y) : (this.shapes.forEach((e) => e.translate(t.x, t.y)), this.labels.forEach((e) => e.translate(t.x, t.y))), this.redraw(!1);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
onMouseDown(o) {
|
|
327
|
-
if (o.preventDefault && o.preventDefault(), o.button === 2) return;
|
|
328
|
-
let t = this, e = t.chart.pointer, i = o?.sourceCapabilities?.firesTouchEvents || !1, s = (o = e?.normalize(o) || o).chartX, n = o.chartY;
|
|
329
|
-
t.cancelClick = !1, t.chart.hasDraggedAnnotation = !0, t.removeDrag = m(Bt, J || i ? "touchmove" : "mousemove", function(a) {
|
|
330
|
-
t.hasDragged = !0, (a = e?.normalize(a) || a).prevChartX = s, a.prevChartY = n, N(t, "drag", a), s = a.chartX, n = a.chartY;
|
|
331
|
-
}, J || i ? { passive: !1 } : void 0), t.removeMouseUp = m(Bt, J || i ? "touchend" : "mouseup", function() {
|
|
332
|
-
let a = B(t.target && t.target.annotation, t.target);
|
|
333
|
-
a && (a.cancelClick = t.hasDragged), t.cancelClick = t.hasDragged, t.chart.hasDraggedAnnotation = !1, t.hasDragged && N(B(a, t), "afterUpdate"), t.hasDragged = !1, t.onMouseUp();
|
|
334
|
-
}, J || i ? { passive: !1 } : void 0);
|
|
335
|
-
}
|
|
336
|
-
onMouseUp() {
|
|
337
|
-
this.removeDocEvents();
|
|
338
|
-
}
|
|
339
|
-
removeDocEvents() {
|
|
340
|
-
this.removeDrag && (this.removeDrag = this.removeDrag()), this.removeMouseUp && (this.removeMouseUp = this.removeMouseUp());
|
|
341
|
-
}
|
|
342
|
-
}, Tt = class extends Mt {
|
|
343
|
-
constructor(o, t, e, i) {
|
|
344
|
-
super(), this.nonDOMEvents = ["drag"], this.chart = o, this.target = t, this.options = e, this.index = B(e.index, i);
|
|
345
|
-
}
|
|
346
|
-
destroy() {
|
|
347
|
-
super.destroy(), this.graphic && (this.graphic = this.graphic.destroy()), this.chart = null, this.target = null, this.options = null;
|
|
348
|
-
}
|
|
349
|
-
redraw(o) {
|
|
350
|
-
this.graphic[o ? "animate" : "attr"](this.options.positioner.call(this, this.target, this));
|
|
351
|
-
}
|
|
352
|
-
render() {
|
|
353
|
-
let o = this.chart, t = this.options;
|
|
354
|
-
this.graphic = o.renderer.symbol(t.symbol, 0, 0, t.width, t.height).add(o.controlPointsGroup).css(t.style), this.setVisibility(t.visible), this.addEvents();
|
|
355
|
-
}
|
|
356
|
-
setVisibility(o) {
|
|
357
|
-
this.graphic[o ? "show" : "hide"](), this.options.visible = o;
|
|
358
|
-
}
|
|
359
|
-
update(o) {
|
|
360
|
-
let t = this.chart, e = this.target, i = this.index, s = w(!0, this.options, o);
|
|
361
|
-
this.destroy(), this.constructor(t, e, s, i), this.render(t.controlPointsGroup), this.redraw();
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
var ve = E(512), It = E.n(ve);
|
|
365
|
-
let { series: { prototype: xe } } = It();
|
|
366
|
-
class H {
|
|
367
|
-
static fromPoint(t) {
|
|
368
|
-
return new H(t.series.chart, null, { x: t.x, y: t.y, xAxis: t.series.xAxis, yAxis: t.series.yAxis });
|
|
369
|
-
}
|
|
370
|
-
static pointToPixels(t, e) {
|
|
371
|
-
let i = t.series, s = i.chart, n = t.plotX || 0, a = t.plotY || 0, r;
|
|
372
|
-
return s.inverted && (t.mock ? (n = t.plotY, a = t.plotX) : (n = s.plotWidth - (t.plotY || 0), a = s.plotHeight - (t.plotX || 0))), i && !e && (n += (r = i.getPlotBox()).translateX, a += r.translateY), { x: n, y: a };
|
|
373
|
-
}
|
|
374
|
-
static pointToOptions(t) {
|
|
375
|
-
return { x: t.x, y: t.y, xAxis: t.series.xAxis, yAxis: t.series.yAxis };
|
|
376
|
-
}
|
|
377
|
-
constructor(t, e, i) {
|
|
378
|
-
this.mock = !0, this.point = this, this.series = { visible: !0, chart: t, getPlotBox: xe.getPlotBox }, this.target = e || null, this.options = i, this.applyOptions(this.getOptions());
|
|
379
|
-
}
|
|
380
|
-
applyOptions(t) {
|
|
381
|
-
this.command = t.command, this.setAxis(t, "x"), this.setAxis(t, "y"), this.refresh();
|
|
382
|
-
}
|
|
383
|
-
getOptions() {
|
|
384
|
-
return this.hasDynamicOptions() && typeof this.options == "function" ? this.options(this.target) : this.options;
|
|
385
|
-
}
|
|
386
|
-
hasDynamicOptions() {
|
|
387
|
-
return typeof this.options == "function";
|
|
388
|
-
}
|
|
389
|
-
isInsidePlot() {
|
|
390
|
-
let t = this.plotX, e = this.plotY, i = this.series.xAxis, s = this.series.yAxis, n = { x: t, y: e, isInsidePlot: !0, options: {} };
|
|
391
|
-
return i && (n.isInsidePlot = A(t) && t >= 0 && t <= i.len), s && (n.isInsidePlot = n.isInsidePlot && A(e) && e >= 0 && e <= s.len), N(this.series.chart, "afterIsInsidePlot", n), n.isInsidePlot;
|
|
392
|
-
}
|
|
393
|
-
refresh() {
|
|
394
|
-
let t = this.series, e = t.xAxis, i = t.yAxis, s = this.getOptions();
|
|
395
|
-
e ? (this.x = s.x, this.plotX = e.toPixels(s.x, !0)) : (this.x = void 0, this.plotX = s.x), i ? (this.y = s.y, this.plotY = i.toPixels(s.y, !0)) : (this.y = null, this.plotY = s.y), this.isInside = this.isInsidePlot();
|
|
396
|
-
}
|
|
397
|
-
refreshOptions() {
|
|
398
|
-
let t = this.series, e = t.xAxis, i = t.yAxis;
|
|
399
|
-
this.x = this.options.x = e ? this.options.x = e.toValue(this.plotX, !0) : this.plotX, this.y = this.options.y = i ? i.toValue(this.plotY, !0) : this.plotY;
|
|
400
|
-
}
|
|
401
|
-
rotate(t, e, i) {
|
|
402
|
-
if (!this.hasDynamicOptions()) {
|
|
403
|
-
let s = Math.cos(i), n = Math.sin(i), a = this.plotX - t, r = this.plotY - e;
|
|
404
|
-
this.plotX = a * s - r * n + t, this.plotY = a * n + r * s + e, this.refreshOptions();
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
scale(t, e, i, s) {
|
|
408
|
-
if (!this.hasDynamicOptions()) {
|
|
409
|
-
let n = this.plotX * i, a = this.plotY * s;
|
|
410
|
-
this.plotX = (1 - i) * t + n, this.plotY = (1 - s) * e + a, this.refreshOptions();
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
setAxis(t, e) {
|
|
414
|
-
let i = e + "Axis", s = t[i], n = this.series.chart;
|
|
415
|
-
this.series[i] = typeof s == "object" ? s : A(s) ? n[i][s] || n.get(s) : null;
|
|
416
|
-
}
|
|
417
|
-
toAnchor() {
|
|
418
|
-
let t = [this.plotX, this.plotY, 0, 0];
|
|
419
|
-
return this.series.chart.inverted && (t[0] = this.plotY, t[1] = this.plotX), t;
|
|
420
|
-
}
|
|
421
|
-
translate(t, e, i, s) {
|
|
422
|
-
this.hasDynamicOptions() || (this.plotX += i, this.plotY += s, this.refreshOptions());
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
(function(o) {
|
|
426
|
-
function t() {
|
|
427
|
-
let d = this.controlPoints, p = this.options.controlPoints || [];
|
|
428
|
-
p.forEach((f, y) => {
|
|
429
|
-
let x = w(this.options.controlPointOptions, f);
|
|
430
|
-
x.index || (x.index = y), p[y] = x, d.push(new Tt(this.chart, this, x));
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
function e(d) {
|
|
434
|
-
let p = d.series.getPlotBox(), f = d.series.chart, y = d.mock ? d.toAnchor() : f.tooltip && f.tooltip.getAnchor.call({ chart: d.series.chart }, d) || [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 };
|
|
435
|
-
return { relativePosition: x, absolutePosition: w(x, { x: x.x + (d.mock ? p.translateX : f.plotLeft), y: x.y + (d.mock ? p.translateY : f.plotTop) }) };
|
|
436
|
-
}
|
|
437
|
-
function i() {
|
|
438
|
-
this.controlPoints.forEach((d) => d.destroy()), this.chart = null, this.controlPoints = null, this.points = null, this.options = null, this.annotation && (this.annotation = null);
|
|
439
|
-
}
|
|
440
|
-
function s() {
|
|
441
|
-
var d;
|
|
442
|
-
let p = this.options;
|
|
443
|
-
return p.points || p.point && (M(d = p.point) ? d : [d]);
|
|
444
|
-
}
|
|
445
|
-
function n() {
|
|
446
|
-
let d, p, f = this.getPointsOptions(), y = this.points, x = f?.length || 0;
|
|
447
|
-
for (d = 0; d < x; d++) {
|
|
448
|
-
if (!(p = this.point(f[d], y[d]))) {
|
|
449
|
-
y.length = 0;
|
|
450
|
-
return;
|
|
451
|
-
}
|
|
452
|
-
p.mock && p.refresh(), y[d] = p;
|
|
453
|
-
}
|
|
454
|
-
return y;
|
|
455
|
-
}
|
|
456
|
-
function a(d, p) {
|
|
457
|
-
if (d && d.series) return d;
|
|
458
|
-
if (!p || p.series === null) {
|
|
459
|
-
if (S(d)) p = new H(this.chart, this, d);
|
|
460
|
-
else if (ct(d)) p = this.chart.get(d) || null;
|
|
461
|
-
else if (typeof d == "function") {
|
|
462
|
-
let f = d.call(p, this);
|
|
463
|
-
p = f.series ? f : new H(this.chart, this, d);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
return p;
|
|
467
|
-
}
|
|
468
|
-
function r(d) {
|
|
469
|
-
this.controlPoints.forEach((p) => p.redraw(d));
|
|
470
|
-
}
|
|
471
|
-
function l() {
|
|
472
|
-
this.controlPoints.forEach((d) => d.render());
|
|
473
|
-
}
|
|
474
|
-
function c(d, p, f, y, x) {
|
|
475
|
-
if (this.chart.inverted) {
|
|
476
|
-
let b = p;
|
|
477
|
-
p = f, f = b;
|
|
478
|
-
}
|
|
479
|
-
this.points.forEach((b, C) => this.transformPoint(d, p, f, y, x, C), this);
|
|
480
|
-
}
|
|
481
|
-
function h(d, p, f, y, x, b) {
|
|
482
|
-
let C = this.points[b];
|
|
483
|
-
C.mock || (C = this.points[b] = H.fromPoint(C)), C[d](p, f, y, x);
|
|
484
|
-
}
|
|
485
|
-
function u(d, p) {
|
|
486
|
-
this.transform("translate", null, null, d, p);
|
|
487
|
-
}
|
|
488
|
-
function g(d, p, f) {
|
|
489
|
-
this.transformPoint("translate", null, null, d, p, f);
|
|
490
|
-
}
|
|
491
|
-
o.compose = function(d) {
|
|
492
|
-
let p = d.prototype;
|
|
493
|
-
p.addControlPoints || w(!0, p, { addControlPoints: t, anchor: e, destroyControlTarget: i, getPointsOptions: s, linkPoints: n, point: a, redrawControlPoints: r, renderControlPoints: l, transform: c, transformPoint: h, translate: u, translatePoint: g });
|
|
494
|
-
};
|
|
495
|
-
})(at || (at = {}));
|
|
496
|
-
let St = at;
|
|
497
|
-
class Dt {
|
|
498
|
-
constructor(t, e, i, s) {
|
|
499
|
-
this.annotation = t, this.chart = t.chart, this.collection = s === "label" ? "labels" : "shapes", this.controlPoints = [], this.options = e, this.points = [], this.index = i, this.itemType = s, this.init(t, e, i);
|
|
500
|
-
}
|
|
501
|
-
attr() {
|
|
502
|
-
this.graphic.attr.apply(this.graphic, arguments);
|
|
503
|
-
}
|
|
504
|
-
attrsFromOptions(t) {
|
|
505
|
-
let e, i, s = this.constructor.attrsMap, n = {}, a = this.chart.styledMode;
|
|
506
|
-
for (e in t) i = s[e], s[e] === void 0 || a && ["fill", "stroke", "stroke-width"].indexOf(i) !== -1 || (n[i] = t[e]);
|
|
507
|
-
return n;
|
|
508
|
-
}
|
|
509
|
-
destroy() {
|
|
510
|
-
this.graphic && (this.graphic = this.graphic.destroy()), this.tracker && (this.tracker = this.tracker.destroy()), this.destroyControlTarget();
|
|
511
|
-
}
|
|
512
|
-
calculateAnnotationSize(t, e, i) {
|
|
513
|
-
let s = i.toPixels(t, !0);
|
|
514
|
-
return Math.abs(i.toPixels(t + e, !0) - s);
|
|
515
|
-
}
|
|
516
|
-
init(t, e, i) {
|
|
517
|
-
this.annotation = t, this.chart = t.chart, this.options = e, this.points = [], this.controlPoints = [], this.index = i, this.linkPoints(), this.addControlPoints();
|
|
518
|
-
}
|
|
519
|
-
redraw(t) {
|
|
520
|
-
this.redrawControlPoints(t);
|
|
521
|
-
}
|
|
522
|
-
render(t) {
|
|
523
|
-
this.options.className && this.graphic && this.graphic.addClass(this.options.className), this.renderControlPoints();
|
|
524
|
-
}
|
|
525
|
-
rotate(t, e, i) {
|
|
526
|
-
this.transform("rotate", t, e, i);
|
|
527
|
-
}
|
|
528
|
-
scale(t, e, i, s) {
|
|
529
|
-
this.transform("scale", t, e, i, s);
|
|
530
|
-
}
|
|
531
|
-
setControlPointsVisibility(t) {
|
|
532
|
-
this.controlPoints.forEach((e) => {
|
|
533
|
-
e.setVisibility(t);
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
shouldBeDrawn() {
|
|
537
|
-
return !!this.points.length;
|
|
538
|
-
}
|
|
539
|
-
translateShape(t, e, i) {
|
|
540
|
-
let s = this.annotation.chart, n = this.annotation.userOptions, a = s.annotations.indexOf(this.annotation), r = s.options.annotations[a];
|
|
541
|
-
this.translatePoint(t, e, 0), i && this.translatePoint(t, e, 1), r[this.collection][this.index].point = this.options.point, n[this.collection][this.index].point = this.options.point;
|
|
542
|
-
}
|
|
543
|
-
update(t) {
|
|
544
|
-
let e = this.annotation, i = w(!0, this.options, t), s = this.graphic.parentGroup, n = this.constructor;
|
|
545
|
-
this.destroy(), w(!0, this, new n(e, i, this.index, this.itemType)), this.render(s), this.redraw();
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
St.compose(Dt);
|
|
549
|
-
let G = Dt, { defaultMarkers: be } = { 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 } }] } } }, Ae = Yt("marker-end"), ke = Yt("marker-start"), Lt = "rgba(192,192,192," + (P().svg ? 1e-4 : 2e-3) + ")";
|
|
550
|
-
function Yt(o) {
|
|
551
|
-
return function(t) {
|
|
552
|
-
this.attr(o, "url(#" + t + ")");
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function we() {
|
|
556
|
-
this.options.defs = w(be, this.options.defs || {});
|
|
557
|
-
}
|
|
558
|
-
function Ce(o, t) {
|
|
559
|
-
let e = { attributes: { id: o } }, i = { stroke: t.color || "none", fill: t.color || "rgba(0, 0, 0, 0.75)" };
|
|
560
|
-
e.children = t.children && t.children.map(function(a) {
|
|
561
|
-
return w(i, a);
|
|
562
|
-
});
|
|
563
|
-
let s = w(!0, { attributes: { markerWidth: 20, markerHeight: 20, refX: 0, refY: 0, orient: "auto" } }, t, e), n = this.definition(s);
|
|
564
|
-
return n.id = o, n;
|
|
565
|
-
}
|
|
566
|
-
class K extends G {
|
|
567
|
-
static compose(t, e) {
|
|
568
|
-
let i = e.prototype;
|
|
569
|
-
i.addMarker || (m(t, "afterGetContainer", we), i.addMarker = Ce);
|
|
570
|
-
}
|
|
571
|
-
constructor(t, e, i) {
|
|
572
|
-
super(t, e, i, "shape"), this.type = "path";
|
|
573
|
-
}
|
|
574
|
-
init(t, e, i) {
|
|
575
|
-
A(e.yAxis) && e.points.forEach((s) => {
|
|
576
|
-
s && typeof s != "string" && (s.yAxis = e.yAxis);
|
|
577
|
-
}), A(e.xAxis) && e.points.forEach((s) => {
|
|
578
|
-
s && typeof s != "string" && (s.xAxis = e.xAxis);
|
|
579
|
-
}), super.init(t, e, i);
|
|
580
|
-
}
|
|
581
|
-
toD() {
|
|
582
|
-
let t = this.options.d;
|
|
583
|
-
if (t) return typeof t == "function" ? t.call(this) : t;
|
|
584
|
-
let e = this.points, i = e.length, s = [], n = i, a = e[0], r = n && this.anchor(a).absolutePosition, l = 0, c;
|
|
585
|
-
if (r) for (s.push(["M", r.x, r.y]); ++l < i && n; ) c = (a = e[l]).command || "L", r = this.anchor(a).absolutePosition, c === "M" || c === "L" ? s.push([c, r.x, r.y]) : c === "Z" && s.push([c]), n = a.series.visible;
|
|
586
|
-
return n && this.graphic ? this.chart.renderer.crispLine(s, this.graphic.strokeWidth()) : null;
|
|
587
|
-
}
|
|
588
|
-
shouldBeDrawn() {
|
|
589
|
-
return super.shouldBeDrawn() || !!this.options.d;
|
|
590
|
-
}
|
|
591
|
-
render(t) {
|
|
592
|
-
let e = this.options, i = this.attrsFromOptions(e);
|
|
593
|
-
this.graphic = this.annotation.chart.renderer.path([["M", 0, 0]]).attr(i).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: Lt, fill: Lt, "stroke-width": this.graphic.strokeWidth() + 2 * e.snap }), super.render(), z(this.graphic, { markerStartSetter: ke, markerEndSetter: Ae }), this.setMarkers(this);
|
|
594
|
-
}
|
|
595
|
-
redraw(t) {
|
|
596
|
-
if (this.graphic) {
|
|
597
|
-
let e = this.toD(), i = t ? "animate" : "attr";
|
|
598
|
-
e ? (this.graphic[i]({ d: e }), this.tracker[i]({ d: e })) : (this.graphic.attr({ d: "M 0 -9000000000" }), this.tracker.attr({ d: "M 0 -9000000000" })), this.graphic.placed = this.tracker.placed = !!e;
|
|
599
|
-
}
|
|
600
|
-
super.redraw(t);
|
|
601
|
-
}
|
|
602
|
-
setMarkers(t) {
|
|
603
|
-
let e = t.options, i = t.chart, s = i.options.defs, n = e.fill, a = A(n) && n !== "none" ? n : e.stroke;
|
|
604
|
-
["markerStart", "markerEnd"].forEach(function(r) {
|
|
605
|
-
let l, c, h, u, g = e[r];
|
|
606
|
-
if (g) {
|
|
607
|
-
for (h in s) if ((g === ((l = s[h]).attributes && l.attributes.id) || g === l.id) && l.tagName === "marker") {
|
|
608
|
-
c = l;
|
|
609
|
-
break;
|
|
610
|
-
}
|
|
611
|
-
c && (u = t[r] = i.renderer.addMarker((e.id || (0, bt.uniqueKey)()) + "-" + g, w(c, { color: a })), t.attr(r, u.getAttribute("id")));
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
K.attrsMap = { dashStyle: "dashstyle", strokeWidth: "stroke-width", stroke: "stroke", fill: "fill", zIndex: "zIndex" };
|
|
617
|
-
class Xt extends G {
|
|
618
|
-
constructor(t, e, i) {
|
|
619
|
-
super(t, e, i, "shape"), this.type = "rect", this.translate = super.translateShape;
|
|
620
|
-
}
|
|
621
|
-
init(t, e, i) {
|
|
622
|
-
let { point: s, xAxis: n, yAxis: a } = e;
|
|
623
|
-
s && typeof s != "string" && (A(n) && (s.xAxis = n), A(a) && (s.yAxis = a)), super.init(t, e, i);
|
|
624
|
-
}
|
|
625
|
-
render(t) {
|
|
626
|
-
let e = this.attrsFromOptions(this.options);
|
|
627
|
-
this.graphic = this.annotation.chart.renderer.rect(0, -9e9, 0, 0).attr(e).add(t), super.render();
|
|
628
|
-
}
|
|
629
|
-
redraw(t) {
|
|
630
|
-
if (this.graphic) {
|
|
631
|
-
let e = this.points[0], i = this.anchor(e).absolutePosition, s = this.options.width || 0, n = this.options.height || 0;
|
|
632
|
-
if (i) {
|
|
633
|
-
let a = A(this.options.xAxis) ? this.chart.xAxis[this.options.xAxis] : void 0, r = A(this.options.yAxis) ? this.chart.yAxis[this.options.yAxis] : void 0;
|
|
634
|
-
a && A(e.x) && (s = this.calculateAnnotationSize(e.x, s, a)), r && A(e.y) && (n = this.calculateAnnotationSize(e.y, n, r)), this.graphic[t ? "animate" : "attr"]({ x: i.x, y: i.y, width: s, height: n });
|
|
635
|
-
} else this.attr({ x: 0, y: -9e9 });
|
|
636
|
-
this.graphic.placed = !!i;
|
|
637
|
-
}
|
|
638
|
-
super.redraw(t);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
Xt.attrsMap = w(K.attrsMap, { width: "width", height: "height" });
|
|
642
|
-
class Ft extends G {
|
|
643
|
-
constructor(t, e, i) {
|
|
644
|
-
super(t, e, i, "shape"), this.type = "circle", this.translate = super.translateShape;
|
|
645
|
-
}
|
|
646
|
-
init(t, e, i) {
|
|
647
|
-
let { point: s, xAxis: n, yAxis: a } = e;
|
|
648
|
-
s && typeof s != "string" && (A(n) && (s.xAxis = n), A(a) && (s.yAxis = a)), super.init(t, e, i);
|
|
649
|
-
}
|
|
650
|
-
redraw(t) {
|
|
651
|
-
if (this.graphic) {
|
|
652
|
-
let e = this.points[0], i = this.anchor(e).absolutePosition, s = this.options.r || 0;
|
|
653
|
-
if (i) {
|
|
654
|
-
let n = A(this.options.yAxis) ? this.chart.yAxis[this.options.yAxis] : void 0;
|
|
655
|
-
n && A(e.y) && (s = this.calculateAnnotationSize(e.y, s, n)), this.graphic[t ? "animate" : "attr"]({ x: i.x, y: i.y, r: s });
|
|
656
|
-
} else this.graphic.attr({ x: 0, y: -9e9 });
|
|
657
|
-
this.graphic.placed = !!i;
|
|
658
|
-
}
|
|
659
|
-
super.redraw.call(this, t);
|
|
660
|
-
}
|
|
661
|
-
render(t) {
|
|
662
|
-
let e = this.attrsFromOptions(this.options);
|
|
663
|
-
this.graphic = this.annotation.chart.renderer.circle(0, -9e9, 0).attr(e).add(t), super.render();
|
|
664
|
-
}
|
|
665
|
-
setRadius(t) {
|
|
666
|
-
this.options.r = t;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
Ft.attrsMap = w(K.attrsMap, { r: "r" });
|
|
670
|
-
class Rt extends G {
|
|
671
|
-
constructor(t, e, i) {
|
|
672
|
-
super(t, e, i, "shape"), this.type = "ellipse";
|
|
673
|
-
}
|
|
674
|
-
init(t, e, i) {
|
|
675
|
-
A(e.yAxis) && e.points.forEach((s) => {
|
|
676
|
-
s && typeof s != "string" && (s.yAxis = e.yAxis);
|
|
677
|
-
}), A(e.xAxis) && e.points.forEach((s) => {
|
|
678
|
-
s && typeof s != "string" && (s.xAxis = e.xAxis);
|
|
679
|
-
}), super.init(t, e, i);
|
|
680
|
-
}
|
|
681
|
-
render(t) {
|
|
682
|
-
this.graphic = this.annotation.chart.renderer.createElement("ellipse").attr(this.attrsFromOptions(this.options)).add(t), super.render();
|
|
683
|
-
}
|
|
684
|
-
translate(t, e) {
|
|
685
|
-
super.translateShape(t, e, !0);
|
|
686
|
-
}
|
|
687
|
-
getDistanceFromLine(t, e, i, s) {
|
|
688
|
-
return Math.abs((e.y - t.y) * i - (e.x - t.x) * s + e.x * t.y - e.y * t.x) / Math.sqrt((e.y - t.y) * (e.y - t.y) + (e.x - t.x) * (e.x - t.x));
|
|
689
|
-
}
|
|
690
|
-
getAttrs(t, e) {
|
|
691
|
-
let i = t.x, s = t.y, n = e.x, a = e.y, r = (i + n) / 2, l = Math.sqrt((i - n) * (i - n) / 4 + (s - a) * (s - a) / 4), c = 180 * Math.atan((a - s) / (n - i)) / Math.PI;
|
|
692
|
-
return r < i && (c += 180), { cx: r, cy: (s + a) / 2, rx: l, ry: this.getRY(), angle: c };
|
|
693
|
-
}
|
|
694
|
-
getRY() {
|
|
695
|
-
let t = this.getYAxis();
|
|
696
|
-
return A(t) ? Math.abs(t.toPixels(this.options.ry) - t.toPixels(0)) : this.options.ry;
|
|
697
|
-
}
|
|
698
|
-
getYAxis() {
|
|
699
|
-
let t = this.options.yAxis;
|
|
700
|
-
return this.chart.yAxis[t];
|
|
701
|
-
}
|
|
702
|
-
getAbsolutePosition(t) {
|
|
703
|
-
return this.anchor(t).absolutePosition;
|
|
704
|
-
}
|
|
705
|
-
redraw(t) {
|
|
706
|
-
if (this.graphic) {
|
|
707
|
-
let e = this.getAbsolutePosition(this.points[0]), i = this.getAbsolutePosition(this.points[1]), s = this.getAttrs(e, i);
|
|
708
|
-
e ? this.graphic[t ? "animate" : "attr"]({ cx: s.cx, cy: s.cy, rx: s.rx, ry: s.ry, rotation: s.angle, rotationOriginX: s.cx, rotationOriginY: s.cy }) : this.graphic.attr({ x: 0, y: -9e9 }), this.graphic.placed = !!e;
|
|
709
|
-
}
|
|
710
|
-
super.redraw(t);
|
|
711
|
-
}
|
|
712
|
-
setYRadius(t) {
|
|
713
|
-
let e = this.annotation.userOptions.shapes;
|
|
714
|
-
this.options.ry = t, e && e[0] && (e[0].ry = t, e[0].ry = t);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
Rt.attrsMap = w(K.attrsMap, { ry: "ry" });
|
|
718
|
-
var Pe = E(984), Ut = E.n(Pe);
|
|
719
|
-
let { format: Ee } = Ut();
|
|
720
|
-
function Oe(o, t, e, i, s) {
|
|
721
|
-
let n = s && s.anchorX, a = s && s.anchorY, r, l, c = e / 2;
|
|
722
|
-
return q(n) && q(a) && (r = [["M", n, a]], (l = t - a) < 0 && (l = -i - l), l < e && (c = n < o + e / 2 ? l : e - l), a > t + i ? r.push(["L", o + c, t + i]) : a < t ? r.push(["L", o + c, t]) : n < o ? r.push(["L", o, t + i / 2]) : n > o + e && r.push(["L", o + e, t + i / 2])), r || [];
|
|
723
|
-
}
|
|
724
|
-
class D extends G {
|
|
725
|
-
static alignedPosition(t, e) {
|
|
726
|
-
return { x: Math.round((e.x || 0) + (t.x || 0) + (e.width - (t.width || 0)) * At(t.align)), y: Math.round((e.y || 0) + (t.y || 0) + (e.height - (t.height || 0)) * At(t.verticalAlign)) };
|
|
727
|
-
}
|
|
728
|
-
static compose(t) {
|
|
729
|
-
t.prototype.symbols.connector = Oe;
|
|
730
|
-
}
|
|
731
|
-
static justifiedOptions(t, e, i, s) {
|
|
732
|
-
let n, a = i.align, r = i.verticalAlign, l = e.box ? 0 : e.padding || 0, c = e.getBBox(), h = { align: a, verticalAlign: r, x: i.x, y: i.y, width: e.width, height: e.height }, u = (s.x || 0) - t.plotLeft, g = (s.y || 0) - t.plotTop;
|
|
733
|
-
return (n = u + l) < 0 && (a === "right" ? h.align = "left" : h.x = (h.x || 0) - n), (n = u + c.width - l) > t.plotWidth && (a === "left" ? h.align = "right" : h.x = (h.x || 0) + t.plotWidth - n), (n = g + l) < 0 && (r === "bottom" ? h.verticalAlign = "top" : h.y = (h.y || 0) - n), (n = g + c.height - l) > t.plotHeight && (r === "top" ? h.verticalAlign = "bottom" : h.y = (h.y || 0) + t.plotHeight - n), h;
|
|
734
|
-
}
|
|
735
|
-
constructor(t, e, i) {
|
|
736
|
-
super(t, e, i, "label");
|
|
737
|
-
}
|
|
738
|
-
translatePoint(t, e) {
|
|
739
|
-
super.translatePoint(t, e, 0);
|
|
740
|
-
}
|
|
741
|
-
translate(t, e) {
|
|
742
|
-
var i, s;
|
|
743
|
-
let n = this.annotation.chart, a = this.annotation.userOptions, r = n.annotations.indexOf(this.annotation), l = n.options.annotations[r];
|
|
744
|
-
if (n.inverted) {
|
|
745
|
-
let c = t;
|
|
746
|
-
t = e, e = c;
|
|
747
|
-
}
|
|
748
|
-
(i = this.options).x || (i.x = 0), (s = this.options).y || (s.y = 0), this.options.x += t, this.options.y += e, l[this.collection][this.index].x = this.options.x, l[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;
|
|
749
|
-
}
|
|
750
|
-
render(t) {
|
|
751
|
-
let e = this.options, i = this.attrsFromOptions(e), s = e.style, n = this.annotation.chart.options.chart, a = n.plotBackgroundColor || n.backgroundColor;
|
|
752
|
-
if (this.graphic = this.annotation.chart.renderer.label("", 0, -9999, e.shape, void 0, void 0, e.useHTML, void 0, "annotation-label").attr(i).add(t), !this.annotation.chart.styledMode) {
|
|
753
|
-
if (s?.color === "contrast") {
|
|
754
|
-
let r = !e.shape || D.shapesWithoutBackground.indexOf(e.shape) > -1 || e.backgroundColor === "none" ? a : e.backgroundColor;
|
|
755
|
-
s.color = this.annotation.chart.renderer.getContrast(typeof r == "string" ? r : typeof a == "string" ? a : "#ffffff");
|
|
756
|
-
}
|
|
757
|
-
this.graphic.css(e.style || {}).shadow(e.shadow);
|
|
758
|
-
}
|
|
759
|
-
this.graphic.labelrank = e.labelrank, super.render();
|
|
760
|
-
}
|
|
761
|
-
redraw(t) {
|
|
762
|
-
let e = this.options, i = this.text || e.format || e.text, s = this.graphic, n = this.points[0];
|
|
763
|
-
if (!s) return void this.redraw(t);
|
|
764
|
-
s.attr({ text: i ? Ee(String(i), n, this.annotation.chart) : e.formatter.call(n, n) });
|
|
765
|
-
let a = this.anchor(n), r = this.position(a);
|
|
766
|
-
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);
|
|
767
|
-
}
|
|
768
|
-
anchor(t) {
|
|
769
|
-
let e = super.anchor.apply(this, arguments), i = this.options.x || 0, s = this.options.y || 0;
|
|
770
|
-
return e.absolutePosition.x -= i, e.absolutePosition.y -= s, e.relativePosition.x -= i, e.relativePosition.y -= s, e;
|
|
771
|
-
}
|
|
772
|
-
position(t) {
|
|
773
|
-
let e = this.graphic, i = this.annotation.chart, s = i.tooltip, n = this.points[0], a = this.options, r = t.absolutePosition, l = t.relativePosition, c, h, u, g, d = n.series.visible && H.prototype.isInsidePlot.call(n);
|
|
774
|
-
if (e && d) {
|
|
775
|
-
let { width: p = 0, height: f = 0 } = e;
|
|
776
|
-
a.distance && s ? c = s.getPosition.call({ chart: i, distance: B(a.distance, 16), getPlayingField: s.getPlayingField, pointer: s.pointer }, p, f, { plotX: l.x, plotY: l.y, negative: n.negative, ttBelow: n.ttBelow, h: l.height || l.width }) : a.positioner ? c = a.positioner.call(this, this) : (h = { x: r.x, y: r.y, width: 0, height: 0 }, c = D.alignedPosition(z(a, { width: p, height: f }), h), this.options.overflow === "justify" && (c = D.alignedPosition(D.justifiedOptions(i, e, a, c), h))), a.crop && (u = c.x - i.plotLeft, g = c.y - i.plotTop, d = i.isInsidePlot(u, g) && i.isInsidePlot(u + p, g + f));
|
|
777
|
-
}
|
|
778
|
-
return d ? c : null;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
D.attrsMap = { backgroundColor: "fill", borderColor: "stroke", borderWidth: "stroke-width", zIndex: "zIndex", borderRadius: "r", padding: "padding" }, D.shapesWithoutBackground = ["connector"];
|
|
782
|
-
class Wt extends G {
|
|
783
|
-
constructor(t, e, i) {
|
|
784
|
-
super(t, e, i, "shape"), this.type = "image", this.translate = super.translateShape;
|
|
785
|
-
}
|
|
786
|
-
render(t) {
|
|
787
|
-
let e = this.attrsFromOptions(this.options), i = this.options;
|
|
788
|
-
this.graphic = this.annotation.chart.renderer.image(i.src, 0, -9e9, i.width, i.height).attr(e).add(t), this.graphic.width = i.width, this.graphic.height = i.height, super.render();
|
|
789
|
-
}
|
|
790
|
-
redraw(t) {
|
|
791
|
-
if (this.graphic) {
|
|
792
|
-
let e = this.anchor(this.points[0]), i = D.prototype.position.call(this, e);
|
|
793
|
-
i ? this.graphic[t ? "animate" : "attr"]({ x: i.x, y: i.y }) : this.graphic.attr({ x: 0, y: -9e9 }), this.graphic.placed = !!i;
|
|
794
|
-
}
|
|
795
|
-
super.redraw(t);
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
Wt.attrsMap = { width: "width", height: "height", zIndex: "zIndex" };
|
|
799
|
-
var Ne = E(660), pt = E.n(Ne);
|
|
800
|
-
let Be = class {
|
|
801
|
-
constructor(o, t) {
|
|
802
|
-
this.iconsURL = t, this.container = this.createPopupContainer(o), this.closeButton = this.addCloseButton();
|
|
803
|
-
}
|
|
804
|
-
createPopupContainer(o, t = "highcharts-popup highcharts-no-tooltip") {
|
|
805
|
-
return v("div", { className: t }, void 0, o);
|
|
806
|
-
}
|
|
807
|
-
addCloseButton(o = "highcharts-popup-close") {
|
|
808
|
-
let t = this, e = this.iconsURL, i = v("button", { className: o }, void 0, this.container);
|
|
809
|
-
return v("span", { className: "highcharts-icon" }, { backgroundImage: "url(" + (e.match(/png|svg|jpeg|jpg|gif/ig) ? e : e + "close.svg") + ")" }, i), ["click", "touchstart"].forEach((s) => {
|
|
810
|
-
m(i, s, t.closeButtonEvents.bind(t));
|
|
811
|
-
}), m(document, "keydown", function(s) {
|
|
812
|
-
s.code === "Escape" && t.closeButtonEvents();
|
|
813
|
-
}), i;
|
|
814
|
-
}
|
|
815
|
-
closeButtonEvents() {
|
|
816
|
-
this.closePopup();
|
|
817
|
-
}
|
|
818
|
-
showPopup(o = "highcharts-annotation-toolbar") {
|
|
819
|
-
let t = this.container, e = this.closeButton;
|
|
820
|
-
this.type = void 0, t.innerHTML = pt().emptyHTML, t.className.indexOf(o) >= 0 && (t.classList.remove(o), t.removeAttribute("style")), t.appendChild(e), t.style.display = "block", t.style.height = "";
|
|
821
|
-
}
|
|
822
|
-
closePopup() {
|
|
823
|
-
this.container.style.display = "none";
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
var Me = E(620), dt = E.n(Me);
|
|
827
|
-
let { doc: ut, isFirefox: Te } = P();
|
|
828
|
-
function jt(o, t, e, i, s, n) {
|
|
829
|
-
let a, r;
|
|
830
|
-
if (!t) return;
|
|
831
|
-
let l = this.addInput, c = this.lang;
|
|
832
|
-
O(i, (h, u) => {
|
|
833
|
-
a = e !== "" ? e + "." + u : u, S(h) && (!M(h) || M(h) && S(h[0]) ? ((r = c[u] || u).match(/\d/g) || s.push([!0, r, o]), jt.call(this, o, t, a, h, s, !1)) : s.push([this, a, "annotation", o, h]));
|
|
834
|
-
}), n && (Pt(s, (h) => h[1].match(/format/g) ? -1 : 1), Te && s.reverse(), s.forEach((h) => {
|
|
835
|
-
h[0] === !0 ? v("span", { className: "highcharts-annotation-title" }, void 0, h[2]).appendChild(ut.createTextNode(h[1])) : (h[4] = { value: h[4][0], type: h[4][1] }, l.apply(h[0], h.splice(1)));
|
|
836
|
-
}));
|
|
837
|
-
}
|
|
838
|
-
let { doc: it } = P(), { seriesTypes: zt } = It();
|
|
839
|
-
(tt = rt || (rt = {}))[tt["params.algorithm"] = 0] = "params.algorithm", tt[tt["params.average"] = 1] = "params.average";
|
|
840
|
-
let Ie = { "algorithm-pivotpoints": ["standard", "fibonacci", "camarilla"], "average-disparityindex": ["sma", "ema", "dema", "tema", "wma"] };
|
|
841
|
-
function qt(o) {
|
|
842
|
-
let t = v("div", { className: "highcharts-popup-lhs-col" }, void 0, o), e = v("div", { className: "highcharts-popup-rhs-col" }, void 0, o);
|
|
843
|
-
return v("div", { className: "highcharts-popup-rhs-col-wrapper" }, void 0, e), { lhsCol: t, rhsCol: e };
|
|
844
|
-
}
|
|
845
|
-
function Se(o, t, e, i) {
|
|
846
|
-
let s = t.params || t.options.params;
|
|
847
|
-
i.innerHTML = pt().emptyHTML, v("h3", { className: "highcharts-indicator-title" }, void 0, i).appendChild(it.createTextNode(Gt(t, e).indicatorFullName)), v("input", { type: "hidden", name: "highcharts-type-" + e, value: e }, void 0, i), Kt.call(this, e, "series", o, i, t, t.linkedParent && t.linkedParent.options.id), s.volumeSeriesID && Kt.call(this, e, "volume", o, i, t, t.linkedParent && s.volumeSeriesID), Ht.call(this, o, "params", s, e, i);
|
|
848
|
-
}
|
|
849
|
-
function gt(o, t, e, i) {
|
|
850
|
-
function s(f, y) {
|
|
851
|
-
let x = p.parentNode.children[1];
|
|
852
|
-
Se.call(n, o, f, y, p), x && (x.style.display = "block"), c && f.options && v("input", { type: "hidden", name: "highcharts-id-" + y, value: f.options.id }, void 0, p).setAttribute("highcharts-data-series-id", f.options.id);
|
|
853
|
-
}
|
|
854
|
-
let n = this, a = n.lang, r = t.querySelectorAll(".highcharts-popup-lhs-col")[0], l = t.querySelectorAll(".highcharts-popup-rhs-col")[0], c = e === "edit", h = c ? o.series : o.options.plotOptions || {};
|
|
855
|
-
if (!o && h) return;
|
|
856
|
-
let u, g = [];
|
|
857
|
-
c || M(h) ? M(h) && (g = Ye.call(this, h)) : g = Le.call(this, h, i), Pt(g, (f, y) => {
|
|
858
|
-
let x = f.indicatorFullName.toLowerCase(), b = y.indicatorFullName.toLowerCase();
|
|
859
|
-
return x < b ? -1 : +(x > b);
|
|
860
|
-
}), r.children[1] && r.children[1].remove();
|
|
861
|
-
let d = v("ul", { className: "highcharts-indicator-list" }, void 0, r), p = l.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];
|
|
862
|
-
if (g.forEach((f) => {
|
|
863
|
-
let { indicatorFullName: y, indicatorType: x, series: b } = f;
|
|
864
|
-
u = v("li", { className: "highcharts-indicator-list" }, void 0, d);
|
|
865
|
-
let C = v("button", { className: "highcharts-indicator-list-item", textContent: y }, void 0, u);
|
|
866
|
-
["click", "touchstart"].forEach((k) => {
|
|
867
|
-
m(C, k, function() {
|
|
868
|
-
s(b, x);
|
|
869
|
-
});
|
|
870
|
-
});
|
|
871
|
-
}), g.length > 0) {
|
|
872
|
-
let { series: f, indicatorType: y } = g[0];
|
|
873
|
-
s(f, y);
|
|
874
|
-
} else c || (pt().setElementHTML(p.parentNode.children[0], a.noFilterMatch || ""), p.parentNode.children[1].style.display = "none");
|
|
875
|
-
}
|
|
876
|
-
function Ht(o, t, e, i, s) {
|
|
877
|
-
if (!o) return;
|
|
878
|
-
let n = this.addInput;
|
|
879
|
-
O(e, (a, r) => {
|
|
880
|
-
let l = t + "." + r;
|
|
881
|
-
if (A(a) && l) if (S(a) && (n.call(this, l, i, s, {}), Ht.call(this, o, l, a, i, s)), l in rt) {
|
|
882
|
-
let c = Vt.call(this, i, l, s);
|
|
883
|
-
$t.call(this, o, t, c, i, r, a);
|
|
884
|
-
} else l === "params.volumeSeriesID" || M(a) || n.call(this, l, i, s, { value: a, type: "number" });
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
|
-
function De(o, t) {
|
|
888
|
-
let e = this, i = t.querySelectorAll(".highcharts-popup-lhs-col")[0], s = this.lang.clearFilter, n = v("div", { className: "highcharts-input-wrapper" }, void 0, i), a = function(c) {
|
|
889
|
-
gt.call(e, o, e.container, "add", c);
|
|
890
|
-
}, r = this.addInput("searchIndicators", "input", n, { value: "", type: "text", htmlFor: "search-indicators", labelClassName: "highcharts-input-search-indicators-label" }), l = v("a", { textContent: s }, void 0, n);
|
|
891
|
-
r.classList.add("highcharts-input-search-indicators"), l.classList.add("clear-filter-button"), m(r, "input", function() {
|
|
892
|
-
a(this.value), this.value.length ? l.style.display = "inline-block" : l.style.display = "none";
|
|
893
|
-
}), ["click", "touchstart"].forEach((c) => {
|
|
894
|
-
m(l, c, function() {
|
|
895
|
-
r.value = "", a(""), l.style.display = "none";
|
|
896
|
-
});
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
function Vt(o, t, e) {
|
|
900
|
-
let i = t.split("."), s = i[i.length - 1], n = "highcharts-" + t + "-type-" + o, a = this.lang;
|
|
901
|
-
v("label", { htmlFor: n }, null, e).appendChild(it.createTextNode(a[s] || t));
|
|
902
|
-
let r = v("select", { name: n, className: "highcharts-popup-field", id: "highcharts-select-" + t }, null, e);
|
|
903
|
-
return r.setAttribute("id", "highcharts-select-" + t), r;
|
|
904
|
-
}
|
|
905
|
-
function $t(o, t, e, i, s, n, a) {
|
|
906
|
-
t === "series" || t === "volume" ? o.series.forEach((r) => {
|
|
907
|
-
let l = r.options, c = l.name || l.params ? r.name : l.id || "";
|
|
908
|
-
l.id !== "highcharts-navigator-series" && l.id !== (a && a.options && a.options.id) && (A(n) || t !== "volume" || r.type !== "column" || (n = l.id), v("option", { value: l.id }, void 0, e).appendChild(it.createTextNode(c)));
|
|
909
|
-
}) : i && s && Ie[s + "-" + i].forEach((r) => {
|
|
910
|
-
v("option", { value: r }, void 0, e).appendChild(it.createTextNode(r));
|
|
911
|
-
}), A(n) && (e.value = n);
|
|
912
|
-
}
|
|
913
|
-
function Le(o, t) {
|
|
914
|
-
let e, i = this.chart && this.chart.options.lang, s = i && i.navigation && i.navigation.popup && i.navigation.popup.indicatorAliases, n = /* @__PURE__ */ new Map();
|
|
915
|
-
return O(o, (a, r) => {
|
|
916
|
-
let l = a && a.options;
|
|
917
|
-
if (a.params || l && l.params) {
|
|
918
|
-
let { indicatorFullName: c, indicatorType: h } = Gt(a, r);
|
|
919
|
-
if (t) {
|
|
920
|
-
let u = RegExp(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i"), g = s && s[h] && s[h].join(" ") || "";
|
|
921
|
-
(c.match(u) || g.match(u)) && (e = { indicatorFullName: c, indicatorType: h, series: a }, n.set(h.toLowerCase(), e));
|
|
922
|
-
} else e = { indicatorFullName: c, indicatorType: h, series: a }, n.set(h.toLowerCase(), e);
|
|
923
|
-
}
|
|
924
|
-
}), Array.from(n.values());
|
|
925
|
-
}
|
|
926
|
-
function Ye(o) {
|
|
927
|
-
let t = [];
|
|
928
|
-
return o.forEach((e) => {
|
|
929
|
-
e.is("sma") && t.push({ indicatorFullName: e.name, indicatorType: e.type, series: e });
|
|
930
|
-
}), t;
|
|
931
|
-
}
|
|
932
|
-
function Gt(o, t) {
|
|
933
|
-
let e = o.options, i = zt[t] && zt[t].prototype.nameBase || t.toUpperCase(), s = t;
|
|
934
|
-
return e && e.type && (s = o.options.type, i = o.name), { indicatorFullName: i, indicatorType: s };
|
|
935
|
-
}
|
|
936
|
-
function Kt(o, t, e, i, s, n) {
|
|
937
|
-
if (!e) return;
|
|
938
|
-
let a = Vt.call(this, o, t, i);
|
|
939
|
-
$t.call(this, e, t, a, void 0, void 0, void 0, s), A(n) && (a.value = n);
|
|
940
|
-
}
|
|
941
|
-
let { doc: Xe } = P();
|
|
942
|
-
function _t() {
|
|
943
|
-
return v("div", { className: "highcharts-tab-item-content highcharts-no-mousewheel" }, void 0, this.container);
|
|
944
|
-
}
|
|
945
|
-
function Zt(o, t) {
|
|
946
|
-
let e = this.container, i = this.lang, s = "highcharts-tab-item";
|
|
947
|
-
t === 0 && (s += " highcharts-tab-disabled");
|
|
948
|
-
let n = v("button", { className: s }, void 0, e);
|
|
949
|
-
return n.appendChild(Xe.createTextNode(i[o + "Button"] || o)), n.setAttribute("highcharts-data-tab-type", o), n;
|
|
950
|
-
}
|
|
951
|
-
function Fe() {
|
|
952
|
-
let o = this.container, t = o.querySelectorAll(".highcharts-tab-item"), e = o.querySelectorAll(".highcharts-tab-item-content");
|
|
953
|
-
for (let i = 0; i < t.length; i++) t[i].classList.remove("highcharts-tab-item-active"), e[i].classList.remove("highcharts-tab-item-show");
|
|
954
|
-
}
|
|
955
|
-
function Jt(o, t) {
|
|
956
|
-
let e = this.container.querySelectorAll(".highcharts-tab-item-content");
|
|
957
|
-
o.className += " highcharts-tab-item-active", e[t].className += " highcharts-tab-item-show";
|
|
958
|
-
}
|
|
959
|
-
function Re(o) {
|
|
960
|
-
let t = this;
|
|
961
|
-
this.container.querySelectorAll(".highcharts-tab-item").forEach((e, i) => {
|
|
962
|
-
(o !== 0 || e.getAttribute("highcharts-data-tab-type") !== "edit") && ["click", "touchstart"].forEach((s) => {
|
|
963
|
-
m(e, s, function() {
|
|
964
|
-
Fe.call(t), Jt.call(t, this, i);
|
|
965
|
-
});
|
|
966
|
-
});
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
let { doc: Q } = P(), { getOptions: Ue } = P();
|
|
970
|
-
class Qt extends Be {
|
|
971
|
-
constructor(t, e, i) {
|
|
972
|
-
super(t, e), this.chart = i, this.lang = (Ue().lang.navigation || {}).popup || {}, m(this.container, "mousedown", () => {
|
|
973
|
-
let s = i && i.navigationBindings && i.navigationBindings.activeAnnotation;
|
|
974
|
-
if (s) {
|
|
975
|
-
s.cancelClick = !0;
|
|
976
|
-
let n = m(Q, "click", () => {
|
|
977
|
-
setTimeout(() => {
|
|
978
|
-
s.cancelClick = !1;
|
|
979
|
-
}, 0), n();
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
});
|
|
983
|
-
}
|
|
984
|
-
addInput(t, e, i, s) {
|
|
985
|
-
let n = t.split("."), a = n[n.length - 1], r = this.lang, l = "highcharts-" + e + "-" + B(s.htmlFor, a);
|
|
986
|
-
if (a.match(/^\d+$/) || v("label", { htmlFor: l, className: s.labelClassName }, void 0, i).appendChild(Q.createTextNode(r[a] || a)), s.type === "color" && this.chart?.container) return this.createColorInput(t, l, s, i, this.chart.container);
|
|
987
|
-
let c = v("input", { name: l, value: s.value, type: s.type, className: "highcharts-popup-field" }, void 0, i);
|
|
988
|
-
return c.setAttribute("highcharts-data-name", t), c;
|
|
989
|
-
}
|
|
990
|
-
createColorInput(t, e, i, s, n) {
|
|
991
|
-
let { value: a, alpha: r } = (function(k, V) {
|
|
992
|
-
let R = (U) => ("0" + Math.round(U).toString(16)).slice(-2).toUpperCase(), ae = (U) => {
|
|
993
|
-
let [$, W, yt, mt] = dt().parse(U).rgba;
|
|
994
|
-
return { value: "#" + R($) + R(W) + R(yt), alpha: mt };
|
|
995
|
-
};
|
|
996
|
-
if (k.startsWith("rgb") || k.startsWith("rgba")) return ae(k);
|
|
997
|
-
if (k.startsWith("color") || k.startsWith("var")) {
|
|
998
|
-
let U = Q.createElement("span");
|
|
999
|
-
U.style.setProperty("color", k), V.appendChild(U);
|
|
1000
|
-
let $ = window.getComputedStyle(U).color;
|
|
1001
|
-
if (V.removeChild(U), $.startsWith("color")) {
|
|
1002
|
-
let W = $.match(RegExp("color\\s*\\(\\s*srgb\\s+([\\d.]+)\\s+([\\d.]+)\\s+([\\d.]+)\\s+(?:\\s*\\/\\s*([\\d.]+))?\\s*\\)"));
|
|
1003
|
-
if (W) {
|
|
1004
|
-
let yt = Math.round(255 * parseFloat(W[1])), mt = Math.round(255 * parseFloat(W[2])), hi = Math.round(255 * parseFloat(W[3])), ci = W[4] ? parseFloat(W[4]) : 1;
|
|
1005
|
-
return { value: "#" + R(yt) + R(mt) + R(hi), alpha: ci };
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
if ($.startsWith("rgb") || $.startsWith("rgba")) return ae($);
|
|
1009
|
-
}
|
|
1010
|
-
return { value: k, alpha: 1 };
|
|
1011
|
-
})(i.value || "", n), l = dt().parse(i.value || "").rgba[3], c = isNaN(l) ? r : l, h = v("div", { className: "highcharts-popup-color-wrapper" }, void 0, s), u = v("input", { type: "color", value: a, className: "highcharts-popup-field highcharts-popup-field-color" }, void 0, h), g = v("input", { name: e, id: e, value: a, type: "text", className: "highcharts-popup-field highcharts-popup-field-text" }, void 0, h);
|
|
1012
|
-
g.setAttribute("highcharts-data-name", t);
|
|
1013
|
-
let d = v("span", { className: "highcharts-popup-color-separator" }, void 0, h), p = v("input", { type: "number", value: String(Math.round(100 * c)), className: "highcharts-popup-field highcharts-popup-opacity-percentage", min: "0", max: "100", step: "1" }, void 0, h), f = v("span", { className: "highcharts-popup-opacity-percent-suffix" }, void 0, h);
|
|
1014
|
-
f.appendChild(Q.createTextNode(" %"));
|
|
1015
|
-
let y = v("input", { type: "range", value: String(Math.round(100 * c)), className: "highcharts-popup-opacity-slider", min: "0", max: "100", step: "1" }, void 0, s);
|
|
1016
|
-
y.style.setProperty("--highcharts-popup-opacity-track-color", a), y.style.setProperty("display", "none");
|
|
1017
|
-
let x = () => {
|
|
1018
|
-
let k = /^#[0-9A-Fa-f]{6}$/.test(g.value);
|
|
1019
|
-
d.style.display = k ? "" : "none", p.style.display = k ? "" : "none", f.style.display = k ? "" : "none";
|
|
1020
|
-
};
|
|
1021
|
-
x();
|
|
1022
|
-
let b = (k) => {
|
|
1023
|
-
var V;
|
|
1024
|
-
let R = (V = Number(k.target.value), V > 0 ? V < 100 ? V : 100 : 0);
|
|
1025
|
-
y.value = String(R), p.value = String(Math.round(R));
|
|
1026
|
-
}, C = (k) => {
|
|
1027
|
-
k.target === u ? g.value = u.value.toUpperCase() : u.value = g.value, y.style.setProperty("--highcharts-popup-opacity-track-color", u.value), x();
|
|
1028
|
-
};
|
|
1029
|
-
return m(s, "mousedown", (k) => {
|
|
1030
|
-
k.target !== p && k.target !== y && (y.style.display = "none");
|
|
1031
|
-
}), m(p, "focus", () => {
|
|
1032
|
-
y.style.display = "";
|
|
1033
|
-
}), m(p, "input", b), m(y, "input", b), m(u, "input", C), m(g, "input", C), h;
|
|
1034
|
-
}
|
|
1035
|
-
closeButtonEvents() {
|
|
1036
|
-
if (this.chart) {
|
|
1037
|
-
let t = this.chart.navigationBindings;
|
|
1038
|
-
N(t, "closePopup"), t && t.selectedButtonElement && N(t, "deselectButton", { button: t.selectedButtonElement });
|
|
1039
|
-
} else super.closeButtonEvents();
|
|
1040
|
-
}
|
|
1041
|
-
addButton(t, e, i, s, n) {
|
|
1042
|
-
let a = v("button", void 0, void 0, t);
|
|
1043
|
-
return a.appendChild(Q.createTextNode(e)), n && ["click", "touchstart"].forEach((r) => {
|
|
1044
|
-
m(a, r, () => {
|
|
1045
|
-
let l, c, h, u, g;
|
|
1046
|
-
return this.closePopup(), n((l = Array.prototype.slice.call(s.querySelectorAll("input")), c = Array.prototype.slice.call(s.querySelectorAll("select")), h = s.querySelectorAll("#highcharts-select-series > option:checked")[0], u = s.querySelectorAll("#highcharts-select-volume > option:checked")[0], g = { actionType: i, linkedTo: h && h.getAttribute("value") || "", fields: {} }, l.forEach((d) => {
|
|
1047
|
-
let p = d.getAttribute("highcharts-data-name");
|
|
1048
|
-
if (d.getAttribute("highcharts-data-series-id")) g.seriesId = d.value;
|
|
1049
|
-
else if (p) {
|
|
1050
|
-
let f = d.closest(".highcharts-popup-color-wrapper"), y = f?.querySelector(".highcharts-popup-opacity-percentage"), x = y ? Number(y.value) / 100 : 1;
|
|
1051
|
-
if (y) {
|
|
1052
|
-
let b = dt().parse(d.value).rgba;
|
|
1053
|
-
g.fields[p] = Number.isNaN(b[0]) ? d.value : `rgba(${b[0]},${b[1]},${b[2]},${x})`;
|
|
1054
|
-
} else g.fields[p] = d.value;
|
|
1055
|
-
} else g.type = d.value;
|
|
1056
|
-
}), c.forEach((d) => {
|
|
1057
|
-
let p = d.id;
|
|
1058
|
-
if (p !== "highcharts-select-series" && p !== "highcharts-select-volume") {
|
|
1059
|
-
let f = p.split("highcharts-select-")[1];
|
|
1060
|
-
g.fields[f] = d.value;
|
|
1061
|
-
}
|
|
1062
|
-
}), u && (g.fields["params.volumeSeriesID"] = u.getAttribute("value") || ""), g));
|
|
1063
|
-
});
|
|
1064
|
-
}), a;
|
|
1065
|
-
}
|
|
1066
|
-
showForm(t, e, i, s) {
|
|
1067
|
-
e && (this.showPopup(), t === "indicators" && this.indicators.addForm.call(this, e, i, s), t === "annotation-toolbar" && this.annotations.addToolbar.call(this, e, i, s), t === "annotation-edit" && this.annotations.addForm.call(this, e, i, s), t === "flag" && this.annotations.addForm.call(this, e, i, s, !0), this.type = t, this.container.style.height = this.container.offsetHeight + "px");
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
z(Qt.prototype, { annotations: { addForm: function(o, t, e, i) {
|
|
1071
|
-
if (!o) return;
|
|
1072
|
-
let s = this.container, n = this.lang, a = v("h2", { className: "highcharts-popup-main-title" }, void 0, s);
|
|
1073
|
-
a.appendChild(ut.createTextNode(n[t.langKey] || t.langKey || "")), a = v("div", { className: "highcharts-popup-lhs-col highcharts-popup-lhs-full" }, void 0, s);
|
|
1074
|
-
let r = v("div", { className: "highcharts-popup-bottom-row" }, void 0, s);
|
|
1075
|
-
jt.call(this, a, o, "", t, [], !0), this.addButton(r, i ? n.addButton || "Add" : n.saveButton || "Save", i ? "add" : "save", s, e);
|
|
1076
|
-
}, addToolbar: function(o, t, e) {
|
|
1077
|
-
let i = this.lang, s = this.container, n = this.showForm, a = "highcharts-annotation-toolbar";
|
|
1078
|
-
s.className.indexOf(a) === -1 && (s.className += " " + a + " highcharts-no-mousewheel"), o && (s.style.top = o.plotTop + 10 + "px");
|
|
1079
|
-
let r = v("p", { className: "highcharts-annotation-label" }, void 0, s);
|
|
1080
|
-
r.setAttribute("aria-label", "Annotation type"), r.appendChild(ut.createTextNode(B(i[t.langKey] || t.langKey, t.shapes && t.shapes[0].type, "")));
|
|
1081
|
-
let l = this.addButton(s, i.editButton || "Edit", "edit", s, () => {
|
|
1082
|
-
n.call(this, "annotation-edit", o, t, e);
|
|
1083
|
-
});
|
|
1084
|
-
l.className += " highcharts-annotation-edit-button", v("span", { className: "highcharts-icon" }, { backgroundImage: `url(${this.iconsURL}edit.svg)` }, l), l = this.addButton(s, i.removeButton || "Remove", "remove", s, e), l.className += " highcharts-annotation-remove-button", v("span", { className: "highcharts-icon" }, { backgroundImage: `url(${this.iconsURL}destroy.svg)` }, l);
|
|
1085
|
-
} }, indicators: { addForm: function(o, t, e) {
|
|
1086
|
-
let i, s = this.lang;
|
|
1087
|
-
if (!o) return;
|
|
1088
|
-
this.tabs.init.call(this, o);
|
|
1089
|
-
let n = this.container.querySelectorAll(".highcharts-tab-item-content");
|
|
1090
|
-
qt(n[0]), De.call(this, o, n[0]), gt.call(this, o, n[0], "add"), i = n[0].querySelectorAll(".highcharts-popup-rhs-col")[0], this.addButton(i, s.addButton || "add", "add", i, e), qt(n[1]), gt.call(this, o, n[1], "edit"), i = n[1].querySelectorAll(".highcharts-popup-rhs-col")[0], this.addButton(i, s.saveButton || "save", "edit", i, e), this.addButton(i, s.removeButton || "remove", "remove", i, e);
|
|
1091
|
-
}, getAmount: function() {
|
|
1092
|
-
let o = 0;
|
|
1093
|
-
return this.series.forEach((t) => {
|
|
1094
|
-
(t.params || t.options.params) && o++;
|
|
1095
|
-
}), o;
|
|
1096
|
-
} }, tabs: { init: function(o) {
|
|
1097
|
-
if (!o) return;
|
|
1098
|
-
let t = this.indicators.getAmount.call(o), e = Zt.call(this, "add");
|
|
1099
|
-
Zt.call(this, "edit", t), _t.call(this), _t.call(this), Re.call(this, t), Jt.call(this, e, 0);
|
|
1100
|
-
} } });
|
|
1101
|
-
let { composed: We } = P();
|
|
1102
|
-
function je() {
|
|
1103
|
-
this.popup && this.popup.closePopup();
|
|
1104
|
-
}
|
|
1105
|
-
function ze(o) {
|
|
1106
|
-
this.popup || (this.popup = new Qt(this.chart.container, this.chart.options.navigation.iconsURL || this.chart.options.stockTools && this.chart.options.stockTools.gui.iconsURL || "https://code.highcharts.com/12.6.0/gfx/stock-icons/", this.chart)), this.popup.showForm(o.formType, this.chart, o.options, o.onSubmit);
|
|
1107
|
-
}
|
|
1108
|
-
function qe(o, t) {
|
|
1109
|
-
this.inClass(t.target, "highcharts-popup") || o.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
1110
|
-
}
|
|
1111
|
-
let He = function(o, t) {
|
|
1112
|
-
wt(We, "Popup") && (m(o, "closePopup", je), m(o, "showPopup", ze), Et(t.prototype, "onContainerMouseDown", qe));
|
|
1113
|
-
}, { getDeferredAnimation: Ve } = P(), { defaultOptions: $e } = P();
|
|
1114
|
-
function ft(o, t) {
|
|
1115
|
-
let e = {};
|
|
1116
|
-
return ["labels", "shapes"].forEach((i) => {
|
|
1117
|
-
let s = o[i], n = t[i];
|
|
1118
|
-
s && (n ? e[i] = (M(n) ? n : [n]).map((a, r) => w(s[r], a)) : e[i] = o[i]);
|
|
1119
|
-
}), e;
|
|
1120
|
-
}
|
|
1121
|
-
class T extends Mt {
|
|
1122
|
-
static compose(t, e, i, s) {
|
|
1123
|
-
me.compose(T, t, i), D.compose(s), K.compose(t, s), e.compose(T, t), He(e, i);
|
|
1124
|
-
}
|
|
1125
|
-
constructor(t, e) {
|
|
1126
|
-
super(), this.coll = "annotations", this.chart = t, this.points = [], this.controlPoints = [], this.coll = "annotations", this.index = -1, this.labels = [], this.shapes = [], this.setOptions(e), this.userOptions = e;
|
|
1127
|
-
const i = ft(this.options, e);
|
|
1128
|
-
this.options.labels = i.labels, this.options.shapes = i.shapes, this.init(t, this.options);
|
|
1129
|
-
}
|
|
1130
|
-
addClipPaths() {
|
|
1131
|
-
this.setClipAxes(), this.clipXAxis && this.clipYAxis && this.options.crop && (this.clipRect = this.chart.renderer.clipRect(this.getClipBox()));
|
|
1132
|
-
}
|
|
1133
|
-
addLabels() {
|
|
1134
|
-
let t = this.options.labels || [];
|
|
1135
|
-
t.forEach((e, i) => {
|
|
1136
|
-
let s = this.initLabel(e, i);
|
|
1137
|
-
w(!0, t[i], s.options);
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
addShapes() {
|
|
1141
|
-
let t = this.options.shapes || [];
|
|
1142
|
-
t.forEach((e, i) => {
|
|
1143
|
-
let s = this.initShape(e, i);
|
|
1144
|
-
w(!0, t[i], s.options);
|
|
1145
|
-
});
|
|
1146
|
-
}
|
|
1147
|
-
destroy() {
|
|
1148
|
-
var t;
|
|
1149
|
-
let e = this.chart, i = function(s) {
|
|
1150
|
-
s.destroy();
|
|
1151
|
-
};
|
|
1152
|
-
this.labels.forEach(i), this.shapes.forEach(i), this.clipXAxis = null, this.clipYAxis = null, et(e.labelCollectors, this.labelCollector), super.destroy(), this.destroyControlTarget(), t = this, O(t, function(s, n) {
|
|
1153
|
-
s !== e && s?.destroy && s.destroy(), s?.destroy, delete t[n];
|
|
1154
|
-
});
|
|
1155
|
-
}
|
|
1156
|
-
destroyItem(t) {
|
|
1157
|
-
et(this[t.itemType + "s"], t), t.destroy();
|
|
1158
|
-
}
|
|
1159
|
-
getClipBox() {
|
|
1160
|
-
if (this.clipXAxis && this.clipYAxis) return { x: this.clipXAxis.left, y: this.clipYAxis.top, width: this.clipXAxis.width, height: this.clipYAxis.height };
|
|
1161
|
-
}
|
|
1162
|
-
initProperties(t, e) {
|
|
1163
|
-
this.setOptions(e);
|
|
1164
|
-
let i = ft(this.options, e);
|
|
1165
|
-
this.options.labels = i.labels, this.options.shapes = i.shapes, this.chart = t, this.points = [], this.controlPoints = [], this.coll = "annotations", this.userOptions = e, this.labels = [], this.shapes = [];
|
|
1166
|
-
}
|
|
1167
|
-
init(t, e, i = this.index) {
|
|
1168
|
-
let s = this.chart, n = this.options.animation;
|
|
1169
|
-
this.index = i, this.linkPoints(), this.addControlPoints(), this.addShapes(), this.addLabels(), this.setLabelCollector(), this.animationConfig = Ve(s, n);
|
|
1170
|
-
}
|
|
1171
|
-
initLabel(t, e) {
|
|
1172
|
-
this.options.labelOptions?.align;
|
|
1173
|
-
let i = new D(this, w(this.options.labelOptions, { controlPointOptions: this.options.controlPointOptions }, t), e);
|
|
1174
|
-
return i.itemType = "label", this.labels.push(i), i;
|
|
1175
|
-
}
|
|
1176
|
-
initShape(t, e) {
|
|
1177
|
-
let i = w(this.options.shapeOptions, { controlPointOptions: this.options.controlPointOptions }, t), s = new T.shapesMap[i.type || "rect"](this, i, e);
|
|
1178
|
-
return s.itemType = "shape", this.shapes.push(s), s;
|
|
1179
|
-
}
|
|
1180
|
-
redraw(t) {
|
|
1181
|
-
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);
|
|
1182
|
-
}
|
|
1183
|
-
redrawItem(t, e) {
|
|
1184
|
-
if (t.linkPoints(), t.shouldBeDrawn()) {
|
|
1185
|
-
let i, s;
|
|
1186
|
-
t.graphic || this.renderItem(t), t.redraw(B(e, !0) && t.graphic.placed), t.points.length && (i = t.graphic, s = t.points.some((n) => n.series.visible !== !1 && n.visible !== !1), i && (s ? i.visibility === "hidden" && i.show() : i.hide()));
|
|
1187
|
-
} else this.destroyItem(t);
|
|
1188
|
-
}
|
|
1189
|
-
redrawItems(t, e) {
|
|
1190
|
-
let i = t.length;
|
|
1191
|
-
for (; i--; ) this.redrawItem(t[i], e);
|
|
1192
|
-
}
|
|
1193
|
-
remove() {
|
|
1194
|
-
return this.chart.removeAnnotation(this);
|
|
1195
|
-
}
|
|
1196
|
-
render() {
|
|
1197
|
-
let t = this.chart.renderer;
|
|
1198
|
-
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();
|
|
1199
|
-
}
|
|
1200
|
-
renderItem(t) {
|
|
1201
|
-
t.render(t.itemType === "label" ? this.labelsGroup : this.shapesGroup);
|
|
1202
|
-
}
|
|
1203
|
-
renderItems(t) {
|
|
1204
|
-
let e = t.length;
|
|
1205
|
-
for (; e--; ) this.renderItem(t[e]);
|
|
1206
|
-
}
|
|
1207
|
-
setClipAxes() {
|
|
1208
|
-
let t = this.chart.xAxis, e = this.chart.yAxis, i = [...this.options.labels ?? [], ...this.options.shapes ?? []].reduce((s, n) => {
|
|
1209
|
-
let a = n && (n.point || "points" in n && n.points?.[0]);
|
|
1210
|
-
return [t[a && a.xAxis] || s[0], e[a && a.yAxis] || s[1]];
|
|
1211
|
-
}, []);
|
|
1212
|
-
this.clipXAxis = i[0], this.clipYAxis = i[1];
|
|
1213
|
-
}
|
|
1214
|
-
setControlPointsVisibility(t) {
|
|
1215
|
-
let e = function(i) {
|
|
1216
|
-
i.setControlPointsVisibility(t);
|
|
1217
|
-
};
|
|
1218
|
-
this.controlPoints.forEach((i) => {
|
|
1219
|
-
i.setVisibility(t);
|
|
1220
|
-
}), this.shapes.forEach(e), this.labels.forEach(e);
|
|
1221
|
-
}
|
|
1222
|
-
setLabelCollector() {
|
|
1223
|
-
let t = this;
|
|
1224
|
-
t.labelCollector = function() {
|
|
1225
|
-
return t.labels.reduce(function(e, i) {
|
|
1226
|
-
return i.options.allowOverlap || e.push(i.graphic), e;
|
|
1227
|
-
}, []);
|
|
1228
|
-
}, t.chart.labelCollectors.push(t.labelCollector);
|
|
1229
|
-
}
|
|
1230
|
-
setOptions(t) {
|
|
1231
|
-
var e;
|
|
1232
|
-
this.options = w(this.defaultOptions, t.type && this.defaultOptions.types?.[t.type] || {}, t), (e = this.options).typeOptions || (e.typeOptions = {});
|
|
1233
|
-
}
|
|
1234
|
-
setVisibility(t) {
|
|
1235
|
-
let e = this.options, i = this.chart.navigationBindings, s = B(t, !e.visible);
|
|
1236
|
-
if (this.graphic.attr("visibility", s ? "inherit" : "hidden"), !s) {
|
|
1237
|
-
let n = function(a) {
|
|
1238
|
-
a.setControlPointsVisibility(s);
|
|
1239
|
-
};
|
|
1240
|
-
this.shapes.forEach(n), this.labels.forEach(n), i.activeAnnotation === this && i.popup && i.popup.type === "annotation-toolbar" && N(i, "closePopup");
|
|
1241
|
-
}
|
|
1242
|
-
e.visible = s;
|
|
1243
|
-
}
|
|
1244
|
-
update(t, e) {
|
|
1245
|
-
let i = this.chart, s = ft(this.userOptions, t), n = i.annotations.indexOf(this), a = w(!0, this.userOptions, t);
|
|
1246
|
-
a.labels = s.labels, a.shapes = s.shapes, this.destroy(), this.initProperties(i, a), this.init(i, a), i.options.annotations[n] = this.options, this.isUpdating = !0, B(e, !0) && i.drawAnnotations(), N(this, "afterUpdate"), this.isUpdating = !1;
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
T.ControlPoint = Tt, T.MockPoint = H, T.shapesMap = { rect: Xt, circle: Ft, ellipse: Rt, path: K, image: Wt }, T.types = {}, T.prototype.defaultOptions = Nt, $e.annotations = Nt, T.prototype.nonDOMEvents = ["add", "afterUpdate", "drag", "remove"], St.compose(T);
|
|
1250
|
-
var te = lt || (lt = {});
|
|
1251
|
-
te.compose = function(o) {
|
|
1252
|
-
return o.navigation || (o.navigation = new ee(o)), o;
|
|
1253
|
-
};
|
|
1254
|
-
class ee {
|
|
1255
|
-
constructor(t) {
|
|
1256
|
-
this.updates = [], this.chart = t;
|
|
1257
|
-
}
|
|
1258
|
-
addUpdate(t) {
|
|
1259
|
-
this.chart.navigation.updates.push(t);
|
|
1260
|
-
}
|
|
1261
|
-
update(t, e) {
|
|
1262
|
-
this.updates.forEach((i) => {
|
|
1263
|
-
i.call(this.chart, t, e);
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
te.Additions = ee;
|
|
1268
|
-
let Ge = lt, Ke = { backgroundColor: "color", backgroundColors: "color", borderColor: "color", borderRadius: "string", color: "color", fill: "color", fontSize: "string", labels: "string", name: "string", stroke: "color", title: "string" }, ie = { getAssignedAxis: function(o) {
|
|
1269
|
-
return o.filter((t) => {
|
|
1270
|
-
let e = t.axis.getExtremes(), i = e.min, s = e.max, n = B(t.axis.minPointOffset, 0);
|
|
1271
|
-
return q(i) && q(s) && t.value >= i - n && t.value <= s + n && !t.axis.options.isInternal;
|
|
1272
|
-
})[0];
|
|
1273
|
-
}, getFieldType: function(o, t) {
|
|
1274
|
-
let e = Ke[o], i = typeof t;
|
|
1275
|
-
return A(e) && (i = e), { string: "text", number: "number", boolean: "checkbox", color: "color" }[i];
|
|
1276
|
-
} }, { getAssignedAxis: L } = ie, _e = { 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) {
|
|
1277
|
-
let t = this.chart.pointer?.getCoordinates(o), e = t && L(t.xAxis), i = t && L(t.yAxis), s = this.chart.options.navigation;
|
|
1278
|
-
if (e && i) return this.chart.addAnnotation(w({ langKey: "circle", type: "basicAnnotation", shapes: [{ type: "circle", point: { x: e.value, y: i.value, xAxis: e.axis.index, yAxis: i.axis.index }, r: 5 }] }, s.annotationsOptions, s.bindings.circleAnnotation.annotationsOptions));
|
|
1279
|
-
}, steps: [function(o, t) {
|
|
1280
|
-
let e, i = t.options.shapes, s = i && i[0] && i[0].point || {};
|
|
1281
|
-
if (q(s.xAxis) && q(s.yAxis)) {
|
|
1282
|
-
let n = this.chart.inverted, a = this.chart.xAxis[s.xAxis].toPixels(s.x), r = this.chart.yAxis[s.yAxis].toPixels(s.y);
|
|
1283
|
-
e = 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);
|
|
1284
|
-
}
|
|
1285
|
-
t.update({ shapes: [{ r: e }] });
|
|
1286
|
-
}] }, ellipseAnnotation: { className: "highcharts-ellipse-annotation", start: function(o) {
|
|
1287
|
-
let t = this.chart.pointer?.getCoordinates(o), e = t && L(t.xAxis), i = t && L(t.yAxis), s = this.chart.options.navigation;
|
|
1288
|
-
if (e && i) return this.chart.addAnnotation(w({ langKey: "ellipse", type: "basicAnnotation", shapes: [{ type: "ellipse", xAxis: e.axis.index, yAxis: i.axis.index, points: [{ x: e.value, y: i.value }, { x: e.value, y: i.value }], ry: 1 }] }, s.annotationsOptions, s.bindings.ellipseAnnotation.annotationsOptions));
|
|
1289
|
-
}, steps: [function(o, t) {
|
|
1290
|
-
let e = t.shapes[0], i = e.getAbsolutePosition(e.points[1]);
|
|
1291
|
-
e.translatePoint(o.chartX - i.x, o.chartY - i.y, 1), e.redraw(!1);
|
|
1292
|
-
}, function(o, t) {
|
|
1293
|
-
let e = t.shapes[0], i = e.getAbsolutePosition(e.points[0]), s = e.getAbsolutePosition(e.points[1]), n = e.getDistanceFromLine(i, s, o.chartX, o.chartY), a = e.getYAxis(), r = Math.abs(a.toValue(0) - a.toValue(n));
|
|
1294
|
-
e.setYRadius(r), e.redraw(!1);
|
|
1295
|
-
}] }, rectangleAnnotation: { className: "highcharts-rectangle-annotation", start: function(o) {
|
|
1296
|
-
let t = this.chart.pointer?.getCoordinates(o), e = t && L(t.xAxis), i = t && L(t.yAxis);
|
|
1297
|
-
if (!e || !i) return;
|
|
1298
|
-
let s = e.value, n = i.value, a = e.axis.index, r = i.axis.index, l = this.chart.options.navigation;
|
|
1299
|
-
return this.chart.addAnnotation(w({ 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" }] }] }, l.annotationsOptions, l.bindings.rectangleAnnotation.annotationsOptions));
|
|
1300
|
-
}, steps: [function(o, t) {
|
|
1301
|
-
let e = t.options.shapes, i = e && e[0] && e[0].points || [], s = this.chart.pointer?.getCoordinates(o), n = s && L(s.xAxis), a = s && L(s.yAxis);
|
|
1302
|
-
if (n && a) {
|
|
1303
|
-
let r = n.value, l = a.value;
|
|
1304
|
-
i[1].x = r, i[2].x = r, i[2].y = l, i[3].y = l, t.update({ shapes: [{ points: i }] });
|
|
1305
|
-
}
|
|
1306
|
-
}] }, labelAnnotation: { className: "highcharts-label-annotation", start: function(o) {
|
|
1307
|
-
let t = this.chart.pointer?.getCoordinates(o), e = t && L(t.xAxis), i = t && L(t.yAxis), s = this.chart.options.navigation;
|
|
1308
|
-
if (e && i) return this.chart.addAnnotation(w({ langKey: "label", type: "basicAnnotation", labelOptions: { format: "{y:.2f}", overflow: "none", crop: !0 }, labels: [{ point: { xAxis: e.axis.index, yAxis: i.axis.index, x: e.value, y: i.value } }] }, s.annotationsOptions, s.bindings.labelAnnotation.annotationsOptions));
|
|
1309
|
-
} } }, events: {}, annotationsOptions: { animation: { defer: 0 } } } }, { setOptions: Ze } = P(), { format: Je } = Ut(), { composed: Qe, doc: ti, win: ei } = P(), { getAssignedAxis: se, getFieldType: oe } = ie;
|
|
1310
|
-
function ii() {
|
|
1311
|
-
this.chart.navigationBindings && this.chart.navigationBindings.deselectAnnotation();
|
|
1312
|
-
}
|
|
1313
|
-
function si() {
|
|
1314
|
-
this.navigationBindings && this.navigationBindings.destroy();
|
|
1315
|
-
}
|
|
1316
|
-
function oi() {
|
|
1317
|
-
let o = this.options;
|
|
1318
|
-
o && o.navigation && o.navigation.bindings && (this.navigationBindings = new X(this, o.navigation), this.navigationBindings.initEvents(), this.navigationBindings.initUpdate());
|
|
1319
|
-
}
|
|
1320
|
-
function ni() {
|
|
1321
|
-
let o = this.navigationBindings, t = "highcharts-disabled-btn";
|
|
1322
|
-
if (this && o) {
|
|
1323
|
-
let e = !1;
|
|
1324
|
-
if (this.series.forEach((i) => {
|
|
1325
|
-
!i.options.isInternal && i.visible && (e = !0);
|
|
1326
|
-
}), this.navigationBindings && this.navigationBindings.container && this.navigationBindings.container[0]) {
|
|
1327
|
-
let i = this.navigationBindings.container[0];
|
|
1328
|
-
O(o.boundClassNames, (s, n) => {
|
|
1329
|
-
let a = i.querySelectorAll("." + n);
|
|
1330
|
-
if (a) for (let r = 0; r < a.length; r++) {
|
|
1331
|
-
let l = a[r], c = l.className;
|
|
1332
|
-
s.noDataState === "normal" || e ? c.indexOf(t) !== -1 && l.classList.remove(t) : c.indexOf(t) === -1 && (l.className += " " + t);
|
|
1333
|
-
}
|
|
1334
|
-
});
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
function ai() {
|
|
1339
|
-
this.deselectAnnotation();
|
|
1340
|
-
}
|
|
1341
|
-
function ri() {
|
|
1342
|
-
this.selectedButtonElement = null;
|
|
1343
|
-
}
|
|
1344
|
-
function ne(o) {
|
|
1345
|
-
let t, e, i = o.prototype.defaultOptions.events && o.prototype.defaultOptions.events.click;
|
|
1346
|
-
function s(n) {
|
|
1347
|
-
let a = this, r = a.chart.navigationBindings, l = r.activeAnnotation;
|
|
1348
|
-
i && i.call(a, n), l !== a ? (r.deselectAnnotation(), r.activeAnnotation = a, a.setControlPointsVisibility(!0), N(r, "showPopup", { annotation: a, formType: "annotation-toolbar", options: r.annotationToFields(a), onSubmit: function(c) {
|
|
1349
|
-
if (c.actionType === "remove") r.activeAnnotation = !1, r.chart.removeAnnotation(a);
|
|
1350
|
-
else {
|
|
1351
|
-
let h = {};
|
|
1352
|
-
r.fieldsToOptions(c.fields, h), r.deselectAnnotation();
|
|
1353
|
-
let u = h.typeOptions;
|
|
1354
|
-
a.options.type === "measure" && (u.crosshairY.enabled = u.crosshairY.strokeWidth !== 0, u.crosshairX.enabled = u.crosshairX.strokeWidth !== 0), a.update(h);
|
|
1355
|
-
}
|
|
1356
|
-
} })) : N(r, "closePopup"), n.activeAnnotation = !0;
|
|
1357
|
-
}
|
|
1358
|
-
w(!0, o.prototype.defaultOptions.events, { click: s, touchstart: function(n) {
|
|
1359
|
-
t = n.touches[0].clientX, e = n.touches[0].clientY;
|
|
1360
|
-
}, touchend: function(n) {
|
|
1361
|
-
t && Math.sqrt(Math.pow(t - n.changedTouches[0].clientX, 2) + Math.pow(e - n.changedTouches[0].clientY, 2)) >= 4 || s.call(this, n);
|
|
1362
|
-
} });
|
|
1363
|
-
}
|
|
1364
|
-
class X {
|
|
1365
|
-
static compose(t, e) {
|
|
1366
|
-
wt(Qe, "NavigationBindings") && (m(t, "remove", ii), ne(t), O(t.types, (i) => {
|
|
1367
|
-
ne(i);
|
|
1368
|
-
}), m(e, "destroy", si), m(e, "load", oi), m(e, "render", ni), m(X, "closePopup", ai), m(X, "deselectButton", ri), Ze(_e));
|
|
1369
|
-
}
|
|
1370
|
-
constructor(t, e) {
|
|
1371
|
-
this.boundClassNames = void 0, this.chart = t, this.options = e, this.eventsToUnbind = [], this.container = this.chart.container.getElementsByClassName(this.options.bindingsClassName || ""), this.container.length || (this.container = ti.getElementsByClassName(this.options.bindingsClassName || ""));
|
|
1372
|
-
}
|
|
1373
|
-
getCoords(t) {
|
|
1374
|
-
let e = this.chart.pointer?.getCoordinates(t);
|
|
1375
|
-
return [e && se(e.xAxis), e && se(e.yAxis)];
|
|
1376
|
-
}
|
|
1377
|
-
initEvents() {
|
|
1378
|
-
let t = this, e = t.chart, i = t.container, s = t.options;
|
|
1379
|
-
t.boundClassNames = {}, O(s.bindings || {}, (n) => {
|
|
1380
|
-
t.boundClassNames[n.className] = n;
|
|
1381
|
-
}), [].forEach.call(i, (n) => {
|
|
1382
|
-
t.eventsToUnbind.push(m(n, "click", (a) => {
|
|
1383
|
-
let r = t.getButtonEvents(n, a);
|
|
1384
|
-
r && !r.button.classList.contains("highcharts-disabled-btn") && t.bindingsButtonClick(r.button, r.events, a);
|
|
1385
|
-
}));
|
|
1386
|
-
}), O(s.events || {}, (n, a) => {
|
|
1387
|
-
typeof n == "function" && t.eventsToUnbind.push(m(t, a, n, { passive: !1 }));
|
|
1388
|
-
}), t.eventsToUnbind.push(m(e.container, "click", function(n) {
|
|
1389
|
-
!e.cancelClick && e.isInsidePlot(n.chartX - e.plotLeft, n.chartY - e.plotTop, { visiblePlotOnly: !0 }) && t.bindingsChartClick(this, n);
|
|
1390
|
-
})), t.eventsToUnbind.push(m(e.container, P().isTouchDevice ? "touchmove" : "mousemove", function(n) {
|
|
1391
|
-
t.bindingsContainerMouseMove(this, n);
|
|
1392
|
-
}, P().isTouchDevice ? { passive: !1 } : void 0));
|
|
1393
|
-
}
|
|
1394
|
-
initUpdate() {
|
|
1395
|
-
let t = this;
|
|
1396
|
-
Ge.compose(this.chart).navigation.addUpdate((e) => {
|
|
1397
|
-
t.update(e);
|
|
1398
|
-
});
|
|
1399
|
-
}
|
|
1400
|
-
bindingsButtonClick(t, e, i) {
|
|
1401
|
-
let s = this.chart, n = s.renderer.boxWrapper, a = !0;
|
|
1402
|
-
this.selectedButtonElement && (this.selectedButtonElement.classList === t.classList && (a = !1), N(this, "deselectButton", { button: this.selectedButtonElement }), this.nextEvent && (this.currentUserDetails && this.currentUserDetails.coll === "annotations" && s.removeAnnotation(this.currentUserDetails), this.mouseMoveEvent = this.nextEvent = !1)), a ? (this.selectedButton = e, this.selectedButtonElement = t, N(this, "selectButton", { button: t }), e.init && e.init.call(this, t, i), (e.start || e.steps) && s.renderer.boxWrapper.addClass("highcharts-draw-mode")) : (s.stockTools && t.classList.remove("highcharts-active"), n.removeClass("highcharts-draw-mode"), this.nextEvent = !1, this.mouseMoveEvent = !1, this.selectedButton = null);
|
|
1403
|
-
}
|
|
1404
|
-
bindingsChartClick(t, e) {
|
|
1405
|
-
t = this.chart;
|
|
1406
|
-
let i = this.activeAnnotation, s = this.selectedButton, n = t.renderer.boxWrapper;
|
|
1407
|
-
i && (i.cancelClick || e.activeAnnotation || !e.target.parentNode || (function(a, r) {
|
|
1408
|
-
let l = ei.Element.prototype, c = l.matches || l.msMatchesSelector || l.webkitMatchesSelector, h = null;
|
|
1409
|
-
if (l.closest) h = l.closest.call(a, r);
|
|
1410
|
-
else do {
|
|
1411
|
-
if (c.call(a, r)) return a;
|
|
1412
|
-
a = a.parentElement || a.parentNode;
|
|
1413
|
-
} while (a !== null && a.nodeType === 1);
|
|
1414
|
-
return h;
|
|
1415
|
-
})(e.target, ".highcharts-popup") ? i.cancelClick && setTimeout(() => {
|
|
1416
|
-
i.cancelClick = !1;
|
|
1417
|
-
}, 0) : N(this, "closePopup")), s && s.start && (this.nextEvent ? (this.nextEvent(e, this.currentUserDetails), this.steps && (this.stepIndex++, s.steps[this.stepIndex] ? this.mouseMoveEvent = this.nextEvent = s.steps[this.stepIndex] : (N(this, "deselectButton", { button: this.selectedButtonElement }), n.removeClass("highcharts-draw-mode"), s.end && s.end.call(this, e, this.currentUserDetails), this.nextEvent = !1, this.mouseMoveEvent = !1, this.selectedButton = null))) : (this.currentUserDetails = s.start.call(this, e), this.currentUserDetails && s.steps ? (this.stepIndex = 0, this.steps = !0, this.mouseMoveEvent = this.nextEvent = s.steps[this.stepIndex]) : (N(this, "deselectButton", { button: this.selectedButtonElement }), n.removeClass("highcharts-draw-mode"), this.steps = !1, this.selectedButton = null, s.end && s.end.call(this, e, this.currentUserDetails))));
|
|
1418
|
-
}
|
|
1419
|
-
bindingsContainerMouseMove(t, e) {
|
|
1420
|
-
this.mouseMoveEvent && this.mouseMoveEvent(e, this.currentUserDetails);
|
|
1421
|
-
}
|
|
1422
|
-
fieldsToOptions(t, e) {
|
|
1423
|
-
return O(t, (i, s) => {
|
|
1424
|
-
let n = parseFloat(i), a = s.split("."), r = a.length - 1;
|
|
1425
|
-
if (!q(n) || i.match(/px|em/g) || s.match(/format/g) || (i = n), i !== "undefined") {
|
|
1426
|
-
let l = e;
|
|
1427
|
-
a.forEach((c, h) => {
|
|
1428
|
-
if (c !== "__proto__" && c !== "constructor") {
|
|
1429
|
-
let u = B(a[h + 1], "");
|
|
1430
|
-
r === h ? l[c] = i : (l[c] || (l[c] = u.match(/\d/g) ? [] : {}), l = l[c]);
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
}), e;
|
|
1435
|
-
}
|
|
1436
|
-
deselectAnnotation() {
|
|
1437
|
-
this.activeAnnotation && (this.activeAnnotation.setControlPointsVisibility(!1), this.activeAnnotation = !1);
|
|
1438
|
-
}
|
|
1439
|
-
annotationToFields(t) {
|
|
1440
|
-
let e = t.options, i = X.annotationsEditable, s = i.nestedOptions, n = B(e.type, e.shapes?.[0]?.type, e.labels?.[0]?.type, "label"), a = X.annotationsNonEditable[e.langKey] || [], r = { langKey: e.langKey, type: n };
|
|
1441
|
-
function l(c, h, u, g, d) {
|
|
1442
|
-
let p;
|
|
1443
|
-
u && A(c) && a.indexOf(h) === -1 && ((u.indexOf && u.indexOf(h)) >= 0 || u[h] || u === !0) && (M(c) ? (g[h] = [], c.forEach((f, y) => {
|
|
1444
|
-
S(f) ? (g[h][y] = {}, O(f, (x, b) => {
|
|
1445
|
-
l(x, b, s[h], g[h][y], h);
|
|
1446
|
-
})) : l(f, 0, s[h], g[h], h);
|
|
1447
|
-
})) : S(c) ? (p = {}, M(g) ? (g.push(p), p[h] = {}, p = p[h]) : g[h] = p, O(c, (f, y) => {
|
|
1448
|
-
l(f, y, h === 0 ? u : s[h], p, h);
|
|
1449
|
-
})) : h === "format" ? g[h] = [Je(c, t.labels[0].points[0]).toString(), "text"] : M(g) ? g.push([c, oe(d, c)]) : g[h] = [c, oe(h, c)]);
|
|
1450
|
-
}
|
|
1451
|
-
return O(e, (c, h) => {
|
|
1452
|
-
h === "typeOptions" && r.type !== "basicAnnotation" ? (r[h] = {}, O(e[h], (u, g) => {
|
|
1453
|
-
l(u, g, s, r[h], g);
|
|
1454
|
-
})) : l(c, h, i[n], r, h);
|
|
1455
|
-
}), r;
|
|
1456
|
-
}
|
|
1457
|
-
getClickedClassNames(t, e) {
|
|
1458
|
-
var i, s;
|
|
1459
|
-
let n, a, r, l = e.target, c = [], h;
|
|
1460
|
-
for (; l && l.tagName && (i = l, a = ct(s = "class") && !A(void 0), r = (u, g) => {
|
|
1461
|
-
A(u) ? i.setAttribute(g, u) : a ? (n = i.getAttribute(g)) || g !== "class" || (n = i.getAttribute(g + "Name")) : i.removeAttribute(g);
|
|
1462
|
-
}, ct(s) ? r(void 0, s) : O(s, r), (h = n) && (c = c.concat(h.split(" ").map((u) => [u, l]))), (l = l.parentNode) !== t); ) ;
|
|
1463
|
-
return c;
|
|
1464
|
-
}
|
|
1465
|
-
getButtonEvents(t, e) {
|
|
1466
|
-
let i, s = this;
|
|
1467
|
-
return this.getClickedClassNames(t, e).forEach((n) => {
|
|
1468
|
-
s.boundClassNames[n[0]] && !i && (i = { events: s.boundClassNames[n[0]], button: n[1] });
|
|
1469
|
-
}), i;
|
|
1470
|
-
}
|
|
1471
|
-
update(t) {
|
|
1472
|
-
this.options = w(!0, this.options, t), this.removeEvents(), this.initEvents();
|
|
1473
|
-
}
|
|
1474
|
-
removeEvents() {
|
|
1475
|
-
this.eventsToUnbind.forEach((t) => t());
|
|
1476
|
-
}
|
|
1477
|
-
destroy() {
|
|
1478
|
-
this.removeEvents();
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
X.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"] }, X.annotationsNonEditable = { rectangle: ["crosshairX", "crosshairY", "labelOptions"], ellipse: ["labelOptions"], circle: ["labelOptions"] };
|
|
1482
|
-
let F = P();
|
|
1483
|
-
F.Annotation = F.Annotation || T, F.NavigationBindings = F.NavigationBindings || X, F.Annotation.compose(F.Chart, F.NavigationBindings, F.Pointer, F.SVGRenderer);
|
|
1484
|
-
let li = P();
|
|
1485
|
-
return xt.default;
|
|
1486
|
-
})());
|
|
1487
|
-
})(st)), st.exports;
|
|
1488
|
-
}
|
|
1489
|
-
var le = gi();
|
|
1490
|
-
const fi = /* @__PURE__ */ pi(le), vi = /* @__PURE__ */ di({
|
|
1491
|
-
__proto__: null,
|
|
1492
|
-
default: fi
|
|
1493
|
-
}, [le]);
|
|
1494
|
-
export {
|
|
1495
|
-
vi as a
|
|
1496
|
-
};
|