@mobileaction/action-kit 1.59.0-beta.20260824072801 → 1.59.1

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