import { ref as Xe, reactive as M0, nextTick as Bp, openBlock as ri, createElementBlock as ni, normalizeStyle as Ur, createElementVNode as hr, toDisplayString as mn, unref as C0, createCommentVNode as ns, Fragment as os, createTextVNode as k0, renderList as Qa, normalizeClass as A0, defineCustomElement as jp } from "vue";
const fs = {
//图表配置
chart: {
spacingTop: 30,
backgroundColor: "rgba(0,0,0,0)"
},
title: {
enabled: !1
},
exporting: {
enabled: !1
},
boost: {
useGPUTranslations: !0
},
//默认颜色配置
colors: [
"#00f",
"#f00",
"#999",
"#000",
"#7cb5ec",
"#90ed7d",
"#f7a35c",
"#8085e9",
"#f15c80",
"#e4d354",
"#2b908f",
"#f45b5b",
"#91e8e1"
],
//版权信息
credits: { enabled: !1 },
//数据列通用配置
plotOptions: {
series: {
turboThreshold: 0,
//不限制数据点个数
boostThreshold: 0,
animation: {
duration: 1e3
}
},
areaspline: {
lineWidth: 1,
stacking: "normal",
marker: {
enabled: !1
}
// fillOpacity: 0.5,
},
column: {
pointPadding: 0.05,
stacking: "normal"
},
scatter: {
turboThreshold: 0,
marker: {
symbol: "circle",
radius: 5,
states: {
hover: {
enabled: !0
}
}
},
states: {
hover: {
marker: {
enabled: !0
}
}
}
}
},
//范围选择器
rangeSelector: {
enabled: !1,
selected: 2
},
//悬浮提示框
tooltip: {
split: !1,
shared: !0,
dateTimeLabelFormats: {
// 时间格式化字符
day: "%Y/%m/%d",
week: "%Y/%m",
month: "%Y/%m",
year: "%Y/%m"
},
xDateFormat: "%Y/%m/%d",
className: "chart-tooltips-box"
// formatter:function(e){
// return `
${this.x}
aaa
`
// // return e
// }
// outside: true,
// valueDecimals: 4,
},
//图例
legend: {
enabled: !0,
verticalAlign: "top",
margin: 3
// layout: 'vertical'
},
//滚动条
scrollbar: {
enabled: !1
},
//导航器
navigator: {
enabled: !1
},
//范围选择器
rangeSelector: {
enabled: !1
},
xAxis: {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
type: "datetime",
ordinal: !1,
dateTimeLabelFormats: {
day: "%y/%m",
week: "%y/%m",
month: "%y/%m",
year: "%y/%m"
}
// gridLineWidth:0
}
}, Mn = {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
ordinal: !1,
type: "linear"
}, Or = {
tickWidth: 1,
tickLength: 5,
lineWidth: 1,
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
// offset: 0,
visible: !0,
gridLineWidth: 0,
tickPosition: "inside",
endOnTick: !1,
startOnTick: !1,
showLastLabel: !0,
tickPixelInterval: 50
}, Wp = {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
type: "datetime",
ordinal: !1,
dateTimeLabelFormats: {
day: "%y/%m",
week: "%y/%m",
month: "%y/%m",
year: "%y/%m"
},
xDateFormat: "%Y-%m-%d"
}, T0 = {
年: "Y",
季: "Q",
月: "M",
周: "W",
天: "D"
}, bp = {
年: "Year",
季: "Season",
月: "Month",
周: "Week",
天: "Day"
};
var Hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Cn(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var zp = { exports: {} };
(function(r) {
(function(g, E) {
r.exports ? (E.default = E, r.exports = g.document ? E(g) : E) : (g.Highcharts && g.Highcharts.error(16, !0), g.Highcharts = E(g));
})(typeof window < "u" ? window : Hr, function(g) {
function E(y, R, I, Z) {
y.hasOwnProperty(R) || (y[R] = Z.apply(null, I));
}
var h = {};
return E(h, "Core/Globals.js", [], function() {
var y = typeof g < "u" ? g : typeof window < "u" ? window : {}, R;
return function(I) {
I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
}, I.supportsPassiveEvents = function() {
var Z = !1;
if (!I.isMS) {
var H = Object.defineProperty({}, "passive", { get: function() {
Z = !0;
} });
I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
"testPassive",
I.noop,
H
), I.win.removeEventListener("testPassive", I.noop, H));
}
return Z;
}(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
}(R || (R = {})), R;
}), E(h, "Core/Utilities.js", [h["Core/Globals.js"]], function(y) {
function R(t, n, o, A) {
var _ = n ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = _ + ": Deprecated member");
var D = w(t), j = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof A < "u") {
var T = "";
D && (j += "?"), b(A, function(X, f) {
T += `
- ` + f + ": " + X, D && (j += encodeURI(f) + "=" + encodeURI(X));
}), j += T;
}
x(y, "displayError", { chart: o, code: t, message: j, params: A }, function() {
if (n)
throw Error(j);
p.console && R.messages.indexOf(j) === -1 && console.warn(j);
}), R.messages.push(j);
}
function I(t, n) {
var o = {};
return b(t, function(A, _) {
U(t[_], !0) && !t.nodeType && n[_] ? (A = I(t[_], n[_]), Object.keys(A).length && (o[_] = A)) : (U(t[_]) || t[_] !== n[_]) && (o[_] = t[_]);
}), o;
}
function Z(t, n) {
return parseInt(t, n || 10);
}
function H(t) {
return typeof t == "string";
}
function $(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function U(t, n) {
return !!t && typeof t == "object" && (!n || !$(t));
}
function W(t) {
return U(t) && typeof t.nodeType == "number";
}
function N(t) {
var n = t && t.constructor;
return !(!U(t, !0) || W(t) || !n || !n.name || n.name === "Object");
}
function w(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function v(t) {
return typeof t < "u" && t !== null;
}
function u(t, n, o) {
var A;
return H(n) ? v(o) ? t.setAttribute(n, o) : t && t.getAttribute && ((A = t.getAttribute(n)) || n !== "class" || (A = t.getAttribute(n + "Name"))) : b(n, function(_, D) {
v(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
}), A;
}
function d(t, n) {
var o;
t || (t = {});
for (o in n)
t[o] = n[o];
return t;
}
function P() {
for (var t = arguments, n = t.length, o = 0; o < n; o++) {
var A = t[o];
if (typeof A < "u" && A !== null)
return A;
}
}
function O(t, n) {
y.isMS && !y.svg && n && typeof n.opacity < "u" && (n.filter = "alpha(opacity=" + 100 * n.opacity + ")"), d(t.style, n);
}
function B(t, n) {
return 1e14 < t ? t : parseFloat(t.toPrecision(n || 14));
}
function C(t, n, o) {
var A = y.getStyle || C;
if (n === "width")
return n = Math.min(t.offsetWidth, t.scrollWidth), o = t.getBoundingClientRect && t.getBoundingClientRect().width, o < n && o >= n - 1 && (n = Math.floor(o)), Math.max(0, n - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
if (n === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
if (p.getComputedStyle || R(27, !0), t = p.getComputedStyle(t, void 0)) {
var _ = t.getPropertyValue(n);
P(o, n !== "opacity") && (_ = Z(_));
}
return _;
}
function b(t, n, o) {
for (var A in t)
Object.hasOwnProperty.call(t, A) && n.call(o || t[A], t[A], A, t);
}
function M(t, n, o) {
function A(T, X) {
var f = t.removeEventListener || y.removeEventListenerPolyfill;
f && f.call(t, T, X, !1);
}
function _(T) {
var X;
if (t.nodeName) {
if (n) {
var f = {};
f[n] = !0;
} else
f = T;
b(f, function(m, L) {
if (T[L])
for (X = T[L].length; X--; )
A(L, T[L][X].fn);
});
}
}
var D = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(D, "hcEvents")) {
var j = D.hcEvents;
n ? (D = j[n] || [], o ? (j[n] = D.filter(function(T) {
return o !== T.fn;
}), A(n, o)) : (_(j), j[n] = [])) : (_(j), delete D.hcEvents);
}
}
function x(t, n, o, A) {
if (o = o || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var _ = c.createEvent("Events");
_.initEvent(n, !0, !0), o = d(_, o), t.dispatchEvent ? t.dispatchEvent(o) : t.fireEvent(n, o);
} else if (t.hcEvents) {
o.target || d(o, { preventDefault: function() {
o.defaultPrevented = !0;
}, target: t, type: n }), _ = [];
for (var D = t, j = !1; D.hcEvents; )
Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[n] && (_.length && (j = !0), _.unshift.apply(_, D.hcEvents[n])), D = Object.getPrototypeOf(D);
j && _.sort(function(T, X) {
return T.order - X.order;
}), _.forEach(function(T) {
T.fn.call(t, o) === !1 && o.preventDefault();
});
}
A && !o.defaultPrevented && A.call(t, o);
}
var a = y.charts, c = y.doc, p = y.win;
(R || (R = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, n) {
return t.find(n);
} : function(t, n) {
var o, A = t.length;
for (o = 0; o < A; o++)
if (n(t[o], o))
return t[o];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, n) {
y[n] = function(o) {
var A;
return R(32, !1, void 0, (A = {}, A["Highcharts." + n] = "use Array." + t, A)), Array.prototype[t].apply(o, [].slice.call(arguments, 1));
};
});
var l, s = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", n = 0;
return function() {
return "highcharts-" + (l ? "" : t) + n++;
};
}();
return p.jQuery && (p.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[u(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, n, o, A) {
A === void 0 && (A = {});
var _ = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var D = t.addEventListener || y.addEventListenerPolyfill;
return D && D.call(t, n, o, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? n.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[n] || (_[n] = []), _[n].push({ fn: o, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[n].sort(function(j, T) {
return j.order - T.order;
}), function() {
M(t, n, o);
};
}, arrayMax: function(t) {
for (var n = t.length, o = t[0]; n--; )
t[n] > o && (o = t[n]);
return o;
}, arrayMin: function(t) {
for (var n = t.length, o = t[0]; n--; )
t[n] < o && (o = t[n]);
return o;
}, attr: u, clamp: function(t, n, o) {
return t > n ? t < o ? t : o : n;
}, cleanRecursively: I, clearTimeout: function(t) {
v(t) && clearTimeout(t);
}, correctFloat: B, createElement: function(t, n, o, A, _) {
return t = c.createElement(t), n && d(t, n), _ && O(t, { padding: "0", border: "none", margin: "0" }), o && O(t, o), A && A.appendChild(t), t;
}, css: O, defined: v, destroyObjectProperties: function(t, n) {
b(t, function(o, A) {
o && o !== n && o.destroy && o.destroy(), delete t[A];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, n) {
for (var o = t.length; o--; )
if (t[o] === n) {
t.splice(o, 1);
break;
}
}, error: R, extend: d, extendClass: function(t, n) {
var o = function() {
};
return o.prototype = new t(), d(o.prototype, n), o;
}, find: i, fireEvent: x, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, n) {
for (t = t.split("."); t.length && v(n); ) {
var o = t.shift();
if (typeof o > "u" || o === "__proto__" || (n = n[o], !v(n) || typeof n == "function" || typeof n.nodeType == "number" || n === p))
return;
}
return n;
}, getStyle: C, inArray: function(t, n, o) {
return R(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), n.indexOf(t, o);
}, isArray: $, isClass: N, isDOMElement: W, isFunction: function(t) {
return typeof t == "function";
}, isNumber: w, isObject: U, isString: H, keys: function(t) {
return R(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, n = arguments, o = {}, A = function(D, j) {
return typeof D != "object" && (D = {}), b(j, function(T, X) {
X !== "__proto__" && X !== "constructor" && (!U(T, !0) || N(T) || W(T) ? D[X] = j[X] : D[X] = A(D[X] || {}, T));
}), D;
};
n[0] === !0 && (o = n[1], n = Array.prototype.slice.call(n, 2));
var _ = n.length;
for (t = 0; t < _; t++)
o = A(o, n[t]);
return o;
}, normalizeTickInterval: function(t, n, o, A, _) {
var D = t;
o = P(o, 1);
var j = t / o;
for (n || (n = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (o === 1 ? n = n.filter(function(T) {
return T % 1 === 0;
}) : 0.1 >= o && (n = [1 / o]))), A = 0; A < n.length && (D = n[A], !(_ && D * o >= t || !_ && j <= (n[A] + (n[A + 1] || n[A])) / 2)); A++)
;
return D = B(D * o, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var n = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || n.scrollTop) - (n.clientTop || 0), left: t.left + (p.pageXOffset || n.scrollLeft) - (n.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, n, o) {
return Array((n || 2) + 1 - String(t).replace("-", "").length).join(o || "0") + t;
}, pick: P, pInt: Z, relativeLength: function(t, n, o) {
return /%$/.test(t) ? n * parseFloat(t) / 100 + (o || 0) : parseFloat(t);
}, removeEvent: M, splat: function(t) {
return $(t) ? t : [t];
}, stableSort: function(t, n) {
var o = t.length, A, _;
for (_ = 0; _ < o; _++)
t[_].safeI = _;
for (t.sort(function(D, j) {
return A = n(D, j), A === 0 ? D.safeI - j.safeI : A;
}), _ = 0; _ < o; _++)
delete t[_].safeI;
}, syncTimeout: function(t, n, o) {
return 0 < n ? setTimeout(t, n, o) : (t.call(0, o), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: s, useSerialIds: function(t) {
return l = P(t, l);
}, wrap: function(t, n, o) {
var A = t[n];
t[n] = function() {
var _ = Array.prototype.slice.call(arguments), D = arguments, j = this;
return j.proceed = function() {
A.apply(j, arguments.length ? arguments : D);
}, _.unshift(A), _ = o.apply(this, _), j.proceed = null, _;
};
} }, i;
}), E(h, "Core/Chart/ChartDefaults.js", [], function() {
return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
10,
10,
15,
10
], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
}), E(h, "Core/Color/Color.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = R.isNumber, Z = R.merge, H = R.pInt;
return R = function() {
function $(U) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = U;
var W = y.Color;
if (W && W !== $)
return new W(U);
if (!(this instanceof $))
return new $(U);
this.init(U);
}
return $.parse = function(U) {
return U ? new $(U) : $.None;
}, $.prototype.init = function(U) {
var W;
if (typeof U == "object" && typeof U.stops < "u")
this.stops = U.stops.map(function(u) {
return new $(u[1]);
});
else if (typeof U == "string") {
if (this.input = U = $.names[U.toLowerCase()] || U, U.charAt(0) === "#") {
var N = U.length, w = parseInt(U.substr(1), 16);
N === 7 ? W = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : N === 4 && (W = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
}
if (!W)
for (w = $.parsers.length; w-- && !W; ) {
var v = $.parsers[w];
(N = v.regex.exec(U)) && (W = v.parse(N));
}
}
W && (this.rgba = W);
}, $.prototype.get = function(U) {
var W = this.input, N = this.rgba;
if (typeof W == "object" && typeof this.stops < "u") {
var w = Z(W);
return w.stops = [].slice.call(w.stops), this.stops.forEach(function(v, u) {
w.stops[u] = [w.stops[u][0], v.get(U)];
}), w;
}
return N && I(N[0]) ? U === "rgb" || !U && N[3] === 1 ? "rgb(" + N[0] + "," + N[1] + "," + N[2] + ")" : U === "a" ? "" + N[3] : "rgba(" + N.join(",") + ")" : W;
}, $.prototype.brighten = function(U) {
var W = this.rgba;
if (this.stops)
this.stops.forEach(function(w) {
w.brighten(U);
});
else if (I(U) && U !== 0)
for (var N = 0; 3 > N; N++)
W[N] += H(255 * U), 0 > W[N] && (W[N] = 0), 255 < W[N] && (W[N] = 255);
return this;
}, $.prototype.setOpacity = function(U) {
return this.rgba[3] = U, this;
}, $.prototype.tweenTo = function(U, W) {
var N = this.rgba, w = U.rgba;
return !I(N[0]) || !I(w[0]) ? U.input || "none" : (U = w[3] !== 1 || N[3] !== 1, (U ? "rgba(" : "rgb(") + Math.round(w[0] + (N[0] - w[0]) * (1 - W)) + "," + Math.round(w[1] + (N[1] - w[1]) * (1 - W)) + "," + Math.round(w[2] + (N[2] - w[2]) * (1 - W)) + (U ? "," + (w[3] + (N[3] - w[3]) * (1 - W)) : "") + ")");
}, $.names = { white: "#ffffff", black: "#000000" }, $.parsers = [{
regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
parse: function(U) {
return [H(U[1]), H(U[2]), H(U[3]), parseFloat(U[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(U) {
return [H(U[1]), H(U[2]), H(U[3]), 1];
} }], $.None = new $(""), $;
}(), R;
}), E(h, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), E(h, "Core/Time.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = y.win, Z = R.defined, H = R.error, $ = R.extend, U = R.isObject, W = R.merge, N = R.objectEach, w = R.pad, v = R.pick, u = R.splat, d = R.timeUnits, P = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
return R = function() {
function B(C) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
}
return B.prototype.get = function(C, b) {
if (this.variableTimezone || this.timezoneOffset) {
var M = b.getTime(), x = M - this.getTimezoneOffset(b);
return b.setTime(x), C = b["getUTC" + C](), b.setTime(M), C;
}
return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
}, B.prototype.set = function(C, b, M) {
if (this.variableTimezone || this.timezoneOffset) {
if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + C](M);
var x = this.getTimezoneOffset(b);
return x = b.getTime() - x, b.setTime(x), b["setUTC" + C](M), C = this.getTimezoneOffset(b), x = b.getTime() + C, b.setTime(x);
}
return this.useUTC || P && C === "FullYear" ? b["setUTC" + C](M) : b["set" + C](M);
}, B.prototype.update = function(C) {
var b = v(C && C.useUTC, !0);
this.options = C = W(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
}, B.prototype.makeTime = function(C, b, M, x, a, c) {
if (this.useUTC) {
var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
p += i;
var l = this.getTimezoneOffset(p);
i !== l ? p += l - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
} else
p = new this.Date(C, b, v(M, 1), v(x, 0), v(a, 0), v(c, 0)).getTime();
return p;
}, B.prototype.timezoneOffsetFunction = function() {
var C = this, b = this.options, M = b.getTimezoneOffset, x = b.moment || I.moment;
if (!this.useUTC)
return function(a) {
return 6e4 * new Date(a.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (x)
return function(a) {
return 6e4 * -x.tz(a, b.timezone).utcOffset();
};
H(25);
}
return this.useUTC && M ? function(a) {
return 6e4 * M(a.valueOf());
} : function() {
return 6e4 * (C.timezoneOffset || 0);
};
}, B.prototype.dateFormat = function(C, b, M) {
if (!Z(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
C = v(C, "%Y-%m-%d %H:%M:%S");
var x = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), l = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, n = t && t.weekdays, o = t && t.shortWeekdays;
return a = $({ a: o ? o[p] : n[p].substr(0, 3), A: n[p], d: w(i), e: w(i, 2, " "), w: p, b: t.shortMonths[l], B: t.months[l], m: w(l + 1), o: l + 1, y: s.toString().substr(2, 2), Y: s, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(a.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), N(a, function(A, _) {
for (; C.indexOf("%" + _) !== -1; )
C = C.replace("%" + _, typeof A == "function" ? A.call(x, b) : A);
}), M ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
}, B.prototype.resolveDTLFormat = function(C) {
return U(C, !0) ? C : (C = u(C), { main: C[0], from: C[1], to: C[2] });
}, B.prototype.getTimeTicks = function(C, b, M, x) {
var a = this, c = [], p = {}, i = new a.Date(b), l = C.unitRange, s = C.count || 1, t;
if (x = v(x, 1), Z(b)) {
if (a.set(
"Milliseconds",
i,
l >= d.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
), l >= d.second && a.set("Seconds", i, l >= d.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), l >= d.minute && a.set("Minutes", i, l >= d.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), l >= d.hour && a.set("Hours", i, l >= d.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), l >= d.day && a.set("Date", i, l >= d.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), l >= d.month) {
a.set("Month", i, l >= d.year ? 0 : s * Math.floor(a.get("Month", i) / s));
var n = a.get("FullYear", i);
}
l >= d.year && a.set(
"FullYear",
i,
n - n % s
), l === d.week && (n = a.get("Day", i), a.set("Date", i, a.get("Date", i) - n + x + (n < x ? -7 : 0))), n = a.get("FullYear", i), x = a.get("Month", i);
var o = a.get("Date", i), A = a.get("Hours", i);
for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(M) || (t = M - b > 4 * d.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(M)), b = i.getTime(), i = 1; b < M; )
c.push(b), b = l === d.year ? a.makeTime(n + i * s, 0) : l === d.month ? a.makeTime(n, x + i * s) : !t || l !== d.day && l !== d.week ? t && l === d.hour && 1 < s ? a.makeTime(n, x, o, A + i * s) : b + l * s : a.makeTime(n, x, o + i * s * (l === d.day ? 1 : 7)), i++;
c.push(b), l <= d.hour && 1e4 > c.length && c.forEach(function(_) {
_ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
});
}
return c.info = $(C, { higherRanks: p, totalRange: l * s }), c;
}, B.prototype.getDateFormat = function(C, b, M, x) {
var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
for (i in d) {
if (C === d.week && +this.dateFormat("%w", b) === M && a.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (d[i] > C) {
i = p;
break;
}
if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (p = i);
}
if (i)
var l = this.resolveDTLFormat(x[i]).main;
return l;
}, B;
}(), R;
}), E(h, "Core/DefaultOptions.js", [h["Core/Chart/ChartDefaults.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Color/Palettes.js"], h["Core/Time.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $) {
R = R.parse;
var U = $.merge, W = {
colors: Z.colors,
symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
lang: {
loading: "Loading...",
months: "January February March April May June July August September October November December".split(" "),
shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
decimalPoint: ".",
numericSymbols: "kMGTPE".split(""),
resetZoom: "Reset zoom",
resetZoomTitle: "Reset zoom level 1:1",
thousandsSep: " "
},
global: {},
time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
chart: y,
title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
subtitle: { text: "", align: "center", widthAdjust: -44 },
caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
plotOptions: {},
labels: { style: { position: "absolute", color: "#333333" } },
legend: {
enabled: !0,
align: "center",
alignColumns: !0,
className: "highcharts-no-tooltip",
layout: "horizontal",
labelFormatter: function() {
return this.name;
},
borderColor: "#999999",
borderRadius: 0,
navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
itemHoverStyle: { color: "#000000" },
itemHiddenStyle: { color: "#cccccc" },
shadow: !1,
itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
squareSymbol: !0,
symbolPadding: 5,
verticalAlign: "bottom",
x: 0,
y: 0,
title: { style: { fontWeight: "bold" } }
},
loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
tooltip: {
enabled: !0,
animation: I.svg,
borderRadius: 3,
dateTimeLabelFormats: {
millisecond: "%A, %b %e, %H:%M:%S.%L",
second: "%A, %b %e, %H:%M:%S",
minute: "%A, %b %e, %H:%M",
hour: "%A, %b %e, %H:%M",
day: "%A, %b %e, %Y",
week: "Week from %A, %b %e, %Y",
month: "%B %Y",
year: "%Y"
},
footerFormat: "",
headerShape: "callout",
hideDelay: 500,
padding: 8,
shape: "callout",
shared: !1,
snap: I.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: R("#f7f7f7").setOpacity(0.85).get(),
borderWidth: 1,
shadow: !0,
stickOnContact: !1,
style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
useHTML: !1
},
credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
};
W.chart.styledMode = !1;
var N = new H(U(W.global, W.time));
return y = { defaultOptions: W, defaultTime: N, getOptions: function() {
return W;
}, setOptions: function(w) {
return U(!0, W, w), (w.time || w.global) && (I.time ? I.time.update(U(
W.global,
W.time,
w.global,
w.time
)) : I.time = N), W;
} }, y;
}), E(h, "Core/Animation/Fx.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.parse, H = R.win, $ = I.isNumber, U = I.objectEach;
return function() {
function W(N, w, v) {
this.pos = NaN, this.options = w, this.elem = N, this.prop = v;
}
return W.prototype.dSetter = function() {
var N = this.paths, w = N && N[0];
N = N && N[1];
var v = this.now || 0, u = [];
if (v !== 1 && w && N)
if (w.length === N.length && 1 > v)
for (var d = 0; d < N.length; d++) {
for (var P = w[d], O = N[d], B = [], C = 0; C < O.length; C++) {
var b = P[C], M = O[C];
$(b) && $(M) && (O[0] !== "A" || C !== 4 && C !== 5) ? B[C] = b + v * (M - b) : B[C] = M;
}
u.push(B);
}
else
u = N;
else
u = this.toD || [];
this.elem.attr("d", u, void 0, !0);
}, W.prototype.update = function() {
var N = this.elem, w = this.prop, v = this.now, u = this.options.step;
this[w + "Setter"] ? this[w + "Setter"]() : N.attr ? N.element && N.attr(w, v, null, !0) : N.style[w] = v + this.unit, u && u.call(N, v, this);
}, W.prototype.run = function(N, w, v) {
var u = this, d = u.options, P = function(C) {
return P.stopped ? !1 : u.step(C);
}, O = H.requestAnimationFrame || function(C) {
setTimeout(
C,
13
);
}, B = function() {
for (var C = 0; C < W.timers.length; C++)
W.timers[C]() || W.timers.splice(C--, 1);
W.timers.length && O(B);
};
N !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = N, this.end = w, this.unit = v, this.now = this.start, this.pos = 0, P.elem = this.elem, P.prop = this.prop, P() && W.timers.push(P) === 1 && O(B)) : (delete d.curAnim[this.prop], d.complete && Object.keys(d.curAnim).length === 0 && d.complete.call(this.elem));
}, W.prototype.step = function(N) {
var w = +/* @__PURE__ */ new Date(), v = this.options, u = this.elem, d = v.complete, P = v.duration, O = v.curAnim;
if (u.attr && !u.element)
N = !1;
else if (N || w >= P + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var B = O[this.prop] = !0;
U(O, function(C) {
C !== !0 && (B = !1);
}), B && d && d.call(u), N = !1;
} else
this.pos = v.easing((w - this.startTime) / P), this.now = this.start + (this.end - this.start) * this.pos, this.update(), N = !0;
return N;
}, W.prototype.initPath = function(N, w, v) {
function u(a, c) {
for (; a.length < x; ) {
var p = a[0], i = c[x - a.length];
i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
"L",
p[1],
p[2]
]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
}
}
function d(a, c) {
for (; a.length < x; )
if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
var p = a[Math.floor(a.length / C)].slice();
a.splice(a.length / 2, 0, c, p);
} else
a.push(c);
}
var P = N.startX, O = N.endX;
v = v.slice();
var B = N.isArea, C = B ? 2 : 1;
if (w = w && w.slice(), !w)
return [v, v];
if (P && O && O.length) {
for (N = 0; N < P.length; N++)
if (P[N] === O[0]) {
var b = N;
break;
} else if (P[0] === O[O.length - P.length + N]) {
b = N;
var M = !0;
break;
} else if (P[P.length - 1] === O[O.length - P.length + N]) {
b = P.length - N;
break;
}
typeof b > "u" && (w = []);
}
if (w.length && $(b)) {
var x = v.length + b * C;
M ? (u(w, v), d(v, w)) : (u(v, w), d(w, v));
}
return [w, v];
}, W.prototype.fillSetter = function() {
W.prototype.strokeSetter.apply(this, arguments);
}, W.prototype.strokeSetter = function() {
this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
}, W.timers = [], W;
}();
}), E(h, "Core/Animation/AnimationUtilities.js", [h["Core/Animation/Fx.js"], h["Core/Utilities.js"]], function(y, R) {
function I(d) {
return N(d) ? w({ duration: 500, defer: 0 }, d) : { duration: d ? 500 : 0, defer: 0 };
}
function Z(d, P) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== d || P && P !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var H = R.defined, $ = R.getStyle, U = R.isArray, W = R.isNumber, N = R.isObject, w = R.merge, v = R.objectEach, u = R.pick;
return { animate: function(d, P, O) {
var B, C = "", b, M;
if (!N(O)) {
var x = arguments;
O = { duration: x[2], easing: x[3], complete: x[4] };
}
W(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(P), v(P, function(a, c) {
Z(d, c), M = new y(d, O, c), b = void 0, c === "d" && U(P.d) ? (M.paths = M.initPath(d, d.pathArray, P.d), M.toD = P.d, B = 0, b = 1) : d.attr ? B = d.attr(c) : (B = parseFloat($(d, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), M.run(B, b, C);
});
}, animObject: I, getDeferredAnimation: function(d, P, O) {
var B = I(P), C = 0, b = 0;
return (O ? [O] : d.series).forEach(function(M) {
M = I(M.options.animation), C = P && H(P.defer) ? B.defer : Math.max(C, M.duration + M.defer), b = Math.min(B.duration, M.duration);
}), d.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
}, setAnimation: function(d, P) {
P.renderer.globalAnimation = u(d, P.options.chart.animation, !0);
}, stop: Z };
}), E(h, "Core/Renderer/HTML/AST.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = y.SVG_NS, Z = R.attr, H = R.createElement, $ = R.error, U = R.isFunction, W = R.isString, N = R.objectEach, w = R.splat, v = (R = y.win.trustedTypes) && U(R.createPolicy) && R.createPolicy("highcharts", { createHTML: function(P) {
return P;
} }), u = v ? v.createHTML("") : "";
try {
var d = !!new DOMParser().parseFromString(u, "text/html");
} catch {
d = !1;
}
return U = function() {
function P(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return P.filterUserAttributes = function(O) {
return N(O, function(B, C) {
var b = !0;
P.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = W(B) && P.allowedReferences.some(function(M) {
return B.indexOf(M) === 0;
})), b || ($("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
}), O;
}, P.setElementHTML = function(O, B) {
O.innerHTML = P.emptyHTML, B && new P(B).addToDOM(O);
}, P.prototype.addToDOM = function(O) {
function B(C, b) {
var M;
return w(C).forEach(function(x) {
var a = x.tagName, c = x.textContent ? y.doc.createTextNode(x.textContent) : void 0;
if (a)
if (a === "#text")
var p = c;
else if (P.allowedTags.indexOf(a) !== -1) {
a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
var i = x.attributes || {};
N(x, function(l, s) {
s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = l);
}), Z(a, P.filterUserAttributes(i)), c && a.appendChild(c), B(x.children || [], a), p = a;
} else
$("Highcharts warning: Invalid tagName " + a + " in config");
p && b.appendChild(p), M = p;
}), M;
}
return B(this.nodes, O);
}, P.prototype.parseMarkup = function(O) {
var B = [];
if (O = O.trim(), d)
O = new DOMParser().parseFromString(v ? v.createHTML(O) : O, "text/html");
else {
var C = H("div");
C.innerHTML = O, O = { body: C };
}
var b = function(M, x) {
var a = M.nodeName.toLowerCase(), c = { tagName: a };
if (a === "#text" && (c.textContent = M.textContent || ""), a = M.attributes) {
var p = {};
[].forEach.call(a, function(l) {
p[l.name] = l.value;
}), c.attributes = p;
}
if (M.childNodes.length) {
var i = [];
[].forEach.call(M.childNodes, function(l) {
b(l, i);
}), i.length && (c.children = i);
}
x.push(c);
};
return [].forEach.call(O.body.childNodes, function(M) {
return b(M, B);
}), B;
}, P.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), P.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), P.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), P.emptyHTML = u, P;
}(), U;
}), E(
h,
"Core/FormatUtilities.js",
[h["Core/DefaultOptions.js"], h["Core/Utilities.js"]],
function(y, R) {
function I(w, v, u, d) {
w = +w || 0, v = +v;
var P = Z.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, B = w.toString().split("e"), C = v;
if (v === -1)
v = Math.min(O, 20);
else if (!U(v))
v = 2;
else if (v && B[1] && 0 > B[1]) {
var b = v + +B[1];
0 <= b ? (B[0] = (+B[0]).toExponential(b).split("e")[0], v = b) : (B[0] = B[0].split(".")[0] || 0, w = 20 > v ? (B[0] * Math.pow(10, B[1])).toFixed(v) : 0, B[1] = 0);
}
b = (Math.abs(B[1] ? B[0] : w) + Math.pow(10, -Math.max(v, O) - 1)).toFixed(v), O = String(N(b));
var M = 3 < O.length ? O.length % 3 : 0;
return u = W(u, P.decimalPoint), d = W(d, P.thousandsSep), w = (0 > w ? "-" : "") + (M ? O.substr(0, M) + d : ""), w = 0 > +B[1] && !C ? "0" : w + O.substr(M).replace(/(\d{3})(?=\d)/g, "$1" + d), v && (w += u + b.slice(-v)), B[1] && +w != 0 && (w += "e" + B[1]), w;
}
var Z = y.defaultOptions, H = y.defaultTime, $ = R.getNestedProperty, U = R.isNumber, W = R.pick, N = R.pInt;
return { dateFormat: function(w, v, u) {
return H.dateFormat(w, v, u);
}, format: function(w, v, u) {
var d = "{", P = !1, O = /f$/, B = /\.([0-9])/, C = Z.lang, b = u && u.time || H;
u = u && u.numberFormatter || I;
for (var M = []; w; ) {
var x = w.indexOf(d);
if (x === -1)
break;
var a = w.slice(0, x);
if (P) {
if (a = a.split(":"), d = $(a.shift() || "", v), a.length && typeof d == "number")
if (a = a.join(":"), O.test(a)) {
var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
d !== null && (d = u(d, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
} else
d = b.dateFormat(a, d);
M.push(d);
} else
M.push(a);
w = w.slice(x + 1), d = (P = !P) ? "}" : "{";
}
return M.push(w), M.join("");
}, numberFormat: I };
}
), E(h, "Core/Renderer/RendererUtilities.js", [h["Core/Utilities.js"]], function(y) {
var R = y.clamp, I = y.pick, Z = y.stableSort, H;
return function($) {
function U(W, N, w) {
var v = W, u = v.reducedLen || N, d = function(M, x) {
return (x.rank || 0) - (M.rank || 0);
}, P = function(M, x) {
return M.target - x.target;
}, O, B = !0, C = [], b = 0;
for (O = W.length; O--; )
b += W[O].size;
if (b > u) {
for (Z(W, d), b = O = 0; b <= u; )
b += W[O].size, O++;
C = W.splice(O - 1, W.length);
}
for (Z(W, P), W = W.map(function(M) {
return { size: M.size, targets: [M.target], align: I(M.align, 0.5) };
}); B; ) {
for (O = W.length; O--; )
u = W[O], d = (Math.min.apply(0, u.targets) + Math.max.apply(0, u.targets)) / 2, u.pos = R(
d - u.size * u.align,
0,
N - u.size
);
for (O = W.length, B = !1; O--; )
0 < O && W[O - 1].pos + W[O - 1].size > W[O].pos && (W[O - 1].size += W[O].size, W[O - 1].targets = W[O - 1].targets.concat(W[O].targets), W[O - 1].align = 0.5, W[O - 1].pos + W[O - 1].size > N && (W[O - 1].pos = N - W[O - 1].size), W.splice(O, 1), B = !0);
}
return v.push.apply(v, C), O = 0, W.some(function(M) {
var x = 0;
return (M.targets || []).some(function() {
return v[O].pos = M.pos + x, typeof w < "u" && Math.abs(v[O].pos - v[O].target) > w ? (v.slice(0, O + 1).forEach(function(a) {
return delete a.pos;
}), v.reducedLen = (v.reducedLen || N) - 0.1 * N, v.reducedLen > 0.1 * N && U(v, N, w), !0) : (x += v[O].size, O++, !1);
});
}), Z(v, P), v;
}
$.distribute = U;
}(H || (H = {})), H;
}), E(h, "Core/Renderer/SVG/SVGElement.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H) {
var $ = y.animate, U = y.animObject, W = y.stop, N = Z.deg2rad, w = Z.doc, v = Z.noop, u = Z.svg, d = Z.SVG_NS, P = Z.win, O = H.addEvent, B = H.attr, C = H.createElement, b = H.css, M = H.defined, x = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, l = H.isNumber, s = H.isString, t = H.merge, n = H.objectEach, o = H.pick, A = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
return y = function() {
function j() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = d, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return j.prototype._defaultGetter = function(T) {
return T = o(this[T + "Value"], this[T], this.element ? this.element.getAttribute(T) : null, 0), /^[\-0-9\.]+$/.test(T) && (T = parseFloat(T)), T;
}, j.prototype._defaultSetter = function(T, X, f) {
f.setAttribute(X, T);
}, j.prototype.add = function(T) {
var X = this.renderer, f = this.element;
if (T && (this.parentGroup = T), this.parentInverted = T && T.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !T || T.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (T ? T.element : X.box).appendChild(f), this.onAdd && this.onAdd(), this;
}, j.prototype.addClass = function(T, X) {
var f = X ? "" : this.attr("class") || "";
return T = (T || "").split(/ /g).reduce(function(m, L) {
return f.indexOf(L) === -1 && m.push(L), m;
}, f ? [f] : []).join(" "), T !== f && this.attr("class", T), this;
}, j.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, j.prototype.align = function(T, X, f) {
var m = {}, L = this.renderer, Y = L.alignedObjects, F, Q, k;
T ? (this.alignOptions = T, this.alignByTranslate = X, (!f || s(f)) && (this.alignTo = F = f || "renderer", x(Y, this), Y.push(this), f = void 0)) : (T = this.alignOptions, X = this.alignByTranslate, F = this.alignTo), f = o(f, L[F], F === "scrollablePlotBox" ? L.plotBox : void 0, L), F = T.align;
var G = T.verticalAlign;
return L = (f.x || 0) + (T.x || 0), Y = (f.y || 0) + (T.y || 0), F === "right" ? Q = 1 : F === "center" && (Q = 2), Q && (L += (f.width - (T.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (f.height - (T.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, j.prototype.alignSetter = function(T) {
var X = { left: "start", center: "middle", right: "end" };
X[T] && (this.alignValue = T, this.element.setAttribute(
"text-anchor",
X[T]
));
}, j.prototype.animate = function(T, X, f) {
var m = this, L = U(o(X, this.renderer.globalAnimation, !0));
return X = L.defer, o(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (f && (L.complete = f), _(function() {
m.element && $(m, T, L);
}, X)) : (this.attr(T, void 0, f), n(T, function(Y, F) {
L.step && L.step.call(this, Y, { prop: F, pos: 1, elem: this });
}, this)), this;
}, j.prototype.applyTextOutline = function(T) {
var X = this.element;
T.indexOf("contrast") !== -1 && (T = T.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var f = T.split(" ");
if (T = f[f.length - 1], (f = f[0]) && f !== "none" && Z.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, f = f.replace(/(^[\d\.]+)(.*?)$/g, function(Y, F, Q) {
return 2 * Number(F) + Q;
}), this.removeTextOutline();
var m = w.createElementNS(d, "tspan");
B(m, { class: "highcharts-text-outline", fill: T, stroke: T, "stroke-width": f, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
var F = Y.cloneNode(!0);
F.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return F.removeAttribute(Q);
}), m.appendChild(F);
});
var L = w.createElementNS(d, "tspan");
L.textContent = "", ["x", "y"].forEach(function(Y) {
var F = X.getAttribute(Y);
F && L.setAttribute(Y, F);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, j.prototype.attr = function(T, X, f, m) {
var L = this.element, Y = this.symbolCustomAttribs, F, Q = this, k, G;
if (typeof T == "string" && typeof X < "u") {
var z = T;
T = {}, T[z] = X;
}
return typeof T == "string" ? Q = (this[T + "Getter"] || this._defaultGetter).call(this, T, L) : (n(T, function(V, q) {
k = !1, m || W(this, q), this.symbolName && Y.indexOf(q) !== -1 && (F || (this.symbolAttr(T), F = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, V, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, V, G));
}, this), this.afterSetters()), f && f.call(this), Q;
}, j.prototype.clip = function(T) {
return this.attr("clip-path", T ? "url(" + this.renderer.url + "#" + T.id + ")" : "none");
}, j.prototype.crisp = function(T, X) {
X = X || T.strokeWidth || 0;
var f = Math.round(X) % 2 / 2;
return T.x = Math.floor(T.x || this.x || 0) + f, T.y = Math.floor(T.y || this.y || 0) + f, T.width = Math.floor((T.width || this.width || 0) - 2 * f), T.height = Math.floor((T.height || this.height || 0) - 2 * f), M(T.strokeWidth) && (T.strokeWidth = X), T;
}, j.prototype.complexColor = function(T, X, f) {
var m = this.renderer, L, Y, F, Q, k, G, z, V, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (T.radialGradient ? Y = "radialGradient" : T.linearGradient && (Y = "linearGradient"), Y) {
if (F = T[Y], k = m.gradients, G = T.stops, q = f.radialReference, p(F) && (T[Y] = F = { x1: F[0], y1: F[1], x2: F[2], y2: F[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !M(F.gradientUnits) && (Q = F, F = t(F, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), n(F, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), n(G, function(ct) {
et.push(ct);
}), et = et.join(","), k[et])
it = k[et].attr("id");
else {
F.id = it = D();
var rt = k[et] = m.createElement(Y).attr(F).add(m.defs);
rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), V = L.get("a")) : (z = ct[1], V = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": z,
"stop-opacity": V
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", f.setAttribute(X, nt), f.gradient = et, T.toString = function() {
return nt;
};
}
});
}, j.prototype.css = function(T) {
var X = this.styles, f = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", F = !X;
if (T && T.color && (T.fill = T.color), X && n(T, function(G, z) {
X && X[z] !== G && (f[z] = G, F = !0);
}), F) {
if (X && (T = a(X, f)), T) {
if (T.width === null || T.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && T.width)
var Q = this.textWidth = A(T.width);
}
if (this.styles = T, Q && !u && this.renderer.forExport && delete T.width, m.namespaceURI === this.SVG_NS) {
var k = function(G, z) {
return "-" + z.toLowerCase();
};
n(T, function(G, z) {
L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
}), Y && B(m, "style", Y);
} else
b(m, T);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), T && T.textOutline && this.applyTextOutline(T.textOutline));
}
return this;
}, j.prototype.dashstyleSetter = function(T) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), T = T && T.toLowerCase()) {
var f = T.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
for (T = f.length; T--; )
f[T] = "" + A(f[T]) * o(X, NaN);
T = f.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", T);
}
}, j.prototype.destroy = function() {
var T = this, X = T.element || {}, f = T.renderer, m = X.ownerSVGElement, L = f.isSVG && X.nodeName === "SPAN" && T.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, W(T), T.clipPath && m) {
var Y = T.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(F) {
-1 < F.getAttribute("clip-path").indexOf(Y.element.id) && F.removeAttribute("clip-path");
}), T.clipPath = Y.destroy();
}
if (T.stops) {
for (m = 0; m < T.stops.length; m++)
T.stops[m].destroy();
T.stops.length = 0, T.stops = void 0;
}
for (T.safeRemoveChild(X), f.styledMode || T.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, T.safeRemoveChild(L.div), delete L.div, L = X;
T.alignTo && x(f.alignedObjects, T), n(T, function(F, Q) {
T[Q] && T[Q].parentGroup === T && T[Q].destroy && T[Q].destroy(), delete T[Q];
});
}, j.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(T) {
this.safeRemoveChild(T);
}, this), this.shadows = void 0;
}, j.prototype.destroyTextPath = function(T, X) {
var f = T.getElementsByTagName("text")[0];
if (f) {
if (f.removeAttribute("dx"), f.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && f.getElementsByTagName("textPath").length) {
for (T = this.textPathWrapper.element.childNodes; T.length; )
f.appendChild(T[0]);
f.removeChild(this.textPathWrapper.element);
}
} else
(T.getAttribute("dx") || T.getAttribute("dy")) && (T.removeAttribute("dx"), T.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, j.prototype.dSetter = function(T, X, f) {
p(T) && (typeof T[0] == "string" && (T = this.renderer.pathToSegments(T)), this.pathArray = T, T = T.reduce(function(m, L, Y) {
return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(T) && (T = "M 0 0"), this[X] !== T && (f.setAttribute(X, T), this[X] = T);
}, j.prototype.fadeOut = function(T) {
var X = this;
X.animate({ opacity: 0 }, { duration: o(T, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, j.prototype.fillSetter = function(T, X, f) {
typeof T == "string" ? f.setAttribute(X, T) : T && this.complexColor(T, X, f);
}, j.prototype.getBBox = function(T, X) {
var f = this.renderer, m = this.element, L = this.styles, Y = this.textStr, F = f.cache, Q = f.cacheKeys, k = m.namespaceURI === this.SVG_NS;
X = o(X, this.rotation, 0);
var G = f.styledMode ? m && j.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
if (M(Y)) {
var V = Y.toString();
V.indexOf("<") === -1 && (V = V.replace(/[0-9]/g, "0")), V += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if (V && !T && (z = F[V]), !z) {
if (k || f.forExport) {
try {
var q = this.fakeTS && function(it) {
var et = m.querySelector(".highcharts-text-outline");
et && b(et, { display: it });
};
i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!z || 0 > z.width) && (z = {
width: 0,
height: 0
});
} else
z = this.htmlGetBBox();
if (f.isSVG && (T = z.width, f = z.height, k && (z.height = f = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(f)] || f), X && (k = X * N, z.width = Math.abs(f * Math.sin(k)) + Math.abs(T * Math.cos(k)), z.height = Math.abs(f * Math.cos(k)) + Math.abs(T * Math.sin(k)))), V && (Y === "" || 0 < z.height)) {
for (; 250 < Q.length; )
delete F[Q.shift()];
F[V] || Q.push(V), F[V] = z;
}
}
return z;
}, j.prototype.getStyle = function(T) {
return P.getComputedStyle(this.element || this, "").getPropertyValue(T);
}, j.prototype.hasClass = function(T) {
return ("" + this.attr("class")).split(" ").indexOf(T) !== -1;
}, j.prototype.hide = function(T) {
return T ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, j.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, j.prototype.init = function(T, X) {
this.element = X === "span" ? C(X) : w.createElementNS(this.SVG_NS, X), this.renderer = T, c(this, "afterInit");
}, j.prototype.invert = function(T) {
return this.inverted = T, this.updateTransform(), this;
}, j.prototype.on = function(T, X) {
var f = this.onEvents;
return f[T] && f[T](), f[T] = O(
this.element,
T,
X
), this;
}, j.prototype.opacitySetter = function(T, X, f) {
this.opacity = T = Number(Number(T).toFixed(3)), f.setAttribute(X, T);
}, j.prototype.removeClass = function(T) {
return this.attr("class", ("" + this.attr("class")).replace(s(T) ? new RegExp("(^| )" + T + "( |$)") : T, " ").replace(/ +/g, " ").trim());
}, j.prototype.removeTextOutline = function() {
var T = this.element.querySelector("tspan.highcharts-text-outline");
T && this.safeRemoveChild(T);
}, j.prototype.safeRemoveChild = function(T) {
var X = T.parentNode;
X && X.removeChild(T);
}, j.prototype.setRadialReference = function(T) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = T, X && X.radAttr && X.animate(this.renderer.getRadialAttr(T, X.radAttr)), this;
}, j.prototype.setTextPath = function(T, X) {
var f = this.element, m = this.text ? this.text.element : f, L = { textAnchor: "text-anchor" }, Y = !1, F = this.textPathWrapper, Q = !F;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var k = R.filterUserAttributes(X.attributes);
if (T && X && X.enabled) {
F && F.element.parentNode === null ? (Q = !0, F = F.destroy()) : F && this.removeTextOutline.call(F.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), F || (this.textPathWrapper = F = this.renderer.createElement("textPath"), Y = !0);
var G = F.element;
if ((X = T.element.getAttribute("id")) || T.element.setAttribute("id", X = D()), Q)
for (m.setAttribute("y", 0), l(k.dx) && m.setAttribute("x", -k.dx), T = [].slice.call(m.childNodes), Q = 0; Q < T.length; Q++) {
var z = T[Q];
z.nodeType !== P.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
}
Y && F && F.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), M(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), M(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), n(k, function(V, q) {
G.setAttribute(L[q] || q, V);
}), f.removeAttribute("transform"), this.removeTextOutline.call(F), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = v;
} else
F && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(f, T), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, j.prototype.shadow = function(T, X, f) {
var m = [], L = this.element, Y = this.oldShadowOptions, F = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
if (T === !0 ? k = F : typeof T == "object" && (k = a(F, T)), k && (k && Y && n(k, function(it, et) {
it !== Y[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
this.destroyShadows();
else if (!this.shadows) {
var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
for (F = 1; F <= k.width; F++) {
var V = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * F;
B(V, { stroke: T.color || "#000000", "stroke-opacity": G * F, "stroke-width": q, transform: z, fill: "none" }), V.setAttribute("class", (V.getAttribute("class") || "") + " highcharts-shadow"), f && (B(V, "height", Math.max(B(V, "height") - q, 0)), V.cutHeight = q), X ? X.element.appendChild(V) : L.parentNode && L.parentNode.insertBefore(V, L), m.push(V);
}
this.shadows = m;
}
return this;
}, j.prototype.show = function(T) {
return this.attr({ visibility: T ? "inherit" : "visible" });
}, j.prototype.strokeSetter = function(T, X, f) {
this[X] = T, this.stroke && this["stroke-width"] ? (j.prototype.fillSetter.call(this, this.stroke, "stroke", f), f.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && T === 0 && this.hasStroke ? (f.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (f.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
}, j.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var T = this.getStyle("stroke-width"), X = 0;
if (T.indexOf("px") === T.length - 2)
X = A(T);
else if (T !== "") {
var f = w.createElementNS(d, "rect");
B(f, { width: T, "stroke-width": 0 }), this.element.parentNode.appendChild(f), X = f.getBBox().width, f.parentNode.removeChild(f);
}
return X;
}, j.prototype.symbolAttr = function(T) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(f) {
X[f] = o(T[f], X[f]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, j.prototype.textSetter = function(T) {
T !== this.textStr && (delete this.textPxLength, this.textStr = T, this.added && this.renderer.buildText(this));
}, j.prototype.titleSetter = function(T) {
var X = this.element, f = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(f, X.firstChild) : X.appendChild(f), f.textContent = String(o(T, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, j.prototype.toFront = function() {
var T = this.element;
return T.parentNode.appendChild(T), this;
}, j.prototype.translate = function(T, X) {
return this.attr({ translateX: T, translateY: X });
}, j.prototype.updateShadows = function(T, X, f) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
f.call(m[L], T === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : T === "d" ? this.d : X, T, m[L]);
}, j.prototype.updateTransform = function() {
var T = this.scaleX, X = this.scaleY, f = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, F = this.translateX || 0, Q = this.translateY || 0;
f && (F += this.width, Q += this.height), F = ["translate(" + F + "," + Q + ")"], M(L) && F.push("matrix(" + L.join(",") + ")"), f ? F.push("rotate(90) scale(-1,1)") : m && F.push("rotate(" + m + " " + o(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + o(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (M(T) || M(X)) && F.push("scale(" + o(T, 1) + " " + o(X, 1) + ")"), F.length && Y.setAttribute("transform", F.join(" "));
}, j.prototype.visibilitySetter = function(T, X, f) {
T === "inherit" ? f.removeAttribute(X) : this[X] !== T && f.setAttribute(
X,
T
), this[X] = T;
}, j.prototype.xGetter = function(T) {
return this.element.nodeName === "circle" && (T === "x" ? T = "cx" : T === "y" && (T = "cy")), this._defaultGetter(T);
}, j.prototype.zIndexSetter = function(T, X) {
var f = this.renderer, m = this.parentGroup, L = (m || f).element || f.box, Y = this.element;
f = L === f.box;
var F = !1, Q = this.added, k;
if (M(T) ? (Y.setAttribute("data-z-index", T), T = +T, this[X] === T && (Q = !1)) : M(this[X]) && Y.removeAttribute("data-z-index"), this[X] = T, Q) {
for ((T = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !F; k--) {
m = X[k], Q = m.getAttribute("data-z-index");
var G = !M(Q);
m !== Y && (0 > T && G && !f && !k ? (L.insertBefore(Y, X[k]), F = !0) : (A(Q) <= T || G && (!M(T) || 0 <= T)) && (L.insertBefore(Y, X[k + 1] || null), F = !0));
}
F || (L.insertBefore(Y, X[f ? 3 : 0] || null), F = !0);
}
return F;
}, j;
}(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(j, T) {
this[T] = j, this.doTransform = !0;
}, y;
}), E(h, "Core/Renderer/RendererRegistry.js", [h["Core/Globals.js"]], function(y) {
var R;
return function(I) {
I.rendererTypes = {};
var Z;
I.getRendererType = function(H) {
return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
}, I.registerRendererType = function(H, $, U) {
I.rendererTypes[H] = $, (!Z || U) && (Z = H, y.Renderer = $);
};
}(R || (R = {})), R;
}), E(
h,
"Core/Renderer/SVG/SVGLabel.js",
[h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]],
function(y, R) {
var I = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), Z = R.defined, H = R.extend, $ = R.isNumber, U = R.merge, W = R.pick, N = R.removeEvent;
return function(w) {
function v(u, d, P, O, B, C, b, M, x, a) {
var c = w.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(u, "g"), c.textStr = d, c.x = P, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = x, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = u.text(void 0, 0, 0, M).attr({ zIndex: 1 });
var p;
return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = v.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = u.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return I(v, w), v.prototype.alignSetter = function(u) {
u = { left: 0, center: 0.5, right: 1 }[u], u !== this.alignFactor && (this.alignFactor = u, this.bBox && $(this.xSetting) && this.attr({ x: this.xSetting }));
}, v.prototype.anchorXSetter = function(u, d) {
this.anchorX = u, this.boxAttr(d, Math.round(u) - this.getCrispAdjust() - this.xSetting);
}, v.prototype.anchorYSetter = function(u, d) {
this.anchorY = u, this.boxAttr(d, u - this.ySetting);
}, v.prototype.boxAttr = function(u, d) {
this.box ? this.box.attr(u, d) : this.deferredAttr[u] = d;
}, v.prototype.css = function(u) {
if (u) {
var d = {};
u = U(u), v.textProps.forEach(function(O) {
typeof u[O] < "u" && (d[O] = u[O], delete u[O]);
}), this.text.css(d);
var P = "width" in d;
"fontSize" in d || "fontWeight" in d ? this.updateTextPadding() : P && this.updateBoxSize();
}
return y.prototype.css.call(this, u);
}, v.prototype.destroy = function() {
N(this.element, "mouseenter"), N(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, v.prototype.fillSetter = function(u, d) {
u && (this.needsBox = !0), this.fill = u, this.boxAttr(d, u);
}, v.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var u = this.padding, d = W(this.paddingLeft, u);
return { width: this.width, height: this.height, x: this.bBox.x - d, y: this.bBox.y - u };
}, v.prototype.getCrispAdjust = function() {
return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
this["stroke-width"],
10
) : 0) % 2 / 2;
}, v.prototype.heightSetter = function(u) {
this.heightSetting = u;
}, v.prototype.onAdd = function() {
var u = this.textStr;
this.text.add(this), this.attr({ text: Z(u) ? u : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, v.prototype.paddingSetter = function(u, d) {
$(u) ? u !== this[d] && (this[d] = u, this.updateTextPadding()) : this[d] = void 0;
}, v.prototype.rSetter = function(u, d) {
this.boxAttr(d, u);
}, v.prototype.shadow = function(u) {
return u && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(u)), this;
}, v.prototype.strokeSetter = function(u, d) {
this.stroke = u, this.boxAttr(d, u);
}, v.prototype["stroke-widthSetter"] = function(u, d) {
u && (this.needsBox = !0), this["stroke-width"] = u, this.boxAttr(d, u);
}, v.prototype["text-alignSetter"] = function(u) {
this.textAlign = u;
}, v.prototype.textSetter = function(u) {
typeof u < "u" && this.text.attr({ text: u }), this.updateTextPadding();
}, v.prototype.updateBoxSize = function() {
var u = this.text.element.style, d = {}, P = this.padding, O = this.bBox = $(this.widthSetting) && $(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? v.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * P, u = this.renderer.fontMetrics(u && u.fontSize, this.text), this.baselineOffset = P + Math.min((this.text.firstLineMetrics || u).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - u.h) / 2), this.needsBox && (this.box || (P = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), P.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), P.add(this)), P = this.getCrispAdjust(), d.x = P, d.y = (this.baseline ? -this.baselineOffset : 0) + P, d.width = Math.round(this.width), d.height = Math.round(this.height), this.box.attr(H(d, this.deferredAttr)), this.deferredAttr = {});
}, v.prototype.updateTextPadding = function() {
var u = this.text;
this.updateBoxSize();
var d = this.baseline ? 0 : this.baselineOffset, P = W(this.paddingLeft, this.padding);
Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (P += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (P !== u.x || d !== u.y) && (u.attr("x", P), u.hasBoxWidthChanged && (this.bBox = u.getBBox(!0)), typeof d < "u" && u.attr("y", d)), u.x = P, u.y = d;
}, v.prototype.widthSetter = function(u) {
this.widthSetting = $(u) ? u : void 0;
}, v.prototype.getPaddedWidth = function() {
var u = this.padding, d = W(this.paddingLeft, u);
return u = W(this.paddingRight, u), (this.widthSetting || this.bBox.width || 0) + d + u;
}, v.prototype.xSetter = function(u) {
this.x = u, this.alignFactor && (u -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(u), this.attr("translateX", this.xSetting);
}, v.prototype.ySetter = function(u) {
this.ySetting = this.y = Math.round(u), this.attr("translateY", this.ySetting);
}, v.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, v.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), v;
}(y);
}
), E(
h,
"Core/Renderer/SVG/Symbols.js",
[h["Core/Utilities.js"]],
function(y) {
function R(W, N, w, v, u) {
var d = [];
if (u) {
var P = u.start || 0, O = U(u.r, w);
w = U(u.r, v || w);
var B = (u.end || 0) - 1e-3;
v = u.innerR;
var C = U(u.open, 1e-3 > Math.abs((u.end || 0) - P - 2 * Math.PI)), b = Math.cos(P), M = Math.sin(P), x = Math.cos(B), a = Math.sin(B);
P = U(u.longArc, 1e-3 > B - P - Math.PI ? 0 : 1), d.push(["M", W + O * b, N + w * M], ["A", O, w, 0, P, U(u.clockwise, 1), W + O * x, N + w * a]), H(v) && d.push(C ? ["M", W + v * x, N + v * a] : ["L", W + v * x, N + v * a], ["A", v, v, 0, P, H(u.clockwise) ? 1 - u.clockwise : 0, W + v * b, N + v * M]), C || d.push(["Z"]);
}
return d;
}
function I(W, N, w, v, u) {
return u && u.r ? Z(W, N, w, v, u) : [["M", W, N], ["L", W + w, N], ["L", W + w, N + v], ["L", W, N + v], ["Z"]];
}
function Z(W, N, w, v, u) {
return u = u && u.r || 0, [["M", W + u, N], ["L", W + w - u, N], ["C", W + w, N, W + w, N, W + w, N + u], ["L", W + w, N + v - u], ["C", W + w, N + v, W + w, N + v, W + w - u, N + v], ["L", W + u, N + v], ["C", W, N + v, W, N + v, W, N + v - u], ["L", W, N + u], ["C", W, N, W, N, W + u, N]];
}
var H = y.defined, $ = y.isNumber, U = y.pick;
return { arc: R, callout: function(W, N, w, v, u) {
var d = Math.min(u && u.r || 0, w, v), P = d + 6, O = u && u.anchorX;
u = u && u.anchorY || 0;
var B = Z(W, N, w, v, { r: d });
return $(O) && (W + O >= w ? u > N + P && u < N + v - P ? B.splice(3, 1, ["L", W + w, u - 6], ["L", W + w + 6, u], ["L", W + w, u + 6], ["L", W + w, N + v - d]) : B.splice(3, 1, ["L", W + w, v / 2], ["L", O, u], ["L", W + w, v / 2], ["L", W + w, N + v - d]) : 0 >= W + O ? u > N + P && u < N + v - P ? B.splice(7, 1, ["L", W, u + 6], ["L", W - 6, u], ["L", W, u - 6], ["L", W, N + d]) : B.splice(7, 1, ["L", W, v / 2], ["L", O, u], ["L", W, v / 2], ["L", W, N + d]) : u && u > v && O > W + P && O < W + w - P ? B.splice(5, 1, ["L", O + 6, N + v], ["L", O, N + v + 6], ["L", O - 6, N + v], ["L", W + d, N + v]) : u && 0 > u && O > W + P && O < W + w - P && B.splice(1, 1, ["L", O - 6, N], ["L", O, N - 6], ["L", O + 6, N], ["L", w - d, N])), B;
}, circle: function(W, N, w, v) {
return R(W + w / 2, N + v / 2, w / 2, v / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(W, N, w, v) {
return [["M", W + w / 2, N], ["L", W + w, N + v / 2], ["L", W + w / 2, N + v], ["L", W, N + v / 2], ["Z"]];
}, rect: I, roundedRect: Z, square: I, triangle: function(W, N, w, v) {
return [["M", W + w / 2, N], ["L", W + w, N + v], ["L", W, N + v], ["Z"]];
}, "triangle-down": function(W, N, w, v) {
return [["M", W, N], ["L", W + w, N], ["L", W + w / 2, N + v], ["Z"]];
} };
}
), E(h, "Core/Renderer/SVG/TextBuilder.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = R.doc, H = R.SVG_NS, $ = R.win, U = I.attr, W = I.isString, N = I.objectEach, w = I.pick;
return function() {
function v(u) {
var d = u.styles;
this.renderer = u.renderer, this.svgElement = u, this.width = u.textWidth, this.textLineHeight = d && d.lineHeight, this.textOutline = d && d.textOutline, this.ellipsis = !(!d || d.textOverflow !== "ellipsis"), this.noWrap = !(!d || d.whiteSpace !== "nowrap"), this.fontSize = d && d.fontSize;
}
return v.prototype.buildSVG = function() {
var u = this.svgElement, d = u.element, P = u.renderer, O = w(u.textStr, "").toString(), B = O.indexOf("<") !== -1, C = d.childNodes;
P = this.width && !u.added && P.box;
var b = //g, M = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (M !== u.textCache) {
for (u.textCache = M, delete u.actualWidth, M = C.length; M--; )
d.removeChild(C[M]);
B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (P && P.appendChild(d), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(u.element), this.modifyDOM(), this.ellipsis && (d.textContent || "").indexOf("…") !== -1 && u.attr(
"title",
this.unescapeEntities(u.textStr || "", ["<", ">"])
), P && P.removeChild(d)) : d.appendChild(Z.createTextNode(this.unescapeEntities(O))), W(this.textOutline) && u.applyTextOutline && u.applyTextOutline(this.textOutline);
}
}, v.prototype.modifyDOM = function() {
var u = this, d = this.svgElement, P = U(d.element, "x");
d.firstLineMetrics = void 0;
for (var O; (O = d.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
d.element.removeChild(O);
[].forEach.call(d.element.querySelectorAll("tspan.highcharts-br"), function(M, x) {
M.nextSibling && M.previousSibling && (x === 0 && M.previousSibling.nodeType === 1 && (d.firstLineMetrics = d.renderer.fontMetrics(void 0, M.previousSibling)), U(M, { dy: u.getLineHeight(M.nextSibling), x: P }));
});
var B = this.width || 0;
if (B) {
var C = function(M, x) {
var a = M.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !u.noWrap && (1 < c.length || 1 < d.element.childNodes.length), i = u.getLineHeight(x), l = 0, s = d.actualWidth;
if (u.ellipsis)
a && u.truncate(M, a, void 0, 0, Math.max(0, B - parseInt(u.fontSize || 12, 10)), function(t, n) {
return t.substring(
0,
n
) + "…";
});
else if (p) {
for (a = [], p = []; x.firstChild && x.firstChild !== M; )
p.push(x.firstChild), x.removeChild(x.firstChild);
for (; c.length; )
c.length && !u.noWrap && 0 < l && (a.push(M.textContent || ""), M.textContent = c.join(" ").replace(/- /g, "-")), u.truncate(M, void 0, c, l === 0 && s || 0, B, function(t, n) {
return c.slice(0, n).join(" ").replace(/- /g, "-");
}), s = d.actualWidth, l++;
p.forEach(function(t) {
x.insertBefore(t, M);
}), a.forEach(function(t) {
x.insertBefore(Z.createTextNode(t), M), t = Z.createElementNS(H, "tspan"), t.textContent = "", U(t, { dy: i, x: P }), x.insertBefore(t, M);
});
}
}, b = function(M) {
[].slice.call(M.childNodes).forEach(function(x) {
x.nodeType === $.Node.TEXT_NODE ? C(x, M) : (x.className.baseVal.indexOf("highcharts-br") !== -1 && (d.actualWidth = 0), b(x));
});
};
b(d.element);
}
}, v.prototype.getLineHeight = function(u) {
var d;
return u = u.nodeType === $.Node.TEXT_NODE ? u.parentElement : u, this.renderer.styledMode || (d = u && /(px|em)$/.test(u.style.fontSize) ? u.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(d, u || this.svgElement.element).h;
}, v.prototype.modifyTree = function(u) {
var d = this, P = function(O, B) {
var C = O.attributes;
C = C === void 0 ? {} : C;
var b = O.children, M = O.tagName, x = d.renderer.styledMode;
M === "b" || M === "strong" ? x ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (M === "i" || M === "em") && (x ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), W(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), M === "br" ? (C.class = "highcharts-br", O.textContent = "", (B = u[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : M === "a" && b && b.some(function(a) {
return a.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), M !== "#text" && M !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
return a.tagName !== "#text";
}).forEach(P);
};
u.forEach(P);
}, v.prototype.truncate = function(u, d, P, O, B, C) {
var b = this.svgElement, M = b.renderer, x = b.rotation, a = [], c = P ? 1 : 0, p = (d || P || "").length, i = p, l, s = function(n, o) {
o = o || n;
var A = u.parentNode;
if (A && typeof a[o] > "u")
if (A.getSubStringLength)
try {
a[o] = O + A.getSubStringLength(0, P ? o + 1 : o);
} catch {
}
else
M.getSpanWidth && (u.textContent = C(d || P, n), a[o] = O + M.getSpanWidth(b, u));
return a[o];
};
b.rotation = 0;
var t = s(u.textContent.length);
if (O + t > B) {
for (; c <= p; )
i = Math.ceil((c + p) / 2), P && (l = C(P, i)), t = s(i, l && l.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
p === 0 ? u.textContent = "" : d && p === d.length - 1 || (u.textContent = l || C(d || P, i));
}
P && P.splice(0, i), b.actualWidth = t, b.rotation = x;
}, v.prototype.unescapeEntities = function(u, d) {
return N(this.renderer.escapes, function(P, O) {
d && d.indexOf(P) !== -1 || (u = u.toString().replace(new RegExp(P, "g"), O));
}), u;
}, v;
}();
}), E(h, "Core/Renderer/SVG/SVGRenderer.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGLabel.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Renderer/SVG/TextBuilder.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U, W, N) {
var w = I.charts, v = I.deg2rad, u = I.doc, d = I.isFirefox, P = I.isMS, O = I.isWebKit, B = I.noop, C = I.SVG_NS, b = I.symbolSizes, M = I.win, x = N.addEvent, a = N.attr, c = N.createElement, p = N.css, i = N.defined, l = N.destroyObjectProperties, s = N.extend, t = N.isArray, n = N.isNumber, o = N.isObject, A = N.isString, _ = N.merge, D = N.pick, j = N.pInt, T = N.uniqueKey, X;
return I = function() {
function f(m, L, Y, F, Q, k, G) {
this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, Y, F, Q, k, G);
}
return f.prototype.init = function(m, L, Y, F, Q, k, G) {
var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), V = z.element;
G || z.css(this.getStyle(F)), m.appendChild(V), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a(V, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = V, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
var q;
d && m.getBoundingClientRect && (L = function() {
p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = x(M, "resize", L));
}, f.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, f.prototype.getReferenceURL = function() {
if ((d || O) && u.getElementsByTagName("base").length) {
if (!i(X)) {
var m = T();
m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(u.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = u.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", u.body.removeChild(m);
}
if (X)
return M.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, f.prototype.getStyle = function(m) {
return this.style = s({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
}, f.prototype.setStyle = function(m) {
this.boxWrapper.css(this.getStyle(m));
}, f.prototype.isHidden = function() {
return !this.boxWrapper.getBBox().width;
}, f.prototype.destroy = function() {
var m = this.defs;
return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), l(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
}, f.prototype.createElement = function(m) {
var L = new this.Element();
return L.init(this, m), L;
}, f.prototype.getRadialAttr = function(m, L) {
return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
}, f.prototype.buildText = function(m) {
new W(m).buildSVG();
}, f.prototype.getContrast = function(m) {
return m = R.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
}, f.prototype.button = function(m, L, Y, F, Q, k, G, z, V, q) {
var it = this.label(m, L, Y, V, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
var gt = k.style;
delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
var dt = G.style;
delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
var lt = z.style;
delete z.style;
}
return x(it.element, P ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), x(it.element, P ? "mouseout" : "mouseleave", function() {
nt !== 3 && it.setState(nt);
}), it.setState = function(at) {
at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, k, G, z][at || 0]).css([ct, gt, dt, lt][at || 0]);
}, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && F.call(it, at);
});
}, f.prototype.crispLine = function(m, L, Y) {
Y === void 0 && (Y = "round");
var F = m[0], Q = m[1];
return i(F[1]) && F[1] === Q[1] && (F[1] = Q[1] = Math[Y](F[1]) - L % 2 / 2), i(F[2]) && F[2] === Q[2] && (F[2] = Q[2] = Math[Y](F[2]) + L % 2 / 2), m;
}, f.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : o(m) && s(L, m), this.createElement("path").attr(L);
}, f.prototype.circle = function(m, L, Y) {
return m = o(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(F, Q, k) {
k.setAttribute("c" + Q, F);
}, L.attr(m);
}, f.prototype.arc = function(m, L, Y, F, Q, k) {
return o(m) ? (F = m, L = F.y, Y = F.r, m = F.x) : F = { innerR: F, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, F), m.r = Y, m;
}, f.prototype.rect = function(m, L, Y, F, Q, k) {
Q = o(m) ? m.r : Q;
var G = this.createElement("rect");
return m = o(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(F, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, V, q) {
G.r = z, a(q, { rx: z, ry: z });
}, G.rGetter = function() {
return G.r || 0;
}, G.attr(m);
}, f.prototype.setSize = function(m, L, Y) {
this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
}, duration: D(
Y,
!0
) ? void 0 : 0 }), this.alignElements();
}, f.prototype.g = function(m) {
var L = this.createElement("g");
return m ? L.attr({ class: "highcharts-" + m }) : L;
}, f.prototype.image = function(m, L, Y, F, Q, k) {
var G = { preserveAspectRatio: "none" }, z = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
n(L) && (G.x = L), n(Y) && (G.y = Y), n(F) && (G.width = F), n(Q) && (G.height = Q);
var V = this.createElement("image").attr(G);
return L = function(q) {
z(V.element, m), k.call(V, q);
}, k ? (z(
V.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), Y = new M.Image(), x(Y, "load", L), Y.src = m, Y.complete && L({})) : z(V.element, m), V;
}, f.prototype.symbol = function(m, L, Y, F, Q, k) {
var G = this, z = /^url\((.*?)\)$/, V = z.test(m), q = !V && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
if (it) {
typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(Y || 0), F || 0, Q || 0, k));
var nt = this.path(et);
G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: F, height: Q }), k && s(nt, k);
} else if (V) {
var rt = m.match(z)[1], ct = nt = this.image(rt);
ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(lt, at) {
var J = this["img" + at];
this[at] = lt, i(J) && (k && k.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (lt = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: lt } : { translateY: lt })));
};
}), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = w[G.chartIndex];
this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), u.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, f.prototype.clipRect = function(m, L, Y, F) {
var Q = T() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, Y, F, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
}, f.prototype.text = function(m, L, Y, F) {
var Q = {};
return F && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!F || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
for (var V = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < V.length; it++)
et = V[it], et.getAttribute(G) === q && et.setAttribute(G, k);
z.setAttribute(G, k);
}), m);
}, f.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !M.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? j(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
}, f.prototype.rotCorr = function(m, L, Y) {
var F = m;
return L && Y && (F = Math.max(F * Math.cos(L * v), 4)), { x: -m / 3 * Math.sin(L * v), y: F };
}, f.prototype.pathToSegments = function(m) {
for (var L = [], Y = [], F = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
A(Y[0]) && n(m[Q]) && Y.length === F[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
return L.push(Y.slice(0)), L;
}, f.prototype.label = function(m, L, Y, F, Q, k, G, z, V) {
return new $(this, m, L, Y, F, Q, k, G, z, V);
}, f.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, f;
}(), s(I.prototype, { Element: H, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: U, draw: B }), Z.registerRendererType("svg", I, !0), I;
}), E(h, "Core/Renderer/HTML/HTMLElement.js", [h["Core/Globals.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var P = function(O, B) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var M in b)
b.hasOwnProperty(M) && (C[M] = b[M]);
}, P(O, B);
};
return function(O, B) {
function C() {
this.constructor = O;
}
P(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
};
}(), H = y.isFirefox, $ = y.isMS, U = y.isWebKit, W = y.win, N = I.css, w = I.defined, v = I.extend, u = I.pick, d = I.pInt;
return function(P) {
function O() {
return P !== null && P.apply(this, arguments) || this;
}
return Z(O, P), O.compose = function(B) {
if (O.composedClasses.indexOf(B) === -1) {
O.composedClasses.push(B);
var C = O.prototype, b = B.prototype;
b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
}
return B;
}, O.prototype.getSpanCorrection = function(B, C, b) {
this.xCorr = -B * b, this.yCorr = -C;
}, O.prototype.htmlCss = function(B) {
var C = this.element.tagName === "SPAN" && B && "width" in B, b = u(C && B.width, void 0);
if (C) {
delete B.width, this.textWidth = b;
var M = !0;
}
return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = v(this.styles, B), N(this.element, B), M && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var B = this.element;
return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var B = this.renderer, C = this.element, b = this.translateX || 0, M = this.translateY || 0, x = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, N(C, { marginLeft: b, marginTop: M }), !B.styledMode && this.shadows && this.shadows.forEach(function(A) {
N(A, { marginLeft: b + 1, marginTop: M + 1 });
}), this.inverted && [].forEach.call(C.childNodes, function(A) {
B.invertChild(A, C);
}), C.tagName === "SPAN") {
var l = this.rotation, s = this.textWidth && d(this.textWidth), t = [l, c, C.innerHTML, this.textWidth, this.textAlign].join(), n = void 0;
if (n = !1, s !== this.oldTextWidth) {
if (this.textPxLength)
var o = this.textPxLength;
else
N(C, { width: "", whiteSpace: i || "nowrap" }), o = C.offsetWidth;
(s > this.oldTextWidth || o > s) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (N(C, { width: o > s || l ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, n = !0);
}
this.hasBoxWidthChanged = n, t !== this.cTT && (n = B.fontMetrics(C.style.fontSize, C).b, !w(l) || l === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(l, p, n), this.getSpanCorrection(!w(l) && this.textPxLength || C.offsetWidth, n, p, l, c)), N(C, { left: x + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = l, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(B, C, b) {
var M = {}, x = $ && !/Edge/.test(W.navigator.userAgent) ? "-ms-transform" : U ? "-webkit-transform" : H ? "MozTransform" : W.opera ? "-o-transform" : void 0;
x && (M[x] = M.transform = "rotate(" + B + "deg)", M[x + (H ? "Origin" : "-origin")] = M.transformOrigin = 100 * C + "% " + b + "px", N(this.element, M));
}, O.composedClasses = [], O;
}(R);
}), E(
h,
"Core/Renderer/HTML/HTMLRenderer.js",
[h["Core/Renderer/HTML/AST.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, R, I, Z) {
var H = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), $ = Z.attr, U = Z.createElement, W = Z.extend, N = Z.pick;
return function(w) {
function v() {
return w !== null && w.apply(this, arguments) || this;
}
return H(v, w), v.compose = function(u) {
return v.composedClasses.indexOf(u) === -1 && (v.composedClasses.push(u), u.prototype.html = v.prototype.html), u;
}, v.prototype.html = function(u, d, P) {
var O = this.createElement("span"), B = O.element, C = O.renderer, b = C.isSVG, M = function(x, a) {
["opacity", "visibility"].forEach(function(c) {
x[c + "Setter"] = function(p, i, l) {
var s = x.div ? x.div.style : a;
R.prototype[c + "Setter"].call(this, p, i, l), s && (s[i] = p);
};
}), x.addedSetters = !0;
};
return O.textSetter = function(x) {
x !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, N(x, "")), this.textStr = x, O.doTransform = !0);
}, b && M(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(x, a) {
a === "align" ? O.alignValue = O.textAlign = x : O[a] = x, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: u, x: Math.round(d), y: Math.round(P) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(x) {
var a = C.box.parentNode, c = [];
if (this.parentGroup = x) {
var p = x.div;
if (!p) {
for (; x; )
c.push(x), x = x.parentGroup;
c.reverse().forEach(function(i) {
function l(o, A) {
i[A] = o, A === "translateX" ? n.left = o + "px" : n.top = o + "px", i.doTransform = !0;
}
var s = $(i.element, "class"), t = i.styles || {};
p = i.div = i.div || U("div", s ? { className: s } : void 0, {
position: "absolute",
left: (i.translateX || 0) + "px",
top: (i.translateY || 0) + "px",
display: i.display,
opacity: i.opacity,
cursor: t.cursor,
pointerEvents: t.pointerEvents,
visibility: i.visibility
}, p || a);
var n = p.style;
W(i, { classSetter: function(o) {
return function(A) {
this.element.setAttribute("class", A), o.className = A;
};
}(p), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: l, translateYSetter: l }), i.addedSetters || M(i);
});
}
} else
p = a;
return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, v.composedClasses = [], v;
}(I);
}
), E(h, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(R) {
R.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
autoRotation: void 0,
autoRotationLimit: 80,
distance: void 0,
enabled: !0,
indentation: 10,
overflow: "justify",
padding: 5,
reserveSpace: void 0,
rotation: void 0,
staggerLines: 0,
step: 0,
useHTML: !1,
x: 0,
zIndex: 7,
style: { color: "#666666", cursor: "default", fontSize: "11px" }
}, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
align: "middle",
rotation: 0,
useHTML: !1,
x: 0,
y: 0,
style: { color: "#666666" }
}, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, R.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
animation: {},
allowOverlap: !1,
enabled: !1,
crop: !0,
overflow: "justify",
formatter: function() {
var I = this.axis.chart.numberFormatter;
return I(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, R.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, R.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, R.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, R.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), E(h, "Core/Foundation.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, $;
return function(U) {
U.registerEventOptions = function(W, N) {
W.eventOptions = W.eventOptions || {}, Z(N.events, function(w, v) {
W.eventOptions[v] !== w && (W.eventOptions[v] && (H(W, v, W.eventOptions[v]), delete W.eventOptions[v]), I(w) && (W.eventOptions[v] = w, R(W, v, w)));
});
};
}($ || ($ = {})), $;
}), E(
h,
"Core/Axis/Tick.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Utilities.js"]],
function(y, R, I) {
var Z = R.deg2rad, H = I.clamp, $ = I.correctFloat, U = I.defined, W = I.destroyObjectProperties, N = I.extend, w = I.fireEvent, v = I.isNumber, u = I.merge, d = I.objectEach, P = I.pick;
return R = function() {
function O(B, C, b, M, x) {
this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = C, this.type = b || "", this.parameters = x || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || M || this.addLabel();
}
return O.prototype.addLabel = function() {
var B = this, C = B.axis, b = C.options, M = C.chart, x = C.categories, a = C.logarithmic, c = C.names, p = B.pos, i = P(B.options && B.options.labels, b.labels), l = C.tickPositions, s = p === l[0], t = p === l[l.length - 1], n = (!i.step || i.step === 1) && C.tickInterval === 1;
l = l.info;
var o = B.label, A;
if (x = this.parameters.category || (x ? P(x[p], c[p], p) : p), a && v(x) && (x = $(a.lin2log(x))), C.dateTime)
if (l)
var _ = M.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && l.higherRanks[p] || l.unitName]), D = _.main;
else
v(x) && (D = C.dateTime.getXDateFormat(x, b.dateTimeLabelFormats || {}));
B.isFirst = s, B.isLast = t;
var j = {
axis: C,
chart: M,
dateTimeLabelFormat: D,
isFirst: s,
isLast: t,
pos: p,
tick: B,
tickPositionInfo: l,
value: x
};
w(this, "labelFormat", j);
var T = function(f) {
return i.formatter ? i.formatter.call(f, f) : i.format ? (f.text = C.defaultLabelFormatter.call(f), y.format(i.format, f, M)) : C.defaultLabelFormatter.call(f, f);
};
b = T.call(j, j);
var X = _ && _.list;
B.shortenLabel = X ? function() {
for (A = 0; A < X.length; A++)
if (N(j, { dateTimeLabelFormat: X[A] }), o.attr({ text: T.call(j, j) }), o.getBBox().width < C.getSlotWidth(B) - 2 * i.padding)
return;
o.attr({ text: "" });
} : void 0, n && C._addedPlotLB && B.moveLabel(b, i), U(o) || B.movedLabel ? o && o.textStr !== b && !n && (!o.textWidth || i.style.width || o.styles.width || o.css({ width: null }), o.attr({ text: b }), o.textPxLength = o.getBBox().width) : (B.label = o = B.createLabel({ x: 0, y: 0 }, b, i), B.rotation = 0);
}, O.prototype.createLabel = function(B, C, b) {
var M = this.axis, x = M.chart;
return (B = U(C) && b.enabled ? x.renderer.text(C, B.x, B.y, b.useHTML).add(M.labelGroup) : null) && (x.styledMode || B.css(u(b.style)), B.textPxLength = B.getBBox().width), B;
}, O.prototype.destroy = function() {
W(
this,
this.axis
);
}, O.prototype.getPosition = function(B, C, b, M) {
var x = this.axis, a = x.chart, c = M && a.oldChartHeight || a.chartHeight;
return B = { x: B ? $(x.translate(C + b, null, null, M) + x.transB) : x.left + x.offset + (x.opposite ? (M && a.oldChartWidth || a.chartWidth) - x.right - x.left : 0), y: B ? c - x.bottom + x.offset - (x.opposite ? x.height : 0) : $(c - x.translate(C + b, null, null, M) - x.transB) }, B.y = H(B.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: B }), B;
}, O.prototype.getLabelPosition = function(B, C, b, M, x, a, c, p) {
var i = this.axis, l = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, n = i.tickRotCorr || { x: 0, y: 0 }, o = M || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = x.y;
return U(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? n.y + 8 : Math.cos(b.rotation * Z) * (n.y - b.getBBox(!1, 0).height / 2)), B = B + x.x + o + n.x - (a && M ? a * l * (s ? -1 : 1) : 0), C = C + _ - (a && !M ? a * l * (s ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), A.x = B, A.y = Math.round(C), w(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(B, C, b, M, x, a) {
return a.crispLine([["M", B, C], ["L", B + (x ? 0 : -b), C + (x ? b : 0)]], M);
}, O.prototype.handleOverflow = function(B) {
var C = this.axis, b = C.options.labels, M = B.x, x = C.chart.chartWidth, a = C.chart.spacing, c = P(C.labelLeft, Math.min(C.pos, a[3]));
a = P(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, x - a[1]));
var p = this.label, i = this.rotation, l = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], s = p.getBBox().width, t = C.getSlotWidth(this), n = {}, o = t, A = 1, _;
i || b.overflow !== "justify" ? 0 > i && M - l * s < c ? _ = Math.round(M / Math.cos(i * Z) - c) : 0 < i && M + l * s > a && (_ = Math.round((x - M) / Math.cos(i * Z))) : (x = M + (1 - l) * s, M - l * s < c ? o = B.x + o * (1 - l) - c : x > a && (o = a - B.x + o * l, A = -1), o = Math.min(t, o), o < t && C.labelAlign === "center" && (B.x += A * (t - o - l * (t - Math.min(s, o)))), (s > o || C.autoRotation && (p.styles || {}).width) && (_ = o)), _ && (this.shortenLabel ? this.shortenLabel() : (n.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (n.textOverflow = "ellipsis"), p.css(n)));
}, O.prototype.moveLabel = function(B, C) {
var b = this, M = b.label, x = b.axis, a = x.reversed, c = !1;
if (M && M.textStr === B ? (b.movedLabel = M, c = !0, delete b.label) : d(x.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== B || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || M)) {
var p = b.labelPos || M.xy;
M = x.horiz ? a ? 0 : x.width + x.left : p.x, x = x.horiz ? p.y : a ? x.width + x.left : 0, b.movedLabel = b.createLabel({ x: M, y: x }, B, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(B, C, b) {
var M = this.axis, x = M.horiz, a = this.pos, c = P(this.tickmarkOffset, M.tickmarkOffset);
a = this.getPosition(x, a, c, C), c = a.x;
var p = a.y;
M = x && c === M.pos + M.len || !x && p === M.pos ? -1 : 1, x = P(b, this.label && this.label.newOpacity, 1), b = P(b, 1), this.isActive = !0, this.renderGridLine(C, b, M), this.renderMark(a, b, M), this.renderLabel(a, C, x, B), this.isNew = !1, w(this, "afterRender");
}, O.prototype.renderGridLine = function(B, C, b) {
var M = this.axis, x = M.options, a = {}, c = this.pos, p = this.type, i = P(
this.tickmarkOffset,
M.tickmarkOffset
), l = M.chart.renderer, s = this.gridLine, t = x.gridLineWidth, n = x.gridLineColor, o = x.gridLineDashStyle;
this.type === "minor" && (t = x.minorGridLineWidth, n = x.minorGridLineColor, o = x.minorGridLineDashStyle), s || (M.chart.styledMode || (a.stroke = n, a["stroke-width"] = t || 0, a.dashstyle = o), p || (a.zIndex = 1), B && (C = 0), this.gridLine = s = l.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(M.gridGroup)), s && (b = M.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * b, force: "pass", old: B })) && s[B || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
}, O.prototype.renderMark = function(B, C, b) {
var M = this.axis, x = M.options, a = M.chart.renderer, c = this.type, p = M.tickSize(c ? c + "Tick" : "tick"), i = B.x;
B = B.y;
var l = P(x[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && M.isXAxis ? 1 : 0);
x = x[c !== "minor" ? "tickColor" : "minorTickColor"];
var s = this.mark, t = !s;
p && (M.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(M.axisGroup), M.chart.styledMode || s.attr({ stroke: x, "stroke-width": l })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
B,
p[0],
s.strokeWidth() * b,
M.horiz,
a
), opacity: C }));
}, O.prototype.renderLabel = function(B, C, b, M) {
var x = this.axis, a = x.horiz, c = x.options, p = this.label, i = c.labels, l = i.step;
x = P(this.tickmarkOffset, x.tickmarkOffset);
var s = B.x;
B = B.y;
var t = !0;
p && v(s) && (p.xy = B = this.getLabelPosition(s, B, p, a, i, x, M, l), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(B), l && M % l && (t = !1), t && v(B.y) ? (B.opacity = b, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var B = this.label, C = this.axis, b = C.reversed;
if (B && !this.isNew) {
var M = C.horiz ? b ? C.left : C.width + C.left : B.xy.x;
b = C.horiz ? B.xy.y : b ? C.width + C.top : C.top, B.animate({ x: M, y: b, opacity: 0 }, void 0, B.destroy), delete this.label;
}
C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), R;
}
), E(h, "Core/Axis/Axis.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/AxisDefaults.js"],
h["Core/Color/Color.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Axis/Tick.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W) {
var N = y.animObject, w = Z.defaultOptions, v = H.registerEventOptions, u = $.deg2rad, d = W.arrayMax, P = W.arrayMin, O = W.clamp, B = W.correctFloat, C = W.defined, b = W.destroyObjectProperties, M = W.erase, x = W.error, a = W.extend, c = W.fireEvent, p = W.getMagnitude, i = W.isArray, l = W.isNumber, s = W.isString, t = W.merge, n = W.normalizeTickInterval, o = W.objectEach, A = W.pick, _ = W.relativeLength, D = W.removeEvent, j = W.splat, T = W.syncTimeout;
return y = function() {
function X(f, m) {
this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(f, m);
}
return X.prototype.init = function(f, m) {
var L = m.isX;
this.chart = f, this.horiz = f.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var Y = this.options, F = Y.labels, Q = Y.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.crosshair, j(f.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, f.axes.indexOf(this) === -1 && (L ? f.axes.splice(f.xAxis.length, 0, this) : f.axes.push(this), f[this.coll].push(this)), this.series = this.series || [], f.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = l(F.rotation) ? F.rotation : void 0, v(this, Y), c(this, "afterInit");
}, X.prototype.setOptions = function(f) {
this.options = t(R.defaultXAxisOptions, this.coll === "yAxis" && R.defaultYAxisOptions, [R.defaultTopAxisOptions, R.defaultRightAxisOptions, R.defaultBottomAxisOptions, R.defaultLeftAxisOptions][this.side], t(w[this.coll], f)), c(this, "afterSetOptions", { userOptions: f });
}, X.prototype.defaultLabelFormatter = function(f) {
var m = this.axis;
f = this.chart.numberFormatter;
var L = l(this.value) ? this.value : NaN, Y = m.chart.time, F = this.dateTimeLabelFormat, Q = w.lang, k = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
if (m.categories)
var V = "" + this.value;
else if (F)
V = Y.dateFormat(F, L);
else if (z && 1e3 <= G)
for (; z-- && typeof V > "u"; )
m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && (V = f(L / m, -1) + k[z]);
return typeof V > "u" && (V = 1e4 <= Math.abs(L) ? f(L, -1) : f(L, -1, void 0, "")), V;
}, X.prototype.getSeriesExtremes = function() {
var f = this, m = f.chart, L;
c(this, "getSeriesExtremes", null, function() {
f.hasVisibleSeries = !1, f.dataMin = f.dataMax = f.threshold = null, f.softThreshold = !f.isXAxis, f.stacking && f.stacking.buildStacks(), f.series.forEach(function(Y) {
if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
var F = Y.options, Q = F.threshold;
if (f.hasVisibleSeries = !0, f.positiveValuesOnly && 0 >= Q && (Q = null), f.isXAxis) {
if (F = Y.xData, F.length) {
F = f.logarithmic ? F.filter(f.validatePositiveValue) : F, L = Y.getXExtremes(F);
var k = L.min, G = L.max;
l(k) || k instanceof Date || (F = F.filter(l), L = Y.getXExtremes(F), k = L.min, G = L.max), F.length && (f.dataMin = Math.min(A(f.dataMin, k), k), f.dataMax = Math.max(A(f.dataMax, G), G));
}
} else
Y = Y.applyExtremes(), l(Y.dataMin) && (k = Y.dataMin, f.dataMin = Math.min(A(f.dataMin, k), k)), l(Y.dataMax) && (G = Y.dataMax, f.dataMax = Math.max(A(f.dataMax, G), G)), C(Q) && (f.threshold = Q), (!F.softThreshold || f.positiveValuesOnly) && (f.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(f, m, L, Y, F, Q) {
var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
F = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && F) && k.lin2val;
var V = 1, q = 0;
return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && (V *= -1, q = k.len), k.reversed && (V *= -1, q -= V * (k.sector || k.len)), m ? (f = (f * V + q - z) / Y + G, F && (f = k.lin2val(f))) : (F && (f = k.val2lin(f)), f = l(G) ? V * (f - G) * Y + q + V * z + (l(Q) ? Y * Q : 0) : void 0), f;
}, X.prototype.toPixels = function(f, m) {
return this.translate(
f,
!1,
!this.horiz,
null,
!0
) + (m ? 0 : this.pos);
}, X.prototype.toValue = function(f, m) {
return this.translate(f - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
}, X.prototype.getPlotLinePath = function(f) {
function m(at, J, tt) {
return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : lt = !0), at;
}
var L = this, Y = L.chart, F = L.left, Q = L.top, k = f.old, G = f.value, z = f.lineWidth, V = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = f.translatedValue, nt = f.force, rt, ct, gt, dt, lt;
return f = {
value: G,
lineWidth: z,
old: k,
force: nt,
acrossPanes: f.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", f, function(at) {
et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(V - et - it), l(et) ? L.horiz ? (ct = Q, dt = V - L.bottom, rt = gt = m(rt, F, F + L.width)) : (rt = F, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (lt = !0, nt = !1), at.path = lt && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
}), f.path;
}, X.prototype.getLinearTickPositions = function(f, m, L) {
var Y = B(Math.floor(m / f) * f);
L = B(Math.ceil(L / f) * f);
var F = [], Q;
if (B(Y + f) === Y && (Q = 20), this.single)
return [m];
for (m = Y; m <= L && (F.push(m), m = B(m + f, Q), m !== k); )
var k = m;
return F;
}, X.prototype.getMinorTickInterval = function() {
var f = this.options;
return f.minorTicks === !0 ? A(f.minorTickInterval, "auto") : f.minorTicks === !1 ? null : f.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var f = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, F = this.min - Y;
Y = this.max + Y;
var Q = Y - F, k = [];
if (Q && Q / L < this.len / 3) {
var G = this.logarithmic;
if (G)
this.paddedTicks.forEach(function(z, V, q) {
V && k.push.apply(
k,
G.getLogTickPositions(L, q[V - 1], q[V], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), F, Y, f.startOfWeek));
else
for (f = F + (m[0] - F) % L; f <= Y && f !== k[0]; f += L)
k.push(f);
}
return k.length !== 0 && this.trimTicks(k), k;
}, X.prototype.adjustForMinRange = function() {
var f = this.options, m = this.logarithmic, L = this.min, Y = this.max, F = 0, Q, k, G, z;
if (this.isXAxis && typeof this.minRange > "u" && !m && (C(f.min) || C(f.max) || C(f.floor) || C(f.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
for (Q = z; 0 < Q; Q--)
k = G[Q] - G[Q - 1], (!F || k < F) && (F = k);
}), this.minRange = Math.min(5 * F, this.dataMax - this.dataMin))), Y - L < this.minRange) {
var V = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
it = [L - it, A(f.min, L - it)], V && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = d(it), Y = [L + q, A(f.max, L + q)], V && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = P(Y), Y - L < q && (it[0] = Y - q, it[1] = A(f.min, Y - q), L = d(it));
}
this.min = L, this.max = Y;
}, X.prototype.getClosest = function() {
var f;
return this.categories ? f = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && C(L) && Y && (f = C(f) ? Math.min(f, L) : L);
}), f;
}, X.prototype.nameToX = function(f) {
var m = i(this.categories), L = m ? this.categories : this.names, Y = f.options.x;
if (f.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(f.name) : A(L.keys[f.name], -1) : f.series.autoIncrement()), Y === -1) {
if (!m)
var F = L.length;
} else
F = Y;
return typeof F < "u" && (this.names[F] = f.name, this.names.keys[f.name] = F), F;
}, X.prototype.updateNames = function() {
var f = this, m = this.names;
0 < m.length && (Object.keys(m.keys).forEach(function(L) {
delete m.keys[L];
}), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
L.xIncrement = null, (!L.points || L.isDirtyData) && (f.max = Math.max(f.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(Y, F) {
if (Y && Y.options && typeof Y.name < "u") {
var Q = f.nameToX(Y);
typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[F] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var f = this, m = f.max - f.min, L = f.linkedParent, Y = !!f.categories, F = f.isXAxis, Q = f.axisPointRange || 0, k = 0, G = 0, z = f.transA;
if (F || Y || Q) {
var V = f.getClosest();
L ? (k = L.minPointOffset, G = L.pointRangePadding) : f.series.forEach(function(q) {
var it = Y ? 1 : F ? A(q.options.pointRange, V, 0) : f.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!f.single || Y) && (q = q.is("xrange") ? !F : F, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
}), L = f.ordinal && f.ordinal.slope && V ? f.ordinal.slope / V : 1, f.minPointOffset = k *= L, f.pointRangePadding = G *= L, f.pointRange = Math.min(Q, f.single && Y ? 1 : m), F && (f.closestPointRange = V);
}
f.translationSlope = f.transA = z = f.staticScale || f.len / (m + G || 1), f.transB = f.horiz ? f.left : f.bottom, f.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(f) {
var m = this.chart, L = this.logarithmic, Y = this.options, F = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, V = Y.maxPadding, q = Y.minPadding, it = l(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = l(this.threshold) ? this.threshold : null;
this.dateTime || G || Q || this.getTickAmount();
var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
if (Q) {
this.linkedParent = m[this.coll][Y.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && x(11, 1, m);
} else {
if (z && C(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
V = 0;
}
}
this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !f && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && x(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && C(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && V && (this.max += m * V)), l(this.userMin) || (l(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), l(Y.floor) && (this.min = Math.max(this.min, Y.floor))), l(this.userMax) || (l(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), l(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), l(this.min) && l(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), F && !f) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(lt) {
lt.forceCrop = lt.forceCropping && lt.forceCropping(), lt.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), f = A(Y.minTickInterval, this.dateTime && !this.series.some(function(lt) {
return lt.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < f && (this.tickInterval = f), this.dateTime || this.logarithmic || it || (this.tickInterval = n(this.tickInterval, void 0, p(this.tickInterval), A(Y.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
}, X.prototype.setTickPositions = function() {
var f = this.options, m = f.tickPositions, L = this.getMinorTickInterval(), Y = this.hasVerticalPanning(), F = this.coll === "colorAxis", Q = (F || !Y) && f.startOnTick;
Y = (F || !Y) && f.endOnTick, F = f.tickPositioner, this.tickmarkOffset = this.categories && f.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && C(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || f.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, f.units), this.min, this.max, f.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
this.tickInterval,
this.min,
this.max
) : (L = [this.min, this.max], x(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, F && (F = F.apply(this, [this.min, this.max]))) && (this.tickPositions = L = F), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
return k.is("heatmap") && k.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || F || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(f, m, L) {
var Y = f[0], F = f[f.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && Y !== -1 / 0)
this.min = Y;
else
for (; this.min - Q > f[0]; )
f.shift();
if (L)
this.max = F;
else
for (; this.max + Q < f[f.length - 1]; )
f.pop();
f.length === 0 && C(Y) && !this.options.tickPositions && f.push((F + Y) / 2);
}
}, X.prototype.alignToOthers = function() {
var f = {}, m = this.options, L;
return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(Y) {
var F = Y.options;
F = [Y.horiz ? F.left : F.top, F.width, F.height, F.pane].join(), Y.series.length && (f[F] ? L = !0 : f[F] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var f = this.options, m = f.tickPixelInterval, L = f.tickAmount;
!C(f.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && f.startOnTick && f.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
}, X.prototype.adjustTickAmount = function() {
var f = this.options, m = this.tickInterval, L = this.tickPositions, Y = this.tickAmount, F = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && l(this.min) && l(this.max)) {
if (Q < Y) {
for (; L.length < Y; )
L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
this.transA *= (Q - 1) / (Y - 1), this.min = f.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = f.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
} else
Q > Y && (this.tickInterval *= 2, this.setTickPositions());
if (C(F)) {
for (m = f = L.length; m--; )
(F === 3 && m % 2 === 1 || 2 >= F && 0 < m && m < f - 1) && L.splice(m, 1);
this.finalTickAmt = void 0;
}
}
}, X.prototype.setScale = function() {
var f = !1, m = !1;
this.series.forEach(function(Y) {
f = f || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.xAxis.isDirty || !1;
}), this.setAxisSize();
var L = this.len !== (this.old && this.old.len);
L || f || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), f && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
}, X.prototype.setExtremes = function(f, m, L, Y, F) {
var Q = this, k = Q.chart;
L = A(L, !0), Q.series.forEach(function(G) {
delete G.kdTree;
}), F = a(F, { min: f, max: m }), c(Q, "setExtremes", F, function() {
Q.userMin = f, Q.userMax = m, Q.eventArgs = F, L && k.redraw(Y);
});
}, X.prototype.zoom = function(f, m) {
var L = this, Y = this.dataMin, F = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(F, A(Q.max, F));
return f = { newMin: f, newMax: m }, c(this, "zoom", f, function(z) {
var V = z.newMin, q = z.newMax;
(V !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && (V < k && (V = k), V > G && (V = G)), C(F) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof V < "u" || typeof q < "u", L.setExtremes(V, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
}), f.zoomed;
}, X.prototype.setAxisSize = function() {
var f = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, F = this.width = Math.round(_(A(m.width, f.plotWidth - L[3] + L[1]), f.plotWidth)), Q = this.height = Math.round(_(A(m.height, f.plotHeight - L[0] + L[2]), f.plotHeight)), k = this.top = Math.round(_(A(m.top, f.plotTop + L[0]), f.plotHeight, f.plotTop));
m = this.left = Math.round(_(A(m.left, f.plotLeft + L[3]), f.plotWidth, f.plotLeft)), this.bottom = f.chartHeight - Q - k, this.right = f.chartWidth - F - m, this.len = Math.max(Y ? F : Q, 0), this.pos = Y ? m : k;
}, X.prototype.getExtremes = function() {
var f = this.logarithmic;
return { min: f ? B(f.lin2log(this.min)) : this.min, max: f ? B(f.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
}, X.prototype.getThreshold = function(f) {
var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
return m = m ? m.lin2log(this.max) : this.max, f === null || f === -1 / 0 ? f = L : f === 1 / 0 ? f = m : L > f ? f = L : m < f && (f = m), this.translate(f, 0, 1, 0, 1);
}, X.prototype.autoLabelAlign = function(f) {
var m = (A(f, 0) - 90 * this.side + 720) % 360;
return f = { align: "center" }, c(
this,
"autoLabelAlign",
f,
function(L) {
15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
}
), f.align;
}, X.prototype.tickSize = function(f) {
var m = this.options, L = A(m[f === "tick" ? "tickWidth" : "minorTickWidth"], f === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[f === "tick" ? "tickLength" : "minorTickLength"];
if (L && Y) {
m[f + "Position"] === "inside" && (Y = -Y);
var F = [Y, L];
}
return f = { tickSize: F }, c(this, "afterTickSize", f), f.tickSize;
}, X.prototype.labelMetrics = function() {
var f = this.tickPositions && this.tickPositions[0] || 0;
return this.chart.renderer.fontMetrics(
this.options.labels.style.fontSize,
this.ticks[f] && this.ticks[f].label
);
}, X.prototype.unsquish = function() {
var f = this.options.labels, m = this.horiz, L = this.tickInterval, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), F = f.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
var rt = nt / (Y || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
}, z = L, V, q, it = Number.MAX_VALUE;
if (m) {
if (!f.staggerLines && !f.step)
if (l(F))
var et = [F];
else
Y < f.autoRotationLimit && (et = f.autoRotation);
et && et.forEach(function(nt) {
if (nt === F || nt && -90 <= nt && 90 >= nt) {
q = G(Math.abs(Q.h / Math.sin(u * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, V = nt, z = q);
}
});
} else
f.step || (z = G(Q.h));
return this.autoRotation = et, this.labelRotation = A(V, l(F) ? F : 0), z;
}, X.prototype.getSlotWidth = function(f) {
var m = this.chart, L = this.horiz, Y = this.options.labels, F = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (f && l(f.slotWidth))
return f.slotWidth;
if (L && 2 > Y.step)
return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / F;
if (!L) {
if (f = Y.style.width, f !== void 0)
return parseInt(String(f), 10);
if (Q)
return Q - m.spacing[3];
}
return 0.33 * m.chartWidth;
}, X.prototype.renderUnsquish = function() {
var f = this.chart, m = f.renderer, L = this.tickPositions, Y = this.ticks, F = this.options.labels, Q = F.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * F.padding)), V = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (s(F.rotation) || (V.rotation = F.rotation || 0), L.forEach(function(gt) {
gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > z && et > q.h ? V.rotation = this.labelRotation : this.labelRotation = 0;
else if (G) {
var nt = z;
if (!it) {
var rt = "clip";
for (z = L.length; !k && z--; ) {
var ct = L[z];
(ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
V.rotation && (nt = et > 0.5 * f.chartHeight ? 0.33 * f.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = F.align || this.autoLabelAlign(this.labelRotation)) && (V.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = Y[gt]) && gt.label, lt = Q.width, at = {};
dt && (dt.attr(V), gt.shortenLabel ? gt.shortenLabel() : nt && !lt && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !lt && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = V.rotation);
}, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
}, X.prototype.hasData = function() {
return this.series.some(function(f) {
return f.hasData();
}) || this.options.showEmpty && C(this.min) && C(this.max);
}, X.prototype.addTitle = function(f) {
var m = this.chart.renderer, L = this.horiz, Y = this.opposite, F = this.options.title, Q = this.chart.styledMode, k;
this.axisTitle || ((k = F.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[F.align]), this.axisTitle = m.text(F.text || "", 0, 0, F.useHTML).attr({ zIndex: 7, rotation: F.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(F.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || F.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[f ? "show" : "hide"](f);
}, X.prototype.generateTick = function(f) {
var m = this.ticks;
m[f] ? m[f].addLabel() : m[f] = new U(this, f);
}, X.prototype.getOffset = function() {
var f = this, m = this, L = m.chart, Y = m.horiz, F = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, V = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = F.title, rt = F.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = F.className, lt, at = 0, J = 0, tt = 0;
if (m.showAxis = lt = et || F.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var st = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (f.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(V);
};
m.gridGroup = st("grid", "-grid", F.gridZIndex), m.axisGroup = st("axis", "", F.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (G.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
tt = Math.max(k[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : o(k, function(pt, yt) {
pt.destroy(), delete k[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(lt), lt && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
var ht = nt.offset;
J = C(ht) ? 0 : A(nt.margin, Y ? 5 : 10);
}
m.renderLine(), m.offset = gt * A(
F.offset,
ct[Q] ? ct[Q] + (F.margin || 0) : 0
), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(ht, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), F = !m.axisLine || F.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
L[it],
F
)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(f) {
var m = this.chart, L = this.opposite, Y = this.offset, F = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (f *= -1), m.renderer.crispLine([["M", F ? this.left : Q, F ? Y : this.top], ["L", F ? m.chartWidth - this.right : Q, F ? Y : m.chartHeight - this.bottom]], f);
}, X.prototype.renderLine = function() {
this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
}, X.prototype.getTitlePosition = function() {
var f = this.horiz, m = this.left, L = this.top, Y = this.len, F = this.options.title, Q = f ? m : L, k = this.opposite, G = this.offset, z = F.x, V = F.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(F.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (f ? 0 : Y), middle: Q + Y / 2, high: Q + (f ? Y : 0) }[F.align], m = (f ? L + this.height : m) + (f ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [
-q,
q,
it.f,
-q
][this.side], f = { x: f ? Y + z : m + (k ? this.width : 0) + G + z, y: f ? m + V - (k ? this.height : 0) + G : Y + V }, c(this, "afterGetTitlePosition", { titlePosition: f }), f;
}, X.prototype.renderMinorTick = function(f, m) {
var L = this.minorTicks;
L[f] || (L[f] = new U(this, f, "minor")), m && L[f].isNew && L[f].render(null, !0), L[f].render(null, !1, 1);
}, X.prototype.renderTick = function(f, m, L) {
var Y = this.ticks;
(!this.isLinked || f >= this.min && f <= this.max || this.grid && this.grid.isColumn) && (Y[f] || (Y[f] = new U(this, f)), L && Y[f].isNew && Y[f].render(m, !0, -1), Y[f].render(m));
}, X.prototype.render = function() {
var f = this, m = f.chart, L = f.logarithmic, Y = f.options, F = f.isLinked, Q = f.tickPositions, k = f.axisTitle, G = f.ticks, z = f.minorTicks, V = f.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = f.tickmarkOffset, nt = f.axisLine, rt = f.showAxis, ct = N(m.renderer.globalAnimation), gt, dt;
if (f.labelEdge.length = 0, f.overlap = !1, [G, z, V].forEach(function(at) {
o(at, function(J) {
J.isActive = !1;
});
}), f.hasData() || F) {
var lt = f.chart.hasRendered && f.old && l(f.old.min);
f.minorTickInterval && !f.categories && f.getMinorTickPositions().forEach(function(at) {
f.renderMinorTick(
at,
lt
);
}), Q.length && (Q.forEach(function(at, J) {
f.renderTick(at, J, lt);
}), et && (f.min === 0 || f.single) && (G[-1] || (G[-1] = new U(f, -1, null, !0)), G[-1].render(-1))), it && Q.forEach(function(at, J) {
dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : f.max - et, J % 2 === 0 && at < f.max && dt <= f.max + (m.polar ? -et : et) && (V[at] || (V[at] = new $.PlotLineOrBand(f)), gt = at + et, V[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, V[at].render(), V[at].isActive = !0);
}), f._addedPlotLB || (f._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
f.addPlotBandOrLine(at);
}));
}
[G, z, V].forEach(function(at) {
var J = [], tt = ct.duration;
o(at, function(st, ht) {
st.isActive || (st.render(ht, !1, 0), st.isActive = !1, J.push(ht));
}), T(function() {
for (var st = J.length; st--; )
at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
}, at !== V && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = f.getTitlePosition(), l(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr(
"y",
-9999
), k.isNew = !0)), q && q.enabled && f.stacking && f.stacking.renderStackTotals(), f.old = { len: f.len, max: f.max, min: f.min, transA: f.transA, userMax: f.userMax, userMin: f.userMin }, f.isDirty = !1, c(this, "afterRender");
}, X.prototype.redraw = function() {
this.visible && (this.render(), this.plotLinesAndBands.forEach(function(f) {
f.render();
})), this.series.forEach(function(f) {
f.isDirty = !0;
});
}, X.prototype.getKeepProps = function() {
return this.keepProps || X.keepProps;
}, X.prototype.destroy = function(f) {
var m = this, L = m.plotLinesAndBands, Y = this.eventOptions;
if (c(this, "destroy", { keepEvents: f }), f || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
b(Q);
}), L)
for (f = L.length; f--; )
L[f].destroy();
"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
m[Q] && (m[Q] = m[Q].destroy());
});
for (var F in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[F] = m.plotLinesAndBandsGroups[F].destroy();
o(m, function(Q, k) {
m.getKeepProps().indexOf(k) === -1 && delete m[k];
}), this.eventOptions = Y;
}, X.prototype.drawCrosshair = function(f, m) {
var L = this.crosshair, Y = A(L && L.snap, !0), F = this.chart, Q, k = this.cross;
if (c(this, "drawCrosshair", { e: f, point: m }), f || (f = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
if (Y ? C(m) && (Q = A(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = f && (this.horiz ? f.chartX - this.pos : this.len - f.chartY + this.pos), C(Q)) {
var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
F.polar && a(G, { isCrosshair: !0, chartX: f && f.chartX, chartY: f && f.chartY, point: m }), G = this.getPlotLinePath(G) || null;
}
if (!C(G)) {
this.hideCrosshair();
return;
}
Y = this.categories && !this.isRadial, k || (this.cross = k = F.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), F.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = f;
} else
this.hideCrosshair();
c(this, "afterDrawCrosshair", { e: f, point: m });
}, X.prototype.hideCrosshair = function() {
this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
}, X.prototype.hasVerticalPanning = function() {
var f = this.chart.options.chart.panning;
return !!(f && f.enabled && /y/.test(f.type));
}, X.prototype.validatePositiveValue = function(f) {
return l(f) && 0 < f;
}, X.prototype.update = function(f, m) {
var L = this.chart;
f = t(this.userOptions, f), this.destroy(!0), this.init(L, f), L.isDirtyBox = !0, A(m, !0) && L.redraw();
}, X.prototype.remove = function(f) {
for (var m = this.chart, L = this.coll, Y = this.series, F = Y.length; F--; )
Y[F] && Y[F].remove(!1);
M(m.axes, this), M(m[L], this), m[L].forEach(function(Q, k) {
Q.options.index = Q.userOptions.index = k;
}), this.destroy(), m.isDirtyBox = !0, A(f, !0) && m.redraw();
}, X.prototype.setTitle = function(f, m) {
this.update({ title: f }, m);
}, X.prototype.setCategories = function(f, m) {
this.update({ categories: f }, m);
}, X.defaultOptions = R.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), E(h, "Core/Axis/DateTimeAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, $;
return function(U) {
function W() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function N(u) {
u.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new v(this));
}
var w = [];
U.compose = function(u) {
return w.indexOf(u) === -1 && (w.push(u), u.keepProps.push("dateTime"), u.prototype.getTimeTicks = W, R(
u,
"init",
N
)), u;
};
var v = function() {
function u(d) {
this.axis = d;
}
return u.prototype.normalizeTimeTickInterval = function(d, P) {
var O = P || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
P = O[O.length - 1];
var B = H[P[0]], C = P[1], b;
for (b = 0; b < O.length && (P = O[b], B = H[P[0]], C = P[1], !(O[b + 1] && d <= (B * C[C.length - 1] + H[O[b + 1][0]]) / 2)); b++)
;
return B === H.year && d < 5 * B && (C = [1, 2, 5]), d = Z(d / B, C, P[0] === "year" ? Math.max(I(d / B), 1) : 1), { unitRange: B, count: d, unitName: P[0] };
}, u.prototype.getXDateFormat = function(d, P) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, d, O.options.startOfWeek, P) || P.year : P.day;
}, u;
}();
U.Additions = v;
}($ || ($ = {})), $;
}), E(h, "Core/Axis/LogarithmicAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, $;
return function(U) {
function W(u) {
var d = this.logarithmic;
u.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : d || (this.logarithmic = new v(this));
}
function N() {
var u = this.logarithmic;
u && (this.lin2val = function(d) {
return u.lin2log(d);
}, this.val2lin = function(d) {
return u.log2lin(d);
});
}
var w = [];
U.compose = function(u) {
return w.indexOf(u) === -1 && (w.push(u), u.keepProps.push("logarithmic"), R(u, "init", W), R(u, "afterInit", N)), u;
};
var v = function() {
function u(d) {
this.axis = d;
}
return u.prototype.getLogTickPositions = function(d, P, O, B) {
var C = this.axis, b = C.len, M = C.options, x = [];
if (B || (this.minorAutoInterval = void 0), 0.5 <= d)
d = Math.round(d), x = C.getLinearTickPositions(d, P, O);
else if (0.08 <= d) {
var a = Math.floor(P), c, p = M = void 0;
for (b = 0.3 < d ? [1, 2, 4] : 0.15 < d ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
var i = b.length;
for (c = 0; c < i && !p; c++) {
var l = this.log2lin(this.lin2log(a) * b[c]);
l > P && (!B || M <= O) && typeof M < "u" && x.push(M), M > O && (p = !0), M = l;
}
}
} else
P = this.lin2log(P), O = this.lin2log(O), d = B ? C.getMinorTickInterval() : M.tickInterval, d = H(d === "auto" ? null : d, this.minorAutoInterval, M.tickPixelInterval / (B ? 5 : 1) * (O - P) / ((B ? b / C.tickPositions.length : b) || 1)), d = Z(d, void 0, I(d)), x = C.getLinearTickPositions(d, P, O).map(this.log2lin), B || (this.minorAutoInterval = d / 5);
return B || (C.tickInterval = d), x;
}, u.prototype.lin2log = function(d) {
return Math.pow(10, d);
}, u.prototype.log2lin = function(d) {
return Math.log(d) / Math.LN10;
}, u;
}();
U.Additions = v;
}($ || ($ = {})), $;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.erase, I = y.extend, Z = y.isNumber, H;
return function($) {
var U = [], W;
$.compose = function(w, v) {
return W || (W = w), U.indexOf(v) === -1 && (U.push(v), I(v.prototype, N.prototype)), v;
};
var N = function() {
function w() {
}
return w.prototype.getPlotBandPath = function(v, u, d) {
d === void 0 && (d = this.options);
var P = this.getPlotLinePath({ value: u, force: !0, acrossPanes: d.acrossPanes }), O = [], B = this.horiz;
if (u = !Z(this.min) || !Z(this.max) || v < this.min && u < this.min || v > this.max && u > this.max, v = this.getPlotLinePath({ value: v, force: !0, acrossPanes: d.acrossPanes }), d = 1, v && P) {
if (u) {
var C = v.toString() === P.toString();
d = 0;
}
for (u = 0; u < v.length; u += 2) {
var b = v[u], M = v[u + 1], x = P[u], a = P[u + 1];
b[0] !== "M" && b[0] !== "L" || M[0] !== "M" && M[0] !== "L" || x[0] !== "M" && x[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && x[1] === b[1] ? (x[1] += d, a[1] += d) : B || x[2] !== b[2] || (x[2] += d, a[2] += d), O.push(["M", b[1], b[2]], ["L", M[1], M[2]], ["L", a[1], a[2]], ["L", x[1], x[2]], ["Z"])), O.isFlat = C;
}
}
return O;
}, w.prototype.addPlotBand = function(v) {
return this.addPlotBandOrLine(v, "plotBands");
}, w.prototype.addPlotLine = function(v) {
return this.addPlotBandOrLine(v, "plotLines");
}, w.prototype.addPlotBandOrLine = function(v, u) {
var d = this, P = this.userOptions, O = new W(this, v);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (P.plotLines || []).concat(P.plotBands || []).forEach(function(C) {
d.addPlotBandOrLine(C);
})), u) {
var B = P[u] || [];
B.push(v), P[u] = B;
}
this.plotLinesAndBands.push(O);
}
return O;
}, w.prototype.removePlotBandOrLine = function(v) {
var u = this.plotLinesAndBands, d = this.options, P = this.userOptions;
if (u) {
for (var O = u.length; O--; )
u[O].id === v && u[O].destroy();
[d.plotLines || [], P.plotLines || [], d.plotBands || [], P.plotBands || []].forEach(function(B) {
for (O = B.length; O--; )
(B[O] || {}).id === v && R(B, B[O]);
});
}
}, w.prototype.removePlotBand = function(v) {
this.removePlotBandOrLine(v);
}, w.prototype.removePlotLine = function(v) {
this.removePlotBandOrLine(v);
}, w;
}();
}(H || (H = {})), H;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [h["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], h["Core/Utilities.js"]], function(y, R) {
var I = R.arrayMax, Z = R.arrayMin, H = R.defined, $ = R.destroyObjectProperties, U = R.erase, W = R.fireEvent, N = R.merge, w = R.objectEach, v = R.pick;
return R = function() {
function u(d, P) {
this.axis = d, P && (this.options = P, this.id = P.id);
}
return u.compose = function(d) {
return y.compose(u, d);
}, u.prototype.render = function() {
W(this, "render");
var d = this, P = d.axis, O = P.horiz, B = P.logarithmic, C = d.options, b = C.color, M = v(C.zIndex, 0), x = C.events, a = {}, c = P.chart.renderer, p = C.label, i = d.label, l = C.to, s = C.from, t = C.value, n = d.svgElem, o = [], A = H(s) && H(l);
o = H(t);
var _ = !n, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (C.className || "") }, j = A ? "bands" : "lines";
if (B && (s = B.log2lin(s), l = B.log2lin(l), t = B.log2lin(t)), P.chart.styledMode || (o ? (D.stroke = b || "#999999", D["stroke-width"] = v(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : A && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = M, j += "-" + M, (B = P.plotLinesAndBandsGroups[j]) || (P.plotLinesAndBandsGroups[j] = B = c.g("plot-" + j).attr(a).add()), _ && (d.svgElem = n = c.path().attr(D).add(B)), o)
o = P.getPlotLinePath({ value: t, lineWidth: n.strokeWidth(), acrossPanes: C.acrossPanes });
else if (A)
o = P.getPlotBandPath(
s,
l,
C
);
else
return;
return !d.eventsAdded && x && (w(x, function(T, X) {
n.on(X, function(f) {
x[X].apply(d, [f]);
});
}), d.eventsAdded = !0), (_ || !n.d) && o && o.length ? n.attr({ d: o }) : n && (o ? (n.show(!0), n.animate({ d: o })) : n.d && (n.hide(), i && (d.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && o && o.length && 0 < P.width && 0 < P.height && !o.isFlat ? (p = N({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(p, o, A, M)) : i && i.hide(), d;
}, u.prototype.renderLabel = function(d, P, O, B) {
var C = this.axis, b = C.chart.renderer, M = this.label;
M || (this.label = M = b.text(this.getLabelText(d), 0, 0, d.useHTML).attr({ align: d.textAlign || d.align, rotation: d.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (d.className || ""), zIndex: B }).add(), C.chart.styledMode || M.css(N({ textOverflow: "ellipsis" }, d.style))), B = P.xBounds || [P[0][1], P[1][1], O ? P[2][1] : P[0][1]], P = P.yBounds || [P[0][2], P[1][2], O ? P[2][2] : P[0][2]], O = Z(B), b = Z(P), M.align(d, !1, { x: O, y: b, width: I(B) - O, height: I(P) - b }), M.alignValue && M.alignValue !== "left" || M.css({ width: (M.rotation === 90 ? C.height - (M.alignAttr.y - C.top) : C.width - (M.alignAttr.x - C.left)) + "px" }), M.show(!0);
}, u.prototype.getLabelText = function(d) {
return H(d.formatter) ? d.formatter.call(this) : d.text;
}, u.prototype.destroy = function() {
U(this.axis.plotLinesAndBands, this), delete this.axis, $(this);
}, u;
}(), R;
}), E(
h,
"Core/Tooltip.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Renderer/RendererUtilities.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]],
function(y, R, I, Z, H) {
var $ = y.format, U = R.doc, W = I.distribute, N = H.addEvent, w = H.clamp, v = H.css, u = H.defined, d = H.discardElement, P = H.extend, O = H.fireEvent, B = H.isArray, C = H.isNumber, b = H.isString, M = H.merge, x = H.pick, a = H.splat, c = H.syncTimeout;
return y = function() {
function p(i, l) {
this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, l);
}
return p.prototype.applyFilter = function() {
var i = this.chart;
i.renderer.definition({
tagName: "filter",
attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 },
children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }]
});
}, p.prototype.bodyFormatter = function(i) {
return i.map(function(l) {
var s = l.series.tooltipOptions;
return (s[(l.point.formatPrefix || "point") + "Formatter"] || l.point.tooltipFormatter).call(l.point, s[(l.point.formatPrefix || "point") + "Format"] || "");
});
}, p.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(l) {
var s = l && l.tt;
s && (!s.isActive || i ? l.tt = s.destroy() : s.isActive = !1);
});
}, p.prototype.defaultFormatter = function(i) {
var l = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(l[0])];
return s = s.concat(i.bodyFormatter(l)), s.push(i.tooltipFooterHeaderFormatter(l[0], !0)), s;
}, p.prototype.destroy = function() {
this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), d(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
}, p.prototype.getAnchor = function(i, l) {
var s = this.chart, t = s.pointer, n = s.inverted, o = s.plotTop, A = s.plotLeft, _, D, j = 0, T = 0;
return i = a(i), this.followPointer && l ? (typeof l.chartX > "u" && (l = t.normalize(l)), t = [l.chartX - A, l.chartY - o]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
_ = X.series.yAxis, D = X.series.xAxis, j += X.plotX || 0, T += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (n ? (j += o + s.plotHeight - D.len - D.pos, T += A + s.plotWidth - _.len - _.pos) : (j += D.pos - A, T += _.pos - o));
}), j /= i.length, T /= i.length, t = [n ? s.plotWidth - T : j, n ? s.plotHeight - j : T], this.shared && 1 < i.length && l && (n ? t[0] = l.chartX - A : t[1] = l.chartY - o)), t.map(Math.round);
}, p.prototype.getLabel = function() {
var i = this, l = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, n = "tooltip" + (u(s.className) ? " " + s.className : ""), o = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
i.inContact = !0;
}, _ = function(Y) {
var F = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && F && F.onMouseOut && F.onMouseOut();
}, D, j = this.chart.renderer;
if (i.label) {
var T = !i.label.hasClass("highcharts-label");
(t && !T || !t && T) && i.destroy();
}
if (!this.label) {
if (this.outside) {
T = this.chart.options.chart.style;
var X = Z.getRendererType();
this.container = D = R.doc.createElement("div"), D.className = "highcharts-tooltip-container", v(D, { position: "absolute", top: "1px", pointerEvents: o, zIndex: Math.max(this.options.style.zIndex || 0, (T && T.zIndex || 0) + 3) }), N(D, "mouseenter", A), N(D, "mouseleave", _), R.doc.body.appendChild(D), this.renderer = j = new X(D, 0, 0, T, void 0, void 0, j.styledMode);
}
if (t ? this.label = j.g(n) : (this.label = j.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, n).attr({ padding: s.padding, r: s.borderRadius }), l || this.label.attr({
fill: s.backgroundColor,
"stroke-width": s.borderWidth
}).css(s.style).css({ pointerEvents: o }).shadow(s.shadow)), l && s.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
var f = this.label, m = f.xSetter, L = f.ySetter;
f.xSetter = function(Y) {
m.call(f, i.distance), D.style.left = Y + "px";
}, f.ySetter = function(Y) {
L.call(f, i.distance), D.style.top = Y + "px";
};
}
this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
}
return this.label;
}, p.prototype.getPosition = function(i, l, s) {
var t = this.chart, n = this.distance, o = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? U.documentElement.clientWidth - 2 * n : t.chartWidth, j = _ ? Math.max(U.body.scrollHeight, U.documentElement.scrollHeight, U.body.offsetHeight, U.documentElement.offsetHeight, U.documentElement.clientHeight) : t.chartHeight, T = t.pointer.getChartPosition(), X = function(z) {
var V = z === "x";
return [z, V ? D : j, V ? i : l].concat(_ ? [V ? i * T.scaleX : l * T.scaleY, V ? T.left - n + (s.plotX + t.plotLeft) * T.scaleX : T.top - n + (s.plotY + t.plotTop) * T.scaleY, 0, V ? D : j] : [V ? i : l, V ? s.plotX + t.plotLeft : s.plotY + t.plotTop, V ? t.plotLeft : t.plotTop, V ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, f = X("y"), m = X("x"), L;
X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var Y = !this.followPointer && x(s.ttBelow, !t.inverted === X), F = function(z, V, q, it, et, nt, rt) {
var ct = _ ? z === "y" ? n * T.scaleY : n * T.scaleX : n, gt = (q - it) / 2, dt = it < et - n, lt = et + n + it < V, at = et - ct - q + gt;
if (et = et + ct - gt, Y && lt)
o[z] = et;
else if (!Y && dt)
o[z] = at;
else if (dt)
o[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
else if (lt)
o[z] = Math.max(nt, et + A + q > V ? et : et + A);
else
return !1;
}, Q = function(z, V, q, it, et) {
var nt;
return et < n || et > V - n ? nt = !1 : o[z] = et < q / 2 ? 1 : et > V - it / 2 ? V - it - 2 : et - q / 2, nt;
}, k = function(z) {
var V = f;
f = m, m = V, L = z;
}, G = function() {
F.apply(0, f) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? o.x = o.y = 0 : (k(!0), G());
};
return (t.inverted || 1 < this.len) && k(), G(), o;
}, p.prototype.hide = function(i) {
var l = this;
H.clearTimeout(this.hideTimer), i = x(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
l.getLabel().fadeOut(i && void 0), l.isHidden = !0;
}, i));
}, p.prototype.init = function(i, l) {
this.chart = i, this.options = l, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = l.split && !i.inverted && !i.polar, this.shared = l.shared || this.split, this.outside = x(l.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, p.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, p.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, p.prototype.move = function(i, l, s, t) {
var n = this, o = n.now, A = n.options.animation !== !1 && !n.isHidden && (1 < Math.abs(i - o.x) || 1 < Math.abs(l - o.y)), _ = n.followPointer || 1 < n.len;
P(o, { x: A ? (2 * o.x + i) / 3 : i, y: A ? (o.y + l) / 2 : l, anchorX: _ ? void 0 : A ? (2 * o.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (o.anchorY + t) / 2 : t }), n.getLabel().attr(o), n.drawTracker(), A && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
n && n.move(i, l, s, t);
}, 32));
}, p.prototype.refresh = function(i, l) {
var s = this.chart, t = this.options, n = a(i), o = n[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, j = s.styledMode, T = {};
if (t.enabled) {
H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && o.series.tooltipOptions.followPointer, i = this.getAnchor(i, l);
var X = i[0], f = i[1];
if (D && this.allowShared ? (s.pointer.applyInactiveState(n), n.forEach(function(Y) {
Y.setState("hover"), A.push(Y.getLabelConfig());
}), T = { x: o.category, y: o.y }, T.points = A) : T = o.getLabelConfig(), this.len = A.length, _ = _.call(T, this), D = o.series, this.distance = x(D.tooltipOptions.distance, 16), _ === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(
_,
n
);
else {
var m = X, L = f;
if (l && s.pointer.isDirectTouch && (m = l.chartX - s.plotLeft, L = l.chartY - s.plotTop), s.polar || D.options.clip === !1 || n.some(function(Y) {
return Y.series.shouldShowTooltip(m, L);
}))
l = this.getLabel(), t.style.width && !j || l.css({ width: this.chart.spacingBox.width + "px" }), l.attr({ text: _ && _.join ? _.join("") : _ }), l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + x(o.colorIndex, D.colorIndex)), j || l.attr({ stroke: t.borderColor || o.color || D.color || "#666666" }), this.updatePosition({
plotX: X,
plotY: f,
negative: o.negative,
ttBelow: o.ttBelow,
h: i[2] || 0
});
else {
this.hide();
return;
}
}
this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
}
O(this, "refresh");
}
}, p.prototype.renderSplit = function(i, l) {
function s(lt, at, J, tt, st) {
return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, lt = w(lt - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, lt = st ? lt - tt - Q : lt + Q, lt = w(lt, st ? lt : z.left, z.right)), { x: lt, y: at };
}
var t = this, n = t.chart, o = t.chart, A = o.chartWidth, _ = o.chartHeight, D = o.plotHeight, j = o.plotLeft, T = o.plotTop, X = o.pointer, f = o.scrollablePixelsY;
f = f === void 0 ? 0 : f;
var m = o.scrollablePixelsX, L = o.scrollingContainer;
L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
var Y = L.scrollLeft;
L = L.scrollTop;
var F = o.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? U.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, V = t.getLabel(), q = this.renderer || n.renderer, it = !(!n.xAxis[0] || !n.xAxis[0].opposite);
n = X.getChartPosition();
var et = n.left;
n = n.top;
var nt = T + L, rt = 0, ct = D - f;
b(i) && (i = [!1, i]), i = i.slice(0, l.length + 1).reduce(function(lt, at, J) {
if (at !== !1 && at !== "") {
J = l[J - 1] || { isHeader: !0, plotX: l[0].plotX, plotY: D, series: {} };
var tt = J.isHeader, st = tt ? t : J.series;
at = at.toString();
var ht = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + x(J.colorIndex, yt.colorIndex, "none");
if (ht || (ht = { padding: k.padding, r: k.borderRadius }, F || (ht.fill = k.backgroundColor, ht["stroke-width"] = k.borderWidth), ht = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(ht).add(V)), ht.isActive = !0, ht.attr({ text: at }), F || ht.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = ht, pt = st.getBBox(), at = pt.width + st.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, ht = J.series, J.isHeader) {
yt = j + yt;
var Ct = T + D / 2;
} else {
var Tt = ht.xAxis, kt = ht.yAxis;
yt = Tt.pos + w(yt, -Q, Tt.len + Q), ht.shouldShowTooltip(0, kt.pos - T + vt, { ignoreX: !0 }) && (Ct = kt.pos + vt);
}
yt = w(yt, z.left - Q, z.right + Q), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(
yt,
Ct,
tt,
at
), lt.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: x(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
}
return lt;
}, []), !G && i.some(function(lt) {
var at = (t.outside ? et : 0) + lt.anchorX;
return at < z.left && at + lt.boxWidth < z.right ? !0 : at < et - z.left + lt.boxWidth && z.right - at > at;
}) && (i = i.map(function(lt) {
var at = s(lt.anchorX, lt.anchorY, lt.point.isHeader, lt.boxWidth, !1);
return P(lt, { target: at.y, x: at.x });
})), t.cleanSplit(), W(i, ct);
var gt = et, dt = et;
i.forEach(function(lt) {
var at = lt.x, J = lt.boxWidth;
lt = lt.isHeader, lt || (t.outside && et + at < gt && (gt = et + at), !lt && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(lt) {
var at = lt.x, J = lt.anchorX, tt = lt.pos, st = lt.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: lt.anchorY }, t.outside && at < J) {
var ht = et - gt;
0 < ht && (st || (tt.x = at + ht, tt.anchorX = J + ht), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + ht));
}
lt.tt.attr(tt);
}), i = t.container, f = t.renderer, t.outside && i && f && (o = V.getBBox(), f.setSize(o.width + o.x, o.height + o.y, !1), i.style.left = gt + "px", i.style.top = n + "px");
}, p.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, l = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
if (l && s) {
var t = { x: 0, y: 0, width: 0, height: 0 };
s = this.getAnchor(s);
var n = l.getBBox();
s[0] += i.plotLeft - l.translateX, s[1] += i.plotTop - l.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), n.width - s[0]) : Math.max(Math.abs(s[0]), n.width), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), n.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), n.height), this.tracker ? this.tracker.attr(t) : (this.tracker = l.renderer.rect(t).addClass("highcharts-tracker").add(l), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, p.prototype.styledModeFormat = function(i) {
return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
}, p.prototype.tooltipFooterHeaderFormatter = function(i, l) {
var s = i.series, t = s.tooltipOptions, n = s.xAxis, o = n && n.dateTime;
n = {
isFooter: l,
labelConfig: i
};
var A = t.xDateFormat, _ = t[l ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", n, function(D) {
o && !A && C(i.key) && (A = o.getXDateFormat(i.key, t.dateTimeLabelFormats)), o && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(j) {
_ = _.replace("{point." + j + "}", "{point." + j + ":" + A + "}");
}), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = $(_, { point: i, series: s }, this.chart);
}), n.text;
}, p.prototype.update = function(i) {
this.destroy(), M(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, M(!0, this.options, i));
}, p.prototype.updatePosition = function(i) {
var l = this.chart, s = this.options, t = l.pointer, n = this.getLabel();
t = t.getChartPosition();
var o = (s.positioner || this.getPosition).call(this, n.width, n.height, i), A = i.plotX + l.plotLeft;
i = i.plotY + l.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(n.width + s, n.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (v(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - o.x, i += t.top - o.y), this.move(Math.round(o.x), Math.round(o.y || 0), A, i);
}, p;
}(), y;
}
), E(h, "Core/Series/Point.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Animation/AnimationUtilities.js"], h["Core/DefaultOptions.js"], h["Core/FormatUtilities.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H) {
var $ = R.animObject, U = I.defaultOptions, W = Z.format, N = H.addEvent, w = H.defined, v = H.erase, u = H.extend, d = H.fireEvent, P = H.getNestedProperty, O = H.isArray, B = H.isFunction, C = H.isNumber, b = H.isObject, M = H.merge, x = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
return R = function() {
function l() {
this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
}
return l.prototype.animateBeforeDestroy = function() {
var s = this, t = { x: s.startXPos, opacity: 0 }, n = s.getGraphicalProps();
n.singular.forEach(function(o) {
s[o] = s[o].animate(o === "dataLabel" ? {
x: s[o].startXPos,
y: s[o].startYPos,
opacity: 0
} : t);
}), n.plural.forEach(function(o) {
s[o].forEach(function(A) {
A.element && A.animate(u({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
});
});
}, l.prototype.applyOptions = function(s, t) {
var n = this.series, o = n.options.pointValKey || n.pointValKey;
return s = l.prototype.optionsToObject.call(this, s), u(this, s), this.options = this.options ? u(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, o && (this.y = l.prototype.getNestedProperty.call(this, o)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && n.xAxis && n.xAxis.hasNames && (this.x = n.xAxis.nameToX(this)), typeof this.x > "u" && n ? this.x = typeof t > "u" ? n.autoIncrement() : t : C(s.x) && n.options.relativeXValue && (this.x = n.autoIncrement(s.x)), this;
}, l.prototype.destroy = function() {
function s() {
(t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
for (D in t)
t[D] = null;
}
var t = this, n = t.series, o = n.chart;
n = n.options.dataSorting;
var A = o.hoverPoints, _ = $(t.series.chart.renderer.globalAnimation), D;
t.legendItem && o.legend.destroyItem(t), A && (t.setState(), v(A, t), A.length || (o.hoverPoints = null)), t === o.hoverPoint && t.onMouseOut(), n && n.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), o.pointCount--;
}, l.prototype.destroyElements = function(s) {
var t = this;
s = t.getGraphicalProps(s), s.singular.forEach(function(n) {
t[n] = t[n].destroy();
}), s.plural.forEach(function(n) {
t[n].forEach(function(o) {
o.element && o.destroy();
}), delete t[n];
});
}, l.prototype.firePointEvent = function(s, t, n) {
var o = this, A = this.series.options;
(A.point.events[s] || o.options && o.options.events && o.options.events[s]) && o.importEvents(), s === "click" && A.allowPointSelect && (n = function(_) {
o.select && o.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
}), d(o, s, t, n);
}, l.prototype.getClassName = function() {
return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
}, l.prototype.getGraphicalProps = function(s) {
var t = this, n = [], o = { singular: [], plural: [] }, A;
for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && n.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && n.push("dataLabel", "dataLabelUpper", "connector"), A = n.length; A--; ) {
var _ = n[A];
t[_] && o.singular.push(_);
}
return ["dataLabel", "connector"].forEach(function(D) {
var j = D + "s";
s[D] && t[j] && o.plural.push(j);
}), o;
}, l.prototype.getLabelConfig = function() {
return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
}, l.prototype.getNestedProperty = function(s) {
if (s)
return s.indexOf("custom.") === 0 ? P(s, this.options) : this[s];
}, l.prototype.getZone = function() {
var s = this.series, t = s.zones;
s = s.zoneAxis || "y";
var n, o = 0;
for (n = t[o]; this[s] >= n.value; )
n = t[++o];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = n && n.color && !this.options.color ? n.color : this.nonZonedColor, n;
}, l.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, l.prototype.init = function(s, t, n) {
return this.series = s, this.applyOptions(t, n), this.id = w(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, d(this, "afterInit"), this;
}, l.prototype.optionsToObject = function(s) {
var t = this.series, n = t.options.keys, o = n || t.pointArrayMap || ["y"], A = o.length, _ = {}, D = 0, j = 0;
if (C(s) || s === null)
_[o[0]] = s;
else if (O(s))
for (!n && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); j < A; )
n && typeof s[D] > "u" || (0 < o[j].indexOf(".") ? l.prototype.setNestedProperty(_, s[D], o[j]) : _[o[j]] = s[D]), D++, j++;
else
typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
return _;
}, l.prototype.resolveColor = function() {
var s = this.series, t = s.chart.styledMode, n = s.chart.options.chart.colorCount;
if (delete this.nonZonedColor, s.options.colorByPoint) {
if (!t) {
n = s.options.colors || s.chart.options.colors;
var o = n[s.colorCounter];
n = n.length;
}
t = s.colorCounter, s.colorCounter++, s.colorCounter === n && (s.colorCounter = 0);
} else
t || (o = s.color), t = s.colorIndex;
this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, o);
}, l.prototype.setNestedProperty = function(s, t, n) {
return n.split(".").reduce(function(o, A, _, D) {
return o[A] = D.length - 1 === _ ? t : b(o[A], !0) ? o[A] : {}, o[A];
}, s), s;
}, l.prototype.tooltipFormatter = function(s) {
var t = this.series, n = t.tooltipOptions, o = a(n.valueDecimals, ""), A = n.valuePrefix || "", _ = n.valueSuffix || "";
return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + o + "f}");
}), W(s, { point: this, series: this.series }, t.chart);
}, l.prototype.update = function(s, t, n, o) {
function A() {
_.applyOptions(s);
var m = j && _.hasDummyGraphic;
m = _.y === null ? !m : m, j && m && (_.graphic = j.destroy(), delete _.hasDummyGraphic), b(s, !0) && (j && j.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = j.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), f = _.index, D.updateParallelArrays(_, f), X.data[f] = b(X.data[f], !0) || b(s, !0) ? _.options : a(s, X.data[f]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (T.isDirtyBox = !0), X.legendType === "point" && (T.isDirtyLegend = !0), t && T.redraw(n);
}
var _ = this, D = _.series, j = _.graphic, T = D.chart, X = D.options, f;
t = a(t, !0), o === !1 ? A() : _.firePointEvent("update", { options: s }, A);
}, l.prototype.remove = function(s, t) {
this.series.removePoint(this.series.data.indexOf(this), s, t);
}, l.prototype.select = function(s, t) {
var n = this, o = n.series, A = o.chart;
this.selectedStaging = s = a(s, !n.selected), n.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
n.selected = n.options.selected = s, o.options.data[o.data.indexOf(n)] = n.options, n.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
var D = _.series;
_.selected && _ !== n && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, l.prototype.onMouseOver = function(s) {
var t = this.series.chart, n = t.pointer;
s = s ? n.normalize(s) : n.getChartCoordinatesFromPoint(this, t.inverted), n.runPointActions(
s,
this
);
}, l.prototype.onMouseOut = function() {
var s = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
t.setState();
}), s.hoverPoints = s.hoverPoint = null;
}, l.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var s = this, t = M(s.series.options.point, s.options).events;
s.events = t, x(t, function(n, o) {
B(n) && N(s, o, n);
}), this.hasImportedEvents = !0;
}
}, l.prototype.setState = function(s, t) {
var n = this.series, o = this.state, A = n.options.states[s || "normal"] || {}, _ = U.plotOptions[n.type].marker && n.options.marker, D = _ && _.enabled === !1, j = _ && _.states && _.states[s || "normal"] || {}, T = j.enabled === !1, X = this.marker || {}, f = n.chart, m = _ && n.markerAttribs, L = n.halo, Y, F = n.stateMarkerGraphic;
if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (T || D && j.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
if (this.state = s, m && (Y = n.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
if (o && this.graphic.removeClass("highcharts-point-" + o), s && this.graphic.addClass("highcharts-point-" + s), !f.styledMode) {
var Q = n.pointAttribs(this, s), k = a(f.options.chart.animation, A.animation);
n.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
G && G.animate({ opacity: Q.opacity }, k);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
}
Y && this.graphic.animate(Y, a(f.options.chart.animation, j.animation, _.animation)), F && F.hide();
} else
s && j && (o = X.symbol || n.symbol, F && F.currentSymbol !== o && (F = F.destroy()), Y && (F ? F[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : o && (n.stateMarkerGraphic = F = f.renderer.symbol(o, Y.x, Y.y, Y.width, Y.height).add(n.markerGroup), F.currentSymbol = o)), !f.styledMode && F && this.state !== "inactive" && F.attr(n.pointAttribs(this, s))), F && (F[s && this.isInside ? "show" : "hide"](), F.element.point = this, F.addClass(this.getClassName(), !0));
A = A.halo, Y = (F = this.graphic || F) && F.visibility || "inherit", A && A.size && F && Y !== "hidden" && !this.isCluster ? (L || (n.halo = L = f.renderer.path().add(F.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, n.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, f.styledMode || L.attr(u({ fill: this.color || n.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), d(this, "afterSetState", { state: s });
}
}, l.prototype.haloPath = function(s) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
}, l;
}(), R;
}), E(h, "Core/Pointer.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Tooltip.js"], h["Core/Utilities.js"]], function(y, R, I, Z) {
var H = y.parse, $ = R.charts, U = R.noop, W = Z.addEvent, N = Z.attr, w = Z.css, v = Z.defined, u = Z.extend, d = Z.find, P = Z.fireEvent, O = Z.isNumber, B = Z.isObject, C = Z.objectEach, b = Z.offset, M = Z.pick, x = Z.splat;
return y = function() {
function a(c, p) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
}
return a.prototype.applyInactiveState = function(c) {
var p = [], i;
(c || []).forEach(function(l) {
i = l.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
}), this.chart.series.forEach(function(l) {
p.indexOf(l) === -1 ? l.setState("inactive", !0) : l.options.inactiveOtherPoints && l.setAllPointsToState("inactive");
});
}, a.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(p) {
return p();
}), this.eventsToUnbind = [], R.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
c[i] = void 0;
});
}, a.prototype.drag = function(c) {
var p = this.chart, i = p.options.chart, l = this.zoomHor, s = this.zoomVert, t = p.plotLeft, n = p.plotTop, o = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, j = B(i.panning) ? i.panning && i.panning.enabled : i.panning, T = i.panKey && c[i.panKey + "Key"], X = c.chartX, f = c.chartY, m = this.selectionMarker;
if ((!m || !m.touch) && (X < t ? X = t : X > t + o && (X = t + o), f < n ? f = n : f > n + A && (f = n + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - f, 2)), 10 < this.hasDragged)) {
var L = p.isInsidePlot(_ - t, D - n, { visiblePlotOnly: !0 });
!p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || T || m || (this.selectionMarker = m = p.renderer.rect(t, n, l ? 1 : o, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && l && (l = X - _, m.attr({ width: Math.abs(l), x: (0 < l ? 0 : l) + _ })), m && s && (l = f - D, m.attr({ height: Math.abs(l), y: (0 < l ? 0 : l) + D })), L && !m && j && p.pan(c, i.panning);
}
}, a.prototype.dragStart = function(c) {
var p = this.chart;
p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
}, a.prototype.drop = function(c) {
var p = this, i = this.chart, l = this.hasPinched;
if (this.selectionMarker) {
var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, n = s.attr ? s.attr("y") : s.y, o = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: n, width: o, height: A }, D = !!i.mapView;
(this.hasDragged || l) && (i.axes.forEach(function(j) {
if (j.zoomEnabled && v(j.min) && (l || p[{ xAxis: "zoomX", yAxis: "zoomY" }[j.coll]]) && O(t) && O(n)) {
var T = j.horiz, X = c.type === "touchend" ? j.minPixelPadding : 0, f = j.toValue((T ? t : n) + X);
T = j.toValue((T ? t + o : n + A) - X), _[j.coll].push({ axis: j, min: Math.min(f, T), max: Math.max(f, T) }), D = !0;
}
}), D && P(i, "selection", _, function(j) {
i.zoom(u(
j,
l ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), l && this.scaleGroups();
}
i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, a.prototype.findNearestKDPoint = function(c, p, i) {
var l = this.chart, s = l.hoverPoint;
if (l = l.tooltip, s && l && l.isStickyOnContact())
return s;
var t;
return c.forEach(function(n) {
var o = !(n.noSharedTooltip && p) && 0 > n.options.findNearestPointBy.indexOf("y");
if (n = n.searchPoint(i, o), (o = B(n, !0) && n.series) && !(o = !B(t, !0))) {
o = t.distX - n.distX;
var A = t.dist - n.dist, _ = (n.series.group && n.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
o = 0 < (o !== 0 && p ? o : A !== 0 ? A : _ !== 0 ? _ : t.series.index > n.series.index ? -1 : 1);
}
o && (t = n);
}), t;
}, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
var i = c.series, l = i.xAxis;
i = i.yAxis;
var s = c.shapeArgs;
if (l && i) {
var t = M(c.clientX, c.plotX), n = c.plotY || 0;
return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, n = s.y), p ? { chartX: i.len + i.pos - n, chartY: l.len + l.pos - t } : { chartX: t + l.pos, chartY: n + i.pos };
}
if (s && s.x && s.y)
return { chartX: s.x, chartY: s.y };
}, a.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, p = b(c);
this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
}, a.prototype.getCoordinates = function(c) {
var p = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), p;
}, a.prototype.getHoverData = function(c, p, i, l, s, t) {
var n = [];
l = !(!l || !c);
var o = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
P(this, "beforeGetHoverData", o);
var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
return o.filter ? o.filter(D) : D.visible && !(!s && D.directTouch) && M(D.options.enableMouseTracking, !0) && D.stickyTracking;
}), _ = l || !t ? c : this.findNearestKDPoint(A, s, t);
return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
return o.filter ? o.filter(D) : D.visible && !(!s && D.directTouch) && M(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
}), A.forEach(function(D) {
var j = d(D.points, function(T) {
return T.x === _.x && !T.isNull;
});
B(j) && (D.chart.isBoosting && (j = D.getPoint(j)), n.push(j));
})) : n.push(_)), o = { hoverPoint: _ }, P(this, "afterGetHoverData", o), { hoverPoint: o.hoverPoint, hoverSeries: p, hoverPoints: n };
}, a.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var p; c && !p; )
p = c.point, c = c.parentNode;
return p;
}, a.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var p = this.chart.hoverSeries;
this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
}, a.prototype.inClass = function(c, p) {
for (var i; c; ) {
if (i = N(c, "class")) {
if (i.indexOf(p) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, a.prototype.init = function(c, p) {
this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = M(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, a.prototype.normalize = function(c, p) {
var i = c.touches, l = i ? i.length ? i.item(0) : M(i.changedTouches, c.changedTouches)[0] : c;
return p || (p = this.getChartPosition()), i = l.pageX - p.left, l = l.pageY - p.top, i /= p.scaleX, l /= p.scaleY, u(c, { chartX: Math.round(i), chartY: Math.round(l) });
}, a.prototype.onContainerClick = function(c) {
var p = this.chart, i = p.hoverPoint;
c = this.normalize(c);
var l = p.plotLeft, s = p.plotTop;
p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (P(i.series, "click", u(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (u(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - l, c.chartY - s, { visiblePlotOnly: !0 }) && P(p, "click", c)));
}, a.prototype.onContainerMouseDown = function(c) {
var p = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), R.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, a.prototype.onContainerMouseLeave = function(c) {
var p = $[M(a.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, a.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, a.prototype.onContainerMouseMove = function(c) {
var p = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, a.prototype.onDocumentTouchEnd = function(c) {
var p = $[M(
a.hoverChartIndex,
-1
)];
p && p.pointer.drop(c);
}, a.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, a.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, a.prototype.onDocumentMouseMove = function(c) {
var p = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var l = p.tooltip;
!i || l && l.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, a.prototype.onDocumentMouseUp = function(c) {
var p = $[M(a.hoverChartIndex, -1)];
p && p.pointer.drop(c);
}, a.prototype.pinch = function(c) {
var p = this, i = p.chart, l = p.pinchDown, s = c.touches || [], t = s.length, n = p.lastValidTouch, o = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, j = p.selectionMarker;
1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), o && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(T) {
return p.normalize(T);
}), c.type === "touchstart" ? ([].forEach.call(s, function(T, X) {
l[X] = { chartX: T.chartX, chartY: T.chartY };
}), n.x = [l[0].chartX, l[1] && l[1].chartX], n.y = [l[0].chartY, l[1] && l[1].chartY], i.axes.forEach(function(T) {
if (T.zoomEnabled) {
var X = i.bounds[T.horiz ? "h" : "v"], f = T.minPixelPadding, m = T.toPixels(Math.min(M(T.options.min, T.dataMin), T.dataMin)), L = T.toPixels(Math.max(M(T.options.max, T.dataMax), T.dataMax)), Y = Math.max(m, L);
X.min = Math.min(T.pos, Math.min(
m,
L
) - f), X.max = Math.max(T.pos + T.len, Y + f);
}
}), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : l.length && (P(i, "touchpan", { originalEvent: c }, function() {
j || (p.selectionMarker = j = u({ destroy: U, touch: !0 }, i.plotBox)), p.pinchTranslate(l, s, A, j, D, n), p.hasPinched = o, p.scaleGroups(A, D);
}), p.res && (p.res = !1, this.reset(!1, 0)));
}, a.prototype.pinchTranslate = function(c, p, i, l, s, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, l, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, l, s, t);
}, a.prototype.pinchTranslateDirection = function(c, p, i, l, s, t, n, o) {
var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", j = "chart" + D, T = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], f = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][j], F = !L && p[1][j];
p = function() {
typeof V == "number" && 20 < Math.abs(Y - F) && (G = o || Math.abs(z - V) / Math.abs(Y - F)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
};
var Q, k, G = o || 1, z = i[0][j], V = !L && i[1][j];
if (p(), i = k, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (z -= 0.8 * (z - n[_][0]), typeof V == "number" && (V -= 0.8 * (V - n[_][1])), p()) : n[_] = [z, V], f || (t[_] = k - X, t[T] = Q), t = f ? 1 / G : G, s[T] = Q, s[_] = i, l[f ? c ? "scaleY" : "scaleX" : "scale" + D] = G, l["translate" + D] = t * X + (z - t * Y);
}, a.prototype.reset = function(c, p) {
var i = this.chart, l = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, n = i.tooltip, o = n && n.shared ? t : s;
c && o && x(o).forEach(function(A) {
A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
}), c ? n && o && x(o).length && (n.refresh(o), n.shared && t ? t.forEach(function(A) {
A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
null,
A
), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
}) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
}))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
A.setState();
}), l && l.onMouseOut(), n && n.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
A.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, a.prototype.runPointActions = function(c, p) {
var i = this.chart, l = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = l ? l.shared : !1, t = p || i.hoverPoint, n = t && t.series || i.hoverSeries;
p = this.getHoverData(t, n, i.series, (!c || c.type !== "touchmove") && (!!p || n && n.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, n = p.hoverSeries;
var o = p.hoverPoints;
if (p = n && n.tooltipOptions.followPointer && !n.tooltipOptions.split, s = s && n && !n.noSharedTooltip, t && (t !== i.hoverPoint || l && l.isHidden)) {
if ((i.hoverPoints || []).forEach(function(A) {
o.indexOf(A) === -1 && A.setState();
}), i.hoverSeries !== n && n.onMouseOver(), this.applyInactiveState(o), (o || []).forEach(function(A) {
A.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = o, i.hoverPoint = t, t.firePointEvent("mouseOver"), l && l.refresh(s ? o : t, c);
} else
p && l && !l.isHidden && (t = l.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && l.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = W(i.container.ownerDocument, "mousemove", function(A) {
var _ = $[a.hoverChartIndex];
_ && _.pointer.onDocumentMouseMove(A);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
var _ = M((A.crosshair || {}).snap, !0), D;
_ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = d(o, function(j) {
return j.series[A.coll] === A;
}))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
});
}, a.prototype.scaleGroups = function(c, p) {
var i = this.chart;
i.series.forEach(function(l) {
var s = c || l.getPlotBox();
l.group && (l.xAxis && l.xAxis.zoomEnabled || i.mapView) && (l.group.attr(s), l.markerGroup && (l.markerGroup.attr(s), l.markerGroup.clip(p ? i.clipRect : null)), l.dataLabelsGroup && l.dataLabelsGroup.attr(s));
}), i.clipRect.attr(p || i.clipBox);
}, a.prototype.setDOMEvents = function() {
var c = this, p = this.chart.container, i = p.ownerDocument;
p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(W(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(W(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = W(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var l = this.chart.renderTo.parentElement; l && l.tagName !== "BODY"; )
this.eventsToUnbind.push(W(l, "scroll", function() {
delete c.chartPosition;
})), l = l.parentElement;
R.hasTouch && (this.eventsToUnbind.push(W(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(W(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = W(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, a.prototype.setHoverChartIndex = function() {
var c = this.chart, p = R.charts[M(a.hoverChartIndex, -1)];
p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
}, a.prototype.touch = function(c, p) {
var i = this.chart;
if (this.setHoverChartIndex(), c.touches.length === 1)
if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
if (p && this.runPointActions(c), c.type === "touchmove") {
p = this.pinchDown;
var l = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
}
M(l, !0) && this.pinch(c);
} else
p && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, a.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, a.prototype.zoomOption = function(c) {
var p = this.chart, i = p.options.chart;
p = p.inverted;
var l = i.zoomType || "";
/touch/.test(c.type) && (l = M(i.pinchType, l)), this.zoomX = c = /x/.test(l), this.zoomY = i = /y/.test(l), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
}, a;
}(), y;
}), E(h, "Core/MSPointer.js", [h["Core/Globals.js"], h["Core/Pointer.js"], h["Core/Utilities.js"]], function(y, R, I) {
function Z() {
var C = [];
return C.item = function(b) {
return this[b];
}, d(O, function(b) {
C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), C;
}
function H(C, b, M, x) {
var a = U[R.hoverChartIndex || NaN];
C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, x(C), a[b]({ type: M, target: C.currentTarget, preventDefault: N, touches: Z() }));
}
var $ = this && this.__extends || function() {
var C = function(b, M) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
x.__proto__ = a;
} || function(x, a) {
for (var c in a)
a.hasOwnProperty(c) && (x[c] = a[c]);
}, C(b, M);
};
return function(b, M) {
function x() {
this.constructor = b;
}
C(b, M), b.prototype = M === null ? Object.create(M) : (x.prototype = M.prototype, new x());
};
}(), U = y.charts, W = y.doc, N = y.noop, w = y.win, v = I.addEvent, u = I.css, d = I.objectEach, P = I.removeEvent, O = {}, B = !!w.PointerEvent;
return function(C) {
function b() {
return C !== null && C.apply(this, arguments) || this;
}
return $(b, C), b.isRequired = function() {
return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
}, b.prototype.batchMSEvents = function(M) {
M(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), M(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), M(W, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(P), C.prototype.destroy.call(this);
}, b.prototype.init = function(M, x) {
C.prototype.init.call(this, M, x), this.hasZoom && u(M.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(M) {
H(M, "onContainerTouchStart", "touchstart", function(x) {
O[x.pointerId] = { pageX: x.pageX, pageY: x.pageY, target: x.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(M) {
H(M, "onContainerTouchMove", "touchmove", function(x) {
O[x.pointerId] = {
pageX: x.pageX,
pageY: x.pageY
}, O[x.pointerId].target || (O[x.pointerId].target = x.currentTarget);
});
}, b.prototype.onDocumentPointerUp = function(M) {
H(M, "onDocumentTouchEnd", "touchend", function(x) {
delete O[x.pointerId];
});
}, b.prototype.setDOMEvents = function() {
C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(v);
}, b;
}(R);
}), E(h, "Core/Legend/Legend.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $) {
var U = y.animObject, W = y.setAnimation, N = R.format;
y = I.isFirefox;
var w = I.marginNames;
I = I.win;
var v = H.distribute, u = $.addEvent, d = $.createElement, P = $.css, O = $.defined, B = $.discardElement, C = $.find, b = $.fireEvent, M = $.isNumber, x = $.merge, a = $.pick, c = $.relativeLength, p = $.stableSort, i = $.syncTimeout;
return H = $.wrap, $ = function() {
function l(s, t) {
this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = s, this.init(s, t);
}
return l.prototype.init = function(s, t) {
this.chart = s, this.setOptions(t), t.enabled && (this.render(), u(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = u(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, l.prototype.setOptions = function(s) {
var t = a(s.padding, 8);
this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = x(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
s.symbolWidth,
16
), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, l.prototype.update = function(s, t) {
var n = this.chart;
this.setOptions(x(!0, this.options, s)), this.destroy(), n.isDirtyLegend = n.isDirtyBox = !0, a(t, !0) && n.redraw(), b(this, "afterUpdate");
}, l.prototype.colorizeItem = function(s, t) {
if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var n = this.options, o = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
n = t ? n.itemStyle.color : D;
var j = t && s.color || D, T = s.options && s.options.marker, X = { fill: j };
o && o.css({ fill: n, color: n }), A && A.attr({ stroke: j }), _ && (T && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
}
b(this, "afterColorizeItem", { item: s, visible: t });
}, l.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, l.prototype.positionItem = function(s) {
var t = this, n = this.options, o = n.symbolPadding, A = !n.rtl, _ = s._legendItemPos;
n = _[0], _ = _[1];
var D = s.checkbox, j = s.legendGroup;
j && j.element && (o = { translateX: A ? n : this.legendWidth - n - 2 * o - 4, translateY: _ }, A = function() {
b(t, "afterPositionItem", { item: s });
}, O(j.translateY) ? j.animate(o, void 0, A) : (j.attr(o), A())), D && (D.x = n, D.y = _);
}, l.prototype.destroyItem = function(s) {
var t = s.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(n) {
s[n] && (s[n] = s[n].destroy());
}), t && B(s.checkbox);
}, l.prototype.destroy = function() {
function s(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(s, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
}, l.prototype.positionCheckboxes = function() {
var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, n = this.titleHeight;
if (s) {
var o = s.translateY;
this.allItems.forEach(function(A) {
var _ = A.checkbox;
if (_) {
var D = o + n + _.y + (this.scrollOffset || 0) + 3;
P(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > o - 6 && D < o + t - 6 ? "" : "none" });
}
}, this);
}
}, l.prototype.renderTitle = function() {
var s = this.options, t = this.padding, n = s.title, o = 0;
n.text && (this.title || (this.title = this.chart.renderer.label(n.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(n.style), this.title.add(this.group)), n.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), o = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: o })), this.titleHeight = o;
}, l.prototype.setText = function(s) {
var t = this.options;
s.legendItem.attr({ text: t.labelFormat ? N(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
}, l.prototype.renderItem = function(s) {
var t = this.chart, n = t.renderer, o = this.options, A = this.symbolWidth, _ = o.symbolPadding || 0, D = this.itemStyle, j = this.itemHiddenStyle, T = o.layout === "horizontal" ? a(o.itemDistance, 20) : 0, X = !o.rtl, f = !s.series, m = !f && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, F = o.useHTML, Q = s.options.className, k = s.legendItem;
L = A + _ + T + (Y ? 20 : 0), k || (s.legendGroup = n.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (f ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = n.text("", X ? A + _ : -_, this.baseline || 0, F), t.styledMode || k.css(x(s.visible ? D : j)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = n.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = o.symbolHeight || this.fontMetrics.f, o.squareSymbol && (this.symbolWidth = a(o.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + T + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, F)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (o.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), n = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = o.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * n ? t.height : n));
}, l.prototype.layoutItem = function(s) {
var t = this.options, n = this.padding, o = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, j = o ? a(t.itemDistance, 20) : 0, T = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > T ? this.maxItemWidth : s.itemWidth, o && this.itemX - n + t > T && (this.itemX = n, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], o ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((o ? this.itemX - n - (s.checkbox ? 0 : j) : t) + n, this.offsetWidth);
}, l.prototype.getAllItems = function() {
var s = [];
return this.chart.series.forEach(function(t) {
var n = t && t.options;
t && a(n.showInLegend, O(n.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (n.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: s }), s;
}, l.prototype.getAlignment = function() {
var s = this.options;
return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
}, l.prototype.adjustMargins = function(s, t) {
var n = this.chart, o = this.options, A = this.getAlignment();
A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
_.test(A) && !O(s[D]) && (n[w[D]] = Math.max(n[w[D]], n.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * o[D % 2 ? "x" : "y"] + a(o.margin, 12) + t[D] + (n.titleOffset[D] || 0)));
});
}, l.prototype.proximatePositions = function() {
var s = this.chart, t = [], n = this.options.align === "left";
this.allItems.forEach(function(o) {
var A, _ = n;
if (o.yAxis) {
o.xAxis.options.reversed && (_ = !_), o.points && (A = C(_ ? o.points : o.points.slice(0).reverse(), function(j) {
return M(j.plotY);
})), _ = this.itemMarginTop + o.legendItem.getBBox().height + this.itemMarginBottom;
var D = o.yAxis.top - s.plotTop;
o.visible ? (A = A ? A.plotY : o.yAxis.height, A += D - 0.3 * _) : A = D + o.yAxis.height, t.push({ target: A, size: _, item: o });
}
}, this), v(t, s.plotHeight).forEach(function(o) {
o.item._legendItemPos && (o.item._legendItemPos[1] = s.plotTop - s.spacing[0] + o.pos);
});
}, l.prototype.render = function() {
var s = this.chart, t = s.renderer, n = this.options, o = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
this.itemX = o, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(n.width, s.spacingBox.width - o);
var j = s.spacingBox.width - 2 * o - n.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (j /= 2), this.maxLegendWidth = this.widthOption || j, _ || (this.group = _ = t.g("legend").addClass(n.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, f) {
return (X.options && X.options.legendIndex || 0) - (f.options && f.options.legendIndex || 0);
}), n.reversed && A.reverse(), this.allItems = A, this.display = j = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + o;
var T = this.lastItemY + this.lastLineHeight + this.titleHeight;
T = this.handleOverflow(T), T += o, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: n.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: n.borderColor, "stroke-width": n.borderWidth || 0, fill: n.backgroundColor || "none" }).shadow(n.shadow), 0 < A && 0 < T && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: T }, D.strokeWidth())), D.isNew = !1), D[j ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = T = 0), this.legendWidth = A, this.legendHeight = T, j && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, l.prototype.align = function(s) {
s === void 0 && (s = this.chart.spacingBox);
var t = this.chart, n = this.options, o = s.y;
/(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? o += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (o -= t.titleOffset[2]), o !== s.y && (s = x(s, { y: o })), this.group.align(x(n, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : n.verticalAlign }), !0, s);
}, l.prototype.handleOverflow = function(s) {
var t = this, n = this.chart, o = n.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", j = this.padding, T = A.maxHeight, X = A.navigation, f = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, F = function(q) {
typeof q == "number" ? V.attr({ height: q }) : V && (t.clipRect = V.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + j + "px,9999px," + (j + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = o.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), n.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, k, G;
_ = n.spacingBox.height + (D ? -_ : _) - j;
var z = this.nav, V = this.clipRect;
return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), T && (_ = Math.min(_, T)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - j, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
}), V || (V = t.clipRect = o.clipRect(0, j, 9999, 0), t.contentGroup.clip(V)), F(k), z || (this.nav = z = o.g().attr({ zIndex: 1 }).add(this.group), this.up = o.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
"click",
function() {
t.scroll(-1, f);
}
), this.pager = o.text("", 15, 10).addClass("highcharts-legend-navigation"), n.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = o.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
t.scroll(1, f);
})), t.scroll(0), s = _) : z && (F(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
}, l.prototype.scroll = function(s, t) {
var n = this, o = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, j = this.options.navigation, T = this.pager, X = this.padding, f = this.currentPage + s;
f > _ && (f = _), 0 < f && (typeof t < "u" && W(t, o), this.nav.attr({ translateX: X, translateY: D + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
m.attr({ class: f === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
}), T.attr({ text: f + "/" + _ }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: f === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), o.styledMode || (this.up.attr({ fill: f === 1 ? j.inactiveColor : j.activeColor }), this.upTracker.css({ cursor: f === 1 ? "default" : "pointer" }), this.down.attr({ fill: f === _ ? j.inactiveColor : j.activeColor }), this.downTracker.css({ cursor: f === _ ? "default" : "pointer" })), this.scrollOffset = -A[f - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = f, this.positionCheckboxes(), s = U(a(t, o.renderer.globalAnimation, !0)), i(function() {
b(n, "afterScroll", { currentPage: f });
}, s.duration));
}, l.prototype.setItemEvents = function(s, t, n) {
var o = this, A = o.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", j = o.chart.styledMode, T = function(X) {
o.allItems.forEach(function(f) {
s !== f && [f].concat(f.linkedSeries || []).forEach(function(m) {
m.setState(X, !_);
});
});
};
(n ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
s.visible && T("inactive"), s.setState("hover"), s.visible && A.addClass(D), j || t.css(o.options.itemHoverStyle);
}).on("mouseout", function() {
o.chart.styledMode || t.css(x(s.visible ? o.itemStyle : o.itemHiddenStyle)), T(""), A.removeClass(D), s.setState();
}).on("click", function(f) {
var m = function() {
s.setVisible && s.setVisible(), T(s.visible ? "inactive" : "");
};
A.removeClass(D), f = { browserEvent: f }, s.firePointEvent ? s.firePointEvent("legendItemClick", f, m) : b(s, "legendItemClick", f, m);
});
});
}, l.prototype.createCheckboxForItem = function(s) {
s.checkbox = d(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
this.options.itemCheckboxStyle,
this.chart.container
), u(s.checkbox, "click", function(t) {
b(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
s.select();
});
});
}, l;
}(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H($.prototype, "positionItem", function(l, s) {
var t = this, n = function() {
s._legendItemPos && l.call(t, s);
};
n(), t.bubbleLegend || setTimeout(n);
}), $;
}), E(
h,
"Core/Series/SeriesRegistry.js",
[h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]],
function(y, R, I, Z) {
var H = R.defaultOptions, $ = Z.error, U = Z.extendClass, W = Z.merge, N;
return function(w) {
function v(u, d) {
var P = H.plotOptions || {}, O = d.defaultOptions;
d.prototype.pointClass || (d.prototype.pointClass = I), d.prototype.type = u, O && (P[u] = O), w.seriesTypes[u] = d;
}
w.seriesTypes = y.seriesTypes, w.getSeries = function(u, d) {
d === void 0 && (d = {});
var P = u.options.chart;
P = d.type || P.type || P.defaultSeriesType || "";
var O = w.seriesTypes[P];
return w || $(17, !0, u, { missingModuleFor: P }), P = new O(), typeof P.init == "function" && P.init(u, d), P;
}, w.registerSeriesType = v, w.seriesType = function(u, d, P, O, B) {
var C = H.plotOptions || {};
return d = d || "", C[u] = W(C[d], P), v(u, U(w.seriesTypes[d] || function() {
}, O)), w.seriesTypes[u].prototype.type = u, B && (w.seriesTypes[u].prototype.pointClass = U(I, B)), w.seriesTypes[u];
};
}(N || (N = {})), N;
}
), E(h, "Core/Chart/Chart.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/Axis.js"],
h["Core/FormatUtilities.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/Legend.js"],
h["Core/MSPointer.js"],
h["Core/DefaultOptions.js"],
h["Core/Pointer.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Time.js"],
h["Core/Utilities.js"],
h["Core/Renderer/HTML/AST.js"]
], function(y, R, I, Z, H, $, U, W, N, w, v, u, d, P, O) {
var B = y.animate, C = y.animObject, b = y.setAnimation, M = I.numberFormat, x = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, l = H.win, s = W.defaultOptions, t = W.defaultTime, n = v.seriesTypes, o = P.addEvent, A = P.attr, _ = P.cleanRecursively, D = P.createElement, j = P.css, T = P.defined, X = P.discardElement, f = P.erase, m = P.error, L = P.extend, Y = P.find, F = P.fireEvent, Q = P.getStyle, k = P.isArray, G = P.isNumber, z = P.isObject, V = P.isString, q = P.merge, it = P.objectEach, et = P.pick, nt = P.pInt, rt = P.relativeLength, ct = P.removeEvent, gt = P.splat, dt = P.syncTimeout, lt = P.uniqueKey;
return y = function() {
function at(J, tt, st) {
this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, st);
}
return at.chart = function(J, tt, st) {
return new at(J, tt, st);
}, at.prototype.getArgs = function(J, tt, st) {
V(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var st = J.plotOptions || {};
F(this, "init", { args: arguments }, function() {
var ht = q(s, J), pt = ht.chart;
it(ht.plotOptions, function(yt, vt) {
z(yt) && (yt.tooltip = st[vt] && q(st[vt].tooltip) || void 0);
}), ht.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = ht, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new d(J.time) : H.time, this.numberFormatter = pt.numberFormatter || M, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, x(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, F(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var st = n[tt];
return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), typeof tt.init == "function" && tt.init(this, J), tt;
}, at.prototype.setSeriesData = function() {
this.getSeriesOrderByLinks().forEach(function(J) {
J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
});
}, at.prototype.getSeriesOrderByLinks = function() {
return this.series.concat().sort(function(J, tt) {
return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
});
}, at.prototype.orderSeries = function(J) {
var tt = this.series;
J = J || 0;
for (var st = tt.length; J < st; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, st) {
st === void 0 && (st = {});
var ht = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Tt = 0, kt = 0;
st.visiblePlotOnly && this.scrollingContainer && (kt = this.scrollingContainer, Tt = kt.scrollLeft, kt = kt.scrollTop);
var St = st.series;
if (pt = st.visiblePlotOnly && Ct || pt, Ct = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
var _t = St && (ht ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = st.paneCoordinates ? _t.pos + Ct : yt + Ct, Ct >= Math.max(Tt + yt, _t.pos) && Ct <= Math.min(Tt + yt + pt.width, _t.pos + _t.len) || (J.isInsidePlot = !1);
}
return !st.ignoreY && J.isInsidePlot && (ht = St && (ht ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? ht.pos + tt : vt + tt, st >= Math.max(kt + vt, ht.pos) && st <= Math.min(kt + vt + pt.height, ht.pos + ht.len) || (J.isInsidePlot = !1)), F(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
F(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = this.series, ht = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Tt = [], kt = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
var _t = st[J];
if (_t.options.stacking || _t.options.centerInCategory) {
var Lt = !0;
if (_t.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = st.length; J--; )
_t = st[J], _t.options.stacking && (_t.isDirty = !0);
st.forEach(function(Et) {
Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && F(Et, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
Et.updateNames(), Et.setScale();
}), this.getMargins(), tt.forEach(function(Et) {
Et.isDirty && (kt = !0);
}), tt.forEach(function(Et) {
var Kt = Et.min + "," + Et.max;
Et.extKey !== Kt && (Et.extKey = Kt, Tt.push(function() {
F(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
})), (kt || Lt) && Et.redraw();
}), kt && this.drawChartBox(), F(this, "predraw"), st.forEach(function(Et) {
(kt || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
}), ht && ht.reset(!0), vt.draw(), F(this, "redraw"), F(this, "render"), Ct && this.temporaryDisplay(!0), Tt.forEach(function(Et) {
Et.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var st = this.series, ht = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !ht && pt < st.length; pt++)
ht = Y(st[pt].points || [], tt);
return ht;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), F(this, "getAxes"), st.forEach(function(ht, pt) {
ht.index = pt, ht.isX = !0;
}), tt.forEach(function(ht, pt) {
ht.index = pt;
}), st.concat(tt).forEach(function(ht) {
new R(J, ht);
}), F(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(st) {
et(st.selectedStaging, st.selected) && J.push(st);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, st) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(st);
}, at.prototype.applyDescription = function(J, tt) {
var st = this, ht = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
ht = this.options[J] = q(!this.styledMode && { style: ht }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), ht && !pt && (pt = this.renderer.text(ht.text, 0, 0, ht.useHTML).attr({ align: ht.align, class: "highcharts-" + J, zIndex: ht.zIndex || 4 }).add(), pt.update = function(yt) {
st[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(ht.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], st = this.renderer, ht = this.spacingBox;
["title", "subtitle", "caption"].forEach(function(yt) {
var vt = this[yt], Ct = this.options[yt], Tt = Ct.verticalAlign || "top";
yt = yt === "title" ? Tt === "top" ? -3 : 0 : Tt === "top" ? tt[0] + 2 : 0;
var kt;
if (vt) {
this.styledMode || (kt = Ct.style && Ct.style.fontSize), kt = st.fontMetrics(kt, vt).b, vt.css({ width: (Ct.width || ht.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(
L({ y: Tt === "bottom" ? kt : yt + kt, height: St }, Ct),
!1,
"spacingBox"
), Ct.floating || (Tt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Tt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
}
}, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
this.titleOffset = tt, F(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
}, at.prototype.getChartSize = function() {
var J = this.options.chart, tt = J.width;
J = J.height;
var st = this.renderTo;
T(tt) || (this.containerWidth = Q(st, "width")), T(J) || (this.containerHeight = Q(st, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
}, at.prototype.temporaryDisplay = function(J) {
var tt = this.renderTo;
if (J)
for (; tt && tt.style; )
tt.hcOrigStyle && (j(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
else
for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), j(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
;
}, at.prototype.setClassName = function(J) {
this.container.className = "highcharts-container " + (J || "");
}, at.prototype.getContainer = function() {
var J = this.options, tt = J.chart, st = lt(), ht, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), V(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(A(pt, "data-highcharts-chart"));
G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
var vt = this.chartHeight;
if (j(pt, { overflow: "hidden" }), this.styledMode || (ht = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = st = D("div", { id: st }, ht, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : u)(st, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
void 0,
this
), this.setClassName(tt.className), this.styledMode)
for (var Ct in J.defs)
this.renderer.definition(J.defs[Ct]);
else
this.renderer.setStyle(tt.style);
this.renderer.chartIndex = this.index, F(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, st = this.margin, ht = this.titleOffset;
this.resetMargins(), ht[0] && !T(st[0]) && (this.plotTop = Math.max(this.plotTop, ht[0] + tt[0])), ht[2] && !T(st[2]) && (this.marginBottom = Math.max(this.marginBottom, ht[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
st,
tt
), F(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, ht = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
T(ht[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, st = tt.options.chart, ht = tt.renderTo, pt = T(st.width) && T(st.height), yt = st.width || Q(ht, "width");
st = st.height || Q(ht, "height"), ht = J ? J.target : l, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (ht === l || ht === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (P.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = o(l, "resize", function(st) {
tt.options && tt.reflow(st);
}), o(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, st) {
var ht = this, pt = ht.renderer;
ht.isResizing += 1, b(st, ht), st = pt.globalAnimation, ht.oldChartHeight = ht.chartHeight, ht.oldChartWidth = ht.chartWidth, typeof J < "u" && (ht.options.chart.width = J), typeof tt < "u" && (ht.options.chart.height = tt), ht.getChartSize(), ht.styledMode || (st ? B : j)(ht.container, { width: ht.chartWidth + "px", height: ht.chartHeight + "px" }, st), ht.setChartSize(!0), pt.setSize(ht.chartWidth, ht.chartHeight, st), ht.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), ht.isDirtyLegend = !0, ht.isDirtyBox = !0, ht.layOutTitles(), ht.getMargins(), ht.redraw(st), ht.oldChartHeight = null, F(ht, "resize"), dt(function() {
ht && F(ht, "endResize", null, function() {
--ht.isResizing;
});
}, C(st).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, st = this.renderer, ht = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Tt, kt, St, _t;
this.plotLeft = Tt = Math.round(this.plotLeft), this.plotTop = kt = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(ht - Tt - this.marginRight)), this.plotHeight = _t = Math.max(0, Math.round(pt - kt - this.marginBottom)), this.plotSizeX = tt ? _t : St, this.plotSizeY = tt ? St : _t, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = st.spacingBox = { x: vt[3], y: vt[0], width: ht - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.plotBox = { x: Tt, y: kt, width: St, height: _t }, tt = 2 * Math.floor(this.plotBorderWidth / 2), ht = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: ht, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - ht), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
Lt.setAxisSize(), Lt.setAxisTranslation();
}), st.alignElements()), F(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
F(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(st) {
var ht = tt[st], pt = z(ht) ? ht : [ht, ht, ht, ht];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[st][vt] = et(tt[st + yt], pt[vt]);
});
}), p.forEach(function(st, ht) {
J[st] = et(J.margin[ht], J.spacing[ht]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, st = this.chartWidth, ht = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Tt = J.plotBackgroundImage, kt = this.plotLeft, St = this.plotTop, _t = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "attr"), pt)
var Vt = be = Gt.strokeWidth();
else
Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
Gt[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: ht - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Tt && (yt ? (Tt !== yt.attr("href") && yt.attr("href", Tt), yt.animate(Nt)) : this.plotBGImage = tt.image(Tt, kt, St, _t, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[zt](Jt.crisp({ x: kt, y: St, width: _t, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, F(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, st = J.options.series, ht, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = n[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], ht = st && st.length; !yt && ht--; )
(pt = n[st[ht].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(st) {
st.linkedSeries.length = 0;
}), tt.forEach(function(st) {
var ht = st.options.linkedTo;
V(ht) && (ht = ht === ":previous" ? J.series[st.index - 1] : J.get(ht)) && ht.linkedParent !== st && (ht.linkedSeries.push(st), st.linkedParent = ht, ht.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, ht.options.visible, st.visible));
}), F(this, "afterLinkSeries");
}, at.prototype.renderSeries = function() {
this.series.forEach(function(J) {
J.translate(), J.render();
});
}, at.prototype.renderLabels = function() {
var J = this, tt = J.options.labels;
tt.items && tt.items.forEach(function(st) {
var ht = L(tt.style, st.style), pt = nt(ht.left) + J.plotLeft, yt = nt(ht.top) + J.plotTop + 12;
delete ht.left, delete ht.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(ht).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, st = this.renderer, ht = this.options, pt = function(kt) {
kt.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new $(this, ht.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), ht = this.plotWidth, J.some(function(kt) {
if (kt.horiz && kt.visible && kt.options.labels.enabled && kt.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(kt) {
kt.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < ht / this.plotWidth, Tt = 1.05 < vt / this.plotHeight;
(Ct || Tt) && (J.forEach(function(kt) {
(kt.horiz && Ct || !kt.horiz && Tt) && kt.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = st.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
}, at.prototype.addCredits = function(J) {
var tt = this, st = q(!0, this.options.credits, J);
st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
st.href && (l.location.href = st.href);
}).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(ht) {
tt.credits = tt.credits.destroy(), tt.addCredits(ht);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, st = J.series, ht = J.container, pt = ht && ht.parentNode, yt;
for (F(J, "destroy"), J.renderer.forExport ? f(a, J) : a[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
tt[yt] = tt[yt].destroy();
for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = st.length; yt--; )
st[yt] = st[yt].destroy();
"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
var Ct = J[vt];
Ct && Ct.destroy && (J[vt] = Ct.destroy());
}), ht && (ht.innerHTML = O.emptyHTML, ct(ht), pt && X(ht)), it(J, function(vt, Ct) {
delete J[Ct];
});
}, at.prototype.firstRender = function() {
var J = this, tt = J.options;
(!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (k(tt.series) ? tt.series : []).forEach(function(st) {
J.initSeries(st);
}), J.linkSeries(), J.setSeriesData(), F(J, "beforeRender"), N && (U.isRequired() ? J.pointer = new U(J, tt) : J.pointer = new N(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
}, at.prototype.onload = function() {
this.callbacks.concat([this.callback]).forEach(function(J) {
J && typeof this.index < "u" && J.apply(this, [this]);
}, this), F(this, "load"), F(this, "render"), T(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, st) {
var ht = this, pt;
return J && (tt = et(tt, !0), F(ht, "addSeries", { options: J }, function() {
pt = ht.initSeries(J), ht.isDirtyLegend = !0, ht.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), F(ht, "afterAddSeries", { series: pt }), tt && ht.redraw(st);
})), pt;
}, at.prototype.addAxis = function(J, tt, st, ht) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: ht });
}, at.prototype.addColorAxis = function(J, tt, st) {
return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: st });
}, at.prototype.createAxis = function(J, tt) {
return J = new R(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
}, at.prototype.showLoading = function(J) {
var tt = this, st = tt.options, ht = st.loading, pt = function() {
yt && j(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
}, yt = tt.loadingDiv, vt = tt.loadingSpan;
yt || (tt.loadingDiv = yt = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D(
"span",
{ className: "highcharts-loading-inner" },
null,
yt
), o(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (j(yt, L(ht.style, { zIndex: 10 })), j(vt, ht.labelStyle), tt.loadingShown || (j(yt, { opacity: 0, display: "" }), B(yt, { opacity: ht.style.opacity || 0.5 }, { duration: ht.showDuration || 0 }))), tt.loadingShown = !0, pt();
}, at.prototype.hideLoading = function() {
var J = this.options, tt = this.loadingDiv;
tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || B(tt, { opacity: 0 }, {
duration: J.loading.hideDuration || 100,
complete: function() {
j(tt, { display: "none" });
}
})), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, st, ht) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Tt, kt;
F(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
var St = J.chart;
if (St) {
if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
pt.propFromSeries();
var _t = !0;
}
"alignTicks" in St && (_t = !0), "events" in St && x(this, St), it(St, function(Lt, Nt) {
pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Tt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : kt = !0);
}), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
}
!pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new d(J.time)), q(!0, pt.options.time, J.time)), it(J, function(Lt, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Tt = !0);
}), this.collectionsWithUpdate.forEach(function(Lt) {
if (J[Lt]) {
var Nt = [];
pt[Lt].forEach(function(Et, Kt) {
Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
}), gt(J[Lt]).forEach(function(Et, Kt) {
var Gt = T(Et.id), Wt;
Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && T(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
}), st && pt[Lt].forEach(function(Et) {
Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
});
}
}), Ct.forEach(function(Lt) {
Lt.chart && Lt.remove && Lt.remove(!1);
}), _t && pt.axes.forEach(function(Lt) {
Lt.update({}, !1);
}), Tt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
Lt.chart && Lt.update({}, !1);
}, this), _t = St && St.width, St = St && (V(St.height) ? rt(St.height, _t || pt.chartWidth) : St.height), kt || G(_t) && _t !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(_t, St, ht) : et(tt, !0) && pt.redraw(ht), F(pt, "afterUpdate", { options: J, redraw: tt, animation: ht });
}, at.prototype.setSubtitle = function(J, tt) {
this.applyDescription("subtitle", J), this.layOutTitles(tt);
}, at.prototype.setCaption = function(J, tt) {
this.applyDescription("caption", J), this.layOutTitles(tt);
}, at.prototype.showResetZoom = function() {
function J() {
tt.zoomOut();
}
var tt = this, st = s.lang, ht = tt.options.chart.resetZoomButton, pt = ht.theme, yt = pt.states, vt = ht.relativeTo === "chart" || ht.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
F(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: ht.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(ht.position, !1, vt);
}), F(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
F(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, st = tt.pointer, ht = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), st.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Tt = Ct.axis, kt = tt.inverted ? Tt.left : Tt.top, St = tt.inverted ? kt + Tt.width : kt + Tt.height, _t = Tt.isXAxis, Lt = !1;
(!_t && ht >= kt && ht <= St || _t || !T(ht)) && (Lt = !0), st[_t ? "zoomX" : "zoomY"] && Lt && (yt = Tt.zoom(Ct.min, Ct.max), Tt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && z(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
tt.options.chart.animation,
J && J.animation,
100 > tt.pointCount
));
}, at.prototype.pan = function(J, tt) {
var st = this, ht = st.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
F(this, "pan", { originalEvent: J }, function() {
ht && ht.forEach(function(St) {
St.setState();
});
var Tt = st.xAxis;
vt === "xy" ? Tt = Tt.concat(st.yAxis) : vt === "y" && (Tt = st.yAxis);
var kt = {};
Tt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var _t = St.horiz, Lt = J[_t ? "chartX" : "chartY"];
_t = _t ? "mouseDownX" : "mouseDownY";
var Nt = st[_t], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var zt = St.panningState;
!Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
}), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Ct = !0), kt[_t] = Lt);
}
}), it(kt, function(St, _t) {
st[_t] = St;
}), Ct && st.redraw(!1), j(st.container, { cursor: "move" });
});
}, at;
}(), L(y.prototype, {
callbacks: [],
collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
collectionsWithUpdate: ["xAxis", "yAxis", "series"],
propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
}), y;
}), E(h, "Core/Legend/LegendSymbol.js", [h["Core/Utilities.js"]], function(y) {
var R = y.merge, I = y.pick, Z;
return function(H) {
H.drawLineMarker = function($) {
var U = this.options, W = $.symbolWidth, N = $.symbolHeight, w = N / 2, v = this.chart.renderer, u = this.legendGroup;
$ = $.baseline - Math.round(0.3 * $.fontMetrics.b);
var d = {}, P = U.marker;
this.chart.styledMode || (d = { "stroke-width": U.lineWidth || 0 }, U.dashStyle && (d.dashstyle = U.dashStyle)), this.legendLine = v.path([["M", 0, $], ["L", W, $]]).addClass("highcharts-graph").attr(d).add(u), P && P.enabled !== !1 && W && (U = Math.min(I(P.radius, w), w), this.symbol.indexOf("url") === 0 && (P = R(P, { width: N, height: N }), U = 0), this.legendSymbol = W = v.symbol(this.symbol, W / 2 - U, $ - U, 2 * U, 2 * U, P).addClass("highcharts-point").add(u), W.isMarker = !0);
}, H.drawRectangle = function($, U) {
var W = $.symbolHeight, N = $.options.squareSymbol;
U.legendSymbol = this.chart.renderer.rect(N ? ($.symbolWidth - W) / 2 : 0, $.baseline - W + 1, N ? W : $.symbolWidth, W, I($.options.symbolRadius, W / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(U.legendGroup);
};
}(Z || (Z = {})), Z;
}), E(h, "Core/Series/SeriesDefaults.js", [], function() {
return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
} }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
var y = this.series.chart.numberFormatter;
return typeof this.y != "number" ? "" : y(this.y, -1);
}, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
select: { animation: { duration: 0 } },
inactive: { animation: { duration: 50 }, opacity: 0.2 }
}, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
}), E(h, "Core/Series/Series.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Point.js"],
h["Core/Series/SeriesDefaults.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W, N, w) {
var v = y.animObject, u = y.setAnimation, d = R.defaultOptions, P = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, C = Z.win, b = W.seriesTypes, M = w.addEvent, x = w.arrayMax, a = w.arrayMin, c = w.clamp, p = w.cleanRecursively, i = w.correctFloat, l = w.defined, s = w.erase, t = w.error, n = w.extend, o = w.find, A = w.fireEvent, _ = w.getNestedProperty, D = w.isArray, j = w.isNumber, T = w.isString, X = w.merge, f = w.objectEach, m = w.pick, L = w.removeEvent, Y = w.splat, F = w.syncTimeout;
return y = function() {
function Q() {
this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
}
return Q.prototype.init = function(k, G) {
A(this, "init", { options: G });
var z = this, V = k.series;
this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), n(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), P(this, G);
var q = G.events;
(q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
z[et + "Data"] || (z[et + "Data"] = []);
}), z.isCartesian && (k.hasCartesianSeries = !0);
var it;
V.length && (it = V[V.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert(V)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
}, Q.prototype.is = function(k) {
return b[k] && this instanceof b[k];
}, Q.prototype.insert = function(k) {
var G = this.options.index, z;
if (j(G)) {
for (z = k.length; z--; )
if (G >= m(k[z].options.index, k[z]._i)) {
k.splice(z + 1, 0, this);
break;
}
z === -1 && k.unshift(this), z += 1;
} else
k.push(this);
return m(z, k.length - 1);
}, Q.prototype.bindAxes = function() {
var k = this, G = k.options, z = k.chart, V;
A(this, "bindAxes", null, function() {
(k.axisTypes || []).forEach(function(q) {
var it = 0;
z[q].forEach(function(et) {
V = et.options, (G[q] === it && !V.isInternal || typeof G[q] < "u" && G[q] === V.id || typeof G[q] > "u" && V.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), V.isInternal || it++;
}), k[q] || k.optionalAxis === q || t(18, !0, z);
});
}), A(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(k, G) {
var z = k.series, V = arguments, q = j(G) ? function(it) {
var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
z[it + "Data"][G] = et;
} : function(it) {
Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call(V, 2));
};
z.parallelArrays.forEach(q);
}, Q.prototype.hasData = function() {
return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
}, Q.prototype.autoIncrement = function(k) {
var G = this.options, z = G.pointIntervalUnit, V = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), V && j(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), V && j(k) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var k = this.options;
n(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), l(k.pointRange) || (k.pointRange = 1);
}, Q.prototype.setOptions = function(k) {
var G = this.chart, z = G.options, V = z.plotOptions, q = G.userOptions || {};
k = X(k), G = G.styledMode;
var it = { plotOptions: V, userOptions: k };
A(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, V.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(d.tooltip, d.plotOptions.series && d.plotOptions.series.tooltip, d.plotOptions[this.type].tooltip, z.tooltip.userOptions, V.series && V.series.tooltip, V[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, V = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), V.push(z)), V.length && l(V[V.length - 1].value) && V.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(k, G, z) {
var V = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m(V.options.chart[k + "Count"], V[k + "Count"]);
if (!G) {
var rt = m(q[it], q["_" + it]);
l(rt) || (V.series.length || (V[et] = 0), q["_" + it] = rt = V[et] % nt, V[et] += 1), z && (G = z[rt]);
}
typeof rt < "u" && (this[it] = rt), this[k] = G;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || d.plotOptions[this.type].color, this.chart.options.colors);
}, Q.prototype.getPointsCollection = function() {
return (this.hasGroupedData ? this.points : this.data) || [];
}, Q.prototype.getSymbol = function() {
this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
}, Q.prototype.findPointIndex = function(k, G) {
var z = k.id, V = k.x, q = this.points, it = this.options.dataSorting, et, nt;
if (z)
it = this.chart.get(z), it instanceof $ && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === k.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === k.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === k.x;
}), et = o(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && j(V) && (rt = this.xData.indexOf(V, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && j(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(k, G) {
var z = this.options, V = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, k.forEach(function(lt, at) {
var J = l(lt) && this.pointClass.prototype.optionsToObject.call({ series: this }, lt) || {}, tt = J.x;
J.id || j(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(lt) : q[J] && lt !== z.data[J] ? (q[J].update(lt, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || V && V.enabled || this.hasDerivedData) && (rt = !0)) : it.push(lt);
}, this), rt)
for (k = q.length; k--; )
(ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
else
!nt || V && V.enabled ? dt = !1 : (k.forEach(function(lt, at) {
lt !== q[at].y && q[at].update && q[at].update(
lt,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(lt) {
lt && (lt.touched = !1);
}), dt ? (it.forEach(function(lt) {
this.addPoint(lt, !1, null, null, !1);
}, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = x(this.xData), this.autoIncrement()), !0) : !1;
}, Q.prototype.setData = function(k, G, z, V) {
var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, lt = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, st, ht = 0, pt = 1, yt = null;
k = k || [];
var vt = k.length;
if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), V !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(k), j(yt))
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else if (D(yt))
if (J)
if (yt.length === J)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else
for (z = 0; z < vt; z++)
V = k[z], lt[z] = V[0], at[z] = V.slice(
1,
J + 1
);
else if (tt && (ht = tt.indexOf("x"), pt = tt.indexOf("y"), ht = 0 <= ht ? ht : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), ht === pt)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z][pt];
else
for (z = 0; z < vt; z++)
V = k[z], lt[z] = V[ht], at[z] = V[pt];
else
t(12, !1, rt);
else
for (z = 0; z < vt; z++)
typeof k[z] < "u" && (V = { series: q }, q.pointClass.prototype.applyOptions.apply(V, [k[z]]), q.updateParallelArrays(V, z));
for (at && T(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
it[z] && it[z].destroy && it[z].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
}, Q.prototype.sortData = function(k) {
var G = this, z = G.options.dataSorting.sortKey || "y", V = function(q, it) {
return l(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return k.forEach(function(q, it) {
k[it] = V(G, q), k[it].index = it;
}, this), k.concat().sort(function(q, it) {
return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = V(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), k;
}, Q.prototype.getProcessedData = function(k) {
var G = this.xAxis, z = this.options, V = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
k = G && G.val2lin, z = !(!G || !G.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (G) {
gt = G.getExtremes();
var lt = gt.min, at = gt.max;
gt = G.categories && !G.names.length;
}
if (it && this.sorted && !q && (!V || dt > V || this.forceCrop)) {
if (nt[dt - 1] < lt || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < lt || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, lt, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for (V = nt.length || 1; --V; )
if (G = z ? k(nt[V]) - k(nt[V - 1]) : nt[V] - nt[V - 1], 0 < G && (typeof tt > "u" || G < tt))
var tt = G;
else
0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(k) {
var G = this.xAxis;
if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
return !1;
k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
}, Q.prototype.cropData = function(k, G, z, V, q) {
var it = k.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (k[et] >= z) {
nt = Math.max(0, et - q);
break;
}
for (z = et; z < it; z++)
if (k[z] > V) {
rt = z + q;
break;
}
return { xData: k.slice(nt, rt), yData: G.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var k = this.options, G = k.data, z = this.processedXData, V = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
var gt, dt, lt = this.data;
if (!lt && !nt) {
var at = [];
at.length = G.length, lt = this.data = at;
}
for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
if (at = et + dt, nt) {
var J = new q().init(this, [z[dt]].concat(Y(V[dt])));
J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, n(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = lt[at]) || typeof G[at] > "u" || (lt[at] = J = new q().init(this, G[at], z[dt]));
J && (J.index = nt ? k + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, lt && (it !== (gt = lt.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), lt[dt] && (lt[dt].destroyElements(), lt[dt].plotX = void 0);
this.data = lt, this.points = ct, A(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(k) {
return { min: a(k), max: x(k) };
}, Q.prototype.getExtremes = function(k, G) {
var z = this.xAxis, V = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
V = V ? V.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
k = k || this.stackedYData || this.processedYData || [];
var dt = k.length;
if (z) {
var lt = z.getExtremes();
rt = lt.min, ct = lt.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
lt = k[nt];
var J = (j(lt) || D(lt)) && (lt.length || 0 < lt || !V);
if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = lt.length)
for (; J--; )
j(lt[J]) && (it[gt++] = lt[J]);
else
it[gt++] = lt;
}
return k = { activeYData: it, dataMin: a(it), dataMax: x(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
}, Q.prototype.applyExtremes = function() {
var k = this.getExtremes();
return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
}, Q.prototype.getFirstValidPoint = function(k) {
for (var G = k.length, z = 0, V = null; V === null && z < G; )
V = k[z], z++;
return V;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var k = this.options, G = k.stacking, z = this.xAxis, V = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, lt = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var st = et[at], ht = st.x, pt = void 0, yt = void 0, vt = st.y, Ct = st.low, Tt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(ht)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(ht, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Tt && Tt[ht]) {
var kt = this.getStackIndicator(
kt,
ht,
this.index
);
st.isNull || (pt = Tt[ht], yt = pt.points[kt.key]);
}
if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && kt.key === Tt[ht].base && (Ct = m(j(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = l(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, j(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
pt,
-1e5,
1e5
))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(ht, 0, 0, 0, 1, rt)) : J, st.negative = st[lt] < (k[lt + "Threshold"] || gt || 0), st.category = V && typeof V[st.x] < "u" ? V[st.x] : st.x, !st.isNull && st.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
}
this.closestPointRangePx = tt, A(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(k, G, z) {
var V = this.chart;
return (k || this.points || []).filter(function(q) {
return G && !V.isInsidePlot(q.plotX, q.plotY, { inverted: V.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis, V = X(k.clipBox);
return G && G.len !== k.plotSizeX && (V.width = G.len), z && z.len !== k.plotSizeY && (V.height = z.len), V;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var k = this.chart, G = this.group, z = this.markerGroup, V = k.sharedClips;
k = k.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = V[it];
et ? et.animate(q) : V[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
}, Q.prototype.animate = function(k) {
var G = this.chart, z = this.group, V = this.markerGroup, q = G.inverted, it = v(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
if (k && z)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), V && V.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
G = this.getClipBox();
var ct = it.step;
V && V.element.childNodes.length && (it.step = function(gt, dt) {
ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
}), nt.addClass("highcharts-animating").animate(G, it);
}
}, Q.prototype.afterAnimate = function() {
var k = this;
this.setClip(), f(
this.chart.sharedClips,
function(G, z, V) {
G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete V[z]);
}
), this.finishedAnimating = !0, A(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var k = this.points, G = this.chart, z = this.options.marker, V = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
if (z.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < k.length; et++) {
var rt = k[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
var lt = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
var J = rt.isInside !== !1;
nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = G.renderer.symbol(lt, at.x, at.y, at.width, at.height, dt ? gt : z).add(V), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
} else
nt && (rt.graphic = nt.destroy());
}
}, Q.prototype.markerAttribs = function(k, G) {
var z = this.options, V = z.marker, q = k.marker || {}, it = q.symbol || V.symbol, et = m(q.radius, V.radius);
return G && (V = V.states[G], G = q.states && q.states[G], et = m(G && G.radius, V && V.radius, et + (V && V.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
}, Q.prototype.pointAttribs = function(k, G) {
var z = this.options.marker, V = k && k.options, q = V && V.marker || {}, it = V && V.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
return k = m(q.lineWidth, z.lineWidth), V = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, V = m(G.opacity, z.opacity, V), { stroke: et, "stroke-width": k, fill: it, opacity: V };
}, Q.prototype.destroy = function(k) {
var G = this, z = G.chart, V = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
(rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
}), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
G.clips && G.clips.forEach(function(ct) {
return ct.destroy();
}), w.clearTimeout(G.animationTimeout), f(G, function(ct, gt) {
ct instanceof N && !ct.survive && (it = V && gt === "group" ? "hide" : "destroy", ct[it]());
}), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), f(G, function(ct, gt) {
k && gt === "hcEvents" || delete G[gt];
});
}, Q.prototype.applyZones = function() {
var k = this, G = this.chart, z = G.renderer, V = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, lt, at, J, tt, st, ht, pt = !1;
if (V.length && (it || et) && rt && typeof rt.min < "u") {
var yt = rt.reversed, vt = rt.horiz;
it && !this.showLine && it.hide(), et && et.hide();
var Ct = rt.getExtremes();
V.forEach(function(Tt, kt) {
gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Tt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (lt = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (lt.x = G.plotHeight - lt.x)) : (lt = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (lt.y = G.plotWidth - lt.y)), ct && z.isVML && (lt = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: lt.width,
width: G.chartWidth
} : { x: lt.y - G.plotLeft - G.spacingBox.x, y: 0, width: lt.height, height: G.chartHeight }), q[kt] ? q[kt].animate(lt) : q[kt] = z.clipRect(lt), st = k["zone-area-" + kt], ht = k["zone-graph-" + kt], it && ht && ht.clip(q[kt]), et && st && st.clip(q[kt]), pt = Tt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
k.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(k) {
function G() {
["group", "markerGroup"].forEach(function(q) {
z[q] && (V.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
});
}
var z = this, V = z.chart;
z.xAxis && (z.eventsToUnbind.push(M(V, "resize", G)), G(), z.invertGroups = G);
}, Q.prototype.plotGroup = function(k, G, z, V, q) {
var it = this[k], et = !it;
return z = { visibility: z, zIndex: V || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (l(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis;
return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(k) {
k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
G();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var k = this, G = k.chart, z = k.options, V = v(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
G = !k.finishedAnimating && G.renderer.isSVG ? V.duration : 0, A(this, "render");
var ct = k.plotGroup("group", "series", q, it, nt);
k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && V.defer && (G += V.defer), k.animationTimeout = F(function() {
k.afterAnimate();
}, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
}, Q.prototype.redraw = function() {
var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, V = this.xAxis, q = this.yAxis;
z && (k.inverted && z.attr({
width: k.plotWidth,
height: k.plotHeight
}), z.animate({ translateX: m(V && V.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
}, Q.prototype.searchPoint = function(k, G) {
var z = this.xAxis, V = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? V.len - k.chartX + V.pos : k.chartY - V.pos }, G, k);
}, Q.prototype.buildKDTree = function(k) {
function G(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = z.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var z = this, V = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete z.kdTree, F(function() {
z.kdTree = G(z.getValidPoints(null, !z.directTouch), V, V), z.buildingKdTree = !1;
}, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(k, G, z) {
function V(rt, ct, gt, dt) {
var lt = ct.point, at = q.kdAxisArray[gt % dt], J = lt, tt = l(rt[it]) && l(lt[it]) ? Math.pow(rt[it] - lt[it], 2) : null, st = l(rt[et]) && l(lt[et]) ? Math.pow(rt[et] - lt[et], 2) : null;
return st = (tt || 0) + (st || 0), lt.dist = l(st) ? Math.sqrt(st) : Number.MAX_VALUE, lt.distX = l(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - lt[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = V(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : lt), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = V(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
}
var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = G ? "distX" : "dist";
if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
return V(
k,
this.kdTree,
G,
G
);
}, Q.prototype.pointPlacementToXValue = function() {
var k = this.options, G = k.pointRange, z = this.xAxis;
return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), j(k) ? k * (G || z.pointRange) : 0;
}, Q.prototype.isPointInside = function(k) {
var G = this.chart, z = this.xAxis, V = this.yAxis;
return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= (V ? V.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
}, Q.prototype.drawTracker = function() {
var k = this, G = k.options, z = G.trackByArea, V = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
q.hoverSeries !== k && k.onMouseOver();
}, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: V }) : k.graph && (k.tracker = et.path(V).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(lt) {
it.onTrackerMouseOut(lt);
}), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
})), A(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(k, G, z, V, q) {
var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
rt = rt && rt.hasNames && rt.names;
var ct = it.data, gt = this.xData, dt;
G = m(G, !0);
var lt = { series: this };
this.pointClass.prototype.applyOptions.apply(
lt,
[k]
);
var at = lt.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(lt, "splice", J, 0, 0), this.updateParallelArrays(lt, J), rt && lt.name && (rt[at] = lt.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(lt, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: lt }), this.isDirtyData = this.isDirty = !0, G && nt.redraw(V);
}, Q.prototype.removePoint = function(k, G, z) {
var V = this, q = V.data, it = q[k], et = V.points, nt = V.chart, rt = function() {
et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), V.options.data.splice(k, 1), V.updateParallelArrays(it || { series: V }, "splice", k, 1), it && it.destroy(), V.isDirty = !0, V.isDirtyData = !0, G && nt.redraw();
};
u(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(k, G, z, V) {
function q() {
it.destroy(V), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
}
var it = this, et = it.chart;
z !== !1 ? A(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(k, G) {
k = p(k, this.userOptions), A(this, "update", { options: k });
var z = this, V = z.chart, q = z.userOptions, it = z.initialType || z.type, et = V.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], lt = k.type || q.type || V.options.chart.type, at = !(this.hasDerivedData || lt && lt !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
if (lt = lt || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), k.data && (k.dataSorting && n(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = z[tt], delete z[tt];
}), et = !1, b[lt]) {
if (et = lt !== z.type, z.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(z, b[lt].prototype);
else {
rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
for (gt in nt)
z[gt] = void 0;
n(z, b[lt].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
}
} else
t(17, !0, V, { missingModuleFor: lt });
if (dt.forEach(function(tt) {
z[tt] = dt[tt];
}), z.init(V, k), at && this.points) {
var J = z.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && V.legend.destroyItem(tt));
}, this);
}
z.initialType = it, V.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && V.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(k) {
this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(k) {
var G = this.options[k], z = this.chart.options.plotOptions, V = this.userOptions[k];
return V ? G !== V : G !== m(
z && z[this.type] && z[this.type][k],
z && z.series && z.series[k],
G
);
}, Q.prototype.onMouseOver = function() {
var k = this.chart, G = k.hoverSeries;
k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var k = this.options, G = this.chart, z = G.tooltip, V = G.hoverPoint;
G.hoverSeries = null, V && V.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(k, G) {
var z = this, V = z.options, q = z.graph, it = V.inactiveOtherPoints, et = V.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = V.lineWidth, ct = 0, gt = V.opacity;
if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
}), z.state = k, !z.chart.styledMode)) {
if (et[k] && et[k].enabled === !1)
return;
if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
for (V = { "stroke-width": rt }, q.animate(V, nt); z["zone-graph-" + ct]; )
z["zone-graph-" + ct].animate(V, nt), ct += 1;
it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
G && it && z.points && z.setAllPointsToState(k || void 0);
}, Q.prototype.setAllPointsToState = function(k) {
this.points.forEach(function(G) {
G.setState && G.setState(k);
});
}, Q.prototype.setVisible = function(k, G) {
var z = this, V = z.chart, q = z.legendItem, it = V.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
z[rt] && z[rt][nt]();
}), (V.hoverSeries === z || (V.hoverPoint && V.hoverPoint.series) === z) && z.onMouseOut(), q && V.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && V.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), z.linkedSeries.forEach(function(rt) {
rt.setVisible(k, !1);
}), it && (V.isDirtyBox = !0), A(z, nt), G !== !1 && V.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(k) {
this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(k, G, z) {
return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
}, Q.defaultOptions = U, Q;
}(), n(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: $, requireSorting: !0, sorted: !0 }), W.series = y, y;
}), E(h, "Extensions/ScrollablePlotArea.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Series/Series.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $) {
var U = y.stop, W = $.addEvent, N = $.createElement, w = $.merge, v = $.pick;
W(I, "afterSetChartSize", function(u) {
var d = this.options.chart.scrollablePlotArea, P = d && d.minWidth;
if (d = d && d.minHeight, !this.renderer.forExport) {
if (P) {
if (this.scrollablePixelsX = P = Math.max(0, P - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += P, this.inverted ? this.clipBox.height += P : this.clipBox.width += P;
var O = { 1: { name: "right", value: P } };
}
} else
d && (this.scrollablePixelsY = P = Math.max(
0,
d - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += P, this.inverted ? this.clipBox.width += P : this.clipBox.height += P, O = { 2: { name: "bottom", value: P } });
O && !u.skipAxes && this.axes.forEach(function(B) {
O[B.side] ? B.getPlotLinePath = function() {
var C = O[B.side].name, b = this[C];
this[C] = b - O[B.side].value;
var M = R.prototype.getPlotLinePath.apply(this, arguments);
return this[C] = b, M;
} : (B.setAxisSize(), B.setAxisTranslation());
});
}
}), W(I, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), I.prototype.setUpScrolling = function() {
var u = this, d = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (d.overflowX = "auto"), this.scrollablePixelsY && (d.overflowY = "auto"), this.scrollingParent = N("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = N(
"div",
{ className: "highcharts-scrolling" },
d,
this.scrollingParent
), W(this.scrollingContainer, "scroll", function() {
u.pointer && delete u.pointer.chartPosition;
}), this.innerContainer = N("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, I.prototype.moveFixedElements = function() {
var u = this.container, d = this.fixedRenderer, P = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && P.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), P.forEach(function(B) {
[].forEach.call(u.querySelectorAll(B), function(C) {
(C.namespaceURI === d.SVG_NS ? d.box : d.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
});
});
}, I.prototype.applyFixed = function() {
var u = !this.fixedDiv, d = this.options.chart, P = d.scrollablePlotArea, O = H.getRendererType();
u ? (this.fixedDiv = N("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (d.style && d.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = d = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = d.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": v(P.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), W(this, "afterShowResetZoom", this.moveFixedElements), W(this, "afterDrilldown", this.moveFixedElements), W(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || u) && (this.scrollableDirty = !1, this.moveFixedElements()), d = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), U(this.container), this.container.style.width = d + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: d, height: O, viewBox: [0, 0, d, O].join(" ") }), this.chartBackground.attr({ width: d, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", u && (P.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * P.scrollPositionX), P.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * P.scrollPositionY)), O = this.axisOffset, u = this.plotTop - O[0] - 1, P = this.plotLeft - O[3] - 1, d = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
u = this.scrollablePixelsX ? [["M", 0, u], ["L", this.plotLeft - 1, u], ["L", this.plotLeft - 1, d], ["L", 0, d], ["Z"], ["M", B, u], ["L", this.chartWidth, u], ["L", this.chartWidth, d], ["L", B, d], ["Z"]] : this.scrollablePixelsY ? [["M", P, 0], ["L", P, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", P, C], ["L", P, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: u });
}, W(R, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), W(Z, "show", function() {
this.chart.scrollableDirty = !0;
});
}), E(h, "Core/Axis/StackingAxis.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.getDeferredAnimation, H = I.addEvent, $ = I.destroyObjectProperties, U = I.fireEvent, W = I.isNumber, N = I.objectEach, w;
return function(v) {
function u() {
var B = this.stacking;
if (B) {
var C = B.stacks;
N(C, function(b, M) {
$(b), C[M] = null;
}), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
}
}
function d() {
this.stacking || (this.stacking = new O(this));
}
var P = [];
v.compose = function(B) {
return P.indexOf(B) === -1 && (P.push(B), H(B, "init", d), H(B, "destroy", u)), B;
};
var O = function() {
function B(C) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
}
return B.prototype.buildStacks = function() {
var C = this.axis, b = C.series, M = C.options.reversedStacks, x = b.length, a;
if (!C.isXAxis) {
for (this.usePercentage = !1, a = x; a--; ) {
var c = b[M ? a : x - a - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (a = 0; a < x; a++)
b[a].modifyStacks();
U(C, "afterBuildStacks");
}
}, B.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var C = this.stacks = this.oldStacks;
N(C, function(b) {
N(b, function(M) {
M.cumulative = M.total;
});
});
}
}, B.prototype.resetStacks = function() {
var C = this, b = C.stacks;
C.axis.isXAxis || N(b, function(M) {
N(
M,
function(x, a) {
W(x.touched) && x.touched < C.stacksTouched ? (x.destroy(), delete M[a]) : (x.total = null, x.cumulative = null);
}
);
});
}, B.prototype.renderStackTotals = function() {
var C = this.axis, b = C.chart, M = b.renderer, x = this.stacks;
C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
var a = this.stackTotalGroup = this.stackTotalGroup || M.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
a.translate(b.plotLeft, b.plotTop), N(x, function(c) {
N(c, function(p) {
p.render(a);
});
}), a.animate(
{ opacity: 1 },
C
);
}, B;
}();
v.Additions = O;
}(w || (w = {})), w;
}), E(h, "Extensions/Stacking.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Axis/StackingAxis.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U) {
var W = I.format, N = U.correctFloat, w = U.defined, v = U.destroyObjectProperties, u = U.isArray, d = U.isNumber, P = U.objectEach, O = U.pick, B = function() {
function C(b, M, x, a, c) {
var p = b.chart.inverted;
this.axis = b, this.isNegative = x, this.options = M = M || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: M.align || (p ? x ? "left" : "right" : "center"), verticalAlign: M.verticalAlign || (p ? "middle" : x ? "bottom" : "top"), y: M.y, x: M.x }, this.textAlign = M.textAlign || (p ? x ? "right" : "left" : "center");
}
return C.prototype.destroy = function() {
v(this, this.axis);
}, C.prototype.render = function(b) {
var M = this.axis.chart, x = this.options, a = x.format;
a = a ? W(a, this, M) : x.formatter.call(this), this.label ? this.label.attr({
text: a,
visibility: "hidden"
}) : (this.label = M.renderer.label(a, null, null, x.shape, null, null, x.useHTML, !1, "stack-labels"), a = { r: x.borderRadius || 0, text: a, rotation: x.rotation, padding: O(x.padding, 5), visibility: "hidden" }, M.styledMode || (a.fill = x.backgroundColor, a.stroke = x.borderColor, a["stroke-width"] = x.borderWidth, this.label.css(x.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = M.plotSizeY;
}, C.prototype.setOffset = function(b, M, x, a, c) {
var p = this.axis, i = p.chart;
a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), x = p.translate(x || 0), x = w(a) && Math.abs(a - x), b = O(c, i.xAxis[0].translate(this.x)) + b, p = w(a) && this.getStackBox(i, this, b, a, M, x, p), M = this.label, x = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var l = this.textAlign;
M && p && (c = M.getBBox(), a = M.padding, l = l === "left" ? i.inverted ? -a : a : l === "right" ? c.width : i.inverted && l === "center" ? c.width / 2 : i.inverted ? x ? c.width + a : -a : c.width / 2, x = i.inverted ? c.height / 2 : x ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= l, p.y -= x, M.align(this.alignOptions, null, p), i.isInsidePlot(M.alignAttr.x + l - this.alignOptions.x, M.alignAttr.y + x - this.alignOptions.y) ? M.show() : (M.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, M, this.alignOptions, M.alignAttr, c, p), M.attr({ x: M.alignAttr.x, y: M.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = d(M.x) && d(M.y) && i.isInsidePlot(M.x - a + M.width, M.y) && i.isInsidePlot(M.x + a, M.y)) || M.hide()));
}, C.prototype.getStackBox = function(b, M, x, a, c, p, i) {
var l = M.axis.reversed, s = b.inverted, t = i.height + i.pos - (s ? b.plotLeft : b.plotTop);
return M = M.isNegative && !l || !M.isNegative && l, { x: s ? M ? a - i.right : a - p + i.pos - b.plotLeft : x + b.xAxis[0].transB - b.plotLeft, y: s ? i.height - x - c : M ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
}, C;
}();
return R.prototype.getStacks = function() {
var C = this, b = C.inverted;
C.yAxis.forEach(function(M) {
M.stacking && M.stacking.stacks && M.hasVisibleSeries && (M.stacking.oldStacks = M.stacking.stacks);
}), C.series.forEach(function(M) {
var x = M.xAxis && M.xAxis.options || {};
!M.options.stacking || M.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (M.stackKey = [M.type, O(M.options.stack, ""), b ? x.top : x.left, b ? x.height : x.width].join());
});
}, $.compose(y), H.prototype.setGroupedPoints = function() {
var C = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : C && P(C.stacks, function(b, M) {
M.slice(-5) === "group" && (P(b, function(x) {
return x.destroy();
}), delete C.stacks[M]);
});
}, H.prototype.setStackedPoints = function(C) {
var b = C || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var M = this.processedXData, x = this.processedYData, a = [], c = x.length, p = this.options, i = p.threshold, l = O(p.startFromThreshold && i, 0);
p = p.stack, C = C ? this.type + "," + b : this.stackKey;
var s = "-" + C, t = this.negStacks, n = this.yAxis, o = n.stacking.stacks, A = n.stacking.oldStacks, _, D;
for (n.stacking.stacksTouched += 1, D = 0; D < c; D++) {
var j = M[D], T = x[D], X = this.getStackIndicator(
X,
j,
this.index
), f = X.key, m = (_ = t && T < (l ? 0 : i)) ? s : C;
o[m] || (o[m] = {}), o[m][j] || (A[m] && A[m][j] ? (o[m][j] = A[m][j], o[m][j].total = null) : o[m][j] = new B(n, n.options.stackLabels, _, j, p)), m = o[m][j], T !== null ? (m.points[f] = m.points[this.index] = [O(m.cumulative, l)], w(m.cumulative) || (m.base = f), m.touched = n.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[f][0] = m.points[this.index + "," + j + ",0"][0])) : m.points[f] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : s, t && o[_] && o[_][j] ? (_ = o[_][j], m.total = _.total = Math.max(_.total, m.total) + Math.abs(T) || 0) : m.total = N(m.total + (Math.abs(T) || 0))) : b === "group" ? (u(T) && (T = T[0]), T !== null && (m.total = (m.total || 0) + 1)) : m.total = N(m.total + (T || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, l) + (T || 0), T !== null && (m.points[f].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (n.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), n.stacking.oldStacks = {};
}
}, H.prototype.modifyStacks = function() {
var C = this, b = C.stackKey, M = C.yAxis.stacking.stacks, x = C.processedXData, a, c = C.options.stacking;
C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
for (var i = x.length, l, s; i--; )
l = x[i], a = C.getStackIndicator(a, l, C.index, p), (s = (l = M[p] && M[p][l]) && l.points[a.key]) && C[c + "Stacker"](s, l, i);
});
}, H.prototype.percentStacker = function(C, b, M) {
b = b.total ? 100 / b.total : 0, C[0] = N(C[0] * b), C[1] = N(C[1] * b), this.stackedYData[M] = C[1];
}, H.prototype.getStackIndicator = function(C, b, M, x) {
return !w(C) || C.x !== b || x && C.key !== x ? C = { x: b, index: 0, key: x } : C.index++, C.key = [M, b, C.index].join(), C;
}, Z.StackItem = B, Z.StackItem;
}), E(h, "Series/Line/LineSeries.js", [h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), H = I.defined, $ = I.merge;
return I = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return Z(W, U), W.prototype.drawGraph = function() {
var N = this, w = this.options, v = (this.gappedPath || this.getGraphPath).call(this), u = this.chart.styledMode, d = [["graph", "highcharts-graph"]];
u || d[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), d = N.getZonesGraphs(d), d.forEach(function(P, O) {
var B = P[0], C = N[B], b = C ? "animate" : "attr";
C ? (C.endX = N.preventGraphAnimation ? null : v.xMap, C.animate({ d: v })) : v.length && (N[B] = C = N.chart.renderer.path(v).addClass(P[1]).attr({ zIndex: 1 }).add(N.group)), C && !u && (B = { stroke: P[2], "stroke-width": w.lineWidth, fill: N.fillGraph && N.color || "none" }, P[3] ? B.dashstyle = P[3] : w.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), C[b](B).shadow(2 > O && w.shadow)), C && (C.startX = v.xMap, C.isArea = v.isArea);
});
}, W.prototype.getGraphPath = function(N, w, v) {
var u = this, d = u.options, P = [], O = [], B, C = d.step;
N = N || u.points;
var b = N.reversed;
return b && N.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), N = this.getValidPoints(N, !1, !(d.connectNulls && !w && !v)), N.forEach(function(M, x) {
var a = M.plotX, c = M.plotY, p = N[x - 1];
(M.leftCliff || p && p.rightCliff) && !v && (B = !0), M.isNull && !H(w) && 0 < x ? B = !d.connectNulls : M.isNull && !w ? B = !0 : (x === 0 || B ? x = [["M", M.plotX, M.plotY]] : u.getPointSpline ? x = [u.getPointSpline(N, M, x)] : C ? (x = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], x.push(["L", a, c])) : x = [["L", a, c]], O.push(M.x), C && (O.push(M.x), C === 2 && O.push(M.x)), P.push.apply(P, x), B = !1);
}), P.xMap = O, u.graphPath = P;
}, W.prototype.getZonesGraphs = function(N) {
return this.zones.forEach(function(w, v) {
v = ["zone-graph-" + v, "highcharts-graph highcharts-zone-graph-" + v + " " + (w.className || "")], this.chart.styledMode || v.push(w.color || this.color, w.dashStyle || this.options.dashStyle), N.push(v);
}, this), N;
}, W.defaultOptions = $(y.defaultOptions, {}), W;
}(y), R.registerSeriesType("line", I), I;
}), E(h, "Series/Area/AreaSeries.js", [
h["Core/Color/Color.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z) {
var H = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}(), $ = y.parse, U = I.seriesTypes.line;
y = Z.extend;
var W = Z.merge, N = Z.objectEach, w = Z.pick;
return Z = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.data = void 0, d.options = void 0, d.points = void 0, d;
}
return H(u, v), u.prototype.drawGraph = function() {
this.areaPath = [], v.prototype.drawGraph.apply(this);
var d = this, P = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(C, b) {
B.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || d.color, C.fillColor || O.fillColor]);
}), B.forEach(function(C) {
var b = C[0], M = d[b], x = M ? "animate" : "attr", a = {};
M ? (M.endX = d.preventGraphAnimation ? null : P.xMap, M.animate({ d: P })) : (a.zIndex = 0, M = d[b] = d.chart.renderer.path(P).addClass(C[1]).add(d.group), M.isArea = !0), d.chart.styledMode || (a.fill = w(C[3], $(C[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), M[x](a), M.startX = P.xMap, M.shiftUnit = O.step ? 2 : 1;
});
}, u.prototype.getGraphPath = function(d) {
var P = U.prototype.getGraphPath, O = this.options, B = O.stacking, C = this.yAxis, b, M = [], x = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
O = w(O.connectNulls, B === "percent");
var l = function(o, A, _) {
var D = d[o];
o = B && c[D.x].points[a];
var j = D[_ + "Null"] || 0;
if (_ = D[_ + "Cliff"] || 0, D = !0, _ || j) {
var T = (j ? o[0] : o[1]) + _, X = o[0] + _;
D = !!j;
} else
!B && d[A] && d[A].isNull && (T = X = p);
typeof T < "u" && (x.push({ plotX: t, plotY: T === null ? i : C.getThreshold(T), isNull: D, isCliff: !0 }), M.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
};
for (d = d || this.points, B && (d = this.getStackPoints(d)), b = 0; b < d.length; b++) {
B || (d[b].leftCliff = d[b].rightCliff = d[b].leftNull = d[b].rightNull = void 0);
var s = d[b].isNull, t = w(d[b].rectPlotX, d[b].plotX), n = B ? w(d[b].yBottom, i) : i;
(!s || O) && (O || l(b, b - 1, "left"), s && !B && O || (x.push(d[b]), M.push({ x: b, plotX: t, plotY: n })), O || l(b, b + 1, "right"));
}
return b = P.call(this, x, !0, !0), M.reversed = !0, s = P.call(this, M, !0, !0), (n = s[0]) && n[0] === "M" && (s[0] = ["L", n[1], n[2]]), s = b.concat(s), s.length && s.push(["Z"]), P = P.call(this, x, !1, O), s.xMap = b.xMap, this.areaPath = s, P;
}, u.prototype.getStackPoints = function(d) {
var P = this, O = [], B = [], C = this.xAxis, b = this.yAxis, M = b.stacking.stacks[this.stackKey], x = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(P);
if (d = d || this.points, this.options.stacking) {
for (var l = 0; l < d.length; l++)
d[l].leftNull = d[l].rightNull = void 0, x[d[l].x] = d[l];
N(M, function(t, n) {
t.total !== null && B.push(n);
}), B.sort(function(t, n) {
return t - n;
});
var s = a.map(function(t) {
return t.visible;
});
B.forEach(function(t, n) {
var o = 0, A, _;
if (x[t] && !x[t].isNull)
O.push(x[t]), [-1, 1].forEach(function(j) {
var T = j === 1 ? "rightNull" : "leftNull", X = 0, f = M[B[n + j]];
if (f)
for (var m = i; 0 <= m && m < c; ) {
var L = a[m].index;
A = f.points[L], A || (L === P.index ? x[t][T] = !0 : s[m] && (_ = M[t].points[L]) && (X -= _[1] - _[0])), m += p;
}
x[t][j === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var D = i; 0 <= D && D < c; ) {
if (A = M[t].points[a[D].index]) {
o = A[1];
break;
}
D += p;
}
o = w(o, 0), o = b.translate(o, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: o, yBottom: o });
}
});
}
return O;
}, u.defaultOptions = W(U.defaultOptions, { threshold: 0 }), u;
}(U), y(Z.prototype, {
singleStacks: !1,
drawLegendSymbol: R.drawRectangle
}), I.registerSeriesType("area", Z), Z;
}), E(h, "Series/Spline/SplineSeries.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R) {
var I = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), Z = y.seriesTypes.line, H = R.merge, $ = R.pick;
return R = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return I(W, U), W.prototype.getPointSpline = function(N, w, v) {
var u = w.plotX || 0, d = w.plotY || 0, P = N[v - 1];
if (v = N[v + 1], P && !P.isNull && P.doCurve !== !1 && !w.isCliff && v && !v.isNull && v.doCurve !== !1 && !w.isCliff) {
N = P.plotY || 0;
var O = v.plotX || 0;
v = v.plotY || 0;
var B = 0, C = (1.5 * u + (P.plotX || 0)) / 2.5, b = (1.5 * d + N) / 2.5;
O = (1.5 * u + O) / 2.5;
var M = (1.5 * d + v) / 2.5;
O !== C && (B = (M - b) * (O - u) / (O - C) + d - M), b += B, M += B, b > N && b > d ? (b = Math.max(N, d), M = 2 * d - b) : b < N && b < d && (b = Math.min(N, d), M = 2 * d - b), M > v && M > d ? (M = Math.max(v, d), b = 2 * d - M) : M < v && M < d && (M = Math.min(v, d), b = 2 * d - M), w.rightContX = O, w.rightContY = M;
}
return w = ["C", $(P.rightContX, P.plotX, 0), $(P.rightContY, P.plotY, 0), $(C, u, 0), $(b, d, 0), u, d], P.rightContX = P.rightContY = void 0, w;
}, W.defaultOptions = H(Z.defaultOptions), W;
}(Z), y.registerSeriesType("spline", R), R;
}), E(
h,
"Series/AreaSpline/AreaSplineSeries.js",
[h["Series/Area/AreaSeries.js"], h["Series/Spline/SplineSeries.js"], h["Core/Legend/LegendSymbol.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, R, I, Z, H) {
var $ = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), U = y.prototype, W = H.extend, N = H.merge;
return H = function(w) {
function v() {
var u = w !== null && w.apply(this, arguments) || this;
return u.data = void 0, u.points = void 0, u.options = void 0, u;
}
return $(v, w), v.defaultOptions = N(R.defaultOptions, y.defaultOptions), v;
}(R), W(H.prototype, { getGraphPath: U.getGraphPath, getStackPoints: U.getStackPoints, drawGraph: U.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
}
), E(h, "Series/Column/ColumnSeries.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U) {
var W = this && this.__extends || function() {
var c = function(p, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, s) {
l.__proto__ = s;
} || function(l, s) {
for (var t in s)
s.hasOwnProperty(t) && (l[t] = s[t]);
}, c(p, i);
};
return function(p, i) {
function l() {
this.constructor = p;
}
c(p, i), p.prototype = i === null ? Object.create(i) : (l.prototype = i.prototype, new l());
};
}(), N = y.animObject, w = R.parse, v = I.hasTouch;
y = I.noop;
var u = U.clamp, d = U.css, P = U.defined, O = U.extend, B = U.fireEvent, C = U.isArray, b = U.isNumber, M = U.merge, x = U.pick, a = U.objectEach;
return U = function(c) {
function p() {
var i = c !== null && c.apply(this, arguments) || this;
return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
}
return W(p, c), p.prototype.animate = function(i) {
var l = this, s = this.yAxis, t = l.options, n = this.chart.inverted, o = {}, A = n ? "translateX" : "translateY";
if (i)
o.scaleY = 1e-3, i = u(s.toPixels(t.threshold), s.pos, s.pos + s.len), n ? o.translateX = i - s.len : o.translateY = i, l.clipBox && l.setClip(), l.group.attr(o);
else {
var _ = Number(l.group.attr(A));
l.group.animate({ scaleY: 1 }, O(N(l.options.animation), { step: function(D, j) {
l.group && (o[A] = _ + j.pos * (s.pos - _), l.group.attr(o));
} }));
}
}, p.prototype.init = function(i, l) {
c.prototype.init.apply(this, arguments);
var s = this;
i = s.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === s.type && (t.isDirty = !0);
});
}, p.prototype.getColumnMetrics = function() {
var i = this, l = i.options, s = i.xAxis, t = i.yAxis, n = s.options.reversedStacks;
n = s.reversed && !n || !s.reversed && n;
var o = {}, A, _ = 0;
l.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
var f = X.yAxis, m = X.options;
if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === f.len && t.pos === f.pos) {
if (m.stacking && m.stacking !== "group") {
A = X.stackKey, typeof o[A] > "u" && (o[A] = _++);
var L = o[A];
} else
m.grouping !== !1 && (L = _++);
X.columnIndex = L;
}
});
var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || l.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), j = D * l.groupPadding, T = (D - 2 * j) / (_ || 1);
return l = Math.min(l.maxPointWidth || s.len, x(l.pointWidth, T * (1 - 2 * l.pointPadding))), i.columnMetrics = { width: l, offset: (T - l) / 2 + (j + ((i.columnIndex || 0) + (n ? 1 : 0)) * T - D / 2) * (n ? -1 : 1), paddedWidth: T, columnCount: _ }, i.columnMetrics;
}, p.prototype.crispCol = function(i, l, s, t) {
var n = this.chart, o = this.borderWidth, A = -(o % 2 ? 0.5 : 0);
return o = o % 2 ? 0.5 : 1, n.inverted && n.renderer.isVML && (o += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(l + t) + o, A = 0.5 >= Math.abs(l) && 0.5 < t, l = Math.round(l) + o, t -= l, A && t && (--l, t += 1), { x: i, y: l, width: s, height: t };
}, p.prototype.adjustForMissingColumns = function(i, l, s, t) {
var n = this, o = this.options.stacking;
if (!s.isNull && 1 < t.columnCount) {
var A = 0, _ = 0;
a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
if (typeof s.x == "number" && (D = D[s.x.toString()])) {
var j = D.points[n.index], T = D.total;
o ? (j && (A = _), D.hasValidPoints && _++) : C(j) && (A = j[1], _ = T || 0);
}
}), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + l) / 2 - l - A * t.paddedWidth;
}
return i;
}, p.prototype.translate = function() {
var i = this, l = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = x(s.borderWidth, t ? 0 : 1);
var n = i.xAxis, o = i.yAxis, A = s.threshold, _ = i.translatedThreshold = o.getThreshold(A), D = x(s.minPointLength, 5), j = i.getColumnMetrics(), T = j.width, X = i.pointXOffset = j.offset, f = i.dataMin, m = i.dataMax, L = i.barW = Math.max(T, 1 + 2 * t);
l.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
var F = x(Y.yBottom, _), Q = 999 + Math.abs(F), k = Y.plotX || 0;
Q = u(Y.plotY, -Q, o.len + Q);
var G = Math.min(Q, F), z = Math.max(Q, F) - G, V = T, q = k + X, it = L;
D && Math.abs(z) < D && (z = D, k = !o.reversed && !Y.negative || o.reversed && Y.negative, b(A) && b(m) && Y.y === A && m <= A && (o.min || 0) < A && (f !== m || (o.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? F - D : _ - (k ? D : 0)), P(Y.options.pointWidth) && (V = it = Math.ceil(Y.options.pointWidth), q -= Math.round((V - T) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, V, Y, j)), Y.barX = q, Y.pointWidth = V, Y.tooltipPos = l.inverted ? [u(o.len + o.pos - l.plotLeft - Q, o.pos - l.plotLeft, o.len + o.pos - l.plotLeft), n.len + n.pos - l.plotTop - q - it / 2, z] : [n.left - l.plotLeft + q + it / 2, u(Q + o.pos - l.plotTop, o.pos - l.plotTop, o.len + o.pos - l.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
});
}, p.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, p.prototype.pointAttribs = function(i, l) {
var s = this.options, t = this.pointAttrToOptions || {}, n = t.stroke || "borderColor", o = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[n] || s[n] || A;
t = i && i.options.dashStyle || s.dashStyle;
var D = i && i[o] || s[o] || this[o] || 0, j = x(i && i.opacity, s.opacity, 1);
if (i && this.zones.length) {
var T = i.getZone();
A = i.options.color || T && (T.color || i.nonZonedColor) || this.color, T && (_ = T.borderColor || _, t = T.dashStyle || t, D = T.borderWidth || D);
}
return l && i && (i = M(s.states[l], i.options.states && i.options.states[l] || {}), l = i.brightness, A = i.color || typeof l < "u" && w(A).brighten(i.brightness).get() || A, _ = i[n] || _, D = i[o] || D, t = i.dashStyle || t, j = x(i.opacity, j)), n = { fill: A, stroke: _, "stroke-width": D, opacity: j }, t && (n.dashstyle = t), n;
}, p.prototype.drawPoints = function() {
var i = this, l = this.chart, s = i.options, t = l.renderer, n = s.animationLimit || 250, o;
i.points.forEach(function(A) {
var _ = A.graphic, D = !!_, j = _ && l.pointCount < n ? "animate" : "attr";
b(A.plotY) && A.y !== null ? (o = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(o && o.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](o).add(A.group || i.group)) && i.enabledDataSorting && l.hasRendered && l.pointCount < n && (_.attr({ x: A.startXPos }), D = !0, j = "animate"), _ && D && _[j](M(o)), s.borderRadius && _[j]({ r: s.borderRadius }), l.styledMode || _[j](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
});
}, p.prototype.drawTracker = function() {
var i = this, l = i.chart, s = l.pointer, t = function(o) {
var A = s.getPointFromEvent(o);
typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(o));
}, n;
i.points.forEach(function(o) {
n = C(o.dataLabels) ? o.dataLabels : o.dataLabel ? [o.dataLabel] : [], o.graphic && (o.graphic.element.point = o), n.forEach(function(A) {
A.div ? A.div.point = o : A.element.point = o;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(o) {
i[o] && (i[o].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
s.onTrackerMouseOut(A);
}), v && i[o].on(
"touchstart",
t
), !l.styledMode && i.options.cursor && i[o].css(d).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), B(this, "afterDrawTracker");
}, p.prototype.remove = function() {
var i = this, l = i.chart;
l.hasRendered && l.series.forEach(function(s) {
s.type === i.type && (s.isDirty = !0);
}), H.prototype.remove.apply(i, arguments);
}, p.defaultOptions = M(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
hover: { halo: !1, brightness: 0.1 },
select: { color: "#cccccc", borderColor: "#000000" }
}, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), p;
}(H), O(U.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), $.registerSeriesType("column", U), U;
}), E(h, "Core/Series/DataLabel.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Utilities.js"]
], function(y, R, I) {
var Z = y.getDeferredAnimation, H = R.format, $ = I.defined, U = I.extend, W = I.fireEvent, N = I.isArray, w = I.merge, v = I.objectEach, u = I.pick, d = I.splat, P;
return function(O) {
function B(p, i, l, s, t) {
var n = this, o = this.chart, A = this.isCartesian && o.inverted, _ = this.enabledDataSorting, D = u(p.dlBox && p.dlBox.centerX, p.plotX, -9999), j = u(p.plotY, -9999), T = i.getBBox(), X = l.rotation, f = l.align, m = o.isInsidePlot(D, Math.round(j), { inverted: A, paneCoordinates: !0, series: n }), L = function(k) {
_ && n.xAxis && !Y && n.setDataLabelStartPos(
p,
i,
t,
m,
k
);
}, Y = u(l.overflow, _ ? "none" : "justify") === "justify", F = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || u(l.inside, !!this.options.stacking) && s && o.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: n }));
if (F) {
var Q = o.renderer.fontMetrics(o.styledMode ? void 0 : l.style.fontSize, i).b;
s = U({ x: A ? this.yAxis.len - j : D, y: Math.round(A ? this.xAxis.len - D : j), width: 0, height: 0 }, s), U(l, { width: T.width, height: T.height }), X ? (Y = !1, D = o.renderer.rotCorr(Q, X), D = { x: s.x + (l.x || 0) + s.width / 2 + D.x, y: s.y + (l.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[l.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: f }), L = (X + 720) % 360, L = 180 < L && 360 > L, f === "left" ? D.y -= L ? T.height : 0 : f === "center" ? (D.x -= T.width / 2, D.y -= T.height / 2) : f === "right" && (D.x -= T.width, D.y -= L ? 0 : T.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(l, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, l, D, T, s, t) : u(l.crop, !0) && (F = o.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: n }) && o.isInsidePlot(D.x + T.width, D.y + T.height, {
paneCoordinates: !0,
series: n
})), l.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? o.plotWidth - p.plotY : p.plotX, anchorY: A ? o.plotHeight - p.plotX : p.plotY });
}
t && _ && (i.placed = !1), F || _ && !Y || (i.hide(!0), i.placed = !1);
}
function C(p, i) {
var l = i.filter;
return l ? (i = l.operator, p = p[l.property], l = l.value, i === ">" && p > l || i === "<" && p < l || i === ">=" && p >= l || i === "<=" && p <= l || i === "==" && p == l || i === "===" && p === l) : !0;
}
function b() {
var p = this, i = p.chart, l = p.options, s = p.points, t = p.hasRendered || 0, n = i.renderer, o = l.dataLabels, A, _ = o.animation;
if (_ = o.defer ? Z(
i,
_,
p
) : { defer: 0, duration: 0 }, o = x(x(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[p.type] && i.options.plotOptions[p.type].dataLabels), o), W(this, "drawDataLabels"), N(o) || o.enabled || p._hasPointLabels) {
var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", o.zIndex || 6);
D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[l.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(j) {
A = d(x(o, j.dlOptions || j.options && j.options.dataLabels)), A.forEach(function(T, X) {
var f = T.enabled && (!j.isNull || j.dataLabelOnNull) && C(j, T), m = j.connectors ? j.connectors[X] : j.connector, L = j.dataLabels ? j.dataLabels[X] : j.dataLabel, Y = u(T.distance, j.labelDistance), F = !L;
if (f) {
var Q = j.getLabelConfig(), k = u(T[j.formatPrefix + "Format"], T.format);
Q = $(k) ? H(k, Q, i) : (T[j.formatPrefix + "Formatter"] || T.formatter).call(Q, T), k = T.style;
var G = T.rotation;
i.styledMode || (k.color = u(T.color, k.color, p.color, "#000000"), k.color === "contrast" ? (j.contrastColor = n.getContrast(j.color || p.color), k.color = !$(Y) && T.inside || 0 > Y || l.stacking ? j.contrastColor : "#000000") : delete j.contrastColor, l.cursor && (k.cursor = l.cursor));
var z = { r: T.borderRadius || 0, rotation: G, padding: T.padding, zIndex: 1 };
i.styledMode || (z.fill = T.backgroundColor, z.stroke = T.borderColor, z["stroke-width"] = T.borderWidth), v(z, function(V, q) {
typeof V > "u" && delete z[q];
});
}
!L || f && $(Q) && !!L.div == !!T.useHTML || (j.dataLabel = L = j.dataLabel && j.dataLabel.destroy(), j.dataLabels && (j.dataLabels.length === 1 ? delete j.dataLabels : delete j.dataLabels[X]), X || delete j.dataLabel, m && (j.connector = j.connector.destroy(), j.connectors && (j.connectors.length === 1 ? delete j.connectors : delete j.connectors[X]))), f && $(Q) && (L ? z.text = Q : (j.dataLabels = j.dataLabels || [], L = j.dataLabels[X] = G ? n.text(Q, 0, -9999, T.useHTML).addClass("highcharts-data-label") : n.label(Q, 0, -9999, T.shape, null, null, T.useHTML, null, "data-label"), X || (j.dataLabel = L), L.addClass(" highcharts-data-label-color-" + j.colorIndex + " " + (T.className || "") + (T.useHTML ? " highcharts-tracker" : ""))), L.options = T, L.attr(z), i.styledMode || L.css(k).shadow(T.shadow), L.added || L.add(D), T.textPath && !T.useHTML && (L.setTextPath(j.getDataLabelPath && j.getDataLabelPath(L) || j.graphic, T.textPath), j.dataLabelPath && !T.textPath.enabled && (j.dataLabelPath = j.dataLabelPath.destroy())), p.alignDataLabel(j, L, T, null, F));
});
});
}
W(this, "afterDrawDataLabels");
}
function M(p, i, l, s, t, n) {
var o = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, j = i.x;
j = j === void 0 ? 0 : j;
var T = i.y;
T = T === void 0 ? 0 : T;
var X = (l.x || 0) + D;
if (0 > X) {
A === "right" && 0 <= j ? (i.align = "left", i.inside = !0) : j -= X;
var f = !0;
}
return X = (l.x || 0) + s.width - D, X > o.plotWidth && (A === "left" && 0 >= j ? (i.align = "right", i.inside = !0) : j += o.plotWidth - X, f = !0), X = l.y + D, 0 > X && (_ === "bottom" && 0 <= T ? (i.verticalAlign = "top", i.inside = !0) : T -= X, f = !0), X = (l.y || 0) + s.height - D, X > o.plotHeight && (_ === "top" && 0 >= T ? (i.verticalAlign = "bottom", i.inside = !0) : T += o.plotHeight - X, f = !0), f && (i.x = j, i.y = T, p.placed = !n, p.align(i, void 0, t)), f;
}
function x(p, i) {
var l = [], s;
if (N(p) && !N(i))
l = p.map(function(t) {
return w(t, i);
});
else if (N(i) && !N(p))
l = i.map(function(t) {
return w(p, t);
});
else if (N(p) || N(i))
for (s = Math.max(p.length, i.length); s--; )
l[s] = w(p[s], i[s]);
else
l = w(p, i);
return l;
}
function a(p, i, l, s, t) {
var n = this.chart, o = n.inverted, A = this.xAxis, _ = A.reversed, D = o ? i.height / 2 : i.width / 2;
p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = o ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = o ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), n.hasRendered && (l && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(p) {
if (c.indexOf(p) === -1) {
var i = p.prototype;
c.push(p), i.alignDataLabel = B, i.drawDataLabels = b, i.justifyDataLabel = M, i.setDataLabelStartPos = a;
}
};
}(P || (P = {})), P;
}), E(h, "Series/Column/ColumnDataLabel.js", [h["Core/Series/DataLabel.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = R.series, H = I.merge, $ = I.pick, U;
return function(W) {
function N(v, u, d, P, O) {
var B = this.chart.inverted, C = v.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
var M = v.dlBox || v.shapeArgs, x = $(v.below, v.plotY > $(this.translatedThreshold, C)), a = $(d.inside, !!this.options.stacking);
M && (P = H(M), 0 > P.y && (P.height += P.y, P.y = 0), M = P.y + P.height - C, 0 < M && M < P.height && (P.height -= M), B && (P = { x: C - P.y - P.height, y: b - P.x - P.width, width: P.height, height: P.width }), a || (B ? (P.x += x ? 0 : P.width, P.width = 0) : (P.y += x ? P.height : 0, P.height = 0))), d.align = $(d.align, !B || a ? "center" : x ? "right" : "left"), d.verticalAlign = $(d.verticalAlign, B || a ? "middle" : x ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, v, u, d, P, O), d.inside && v.contrastColor && u.css({ color: v.contrastColor });
}
var w = [];
W.compose = function(v) {
y.compose(Z), w.indexOf(v) === -1 && (w.push(v), v.prototype.alignDataLabel = N);
};
}(U || (U = {})), U;
}), E(h, "Series/Bar/BarSeries.js", [h["Series/Column/ColumnSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), H = I.extend, $ = I.merge;
return I = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return Z(W, U), W.defaultOptions = $(
y.defaultOptions,
{}
), W;
}(y), H(I.prototype, { inverted: !0 }), R.registerSeriesType("bar", I), I;
}), E(h, "Series/Scatter/ScatterSeries.js", [h["Series/Column/ColumnSeries.js"], h["Series/Line/LineSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I, Z) {
var H = this && this.__extends || function() {
var N = function(w, v) {
return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, d) {
u.__proto__ = d;
} || function(u, d) {
for (var P in d)
d.hasOwnProperty(P) && (u[P] = d[P]);
}, N(w, v);
};
return function(w, v) {
function u() {
this.constructor = w;
}
N(w, v), w.prototype = v === null ? Object.create(v) : (u.prototype = v.prototype, new u());
};
}(), $ = Z.addEvent, U = Z.extend, W = Z.merge;
return Z = function(N) {
function w() {
var v = N !== null && N.apply(this, arguments) || this;
return v.data = void 0, v.options = void 0, v.points = void 0, v;
}
return H(w, N), w.prototype.applyJitter = function() {
var v = this, u = this.options.jitter, d = this.points.length;
u && this.points.forEach(function(P, O) {
["x", "y"].forEach(function(B, C) {
var b = "plot" + B.toUpperCase();
if (u[B] && !P.isNull) {
var M = v[B + "Axis"], x = u[B] * M.transA;
if (M && !M.isLog) {
var a = Math.max(0, P[b] - x);
M = Math.min(M.len, P[b] + x), C = 1e4 * Math.sin(O + C * d), P[b] = a + (M - a) * (C - Math.floor(C)), B === "x" && (P.clientX = P.plotX);
}
}
});
});
}, w.prototype.drawGraph = function() {
this.options.lineWidth ? N.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, w.defaultOptions = W(R.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), w;
}(R), U(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), $(Z, "afterTranslate", function() {
this.applyJitter();
}), I.registerSeriesType("scatter", Z), Z;
}), E(h, "Series/CenteredUtilities.js", [h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.deg2rad, H = I.isNumber, $ = I.pick, U = I.relativeLength, W;
return function(N) {
N.getCenter = function() {
var w = this.options, v = this.chart, u = 2 * (w.slicedOffset || 0), d = v.plotWidth - 2 * u, P = v.plotHeight - 2 * u, O = w.center, B = Math.min(d, P), C = w.size, b = w.innerSize || 0;
for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), w = [$(O[0], "50%"), $(O[1], "50%"), $(C && 0 > C ? void 0 : w.size, "100%"), $(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !v.angular || this instanceof R || (w[3] = 0), O = 0; 4 > O; ++O)
C = w[O], v = 2 > O || O === 2 && /%$/.test(C), w[O] = U(C, [d, P, B, w[2]][O]) + (v ? u : 0);
return w[3] > w[2] && (w[3] = w[2]), w;
}, N.getStartAndEndRadians = function(w, v) {
return w = H(w) ? w : 0, v = H(v) && v > w && 360 > v - w ? v : w + 360, { start: Z * (w + -90), end: Z * (v + -90) };
};
}(W || (W = {})), W;
}), E(h, "Series/Pie/PiePoint.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}(), H = y.setAnimation, $ = I.addEvent, U = I.defined;
y = I.extend;
var W = I.isNumber, N = I.pick, w = I.relativeLength;
return R = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.labelDistance = void 0, d.options = void 0, d.series = void 0, d;
}
return Z(u, v), u.prototype.getConnectorPath = function() {
var d = this.labelPosition, P = this.series.options.dataLabels, O = this.connectorShapes, B = P.connectorShape;
return O[B] && (B = O[B]), B.call(this, { x: d.final.x, y: d.final.y, alignment: d.alignment }, d.connectorPosition, P);
}, u.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, u.prototype.haloPath = function(d) {
var P = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(P.x, P.y, P.r + d, P.r + d, { innerR: P.r - 1, start: P.start, end: P.end });
}, u.prototype.init = function() {
var d = this;
v.prototype.init.apply(
this,
arguments
), this.name = N(this.name, "Slice");
var P = function(O) {
d.slice(O.type === "select");
};
return $(this, "select", P), $(this, "unselect", P), this;
}, u.prototype.isValid = function() {
return W(this.y) && 0 <= this.y;
}, u.prototype.setVisible = function(d, P) {
var O = this, B = this.series, C = B.chart, b = B.options.ignoreHiddenPoint;
P = N(P, b), d !== this.visible && (this.visible = this.options.visible = d = typeof d > "u" ? !this.visible : d, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(M) {
O[M] && O[M][d ? "show" : "hide"](d);
}), this.legendItem && C.legend.colorizeItem(this, d), d || this.state !== "hover" || this.setState(""), b && (B.isDirty = !0), P && C.redraw());
}, u.prototype.slice = function(d, P, O) {
var B = this.series;
H(O, B.chart), N(P, !0), this.sliced = this.options.sliced = U(d) ? d : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, u;
}(R), y(R.prototype, { connectorShapes: { fixedOffset: function(v, u, d) {
var P = u.breakAt;
return u = u.touchingSliceAt, [["M", v.x, v.y], d.softConnector ? ["C", v.x + (v.alignment === "left" ? -5 : 5), v.y, 2 * P.x - u.x, 2 * P.y - u.y, P.x, P.y] : ["L", P.x, P.y], ["L", u.x, u.y]];
}, straight: function(v, u) {
return u = u.touchingSliceAt, [["M", v.x, v.y], ["L", u.x, u.y]];
}, crookedLine: function(v, u, d) {
u = u.touchingSliceAt;
var P = this.series, O = P.center[0], B = P.chart.plotWidth, C = P.chart.plotLeft;
P = v.alignment;
var b = this.shapeArgs.r;
return d = w(d.crookDistance, 1), B = P === "left" ? O + b + (B + C - O - b) * (1 - d) : C + (O - b) * d, d = ["L", B, v.y], O = !0, (P === "left" ? B > v.x || B < u.x : B < v.x || B > u.x) && (O = !1), v = [["M", v.x, v.y]], O && v.push(d), v.push(["L", u.x, u.y]), v;
} } }), R;
}), E(h, "Series/Pie/PieSeries.js", [h["Series/CenteredUtilities.js"], h["Series/Column/ColumnSeries.js"], h["Core/Globals.js"], h["Core/Legend/LegendSymbol.js"], h["Series/Pie/PiePoint.js"], h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U, W, N) {
var w = this && this.__extends || function() {
var b = function(M, x) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
a.__proto__ = c;
} || function(a, c) {
for (var p in c)
c.hasOwnProperty(p) && (a[p] = c[p]);
}, b(M, x);
};
return function(M, x) {
function a() {
this.constructor = M;
}
b(M, x), M.prototype = x === null ? Object.create(x) : (a.prototype = x.prototype, new a());
};
}(), v = y.getStartAndEndRadians;
I = I.noop;
var u = N.clamp, d = N.extend, P = N.fireEvent, O = N.merge, B = N.pick, C = N.relativeLength;
return N = function(b) {
function M() {
var x = b !== null && b.apply(this, arguments) || this;
return x.center = void 0, x.data = void 0, x.maxLabelDistance = void 0, x.options = void 0, x.points = void 0, x;
}
return w(M, b), M.prototype.animate = function(x) {
var a = this, c = a.points, p = a.startAngleRad;
x || c.forEach(function(i) {
var l = i.graphic, s = i.shapeArgs;
l && s && (l.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), l.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
});
}, M.prototype.drawEmpty = function() {
var x = this.startAngleRad, a = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var p = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, x, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: W.arc(p, i, this.center[2] / 2, 0, { start: x, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
} else
this.graph && (this.graph = this.graph.destroy());
}, M.prototype.drawPoints = function() {
var x = this.chart.renderer;
this.points.forEach(function(a) {
a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = x[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
});
}, M.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, M.prototype.getX = function(x, a, c) {
var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
return x = Math.asin(u((x - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(x) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
}, M.prototype.hasData = function() {
return !!this.processedXData.length;
}, M.prototype.redrawPoints = function() {
var x = this, a = x.chart, c = a.renderer, p = x.options.shadow, i, l, s, t;
this.drawEmpty(), !p || x.shadowGroup || a.styledMode || (x.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(x.group)), x.points.forEach(function(n) {
var o = {};
if (l = n.graphic, !n.isNull && l) {
var A = void 0;
t = n.shapeArgs, i = n.getTranslate(), a.styledMode || (A = n.shadowGroup, p && !A && (A = n.shadowGroup = c.g("shadow").add(x.shadowGroup)), A && A.attr(i), s = x.pointAttribs(n, n.selected && "select")), n.delayedRendering ? (l.setRadialReference(x.center).attr(t).attr(i), a.styledMode || l.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), n.delayedRendering = !1) : (l.setRadialReference(x.center), a.styledMode || O(!0, o, s), O(!0, o, t, i), l.animate(o)), l.attr({ visibility: n.visible ? "inherit" : "hidden" }), l.addClass(n.getClassName(), !0);
} else
l && (n.graphic = l.destroy());
});
}, M.prototype.sortByAngle = function(x, a) {
x.sort(function(c, p) {
return typeof c.angle < "u" && (p.angle - c.angle) * a;
});
}, M.prototype.translate = function(x) {
this.generatePoints();
var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = v(a.startAngle, a.endAngle), l = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - l;
var s = this.points, t = a.dataLabels.distance;
a = a.ignoreHiddenPoint;
var n = s.length, o, A = 0;
for (x || (this.center = x = this.getCenter()), o = 0; o < n; o++) {
var _ = s[o], D = l + A * i;
!_.isValid() || a && !_.visible || (A += _.percentage / 100);
var j = l + A * i, T = { x: x[0], y: x[1], r: x[2] / 2, innerR: x[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * j) / 1e3 };
_.shapeType = "arc", _.shapeArgs = T, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, T.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), j = (j + D) / 2, j > 1.5 * Math.PI ? j -= 2 * Math.PI : j < -Math.PI / 2 && (j += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(j) * c), translateY: Math.round(Math.sin(j) * c) }, T = Math.cos(j) * x[2] / 2;
var X = Math.sin(j) * x[2] / 2;
_.tooltipPos = [x[0] + 0.7 * T, x[1] + 0.7 * X], _.half = j < -Math.PI / 2 || j > Math.PI / 2 ? 1 : 0, _.angle = j, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: x[0] + T + Math.cos(j) * _.labelDistance, y: x[1] + X + Math.sin(j) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: x[0] + T + Math.cos(j) * D, y: x[1] + X + Math.sin(j) * D }, touchingSliceAt: { x: x[0] + T, y: x[1] + X } } };
}
P(this, "afterTranslate");
}, M.prototype.updateTotals = function() {
var x = this.points, a = x.length, c = this.options.ignoreHiddenPoint, p, i = 0;
for (p = 0; p < a; p++) {
var l = x[p];
!l.isValid() || c && !l.visible || (i += l.y);
}
for (this.total = i, p = 0; p < a; p++)
l = x[p], l.percentage = 0 < i && (l.visible || !c) ? l.y / i * 100 : 0, l.total = i;
}, M.defaultOptions = O($.defaultOptions, {
center: [null, null],
clip: !1,
colorByPoint: !0,
dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
return this.point.isNull ? void 0 : this.point.name;
}, softConnector: !0, x: 0 },
fillColor: void 0,
ignoreHiddenPoint: !0,
inactiveOtherPoints: !0,
legendType: "point",
marker: null,
size: null,
showInLegend: !1,
slicedOffset: 10,
stickyTracking: !1,
tooltip: { followPointer: !0 },
borderColor: "#ffffff",
borderWidth: 1,
lineWidth: void 0,
states: { hover: { brightness: 0.1 } }
}), M;
}($), d(N.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: R.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: R.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("pie", N), N;
}), E(h, "Series/Pie/PieDataLabel.js", [
h["Core/Series/DataLabel.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H) {
var $ = R.noop, U = I.distribute, W = Z.series, N = H.arrayMax, w = H.clamp, v = H.defined, u = H.merge, d = H.pick, P = H.relativeLength, O;
return function(B) {
function C() {
var c = this, p = c.data, i = c.chart, l = c.options.dataLabels || {}, s = l.connectorPadding, t = i.plotWidth, n = i.plotHeight, o = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, j = _[1], T = [[], []], X = [0, 0, 0, 0], f = c.dataLabelPositioners, m, L, Y, F, Q, k, G, z, V, q, it, et;
c.visible && (l.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), W.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (T[nt.half].push(nt), nt.dataLabel._pos = null, !v(l.style.width) && !v(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), T.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var lt = Math.max(0, j - D - c.maxLabelDistance), at = Math.min(j + D + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, j - D - J.labelDistance), J.bottom = Math.min(j + D + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
}), lt = at + dt - lt, U(gt, lt, lt / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], k = m.labelPosition, F = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", V = lt = k.natural.y, gt && v(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, V = f.radialDistributionY(m))), delete m.positionIndex, l.justify)
z = f.justify(m, D, _);
else
switch (l.alignTo) {
case "connectors":
z = f.alignToConnectors(nt, rt, t, o);
break;
case "plotEdges":
z = f.alignToPlotEdges(F, rt, t, o);
break;
default:
z = f.radialDistributionX(c, m, V, lt);
}
F._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, F._pos = { x: z + d(et.x, l.x) + ({ left: s, right: -s }[k.alignment] || 0), y: V + d(et.y, l.y) - 10 }, k.final.x = z, k.final.y = V, d(l.crop, !0) && (Q = F.getBBox().width, lt = null, z - Q < s && rt === 1 ? (lt = Math.round(Q - z + s), X[3] = Math.max(lt, X[3])) : z + Q > t - s && rt === 0 && (lt = Math.round(z + Q - t + s), X[1] = Math.max(lt, X[1])), 0 > V - G / 2 ? X[0] = Math.max(Math.round(-V + G / 2), X[0]) : V + G / 2 > n && (X[2] = Math.max(Math.round(V + G / 2 - n), X[2])), F.sideOverflow = lt);
}
}
}), N(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = u(l, nt.options.dataLabels), L = d(et.connectorWidth, 1)) {
var rt;
Y = nt.connector, (F = nt.dataLabel) && F._pos && nt.visible && 0 < nt.labelDistance ? (q = F._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var p = c.dataLabel, i;
p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function M(c) {
var p = this.center, i = this.options, l = i.center, s = i.minSize || 80, t = i.size !== null;
if (!t) {
if (l[0] !== null)
var n = Math.max(p[2] - Math.max(c[1], c[3]), s);
else
n = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
l[1] !== null ? n = w(n, s, p[2] - Math.max(c[0], c[2])) : (n = w(n, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), n < p[2] ? (p[2] = n, p[3] = Math.min(P(i.innerSize || 0, n), n), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var x = [], a = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, p, i, l) {
return c.getX(i < p.top + 2 || i > p.bottom - 2 ? l : i, p.half, p);
}, justify: function(c, p, i) {
return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
}, alignToPlotEdges: function(c, p, i, l) {
return c = c.getBBox().width, p ? c + l : i - c - l;
}, alignToConnectors: function(c, p, i, l) {
var s = 0, t;
return c.forEach(function(n) {
t = n.dataLabel.getBBox().width, t > s && (s = t);
}), p ? s + l : i - s - l;
} };
B.compose = function(c) {
y.compose(W), x.indexOf(c) === -1 && (x.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = $, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = M);
};
}(O || (O = {})), O;
}), E(h, "Extensions/OverlappingDataLabels.js", [h["Core/Chart/Chart.js"], h["Core/Utilities.js"]], function(y, R) {
function I(w, v) {
var u = !1;
if (w) {
var d = w.newOpacity;
w.oldOpacity !== d && (w.alignAttr && w.placed ? (w[d ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), u = !0, w.alignAttr.opacity = d, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
v.styledMode || w.css({ pointerEvents: d ? "auto" : "none" });
}), H(v, "afterHideOverlappingLabel")) : w.attr({ opacity: d })), w.isOld = !0;
}
return u;
}
var Z = R.addEvent, H = R.fireEvent, $ = R.isArray, U = R.isNumber, W = R.objectEach, N = R.pick;
Z(y, "render", function() {
var w = this, v = [];
(this.labelCollectors || []).forEach(function(u) {
v = v.concat(u());
}), (this.yAxis || []).forEach(function(u) {
u.stacking && u.options.stackLabels && !u.options.stackLabels.allowOverlap && W(u.stacking.stacks, function(d) {
W(d, function(P) {
P.label && P.label.visibility !== "hidden" && v.push(P.label);
});
});
}), (this.series || []).forEach(function(u) {
var d = u.options.dataLabels;
u.visible && (d.enabled !== !1 || u._hasPointLabels) && (d = function(P) {
return P.forEach(function(O) {
O.visible && ($(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
var C = B.options;
B.labelrank = N(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, w)) : v.push(B);
});
});
}, d(u.nodes || []), d(u.points));
}), this.hideOverlappingLabels(v);
}), y.prototype.hideOverlappingLabels = function(w) {
var v = this, u = w.length, d = v.renderer, P, O, B, C = !1, b = function(a) {
var c, p = a.box ? 0 : a.padding || 0, i = c = 0, l;
if (a && (!a.alignAttr || a.placed)) {
var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = d.fontMetrics(null, a.element).h);
var n = a.width - 2 * p;
return (l = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +l * n : U(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
}
};
for (O = 0; O < u; O++)
(P = w[O]) && (P.oldOpacity = P.opacity, P.newOpacity = 1, P.absoluteBox = b(P));
for (w.sort(function(a, c) {
return (c.labelrank || 0) - (a.labelrank || 0);
}), O = 0; O < u; O++) {
var M = (b = w[O]) && b.absoluteBox;
for (P = O + 1; P < u; ++P) {
var x = (B = w[P]) && B.absoluteBox;
!M || !x || b === B || b.newOpacity === 0 || B.newOpacity === 0 || x.x >= M.x + M.width || x.x + x.width <= M.x || x.y >= M.y + M.height || x.y + x.height <= M.y || ((b.labelrank < B.labelrank ? b : B).newOpacity = 0);
}
}
w.forEach(function(a) {
I(a, v) && (C = !0);
}), C && H(v, "afterHideAllOverlappingLabels");
};
}), E(
h,
"Core/Responsive.js",
[h["Core/Utilities.js"]],
function(y) {
var R = y.extend, I = y.find, Z = y.isArray, H = y.isObject, $ = y.merge, U = y.objectEach, W = y.pick, N = y.splat, w = y.uniqueKey, v;
return function(u) {
var d = [];
u.compose = function(O) {
return d.indexOf(O) === -1 && (d.push(O), R(O.prototype, P.prototype)), O;
};
var P = function() {
function O() {
}
return O.prototype.currentOptions = function(B) {
function C(x, a, c, p) {
var i;
U(x, function(l, s) {
if (!p && -1 < b.collectionsWithUpdate.indexOf(s) && a[s])
for (l = N(l), c[s] = [], i = 0; i < Math.max(l.length, a[s].length); i++)
a[s][i] && (l[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, C(l[i], a[s][i], c[s][i], p + 1)));
else
H(l) ? (c[s] = Z(l) ? [] : {}, C(l, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
});
}
var b = this, M = {};
return C(B, this.options, M, 0), M;
}, O.prototype.matchResponsiveRule = function(B, C) {
var b = B.condition;
(b.callback || function() {
return this.chartWidth <= W(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= W(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= W(b.minWidth, 0) && this.chartHeight >= W(b.minHeight, 0);
}).call(this) && C.push(B._id);
}, O.prototype.setResponsive = function(B, C) {
var b = this, M = this.options.responsive, x = this.currentResponsive, a = [];
!C && M && M.rules && M.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, a);
}, this), C = $.apply(void 0, a.map(function(c) {
return I((M || {}).rules || [], function(p) {
return p._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (x && x.ruleIds) && (x && this.update(x.undoOptions, B, !0), a ? (x = this.currentOptions(C), x.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: x }, this.update(C, B, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(v || (v = {})), v;
}
), E(h, "masters/highcharts.src.js", [
h["Core/Globals.js"],
h["Core/Utilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Animation/Fx.js"],
h["Core/Animation/AnimationUtilities.js"],
h["Core/Renderer/HTML/AST.js"],
h["Core/FormatUtilities.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Renderer/HTML/HTMLElement.js"],
h["Core/Renderer/HTML/HTMLRenderer.js"],
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/Axis/LogarithmicAxis.js"],
h["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
h["Core/Axis/Tick.js"],
h["Core/Tooltip.js"],
h["Core/Series/Point.js"],
h["Core/Pointer.js"],
h["Core/MSPointer.js"],
h["Core/Legend/Legend.js"],
h["Core/Chart/Chart.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Series/Column/ColumnSeries.js"],
h["Series/Column/ColumnDataLabel.js"],
h["Series/Pie/PieSeries.js"],
h["Series/Pie/PieDataLabel.js"],
h["Core/Series/DataLabel.js"],
h["Core/Responsive.js"],
h["Core/Color/Color.js"],
h["Core/Time.js"]
], function(y, R, I, Z, H, $, U, W, N, w, v, u, d, P, O, B, C, b, M, x, a, c, p, i, l, s, t, n, o, A, _, D, j) {
return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = $, y.Axis = d, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = M, y.Pointer = a.isRequired() ? a : x, y.Series = i, y.SVGElement = N, y.SVGRenderer = w, y.Tick = C, y.Time = j, y.Tooltip = b, y.Color = D, y.color = D.parse, u.compose(w), v.compose(N), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = U.dateFormat, y.format = U.format, y.numberFormat = U.numberFormat, y.addEvent = R.addEvent, y.arrayMax = R.arrayMax, y.arrayMin = R.arrayMin, y.attr = R.attr, y.clearTimeout = R.clearTimeout, y.correctFloat = R.correctFloat, y.createElement = R.createElement, y.css = R.css, y.defined = R.defined, y.destroyObjectProperties = R.destroyObjectProperties, y.discardElement = R.discardElement, y.distribute = W.distribute, y.erase = R.erase, y.error = R.error, y.extend = R.extend, y.extendClass = R.extendClass, y.find = R.find, y.fireEvent = R.fireEvent, y.getMagnitude = R.getMagnitude, y.getStyle = R.getStyle, y.inArray = R.inArray, y.isArray = R.isArray, y.isClass = R.isClass, y.isDOMElement = R.isDOMElement, y.isFunction = R.isFunction, y.isNumber = R.isNumber, y.isObject = R.isObject, y.isString = R.isString, y.keys = R.keys, y.merge = R.merge, y.normalizeTickInterval = R.normalizeTickInterval, y.objectEach = R.objectEach, y.offset = R.offset, y.pad = R.pad, y.pick = R.pick, y.pInt = R.pInt, y.relativeLength = R.relativeLength, y.removeEvent = R.removeEvent, y.seriesType = l.seriesType, y.splat = R.splat, y.stableSort = R.stableSort, y.syncTimeout = R.syncTimeout, y.timeUnits = R.timeUnits, y.uniqueKey = R.uniqueKey, y.useSerialIds = R.useSerialIds, y.wrap = R.wrap, t.compose(s), A.compose(i), P.compose(d), O.compose(d), o.compose(n), B.compose(d), _.compose(p), y;
}), E(h, "Core/Axis/OrdinalAxis.js", [
h["Core/Axis/Axis.js"],
h["Core/Globals.js"],
h["Core/Series/Series.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z) {
var H = Z.addEvent, $ = Z.correctFloat, U = Z.css, W = Z.defined, N = Z.error, w = Z.pick, v = Z.timeUnits, u = [], d;
return function(P) {
function O(t, n, o, A, _, D, j) {
_ === void 0 && (_ = []), D === void 0 && (D = 0);
var T = {}, X = this.options.tickPixelInterval, f = this.chart.time, m = [], L, Y, F = 0, Q = [], k = -Number.MAX_VALUE;
if (!this.options.ordinal && !this.options.breaks || !_ || 3 > _.length || typeof n > "u")
return f.getTimeTicks.apply(f, arguments);
var G = _.length;
for (L = 0; L < G; L++) {
var z = L && _[L - 1] > o;
if (_[L] < n && (F = L), L === G - 1 || _[L + 1] - _[L] > 5 * D || z) {
if (_[L] > k) {
for (Y = f.getTimeTicks(t, _[F], _[L], A); Y.length && Y[0] <= k; )
Y.shift();
Y.length && (k = Y[Y.length - 1]), m.push(Q.length), Q = Q.concat(Y);
}
F = L + 1;
}
if (z)
break;
}
if (Y) {
if (Y = Y.info, j && Y.unitRange <= v.hour) {
for (L = Q.length - 1, F = 1; F < L; F++)
if (f.dateFormat("%d", Q[F]) !== f.dateFormat("%d", Q[F - 1])) {
T[Q[F]] = "day";
var V = !0;
}
V && (T[Q[0]] = "day"), Y.higherRanks = T;
}
Y.segmentStarts = m, Q.info = Y;
} else
N(12, !1, this.chart);
if (j && W(X)) {
for (Y = Q.length, f = [], F = [], L = void 0, V = Y; V--; )
m = this.translate(Q[V]), L && (F[V] = L - m), f[V] = L = m;
for (F.sort(), F = F[Math.floor(F.length / 2)], F < 0.6 * X && (F = null), V = Q[Y - 1] > o ? Y - 1 : Y, L = void 0; V--; )
m = f[V], Y = Math.abs(L - m), L && Y < 0.8 * X && (F === null || Y < 0.8 * F) ? (T[Q[V]] && !T[Q[V + 1]] ? (Y = V + 1, L = m) : Y = V, Q.splice(Y, 1)) : L = m;
}
return Q;
}
function B(t) {
var n = this.ordinal.positions;
if (!n)
return t;
var o = n.length - 1;
if (0 > t)
t = n[0];
else if (t > o)
t = n[o];
else {
o = Math.floor(t);
var A = t - o;
}
return typeof A < "u" && typeof n[o] < "u" ? n[o] + (A ? A * (n[o + 1] - n[o]) : 0) : t;
}
function C(t) {
var n = this.ordinal, o = n.positions;
if (!o)
return t;
var A = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
if (0 < A && A < this.left + this.len || (n.extendedOrdinalPositions || (n.extendedOrdinalPositions = n.getExtendedPositions()), o = n.extendedOrdinalPositions), o && o.length) {
if (t = n.getIndexOfPoint(A, o), n = $(t % 1), 0 <= t && t < o.length - 1)
return o[Math.floor(t)] + n * (o[Math.ceil(t)] - o[Math.floor(t)]);
n = o.length, A = o[0], o = o[n - 1];
var _ = (o - A) / (n - 1);
return 0 > t ? A + _ * t : o + _ * (t - n);
}
return t;
}
function b(t, n) {
var o = P.Additions.findIndexOf(t, n, !0);
return t[o] === n ? o : o + (n - t[o]) / (t[o + 1] - t[o]);
}
function M() {
this.ordinal || (this.ordinal = new P.Additions(this));
}
function x() {
this.isXAxis && W(this.options.overscroll) && this.max === this.dataMax && (!this.chart.mouseIsDown || this.isInternal) && (!this.eventArgs || this.eventArgs && this.eventArgs.trigger !== "navigator") && (this.max += this.options.overscroll, !this.isInternal && W(this.userMin) && (this.min += this.options.overscroll));
}
function a() {
this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
}
function c() {
this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
}
function p(t) {
var n = this.xAxis[0], o = n.options.overscroll, A = t.originalEvent.chartX, _ = this.options.chart.panning, D = !1;
if (_ && _.type !== "y" && n.options.ordinal && n.series.length) {
var j = this.mouseDownX, T = n.getExtremes(), X = T.dataMax, f = T.min, m = T.max, L = this.hoverPoints, Y = n.closestPointRange || n.ordinal && n.ordinal.overscrollPointsRange;
j = (j - A) / (n.translationSlope * (n.ordinal.slope || Y)), Y = { ordinal: { positions: n.ordinal.getExtendedPositions() } };
var F = n.index2val, Q = n.val2lin, k = void 0, G = k = void 0, z = void 0;
Y.ordinal.positions ? 1 < Math.abs(j) && (L && L.forEach(function(V) {
V.setState();
}), 0 > j ? (G = Y, z = n.ordinal.positions ? n : Y) : (G = n.ordinal.positions ? n : Y, z = Y), k = z.ordinal.positions, X > k[k.length - 1] && k.push(X), this.fixedRange = m - f, k = n.navigatorAxis.toFixedRange(void 0, void 0, F.apply(G, [Q.apply(G, [f, !0]) + j]), F.apply(z, [Q.apply(z, [m, !0]) + j])), k.min >= Math.min(
T.dataMin,
f
) && k.max <= Math.max(X, m) + o && n.setExtremes(k.min, k.max, !0, !1, { trigger: "pan" }), this.mouseDownX = A, U(this.container, { cursor: "move" })) : D = !0;
} else
D = !0;
D || _ && /y/.test(_.type) ? o && (n.max = n.dataMax + o) : t.preventDefault();
}
function i() {
var t = this.xAxis;
t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
}
function l(t, n) {
var o = this.ordinal, A = o.positions, _ = o.slope, D = o.extendedOrdinalPositions;
if (!A)
return t;
var j = A.length;
if (A[0] <= t && A[j - 1] >= t)
t = b(A, t);
else {
if (D || (D = o.getExtendedPositions && o.getExtendedPositions(), o.extendedOrdinalPositions = D), !D || !D.length)
return t;
j = D.length, _ || (_ = (D[j - 1] - D[0]) / j), A = b(D, A[0]), t >= D[0] && t <= D[j - 1] ? t = b(D, t) - A : t < D[0] ? (t = D[0] - t, t = -A - t / _) : (t -= D[j - 1], t = t / _ + j - A);
}
return n ? t : _ * (t || 0) + o.offset;
}
P.compose = function(t, n, o) {
if (u.indexOf(t) === -1) {
u.push(t);
var A = t.prototype;
A.getTimeTicks = O, A.index2val = B, A.lin2val = C, A.val2lin = l, A.ordinal2lin = A.val2lin, H(t, "afterInit", M), H(t, "foundExtremes", x), H(t, "afterSetScale", a), H(t, "initialAxisTranslation", c);
}
return u.indexOf(o) === -1 && (u.push(o), H(o, "pan", p)), u.indexOf(n) === -1 && (u.push(n), H(n, "updatedData", i)), t;
};
var s = function() {
function t(n) {
this.index = {}, this.axis = n;
}
return t.prototype.beforeSetTickPositions = function() {
var n = this.axis, o = n.ordinal, A = n.getExtremes(), _ = A.min, D = A.max, j = n.isXAxis && !!n.options.breaks;
A = n.options.ordinal;
var T = n.chart.options.chart.ignoreHiddenSeries, X, f, m = [], L = Number.MAX_VALUE, Y = !1;
if (A || j) {
n.series.forEach(function(k, G) {
if (X = [], !(T && k.visible === !1 || k.takeOrdinalPosition === !1 && !j) && (m = m.concat(k.processedXData), F = m.length, m.sort(function(z, V) {
return z - V;
}), L = Math.min(L, w(k.closestPointRange, L)), F)) {
for (G = 0; G < F - 1; )
m[G] !== m[G + 1] && X.push(m[G + 1]), G++;
X[0] !== m[0] && X.unshift(m[0]), m = X;
}
});
var F = m.length;
if (2 < F) {
var Q = m[1] - m[0];
for (f = F - 1; f-- && !Y; )
m[f + 1] - m[f] !== Q && (Y = !0);
!n.options.keepOrdinalPadding && (m[0] - _ > Q || D - m[m.length - 1] > Q) && (Y = !0);
} else
n.options.overscroll && (F === 2 ? L = m[1] - m[0] : F === 1 ? (L = n.options.overscroll, m = [m[0], m[0] + L]) : L = o.overscrollPointsRange);
Y || n.forceOrdinal ? (n.options.overscroll && (o.overscrollPointsRange = L, m = m.concat(o.getOverscrollPositions())), o.positions = m, Q = n.ordinal2lin(Math.max(_, m[0]), !0), f = Math.max(n.ordinal2lin(Math.min(D, m[m.length - 1]), !0), 1), o.slope = D = (D - _) / (f - Q), o.offset = _ - Q * D) : (o.overscrollPointsRange = w(n.closestPointRange, o.overscrollPointsRange), o.positions = n.ordinal.slope = o.offset = void 0);
}
n.isOrdinal = A && Y, o.groupIntervalFactor = null;
}, t.findIndexOf = function(n, o, A) {
for (var _ = 0, D = n.length - 1, j; _ < D; )
j = Math.ceil((_ + D) / 2), n[j] <= o ? _ = j : D = j - 1;
return n[_] === o || A ? _ : -1;
}, t.prototype.getExtendedPositions = function() {
var n = this, o = n.axis, A = o.constructor.prototype, _ = o.chart, D = o.series[0].currentDataGrouping, j = D ? D.count + D.unitName : "raw", T = o.options.overscroll, X = o.getExtremes(), f = void 0, m = n.index;
if (m || (m = n.index = {}), !m[j]) {
var L = {
series: [],
chart: _,
forceOrdinal: !1,
getExtremes: function() {
return { min: X.dataMin, max: X.dataMax + T };
},
getGroupPixelWidth: A.getGroupPixelWidth,
getTimeTicks: A.getTimeTicks,
options: { ordinal: !0 },
ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
ordinal2lin: A.ordinal2lin,
getIndexOfPoint: A.getIndexOfPoint,
val2lin: A.val2lin
};
L.ordinal.axis = L, o.series.forEach(function(Y) {
f = { xAxis: L, xData: Y.xData.slice(), chart: _, destroyGroupedData: R.noop, getProcessedData: I.prototype.getProcessedData, applyGrouping: I.prototype.applyGrouping }, f.xData = f.xData.concat(n.getOverscrollPositions()), f.options = { dataGrouping: D ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[D.unitName, [D.count]]] } : { enabled: !1 } }, L.series.push(f), Y.processData.apply(f);
}), f.closestPointRange !== f.basePointRange && f.currentDataGrouping && (L.forceOrdinal = !0), o.ordinal.beforeSetTickPositions.apply({ axis: L }), m[j] = L.ordinal.positions;
}
return m[j];
}, t.prototype.getGroupIntervalFactor = function(n, o, A) {
A = A.processedXData;
var _ = A.length, D = [], j = this.groupIntervalFactor;
if (!j) {
for (j = 0; j < _ - 1; j++)
D[j] = A[j + 1] - A[j];
D.sort(function(T, X) {
return T - X;
}), D = D[Math.floor(_ / 2)], n = Math.max(n, A[0]), o = Math.min(o, A[_ - 1]), this.groupIntervalFactor = j = _ * D / (o - n);
}
return j;
}, t.prototype.getIndexOfPoint = function(n, o) {
var A = this.axis, _ = this.positions ? this.positions[0] : 0, D = A.series[0].points && A.series[0].points[0] && A.series[0].points[0].plotX || A.minPixelPadding;
return 1 < A.series.length && A.series.forEach(function(j) {
j.points && W(j.points[0]) && W(j.points[0].plotX) && j.points[0].plotX < D && (D = j.points[0].plotX);
}), n = (n - D) / (A.translationSlope * (this.slope || A.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(o, _) + n;
}, t.prototype.getOverscrollPositions = function() {
var n = this.axis, o = n.options.overscroll, A = this.overscrollPointsRange, _ = [], D = n.dataMax;
if (W(A))
for (; D <= n.dataMax + o; )
D += A, _.push(D);
return _;
}, t.prototype.postProcessTickInterval = function(n) {
var o = this.axis, A = this.slope;
return A ? o.options.breaks ? o.closestPointRange || n : n / (A / o.closestPointRange) : n;
}, t;
}();
P.Additions = s;
}(d || (d = {})), d;
}), E(h, "Series/DataModifyComposition.js", [h["Core/Axis/Axis.js"], h["Core/Series/Point.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, R, I, Z) {
var H = R.prototype.tooltipFormatter, $ = Z.addEvent, U = Z.arrayMax, W = Z.arrayMin, N = Z.correctFloat, w = Z.defined, v = Z.isArray, u = Z.isNumber, d = Z.isString, P = Z.pick, O;
return function(B) {
function C(n, o, A) {
this.isXAxis || (this.series.forEach(function(_) {
n === "compare" && typeof o != "boolean" ? _.setCompare(o, !1) : n !== "cumulative" || d(o) || _.setCumulative(o, !1);
}), P(A, !0) && this.chart.redraw());
}
function b(n) {
var o = this, A = o.series.chart.numberFormatter, _ = function(D) {
n = n.replace("{point." + D + "}", (0 < o[D] && D === "change" ? "+" : "") + A(o[D], P(o.series.tooltipOptions.changeDecimals, 2)));
};
return w(o.change) && _("change"), w(o.cumulativeSum) && _("cumulativeSum"), H.apply(this, [n]);
}
function M() {
var n = this.options.compare;
if (n === "percent" || n === "value" || this.options.cumulative) {
var o = new t(this);
n === "percent" || n === "value" ? o.initCompare(n) : o.initCumulative();
}
this.dataModify = o;
}
function x(n) {
n = n.dataExtremes;
var o = n.activeYData;
if (this.dataModify && n) {
var A = void 0;
this.options.compare ? A = [this.dataModify.modifyValue(n.dataMin), this.dataModify.modifyValue(n.dataMax)] : this.options.cumulative && v(o) && 2 <= o.length && (A = t.getCumulativeExtremes(o)), A && (n.dataMin = W(A), n.dataMax = U(A));
}
}
function a(n, o) {
this.options.compare = this.userOptions.compare = n, this.update({}, P(o, !0)), !this.dataModify || n !== "value" && n !== "percent" ? this.points.forEach(function(A) {
delete A.change;
}) : this.dataModify.initCompare(n);
}
function c() {
if (this.xAxis && this.processedYData && this.dataModify) {
var n = this.processedXData, o = this.processedYData, A = o.length, _ = this.options.compareStart === !0 ? 0 : 1, D = -1, j;
for (this.pointArrayMap && (D = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), j = 0; j < A - _; j++) {
var T = o[j] && -1 < D ? o[j][D] : o[j];
if (u(T) && T !== 0 && n[j + _] >= (this.xAxis.min || 0)) {
this.dataModify.compareValue = T;
break;
}
}
}
}
function p(n, o) {
this.setModifier("compare", n, o);
}
function i(n, o) {
n = P(n, !1), this.options.cumulative = this.userOptions.cumulative = n, this.update({}, P(o, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(A) {
delete A.cumulativeSum;
});
}
function l(n, o) {
this.setModifier("cumulative", n, o);
}
var s = [];
B.compose = function(n, o, A) {
if (s.indexOf(n) === -1) {
s.push(n);
var _ = n.prototype;
_.setCompare = a, _.setCumulative = i, $(n, "afterInit", M), $(n, "afterGetExtremes", x), $(n, "afterProcessData", c);
}
return s.indexOf(o) === -1 && (s.push(o), o = o.prototype, o.setCompare = p, o.setModifier = C, o.setCumulative = l), s.indexOf(A) === -1 && (s.push(A), A.prototype.tooltipFormatter = b), n;
};
var t = function() {
function n(o) {
this.series = o;
}
return n.prototype.modifyValue = function() {
return 0;
}, n.getCumulativeExtremes = function(o) {
var A = 1 / 0, _ = -1 / 0;
return o.reduce(function(D, j) {
return j = D + j, A = Math.min(A, j, D), _ = Math.max(
_,
j,
D
), j;
}), [A, _];
}, n.prototype.initCompare = function(o) {
this.modifyValue = function(A, _) {
A === null && (A = 0);
var D = this.compareValue;
return typeof A < "u" && typeof D < "u" ? (A = o === "value" ? A - D : A / D * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof _ < "u" && (_ = this.series.points[_]) && (_.change = A), A) : 0;
};
}, n.prototype.initCumulative = function() {
this.modifyValue = function(o, A) {
if (o === null && (o = 0), o !== void 0 && A !== void 0) {
var _ = 0 < A ? this.series.points[A - 1] : null;
return _ && _.cumulativeSum && (o = N(_.cumulativeSum + o)), (A = this.series.points[A]) && (A.cumulativeSum = o), o;
}
return 0;
};
}, n;
}();
B.Additions = t;
}(O || (O = {})), O;
}), E(h, "Core/Axis/BrokenAxis.js", [h["Extensions/Stacking.js"], h["Core/Utilities.js"]], function(y, R) {
var I = R.addEvent, Z = R.find, H = R.fireEvent, $ = R.isArray, U = R.isNumber, W = R.pick, N;
return function(w) {
function v() {
typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
}
function u() {
this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
}
function d() {
var a = this.brokenAxis;
if (a && a.hasBreaks) {
for (var c = this.tickPositions, p = this.tickPositions.info, i = [], l = 0; l < c.length; l++)
a.isInAnyBreak(c[l]) || i.push(c[l]);
this.tickPositions = i, this.tickPositions.info = p;
}
}
function P() {
this.brokenAxis || (this.brokenAxis = new x(this));
}
function O() {
var a = this.options.connectNulls, c = this.points, p = this.xAxis, i = this.yAxis;
if (this.isDirty)
for (var l = c.length; l--; ) {
var s = c[l], t = !(s.y === null && a === !1) && (p && p.brokenAxis && p.brokenAxis.isInAnyBreak(s.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(s.y, !0));
s.visible = t ? !1 : s.options.visible !== !1;
}
}
function B() {
this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, W(this.pointArrayMap, ["y"]));
}
function C(a, c) {
var p = this, i = p.points, l, s, t, n;
if (a && a.brokenAxis && a.brokenAxis.hasBreaks) {
var o = a.brokenAxis;
c.forEach(function(A) {
l = o && o.breakArray || [], s = a.isXAxis ? a.min : W(p.options.threshold, a.min), i.forEach(function(_) {
n = W(_["stack" + A.toUpperCase()], _[A]), l.forEach(function(D) {
U(s) && U(n) && (t = !1, s < D.from && n > D.to || s > D.from && n < D.from ? t = "pointBreak" : (s < D.from && n > D.from && n < D.to || s > D.from && n > D.to && n < D.from) && (t = "pointInBreak"), t && H(a, t, { point: _, brk: D }));
});
});
});
}
}
function b() {
var a = this.currentDataGrouping, c = a && a.gapSize;
a = this.points.slice();
var p = this.yAxis, i = this.options.gapSize, l = a.length - 1, s;
if (i && 0 < l)
for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), s = void 0; l--; )
s && s.visible !== !1 || (s = a[l + 1]), c = a[l], s.visible !== !1 && c.visible !== !1 && (s.x - c.x > i && (s = (c.x + s.x) / 2, a.splice(l + 1, 0, { isNull: !0, x: s }), p.stacking && this.options.stacking && (s = p.stacking.stacks[this.stackKey][s] = new y(p, p.options.stackLabels, !1, s, this.stack), s.total = 0)), s = c);
return this.getGraphPath(a);
}
var M = [];
w.compose = function(a, c) {
if (M.indexOf(a) === -1 && (M.push(a), a.keepProps.push("brokenAxis"), I(a, "init", P), I(a, "afterInit", v), I(a, "afterSetTickPositions", d), I(a, "afterSetOptions", u)), M.indexOf(c) === -1) {
M.push(c);
var p = c.prototype;
p.drawBreaks = C, p.gappedPath = b, I(c, "afterGeneratePoints", O), I(
c,
"afterRender",
B
);
}
return a;
};
var x = function() {
function a(c) {
this.hasBreaks = !1, this.axis = c;
}
return a.isInBreak = function(c, p) {
var i = c.repeat || 1 / 0, l = c.from, s = c.to - c.from;
return p = p >= l ? (p - l) % i : i - (l - p) % i, c.inclusive ? p <= s : p < s && p !== 0;
}, a.lin2Val = function(c) {
var p = this.brokenAxis;
if (p = p && p.breakArray, !p || !U(c))
return c;
var i;
for (i = 0; i < p.length; i++) {
var l = p[i];
if (l.from >= c)
break;
(l.to < c || a.isInBreak(l, c)) && (c += l.len);
}
return c;
}, a.val2Lin = function(c) {
var p = this.brokenAxis;
if (p = p && p.breakArray, !p || !U(c))
return c;
var i = c, l;
for (l = 0; l < p.length; l++) {
var s = p[l];
if (s.to <= c)
i -= s.len;
else {
if (s.from >= c)
break;
if (a.isInBreak(s, c)) {
i -= c - s.from;
break;
}
}
}
return i;
}, a.prototype.findBreakAt = function(c, p) {
return Z(p, function(i) {
return i.from < c && c < i.to;
});
}, a.prototype.isInAnyBreak = function(c, p) {
var i = this.axis, l = i.options.breaks || [], s = l.length, t;
if (s && U(c)) {
for (; s--; )
if (a.isInBreak(l[s], c)) {
var n = !0;
t || (t = W(l[s].showPoints, !i.isXAxis));
}
var o = n && p ? n && !t : n;
}
return o;
}, a.prototype.setBreaks = function(c, p) {
var i = this, l = i.axis, s = $(c) && !!c.length;
l.isDirty = i.hasBreaks !== s, i.hasBreaks = s, l.options.breaks = l.userOptions.breaks = c, l.forceRedraw = !0, l.series.forEach(function(t) {
t.isDirty = !0;
}), s || l.val2lin !== a.val2Lin || (delete l.val2lin, delete l.lin2val), s && (l.userOptions.ordinal = !1, l.lin2val = a.lin2Val, l.val2lin = a.val2Lin, l.setExtremes = function(t, n, o, A, _) {
if (i.hasBreaks) {
for (var D = this.options.breaks || [], j; j = i.findBreakAt(t, D); )
t = j.to;
for (; j = i.findBreakAt(n, D); )
n = j.from;
n < t && (n = t);
}
l.constructor.prototype.setExtremes.call(this, t, n, o, A, _);
}, l.setAxisTranslation = function() {
if (l.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
var t = l.options.breaks || [], n = [], o = [], A = W(l.pointRangePadding, 0), _ = 0, D, j = l.userMin || l.min, T = l.userMax || l.max, X;
t.forEach(function(L) {
D = L.repeat || 1 / 0, U(j) && U(T) && (a.isInBreak(L, j) && (j += L.to % D - j % D), a.isInBreak(L, T) && (T -= T % D - L.from % D));
}), t.forEach(function(L) {
if (m = L.from, D = L.repeat || 1 / 0, U(j) && U(T)) {
for (; m - D > j; )
m -= D;
for (; m < j; )
m += D;
for (X = m; X < T; X += D)
n.push({ value: X, move: "in" }), n.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
}
}), n.sort(function(L, Y) {
return L.value === Y.value ? (L.move === "in" ? 0 : 1) - (Y.move === "in" ? 0 : 1) : L.value - Y.value;
});
var f = 0, m = j;
n.forEach(function(L) {
f += L.move === "in" ? 1 : -1, f === 1 && L.move === "in" && (m = L.value), f === 0 && U(m) && (o.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), _ += L.value - m - (L.size || 0));
}), i.breakArray = o, U(j) && U(T) && U(l.min) && (i.unitLength = T - j - _ + A, H(l, "afterBreaks"), l.staticScale ? l.transA = l.staticScale : i.unitLength && (l.transA *= (T - l.min + A) / i.unitLength), A && (l.minPixelPadding = l.transA * (l.minPointOffset || 0)), l.min = j, l.max = T);
}
}), W(p, !0) && l.chart.redraw();
}, a;
}();
w.Additions = x;
}(N || (N = {})), N;
}), E(h, "masters/modules/broken-axis.src.js", [h["Core/Globals.js"], h["Core/Axis/BrokenAxis.js"]], function(y, R) {
R.compose(y.Axis, y.Series);
}), E(h, "Extensions/DataGrouping.js", [
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Series/Series.js"],
h["Core/Tooltip.js"],
h["Core/DefaultOptions.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W, N) {
var w = I.format, v = $.prototype;
I = N.addEvent;
var u = N.arrayMax, d = N.arrayMin, P = N.correctFloat, O = N.defined, B = N.error, C = N.extend, b = N.isNumber, M = N.merge, x = N.pick, a = Z.approximations = {
sum: function(t) {
var n = t.length;
if (!n && t.hasNulls)
var o = null;
else if (n)
for (o = 0; n--; )
o += t[n];
return o;
},
average: function(t) {
var n = t.length;
return t = a.sum(t), b(t) && n && (t = P(t / n)), t;
},
averages: function() {
var t = [];
return [].forEach.call(arguments, function(n) {
t.push(a.average(n));
}), typeof t[0] > "u" ? void 0 : t;
},
open: function(t) {
return t.length ? t[0] : t.hasNulls ? null : void 0;
},
high: function(t) {
return t.length ? u(t) : t.hasNulls ? null : void 0;
},
low: function(t) {
return t.length ? d(t) : t.hasNulls ? null : void 0;
},
close: function(t) {
return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
},
hlc: function(t, n, o) {
if (t = a.high(t), n = a.low(n), o = a.close(o), b(t) || b(n) || b(o))
return [t, n, o];
},
ohlc: function(t, n, o, A) {
if (t = a.open(t), n = a.high(n), o = a.low(o), A = a.close(A), b(t) || b(n) || b(o) || b(A))
return [t, n, o, A];
},
range: function(t, n) {
if (t = a.low(t), n = a.high(n), b(t) || b(n))
return [t, n];
if (t === null && n === null)
return null;
}
};
N = function(t, n, o, A) {
var _ = this, D = _.data, j = _.options && _.options.data, T = [], X = [], f = [], m = t.length, L = !!n, Y = [], F = _.pointArrayMap, Q = F && F.length, k = ["x"].concat(F || ["y"]), G = this.options.dataGrouping && this.options.dataGrouping.groupAll, z = 0, V = 0, q;
A = typeof A == "function" ? A : a[A] ? a[A] : a[_.getDGApproximation && _.getDGApproximation() || "average"], Q ? F.forEach(function() {
Y.push([]);
}) : Y.push([]);
var it = Q || 1;
for (q = 0; q <= m && !(t[q] >= o[0]); q++)
;
for (q; q <= m; q++) {
for (; typeof o[z + 1] < "u" && t[q] >= o[z + 1] || q === m; ) {
var et = o[z];
_.dataGroupInfo = { start: G ? V : _.cropStart + V, length: Y[0].length };
var nt = A.apply(_, Y);
for (_.pointClass && !O(_.dataGroupInfo.options) && (_.dataGroupInfo.options = M(_.pointClass.prototype.optionsToObject.call({ series: _ }, _.options.data[_.cropStart + V])), k.forEach(function(ct) {
delete _.dataGroupInfo.options[ct];
})), typeof nt < "u" && (T.push(et), X.push(nt), f.push(_.dataGroupInfo)), V = q, et = 0; et < it; et++)
Y[et].length = 0, Y[et].hasNulls = !1;
if (z += 1, q === m)
break;
}
if (q === m)
break;
if (F) {
et = _.options.dataGrouping && _.options.dataGrouping.groupAll ? q : _.cropStart + q, nt = D && D[et] || _.pointClass.prototype.applyOptions.apply({ series: _ }, [j[et]]);
var rt = void 0;
for (et = 0; et < Q; et++)
rt = nt[F[et]], b(rt) ? Y[et].push(rt) : rt === null && (Y[et].hasNulls = !0);
} else
et = L ? n[q] : null, b(et) ? Y[0].push(et) : et === null && (Y[0].hasNulls = !0);
}
return { groupedXData: T, groupedYData: X, groupMap: f };
};
var c = { approximations: a, groupData: N }, p = v.generatePoints, i = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: [
"%A, %b %e, %H:%M:%S.%L",
"%A, %b %e, %H:%M:%S.%L",
"-%H:%M:%S.%L"
], second: ["%A, %b %e, %H:%M:%S", "%A, %b %e, %H:%M:%S", "-%H:%M:%S"], minute: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], hour: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], month: ["%B %Y", "%B", "-%B %Y"], year: ["%Y", "%Y", "-%Y"] } }, l = {
line: {},
spline: {},
area: {},
areaspline: {},
arearange: {},
column: { groupPixelWidth: 10 },
columnrange: { groupPixelWidth: 10 },
candlestick: { groupPixelWidth: 10 },
ohlc: { groupPixelWidth: 5 },
hlc: { groupPixelWidth: 5 },
heikinashi: { groupPixelWidth: 10 }
}, s = Z.defaultDataGroupingUnits = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
return v.getDGApproximation = function() {
return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") ? "sum" : "average";
}, v.groupData = N, v.applyGrouping = function(t) {
var n = this.chart, o = this.options.dataGrouping, A = this.allowDG !== !1 && o && x(o.enabled, n.options.isStock), _ = this.visible || !n.options.chart.ignoreHiddenSeries, D, j = this.currentDataGrouping, T = !1;
if (A && !this.requireSorting && (this.requireSorting = T = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !A, T && (this.requireSorting = !1), !t) {
this.destroyGroupedData(), A = o.groupAll ? this.xData : this.processedXData;
var X = o.groupAll ? this.yData : this.processedYData;
t = n.plotSizeX, T = this.xAxis;
var f = T.options.ordinal, m = this.groupPixelWidth;
if (m && A && A.length) {
this.isDirty = D = !0, this.points = null;
var L = T.getExtremes(), Y = L.min;
L = L.max, f = f && T.ordinal && T.ordinal.getGroupIntervalFactor(Y, L, this) || 1, t = T.getTimeTicks(R.Additions.prototype.normalizeTimeTickInterval(m * (L - Y) / t * f, o.units || s), Math.min(Y, A[0]), Math.max(L, A[A.length - 1]), T.options.startOfWeek, A, this.closestPointRange), m = v.groupData.apply(this, [A, X, t, o.approximation]), A = m.groupedXData, X = m.groupedYData, f = 0, o && o.smoothed && A.length && (o.firstAnchor = "firstPoint", o.anchor = "middle", o.lastAnchor = "lastPoint", B(32, !1, n, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), n = A;
var F = this.options.dataGrouping;
if (Y = this.currentDataGrouping && this.currentDataGrouping.gapSize, F && this.xData && Y && this.groupMap) {
var Q = n.length - 1, k = F.anchor, G = x(F.firstAnchor, k);
if (F = x(F.lastAnchor, k), k && k !== "start") {
var z = Y * { middle: 0.5, end: 1 }[k];
for (k = n.length - 1; k-- && 0 < k; )
n[k] += z;
}
if (G && G !== "start" && this.xData[0] >= n[0]) {
k = this.groupMap[0].start, z = this.groupMap[0].length;
var V = void 0;
b(k) && b(z) && (V = k + (z - 1)), n[0] = { middle: n[0] + 0.5 * Y, end: n[0] + Y, firstPoint: this.xData[0], lastPoint: V && this.xData[V] }[G];
}
F && F !== "start" && Y && n[Q] >= L - Y && (L = this.groupMap[this.groupMap.length - 1].start, n[Q] = { middle: n[Q] + 0.5 * Y, end: n[Q] + Y, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[F]);
}
for (L = 1; L < t.length; L++)
t.info.segmentStarts && t.info.segmentStarts.indexOf(L) !== -1 || (f = Math.max(t[L] - t[L - 1], f));
L = t.info, L.gapSize = f, this.closestPointRange = t.info.totalRange, this.groupMap = m.groupMap, _ && (_ = A, O(_[0]) && b(T.min) && b(T.dataMin) && _[0] < T.min && ((!O(T.options.min) && T.min <= T.dataMin || T.min === T.dataMin) && (T.min = Math.min(_[0], T.min)), T.dataMin = Math.min(_[0], T.dataMin)), O(_[_.length - 1]) && b(T.max) && b(T.dataMax) && _[_.length - 1] > T.max && ((!O(T.options.max) && b(T.dataMax) && T.max >= T.dataMax || T.max === T.dataMax) && (T.max = Math.max(_[_.length - 1], T.max)), T.dataMax = Math.max(_[_.length - 1], T.dataMax))), o.groupAll && (this.allGroupedData = X, o = this.cropData(A, X, T.min, T.max, 1), A = o.xData, X = o.yData, this.cropStart = o.start), this.processedXData = A, this.processedYData = X;
} else
this.groupMap = null;
this.hasGroupedData = D, this.currentDataGrouping = L, this.preventGraphAnimation = (j && j.totalRange) !== (L && L.totalRange);
}
}, v.destroyGroupedData = function() {
this.groupedData && (this.groupedData.forEach(function(t, n) {
t && (this.groupedData[n] = t.destroy ? t.destroy() : null);
}, this), this.groupedData.length = 0);
}, v.generatePoints = function() {
p.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
}, y.prototype.applyGrouping = function(t) {
var n = this;
n.series.forEach(function(o) {
o.groupPixelWidth = void 0, o.groupPixelWidth = n.getGroupPixelWidth && n.getGroupPixelWidth(), o.groupPixelWidth && (o.hasProcessed = !0), o.applyGrouping(!!t.hasExtemesChanged);
});
}, y.prototype.getGroupPixelWidth = function() {
var t = this.series, n = t.length, o, A = 0, _ = !1, D;
for (o = n; o--; )
(D = t[o].options.dataGrouping) && (A = Math.max(A, x(D.groupPixelWidth, i.groupPixelWidth)));
for (o = n; o--; )
(D = t[o].options.dataGrouping) && (n = (t[o].processedXData || t[o].data).length, (t[o].groupPixelWidth || n > this.chart.plotSizeX / A || n && D.forced) && (_ = !0));
return _ ? A : 0;
}, y.prototype.setDataGrouping = function(t, n) {
var o;
if (n = x(n, !0), t || (t = { forced: !1, units: null }), this instanceof y)
for (o = this.series.length; o--; )
this.series[o].update({ dataGrouping: t }, !1);
else
this.chart.options.series.forEach(function(A) {
A.dataGrouping = t;
}, !1);
this.ordinal && (this.ordinal.slope = void 0), n && this.chart.redraw();
}, I(y, "postProcessData", y.prototype.applyGrouping), I(H, "update", function() {
if (this.dataGroup)
return B(
24,
!1,
this.series.chart
), !1;
}), I(U, "headerFormatter", function(t) {
var n = this.chart, o = n.time, A = t.labelConfig, _ = A.series, D = _.tooltipOptions, j = _.options.dataGrouping, T = D.xDateFormat, X = _.xAxis, f = D[t.isFooter ? "footerFormat" : "headerFormat"];
if (X && X.options.type === "datetime" && j && b(A.key)) {
var m = _.currentDataGrouping;
if (j = j.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
if (D = j[m.unitName], m.count === 1)
T = D[0];
else {
T = D[1];
var L = D[2];
}
else
!T && j && X.dateTime && (T = X.dateTime.getXDateFormat(A.x, D.dateTimeLabelFormats));
T = o.dateFormat(T, A.key), L && (T += o.dateFormat(L, A.key + m.totalRange - 1)), _.chart.styledMode && (f = this.styledModeFormat(f)), t.text = w(f, { point: C(A.point, { key: T }), series: _ }, n), t.preventDefault();
}
}), I($, "destroy", v.destroyGroupedData), I($, "afterSetOptions", function(t) {
t = t.options;
var n = this.type, o = this.chart.options.plotOptions, A = W.defaultOptions.plotOptions[n].dataGrouping, _ = this.useCommonDataGrouping && i;
if (o && (l[n] || _)) {
A || (A = M(i, l[n]));
var D = this.chart.rangeSelector;
t.dataGrouping = M(
_,
A,
o.series && o.series.dataGrouping,
o[n].dataGrouping,
this.userOptions.dataGrouping,
!t.isInternal && D && b(D.selected) && D.buttonOptions[D.selected].dataGrouping
);
}
}), I(y, "afterSetScale", function() {
this.series.forEach(function(t) {
t.hasProcessed = !1;
});
}), Z.dataGrouping = c, c;
}), E(h, "Series/HLC/HLCPoint.js", [h["Core/Series/SeriesRegistry.js"]], function(y) {
var R = this && this.__extends || function() {
var I = function(Z, H) {
return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function($, U) {
$.__proto__ = U;
} || function($, U) {
for (var W in U)
U.hasOwnProperty(W) && ($[W] = U[W]);
}, I(Z, H);
};
return function(Z, H) {
function $() {
this.constructor = Z;
}
I(Z, H), Z.prototype = H === null ? Object.create(H) : ($.prototype = H.prototype, new $());
};
}();
return function(I) {
function Z() {
var H = I !== null && I.apply(this, arguments) || this;
return H.close = void 0, H.high = void 0, H.low = void 0, H.options = void 0, H.plotClose = void 0, H.series = void 0, H;
}
return R(Z, I), Z;
}(y.seriesTypes.column.prototype.pointClass);
}), E(
h,
"Series/HLC/HLCSeries.js",
[h["Series/HLC/HLCPoint.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, R, I) {
var Z = this && this.__extends || function() {
var W = function(N, w) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, u) {
v.__proto__ = u;
} || function(v, u) {
for (var d in u)
u.hasOwnProperty(d) && (v[d] = u[d]);
}, W(N, w);
};
return function(N, w) {
function v() {
this.constructor = N;
}
W(N, w), N.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), H = R.seriesTypes.column, $ = I.extend, U = I.merge;
return I = function(W) {
function N() {
var w = W !== null && W.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w.yData = void 0, w;
}
return Z(N, W), N.prototype.extendStem = function(w, v, u) {
var d = w[0];
w = w[1], typeof d[2] == "number" && (d[2] = Math.max(u + v, d[2])), typeof w[2] == "number" && (w[2] = Math.min(u - v, w[2]));
}, N.prototype.getPointPath = function(w, v) {
v = v.strokeWidth();
var u = w.series, d = v % 2 / 2, P = Math.round(w.plotX) - d, O = Math.round(w.shapeArgs.width / 2), B = [["M", P, Math.round(w.yBottom)], ["L", P, Math.round(w.plotHigh)]];
return w.close !== null && (w = Math.round(w.plotClose) + d, B.push(["M", P, w], ["L", P + O, w]), u.extendStem(B, v / 2, w)), B;
}, N.prototype.drawSinglePoint = function(w) {
var v = w.series, u = v.chart, d = w.graphic, P = !d;
typeof w.plotY < "u" && (d || (w.graphic = d = u.renderer.path().add(v.group)), u.styledMode || d.attr(v.pointAttribs(w, w.selected && "select")), v = v.getPointPath(w, d), d[P ? "attr" : "animate"]({ d: v }).addClass(w.getClassName(), !0));
}, N.prototype.drawPoints = function() {
this.points.forEach(this.drawSinglePoint);
}, N.prototype.init = function() {
W.prototype.init.apply(this, arguments), this.options.stacking = void 0;
}, N.prototype.pointAttribs = function(w, v) {
return w = W.prototype.pointAttribs.call(this, w, v), delete w.fill, w;
}, N.prototype.toYData = function(w) {
return [w.high, w.low, w.close];
}, N.prototype.translate = function() {
var w = this, v = w.yAxis, u = this.pointArrayMap && this.pointArrayMap.slice() || [], d = u.map(function(P) {
return "plot" + (P.charAt(0).toUpperCase() + P.slice(1));
});
d.push("yBottom"), u.push("low"), W.prototype.translate.apply(w), w.points.forEach(function(P) {
u.forEach(function(O, B) {
O = P[O], O !== null && (w.dataModify && (O = w.dataModify.modifyValue(O)), P[d[B]] = v.toPixels(O, !0));
}), P.tooltipPos[1] = P.plotHigh + v.pos - w.chart.plotTop;
});
}, N.defaultOptions = U(H.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '● {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), N;
}(H), $(I.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
stroke: "color",
"stroke-width": "lineWidth"
}, pointValKey: "close" }), I.prototype.pointClass = y, R.registerSeriesType("hlc", I), I;
}
), E(h, "Series/OHLC/OHLCPoint.js", [h["Core/Series/SeriesRegistry.js"]], function(y) {
var R = this && this.__extends || function() {
var I = function(Z, H) {
return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function($, U) {
$.__proto__ = U;
} || function($, U) {
for (var W in U)
U.hasOwnProperty(W) && ($[W] = U[W]);
}, I(Z, H);
};
return function(Z, H) {
function $() {
this.constructor = Z;
}
I(Z, H), Z.prototype = H === null ? Object.create(H) : ($.prototype = H.prototype, new $());
};
}();
return function(I) {
function Z() {
var H = I !== null && I.apply(this, arguments) || this;
return H.open = void 0, H.options = void 0, H.plotOpen = void 0, H.series = void 0, H;
}
return R(Z, I), Z.prototype.getClassName = function() {
return I.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
}, Z.prototype.resolveUpColor = function() {
this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
}, Z.prototype.resolveColor = function() {
I.prototype.resolveColor.call(this), this.resolveUpColor();
}, Z.prototype.getZone = function() {
var H = I.prototype.getZone.call(this);
return this.resolveUpColor(), H;
}, Z.prototype.applyOptions = function() {
return I.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
}, Z;
}(y.seriesTypes.hlc.prototype.pointClass);
}), E(
h,
"Series/OHLC/OHLCSeries.js",
[h["Series/OHLC/OHLCPoint.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, R, I) {
var Z = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}(), H = R.series, $ = R.seriesTypes.hlc, U = I.addEvent, W = I.extend, N = I.merge, w = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.data = void 0, d.options = void 0, d.points = void 0, d;
}
return Z(u, v), u.prototype.getPointPath = function(d, P) {
var O = v.prototype.getPointPath.call(this, d, P);
P = P.strokeWidth();
var B = P % 2 / 2, C = Math.round(d.plotX) - B, b = Math.round(d.shapeArgs.width / 2);
return d.open !== null && (d = Math.round(d.plotOpen) + B, O.push(["M", C, d], ["L", C - b, d]), v.prototype.extendStem.call(this, O, P / 2, d)), O;
}, u.prototype.pointAttribs = function(d, P) {
P = v.prototype.pointAttribs.call(this, d, P);
var O = this.options;
return delete P.fill, !d.options.color && O.upColor && d.open < d.close && (P.stroke = O.upColor), P;
}, u.prototype.toYData = function(d) {
return [d.open, d.high, d.low, d.close];
}, u.defaultOptions = N($.defaultOptions, { tooltip: { pointFormat: '● {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
' } }), u;
}($);
return W(w.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), w.prototype.pointClass = y, R.registerSeriesType("ohlc", w), U(H, "init", function(v) {
v = v.options, v.useOhlcData && v.id !== "highcharts-navigator-series" && W(this, { pointValKey: w.prototype.pointValKey, pointArrayMap: w.prototype.pointArrayMap, toYData: w.prototype.toYData });
}), U(H, "afterSetOptions", function(v) {
v = v.options;
var u = v.dataGrouping;
u && v.useOhlcData && v.id !== "highcharts-navigator-series" && (u.approximation = "ohlc");
}), w;
}
), E(h, "Series/Candlestick/CandlestickSeries.js", [h["Core/DefaultOptions.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var N = function(w, v) {
return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, d) {
u.__proto__ = d;
} || function(u, d) {
for (var P in d)
d.hasOwnProperty(P) && (u[P] = d[P]);
}, N(w, v);
};
return function(w, v) {
function u() {
this.constructor = w;
}
N(w, v), w.prototype = v === null ? Object.create(v) : (u.prototype = v.prototype, new u());
};
}(), H = y.defaultOptions;
y = R.seriesTypes;
var $ = y.column, U = y.ohlc, W = I.merge;
return I = function(N) {
function w() {
var v = N !== null && N.apply(this, arguments) || this;
return v.data = void 0, v.options = void 0, v.points = void 0, v;
}
return Z(w, N), w.prototype.pointAttribs = function(v, u) {
var d = $.prototype.pointAttribs.call(this, v, u), P = this.options, O = v.open < v.close, B = P.lineColor || this.color, C = v.color || this.color;
return d["stroke-width"] = P.lineWidth, d.fill = v.options.color || O && P.upColor || C, d.stroke = v.options.lineColor || O && P.upLineColor || B, u && (v = P.states[u], d.fill = v.color || d.fill, d.stroke = v.lineColor || d.stroke, d["stroke-width"] = v.lineWidth || d["stroke-width"]), d;
}, w.prototype.drawPoints = function() {
var v = this, u = v.chart, d = v.yAxis.reversed;
v.points.forEach(function(P) {
var O = P.graphic, B = !O;
if (typeof P.plotY < "u") {
O || (P.graphic = O = u.renderer.path().add(v.group)), v.chart.styledMode || O.attr(v.pointAttribs(P, P.selected && "select")).shadow(v.options.shadow);
var C = O.strokeWidth() % 2 / 2, b = Math.round(P.plotX) - C, M = P.plotOpen, x = P.plotClose, a = Math.min(M, x);
M = Math.max(M, x);
var c = Math.round(P.shapeArgs.width / 2);
x = d ? M !== P.yBottom : Math.round(a) !== Math.round(P.plotHigh);
var p = d ? Math.round(a) !== Math.round(P.plotHigh) : M !== P.yBottom;
a = Math.round(a) + C, M = Math.round(M) + C, C = [], C.push(["M", b - c, M], ["L", b - c, a], ["L", b + c, a], ["L", b + c, M], ["Z"], ["M", b, a], ["L", b, x ? Math.round(d ? P.yBottom : P.plotHigh) : a], ["M", b, M], ["L", b, p ? Math.round(d ? P.plotHigh : P.yBottom) : M]), O[B ? "attr" : "animate"]({ d: C }).addClass(P.getClassName(), !0);
}
});
}, w.defaultOptions = W(U.defaultOptions, H.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: H.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), w;
}(U), R.registerSeriesType("candlestick", I), I;
}), E(h, "Series/Flags/FlagsPoint.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R) {
var I = this && this.__extends || function() {
var H = function($, U) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(W, N) {
W.__proto__ = N;
} || function(W, N) {
for (var w in N)
N.hasOwnProperty(w) && (W[w] = N[w]);
}, H($, U);
};
return function($, U) {
function W() {
this.constructor = $;
}
H($, U), $.prototype = U === null ? Object.create(U) : (W.prototype = U.prototype, new W());
};
}(), Z = R.isNumber;
return function(H) {
function $() {
var U = H !== null && H.apply(this, arguments) || this;
return U.options = void 0, U.series = void 0, U;
}
return I($, H), $.prototype.isValid = function() {
return Z(this.y) || typeof this.y > "u";
}, $.prototype.hasNewShapeType = function() {
var U = this.options.shape || this.series.options.shape;
return this.graphic && U && U !== this.graphic.symbolKey;
}, $;
}(y.seriesTypes.column.prototype.pointClass);
}), E(h, "Series/OnSeriesComposition.js", [
h["Series/Column/ColumnSeries.js"],
h["Core/Series/Series.js"],
h["Core/Utilities.js"]
], function(y, R, I) {
var Z = y.prototype, H = R.prototype, $ = I.defined, U = I.stableSort, W;
return function(N) {
function w() {
return H.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
}
function v() {
Z.translate.apply(this);
var d = this, P = d.options, O = d.chart, B = d.points, C = P.onSeries, b = (C = C && O.get(C)) && C.options.step, M = C && C.points, x = O.inverted, a = d.xAxis, c = d.yAxis;
O = B.length - 1;
var p;
P = P.onKey || "y";
var i = M && M.length, l = 0, s;
if (C && C.visible && i) {
l = (C.pointXOffset || 0) + (C.barW || 0) / 2;
var t = C.currentDataGrouping, n = M[i - 1].x + (t ? t.totalRange : 0);
for (U(B, function(_, D) {
return _.x - D.x;
}), P = "plot" + P[0].toUpperCase() + P.substr(1); i-- && B[O]; ) {
var o = M[i];
if (t = B[O], t.y = o.y, o.x <= t.x && typeof o[P] < "u") {
if (t.x <= n && (t.plotY = o[P], o.x < t.x && !b && (s = M[i + 1]) && typeof s[P] < "u")) {
var A = (t.x - o.x) / (s.x - o.x);
t.plotY += A * (s[P] - o[P]), t.y += A * (s.y - o.y);
}
if (O--, i++, 0 > O)
break;
}
}
}
B.forEach(function(_, D) {
if (_.plotX += l, (typeof _.plotY > "u" || x) && (0 <= _.plotX && _.plotX <= a.len ? x ? (_.plotY = a.translate(_.x, 0, 1, 0, 1), _.plotX = $(_.y) ? c.translate(_.y, 0, 0, 0, 1) : 0) : _.plotY = (a.opposite ? 0 : d.yAxis.len) + a.offset : _.shapeArgs = {}), (p = B[D - 1]) && p.plotX === _.plotX) {
typeof p.stackIndex > "u" && (p.stackIndex = 0);
var j = p.stackIndex + 1;
}
_.stackIndex = j;
}), this.onSeries = C;
}
var u = [];
N.compose = function(d) {
if (u.indexOf(d) === -1) {
u.push(d);
var P = d.prototype;
P.getPlotBox = w, P.translate = v;
}
return d;
}, N.getPlotBox = w, N.translate = v;
}(W || (W = {})), W;
}), E(
h,
"Series/Flags/FlagsSymbols.js",
[h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGRenderer.js"]],
function(y, R) {
function I(H) {
Z[H + "pin"] = function($, U, W, N, w) {
var v = w && w.anchorX;
w = w && w.anchorY, H === "circle" && N > W && ($ -= Math.round((N - W) / 2), W = N);
var u = Z[H]($, U, W, N);
if (v && w) {
var d = v;
H === "circle" ? d = $ + W / 2 : ($ = u[0], W = u[1], $[0] === "M" && W[0] === "L" && (d = ($[1] + W[1]) / 2)), u.push(["M", d, U > w ? U : U + N], ["L", v, w]), u = u.concat(Z.circle(v - 1, w - 1, 2, 2));
}
return u;
};
}
var Z = R.prototype.symbols;
return Z.flag = function(H, $, U, W, N) {
var w = N && N.anchorX || H;
N = N && N.anchorY || $;
var v = Z.circle(w - 1, N - 1, 2, 2);
return v.push(["M", w, N], ["L", H, $ + W], ["L", H, $], ["L", H + U, $], ["L", H + U, $ + W], ["L", H, $ + W], ["Z"]), v;
}, I("circle"), I("square"), y = y.getRendererType(), y !== R && (y.prototype.symbols.circlepin = Z.circlepin, y.prototype.symbols.flag = Z.flag, y.prototype.symbols.squarepin = Z.squarepin), Z;
}
), E(h, "Series/Flags/FlagsSeries.js", [
h["Series/Flags/FlagsPoint.js"],
h["Core/Globals.js"],
h["Series/OnSeriesComposition.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U) {
var W = this && this.__extends || function() {
var C = function(b, M) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
x.__proto__ = a;
} || function(x, a) {
for (var c in a)
a.hasOwnProperty(c) && (x[c] = a[c]);
}, C(b, M);
};
return function(b, M) {
function x() {
this.constructor = b;
}
C(b, M), b.prototype = M === null ? Object.create(M) : (x.prototype = M.prototype, new x());
};
}();
R = R.noop;
var N = Z.distribute, w = H.series, v = H.seriesTypes.column, u = U.addEvent, d = U.defined;
Z = U.extend;
var P = U.merge, O = U.objectEach, B = U.wrap;
return U = function(C) {
function b() {
var M = C !== null && C.apply(this, arguments) || this;
return M.data = void 0, M.options = void 0, M.points = void 0, M;
}
return W(b, C), b.prototype.animate = function(M) {
M && this.setClip();
}, b.prototype.drawPoints = function() {
var M = this.points, x = this.chart, a = x.renderer, c = x.inverted, p = this.options, i = p.y, l, s = this.yAxis, t = {}, n = [];
for (l = M.length; l--; ) {
var o = M[l], A = (c ? o.plotY : o.plotX) > this.xAxis.len, _ = o.plotX, D = o.stackIndex, j = o.options.shape || p.shape, T = o.plotY;
typeof T < "u" && (T = o.plotY + i - (typeof D < "u" && D * p.stackDistance)), o.anchorX = D ? void 0 : o.plotX;
var X = D ? void 0 : o.plotY, f = j !== "flag";
D = o.graphic, typeof T < "u" && 0 <= _ && !A ? (D && o.hasNewShapeType() && (D = D.destroy()), D || (D = o.graphic = a.label("", null, null, j, null, null, p.useHTML).addClass("highcharts-point").add(this.markerGroup), o.graphic.div && (o.graphic.div.point = o), D.isNew = !0), D.attr({
align: f ? "center" : "left",
width: p.width,
height: p.height,
"text-align": p.textAlign
}), x.styledMode || D.attr(this.pointAttribs(o)).css(P(p.style, o.style)).shadow(p.shadow), 0 < _ && (_ -= D.strokeWidth() % 2), j = { y: T, anchorY: X }, p.allowOverlapX && (j.x = _, j.anchorX = o.anchorX), D.attr({ text: o.options.title || p.title || "A" })[D.isNew ? "attr" : "animate"](j), p.allowOverlapX || (t[o.plotX] ? t[o.plotX].size = Math.max(t[o.plotX].size, D.width) : t[o.plotX] = { align: f ? 0.5 : 0, size: D.width, target: _, anchorX: _ }), o.tooltipPos = [_, T + s.pos - x.plotTop]) : D && (o.graphic = D.destroy());
}
if (!p.allowOverlapX) {
var m = 100;
O(t, function(L) {
L.plotX = L.anchorX, n.push(L), m = Math.max(L.size, m);
}), N(n, c ? s.len : this.xAxis.len, m), M.forEach(function(L) {
var Y = L.graphic && t[L.plotX];
Y && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: Y.pos + Y.align * Y.size, anchorX: L.anchorX }), d(Y.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
});
}
p.useHTML && B(this.markerGroup, "on", function(L) {
return $.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
});
}, b.prototype.drawTracker = function() {
var M = this.points;
C.prototype.drawTracker.call(this), M.forEach(function(x) {
var a = x.graphic;
a && (x.unbindMouseOver && x.unbindMouseOver(), x.unbindMouseOver = u(a.element, "mouseover", function() {
0 < x.stackIndex && !x.raised && (x._y = a.y, a.attr({ y: x._y - 8 }), x.raised = !0), M.forEach(function(c) {
c !== x && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
});
}));
});
}, b.prototype.pointAttribs = function(M, x) {
var a = this.options, c = M && M.color || this.color, p = a.lineColor, i = M && M.lineWidth;
return M = M && M.fillColor || a.fillColor, x && (M = a.states[x].fillColor, p = a.states[x].lineColor, i = a.states[x].lineWidth), { fill: M || c, stroke: p || c, "stroke-width": i || a.lineWidth || 0 };
}, b.prototype.setClip = function() {
w.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
}, b.defaultOptions = P(v.defaultOptions, {
pointRange: 0,
allowOverlapX: !1,
shape: "flag",
stackDistance: 12,
textAlign: "center",
tooltip: { pointFormat: "{point.text}" },
threshold: null,
y: -30,
fillColor: "#ffffff",
lineWidth: 1,
states: { hover: { lineColor: "#000000", fillColor: "#ccd6eb" } },
style: { fontSize: "11px", fontWeight: "bold" }
}), b;
}(v), I.compose(U), Z(U.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: R, init: w.prototype.init, invertGroups: R }), H.registerSeriesType("flags", U), U;
}), E(h, "Core/Axis/ScrollbarAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.defined, Z = y.pick;
return function() {
function H() {
}
return H.compose = function($, U) {
if (H.composed.indexOf($) === -1)
H.composed.push($);
else
return $;
var W = function(N) {
var w = Z(N.options && N.options.min, N.min), v = Z(N.options && N.options.max, N.max);
return { axisMin: w, axisMax: v, scrollMin: I(N.dataMin) ? Math.min(w, N.min, N.dataMin, Z(N.threshold, 1 / 0)) : w, scrollMax: I(N.dataMax) ? Math.max(v, N.max, N.dataMax, Z(N.threshold, -1 / 0)) : v };
};
return R($, "afterInit", function() {
var N = this;
N.options && N.options.scrollbar && N.options.scrollbar.enabled && (N.options.scrollbar.vertical = !N.horiz, N.options.startOnTick = N.options.endOnTick = !1, N.scrollbar = new U(N.chart.renderer, N.options.scrollbar, N.chart), R(N.scrollbar, "changed", function(w) {
var v = W(N), u = v.axisMax, d = v.scrollMin, P = v.scrollMax - d;
I(v.axisMin) && I(u) && (N.horiz && !N.reversed || !N.horiz && N.reversed ? (v = d + P * this.to, d += P * this.from) : (v = d + P * (1 - this.from), d += P * (1 - this.to)), this.shouldUpdateExtremes(w.DOMType) ? N.setExtremes(d, v, !0, w.DOMType !== "mousemove" && w.DOMType !== "touchmove", w) : this.setRange(
this.from,
this.to
));
}));
}), R($, "afterRender", function() {
var N = W(this), w = N.scrollMin, v = N.scrollMax;
N = this.scrollbar;
var u = this.axisTitleMargin + (this.titleOffset || 0), d = this.chart.scrollbarsOffsets, P = this.options.margin || 0;
N && (this.horiz ? (this.opposite || (d[1] += u), N.position(this.left, this.top + this.height + 2 + d[1] - (this.opposite ? P : 0), this.width, this.height), this.opposite || (d[1] += P), u = 1) : (this.opposite && (d[0] += u), N.position(
N.options.opposite ? this.left + this.width + 2 + d[0] - (this.opposite ? 0 : P) : this.opposite ? 0 : P,
this.top,
this.width,
this.height
), this.opposite && (d[0] += P), u = 0), d[u] += N.size + N.options.margin, isNaN(w) || isNaN(v) || !I(this.min) || !I(this.max) || this.min === this.max ? N.setRange(0, 1) : (d = (this.min - w) / (v - w), w = (this.max - w) / (v - w), this.horiz && !this.reversed || !this.horiz && this.reversed ? N.setRange(d, w) : N.setRange(1 - w, 1 - d)));
}), R($, "afterGetOffset", function() {
var N = this.scrollbar && !this.scrollbar.options.opposite;
N = this.horiz ? 2 : N ? 3 : 1;
var w = this.scrollbar;
w && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[N] += w.size + w.options.margin);
}), $;
}, H.composed = [], H;
}();
}), E(h, "Core/ScrollbarDefaults.js", [h["Core/Globals.js"]], function(y) {
return {
height: y.isTouchDevice ? 20 : 14,
barBorderRadius: 0,
buttonBorderRadius: 0,
liveRedraw: void 0,
margin: 10,
minWidth: 6,
opposite: !0,
step: 0.2,
zIndex: 3,
barBackgroundColor: "#cccccc",
barBorderWidth: 1,
barBorderColor: "#cccccc",
buttonArrowColor: "#333333",
buttonBackgroundColor: "#e6e6e6",
buttonBorderColor: "#cccccc",
buttonBorderWidth: 1,
rifleColor: "#333333",
trackBackgroundColor: "#f2f2f2",
trackBorderColor: "#f2f2f2",
trackBorderWidth: 1
};
}), E(h, "Core/Scrollbar.js", [h["Core/DefaultOptions.js"], h["Core/Globals.js"], h["Core/Axis/ScrollbarAxis.js"], h["Core/ScrollbarDefaults.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H) {
var $ = y.defaultOptions, U = H.addEvent, W = H.correctFloat, N = H.defined, w = H.destroyObjectProperties, v = H.fireEvent, u = H.merge, d = H.pick, P = H.removeEvent;
return y = function() {
function O(B, C, b) {
this._events = [], this.chart = void 0, this.from = this.chartY = this.chartX = 0, this.scrollbar = this.renderer = this.options = this.group = void 0, this.scrollbarButtons = [], this.scrollbarGroup = void 0, this.scrollbarLeft = 0, this.scrollbarRifles = void 0, this.scrollbarStrokeWidth = 1, this.to = this.size = this.scrollbarTop = 0, this.track = void 0, this.trackBorderWidth = 1, this.userOptions = void 0, this.y = this.x = 0, this.init(B, C, b);
}
return O.compose = function(B) {
I.compose(B, O);
}, O.swapXY = function(B, C) {
return C && B.forEach(function(b) {
for (var M = b.length, x, a = 0; a < M; a += 2)
x = b[a + 1], typeof x == "number" && (b[a + 1] = b[a + 2], b[a + 2] = x);
}), B;
}, O.prototype.addEvents = function() {
var B = this.options.inverted ? [1, 0] : [0, 1], C = this.scrollbarButtons, b = this.scrollbarGroup.element, M = this.track.element, x = this.mouseDownHandler.bind(this), a = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
B = [[C[B[0]].element, "click", this.buttonToMinClick.bind(this)], [C[B[1]].element, "click", this.buttonToMaxClick.bind(this)], [M, "click", this.trackClick.bind(this)], [b, "mousedown", x], [b.ownerDocument, "mousemove", a], [b.ownerDocument, "mouseup", c]], R.hasTouch && B.push(
[b, "touchstart", x],
[b.ownerDocument, "touchmove", a],
[b.ownerDocument, "touchend", c]
), B.forEach(function(p) {
U.apply(null, p);
}), this._events = B;
}, O.prototype.buttonToMaxClick = function(B) {
var C = (this.to - this.from) * d(this.options.step, 0.2);
this.updatePosition(this.from + C, this.to + C), v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
}, O.prototype.buttonToMinClick = function(B) {
var C = W(this.to - this.from) * d(this.options.step, 0.2);
this.updatePosition(W(this.from - C), W(this.to - C)), v(this, "changed", {
from: this.from,
to: this.to,
trigger: "scrollbar",
DOMEvent: B
});
}, O.prototype.cursorToScrollbarPosition = function(B) {
var C = this.options;
return C = C.minWidth > this.calculatedWidth ? C.minWidth : 0, { chartX: (B.chartX - this.x - this.xOffset) / (this.barWidth - C), chartY: (B.chartY - this.y - this.yOffset) / (this.barWidth - C) };
}, O.prototype.destroy = function() {
var B = this, C = B.chart.scroller;
B.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
B[b] && B[b].destroy && (B[b] = B[b].destroy());
}), C && B === C.scrollbar && (C.scrollbar = null, w(C.scrollbarButtons));
}, O.prototype.drawScrollbarButton = function(B) {
var C = this.renderer, b = this.scrollbarButtons, M = this.options, x = this.size, a = C.g().add(this.group);
b.push(a), a = C.rect().addClass("highcharts-scrollbar-button").add(a), this.chart.styledMode || a.attr({ stroke: M.buttonBorderColor, "stroke-width": M.buttonBorderWidth, fill: M.buttonBackgroundColor }), a.attr(a.crisp({ x: -0.5, y: -0.5, width: x + 1, height: x + 1, r: M.buttonBorderRadius }, a.strokeWidth())), a = C.path(O.swapXY([["M", x / 2 + (B ? -1 : 1), x / 2 - 3], ["L", x / 2 + (B ? -1 : 1), x / 2 + 3], ["L", x / 2 + (B ? 2 : -2), x / 2]], M.vertical)).addClass("highcharts-scrollbar-arrow").add(b[B]), this.chart.styledMode || a.attr({ fill: M.buttonArrowColor });
}, O.prototype.init = function(B, C, b) {
this.scrollbarButtons = [], this.renderer = B, this.userOptions = C, this.options = u(Z, $.scrollbar, C), this.chart = b, this.size = d(this.options.size, this.options.height), C.enabled && (this.render(), this.addEvents());
}, O.prototype.mouseDownHandler = function(B) {
B = this.chart.pointer.normalize(B), B = this.cursorToScrollbarPosition(B), this.chartX = B.chartX, this.chartY = B.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
}, O.prototype.mouseMoveHandler = function(B) {
var C = this.chart.pointer.normalize(B), b = this.options.vertical ? "chartY" : "chartX", M = this.initPositions || [];
!this.grabbedCenter || B.touches && B.touches[0][b] === 0 || (C = this.cursorToScrollbarPosition(C)[b], b = this[b], b = C - b, this.hasDragged = !0, this.updatePosition(M[0] + b, M[1] + b), this.hasDragged && v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }));
}, O.prototype.mouseUpHandler = function(B) {
this.hasDragged && v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: B.type, DOMEvent: B }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
}, O.prototype.position = function(B, C, b, M) {
var x = this.options.vertical, a = this.rendered ? "animate" : "attr", c = 0;
this.x = B, this.y = C + this.trackBorderWidth, this.width = b, this.xOffset = this.height = M, this.yOffset = c, x ? (this.width = this.yOffset = b = c = this.size, this.xOffset = C = 0, this.barWidth = M - 2 * b, this.x = B += this.options.margin) : (this.height = this.xOffset = M = C = this.size, this.barWidth = b - 2 * M, this.y += this.options.margin), this.group[a]({ translateX: B, translateY: this.y }), this.track[a]({ width: b, height: M }), this.scrollbarButtons[1][a]({ translateX: x ? 0 : b - C, translateY: x ? M - c : 0 });
}, O.prototype.removeEvents = function() {
this._events.forEach(function(B) {
P.apply(null, B);
}), this._events.length = 0;
}, O.prototype.render = function() {
var B = this.renderer, C = this.options, b = this.size, M = this.chart.styledMode, x = B.g("scrollbar").attr({ zIndex: C.zIndex, translateY: -99999 }).add();
this.group = x, this.track = B.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: C.trackBorderRadius || 0, height: b, width: b }).add(x), M || this.track.attr({ fill: C.trackBackgroundColor, stroke: C.trackBorderColor, "stroke-width": C.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = B.g().add(x), this.scrollbar = B.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: C.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = B.path(O.swapXY([["M", -3, b / 4], ["L", -3, 2 * b / 3], ["M", 0, b / 4], ["L", 0, 2 * b / 3], ["M", 3, b / 4], ["L", 3, 2 * b / 3]], C.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), M || (this.scrollbar.attr({ fill: C.barBackgroundColor, stroke: C.barBorderColor, "stroke-width": C.barBorderWidth }), this.scrollbarRifles.attr({ stroke: C.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-this.scrollbarStrokeWidth % 2 / 2, -this.scrollbarStrokeWidth % 2 / 2), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
}, O.prototype.setRange = function(B, C) {
var b = this.options, M = b.vertical, x = b.minWidth, a = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
if (N(a)) {
var p = a * Math.min(C, 1);
B = Math.max(B, 0);
var i = Math.ceil(a * B);
this.calculatedWidth = p = W(p - i), p < x && (i = (a - x + p) * B, p = x), x = Math.floor(i + this.xOffset + this.yOffset), a = p / 2 - 0.5, this.from = B, this.to = C, M ? (this.scrollbarGroup[c]({ translateY: x }), this.scrollbar[c]({ height: p }), this.scrollbarRifles[c]({ translateY: a }), this.scrollbarTop = x, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: x }), this.scrollbar[c]({ width: p }), this.scrollbarRifles[c]({ translateX: a }), this.scrollbarLeft = x, this.scrollbarTop = 0), 12 >= p ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= B && 1 <= C ? this.group.hide() : this.group.show()), this.rendered = !0;
}
}, O.prototype.shouldUpdateExtremes = function(B) {
return d(this.options.liveRedraw, R.svg && !R.isTouchDevice && !this.chart.isBoosting) || B === "mouseup" || B === "touchend" || !N(B);
}, O.prototype.trackClick = function(B) {
var C = this.chart.pointer.normalize(B), b = this.to - this.from, M = this.y + this.scrollbarTop, x = this.x + this.scrollbarLeft;
this.options.vertical && C.chartY > M || !this.options.vertical && C.chartX > x ? this.updatePosition(this.from + b, this.to + b) : this.updatePosition(this.from - b, this.to - b), v(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: B });
}, O.prototype.update = function(B) {
this.destroy(), this.init(this.chart.renderer, u(
!0,
this.options,
B
), this.chart);
}, O.prototype.updatePosition = function(B, C) {
1 < C && (B = W(1 - W(C - B)), C = 1), 0 > B && (C = W(C - B), B = 0), this.from = B, this.to = C;
}, O.defaultOptions = Z, O;
}(), $.scrollbar = u(!0, y.defaultOptions, $.scrollbar), y;
}), E(h, "Core/Axis/NavigatorAxis.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = y.isTouchDevice, Z = R.addEvent, H = R.correctFloat, $ = R.defined, U = R.isNumber, W = R.pick, N = function() {
function w(v) {
this.axis = v;
}
return w.prototype.destroy = function() {
this.axis = void 0;
}, w.prototype.toFixedRange = function(v, u, d, P) {
var O = this.axis, B = O.chart;
B = B && B.fixedRange;
var C = (O.pointRange || 0) / 2;
return v = W(d, O.translate(v, !0, !O.horiz)), u = W(P, O.translate(u, !0, !O.horiz)), O = B && (u - v) / B, $(d) || (v = H(v + C)), $(P) || (u = H(u - C)), 0.7 < O && 1.3 > O && (P ? v = u - B : u = v + B), U(v) && U(u) || (v = u = void 0), { min: v, max: u };
}, w;
}();
return function() {
function w() {
}
return w.compose = function(v) {
v.keepProps.push("navigatorAxis"), Z(v, "init", function() {
this.navigatorAxis || (this.navigatorAxis = new N(this));
}), Z(v, "zoom", function(u) {
var d = this.chart.options, P = d.navigator, O = this.navigatorAxis, B = d.chart.pinchType, C = d.rangeSelector;
d = d.chart.zoomType, this.isXAxis && (P && P.enabled || C && C.enabled) && (d === "y" ? u.zoomed = !1 : (!I && d === "xy" || I && B === "xy") && this.options.range && (P = O.previousZoom, $(u.newMin) ? O.previousZoom = [this.min, this.max] : P && (u.newMin = P[0], u.newMax = P[1], O.previousZoom = void 0))), typeof u.zoomed < "u" && u.preventDefault();
});
}, w.AdditionsClass = N, w;
}();
}), E(h, "Core/Navigator.js", [
h["Core/Axis/Axis.js"],
h["Core/Chart/Chart.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Axis/NavigatorAxis.js"],
h["Core/DefaultOptions.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Scrollbar.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W, N, w, v) {
I = I.parse;
var u = Z.hasTouch, d = Z.isTouchDevice, P = $.defaultOptions, O = v.addEvent, B = v.clamp, C = v.correctFloat, b = v.defined, M = v.destroyObjectProperties, x = v.erase, a = v.extend, c = v.find, p = v.isArray, i = v.isNumber, l = v.merge, s = v.pick, t = v.removeEvent, n = v.splat, o = function(_) {
for (var D = [], j = 1; j < arguments.length; j++)
D[j - 1] = arguments[j];
if (D = [].filter.call(D, i), D.length)
return Math[_].apply(0, D);
};
$ = typeof w.seriesTypes.areaspline > "u" ? "line" : "areaspline", a(P, { navigator: { height: 40, margin: 25, maskInside: !0, handles: { width: 7, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: I("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
type: $,
fillOpacity: 0.05,
lineWidth: 1,
compare: null,
dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] },
dataLabels: { enabled: !1, zIndex: 2 },
id: "highcharts-navigator-series",
className: "highcharts-navigator-series",
lineColor: null,
marker: { enabled: !1 },
threshold: null
}, xAxis: { overscroll: 0, className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#999999" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: null }, tickLength: 0, tickWidth: 0 } } }), U.getRendererType().prototype.symbols["navigator-handle"] = function(_, D, j, T, X) {
return _ = (X && X.width || 0) / 2, D = Math.round(_ / 3) + 0.5, X = X && X.height || 0, [["M", -_ - 1, 0.5], ["L", _, 0.5], ["L", _, X + 0.5], ["L", -_ - 1, X + 0.5], ["L", -_ - 1, 0.5], ["M", -D, 4], ["L", -D, X - 3], ["M", D - 1, 4], ["L", D - 1, X - 3]];
};
var A = function() {
function _(D) {
this.zoomedMin = this.zoomedMax = this.yAxis = this.xAxis = this.top = this.size = this.shades = this.rendered = this.range = this.outlineHeight = this.outline = this.opposite = this.navigatorSize = this.navigatorSeries = this.navigatorOptions = this.navigatorGroup = this.navigatorEnabled = this.left = this.height = this.handles = this.chart = this.baseSeries = void 0, this.init(D);
}
return _.prototype.drawHandle = function(D, j, T, X) {
var f = this.navigatorOptions.handles.height;
this.handles[j][X](T ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(D, 10) + 0.5 - f) } : { translateX: Math.round(this.left + parseInt(D, 10)), translateY: Math.round(this.top + this.height / 2 - f / 2 - 1) });
}, _.prototype.drawOutline = function(D, j, T, X) {
var f = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, Y = m % 2 / 2;
m = this.outlineHeight;
var F = this.scrollbarHeight || 0, Q = this.size, k = this.left - F, G = this.top;
T ? (k -= L, T = G + j + Y, j = G + D + Y, Y = [["M", k + m, G - F - Y], ["L", k + m, T], ["L", k, T], ["L", k, j], ["L", k + m, j], ["L", k + m, G + Q + F]], f && Y.push(["M", k + m, T - L], ["L", k + m, j + L])) : (D += k + F - Y, j += k + F - Y, G += L, Y = [["M", k, G], ["L", D, G], ["L", D, G + m], ["L", j, G + m], ["L", j, G], ["L", k + Q + 2 * F, G]], f && Y.push(["M", D - L, G], ["L", j + L, G])), this.outline[X]({ d: Y });
}, _.prototype.drawMasks = function(D, j, T, X) {
var f = this.left, m = this.top, L = this.height;
if (T)
var Y = [f, f, f], F = [m, m + D, m + j], Q = [L, L, L], k = [D, j - D, this.size - j];
else
Y = [f, f + D, f + j], F = [m, m, m], Q = [D, j - D, this.size - j], k = [L, L, L];
this.shades.forEach(function(G, z) {
G[X]({ x: Y[z], y: F[z], width: Q[z], height: k[z] });
});
}, _.prototype.renderElements = function() {
var D = this, j = D.navigatorOptions, T = j.maskInside, X = D.chart, f = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
D.navigatorGroup = m = f.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!T, T, !T].forEach(function(Y, F) {
D.shades[F] = f.rect().addClass("highcharts-navigator-mask" + (F === 1 ? "-inside" : "-outside")).add(m), X.styledMode || D.shades[F].attr({ fill: Y ? j.maskFill : "rgba(0,0,0,0)" }).css(F === 1 && L);
}), D.outline = f.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || D.outline.attr({ "stroke-width": j.outlineWidth, stroke: j.outlineColor }), j.handles.enabled && [0, 1].forEach(function(Y) {
if (j.handles.inverted = X.inverted, D.handles[Y] = f.symbol(j.handles.symbols[Y], -j.handles.width / 2 - 1, 0, j.handles.width, j.handles.height, j.handles), D.handles[Y].attr({ zIndex: 7 - Y }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][Y]).add(m), !X.styledMode) {
var F = j.handles;
D.handles[Y].attr({ fill: F.backgroundColor, stroke: F.borderColor, "stroke-width": F.lineWidth }).css(L);
}
});
}, _.prototype.update = function(D) {
(this.series || []).forEach(function(j) {
j.baseSeries && delete j.baseSeries.navigatorSeries;
}), this.destroy(), l(!0, this.chart.options.navigator, this.options, D), this.init(this.chart);
}, _.prototype.render = function(D, j, T, X) {
var f = this.chart, m = this.scrollbarHeight, L, Y = this.xAxis, F = Y.pointRange || 0, Q = Y.navigatorAxis.fake ? f.xAxis[0] : Y, k = this.navigatorEnabled, G, z = this.rendered, V = f.inverted, q = f.xAxis[0].minRange, it = f.xAxis[0].options.maxRange;
if (!this.hasDragged || b(T)) {
if (D = C(D - F / 2), j = C(j + F / 2), !i(D) || !i(j))
if (z)
T = 0, X = s(Y.width, Q.width);
else
return;
this.left = s(Y.left, f.plotLeft + m + (V ? f.plotWidth : 0)), this.size = G = L = s(Y.len, (V ? f.plotHeight : f.plotWidth) - 2 * m), f = V ? m : L + 2 * m, T = s(T, Y.toPixels(D, !0)), X = s(X, Y.toPixels(j, !0)), i(T) && Math.abs(T) !== 1 / 0 || (T = 0, X = f), D = Y.toValue(T, !0), j = Y.toValue(X, !0);
var et = Math.abs(C(j - D));
et < q ? this.grabbedLeft ? T = Y.toPixels(j - q - F, !0) : this.grabbedRight && (X = Y.toPixels(D + q + F, !0)) : b(it) && C(et - F) > it && (this.grabbedLeft ? T = Y.toPixels(j - it - F, !0) : this.grabbedRight && (X = Y.toPixels(D + it + F, !0))), this.zoomedMax = B(Math.max(T, X), 0, G), this.zoomedMin = B(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(T, X), 0, G), this.range = this.zoomedMax - this.zoomedMin, G = Math.round(this.zoomedMax), T = Math.round(this.zoomedMin), k && (this.navigatorGroup.attr({ visibility: "visible" }), z = z && !this.hasDragged ? "animate" : "attr", this.drawMasks(T, G, V, z), this.drawOutline(T, G, V, z), this.navigatorOptions.handles.enabled && (this.drawHandle(T, 0, V, z), this.drawHandle(G, 1, V, z))), this.scrollbar && (V ? (V = this.top - m, Q = this.left - m + (k || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : (V = this.top + (k ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, V, f, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
}
}, _.prototype.addMouseEvents = function() {
var D = this, j = D.chart, T = j.container, X = [], f, m;
D.mouseMoveHandler = f = function(L) {
D.onMouseMove(L);
}, D.mouseUpHandler = m = function(L) {
D.onMouseUp(L);
}, X = D.getPartsEvents("mousedown"), X.push(O(j.renderTo, "mousemove", f), O(T.ownerDocument, "mouseup", m)), u && (X.push(O(j.renderTo, "touchmove", f), O(T.ownerDocument, "touchend", m)), X.concat(D.getPartsEvents("touchstart"))), D.eventsToUnbind = X, D.series && D.series[0] && X.push(O(D.series[0].xAxis, "foundExtremes", function() {
j.navigator.modifyNavigatorAxisExtremes();
}));
}, _.prototype.getPartsEvents = function(D) {
var j = this, T = [];
return ["shades", "handles"].forEach(function(X) {
j[X].forEach(function(f, m) {
T.push(O(f.element, D, function(L) {
j[X + "Mousedown"](L, m);
}));
});
}), T;
}, _.prototype.shadesMousedown = function(D, j) {
D = this.chart.pointer.normalize(D);
var T = this.chart, X = this.xAxis, f = this.zoomedMin, m = this.left, L = this.size, Y = this.range, F = D.chartX;
if (T.inverted && (F = D.chartY, m = this.top), j === 1)
this.grabbedCenter = F, this.fixedWidth = Y, this.dragOffset = F - f;
else {
if (D = F - m - Y / 2, j === 0)
D = Math.max(0, D);
else if (j === 2 && D + Y >= L)
if (D = L - Y, this.reversedExtremes) {
D -= Y;
var Q = this.getUnionExtremes().dataMin;
} else
var k = this.getUnionExtremes().dataMax;
D !== f && (this.fixedWidth = Y, j = X.navigatorAxis.toFixedRange(D, D + Y, Q, k), b(j.min) && T.xAxis[0].setExtremes(Math.min(j.min, j.max), Math.max(j.min, j.max), !0, null, { trigger: "navigator" }));
}
}, _.prototype.handlesMousedown = function(D, j) {
this.chart.pointer.normalize(D), D = this.chart;
var T = D.xAxis[0], X = this.reversedExtremes;
j === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? T.min : T.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? T.max : T.min), D.fixedRange = null;
}, _.prototype.onMouseMove = function(D) {
var j = this, T = j.chart, X = j.left, f = j.navigatorSize, m = j.range, L = j.dragOffset, Y = T.inverted;
D.touches && D.touches[0].pageX === 0 || (D = T.pointer.normalize(D), T = D.chartX, Y && (X = j.top, T = D.chartY), j.grabbedLeft ? (j.hasDragged = !0, j.render(0, 0, T - X, j.otherHandlePos)) : j.grabbedRight ? (j.hasDragged = !0, j.render(0, 0, j.otherHandlePos, T - X)) : j.grabbedCenter && (j.hasDragged = !0, T < L ? T = L : T > f + L - m && (T = f + L - m), j.render(0, 0, T - L, T - L + m)), j.hasDragged && j.scrollbar && s(j.scrollbar.options.liveRedraw, Z.svg && !d && !this.chart.isBoosting) && (D.DOMType = D.type, setTimeout(function() {
j.onMouseUp(D);
}, 0)));
}, _.prototype.onMouseUp = function(D) {
var j = this.chart, T = this.xAxis, X = this.scrollbar, f = D.DOMEvent || D, m = j.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
if (this.hasDragged && (!X || !X.hasDragged) || D.trigger === "scrollbar") {
if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
var Y = this.fixedExtreme;
else if (this.zoomedMax === this.otherHandlePos)
var F = this.fixedExtreme;
this.zoomedMax === this.size && (F = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (Y = this.reversedExtremes ? X.dataMax : X.dataMin), T = T.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, Y, F), b(T.min) && j.xAxis[0].setExtremes(Math.min(T.min, T.max), Math.max(T.min, T.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: f });
}
D.DOMType !== "mousemove" && D.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && i(this.zoomedMin) && i(this.zoomedMax) && (j = Math.round(this.zoomedMin), D = Math.round(this.zoomedMax), this.shades && this.drawMasks(j, D, m, L), this.outline && this.drawOutline(j, D, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(j, 0, m, L), this.drawHandle(D, 1, m, L)));
}, _.prototype.removeEvents = function() {
this.eventsToUnbind && (this.eventsToUnbind.forEach(function(D) {
D();
}), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
}, _.prototype.removeBaseSeriesEvents = function() {
var D = this.baseSeries || [];
this.navigatorEnabled && D[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && D.forEach(function(j) {
t(j, "updatedData", this.updatedDataHandler);
}, this), D[0].xAxis && t(D[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
}, _.prototype.init = function(D) {
var j = D.options, T = j.navigator, X = T.enabled, f = j.scrollbar, m = f.enabled;
j = X ? T.height : 0;
var L = m ? f.height : 0;
this.handles = [], this.shades = [], this.chart = D, this.setBaseSeries(), this.height = j, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = T, this.scrollbarOptions = f, this.outlineHeight = j + L, this.opposite = s(T.opposite, !(X || !D.inverted));
var Y = this;
X = Y.baseSeries, f = D.xAxis.length, m = D.yAxis.length;
var F = X && X[0] && X[0].xAxis || D.xAxis[0] || { options: {} };
D.isDirtyBox = !0, Y.navigatorEnabled ? (Y.xAxis = new y(D, l(
{ breaks: F.options.breaks, ordinal: F.options.ordinal },
T.xAxis,
{ id: "navigator-x-axis", yAxis: "navigator-y-axis", isX: !0, type: "datetime", index: f, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: 0, maxPadding: 0, zoomEnabled: !1 },
D.inverted ? { offsets: [L, 0, -L, 0], width: j } : { offsets: [0, -L, 0, L], height: j }
)), Y.yAxis = new y(D, l(T.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: s(T.yAxis && T.yAxis.reversed, D.yAxis[0] && D.yAxis[0].reversed, !1), zoomEnabled: !1 }, D.inverted ? { width: j } : { height: j })), X || T.series.data ? Y.updateNavigatorSeries(!1) : D.series.length === 0 && (Y.unbindRedraw = O(D, "beforeRedraw", function() {
0 < D.series.length && !Y.series && (Y.setBaseSeries(), Y.unbindRedraw());
})), Y.reversedExtremes = D.inverted && !Y.xAxis.reversed || !D.inverted && Y.xAxis.reversed, Y.renderElements(), Y.addMouseEvents()) : (Y.xAxis = {
chart: D,
navigatorAxis: { fake: !0 },
translate: function(Q, k) {
var G = D.xAxis[0], z = G.getExtremes(), V = G.len - 2 * L, q = o("min", G.options.min, z.dataMin);
return G = o("max", G.options.max, z.dataMax) - q, k ? Q * G / V + q : V * (Q - q) / G;
},
toPixels: function(Q) {
return this.translate(Q);
},
toValue: function(Q) {
return this.translate(Q, !0);
}
}, Y.xAxis.navigatorAxis.axis = Y.xAxis, Y.xAxis.navigatorAxis.toFixedRange = H.AdditionsClass.prototype.toFixedRange.bind(Y.xAxis.navigatorAxis)), D.options.scrollbar.enabled && (D.scrollbar = Y.scrollbar = new W(D.renderer, l(D.options.scrollbar, { margin: Y.navigatorEnabled ? 0 : 10, vertical: D.inverted }), D), O(Y.scrollbar, "changed", function(Q) {
var k = Y.size, G = k * this.to;
k *= this.from, Y.hasDragged = Y.scrollbar.hasDragged, Y.render(0, 0, k, G), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
Y.onMouseUp(Q);
});
})), Y.addBaseSeriesEvents(), Y.addChartEvents();
}, _.prototype.getUnionExtremes = function(D) {
var j = this.chart.xAxis[0], T = this.xAxis, X = T.options, f = j.options, m;
return D && j.dataMin === null || (m = { dataMin: s(X && X.min, o("min", f.min, j.dataMin, T.dataMin, T.min)), dataMax: s(X && X.max, o("max", f.max, j.dataMax, T.dataMax, T.max)) }), m;
}, _.prototype.setBaseSeries = function(D, j) {
var T = this.chart, X = this.baseSeries = [];
D = D || T.options && T.options.navigator.baseSeries || (T.series.length ? c(
T.series,
function(f) {
return !f.options.isInternal;
}
).index : 0), (T.series || []).forEach(function(f, m) {
f.options.isInternal || !f.options.showInNavigator && (m !== D && f.options.id !== D || f.options.showInNavigator === !1) || X.push(f);
}), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, j);
}, _.prototype.updateNavigatorSeries = function(D, j) {
var T = this, X = T.chart, f = T.baseSeries, m, L, Y = T.navigatorOptions.series, F, Q = {
enableMouseTracking: !1,
index: null,
linkedTo: null,
group: "nav",
padXAxis: !1,
xAxis: "navigator-x-axis",
yAxis: "navigator-y-axis",
showInLegend: !1,
stacking: void 0,
isInternal: !0,
states: { inactive: { opacity: 1 } }
}, k = T.series = (T.series || []).filter(function(G) {
var z = G.baseSeries;
return 0 > f.indexOf(z) ? (z && (t(z, "updatedData", T.updatedDataHandler), delete z.navigatorSeries), G.chart && G.destroy(), !1) : !0;
});
f && f.length && f.forEach(function(G) {
var z = G.navigatorSeries, V = a({ color: G.color, visible: G.visible }, p(Y) ? P.navigator.series : Y);
z && T.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + f.length, m = G.options || {}, F = m.navigatorOptions || {}, V.dataLabels = n(V.dataLabels), L = l(m, Q, V, F), L.pointRange = s(V.pointRange, F.pointRange, P.plotOptions[L.type || "line"].pointRange), V = F.data || V.data, T.hasNavigatorData = T.hasNavigatorData || !!V, L.data = V || m.data && m.data.slice(0), z && z.options ? z.update(L, j) : (G.navigatorSeries = X.initSeries(L), G.navigatorSeries.baseSeries = G, k.push(G.navigatorSeries)));
}), (Y.data && (!f || !f.length) || p(Y)) && (T.hasNavigatorData = !1, Y = n(Y), Y.forEach(function(G, z) {
Q.name = "Navigator " + (k.length + 1), L = l(
P.navigator.series,
{ color: X.series[z] && !X.series[z].options.isInternal && X.series[z].color || X.options.colors[z] || X.options.colors[0] },
Q,
G
), L.data = G.data, L.data && (T.hasNavigatorData = !0, k.push(X.initSeries(L)));
})), D && this.addBaseSeriesEvents();
}, _.prototype.addBaseSeriesEvents = function() {
var D = this, j = D.baseSeries || [];
j[0] && j[0].xAxis && j[0].eventsToUnbind.push(O(j[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), j.forEach(function(T) {
T.eventsToUnbind.push(O(T, "show", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(
!0,
!1
);
})), T.eventsToUnbind.push(O(T, "hide", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
})), this.navigatorOptions.adaptToUpdatedData !== !1 && T.xAxis && T.eventsToUnbind.push(O(T, "updatedData", this.updatedDataHandler)), T.eventsToUnbind.push(O(T, "remove", function() {
this.navigatorSeries && (x(D.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
}));
}, this);
}, _.prototype.getBaseSeriesMin = function(D) {
return this.baseSeries.reduce(function(j, T) {
return Math.min(j, T.xData ? T.xData[0] : j);
}, D);
}, _.prototype.modifyNavigatorAxisExtremes = function() {
var D = this.xAxis, j;
typeof D.getExtremes < "u" && (!(j = this.getUnionExtremes(!0)) || j.dataMin === D.min && j.dataMax === D.max || (D.min = j.dataMin, D.max = j.dataMax));
}, _.prototype.modifyBaseAxisExtremes = function() {
var D = this.chart.navigator, j = this.getExtremes(), T = j.dataMin, X = j.dataMax;
j = j.max - j.min;
var f = D.stickToMin, m = D.stickToMax, L = s(this.options.overscroll, 0), Y = D.series && D.series[0], F = !!this.setExtremes;
if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
if (f)
var Q = T, k = Q + j;
m && (k = X + L, f || (Q = Math.max(T, k - j, D.getBaseSeriesMin(Y && Y.xData ? Y.xData[0] : -Number.MAX_VALUE)))), F && (f || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = k);
}
D.stickToMin = D.stickToMax = null;
}, _.prototype.updatedDataHandler = function() {
var D = this.chart.navigator, j = this.navigatorSeries;
D.stickToMax = D.reversedExtremes ? Math.round(D.zoomedMin) === 0 : Math.round(D.zoomedMax) >= Math.round(D.size), D.stickToMin = D.shouldStickToMin(
this,
D
), j && !D.hasNavigatorData && (j.options.pointStart = this.xData[0], j.setData(this.options.data, !1, null, !1));
}, _.prototype.shouldStickToMin = function(D, j) {
j = j.getBaseSeriesMin(D.xData[0]);
var T = D.xAxis;
D = T.max;
var X = T.min;
return T = T.options.range, i(D) && i(X) ? T && 0 < D - j ? D - j < T : X <= j : !1;
}, _.prototype.addChartEvents = function() {
this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
var D = this.navigator, j = D && (D.baseSeries && D.baseSeries[0] && D.baseSeries[0].xAxis || this.xAxis[0]);
j && D.render(j.min, j.max);
}), O(this.chart, "getMargins", function() {
var D = this.navigator, j = D.opposite ? "plotTop" : "marginBottom";
this.inverted && (j = D.opposite ? "marginRight" : "plotLeft"), this[j] = (this[j] || 0) + (D.navigatorEnabled || !this.inverted ? D.outlineHeight : 0) + D.navigatorOptions.margin;
}));
}, _.prototype.destroy = function() {
this.removeEvents(), this.xAxis && (x(this.chart.xAxis, this.xAxis), x(this.chart.axes, this.xAxis)), this.yAxis && (x(this.chart.yAxis, this.yAxis), x(this.chart.axes, this.yAxis)), (this.series || []).forEach(function(D) {
D.destroy && D.destroy();
}), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(D) {
this[D] && this[D].destroy && this[D].destroy(), this[D] = null;
}, this), [this.handles].forEach(function(D) {
M(D);
}, this);
}, _;
}();
return Z.Navigator || (Z.Navigator = A, H.compose(y), O(R, "beforeShowResetZoom", function() {
var _ = this.options, D = _.navigator, j = _.rangeSelector;
if ((D && D.enabled || j && j.enabled) && (!d && _.chart.zoomType === "x" || d && _.chart.pinchType === "x"))
return !1;
}), O(R, "beforeRender", function() {
var _ = this.options;
(_.navigator.enabled || _.scrollbar.enabled) && (this.scroller = this.navigator = new A(this));
}), O(R, "afterSetChartSize", function() {
var _ = this.legend, D = this.navigator;
if (D) {
var j = _ && _.options, T = D.xAxis, X = D.yAxis, f = D.scrollbarHeight;
this.inverted ? (D.left = D.opposite ? this.chartWidth - f - D.height : this.spacing[3] + f, D.top = this.plotTop + f) : (D.left = s(T.left, this.plotLeft + f), D.top = D.navigatorOptions.top || this.chartHeight - D.height - f - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (j && j.verticalAlign === "bottom" && j.layout !== "proximate" && j.enabled && !j.floating ? _.legendHeight + s(j.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), T && X && (this.inverted ? T.options.left = X.options.left = D.left : T.options.top = X.options.top = D.top, T.setAxisSize(), X.setAxisSize());
}
}), O(R, "update", function(_) {
var D = _.options.navigator || {}, j = _.options.scrollbar || {};
this.navigator || this.scroller || !D.enabled && !j.enabled || (l(
!0,
this.options.navigator,
D
), l(!0, this.options.scrollbar, j), delete _.options.navigator, delete _.options.scrollbar);
}), O(R, "afterUpdate", function(_) {
this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new A(this), s(_.redraw, !0) && this.redraw(_.animation));
}), O(R, "afterAddSeries", function() {
this.navigator && this.navigator.setBaseSeries(null, !1);
}), O(N, "afterUpdate", function() {
this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
null,
!1
);
}), R.prototype.callbacks.push(function(_) {
var D = _.navigator;
D && _.xAxis[0] && (_ = _.xAxis[0].getExtremes(), D.render(_.min, _.max));
})), Z.Navigator = A, Z.Navigator;
}), E(h, "Extensions/RangeSelector.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $) {
function U(n) {
if (n.indexOf("%L") !== -1)
return "text";
var o = "aAdewbBmoyY".split("").some(function(_) {
return n.indexOf("%" + _) !== -1;
}), A = "HkIlMS".split("").some(function(_) {
return n.indexOf("%" + _) !== -1;
});
return o && A ? "datetime-local" : o ? "date" : A ? "time" : "text";
}
var W = Z.defaultOptions, N = $.addEvent, w = $.createElement, v = $.css, u = $.defined, d = $.destroyObjectProperties, P = $.discardElement, O = $.extend, B = $.find, C = $.fireEvent, b = $.isNumber, M = $.merge, x = $.objectEach, a = $.pad, c = $.pick, p = $.pInt, i = $.splat;
O(W, { rangeSelector: { allButtonsEnabled: !1, buttons: void 0, buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: {
width: 28,
height: 18,
padding: 2,
zIndex: 7
}, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%b %e, %Y", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#335cad", cursor: "pointer" }, labelStyle: { color: "#666666" } } }), O(W.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
var l = function() {
function n(o) {
this.buttons = void 0, this.buttonOptions = n.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = o, this.init(o);
}
return n.prototype.clickButton = function(o, A) {
var _ = this.chart, D = this.buttonOptions[o], j = _.xAxis[0], T = _.scroller && _.scroller.getUnionExtremes() || j || {}, X = T.dataMin, f = T.dataMax, m = j && Math.round(Math.min(j.max, c(f, j.max))), L = D.type;
T = D._range;
var Y, F = D.dataGrouping;
if (X !== null && f !== null) {
if (_.fixedRange = T, this.setSelected(o), F && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(j || { chart: this.chart }, F, !1), this.frozenStates = D.preserveDataGrouping), L === "month" || L === "year")
if (j) {
L = { range: D, max: m, chart: _, dataMin: X, dataMax: f };
var Q = j.minFromRange.call(L);
b(L.newMax) && (m = L.newMax);
} else
T = D;
else if (T)
Q = Math.max(m - T, X), m = Math.min(Q + T, f);
else if (L === "ytd")
if (j)
typeof f > "u" && (X = Number.MAX_VALUE, f = Number.MIN_VALUE, _.series.forEach(function(V) {
V = V.xData, X = Math.min(V[0], X), f = Math.max(V[V.length - 1], f);
}), A = !1), m = this.getYTDExtremes(
f,
X,
_.time.useUTC
), Q = Y = m.min, m = m.max;
else {
this.deferredYTDClick = o;
return;
}
else
L === "all" && j && (_.navigator && _.navigator.baseSeries[0] && (_.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = f);
if (u(Q) && (Q += D._offsetMin), u(m) && (m += D._offsetMax), this.dropdown && (this.dropdown.selectedIndex = o + 1), j)
j.setExtremes(Q, m, c(A, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: D });
else {
var k = i(_.options.xAxis)[0], G = k.range;
k.range = T;
var z = k.min;
k.min = Y, N(_, "load", function() {
k.range = G, k.min = z;
});
}
C(
this,
"afterBtnClick"
);
}
}, n.prototype.setSelected = function(o) {
this.selected = this.options.selected = o;
}, n.prototype.init = function(o) {
var A = this, _ = o.options.rangeSelector, D = _.buttons || A.defaultButtons.slice(), j = _.selected, T = function() {
var X = A.minInput, f = A.maxInput;
X && X.blur && C(X, "blur"), f && f.blur && C(f, "blur");
};
A.chart = o, A.options = _, A.buttons = [], A.buttonOptions = D, this.eventsToUnbind = [], this.eventsToUnbind.push(N(o.container, "mousedown", T)), this.eventsToUnbind.push(N(o, "resize", T)), D.forEach(A.computeButtonRange), typeof j < "u" && D[j] && this.clickButton(j, !1), this.eventsToUnbind.push(N(o, "load", function() {
o.xAxis && o.xAxis[0] && N(o.xAxis[0], "setExtremes", function(X) {
this.max - this.min !== o.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && A.forcedDataGrouping && !A.frozenStates && this.setDataGrouping(!1, !1);
});
}));
}, n.prototype.updateButtonStates = function() {
var o = this, A = this.chart, _ = this.dropdown, D = A.xAxis[0], j = Math.round(D.max - D.min), T = !D.hasVisibleSeries, X = A.scroller && A.scroller.getUnionExtremes() || D, f = X.dataMin, m = X.dataMax;
A = o.getYTDExtremes(m, f, A.time.useUTC);
var L = A.min, Y = A.max, F = o.selected, Q = b(F), k = o.options.allButtonsEnabled, G = o.buttons;
o.buttonOptions.forEach(function(z, V) {
var q = z._range, it = z.type, et = z.count || 1, nt = G[V], rt = 0, ct = z._offsetMax - z._offsetMin;
z = V === F;
var gt = q > m - f, dt = q < D.minRange, lt = !1, at = !1;
q = q === j, (it === "month" || it === "year") && j + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && j - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = Y - L + ct === j, lt = !z) : it === "all" && (q = D.max - D.min >= m - f, at = !z && Q && q), it = !k && (gt || dt || at || T), et = z && q || q && !Q && !lt || z && o.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), _ && (_.options[V + 1].disabled = it, rt === 2 && (_.selectedIndex = V + 1)), rt === 0 && F === V && o.setSelected());
});
}, n.prototype.computeButtonRange = function(o) {
var A = o.type, _ = o.count || 1, D = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
D[A] ? o._range = D[A] * _ : (A === "month" || A === "year") && (o._range = 864e5 * { month: 30, year: 365 }[A] * _), o._offsetMin = c(o.offsetMin, 0), o._offsetMax = c(o.offsetMax, 0), o._range += o._offsetMax - o._offsetMin;
}, n.prototype.getInputValue = function(o) {
o = o === "min" ? this.minInput : this.maxInput;
var A = this.chart.options.rangeSelector, _ = this.chart.time;
return o ? (o.type === "text" && A.inputDateParser || this.defaultInputDateParser)(o.value, _.useUTC, _) : 0;
}, n.prototype.setInputValue = function(o, A) {
var _ = this.options, D = this.chart.time, j = o === "min" ? this.minInput : this.maxInput;
if (o = o === "min" ? this.minDateBox : this.maxDateBox, j) {
var T = j.getAttribute("data-hc-time");
T = u(T) ? Number(T) : void 0, u(A) && (u(T) && j.setAttribute("data-hc-time-previous", T), j.setAttribute("data-hc-time", A), T = A), j.value = D.dateFormat(this.inputTypeFormats[j.type] || _.inputEditDateFormat, T), o && o.attr({ text: D.dateFormat(_.inputDateFormat, T) });
}
}, n.prototype.setInputExtremes = function(o, A, _) {
if (o = o === "min" ? this.minInput : this.maxInput) {
var D = this.inputTypeFormats[o.type], j = this.chart.time;
D && (A = j.dateFormat(D, A), o.min !== A && (o.min = A), _ = j.dateFormat(D, _), o.max !== _ && (o.max = _));
}
}, n.prototype.showInput = function(o) {
var A = o === "min" ? this.minDateBox : this.maxDateBox;
if ((o = o === "min" ? this.minInput : this.maxInput) && A && this.inputGroup) {
var _ = o.type === "text", D = this.inputGroup, j = D.translateX;
D = D.translateY;
var T = this.options.inputBoxWidth;
v(o, { width: _ ? A.width + (T ? -2 : 20) + "px" : "auto", height: _ ? A.height - 2 + "px" : "auto", border: "2px solid silver" }), _ && T ? v(o, { left: j + A.x + "px", top: D + "px" }) : v(o, { left: Math.min(Math.round(A.x + j - (o.offsetWidth - A.width) / 2), this.chart.chartWidth - o.offsetWidth) + "px", top: D - (o.offsetHeight - A.height) / 2 + "px" });
}
}, n.prototype.hideInput = function(o) {
(o = o === "min" ? this.minInput : this.maxInput) && v(o, { top: "-9999em", border: 0, width: "1px", height: "1px" });
}, n.prototype.defaultInputDateParser = function(o, A, _) {
var D = o.split("/").join("-").split(" ").join("T");
if (D.indexOf("T") === -1 && (D += "T00:00"), A)
D += "Z";
else {
var j;
(j = I.isSafari) && (j = D, j = !(6 < j.length && (j.lastIndexOf("-") === j.length - 6 || j.lastIndexOf("+") === j.length - 6))), j && (j = new Date(D).getTimezoneOffset() / 60, D += 0 >= j ? "+" + a(-j) + ":00" : "-" + a(j) + ":00");
}
return D = Date.parse(D), b(D) || (o = o.split("-"), D = Date.UTC(p(o[0]), p(o[1]) - 1, p(o[2]))), _ && A && b(D) && (D += _.getTimezoneOffset(D)), D;
}, n.prototype.drawInput = function(o) {
function A() {
var k = T.getInputValue(o), G = _.xAxis[0], z = _.scroller && _.scroller.xAxis ? _.scroller.xAxis : G, V = z.dataMin;
z = z.dataMax;
var q = T.maxInput, it = T.minInput;
k !== Number(F.getAttribute("data-hc-time-previous")) && b(k) && (F.setAttribute("data-hc-time-previous", k), L && q && b(V) ? k > Number(q.getAttribute("data-hc-time")) ? k = void 0 : k < V && (k = V) : it && b(z) && (k < Number(it.getAttribute("data-hc-time")) ? k = void 0 : k > z && (k = z)), typeof k < "u" && G.setExtremes(L ? k : G.min, L ? G.max : k, void 0, void 0, { trigger: "rangeSelectorInput" }));
}
var _ = this.chart, D = this.div, j = this.inputGroup, T = this, X = _.renderer.style || {}, f = _.renderer, m = _.options.rangeSelector, L = o === "min", Y = W.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
Y = f.label(Y, 0).addClass("highcharts-range-label").attr({ padding: Y ? 2 : 0, height: Y ? m.inputBoxHeight : 0 }).add(j), f = f.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
"click",
function() {
T.showInput(o), T[o + "Input"].focus();
}
), _.styledMode || f.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), f.add(j);
var F = w("input", { name: o, className: "highcharts-range-selector" }, void 0, D);
F.setAttribute("type", U(m.inputDateFormat || "%b %e, %Y")), _.styledMode || (Y.css(M(X, m.labelStyle)), f.css(M({ color: "#333333" }, X, m.inputStyle)), v(F, O({
position: "absolute",
border: 0,
boxShadow: "0 0 15px rgba(0,0,0,0.3)",
width: "1px",
height: "1px",
padding: 0,
textAlign: "center",
fontSize: X.fontSize,
fontFamily: X.fontFamily,
top: "-9999em"
}, m.inputStyle))), F.onfocus = function() {
T.showInput(o);
}, F.onblur = function() {
F === I.doc.activeElement && A(), T.hideInput(o), T.setInputValue(o), F.blur();
};
var Q = !1;
return F.onchange = function() {
Q || (A(), T.hideInput(o), F.blur());
}, F.onkeypress = function(k) {
k.keyCode === 13 && A();
}, F.onkeydown = function(k) {
Q = !0, k.keyCode !== 38 && k.keyCode !== 40 || A();
}, F.onkeyup = function() {
Q = !1;
}, { dateBox: f, input: F, label: Y };
}, n.prototype.getPosition = function() {
var o = this.chart, A = o.options.rangeSelector;
return o = A.verticalAlign === "top" ? o.plotTop - o.axisOffset[0] : 0, { buttonTop: o + A.buttonPosition.y, inputTop: o + A.inputPosition.y - 10 };
}, n.prototype.getYTDExtremes = function(o, A, _) {
var D = this.chart.time, j = new D.Date(o), T = D.get("FullYear", j);
return _ = _ ? D.Date.UTC(T, 0, 1) : +new D.Date(T, 0, 1), A = Math.max(A, _), j = j.getTime(), { max: Math.min(o || j, j), min: A };
}, n.prototype.render = function(o, A) {
var _ = this.chart, D = _.renderer, j = _.container, T = _.options, X = T.rangeSelector, f = c(T.chart.style && T.chart.style.zIndex, 0) + 1;
if (T = X.inputEnabled, X.enabled !== !1) {
if (this.rendered || (this.group = D.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = w("div", void 0, { position: "relative", height: 0, zIndex: f }), this.buttonOptions.length && this.renderButtons(), j.parentNode && j.parentNode.insertBefore(this.div, j), T && (this.inputGroup = D.g("input-group").add(this.group), D = this.drawInput("min"), this.minDateBox = D.dateBox, this.minLabel = D.label, this.minInput = D.input, D = this.drawInput("max"), this.maxDateBox = D.dateBox, this.maxLabel = D.label, this.maxInput = D.input)), T && (this.setInputValue(
"min",
o
), this.setInputValue("max", A), o = _.scroller && _.scroller.getUnionExtremes() || _.xAxis[0] || {}, u(o.dataMin) && u(o.dataMax) && (_ = _.xAxis[0].minRange || 0, this.setInputExtremes("min", o.dataMin, Math.min(o.dataMax, this.getInputValue("max")) - _), this.setInputExtremes("max", Math.max(o.dataMin, this.getInputValue("min")) + _, o.dataMax)), this.inputGroup)) {
var m = 0;
[this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
if (L) {
var Y = L.getBBox().width;
Y && (L.attr({ x: m }), m += Y + X.inputSpacing);
}
});
}
this.alignElements(), this.rendered = !0;
}
}, n.prototype.renderButtons = function() {
var o = this, A = this.buttons, _ = this.options, D = W.lang, j = this.chart.renderer, T = M(_.buttonTheme), X = T && T.states, f = T.width || 28;
delete T.width, delete T.states, this.buttonGroup = j.g("range-selector-buttons").add(this.group);
var m = this.dropdown = w("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
N(m, "touchstart", function() {
m.style.fontSize = "16px";
}), [[I.isMS ? "mouseover" : "mouseenter"], [I.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
var Y = L[0], F = L[1];
N(m, Y, function() {
var Q = A[o.currentButtonIndex()];
Q && C(Q.element, F || Y);
});
}), this.zoomText = j.label(D && D.rangeSelectorZoom || "", 0).attr({ padding: _.buttonTheme.padding, height: _.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(_.labelStyle), T["stroke-width"] = c(T["stroke-width"], 0)), w(
"option",
{ textContent: this.zoomText.textStr, disabled: !0 },
void 0,
m
), this.buttonOptions.forEach(function(L, Y) {
w("option", { textContent: L.title || L.text }, void 0, m), A[Y] = j.button(L.text, 0, 0, function(F) {
var Q = L.events && L.events.click, k;
Q && (k = Q.call(L, F)), k !== !1 && o.clickButton(Y), o.isActive = !0;
}, T, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: f }).add(o.buttonGroup), L.title && A[Y].attr("title", L.title);
});
}, n.prototype.alignElements = function() {
var o = this, A = this.buttonGroup, _ = this.buttons, D = this.chart, j = this.group, T = this.inputGroup, X = this.options, f = this.zoomText, m = D.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
m = X.buttonPosition;
var Y = X.inputPosition, F = X.verticalAlign, Q = function(V, q) {
return L && o.titleCollision(D) && F === "top" && q.align === "right" && q.y - V.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + D.spacing[0] ? -40 : 0;
}, k = D.plotLeft;
if (j && m && Y) {
var G = m.x - D.spacing[3];
if (A) {
if (this.positionButtons(), !this.initialButtonGroupWidth) {
var z = 0;
f && (z += f.getBBox().width + 5), _.forEach(function(V, q) {
z += V.width, q !== _.length - 1 && (z += X.buttonSpacing);
}), this.initialButtonGroupWidth = z;
}
k -= D.spacing[3], this.updateButtonStates(), f = Q(A, m), this.alignButtonGroup(f), j.placed = A.placed = D.hasLoaded;
}
A = 0, T && (A = Q(T, Y), Y.align === "left" ? G = k : Y.align === "right" && (G = -Math.max(D.axisOffset[1], -A)), T.align({ y: Y.y, width: T.getBBox().width, align: Y.align, x: Y.x + G - 2 }, !0, D.spacingBox), T.placed = D.hasLoaded), this.handleCollision(A), j.align({ verticalAlign: F }, !0, D.spacingBox), T = j.alignAttr.translateY, A = j.getBBox().height + 20, Q = 0, F === "bottom" && (Q = (Q = D.legend && D.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? D.legend.legendHeight + c(Q.margin, 10) : 0, A = A + Q - 20, Q = T - A - (X.floating ? 0 : X.y) - (D.titleOffset ? D.titleOffset[2] : 0) - 10), F === "top" ? (X.floating && (Q = 0), D.titleOffset && D.titleOffset[0] && (Q = D.titleOffset[0]), Q += D.margin[0] - D.spacing[0] || 0) : F === "middle" && (Y.y === m.y ? Q = T : (Y.y || m.y) && (Q = 0 > Y.y || 0 > m.y ? Q - Math.min(Y.y, m.y) : T - A)), j.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, Y = this.maxInput, T = this.dropdown, X.inputEnabled && m && Y && (m.style.marginTop = j.translateY + "px", Y.style.marginTop = j.translateY + "px"), T && (T.style.marginTop = j.translateY + "px");
}
}, n.prototype.alignButtonGroup = function(o, A) {
var _ = this.chart, D = this.buttonGroup, j = this.options.buttonPosition, T = _.plotLeft - _.spacing[3], X = j.x - _.spacing[3];
j.align === "right" ? X += o - T : j.align === "center" && (X -= T / 2), D && D.align({ y: j.y, width: c(A, this.initialButtonGroupWidth), align: j.align, x: X }, !0, _.spacingBox);
}, n.prototype.positionButtons = function() {
var o = this.buttons, A = this.chart, _ = this.options, D = this.zoomText, j = A.hasLoaded ? "animate" : "attr", T = _.buttonPosition, X = A.plotLeft, f = X;
D && D.visibility !== "hidden" && (D[j]({ x: c(X + T.x, X) }), f += T.x + D.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
o[L].visibility !== "hidden" ? (o[L][j]({ x: f }), f += o[L].width + _.buttonSpacing) : o[L][j]({ x: X });
});
}, n.prototype.handleCollision = function(o) {
var A = this, _ = this.chart, D = this.buttonGroup, j = this.inputGroup, T = this.options, X = T.buttonPosition, f = T.dropdown, m = T.inputPosition;
T = function() {
var F = 0;
return A.buttons.forEach(function(Q) {
Q = Q.getBBox(), Q.width > F && (F = Q.width);
}), F;
};
var L = function(F) {
if (j && D) {
var Q = j.alignAttr.translateX + j.alignOptions.x - o + j.getBBox().x + 2, k = j.alignOptions.width, G = D.alignAttr.translateX + D.getBBox().x;
return G + F > Q && Q + k > G && X.y < m.y + j.getBBox().height;
}
return !1;
}, Y = function() {
j && D && j.attr({ translateX: j.alignAttr.translateX + (_.axisOffset[1] >= -o ? 0 : -o), translateY: j.alignAttr.translateY + D.getBBox().height + 10 });
};
if (D) {
if (f === "always") {
this.collapseButtons(o), L(T()) && Y();
return;
}
f === "never" && this.expandButtons();
}
j && D ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? f === "responsive" ? (this.collapseButtons(o), L(T()) && Y()) : Y() : f === "responsive" && this.expandButtons() : D && f === "responsive" && (this.initialButtonGroupWidth > _.plotWidth ? this.collapseButtons(o) : this.expandButtons());
}, n.prototype.collapseButtons = function(o) {
var A = this.buttons, _ = this.buttonOptions, D = this.chart, j = this.dropdown, T = this.options, X = this.zoomText, f = D.userOptions.rangeSelector && D.userOptions.rangeSelector.buttonTheme || {}, m = function(Y) {
return { text: Y ? Y + " ▾" : "▾", width: "auto", paddingLeft: c(T.buttonTheme.paddingLeft, f.padding, 8), paddingRight: c(T.buttonTheme.paddingRight, f.padding, 8) };
};
X && X.hide();
var L = !1;
_.forEach(function(Y, F) {
F = A[F], F.state !== 2 ? F.hide() : (F.show(), F.attr(m(Y.text)), L = !0);
}), L || (j && (j.selectedIndex = 0), A[0].show(), A[0].attr(m(this.zoomText && this.zoomText.textStr))), _ = T.buttonPosition.align, this.positionButtons(), _ !== "right" && _ !== "center" || this.alignButtonGroup(o, A[this.currentButtonIndex()].getBBox().width), this.showDropdown();
}, n.prototype.expandButtons = function() {
var o = this.buttons, A = this.buttonOptions, _ = this.options, D = this.zoomText;
this.hideDropdown(), D && D.show(), A.forEach(function(j, T) {
T = o[T], T.show(), T.attr({ text: j.text, width: _.buttonTheme.width || 28, paddingLeft: c(_.buttonTheme.paddingLeft, "unset"), paddingRight: c(_.buttonTheme.paddingRight, "unset") }), 2 > T.state && T.setState(0);
}), this.positionButtons();
}, n.prototype.currentButtonIndex = function() {
var o = this.dropdown;
return o && 0 < o.selectedIndex ? o.selectedIndex - 1 : 0;
}, n.prototype.showDropdown = function() {
var o = this.buttonGroup, A = this.buttons, _ = this.chart, D = this.dropdown;
if (o && D) {
var j = o.translateX;
o = o.translateY, A = A[this.currentButtonIndex()].getBBox(), v(D, { left: _.plotLeft + j + "px", top: o + 0.5 + "px", width: A.width + "px", height: A.height + "px" }), this.hasVisibleDropdown = !0;
}
}, n.prototype.hideDropdown = function() {
var o = this.dropdown;
o && (v(o, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
}, n.prototype.getHeight = function() {
var o = this.options, A = this.group, _ = o.y, D = o.buttonPosition.y, j = o.inputPosition.y;
return o.height ? o.height : (this.alignElements(), o = A ? A.getBBox(!0).height + 13 + _ : 0, A = Math.min(j, D), (0 > j && 0 > D || 0 < j && 0 < D) && (o += Math.abs(A)), o);
}, n.prototype.titleCollision = function(o) {
return !(o.options.title.text || o.options.subtitle.text);
}, n.prototype.update = function(o) {
var A = this.chart;
M(!0, A.options.rangeSelector, o), this.destroy(), this.init(A), this.render();
}, n.prototype.destroy = function() {
var o = this, A = o.minInput, _ = o.maxInput;
o.eventsToUnbind && (o.eventsToUnbind.forEach(function(D) {
return D();
}), o.eventsToUnbind = void 0), d(o.buttons), A && (A.onfocus = A.onblur = A.onchange = null), _ && (_.onfocus = _.onblur = _.onchange = null), x(o, function(D, j) {
D && j !== "chart" && (D instanceof H ? D.destroy() : D instanceof window.HTMLElement && P(D)), D !== n.prototype[j] && (o[j] = null);
}, this);
}, n;
}();
if (l.prototype.defaultButtons = [
{ type: "month", count: 1, text: "1m", title: "View 1 month" },
{ type: "month", count: 3, text: "3m", title: "View 3 months" },
{ type: "month", count: 6, text: "6m", title: "View 6 months" },
{ type: "ytd", text: "YTD", title: "View year to date" },
{ type: "year", count: 1, text: "1y", title: "View 1 year" },
{ type: "all", text: "All", title: "View all" }
], l.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
var n = this.range, o = n.type, A = this.max, _ = this.chart.time, D = function(f, m) {
var L = o === "year" ? "FullYear" : "Month", Y = new _.Date(f), F = _.get(L, Y);
return _.set(L, Y, F + m), F === _.get(L, Y) && _.set("Date", Y, 0), Y.getTime() - f;
};
if (b(n))
var j = A - n, T = n;
else
j = A + D(A, -n.count), this.chart && (this.chart.fixedRange = A - j);
var X = c(this.dataMin, Number.MIN_VALUE);
return b(j) || (j = X), j <= X && (j = X, typeof T > "u" && (T = D(j, n.count)), this.newMax = Math.min(j + T, this.dataMax)), b(A) || (j = void 0), j;
}, !I.RangeSelector) {
var s = [], t = function(n) {
function o() {
_ && (A = n.xAxis[0].getExtremes(), D = n.legend, T = _ && _.options.verticalAlign, b(A.min) && _.render(A.min, A.max), D.display && T === "top" && T === D.options.verticalAlign && (j = M(n.spacingBox), j.y = D.options.layout === "vertical" ? n.plotTop : j.y + _.getHeight(), D.group.placed = !1, D.align(j)));
}
var A, _ = n.rangeSelector, D, j, T;
_ && (B(s, function(X) {
return X[0] === n;
}) || s.push([n, [N(n.xAxis[0], "afterSetExtremes", function(X) {
_ && _.render(X.min, X.max);
}), N(n, "redraw", o)]]), o());
};
N(R, "afterGetContainer", function() {
this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new l(this));
}), N(R, "beforeRender", function() {
var n = this.axes, o = this.rangeSelector;
o && (b(o.deferredYTDClick) && (o.clickButton(o.deferredYTDClick), delete o.deferredYTDClick), n.forEach(function(A) {
A.updateNames(), A.setScale();
}), this.getAxisMargins(), o.render(), n = o.options.verticalAlign, o.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)));
}), N(R, "update", function(n) {
var o = n.options.rangeSelector;
n = this.rangeSelector;
var A = this.extraBottomMargin, _ = this.extraTopMargin;
o && o.enabled && !u(n) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = n = new l(this)), this.extraTopMargin = this.extraBottomMargin = !1, n && (t(this), o = o && o.verticalAlign || n.options && n.options.verticalAlign, n.options.floating || (o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== A || this.extraTopMargin !== _) && (this.isDirtyBox = !0);
}), N(R, "render", function() {
var n = this.rangeSelector;
n && !n.options.floating && (n.render(), n = n.options.verticalAlign, n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0));
}), N(R, "getMargins", function() {
var n = this.rangeSelector;
n && (n = n.getHeight(), this.extraTopMargin && (this.plotTop += n), this.extraBottomMargin && (this.marginBottom += n));
}), R.prototype.callbacks.push(t), N(R, "destroy", function() {
for (var n = 0; n < s.length; n++) {
var o = s[n];
if (o[0] === this) {
o[1].forEach(function(A) {
return A();
}), s.splice(n, 1);
break;
}
}
}), I.RangeSelector = l;
}
return l;
}), E(
h,
"Core/Chart/StockChart.js",
[h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/DefaultOptions.js"], h["Core/Series/Series.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, R, I, Z, H, $, U, W) {
function N(p, i) {
return p === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : p === "yAxis" ? { labels: { y: -2 }, opposite: a(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
}
function w(p, i) {
if (p === "xAxis") {
p = d();
var l = { type: "datetime", categories: void 0 };
return a(i.navigator && i.navigator.enabled, p.navigator.enabled, !0) && (l.startOnTick = !1, l.endOnTick = !1), l;
}
return {};
}
var v = this && this.__extends || function() {
var p = function(i, l) {
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, t) {
s.__proto__ = t;
} || function(s, t) {
for (var n in t)
t.hasOwnProperty(n) && (s[n] = t[n]);
}, p(i, l);
};
return function(i, l) {
function s() {
this.constructor = i;
}
p(i, l), i.prototype = l === null ? Object.create(l) : (s.prototype = l.prototype, new s());
};
}(), u = Z.format, d = H.getOptions;
y = W.addEvent;
var P = W.clamp, O = W.defined, B = W.extend, C = W.find, b = W.isNumber, M = W.isString, x = W.merge, a = W.pick, c = W.splat;
return W = function(p) {
function i() {
return p !== null && p.apply(this, arguments) || this;
}
return v(i, p), i.prototype.init = function(l, s) {
var t = d(), n = l.xAxis, o = l.yAxis, A = a(l.navigator && l.navigator.enabled, t.navigator.enabled, !0);
l.xAxis = l.yAxis = void 0, A = x({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: A }, scrollbar: { enabled: a(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: a(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: a(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, l, { isStock: !0 }), l.xAxis = n, l.yAxis = o, A.xAxis = c(l.xAxis || {}).map(function(_, D) {
return x(N("xAxis", _), t.xAxis, t.xAxis && t.xAxis[D], _, w("xAxis", l));
}), A.yAxis = c(l.yAxis || {}).map(function(_, D) {
return x(N("yAxis", _), t.yAxis, t.yAxis && t.yAxis[D], _);
}), p.prototype.init.call(this, A, s);
}, i.prototype.createAxis = function(l, s) {
return s.axis = x(N(l, s.axis), s.axis, w(l, this.userOptions)), p.prototype.createAxis.call(this, l, s);
}, i;
}(I), function(p) {
p.stockChart = function(i, l, s) {
return new p(i, l, s);
};
}(W || (W = {})), y($, "setOptions", function(p) {
var i;
this.chart.options.isStock && (this.is("column") || this.is("columnrange") ? i = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (i = { marker: { enabled: !1, radius: 2 } }), i && (p.plotOptions[this.type] = x(p.plotOptions[this.type], i)));
}), y(R, "autoLabelAlign", function(p) {
var i = this.chart, l = this.options;
i = i._labelPanes = i._labelPanes || {};
var s = this.options.labels;
this.chart.options.isStock && this.coll === "yAxis" && (l = l.top + "," + l.height, !i[l] && s.enabled && (s.x === 15 && (s.x = 0), typeof s.align > "u" && (s.align = "right"), i[l] = this, p.align = "right", p.preventDefault()));
}), y(R, "destroy", function() {
var p = this.chart, i = this.options && this.options.top + "," + this.options.height;
i && p._labelPanes && p._labelPanes[i] === this && delete p._labelPanes[i];
}), y(R, "getPlotLinePath", function(p) {
function i(G) {
var z = G === "xAxis" ? "yAxis" : "xAxis";
return G = l.options[z], b(G) ? [t[z][G]] : M(G) ? [t.get(G)] : s.map(function(V) {
return V[z];
});
}
var l = this, s = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = l.chart, n = t.renderer, o = l.left, A = l.top, _, D, j, T, X = [], f = [], m = p.translatedValue, L = p.value, Y = p.force;
if (t.options.isStock && p.acrossPanes !== !1 && l.coll === "xAxis" || l.coll === "yAxis") {
p.preventDefault(), f = i(l.coll);
var F = l.isXAxis ? t.yAxis : t.xAxis;
F.forEach(function(G) {
if (!O(G.options.id) || G.options.id.indexOf("navigator") === -1) {
var z = G.isXAxis ? "yAxis" : "xAxis";
z = O(G.options[z]) ? t[z][G.options[z]] : t[z][0], l === z && f.push(G);
}
});
var Q = f.length ? [] : [l.isXAxis ? t.yAxis[0] : t.xAxis[0]];
f.forEach(function(G) {
Q.indexOf(G) !== -1 || C(Q, function(z) {
return z.pos === G.pos && z.len === G.len;
}) || Q.push(G);
});
var k = a(m, l.translate(L, null, null, p.old));
b(k) && (l.horiz ? Q.forEach(function(G) {
var z;
D = G.pos, T = D + G.len, _ = j = Math.round(k + l.transB), Y !== "pass" && (_ < o || _ > o + l.width) && (Y ? _ = j = P(_, o, o + l.width) : z = !0), z || X.push(["M", _, D], ["L", j, T]);
}) : Q.forEach(function(G) {
var z;
_ = G.pos, j = _ + G.len, D = T = Math.round(A + l.height - k), Y !== "pass" && (D < A || D > A + l.height) && (Y ? D = T = P(D, A, A + l.height) : z = !0), z || X.push(["M", _, D], ["L", j, T]);
})), p.path = 0 < X.length ? n.crispPolyLine(X, p.lineWidth || 1) : null;
}
}), U.prototype.crispPolyLine = function(p, i) {
for (var l = 0; l < p.length; l += 2) {
var s = p[l], t = p[l + 1];
s[1] === t[1] && (s[1] = t[1] = Math.round(s[1]) - i % 2 / 2), s[2] === t[2] && (s[2] = t[2] = Math.round(s[2]) + i % 2 / 2);
}
return p;
}, y(R, "afterHideCrosshair", function() {
this.crossLabel && (this.crossLabel = this.crossLabel.hide());
}), y(R, "afterDrawCrosshair", function(p) {
var i, l;
if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
var s = this.chart, t = this.logarithmic, n = this.crosshair.label, o = this.horiz, A = this.opposite, _ = this.left, D = this.top, j = this.crossLabel, T = n.format, X = "", f = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, Y = p.e || this.cross && this.cross.e;
p = p.point;
var F = this.min, Q = this.max;
t && (F = t.lin2log(F), Q = t.lin2log(Q)), t = o ? "center" : A ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", j || (j = this.crossLabel = s.renderer.label("", 0, void 0, n.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (p ? p.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: n.align || t, padding: a(n.padding, 8), r: a(n.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), s.styledMode || j.attr({ fill: n.backgroundColor || p && p.series && p.series.color || "#666666", stroke: n.borderColor || "", "stroke-width": n.borderWidth || 0 }).css(B({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, n.style || {}))), o ? (t = m ? (p.plotX || 0) + _ : Y.chartX, D += A ? 0 : this.height) : (t = A ? this.width + _ : 0, D = m ? (p.plotY || 0) + D : Y.chartY), T || n.formatter || (this.dateTime && (X = "%b %d, %Y"), T = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? p.x : p.y : this.toValue(o ? Y.chartX : Y.chartY), m = p ? p.series.isPointInside(p) : b(X) && X > F && X < Q, Y = "", T ? Y = u(T, { value: X }, s) : n.formatter && b(X) && (Y = n.formatter.call(this, X)), j.attr({ text: Y, x: t, y: D, visibility: m ? "visible" : "hidden" }), n = j.getBBox(), b(j.y) && (o ? (f && !A || !f && A) && (D = j.y - n.height) : D = j.y - n.height / 2), o ? (i = _ - n.x, l = _ + this.width - n.x) : (i = this.labelAlign === "left" ? _ : 0, l = this.labelAlign === "right" ? _ + this.width : s.chartWidth), j.translateX < i && (L = i - j.translateX), j.translateX + n.width >= l && (L = -(j.translateX + n.width - l)), j.attr({ x: t + L, y: D, anchorX: o ? t : this.opposite ? 0 : s.chartWidth, anchorY: o ? this.opposite ? s.chartHeight : 0 : D + n.height / 2 });
}
}), $.prototype.forceCropping = function() {
var p = this.chart, i = this.options.dataGrouping;
return this.allowDG !== !1 && i && a(i.enabled, p.options.isStock);
}, y(I, "update", function(p) {
p = p.options, "scrollbar" in p && this.navigator && (x(!0, this.options.scrollbar, p.scrollbar), this.navigator.update({}, !1), delete p.scrollbar);
}), W;
}
), E(h, "masters/modules/stock.src.js", [
h["Core/Globals.js"],
h["Core/Axis/OrdinalAxis.js"],
h["Series/DataModifyComposition.js"],
h["Core/Scrollbar.js"],
h["Core/Chart/StockChart.js"]
], function(y, R, I, Z, H) {
y.Scrollbar = Z, y.StockChart = y.stockChart = H.stockChart, Z.compose(y.Axis), R.compose(y.Axis, y.Series, y.Chart), I.compose(y.Series, y.Axis, y.Point);
}), E(h, "masters/highstock.src.js", [h["masters/highcharts.src.js"]], function(y) {
return y.product = "Highstock", y;
}), h["masters/highstock.src.js"]._modules = h, h["masters/highstock.src.js"];
});
})(zp);
var P0 = zp.exports;
const Sn = /* @__PURE__ */ Cn(P0);
var Yp = { exports: {} };
(function(r) {
(function(g, E) {
r.exports ? (E.default = E, r.exports = g.document ? E(g) : E) : (g.Highcharts && g.Highcharts.error(16, !0), g.Highcharts = E(g));
})(typeof window < "u" ? window : Hr, function(g) {
function E(y, R, I, Z) {
y.hasOwnProperty(R) || (y[R] = Z.apply(null, I));
}
var h = {};
return E(h, "Core/Globals.js", [], function() {
var y = typeof g < "u" ? g : typeof window < "u" ? window : {}, R;
return function(I) {
I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
}, I.supportsPassiveEvents = function() {
var Z = !1;
if (!I.isMS) {
var H = Object.defineProperty({}, "passive", { get: function() {
Z = !0;
} });
I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
"testPassive",
I.noop,
H
), I.win.removeEventListener("testPassive", I.noop, H));
}
return Z;
}(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
}(R || (R = {})), R;
}), E(h, "Core/Utilities.js", [h["Core/Globals.js"]], function(y) {
function R(t, n, o, A) {
var _ = n ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = _ + ": Deprecated member");
var D = w(t), j = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof A < "u") {
var T = "";
D && (j += "?"), b(A, function(X, f) {
T += `
- ` + f + ": " + X, D && (j += encodeURI(f) + "=" + encodeURI(X));
}), j += T;
}
x(y, "displayError", { chart: o, code: t, message: j, params: A }, function() {
if (n)
throw Error(j);
p.console && R.messages.indexOf(j) === -1 && console.warn(j);
}), R.messages.push(j);
}
function I(t, n) {
var o = {};
return b(t, function(A, _) {
U(t[_], !0) && !t.nodeType && n[_] ? (A = I(t[_], n[_]), Object.keys(A).length && (o[_] = A)) : (U(t[_]) || t[_] !== n[_]) && (o[_] = t[_]);
}), o;
}
function Z(t, n) {
return parseInt(t, n || 10);
}
function H(t) {
return typeof t == "string";
}
function $(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function U(t, n) {
return !!t && typeof t == "object" && (!n || !$(t));
}
function W(t) {
return U(t) && typeof t.nodeType == "number";
}
function N(t) {
var n = t && t.constructor;
return !(!U(t, !0) || W(t) || !n || !n.name || n.name === "Object");
}
function w(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function v(t) {
return typeof t < "u" && t !== null;
}
function u(t, n, o) {
var A;
return H(n) ? v(o) ? t.setAttribute(n, o) : t && t.getAttribute && ((A = t.getAttribute(n)) || n !== "class" || (A = t.getAttribute(n + "Name"))) : b(n, function(_, D) {
v(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
}), A;
}
function d(t, n) {
var o;
t || (t = {});
for (o in n)
t[o] = n[o];
return t;
}
function P() {
for (var t = arguments, n = t.length, o = 0; o < n; o++) {
var A = t[o];
if (typeof A < "u" && A !== null)
return A;
}
}
function O(t, n) {
y.isMS && !y.svg && n && typeof n.opacity < "u" && (n.filter = "alpha(opacity=" + 100 * n.opacity + ")"), d(t.style, n);
}
function B(t, n) {
return 1e14 < t ? t : parseFloat(t.toPrecision(n || 14));
}
function C(t, n, o) {
var A = y.getStyle || C;
if (n === "width")
return n = Math.min(t.offsetWidth, t.scrollWidth), o = t.getBoundingClientRect && t.getBoundingClientRect().width, o < n && o >= n - 1 && (n = Math.floor(o)), Math.max(0, n - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
if (n === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
if (p.getComputedStyle || R(27, !0), t = p.getComputedStyle(t, void 0)) {
var _ = t.getPropertyValue(n);
P(o, n !== "opacity") && (_ = Z(_));
}
return _;
}
function b(t, n, o) {
for (var A in t)
Object.hasOwnProperty.call(t, A) && n.call(o || t[A], t[A], A, t);
}
function M(t, n, o) {
function A(T, X) {
var f = t.removeEventListener || y.removeEventListenerPolyfill;
f && f.call(t, T, X, !1);
}
function _(T) {
var X;
if (t.nodeName) {
if (n) {
var f = {};
f[n] = !0;
} else
f = T;
b(f, function(m, L) {
if (T[L])
for (X = T[L].length; X--; )
A(L, T[L][X].fn);
});
}
}
var D = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(D, "hcEvents")) {
var j = D.hcEvents;
n ? (D = j[n] || [], o ? (j[n] = D.filter(function(T) {
return o !== T.fn;
}), A(n, o)) : (_(j), j[n] = [])) : (_(j), delete D.hcEvents);
}
}
function x(t, n, o, A) {
if (o = o || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var _ = c.createEvent("Events");
_.initEvent(n, !0, !0), o = d(_, o), t.dispatchEvent ? t.dispatchEvent(o) : t.fireEvent(n, o);
} else if (t.hcEvents) {
o.target || d(o, { preventDefault: function() {
o.defaultPrevented = !0;
}, target: t, type: n }), _ = [];
for (var D = t, j = !1; D.hcEvents; )
Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[n] && (_.length && (j = !0), _.unshift.apply(_, D.hcEvents[n])), D = Object.getPrototypeOf(D);
j && _.sort(function(T, X) {
return T.order - X.order;
}), _.forEach(function(T) {
T.fn.call(t, o) === !1 && o.preventDefault();
});
}
A && !o.defaultPrevented && A.call(t, o);
}
var a = y.charts, c = y.doc, p = y.win;
(R || (R = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, n) {
return t.find(n);
} : function(t, n) {
var o, A = t.length;
for (o = 0; o < A; o++)
if (n(t[o], o))
return t[o];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, n) {
y[n] = function(o) {
var A;
return R(32, !1, void 0, (A = {}, A["Highcharts." + n] = "use Array." + t, A)), Array.prototype[t].apply(o, [].slice.call(arguments, 1));
};
});
var l, s = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", n = 0;
return function() {
return "highcharts-" + (l ? "" : t) + n++;
};
}();
return p.jQuery && (p.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[H(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[u(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, n, o, A) {
A === void 0 && (A = {});
var _ = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var D = t.addEventListener || y.addEventListenerPolyfill;
return D && D.call(t, n, o, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? n.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[n] || (_[n] = []), _[n].push({ fn: o, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[n].sort(function(j, T) {
return j.order - T.order;
}), function() {
M(t, n, o);
};
}, arrayMax: function(t) {
for (var n = t.length, o = t[0]; n--; )
t[n] > o && (o = t[n]);
return o;
}, arrayMin: function(t) {
for (var n = t.length, o = t[0]; n--; )
t[n] < o && (o = t[n]);
return o;
}, attr: u, clamp: function(t, n, o) {
return t > n ? t < o ? t : o : n;
}, cleanRecursively: I, clearTimeout: function(t) {
v(t) && clearTimeout(t);
}, correctFloat: B, createElement: function(t, n, o, A, _) {
return t = c.createElement(t), n && d(t, n), _ && O(t, { padding: "0", border: "none", margin: "0" }), o && O(t, o), A && A.appendChild(t), t;
}, css: O, defined: v, destroyObjectProperties: function(t, n) {
b(t, function(o, A) {
o && o !== n && o.destroy && o.destroy(), delete t[A];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, n) {
for (var o = t.length; o--; )
if (t[o] === n) {
t.splice(o, 1);
break;
}
}, error: R, extend: d, extendClass: function(t, n) {
var o = function() {
};
return o.prototype = new t(), d(o.prototype, n), o;
}, find: i, fireEvent: x, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, n) {
for (t = t.split("."); t.length && v(n); ) {
var o = t.shift();
if (typeof o > "u" || o === "__proto__" || (n = n[o], !v(n) || typeof n == "function" || typeof n.nodeType == "number" || n === p))
return;
}
return n;
}, getStyle: C, inArray: function(t, n, o) {
return R(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), n.indexOf(t, o);
}, isArray: $, isClass: N, isDOMElement: W, isFunction: function(t) {
return typeof t == "function";
}, isNumber: w, isObject: U, isString: H, keys: function(t) {
return R(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, n = arguments, o = {}, A = function(D, j) {
return typeof D != "object" && (D = {}), b(j, function(T, X) {
X !== "__proto__" && X !== "constructor" && (!U(T, !0) || N(T) || W(T) ? D[X] = j[X] : D[X] = A(D[X] || {}, T));
}), D;
};
n[0] === !0 && (o = n[1], n = Array.prototype.slice.call(n, 2));
var _ = n.length;
for (t = 0; t < _; t++)
o = A(o, n[t]);
return o;
}, normalizeTickInterval: function(t, n, o, A, _) {
var D = t;
o = P(o, 1);
var j = t / o;
for (n || (n = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (o === 1 ? n = n.filter(function(T) {
return T % 1 === 0;
}) : 0.1 >= o && (n = [1 / o]))), A = 0; A < n.length && (D = n[A], !(_ && D * o >= t || !_ && j <= (n[A] + (n[A + 1] || n[A])) / 2)); A++)
;
return D = B(D * o, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var n = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || n.scrollTop) - (n.clientTop || 0), left: t.left + (p.pageXOffset || n.scrollLeft) - (n.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, n, o) {
return Array((n || 2) + 1 - String(t).replace("-", "").length).join(o || "0") + t;
}, pick: P, pInt: Z, relativeLength: function(t, n, o) {
return /%$/.test(t) ? n * parseFloat(t) / 100 + (o || 0) : parseFloat(t);
}, removeEvent: M, splat: function(t) {
return $(t) ? t : [t];
}, stableSort: function(t, n) {
var o = t.length, A, _;
for (_ = 0; _ < o; _++)
t[_].safeI = _;
for (t.sort(function(D, j) {
return A = n(D, j), A === 0 ? D.safeI - j.safeI : A;
}), _ = 0; _ < o; _++)
delete t[_].safeI;
}, syncTimeout: function(t, n, o) {
return 0 < n ? setTimeout(t, n, o) : (t.call(0, o), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: s, useSerialIds: function(t) {
return l = P(t, l);
}, wrap: function(t, n, o) {
var A = t[n];
t[n] = function() {
var _ = Array.prototype.slice.call(arguments), D = arguments, j = this;
return j.proceed = function() {
A.apply(j, arguments.length ? arguments : D);
}, _.unshift(A), _ = o.apply(this, _), j.proceed = null, _;
};
} }, i;
}), E(h, "Core/Chart/ChartDefaults.js", [], function() {
return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
10,
10,
15,
10
], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
}), E(h, "Core/Color/Color.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = R.isNumber, Z = R.merge, H = R.pInt;
return R = function() {
function $(U) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = U;
var W = y.Color;
if (W && W !== $)
return new W(U);
if (!(this instanceof $))
return new $(U);
this.init(U);
}
return $.parse = function(U) {
return U ? new $(U) : $.None;
}, $.prototype.init = function(U) {
var W;
if (typeof U == "object" && typeof U.stops < "u")
this.stops = U.stops.map(function(u) {
return new $(u[1]);
});
else if (typeof U == "string") {
if (this.input = U = $.names[U.toLowerCase()] || U, U.charAt(0) === "#") {
var N = U.length, w = parseInt(U.substr(1), 16);
N === 7 ? W = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : N === 4 && (W = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
}
if (!W)
for (w = $.parsers.length; w-- && !W; ) {
var v = $.parsers[w];
(N = v.regex.exec(U)) && (W = v.parse(N));
}
}
W && (this.rgba = W);
}, $.prototype.get = function(U) {
var W = this.input, N = this.rgba;
if (typeof W == "object" && typeof this.stops < "u") {
var w = Z(W);
return w.stops = [].slice.call(w.stops), this.stops.forEach(function(v, u) {
w.stops[u] = [w.stops[u][0], v.get(U)];
}), w;
}
return N && I(N[0]) ? U === "rgb" || !U && N[3] === 1 ? "rgb(" + N[0] + "," + N[1] + "," + N[2] + ")" : U === "a" ? "" + N[3] : "rgba(" + N.join(",") + ")" : W;
}, $.prototype.brighten = function(U) {
var W = this.rgba;
if (this.stops)
this.stops.forEach(function(w) {
w.brighten(U);
});
else if (I(U) && U !== 0)
for (var N = 0; 3 > N; N++)
W[N] += H(255 * U), 0 > W[N] && (W[N] = 0), 255 < W[N] && (W[N] = 255);
return this;
}, $.prototype.setOpacity = function(U) {
return this.rgba[3] = U, this;
}, $.prototype.tweenTo = function(U, W) {
var N = this.rgba, w = U.rgba;
return !I(N[0]) || !I(w[0]) ? U.input || "none" : (U = w[3] !== 1 || N[3] !== 1, (U ? "rgba(" : "rgb(") + Math.round(w[0] + (N[0] - w[0]) * (1 - W)) + "," + Math.round(w[1] + (N[1] - w[1]) * (1 - W)) + "," + Math.round(w[2] + (N[2] - w[2]) * (1 - W)) + (U ? "," + (w[3] + (N[3] - w[3]) * (1 - W)) : "") + ")");
}, $.names = { white: "#ffffff", black: "#000000" }, $.parsers = [{
regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
parse: function(U) {
return [H(U[1]), H(U[2]), H(U[3]), parseFloat(U[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(U) {
return [H(U[1]), H(U[2]), H(U[3]), 1];
} }], $.None = new $(""), $;
}(), R;
}), E(h, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), E(h, "Core/Time.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = y.win, Z = R.defined, H = R.error, $ = R.extend, U = R.isObject, W = R.merge, N = R.objectEach, w = R.pad, v = R.pick, u = R.splat, d = R.timeUnits, P = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
return R = function() {
function B(C) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
}
return B.prototype.get = function(C, b) {
if (this.variableTimezone || this.timezoneOffset) {
var M = b.getTime(), x = M - this.getTimezoneOffset(b);
return b.setTime(x), C = b["getUTC" + C](), b.setTime(M), C;
}
return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
}, B.prototype.set = function(C, b, M) {
if (this.variableTimezone || this.timezoneOffset) {
if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + C](M);
var x = this.getTimezoneOffset(b);
return x = b.getTime() - x, b.setTime(x), b["setUTC" + C](M), C = this.getTimezoneOffset(b), x = b.getTime() + C, b.setTime(x);
}
return this.useUTC || P && C === "FullYear" ? b["setUTC" + C](M) : b["set" + C](M);
}, B.prototype.update = function(C) {
var b = v(C && C.useUTC, !0);
this.options = C = W(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
}, B.prototype.makeTime = function(C, b, M, x, a, c) {
if (this.useUTC) {
var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
p += i;
var l = this.getTimezoneOffset(p);
i !== l ? p += l - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
} else
p = new this.Date(C, b, v(M, 1), v(x, 0), v(a, 0), v(c, 0)).getTime();
return p;
}, B.prototype.timezoneOffsetFunction = function() {
var C = this, b = this.options, M = b.getTimezoneOffset, x = b.moment || I.moment;
if (!this.useUTC)
return function(a) {
return 6e4 * new Date(a.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (x)
return function(a) {
return 6e4 * -x.tz(a, b.timezone).utcOffset();
};
H(25);
}
return this.useUTC && M ? function(a) {
return 6e4 * M(a.valueOf());
} : function() {
return 6e4 * (C.timezoneOffset || 0);
};
}, B.prototype.dateFormat = function(C, b, M) {
if (!Z(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
C = v(C, "%Y-%m-%d %H:%M:%S");
var x = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), l = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, n = t && t.weekdays, o = t && t.shortWeekdays;
return a = $({ a: o ? o[p] : n[p].substr(0, 3), A: n[p], d: w(i), e: w(i, 2, " "), w: p, b: t.shortMonths[l], B: t.months[l], m: w(l + 1), o: l + 1, y: s.toString().substr(2, 2), Y: s, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(a.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), N(a, function(A, _) {
for (; C.indexOf("%" + _) !== -1; )
C = C.replace("%" + _, typeof A == "function" ? A.call(x, b) : A);
}), M ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
}, B.prototype.resolveDTLFormat = function(C) {
return U(C, !0) ? C : (C = u(C), { main: C[0], from: C[1], to: C[2] });
}, B.prototype.getTimeTicks = function(C, b, M, x) {
var a = this, c = [], p = {}, i = new a.Date(b), l = C.unitRange, s = C.count || 1, t;
if (x = v(x, 1), Z(b)) {
if (a.set(
"Milliseconds",
i,
l >= d.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
), l >= d.second && a.set("Seconds", i, l >= d.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), l >= d.minute && a.set("Minutes", i, l >= d.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), l >= d.hour && a.set("Hours", i, l >= d.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), l >= d.day && a.set("Date", i, l >= d.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), l >= d.month) {
a.set("Month", i, l >= d.year ? 0 : s * Math.floor(a.get("Month", i) / s));
var n = a.get("FullYear", i);
}
l >= d.year && a.set(
"FullYear",
i,
n - n % s
), l === d.week && (n = a.get("Day", i), a.set("Date", i, a.get("Date", i) - n + x + (n < x ? -7 : 0))), n = a.get("FullYear", i), x = a.get("Month", i);
var o = a.get("Date", i), A = a.get("Hours", i);
for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(M) || (t = M - b > 4 * d.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(M)), b = i.getTime(), i = 1; b < M; )
c.push(b), b = l === d.year ? a.makeTime(n + i * s, 0) : l === d.month ? a.makeTime(n, x + i * s) : !t || l !== d.day && l !== d.week ? t && l === d.hour && 1 < s ? a.makeTime(n, x, o, A + i * s) : b + l * s : a.makeTime(n, x, o + i * s * (l === d.day ? 1 : 7)), i++;
c.push(b), l <= d.hour && 1e4 > c.length && c.forEach(function(_) {
_ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
});
}
return c.info = $(C, { higherRanks: p, totalRange: l * s }), c;
}, B.prototype.getDateFormat = function(C, b, M, x) {
var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
for (i in d) {
if (C === d.week && +this.dateFormat("%w", b) === M && a.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (d[i] > C) {
i = p;
break;
}
if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (p = i);
}
if (i)
var l = this.resolveDTLFormat(x[i]).main;
return l;
}, B;
}(), R;
}), E(h, "Core/DefaultOptions.js", [h["Core/Chart/ChartDefaults.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Color/Palettes.js"], h["Core/Time.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $) {
R = R.parse;
var U = $.merge, W = {
colors: Z.colors,
symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
lang: {
loading: "Loading...",
months: "January February March April May June July August September October November December".split(" "),
shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
decimalPoint: ".",
numericSymbols: "kMGTPE".split(""),
resetZoom: "Reset zoom",
resetZoomTitle: "Reset zoom level 1:1",
thousandsSep: " "
},
global: {},
time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
chart: y,
title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
subtitle: { text: "", align: "center", widthAdjust: -44 },
caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
plotOptions: {},
labels: { style: { position: "absolute", color: "#333333" } },
legend: {
enabled: !0,
align: "center",
alignColumns: !0,
className: "highcharts-no-tooltip",
layout: "horizontal",
labelFormatter: function() {
return this.name;
},
borderColor: "#999999",
borderRadius: 0,
navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
itemHoverStyle: { color: "#000000" },
itemHiddenStyle: { color: "#cccccc" },
shadow: !1,
itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
squareSymbol: !0,
symbolPadding: 5,
verticalAlign: "bottom",
x: 0,
y: 0,
title: { style: { fontWeight: "bold" } }
},
loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
tooltip: {
enabled: !0,
animation: I.svg,
borderRadius: 3,
dateTimeLabelFormats: {
millisecond: "%A, %b %e, %H:%M:%S.%L",
second: "%A, %b %e, %H:%M:%S",
minute: "%A, %b %e, %H:%M",
hour: "%A, %b %e, %H:%M",
day: "%A, %b %e, %Y",
week: "Week from %A, %b %e, %Y",
month: "%B %Y",
year: "%Y"
},
footerFormat: "",
headerShape: "callout",
hideDelay: 500,
padding: 8,
shape: "callout",
shared: !1,
snap: I.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: R("#f7f7f7").setOpacity(0.85).get(),
borderWidth: 1,
shadow: !0,
stickOnContact: !1,
style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
useHTML: !1
},
credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
};
W.chart.styledMode = !1;
var N = new H(U(W.global, W.time));
return y = { defaultOptions: W, defaultTime: N, getOptions: function() {
return W;
}, setOptions: function(w) {
return U(!0, W, w), (w.time || w.global) && (I.time ? I.time.update(U(
W.global,
W.time,
w.global,
w.time
)) : I.time = N), W;
} }, y;
}), E(h, "Core/Animation/Fx.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.parse, H = R.win, $ = I.isNumber, U = I.objectEach;
return function() {
function W(N, w, v) {
this.pos = NaN, this.options = w, this.elem = N, this.prop = v;
}
return W.prototype.dSetter = function() {
var N = this.paths, w = N && N[0];
N = N && N[1];
var v = this.now || 0, u = [];
if (v !== 1 && w && N)
if (w.length === N.length && 1 > v)
for (var d = 0; d < N.length; d++) {
for (var P = w[d], O = N[d], B = [], C = 0; C < O.length; C++) {
var b = P[C], M = O[C];
$(b) && $(M) && (O[0] !== "A" || C !== 4 && C !== 5) ? B[C] = b + v * (M - b) : B[C] = M;
}
u.push(B);
}
else
u = N;
else
u = this.toD || [];
this.elem.attr("d", u, void 0, !0);
}, W.prototype.update = function() {
var N = this.elem, w = this.prop, v = this.now, u = this.options.step;
this[w + "Setter"] ? this[w + "Setter"]() : N.attr ? N.element && N.attr(w, v, null, !0) : N.style[w] = v + this.unit, u && u.call(N, v, this);
}, W.prototype.run = function(N, w, v) {
var u = this, d = u.options, P = function(C) {
return P.stopped ? !1 : u.step(C);
}, O = H.requestAnimationFrame || function(C) {
setTimeout(
C,
13
);
}, B = function() {
for (var C = 0; C < W.timers.length; C++)
W.timers[C]() || W.timers.splice(C--, 1);
W.timers.length && O(B);
};
N !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = N, this.end = w, this.unit = v, this.now = this.start, this.pos = 0, P.elem = this.elem, P.prop = this.prop, P() && W.timers.push(P) === 1 && O(B)) : (delete d.curAnim[this.prop], d.complete && Object.keys(d.curAnim).length === 0 && d.complete.call(this.elem));
}, W.prototype.step = function(N) {
var w = +/* @__PURE__ */ new Date(), v = this.options, u = this.elem, d = v.complete, P = v.duration, O = v.curAnim;
if (u.attr && !u.element)
N = !1;
else if (N || w >= P + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var B = O[this.prop] = !0;
U(O, function(C) {
C !== !0 && (B = !1);
}), B && d && d.call(u), N = !1;
} else
this.pos = v.easing((w - this.startTime) / P), this.now = this.start + (this.end - this.start) * this.pos, this.update(), N = !0;
return N;
}, W.prototype.initPath = function(N, w, v) {
function u(a, c) {
for (; a.length < x; ) {
var p = a[0], i = c[x - a.length];
i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
"L",
p[1],
p[2]
]), a.unshift(p), B && (p = a.pop(), a.push(a[a.length - 1], p));
}
}
function d(a, c) {
for (; a.length < x; )
if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), B) {
var p = a[Math.floor(a.length / C)].slice();
a.splice(a.length / 2, 0, c, p);
} else
a.push(c);
}
var P = N.startX, O = N.endX;
v = v.slice();
var B = N.isArea, C = B ? 2 : 1;
if (w = w && w.slice(), !w)
return [v, v];
if (P && O && O.length) {
for (N = 0; N < P.length; N++)
if (P[N] === O[0]) {
var b = N;
break;
} else if (P[0] === O[O.length - P.length + N]) {
b = N;
var M = !0;
break;
} else if (P[P.length - 1] === O[O.length - P.length + N]) {
b = P.length - N;
break;
}
typeof b > "u" && (w = []);
}
if (w.length && $(b)) {
var x = v.length + b * C;
M ? (u(w, v), d(v, w)) : (u(v, w), d(w, v));
}
return [w, v];
}, W.prototype.fillSetter = function() {
W.prototype.strokeSetter.apply(this, arguments);
}, W.prototype.strokeSetter = function() {
this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
}, W.timers = [], W;
}();
}), E(h, "Core/Animation/AnimationUtilities.js", [h["Core/Animation/Fx.js"], h["Core/Utilities.js"]], function(y, R) {
function I(d) {
return N(d) ? w({ duration: 500, defer: 0 }, d) : { duration: d ? 500 : 0, defer: 0 };
}
function Z(d, P) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== d || P && P !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var H = R.defined, $ = R.getStyle, U = R.isArray, W = R.isNumber, N = R.isObject, w = R.merge, v = R.objectEach, u = R.pick;
return { animate: function(d, P, O) {
var B, C = "", b, M;
if (!N(O)) {
var x = arguments;
O = { duration: x[2], easing: x[3], complete: x[4] };
}
W(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(P), v(P, function(a, c) {
Z(d, c), M = new y(d, O, c), b = void 0, c === "d" && U(P.d) ? (M.paths = M.initPath(d, d.pathArray, P.d), M.toD = P.d, B = 0, b = 1) : d.attr ? B = d.attr(c) : (B = parseFloat($(d, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), M.run(B, b, C);
});
}, animObject: I, getDeferredAnimation: function(d, P, O) {
var B = I(P), C = 0, b = 0;
return (O ? [O] : d.series).forEach(function(M) {
M = I(M.options.animation), C = P && H(P.defer) ? B.defer : Math.max(C, M.duration + M.defer), b = Math.min(B.duration, M.duration);
}), d.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
}, setAnimation: function(d, P) {
P.renderer.globalAnimation = u(d, P.options.chart.animation, !0);
}, stop: Z };
}), E(h, "Core/Renderer/HTML/AST.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R) {
var I = y.SVG_NS, Z = R.attr, H = R.createElement, $ = R.error, U = R.isFunction, W = R.isString, N = R.objectEach, w = R.splat, v = (R = y.win.trustedTypes) && U(R.createPolicy) && R.createPolicy("highcharts", { createHTML: function(P) {
return P;
} }), u = v ? v.createHTML("") : "";
try {
var d = !!new DOMParser().parseFromString(u, "text/html");
} catch {
d = !1;
}
return U = function() {
function P(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return P.filterUserAttributes = function(O) {
return N(O, function(B, C) {
var b = !0;
P.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = W(B) && P.allowedReferences.some(function(M) {
return B.indexOf(M) === 0;
})), b || ($("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
}), O;
}, P.setElementHTML = function(O, B) {
O.innerHTML = P.emptyHTML, B && new P(B).addToDOM(O);
}, P.prototype.addToDOM = function(O) {
function B(C, b) {
var M;
return w(C).forEach(function(x) {
var a = x.tagName, c = x.textContent ? y.doc.createTextNode(x.textContent) : void 0;
if (a)
if (a === "#text")
var p = c;
else if (P.allowedTags.indexOf(a) !== -1) {
a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
var i = x.attributes || {};
N(x, function(l, s) {
s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = l);
}), Z(a, P.filterUserAttributes(i)), c && a.appendChild(c), B(x.children || [], a), p = a;
} else
$("Highcharts warning: Invalid tagName " + a + " in config");
p && b.appendChild(p), M = p;
}), M;
}
return B(this.nodes, O);
}, P.prototype.parseMarkup = function(O) {
var B = [];
if (O = O.trim(), d)
O = new DOMParser().parseFromString(v ? v.createHTML(O) : O, "text/html");
else {
var C = H("div");
C.innerHTML = O, O = { body: C };
}
var b = function(M, x) {
var a = M.nodeName.toLowerCase(), c = { tagName: a };
if (a === "#text" && (c.textContent = M.textContent || ""), a = M.attributes) {
var p = {};
[].forEach.call(a, function(l) {
p[l.name] = l.value;
}), c.attributes = p;
}
if (M.childNodes.length) {
var i = [];
[].forEach.call(M.childNodes, function(l) {
b(l, i);
}), i.length && (c.children = i);
}
x.push(c);
};
return [].forEach.call(O.body.childNodes, function(M) {
return b(M, B);
}), B;
}, P.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), P.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), P.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), P.emptyHTML = u, P;
}(), U;
}), E(
h,
"Core/FormatUtilities.js",
[h["Core/DefaultOptions.js"], h["Core/Utilities.js"]],
function(y, R) {
function I(w, v, u, d) {
w = +w || 0, v = +v;
var P = Z.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, B = w.toString().split("e"), C = v;
if (v === -1)
v = Math.min(O, 20);
else if (!U(v))
v = 2;
else if (v && B[1] && 0 > B[1]) {
var b = v + +B[1];
0 <= b ? (B[0] = (+B[0]).toExponential(b).split("e")[0], v = b) : (B[0] = B[0].split(".")[0] || 0, w = 20 > v ? (B[0] * Math.pow(10, B[1])).toFixed(v) : 0, B[1] = 0);
}
b = (Math.abs(B[1] ? B[0] : w) + Math.pow(10, -Math.max(v, O) - 1)).toFixed(v), O = String(N(b));
var M = 3 < O.length ? O.length % 3 : 0;
return u = W(u, P.decimalPoint), d = W(d, P.thousandsSep), w = (0 > w ? "-" : "") + (M ? O.substr(0, M) + d : ""), w = 0 > +B[1] && !C ? "0" : w + O.substr(M).replace(/(\d{3})(?=\d)/g, "$1" + d), v && (w += u + b.slice(-v)), B[1] && +w != 0 && (w += "e" + B[1]), w;
}
var Z = y.defaultOptions, H = y.defaultTime, $ = R.getNestedProperty, U = R.isNumber, W = R.pick, N = R.pInt;
return { dateFormat: function(w, v, u) {
return H.dateFormat(w, v, u);
}, format: function(w, v, u) {
var d = "{", P = !1, O = /f$/, B = /\.([0-9])/, C = Z.lang, b = u && u.time || H;
u = u && u.numberFormatter || I;
for (var M = []; w; ) {
var x = w.indexOf(d);
if (x === -1)
break;
var a = w.slice(0, x);
if (P) {
if (a = a.split(":"), d = $(a.shift() || "", v), a.length && typeof d == "number")
if (a = a.join(":"), O.test(a)) {
var c = parseInt((a.match(B) || ["", "-1"])[1], 10);
d !== null && (d = u(d, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
} else
d = b.dateFormat(a, d);
M.push(d);
} else
M.push(a);
w = w.slice(x + 1), d = (P = !P) ? "}" : "{";
}
return M.push(w), M.join("");
}, numberFormat: I };
}
), E(h, "Core/Renderer/RendererUtilities.js", [h["Core/Utilities.js"]], function(y) {
var R = y.clamp, I = y.pick, Z = y.stableSort, H;
return function($) {
function U(W, N, w) {
var v = W, u = v.reducedLen || N, d = function(M, x) {
return (x.rank || 0) - (M.rank || 0);
}, P = function(M, x) {
return M.target - x.target;
}, O, B = !0, C = [], b = 0;
for (O = W.length; O--; )
b += W[O].size;
if (b > u) {
for (Z(W, d), b = O = 0; b <= u; )
b += W[O].size, O++;
C = W.splice(O - 1, W.length);
}
for (Z(W, P), W = W.map(function(M) {
return { size: M.size, targets: [M.target], align: I(M.align, 0.5) };
}); B; ) {
for (O = W.length; O--; )
u = W[O], d = (Math.min.apply(0, u.targets) + Math.max.apply(0, u.targets)) / 2, u.pos = R(
d - u.size * u.align,
0,
N - u.size
);
for (O = W.length, B = !1; O--; )
0 < O && W[O - 1].pos + W[O - 1].size > W[O].pos && (W[O - 1].size += W[O].size, W[O - 1].targets = W[O - 1].targets.concat(W[O].targets), W[O - 1].align = 0.5, W[O - 1].pos + W[O - 1].size > N && (W[O - 1].pos = N - W[O - 1].size), W.splice(O, 1), B = !0);
}
return v.push.apply(v, C), O = 0, W.some(function(M) {
var x = 0;
return (M.targets || []).some(function() {
return v[O].pos = M.pos + x, typeof w < "u" && Math.abs(v[O].pos - v[O].target) > w ? (v.slice(0, O + 1).forEach(function(a) {
return delete a.pos;
}), v.reducedLen = (v.reducedLen || N) - 0.1 * N, v.reducedLen > 0.1 * N && U(v, N, w), !0) : (x += v[O].size, O++, !1);
});
}), Z(v, P), v;
}
$.distribute = U;
}(H || (H = {})), H;
}), E(h, "Core/Renderer/SVG/SVGElement.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H) {
var $ = y.animate, U = y.animObject, W = y.stop, N = Z.deg2rad, w = Z.doc, v = Z.noop, u = Z.svg, d = Z.SVG_NS, P = Z.win, O = H.addEvent, B = H.attr, C = H.createElement, b = H.css, M = H.defined, x = H.erase, a = H.extend, c = H.fireEvent, p = H.isArray, i = H.isFunction, l = H.isNumber, s = H.isString, t = H.merge, n = H.objectEach, o = H.pick, A = H.pInt, _ = H.syncTimeout, D = H.uniqueKey;
return y = function() {
function j() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = d, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return j.prototype._defaultGetter = function(T) {
return T = o(this[T + "Value"], this[T], this.element ? this.element.getAttribute(T) : null, 0), /^[\-0-9\.]+$/.test(T) && (T = parseFloat(T)), T;
}, j.prototype._defaultSetter = function(T, X, f) {
f.setAttribute(X, T);
}, j.prototype.add = function(T) {
var X = this.renderer, f = this.element;
if (T && (this.parentGroup = T), this.parentInverted = T && T.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !T || T.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (T ? T.element : X.box).appendChild(f), this.onAdd && this.onAdd(), this;
}, j.prototype.addClass = function(T, X) {
var f = X ? "" : this.attr("class") || "";
return T = (T || "").split(/ /g).reduce(function(m, L) {
return f.indexOf(L) === -1 && m.push(L), m;
}, f ? [f] : []).join(" "), T !== f && this.attr("class", T), this;
}, j.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, j.prototype.align = function(T, X, f) {
var m = {}, L = this.renderer, Y = L.alignedObjects, F, Q, k;
T ? (this.alignOptions = T, this.alignByTranslate = X, (!f || s(f)) && (this.alignTo = F = f || "renderer", x(Y, this), Y.push(this), f = void 0)) : (T = this.alignOptions, X = this.alignByTranslate, F = this.alignTo), f = o(f, L[F], F === "scrollablePlotBox" ? L.plotBox : void 0, L), F = T.align;
var G = T.verticalAlign;
return L = (f.x || 0) + (T.x || 0), Y = (f.y || 0) + (T.y || 0), F === "right" ? Q = 1 : F === "center" && (Q = 2), Q && (L += (f.width - (T.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (f.height - (T.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, j.prototype.alignSetter = function(T) {
var X = { left: "start", center: "middle", right: "end" };
X[T] && (this.alignValue = T, this.element.setAttribute(
"text-anchor",
X[T]
));
}, j.prototype.animate = function(T, X, f) {
var m = this, L = U(o(X, this.renderer.globalAnimation, !0));
return X = L.defer, o(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (f && (L.complete = f), _(function() {
m.element && $(m, T, L);
}, X)) : (this.attr(T, void 0, f), n(T, function(Y, F) {
L.step && L.step.call(this, Y, { prop: F, pos: 1, elem: this });
}, this)), this;
}, j.prototype.applyTextOutline = function(T) {
var X = this.element;
T.indexOf("contrast") !== -1 && (T = T.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var f = T.split(" ");
if (T = f[f.length - 1], (f = f[0]) && f !== "none" && Z.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, f = f.replace(/(^[\d\.]+)(.*?)$/g, function(Y, F, Q) {
return 2 * Number(F) + Q;
}), this.removeTextOutline();
var m = w.createElementNS(d, "tspan");
B(m, { class: "highcharts-text-outline", fill: T, stroke: T, "stroke-width": f, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
var F = Y.cloneNode(!0);
F.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return F.removeAttribute(Q);
}), m.appendChild(F);
});
var L = w.createElementNS(d, "tspan");
L.textContent = "", ["x", "y"].forEach(function(Y) {
var F = X.getAttribute(Y);
F && L.setAttribute(Y, F);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, j.prototype.attr = function(T, X, f, m) {
var L = this.element, Y = this.symbolCustomAttribs, F, Q = this, k, G;
if (typeof T == "string" && typeof X < "u") {
var z = T;
T = {}, T[z] = X;
}
return typeof T == "string" ? Q = (this[T + "Getter"] || this._defaultGetter).call(this, T, L) : (n(T, function(V, q) {
k = !1, m || W(this, q), this.symbolName && Y.indexOf(q) !== -1 && (F || (this.symbolAttr(T), F = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, V, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, V, G));
}, this), this.afterSetters()), f && f.call(this), Q;
}, j.prototype.clip = function(T) {
return this.attr("clip-path", T ? "url(" + this.renderer.url + "#" + T.id + ")" : "none");
}, j.prototype.crisp = function(T, X) {
X = X || T.strokeWidth || 0;
var f = Math.round(X) % 2 / 2;
return T.x = Math.floor(T.x || this.x || 0) + f, T.y = Math.floor(T.y || this.y || 0) + f, T.width = Math.floor((T.width || this.width || 0) - 2 * f), T.height = Math.floor((T.height || this.height || 0) - 2 * f), M(T.strokeWidth) && (T.strokeWidth = X), T;
}, j.prototype.complexColor = function(T, X, f) {
var m = this.renderer, L, Y, F, Q, k, G, z, V, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (T.radialGradient ? Y = "radialGradient" : T.linearGradient && (Y = "linearGradient"), Y) {
if (F = T[Y], k = m.gradients, G = T.stops, q = f.radialReference, p(F) && (T[Y] = F = { x1: F[0], y1: F[1], x2: F[2], y2: F[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !M(F.gradientUnits) && (Q = F, F = t(F, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), n(F, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), n(G, function(ct) {
et.push(ct);
}), et = et.join(","), k[et])
it = k[et].attr("id");
else {
F.id = it = D();
var rt = k[et] = m.createElement(Y).attr(F).add(m.defs);
rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), V = L.get("a")) : (z = ct[1], V = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": z,
"stop-opacity": V
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", f.setAttribute(X, nt), f.gradient = et, T.toString = function() {
return nt;
};
}
});
}, j.prototype.css = function(T) {
var X = this.styles, f = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", F = !X;
if (T && T.color && (T.fill = T.color), X && n(T, function(G, z) {
X && X[z] !== G && (f[z] = G, F = !0);
}), F) {
if (X && (T = a(X, f)), T) {
if (T.width === null || T.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && T.width)
var Q = this.textWidth = A(T.width);
}
if (this.styles = T, Q && !u && this.renderer.forExport && delete T.width, m.namespaceURI === this.SVG_NS) {
var k = function(G, z) {
return "-" + z.toLowerCase();
};
n(T, function(G, z) {
L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
}), Y && B(m, "style", Y);
} else
b(m, T);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), T && T.textOutline && this.applyTextOutline(T.textOutline));
}
return this;
}, j.prototype.dashstyleSetter = function(T) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), T = T && T.toLowerCase()) {
var f = T.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
for (T = f.length; T--; )
f[T] = "" + A(f[T]) * o(X, NaN);
T = f.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", T);
}
}, j.prototype.destroy = function() {
var T = this, X = T.element || {}, f = T.renderer, m = X.ownerSVGElement, L = f.isSVG && X.nodeName === "SPAN" && T.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, W(T), T.clipPath && m) {
var Y = T.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(F) {
-1 < F.getAttribute("clip-path").indexOf(Y.element.id) && F.removeAttribute("clip-path");
}), T.clipPath = Y.destroy();
}
if (T.stops) {
for (m = 0; m < T.stops.length; m++)
T.stops[m].destroy();
T.stops.length = 0, T.stops = void 0;
}
for (T.safeRemoveChild(X), f.styledMode || T.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, T.safeRemoveChild(L.div), delete L.div, L = X;
T.alignTo && x(f.alignedObjects, T), n(T, function(F, Q) {
T[Q] && T[Q].parentGroup === T && T[Q].destroy && T[Q].destroy(), delete T[Q];
});
}, j.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(T) {
this.safeRemoveChild(T);
}, this), this.shadows = void 0;
}, j.prototype.destroyTextPath = function(T, X) {
var f = T.getElementsByTagName("text")[0];
if (f) {
if (f.removeAttribute("dx"), f.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && f.getElementsByTagName("textPath").length) {
for (T = this.textPathWrapper.element.childNodes; T.length; )
f.appendChild(T[0]);
f.removeChild(this.textPathWrapper.element);
}
} else
(T.getAttribute("dx") || T.getAttribute("dy")) && (T.removeAttribute("dx"), T.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, j.prototype.dSetter = function(T, X, f) {
p(T) && (typeof T[0] == "string" && (T = this.renderer.pathToSegments(T)), this.pathArray = T, T = T.reduce(function(m, L, Y) {
return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(T) && (T = "M 0 0"), this[X] !== T && (f.setAttribute(X, T), this[X] = T);
}, j.prototype.fadeOut = function(T) {
var X = this;
X.animate({ opacity: 0 }, { duration: o(T, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, j.prototype.fillSetter = function(T, X, f) {
typeof T == "string" ? f.setAttribute(X, T) : T && this.complexColor(T, X, f);
}, j.prototype.getBBox = function(T, X) {
var f = this.renderer, m = this.element, L = this.styles, Y = this.textStr, F = f.cache, Q = f.cacheKeys, k = m.namespaceURI === this.SVG_NS;
X = o(X, this.rotation, 0);
var G = f.styledMode ? m && j.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
if (M(Y)) {
var V = Y.toString();
V.indexOf("<") === -1 && (V = V.replace(/[0-9]/g, "0")), V += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if (V && !T && (z = F[V]), !z) {
if (k || f.forExport) {
try {
var q = this.fakeTS && function(it) {
var et = m.querySelector(".highcharts-text-outline");
et && b(et, { display: it });
};
i(q) && q("none"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!z || 0 > z.width) && (z = {
width: 0,
height: 0
});
} else
z = this.htmlGetBBox();
if (f.isSVG && (T = z.width, f = z.height, k && (z.height = f = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(f)] || f), X && (k = X * N, z.width = Math.abs(f * Math.sin(k)) + Math.abs(T * Math.cos(k)), z.height = Math.abs(f * Math.cos(k)) + Math.abs(T * Math.sin(k)))), V && (Y === "" || 0 < z.height)) {
for (; 250 < Q.length; )
delete F[Q.shift()];
F[V] || Q.push(V), F[V] = z;
}
}
return z;
}, j.prototype.getStyle = function(T) {
return P.getComputedStyle(this.element || this, "").getPropertyValue(T);
}, j.prototype.hasClass = function(T) {
return ("" + this.attr("class")).split(" ").indexOf(T) !== -1;
}, j.prototype.hide = function(T) {
return T ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, j.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, j.prototype.init = function(T, X) {
this.element = X === "span" ? C(X) : w.createElementNS(this.SVG_NS, X), this.renderer = T, c(this, "afterInit");
}, j.prototype.invert = function(T) {
return this.inverted = T, this.updateTransform(), this;
}, j.prototype.on = function(T, X) {
var f = this.onEvents;
return f[T] && f[T](), f[T] = O(
this.element,
T,
X
), this;
}, j.prototype.opacitySetter = function(T, X, f) {
this.opacity = T = Number(Number(T).toFixed(3)), f.setAttribute(X, T);
}, j.prototype.removeClass = function(T) {
return this.attr("class", ("" + this.attr("class")).replace(s(T) ? new RegExp("(^| )" + T + "( |$)") : T, " ").replace(/ +/g, " ").trim());
}, j.prototype.removeTextOutline = function() {
var T = this.element.querySelector("tspan.highcharts-text-outline");
T && this.safeRemoveChild(T);
}, j.prototype.safeRemoveChild = function(T) {
var X = T.parentNode;
X && X.removeChild(T);
}, j.prototype.setRadialReference = function(T) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = T, X && X.radAttr && X.animate(this.renderer.getRadialAttr(T, X.radAttr)), this;
}, j.prototype.setTextPath = function(T, X) {
var f = this.element, m = this.text ? this.text.element : f, L = { textAnchor: "text-anchor" }, Y = !1, F = this.textPathWrapper, Q = !F;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var k = R.filterUserAttributes(X.attributes);
if (T && X && X.enabled) {
F && F.element.parentNode === null ? (Q = !0, F = F.destroy()) : F && this.removeTextOutline.call(F.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), F || (this.textPathWrapper = F = this.renderer.createElement("textPath"), Y = !0);
var G = F.element;
if ((X = T.element.getAttribute("id")) || T.element.setAttribute("id", X = D()), Q)
for (m.setAttribute("y", 0), l(k.dx) && m.setAttribute("x", -k.dx), T = [].slice.call(m.childNodes), Q = 0; Q < T.length; Q++) {
var z = T[Q];
z.nodeType !== P.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
}
Y && F && F.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), M(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), M(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), n(k, function(V, q) {
G.setAttribute(L[q] || q, V);
}), f.removeAttribute("transform"), this.removeTextOutline.call(F), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = v;
} else
F && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(f, T), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, j.prototype.shadow = function(T, X, f) {
var m = [], L = this.element, Y = this.oldShadowOptions, F = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
if (T === !0 ? k = F : typeof T == "object" && (k = a(F, T)), k && (k && Y && n(k, function(it, et) {
it !== Y[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
this.destroyShadows();
else if (!this.shadows) {
var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
for (F = 1; F <= k.width; F++) {
var V = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * F;
B(V, { stroke: T.color || "#000000", "stroke-opacity": G * F, "stroke-width": q, transform: z, fill: "none" }), V.setAttribute("class", (V.getAttribute("class") || "") + " highcharts-shadow"), f && (B(V, "height", Math.max(B(V, "height") - q, 0)), V.cutHeight = q), X ? X.element.appendChild(V) : L.parentNode && L.parentNode.insertBefore(V, L), m.push(V);
}
this.shadows = m;
}
return this;
}, j.prototype.show = function(T) {
return this.attr({ visibility: T ? "inherit" : "visible" });
}, j.prototype.strokeSetter = function(T, X, f) {
this[X] = T, this.stroke && this["stroke-width"] ? (j.prototype.fillSetter.call(this, this.stroke, "stroke", f), f.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && T === 0 && this.hasStroke ? (f.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (f.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
}, j.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var T = this.getStyle("stroke-width"), X = 0;
if (T.indexOf("px") === T.length - 2)
X = A(T);
else if (T !== "") {
var f = w.createElementNS(d, "rect");
B(f, { width: T, "stroke-width": 0 }), this.element.parentNode.appendChild(f), X = f.getBBox().width, f.parentNode.removeChild(f);
}
return X;
}, j.prototype.symbolAttr = function(T) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(f) {
X[f] = o(T[f], X[f]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, j.prototype.textSetter = function(T) {
T !== this.textStr && (delete this.textPxLength, this.textStr = T, this.added && this.renderer.buildText(this));
}, j.prototype.titleSetter = function(T) {
var X = this.element, f = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(f, X.firstChild) : X.appendChild(f), f.textContent = String(o(T, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, j.prototype.toFront = function() {
var T = this.element;
return T.parentNode.appendChild(T), this;
}, j.prototype.translate = function(T, X) {
return this.attr({ translateX: T, translateY: X });
}, j.prototype.updateShadows = function(T, X, f) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
f.call(m[L], T === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : T === "d" ? this.d : X, T, m[L]);
}, j.prototype.updateTransform = function() {
var T = this.scaleX, X = this.scaleY, f = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, F = this.translateX || 0, Q = this.translateY || 0;
f && (F += this.width, Q += this.height), F = ["translate(" + F + "," + Q + ")"], M(L) && F.push("matrix(" + L.join(",") + ")"), f ? F.push("rotate(90) scale(-1,1)") : m && F.push("rotate(" + m + " " + o(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + o(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (M(T) || M(X)) && F.push("scale(" + o(T, 1) + " " + o(X, 1) + ")"), F.length && Y.setAttribute("transform", F.join(" "));
}, j.prototype.visibilitySetter = function(T, X, f) {
T === "inherit" ? f.removeAttribute(X) : this[X] !== T && f.setAttribute(
X,
T
), this[X] = T;
}, j.prototype.xGetter = function(T) {
return this.element.nodeName === "circle" && (T === "x" ? T = "cx" : T === "y" && (T = "cy")), this._defaultGetter(T);
}, j.prototype.zIndexSetter = function(T, X) {
var f = this.renderer, m = this.parentGroup, L = (m || f).element || f.box, Y = this.element;
f = L === f.box;
var F = !1, Q = this.added, k;
if (M(T) ? (Y.setAttribute("data-z-index", T), T = +T, this[X] === T && (Q = !1)) : M(this[X]) && Y.removeAttribute("data-z-index"), this[X] = T, Q) {
for ((T = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !F; k--) {
m = X[k], Q = m.getAttribute("data-z-index");
var G = !M(Q);
m !== Y && (0 > T && G && !f && !k ? (L.insertBefore(Y, X[k]), F = !0) : (A(Q) <= T || G && (!M(T) || 0 <= T)) && (L.insertBefore(Y, X[k + 1] || null), F = !0));
}
F || (L.insertBefore(Y, X[f ? 3 : 0] || null), F = !0);
}
return F;
}, j;
}(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(j, T) {
this[T] = j, this.doTransform = !0;
}, y;
}), E(h, "Core/Renderer/RendererRegistry.js", [h["Core/Globals.js"]], function(y) {
var R;
return function(I) {
I.rendererTypes = {};
var Z;
I.getRendererType = function(H) {
return H === void 0 && (H = Z), I.rendererTypes[H] || I.rendererTypes[Z];
}, I.registerRendererType = function(H, $, U) {
I.rendererTypes[H] = $, (!Z || U) && (Z = H, y.Renderer = $);
};
}(R || (R = {})), R;
}), E(
h,
"Core/Renderer/SVG/SVGLabel.js",
[h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]],
function(y, R) {
var I = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), Z = R.defined, H = R.extend, $ = R.isNumber, U = R.merge, W = R.pick, N = R.removeEvent;
return function(w) {
function v(u, d, P, O, B, C, b, M, x, a) {
var c = w.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(u, "g"), c.textStr = d, c.x = P, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = x, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = u.text(void 0, 0, 0, M).attr({ zIndex: 1 });
var p;
return typeof B == "string" && ((p = /^url\((.*?)\)$/.test(B)) || c.renderer.symbols[B]) && (c.symbolKey = B), c.bBox = v.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = u.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return I(v, w), v.prototype.alignSetter = function(u) {
u = { left: 0, center: 0.5, right: 1 }[u], u !== this.alignFactor && (this.alignFactor = u, this.bBox && $(this.xSetting) && this.attr({ x: this.xSetting }));
}, v.prototype.anchorXSetter = function(u, d) {
this.anchorX = u, this.boxAttr(d, Math.round(u) - this.getCrispAdjust() - this.xSetting);
}, v.prototype.anchorYSetter = function(u, d) {
this.anchorY = u, this.boxAttr(d, u - this.ySetting);
}, v.prototype.boxAttr = function(u, d) {
this.box ? this.box.attr(u, d) : this.deferredAttr[u] = d;
}, v.prototype.css = function(u) {
if (u) {
var d = {};
u = U(u), v.textProps.forEach(function(O) {
typeof u[O] < "u" && (d[O] = u[O], delete u[O]);
}), this.text.css(d);
var P = "width" in d;
"fontSize" in d || "fontWeight" in d ? this.updateTextPadding() : P && this.updateBoxSize();
}
return y.prototype.css.call(this, u);
}, v.prototype.destroy = function() {
N(this.element, "mouseenter"), N(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, v.prototype.fillSetter = function(u, d) {
u && (this.needsBox = !0), this.fill = u, this.boxAttr(d, u);
}, v.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var u = this.padding, d = W(this.paddingLeft, u);
return { width: this.width, height: this.height, x: this.bBox.x - d, y: this.bBox.y - u };
}, v.prototype.getCrispAdjust = function() {
return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
this["stroke-width"],
10
) : 0) % 2 / 2;
}, v.prototype.heightSetter = function(u) {
this.heightSetting = u;
}, v.prototype.onAdd = function() {
var u = this.textStr;
this.text.add(this), this.attr({ text: Z(u) ? u : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, v.prototype.paddingSetter = function(u, d) {
$(u) ? u !== this[d] && (this[d] = u, this.updateTextPadding()) : this[d] = void 0;
}, v.prototype.rSetter = function(u, d) {
this.boxAttr(d, u);
}, v.prototype.shadow = function(u) {
return u && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(u)), this;
}, v.prototype.strokeSetter = function(u, d) {
this.stroke = u, this.boxAttr(d, u);
}, v.prototype["stroke-widthSetter"] = function(u, d) {
u && (this.needsBox = !0), this["stroke-width"] = u, this.boxAttr(d, u);
}, v.prototype["text-alignSetter"] = function(u) {
this.textAlign = u;
}, v.prototype.textSetter = function(u) {
typeof u < "u" && this.text.attr({ text: u }), this.updateTextPadding();
}, v.prototype.updateBoxSize = function() {
var u = this.text.element.style, d = {}, P = this.padding, O = this.bBox = $(this.widthSetting) && $(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? v.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * P, u = this.renderer.fontMetrics(u && u.fontSize, this.text), this.baselineOffset = P + Math.min((this.text.firstLineMetrics || u).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - u.h) / 2), this.needsBox && (this.box || (P = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), P.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), P.add(this)), P = this.getCrispAdjust(), d.x = P, d.y = (this.baseline ? -this.baselineOffset : 0) + P, d.width = Math.round(this.width), d.height = Math.round(this.height), this.box.attr(H(d, this.deferredAttr)), this.deferredAttr = {});
}, v.prototype.updateTextPadding = function() {
var u = this.text;
this.updateBoxSize();
var d = this.baseline ? 0 : this.baselineOffset, P = W(this.paddingLeft, this.padding);
Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (P += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (P !== u.x || d !== u.y) && (u.attr("x", P), u.hasBoxWidthChanged && (this.bBox = u.getBBox(!0)), typeof d < "u" && u.attr("y", d)), u.x = P, u.y = d;
}, v.prototype.widthSetter = function(u) {
this.widthSetting = $(u) ? u : void 0;
}, v.prototype.getPaddedWidth = function() {
var u = this.padding, d = W(this.paddingLeft, u);
return u = W(this.paddingRight, u), (this.widthSetting || this.bBox.width || 0) + d + u;
}, v.prototype.xSetter = function(u) {
this.x = u, this.alignFactor && (u -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(u), this.attr("translateX", this.xSetting);
}, v.prototype.ySetter = function(u) {
this.ySetting = this.y = Math.round(u), this.attr("translateY", this.ySetting);
}, v.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, v.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), v;
}(y);
}
), E(
h,
"Core/Renderer/SVG/Symbols.js",
[h["Core/Utilities.js"]],
function(y) {
function R(W, N, w, v, u) {
var d = [];
if (u) {
var P = u.start || 0, O = U(u.r, w);
w = U(u.r, v || w);
var B = (u.end || 0) - 1e-3;
v = u.innerR;
var C = U(u.open, 1e-3 > Math.abs((u.end || 0) - P - 2 * Math.PI)), b = Math.cos(P), M = Math.sin(P), x = Math.cos(B), a = Math.sin(B);
P = U(u.longArc, 1e-3 > B - P - Math.PI ? 0 : 1), d.push(["M", W + O * b, N + w * M], ["A", O, w, 0, P, U(u.clockwise, 1), W + O * x, N + w * a]), H(v) && d.push(C ? ["M", W + v * x, N + v * a] : ["L", W + v * x, N + v * a], ["A", v, v, 0, P, H(u.clockwise) ? 1 - u.clockwise : 0, W + v * b, N + v * M]), C || d.push(["Z"]);
}
return d;
}
function I(W, N, w, v, u) {
return u && u.r ? Z(W, N, w, v, u) : [["M", W, N], ["L", W + w, N], ["L", W + w, N + v], ["L", W, N + v], ["Z"]];
}
function Z(W, N, w, v, u) {
return u = u && u.r || 0, [["M", W + u, N], ["L", W + w - u, N], ["C", W + w, N, W + w, N, W + w, N + u], ["L", W + w, N + v - u], ["C", W + w, N + v, W + w, N + v, W + w - u, N + v], ["L", W + u, N + v], ["C", W, N + v, W, N + v, W, N + v - u], ["L", W, N + u], ["C", W, N, W, N, W + u, N]];
}
var H = y.defined, $ = y.isNumber, U = y.pick;
return { arc: R, callout: function(W, N, w, v, u) {
var d = Math.min(u && u.r || 0, w, v), P = d + 6, O = u && u.anchorX;
u = u && u.anchorY || 0;
var B = Z(W, N, w, v, { r: d });
return $(O) && (W + O >= w ? u > N + P && u < N + v - P ? B.splice(3, 1, ["L", W + w, u - 6], ["L", W + w + 6, u], ["L", W + w, u + 6], ["L", W + w, N + v - d]) : B.splice(3, 1, ["L", W + w, v / 2], ["L", O, u], ["L", W + w, v / 2], ["L", W + w, N + v - d]) : 0 >= W + O ? u > N + P && u < N + v - P ? B.splice(7, 1, ["L", W, u + 6], ["L", W - 6, u], ["L", W, u - 6], ["L", W, N + d]) : B.splice(7, 1, ["L", W, v / 2], ["L", O, u], ["L", W, v / 2], ["L", W, N + d]) : u && u > v && O > W + P && O < W + w - P ? B.splice(5, 1, ["L", O + 6, N + v], ["L", O, N + v + 6], ["L", O - 6, N + v], ["L", W + d, N + v]) : u && 0 > u && O > W + P && O < W + w - P && B.splice(1, 1, ["L", O - 6, N], ["L", O, N - 6], ["L", O + 6, N], ["L", w - d, N])), B;
}, circle: function(W, N, w, v) {
return R(W + w / 2, N + v / 2, w / 2, v / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(W, N, w, v) {
return [["M", W + w / 2, N], ["L", W + w, N + v / 2], ["L", W + w / 2, N + v], ["L", W, N + v / 2], ["Z"]];
}, rect: I, roundedRect: Z, square: I, triangle: function(W, N, w, v) {
return [["M", W + w / 2, N], ["L", W + w, N + v], ["L", W, N + v], ["Z"]];
}, "triangle-down": function(W, N, w, v) {
return [["M", W, N], ["L", W + w, N], ["L", W + w / 2, N + v], ["Z"]];
} };
}
), E(h, "Core/Renderer/SVG/TextBuilder.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = R.doc, H = R.SVG_NS, $ = R.win, U = I.attr, W = I.isString, N = I.objectEach, w = I.pick;
return function() {
function v(u) {
var d = u.styles;
this.renderer = u.renderer, this.svgElement = u, this.width = u.textWidth, this.textLineHeight = d && d.lineHeight, this.textOutline = d && d.textOutline, this.ellipsis = !(!d || d.textOverflow !== "ellipsis"), this.noWrap = !(!d || d.whiteSpace !== "nowrap"), this.fontSize = d && d.fontSize;
}
return v.prototype.buildSVG = function() {
var u = this.svgElement, d = u.element, P = u.renderer, O = w(u.textStr, "").toString(), B = O.indexOf("<") !== -1, C = d.childNodes;
P = this.width && !u.added && P.box;
var b = //g, M = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (M !== u.textCache) {
for (u.textCache = M, delete u.actualWidth, M = C.length; M--; )
d.removeChild(C[M]);
B || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (P && P.appendChild(d), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(u.element), this.modifyDOM(), this.ellipsis && (d.textContent || "").indexOf("…") !== -1 && u.attr(
"title",
this.unescapeEntities(u.textStr || "", ["<", ">"])
), P && P.removeChild(d)) : d.appendChild(Z.createTextNode(this.unescapeEntities(O))), W(this.textOutline) && u.applyTextOutline && u.applyTextOutline(this.textOutline);
}
}, v.prototype.modifyDOM = function() {
var u = this, d = this.svgElement, P = U(d.element, "x");
d.firstLineMetrics = void 0;
for (var O; (O = d.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
d.element.removeChild(O);
[].forEach.call(d.element.querySelectorAll("tspan.highcharts-br"), function(M, x) {
M.nextSibling && M.previousSibling && (x === 0 && M.previousSibling.nodeType === 1 && (d.firstLineMetrics = d.renderer.fontMetrics(void 0, M.previousSibling)), U(M, { dy: u.getLineHeight(M.nextSibling), x: P }));
});
var B = this.width || 0;
if (B) {
var C = function(M, x) {
var a = M.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !u.noWrap && (1 < c.length || 1 < d.element.childNodes.length), i = u.getLineHeight(x), l = 0, s = d.actualWidth;
if (u.ellipsis)
a && u.truncate(M, a, void 0, 0, Math.max(0, B - parseInt(u.fontSize || 12, 10)), function(t, n) {
return t.substring(
0,
n
) + "…";
});
else if (p) {
for (a = [], p = []; x.firstChild && x.firstChild !== M; )
p.push(x.firstChild), x.removeChild(x.firstChild);
for (; c.length; )
c.length && !u.noWrap && 0 < l && (a.push(M.textContent || ""), M.textContent = c.join(" ").replace(/- /g, "-")), u.truncate(M, void 0, c, l === 0 && s || 0, B, function(t, n) {
return c.slice(0, n).join(" ").replace(/- /g, "-");
}), s = d.actualWidth, l++;
p.forEach(function(t) {
x.insertBefore(t, M);
}), a.forEach(function(t) {
x.insertBefore(Z.createTextNode(t), M), t = Z.createElementNS(H, "tspan"), t.textContent = "", U(t, { dy: i, x: P }), x.insertBefore(t, M);
});
}
}, b = function(M) {
[].slice.call(M.childNodes).forEach(function(x) {
x.nodeType === $.Node.TEXT_NODE ? C(x, M) : (x.className.baseVal.indexOf("highcharts-br") !== -1 && (d.actualWidth = 0), b(x));
});
};
b(d.element);
}
}, v.prototype.getLineHeight = function(u) {
var d;
return u = u.nodeType === $.Node.TEXT_NODE ? u.parentElement : u, this.renderer.styledMode || (d = u && /(px|em)$/.test(u.style.fontSize) ? u.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(d, u || this.svgElement.element).h;
}, v.prototype.modifyTree = function(u) {
var d = this, P = function(O, B) {
var C = O.attributes;
C = C === void 0 ? {} : C;
var b = O.children, M = O.tagName, x = d.renderer.styledMode;
M === "b" || M === "strong" ? x ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (M === "i" || M === "em") && (x ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), W(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), M === "br" ? (C.class = "highcharts-br", O.textContent = "", (B = u[B + 1]) && B.textContent && (B.textContent = B.textContent.replace(/^ +/gm, ""))) : M === "a" && b && b.some(function(a) {
return a.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), M !== "#text" && M !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
return a.tagName !== "#text";
}).forEach(P);
};
u.forEach(P);
}, v.prototype.truncate = function(u, d, P, O, B, C) {
var b = this.svgElement, M = b.renderer, x = b.rotation, a = [], c = P ? 1 : 0, p = (d || P || "").length, i = p, l, s = function(n, o) {
o = o || n;
var A = u.parentNode;
if (A && typeof a[o] > "u")
if (A.getSubStringLength)
try {
a[o] = O + A.getSubStringLength(0, P ? o + 1 : o);
} catch {
}
else
M.getSpanWidth && (u.textContent = C(d || P, n), a[o] = O + M.getSpanWidth(b, u));
return a[o];
};
b.rotation = 0;
var t = s(u.textContent.length);
if (O + t > B) {
for (; c <= p; )
i = Math.ceil((c + p) / 2), P && (l = C(P, i)), t = s(i, l && l.length - 1), c === p ? c = p + 1 : t > B ? p = i - 1 : c = i;
p === 0 ? u.textContent = "" : d && p === d.length - 1 || (u.textContent = l || C(d || P, i));
}
P && P.splice(0, i), b.actualWidth = t, b.rotation = x;
}, v.prototype.unescapeEntities = function(u, d) {
return N(this.renderer.escapes, function(P, O) {
d && d.indexOf(P) !== -1 || (u = u.toString().replace(new RegExp(P, "g"), O));
}), u;
}, v;
}();
}), E(h, "Core/Renderer/SVG/SVGRenderer.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGLabel.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Renderer/SVG/TextBuilder.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U, W, N) {
var w = I.charts, v = I.deg2rad, u = I.doc, d = I.isFirefox, P = I.isMS, O = I.isWebKit, B = I.noop, C = I.SVG_NS, b = I.symbolSizes, M = I.win, x = N.addEvent, a = N.attr, c = N.createElement, p = N.css, i = N.defined, l = N.destroyObjectProperties, s = N.extend, t = N.isArray, n = N.isNumber, o = N.isObject, A = N.isString, _ = N.merge, D = N.pick, j = N.pInt, T = N.uniqueKey, X;
return I = function() {
function f(m, L, Y, F, Q, k, G) {
this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, Y, F, Q, k, G);
}
return f.prototype.init = function(m, L, Y, F, Q, k, G) {
var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), V = z.element;
G || z.css(this.getStyle(F)), m.appendChild(V), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a(V, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = V, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
var q;
d && m.getBoundingClientRect && (L = function() {
p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = x(M, "resize", L));
}, f.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, f.prototype.getReferenceURL = function() {
if ((d || O) && u.getElementsByTagName("base").length) {
if (!i(X)) {
var m = T();
m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(u.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = u.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", u.body.removeChild(m);
}
if (X)
return M.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, f.prototype.getStyle = function(m) {
return this.style = s({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
}, f.prototype.setStyle = function(m) {
this.boxWrapper.css(this.getStyle(m));
}, f.prototype.isHidden = function() {
return !this.boxWrapper.getBBox().width;
}, f.prototype.destroy = function() {
var m = this.defs;
return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), l(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
}, f.prototype.createElement = function(m) {
var L = new this.Element();
return L.init(this, m), L;
}, f.prototype.getRadialAttr = function(m, L) {
return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
}, f.prototype.buildText = function(m) {
new W(m).buildSVG();
}, f.prototype.getContrast = function(m) {
return m = R.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
}, f.prototype.button = function(m, L, Y, F, Q, k, G, z, V, q) {
var it = this.label(m, L, Y, V, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
var gt = k.style;
delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
var dt = G.style;
delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
var lt = z.style;
delete z.style;
}
return x(it.element, P ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), x(it.element, P ? "mouseout" : "mouseleave", function() {
nt !== 3 && it.setState(nt);
}), it.setState = function(at) {
at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, k, G, z][at || 0]).css([ct, gt, dt, lt][at || 0]);
}, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && F.call(it, at);
});
}, f.prototype.crispLine = function(m, L, Y) {
Y === void 0 && (Y = "round");
var F = m[0], Q = m[1];
return i(F[1]) && F[1] === Q[1] && (F[1] = Q[1] = Math[Y](F[1]) - L % 2 / 2), i(F[2]) && F[2] === Q[2] && (F[2] = Q[2] = Math[Y](F[2]) + L % 2 / 2), m;
}, f.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : o(m) && s(L, m), this.createElement("path").attr(L);
}, f.prototype.circle = function(m, L, Y) {
return m = o(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(F, Q, k) {
k.setAttribute("c" + Q, F);
}, L.attr(m);
}, f.prototype.arc = function(m, L, Y, F, Q, k) {
return o(m) ? (F = m, L = F.y, Y = F.r, m = F.x) : F = { innerR: F, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, F), m.r = Y, m;
}, f.prototype.rect = function(m, L, Y, F, Q, k) {
Q = o(m) ? m.r : Q;
var G = this.createElement("rect");
return m = o(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(F, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, V, q) {
G.r = z, a(q, { rx: z, ry: z });
}, G.rGetter = function() {
return G.r || 0;
}, G.attr(m);
}, f.prototype.setSize = function(m, L, Y) {
this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
}, duration: D(
Y,
!0
) ? void 0 : 0 }), this.alignElements();
}, f.prototype.g = function(m) {
var L = this.createElement("g");
return m ? L.attr({ class: "highcharts-" + m }) : L;
}, f.prototype.image = function(m, L, Y, F, Q, k) {
var G = { preserveAspectRatio: "none" }, z = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
n(L) && (G.x = L), n(Y) && (G.y = Y), n(F) && (G.width = F), n(Q) && (G.height = Q);
var V = this.createElement("image").attr(G);
return L = function(q) {
z(V.element, m), k.call(V, q);
}, k ? (z(
V.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), Y = new M.Image(), x(Y, "load", L), Y.src = m, Y.complete && L({})) : z(V.element, m), V;
}, f.prototype.symbol = function(m, L, Y, F, Q, k) {
var G = this, z = /^url\((.*?)\)$/, V = z.test(m), q = !V && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
if (it) {
typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(Y || 0), F || 0, Q || 0, k));
var nt = this.path(et);
G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: F, height: Q }), k && s(nt, k);
} else if (V) {
var rt = m.match(z)[1], ct = nt = this.image(rt);
ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(lt, at) {
var J = this["img" + at];
this[at] = lt, i(J) && (k && k.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (lt = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: lt } : { translateY: lt })));
};
}), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = w[G.chartIndex];
this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), u.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, f.prototype.clipRect = function(m, L, Y, F) {
var Q = T() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, Y, F, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
}, f.prototype.text = function(m, L, Y, F) {
var Q = {};
return F && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!F || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
for (var V = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < V.length; it++)
et = V[it], et.getAttribute(G) === q && et.setAttribute(G, k);
z.setAttribute(G, k);
}), m);
}, f.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !M.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && H.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? j(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
}, f.prototype.rotCorr = function(m, L, Y) {
var F = m;
return L && Y && (F = Math.max(F * Math.cos(L * v), 4)), { x: -m / 3 * Math.sin(L * v), y: F };
}, f.prototype.pathToSegments = function(m) {
for (var L = [], Y = [], F = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
A(Y[0]) && n(m[Q]) && Y.length === F[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
return L.push(Y.slice(0)), L;
}, f.prototype.label = function(m, L, Y, F, Q, k, G, z, V) {
return new $(this, m, L, Y, F, Q, k, G, z, V);
}, f.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, f;
}(), s(I.prototype, { Element: H, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: U, draw: B }), Z.registerRendererType("svg", I, !0), I;
}), E(h, "Core/Renderer/HTML/HTMLElement.js", [h["Core/Globals.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var P = function(O, B) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var M in b)
b.hasOwnProperty(M) && (C[M] = b[M]);
}, P(O, B);
};
return function(O, B) {
function C() {
this.constructor = O;
}
P(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
};
}(), H = y.isFirefox, $ = y.isMS, U = y.isWebKit, W = y.win, N = I.css, w = I.defined, v = I.extend, u = I.pick, d = I.pInt;
return function(P) {
function O() {
return P !== null && P.apply(this, arguments) || this;
}
return Z(O, P), O.compose = function(B) {
if (O.composedClasses.indexOf(B) === -1) {
O.composedClasses.push(B);
var C = O.prototype, b = B.prototype;
b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
}
return B;
}, O.prototype.getSpanCorrection = function(B, C, b) {
this.xCorr = -B * b, this.yCorr = -C;
}, O.prototype.htmlCss = function(B) {
var C = this.element.tagName === "SPAN" && B && "width" in B, b = u(C && B.width, void 0);
if (C) {
delete B.width, this.textWidth = b;
var M = !0;
}
return B && B.textOverflow === "ellipsis" && (B.whiteSpace = "nowrap", B.overflow = "hidden"), this.styles = v(this.styles, B), N(this.element, B), M && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var B = this.element;
return { x: B.offsetLeft, y: B.offsetTop, width: B.offsetWidth, height: B.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var B = this.renderer, C = this.element, b = this.translateX || 0, M = this.translateY || 0, x = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, N(C, { marginLeft: b, marginTop: M }), !B.styledMode && this.shadows && this.shadows.forEach(function(A) {
N(A, { marginLeft: b + 1, marginTop: M + 1 });
}), this.inverted && [].forEach.call(C.childNodes, function(A) {
B.invertChild(A, C);
}), C.tagName === "SPAN") {
var l = this.rotation, s = this.textWidth && d(this.textWidth), t = [l, c, C.innerHTML, this.textWidth, this.textAlign].join(), n = void 0;
if (n = !1, s !== this.oldTextWidth) {
if (this.textPxLength)
var o = this.textPxLength;
else
N(C, { width: "", whiteSpace: i || "nowrap" }), o = C.offsetWidth;
(s > this.oldTextWidth || o > s) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (N(C, { width: o > s || l ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, n = !0);
}
this.hasBoxWidthChanged = n, t !== this.cTT && (n = B.fontMetrics(C.style.fontSize, C).b, !w(l) || l === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(l, p, n), this.getSpanCorrection(!w(l) && this.textPxLength || C.offsetWidth, n, p, l, c)), N(C, { left: x + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = l, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(B, C, b) {
var M = {}, x = $ && !/Edge/.test(W.navigator.userAgent) ? "-ms-transform" : U ? "-webkit-transform" : H ? "MozTransform" : W.opera ? "-o-transform" : void 0;
x && (M[x] = M.transform = "rotate(" + B + "deg)", M[x + (H ? "Origin" : "-origin")] = M.transformOrigin = 100 * C + "% " + b + "px", N(this.element, M));
}, O.composedClasses = [], O;
}(R);
}), E(
h,
"Core/Renderer/HTML/HTMLRenderer.js",
[h["Core/Renderer/HTML/AST.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, R, I, Z) {
var H = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), $ = Z.attr, U = Z.createElement, W = Z.extend, N = Z.pick;
return function(w) {
function v() {
return w !== null && w.apply(this, arguments) || this;
}
return H(v, w), v.compose = function(u) {
return v.composedClasses.indexOf(u) === -1 && (v.composedClasses.push(u), u.prototype.html = v.prototype.html), u;
}, v.prototype.html = function(u, d, P) {
var O = this.createElement("span"), B = O.element, C = O.renderer, b = C.isSVG, M = function(x, a) {
["opacity", "visibility"].forEach(function(c) {
x[c + "Setter"] = function(p, i, l) {
var s = x.div ? x.div.style : a;
R.prototype[c + "Setter"].call(this, p, i, l), s && (s[i] = p);
};
}), x.addedSetters = !0;
};
return O.textSetter = function(x) {
x !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, N(x, "")), this.textStr = x, O.doTransform = !0);
}, b && M(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(x, a) {
a === "align" ? O.alignValue = O.textAlign = x : O[a] = x, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: u, x: Math.round(d), y: Math.round(P) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), B.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(x) {
var a = C.box.parentNode, c = [];
if (this.parentGroup = x) {
var p = x.div;
if (!p) {
for (; x; )
c.push(x), x = x.parentGroup;
c.reverse().forEach(function(i) {
function l(o, A) {
i[A] = o, A === "translateX" ? n.left = o + "px" : n.top = o + "px", i.doTransform = !0;
}
var s = $(i.element, "class"), t = i.styles || {};
p = i.div = i.div || U("div", s ? { className: s } : void 0, {
position: "absolute",
left: (i.translateX || 0) + "px",
top: (i.translateY || 0) + "px",
display: i.display,
opacity: i.opacity,
cursor: t.cursor,
pointerEvents: t.pointerEvents,
visibility: i.visibility
}, p || a);
var n = p.style;
W(i, { classSetter: function(o) {
return function(A) {
this.element.setAttribute("class", A), o.className = A;
};
}(p), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: l, translateYSetter: l }), i.addedSetters || M(i);
});
}
} else
p = a;
return p.appendChild(B), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, v.composedClasses = [], v;
}(I);
}
), E(h, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(R) {
R.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
autoRotation: void 0,
autoRotationLimit: 80,
distance: void 0,
enabled: !0,
indentation: 10,
overflow: "justify",
padding: 5,
reserveSpace: void 0,
rotation: void 0,
staggerLines: 0,
step: 0,
useHTML: !1,
x: 0,
zIndex: 7,
style: { color: "#666666", cursor: "default", fontSize: "11px" }
}, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
align: "middle",
rotation: 0,
useHTML: !1,
x: 0,
y: 0,
style: { color: "#666666" }
}, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, R.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
animation: {},
allowOverlap: !1,
enabled: !1,
crop: !0,
overflow: "justify",
formatter: function() {
var I = this.axis.chart.numberFormatter;
return I(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, R.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, R.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, R.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, R.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), E(h, "Core/Foundation.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.isFunction, Z = y.objectEach, H = y.removeEvent, $;
return function(U) {
U.registerEventOptions = function(W, N) {
W.eventOptions = W.eventOptions || {}, Z(N.events, function(w, v) {
W.eventOptions[v] !== w && (W.eventOptions[v] && (H(W, v, W.eventOptions[v]), delete W.eventOptions[v]), I(w) && (W.eventOptions[v] = w, R(W, v, w)));
});
};
}($ || ($ = {})), $;
}), E(
h,
"Core/Axis/Tick.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Utilities.js"]],
function(y, R, I) {
var Z = R.deg2rad, H = I.clamp, $ = I.correctFloat, U = I.defined, W = I.destroyObjectProperties, N = I.extend, w = I.fireEvent, v = I.isNumber, u = I.merge, d = I.objectEach, P = I.pick;
return R = function() {
function O(B, C, b, M, x) {
this.isNewLabel = this.isNew = !0, this.axis = B, this.pos = C, this.type = b || "", this.parameters = x || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || M || this.addLabel();
}
return O.prototype.addLabel = function() {
var B = this, C = B.axis, b = C.options, M = C.chart, x = C.categories, a = C.logarithmic, c = C.names, p = B.pos, i = P(B.options && B.options.labels, b.labels), l = C.tickPositions, s = p === l[0], t = p === l[l.length - 1], n = (!i.step || i.step === 1) && C.tickInterval === 1;
l = l.info;
var o = B.label, A;
if (x = this.parameters.category || (x ? P(x[p], c[p], p) : p), a && v(x) && (x = $(a.lin2log(x))), C.dateTime)
if (l)
var _ = M.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && l.higherRanks[p] || l.unitName]), D = _.main;
else
v(x) && (D = C.dateTime.getXDateFormat(x, b.dateTimeLabelFormats || {}));
B.isFirst = s, B.isLast = t;
var j = {
axis: C,
chart: M,
dateTimeLabelFormat: D,
isFirst: s,
isLast: t,
pos: p,
tick: B,
tickPositionInfo: l,
value: x
};
w(this, "labelFormat", j);
var T = function(f) {
return i.formatter ? i.formatter.call(f, f) : i.format ? (f.text = C.defaultLabelFormatter.call(f), y.format(i.format, f, M)) : C.defaultLabelFormatter.call(f, f);
};
b = T.call(j, j);
var X = _ && _.list;
B.shortenLabel = X ? function() {
for (A = 0; A < X.length; A++)
if (N(j, { dateTimeLabelFormat: X[A] }), o.attr({ text: T.call(j, j) }), o.getBBox().width < C.getSlotWidth(B) - 2 * i.padding)
return;
o.attr({ text: "" });
} : void 0, n && C._addedPlotLB && B.moveLabel(b, i), U(o) || B.movedLabel ? o && o.textStr !== b && !n && (!o.textWidth || i.style.width || o.styles.width || o.css({ width: null }), o.attr({ text: b }), o.textPxLength = o.getBBox().width) : (B.label = o = B.createLabel({ x: 0, y: 0 }, b, i), B.rotation = 0);
}, O.prototype.createLabel = function(B, C, b) {
var M = this.axis, x = M.chart;
return (B = U(C) && b.enabled ? x.renderer.text(C, B.x, B.y, b.useHTML).add(M.labelGroup) : null) && (x.styledMode || B.css(u(b.style)), B.textPxLength = B.getBBox().width), B;
}, O.prototype.destroy = function() {
W(
this,
this.axis
);
}, O.prototype.getPosition = function(B, C, b, M) {
var x = this.axis, a = x.chart, c = M && a.oldChartHeight || a.chartHeight;
return B = { x: B ? $(x.translate(C + b, null, null, M) + x.transB) : x.left + x.offset + (x.opposite ? (M && a.oldChartWidth || a.chartWidth) - x.right - x.left : 0), y: B ? c - x.bottom + x.offset - (x.opposite ? x.height : 0) : $(c - x.translate(C + b, null, null, M) - x.transB) }, B.y = H(B.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: B }), B;
}, O.prototype.getLabelPosition = function(B, C, b, M, x, a, c, p) {
var i = this.axis, l = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, n = i.tickRotCorr || { x: 0, y: 0 }, o = M || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = x.y;
return U(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? n.y + 8 : Math.cos(b.rotation * Z) * (n.y - b.getBBox(!1, 0).height / 2)), B = B + x.x + o + n.x - (a && M ? a * l * (s ? -1 : 1) : 0), C = C + _ - (a && !M ? a * l * (s ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), A.x = B, A.y = Math.round(C), w(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(B, C, b, M, x, a) {
return a.crispLine([["M", B, C], ["L", B + (x ? 0 : -b), C + (x ? b : 0)]], M);
}, O.prototype.handleOverflow = function(B) {
var C = this.axis, b = C.options.labels, M = B.x, x = C.chart.chartWidth, a = C.chart.spacing, c = P(C.labelLeft, Math.min(C.pos, a[3]));
a = P(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, x - a[1]));
var p = this.label, i = this.rotation, l = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], s = p.getBBox().width, t = C.getSlotWidth(this), n = {}, o = t, A = 1, _;
i || b.overflow !== "justify" ? 0 > i && M - l * s < c ? _ = Math.round(M / Math.cos(i * Z) - c) : 0 < i && M + l * s > a && (_ = Math.round((x - M) / Math.cos(i * Z))) : (x = M + (1 - l) * s, M - l * s < c ? o = B.x + o * (1 - l) - c : x > a && (o = a - B.x + o * l, A = -1), o = Math.min(t, o), o < t && C.labelAlign === "center" && (B.x += A * (t - o - l * (t - Math.min(s, o)))), (s > o || C.autoRotation && (p.styles || {}).width) && (_ = o)), _ && (this.shortenLabel ? this.shortenLabel() : (n.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (n.textOverflow = "ellipsis"), p.css(n)));
}, O.prototype.moveLabel = function(B, C) {
var b = this, M = b.label, x = b.axis, a = x.reversed, c = !1;
if (M && M.textStr === B ? (b.movedLabel = M, c = !0, delete b.label) : d(x.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== B || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || M)) {
var p = b.labelPos || M.xy;
M = x.horiz ? a ? 0 : x.width + x.left : p.x, x = x.horiz ? p.y : a ? x.width + x.left : 0, b.movedLabel = b.createLabel({ x: M, y: x }, B, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(B, C, b) {
var M = this.axis, x = M.horiz, a = this.pos, c = P(this.tickmarkOffset, M.tickmarkOffset);
a = this.getPosition(x, a, c, C), c = a.x;
var p = a.y;
M = x && c === M.pos + M.len || !x && p === M.pos ? -1 : 1, x = P(b, this.label && this.label.newOpacity, 1), b = P(b, 1), this.isActive = !0, this.renderGridLine(C, b, M), this.renderMark(a, b, M), this.renderLabel(a, C, x, B), this.isNew = !1, w(this, "afterRender");
}, O.prototype.renderGridLine = function(B, C, b) {
var M = this.axis, x = M.options, a = {}, c = this.pos, p = this.type, i = P(
this.tickmarkOffset,
M.tickmarkOffset
), l = M.chart.renderer, s = this.gridLine, t = x.gridLineWidth, n = x.gridLineColor, o = x.gridLineDashStyle;
this.type === "minor" && (t = x.minorGridLineWidth, n = x.minorGridLineColor, o = x.minorGridLineDashStyle), s || (M.chart.styledMode || (a.stroke = n, a["stroke-width"] = t || 0, a.dashstyle = o), p || (a.zIndex = 1), B && (C = 0), this.gridLine = s = l.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(M.gridGroup)), s && (b = M.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * b, force: "pass", old: B })) && s[B || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
}, O.prototype.renderMark = function(B, C, b) {
var M = this.axis, x = M.options, a = M.chart.renderer, c = this.type, p = M.tickSize(c ? c + "Tick" : "tick"), i = B.x;
B = B.y;
var l = P(x[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && M.isXAxis ? 1 : 0);
x = x[c !== "minor" ? "tickColor" : "minorTickColor"];
var s = this.mark, t = !s;
p && (M.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(M.axisGroup), M.chart.styledMode || s.attr({ stroke: x, "stroke-width": l })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
B,
p[0],
s.strokeWidth() * b,
M.horiz,
a
), opacity: C }));
}, O.prototype.renderLabel = function(B, C, b, M) {
var x = this.axis, a = x.horiz, c = x.options, p = this.label, i = c.labels, l = i.step;
x = P(this.tickmarkOffset, x.tickmarkOffset);
var s = B.x;
B = B.y;
var t = !0;
p && v(s) && (p.xy = B = this.getLabelPosition(s, B, p, a, i, x, M, l), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(B), l && M % l && (t = !1), t && v(B.y) ? (B.opacity = b, p[this.isNewLabel ? "attr" : "animate"](B), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var B = this.label, C = this.axis, b = C.reversed;
if (B && !this.isNew) {
var M = C.horiz ? b ? C.left : C.width + C.left : B.xy.x;
b = C.horiz ? B.xy.y : b ? C.width + C.top : C.top, B.animate({ x: M, y: b, opacity: 0 }, void 0, B.destroy), delete this.label;
}
C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), R;
}
), E(h, "Core/Axis/Axis.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/AxisDefaults.js"],
h["Core/Color/Color.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Axis/Tick.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W) {
var N = y.animObject, w = Z.defaultOptions, v = H.registerEventOptions, u = $.deg2rad, d = W.arrayMax, P = W.arrayMin, O = W.clamp, B = W.correctFloat, C = W.defined, b = W.destroyObjectProperties, M = W.erase, x = W.error, a = W.extend, c = W.fireEvent, p = W.getMagnitude, i = W.isArray, l = W.isNumber, s = W.isString, t = W.merge, n = W.normalizeTickInterval, o = W.objectEach, A = W.pick, _ = W.relativeLength, D = W.removeEvent, j = W.splat, T = W.syncTimeout;
return y = function() {
function X(f, m) {
this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(f, m);
}
return X.prototype.init = function(f, m) {
var L = m.isX;
this.chart = f, this.horiz = f.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var Y = this.options, F = Y.labels, Q = Y.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.crosshair, j(f.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, f.axes.indexOf(this) === -1 && (L ? f.axes.splice(f.xAxis.length, 0, this) : f.axes.push(this), f[this.coll].push(this)), this.series = this.series || [], f.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = l(F.rotation) ? F.rotation : void 0, v(this, Y), c(this, "afterInit");
}, X.prototype.setOptions = function(f) {
this.options = t(R.defaultXAxisOptions, this.coll === "yAxis" && R.defaultYAxisOptions, [R.defaultTopAxisOptions, R.defaultRightAxisOptions, R.defaultBottomAxisOptions, R.defaultLeftAxisOptions][this.side], t(w[this.coll], f)), c(this, "afterSetOptions", { userOptions: f });
}, X.prototype.defaultLabelFormatter = function(f) {
var m = this.axis;
f = this.chart.numberFormatter;
var L = l(this.value) ? this.value : NaN, Y = m.chart.time, F = this.dateTimeLabelFormat, Q = w.lang, k = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
if (m.categories)
var V = "" + this.value;
else if (F)
V = Y.dateFormat(F, L);
else if (z && 1e3 <= G)
for (; z-- && typeof V > "u"; )
m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && (V = f(L / m, -1) + k[z]);
return typeof V > "u" && (V = 1e4 <= Math.abs(L) ? f(L, -1) : f(L, -1, void 0, "")), V;
}, X.prototype.getSeriesExtremes = function() {
var f = this, m = f.chart, L;
c(this, "getSeriesExtremes", null, function() {
f.hasVisibleSeries = !1, f.dataMin = f.dataMax = f.threshold = null, f.softThreshold = !f.isXAxis, f.stacking && f.stacking.buildStacks(), f.series.forEach(function(Y) {
if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
var F = Y.options, Q = F.threshold;
if (f.hasVisibleSeries = !0, f.positiveValuesOnly && 0 >= Q && (Q = null), f.isXAxis) {
if (F = Y.xData, F.length) {
F = f.logarithmic ? F.filter(f.validatePositiveValue) : F, L = Y.getXExtremes(F);
var k = L.min, G = L.max;
l(k) || k instanceof Date || (F = F.filter(l), L = Y.getXExtremes(F), k = L.min, G = L.max), F.length && (f.dataMin = Math.min(A(f.dataMin, k), k), f.dataMax = Math.max(A(f.dataMax, G), G));
}
} else
Y = Y.applyExtremes(), l(Y.dataMin) && (k = Y.dataMin, f.dataMin = Math.min(A(f.dataMin, k), k)), l(Y.dataMax) && (G = Y.dataMax, f.dataMax = Math.max(A(f.dataMax, G), G)), C(Q) && (f.threshold = Q), (!F.softThreshold || f.positiveValuesOnly) && (f.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(f, m, L, Y, F, Q) {
var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
F = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && F) && k.lin2val;
var V = 1, q = 0;
return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && (V *= -1, q = k.len), k.reversed && (V *= -1, q -= V * (k.sector || k.len)), m ? (f = (f * V + q - z) / Y + G, F && (f = k.lin2val(f))) : (F && (f = k.val2lin(f)), f = l(G) ? V * (f - G) * Y + q + V * z + (l(Q) ? Y * Q : 0) : void 0), f;
}, X.prototype.toPixels = function(f, m) {
return this.translate(
f,
!1,
!this.horiz,
null,
!0
) + (m ? 0 : this.pos);
}, X.prototype.toValue = function(f, m) {
return this.translate(f - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
}, X.prototype.getPlotLinePath = function(f) {
function m(at, J, tt) {
return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : lt = !0), at;
}
var L = this, Y = L.chart, F = L.left, Q = L.top, k = f.old, G = f.value, z = f.lineWidth, V = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = f.translatedValue, nt = f.force, rt, ct, gt, dt, lt;
return f = {
value: G,
lineWidth: z,
old: k,
force: nt,
acrossPanes: f.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", f, function(at) {
et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(V - et - it), l(et) ? L.horiz ? (ct = Q, dt = V - L.bottom, rt = gt = m(rt, F, F + L.width)) : (rt = F, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (lt = !0, nt = !1), at.path = lt && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
}), f.path;
}, X.prototype.getLinearTickPositions = function(f, m, L) {
var Y = B(Math.floor(m / f) * f);
L = B(Math.ceil(L / f) * f);
var F = [], Q;
if (B(Y + f) === Y && (Q = 20), this.single)
return [m];
for (m = Y; m <= L && (F.push(m), m = B(m + f, Q), m !== k); )
var k = m;
return F;
}, X.prototype.getMinorTickInterval = function() {
var f = this.options;
return f.minorTicks === !0 ? A(f.minorTickInterval, "auto") : f.minorTicks === !1 ? null : f.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var f = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, F = this.min - Y;
Y = this.max + Y;
var Q = Y - F, k = [];
if (Q && Q / L < this.len / 3) {
var G = this.logarithmic;
if (G)
this.paddedTicks.forEach(function(z, V, q) {
V && k.push.apply(
k,
G.getLogTickPositions(L, q[V - 1], q[V], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), F, Y, f.startOfWeek));
else
for (f = F + (m[0] - F) % L; f <= Y && f !== k[0]; f += L)
k.push(f);
}
return k.length !== 0 && this.trimTicks(k), k;
}, X.prototype.adjustForMinRange = function() {
var f = this.options, m = this.logarithmic, L = this.min, Y = this.max, F = 0, Q, k, G, z;
if (this.isXAxis && typeof this.minRange > "u" && !m && (C(f.min) || C(f.max) || C(f.floor) || C(f.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
for (Q = z; 0 < Q; Q--)
k = G[Q] - G[Q - 1], (!F || k < F) && (F = k);
}), this.minRange = Math.min(5 * F, this.dataMax - this.dataMin))), Y - L < this.minRange) {
var V = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
it = [L - it, A(f.min, L - it)], V && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = d(it), Y = [L + q, A(f.max, L + q)], V && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = P(Y), Y - L < q && (it[0] = Y - q, it[1] = A(f.min, Y - q), L = d(it));
}
this.min = L, this.max = Y;
}, X.prototype.getClosest = function() {
var f;
return this.categories ? f = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && C(L) && Y && (f = C(f) ? Math.min(f, L) : L);
}), f;
}, X.prototype.nameToX = function(f) {
var m = i(this.categories), L = m ? this.categories : this.names, Y = f.options.x;
if (f.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(f.name) : A(L.keys[f.name], -1) : f.series.autoIncrement()), Y === -1) {
if (!m)
var F = L.length;
} else
F = Y;
return typeof F < "u" && (this.names[F] = f.name, this.names.keys[f.name] = F), F;
}, X.prototype.updateNames = function() {
var f = this, m = this.names;
0 < m.length && (Object.keys(m.keys).forEach(function(L) {
delete m.keys[L];
}), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
L.xIncrement = null, (!L.points || L.isDirtyData) && (f.max = Math.max(f.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(Y, F) {
if (Y && Y.options && typeof Y.name < "u") {
var Q = f.nameToX(Y);
typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[F] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var f = this, m = f.max - f.min, L = f.linkedParent, Y = !!f.categories, F = f.isXAxis, Q = f.axisPointRange || 0, k = 0, G = 0, z = f.transA;
if (F || Y || Q) {
var V = f.getClosest();
L ? (k = L.minPointOffset, G = L.pointRangePadding) : f.series.forEach(function(q) {
var it = Y ? 1 : F ? A(q.options.pointRange, V, 0) : f.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!f.single || Y) && (q = q.is("xrange") ? !F : F, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
}), L = f.ordinal && f.ordinal.slope && V ? f.ordinal.slope / V : 1, f.minPointOffset = k *= L, f.pointRangePadding = G *= L, f.pointRange = Math.min(Q, f.single && Y ? 1 : m), F && (f.closestPointRange = V);
}
f.translationSlope = f.transA = z = f.staticScale || f.len / (m + G || 1), f.transB = f.horiz ? f.left : f.bottom, f.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(f) {
var m = this.chart, L = this.logarithmic, Y = this.options, F = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, V = Y.maxPadding, q = Y.minPadding, it = l(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = l(this.threshold) ? this.threshold : null;
this.dateTime || G || Q || this.getTickAmount();
var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
if (Q) {
this.linkedParent = m[this.coll][Y.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && x(11, 1, m);
} else {
if (z && C(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
V = 0;
}
}
this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !f && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && x(10, 1, m), this.min = B(L.log2lin(this.min), 16), this.max = B(L.log2lin(this.max), 16)), this.range && C(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && V && (this.max += m * V)), l(this.userMin) || (l(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), l(Y.floor) && (this.min = Math.max(this.min, Y.floor))), l(this.userMax) || (l(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), l(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), l(this.min) && l(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), F && !f) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(lt) {
lt.forceCrop = lt.forceCropping && lt.forceCropping(), lt.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), f = A(Y.minTickInterval, this.dateTime && !this.series.some(function(lt) {
return lt.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < f && (this.tickInterval = f), this.dateTime || this.logarithmic || it || (this.tickInterval = n(this.tickInterval, void 0, p(this.tickInterval), A(Y.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
}, X.prototype.setTickPositions = function() {
var f = this.options, m = f.tickPositions, L = this.getMinorTickInterval(), Y = this.hasVerticalPanning(), F = this.coll === "colorAxis", Q = (F || !Y) && f.startOnTick;
Y = (F || !Y) && f.endOnTick, F = f.tickPositioner, this.tickmarkOffset = this.categories && f.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && C(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || f.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, f.units), this.min, this.max, f.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
this.tickInterval,
this.min,
this.max
) : (L = [this.min, this.max], x(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, F && (F = F.apply(this, [this.min, this.max]))) && (this.tickPositions = L = F), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
return k.is("heatmap") && k.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || F || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(f, m, L) {
var Y = f[0], F = f[f.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && Y !== -1 / 0)
this.min = Y;
else
for (; this.min - Q > f[0]; )
f.shift();
if (L)
this.max = F;
else
for (; this.max + Q < f[f.length - 1]; )
f.pop();
f.length === 0 && C(Y) && !this.options.tickPositions && f.push((F + Y) / 2);
}
}, X.prototype.alignToOthers = function() {
var f = {}, m = this.options, L;
return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(Y) {
var F = Y.options;
F = [Y.horiz ? F.left : F.top, F.width, F.height, F.pane].join(), Y.series.length && (f[F] ? L = !0 : f[F] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var f = this.options, m = f.tickPixelInterval, L = f.tickAmount;
!C(f.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && f.startOnTick && f.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
}, X.prototype.adjustTickAmount = function() {
var f = this.options, m = this.tickInterval, L = this.tickPositions, Y = this.tickAmount, F = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && l(this.min) && l(this.max)) {
if (Q < Y) {
for (; L.length < Y; )
L.length % 2 || this.min === k ? L.push(B(L[L.length - 1] + m)) : L.unshift(B(L[0] - m));
this.transA *= (Q - 1) / (Y - 1), this.min = f.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = f.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
} else
Q > Y && (this.tickInterval *= 2, this.setTickPositions());
if (C(F)) {
for (m = f = L.length; m--; )
(F === 3 && m % 2 === 1 || 2 >= F && 0 < m && m < f - 1) && L.splice(m, 1);
this.finalTickAmt = void 0;
}
}
}, X.prototype.setScale = function() {
var f = !1, m = !1;
this.series.forEach(function(Y) {
f = f || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.xAxis.isDirty || !1;
}), this.setAxisSize();
var L = this.len !== (this.old && this.old.len);
L || f || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), f && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
}, X.prototype.setExtremes = function(f, m, L, Y, F) {
var Q = this, k = Q.chart;
L = A(L, !0), Q.series.forEach(function(G) {
delete G.kdTree;
}), F = a(F, { min: f, max: m }), c(Q, "setExtremes", F, function() {
Q.userMin = f, Q.userMax = m, Q.eventArgs = F, L && k.redraw(Y);
});
}, X.prototype.zoom = function(f, m) {
var L = this, Y = this.dataMin, F = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(F, A(Q.max, F));
return f = { newMin: f, newMax: m }, c(this, "zoom", f, function(z) {
var V = z.newMin, q = z.newMax;
(V !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && (V < k && (V = k), V > G && (V = G)), C(F) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof V < "u" || typeof q < "u", L.setExtremes(V, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
}), f.zoomed;
}, X.prototype.setAxisSize = function() {
var f = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, F = this.width = Math.round(_(A(m.width, f.plotWidth - L[3] + L[1]), f.plotWidth)), Q = this.height = Math.round(_(A(m.height, f.plotHeight - L[0] + L[2]), f.plotHeight)), k = this.top = Math.round(_(A(m.top, f.plotTop + L[0]), f.plotHeight, f.plotTop));
m = this.left = Math.round(_(A(m.left, f.plotLeft + L[3]), f.plotWidth, f.plotLeft)), this.bottom = f.chartHeight - Q - k, this.right = f.chartWidth - F - m, this.len = Math.max(Y ? F : Q, 0), this.pos = Y ? m : k;
}, X.prototype.getExtremes = function() {
var f = this.logarithmic;
return { min: f ? B(f.lin2log(this.min)) : this.min, max: f ? B(f.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
}, X.prototype.getThreshold = function(f) {
var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
return m = m ? m.lin2log(this.max) : this.max, f === null || f === -1 / 0 ? f = L : f === 1 / 0 ? f = m : L > f ? f = L : m < f && (f = m), this.translate(f, 0, 1, 0, 1);
}, X.prototype.autoLabelAlign = function(f) {
var m = (A(f, 0) - 90 * this.side + 720) % 360;
return f = { align: "center" }, c(
this,
"autoLabelAlign",
f,
function(L) {
15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
}
), f.align;
}, X.prototype.tickSize = function(f) {
var m = this.options, L = A(m[f === "tick" ? "tickWidth" : "minorTickWidth"], f === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[f === "tick" ? "tickLength" : "minorTickLength"];
if (L && Y) {
m[f + "Position"] === "inside" && (Y = -Y);
var F = [Y, L];
}
return f = { tickSize: F }, c(this, "afterTickSize", f), f.tickSize;
}, X.prototype.labelMetrics = function() {
var f = this.tickPositions && this.tickPositions[0] || 0;
return this.chart.renderer.fontMetrics(
this.options.labels.style.fontSize,
this.ticks[f] && this.ticks[f].label
);
}, X.prototype.unsquish = function() {
var f = this.options.labels, m = this.horiz, L = this.tickInterval, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), F = f.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
var rt = nt / (Y || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), B(rt * L);
}, z = L, V, q, it = Number.MAX_VALUE;
if (m) {
if (!f.staggerLines && !f.step)
if (l(F))
var et = [F];
else
Y < f.autoRotationLimit && (et = f.autoRotation);
et && et.forEach(function(nt) {
if (nt === F || nt && -90 <= nt && 90 >= nt) {
q = G(Math.abs(Q.h / Math.sin(u * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, V = nt, z = q);
}
});
} else
f.step || (z = G(Q.h));
return this.autoRotation = et, this.labelRotation = A(V, l(F) ? F : 0), z;
}, X.prototype.getSlotWidth = function(f) {
var m = this.chart, L = this.horiz, Y = this.options.labels, F = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (f && l(f.slotWidth))
return f.slotWidth;
if (L && 2 > Y.step)
return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / F;
if (!L) {
if (f = Y.style.width, f !== void 0)
return parseInt(String(f), 10);
if (Q)
return Q - m.spacing[3];
}
return 0.33 * m.chartWidth;
}, X.prototype.renderUnsquish = function() {
var f = this.chart, m = f.renderer, L = this.tickPositions, Y = this.ticks, F = this.options.labels, Q = F.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * F.padding)), V = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (s(F.rotation) || (V.rotation = F.rotation || 0), L.forEach(function(gt) {
gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > z && et > q.h ? V.rotation = this.labelRotation : this.labelRotation = 0;
else if (G) {
var nt = z;
if (!it) {
var rt = "clip";
for (z = L.length; !k && z--; ) {
var ct = L[z];
(ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
V.rotation && (nt = et > 0.5 * f.chartHeight ? 0.33 * f.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = F.align || this.autoLabelAlign(this.labelRotation)) && (V.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = Y[gt]) && gt.label, lt = Q.width, at = {};
dt && (dt.attr(V), gt.shortenLabel ? gt.shortenLabel() : nt && !lt && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !lt && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = V.rotation);
}, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
}, X.prototype.hasData = function() {
return this.series.some(function(f) {
return f.hasData();
}) || this.options.showEmpty && C(this.min) && C(this.max);
}, X.prototype.addTitle = function(f) {
var m = this.chart.renderer, L = this.horiz, Y = this.opposite, F = this.options.title, Q = this.chart.styledMode, k;
this.axisTitle || ((k = F.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[F.align]), this.axisTitle = m.text(F.text || "", 0, 0, F.useHTML).attr({ zIndex: 7, rotation: F.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(F.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || F.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[f ? "show" : "hide"](f);
}, X.prototype.generateTick = function(f) {
var m = this.ticks;
m[f] ? m[f].addLabel() : m[f] = new U(this, f);
}, X.prototype.getOffset = function() {
var f = this, m = this, L = m.chart, Y = m.horiz, F = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, V = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = F.title, rt = F.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = F.className, lt, at = 0, J = 0, tt = 0;
if (m.showAxis = lt = et || F.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var st = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (f.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(V);
};
m.gridGroup = st("grid", "-grid", F.gridZIndex), m.axisGroup = st("axis", "", F.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (G.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
tt = Math.max(k[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : o(k, function(pt, yt) {
pt.destroy(), delete k[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(lt), lt && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
var ht = nt.offset;
J = C(ht) ? 0 : A(nt.margin, Y ? 5 : 10);
}
m.renderLine(), m.offset = gt * A(F.offset, ct[Q] ? ct[Q] + (F.margin || 0) : 0), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(ht, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), F = !m.axisLine || F.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], F)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(f) {
var m = this.chart, L = this.opposite, Y = this.offset, F = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (f *= -1), m.renderer.crispLine([["M", F ? this.left : Q, F ? Y : this.top], ["L", F ? m.chartWidth - this.right : Q, F ? Y : m.chartHeight - this.bottom]], f);
}, X.prototype.renderLine = function() {
this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
}, X.prototype.getTitlePosition = function() {
var f = this.horiz, m = this.left, L = this.top, Y = this.len, F = this.options.title, Q = f ? m : L, k = this.opposite, G = this.offset, z = F.x, V = F.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(F.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (f ? 0 : Y), middle: Q + Y / 2, high: Q + (f ? Y : 0) }[F.align], m = (f ? L + this.height : m) + (f ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], f = { x: f ? Y + z : m + (k ? this.width : 0) + G + z, y: f ? m + V - (k ? this.height : 0) + G : Y + V }, c(this, "afterGetTitlePosition", { titlePosition: f }), f;
}, X.prototype.renderMinorTick = function(f, m) {
var L = this.minorTicks;
L[f] || (L[f] = new U(this, f, "minor")), m && L[f].isNew && L[f].render(null, !0), L[f].render(null, !1, 1);
}, X.prototype.renderTick = function(f, m, L) {
var Y = this.ticks;
(!this.isLinked || f >= this.min && f <= this.max || this.grid && this.grid.isColumn) && (Y[f] || (Y[f] = new U(this, f)), L && Y[f].isNew && Y[f].render(
m,
!0,
-1
), Y[f].render(m));
}, X.prototype.render = function() {
var f = this, m = f.chart, L = f.logarithmic, Y = f.options, F = f.isLinked, Q = f.tickPositions, k = f.axisTitle, G = f.ticks, z = f.minorTicks, V = f.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = f.tickmarkOffset, nt = f.axisLine, rt = f.showAxis, ct = N(m.renderer.globalAnimation), gt, dt;
if (f.labelEdge.length = 0, f.overlap = !1, [G, z, V].forEach(function(at) {
o(at, function(J) {
J.isActive = !1;
});
}), f.hasData() || F) {
var lt = f.chart.hasRendered && f.old && l(f.old.min);
f.minorTickInterval && !f.categories && f.getMinorTickPositions().forEach(function(at) {
f.renderMinorTick(at, lt);
}), Q.length && (Q.forEach(function(at, J) {
f.renderTick(at, J, lt);
}), et && (f.min === 0 || f.single) && (G[-1] || (G[-1] = new U(f, -1, null, !0)), G[-1].render(-1))), it && Q.forEach(function(at, J) {
dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : f.max - et, J % 2 === 0 && at < f.max && dt <= f.max + (m.polar ? -et : et) && (V[at] || (V[at] = new $.PlotLineOrBand(f)), gt = at + et, V[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, V[at].render(), V[at].isActive = !0);
}), f._addedPlotLB || (f._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
f.addPlotBandOrLine(at);
}));
}
[G, z, V].forEach(function(at) {
var J = [], tt = ct.duration;
o(at, function(st, ht) {
st.isActive || (st.render(ht, !1, 0), st.isActive = !1, J.push(ht));
}), T(function() {
for (var st = J.length; st--; )
at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
}, at !== V && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = f.getTitlePosition(), l(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr("y", -9999), k.isNew = !0)), q && q.enabled && f.stacking && f.stacking.renderStackTotals(), f.old = { len: f.len, max: f.max, min: f.min, transA: f.transA, userMax: f.userMax, userMin: f.userMin }, f.isDirty = !1, c(this, "afterRender");
}, X.prototype.redraw = function() {
this.visible && (this.render(), this.plotLinesAndBands.forEach(function(f) {
f.render();
})), this.series.forEach(function(f) {
f.isDirty = !0;
});
}, X.prototype.getKeepProps = function() {
return this.keepProps || X.keepProps;
}, X.prototype.destroy = function(f) {
var m = this, L = m.plotLinesAndBands, Y = this.eventOptions;
if (c(this, "destroy", { keepEvents: f }), f || D(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
b(Q);
}), L)
for (f = L.length; f--; )
L[f].destroy();
"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
m[Q] && (m[Q] = m[Q].destroy());
});
for (var F in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[F] = m.plotLinesAndBandsGroups[F].destroy();
o(m, function(Q, k) {
m.getKeepProps().indexOf(k) === -1 && delete m[k];
}), this.eventOptions = Y;
}, X.prototype.drawCrosshair = function(f, m) {
var L = this.crosshair, Y = A(L && L.snap, !0), F = this.chart, Q, k = this.cross;
if (c(this, "drawCrosshair", { e: f, point: m }), f || (f = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
if (Y ? C(m) && (Q = A(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = f && (this.horiz ? f.chartX - this.pos : this.len - f.chartY + this.pos), C(Q)) {
var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
F.polar && a(G, { isCrosshair: !0, chartX: f && f.chartX, chartY: f && f.chartY, point: m }), G = this.getPlotLinePath(G) || null;
}
if (!C(G)) {
this.hideCrosshair();
return;
}
Y = this.categories && !this.isRadial, k || (this.cross = k = F.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), F.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.attr({ "stroke-width": this.transA }), this.cross.e = f;
} else
this.hideCrosshair();
c(this, "afterDrawCrosshair", { e: f, point: m });
}, X.prototype.hideCrosshair = function() {
this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
}, X.prototype.hasVerticalPanning = function() {
var f = this.chart.options.chart.panning;
return !!(f && f.enabled && /y/.test(f.type));
}, X.prototype.validatePositiveValue = function(f) {
return l(f) && 0 < f;
}, X.prototype.update = function(f, m) {
var L = this.chart;
f = t(this.userOptions, f), this.destroy(!0), this.init(L, f), L.isDirtyBox = !0, A(m, !0) && L.redraw();
}, X.prototype.remove = function(f) {
for (var m = this.chart, L = this.coll, Y = this.series, F = Y.length; F--; )
Y[F] && Y[F].remove(!1);
M(m.axes, this), M(m[L], this), m[L].forEach(function(Q, k) {
Q.options.index = Q.userOptions.index = k;
}), this.destroy(), m.isDirtyBox = !0, A(f, !0) && m.redraw();
}, X.prototype.setTitle = function(f, m) {
this.update({ title: f }, m);
}, X.prototype.setCategories = function(f, m) {
this.update(
{ categories: f },
m
);
}, X.defaultOptions = R.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), E(h, "Core/Axis/DateTimeAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.timeUnits, $;
return function(U) {
function W() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function N(u) {
u.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new v(this));
}
var w = [];
U.compose = function(u) {
return w.indexOf(u) === -1 && (w.push(u), u.keepProps.push("dateTime"), u.prototype.getTimeTicks = W, R(u, "init", N)), u;
};
var v = function() {
function u(d) {
this.axis = d;
}
return u.prototype.normalizeTimeTickInterval = function(d, P) {
var O = P || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
P = O[O.length - 1];
var B = H[P[0]], C = P[1], b;
for (b = 0; b < O.length && (P = O[b], B = H[P[0]], C = P[1], !(O[b + 1] && d <= (B * C[C.length - 1] + H[O[b + 1][0]]) / 2)); b++)
;
return B === H.year && d < 5 * B && (C = [1, 2, 5]), d = Z(d / B, C, P[0] === "year" ? Math.max(I(d / B), 1) : 1), { unitRange: B, count: d, unitName: P[0] };
}, u.prototype.getXDateFormat = function(d, P) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, d, O.options.startOfWeek, P) || P.year : P.day;
}, u;
}();
U.Additions = v;
}($ || ($ = {})), $;
}), E(h, "Core/Axis/LogarithmicAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, H = y.pick, $;
return function(U) {
function W(u) {
var d = this.logarithmic;
u.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : d || (this.logarithmic = new v(this));
}
function N() {
var u = this.logarithmic;
u && (this.lin2val = function(d) {
return u.lin2log(d);
}, this.val2lin = function(d) {
return u.log2lin(d);
});
}
var w = [];
U.compose = function(u) {
return w.indexOf(u) === -1 && (w.push(u), u.keepProps.push("logarithmic"), R(u, "init", W), R(u, "afterInit", N)), u;
};
var v = function() {
function u(d) {
this.axis = d;
}
return u.prototype.getLogTickPositions = function(d, P, O, B) {
var C = this.axis, b = C.len, M = C.options, x = [];
if (B || (this.minorAutoInterval = void 0), 0.5 <= d)
d = Math.round(d), x = C.getLinearTickPositions(d, P, O);
else if (0.08 <= d) {
var a = Math.floor(P), c, p = M = void 0;
for (b = 0.3 < d ? [1, 2, 4] : 0.15 < d ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
var i = b.length;
for (c = 0; c < i && !p; c++) {
var l = this.log2lin(this.lin2log(a) * b[c]);
l > P && (!B || M <= O) && typeof M < "u" && x.push(M), M > O && (p = !0), M = l;
}
}
} else
P = this.lin2log(P), O = this.lin2log(O), d = B ? C.getMinorTickInterval() : M.tickInterval, d = H(d === "auto" ? null : d, this.minorAutoInterval, M.tickPixelInterval / (B ? 5 : 1) * (O - P) / ((B ? b / C.tickPositions.length : b) || 1)), d = Z(d, void 0, I(d)), x = C.getLinearTickPositions(d, P, O).map(this.log2lin), B || (this.minorAutoInterval = d / 5);
return B || (C.tickInterval = d), x;
}, u.prototype.lin2log = function(d) {
return Math.pow(10, d);
}, u.prototype.log2lin = function(d) {
return Math.log(d) / Math.LN10;
}, u;
}();
U.Additions = v;
}($ || ($ = {})), $;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [h["Core/Utilities.js"]], function(y) {
var R = y.erase, I = y.extend, Z = y.isNumber, H;
return function($) {
var U = [], W;
$.compose = function(w, v) {
return W || (W = w), U.indexOf(v) === -1 && (U.push(v), I(v.prototype, N.prototype)), v;
};
var N = function() {
function w() {
}
return w.prototype.getPlotBandPath = function(v, u, d) {
d === void 0 && (d = this.options);
var P = this.getPlotLinePath({ value: u, force: !0, acrossPanes: d.acrossPanes }), O = [], B = this.horiz;
if (u = !Z(this.min) || !Z(this.max) || v < this.min && u < this.min || v > this.max && u > this.max, v = this.getPlotLinePath({ value: v, force: !0, acrossPanes: d.acrossPanes }), d = 1, v && P) {
if (u) {
var C = v.toString() === P.toString();
d = 0;
}
for (u = 0; u < v.length; u += 2) {
var b = v[u], M = v[u + 1], x = P[u], a = P[u + 1];
b[0] !== "M" && b[0] !== "L" || M[0] !== "M" && M[0] !== "L" || x[0] !== "M" && x[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (B && x[1] === b[1] ? (x[1] += d, a[1] += d) : B || x[2] !== b[2] || (x[2] += d, a[2] += d), O.push(["M", b[1], b[2]], ["L", M[1], M[2]], ["L", a[1], a[2]], ["L", x[1], x[2]], ["Z"])), O.isFlat = C;
}
}
return O;
}, w.prototype.addPlotBand = function(v) {
return this.addPlotBandOrLine(v, "plotBands");
}, w.prototype.addPlotLine = function(v) {
return this.addPlotBandOrLine(
v,
"plotLines"
);
}, w.prototype.addPlotBandOrLine = function(v, u) {
var d = this, P = this.userOptions, O = new W(this, v);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (P.plotLines || []).concat(P.plotBands || []).forEach(function(C) {
d.addPlotBandOrLine(C);
})), u) {
var B = P[u] || [];
B.push(v), P[u] = B;
}
this.plotLinesAndBands.push(O);
}
return O;
}, w.prototype.removePlotBandOrLine = function(v) {
var u = this.plotLinesAndBands, d = this.options, P = this.userOptions;
if (u) {
for (var O = u.length; O--; )
u[O].id === v && u[O].destroy();
[d.plotLines || [], P.plotLines || [], d.plotBands || [], P.plotBands || []].forEach(function(B) {
for (O = B.length; O--; )
(B[O] || {}).id === v && R(B, B[O]);
});
}
}, w.prototype.removePlotBand = function(v) {
this.removePlotBandOrLine(v);
}, w.prototype.removePlotLine = function(v) {
this.removePlotBandOrLine(v);
}, w;
}();
}(H || (H = {})), H;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [h["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], h["Core/Utilities.js"]], function(y, R) {
var I = R.arrayMax, Z = R.arrayMin, H = R.defined, $ = R.destroyObjectProperties, U = R.erase, W = R.fireEvent, N = R.merge, w = R.objectEach, v = R.pick;
return R = function() {
function u(d, P) {
this.axis = d, P && (this.options = P, this.id = P.id);
}
return u.compose = function(d) {
return y.compose(u, d);
}, u.prototype.render = function() {
W(this, "render");
var d = this, P = d.axis, O = P.horiz, B = P.logarithmic, C = d.options, b = C.color, M = v(C.zIndex, 0), x = C.events, a = {}, c = P.chart.renderer, p = C.label, i = d.label, l = C.to, s = C.from, t = C.value, n = d.svgElem, o = [], A = H(s) && H(l);
o = H(t);
var _ = !n, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (C.className || "") }, j = A ? "bands" : "lines";
if (B && (s = B.log2lin(s), l = B.log2lin(l), t = B.log2lin(t)), P.chart.styledMode || (o ? (D.stroke = b || "#999999", D["stroke-width"] = v(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : A && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = M, j += "-" + M, (B = P.plotLinesAndBandsGroups[j]) || (P.plotLinesAndBandsGroups[j] = B = c.g("plot-" + j).attr(a).add()), _ && (d.svgElem = n = c.path().attr(D).add(B)), o)
o = P.getPlotLinePath({
value: t,
lineWidth: n.strokeWidth(),
acrossPanes: C.acrossPanes
});
else if (A)
o = P.getPlotBandPath(s, l, C);
else
return;
return !d.eventsAdded && x && (w(x, function(T, X) {
n.on(X, function(f) {
x[X].apply(d, [f]);
});
}), d.eventsAdded = !0), (_ || !n.d) && o && o.length ? n.attr({ d: o }) : n && (o ? (n.show(!0), n.animate({ d: o })) : n.d && (n.hide(), i && (d.label = i = i.destroy()))), p && (H(p.text) || H(p.formatter)) && o && o.length && 0 < P.width && 0 < P.height && !o.isFlat ? (p = N({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(
p,
o,
A,
M
)) : i && i.hide(), d;
}, u.prototype.renderLabel = function(d, P, O, B) {
var C = this.axis, b = C.chart.renderer, M = this.label;
M || (this.label = M = b.text(this.getLabelText(d), 0, 0, d.useHTML).attr({ align: d.textAlign || d.align, rotation: d.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (d.className || ""), zIndex: B }).add(), C.chart.styledMode || M.css(N({ textOverflow: "ellipsis" }, d.style))), B = P.xBounds || [P[0][1], P[1][1], O ? P[2][1] : P[0][1]], P = P.yBounds || [P[0][2], P[1][2], O ? P[2][2] : P[0][2]], O = Z(B), b = Z(P), M.align(
d,
!1,
{ x: O, y: b, width: I(B) - O, height: I(P) - b }
), M.alignValue && M.alignValue !== "left" || M.css({ width: (M.rotation === 90 ? C.height - (M.alignAttr.y - C.top) : C.width - (M.alignAttr.x - C.left)) + "px" }), M.show(!0);
}, u.prototype.getLabelText = function(d) {
return H(d.formatter) ? d.formatter.call(this) : d.text;
}, u.prototype.destroy = function() {
U(this.axis.plotLinesAndBands, this), delete this.axis, $(this);
}, u;
}(), R;
}), E(h, "Core/Tooltip.js", [
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H) {
var $ = y.format, U = R.doc, W = I.distribute, N = H.addEvent, w = H.clamp, v = H.css, u = H.defined, d = H.discardElement, P = H.extend, O = H.fireEvent, B = H.isArray, C = H.isNumber, b = H.isString, M = H.merge, x = H.pick, a = H.splat, c = H.syncTimeout;
return y = function() {
function p(i, l) {
this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, l);
}
return p.prototype.applyFilter = function() {
var i = this.chart;
i.renderer.definition({ tagName: "filter", attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 }, children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }] });
}, p.prototype.bodyFormatter = function(i) {
return i.map(function(l) {
var s = l.series.tooltipOptions;
return (s[(l.point.formatPrefix || "point") + "Formatter"] || l.point.tooltipFormatter).call(l.point, s[(l.point.formatPrefix || "point") + "Format"] || "");
});
}, p.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(l) {
var s = l && l.tt;
s && (!s.isActive || i ? l.tt = s.destroy() : s.isActive = !1);
});
}, p.prototype.defaultFormatter = function(i) {
var l = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(l[0])];
return s = s.concat(i.bodyFormatter(l)), s.push(i.tooltipFooterHeaderFormatter(
l[0],
!0
)), s;
}, p.prototype.destroy = function() {
this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), d(this.container)), H.clearTimeout(this.hideTimer), H.clearTimeout(this.tooltipTimeout);
}, p.prototype.getAnchor = function(i, l) {
var s = this.chart, t = s.pointer, n = s.inverted, o = s.plotTop, A = s.plotLeft, _, D, j = 0, T = 0;
return i = a(i), this.followPointer && l ? (typeof l.chartX > "u" && (l = t.normalize(l)), t = [l.chartX - A, l.chartY - o]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
_ = X.series.yAxis, D = X.series.xAxis, j += X.plotX || 0, T += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (n ? (j += o + s.plotHeight - D.len - D.pos, T += A + s.plotWidth - _.len - _.pos) : (j += D.pos - A, T += _.pos - o));
}), j /= i.length, T /= i.length, t = [n ? s.plotWidth - T : j, n ? s.plotHeight - j : T], this.shared && 1 < i.length && l && (n ? t[0] = l.chartX - A : t[1] = l.chartY - o)), t.map(Math.round);
}, p.prototype.getLabel = function() {
var i = this, l = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, n = "tooltip" + (u(s.className) ? " " + s.className : ""), o = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
i.inContact = !0;
}, _ = function(Y) {
var F = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && F && F.onMouseOut && F.onMouseOut();
}, D, j = this.chart.renderer;
if (i.label) {
var T = !i.label.hasClass("highcharts-label");
(t && !T || !t && T) && i.destroy();
}
if (!this.label) {
if (this.outside) {
T = this.chart.options.chart.style;
var X = Z.getRendererType();
this.container = D = R.doc.createElement("div"), D.className = "highcharts-tooltip-container", v(D, { position: "absolute", top: "1px", pointerEvents: o, zIndex: Math.max(this.options.style.zIndex || 0, (T && T.zIndex || 0) + 3) }), N(D, "mouseenter", A), N(D, "mouseleave", _), R.doc.body.appendChild(D), this.renderer = j = new X(D, 0, 0, T, void 0, void 0, j.styledMode);
}
if (t ? this.label = j.g(n) : (this.label = j.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, n).attr({ padding: s.padding, r: s.borderRadius }), l || this.label.attr({ fill: s.backgroundColor, "stroke-width": s.borderWidth }).css(s.style).css({ pointerEvents: o }).shadow(s.shadow)), l && s.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
var f = this.label, m = f.xSetter, L = f.ySetter;
f.xSetter = function(Y) {
m.call(f, i.distance), D.style.left = Y + "px";
}, f.ySetter = function(Y) {
L.call(f, i.distance), D.style.top = Y + "px";
};
}
this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
}
return this.label;
}, p.prototype.getPosition = function(i, l, s) {
var t = this.chart, n = this.distance, o = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? U.documentElement.clientWidth - 2 * n : t.chartWidth, j = _ ? Math.max(U.body.scrollHeight, U.documentElement.scrollHeight, U.body.offsetHeight, U.documentElement.offsetHeight, U.documentElement.clientHeight) : t.chartHeight, T = t.pointer.getChartPosition(), X = function(z) {
var V = z === "x";
return [z, V ? D : j, V ? i : l].concat(_ ? [V ? i * T.scaleX : l * T.scaleY, V ? T.left - n + (s.plotX + t.plotLeft) * T.scaleX : T.top - n + (s.plotY + t.plotTop) * T.scaleY, 0, V ? D : j] : [V ? i : l, V ? s.plotX + t.plotLeft : s.plotY + t.plotTop, V ? t.plotLeft : t.plotTop, V ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, f = X("y"), m = X("x"), L;
X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var Y = !this.followPointer && x(s.ttBelow, !t.inverted === X), F = function(z, V, q, it, et, nt, rt) {
var ct = _ ? z === "y" ? n * T.scaleY : n * T.scaleX : n, gt = (q - it) / 2, dt = it < et - n, lt = et + n + it < V, at = et - ct - q + gt;
if (et = et + ct - gt, Y && lt)
o[z] = et;
else if (!Y && dt)
o[z] = at;
else if (dt)
o[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
else if (lt)
o[z] = Math.max(nt, et + A + q > V ? et : et + A);
else
return !1;
}, Q = function(z, V, q, it, et) {
var nt;
return et < n || et > V - n ? nt = !1 : o[z] = et < q / 2 ? 1 : et > V - it / 2 ? V - it - 2 : et - q / 2, nt;
}, k = function(z) {
var V = f;
f = m, m = V, L = z;
}, G = function() {
F.apply(0, f) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? o.x = o.y = 0 : (k(!0), G());
};
return (t.inverted || 1 < this.len) && k(), G(), o;
}, p.prototype.hide = function(i) {
var l = this;
H.clearTimeout(this.hideTimer), i = x(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
l.getLabel().fadeOut(i && void 0), l.isHidden = !0;
}, i));
}, p.prototype.init = function(i, l) {
this.chart = i, this.options = l, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = l.split && !i.inverted && !i.polar, this.shared = l.shared || this.split, this.outside = x(l.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, p.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, p.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, p.prototype.move = function(i, l, s, t) {
var n = this, o = n.now, A = n.options.animation !== !1 && !n.isHidden && (1 < Math.abs(i - o.x) || 1 < Math.abs(l - o.y)), _ = n.followPointer || 1 < n.len;
P(o, { x: A ? (2 * o.x + i) / 3 : i, y: A ? (o.y + l) / 2 : l, anchorX: _ ? void 0 : A ? (2 * o.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (o.anchorY + t) / 2 : t }), n.getLabel().attr(o), n.drawTracker(), A && (H.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
n && n.move(i, l, s, t);
}, 32));
}, p.prototype.refresh = function(i, l) {
var s = this.chart, t = this.options, n = a(i), o = n[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, j = s.styledMode, T = {};
if (t.enabled) {
H.clearTimeout(this.hideTimer), this.allowShared = !(!B(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && o.series.tooltipOptions.followPointer, i = this.getAnchor(i, l);
var X = i[0], f = i[1];
if (D && this.allowShared ? (s.pointer.applyInactiveState(n), n.forEach(function(Y) {
Y.setState("hover"), A.push(Y.getLabelConfig());
}), T = { x: o.category, y: o.y }, T.points = A) : T = o.getLabelConfig(), this.len = A.length, _ = _.call(T, this), D = o.series, this.distance = x(
D.tooltipOptions.distance,
16
), _ === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(_, n);
else {
var m = X, L = f;
if (l && s.pointer.isDirectTouch && (m = l.chartX - s.plotLeft, L = l.chartY - s.plotTop), s.polar || D.options.clip === !1 || n.some(function(Y) {
return Y.series.shouldShowTooltip(m, L);
}))
l = this.getLabel(), t.style.width && !j || l.css({ width: this.chart.spacingBox.width + "px" }), l.attr({ text: _ && _.join ? _.join("") : _ }), l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + x(o.colorIndex, D.colorIndex)), j || l.attr({ stroke: t.borderColor || o.color || D.color || "#666666" }), this.updatePosition({ plotX: X, plotY: f, negative: o.negative, ttBelow: o.ttBelow, h: i[2] || 0 });
else {
this.hide();
return;
}
}
this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
}
O(this, "refresh");
}
}, p.prototype.renderSplit = function(i, l) {
function s(lt, at, J, tt, st) {
return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, lt = w(lt - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, lt = st ? lt - tt - Q : lt + Q, lt = w(lt, st ? lt : z.left, z.right)), { x: lt, y: at };
}
var t = this, n = t.chart, o = t.chart, A = o.chartWidth, _ = o.chartHeight, D = o.plotHeight, j = o.plotLeft, T = o.plotTop, X = o.pointer, f = o.scrollablePixelsY;
f = f === void 0 ? 0 : f;
var m = o.scrollablePixelsX, L = o.scrollingContainer;
L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
var Y = L.scrollLeft;
L = L.scrollTop;
var F = o.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? U.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, V = t.getLabel(), q = this.renderer || n.renderer, it = !(!n.xAxis[0] || !n.xAxis[0].opposite);
n = X.getChartPosition();
var et = n.left;
n = n.top;
var nt = T + L, rt = 0, ct = D - f;
b(i) && (i = [!1, i]), i = i.slice(0, l.length + 1).reduce(function(lt, at, J) {
if (at !== !1 && at !== "") {
J = l[J - 1] || { isHeader: !0, plotX: l[0].plotX, plotY: D, series: {} };
var tt = J.isHeader, st = tt ? t : J.series;
at = at.toString();
var ht = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + x(J.colorIndex, yt.colorIndex, "none");
if (ht || (ht = { padding: k.padding, r: k.borderRadius }, F || (ht.fill = k.backgroundColor, ht["stroke-width"] = k.borderWidth), ht = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(ht).add(V)), ht.isActive = !0, ht.attr({ text: at }), F || ht.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = ht, pt = st.getBBox(), at = pt.width + st.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, ht = J.series, J.isHeader) {
yt = j + yt;
var Ct = T + D / 2;
} else {
var Tt = ht.xAxis, kt = ht.yAxis;
yt = Tt.pos + w(yt, -Q, Tt.len + Q), ht.shouldShowTooltip(0, kt.pos - T + vt, { ignoreX: !0 }) && (Ct = kt.pos + vt);
}
yt = w(
yt,
z.left - Q,
z.right + Q
), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(yt, Ct, tt, at), lt.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: x(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
}
return lt;
}, []), !G && i.some(function(lt) {
var at = (t.outside ? et : 0) + lt.anchorX;
return at < z.left && at + lt.boxWidth < z.right ? !0 : at < et - z.left + lt.boxWidth && z.right - at > at;
}) && (i = i.map(function(lt) {
var at = s(lt.anchorX, lt.anchorY, lt.point.isHeader, lt.boxWidth, !1);
return P(lt, { target: at.y, x: at.x });
})), t.cleanSplit(), W(i, ct);
var gt = et, dt = et;
i.forEach(function(lt) {
var at = lt.x, J = lt.boxWidth;
lt = lt.isHeader, lt || (t.outside && et + at < gt && (gt = et + at), !lt && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(lt) {
var at = lt.x, J = lt.anchorX, tt = lt.pos, st = lt.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: lt.anchorY }, t.outside && at < J) {
var ht = et - gt;
0 < ht && (st || (tt.x = at + ht, tt.anchorX = J + ht), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + ht));
}
lt.tt.attr(tt);
}), i = t.container, f = t.renderer, t.outside && i && f && (o = V.getBBox(), f.setSize(o.width + o.x, o.height + o.y, !1), i.style.left = gt + "px", i.style.top = n + "px");
}, p.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, l = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
if (l && s) {
var t = { x: 0, y: 0, width: 0, height: 0 };
s = this.getAnchor(s);
var n = l.getBBox();
s[0] += i.plotLeft - l.translateX, s[1] += i.plotTop - l.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), n.width - s[0]) : Math.max(
Math.abs(s[0]),
n.width
), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), n.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), n.height), this.tracker ? this.tracker.attr(t) : (this.tracker = l.renderer.rect(t).addClass("highcharts-tracker").add(l), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, p.prototype.styledModeFormat = function(i) {
return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
}, p.prototype.tooltipFooterHeaderFormatter = function(i, l) {
var s = i.series, t = s.tooltipOptions, n = s.xAxis, o = n && n.dateTime;
n = { isFooter: l, labelConfig: i };
var A = t.xDateFormat, _ = t[l ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", n, function(D) {
o && !A && C(i.key) && (A = o.getXDateFormat(i.key, t.dateTimeLabelFormats)), o && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(j) {
_ = _.replace("{point." + j + "}", "{point." + j + ":" + A + "}");
}), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = $(_, { point: i, series: s }, this.chart);
}), n.text;
}, p.prototype.update = function(i) {
this.destroy(), M(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, M(!0, this.options, i));
}, p.prototype.updatePosition = function(i) {
var l = this.chart, s = this.options, t = l.pointer, n = this.getLabel();
t = t.getChartPosition();
var o = (s.positioner || this.getPosition).call(this, n.width, n.height, i), A = i.plotX + l.plotLeft;
i = i.plotY + l.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(n.width + s, n.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (v(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - o.x, i += t.top - o.y), this.move(Math.round(o.x), Math.round(o.y || 0), A, i);
}, p;
}(), y;
}), E(h, "Core/Series/Point.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Animation/AnimationUtilities.js"], h["Core/DefaultOptions.js"], h["Core/FormatUtilities.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H) {
var $ = R.animObject, U = I.defaultOptions, W = Z.format, N = H.addEvent, w = H.defined, v = H.erase, u = H.extend, d = H.fireEvent, P = H.getNestedProperty, O = H.isArray, B = H.isFunction, C = H.isNumber, b = H.isObject, M = H.merge, x = H.objectEach, a = H.pick, c = H.syncTimeout, p = H.removeEvent, i = H.uniqueKey;
return R = function() {
function l() {
this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
}
return l.prototype.animateBeforeDestroy = function() {
var s = this, t = { x: s.startXPos, opacity: 0 }, n = s.getGraphicalProps();
n.singular.forEach(function(o) {
s[o] = s[o].animate(o === "dataLabel" ? { x: s[o].startXPos, y: s[o].startYPos, opacity: 0 } : t);
}), n.plural.forEach(function(o) {
s[o].forEach(function(A) {
A.element && A.animate(u({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
});
});
}, l.prototype.applyOptions = function(s, t) {
var n = this.series, o = n.options.pointValKey || n.pointValKey;
return s = l.prototype.optionsToObject.call(this, s), u(this, s), this.options = this.options ? u(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, o && (this.y = l.prototype.getNestedProperty.call(
this,
o
)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && n.xAxis && n.xAxis.hasNames && (this.x = n.xAxis.nameToX(this)), typeof this.x > "u" && n ? this.x = typeof t > "u" ? n.autoIncrement() : t : C(s.x) && n.options.relativeXValue && (this.x = n.autoIncrement(s.x)), this;
}, l.prototype.destroy = function() {
function s() {
(t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
for (D in t)
t[D] = null;
}
var t = this, n = t.series, o = n.chart;
n = n.options.dataSorting;
var A = o.hoverPoints, _ = $(t.series.chart.renderer.globalAnimation), D;
t.legendItem && o.legend.destroyItem(t), A && (t.setState(), v(A, t), A.length || (o.hoverPoints = null)), t === o.hoverPoint && t.onMouseOut(), n && n.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), o.pointCount--;
}, l.prototype.destroyElements = function(s) {
var t = this;
s = t.getGraphicalProps(s), s.singular.forEach(function(n) {
t[n] = t[n].destroy();
}), s.plural.forEach(function(n) {
t[n].forEach(function(o) {
o.element && o.destroy();
}), delete t[n];
});
}, l.prototype.firePointEvent = function(s, t, n) {
var o = this, A = this.series.options;
(A.point.events[s] || o.options && o.options.events && o.options.events[s]) && o.importEvents(), s === "click" && A.allowPointSelect && (n = function(_) {
o.select && o.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
}), d(o, s, t, n);
}, l.prototype.getClassName = function() {
return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
}, l.prototype.getGraphicalProps = function(s) {
var t = this, n = [], o = { singular: [], plural: [] }, A;
for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && n.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && n.push("dataLabel", "dataLabelUpper", "connector"), A = n.length; A--; ) {
var _ = n[A];
t[_] && o.singular.push(_);
}
return ["dataLabel", "connector"].forEach(function(D) {
var j = D + "s";
s[D] && t[j] && o.plural.push(j);
}), o;
}, l.prototype.getLabelConfig = function() {
return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
}, l.prototype.getNestedProperty = function(s) {
if (s)
return s.indexOf("custom.") === 0 ? P(s, this.options) : this[s];
}, l.prototype.getZone = function() {
var s = this.series, t = s.zones;
s = s.zoneAxis || "y";
var n, o = 0;
for (n = t[o]; this[s] >= n.value; )
n = t[++o];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = n && n.color && !this.options.color ? n.color : this.nonZonedColor, n;
}, l.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, l.prototype.init = function(s, t, n) {
return this.series = s, this.applyOptions(t, n), this.id = w(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, d(this, "afterInit"), this;
}, l.prototype.optionsToObject = function(s) {
var t = this.series, n = t.options.keys, o = n || t.pointArrayMap || ["y"], A = o.length, _ = {}, D = 0, j = 0;
if (C(s) || s === null)
_[o[0]] = s;
else if (O(s))
for (!n && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); j < A; )
n && typeof s[D] > "u" || (0 < o[j].indexOf(".") ? l.prototype.setNestedProperty(_, s[D], o[j]) : _[o[j]] = s[D]), D++, j++;
else
typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
return _;
}, l.prototype.resolveColor = function() {
var s = this.series, t = s.chart.styledMode, n = s.chart.options.chart.colorCount;
if (delete this.nonZonedColor, s.options.colorByPoint) {
if (!t) {
n = s.options.colors || s.chart.options.colors;
var o = n[s.colorCounter];
n = n.length;
}
t = s.colorCounter, s.colorCounter++, s.colorCounter === n && (s.colorCounter = 0);
} else
t || (o = s.color), t = s.colorIndex;
this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, o);
}, l.prototype.setNestedProperty = function(s, t, n) {
return n.split(".").reduce(function(o, A, _, D) {
return o[A] = D.length - 1 === _ ? t : b(o[A], !0) ? o[A] : {}, o[A];
}, s), s;
}, l.prototype.tooltipFormatter = function(s) {
var t = this.series, n = t.tooltipOptions, o = a(n.valueDecimals, ""), A = n.valuePrefix || "", _ = n.valueSuffix || "";
return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + o + "f}");
}), W(s, { point: this, series: this.series }, t.chart);
}, l.prototype.update = function(s, t, n, o) {
function A() {
_.applyOptions(s);
var m = j && _.hasDummyGraphic;
m = _.y === null ? !m : m, j && m && (_.graphic = j.destroy(), delete _.hasDummyGraphic), b(s, !0) && (j && j.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = j.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), f = _.index, D.updateParallelArrays(_, f), X.data[f] = b(X.data[f], !0) || b(s, !0) ? _.options : a(s, X.data[f]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (T.isDirtyBox = !0), X.legendType === "point" && (T.isDirtyLegend = !0), t && T.redraw(n);
}
var _ = this, D = _.series, j = _.graphic, T = D.chart, X = D.options, f;
t = a(t, !0), o === !1 ? A() : _.firePointEvent("update", { options: s }, A);
}, l.prototype.remove = function(s, t) {
this.series.removePoint(this.series.data.indexOf(this), s, t);
}, l.prototype.select = function(s, t) {
var n = this, o = n.series, A = o.chart;
this.selectedStaging = s = a(s, !n.selected), n.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
n.selected = n.options.selected = s, o.options.data[o.data.indexOf(n)] = n.options, n.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
var D = _.series;
_.selected && _ !== n && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, l.prototype.onMouseOver = function(s) {
var t = this.series.chart, n = t.pointer;
s = s ? n.normalize(s) : n.getChartCoordinatesFromPoint(this, t.inverted), n.runPointActions(
s,
this
);
}, l.prototype.onMouseOut = function() {
var s = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
t.setState();
}), s.hoverPoints = s.hoverPoint = null;
}, l.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var s = this, t = M(s.series.options.point, s.options).events;
s.events = t, x(t, function(n, o) {
B(n) && N(s, o, n);
}), this.hasImportedEvents = !0;
}
}, l.prototype.setState = function(s, t) {
var n = this.series, o = this.state, A = n.options.states[s || "normal"] || {}, _ = U.plotOptions[n.type].marker && n.options.marker, D = _ && _.enabled === !1, j = _ && _.states && _.states[s || "normal"] || {}, T = j.enabled === !1, X = this.marker || {}, f = n.chart, m = _ && n.markerAttribs, L = n.halo, Y, F = n.stateMarkerGraphic;
if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (T || D && j.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
if (this.state = s, m && (Y = n.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
if (o && this.graphic.removeClass("highcharts-point-" + o), s && this.graphic.addClass("highcharts-point-" + s), !f.styledMode) {
var Q = n.pointAttribs(this, s), k = a(f.options.chart.animation, A.animation);
n.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
G && G.animate({ opacity: Q.opacity }, k);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
}
Y && this.graphic.animate(Y, a(f.options.chart.animation, j.animation, _.animation)), F && F.hide();
} else
s && j && (o = X.symbol || n.symbol, F && F.currentSymbol !== o && (F = F.destroy()), Y && (F ? F[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : o && (n.stateMarkerGraphic = F = f.renderer.symbol(o, Y.x, Y.y, Y.width, Y.height).add(n.markerGroup), F.currentSymbol = o)), !f.styledMode && F && this.state !== "inactive" && F.attr(n.pointAttribs(this, s))), F && (F[s && this.isInside ? "show" : "hide"](), F.element.point = this, F.addClass(this.getClassName(), !0));
A = A.halo, Y = (F = this.graphic || F) && F.visibility || "inherit", A && A.size && F && Y !== "hidden" && !this.isCluster ? (L || (n.halo = L = f.renderer.path().add(F.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, n.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, f.styledMode || L.attr(u({ fill: this.color || n.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), d(this, "afterSetState", { state: s });
}
}, l.prototype.haloPath = function(s) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
}, l;
}(), R;
}), E(h, "Core/Pointer.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Tooltip.js"], h["Core/Utilities.js"]], function(y, R, I, Z) {
var H = y.parse, $ = R.charts, U = R.noop, W = Z.addEvent, N = Z.attr, w = Z.css, v = Z.defined, u = Z.extend, d = Z.find, P = Z.fireEvent, O = Z.isNumber, B = Z.isObject, C = Z.objectEach, b = Z.offset, M = Z.pick, x = Z.splat;
return y = function() {
function a(c, p) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
}
return a.prototype.applyInactiveState = function(c) {
var p = [], i;
(c || []).forEach(function(l) {
i = l.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
}), this.chart.series.forEach(function(l) {
p.indexOf(l) === -1 ? l.setState("inactive", !0) : l.options.inactiveOtherPoints && l.setAllPointsToState("inactive");
});
}, a.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(p) {
return p();
}), this.eventsToUnbind = [], R.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
c[i] = void 0;
});
}, a.prototype.drag = function(c) {
var p = this.chart, i = p.options.chart, l = this.zoomHor, s = this.zoomVert, t = p.plotLeft, n = p.plotTop, o = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, j = B(i.panning) ? i.panning && i.panning.enabled : i.panning, T = i.panKey && c[i.panKey + "Key"], X = c.chartX, f = c.chartY, m = this.selectionMarker;
if ((!m || !m.touch) && (X < t ? X = t : X > t + o && (X = t + o), f < n ? f = n : f > n + A && (f = n + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - f, 2)), 10 < this.hasDragged)) {
var L = p.isInsidePlot(_ - t, D - n, { visiblePlotOnly: !0 });
!p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || T || m || (this.selectionMarker = m = p.renderer.rect(t, n, l ? 1 : o, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || H("#335cad").setOpacity(0.25).get() })), m && l && (l = X - _, m.attr({ width: Math.abs(l), x: (0 < l ? 0 : l) + _ })), m && s && (l = f - D, m.attr({ height: Math.abs(l), y: (0 < l ? 0 : l) + D })), L && !m && j && p.pan(c, i.panning);
}
}, a.prototype.dragStart = function(c) {
var p = this.chart;
p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
}, a.prototype.drop = function(c) {
var p = this, i = this.chart, l = this.hasPinched;
if (this.selectionMarker) {
var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, n = s.attr ? s.attr("y") : s.y, o = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: n, width: o, height: A }, D = !!i.mapView;
(this.hasDragged || l) && (i.axes.forEach(function(j) {
if (j.zoomEnabled && v(j.min) && (l || p[{ xAxis: "zoomX", yAxis: "zoomY" }[j.coll]]) && O(t) && O(n)) {
var T = j.horiz, X = c.type === "touchend" ? j.minPixelPadding : 0, f = j.toValue((T ? t : n) + X);
T = j.toValue((T ? t + o : n + A) - X), _[j.coll].push({ axis: j, min: Math.min(f, T), max: Math.max(f, T) }), D = !0;
}
}), D && P(i, "selection", _, function(j) {
i.zoom(u(
j,
l ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), l && this.scaleGroups();
}
i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, a.prototype.findNearestKDPoint = function(c, p, i) {
var l = this.chart, s = l.hoverPoint;
if (l = l.tooltip, s && l && l.isStickyOnContact())
return s;
var t;
return c.forEach(function(n) {
var o = !(n.noSharedTooltip && p) && 0 > n.options.findNearestPointBy.indexOf("y");
if (n = n.searchPoint(i, o), (o = B(n, !0) && n.series) && !(o = !B(t, !0))) {
o = t.distX - n.distX;
var A = t.dist - n.dist, _ = (n.series.group && n.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
o = 0 < (o !== 0 && p ? o : A !== 0 ? A : _ !== 0 ? _ : t.series.index > n.series.index ? -1 : 1);
}
o && (t = n);
}), t;
}, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
var i = c.series, l = i.xAxis;
i = i.yAxis;
var s = c.shapeArgs;
if (l && i) {
var t = M(c.clientX, c.plotX), n = c.plotY || 0;
return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, n = s.y), p ? { chartX: i.len + i.pos - n, chartY: l.len + l.pos - t } : { chartX: t + l.pos, chartY: n + i.pos };
}
if (s && s.x && s.y)
return { chartX: s.x, chartY: s.y };
}, a.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, p = b(c);
this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
}, a.prototype.getCoordinates = function(c) {
var p = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), p;
}, a.prototype.getHoverData = function(c, p, i, l, s, t) {
var n = [];
l = !(!l || !c);
var o = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
P(this, "beforeGetHoverData", o);
var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
return o.filter ? o.filter(D) : D.visible && !(!s && D.directTouch) && M(D.options.enableMouseTracking, !0) && D.stickyTracking;
}), _ = l || !t ? c : this.findNearestKDPoint(A, s, t);
return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
return o.filter ? o.filter(D) : D.visible && !(!s && D.directTouch) && M(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
}), A.forEach(function(D) {
var j = d(D.points, function(T) {
return T.x === _.x && !T.isNull;
});
B(j) && (D.chart.isBoosting && (j = D.getPoint(j)), n.push(j));
})) : n.push(_)), o = { hoverPoint: _ }, P(this, "afterGetHoverData", o), { hoverPoint: o.hoverPoint, hoverSeries: p, hoverPoints: n };
}, a.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var p; c && !p; )
p = c.point, c = c.parentNode;
return p;
}, a.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var p = this.chart.hoverSeries;
this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
}, a.prototype.inClass = function(c, p) {
for (var i; c; ) {
if (i = N(c, "class")) {
if (i.indexOf(p) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, a.prototype.init = function(c, p) {
this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = M(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, a.prototype.normalize = function(c, p) {
var i = c.touches, l = i ? i.length ? i.item(0) : M(i.changedTouches, c.changedTouches)[0] : c;
return p || (p = this.getChartPosition()), i = l.pageX - p.left, l = l.pageY - p.top, i /= p.scaleX, l /= p.scaleY, u(c, { chartX: Math.round(i), chartY: Math.round(l) });
}, a.prototype.onContainerClick = function(c) {
var p = this.chart, i = p.hoverPoint;
c = this.normalize(c);
var l = p.plotLeft, s = p.plotTop;
p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (P(i.series, "click", u(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (u(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - l, c.chartY - s, { visiblePlotOnly: !0 }) && P(p, "click", c)));
}, a.prototype.onContainerMouseDown = function(c) {
var p = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), R.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, a.prototype.onContainerMouseLeave = function(c) {
var p = $[M(a.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, a.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, a.prototype.onContainerMouseMove = function(c) {
var p = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, a.prototype.onDocumentTouchEnd = function(c) {
var p = $[M(
a.hoverChartIndex,
-1
)];
p && p.pointer.drop(c);
}, a.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, a.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, a.prototype.onDocumentMouseMove = function(c) {
var p = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var l = p.tooltip;
!i || l && l.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, a.prototype.onDocumentMouseUp = function(c) {
var p = $[M(a.hoverChartIndex, -1)];
p && p.pointer.drop(c);
}, a.prototype.pinch = function(c) {
var p = this, i = p.chart, l = p.pinchDown, s = c.touches || [], t = s.length, n = p.lastValidTouch, o = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, j = p.selectionMarker;
1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), o && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(T) {
return p.normalize(T);
}), c.type === "touchstart" ? ([].forEach.call(s, function(T, X) {
l[X] = { chartX: T.chartX, chartY: T.chartY };
}), n.x = [l[0].chartX, l[1] && l[1].chartX], n.y = [l[0].chartY, l[1] && l[1].chartY], i.axes.forEach(function(T) {
if (T.zoomEnabled) {
var X = i.bounds[T.horiz ? "h" : "v"], f = T.minPixelPadding, m = T.toPixels(Math.min(M(T.options.min, T.dataMin), T.dataMin)), L = T.toPixels(Math.max(M(T.options.max, T.dataMax), T.dataMax)), Y = Math.max(m, L);
X.min = Math.min(T.pos, Math.min(
m,
L
) - f), X.max = Math.max(T.pos + T.len, Y + f);
}
}), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : l.length && (P(i, "touchpan", { originalEvent: c }, function() {
j || (p.selectionMarker = j = u({ destroy: U, touch: !0 }, i.plotBox)), p.pinchTranslate(l, s, A, j, D, n), p.hasPinched = o, p.scaleGroups(A, D);
}), p.res && (p.res = !1, this.reset(!1, 0)));
}, a.prototype.pinchTranslate = function(c, p, i, l, s, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, l, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, l, s, t);
}, a.prototype.pinchTranslateDirection = function(c, p, i, l, s, t, n, o) {
var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", j = "chart" + D, T = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], f = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][j], F = !L && p[1][j];
p = function() {
typeof V == "number" && 20 < Math.abs(Y - F) && (G = o || Math.abs(z - V) / Math.abs(Y - F)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
};
var Q, k, G = o || 1, z = i[0][j], V = !L && i[1][j];
if (p(), i = k, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (z -= 0.8 * (z - n[_][0]), typeof V == "number" && (V -= 0.8 * (V - n[_][1])), p()) : n[_] = [z, V], f || (t[_] = k - X, t[T] = Q), t = f ? 1 / G : G, s[T] = Q, s[_] = i, l[f ? c ? "scaleY" : "scaleX" : "scale" + D] = G, l["translate" + D] = t * X + (z - t * Y);
}, a.prototype.reset = function(c, p) {
var i = this.chart, l = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, n = i.tooltip, o = n && n.shared ? t : s;
c && o && x(o).forEach(function(A) {
A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
}), c ? n && o && x(o).length && (n.refresh(o), n.shared && t ? t.forEach(function(A) {
A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
null,
A
), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
}) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
}))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
A.setState();
}), l && l.onMouseOut(), n && n.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
A.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, a.prototype.runPointActions = function(c, p) {
var i = this.chart, l = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = l ? l.shared : !1, t = p || i.hoverPoint, n = t && t.series || i.hoverSeries;
p = this.getHoverData(t, n, i.series, (!c || c.type !== "touchmove") && (!!p || n && n.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, n = p.hoverSeries;
var o = p.hoverPoints;
if (p = n && n.tooltipOptions.followPointer && !n.tooltipOptions.split, s = s && n && !n.noSharedTooltip, t && (t !== i.hoverPoint || l && l.isHidden)) {
if ((i.hoverPoints || []).forEach(function(A) {
o.indexOf(A) === -1 && A.setState();
}), i.hoverSeries !== n && n.onMouseOver(), this.applyInactiveState(o), (o || []).forEach(function(A) {
A.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = o, i.hoverPoint = t, t.firePointEvent("mouseOver"), l && l.refresh(s ? o : t, c);
} else
p && l && !l.isHidden && (t = l.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && l.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = W(i.container.ownerDocument, "mousemove", function(A) {
var _ = $[a.hoverChartIndex];
_ && _.pointer.onDocumentMouseMove(A);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
var _ = M((A.crosshair || {}).snap, !0), D;
_ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = d(o, function(j) {
return j.series[A.coll] === A;
}))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
});
}, a.prototype.scaleGroups = function(c, p) {
var i = this.chart;
i.series.forEach(function(l) {
var s = c || l.getPlotBox();
l.group && (l.xAxis && l.xAxis.zoomEnabled || i.mapView) && (l.group.attr(s), l.markerGroup && (l.markerGroup.attr(s), l.markerGroup.clip(p ? i.clipRect : null)), l.dataLabelsGroup && l.dataLabelsGroup.attr(s));
}), i.clipRect.attr(p || i.clipBox);
}, a.prototype.setDOMEvents = function() {
var c = this, p = this.chart.container, i = p.ownerDocument;
p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(W(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(W(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = W(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var l = this.chart.renderTo.parentElement; l && l.tagName !== "BODY"; )
this.eventsToUnbind.push(W(l, "scroll", function() {
delete c.chartPosition;
})), l = l.parentElement;
R.hasTouch && (this.eventsToUnbind.push(W(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(W(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = W(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, a.prototype.setHoverChartIndex = function() {
var c = this.chart, p = R.charts[M(a.hoverChartIndex, -1)];
p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
}, a.prototype.touch = function(c, p) {
var i = this.chart;
if (this.setHoverChartIndex(), c.touches.length === 1)
if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
if (p && this.runPointActions(c), c.type === "touchmove") {
p = this.pinchDown;
var l = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
}
M(l, !0) && this.pinch(c);
} else
p && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, a.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, a.prototype.zoomOption = function(c) {
var p = this.chart, i = p.options.chart;
p = p.inverted;
var l = i.zoomType || "";
/touch/.test(c.type) && (l = M(i.pinchType, l)), this.zoomX = c = /x/.test(l), this.zoomY = i = /y/.test(l), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
}, a;
}(), y;
}), E(h, "Core/MSPointer.js", [h["Core/Globals.js"], h["Core/Pointer.js"], h["Core/Utilities.js"]], function(y, R, I) {
function Z() {
var C = [];
return C.item = function(b) {
return this[b];
}, d(O, function(b) {
C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), C;
}
function H(C, b, M, x) {
var a = U[R.hoverChartIndex || NaN];
C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, x(C), a[b]({ type: M, target: C.currentTarget, preventDefault: N, touches: Z() }));
}
var $ = this && this.__extends || function() {
var C = function(b, M) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
x.__proto__ = a;
} || function(x, a) {
for (var c in a)
a.hasOwnProperty(c) && (x[c] = a[c]);
}, C(b, M);
};
return function(b, M) {
function x() {
this.constructor = b;
}
C(b, M), b.prototype = M === null ? Object.create(M) : (x.prototype = M.prototype, new x());
};
}(), U = y.charts, W = y.doc, N = y.noop, w = y.win, v = I.addEvent, u = I.css, d = I.objectEach, P = I.removeEvent, O = {}, B = !!w.PointerEvent;
return function(C) {
function b() {
return C !== null && C.apply(this, arguments) || this;
}
return $(b, C), b.isRequired = function() {
return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
}, b.prototype.batchMSEvents = function(M) {
M(this.chart.container, B ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), M(this.chart.container, B ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), M(W, B ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(P), C.prototype.destroy.call(this);
}, b.prototype.init = function(M, x) {
C.prototype.init.call(this, M, x), this.hasZoom && u(M.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(M) {
H(M, "onContainerTouchStart", "touchstart", function(x) {
O[x.pointerId] = { pageX: x.pageX, pageY: x.pageY, target: x.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(M) {
H(M, "onContainerTouchMove", "touchmove", function(x) {
O[x.pointerId] = {
pageX: x.pageX,
pageY: x.pageY
}, O[x.pointerId].target || (O[x.pointerId].target = x.currentTarget);
});
}, b.prototype.onDocumentPointerUp = function(M) {
H(M, "onDocumentTouchEnd", "touchend", function(x) {
delete O[x.pointerId];
});
}, b.prototype.setDOMEvents = function() {
C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(v);
}, b;
}(R);
}), E(h, "Core/Legend/Legend.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $) {
var U = y.animObject, W = y.setAnimation, N = R.format;
y = I.isFirefox;
var w = I.marginNames;
I = I.win;
var v = H.distribute, u = $.addEvent, d = $.createElement, P = $.css, O = $.defined, B = $.discardElement, C = $.find, b = $.fireEvent, M = $.isNumber, x = $.merge, a = $.pick, c = $.relativeLength, p = $.stableSort, i = $.syncTimeout;
return H = $.wrap, $ = function() {
function l(s, t) {
this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = s, this.init(s, t);
}
return l.prototype.init = function(s, t) {
this.chart = s, this.setOptions(t), t.enabled && (this.render(), u(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = u(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, l.prototype.setOptions = function(s) {
var t = a(s.padding, 8);
this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = x(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
s.symbolWidth,
16
), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, l.prototype.update = function(s, t) {
var n = this.chart;
this.setOptions(x(!0, this.options, s)), this.destroy(), n.isDirtyLegend = n.isDirtyBox = !0, a(t, !0) && n.redraw(), b(this, "afterUpdate");
}, l.prototype.colorizeItem = function(s, t) {
if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var n = this.options, o = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
n = t ? n.itemStyle.color : D;
var j = t && s.color || D, T = s.options && s.options.marker, X = { fill: j };
o && o.css({ fill: n, color: n }), A && A.attr({ stroke: j }), _ && (T && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
}
b(this, "afterColorizeItem", { item: s, visible: t });
}, l.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, l.prototype.positionItem = function(s) {
var t = this, n = this.options, o = n.symbolPadding, A = !n.rtl, _ = s._legendItemPos;
n = _[0], _ = _[1];
var D = s.checkbox, j = s.legendGroup;
j && j.element && (o = { translateX: A ? n : this.legendWidth - n - 2 * o - 4, translateY: _ }, A = function() {
b(t, "afterPositionItem", { item: s });
}, O(j.translateY) ? j.animate(o, void 0, A) : (j.attr(o), A())), D && (D.x = n, D.y = _);
}, l.prototype.destroyItem = function(s) {
var t = s.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(n) {
s[n] && (s[n] = s[n].destroy());
}), t && B(s.checkbox);
}, l.prototype.destroy = function() {
function s(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(s, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
}, l.prototype.positionCheckboxes = function() {
var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, n = this.titleHeight;
if (s) {
var o = s.translateY;
this.allItems.forEach(function(A) {
var _ = A.checkbox;
if (_) {
var D = o + n + _.y + (this.scrollOffset || 0) + 3;
P(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > o - 6 && D < o + t - 6 ? "" : "none" });
}
}, this);
}
}, l.prototype.renderTitle = function() {
var s = this.options, t = this.padding, n = s.title, o = 0;
n.text && (this.title || (this.title = this.chart.renderer.label(n.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(n.style), this.title.add(this.group)), n.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), o = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: o })), this.titleHeight = o;
}, l.prototype.setText = function(s) {
var t = this.options;
s.legendItem.attr({ text: t.labelFormat ? N(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
}, l.prototype.renderItem = function(s) {
var t = this.chart, n = t.renderer, o = this.options, A = this.symbolWidth, _ = o.symbolPadding || 0, D = this.itemStyle, j = this.itemHiddenStyle, T = o.layout === "horizontal" ? a(o.itemDistance, 20) : 0, X = !o.rtl, f = !s.series, m = !f && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, F = o.useHTML, Q = s.options.className, k = s.legendItem;
L = A + _ + T + (Y ? 20 : 0), k || (s.legendGroup = n.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (f ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = n.text("", X ? A + _ : -_, this.baseline || 0, F), t.styledMode || k.css(x(s.visible ? D : j)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = n.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = o.symbolHeight || this.fontMetrics.f, o.squareSymbol && (this.symbolWidth = a(o.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + T + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, F)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (o.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), n = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = o.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * n ? t.height : n));
}, l.prototype.layoutItem = function(s) {
var t = this.options, n = this.padding, o = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, j = o ? a(t.itemDistance, 20) : 0, T = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > T ? this.maxItemWidth : s.itemWidth, o && this.itemX - n + t > T && (this.itemX = n, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], o ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((o ? this.itemX - n - (s.checkbox ? 0 : j) : t) + n, this.offsetWidth);
}, l.prototype.getAllItems = function() {
var s = [];
return this.chart.series.forEach(function(t) {
var n = t && t.options;
t && a(n.showInLegend, O(n.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (n.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: s }), s;
}, l.prototype.getAlignment = function() {
var s = this.options;
return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
}, l.prototype.adjustMargins = function(s, t) {
var n = this.chart, o = this.options, A = this.getAlignment();
A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
_.test(A) && !O(s[D]) && (n[w[D]] = Math.max(n[w[D]], n.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * o[D % 2 ? "x" : "y"] + a(o.margin, 12) + t[D] + (n.titleOffset[D] || 0)));
});
}, l.prototype.proximatePositions = function() {
var s = this.chart, t = [], n = this.options.align === "left";
this.allItems.forEach(function(o) {
var A, _ = n;
if (o.yAxis) {
o.xAxis.options.reversed && (_ = !_), o.points && (A = C(_ ? o.points : o.points.slice(0).reverse(), function(j) {
return M(j.plotY);
})), _ = this.itemMarginTop + o.legendItem.getBBox().height + this.itemMarginBottom;
var D = o.yAxis.top - s.plotTop;
o.visible ? (A = A ? A.plotY : o.yAxis.height, A += D - 0.3 * _) : A = D + o.yAxis.height, t.push({ target: A, size: _, item: o });
}
}, this), v(t, s.plotHeight).forEach(function(o) {
o.item._legendItemPos && (o.item._legendItemPos[1] = s.plotTop - s.spacing[0] + o.pos);
});
}, l.prototype.render = function() {
var s = this.chart, t = s.renderer, n = this.options, o = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
this.itemX = o, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(n.width, s.spacingBox.width - o);
var j = s.spacingBox.width - 2 * o - n.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (j /= 2), this.maxLegendWidth = this.widthOption || j, _ || (this.group = _ = t.g("legend").addClass(n.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, f) {
return (X.options && X.options.legendIndex || 0) - (f.options && f.options.legendIndex || 0);
}), n.reversed && A.reverse(), this.allItems = A, this.display = j = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + o;
var T = this.lastItemY + this.lastLineHeight + this.titleHeight;
T = this.handleOverflow(T), T += o, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: n.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: n.borderColor, "stroke-width": n.borderWidth || 0, fill: n.backgroundColor || "none" }).shadow(n.shadow), 0 < A && 0 < T && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: T }, D.strokeWidth())), D.isNew = !1), D[j ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = T = 0), this.legendWidth = A, this.legendHeight = T, j && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, l.prototype.align = function(s) {
s === void 0 && (s = this.chart.spacingBox);
var t = this.chart, n = this.options, o = s.y;
/(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? o += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (o -= t.titleOffset[2]), o !== s.y && (s = x(s, { y: o })), this.group.align(x(n, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : n.verticalAlign }), !0, s);
}, l.prototype.handleOverflow = function(s) {
var t = this, n = this.chart, o = n.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", j = this.padding, T = A.maxHeight, X = A.navigation, f = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, F = function(q) {
typeof q == "number" ? V.attr({ height: q }) : V && (t.clipRect = V.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + j + "px,9999px," + (j + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = o.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), n.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, k, G;
_ = n.spacingBox.height + (D ? -_ : _) - j;
var z = this.nav, V = this.clipRect;
return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), T && (_ = Math.min(_, T)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - j, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
}), V || (V = t.clipRect = o.clipRect(0, j, 9999, 0), t.contentGroup.clip(V)), F(k), z || (this.nav = z = o.g().attr({ zIndex: 1 }).add(this.group), this.up = o.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
"click",
function() {
t.scroll(-1, f);
}
), this.pager = o.text("", 15, 10).addClass("highcharts-legend-navigation"), n.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = o.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
t.scroll(1, f);
})), t.scroll(0), s = _) : z && (F(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
}, l.prototype.scroll = function(s, t) {
var n = this, o = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, j = this.options.navigation, T = this.pager, X = this.padding, f = this.currentPage + s;
f > _ && (f = _), 0 < f && (typeof t < "u" && W(t, o), this.nav.attr({ translateX: X, translateY: D + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
m.attr({ class: f === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
}), T.attr({ text: f + "/" + _ }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: f === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), o.styledMode || (this.up.attr({ fill: f === 1 ? j.inactiveColor : j.activeColor }), this.upTracker.css({ cursor: f === 1 ? "default" : "pointer" }), this.down.attr({ fill: f === _ ? j.inactiveColor : j.activeColor }), this.downTracker.css({ cursor: f === _ ? "default" : "pointer" })), this.scrollOffset = -A[f - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = f, this.positionCheckboxes(), s = U(a(t, o.renderer.globalAnimation, !0)), i(function() {
b(n, "afterScroll", { currentPage: f });
}, s.duration));
}, l.prototype.setItemEvents = function(s, t, n) {
var o = this, A = o.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", j = o.chart.styledMode, T = function(X) {
o.allItems.forEach(function(f) {
s !== f && [f].concat(f.linkedSeries || []).forEach(function(m) {
m.setState(X, !_);
});
});
};
(n ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
s.visible && T("inactive"), s.setState("hover"), s.visible && A.addClass(D), j || t.css(o.options.itemHoverStyle);
}).on("mouseout", function() {
o.chart.styledMode || t.css(x(s.visible ? o.itemStyle : o.itemHiddenStyle)), T(""), A.removeClass(D), s.setState();
}).on("click", function(f) {
var m = function() {
s.setVisible && s.setVisible(), T(s.visible ? "inactive" : "");
};
A.removeClass(D), f = { browserEvent: f }, s.firePointEvent ? s.firePointEvent("legendItemClick", f, m) : b(s, "legendItemClick", f, m);
});
});
}, l.prototype.createCheckboxForItem = function(s) {
s.checkbox = d(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
this.options.itemCheckboxStyle,
this.chart.container
), u(s.checkbox, "click", function(t) {
b(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
s.select();
});
});
}, l;
}(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && H($.prototype, "positionItem", function(l, s) {
var t = this, n = function() {
s._legendItemPos && l.call(t, s);
};
n(), t.bubbleLegend || setTimeout(n);
}), $;
}), E(
h,
"Core/Series/SeriesRegistry.js",
[h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]],
function(y, R, I, Z) {
var H = R.defaultOptions, $ = Z.error, U = Z.extendClass, W = Z.merge, N;
return function(w) {
function v(u, d) {
var P = H.plotOptions || {}, O = d.defaultOptions;
d.prototype.pointClass || (d.prototype.pointClass = I), d.prototype.type = u, O && (P[u] = O), w.seriesTypes[u] = d;
}
w.seriesTypes = y.seriesTypes, w.getSeries = function(u, d) {
d === void 0 && (d = {});
var P = u.options.chart;
P = d.type || P.type || P.defaultSeriesType || "";
var O = w.seriesTypes[P];
return w || $(17, !0, u, { missingModuleFor: P }), P = new O(), typeof P.init == "function" && P.init(u, d), P;
}, w.registerSeriesType = v, w.seriesType = function(u, d, P, O, B) {
var C = H.plotOptions || {};
return d = d || "", C[u] = W(C[d], P), v(u, U(w.seriesTypes[d] || function() {
}, O)), w.seriesTypes[u].prototype.type = u, B && (w.seriesTypes[u].prototype.pointClass = U(I, B)), w.seriesTypes[u];
};
}(N || (N = {})), N;
}
), E(h, "Core/Chart/Chart.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/Axis.js"],
h["Core/FormatUtilities.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/Legend.js"],
h["Core/MSPointer.js"],
h["Core/DefaultOptions.js"],
h["Core/Pointer.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Time.js"],
h["Core/Utilities.js"],
h["Core/Renderer/HTML/AST.js"]
], function(y, R, I, Z, H, $, U, W, N, w, v, u, d, P, O) {
var B = y.animate, C = y.animObject, b = y.setAnimation, M = I.numberFormat, x = Z.registerEventOptions, a = H.charts, c = H.doc, p = H.marginNames, i = H.svg, l = H.win, s = W.defaultOptions, t = W.defaultTime, n = v.seriesTypes, o = P.addEvent, A = P.attr, _ = P.cleanRecursively, D = P.createElement, j = P.css, T = P.defined, X = P.discardElement, f = P.erase, m = P.error, L = P.extend, Y = P.find, F = P.fireEvent, Q = P.getStyle, k = P.isArray, G = P.isNumber, z = P.isObject, V = P.isString, q = P.merge, it = P.objectEach, et = P.pick, nt = P.pInt, rt = P.relativeLength, ct = P.removeEvent, gt = P.splat, dt = P.syncTimeout, lt = P.uniqueKey;
return y = function() {
function at(J, tt, st) {
this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, st);
}
return at.chart = function(J, tt, st) {
return new at(J, tt, st);
}, at.prototype.getArgs = function(J, tt, st) {
V(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var st = J.plotOptions || {};
F(this, "init", { args: arguments }, function() {
var ht = q(s, J), pt = ht.chart;
it(ht.plotOptions, function(yt, vt) {
z(yt) && (yt.tooltip = st[vt] && q(st[vt].tooltip) || void 0);
}), ht.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = ht, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new d(J.time) : H.time, this.numberFormatter = pt.numberFormatter || M, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), H.chartCount++, x(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, F(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var st = n[tt];
return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), typeof tt.init == "function" && tt.init(this, J), tt;
}, at.prototype.setSeriesData = function() {
this.getSeriesOrderByLinks().forEach(function(J) {
J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
});
}, at.prototype.getSeriesOrderByLinks = function() {
return this.series.concat().sort(function(J, tt) {
return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
});
}, at.prototype.orderSeries = function(J) {
var tt = this.series;
J = J || 0;
for (var st = tt.length; J < st; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, st) {
st === void 0 && (st = {});
var ht = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Tt = 0, kt = 0;
st.visiblePlotOnly && this.scrollingContainer && (kt = this.scrollingContainer, Tt = kt.scrollLeft, kt = kt.scrollTop);
var St = st.series;
if (pt = st.visiblePlotOnly && Ct || pt, Ct = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
var _t = St && (ht ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = st.paneCoordinates ? _t.pos + Ct : yt + Ct, Ct >= Math.max(Tt + yt, _t.pos) && Ct <= Math.min(Tt + yt + pt.width, _t.pos + _t.len) || (J.isInsidePlot = !1);
}
return !st.ignoreY && J.isInsidePlot && (ht = St && (ht ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? ht.pos + tt : vt + tt, st >= Math.max(kt + vt, ht.pos) && st <= Math.min(kt + vt + pt.height, ht.pos + ht.len) || (J.isInsidePlot = !1)), F(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
F(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = this.series, ht = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Tt = [], kt = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
var _t = st[J];
if (_t.options.stacking || _t.options.centerInCategory) {
var Lt = !0;
if (_t.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = st.length; J--; )
_t = st[J], _t.options.stacking && (_t.isDirty = !0);
st.forEach(function(Et) {
Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && F(Et, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
Et.updateNames(), Et.setScale();
}), this.getMargins(), tt.forEach(function(Et) {
Et.isDirty && (kt = !0);
}), tt.forEach(function(Et) {
var Kt = Et.min + "," + Et.max;
Et.extKey !== Kt && (Et.extKey = Kt, Tt.push(function() {
F(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
})), (kt || Lt) && Et.redraw();
}), kt && this.drawChartBox(), F(this, "predraw"), st.forEach(function(Et) {
(kt || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
}), ht && ht.reset(!0), vt.draw(), F(this, "redraw"), F(this, "render"), Ct && this.temporaryDisplay(!0), Tt.forEach(function(Et) {
Et.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var st = this.series, ht = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !ht && pt < st.length; pt++)
ht = Y(st[pt].points || [], tt);
return ht;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), F(this, "getAxes"), st.forEach(function(ht, pt) {
ht.index = pt, ht.isX = !0;
}), tt.forEach(function(ht, pt) {
ht.index = pt;
}), st.concat(tt).forEach(function(ht) {
new R(J, ht);
}), F(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(st) {
et(st.selectedStaging, st.selected) && J.push(st);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, st) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
"caption",
void 0
), this.layOutTitles(st);
}, at.prototype.applyDescription = function(J, tt) {
var st = this, ht = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
ht = this.options[J] = q(!this.styledMode && { style: ht }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), ht && !pt && (pt = this.renderer.text(ht.text, 0, 0, ht.useHTML).attr({ align: ht.align, class: "highcharts-" + J, zIndex: ht.zIndex || 4 }).add(), pt.update = function(yt) {
st[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(ht.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], st = this.renderer, ht = this.spacingBox;
["title", "subtitle", "caption"].forEach(function(yt) {
var vt = this[yt], Ct = this.options[yt], Tt = Ct.verticalAlign || "top";
yt = yt === "title" ? Tt === "top" ? -3 : 0 : Tt === "top" ? tt[0] + 2 : 0;
var kt;
if (vt) {
this.styledMode || (kt = Ct.style && Ct.style.fontSize), kt = st.fontMetrics(kt, vt).b, vt.css({ width: (Ct.width || ht.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(L({ y: Tt === "bottom" ? kt : yt + kt, height: St }, Ct), !1, "spacingBox"), Ct.floating || (Tt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Tt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
}
}, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
this.titleOffset = tt, F(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
}, at.prototype.getChartSize = function() {
var J = this.options.chart, tt = J.width;
J = J.height;
var st = this.renderTo;
T(tt) || (this.containerWidth = Q(st, "width")), T(J) || (this.containerHeight = Q(st, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
}, at.prototype.temporaryDisplay = function(J) {
var tt = this.renderTo;
if (J)
for (; tt && tt.style; )
tt.hcOrigStyle && (j(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
else
for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), j(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
;
}, at.prototype.setClassName = function(J) {
this.container.className = "highcharts-container " + (J || "");
}, at.prototype.getContainer = function() {
var J = this.options, tt = J.chart, st = lt(), ht, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), V(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(A(pt, "data-highcharts-chart"));
G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
var vt = this.chartHeight;
if (j(pt, { overflow: "hidden" }), this.styledMode || (ht = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = st = D("div", { id: st }, ht, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : u)(st, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
void 0,
this
), this.setClassName(tt.className), this.styledMode)
for (var Ct in J.defs)
this.renderer.definition(J.defs[Ct]);
else
this.renderer.setStyle(tt.style);
this.renderer.chartIndex = this.index, F(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, st = this.margin, ht = this.titleOffset;
this.resetMargins(), ht[0] && !T(st[0]) && (this.plotTop = Math.max(this.plotTop, ht[0] + tt[0])), ht[2] && !T(st[2]) && (this.marginBottom = Math.max(this.marginBottom, ht[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
st,
tt
), F(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, ht = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
T(ht[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, st = tt.options.chart, ht = tt.renderTo, pt = T(st.width) && T(st.height), yt = st.width || Q(ht, "width");
st = st.height || Q(ht, "height"), ht = J ? J.target : l, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (ht === l || ht === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (P.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = o(l, "resize", function(st) {
tt.options && tt.reflow(st);
}), o(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, st) {
var ht = this, pt = ht.renderer;
ht.isResizing += 1, b(st, ht), st = pt.globalAnimation, ht.oldChartHeight = ht.chartHeight, ht.oldChartWidth = ht.chartWidth, typeof J < "u" && (ht.options.chart.width = J), typeof tt < "u" && (ht.options.chart.height = tt), ht.getChartSize(), ht.styledMode || (st ? B : j)(ht.container, { width: ht.chartWidth + "px", height: ht.chartHeight + "px" }, st), ht.setChartSize(!0), pt.setSize(ht.chartWidth, ht.chartHeight, st), ht.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), ht.isDirtyLegend = !0, ht.isDirtyBox = !0, ht.layOutTitles(), ht.getMargins(), ht.redraw(st), ht.oldChartHeight = null, F(ht, "resize"), dt(function() {
ht && F(ht, "endResize", null, function() {
--ht.isResizing;
});
}, C(st).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, st = this.renderer, ht = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Tt, kt, St, _t;
this.plotLeft = Tt = Math.round(this.plotLeft), this.plotTop = kt = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(ht - Tt - this.marginRight)), this.plotHeight = _t = Math.max(0, Math.round(pt - kt - this.marginBottom)), this.plotSizeX = tt ? _t : St, this.plotSizeY = tt ? St : _t, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = st.spacingBox = { x: vt[3], y: vt[0], width: ht - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.plotBox = { x: Tt, y: kt, width: St, height: _t }, tt = 2 * Math.floor(this.plotBorderWidth / 2), ht = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: ht, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - ht), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
Lt.setAxisSize(), Lt.setAxisTranslation();
}), st.alignElements()), F(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
F(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(st) {
var ht = tt[st], pt = z(ht) ? ht : [ht, ht, ht, ht];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[st][vt] = et(tt[st + yt], pt[vt]);
});
}), p.forEach(function(st, ht) {
J[st] = et(J.margin[ht], J.spacing[ht]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, st = this.chartWidth, ht = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Tt = J.plotBackgroundImage, kt = this.plotLeft, St = this.plotTop, _t = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "attr"), pt)
var Vt = be = Gt.strokeWidth();
else
Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
Gt[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: ht - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Tt && (yt ? (Tt !== yt.attr("href") && yt.attr("href", Tt), yt.animate(Nt)) : this.plotBGImage = tt.image(Tt, kt, St, _t, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[zt](Jt.crisp({ x: kt, y: St, width: _t, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, F(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, st = J.options.series, ht, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = n[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], ht = st && st.length; !yt && ht--; )
(pt = n[st[ht].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(st) {
st.linkedSeries.length = 0;
}), tt.forEach(function(st) {
var ht = st.options.linkedTo;
V(ht) && (ht = ht === ":previous" ? J.series[st.index - 1] : J.get(ht)) && ht.linkedParent !== st && (ht.linkedSeries.push(st), st.linkedParent = ht, ht.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, ht.options.visible, st.visible));
}), F(this, "afterLinkSeries");
}, at.prototype.renderSeries = function() {
this.series.forEach(function(J) {
J.translate(), J.render();
});
}, at.prototype.renderLabels = function() {
var J = this, tt = J.options.labels;
tt.items && tt.items.forEach(function(st) {
var ht = L(tt.style, st.style), pt = nt(ht.left) + J.plotLeft, yt = nt(ht.top) + J.plotTop + 12;
delete ht.left, delete ht.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(ht).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, st = this.renderer, ht = this.options, pt = function(kt) {
kt.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new $(this, ht.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), ht = this.plotWidth, J.some(function(kt) {
if (kt.horiz && kt.visible && kt.options.labels.enabled && kt.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(kt) {
kt.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < ht / this.plotWidth, Tt = 1.05 < vt / this.plotHeight;
(Ct || Tt) && (J.forEach(function(kt) {
(kt.horiz && Ct || !kt.horiz && Tt) && kt.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = st.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
}, at.prototype.addCredits = function(J) {
var tt = this, st = q(!0, this.options.credits, J);
st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
st.href && (l.location.href = st.href);
}).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(ht) {
tt.credits = tt.credits.destroy(), tt.addCredits(ht);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, st = J.series, ht = J.container, pt = ht && ht.parentNode, yt;
for (F(J, "destroy"), J.renderer.forExport ? f(a, J) : a[J.index] = void 0, H.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
tt[yt] = tt[yt].destroy();
for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = st.length; yt--; )
st[yt] = st[yt].destroy();
"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
var Ct = J[vt];
Ct && Ct.destroy && (J[vt] = Ct.destroy());
}), ht && (ht.innerHTML = O.emptyHTML, ct(ht), pt && X(ht)), it(J, function(vt, Ct) {
delete J[Ct];
});
}, at.prototype.firstRender = function() {
var J = this, tt = J.options;
(!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (k(tt.series) ? tt.series : []).forEach(function(st) {
J.initSeries(st);
}), J.linkSeries(), J.setSeriesData(), F(J, "beforeRender"), N && (U.isRequired() ? J.pointer = new U(J, tt) : J.pointer = new N(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
}, at.prototype.onload = function() {
this.callbacks.concat([this.callback]).forEach(function(J) {
J && typeof this.index < "u" && J.apply(this, [this]);
}, this), F(this, "load"), F(this, "render"), T(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, st) {
var ht = this, pt;
return J && (tt = et(tt, !0), F(ht, "addSeries", { options: J }, function() {
pt = ht.initSeries(J), ht.isDirtyLegend = !0, ht.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), F(ht, "afterAddSeries", { series: pt }), tt && ht.redraw(st);
})), pt;
}, at.prototype.addAxis = function(J, tt, st, ht) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: ht });
}, at.prototype.addColorAxis = function(J, tt, st) {
return this.createAxis(
"colorAxis",
{ axis: J, redraw: tt, animation: st }
);
}, at.prototype.createAxis = function(J, tt) {
return J = new R(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
}, at.prototype.showLoading = function(J) {
var tt = this, st = tt.options, ht = st.loading, pt = function() {
yt && j(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
}, yt = tt.loadingDiv, vt = tt.loadingSpan;
yt || (tt.loadingDiv = yt = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D("span", { className: "highcharts-loading-inner" }, null, yt), o(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (j(yt, L(ht.style, { zIndex: 10 })), j(vt, ht.labelStyle), tt.loadingShown || (j(yt, { opacity: 0, display: "" }), B(yt, { opacity: ht.style.opacity || 0.5 }, { duration: ht.showDuration || 0 }))), tt.loadingShown = !0, pt();
}, at.prototype.hideLoading = function() {
var J = this.options, tt = this.loadingDiv;
tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || B(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
j(tt, { display: "none" });
} })), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, st, ht) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Tt, kt;
F(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(J, pt.options), pt.userOptions = q(pt.userOptions, J);
var St = J.chart;
if (St) {
if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
pt.propFromSeries();
var _t = !0;
}
"alignTicks" in St && (_t = !0), "events" in St && x(this, St), it(St, function(Lt, Nt) {
pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Tt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : kt = !0);
}), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
}
!pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new d(J.time)), q(
!0,
pt.options.time,
J.time
)), it(J, function(Lt, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Tt = !0);
}), this.collectionsWithUpdate.forEach(function(Lt) {
if (J[Lt]) {
var Nt = [];
pt[Lt].forEach(function(Et, Kt) {
Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
}), gt(J[Lt]).forEach(function(Et, Kt) {
var Gt = T(Et.id), Wt;
Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && T(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
}), st && pt[Lt].forEach(function(Et) {
Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
});
}
}), Ct.forEach(function(Lt) {
Lt.chart && Lt.remove && Lt.remove(!1);
}), _t && pt.axes.forEach(function(Lt) {
Lt.update({}, !1);
}), Tt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
Lt.chart && Lt.update({}, !1);
}, this), _t = St && St.width, St = St && (V(St.height) ? rt(St.height, _t || pt.chartWidth) : St.height), kt || G(_t) && _t !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(_t, St, ht) : et(tt, !0) && pt.redraw(ht), F(pt, "afterUpdate", { options: J, redraw: tt, animation: ht });
}, at.prototype.setSubtitle = function(J, tt) {
this.applyDescription("subtitle", J), this.layOutTitles(tt);
}, at.prototype.setCaption = function(J, tt) {
this.applyDescription("caption", J), this.layOutTitles(tt);
}, at.prototype.showResetZoom = function() {
function J() {
tt.zoomOut();
}
var tt = this, st = s.lang, ht = tt.options.chart.resetZoomButton, pt = ht.theme, yt = pt.states, vt = ht.relativeTo === "chart" || ht.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
F(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: ht.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(ht.position, !1, vt);
}), F(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
F(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, st = tt.pointer, ht = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), st.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Tt = Ct.axis, kt = tt.inverted ? Tt.left : Tt.top, St = tt.inverted ? kt + Tt.width : kt + Tt.height, _t = Tt.isXAxis, Lt = !1;
(!_t && ht >= kt && ht <= St || _t || !T(ht)) && (Lt = !0), st[_t ? "zoomX" : "zoomY"] && Lt && (yt = Tt.zoom(Ct.min, Ct.max), Tt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && z(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
tt.options.chart.animation,
J && J.animation,
100 > tt.pointCount
));
}, at.prototype.pan = function(J, tt) {
var st = this, ht = st.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
F(this, "pan", { originalEvent: J }, function() {
ht && ht.forEach(function(St) {
St.setState();
});
var Tt = st.xAxis;
vt === "xy" ? Tt = Tt.concat(st.yAxis) : vt === "y" && (Tt = st.yAxis);
var kt = {};
Tt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var _t = St.horiz, Lt = J[_t ? "chartX" : "chartY"];
_t = _t ? "mouseDownX" : "mouseDownY";
var Nt = st[_t], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var zt = St.panningState;
!Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
}), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
Nt,
Wt,
!1,
!1,
{ trigger: "pan" }
), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Ct = !0), kt[_t] = Lt);
}
}), it(kt, function(St, _t) {
st[_t] = St;
}), Ct && st.redraw(!1), j(st.container, { cursor: "move" });
});
}, at;
}(), L(y.prototype, {
callbacks: [],
collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
collectionsWithUpdate: ["xAxis", "yAxis", "series"],
propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
}), y;
}), E(h, "Core/Legend/LegendSymbol.js", [h["Core/Utilities.js"]], function(y) {
var R = y.merge, I = y.pick, Z;
return function(H) {
H.drawLineMarker = function($) {
var U = this.options, W = $.symbolWidth, N = $.symbolHeight, w = N / 2, v = this.chart.renderer, u = this.legendGroup;
$ = $.baseline - Math.round(0.3 * $.fontMetrics.b);
var d = {}, P = U.marker;
this.chart.styledMode || (d = { "stroke-width": U.lineWidth || 0 }, U.dashStyle && (d.dashstyle = U.dashStyle)), this.legendLine = v.path([["M", 0, $], ["L", W, $]]).addClass("highcharts-graph").attr(d).add(u), P && P.enabled !== !1 && W && (U = Math.min(I(P.radius, w), w), this.symbol.indexOf("url") === 0 && (P = R(P, { width: N, height: N }), U = 0), this.legendSymbol = W = v.symbol(this.symbol, W / 2 - U, $ - U, 2 * U, 2 * U, P).addClass("highcharts-point").add(u), W.isMarker = !0);
}, H.drawRectangle = function($, U) {
var W = $.symbolHeight, N = $.options.squareSymbol;
U.legendSymbol = this.chart.renderer.rect(N ? ($.symbolWidth - W) / 2 : 0, $.baseline - W + 1, N ? W : $.symbolWidth, W, I($.options.symbolRadius, W / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(U.legendGroup);
};
}(Z || (Z = {})), Z;
}), E(h, "Core/Series/SeriesDefaults.js", [], function() {
return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
} }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
var y = this.series.chart.numberFormatter;
return typeof this.y != "number" ? "" : y(this.y, -1);
}, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
select: { animation: { duration: 0 } },
inactive: { animation: { duration: 50 }, opacity: 0.2 }
}, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
}), E(h, "Core/Series/Series.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Point.js"],
h["Core/Series/SeriesDefaults.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U, W, N, w) {
var v = y.animObject, u = y.setAnimation, d = R.defaultOptions, P = I.registerEventOptions, O = Z.hasTouch, B = Z.svg, C = Z.win, b = W.seriesTypes, M = w.addEvent, x = w.arrayMax, a = w.arrayMin, c = w.clamp, p = w.cleanRecursively, i = w.correctFloat, l = w.defined, s = w.erase, t = w.error, n = w.extend, o = w.find, A = w.fireEvent, _ = w.getNestedProperty, D = w.isArray, j = w.isNumber, T = w.isString, X = w.merge, f = w.objectEach, m = w.pick, L = w.removeEvent, Y = w.splat, F = w.syncTimeout;
return y = function() {
function Q() {
this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
}
return Q.prototype.init = function(k, G) {
A(this, "init", { options: G });
var z = this, V = k.series;
this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), n(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), P(this, G);
var q = G.events;
(q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
z[et + "Data"] || (z[et + "Data"] = []);
}), z.isCartesian && (k.hasCartesianSeries = !0);
var it;
V.length && (it = V[V.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert(V)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
}, Q.prototype.is = function(k) {
return b[k] && this instanceof b[k];
}, Q.prototype.insert = function(k) {
var G = this.options.index, z;
if (j(G)) {
for (z = k.length; z--; )
if (G >= m(k[z].options.index, k[z]._i)) {
k.splice(z + 1, 0, this);
break;
}
z === -1 && k.unshift(this), z += 1;
} else
k.push(this);
return m(z, k.length - 1);
}, Q.prototype.bindAxes = function() {
var k = this, G = k.options, z = k.chart, V;
A(this, "bindAxes", null, function() {
(k.axisTypes || []).forEach(function(q) {
var it = 0;
z[q].forEach(function(et) {
V = et.options, (G[q] === it && !V.isInternal || typeof G[q] < "u" && G[q] === V.id || typeof G[q] > "u" && V.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), V.isInternal || it++;
}), k[q] || k.optionalAxis === q || t(18, !0, z);
});
}), A(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(k, G) {
var z = k.series, V = arguments, q = j(G) ? function(it) {
var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
z[it + "Data"][G] = et;
} : function(it) {
Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call(V, 2));
};
z.parallelArrays.forEach(q);
}, Q.prototype.hasData = function() {
return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
}, Q.prototype.autoIncrement = function(k) {
var G = this.options, z = G.pointIntervalUnit, V = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), V && j(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), V && j(k) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var k = this.options;
n(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), l(k.pointRange) || (k.pointRange = 1);
}, Q.prototype.setOptions = function(k) {
var G = this.chart, z = G.options, V = z.plotOptions, q = G.userOptions || {};
k = X(k), G = G.styledMode;
var it = { plotOptions: V, userOptions: k };
A(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, V.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(d.tooltip, d.plotOptions.series && d.plotOptions.series.tooltip, d.plotOptions[this.type].tooltip, z.tooltip.userOptions, V.series && V.series.tooltip, V[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, V = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), V.push(z)), V.length && l(V[V.length - 1].value) && V.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(k, G, z) {
var V = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m(V.options.chart[k + "Count"], V[k + "Count"]);
if (!G) {
var rt = m(q[it], q["_" + it]);
l(rt) || (V.series.length || (V[et] = 0), q["_" + it] = rt = V[et] % nt, V[et] += 1), z && (G = z[rt]);
}
typeof rt < "u" && (this[it] = rt), this[k] = G;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || d.plotOptions[this.type].color, this.chart.options.colors);
}, Q.prototype.getPointsCollection = function() {
return (this.hasGroupedData ? this.points : this.data) || [];
}, Q.prototype.getSymbol = function() {
this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
}, Q.prototype.findPointIndex = function(k, G) {
var z = k.id, V = k.x, q = this.points, it = this.options.dataSorting, et, nt;
if (z)
it = this.chart.get(z), it instanceof $ && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === k.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === k.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === k.x;
}), et = o(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && j(V) && (rt = this.xData.indexOf(V, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && j(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(k, G) {
var z = this.options, V = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, k.forEach(function(lt, at) {
var J = l(lt) && this.pointClass.prototype.optionsToObject.call({ series: this }, lt) || {}, tt = J.x;
J.id || j(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(lt) : q[J] && lt !== z.data[J] ? (q[J].update(lt, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || V && V.enabled || this.hasDerivedData) && (rt = !0)) : it.push(lt);
}, this), rt)
for (k = q.length; k--; )
(ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
else
!nt || V && V.enabled ? dt = !1 : (k.forEach(function(lt, at) {
lt !== q[at].y && q[at].update && q[at].update(
lt,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(lt) {
lt && (lt.touched = !1);
}), dt ? (it.forEach(function(lt) {
this.addPoint(lt, !1, null, null, !1);
}, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = x(this.xData), this.autoIncrement()), !0) : !1;
}, Q.prototype.setData = function(k, G, z, V) {
var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, lt = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, st, ht = 0, pt = 1, yt = null;
k = k || [];
var vt = k.length;
if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), V !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(k), j(yt))
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else if (D(yt))
if (J)
if (yt.length === J)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else
for (z = 0; z < vt; z++)
V = k[z], lt[z] = V[0], at[z] = V.slice(
1,
J + 1
);
else if (tt && (ht = tt.indexOf("x"), pt = tt.indexOf("y"), ht = 0 <= ht ? ht : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), ht === pt)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z][pt];
else
for (z = 0; z < vt; z++)
V = k[z], lt[z] = V[ht], at[z] = V[pt];
else
t(12, !1, rt);
else
for (z = 0; z < vt; z++)
typeof k[z] < "u" && (V = { series: q }, q.pointClass.prototype.applyOptions.apply(V, [k[z]]), q.updateParallelArrays(V, z));
for (at && T(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
it[z] && it[z].destroy && it[z].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
}, Q.prototype.sortData = function(k) {
var G = this, z = G.options.dataSorting.sortKey || "y", V = function(q, it) {
return l(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return k.forEach(function(q, it) {
k[it] = V(G, q), k[it].index = it;
}, this), k.concat().sort(function(q, it) {
return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = V(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), k;
}, Q.prototype.getProcessedData = function(k) {
var G = this.xAxis, z = this.options, V = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
k = G && G.val2lin, z = !(!G || !G.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (G) {
gt = G.getExtremes();
var lt = gt.min, at = gt.max;
gt = G.categories && !G.names.length;
}
if (it && this.sorted && !q && (!V || dt > V || this.forceCrop)) {
if (nt[dt - 1] < lt || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < lt || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, lt, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for (V = nt.length || 1; --V; )
if (G = z ? k(nt[V]) - k(nt[V - 1]) : nt[V] - nt[V - 1], 0 < G && (typeof tt > "u" || G < tt))
var tt = G;
else
0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(k) {
var G = this.xAxis;
if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
return !1;
k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
}, Q.prototype.cropData = function(k, G, z, V, q) {
var it = k.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (k[et] >= z) {
nt = Math.max(0, et - q);
break;
}
for (z = et; z < it; z++)
if (k[z] > V) {
rt = z + q;
break;
}
return { xData: k.slice(nt, rt), yData: G.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var k = this.options, G = k.data, z = this.processedXData, V = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
var gt, dt, lt = this.data;
if (!lt && !nt) {
var at = [];
at.length = G.length, lt = this.data = at;
}
for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
if (at = et + dt, nt) {
var J = new q().init(this, [z[dt]].concat(Y(V[dt])));
J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, n(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = lt[at]) || typeof G[at] > "u" || (lt[at] = J = new q().init(this, G[at], z[dt]));
J && (J.index = nt ? k + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, lt && (it !== (gt = lt.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), lt[dt] && (lt[dt].destroyElements(), lt[dt].plotX = void 0);
this.data = lt, this.points = ct, A(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(k) {
return { min: a(k), max: x(k) };
}, Q.prototype.getExtremes = function(k, G) {
var z = this.xAxis, V = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
V = V ? V.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
k = k || this.stackedYData || this.processedYData || [];
var dt = k.length;
if (z) {
var lt = z.getExtremes();
rt = lt.min, ct = lt.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
lt = k[nt];
var J = (j(lt) || D(lt)) && (lt.length || 0 < lt || !V);
if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = lt.length)
for (; J--; )
j(lt[J]) && (it[gt++] = lt[J]);
else
it[gt++] = lt;
}
return k = { activeYData: it, dataMin: a(it), dataMax: x(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
}, Q.prototype.applyExtremes = function() {
var k = this.getExtremes();
return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
}, Q.prototype.getFirstValidPoint = function(k) {
for (var G = k.length, z = 0, V = null; V === null && z < G; )
V = k[z], z++;
return V;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var k = this.options, G = k.stacking, z = this.xAxis, V = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, lt = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var st = et[at], ht = st.x, pt = void 0, yt = void 0, vt = st.y, Ct = st.low, Tt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(ht)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(ht, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Tt && Tt[ht]) {
var kt = this.getStackIndicator(
kt,
ht,
this.index
);
st.isNull || (pt = Tt[ht], yt = pt.points[kt.key]);
}
if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && kt.key === Tt[ht].base && (Ct = m(j(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = l(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, j(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
pt,
-1e5,
1e5
))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(ht, 0, 0, 0, 1, rt)) : J, st.negative = st[lt] < (k[lt + "Threshold"] || gt || 0), st.category = V && typeof V[st.x] < "u" ? V[st.x] : st.x, !st.isNull && st.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
}
this.closestPointRangePx = tt, A(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(k, G, z) {
var V = this.chart;
return (k || this.points || []).filter(function(q) {
return G && !V.isInsidePlot(q.plotX, q.plotY, { inverted: V.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis, V = X(k.clipBox);
return G && G.len !== k.plotSizeX && (V.width = G.len), z && z.len !== k.plotSizeY && (V.height = z.len), V;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var k = this.chart, G = this.group, z = this.markerGroup, V = k.sharedClips;
k = k.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = V[it];
et ? et.animate(q) : V[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
}, Q.prototype.animate = function(k) {
var G = this.chart, z = this.group, V = this.markerGroup, q = G.inverted, it = v(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
if (k && z)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), V && V.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
G = this.getClipBox();
var ct = it.step;
V && V.element.childNodes.length && (it.step = function(gt, dt) {
ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
}), nt.addClass("highcharts-animating").animate(G, it);
}
}, Q.prototype.afterAnimate = function() {
var k = this;
this.setClip(), f(
this.chart.sharedClips,
function(G, z, V) {
G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete V[z]);
}
), this.finishedAnimating = !0, A(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var k = this.points, G = this.chart, z = this.options.marker, V = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
if (z.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < k.length; et++) {
var rt = k[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
var lt = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
var J = rt.isInside !== !1;
nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = G.renderer.symbol(lt, at.x, at.y, at.width, at.height, dt ? gt : z).add(V), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
} else
nt && (rt.graphic = nt.destroy());
}
}, Q.prototype.markerAttribs = function(k, G) {
var z = this.options, V = z.marker, q = k.marker || {}, it = q.symbol || V.symbol, et = m(q.radius, V.radius);
return G && (V = V.states[G], G = q.states && q.states[G], et = m(G && G.radius, V && V.radius, et + (V && V.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
}, Q.prototype.pointAttribs = function(k, G) {
var z = this.options.marker, V = k && k.options, q = V && V.marker || {}, it = V && V.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
return k = m(q.lineWidth, z.lineWidth), V = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, V = m(G.opacity, z.opacity, V), { stroke: et, "stroke-width": k, fill: it, opacity: V };
}, Q.prototype.destroy = function(k) {
var G = this, z = G.chart, V = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
(rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
}), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
G.clips && G.clips.forEach(function(ct) {
return ct.destroy();
}), w.clearTimeout(G.animationTimeout), f(G, function(ct, gt) {
ct instanceof N && !ct.survive && (it = V && gt === "group" ? "hide" : "destroy", ct[it]());
}), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), f(G, function(ct, gt) {
k && gt === "hcEvents" || delete G[gt];
});
}, Q.prototype.applyZones = function() {
var k = this, G = this.chart, z = G.renderer, V = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, lt, at, J, tt, st, ht, pt = !1;
if (V.length && (it || et) && rt && typeof rt.min < "u") {
var yt = rt.reversed, vt = rt.horiz;
it && !this.showLine && it.hide(), et && et.hide();
var Ct = rt.getExtremes();
V.forEach(function(Tt, kt) {
gt = yt ? vt ? G.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Tt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (lt = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (lt.x = G.plotHeight - lt.x)) : (lt = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (lt.y = G.plotWidth - lt.y)), ct && z.isVML && (lt = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: lt.width,
width: G.chartWidth
} : { x: lt.y - G.plotLeft - G.spacingBox.x, y: 0, width: lt.height, height: G.chartHeight }), q[kt] ? q[kt].animate(lt) : q[kt] = z.clipRect(lt), st = k["zone-area-" + kt], ht = k["zone-graph-" + kt], it && ht && ht.clip(q[kt]), et && st && st.clip(q[kt]), pt = Tt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
k.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(k) {
function G() {
["group", "markerGroup"].forEach(function(q) {
z[q] && (V.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
});
}
var z = this, V = z.chart;
z.xAxis && (z.eventsToUnbind.push(M(V, "resize", G)), G(), z.invertGroups = G);
}, Q.prototype.plotGroup = function(k, G, z, V, q) {
var it = this[k], et = !it;
return z = { visibility: z, zIndex: V || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (l(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis;
return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(k) {
k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
G();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var k = this, G = k.chart, z = k.options, V = v(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
G = !k.finishedAnimating && G.renderer.isSVG ? V.duration : 0, A(this, "render");
var ct = k.plotGroup("group", "series", q, it, nt);
k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && V.defer && (G += V.defer), k.animationTimeout = F(function() {
k.afterAnimate();
}, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
}, Q.prototype.redraw = function() {
var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, V = this.xAxis, q = this.yAxis;
z && (k.inverted && z.attr({
width: k.plotWidth,
height: k.plotHeight
}), z.animate({ translateX: m(V && V.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
}, Q.prototype.searchPoint = function(k, G) {
var z = this.xAxis, V = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? V.len - k.chartX + V.pos : k.chartY - V.pos }, G, k);
}, Q.prototype.buildKDTree = function(k) {
function G(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = z.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var z = this, V = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete z.kdTree, F(function() {
z.kdTree = G(z.getValidPoints(null, !z.directTouch), V, V), z.buildingKdTree = !1;
}, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(k, G, z) {
function V(rt, ct, gt, dt) {
var lt = ct.point, at = q.kdAxisArray[gt % dt], J = lt, tt = l(rt[it]) && l(lt[it]) ? Math.pow(rt[it] - lt[it], 2) : null, st = l(rt[et]) && l(lt[et]) ? Math.pow(rt[et] - lt[et], 2) : null;
return st = (tt || 0) + (st || 0), lt.dist = l(st) ? Math.sqrt(st) : Number.MAX_VALUE, lt.distX = l(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - lt[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = V(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : lt), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = V(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
}
var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = G ? "distX" : "dist";
if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
return V(
k,
this.kdTree,
G,
G
);
}, Q.prototype.pointPlacementToXValue = function() {
var k = this.options, G = k.pointRange, z = this.xAxis;
return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), j(k) ? k * (G || z.pointRange) : 0;
}, Q.prototype.isPointInside = function(k) {
var G = this.chart, z = this.xAxis, V = this.yAxis;
return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= (V ? V.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
}, Q.prototype.drawTracker = function() {
var k = this, G = k.options, z = G.trackByArea, V = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
q.hoverSeries !== k && k.onMouseOver();
}, gt = "rgba(192,192,192," + (B ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: V }) : k.graph && (k.tracker = et.path(V).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(lt) {
it.onTrackerMouseOut(lt);
}), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
})), A(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(k, G, z, V, q) {
var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
rt = rt && rt.hasNames && rt.names;
var ct = it.data, gt = this.xData, dt;
G = m(G, !0);
var lt = { series: this };
this.pointClass.prototype.applyOptions.apply(
lt,
[k]
);
var at = lt.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(lt, "splice", J, 0, 0), this.updateParallelArrays(lt, J), rt && lt.name && (rt[at] = lt.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(lt, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: lt }), this.isDirtyData = this.isDirty = !0, G && nt.redraw(V);
}, Q.prototype.removePoint = function(k, G, z) {
var V = this, q = V.data, it = q[k], et = V.points, nt = V.chart, rt = function() {
et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), V.options.data.splice(k, 1), V.updateParallelArrays(it || { series: V }, "splice", k, 1), it && it.destroy(), V.isDirty = !0, V.isDirtyData = !0, G && nt.redraw();
};
u(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(k, G, z, V) {
function q() {
it.destroy(V), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
}
var it = this, et = it.chart;
z !== !1 ? A(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(k, G) {
k = p(k, this.userOptions), A(this, "update", { options: k });
var z = this, V = z.chart, q = z.userOptions, it = z.initialType || z.type, et = V.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], lt = k.type || q.type || V.options.chart.type, at = !(this.hasDerivedData || lt && lt !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
if (lt = lt || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), k.data && (k.dataSorting && n(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = z[tt], delete z[tt];
}), et = !1, b[lt]) {
if (et = lt !== z.type, z.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(z, b[lt].prototype);
else {
rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
for (gt in nt)
z[gt] = void 0;
n(z, b[lt].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
}
} else
t(17, !0, V, { missingModuleFor: lt });
if (dt.forEach(function(tt) {
z[tt] = dt[tt];
}), z.init(V, k), at && this.points) {
var J = z.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && V.legend.destroyItem(tt));
}, this);
}
z.initialType = it, V.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && V.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(k) {
this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(k) {
var G = this.options[k], z = this.chart.options.plotOptions, V = this.userOptions[k];
return V ? G !== V : G !== m(
z && z[this.type] && z[this.type][k],
z && z.series && z.series[k],
G
);
}, Q.prototype.onMouseOver = function() {
var k = this.chart, G = k.hoverSeries;
k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var k = this.options, G = this.chart, z = G.tooltip, V = G.hoverPoint;
G.hoverSeries = null, V && V.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(k, G) {
var z = this, V = z.options, q = z.graph, it = V.inactiveOtherPoints, et = V.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = V.lineWidth, ct = 0, gt = V.opacity;
if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
}), z.state = k, !z.chart.styledMode)) {
if (et[k] && et[k].enabled === !1)
return;
if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
for (V = { "stroke-width": rt }, q.animate(V, nt); z["zone-graph-" + ct]; )
z["zone-graph-" + ct].animate(V, nt), ct += 1;
it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
G && it && z.points && z.setAllPointsToState(k || void 0);
}, Q.prototype.setAllPointsToState = function(k) {
this.points.forEach(function(G) {
G.setState && G.setState(k);
});
}, Q.prototype.setVisible = function(k, G) {
var z = this, V = z.chart, q = z.legendItem, it = V.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
z[rt] && z[rt][nt]();
}), (V.hoverSeries === z || (V.hoverPoint && V.hoverPoint.series) === z) && z.onMouseOut(), q && V.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && V.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), z.linkedSeries.forEach(function(rt) {
rt.setVisible(k, !1);
}), it && (V.isDirtyBox = !0), A(z, nt), G !== !1 && V.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(k) {
this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(k, G, z) {
return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
}, Q.defaultOptions = U, Q;
}(), n(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: H.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: $, requireSorting: !0, sorted: !0 }), W.series = y, y;
}), E(h, "Extensions/ScrollablePlotArea.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Series/Series.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $) {
var U = y.stop, W = $.addEvent, N = $.createElement, w = $.merge, v = $.pick;
W(I, "afterSetChartSize", function(u) {
var d = this.options.chart.scrollablePlotArea, P = d && d.minWidth;
if (d = d && d.minHeight, !this.renderer.forExport) {
if (P) {
if (this.scrollablePixelsX = P = Math.max(0, P - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += P, this.inverted ? this.clipBox.height += P : this.clipBox.width += P;
var O = { 1: { name: "right", value: P } };
}
} else
d && (this.scrollablePixelsY = P = Math.max(
0,
d - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += P, this.inverted ? this.clipBox.width += P : this.clipBox.height += P, O = { 2: { name: "bottom", value: P } });
O && !u.skipAxes && this.axes.forEach(function(B) {
O[B.side] ? B.getPlotLinePath = function() {
var C = O[B.side].name, b = this[C];
this[C] = b - O[B.side].value;
var M = R.prototype.getPlotLinePath.apply(this, arguments);
return this[C] = b, M;
} : (B.setAxisSize(), B.setAxisTranslation());
});
}
}), W(I, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), I.prototype.setUpScrolling = function() {
var u = this, d = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (d.overflowX = "auto"), this.scrollablePixelsY && (d.overflowY = "auto"), this.scrollingParent = N("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = N(
"div",
{ className: "highcharts-scrolling" },
d,
this.scrollingParent
), W(this.scrollingContainer, "scroll", function() {
u.pointer && delete u.pointer.chartPosition;
}), this.innerContainer = N("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, I.prototype.moveFixedElements = function() {
var u = this.container, d = this.fixedRenderer, P = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && P.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), P.forEach(function(B) {
[].forEach.call(u.querySelectorAll(B), function(C) {
(C.namespaceURI === d.SVG_NS ? d.box : d.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
});
});
}, I.prototype.applyFixed = function() {
var u = !this.fixedDiv, d = this.options.chart, P = d.scrollablePlotArea, O = H.getRendererType();
u ? (this.fixedDiv = N("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (d.style && d.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = d = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = d.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": v(P.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), W(this, "afterShowResetZoom", this.moveFixedElements), W(this, "afterDrilldown", this.moveFixedElements), W(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || u) && (this.scrollableDirty = !1, this.moveFixedElements()), d = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), U(this.container), this.container.style.width = d + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: d, height: O, viewBox: [0, 0, d, O].join(" ") }), this.chartBackground.attr({ width: d, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", u && (P.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * P.scrollPositionX), P.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * P.scrollPositionY)), O = this.axisOffset, u = this.plotTop - O[0] - 1, P = this.plotLeft - O[3] - 1, d = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var B = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
u = this.scrollablePixelsX ? [["M", 0, u], ["L", this.plotLeft - 1, u], ["L", this.plotLeft - 1, d], ["L", 0, d], ["Z"], ["M", B, u], ["L", this.chartWidth, u], ["L", this.chartWidth, d], ["L", B, d], ["Z"]] : this.scrollablePixelsY ? [["M", P, 0], ["L", P, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", P, C], ["L", P, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: u });
}, W(R, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), W(Z, "show", function() {
this.chart.scrollableDirty = !0;
});
}), E(h, "Core/Axis/StackingAxis.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.getDeferredAnimation, H = I.addEvent, $ = I.destroyObjectProperties, U = I.fireEvent, W = I.isNumber, N = I.objectEach, w;
return function(v) {
function u() {
var B = this.stacking;
if (B) {
var C = B.stacks;
N(C, function(b, M) {
$(b), C[M] = null;
}), B && B.stackTotalGroup && B.stackTotalGroup.destroy();
}
}
function d() {
this.stacking || (this.stacking = new O(this));
}
var P = [];
v.compose = function(B) {
return P.indexOf(B) === -1 && (P.push(B), H(B, "init", d), H(B, "destroy", u)), B;
};
var O = function() {
function B(C) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
}
return B.prototype.buildStacks = function() {
var C = this.axis, b = C.series, M = C.options.reversedStacks, x = b.length, a;
if (!C.isXAxis) {
for (this.usePercentage = !1, a = x; a--; ) {
var c = b[M ? a : x - a - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (a = 0; a < x; a++)
b[a].modifyStacks();
U(C, "afterBuildStacks");
}
}, B.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var C = this.stacks = this.oldStacks;
N(C, function(b) {
N(b, function(M) {
M.cumulative = M.total;
});
});
}
}, B.prototype.resetStacks = function() {
var C = this, b = C.stacks;
C.axis.isXAxis || N(b, function(M) {
N(
M,
function(x, a) {
W(x.touched) && x.touched < C.stacksTouched ? (x.destroy(), delete M[a]) : (x.total = null, x.cumulative = null);
}
);
});
}, B.prototype.renderStackTotals = function() {
var C = this.axis, b = C.chart, M = b.renderer, x = this.stacks;
C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
var a = this.stackTotalGroup = this.stackTotalGroup || M.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
a.translate(b.plotLeft, b.plotTop), N(x, function(c) {
N(c, function(p) {
p.render(a);
});
}), a.animate(
{ opacity: 1 },
C
);
}, B;
}();
v.Additions = O;
}(w || (w = {})), w;
}), E(h, "Extensions/Stacking.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Axis/StackingAxis.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U) {
var W = I.format, N = U.correctFloat, w = U.defined, v = U.destroyObjectProperties, u = U.isArray, d = U.isNumber, P = U.objectEach, O = U.pick, B = function() {
function C(b, M, x, a, c) {
var p = b.chart.inverted;
this.axis = b, this.isNegative = x, this.options = M = M || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: M.align || (p ? x ? "left" : "right" : "center"), verticalAlign: M.verticalAlign || (p ? "middle" : x ? "bottom" : "top"), y: M.y, x: M.x }, this.textAlign = M.textAlign || (p ? x ? "right" : "left" : "center");
}
return C.prototype.destroy = function() {
v(this, this.axis);
}, C.prototype.render = function(b) {
var M = this.axis.chart, x = this.options, a = x.format;
a = a ? W(a, this, M) : x.formatter.call(this), this.label ? this.label.attr({
text: a,
visibility: "hidden"
}) : (this.label = M.renderer.label(a, null, null, x.shape, null, null, x.useHTML, !1, "stack-labels"), a = { r: x.borderRadius || 0, text: a, rotation: x.rotation, padding: O(x.padding, 5), visibility: "hidden" }, M.styledMode || (a.fill = x.backgroundColor, a.stroke = x.borderColor, a["stroke-width"] = x.borderWidth, this.label.css(x.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = M.plotSizeY;
}, C.prototype.setOffset = function(b, M, x, a, c) {
var p = this.axis, i = p.chart;
a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), x = p.translate(x || 0), x = w(a) && Math.abs(a - x), b = O(c, i.xAxis[0].translate(this.x)) + b, p = w(a) && this.getStackBox(i, this, b, a, M, x, p), M = this.label, x = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var l = this.textAlign;
M && p && (c = M.getBBox(), a = M.padding, l = l === "left" ? i.inverted ? -a : a : l === "right" ? c.width : i.inverted && l === "center" ? c.width / 2 : i.inverted ? x ? c.width + a : -a : c.width / 2, x = i.inverted ? c.height / 2 : x ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= l, p.y -= x, M.align(this.alignOptions, null, p), i.isInsidePlot(M.alignAttr.x + l - this.alignOptions.x, M.alignAttr.y + x - this.alignOptions.y) ? M.show() : (M.alignAttr.y = -9999, b = !1), b && H.prototype.justifyDataLabel.call(this.axis, M, this.alignOptions, M.alignAttr, c, p), M.attr({ x: M.alignAttr.x, y: M.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = d(M.x) && d(M.y) && i.isInsidePlot(M.x - a + M.width, M.y) && i.isInsidePlot(M.x + a, M.y)) || M.hide()));
}, C.prototype.getStackBox = function(b, M, x, a, c, p, i) {
var l = M.axis.reversed, s = b.inverted, t = i.height + i.pos - (s ? b.plotLeft : b.plotTop);
return M = M.isNegative && !l || !M.isNegative && l, { x: s ? M ? a - i.right : a - p + i.pos - b.plotLeft : x + b.xAxis[0].transB - b.plotLeft, y: s ? i.height - x - c : M ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
}, C;
}();
return R.prototype.getStacks = function() {
var C = this, b = C.inverted;
C.yAxis.forEach(function(M) {
M.stacking && M.stacking.stacks && M.hasVisibleSeries && (M.stacking.oldStacks = M.stacking.stacks);
}), C.series.forEach(function(M) {
var x = M.xAxis && M.xAxis.options || {};
!M.options.stacking || M.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (M.stackKey = [M.type, O(M.options.stack, ""), b ? x.top : x.left, b ? x.height : x.width].join());
});
}, $.compose(y), H.prototype.setGroupedPoints = function() {
var C = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? H.prototype.setStackedPoints.call(this, "group") : C && P(C.stacks, function(b, M) {
M.slice(-5) === "group" && (P(b, function(x) {
return x.destroy();
}), delete C.stacks[M]);
});
}, H.prototype.setStackedPoints = function(C) {
var b = C || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var M = this.processedXData, x = this.processedYData, a = [], c = x.length, p = this.options, i = p.threshold, l = O(p.startFromThreshold && i, 0);
p = p.stack, C = C ? this.type + "," + b : this.stackKey;
var s = "-" + C, t = this.negStacks, n = this.yAxis, o = n.stacking.stacks, A = n.stacking.oldStacks, _, D;
for (n.stacking.stacksTouched += 1, D = 0; D < c; D++) {
var j = M[D], T = x[D], X = this.getStackIndicator(
X,
j,
this.index
), f = X.key, m = (_ = t && T < (l ? 0 : i)) ? s : C;
o[m] || (o[m] = {}), o[m][j] || (A[m] && A[m][j] ? (o[m][j] = A[m][j], o[m][j].total = null) : o[m][j] = new B(n, n.options.stackLabels, _, j, p)), m = o[m][j], T !== null ? (m.points[f] = m.points[this.index] = [O(m.cumulative, l)], w(m.cumulative) || (m.base = f), m.touched = n.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[f][0] = m.points[this.index + "," + j + ",0"][0])) : m.points[f] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : s, t && o[_] && o[_][j] ? (_ = o[_][j], m.total = _.total = Math.max(_.total, m.total) + Math.abs(T) || 0) : m.total = N(m.total + (Math.abs(T) || 0))) : b === "group" ? (u(T) && (T = T[0]), T !== null && (m.total = (m.total || 0) + 1)) : m.total = N(m.total + (T || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, l) + (T || 0), T !== null && (m.points[f].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (n.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), n.stacking.oldStacks = {};
}
}, H.prototype.modifyStacks = function() {
var C = this, b = C.stackKey, M = C.yAxis.stacking.stacks, x = C.processedXData, a, c = C.options.stacking;
C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
for (var i = x.length, l, s; i--; )
l = x[i], a = C.getStackIndicator(a, l, C.index, p), (s = (l = M[p] && M[p][l]) && l.points[a.key]) && C[c + "Stacker"](s, l, i);
});
}, H.prototype.percentStacker = function(C, b, M) {
b = b.total ? 100 / b.total : 0, C[0] = N(C[0] * b), C[1] = N(C[1] * b), this.stackedYData[M] = C[1];
}, H.prototype.getStackIndicator = function(C, b, M, x) {
return !w(C) || C.x !== b || x && C.key !== x ? C = { x: b, index: 0, key: x } : C.index++, C.key = [M, b, C.index].join(), C;
}, Z.StackItem = B, Z.StackItem;
}), E(h, "Series/Line/LineSeries.js", [h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), H = I.defined, $ = I.merge;
return I = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return Z(W, U), W.prototype.drawGraph = function() {
var N = this, w = this.options, v = (this.gappedPath || this.getGraphPath).call(this), u = this.chart.styledMode, d = [["graph", "highcharts-graph"]];
u || d[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), d = N.getZonesGraphs(d), d.forEach(function(P, O) {
var B = P[0], C = N[B], b = C ? "animate" : "attr";
C ? (C.endX = N.preventGraphAnimation ? null : v.xMap, C.animate({ d: v })) : v.length && (N[B] = C = N.chart.renderer.path(v).addClass(P[1]).attr({ zIndex: 1 }).add(N.group)), C && !u && (B = { stroke: P[2], "stroke-width": w.lineWidth, fill: N.fillGraph && N.color || "none" }, P[3] ? B.dashstyle = P[3] : w.linecap !== "square" && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), C[b](B).shadow(2 > O && w.shadow)), C && (C.startX = v.xMap, C.isArea = v.isArea);
});
}, W.prototype.getGraphPath = function(N, w, v) {
var u = this, d = u.options, P = [], O = [], B, C = d.step;
N = N || u.points;
var b = N.reversed;
return b && N.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), N = this.getValidPoints(N, !1, !(d.connectNulls && !w && !v)), N.forEach(function(M, x) {
var a = M.plotX, c = M.plotY, p = N[x - 1];
(M.leftCliff || p && p.rightCliff) && !v && (B = !0), M.isNull && !H(w) && 0 < x ? B = !d.connectNulls : M.isNull && !w ? B = !0 : (x === 0 || B ? x = [["M", M.plotX, M.plotY]] : u.getPointSpline ? x = [u.getPointSpline(N, M, x)] : C ? (x = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], x.push(["L", a, c])) : x = [["L", a, c]], O.push(M.x), C && (O.push(M.x), C === 2 && O.push(M.x)), P.push.apply(P, x), B = !1);
}), P.xMap = O, u.graphPath = P;
}, W.prototype.getZonesGraphs = function(N) {
return this.zones.forEach(function(w, v) {
v = ["zone-graph-" + v, "highcharts-graph highcharts-zone-graph-" + v + " " + (w.className || "")], this.chart.styledMode || v.push(w.color || this.color, w.dashStyle || this.options.dashStyle), N.push(v);
}, this), N;
}, W.defaultOptions = $(y.defaultOptions, {}), W;
}(y), R.registerSeriesType("line", I), I;
}), E(h, "Series/Area/AreaSeries.js", [
h["Core/Color/Color.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z) {
var H = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}(), $ = y.parse, U = I.seriesTypes.line;
y = Z.extend;
var W = Z.merge, N = Z.objectEach, w = Z.pick;
return Z = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.data = void 0, d.options = void 0, d.points = void 0, d;
}
return H(u, v), u.prototype.drawGraph = function() {
this.areaPath = [], v.prototype.drawGraph.apply(this);
var d = this, P = this.areaPath, O = this.options, B = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(C, b) {
B.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || d.color, C.fillColor || O.fillColor]);
}), B.forEach(function(C) {
var b = C[0], M = d[b], x = M ? "animate" : "attr", a = {};
M ? (M.endX = d.preventGraphAnimation ? null : P.xMap, M.animate({ d: P })) : (a.zIndex = 0, M = d[b] = d.chart.renderer.path(P).addClass(C[1]).add(d.group), M.isArea = !0), d.chart.styledMode || (a.fill = w(C[3], $(C[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), M[x](a), M.startX = P.xMap, M.shiftUnit = O.step ? 2 : 1;
});
}, u.prototype.getGraphPath = function(d) {
var P = U.prototype.getGraphPath, O = this.options, B = O.stacking, C = this.yAxis, b, M = [], x = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
O = w(O.connectNulls, B === "percent");
var l = function(o, A, _) {
var D = d[o];
o = B && c[D.x].points[a];
var j = D[_ + "Null"] || 0;
if (_ = D[_ + "Cliff"] || 0, D = !0, _ || j) {
var T = (j ? o[0] : o[1]) + _, X = o[0] + _;
D = !!j;
} else
!B && d[A] && d[A].isNull && (T = X = p);
typeof T < "u" && (x.push({ plotX: t, plotY: T === null ? i : C.getThreshold(T), isNull: D, isCliff: !0 }), M.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
};
for (d = d || this.points, B && (d = this.getStackPoints(d)), b = 0; b < d.length; b++) {
B || (d[b].leftCliff = d[b].rightCliff = d[b].leftNull = d[b].rightNull = void 0);
var s = d[b].isNull, t = w(d[b].rectPlotX, d[b].plotX), n = B ? w(d[b].yBottom, i) : i;
(!s || O) && (O || l(b, b - 1, "left"), s && !B && O || (x.push(d[b]), M.push({ x: b, plotX: t, plotY: n })), O || l(b, b + 1, "right"));
}
return b = P.call(this, x, !0, !0), M.reversed = !0, s = P.call(this, M, !0, !0), (n = s[0]) && n[0] === "M" && (s[0] = ["L", n[1], n[2]]), s = b.concat(s), s.length && s.push(["Z"]), P = P.call(this, x, !1, O), s.xMap = b.xMap, this.areaPath = s, P;
}, u.prototype.getStackPoints = function(d) {
var P = this, O = [], B = [], C = this.xAxis, b = this.yAxis, M = b.stacking.stacks[this.stackKey], x = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(P);
if (d = d || this.points, this.options.stacking) {
for (var l = 0; l < d.length; l++)
d[l].leftNull = d[l].rightNull = void 0, x[d[l].x] = d[l];
N(M, function(t, n) {
t.total !== null && B.push(n);
}), B.sort(function(t, n) {
return t - n;
});
var s = a.map(function(t) {
return t.visible;
});
B.forEach(function(t, n) {
var o = 0, A, _;
if (x[t] && !x[t].isNull)
O.push(x[t]), [-1, 1].forEach(function(j) {
var T = j === 1 ? "rightNull" : "leftNull", X = 0, f = M[B[n + j]];
if (f)
for (var m = i; 0 <= m && m < c; ) {
var L = a[m].index;
A = f.points[L], A || (L === P.index ? x[t][T] = !0 : s[m] && (_ = M[t].points[L]) && (X -= _[1] - _[0])), m += p;
}
x[t][j === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var D = i; 0 <= D && D < c; ) {
if (A = M[t].points[a[D].index]) {
o = A[1];
break;
}
D += p;
}
o = w(o, 0), o = b.translate(o, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: o, yBottom: o });
}
});
}
return O;
}, u.defaultOptions = W(U.defaultOptions, { threshold: 0 }), u;
}(U), y(Z.prototype, {
singleStacks: !1,
drawLegendSymbol: R.drawRectangle
}), I.registerSeriesType("area", Z), Z;
}), E(h, "Series/Spline/SplineSeries.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R) {
var I = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), Z = y.seriesTypes.line, H = R.merge, $ = R.pick;
return R = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return I(W, U), W.prototype.getPointSpline = function(N, w, v) {
var u = w.plotX || 0, d = w.plotY || 0, P = N[v - 1];
if (v = N[v + 1], P && !P.isNull && P.doCurve !== !1 && !w.isCliff && v && !v.isNull && v.doCurve !== !1 && !w.isCliff) {
N = P.plotY || 0;
var O = v.plotX || 0;
v = v.plotY || 0;
var B = 0, C = (1.5 * u + (P.plotX || 0)) / 2.5, b = (1.5 * d + N) / 2.5;
O = (1.5 * u + O) / 2.5;
var M = (1.5 * d + v) / 2.5;
O !== C && (B = (M - b) * (O - u) / (O - C) + d - M), b += B, M += B, b > N && b > d ? (b = Math.max(N, d), M = 2 * d - b) : b < N && b < d && (b = Math.min(N, d), M = 2 * d - b), M > v && M > d ? (M = Math.max(v, d), b = 2 * d - M) : M < v && M < d && (M = Math.min(v, d), b = 2 * d - M), w.rightContX = O, w.rightContY = M;
}
return w = ["C", $(P.rightContX, P.plotX, 0), $(P.rightContY, P.plotY, 0), $(C, u, 0), $(b, d, 0), u, d], P.rightContX = P.rightContY = void 0, w;
}, W.defaultOptions = H(Z.defaultOptions), W;
}(Z), y.registerSeriesType("spline", R), R;
}), E(
h,
"Series/AreaSpline/AreaSplineSeries.js",
[h["Series/Area/AreaSeries.js"], h["Series/Spline/SplineSeries.js"], h["Core/Legend/LegendSymbol.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, R, I, Z, H) {
var $ = this && this.__extends || function() {
var w = function(v, u) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, P) {
d.__proto__ = P;
} || function(d, P) {
for (var O in P)
P.hasOwnProperty(O) && (d[O] = P[O]);
}, w(v, u);
};
return function(v, u) {
function d() {
this.constructor = v;
}
w(v, u), v.prototype = u === null ? Object.create(u) : (d.prototype = u.prototype, new d());
};
}(), U = y.prototype, W = H.extend, N = H.merge;
return H = function(w) {
function v() {
var u = w !== null && w.apply(this, arguments) || this;
return u.data = void 0, u.points = void 0, u.options = void 0, u;
}
return $(v, w), v.defaultOptions = N(R.defaultOptions, y.defaultOptions), v;
}(R), W(H.prototype, { getGraphPath: U.getGraphPath, getStackPoints: U.getStackPoints, drawGraph: U.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", H), H;
}
), E(h, "Series/Column/ColumnSeries.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H, $, U) {
var W = this && this.__extends || function() {
var c = function(p, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, s) {
l.__proto__ = s;
} || function(l, s) {
for (var t in s)
s.hasOwnProperty(t) && (l[t] = s[t]);
}, c(p, i);
};
return function(p, i) {
function l() {
this.constructor = p;
}
c(p, i), p.prototype = i === null ? Object.create(i) : (l.prototype = i.prototype, new l());
};
}(), N = y.animObject, w = R.parse, v = I.hasTouch;
y = I.noop;
var u = U.clamp, d = U.css, P = U.defined, O = U.extend, B = U.fireEvent, C = U.isArray, b = U.isNumber, M = U.merge, x = U.pick, a = U.objectEach;
return U = function(c) {
function p() {
var i = c !== null && c.apply(this, arguments) || this;
return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
}
return W(p, c), p.prototype.animate = function(i) {
var l = this, s = this.yAxis, t = l.options, n = this.chart.inverted, o = {}, A = n ? "translateX" : "translateY";
if (i)
o.scaleY = 1e-3, i = u(s.toPixels(t.threshold), s.pos, s.pos + s.len), n ? o.translateX = i - s.len : o.translateY = i, l.clipBox && l.setClip(), l.group.attr(o);
else {
var _ = Number(l.group.attr(A));
l.group.animate({ scaleY: 1 }, O(N(l.options.animation), { step: function(D, j) {
l.group && (o[A] = _ + j.pos * (s.pos - _), l.group.attr(o));
} }));
}
}, p.prototype.init = function(i, l) {
c.prototype.init.apply(this, arguments);
var s = this;
i = s.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === s.type && (t.isDirty = !0);
});
}, p.prototype.getColumnMetrics = function() {
var i = this, l = i.options, s = i.xAxis, t = i.yAxis, n = s.options.reversedStacks;
n = s.reversed && !n || !s.reversed && n;
var o = {}, A, _ = 0;
l.grouping === !1 ? _ = 1 : i.chart.series.forEach(function(X) {
var f = X.yAxis, m = X.options;
if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === f.len && t.pos === f.pos) {
if (m.stacking && m.stacking !== "group") {
A = X.stackKey, typeof o[A] > "u" && (o[A] = _++);
var L = o[A];
} else
m.grouping !== !1 && (L = _++);
X.columnIndex = L;
}
});
var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || l.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), j = D * l.groupPadding, T = (D - 2 * j) / (_ || 1);
return l = Math.min(l.maxPointWidth || s.len, x(l.pointWidth, T * (1 - 2 * l.pointPadding))), i.columnMetrics = { width: l, offset: (T - l) / 2 + (j + ((i.columnIndex || 0) + (n ? 1 : 0)) * T - D / 2) * (n ? -1 : 1), paddedWidth: T, columnCount: _ }, i.columnMetrics;
}, p.prototype.crispCol = function(i, l, s, t) {
var n = this.chart, o = this.borderWidth, A = -(o % 2 ? 0.5 : 0);
return o = o % 2 ? 0.5 : 1, n.inverted && n.renderer.isVML && (o += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(l + t) + o, A = 0.5 >= Math.abs(l) && 0.5 < t, l = Math.round(l) + o, t -= l, A && t && (--l, t += 1), { x: i, y: l, width: s, height: t };
}, p.prototype.adjustForMissingColumns = function(i, l, s, t) {
var n = this, o = this.options.stacking;
if (!s.isNull && 1 < t.columnCount) {
var A = 0, _ = 0;
a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
if (typeof s.x == "number" && (D = D[s.x.toString()])) {
var j = D.points[n.index], T = D.total;
o ? (j && (A = _), D.hasValidPoints && _++) : C(j) && (A = j[1], _ = T || 0);
}
}), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + l) / 2 - l - A * t.paddedWidth;
}
return i;
}, p.prototype.translate = function() {
var i = this, l = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = x(s.borderWidth, t ? 0 : 1);
var n = i.xAxis, o = i.yAxis, A = s.threshold, _ = i.translatedThreshold = o.getThreshold(A), D = x(s.minPointLength, 5), j = i.getColumnMetrics(), T = j.width, X = i.pointXOffset = j.offset, f = i.dataMin, m = i.dataMax, L = i.barW = Math.max(T, 1 + 2 * t);
l.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), H.prototype.translate.apply(i), i.points.forEach(function(Y) {
var F = x(Y.yBottom, _), Q = 999 + Math.abs(F), k = Y.plotX || 0;
Q = u(Y.plotY, -Q, o.len + Q);
var G = Math.min(Q, F), z = Math.max(Q, F) - G, V = T, q = k + X, it = L;
D && Math.abs(z) < D && (z = D, k = !o.reversed && !Y.negative || o.reversed && Y.negative, b(A) && b(m) && Y.y === A && m <= A && (o.min || 0) < A && (f !== m || (o.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? F - D : _ - (k ? D : 0)), P(Y.options.pointWidth) && (V = it = Math.ceil(Y.options.pointWidth), q -= Math.round((V - T) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, V, Y, j)), Y.barX = q, Y.pointWidth = V, Y.tooltipPos = l.inverted ? [u(o.len + o.pos - l.plotLeft - Q, o.pos - l.plotLeft, o.len + o.pos - l.plotLeft), n.len + n.pos - l.plotTop - q - it / 2, z] : [n.left - l.plotLeft + q + it / 2, u(Q + o.pos - l.plotTop, o.pos - l.plotTop, o.len + o.pos - l.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
});
}, p.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, p.prototype.pointAttribs = function(i, l) {
var s = this.options, t = this.pointAttrToOptions || {}, n = t.stroke || "borderColor", o = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[n] || s[n] || A;
t = i && i.options.dashStyle || s.dashStyle;
var D = i && i[o] || s[o] || this[o] || 0, j = x(i && i.opacity, s.opacity, 1);
if (i && this.zones.length) {
var T = i.getZone();
A = i.options.color || T && (T.color || i.nonZonedColor) || this.color, T && (_ = T.borderColor || _, t = T.dashStyle || t, D = T.borderWidth || D);
}
return l && i && (i = M(s.states[l], i.options.states && i.options.states[l] || {}), l = i.brightness, A = i.color || typeof l < "u" && w(A).brighten(i.brightness).get() || A, _ = i[n] || _, D = i[o] || D, t = i.dashStyle || t, j = x(i.opacity, j)), n = { fill: A, stroke: _, "stroke-width": D, opacity: j }, t && (n.dashstyle = t), n;
}, p.prototype.drawPoints = function() {
var i = this, l = this.chart, s = i.options, t = l.renderer, n = s.animationLimit || 250, o;
i.points.forEach(function(A) {
var _ = A.graphic, D = !!_, j = _ && l.pointCount < n ? "animate" : "attr";
b(A.plotY) && A.y !== null ? (o = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(o && o.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](o).add(A.group || i.group)) && i.enabledDataSorting && l.hasRendered && l.pointCount < n && (_.attr({ x: A.startXPos }), D = !0, j = "animate"), _ && D && _[j](M(o)), s.borderRadius && _[j]({ r: s.borderRadius }), l.styledMode || _[j](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
});
}, p.prototype.drawTracker = function() {
var i = this, l = i.chart, s = l.pointer, t = function(o) {
var A = s.getPointFromEvent(o);
typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(o));
}, n;
i.points.forEach(function(o) {
n = C(o.dataLabels) ? o.dataLabels : o.dataLabel ? [o.dataLabel] : [], o.graphic && (o.graphic.element.point = o), n.forEach(function(A) {
A.div ? A.div.point = o : A.element.point = o;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(o) {
i[o] && (i[o].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
s.onTrackerMouseOut(A);
}), v && i[o].on(
"touchstart",
t
), !l.styledMode && i.options.cursor && i[o].css(d).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), B(this, "afterDrawTracker");
}, p.prototype.remove = function() {
var i = this, l = i.chart;
l.hasRendered && l.series.forEach(function(s) {
s.type === i.type && (s.isDirty = !0);
}), H.prototype.remove.apply(i, arguments);
}, p.defaultOptions = M(H.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
hover: { halo: !1, brightness: 0.1 },
select: { color: "#cccccc", borderColor: "#000000" }
}, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), p;
}(H), O(U.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), $.registerSeriesType("column", U), U;
}), E(h, "Core/Series/DataLabel.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Utilities.js"]
], function(y, R, I) {
var Z = y.getDeferredAnimation, H = R.format, $ = I.defined, U = I.extend, W = I.fireEvent, N = I.isArray, w = I.merge, v = I.objectEach, u = I.pick, d = I.splat, P;
return function(O) {
function B(p, i, l, s, t) {
var n = this, o = this.chart, A = this.isCartesian && o.inverted, _ = this.enabledDataSorting, D = u(p.dlBox && p.dlBox.centerX, p.plotX, -9999), j = u(p.plotY, -9999), T = i.getBBox(), X = l.rotation, f = l.align, m = o.isInsidePlot(D, Math.round(j), { inverted: A, paneCoordinates: !0, series: n }), L = function(k) {
_ && n.xAxis && !Y && n.setDataLabelStartPos(
p,
i,
t,
m,
k
);
}, Y = u(l.overflow, _ ? "none" : "justify") === "justify", F = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || u(l.inside, !!this.options.stacking) && s && o.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: n }));
if (F) {
var Q = o.renderer.fontMetrics(o.styledMode ? void 0 : l.style.fontSize, i).b;
s = U({ x: A ? this.yAxis.len - j : D, y: Math.round(A ? this.xAxis.len - D : j), width: 0, height: 0 }, s), U(l, { width: T.width, height: T.height }), X ? (Y = !1, D = o.renderer.rotCorr(Q, X), D = { x: s.x + (l.x || 0) + s.width / 2 + D.x, y: s.y + (l.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[l.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: f }), L = (X + 720) % 360, L = 180 < L && 360 > L, f === "left" ? D.y -= L ? T.height : 0 : f === "center" ? (D.x -= T.width / 2, D.y -= T.height / 2) : f === "right" && (D.x -= T.width, D.y -= L ? 0 : T.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(l, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, l, D, T, s, t) : u(l.crop, !0) && (F = o.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: n }) && o.isInsidePlot(D.x + T.width, D.y + T.height, {
paneCoordinates: !0,
series: n
})), l.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? o.plotWidth - p.plotY : p.plotX, anchorY: A ? o.plotHeight - p.plotX : p.plotY });
}
t && _ && (i.placed = !1), F || _ && !Y || (i.hide(!0), i.placed = !1);
}
function C(p, i) {
var l = i.filter;
return l ? (i = l.operator, p = p[l.property], l = l.value, i === ">" && p > l || i === "<" && p < l || i === ">=" && p >= l || i === "<=" && p <= l || i === "==" && p == l || i === "===" && p === l) : !0;
}
function b() {
var p = this, i = p.chart, l = p.options, s = p.points, t = p.hasRendered || 0, n = i.renderer, o = l.dataLabels, A, _ = o.animation;
if (_ = o.defer ? Z(
i,
_,
p
) : { defer: 0, duration: 0 }, o = x(x(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[p.type] && i.options.plotOptions[p.type].dataLabels), o), W(this, "drawDataLabels"), N(o) || o.enabled || p._hasPointLabels) {
var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", o.zIndex || 6);
D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[l.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(j) {
A = d(x(o, j.dlOptions || j.options && j.options.dataLabels)), A.forEach(function(T, X) {
var f = T.enabled && (!j.isNull || j.dataLabelOnNull) && C(j, T), m = j.connectors ? j.connectors[X] : j.connector, L = j.dataLabels ? j.dataLabels[X] : j.dataLabel, Y = u(T.distance, j.labelDistance), F = !L;
if (f) {
var Q = j.getLabelConfig(), k = u(T[j.formatPrefix + "Format"], T.format);
Q = $(k) ? H(k, Q, i) : (T[j.formatPrefix + "Formatter"] || T.formatter).call(Q, T), k = T.style;
var G = T.rotation;
i.styledMode || (k.color = u(T.color, k.color, p.color, "#000000"), k.color === "contrast" ? (j.contrastColor = n.getContrast(j.color || p.color), k.color = !$(Y) && T.inside || 0 > Y || l.stacking ? j.contrastColor : "#000000") : delete j.contrastColor, l.cursor && (k.cursor = l.cursor));
var z = { r: T.borderRadius || 0, rotation: G, padding: T.padding, zIndex: 1 };
i.styledMode || (z.fill = T.backgroundColor, z.stroke = T.borderColor, z["stroke-width"] = T.borderWidth), v(z, function(V, q) {
typeof V > "u" && delete z[q];
});
}
!L || f && $(Q) && !!L.div == !!T.useHTML || (j.dataLabel = L = j.dataLabel && j.dataLabel.destroy(), j.dataLabels && (j.dataLabels.length === 1 ? delete j.dataLabels : delete j.dataLabels[X]), X || delete j.dataLabel, m && (j.connector = j.connector.destroy(), j.connectors && (j.connectors.length === 1 ? delete j.connectors : delete j.connectors[X]))), f && $(Q) && (L ? z.text = Q : (j.dataLabels = j.dataLabels || [], L = j.dataLabels[X] = G ? n.text(Q, 0, -9999, T.useHTML).addClass("highcharts-data-label") : n.label(Q, 0, -9999, T.shape, null, null, T.useHTML, null, "data-label"), X || (j.dataLabel = L), L.addClass(" highcharts-data-label-color-" + j.colorIndex + " " + (T.className || "") + (T.useHTML ? " highcharts-tracker" : ""))), L.options = T, L.attr(z), i.styledMode || L.css(k).shadow(T.shadow), L.added || L.add(D), T.textPath && !T.useHTML && (L.setTextPath(j.getDataLabelPath && j.getDataLabelPath(L) || j.graphic, T.textPath), j.dataLabelPath && !T.textPath.enabled && (j.dataLabelPath = j.dataLabelPath.destroy())), p.alignDataLabel(j, L, T, null, F));
});
});
}
W(this, "afterDrawDataLabels");
}
function M(p, i, l, s, t, n) {
var o = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, j = i.x;
j = j === void 0 ? 0 : j;
var T = i.y;
T = T === void 0 ? 0 : T;
var X = (l.x || 0) + D;
if (0 > X) {
A === "right" && 0 <= j ? (i.align = "left", i.inside = !0) : j -= X;
var f = !0;
}
return X = (l.x || 0) + s.width - D, X > o.plotWidth && (A === "left" && 0 >= j ? (i.align = "right", i.inside = !0) : j += o.plotWidth - X, f = !0), X = l.y + D, 0 > X && (_ === "bottom" && 0 <= T ? (i.verticalAlign = "top", i.inside = !0) : T -= X, f = !0), X = (l.y || 0) + s.height - D, X > o.plotHeight && (_ === "top" && 0 >= T ? (i.verticalAlign = "bottom", i.inside = !0) : T += o.plotHeight - X, f = !0), f && (i.x = j, i.y = T, p.placed = !n, p.align(i, void 0, t)), f;
}
function x(p, i) {
var l = [], s;
if (N(p) && !N(i))
l = p.map(function(t) {
return w(t, i);
});
else if (N(i) && !N(p))
l = i.map(function(t) {
return w(p, t);
});
else if (N(p) || N(i))
for (s = Math.max(p.length, i.length); s--; )
l[s] = w(p[s], i[s]);
else
l = w(p, i);
return l;
}
function a(p, i, l, s, t) {
var n = this.chart, o = n.inverted, A = this.xAxis, _ = A.reversed, D = o ? i.height / 2 : i.width / 2;
p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = o ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = o ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), n.hasRendered && (l && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(p) {
if (c.indexOf(p) === -1) {
var i = p.prototype;
c.push(p), i.alignDataLabel = B, i.drawDataLabels = b, i.justifyDataLabel = M, i.setDataLabelStartPos = a;
}
};
}(P || (P = {})), P;
}), E(h, "Series/Column/ColumnDataLabel.js", [h["Core/Series/DataLabel.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = R.series, H = I.merge, $ = I.pick, U;
return function(W) {
function N(v, u, d, P, O) {
var B = this.chart.inverted, C = v.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
var M = v.dlBox || v.shapeArgs, x = $(v.below, v.plotY > $(this.translatedThreshold, C)), a = $(d.inside, !!this.options.stacking);
M && (P = H(M), 0 > P.y && (P.height += P.y, P.y = 0), M = P.y + P.height - C, 0 < M && M < P.height && (P.height -= M), B && (P = { x: C - P.y - P.height, y: b - P.x - P.width, width: P.height, height: P.width }), a || (B ? (P.x += x ? 0 : P.width, P.width = 0) : (P.y += x ? P.height : 0, P.height = 0))), d.align = $(d.align, !B || a ? "center" : x ? "right" : "left"), d.verticalAlign = $(d.verticalAlign, B || a ? "middle" : x ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, v, u, d, P, O), d.inside && v.contrastColor && u.css({ color: v.contrastColor });
}
var w = [];
W.compose = function(v) {
y.compose(Z), w.indexOf(v) === -1 && (w.push(v), v.prototype.alignDataLabel = N);
};
}(U || (U = {})), U;
}), E(h, "Series/Bar/BarSeries.js", [h["Series/Column/ColumnSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), H = I.extend, $ = I.merge;
return I = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.data = void 0, N.options = void 0, N.points = void 0, N;
}
return Z(W, U), W.defaultOptions = $(
y.defaultOptions,
{}
), W;
}(y), H(I.prototype, { inverted: !0 }), R.registerSeriesType("bar", I), I;
}), E(h, "Series/Scatter/ScatterSeries.js", [h["Series/Column/ColumnSeries.js"], h["Series/Line/LineSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, R, I, Z) {
var H = this && this.__extends || function() {
var N = function(w, v) {
return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, d) {
u.__proto__ = d;
} || function(u, d) {
for (var P in d)
d.hasOwnProperty(P) && (u[P] = d[P]);
}, N(w, v);
};
return function(w, v) {
function u() {
this.constructor = w;
}
N(w, v), w.prototype = v === null ? Object.create(v) : (u.prototype = v.prototype, new u());
};
}(), $ = Z.addEvent, U = Z.extend, W = Z.merge;
return Z = function(N) {
function w() {
var v = N !== null && N.apply(this, arguments) || this;
return v.data = void 0, v.options = void 0, v.points = void 0, v;
}
return H(w, N), w.prototype.applyJitter = function() {
var v = this, u = this.options.jitter, d = this.points.length;
u && this.points.forEach(function(P, O) {
["x", "y"].forEach(function(B, C) {
var b = "plot" + B.toUpperCase();
if (u[B] && !P.isNull) {
var M = v[B + "Axis"], x = u[B] * M.transA;
if (M && !M.isLog) {
var a = Math.max(0, P[b] - x);
M = Math.min(M.len, P[b] + x), C = 1e4 * Math.sin(O + C * d), P[b] = a + (M - a) * (C - Math.floor(C)), B === "x" && (P.clientX = P.plotX);
}
}
});
});
}, w.prototype.drawGraph = function() {
this.options.lineWidth ? N.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, w.defaultOptions = W(R.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), w;
}(R), U(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), $(Z, "afterTranslate", function() {
this.applyJitter();
}), I.registerSeriesType("scatter", Z), Z;
}), E(h, "Series/CenteredUtilities.js", [h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = y.deg2rad, H = I.isNumber, $ = I.pick, U = I.relativeLength, W;
return function(N) {
N.getCenter = function() {
var w = this.options, v = this.chart, u = 2 * (w.slicedOffset || 0), d = v.plotWidth - 2 * u, P = v.plotHeight - 2 * u, O = w.center, B = Math.min(d, P), C = w.size, b = w.innerSize || 0;
for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), w = [$(O[0], "50%"), $(O[1], "50%"), $(C && 0 > C ? void 0 : w.size, "100%"), $(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !v.angular || this instanceof R || (w[3] = 0), O = 0; 4 > O; ++O)
C = w[O], v = 2 > O || O === 2 && /%$/.test(C), w[O] = U(C, [d, P, B, w[2]][O]) + (v ? u : 0);
return w[3] > w[2] && (w[3] = w[2]), w;
}, N.getStartAndEndRadians = function(w, v) {
return w = H(w) ? w : 0, v = H(v) && v > w && 360 > v - w ? v : w + 360, { start: Z * (w + -90), end: Z * (v + -90) };
};
}(W || (W = {})), W;
}), E(h, "Series/Pie/PiePoint.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]], function(y, R, I) {
var Z = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}(), H = y.setAnimation, $ = I.addEvent, U = I.defined;
y = I.extend;
var W = I.isNumber, N = I.pick, w = I.relativeLength;
return R = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.labelDistance = void 0, d.options = void 0, d.series = void 0, d;
}
return Z(u, v), u.prototype.getConnectorPath = function() {
var d = this.labelPosition, P = this.series.options.dataLabels, O = this.connectorShapes, B = P.connectorShape;
return O[B] && (B = O[B]), B.call(this, { x: d.final.x, y: d.final.y, alignment: d.alignment }, d.connectorPosition, P);
}, u.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, u.prototype.haloPath = function(d) {
var P = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(P.x, P.y, P.r + d, P.r + d, { innerR: P.r - 1, start: P.start, end: P.end });
}, u.prototype.init = function() {
var d = this;
v.prototype.init.apply(
this,
arguments
), this.name = N(this.name, "Slice");
var P = function(O) {
d.slice(O.type === "select");
};
return $(this, "select", P), $(this, "unselect", P), this;
}, u.prototype.isValid = function() {
return W(this.y) && 0 <= this.y;
}, u.prototype.setVisible = function(d, P) {
var O = this, B = this.series, C = B.chart, b = B.options.ignoreHiddenPoint;
P = N(P, b), d !== this.visible && (this.visible = this.options.visible = d = typeof d > "u" ? !this.visible : d, B.options.data[B.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(M) {
O[M] && O[M][d ? "show" : "hide"](d);
}), this.legendItem && C.legend.colorizeItem(this, d), d || this.state !== "hover" || this.setState(""), b && (B.isDirty = !0), P && C.redraw());
}, u.prototype.slice = function(d, P, O) {
var B = this.series;
H(O, B.chart), N(P, !0), this.sliced = this.options.sliced = U(d) ? d : !this.sliced, B.options.data[B.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, u;
}(R), y(R.prototype, { connectorShapes: { fixedOffset: function(v, u, d) {
var P = u.breakAt;
return u = u.touchingSliceAt, [["M", v.x, v.y], d.softConnector ? ["C", v.x + (v.alignment === "left" ? -5 : 5), v.y, 2 * P.x - u.x, 2 * P.y - u.y, P.x, P.y] : ["L", P.x, P.y], ["L", u.x, u.y]];
}, straight: function(v, u) {
return u = u.touchingSliceAt, [["M", v.x, v.y], ["L", u.x, u.y]];
}, crookedLine: function(v, u, d) {
u = u.touchingSliceAt;
var P = this.series, O = P.center[0], B = P.chart.plotWidth, C = P.chart.plotLeft;
P = v.alignment;
var b = this.shapeArgs.r;
return d = w(d.crookDistance, 1), B = P === "left" ? O + b + (B + C - O - b) * (1 - d) : C + (O - b) * d, d = ["L", B, v.y], O = !0, (P === "left" ? B > v.x || B < u.x : B < v.x || B > u.x) && (O = !1), v = [["M", v.x, v.y]], O && v.push(d), v.push(["L", u.x, u.y]), v;
} } }), R;
}), E(h, "Series/Pie/PieSeries.js", [h["Series/CenteredUtilities.js"], h["Series/Column/ColumnSeries.js"], h["Core/Globals.js"], h["Core/Legend/LegendSymbol.js"], h["Series/Pie/PiePoint.js"], h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Utilities.js"]], function(y, R, I, Z, H, $, U, W, N) {
var w = this && this.__extends || function() {
var b = function(M, x) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
a.__proto__ = c;
} || function(a, c) {
for (var p in c)
c.hasOwnProperty(p) && (a[p] = c[p]);
}, b(M, x);
};
return function(M, x) {
function a() {
this.constructor = M;
}
b(M, x), M.prototype = x === null ? Object.create(x) : (a.prototype = x.prototype, new a());
};
}(), v = y.getStartAndEndRadians;
I = I.noop;
var u = N.clamp, d = N.extend, P = N.fireEvent, O = N.merge, B = N.pick, C = N.relativeLength;
return N = function(b) {
function M() {
var x = b !== null && b.apply(this, arguments) || this;
return x.center = void 0, x.data = void 0, x.maxLabelDistance = void 0, x.options = void 0, x.points = void 0, x;
}
return w(M, b), M.prototype.animate = function(x) {
var a = this, c = a.points, p = a.startAngleRad;
x || c.forEach(function(i) {
var l = i.graphic, s = i.shapeArgs;
l && s && (l.attr({ r: B(i.startR, a.center && a.center[3] / 2), start: p, end: p }), l.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
});
}, M.prototype.drawEmpty = function() {
var x = this.startAngleRad, a = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var p = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, x, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: W.arc(p, i, this.center[2] / 2, 0, { start: x, end: a, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
} else
this.graph && (this.graph = this.graph.destroy());
}, M.prototype.drawPoints = function() {
var x = this.chart.renderer;
this.points.forEach(function(a) {
a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = x[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
});
}, M.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, M.prototype.getX = function(x, a, c) {
var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
return x = Math.asin(u((x - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(x) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
}, M.prototype.hasData = function() {
return !!this.processedXData.length;
}, M.prototype.redrawPoints = function() {
var x = this, a = x.chart, c = a.renderer, p = x.options.shadow, i, l, s, t;
this.drawEmpty(), !p || x.shadowGroup || a.styledMode || (x.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(x.group)), x.points.forEach(function(n) {
var o = {};
if (l = n.graphic, !n.isNull && l) {
var A = void 0;
t = n.shapeArgs, i = n.getTranslate(), a.styledMode || (A = n.shadowGroup, p && !A && (A = n.shadowGroup = c.g("shadow").add(x.shadowGroup)), A && A.attr(i), s = x.pointAttribs(n, n.selected && "select")), n.delayedRendering ? (l.setRadialReference(x.center).attr(t).attr(i), a.styledMode || l.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), n.delayedRendering = !1) : (l.setRadialReference(x.center), a.styledMode || O(!0, o, s), O(!0, o, t, i), l.animate(o)), l.attr({ visibility: n.visible ? "inherit" : "hidden" }), l.addClass(n.getClassName(), !0);
} else
l && (n.graphic = l.destroy());
});
}, M.prototype.sortByAngle = function(x, a) {
x.sort(function(c, p) {
return typeof c.angle < "u" && (p.angle - c.angle) * a;
});
}, M.prototype.translate = function(x) {
this.generatePoints();
var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = v(a.startAngle, a.endAngle), l = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - l;
var s = this.points, t = a.dataLabels.distance;
a = a.ignoreHiddenPoint;
var n = s.length, o, A = 0;
for (x || (this.center = x = this.getCenter()), o = 0; o < n; o++) {
var _ = s[o], D = l + A * i;
!_.isValid() || a && !_.visible || (A += _.percentage / 100);
var j = l + A * i, T = { x: x[0], y: x[1], r: x[2] / 2, innerR: x[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * j) / 1e3 };
_.shapeType = "arc", _.shapeArgs = T, _.labelDistance = B(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, T.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), j = (j + D) / 2, j > 1.5 * Math.PI ? j -= 2 * Math.PI : j < -Math.PI / 2 && (j += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(j) * c), translateY: Math.round(Math.sin(j) * c) }, T = Math.cos(j) * x[2] / 2;
var X = Math.sin(j) * x[2] / 2;
_.tooltipPos = [x[0] + 0.7 * T, x[1] + 0.7 * X], _.half = j < -Math.PI / 2 || j > Math.PI / 2 ? 1 : 0, _.angle = j, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: x[0] + T + Math.cos(j) * _.labelDistance, y: x[1] + X + Math.sin(j) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: x[0] + T + Math.cos(j) * D, y: x[1] + X + Math.sin(j) * D }, touchingSliceAt: { x: x[0] + T, y: x[1] + X } } };
}
P(this, "afterTranslate");
}, M.prototype.updateTotals = function() {
var x = this.points, a = x.length, c = this.options.ignoreHiddenPoint, p, i = 0;
for (p = 0; p < a; p++) {
var l = x[p];
!l.isValid() || c && !l.visible || (i += l.y);
}
for (this.total = i, p = 0; p < a; p++)
l = x[p], l.percentage = 0 < i && (l.visible || !c) ? l.y / i * 100 : 0, l.total = i;
}, M.defaultOptions = O($.defaultOptions, {
center: [null, null],
clip: !1,
colorByPoint: !0,
dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
return this.point.isNull ? void 0 : this.point.name;
}, softConnector: !0, x: 0 },
fillColor: void 0,
ignoreHiddenPoint: !0,
inactiveOtherPoints: !0,
legendType: "point",
marker: null,
size: null,
showInLegend: !1,
slicedOffset: 10,
stickyTracking: !1,
tooltip: { followPointer: !0 },
borderColor: "#ffffff",
borderWidth: 1,
lineWidth: void 0,
states: { hover: { brightness: 0.1 } }
}), M;
}($), d(N.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: R.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: R.prototype.pointAttribs, pointClass: H, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("pie", N), N;
}), E(h, "Series/Pie/PieDataLabel.js", [
h["Core/Series/DataLabel.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, R, I, Z, H) {
var $ = R.noop, U = I.distribute, W = Z.series, N = H.arrayMax, w = H.clamp, v = H.defined, u = H.merge, d = H.pick, P = H.relativeLength, O;
return function(B) {
function C() {
var c = this, p = c.data, i = c.chart, l = c.options.dataLabels || {}, s = l.connectorPadding, t = i.plotWidth, n = i.plotHeight, o = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, j = _[1], T = [[], []], X = [0, 0, 0, 0], f = c.dataLabelPositioners, m, L, Y, F, Q, k, G, z, V, q, it, et;
c.visible && (l.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), W.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (T[nt.half].push(nt), nt.dataLabel._pos = null, !v(l.style.width) && !v(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), T.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var lt = Math.max(0, j - D - c.maxLabelDistance), at = Math.min(j + D + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, j - D - J.labelDistance), J.bottom = Math.min(j + D + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
}), lt = at + dt - lt, U(gt, lt, lt / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], k = m.labelPosition, F = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", V = lt = k.natural.y, gt && v(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, V = f.radialDistributionY(m))), delete m.positionIndex, l.justify)
z = f.justify(m, D, _);
else
switch (l.alignTo) {
case "connectors":
z = f.alignToConnectors(nt, rt, t, o);
break;
case "plotEdges":
z = f.alignToPlotEdges(F, rt, t, o);
break;
default:
z = f.radialDistributionX(c, m, V, lt);
}
F._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, F._pos = { x: z + d(et.x, l.x) + ({ left: s, right: -s }[k.alignment] || 0), y: V + d(et.y, l.y) - 10 }, k.final.x = z, k.final.y = V, d(l.crop, !0) && (Q = F.getBBox().width, lt = null, z - Q < s && rt === 1 ? (lt = Math.round(Q - z + s), X[3] = Math.max(lt, X[3])) : z + Q > t - s && rt === 0 && (lt = Math.round(z + Q - t + s), X[1] = Math.max(lt, X[1])), 0 > V - G / 2 ? X[0] = Math.max(Math.round(-V + G / 2), X[0]) : V + G / 2 > n && (X[2] = Math.max(Math.round(V + G / 2 - n), X[2])), F.sideOverflow = lt);
}
}
}), N(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = u(l, nt.options.dataLabels), L = d(et.connectorWidth, 1)) {
var rt;
Y = nt.connector, (F = nt.dataLabel) && F._pos && nt.visible && 0 < nt.labelDistance ? (q = F._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var p = c.dataLabel, i;
p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function M(c) {
var p = this.center, i = this.options, l = i.center, s = i.minSize || 80, t = i.size !== null;
if (!t) {
if (l[0] !== null)
var n = Math.max(p[2] - Math.max(c[1], c[3]), s);
else
n = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
l[1] !== null ? n = w(n, s, p[2] - Math.max(c[0], c[2])) : (n = w(n, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), n < p[2] ? (p[2] = n, p[3] = Math.min(P(i.innerSize || 0, n), n), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var x = [], a = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, p, i, l) {
return c.getX(i < p.top + 2 || i > p.bottom - 2 ? l : i, p.half, p);
}, justify: function(c, p, i) {
return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
}, alignToPlotEdges: function(c, p, i, l) {
return c = c.getBBox().width, p ? c + l : i - c - l;
}, alignToConnectors: function(c, p, i, l) {
var s = 0, t;
return c.forEach(function(n) {
t = n.dataLabel.getBBox().width, t > s && (s = t);
}), p ? s + l : i - s - l;
} };
B.compose = function(c) {
y.compose(W), x.indexOf(c) === -1 && (x.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = $, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = M);
};
}(O || (O = {})), O;
}), E(h, "Extensions/OverlappingDataLabels.js", [h["Core/Chart/Chart.js"], h["Core/Utilities.js"]], function(y, R) {
function I(w, v) {
var u = !1;
if (w) {
var d = w.newOpacity;
w.oldOpacity !== d && (w.alignAttr && w.placed ? (w[d ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), u = !0, w.alignAttr.opacity = d, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
v.styledMode || w.css({ pointerEvents: d ? "auto" : "none" });
}), H(v, "afterHideOverlappingLabel")) : w.attr({ opacity: d })), w.isOld = !0;
}
return u;
}
var Z = R.addEvent, H = R.fireEvent, $ = R.isArray, U = R.isNumber, W = R.objectEach, N = R.pick;
Z(y, "render", function() {
var w = this, v = [];
(this.labelCollectors || []).forEach(function(u) {
v = v.concat(u());
}), (this.yAxis || []).forEach(function(u) {
u.stacking && u.options.stackLabels && !u.options.stackLabels.allowOverlap && W(u.stacking.stacks, function(d) {
W(d, function(P) {
P.label && P.label.visibility !== "hidden" && v.push(P.label);
});
});
}), (this.series || []).forEach(function(u) {
var d = u.options.dataLabels;
u.visible && (d.enabled !== !1 || u._hasPointLabels) && (d = function(P) {
return P.forEach(function(O) {
O.visible && ($(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(B) {
var C = B.options;
B.labelrank = N(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (B.oldOpacity = B.opacity, B.newOpacity = 1, I(B, w)) : v.push(B);
});
});
}, d(u.nodes || []), d(u.points));
}), this.hideOverlappingLabels(v);
}), y.prototype.hideOverlappingLabels = function(w) {
var v = this, u = w.length, d = v.renderer, P, O, B, C = !1, b = function(a) {
var c, p = a.box ? 0 : a.padding || 0, i = c = 0, l;
if (a && (!a.alignAttr || a.placed)) {
var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = d.fontMetrics(null, a.element).h);
var n = a.width - 2 * p;
return (l = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +l * n : U(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
}
};
for (O = 0; O < u; O++)
(P = w[O]) && (P.oldOpacity = P.opacity, P.newOpacity = 1, P.absoluteBox = b(P));
for (w.sort(function(a, c) {
return (c.labelrank || 0) - (a.labelrank || 0);
}), O = 0; O < u; O++) {
var M = (b = w[O]) && b.absoluteBox;
for (P = O + 1; P < u; ++P) {
var x = (B = w[P]) && B.absoluteBox;
!M || !x || b === B || b.newOpacity === 0 || B.newOpacity === 0 || x.x >= M.x + M.width || x.x + x.width <= M.x || x.y >= M.y + M.height || x.y + x.height <= M.y || ((b.labelrank < B.labelrank ? b : B).newOpacity = 0);
}
}
w.forEach(function(a) {
I(a, v) && (C = !0);
}), C && H(v, "afterHideAllOverlappingLabels");
};
}), E(
h,
"Core/Responsive.js",
[h["Core/Utilities.js"]],
function(y) {
var R = y.extend, I = y.find, Z = y.isArray, H = y.isObject, $ = y.merge, U = y.objectEach, W = y.pick, N = y.splat, w = y.uniqueKey, v;
return function(u) {
var d = [];
u.compose = function(O) {
return d.indexOf(O) === -1 && (d.push(O), R(O.prototype, P.prototype)), O;
};
var P = function() {
function O() {
}
return O.prototype.currentOptions = function(B) {
function C(x, a, c, p) {
var i;
U(x, function(l, s) {
if (!p && -1 < b.collectionsWithUpdate.indexOf(s) && a[s])
for (l = N(l), c[s] = [], i = 0; i < Math.max(l.length, a[s].length); i++)
a[s][i] && (l[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, C(l[i], a[s][i], c[s][i], p + 1)));
else
H(l) ? (c[s] = Z(l) ? [] : {}, C(l, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
});
}
var b = this, M = {};
return C(B, this.options, M, 0), M;
}, O.prototype.matchResponsiveRule = function(B, C) {
var b = B.condition;
(b.callback || function() {
return this.chartWidth <= W(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= W(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= W(b.minWidth, 0) && this.chartHeight >= W(b.minHeight, 0);
}).call(this) && C.push(B._id);
}, O.prototype.setResponsive = function(B, C) {
var b = this, M = this.options.responsive, x = this.currentResponsive, a = [];
!C && M && M.rules && M.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, a);
}, this), C = $.apply(void 0, a.map(function(c) {
return I((M || {}).rules || [], function(p) {
return p._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (x && x.ruleIds) && (x && this.update(x.undoOptions, B, !0), a ? (x = this.currentOptions(C), x.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: x }, this.update(C, B, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(v || (v = {})), v;
}
), E(h, "masters/highcharts.src.js", [
h["Core/Globals.js"],
h["Core/Utilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Animation/Fx.js"],
h["Core/Animation/AnimationUtilities.js"],
h["Core/Renderer/HTML/AST.js"],
h["Core/FormatUtilities.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Renderer/HTML/HTMLElement.js"],
h["Core/Renderer/HTML/HTMLRenderer.js"],
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/Axis/LogarithmicAxis.js"],
h["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
h["Core/Axis/Tick.js"],
h["Core/Tooltip.js"],
h["Core/Series/Point.js"],
h["Core/Pointer.js"],
h["Core/MSPointer.js"],
h["Core/Legend/Legend.js"],
h["Core/Chart/Chart.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Series/Column/ColumnSeries.js"],
h["Series/Column/ColumnDataLabel.js"],
h["Series/Pie/PieSeries.js"],
h["Series/Pie/PieDataLabel.js"],
h["Core/Series/DataLabel.js"],
h["Core/Responsive.js"],
h["Core/Color/Color.js"],
h["Core/Time.js"]
], function(y, R, I, Z, H, $, U, W, N, w, v, u, d, P, O, B, C, b, M, x, a, c, p, i, l, s, t, n, o, A, _, D, j) {
return y.animate = H.animate, y.animObject = H.animObject, y.getDeferredAnimation = H.getDeferredAnimation, y.setAnimation = H.setAnimation, y.stop = H.stop, y.timers = Z.timers, y.AST = $, y.Axis = d, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = B, y.Point = M, y.Pointer = a.isRequired() ? a : x, y.Series = i, y.SVGElement = N, y.SVGRenderer = w, y.Tick = C, y.Time = j, y.Tooltip = b, y.Color = D, y.color = D.parse, u.compose(w), v.compose(N), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = U.dateFormat, y.format = U.format, y.numberFormat = U.numberFormat, y.addEvent = R.addEvent, y.arrayMax = R.arrayMax, y.arrayMin = R.arrayMin, y.attr = R.attr, y.clearTimeout = R.clearTimeout, y.correctFloat = R.correctFloat, y.createElement = R.createElement, y.css = R.css, y.defined = R.defined, y.destroyObjectProperties = R.destroyObjectProperties, y.discardElement = R.discardElement, y.distribute = W.distribute, y.erase = R.erase, y.error = R.error, y.extend = R.extend, y.extendClass = R.extendClass, y.find = R.find, y.fireEvent = R.fireEvent, y.getMagnitude = R.getMagnitude, y.getStyle = R.getStyle, y.inArray = R.inArray, y.isArray = R.isArray, y.isClass = R.isClass, y.isDOMElement = R.isDOMElement, y.isFunction = R.isFunction, y.isNumber = R.isNumber, y.isObject = R.isObject, y.isString = R.isString, y.keys = R.keys, y.merge = R.merge, y.normalizeTickInterval = R.normalizeTickInterval, y.objectEach = R.objectEach, y.offset = R.offset, y.pad = R.pad, y.pick = R.pick, y.pInt = R.pInt, y.relativeLength = R.relativeLength, y.removeEvent = R.removeEvent, y.seriesType = l.seriesType, y.splat = R.splat, y.stableSort = R.stableSort, y.syncTimeout = R.syncTimeout, y.timeUnits = R.timeUnits, y.uniqueKey = R.uniqueKey, y.useSerialIds = R.useSerialIds, y.wrap = R.wrap, t.compose(s), A.compose(i), P.compose(d), O.compose(d), o.compose(n), B.compose(d), _.compose(p), y;
}), h["masters/highcharts.src.js"]._modules = h, h["masters/highcharts.src.js"];
});
})(Yp);
var E0 = Yp.exports;
const Qn = /* @__PURE__ */ Cn(E0);
var Xp = { exports: {} };
(function(r) {
(function(g) {
r.exports ? (g.default = g, r.exports = g) : g(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(g) {
function E(h, y, R, I) {
h.hasOwnProperty(y) || (h[y] = I.apply(null, R));
}
g = g ? g._modules : {}, E(g, "Extensions/Pane.js", [
g["Core/Chart/Chart.js"],
g["Series/CenteredUtilities.js"],
g["Core/Globals.js"],
g["Core/Pointer.js"],
g["Core/Utilities.js"]
], function(h, y, R, I, Z) {
function H(v, u, d) {
return Math.sqrt(Math.pow(v - d[0], 2) + Math.pow(u - d[1], 2)) <= d[2] / 2;
}
var $ = Z.addEvent, U = Z.extend, W = Z.merge, N = Z.pick, w = Z.splat;
return h.prototype.collectionsWithUpdate.push("pane"), Z = function() {
function v(u, d) {
this.options = this.chart = this.center = this.background = void 0, this.coll = "pane", this.defaultOptions = { center: ["50%", "50%"], size: "85%", innerSize: "0%", startAngle: 0 }, this.defaultBackgroundOptions = { shape: "circle", borderWidth: 1, borderColor: "#cccccc", backgroundColor: { linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
}, stops: [[0, "#ffffff"], [1, "#e6e6e6"]] }, from: -Number.MAX_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%" }, this.init(u, d);
}
return v.prototype.init = function(u, d) {
this.chart = d, this.background = [], d.pane.push(this), this.setOptions(u);
}, v.prototype.setOptions = function(u) {
this.options = W(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, u);
}, v.prototype.render = function() {
var u = this.options, d = this.options.background, P = this.chart.renderer;
if (this.group || (this.group = P.g("pane-group").attr({ zIndex: u.zIndex || 0 }).add()), this.updateCenter(), d)
for (d = w(d), u = Math.max(d.length, this.background.length || 0), P = 0; P < u; P++)
d[P] && this.axis ? this.renderBackground(W(this.defaultBackgroundOptions, d[P]), P) : this.background[P] && (this.background[P] = this.background[P].destroy(), this.background.splice(P, 1));
}, v.prototype.renderBackground = function(u, d) {
var P = "animate", O = { class: "highcharts-pane " + (u.className || "") };
this.chart.styledMode || U(O, { fill: u.backgroundColor, stroke: u.borderColor, "stroke-width": u.borderWidth }), this.background[d] || (this.background[d] = this.chart.renderer.path().add(this.group), P = "attr"), this.background[d][P]({ d: this.axis.getPlotBandPath(u.from, u.to, u) }).attr(O);
}, v.prototype.updateCenter = function(u) {
this.center = (u || this.axis || {}).center = y.getCenter.call(this);
}, v.prototype.update = function(u, d) {
W(!0, this.options, u), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(P) {
P.pane === this && (P.pane = null, P.update({}, d));
}, this);
}, v;
}(), h.prototype.getHoverPane = function(v) {
var u = this, d;
return v && u.pane.forEach(function(P) {
var O = v.chartX - u.plotLeft, B = v.chartY - u.plotTop;
H(u.inverted ? B : O, u.inverted ? O : B, P.center) && (d = P);
}), d;
}, $(h, "afterIsInsidePlot", function(v) {
this.polar && (v.isInsidePlot = this.pane.some(function(u) {
return H(v.x, v.y, u.center);
}));
}), $(I, "beforeGetHoverData", function(v) {
var u = this.chart;
u.polar ? (u.hoverPane = u.getHoverPane(v), v.filter = function(d) {
return d.visible && !(!v.shared && d.directTouch) && N(d.options.enableMouseTracking, !0) && (!u.hoverPane || d.xAxis.pane === u.hoverPane);
}) : u.hoverPane = void 0;
}), $(
I,
"afterGetHoverData",
function(v) {
var u = this.chart;
v.hoverPoint && v.hoverPoint.plotX && v.hoverPoint.plotY && u.hoverPane && !H(v.hoverPoint.plotX, v.hoverPoint.plotY, u.hoverPane.center) && (v.hoverPoint = void 0);
}
), R.Pane = Z, R.Pane;
}), E(g, "Core/Axis/RadialAxis.js", [g["Core/Axis/AxisDefaults.js"], g["Core/DefaultOptions.js"], g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = y.defaultOptions, H = R.noop, $ = I.addEvent, U = I.correctFloat, W = I.defined, N = I.extend, w = I.fireEvent, v = I.merge, u = I.pick, d = I.relativeLength, P = I.wrap, O;
return function(B) {
function C() {
this.autoConnect = this.isCircular && typeof u(this.userMax, this.options.max) > "u" && U(this.endAngleRad - this.startAngleRad) === U(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
}
function b() {
var V = this;
return function() {
if (V.isRadial && V.tickPositions && V.options.labels && V.options.labels.allowOverlap !== !0)
return V.tickPositions.map(function(q) {
return V.ticks[q] && V.ticks[q].label;
}).filter(function(q) {
return !!q;
});
};
}
function M() {
return H;
}
function x(V, q, it) {
var et = this.pane.center, nt = V.value;
if (this.isCircular) {
if (W(nt))
V.point && (rt = V.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate(V.point.rectPlotY, !0) : V.point.x));
else {
var rt = V.chartX || 0, ct = V.chartY || 0;
nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
}
V = this.getPosition(nt), rt = V.x, ct = V.y;
} else
W(nt) || (rt = V.chartX, ct = V.chartY), W(rt) && W(ct) && (it = et[1] + this.chart.plotTop, nt = this.translate(Math.min(Math.sqrt(Math.pow(rt - q, 2) + Math.pow(ct - it, 2)), et[2] / 2) - et[3] / 2, !0));
return [nt, rt || 0, ct || 0];
}
function a(V, q, it) {
V = this.pane.center;
var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = u(q, V[2] / 2 - this.offset);
return typeof it > "u" && (it = this.horiz ? 0 : this.center && -this.center[3] / 2), it && (ct += it), this.isCircular || typeof q < "u" ? (q = this.chart.renderer.symbols.arc(nt + V[0], rt + V[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + V[0]], q.yBounds = [rt + V[1] - ct]) : (q = this.postTranslate(this.angleRad, ct), q = [["M", this.center[0] + et.plotLeft, this.center[1] + et.plotTop], ["L", q.x, q.y]]), q;
}
function c() {
this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
}
function p(V, q, it) {
var et = this.chart, nt = function(yt) {
if (typeof yt == "string") {
var vt = parseInt(yt, 10);
return J.test(yt) && (vt = vt * gt / 100), vt;
}
return yt;
}, rt = this.center, ct = this.startAngleRad, gt = rt[2] / 2, dt = Math.min(this.offset, 0), lt = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, st = u(nt(it.outerRadius), gt), ht = nt(it.innerRadius);
if (nt = u(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
dt = this.getPlotLinePath({ value: V }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
else {
if (V = Math.max(V, this.min), q = Math.min(q, this.max), V = this.translate(V), q = this.translate(q), tt || (st = V || 0, ht = q || 0), it.shape !== "circle" && tt)
it = ct + (V || 0), ct += q || 0;
else {
it = -Math.PI / 2, ct = 1.5 * Math.PI;
var pt = !0;
}
st -= dt, dt = et.renderer.symbols.arc(lt + rt[0], at + rt[1], st, st, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: u(ht, st - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, lt = lt + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [lt, et.plotWidth] : [0, lt], dt.yBounds = [at + rt[1] + rt[2] / 2 * Math.sin(tt)], dt.yBounds[0] += tt > -Math.PI && 0 > tt || tt > Math.PI ? -10 : 10);
}
return dt;
}
function i(V) {
var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = V.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", lt = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = V.isCrosshair;
ct = it[3] / 2;
var st = V.value, ht, pt = this.getPosition(st), yt = pt.x;
if (pt = pt.y, tt && (pt = this.getCrosshairPosition(V, lt, at), st = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
st = Math.sqrt(Math.pow(yt - lt, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? d(gt, 1) : gt / st, et = typeof dt == "string" ? d(dt, 1) : dt / st, it && ct && (ct /= st, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", lt + rt * (yt - lt), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - lt), pt + (1 - et) * (at - pt)]];
else if ((st = this.translate(st)) && (0 > st || st > J) && (st = 0), this.options.gridLineInterpolation === "circle")
it = this.getLinePath(0, st, ct);
else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
vt.pane === q.pane && (ht = vt);
}), ht)
for (lt = ht.tickPositions, ht.autoConnect && (lt = lt.concat([lt[0]])), rt && (lt = lt.slice().reverse()), st && (st += ct), at = 0; at < lt.length; at++)
ct = ht.getPosition(lt[at], st), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
return it;
}
function l(V, q) {
return V = this.translate(V), this.postTranslate(this.isCircular ? V : this.angleRad, u(this.isCircular ? q : 0 > V ? 0 : V, this.center[2] / 2) - this.offset);
}
function s() {
var V = this.center, q = this.chart, it = this.options.title;
return { x: q.plotLeft + V[0] + (it.x || 0), y: q.plotTop + V[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * V[2] + (it.y || 0) };
}
function t(V) {
V.beforeSetTickPositions = C, V.createLabelCollector = b, V.getCrosshairPosition = x, V.getLinePath = a, V.getOffset = c, V.getPlotBandPath = p, V.getPlotLinePath = i, V.getPosition = l, V.getTitlePosition = s, V.postTranslate = X, V.setAxisSize = m, V.setAxisTranslation = L, V.setOptions = Y;
}
function n() {
var V = this.chart, q = this.options, it = this.pane, et = it && it.options;
V.angular && this.isXAxis || !it || !V.angular && !V.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (u(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
}
function o(V) {
this.isRadial && (V.align = void 0, V.preventDefault());
}
function A() {
if (this.chart && this.chart.labelCollectors) {
var V = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
0 <= V && this.chart.labelCollectors.splice(V, 1);
}
}
function _(V) {
var q = this.chart, it = q.inverted, et = q.angular, nt = q.polar, rt = this.isXAxis, ct = this.coll, gt = et && rt, dt = q.options;
V = V.userOptions.pane || 0, V = this.pane = q.pane && q.pane[V];
var lt;
ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = M, this.getOffset = H, this.render = this.redraw = f, this.setTitle = this.setCategories = this.setScale = H) : t(this), (lt = !rt) && (this.defaultPolarOptions = G)) : nt && (t(this), this.defaultPolarOptions = (lt = this.horiz) ? k : v(ct === "xAxis" ? h.defaultXAxisOptions : h.defaultYAxisOptions, z), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = h.defaultYAxisOptions.stackLabels, this.defaultPolarOptions.reversedStacks = !0)), et || nt ? (this.isRadial = !0, dt.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()), this.labelCollector && q.labelCollectors.push(this.labelCollector)) : this.isRadial = !1, V && lt && (V.axis = this), this.isCircular = lt);
}
function D() {
this.isRadial && this.beforeSetTickPositions();
}
function j(V) {
var q = this.label;
if (q) {
var it = this.axis, et = q.getBBox(), nt = it.options.labels, rt = (it.translate(this.pos) + it.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, ct = Math.round(rt), gt = W(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, lt = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, st = tt, ht = 0, pt = 0;
if (it.isRadial) {
var yt = it.getPosition(this.pos, it.center[2] / 2 + d(u(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
nt.rotation === "auto" ? q.attr({ rotation: rt }) : W(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), W(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (lt = 0), at = rt > lt && rt < 180 - lt ? "left" : rt > 180 + lt && rt < 360 - lt ? "right" : "center") : at = "center", q.attr({ align: at })), at === "auto" && it.tickPositions.length === 2 && it.isCircular && (90 < tt && 180 > tt ? tt = 180 - tt : 270 < tt && 360 >= tt && (tt = 540 - tt), 180 < st && 360 >= st && (st = 360 - st), (it.pane.options.startAngle === ct || it.pane.options.startAngle === ct + 360 || it.pane.options.startAngle === ct - 360) && (J = "start"), at = -90 <= ct && 90 >= ct || -360 <= ct && -270 >= ct || 270 <= ct && 360 >= ct ? J === "start" ? "right" : "left" : J === "start" ? "left" : "right", 70 < st && 110 > st && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? ht = 0.3 * et.height : 15 <= tt && 35 >= tt ? ht = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? ht = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? ht = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (ht = J === "start" ? et.height : 0.25 * -et.height), 15 > st ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < st && 180 >= st && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
pt,
ht + gt
)), V.pos.x = yt.x + (nt.x || 0), V.pos.y = yt.y + (dt || 0);
}
}
}
function T(V) {
this.axis.getPosition && N(V.pos, this.axis.getPosition(this.pos));
}
function X(V, q) {
var it = this.chart, et = this.center;
return V = this.startAngleRad + V, { x: it.plotLeft + et[0] + Math.cos(V) * q, y: it.plotTop + et[1] + Math.sin(V) * q };
}
function f() {
this.isDirty = !1;
}
function m() {
if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
this.pane.updateCenter(this);
var V = this.center = this.pane.center.slice();
if (this.isCircular)
this.sector = this.endAngleRad - this.startAngleRad;
else {
var q = this.postTranslate(this.angleRad, V[3] / 2);
V[0] = q.x - this.chart.plotLeft, V[1] = q.y - this.chart.plotTop;
}
this.len = this.width = this.height = (V[2] - V[3]) * u(this.sector, 1) / 2;
}
}
function L() {
this.constructor.prototype.setAxisTranslation.call(this), this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1), this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
}
function Y(V) {
V = this.options = v(this.constructor.defaultOptions, this.defaultPolarOptions, Z[this.coll], V), V.plotBands || (V.plotBands = []), w(this, "afterSetOptions");
}
function F(V, q, it, et, nt, rt, ct) {
var gt = this.axis;
return gt.isRadial ? (V = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", V.x, V.y]) : q = V.call(this, q, it, et, nt, rt, ct), q;
}
var Q = [], k = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, G = {
labels: { align: "center", x: 0, y: void 0 },
minorGridLineWidth: 0,
minorTickInterval: "auto",
minorTickLength: 10,
minorTickPosition: "inside",
minorTickWidth: 1,
tickLength: 10,
tickPosition: "inside",
tickWidth: 2,
title: { rotation: 0 },
zIndex: 2
}, z = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
B.compose = function(V, q) {
return Q.indexOf(V) === -1 && (Q.push(V), $(V, "afterInit", n), $(V, "autoLabelAlign", o), $(V, "destroy", A), $(V, "init", _), $(V, "initialAxisTranslation", D)), Q.indexOf(q) === -1 && (Q.push(q), $(
q,
"afterGetLabelPosition",
j
), $(q, "afterGetPosition", T), P(q.prototype, "getMarkPath", F)), V;
};
}(O || (O = {})), O;
}), E(g, "Series/AreaRange/AreaRangePoint.js", [g["Series/Area/AreaSeries.js"], g["Core/Series/Point.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), Z = y.prototype, H = R.defined, $ = R.isNumber;
return function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.high = void 0, N.low = void 0, N.options = void 0, N.plotHigh = void 0, N.plotLow = void 0, N.plotHighX = void 0, N.plotLowX = void 0, N.plotX = void 0, N.series = void 0, N;
}
return I(W, U), W.prototype.setState = function() {
var N = this.state, w = this.series, v = w.chart.polar;
H(this.plotHigh) || (this.plotHigh = w.yAxis.toPixels(
this.high,
!0
)), H(this.plotLow) || (this.plotLow = this.plotY = w.yAxis.toPixels(this.low, !0)), w.stateMarkerGraphic && (w.lowerStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, v && (this.plotX = this.plotHighX), Z.setState.apply(this, arguments), this.state = N, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, v && (this.plotX = this.plotLowX), w.stateMarkerGraphic && (w.upperStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.lowerStateMarkerGraphic, w.lowerStateMarkerGraphic = void 0), Z.setState.apply(this, arguments);
}, W.prototype.haloPath = function() {
var N = this.series.chart.polar, w = [];
return this.plotY = this.plotLow, N && (this.plotX = this.plotLowX), this.isInside && (w = Z.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, N && (this.plotX = this.plotHighX), this.isTopInside && (w = w.concat(Z.haloPath.apply(this, arguments))), w;
}, W.prototype.isValid = function() {
return $(this.low) && $(this.high);
}, W;
}(h.prototype.pointClass);
}), E(
g,
"Series/AreaRange/AreaRangeSeries.js",
[g["Series/AreaRange/AreaRangePoint.js"], g["Series/Area/AreaSeries.js"], g["Series/Column/ColumnSeries.js"], g["Core/Globals.js"], g["Core/Series/Series.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]],
function(h, y, R, I, Z, H, $) {
var U = this && this.__extends || function() {
var B = function(C, b) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, x) {
M.__proto__ = x;
} || function(M, x) {
for (var a in x)
x.hasOwnProperty(a) && (M[a] = x[a]);
}, B(C, b);
};
return function(C, b) {
function M() {
this.constructor = C;
}
B(C, b), C.prototype = b === null ? Object.create(b) : (M.prototype = b.prototype, new M());
};
}(), W = y.prototype, N = R.prototype;
R = I.noop;
var w = Z.prototype, v = $.defined, u = $.extend, d = $.isArray, P = $.pick, O = $.merge;
return Z = function(B) {
function C() {
var b = B !== null && B.apply(this, arguments) || this;
return b.data = void 0, b.options = void 0, b.points = void 0, b.lowerStateMarkerGraphic = void 0, b.xAxis = void 0, b;
}
return U(C, B), C.prototype.toYData = function(b) {
return [b.low, b.high];
}, C.prototype.highToXY = function(b) {
var M = this.chart, x = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
b.plotHighX = x.x - M.plotLeft, b.plotHigh = x.y - M.plotTop, b.plotLowX = b.plotX;
}, C.prototype.translate = function() {
var b = this, M = b.yAxis;
W.translate.apply(b), b.points.forEach(function(x) {
var a = x.high, c = x.plotY;
x.isNull ? x.plotY = null : (x.plotLow = c, x.plotHigh = M.translate(b.dataModify ? b.dataModify.modifyValue(a) : a, 0, 1, 0, 1), b.dataModify && (x.yBottom = x.plotHigh));
}), this.chart.polar && this.points.forEach(function(x) {
b.highToXY(x), x.tooltipPos = [(x.plotHighX + x.plotLowX) / 2, (x.plotHigh + x.plotLow) / 2];
});
}, C.prototype.getGraphPath = function(b) {
var M = [], x = [], a, c = W.getGraphPath, p = this.options, i = this.chart.polar, l = i && p.connectEnds !== !1, s = p.connectNulls, t = p.step;
for (b = b || this.points, a = b.length; a--; ) {
var n = b[a], o = i ? { plotX: n.rectPlotX, plotY: n.yBottom, doCurve: !1 } : { plotX: n.plotX, plotY: n.plotY, doCurve: !1 };
n.isNull || l || s || b[a + 1] && !b[a + 1].isNull || x.push(o);
var A = { polarPlotY: n.polarPlotY, rectPlotX: n.rectPlotX, yBottom: n.yBottom, plotX: P(
n.plotHighX,
n.plotX
), plotY: n.plotHigh, isNull: n.isNull };
x.push(A), M.push(A), n.isNull || l || s || b[a - 1] && !b[a - 1].isNull || x.push(o);
}
return b = c.call(this, b), t && (t === !0 && (t = "left"), p.step = { left: "right", center: "center", right: "left" }[t]), M = c.call(this, M), x = c.call(this, x), p.step = t, p = [].concat(b, M), !this.chart.polar && x[0] && x[0][0] === "M" && (x[0] = ["L", x[0][1], x[0][2]]), this.graphPath = p, this.areaPath = b.concat(x), p.isArea = !0, p.xMap = b.xMap, this.areaPath.xMap = b.xMap, p;
}, C.prototype.drawDataLabels = function() {
var b = this.points, M = b.length, x, a = [], c = this.options.dataLabels, p, i = this.chart.inverted;
if (c) {
if (d(c))
var l = c[0] || { enabled: !1 }, s = c[1] || { enabled: !1 };
else
l = u({}, c), l.x = c.xHigh, l.y = c.yHigh, s = u({}, c), s.x = c.xLow, s.y = c.yLow;
if (l.enabled || this._hasPointLabels) {
for (x = M; x--; )
if (p = b[x]) {
var t = l.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
p.y = p.high, p._plotY = p.plotY, p.plotY = p.plotHigh, a[x] = p.dataLabel, p.dataLabel = p.dataLabelUpper, p.below = t, i ? l.align || (l.align = t ? "right" : "left") : l.verticalAlign || (l.verticalAlign = t ? "top" : "bottom");
}
for (this.options.dataLabels = l, w.drawDataLabels && w.drawDataLabels.apply(this, arguments), x = M; x--; )
(p = b[x]) && (p.dataLabelUpper = p.dataLabel, p.dataLabel = a[x], delete p.dataLabels, p.y = p.low, p.plotY = p._plotY);
}
if (s.enabled || this._hasPointLabels) {
for (x = M; x--; )
(p = b[x]) && (t = s.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow, p.below = !t, i ? s.align || (s.align = t ? "left" : "right") : s.verticalAlign || (s.verticalAlign = t ? "bottom" : "top"));
this.options.dataLabels = s, w.drawDataLabels && w.drawDataLabels.apply(this, arguments);
}
if (l.enabled)
for (x = M; x--; )
(p = b[x]) && (p.dataLabels = [p.dataLabelUpper, p.dataLabel].filter(function(n) {
return !!n;
}));
this.options.dataLabels = c;
}
}, C.prototype.alignDataLabel = function() {
N.alignDataLabel.apply(this, arguments);
}, C.prototype.drawPoints = function() {
var b = this.points.length, M;
for (w.drawPoints.apply(this, arguments), M = 0; M < b; ) {
var x = this.points[M];
x.origProps = { plotY: x.plotY, plotX: x.plotX, isInside: x.isInside, negative: x.negative, zone: x.zone, y: x.y }, x.lowerGraphic = x.graphic, x.graphic = x.upperGraphic, x.plotY = x.plotHigh, v(x.plotHighX) && (x.plotX = x.plotHighX), x.y = P(x.high, x.origProps.y), x.negative = x.y < (this.options.threshold || 0), this.zones.length && (x.zone = x.getZone()), this.chart.polar || (x.isInside = x.isTopInside = typeof x.plotY < "u" && 0 <= x.plotY && x.plotY <= this.yAxis.len && 0 <= x.plotX && x.plotX <= this.xAxis.len), M++;
}
for (w.drawPoints.apply(this, arguments), M = 0; M < b; )
x = this.points[M], x.upperGraphic = x.graphic, x.graphic = x.lowerGraphic, x.origProps && (u(x, x.origProps), delete x.origProps), M++;
}, C.defaultOptions = O(y.defaultOptions, {
lineWidth: 1,
threshold: null,
tooltip: { pointFormat: '● {series.name}: {point.low} - {point.high}
' },
trackByArea: !0,
dataLabels: { align: void 0, verticalAlign: void 0, xLow: 0, xHigh: 0, yLow: 0, yHigh: 0 }
}), C;
}(y), u(Z.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: h, setStackedPoints: R }), H.registerSeriesType("arearange", Z), Z;
}
), E(g, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
g["Series/AreaRange/AreaRangeSeries.js"],
g["Core/Series/SeriesRegistry.js"],
g["Core/Utilities.js"]
], function(h, y, R) {
var I = this && this.__extends || function() {
var U = function(W, N) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var u in v)
v.hasOwnProperty(u) && (w[u] = v[u]);
}, U(W, N);
};
return function(W, N) {
function w() {
this.constructor = W;
}
U(W, N), W.prototype = N === null ? Object.create(N) : (w.prototype = N.prototype, new w());
};
}(), Z = y.seriesTypes.spline, H = R.merge;
R = R.extend;
var $ = function(U) {
function W() {
var N = U !== null && U.apply(this, arguments) || this;
return N.options = void 0, N.data = void 0, N.points = void 0, N;
}
return I(W, U), W.defaultOptions = H(h.defaultOptions), W;
}(h);
return R($.prototype, { getPointSpline: Z.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", $), $;
}), E(g, "Series/BoxPlot/BoxPlotSeries.js", [g["Series/Column/ColumnSeries.js"], g["Core/Globals.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = this && this.__extends || function() {
var W = function(N, w) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, u) {
v.__proto__ = u;
} || function(v, u) {
for (var d in u)
u.hasOwnProperty(d) && (v[d] = u[d]);
}, W(N, w);
};
return function(N, w) {
function v() {
this.constructor = N;
}
W(N, w), N.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}();
y = y.noop;
var H = I.extend, $ = I.merge, U = I.pick;
return I = function(W) {
function N() {
var w = W !== null && W.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return Z(N, W), N.prototype.pointAttribs = function() {
return {};
}, N.prototype.translate = function() {
var w = this.yAxis, v = this.pointArrayMap;
W.prototype.translate.apply(this), this.points.forEach(function(u) {
v.forEach(function(d) {
u[d] !== null && (u[d + "Plot"] = w.translate(u[d], 0, 1, 0, 1));
}), u.plotHigh = u.highPlot;
});
}, N.prototype.drawPoints = function() {
var w = this, v = w.options, u = w.chart, d = u.renderer, P, O, B, C, b, M, x = 0, a, c, p, i, l = w.doQuartiles !== !1, s, t = w.options.whiskerLength;
w.points.forEach(function(n) {
var o = n.graphic, A = o ? "animate" : "attr", _ = n.shapeArgs, D = {}, j = {}, T = {}, X = {}, f = n.color || w.color;
typeof n.plotY < "u" && (a = Math.round(_.width), c = Math.floor(_.x), p = c + a, i = Math.round(a / 2), P = Math.floor(l ? n.q1Plot : n.lowPlot), O = Math.floor(l ? n.q3Plot : n.lowPlot), B = Math.floor(n.highPlot), C = Math.floor(n.lowPlot), o || (n.graphic = o = d.g("point").add(w.group), n.stem = d.path().addClass("highcharts-boxplot-stem").add(o), t && (n.whiskers = d.path().addClass("highcharts-boxplot-whisker").add(o)), l && (n.box = d.path(void 0).addClass("highcharts-boxplot-box").add(o)), n.medianShape = d.path(void 0).addClass("highcharts-boxplot-median").add(o)), u.styledMode || (j.stroke = n.stemColor || v.stemColor || f, j["stroke-width"] = U(n.stemWidth, v.stemWidth, v.lineWidth), j.dashstyle = n.stemDashStyle || v.stemDashStyle || v.dashStyle, n.stem.attr(j), t && (T.stroke = n.whiskerColor || v.whiskerColor || f, T["stroke-width"] = U(n.whiskerWidth, v.whiskerWidth, v.lineWidth), T.dashstyle = n.whiskerDashStyle || v.whiskerDashStyle || v.dashStyle, n.whiskers.attr(T)), l && (D.fill = n.fillColor || v.fillColor || f, D.stroke = v.lineColor || f, D["stroke-width"] = v.lineWidth || 0, D.dashstyle = n.boxDashStyle || v.boxDashStyle || v.dashStyle, n.box.attr(D)), X.stroke = n.medianColor || v.medianColor || f, X["stroke-width"] = U(n.medianWidth, v.medianWidth, v.lineWidth), X.dashstyle = n.medianDashStyle || v.medianDashStyle || v.dashStyle, n.medianShape.attr(X)), M = n.stem.strokeWidth() % 2 / 2, x = c + i + M, o = [["M", x, O], ["L", x, B], ["M", x, P], ["L", x, C]], n.stem[A]({ d: o }), l && (M = n.box.strokeWidth() % 2 / 2, P = Math.floor(P) + M, O = Math.floor(O) + M, c += M, p += M, o = [["M", c, O], ["L", c, P], ["L", p, P], ["L", p, O], ["L", c, O], ["Z"]], n.box[A]({ d: o })), t && (M = n.whiskers.strokeWidth() % 2 / 2, B += M, C += M, s = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, o = [["M", x - s, B], ["L", x + s, B], ["M", x - s, C], ["L", x + s, C]], n.whiskers[A]({ d: o })), b = Math.round(n.medianPlot), M = n.medianShape.strokeWidth() % 2 / 2, b += M, o = [["M", c, b], ["L", p, b]], n.medianShape[A]({ d: o }));
});
}, N.prototype.toYData = function(w) {
return [w.low, w.q1, w.median, w.q3, w.high];
}, N.defaultOptions = $(h.defaultOptions, {
threshold: null,
tooltip: { pointFormat: '● {series.name}
Maximum: {point.high}
Upper quartile: {point.q3}
Median: {point.median}
Lower quartile: {point.q1}
Minimum: {point.low}
' },
whiskerLength: "50%",
fillColor: "#ffffff",
lineWidth: 1,
medianWidth: 2,
whiskerWidth: 2
}), N;
}(h), H(I.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), R.registerSeriesType("boxplot", I), I;
}), E(g, "Series/Bubble/BubbleLegendDefaults.js", [], function() {
return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: {
className: void 0,
allowOverlap: !1,
format: "",
formatter: void 0,
align: "right",
style: { fontSize: "10px", color: "#000000" },
x: 0,
y: 0
}, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 };
}), E(g, "Series/Bubble/BubbleLegendItem.js", [g["Core/Color/Color.js"], g["Core/FormatUtilities.js"], g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = h.parse, H = R.noop, $ = I.arrayMax, U = I.arrayMin, W = I.isNumber, N = I.merge, w = I.pick, v = I.stableSort;
return function() {
function u(d, P) {
this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0, this.setState = H, this.init(d, P);
}
return u.prototype.init = function(d, P) {
this.options = d, this.visible = !0, this.chart = P.chart, this.legend = P;
}, u.prototype.addToLegend = function(d) {
d.splice(
this.options.legendIndex,
0,
this
);
}, u.prototype.drawLegendSymbol = function(d) {
var P = this.chart, O = this.options, B = w(d.options.itemDistance, 20), C = O.ranges, b = O.connectorDistance;
this.fontMetrics = P.renderer.fontMetrics(O.labels.style.fontSize), C && C.length && W(C[0].value) ? (v(C, function(M, x) {
return x.value - M.value;
}), this.ranges = C, this.setOptions(), this.render(), d = this.getMaxLabelSize(), C = this.ranges[0].radius, P = 2 * C, b = b - C + d.width, b = 0 < b ? b : 0, this.maxLabel = d, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = P + b + B, this.legendItemHeight = P + this.fontMetrics.h / 2) : d.options.bubbleLegend.autoRanges = !0;
}, u.prototype.setOptions = function() {
var d = this.ranges, P = this.options, O = this.chart.series[P.seriesIndex], B = this.legend.baseline, C = { zIndex: P.zIndex, "stroke-width": P.borderWidth }, b = { zIndex: P.zIndex, "stroke-width": P.connectorWidth }, M = { align: this.legend.options.rtl || P.labels.align === "left" ? "right" : "left", zIndex: P.zIndex }, x = O.options.marker.fillOpacity, a = this.chart.styledMode;
d.forEach(function(c, p) {
a || (C.stroke = w(c.borderColor, P.borderColor, O.color), C.fill = w(c.color, P.color, x !== 1 ? Z(O.color).setOpacity(x).get("rgba") : O.color), b.stroke = w(c.connectorColor, P.connectorColor, O.color)), d[p].radius = this.getRangeRadius(c.value), d[p] = N(d[p], { center: d[0].radius - d[p].radius + B }), a || N(!0, d[p], { bubbleAttribs: N(C), connectorAttribs: N(b), labelAttribs: M });
}, this);
}, u.prototype.getRangeRadius = function(d) {
var P = this.options;
return this.chart.series[this.options.seriesIndex].getRadius.call(
this,
P.ranges[P.ranges.length - 1].value,
P.ranges[0].value,
P.minSize,
P.maxSize,
d
);
}, u.prototype.render = function() {
var d = this.chart.renderer, P = this.options.zThreshold;
this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = d.g("bubble-legend"), this.legendItem = d.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
O.value >= P && this.renderRange(O);
}, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
}, u.prototype.renderRange = function(d) {
var P = this.options, O = P.labels, B = this.chart, C = B.series[P.seriesIndex], b = B.renderer, M = this.symbols;
B = M.labels;
var x = d.center, a = Math.abs(d.radius), c = P.connectorDistance || 0, p = O.align, i = P.connectorWidth, l = this.ranges[0].radius || 0, s = x - a - P.borderWidth / 2 + i / 2, t = this.fontMetrics;
t = t.f / 2 - (t.h - t.f) / 2;
var n = b.styledMode;
c = this.legend.options.rtl || p === "left" ? -c : c, p === "center" && (c = 0, P.connectorDistance = 0, d.labelAttribs.align = "center"), p = s + P.labels.y;
var o = l + c + P.labels.x;
M.bubbleItems.push(b.circle(
l,
x + ((s % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
a
).attr(n ? {} : d.bubbleAttribs).addClass((n ? "highcharts-color-" + C.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (P.className || "")).add(this.legendSymbol)), M.connectors.push(b.path(b.crispLine([["M", l, s], ["L", l + c, s]], P.connectorWidth)).attr(n ? {} : d.connectorAttribs).addClass((n ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (P.connectorClassName || "")).add(this.legendSymbol)), d = b.text(this.formatLabel(d), o, p + t).attr(n ? {} : d.labelAttribs).css(n ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (P.labels.className || "")).add(this.legendSymbol), B.push(d), d.placed = !0, d.alignAttr = { x: o, y: p + t };
}, u.prototype.getMaxLabelSize = function() {
var d, P;
return this.symbols.labels.forEach(function(O) {
P = O.getBBox(!0), d = d ? P.width > d.width ? P : d : P;
}), d || {};
}, u.prototype.formatLabel = function(d) {
var P = this.options, O = P.labels.formatter;
P = P.labels.format;
var B = this.chart.numberFormatter;
return P ? y.format(P, d) : O ? O.call(d) : B(d.value, 1);
}, u.prototype.hideOverlappingLabels = function() {
var d = this.chart, P = this.symbols;
!this.options.labels.allowOverlap && P && (d.hideOverlappingLabels(P.labels), P.labels.forEach(function(O, B) {
O.newOpacity ? O.newOpacity !== O.oldOpacity && P.connectors[B].show() : P.connectors[B].hide();
}));
}, u.prototype.getRanges = function() {
var d = this.legend.bubbleLegend, P = d.options.ranges, O, B = Number.MAX_VALUE, C = -Number.MAX_VALUE;
d.chart.series.forEach(function(M) {
M.isBubble && !M.ignoreSeries && (O = M.zData.filter(W), O.length && (B = w(M.options.zMin, Math.min(B, Math.max(
U(O),
M.options.displayNegative === !1 ? M.options.zThreshold : -Number.MAX_VALUE
))), C = w(M.options.zMax, Math.max(C, $(O)))));
});
var b = B === C ? [{ value: C }] : [{ value: B }, { value: (B + C) / 2 }, { value: C, autoRanges: !0 }];
return P.length && P[0].radius && b.reverse(), b.forEach(function(M, x) {
P && P[x] && (b[x] = N(P[x], M));
}), b;
}, u.prototype.predictBubbleSizes = function() {
var d = this.chart, P = this.fontMetrics, O = d.legend.options, B = O.floating, C = (O = O.layout === "horizontal") ? d.legend.lastLineHeight : 0, b = d.plotSizeX, M = d.plotSizeY, x = d.series[this.options.seriesIndex], a = x.getPxExtremes();
d = Math.ceil(a.minPxSize), a = Math.ceil(a.maxPxSize);
var c = Math.min(M, b);
return x = x.options.maxSize, B || !/%$/.test(x) ? P = a : (x = parseFloat(x), P = (c + C - P.h / 2) * x / 100 / (x / 100 + 1), (O && M - P >= b || !O && b - P >= M) && (P = a)), [d, Math.ceil(P)];
}, u.prototype.updateRanges = function(d, P) {
var O = this.legend.options.bubbleLegend;
O.minSize = d, O.maxSize = P, O.ranges = this.getRanges();
}, u.prototype.correctSizes = function() {
var d = this.legend, P = this.chart.series[this.options.seriesIndex].getPxExtremes();
1 < Math.abs(Math.ceil(P.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, P.maxPxSize), d.render());
}, u;
}();
}), E(g, "Series/Bubble/BubbleLegendComposition.js", [g["Series/Bubble/BubbleLegendDefaults.js"], g["Series/Bubble/BubbleLegendItem.js"], g["Core/DefaultOptions.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = R.setOptions, H = I.addEvent, $ = I.objectEach, U = I.wrap, W;
return function(N) {
function w(C, b, M) {
var x = this.legend, a = 0 <= v(this);
if (x && x.options.enabled && x.bubbleLegend && x.options.bubbleLegend.autoRanges && a) {
var c = x.bubbleLegend.options;
a = x.bubbleLegend.predictBubbleSizes(), x.bubbleLegend.updateRanges(a[0], a[1]), c.placed || (x.group.placed = !1, x.allItems.forEach(function(p) {
p.legendGroup.translateY = null;
})), x.render(), this.getMargins(), this.axes.forEach(function(p) {
p.visible && p.render(), c.placed || (p.setScale(), p.updateNames(), $(p.ticks, function(i) {
i.isNew = !0, i.isNewLabel = !0;
}));
}), c.placed = !0, this.getMargins(), C.call(this, b, M), x.bubbleLegend.correctSizes(), O(x, u(x));
} else
C.call(this, b, M), x && x.options.enabled && x.bubbleLegend && (x.render(), O(x, u(x)));
}
function v(C) {
C = C.series;
for (var b = 0; b < C.length; ) {
if (C[b] && C[b].isBubble && C[b].visible && C[b].zData.length)
return b;
b++;
}
return -1;
}
function u(C) {
C = C.allItems;
var b = [], M = C.length, x, a = 0;
for (x = 0; x < M; x++)
if (C[x].legendItemHeight && (C[x].itemHeight = C[x].legendItemHeight), C[x] === C[M - 1] || C[x + 1] && C[x]._legendItemPos[1] !== C[x + 1]._legendItemPos[1]) {
b.push({ height: 0 });
var c = b[b.length - 1];
for (a; a <= x; a++)
C[a].itemHeight > c.height && (c.height = C[a].itemHeight);
c.step = x;
}
return b;
}
function d(C) {
var b = this.bubbleLegend, M = this.options, x = M.bubbleLegend, a = v(this.chart);
b && b.ranges && b.ranges.length && (x.ranges.length && (x.autoRanges = !!x.ranges[0].autoRanges), this.destroyItem(b)), 0 <= a && M.enabled && x.enabled && (x.seriesIndex = a, this.bubbleLegend = new y(x, this), this.bubbleLegend.addToLegend(C.allItems));
}
function P() {
var C = this.chart, b = this.visible, M = this.chart.legend;
M && M.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, C = 0 <= v(C), M.bubbleLegend.visible !== C && (M.update({ bubbleLegend: { enabled: C } }), M.bubbleLegend.visible = C), this.visible = b);
}
function O(C, b) {
var M = C.options.rtl, x, a, c, p = 0;
C.allItems.forEach(function(i, l) {
x = i.legendGroup.translateX, a = i._legendItemPos[1], ((c = i.movementX) || M && i.ranges) && (c = M ? x - i.options.maxSize / 2 : x + c, i.legendGroup.attr({ translateX: c })), l > b[p].step && p++, i.legendGroup.attr({ translateY: Math.round(a + b[p].height / 2) }), i._legendItemPos[1] = a + b[p].height / 2;
});
}
var B = [];
N.compose = function(C, b, M) {
B.indexOf(C) === -1 && (B.push(C), Z({ legend: { bubbleLegend: h } }), U(C.prototype, "drawChartBox", w)), B.indexOf(b) === -1 && (B.push(b), H(b, "afterGetAllItems", d)), B.indexOf(M) === -1 && (B.push(M), H(M, "legendItemClick", P));
};
}(W || (W = {})), W;
}), E(g, "Series/Bubble/BubblePoint.js", [g["Core/Series/Point.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = this && this.__extends || function() {
var Z = function(H, $) {
return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, W) {
U.__proto__ = W;
} || function(U, W) {
for (var N in W)
W.hasOwnProperty(N) && (U[N] = W[N]);
}, Z(H, $);
};
return function(H, $) {
function U() {
this.constructor = H;
}
Z(H, $), H.prototype = $ === null ? Object.create($) : (U.prototype = $.prototype, new U());
};
}();
return R = R.extend, y = function(Z) {
function H() {
var $ = Z !== null && Z.apply(this, arguments) || this;
return $.options = void 0, $.series = void 0, $;
}
return I(H, Z), H.prototype.haloPath = function($) {
return h.prototype.haloPath.call(this, $ === 0 ? 0 : (this.marker && this.marker.radius || 0) + $);
}, H;
}(y.seriesTypes.scatter.prototype.pointClass), R(y.prototype, { ttBelow: !1 }), y;
}), E(g, "Series/Bubble/BubbleSeries.js", [
g["Core/Axis/Axis.js"],
g["Series/Bubble/BubbleLegendComposition.js"],
g["Series/Bubble/BubblePoint.js"],
g["Core/Color/Color.js"],
g["Core/Globals.js"],
g["Core/Series/Series.js"],
g["Core/Series/SeriesRegistry.js"],
g["Core/Utilities.js"]
], function(h, y, R, I, Z, H, $, U) {
var W = this && this.__extends || function() {
var M = function(x, a) {
return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
c.__proto__ = p;
} || function(c, p) {
for (var i in p)
p.hasOwnProperty(i) && (c[i] = p[i]);
}, M(x, a);
};
return function(x, a) {
function c() {
this.constructor = x;
}
M(x, a), x.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
};
}(), N = I.parse;
I = Z.noop;
var w = $.seriesTypes;
Z = w.column;
var v = w.scatter;
w = U.addEvent;
var u = U.arrayMax, d = U.arrayMin, P = U.clamp, O = U.extend, B = U.isNumber, C = U.merge, b = U.pick;
return U = function(M) {
function x() {
var a = M !== null && M.apply(this, arguments) || this;
return a.data = void 0, a.maxPxSize = void 0, a.minPxSize = void 0, a.options = void 0, a.points = void 0, a.radii = void 0, a.yData = void 0, a.zData = void 0, a;
}
return W(x, M), x.prototype.animate = function(a) {
!a && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
var p = c.graphic;
p && p.width && (this.hasRendered || p.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), p.animate(this.markerAttribs(c), this.options.animation));
}, this);
}, x.prototype.getRadii = function() {
var a = this, c = this.zData, p = this.yData, i = [], l = this.chart.bubbleZExtremes, s = this.getPxExtremes(), t = s.minPxSize, n = s.maxPxSize;
if (!l) {
var o = Number.MAX_VALUE, A = -Number.MAX_VALUE, _;
this.chart.series.forEach(function(T) {
T.bubblePadding && (T.visible || !a.chart.options.chart.ignoreHiddenSeries) && (T = T.getZExtremes()) && (o = Math.min(o || T.zMin, T.zMin), A = Math.max(A || T.zMax, T.zMax), _ = !0);
}), _ ? (l = { zMin: o, zMax: A }, this.chart.bubbleZExtremes = l) : l = { zMin: 0, zMax: 0 };
}
var D = 0;
for (s = c.length; D < s; D++) {
var j = c[D];
i.push(this.getRadius(l.zMin, l.zMax, t, n, j, p[D]));
}
this.radii = i;
}, x.prototype.getRadius = function(a, c, p, i, l, s) {
var t = this.options, n = t.sizeBy !== "width", o = t.zThreshold, A = c - a, _ = 0.5;
if (s === null || l === null)
return null;
if (B(l)) {
if (t.sizeByAbsoluteValue && (l = Math.abs(l - o), A = Math.max(c - o, Math.abs(a - o)), a = 0), l < a)
return p / 2 - 1;
0 < A && (_ = (l - a) / A);
}
return n && 0 <= _ && (_ = Math.sqrt(_)), Math.ceil(p + _ * (i - p)) / 2;
}, x.prototype.hasData = function() {
return !!this.processedXData.length;
}, x.prototype.pointAttribs = function(a, c) {
var p = this.options.marker.fillOpacity;
return a = H.prototype.pointAttribs.call(this, a, c), p !== 1 && (a.fill = N(a.fill).setOpacity(p).get("rgba")), a;
}, x.prototype.translate = function() {
M.prototype.translate.call(this), this.getRadii(), this.translateBubble();
}, x.prototype.translateBubble = function() {
for (var a = this.data, c = this.radii, p = this.getPxExtremes().minPxSize, i = a.length; i--; ) {
var l = a[i], s = c ? c[i] : 0;
B(s) && s >= p / 2 ? (l.marker = O(l.marker, { radius: s, width: 2 * s, height: 2 * s }), l.dlBox = { x: l.plotX - s, y: l.plotY - s, width: 2 * s, height: 2 * s }) : l.shapeArgs = l.plotY = l.dlBox = void 0;
}
}, x.prototype.getPxExtremes = function() {
var a = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
if (typeof i == "string") {
var l = /%$/.test(i);
i = parseInt(i, 10);
}
return l ? a * i / 100 : i;
}, p = c(b(this.options.minSize, 8));
return c = Math.max(c(b(this.options.maxSize, "20%")), p), {
minPxSize: p,
maxPxSize: c
};
}, x.prototype.getZExtremes = function() {
var a = this.options, c = (this.zData || []).filter(B);
if (c.length) {
var p = b(a.zMin, P(d(c), a.displayNegative === !1 ? a.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
if (a = b(a.zMax, u(c)), B(p) && B(a))
return { zMin: p, zMax: a };
}
}, x.compose = y.compose, x.defaultOptions = C(v.defaultOptions, { dataLabels: { formatter: function() {
var a = this.series.chart.numberFormatter, c = this.point.z;
return B(c) ? a(c, -1) : "";
}, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: {
lineColor: null,
lineWidth: 1,
fillOpacity: 0.5,
radius: null,
states: { hover: { radiusPlus: 0 } },
symbol: "circle"
}, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), x;
}(v), O(U.prototype, {
alignDataLabel: Z.prototype.alignDataLabel,
applyZones: I,
bubblePadding: !0,
buildKDTree: I,
directTouch: !0,
isBubble: !0,
pointArrayMap: ["y", "z"],
pointClass: R,
parallelArrays: ["x", "y", "z"],
trackerGroups: ["group", "dataLabelsGroup"],
specialGroup: "group",
zoneAxis: "z"
}), w(U, "updatedData", function(M) {
delete M.target.chart.bubbleZExtremes;
}), h.prototype.beforePadding = function() {
var M = this, x = this.len, a = this.chart, c = 0, p = x, i = this.isXAxis, l = i ? "xData" : "yData", s = this.min, t = this.max - s, n = x / t, o;
this.series.forEach(function(A) {
if (A.bubblePadding && (A.visible || !a.options.chart.ignoreHiddenSeries)) {
o = M.allowZoomOutside = !0;
var _ = A[l];
if (i && A.getRadii(0, 0, A), 0 < t) {
for (var D = _.length; D--; )
if (B(_[D]) && M.dataMin <= _[D] && _[D] <= M.max) {
var j = A.radii && A.radii[D] || 0;
c = Math.min((_[D] - s) * n - j, c), p = Math.max((_[D] - s) * n + j, p);
}
}
}
}), o && 0 < t && !this.logarithmic && (p -= x, n *= (x + Math.max(0, c) - Math.min(p, x)) / x, [["min", "userMin", c], ["max", "userMax", p]].forEach(function(A) {
typeof b(M.options[A[0]], M[A[1]]) > "u" && (M[A[0]] += A[2] / n);
}));
}, $.registerSeriesType("bubble", U), U;
}), E(g, "Series/ColumnRange/ColumnRangePoint.js", [g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y) {
var R = this && this.__extends || function() {
var $ = function(U, W) {
return $ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, w) {
N.__proto__ = w;
} || function(N, w) {
for (var v in w)
w.hasOwnProperty(v) && (N[v] = w[v]);
}, $(U, W);
};
return function(U, W) {
function N() {
this.constructor = U;
}
$(U, W), U.prototype = W === null ? Object.create(W) : (N.prototype = W.prototype, new N());
};
}(), I = h.seriesTypes;
h = I.column.prototype.pointClass;
var Z = y.extend, H = y.isNumber;
return y = function($) {
function U() {
var W = $ !== null && $.apply(this, arguments) || this;
return W.series = void 0, W.options = void 0, W.barX = void 0, W.pointWidth = void 0, W.shapeType = void 0, W;
}
return R(U, $), U.prototype.isValid = function() {
return H(this.low);
}, U;
}(I.arearange.prototype.pointClass), Z(y.prototype, { setState: h.prototype.setState }), y;
}), E(g, "Series/ColumnRange/ColumnRangeSeries.js", [g["Series/ColumnRange/ColumnRangePoint.js"], g["Core/Globals.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = this && this.__extends || function() {
var P = function(O, B) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var M in b)
b.hasOwnProperty(M) && (C[M] = b[M]);
}, P(O, B);
};
return function(O, B) {
function C() {
this.constructor = O;
}
P(O, B), O.prototype = B === null ? Object.create(B) : (C.prototype = B.prototype, new C());
};
}();
y = y.noop;
var H = R.seriesTypes, $ = H.arearange, U = H.column, W = U.prototype, N = $.prototype, w = I.clamp, v = I.merge, u = I.pick;
I = I.extend;
var d = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
return H = function(P) {
function O() {
var B = P !== null && P.apply(this, arguments) || this;
return B.data = void 0, B.points = void 0, B.options = void 0, B;
}
return Z(O, P), O.prototype.setOptions = function() {
return v(!0, arguments[0], { stacking: void 0 }), N.setOptions.apply(this, arguments);
}, O.prototype.translate = function() {
var B = this, C = B.yAxis, b = B.xAxis, M = b.startAngleRad, x, a = B.chart, c = B.xAxis.isRadial, p = Math.max(a.chartWidth, a.chartHeight) + 999, i;
W.translate.apply(B), B.points.forEach(function(l) {
var s = l.shapeArgs || {}, t = B.options.minPointLength;
l.plotHigh = i = w(C.translate(l.high, 0, 1, 0, 1), -p, p), l.plotLow = w(l.plotY, -p, p);
var n = i, o = u(
l.rectPlotY,
l.plotY
) - i;
Math.abs(o) < t ? (t -= o, o += t, n -= t / 2) : 0 > o && (o *= -1, n -= o), c ? (x = l.barX + M, l.shapeType = "arc", l.shapeArgs = B.polarArc(n + o, n, x, x + l.pointWidth)) : (s.height = o, s.y = n, t = s.x, t = t === void 0 ? 0 : t, s = s.width, s = s === void 0 ? 0 : s, l.tooltipPos = a.inverted ? [C.len + C.pos - a.plotLeft - n - o / 2, b.len + b.pos - a.plotTop - t - s / 2, o] : [b.left - a.plotLeft + t + s / 2, C.pos - a.plotTop + n + o / 2, o]);
});
}, O.prototype.crispCol = function() {
return W.crispCol.apply(this, arguments);
}, O.prototype.drawPoints = function() {
return W.drawPoints.apply(this, arguments);
}, O.prototype.drawTracker = function() {
return W.drawTracker.apply(this, arguments);
}, O.prototype.getColumnMetrics = function() {
return W.getColumnMetrics.apply(this, arguments);
}, O.prototype.pointAttribs = function() {
return W.pointAttribs.apply(this, arguments);
}, O.prototype.adjustForMissingColumns = function() {
return W.adjustForMissingColumns.apply(this, arguments);
}, O.prototype.animate = function() {
return W.animate.apply(this, arguments);
}, O.prototype.translate3dPoints = function() {
return W.translate3dPoints.apply(this, arguments);
}, O.prototype.translate3dShapes = function() {
return W.translate3dShapes.apply(this, arguments);
}, O.defaultOptions = v(U.defaultOptions, $.defaultOptions, d), O;
}($), I(H.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
return W.polarArc.apply(this, arguments);
}, pointClass: h }), R.registerSeriesType("columnrange", H), H;
}), E(g, "Series/ColumnPyramid/ColumnPyramidSeries.js", [g["Series/Column/ColumnSeries.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = this && this.__extends || function() {
var W = function(N, w) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, u) {
v.__proto__ = u;
} || function(v, u) {
for (var d in u)
u.hasOwnProperty(d) && (v[d] = u[d]);
}, W(N, w);
};
return function(N, w) {
function v() {
this.constructor = N;
}
W(N, w), N.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), Z = h.prototype, H = R.clamp, $ = R.merge, U = R.pick;
return R = function(W) {
function N() {
var w = W !== null && W.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return I(N, W), N.prototype.translate = function() {
var w = this, v = w.chart, u = w.options, d = w.dense = 2 > w.closestPointRange * w.xAxis.transA;
d = w.borderWidth = U(u.borderWidth, d ? 0 : 1);
var P = w.yAxis, O = u.threshold, B = w.translatedThreshold = P.getThreshold(O), C = U(u.minPointLength, 5), b = w.getColumnMetrics(), M = b.width, x = w.barW = Math.max(M, 1 + 2 * d), a = w.pointXOffset = b.offset;
v.inverted && (B -= 0.5), u.pointPadding && (x = Math.ceil(x)), Z.translate.apply(w), w.points.forEach(function(c) {
var p = U(c.yBottom, B), i = 999 + Math.abs(p), l = H(c.plotY, -i, P.len + i);
i = c.plotX + a;
var s = x / 2, t = Math.min(l, p);
p = Math.max(l, p) - t;
var n;
c.barX = i, c.pointWidth = M, c.tooltipPos = v.inverted ? [P.len + P.pos - v.plotLeft - l, w.xAxis.len - i - s, p] : [i + s, l + P.pos - v.plotTop, p], l = O + (c.total || c.y), u.stacking === "percent" && (l = O + (0 > c.y) ? -100 : 100), l = P.toPixels(l, !0);
var o = (n = v.plotHeight - l - (v.plotHeight - B)) ? s * (t - l) / n : 0, A = n ? s * (t + p - l) / n : 0;
n = i - o + s, o = i + o + s;
var _ = i + A + s;
A = i - A + s;
var D = t - C, j = t + p;
0 > c.y && (D = t, j = t + p + C), v.inverted && (_ = P.width - t, n = l - (P.width - B), o = s * (l - _) / n, A = s * (l - (_ - p)) / n, n = i + s + o, o = n - 2 * o, _ = i - A + s, A = i + A + s, D = t, j = t + p - C, 0 > c.y && (j = t + p + C)), c.shapeType = "path", c.shapeArgs = { x: n, y: D, width: o - n, height: p, d: [["M", n, D], ["L", o, D], ["L", _, j], ["L", A, j], ["Z"]] };
});
}, N.defaultOptions = $(h.defaultOptions, {}), N;
}(h), y.registerSeriesType("columnpyramid", R), R;
}), E(g, "Series/ErrorBar/ErrorBarSeries.js", [g["Series/BoxPlot/BoxPlotSeries.js"], g["Series/Column/ColumnSeries.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = this && this.__extends || function() {
var W = function(N, w) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, u) {
v.__proto__ = u;
} || function(v, u) {
for (var d in u)
u.hasOwnProperty(d) && (v[d] = u[d]);
}, W(N, w);
};
return function(N, w) {
function v() {
this.constructor = N;
}
W(N, w), N.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), H = R.seriesTypes.arearange, $ = I.merge;
I = I.extend;
var U = function(W) {
function N() {
var w = W !== null && W.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return Z(N, W), N.prototype.getColumnMetrics = function() {
return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
}, N.prototype.drawDataLabels = function() {
var w = this.pointValKey;
H && (H.prototype.drawDataLabels.call(this), this.data.forEach(function(v) {
v.y = v[w];
}));
}, N.prototype.toYData = function(w) {
return [w.low, w.high];
}, N.defaultOptions = $(h.defaultOptions, {
color: "#000000",
grouping: !1,
linkedTo: ":previous",
tooltip: { pointFormat: '● {series.name}: {point.low} - {point.high}
' },
whiskerWidth: null
}), N;
}(h);
return I(U.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), R.registerSeriesType("errorbar", U), U;
}), E(g, "Series/Gauge/GaugePoint.js", [g["Core/Series/SeriesRegistry.js"]], function(h) {
var y = this && this.__extends || function() {
var R = function(I, Z) {
return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, $) {
H.__proto__ = $;
} || function(H, $) {
for (var U in $)
$.hasOwnProperty(U) && (H[U] = $[U]);
}, R(I, Z);
};
return function(I, Z) {
function H() {
this.constructor = I;
}
R(I, Z), I.prototype = Z === null ? Object.create(Z) : (H.prototype = Z.prototype, new H());
};
}();
return function(R) {
function I() {
var Z = R !== null && R.apply(this, arguments) || this;
return Z.options = void 0, Z.series = void 0, Z.shapeArgs = void 0, Z;
}
return y(I, R), I.prototype.setState = function(Z) {
this.state = Z;
}, I;
}(h.series.prototype.pointClass);
}), E(g, "Series/Gauge/GaugeSeries.js", [g["Series/Gauge/GaugePoint.js"], g["Core/Globals.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = this && this.__extends || function() {
var d = function(P, O) {
return d = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, C) {
B.__proto__ = C;
} || function(B, C) {
for (var b in C)
C.hasOwnProperty(b) && (B[b] = C[b]);
}, d(P, O);
};
return function(P, O) {
function B() {
this.constructor = P;
}
d(P, O), P.prototype = O === null ? Object.create(O) : (B.prototype = O.prototype, new B());
};
}();
y = y.noop;
var H = R.series, $ = R.seriesTypes.column, U = I.clamp, W = I.isNumber, N = I.extend, w = I.merge, v = I.pick, u = I.pInt;
return I = function(d) {
function P() {
var O = d !== null && d.apply(this, arguments) || this;
return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
}
return Z(P, d), P.prototype.translate = function() {
var O = this.yAxis, B = this.options, C = O.center;
this.generatePoints(), this.points.forEach(function(b) {
var M = w(B.dial, b.dial), x = u(v(M.radius, "80%")) * C[2] / 200, a = u(v(M.baseLength, "70%")) * x / 100, c = u(v(M.rearLength, "10%")) * x / 100, p = M.baseWidth || 3, i = M.topWidth || 1, l = B.overshoot, s = O.startAngleRad + O.translate(b.y, null, null, null, !0);
(W(l) || B.wrap === !1) && (l = W(l) ? l / 180 * Math.PI : 0, s = U(
s,
O.startAngleRad - l,
O.endAngleRad + l
)), s = 180 * s / Math.PI, b.shapeType = "path", b.shapeArgs = { d: M.path || [["M", -c, -p / 2], ["L", a, -p / 2], ["L", x, -i / 2], ["L", x, i / 2], ["L", a, p / 2], ["L", -c, p / 2], ["Z"]], translateX: C[0], translateY: C[1], rotation: s }, b.plotX = C[0], b.plotY = C[1];
});
}, P.prototype.drawPoints = function() {
var O = this, B = O.chart, C = O.yAxis.center, b = O.pivot, M = O.options, x = M.pivot, a = B.renderer;
O.points.forEach(function(c) {
var p = c.graphic, i = c.shapeArgs, l = i.d, s = w(M.dial, c.dial);
p ? (p.animate(i), i.d = l) : c.graphic = a[c.shapeType](i).attr({
rotation: i.rotation,
zIndex: 1
}).addClass("highcharts-dial").add(O.group), B.styledMode || c.graphic[p ? "animate" : "attr"]({ stroke: s.borderColor || "none", "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "#000000" });
}), b ? b.animate({ translateX: C[0], translateY: C[1] }) : (O.pivot = a.circle(0, 0, v(x.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(C[0], C[1]).add(O.group), B.styledMode || O.pivot.attr({ "stroke-width": x.borderWidth || 0, stroke: x.borderColor || "#cccccc", fill: x.backgroundColor || "#000000" }));
}, P.prototype.animate = function(O) {
var B = this;
O || B.points.forEach(function(C) {
var b = C.graphic;
b && (b.attr({ rotation: 180 * B.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: C.shapeArgs.rotation }, B.options.animation));
});
}, P.prototype.render = function() {
this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), H.prototype.render.call(this), this.group.clip(this.chart.clipRect);
}, P.prototype.setData = function(O, B) {
H.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), v(B, !0) && this.chart.redraw();
}, P.prototype.hasData = function() {
return !!this.points.length;
}, P.defaultOptions = w(H.defaultOptions, { dataLabels: { borderColor: "#cccccc", borderRadius: 3, borderWidth: 1, crop: !1, defer: !1, enabled: !0, verticalAlign: "top", y: 15, zIndex: 2 }, dial: {}, pivot: {}, tooltip: { headerFormat: "" }, showInLegend: !1 }), P;
}(H), N(I.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: $.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: h, trackerGroups: [
"group",
"dataLabelsGroup"
] }), R.registerSeriesType("gauge", I), I;
}), E(g, "Series/PackedBubble/PackedBubblePoint.js", [g["Core/Chart/Chart.js"], g["Core/Series/Point.js"], g["Core/Series/SeriesRegistry.js"]], function(h, y, R) {
var I = this && this.__extends || function() {
var Z = function(H, $) {
return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, W) {
U.__proto__ = W;
} || function(U, W) {
for (var N in W)
W.hasOwnProperty(N) && (U[N] = W[N]);
}, Z(H, $);
};
return function(H, $) {
function U() {
this.constructor = H;
}
Z(H, $), H.prototype = $ === null ? Object.create($) : (U.prototype = $.prototype, new U());
};
}();
return function(Z) {
function H() {
var $ = Z !== null && Z.apply(this, arguments) || this;
return $.degree = NaN, $.mass = NaN, $.radius = NaN, $.options = void 0, $.series = void 0, $.value = null, $;
}
return I(H, Z), H.prototype.destroy = function() {
return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
}, H.prototype.firePointEvent = function() {
var $ = this.series.options;
if (this.isParentNode && $.parentNode) {
var U = $.allowPointSelect;
$.allowPointSelect = $.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), $.allowPointSelect = U;
} else
y.prototype.firePointEvent.apply(this, arguments);
}, H.prototype.select = function() {
var $ = this.series.chart;
this.isParentNode ? ($.getSelectedPoints = $.getSelectedParentNodes, y.prototype.select.apply(this, arguments), $.getSelectedPoints = h.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
}, H;
}(R.seriesTypes.bubble.prototype.pointClass);
}), E(g, "Series/Networkgraph/DraggableNodes.js", [g["Core/Chart/Chart.js"], g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = R.addEvent;
y.dragNodesMixin = { onMouseDown: function(Z, H) {
H = this.chart.pointer.normalize(H), Z.fixedPosition = { chartX: H.chartX, chartY: H.chartY, plotX: Z.plotX, plotY: Z.plotY }, Z.inDragMode = !0;
}, onMouseMove: function(Z, H) {
if (Z.fixedPosition && Z.inDragMode) {
var $ = this.chart, U = $.pointer.normalize(H);
H = Z.fixedPosition.chartX - U.chartX, U = Z.fixedPosition.chartY - U.chartY;
var W = void 0, N = void 0, w = $.graphLayoutsLookup;
(5 < Math.abs(H) || 5 < Math.abs(U)) && (W = Z.fixedPosition.plotX - H, N = Z.fixedPosition.plotY - U, $.isInsidePlot(W, N) && (Z.plotX = W, Z.plotY = N, Z.hasDragged = !0, this.redrawHalo(Z), w.forEach(function(v) {
v.restartSimulation();
})));
}
}, onMouseUp: function(Z, H) {
Z.fixedPosition && (Z.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), Z.inDragMode = Z.hasDragged = !1, this.options.fixedDraggable || delete Z.fixedPosition);
}, redrawHalo: function(Z) {
Z && this.halo && this.halo.attr({ d: Z.haloPath(this.options.states.hover.halo.size) });
} }, I(h, "load", function() {
var Z = this, H, $, U;
Z.container && (H = I(Z.container, "mousedown", function(W) {
var N = Z.hoverPoint;
N && N.series && N.series.hasDraggableNodes && N.series.options.draggable && (N.series.onMouseDown(N, W), $ = I(Z.container, "mousemove", function(w) {
return N && N.series && N.series.onMouseMove(N, w);
}), U = I(Z.container.ownerDocument, "mouseup", function(w) {
return $(), U(), N && N.series && N.series.onMouseUp(N, w);
}));
})), I(Z, "destroy", function() {
H();
});
});
}), E(
g,
"Series/Networkgraph/Integrations.js",
[g["Core/Globals.js"]],
function(h) {
h.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, R) {
return (R - y) / y;
}, repulsiveForceFunction: function(y, R) {
return (R - y) / y * (R > y ? 1 : 0);
}, barycenter: function() {
var y = this.options.gravitationalConstant, R = this.barycenter.xFactor, I = this.barycenter.yFactor;
R = (R - (this.box.left + this.box.width) / 2) * y, I = (I - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(Z) {
Z.fixedPosition || (Z.plotX -= R / Z.mass / Z.degree, Z.plotY -= I / Z.mass / Z.degree);
});
}, repulsive: function(y, R, I) {
R = R * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += I.x * R, y.plotY += I.y * R);
}, attractive: function(y, R, I) {
var Z = y.getMass(), H = -I.x * R * this.diffTemperature;
R = -I.y * R * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= H * Z.fromNode / y.fromNode.degree, y.fromNode.plotY -= R * Z.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += H * Z.toNode / y.toNode.degree, y.toNode.plotY += R * Z.toNode / y.toNode.degree);
}, integrate: function(y, R) {
var I = -y.options.friction, Z = y.options.maxSpeed, H = (R.plotX + R.dispX - R.prevX) * I;
I *= R.plotY + R.dispY - R.prevY;
var $ = Math.abs, U = $(H) / (H || 1);
$ = $(I) / (I || 1), H = U * Math.min(Z, Math.abs(H)), I = $ * Math.min(Z, Math.abs(I)), R.prevX = R.plotX + R.dispX, R.prevY = R.plotY + R.dispY, R.plotX += H, R.plotY += I, R.temperature = y.vectorLength({ x: H, y: I });
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
} }, euler: { attractiveForceFunction: function(y, R) {
return y * y / R;
}, repulsiveForceFunction: function(y, R) {
return R * R / y;
}, barycenter: function() {
var y = this.options.gravitationalConstant, R = this.barycenter.xFactor, I = this.barycenter.yFactor;
this.nodes.forEach(function(Z) {
if (!Z.fixedPosition) {
var H = Z.getDegree();
H *= 1 + H / 2, Z.dispX += (R - Z.plotX) * y * H / Z.degree, Z.dispY += (I - Z.plotY) * y * H / Z.degree;
}
});
}, repulsive: function(y, R, I, Z) {
y.dispX += I.x / Z * R / y.degree, y.dispY += I.y / Z * R / y.degree;
}, attractive: function(y, R, I, Z) {
var H = y.getMass(), $ = I.x / Z * R;
R *= I.y / Z, y.fromNode.fixedPosition || (y.fromNode.dispX -= $ * H.fromNode / y.fromNode.degree, y.fromNode.dispY -= R * H.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += $ * H.toNode / y.toNode.degree, y.toNode.dispY += R * H.toNode / y.toNode.degree);
}, integrate: function(y, R) {
R.dispX += R.dispX * y.options.friction, R.dispY += R.dispY * y.options.friction;
var I = R.temperature = y.vectorLength({ x: R.dispX, y: R.dispY });
I !== 0 && (R.plotX += R.dispX / I * Math.min(Math.abs(R.dispX), y.temperature), R.plotY += R.dispY / I * Math.min(Math.abs(R.dispY), y.temperature));
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
} } };
}
), E(
g,
"Series/Networkgraph/QuadTree.js",
[g["Core/Globals.js"], g["Core/Utilities.js"]],
function(h, y) {
y = y.extend;
var R = h.QuadTreeNode = function(I) {
this.box = I, this.boxSize = Math.min(I.width, I.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
};
y(R.prototype, { insert: function(I, Z) {
this.isInternal ? this.nodes[this.getBoxPosition(I)].insert(I, Z - 1) : (this.isEmpty = !1, this.body ? Z ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, Z - 1), this.body = !0), this.nodes[this.getBoxPosition(I)].insert(I, Z - 1)) : (Z = new R({
top: I.plotX,
left: I.plotY,
width: 0.1,
height: 0.1
}), Z.body = I, Z.isInternal = !1, this.nodes.push(Z)) : (this.isInternal = !1, this.body = I));
}, updateMassAndCenter: function() {
var I = 0, Z = 0, H = 0;
this.isInternal ? (this.nodes.forEach(function($) {
$.isEmpty || (I += $.mass, Z += $.plotX * $.mass, H += $.plotY * $.mass);
}), Z /= I, H /= I) : this.body && (I = this.body.mass, Z = this.body.plotX, H = this.body.plotY), this.mass = I, this.plotX = Z, this.plotY = H;
}, divideBox: function() {
var I = this.box.width / 2, Z = this.box.height / 2;
this.nodes[0] = new R({
left: this.box.left,
top: this.box.top,
width: I,
height: Z
}), this.nodes[1] = new R({ left: this.box.left + I, top: this.box.top, width: I, height: Z }), this.nodes[2] = new R({ left: this.box.left + I, top: this.box.top + Z, width: I, height: Z }), this.nodes[3] = new R({ left: this.box.left, top: this.box.top + Z, width: I, height: Z });
}, getBoxPosition: function(I) {
var Z = I.plotY < this.box.top + this.box.height / 2;
return I.plotX < this.box.left + this.box.width / 2 ? Z ? 0 : 3 : Z ? 1 : 2;
} }), h = h.QuadTree = function(I, Z, H, $) {
this.box = { left: I, top: Z, width: H, height: $ }, this.maxDepth = 25, this.root = new R(
this.box,
"0"
), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
}, y(h.prototype, { insertNodes: function(I) {
I.forEach(function(Z) {
this.root.insert(Z, this.maxDepth);
}, this);
}, visitNodeRecursive: function(I, Z, H) {
var $;
I || (I = this.root), I === this.root && Z && ($ = Z(I)), $ !== !1 && (I.nodes.forEach(function(U) {
if (U.isInternal) {
if (Z && ($ = Z(U)), $ === !1)
return;
this.visitNodeRecursive(U, Z, H);
} else
U.body && Z && Z(U.body);
H && H(U);
}, this), I === this.root && H && H(I));
}, calculateMassAndCenter: function() {
this.visitNodeRecursive(
null,
null,
function(I) {
I.updateMassAndCenter();
}
);
} });
}
), E(g, "Series/Networkgraph/Layouts.js", [g["Core/Chart/Chart.js"], g["Core/Animation/AnimationUtilities.js"], g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = y.setAnimation;
y = I.addEvent;
var H = I.clamp, $ = I.defined, U = I.extend, W = I.isFunction, N = I.pick;
R.layouts = { "reingold-fruchterman": function() {
} }, U(R.layouts["reingold-fruchterman"].prototype, {
init: function(w) {
this.options = w, this.nodes = [], this.links = [], this.series = [], this.box = {
x: 0,
y: 0,
width: 0,
height: 0
}, this.setInitialRendering(!0), this.integration = R.networkgraphIntegrations[w.integration], this.enableSimulation = w.enableSimulation, this.attractiveForce = N(w.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = N(w.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = w.approximation;
},
updateSimulation: function(w) {
this.enableSimulation = N(w, this.options.enableSimulation);
},
start: function() {
var w = this.series, v = this.options;
this.currentStep = 0, this.forces = w[0] && w[0].forces || [], this.chart = w[0] && w[0].chart, this.initialRendering && (this.initPositions(), w.forEach(function(u) {
u.finishedAnimating = !0, u.render();
})), this.setK(), this.resetSimulation(v), this.enableSimulation && this.step();
},
step: function() {
var w = this, v = this.series;
w.currentStep++, w.approximation === "barnes-hut" && (w.createQuadTree(), w.quadTree.calculateMassAndCenter()), w.forces.forEach(function(u) {
w[u + "Forces"](w.temperature);
}), w.applyLimits(w.temperature), w.temperature = w.coolDown(
w.startTemperature,
w.diffTemperature,
w.currentStep
), w.prevSystemTemperature = w.systemTemperature, w.systemTemperature = w.getSystemTemperature(), w.enableSimulation && (v.forEach(function(u) {
u.chart && u.render();
}), w.maxIterations-- && isFinite(w.temperature) && !w.isStable() ? (w.simulation && R.win.cancelAnimationFrame(w.simulation), w.simulation = R.win.requestAnimationFrame(function() {
w.step();
})) : w.simulation = !1);
},
stop: function() {
this.simulation && R.win.cancelAnimationFrame(this.simulation);
},
setArea: function(w, v, u, d) {
this.box = {
left: w,
top: v,
width: u,
height: d
};
},
setK: function() {
this.k = this.options.linkLength || this.integration.getK(this);
},
addElementsToCollection: function(w, v) {
w.forEach(function(u) {
v.indexOf(u) === -1 && v.push(u);
});
},
removeElementFromCollection: function(w, v) {
w = v.indexOf(w), w !== -1 && v.splice(w, 1);
},
clear: function() {
this.nodes.length = 0, this.links.length = 0, this.series.length = 0, this.resetSimulation();
},
resetSimulation: function() {
this.forcedStop = !1, this.systemTemperature = 0, this.setMaxIterations(), this.setTemperature(), this.setDiffTemperature();
},
restartSimulation: function() {
this.simulation ? this.resetSimulation() : (this.setInitialRendering(!1), this.enableSimulation ? this.start() : this.setMaxIterations(1), this.chart && this.chart.redraw(), this.setInitialRendering(!0));
},
setMaxIterations: function(w) {
this.maxIterations = N(w, this.options.maxIterations);
},
setTemperature: function() {
this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
},
setDiffTemperature: function() {
this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
},
setInitialRendering: function(w) {
this.initialRendering = w;
},
createQuadTree: function() {
this.quadTree = new R.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
},
initPositions: function() {
var w = this.options.initialPositions;
W(w) ? (w.call(this), this.nodes.forEach(function(v) {
$(v.prevX) || (v.prevX = v.plotX), $(v.prevY) || (v.prevY = v.plotY), v.dispX = 0, v.dispY = 0;
})) : w === "circle" ? this.setCircularPositions() : this.setRandomPositions();
},
setCircularPositions: function() {
function w(b) {
b.linksFrom.forEach(function(M) {
B[M.toNode.id] || (B[M.toNode.id] = !0, O.push(M.toNode), w(M.toNode));
});
}
var v = this.box, u = this.nodes, d = 2 * Math.PI / (u.length + 1), P = u.filter(function(b) {
return b.linksTo.length === 0;
}), O = [], B = {}, C = this.options.initialPositionRadius;
P.forEach(function(b) {
O.push(b), w(b);
}), O.length ? u.forEach(function(b) {
O.indexOf(b) === -1 && O.push(b);
}) : O = u, O.forEach(function(b, M) {
b.plotX = b.prevX = N(b.plotX, v.width / 2 + C * Math.cos(M * d)), b.plotY = b.prevY = N(b.plotY, v.height / 2 + C * Math.sin(M * d)), b.dispX = 0, b.dispY = 0;
});
},
setRandomPositions: function() {
function w(P) {
return P = P * P / Math.PI, P -= Math.floor(P);
}
var v = this.box, u = this.nodes, d = u.length + 1;
u.forEach(function(P, O) {
P.plotX = P.prevX = N(P.plotX, v.width * w(O)), P.plotY = P.prevY = N(P.plotY, v.height * w(d + O)), P.dispX = 0, P.dispY = 0;
});
},
force: function(w) {
this.integration[w].apply(this, Array.prototype.slice.call(arguments, 1));
},
barycenterForces: function() {
this.getBarycenter(), this.force("barycenter");
},
getBarycenter: function() {
var w = 0, v = 0, u = 0;
return this.nodes.forEach(function(d) {
v += d.plotX * d.mass, u += d.plotY * d.mass, w += d.mass;
}), this.barycenter = { x: v, y: u, xFactor: v / w, yFactor: u / w };
},
barnesHutApproximation: function(w, v) {
var u = this.getDistXY(w, v), d = this.vectorLength(u);
if (w !== v && d !== 0)
if (v.isInternal)
if (v.boxSize / d < this.options.theta && d !== 0) {
var P = this.repulsiveForce(d, this.k);
this.force("repulsive", w, P * v.mass, u, d);
var O = !1;
} else
O = !0;
else
P = this.repulsiveForce(d, this.k), this.force("repulsive", w, P * v.mass, u, d);
return O;
},
repulsiveForces: function() {
var w = this;
w.approximation === "barnes-hut" ? w.nodes.forEach(function(v) {
w.quadTree.visitNodeRecursive(
null,
function(u) {
return w.barnesHutApproximation(v, u);
}
);
}) : w.nodes.forEach(function(v) {
w.nodes.forEach(function(u) {
if (v !== u && !v.fixedPosition) {
var d = w.getDistXY(v, u), P = w.vectorLength(d);
if (P !== 0) {
var O = w.repulsiveForce(P, w.k);
w.force("repulsive", v, O * u.mass, d, P);
}
}
});
});
},
attractiveForces: function() {
var w = this, v, u, d;
w.links.forEach(function(P) {
P.fromNode && P.toNode && (v = w.getDistXY(P.fromNode, P.toNode), u = w.vectorLength(v), u !== 0 && (d = w.attractiveForce(u, w.k), w.force("attractive", P, d, v, u)));
});
},
applyLimits: function() {
var w = this;
w.nodes.forEach(function(v) {
v.fixedPosition || (w.integration.integrate(w, v), w.applyLimitBox(v, w.box), v.dispX = 0, v.dispY = 0);
});
},
applyLimitBox: function(w, v) {
var u = w.radius;
w.plotX = H(w.plotX, v.left + u, v.width - u), w.plotY = H(w.plotY, v.top + u, v.height - u);
},
coolDown: function(w, v, u) {
return w - v * u;
},
isStable: function() {
return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
},
getSystemTemperature: function() {
return this.nodes.reduce(function(w, v) {
return w + v.temperature;
}, 0);
},
vectorLength: function(w) {
return Math.sqrt(w.x * w.x + w.y * w.y);
},
getDistR: function(w, v) {
return w = this.getDistXY(w, v), this.vectorLength(w);
},
getDistXY: function(w, v) {
var u = w.plotX - v.plotX;
return w = w.plotY - v.plotY, { x: u, y: w, absX: Math.abs(u), absY: Math.abs(w) };
}
}), y(h, "predraw", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
w.stop();
});
}), y(h, "render", function() {
function w(d) {
d.maxIterations-- && isFinite(d.temperature) && !d.isStable() && !d.enableSimulation && (d.beforeStep && d.beforeStep(), d.step(), u = !1, v = !0);
}
var v = !1;
if (this.graphLayoutsLookup) {
for (Z(!1, this), this.graphLayoutsLookup.forEach(function(d) {
d.start();
}); !u; ) {
var u = !0;
this.graphLayoutsLookup.forEach(w);
}
v && this.series.forEach(function(d) {
d && d.layout && d.render();
});
}
}), y(h, "beforePrint", function() {
this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(w) {
w.updateSimulation(!1);
}), this.redraw());
}), y(h, "afterPrint", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
w.updateSimulation();
}), this.redraw();
});
}), E(g, "Series/PackedBubble/PackedBubbleComposition.js", [g["Core/Chart/Chart.js"], g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = y.layouts["reingold-fruchterman"], Z = R.addEvent, H = R.extendClass, $ = R.pick;
h.prototype.getSelectedParentNodes = function() {
var U = [];
return this.series.forEach(function(W) {
W.parentNode && W.parentNode.selected && U.push(W.parentNode);
}), U;
}, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(U, W, N, w) {
return Math.min(U, (N.marker.radius + w.marker.radius) / 2);
}, barycenter: function() {
var U = this, W = U.options.gravitationalConstant, N = U.box, w = U.nodes, v, u;
w.forEach(function(d) {
U.options.splitSeries && !d.isParentNode ? (v = d.series.parentNode.plotX, u = d.series.parentNode.plotY) : (v = N.width / 2, u = N.height / 2), d.fixedPosition || (d.plotX -= (d.plotX - v) * W / (d.mass * Math.sqrt(w.length)), d.plotY -= (d.plotY - u) * W / (d.mass * Math.sqrt(w.length)));
});
}, repulsive: function(U, W, N, w) {
var v = W * this.diffTemperature / U.mass / U.degree;
W = N.x * v, N = N.y * v, U.fixedPosition || (U.plotX += W, U.plotY += N), w.fixedPosition || (w.plotX -= W, w.plotY -= N);
}, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = H(I, { beforeStep: function() {
this.options.marker && this.series.forEach(function(U) {
U && U.calculateParentRadius();
});
}, isStable: function() {
var U = Math.abs(this.prevSystemTemperature - this.systemTemperature);
return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > U || 0 >= this.temperature;
}, setCircularPositions: function() {
var U = this, W = U.box, N = U.nodes, w = 2 * Math.PI / (N.length + 1), v, u, d = U.options.initialPositionRadius;
N.forEach(function(P, O) {
U.options.splitSeries && !P.isParentNode ? (v = P.series.parentNode.plotX, u = P.series.parentNode.plotY) : (v = W.width / 2, u = W.height / 2), P.plotX = P.prevX = $(P.plotX, v + d * Math.cos(P.index || O * w)), P.plotY = P.prevY = $(P.plotY, u + d * Math.sin(P.index || O * w)), P.dispX = 0, P.dispY = 0;
});
}, repulsiveForces: function() {
var U = this, W, N, w, v = U.options.bubblePadding;
U.nodes.forEach(function(u) {
u.degree = u.mass, u.neighbours = 0, U.nodes.forEach(function(d) {
W = 0, u === d || u.fixedPosition || !U.options.seriesInteraction && u.series !== d.series || (w = U.getDistXY(u, d), N = U.vectorLength(w) - (u.marker.radius + d.marker.radius + v), 0 > N && (u.degree += 0.01, u.neighbours++, W = U.repulsiveForce(-N / Math.sqrt(u.neighbours), U.k, u, d)), U.force("repulsive", u, W * d.mass, w, d, N));
});
});
}, applyLimitBox: function(U) {
if (this.options.splitSeries && !U.isParentNode && this.options.parentNodeLimit) {
var W = this.getDistXY(U, U.series.parentNode), N = U.series.parentNodeRadius - U.marker.radius - this.vectorLength(W);
0 > N && N > -2 * U.marker.radius && (U.plotX -= 0.01 * W.x, U.plotY -= 0.01 * W.y);
}
I.prototype.applyLimitBox.apply(this, arguments);
} }), Z(h, "beforeRedraw", function() {
this.allDataPoints && delete this.allDataPoints;
});
}), E(g, "Series/PackedBubble/PackedBubbleSeries.js", [g["Core/Color/Color.js"], g["Core/Globals.js"], g["Series/PackedBubble/PackedBubblePoint.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I, Z) {
var H = this && this.__extends || function() {
var M = function(x, a) {
return M = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
c.__proto__ = p;
} || function(c, p) {
for (var i in p)
p.hasOwnProperty(i) && (c[i] = p[i]);
}, M(x, a);
};
return function(x, a) {
function c() {
this.constructor = x;
}
M(x, a), x.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
};
}(), $ = h.parse, U = I.series, W = I.seriesTypes.bubble, N = Z.addEvent, w = Z.clamp, v = Z.defined, u = Z.extend, d = Z.fireEvent, P = Z.isArray, O = Z.isNumber, B = Z.merge, C = Z.pick, b = y.dragNodesMixin;
return h = function(M) {
function x() {
var a = M !== null && M.apply(this, arguments) || this;
return a.chart = void 0, a.data = void 0, a.layout = void 0, a.options = void 0, a.points = void 0, a.xData = void 0, a;
}
return H(x, M), x.prototype.accumulateAllPoints = function(a) {
var c = a.chart, p = [], i, l;
for (i = 0; i < c.series.length; i++)
if (a = c.series[i], a.is("packedbubble") && a.visible || !c.options.chart.ignoreHiddenSeries)
for (l = 0; l < a.yData.length; l++)
p.push([null, null, a.yData[l], a.index, l, { id: l, marker: { radius: 0 } }]);
return p;
}, x.prototype.addLayout = function() {
var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = p = []);
var l = c[a.type];
l || (a.enableSimulation = v(i.forExport) ? !i.forExport : a.enableSimulation, c[a.type] = l = new y.layouts[a.type](), l.init(a), p.splice(l.index, 0, l)), this.layout = l, this.points.forEach(function(s) {
s.mass = 2, s.degree = 1, s.collisionNmb = 1;
}), l.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), l.addElementsToCollection([this], l.series), l.addElementsToCollection(this.points, l.nodes);
}, x.prototype.addSeriesLayout = function() {
var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = B(a, a.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), l = c[a.type + "-series"];
l || (c[a.type + "-series"] = l = new y.layouts[a.type](), l.init(i), p.splice(l.index, 0, l)), this.parentNodeLayout = l, this.createParentNodes();
}, x.prototype.calculateParentRadius = function() {
var a = this.seriesBox();
this.parentNodeRadius = w(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(
a.width,
2
) + Math.pow(a.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20), this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
}, x.prototype.calculateZExtremes = function() {
var a = this.options.zMin, c = this.options.zMax, p = 1 / 0, i = -1 / 0;
return a && c ? [a, c] : (this.chart.series.forEach(function(l) {
l.yData.forEach(function(s) {
v(s) && (s > i && (i = s), s < p && (p = s));
});
}), a = C(a, p), c = C(c, i), [a, c]);
}, x.prototype.checkOverlap = function(a, c) {
var p = a[0] - c[0], i = a[1] - c[1];
return -1e-3 > Math.sqrt(p * p + i * i) - Math.abs(a[2] + c[2]);
}, x.prototype.createParentNodes = function() {
var a = this, c = a.chart, p = a.parentNodeLayout, i, l = a.parentNode, s = a.pointClass, t = a.layout.options, n = { radius: a.parentNodeRadius, lineColor: a.color, fillColor: $(a.color).brighten(0.4).get() };
t.parentNodeOptions && (n = B(t.parentNodeOptions.marker || {}, n)), a.parentNodeMass = 0, a.points.forEach(function(o) {
a.parentNodeMass += Math.PI * Math.pow(o.marker.radius, 2);
}), a.calculateParentRadius(), p.nodes.forEach(function(o) {
o.seriesIndex === a.index && (i = !0);
}), p.setArea(0, 0, c.plotWidth, c.plotHeight), i || (l || (l = new s().init(this, { mass: a.parentNodeRadius / 2, marker: n, dataLabels: { inside: !1 }, states: { normal: { marker: n }, hover: { marker: n } }, dataLabelOnNull: !0, degree: a.parentNodeRadius, isParentNode: !0, seriesIndex: a.index })), a.parentNode && (l.plotX = a.parentNode.plotX, l.plotY = a.parentNode.plotY), a.parentNode = l, p.addElementsToCollection([a], p.series), p.addElementsToCollection([l], p.nodes));
}, x.prototype.deferLayout = function() {
var a = this.options.layoutAlgorithm;
this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
}, x.prototype.destroy = function() {
this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
a.removeElementFromCollection(this, a.series);
}, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), U.prototype.destroy.apply(this, arguments);
}, x.prototype.drawDataLabels = function() {
var a = this.options.dataLabels.textPath, c = this.points;
U.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, U.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = a);
}, x.prototype.drawGraph = function() {
if (this.layout && this.layout.options.splitSeries) {
var a = this.chart, c = this.layout.options.parentNodeOptions.marker, p = { fill: c.fillColor || $(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": C(c.lineWidth, this.options.lineWidth) };
this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, a.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = B({
x: this.parentNode.plotX - this.parentNodeRadius,
y: this.parentNode.plotY - this.parentNodeRadius,
width: 2 * this.parentNodeRadius,
height: 2 * this.parentNodeRadius
}, p), this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(p.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
}
}, x.prototype.drawTracker = function() {
var a = this.parentNode;
if (M.prototype.drawTracker.call(this), a) {
var c = P(a.dataLabels) ? a.dataLabels : a.dataLabel ? [a.dataLabel] : [];
a.graphic && (a.graphic.element.point = a), c.forEach(function(p) {
p.div ? p.div.point = a : p.element.point = a;
});
}
}, x.prototype.getPointRadius = function() {
var a = this, c = a.chart, p = a.options, i = p.useSimulation, l = Math.min(c.plotWidth, c.plotHeight), s = {}, t = [], n = c.allDataPoints, o, A, _, D;
["minSize", "maxSize"].forEach(function(T) {
var X = parseInt(p[T], 10), f = /%$/.test(p[T]);
s[T] = f ? l * X / 100 : X * Math.sqrt(n.length);
}), c.minRadius = o = s.minSize / Math.sqrt(n.length), c.maxRadius = A = s.maxSize / Math.sqrt(n.length);
var j = i ? a.calculateZExtremes() : [o, A];
(n || []).forEach(function(T, X) {
_ = i ? w(T[2], j[0], j[1]) : T[2], D = a.getRadius(j[0], j[1], o, A, _), D === 0 && (D = null), n[X][2] = D, t.push(D);
}), a.radii = t;
}, x.prototype.init = function() {
return U.prototype.init.apply(this, arguments), this.eventsToUnbind.push(N(this, "updatedData", function() {
this.chart.series.forEach(function(a) {
a.type === this.type && (a.isDirty = !0);
}, this);
})), this;
}, x.prototype.onMouseUp = function(a) {
if (a.fixedPosition && !a.removed) {
var c, p, i = this.layout, l = this.parentNodeLayout;
l && i.options.dragBetweenSeries && l.nodes.forEach(function(s) {
a && a.marker && s !== a.series.parentNode && (c = i.getDistXY(a, s), p = i.vectorLength(c) - s.marker.radius - a.marker.radius, 0 > p && (s.series.addPoint(B(a.options, { plotX: a.plotX, plotY: a.plotY }), !1), i.removeElementFromCollection(a, i.nodes), a.remove()));
}), b.onMouseUp.apply(this, arguments);
}
}, x.prototype.placeBubbles = function(a) {
var c = this.checkOverlap, p = this.positionBubble, i = [], l = 1, s = 0, t = 0, n = [], o;
if (a = a.sort(function(A, _) {
return _[2] - A[2];
}), a.length) {
if (i.push([[0, 0, a[0][2], a[0][3], a[0][4]]]), 1 < a.length)
for (i.push([[0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4]]]), o = 2; o < a.length; o++)
a[o][2] = a[o][2] || 1, n = p(i[l][s], i[l - 1][t], a[o]), c(n, i[l][0]) ? (i.push([]), t = 0, i[l + 1].push(p(i[l][s], i[l][0], a[o])), l++, s = 0) : 1 < l && i[l - 1][t + 1] && c(n, i[l - 1][t + 1]) ? (t++, i[l].push(p(i[l][s], i[l - 1][t], a[o])), s++) : (s++, i[l].push(n));
this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), n = this.chart.rawPositions;
}
return n;
}, x.prototype.pointAttribs = function(a, c) {
var p = this.options, i = p.marker;
return a && a.isParentNode && p.layoutAlgorithm && p.layoutAlgorithm.parentNodeOptions && (i = p.layoutAlgorithm.parentNodeOptions.marker), p = i.fillOpacity, a = U.prototype.pointAttribs.call(this, a, c), p !== 1 && (a["fill-opacity"] = p), a;
}, x.prototype.positionBubble = function(a, c, p) {
var i = Math.sqrt, l = Math.asin, s = Math.acos, t = Math.pow, n = Math.abs;
return i = i(t(a[0] - c[0], 2) + t(a[1] - c[1], 2)), s = s((t(i, 2) + t(p[2] + c[2], 2) - t(p[2] + a[2], 2)) / (2 * (p[2] + c[2]) * i)), l = l(n(a[0] - c[0]) / i), a = (0 > a[1] - c[1] ? 0 : Math.PI) + s + l * (0 > (a[0] - c[0]) * (a[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + p[2]) * Math.sin(a), c[1] - (c[2] + p[2]) * Math.cos(a), p[2], p[3], p[4]];
}, x.prototype.render = function() {
var a = [];
U.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
P(c.dataLabels) && c.dataLabels.forEach(function(p) {
a.push(p);
});
}), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
}, x.prototype.resizeRadius = function() {
var a = this.chart, c = a.rawPositions, p = Math.min, i = Math.max, l = a.plotLeft, s = a.plotTop, t = a.plotHeight, n = a.plotWidth, o, A, _, D = o = Number.POSITIVE_INFINITY, j = A = Number.NEGATIVE_INFINITY;
for (_ = 0; _ < c.length; _++) {
var T = c[_][2];
D = p(
D,
c[_][0] - T
), j = i(j, c[_][0] + T), o = p(o, c[_][1] - T), A = i(A, c[_][1] + T);
}
if (_ = [j - D, A - o], p = p.apply([], [(n - l) / _[0], (t - s) / _[1]]), 1e-10 < Math.abs(p - 1)) {
for (_ = 0; _ < c.length; _++)
c[_][2] *= p;
this.placeBubbles(c);
} else
a.diffY = t / 2 + s - o - (A - o) / 2, a.diffX = n / 2 + l - D - (j - D) / 2;
}, x.prototype.seriesBox = function() {
var a = this.chart, c = Math.max, p = Math.min, i, l = [a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight];
return this.data.forEach(function(s) {
v(s.plotX) && v(s.plotY) && s.marker.radius && (i = s.marker.radius, l[0] = p(l[0], s.plotX - i), l[1] = c(l[1], s.plotX + i), l[2] = p(l[2], s.plotY - i), l[3] = c(l[3], s.plotY + i));
}), O(l.width / l.height) ? l : null;
}, x.prototype.setVisible = function() {
var a = this;
U.prototype.setVisible.apply(a, arguments), a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(), a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes), a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(
a.points,
a.layout.nodes
) : a.points.forEach(function(c) {
a.layout.removeElementFromCollection(c, a.layout.nodes);
}));
}, x.prototype.translate = function() {
var a = this.chart, c = this.data, p = this.index, i, l = this.options.useSimulation;
if (this.processedXData = this.xData, this.generatePoints(), v(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), l)
var s = a.allDataPoints;
else
s = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
for (i = 0; i < s.length; i++)
if (s[i][3] === p) {
var t = c[s[i][4]], n = C(s[i][2], void 0);
l || (t.plotX = s[i][0] - a.plotLeft + a.diffX, t.plotY = s[i][1] - a.plotTop + a.diffY), O(n) && (t.marker = u(t.marker, { radius: n, width: 2 * n, height: 2 * n }), t.radius = n);
}
l && this.deferLayout(), d(this, "afterTranslate");
}, x.defaultOptions = B(W.defaultOptions, { minSize: "10%", maxSize: "50%", sizeBy: "area", zoneAxis: "y", crisp: !1, tooltip: { pointFormat: "Value: {point.value}" }, draggable: !0, useSimulation: !0, parentNode: { allowPointSelect: !1 }, dataLabels: { formatter: function() {
var a = this.series.chart.numberFormatter, c = this.point.value;
return O(c) ? a(c, -1) : "";
}, parentNodeFormatter: function() {
return this.name;
}, parentNodeTextPath: { enabled: !0 }, padding: 0, style: { transition: "opacity 2000ms" } }, layoutAlgorithm: { initialPositions: "circle", initialPositionRadius: 20, bubblePadding: 5, parentNodeLimit: !1, seriesInteraction: !0, dragBetweenSeries: !1, parentNodeOptions: { maxIterations: 400, gravitationalConstant: 0.03, maxSpeed: 50, initialPositionRadius: 100, seriesInteraction: !0, marker: {
fillColor: null,
fillOpacity: 1,
lineWidth: null,
lineColor: null,
symbol: "circle"
} }, enableSimulation: !0, type: "packedbubble", integration: "packedbubble", maxIterations: 1e3, splitSeries: !1, maxSpeed: 5, gravitationalConstant: 0.01, friction: -0.981 } }), x;
}(W), u(h.prototype, {
alignDataLabel: U.prototype.alignDataLabel,
axisTypes: [],
directTouch: !0,
forces: ["barycenter", "repulsive"],
hasDraggableNodes: !0,
isCartesian: !1,
noSharedTooltip: !0,
onMouseDown: b.onMouseDown,
onMouseMove: b.onMouseMove,
pointArrayMap: ["value"],
pointClass: R,
pointValKey: "value",
redrawHalo: b.redrawHalo,
requireSorting: !1,
searchPoint: y.noop,
trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
}), I.registerSeriesType("packedbubble", h), h;
}), E(g, "Series/Polygon/PolygonSeries.js", [g["Core/Globals.js"], g["Core/Legend/LegendSymbol.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"]], function(h, y, R, I) {
var Z = this && this.__extends || function() {
var v = function(u, d) {
return v = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var B in O)
O.hasOwnProperty(B) && (P[B] = O[B]);
}, v(u, d);
};
return function(u, d) {
function P() {
this.constructor = u;
}
v(u, d), u.prototype = d === null ? Object.create(d) : (P.prototype = d.prototype, new P());
};
}();
h = h.noop;
var H = R.series, $ = R.seriesTypes, U = $.area, W = $.line, N = $.scatter;
$ = I.extend;
var w = I.merge;
return I = function(v) {
function u() {
var d = v !== null && v.apply(this, arguments) || this;
return d.data = void 0, d.options = void 0, d.points = void 0, d;
}
return Z(u, v), u.prototype.getGraphPath = function() {
for (var d = W.prototype.getGraphPath.call(this), P = d.length + 1; P--; )
(P === d.length || d[P][0] === "M") && 0 < P && d.splice(P, 0, ["Z"]);
return this.areaPath = d;
}, u.prototype.drawGraph = function() {
this.options.fillColor = this.color, U.prototype.drawGraph.call(this);
}, u.defaultOptions = w(N.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), u;
}(N), $(I.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: H.prototype.drawTracker, setStackedPoints: h }), R.registerSeriesType("polygon", I), I;
}), E(g, "Core/Axis/WaterfallAxis.js", [g["Extensions/Stacking.js"], g["Core/Utilities.js"]], function(h, y) {
var R = y.addEvent, I = y.objectEach, Z;
return function(H) {
function $() {
var v = this.waterfall.stacks;
v && (v.changed = !1, delete v.alreadyChanged);
}
function U() {
var v = this.options.stackLabels;
v && v.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
}
function W() {
for (var v = this.axes, u = this.series, d = u.length; d--; )
u[d].options.stacking && (v.forEach(function(P) {
P.isXAxis || (P.waterfall.stacks.changed = !0);
}), d = 0);
}
function N() {
this.waterfall || (this.waterfall = new w(this));
}
var w = function() {
function v(u) {
this.axis = u, this.stacks = { changed: !1 };
}
return v.prototype.renderStackTotals = function() {
var u = this.axis, d = u.waterfall.stacks, P = u.stacking && u.stacking.stackTotalGroup, O = new h(u, u.options.stackLabels, !1, 0, void 0);
this.dummyStackItem = O, I(d, function(B) {
I(B, function(C) {
O.total = C.stackTotal, C.label && (O.label = C.label), h.prototype.render.call(O, P), C.label = O.label, delete O.label;
});
}), O.total = null;
}, v;
}();
H.Composition = w, H.compose = function(v, u) {
R(v, "init", N), R(v, "afterBuildStacks", $), R(v, "afterRender", U), R(u, "beforeRedraw", W);
};
}(Z || (Z = {})), Z;
}), E(g, "Series/Waterfall/WaterfallPoint.js", [g["Series/Column/ColumnSeries.js"], g["Core/Series/Point.js"], g["Core/Utilities.js"]], function(h, y, R) {
var I = this && this.__extends || function() {
var H = function($, U) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(W, N) {
W.__proto__ = N;
} || function(W, N) {
for (var w in N)
N.hasOwnProperty(w) && (W[w] = N[w]);
}, H($, U);
};
return function($, U) {
function W() {
this.constructor = $;
}
H($, U), $.prototype = U === null ? Object.create(U) : (W.prototype = U.prototype, new W());
};
}(), Z = R.isNumber;
return function(H) {
function $() {
var U = H !== null && H.apply(this, arguments) || this;
return U.options = void 0, U.series = void 0, U;
}
return I($, H), $.prototype.getClassName = function() {
var U = y.prototype.getClassName.call(this);
return this.isSum ? U += " highcharts-sum" : this.isIntermediateSum && (U += " highcharts-intermediate-sum"), U;
}, $.prototype.isValid = function() {
return Z(this.y) || this.isSum || !!this.isIntermediateSum;
}, $;
}(h.prototype.pointClass);
}), E(g, "Series/Waterfall/WaterfallSeries.js", [g["Core/Axis/Axis.js"], g["Core/Chart/Chart.js"], g["Core/Series/SeriesRegistry.js"], g["Core/Utilities.js"], g["Core/Axis/WaterfallAxis.js"], g["Series/Waterfall/WaterfallPoint.js"]], function(h, y, R, I, Z, H) {
var $ = this && this.__extends || function() {
var C = function(b, M) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, a) {
x.__proto__ = a;
} || function(x, a) {
for (var c in a)
a.hasOwnProperty(c) && (x[c] = a[c]);
}, C(b, M);
};
return function(b, M) {
function x() {
this.constructor = b;
}
C(b, M), b.prototype = M === null ? Object.create(M) : (x.prototype = M.prototype, new x());
};
}(), U = R.seriesTypes, W = U.column, N = U.line, w = I.arrayMax, v = I.arrayMin, u = I.correctFloat;
U = I.extend;
var d = I.isNumber, P = I.merge, O = I.objectEach, B = I.pick;
return I = function(C) {
function b() {
var M = C !== null && C.apply(this, arguments) || this;
return M.chart = void 0, M.data = void 0, M.options = void 0, M.points = void 0, M.stackedYNeg = void 0, M.stackedYPos = void 0, M.stackKey = void 0, M.xData = void 0, M.yAxis = void 0, M.yData = void 0, M;
}
return $(b, C), b.prototype.generatePoints = function() {
var M;
W.prototype.generatePoints.apply(this);
var x = 0;
for (M = this.points.length; x < M; x++) {
var a = this.points[x], c = this.processedYData[x];
(a.isIntermediateSum || a.isSum) && (a.y = u(c));
}
}, b.prototype.translate = function() {
var M = this.options, x = this.yAxis, a = B(M.minPointLength, 5), c = a / 2, p = M.threshold || 0, i = p, l = p;
M = M.stacking;
var s = x.waterfall.stacks[this.stackKey];
W.prototype.translate.apply(this);
for (var t = this.points, n = 0; n < t.length; n++) {
var o = t[n], A = this.processedYData[n], _ = o.shapeArgs;
if (_ && d(A)) {
var D = [0, A], j = o.y;
if (M) {
if (s) {
if (D = s[n], M === "overlap") {
var T = D.stackState[D.stateIndex--];
T = 0 <= j ? T : T - j, Object.hasOwnProperty.call(D, "absolutePos") && delete D.absolutePos, Object.hasOwnProperty.call(D, "absoluteNeg") && delete D.absoluteNeg;
} else
0 <= j ? (T = D.threshold + D.posTotal, D.posTotal -= j) : (T = D.threshold + D.negTotal, D.negTotal -= j, T -= j), !D.posTotal && Object.hasOwnProperty.call(D, "absolutePos") && (D.posTotal = D.absolutePos, delete D.absolutePos), !D.negTotal && Object.hasOwnProperty.call(D, "absoluteNeg") && (D.negTotal = D.absoluteNeg, delete D.absoluteNeg);
o.isSum || (D.connectorThreshold = D.threshold + D.stackTotal), x.reversed ? (A = 0 <= j ? T - j : T + j, j = T) : (A = T, j = T - j), o.below = A <= p, _.y = x.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - (x.translate(j, !1, !0, !1, !0) || 0)), (j = x.waterfall.dummyStackItem) && (j.x = n, j.label = s[n].label, j.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[n], this.stackedYPos[n]));
}
} else
T = Math.max(i, i + j) + D[0], _.y = x.translate(
T,
!1,
!0,
!1,
!0
) || 0, o.isSum ? (_.y = x.translate(D[1], !1, !0, !1, !0) || 0, _.height = Math.min(x.translate(D[0], !1, !0, !1, !0) || 0, x.len) - _.y, o.below = D[1] <= p) : o.isIntermediateSum ? (0 <= j ? (A = D[1] + l, j = l) : (A = l, j = D[1] + l), x.reversed && (A ^= j, j ^= A, A ^= j), _.y = x.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - Math.min(x.translate(j, !1, !0, !1, !0) || 0, x.len)), l += D[1], o.below = A <= p) : (_.height = 0 < A ? (x.translate(i, !1, !0, !1, !0) || 0) - _.y : (x.translate(i, !1, !0, !1, !0) || 0) - (x.translate(i - A, !1, !0, !1, !0) || 0), i += A, o.below = i < p), 0 > _.height && (_.y += _.height, _.height *= -1);
o.plotY = _.y = Math.round(_.y || 0) - this.borderWidth % 2 / 2, _.height = Math.max(Math.round(_.height || 0), 1e-3), o.yBottom = _.y + _.height, _.height <= a && !o.isNull ? (_.height = a, _.y -= c, o.plotY = _.y, o.minPointLengthOffset = 0 > o.y ? -c : c) : (o.isNull && (_.width = 0), o.minPointLengthOffset = 0), j = o.plotY + (o.negative ? _.height : 0), o.below && (o.plotY += _.height), o.tooltipPos && (this.chart.inverted ? o.tooltipPos[0] = x.len - j : o.tooltipPos[1] = j);
}
}
}, b.prototype.processData = function(M) {
var x = this.options, a = this.yData, c = x.data, p = a.length, i = x.threshold || 0, l, s, t, n, o;
for (o = s = l = t = n = 0; o < p; o++) {
var A = a[o], _ = c && c[o] ? c[o] : {};
A === "sum" || _.isSum ? a[o] = u(s) : A === "intermediateSum" || _.isIntermediateSum ? (a[o] = u(l), l = 0) : (s += A, l += A), t = Math.min(s, t), n = Math.max(s, n);
}
C.prototype.processData.call(this, M), x.stacking || (this.dataMin = t + i, this.dataMax = n);
}, b.prototype.toYData = function(M) {
return M.isSum ? "sum" : M.isIntermediateSum ? "intermediateSum" : M.y;
}, b.prototype.updateParallelArrays = function(M, x) {
C.prototype.updateParallelArrays.call(this, M, x), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
}, b.prototype.pointAttribs = function(M, x) {
var a = this.options.upColor;
return a && !M.options.color && (M.color = 0 < M.y ? a : null), M = W.prototype.pointAttribs.call(this, M, x), delete M.dashstyle, M;
}, b.prototype.getGraphPath = function() {
return [["M", 0, 0]];
}, b.prototype.getCrispPath = function() {
var M = this.data, x = this.yAxis, a = M.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, p = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, l = this.yAxis.reversed, s = this.options.stacking, t = [], n;
for (n = 1; n < a; n++) {
var o = M[n].shapeArgs, A = M[n - 1], _ = M[n - 1].shapeArgs, D = x.waterfall.stacks[this.stackKey], j = 0 < A.y ? -_.height : 0;
D && _ && o && (D = D[n - 1], s ? (D = D.connectorThreshold, j = Math.round(x.translate(D, 0, 1, 0, 1) + (l ? j : 0)) - c) : j = _.y + A.minPointLengthOffset + p - c, t.push(["M", (_.x || 0) + (i ? 0 : _.width || 0), j], ["L", (o.x || 0) + (i && o.width || 0), j])), _ && t.length && (!s && 0 > A.y && !l || 0 < A.y && l) && ((A = t[t.length - 2]) && typeof A[2] == "number" && (A[2] += _.height || 0), (A = t[t.length - 1]) && typeof A[2] == "number" && (A[2] += _.height || 0));
}
return t;
}, b.prototype.drawGraph = function() {
N.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
}, b.prototype.setStackedPoints = function() {
function M(F, Q, k, G) {
if (Y)
for (k; k < Y; k++)
X.stackState[k] += G;
else
X.stackState[0] = F, Y = X.stackState.length;
X.stackState.push(X.stackState[Y - 1] + Q);
}
var x = this.options, a = this.yAxis.waterfall.stacks, c = x.threshold, p = c || 0, i = p, l = this.stackKey, s = this.xData, t = s.length, n, o, A;
this.yAxis.stacking.usePercentage = !1;
var _ = o = A = p;
if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
var D = a.changed;
(n = a.alreadyChanged) && 0 > n.indexOf(l) && (D = !0), a[l] || (a[l] = {}), n = a[l];
for (var j = 0; j < t; j++) {
var T = s[j];
(!n[T] || D) && (n[T] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: D && n[T] ? n[T].label : void 0 });
var X = n[T], f = this.yData[j];
0 <= f ? X.posTotal += f : X.negTotal += f;
var m = x.data[j];
T = X.absolutePos = X.posTotal;
var L = X.absoluteNeg = X.negTotal;
X.stackTotal = T + L;
var Y = X.stackState.length;
m && m.isIntermediateSum ? (M(A, o, 0, A), A = o, o = c, p ^= i, i ^= p, p ^= i) : m && m.isSum ? (M(c, _, Y), p = c) : (M(p, f, 0, _), m && (_ += f, o += f)), X.stateIndex++, X.threshold = p, p += X.stackTotal;
}
a.changed = !1, a.alreadyChanged || (a.alreadyChanged = []), a.alreadyChanged.push(l);
}
}, b.prototype.getExtremes = function() {
var M = this.options.stacking;
if (M) {
var x = this.yAxis;
x = x.waterfall.stacks;
var a = this.stackedYNeg = [], c = this.stackedYPos = [];
return M === "overlap" ? O(x[this.stackKey], function(p) {
a.push(v(p.stackState)), c.push(w(p.stackState));
}) : O(x[this.stackKey], function(p) {
a.push(p.negTotal + p.threshold), c.push(p.posTotal + p.threshold);
}), { dataMin: v(a), dataMax: w(c) };
}
return { dataMin: this.dataMin, dataMax: this.dataMax };
}, b.defaultOptions = P(W.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
}(W), U(I.prototype, { getZonesGraphs: N.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: H }), R.registerSeriesType("waterfall", I), Z.compose(h, y), I;
}), E(g, "Extensions/Polar.js", [
g["Core/Animation/AnimationUtilities.js"],
g["Core/Chart/Chart.js"],
g["Core/Globals.js"],
g["Extensions/Pane.js"],
g["Core/Pointer.js"],
g["Core/Series/Series.js"],
g["Core/Series/SeriesRegistry.js"],
g["Core/Renderer/SVG/SVGRenderer.js"],
g["Core/Utilities.js"]
], function(h, y, R, I, Z, H, $, U, W) {
var N = h.animObject;
$ = $.seriesTypes;
var w = W.addEvent, v = W.defined, u = W.find, d = W.isNumber, P = W.pick, O = W.splat, B = W.uniqueKey;
h = W.wrap;
var C = H.prototype;
Z = Z.prototype, C.searchPointByAngle = function(x) {
var a = this.chart, c = this.xAxis.pane.center;
return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(x.chartX - c[0] - a.plotLeft, x.chartY - c[1] - a.plotTop) });
}, C.getConnectors = function(x, a, c, p) {
var i = p ? 1 : 0, l = 0 <= a && a <= x.length - 1 ? a : 0 > a ? x.length - 1 + a : 0;
a = 0 > l - 1 ? x.length - (1 + i) : l - 1, i = l + 1 > x.length - 1 ? i : l + 1;
var s = x[a];
i = x[i];
var t = s.plotX;
s = s.plotY;
var n = i.plotX, o = i.plotY;
i = x[l].plotX, l = x[l].plotY, t = (1.5 * i + t) / 2.5, s = (1.5 * l + s) / 2.5, n = (1.5 * i + n) / 2.5;
var A = (1.5 * l + o) / 2.5;
o = Math.sqrt(Math.pow(t - i, 2) + Math.pow(s - l, 2));
var _ = Math.sqrt(Math.pow(n - i, 2) + Math.pow(A - l, 2));
return t = Math.atan2(s - l, t - i), A = Math.PI / 2 + (t + Math.atan2(A - l, n - i)) / 2, Math.abs(t - A) > Math.PI / 2 && (A -= Math.PI), t = i + Math.cos(A) * o, s = l + Math.sin(A) * o, n = i + Math.cos(Math.PI + A) * _, A = l + Math.sin(Math.PI + A) * _, i = { rightContX: n, rightContY: A, leftContX: t, leftContY: s, plotX: i, plotY: l }, c && (i.prevPointCont = this.getConnectors(x, a, !1, p)), i;
}, C.toXY = function(x) {
var a = this.chart, c = this.xAxis, p = this.yAxis, i = x.plotX, l = x.plotY, s = x.series, t = a.inverted, n = x.y, o = t ? i : p.len - l;
t && s && !s.isRadialBar && (x.plotY = l = typeof n == "number" && p.translate(n) || 0), x.rectPlotX = i, x.rectPlotY = l, p.center && (o += p.center[3] / 2), d(l) && (p = t ? p.postTranslate(l, o) : c.postTranslate(i, o), x.plotX = x.polarPlotX = p.x - a.plotLeft, x.plotY = x.polarPlotY = p.y - a.plotTop), this.kdByAngle ? (a = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > a && (a += 360), x.clientX = a) : x.clientX = x.plotX;
}, $.spline && (h($.spline.prototype, "getPointSpline", function(x, a, c, p) {
return this.chart.polar ? p ? (x = this.getConnectors(a, p, !0, this.connectEnds), a = x.prevPointCont && x.prevPointCont.rightContX, c = x.prevPointCont && x.prevPointCont.rightContY, x = ["C", d(a) ? a : x.plotX, d(c) ? c : x.plotY, d(x.leftContX) ? x.leftContX : x.plotX, d(x.leftContY) ? x.leftContY : x.plotY, x.plotX, x.plotY]) : x = ["M", c.plotX, c.plotY] : x = x.call(this, a, c, p), x;
}), $.areasplinerange && ($.areasplinerange.prototype.getPointSpline = $.spline.prototype.getPointSpline)), w(H, "afterTranslate", function() {
var x = this.chart;
if (x.polar && this.xAxis) {
if ((this.kdByAngle = x.tooltip && x.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy", !this.preventPostTranslate)
for (var a = this.points, c = a.length; c--; )
this.toXY(a[c]), !x.hasParallelCoordinates && !this.yAxis.reversed && a[c].y < this.yAxis.min && (a[c].isNull = !0);
this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(w(this, "afterRender", function() {
if (x.polar) {
var p = this.yAxis.pane.center;
this.clipCircle ? this.clipCircle.animate({ x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2 }) : this.clipCircle = x.renderer.clipCircle(p[0], p[1], p[2] / 2, p[3] / 2), this.group.clip(this.clipCircle), this.setClip = R.noop;
}
})));
}
}, { order: 2 }), h(
$.line.prototype,
"getGraphPath",
function(x, a) {
var c = this, p;
if (this.chart.polar) {
for (a = a || this.points, p = 0; p < a.length; p++)
if (!a[p].isNull) {
var i = p;
break;
}
if (this.options.connectEnds !== !1 && typeof i < "u") {
this.connectEnds = !0, a.splice(a.length, 0, a[i]);
var l = !0;
}
a.forEach(function(s) {
typeof s.polarPlotY > "u" && c.toXY(s);
});
}
return p = x.apply(this, [].slice.call(arguments, 1)), l && a.pop(), p;
}
);
var b = function(x, a) {
var c = this, p = this.chart, i = this.options.animation, l = this.group, s = this.markerGroup, t = this.xAxis && this.xAxis.center, n = p.plotLeft, o = p.plotTop, A, _, D, j;
if (p.polar) {
if (c.isRadialBar)
a || (c.startAngleRad = P(c.translatedThreshold, c.xAxis.startAngleRad), R.seriesTypes.pie.prototype.animate.call(c, a));
else if (p.renderer.isSVG)
if (i = N(i), c.is("column")) {
if (!a) {
var T = t[3] / 2;
c.points.forEach(function(X) {
A = X.graphic, D = (_ = X.shapeArgs) && _.r, j = _ && _.innerR, A && _ && (A.attr({ r: T, innerR: T }), A.animate({ r: D, innerR: j }, c.options.animation));
});
}
} else
a ? (x = { translateX: t[0] + n, translateY: t[1] + o, scaleX: 1e-3, scaleY: 1e-3 }, l.attr(x), s && s.attr(x)) : (x = { translateX: n, translateY: o, scaleX: 1, scaleY: 1 }, l.animate(x, i), s && s.animate(x, i));
} else
x.call(this, a);
};
if (h(C, "animate", b), $.column) {
var M = $.arearange.prototype;
$ = $.column.prototype, $.polarArc = function(x, a, c, p) {
var i = this.xAxis.center, l = this.yAxis.len, s = i[3] / 2;
return a = l - a + s, x = l - P(x, l) + s, this.yAxis.reversed && (0 > a && (a = s), 0 > x && (x = s)), { x: i[0], y: i[1], r: a, innerR: x, start: c, end: p };
}, h($, "animate", b), h($, "translate", function(x) {
var a = this.options, c = a.stacking, p = this.chart, i = this.xAxis, l = this.yAxis, s = l.reversed, t = l.center, n = i.startAngleRad, o = i.endAngleRad - n;
if (this.preventPostTranslate = !0, x.call(this), i.isRadial) {
x = this.points, i = x.length;
var A = l.translate(l.min), _ = l.translate(l.max);
if (a = a.threshold || 0, p.inverted && d(a)) {
var D = l.translate(a);
v(D) && (0 > D ? D = 0 : D > o && (D = o), this.translatedThreshold = D + n);
}
for (; i--; ) {
a = x[i];
var j = a.barX, T = a.x, X = a.y;
if (a.shapeType = "arc", p.inverted) {
if (a.plotY = l.translate(X), c && l.stacking) {
if (X = l.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[T] && !a.isNull) {
var f = X[T].points[this.getStackIndicator(void 0, T, this.index).key], m = l.translate(f[0]);
f = l.translate(f[1]), v(m) && (m = W.clamp(m, 0, o));
}
} else
m = D, f = a.plotY;
m > f && (f = [m, m = f][0]), s ? f > A ? f = A : m < _ ? m = _ : (m > A || f < _) && (m = f = o) : m < A ? m = A : f > _ ? f = _ : (f < A || m > _) && (m = f = 0), l.min > l.max && (m = f = s ? o : 0), m += n, f += n, t && (a.barX = j += t[3] / 2), T = Math.max(j, 0), X = Math.max(j + a.pointWidth, 0), a.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: T, start: m, end: f }, a.opacity = m === f ? 0 : void 0, a.plotY = (v(this.translatedThreshold) && (m < this.translatedThreshold ? m : f)) - n;
} else
m = j + n, a.shapeArgs = this.polarArc(a.yBottom, a.plotY, m, m + a.pointWidth);
this.toXY(a), p.inverted ? (j = l.postTranslate(a.rectPlotY, j + a.pointWidth / 2), a.tooltipPos = [j.x - p.plotLeft, j.y - p.plotTop]) : a.tooltipPos = [a.plotX, a.plotY], t && (a.ttBelow = a.plotY > t[1]);
}
}
}), $.findAlignments = function(x, a) {
return a.align === null && (a.align = 20 < x && 160 > x ? "left" : 200 < x && 340 > x ? "right" : "center"), a.verticalAlign === null && (a.verticalAlign = 45 > x || 315 < x ? "bottom" : 135 < x && 225 > x ? "top" : "middle"), a;
}, M && (M.findAlignments = $.findAlignments), h($, "alignDataLabel", function(x, a, c, p, i, l) {
var s = this.chart, t = P(p.inside, !!this.options.stacking);
s.polar ? (x = a.rectPlotX / Math.PI * 180, s.inverted ? (this.forceDL = s.isInsidePlot(a.plotX, Math.round(a.plotY)), t && a.shapeArgs ? (i = a.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, a.barX + a.pointWidth / 2), i = { x: i.x - s.plotLeft, y: i.y - s.plotTop }) : a.tooltipPos && (i = { x: a.tooltipPos[0], y: a.tooltipPos[1] }), p.align = P(p.align, "center"), p.verticalAlign = P(
p.verticalAlign,
"middle"
)) : this.findAlignments && (p = this.findAlignments(x, p)), C.alignDataLabel.call(this, a, c, p, i, l), this.isRadialBar && a.shapeArgs && a.shapeArgs.start === a.shapeArgs.end && c.hide(!0)) : x.call(this, a, c, p, i, l);
});
}
h(Z, "getCoordinates", function(x, a) {
var c = this.chart, p = { xAxis: [], yAxis: [] };
return c.polar ? c.axes.forEach(function(i) {
var l = i.isXAxis, s = i.center;
if (i.coll !== "colorAxis") {
var t = a.chartX - s[0] - c.plotLeft;
s = a.chartY - s[1] - c.plotTop, p[l ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(l ? Math.PI - Math.atan2(t, s) : Math.sqrt(Math.pow(
t,
2
) + Math.pow(s, 2)), !0) });
}
}) : p = x.call(this, a), p;
}), U.prototype.clipCircle = function(x, a, c, p) {
var i = B(), l = this.createElement("clipPath").attr({ id: i }).add(this.defs);
return x = p ? this.arc(x, a, c, p, 0, 2 * Math.PI).add(l) : this.circle(x, a, c).add(l), x.id = i, x.clipPath = l, x;
}, w(y, "getAxes", function() {
this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(x) {
new I(x, this);
}, this);
}), w(y, "afterDrawChartBox", function() {
this.pane.forEach(function(x) {
x.render();
});
}), w(
H,
"afterInit",
function() {
var x = this.chart;
x.inverted && x.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
}
), h(y.prototype, "get", function(x, a) {
return u(this.pane || [], function(c) {
return c.options.id === a;
}) || x.call(this, a);
});
}), E(g, "masters/highcharts-more.src.js", [g["Core/Globals.js"], g["Core/Axis/RadialAxis.js"], g["Series/Bubble/BubbleSeries.js"]], function(h, y, R) {
y.compose(h.Axis, h.Tick), R.compose(h.Chart, h.Legend, h.Series);
});
});
})(Xp);
var O0 = Xp.exports;
const L0 = /* @__PURE__ */ Cn(O0);
var Gp = { exports: {} };
(function(r) {
(function(g) {
r.exports ? (g.default = g, r.exports = g) : g(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(g) {
function E(h, y, R, I) {
h.hasOwnProperty(y) || (h[y] = I.apply(null, R));
}
g = g ? g._modules : {}, E(
g,
"Extensions/FullScreen.js",
[g["Core/Chart/Chart.js"], g["Core/Globals.js"], g["Core/Renderer/HTML/AST.js"], g["Core/Utilities.js"]],
function(h, y, R, I) {
var Z = I.addEvent;
return I = function() {
function H($) {
this.chart = $, this.isOpen = !1, $ = $.renderTo, this.browserProps || (typeof $.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : $.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : $.webkitRequestFullScreen ? this.browserProps = {
fullscreenChange: "webkitfullscreenchange",
requestFullscreen: "webkitRequestFullScreen",
exitFullscreen: "webkitExitFullscreen"
} : $.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
}
return H.prototype.close = function() {
var $ = this.chart, U = $.options.chart;
this.isOpen && this.browserProps && $.container.ownerDocument instanceof Document && $.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), $.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, U.width = this.origWidthOption, U.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
}, H.prototype.open = function() {
var $ = this, U = $.chart, W = U.options.chart;
if (W && ($.origWidthOption = W.width, $.origHeightOption = W.height), $.origWidth = U.chartWidth, $.origHeight = U.chartHeight, $.browserProps) {
var N = Z(
U.container.ownerDocument,
$.browserProps.fullscreenChange,
function() {
$.isOpen ? ($.isOpen = !1, $.close()) : (U.setSize(null, null, !1), $.isOpen = !0, $.setButtonText());
}
), w = Z(U, "destroy", N);
$.unbindFullscreenEvent = function() {
N(), w();
}, (W = U.renderTo[$.browserProps.requestFullscreen]()) && W.catch(function() {
alert("Full screen is not supported inside a frame.");
});
}
}, H.prototype.setButtonText = function() {
var $ = this.chart, U = $.exportDivElements, W = $.options.exporting, N = W && W.buttons && W.buttons.contextButton.menuItems;
$ = $.options.lang, W && W.menuItemDefinitions && $ && $.exitFullscreen && $.viewFullscreen && N && U && (U = U[N.indexOf("viewFullscreen")]) && R.setElementHTML(U, this.isOpen ? $.exitFullscreen : W.menuItemDefinitions.viewFullscreen.text || $.viewFullscreen);
}, H.prototype.toggle = function() {
this.isOpen ? this.close() : this.open();
}, H;
}(), y.Fullscreen = I, Z(h, "beforeRender", function() {
this.fullscreen = new y.Fullscreen(this);
}), y.Fullscreen;
}
), E(g, "Core/Chart/ChartNavigationComposition.js", [], function() {
var h;
return function(y) {
y.compose = function(I) {
return I.navigation || (I.navigation = new R(I)), I;
};
var R = function() {
function I(Z) {
this.updates = [], this.chart = Z;
}
return I.prototype.addUpdate = function(Z) {
this.chart.navigation.updates.push(Z);
}, I.prototype.update = function(Z, H) {
var $ = this;
this.updates.forEach(function(U) {
U.call($.chart, Z, H);
});
}, I;
}();
y.Additions = R;
}(h || (h = {})), h;
}), E(g, "Extensions/Exporting/ExportingDefaults.js", [g["Core/Globals.js"]], function(h) {
return { exporting: { type: "image/png", url: "https://export.highcharts.com/", printMaxWidth: 780, scale: 2, buttons: { contextButton: {
className: "highcharts-contextbutton",
menuClassName: "highcharts-contextmenu",
symbol: "menu",
titleKey: "contextButtonTitle",
menuItems: "viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")
} }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
this.fullscreen.toggle();
} }, printChart: { textKey: "printChart", onclick: function() {
this.print();
} }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: function() {
this.exportChart();
} }, downloadJPEG: {
textKey: "downloadJPEG",
onclick: function() {
this.exportChart({ type: "image/jpeg" });
}
}, downloadPDF: { textKey: "downloadPDF", onclick: function() {
this.exportChart({ type: "application/pdf" });
} }, downloadSVG: { textKey: "downloadSVG", onclick: function() {
this.exportChart({ type: "image/svg+xml" });
} } } }, lang: {
viewFullscreen: "View in full screen",
exitFullscreen: "Exit from full screen",
printChart: "Print chart",
downloadPNG: "Download PNG image",
downloadJPEG: "Download JPEG image",
downloadPDF: "Download PDF document",
downloadSVG: "Download SVG vector image",
contextButtonTitle: "Chart context menu"
}, navigation: { buttonOptions: { symbolSize: 14, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, verticalAlign: "top", width: 24, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { padding: 5 } }, menuStyle: { border: "1px solid #999999", background: "#ffffff", padding: "5px 0" }, menuItemStyle: { padding: "0.5em 1em", color: "#333333", background: "none", fontSize: h.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
background: "#335cad",
color: "#ffffff"
} } };
}), E(g, "Extensions/Exporting/ExportingSymbols.js", [], function() {
var h;
return function(y) {
function R(H, $, U, W) {
return [["M", H, $ + 2.5], ["L", H + U, $ + 2.5], ["M", H, $ + W / 2 + 0.5], ["L", H + U, $ + W / 2 + 0.5], ["M", H, $ + W - 1.5], ["L", H + U, $ + W - 1.5]];
}
function I(H, $, U, W) {
return H = W / 3 - 2, W = [], W = W.concat(this.circle(U - H, $, H, H), this.circle(U - H, $ + H + 4, H, H), this.circle(U - H, $ + 2 * (H + 4), H, H));
}
var Z = [];
y.compose = function(H) {
Z.indexOf(H) === -1 && (Z.push(H), H = H.prototype.symbols, H.menu = R, H.menuball = I.bind(H));
};
}(h || (h = {})), h;
}), E(g, "Core/HttpUtilities.js", [g["Core/Globals.js"], g["Core/Utilities.js"]], function(h, y) {
var R = h.doc, I = y.createElement, Z = y.discardElement, H = y.merge, $ = y.objectEach, U = { ajax: function(W) {
var N = H(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, W);
W = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
var w = new XMLHttpRequest();
if (!N.url)
return !1;
w.open(N.type.toUpperCase(), N.url, !0), N.headers["Content-Type"] || w.setRequestHeader(
"Content-Type",
W[N.dataType] || W.text
), $(N.headers, function(v, u) {
w.setRequestHeader(u, v);
}), w.onreadystatechange = function() {
if (w.readyState === 4) {
if (w.status === 200) {
var v = w.responseText;
if (N.dataType === "json")
try {
v = JSON.parse(v);
} catch (u) {
N.error && N.error(w, u);
return;
}
return N.success && N.success(v);
}
N.error && N.error(w, w.responseText);
}
};
try {
N.data = JSON.stringify(N.data);
} catch {
}
w.send(N.data || !0);
}, getJSON: function(W, N) {
U.ajax({ url: W, success: N, dataType: "json", headers: { "Content-Type": "text/plain" } });
}, post: function(W, N, w) {
var v = I("form", H({ method: "post", action: W, enctype: "multipart/form-data" }, w), { display: "none" }, R.body);
$(N, function(u, d) {
I("input", { type: "hidden", name: d, value: u }, null, v);
}), v.submit(), Z(v);
} };
return U;
}), E(g, "Extensions/Exporting/Exporting.js", [
g["Core/Renderer/HTML/AST.js"],
g["Core/Chart/Chart.js"],
g["Core/Chart/ChartNavigationComposition.js"],
g["Core/DefaultOptions.js"],
g["Extensions/Exporting/ExportingDefaults.js"],
g["Extensions/Exporting/ExportingSymbols.js"],
g["Core/Globals.js"],
g["Core/HttpUtilities.js"],
g["Core/Utilities.js"]
], function(h, y, R, I, Z, H, $, U, W) {
y = I.defaultOptions;
var N = $.doc, w = $.win, v = W.addEvent, u = W.css, d = W.createElement, P = W.discardElement, O = W.extend, B = W.find, C = W.fireEvent, b = W.isObject, M = W.merge, x = W.objectEach, a = W.pick, c = W.removeEvent, p = W.uniqueKey, i;
return function(l) {
function s(nt) {
var rt = this, ct = rt.renderer, gt = M(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, lt = gt.menuItems, at = gt.symbolSize || 12;
if (rt.btnCount || (rt.btnCount = 0), rt.exportDivElements || (rt.exportDivElements = [], rt.exportSVGElements = []), gt.enabled !== !1 && gt.theme) {
var J = gt.theme, tt = J.states, st = tt && tt.hover;
tt = tt && tt.select;
var ht;
rt.styledMode || (J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none")), delete J.states, dt ? ht = function(vt) {
vt && vt.stopPropagation(), dt.call(rt, vt);
} : lt && (ht = function(vt) {
vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, lt, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
}), gt.text && gt.symbol ? J.paddingLeft = a(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none"));
var pt = ct.button(gt.text, 0, 0, ht, J, st, tt).addClass(nt.className).attr({ title: a(rt.options.lang[gt._titleKey || gt.titleKey], "") });
if (pt.menuClassName = nt.menuClassName || "highcharts-menu-" + rt.btnCount++, gt.symbol) {
var yt = ct.symbol(gt.symbol, gt.symbolX - at / 2, gt.symbolY - at / 2, at, at, { width: at, height: at }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(pt);
rt.styledMode || yt.attr({ stroke: gt.symbolStroke, fill: gt.symbolFill, "stroke-width": gt.symbolStrokeWidth || 1 });
}
pt.add(rt.exportingGroup).align(O(
gt,
{ width: pt.width, x: a(gt.x, rt.buttonOffset) }
), !0, "spacingBox"), rt.buttonOffset += (pt.width + gt.buttonSpacing) * (gt.align === "right" ? -1 : 1), rt.exportSVGElements.push(pt, yt);
}
}
function t() {
if (this.printReverseInfo) {
var nt = this.printReverseInfo, rt = nt.childNodes, ct = nt.origDisplay;
nt = nt.resetParams, this.moveContainers(this.renderTo), [].forEach.call(rt, function(gt, dt) {
gt.nodeType === 1 && (gt.style.display = ct[dt] || "");
}), this.isPrinting = !1, nt && this.setSize.apply(this, nt), delete this.printReverseInfo, et = void 0, C(this, "afterPrint");
}
}
function n() {
var nt = N.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
this.isPrinting = !0, this.pointer.reset(null, 0), C(this, "beforePrint"), rt && this.chartWidth > rt && (ct.resetParams = [this.options.chart.width, void 0, !1], this.setSize(rt, void 0, !1)), [].forEach.call(ct.childNodes, function(gt, dt) {
gt.nodeType === 1 && (ct.origDisplay[dt] = gt.style.display, gt.style.display = "none");
}), this.moveContainers(nt), this.printReverseInfo = ct;
}
function o(nt) {
nt.renderExporting(), v(nt, "redraw", nt.renderExporting), v(nt, "destroy", nt.destroyExport);
}
function A(nt, rt, ct, gt, dt, lt, at) {
var J = this, tt = J.options.navigation, st = J.chartWidth, ht = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, lt), vt = J[pt];
if (!vt) {
J.exportContextMenu = J[pt] = vt = d("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
var Ct = d("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
J.styledMode || u(Ct, O(
{ MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
tt.menuStyle
)), vt.hideMenu = function() {
u(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, u(J.renderTo, { overflow: "hidden" }), u(J.container, { overflow: "hidden" }), W.clearTimeout(vt.hideTimer), C(J, "exportMenuHidden");
}, J.exportEvents.push(v(vt, "mouseleave", function() {
vt.hideTimer = w.setTimeout(vt.hideMenu, 500);
}), v(vt, "mouseenter", function() {
W.clearTimeout(vt.hideTimer);
}), v(N, "mouseup", function(Tt) {
J.pointer.inClass(Tt.target, nt) || vt.hideMenu();
}), v(vt, "click", function() {
J.openMenu && vt.hideMenu();
})), rt.forEach(function(Tt) {
if (typeof Tt == "string" && (Tt = J.options.exporting.menuItemDefinitions[Tt]), b(Tt, !0)) {
var kt = void 0;
Tt.separator ? kt = d("hr", void 0, void 0, Ct) : (Tt.textKey === "viewData" && J.isDataTableVisible && (Tt.textKey = "hideData"), kt = d("li", { className: "highcharts-menu-item", onclick: function(St) {
St && St.stopPropagation(), vt.hideMenu(), Tt.onclick && Tt.onclick.apply(J, arguments);
} }, void 0, Ct), h.setElementHTML(kt, Tt.text || J.options.lang[Tt.textKey]), J.styledMode || (kt.onmouseover = function() {
u(this, tt.menuItemHoverStyle);
}, kt.onmouseout = function() {
u(this, tt.menuItemStyle);
}, u(kt, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(kt);
}
}), J.exportDivElements.push(Ct, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
}
rt = { display: "block" }, ct + J.exportMenuWidth > st ? rt.right = st - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + lt + J.exportMenuHeight > ht && at.alignOptions.verticalAlign !== "top" ? rt.bottom = ht - gt - yt + "px" : rt.top = gt + lt - yt + "px", u(vt, rt), u(J.renderTo, { overflow: "" }), u(J.container, { overflow: "" }), J.openMenu = !0, C(J, "exportMenuShown");
}
function _(nt) {
var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
nt = rt.exportEvents;
var dt;
ct && (ct.forEach(function(lt, at) {
lt && (lt.onclick = lt.ontouchstart = null, dt = "cache-" + lt.menuClassName, rt[dt] && delete rt[dt], ct[at] = lt.destroy());
}), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(lt, at) {
lt && (W.clearTimeout(lt.hideTimer), c(lt, "mouseleave"), gt[at] = lt.onmouseout = lt.onmouseover = lt.ontouchstart = lt.onclick = null, P(lt));
}), gt.length = 0), nt && (nt.forEach(function(lt) {
lt();
}), nt.length = 0);
}
function D(nt, rt) {
rt = this.getSVGForExport(nt, rt), nt = M(this.options.exporting, nt), U.post(nt.url, { filename: nt.filename ? nt.filename.replace(/\//g, "-") : this.getFilename(), type: nt.type, width: nt.width || 0, scale: nt.scale, svg: rt }, nt.formAttributes);
}
function j() {
return this.styledMode && this.inlineStyles(), this.container.innerHTML;
}
function T() {
var nt = this.userOptions.title && this.userOptions.title.text, rt = this.options.exporting.filename;
return rt ? rt.replace(/\//g, "-") : (typeof nt == "string" && (rt = nt.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(
/[^a-z0-9\-]/g,
""
).replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!rt || 5 > rt.length) && (rt = "chart"), rt);
}
function X(nt) {
var rt, ct = M(this.options, nt);
ct.plotOptions = M(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = M(this.userOptions.time, nt && nt.time);
var gt = d("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, N.body), dt = this.renderTo.style.width, lt = this.renderTo.style.height;
dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), lt = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(lt) && parseInt(lt, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: lt }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
rt = M(tt.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: tt.visible }), rt.isInternal || ct.series.push(rt);
});
var at = {};
this.axes.forEach(function(tt) {
tt.userOptions.internalKey || (tt.userOptions.internalKey = p()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(M(tt.userOptions, { visible: tt.visible })));
});
var J = new this.constructor(ct, this.callback);
return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
var st = {};
nt[tt] && (st[tt] = nt[tt], J.update(st));
}), this.axes.forEach(function(tt) {
var st = B(J.axes, function(yt) {
return yt.options.internalKey === tt.userOptions.internalKey;
}), ht = tt.getExtremes(), pt = ht.userMin;
ht = ht.userMax, st && (typeof pt < "u" && pt !== st.min || typeof ht < "u" && ht !== st.max) && st.setExtremes(
pt,
ht,
!0,
!1
);
}), lt = J.getChartHTML(), C(this, "getSVG", { chartCopy: J }), lt = this.sanitizeSVG(lt, ct), ct = null, J.destroy(), P(gt), lt;
}
function f(nt, rt) {
var ct = this.options.exporting;
return this.getSVG(M({ chart: { borderRadius: 0 } }, ct.chartOptions, rt, { exporting: { sourceWidth: nt && nt.sourceWidth || ct.sourceWidth, sourceHeight: nt && nt.sourceHeight || ct.sourceHeight } }));
}
function m(nt) {
return nt.replace(/([A-Z])/g, function(rt, ct) {
return "-" + ct.toLowerCase();
});
}
function L() {
function nt(J) {
function tt(St, _t) {
if (ht = pt = !1, ct.length) {
for (yt = ct.length; yt-- && !pt; )
pt = ct[yt].test(_t);
ht = !pt;
}
for (_t === "transform" && St === "none" && (ht = !0), yt = rt.length; yt-- && !ht; )
ht = rt[yt].test(_t) || typeof St == "function";
ht || Ct[_t] === St && J.nodeName !== "svg" || gt[J.nodeName][_t] === St || (q && q.indexOf(_t) === -1 ? st += m(_t) + ":" + St + ";" : St && J.setAttribute(m(_t), St));
}
var st = "", ht, pt, yt;
if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
var vt = w.getComputedStyle(J, null), Ct = J.nodeName === "svg" ? {} : w.getComputedStyle(J.parentNode, null);
if (!gt[J.nodeName]) {
dt = at.getElementsByTagName("svg")[0];
var Tt = at.createElementNS(J.namespaceURI, J.nodeName);
dt.appendChild(Tt), gt[J.nodeName] = M(w.getComputedStyle(Tt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Tt);
}
if ($.isFirefox || $.isMS)
for (var kt in vt)
tt(vt[kt], kt);
else
x(vt, tt);
st && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + st)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
}
}
var rt = V, ct = l.inlineWhitelist, gt = {}, dt, lt = N.createElement("iframe");
u(lt, { width: "1px", height: "1px", visibility: "hidden" }), N.body.appendChild(lt);
var at = lt.contentWindow.document;
at.open(), at.write(''), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), lt.parentNode.removeChild(lt);
}
function Y(nt) {
(this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
nt.appendChild(rt);
});
}
function F() {
var nt = this;
nt.exporting = { update: function(rt, ct) {
nt.isDirtyExporting = !0, M(!0, nt.options.exporting, rt), a(ct, !0) && nt.redraw();
} }, R.compose(nt).navigation.addUpdate(function(rt, ct) {
nt.isDirtyExporting = !0, M(!0, nt.options.navigation, rt), a(ct, !0) && nt.redraw();
});
}
function Q() {
var nt = this;
nt.isPrinting || (et = nt, $.isSafari || nt.beforePrint(), setTimeout(function() {
w.focus(), w.print(), $.isSafari || setTimeout(function() {
nt.afterPrint();
}, 1e3);
}, 1));
}
function k() {
var nt = this, rt = nt.options.exporting, ct = rt.buttons, gt = nt.isDirtyExporting || !nt.exportSVGElements;
nt.buttonOffset = 0, nt.isDirtyExporting && nt.destroyExport(), gt && rt.enabled !== !1 && (nt.exportEvents = [], nt.exportingGroup = nt.exportingGroup || nt.renderer.g("exporting-group").attr({ zIndex: 3 }).add(), x(ct, function(dt) {
nt.addButton(dt);
}), nt.isDirtyExporting = !1);
}
function G(nt, rt) {
var ct = nt.indexOf("") + 6, gt = nt.substr(ct);
return nt = nt.substr(0, ct), rt && rt.exporting && rt.exporting.allowHTML && gt && (gt = '' + gt.replace(/(<(?:img|br).*?(?=>))>/g, "$1 />") + "", nt = nt.replace("", gt + "")), nt = nt.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(
/jQuery[0-9]+="[^"]+"/g,
""
).replace(/url\(("|")(.*?)("|");?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/