diff --git a/dist-esm/billboard.js b/dist-esm/billboard.js index bf8f04735..5441b4f2b 100644 --- a/dist-esm/billboard.js +++ b/dist-esm/billboard.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format'; import { pointer, select, namespaces, selectAll } from 'd3-selection'; @@ -1286,10 +1286,6 @@ var Store = /** @class */ (function () { return Store; }()); -/** - * Copyright (c) 2017 ~ present NAVER Corp. - * billboard.js project is licensed under the MIT license - */ /** * main config options */ @@ -1664,13 +1660,21 @@ var main = { * @memberof Options * @type {Array} * @default [] + * @see [Demo](https://naver.github.io/billboard.js/demo/#Region.RegionLabel) * @example * regions: [ * { * axis: "x", * start: 1, * end: 4, - * class: "region-1-4" + * class: "region-1-4", + * label: { + * text: "Region Text", + * x: 5, // position relative of the initial x coordinate + * y: 5, // position relative of the initial y coordinate + * color: "red", // color string + * rotated: true // make text to show in vertical or horizontal + * } * } * ] */ @@ -14655,7 +14659,8 @@ var region = { $T(regions.exit()) .style("opacity", "0") .remove(); - var regionsEnter = regions.enter() + var regionsEnter = regions + .enter() .append("g"); regionsEnter .append("rect") @@ -14663,16 +14668,35 @@ var region = { region.list = regionsEnter .merge(regions) .attr("class", $$.classRegion.bind($$)); + region.list.each(function (d) { + var _a; + var g = select(this); + if (g.select("text").size() === 0 && ((_a = d.label) === null || _a === void 0 ? void 0 : _a.text)) { + select(this).append("text") + .style("opacity", "0"); + } + }); }, redrawRegion: function (withTransition) { var $$ = this; var region = $$.$el.region, $T = $$.$T; var regions = region.list.select("rect"); + var label = region.list.selectAll("text"); regions = $T(regions, withTransition) .attr("x", $$.regionX.bind($$)) .attr("y", $$.regionY.bind($$)) .attr("width", $$.regionWidth.bind($$)) .attr("height", $$.regionHeight.bind($$)); + label = $T(label, withTransition) + .attr("transform", function (d) { + var _a; + var _b = (_a = d.label) !== null && _a !== void 0 ? _a : {}, _c = _b.x, x = _c === void 0 ? 0 : _c, _d = _b.y, y = _d === void 0 ? 0 : _d, _e = _b.rotated, rotated = _e === void 0 ? false : _e; + return "translate(".concat($$.regionX.bind($$)(d) + x, ", ").concat($$.regionY.bind($$)(d) + y, ")").concat(rotated ? " rotate(-90)" : ""); + }) + .attr("text-anchor", function (d) { var _a; return (((_a = d.label) === null || _a === void 0 ? void 0 : _a.rotated) ? "end" : null); }) + .attr("dy", "1em") + .style("fill", function (d) { var _a, _b; return (_b = (_a = d.label) === null || _a === void 0 ? void 0 : _a.color) !== null && _b !== void 0 ? _b : null; }) + .text(function (d) { var _a; return (_a = d.label) === null || _a === void 0 ? void 0 : _a.text; }); return [ regions .style("fill-opacity", function (d) { return (isValue(d.opacity) ? d.opacity : null); }) @@ -14681,7 +14705,8 @@ var region = { select(this.parentNode) .selectAll("rect:not([x])") .remove(); - }) + }), + label.style("opacity", null) ]; }, getRegionXY: function (type, d) { @@ -14885,10 +14910,6 @@ var sizeAxis = { } }; -/** - * Copyright (c) 2017 ~ present NAVER Corp. - * billboard.js project is licensed under the MIT license - */ /** * Axis based chart data config options */ @@ -22741,7 +22762,7 @@ var zoomModule = function () { var defaults = {}; /** * @namespace bb - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ var bb = { /** @@ -22751,7 +22772,7 @@ var bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.2-nightly-20230805003715", + version: "3.9.2-nightly-20230808003859", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: diff --git a/dist-esm/plugin/billboardjs-plugin-bubblecompare.js b/dist-esm/plugin/billboardjs-plugin-bubblecompare.js index 272f543b0..fea209da9 100644 --- a/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +++ b/dist-esm/plugin/billboardjs-plugin-bubblecompare.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.2-nightly-20230805003715"; + Plugin.version = "3.9.2-nightly-20230808003859"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-sparkline.js b/dist-esm/plugin/billboardjs-plugin-sparkline.js index aa7cf4684..bae0f86f3 100644 --- a/dist-esm/plugin/billboardjs-plugin-sparkline.js +++ b/dist-esm/plugin/billboardjs-plugin-sparkline.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -279,7 +279,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.2-nightly-20230805003715"; + Plugin.version = "3.9.2-nightly-20230808003859"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-stanford.js b/dist-esm/plugin/billboardjs-plugin-stanford.js index 238ca6b86..f9c58c0e2 100644 --- a/dist-esm/plugin/billboardjs-plugin-stanford.js +++ b/dist-esm/plugin/billboardjs-plugin-stanford.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -487,7 +487,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.2-nightly-20230805003715"; + Plugin.version = "3.9.2-nightly-20230808003859"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-tableview.js b/dist-esm/plugin/billboardjs-plugin-tableview.js index 372136886..4bf935a3b 100644 --- a/dist-esm/plugin/billboardjs-plugin-tableview.js +++ b/dist-esm/plugin/billboardjs-plugin-tableview.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.2-nightly-20230805003715"; + Plugin.version = "3.9.2-nightly-20230808003859"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist-esm/plugin/billboardjs-plugin-textoverlap.js b/dist-esm/plugin/billboardjs-plugin-textoverlap.js index 1ec805058..efe8ec418 100644 --- a/dist-esm/plugin/billboardjs-plugin-textoverlap.js +++ b/dist-esm/plugin/billboardjs-plugin-textoverlap.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -263,7 +263,7 @@ var Plugin = /** @class */ (function () { delete _this[key]; }); }; - Plugin.version = "3.9.2-nightly-20230805003715"; + Plugin.version = "3.9.2-nightly-20230808003859"; return Plugin; }()); var Plugin$1 = Plugin; diff --git a/dist/billboard.css b/dist/billboard.css index f03372c74..bb3eea3e6 100644 --- a/dist/billboard.css +++ b/dist/billboard.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ /*-- Chart --*/ .bb svg { @@ -102,7 +102,7 @@ opacity: .05 !important; } /*-- Region --*/ -.bb-region { +.bb-region rect { fill: steelblue; fill-opacity: .1; } diff --git a/dist/billboard.js b/dist/billboard.js index ee0f70b43..77cbbe9c7 100644 --- a/dist/billboard.js +++ b/dist/billboard.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -1737,6 +1737,7 @@ var Store = /*#__PURE__*/function () { * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license */ + /** * main config options */ @@ -2111,13 +2112,21 @@ var Store = /*#__PURE__*/function () { * @memberof Options * @type {Array} * @default [] + * @see [Demo](https://naver.github.io/billboard.js/demo/#Region.RegionLabel) * @example * regions: [ * { * axis: "x", * start: 1, * end: 4, - * class: "region-1-4" + * class: "region-1-4", + * label: { + * text: "Region Text", + * x: 5, // position relative of the initial x coordinate + * y: 5, // position relative of the initial y coordinate + * color: "red", // color string + * rotated: true // make text to show in vertical or horizontal + * } * } * ] */ @@ -9589,75 +9598,76 @@ function title_getTextPos(pos, width) { len = d.length; var text, row, param, value, i; var _loop = function () { - var _this3 = this; - row = d[i]; - if (!row || !(getRowValue(row) || getRowValue(row) === 0)) { - return "continue"; - } - if (isUndefined(text)) { - var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x); - text = tplProcess(tpl[0], { - CLASS_TOOLTIP: $TOOLTIP.tooltip, - TITLE: isValue(title) ? tplStr ? title : "" + title + "" : "" - }); - } - if (!row.ratio && $el.arcs) { - param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]]; - row.ratio = $$.getRatio.apply($$, param); - } - param = [row.ratio, row.id, row.index, d]; - value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param))); - if ($$.isAreaRangeType(row)) { - var _map2 = ["high", "low"].map(function (v) { - _newArrowCheck(this, _this3); - return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param))); - }.bind(this)), - high = _map2[0], - low = _map2[1]; - value = "Mid: " + value + " High: " + high + " Low: " + low; - } else if ($$.isCandlestickType(row)) { - var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) { - _newArrowCheck(this, _this3); - return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param))); - }.bind(this)), - open = _map3[0], - _high = _map3[1], - _low = _map3[2], - close = _map3[3], - volume = _map3[4]; - value = "Open: " + open + " High: " + _high + " Low: " + _low + " Close: " + close + (volume ? " Volume: " + volume : ""); - } else if ($$.isBarRangeType(row)) { - var _row$value = row.value, - start = _row$value[0], - end = _row$value[1]; - value = valueFormat(start) + " ~ " + valueFormat(end); - } - if (value !== undefined) { - // Skip elements when their name is set to null - if (row.name === null) { - return "continue"; + var _this3 = this; + row = d[i]; + if (!row || !(getRowValue(row) || getRowValue(row) === 0)) { + return 0; // continue } - var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))), - _color = getBgColor(row), - contentValue = { - CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id), - COLOR: tplStr || !$$.patterns ? _color : "", - NAME: name, - VALUE: value - }; - if (tplStr && isObject(contents.text)) { - var index = targetIds.indexOf(row.id); - Object.keys(contents.text).forEach(function (key) { - _newArrowCheck(this, _this3); - contentValue[key] = contents.text[key][index]; - }.bind(this)); + if (isUndefined(text)) { + var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x); + text = tplProcess(tpl[0], { + CLASS_TOOLTIP: $TOOLTIP.tooltip, + TITLE: isValue(title) ? tplStr ? title : "" + title + "" : "" + }); } - text += tplProcess(tpl[1], contentValue); - } - }; + if (!row.ratio && $el.arcs) { + param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]]; + row.ratio = $$.getRatio.apply($$, param); + } + param = [row.ratio, row.id, row.index, d]; + value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param))); + if ($$.isAreaRangeType(row)) { + var _map2 = ["high", "low"].map(function (v) { + _newArrowCheck(this, _this3); + return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param))); + }.bind(this)), + high = _map2[0], + low = _map2[1]; + value = "Mid: " + value + " High: " + high + " Low: " + low; + } else if ($$.isCandlestickType(row)) { + var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) { + _newArrowCheck(this, _this3); + return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param))); + }.bind(this)), + open = _map3[0], + _high = _map3[1], + _low = _map3[2], + close = _map3[3], + volume = _map3[4]; + value = "Open: " + open + " High: " + _high + " Low: " + _low + " Close: " + close + (volume ? " Volume: " + volume : ""); + } else if ($$.isBarRangeType(row)) { + var _row$value = row.value, + start = _row$value[0], + end = _row$value[1]; + value = valueFormat(start) + " ~ " + valueFormat(end); + } + if (value !== undefined) { + // Skip elements when their name is set to null + if (row.name === null) { + return 0; // continue + } + var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))), + _color = getBgColor(row), + contentValue = { + CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id), + COLOR: tplStr || !$$.patterns ? _color : "", + NAME: name, + VALUE: value + }; + if (tplStr && isObject(contents.text)) { + var index = targetIds.indexOf(row.id); + Object.keys(contents.text).forEach(function (key) { + _newArrowCheck(this, _this3); + contentValue[key] = contents.text[key][index]; + }.bind(this)); + } + text += tplProcess(tpl[1], contentValue); + } + }, + _ret; for (i = 0; i < len; i++) { - var _ret = _loop(); - if (_ret === "continue") continue; + _ret = _loop(); + if (_ret === 0) continue; } return text + ""; }, @@ -16493,21 +16503,53 @@ function smoothLines(el, type) { var regionsEnter = regions.enter().append("g"); regionsEnter.append("rect").style("fill-opacity", "0"); region.list = regionsEnter.merge(regions).attr("class", $$.classRegion.bind($$)); + region.list.each(function (d) { + var _d$label, + g = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this); + if (g.select("text").size() === 0 && (_d$label = d.label) != null && _d$label.text) { + (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).append("text").style("opacity", "0"); + } + }); }, redrawRegion: function redrawRegion(withTransition) { var _this = this, $$ = this, region = $$.$el.region, $T = $$.$T, - regions = region.list.select("rect"); + regions = region.list.select("rect"), + label = region.list.selectAll("text"); regions = $T(regions, withTransition).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$)); + label = $T(label, withTransition).attr("transform", function (d) { + var _d$label2; + _newArrowCheck(this, _this); + var _ref = (_d$label2 = d.label) != null ? _d$label2 : {}, + _ref$x = _ref.x, + x = _ref$x === void 0 ? 0 : _ref$x, + _ref$y = _ref.y, + y = _ref$y === void 0 ? 0 : _ref$y, + _ref$rotated = _ref.rotated, + rotated = _ref$rotated === void 0 ? !1 : _ref$rotated; + return "translate(" + ($$.regionX.bind($$)(d) + x) + ", " + ($$.regionY.bind($$)(d) + y) + ")" + (rotated ? " rotate(-90)" : ""); + }.bind(this)).attr("text-anchor", function (d) { + var _d$label3; + _newArrowCheck(this, _this); + return (_d$label3 = d.label) != null && _d$label3.rotated ? "end" : null; + }.bind(this)).attr("dy", "1em").style("fill", function (d) { + var _d$label$color, _d$label4; + _newArrowCheck(this, _this); + return (_d$label$color = (_d$label4 = d.label) == null ? void 0 : _d$label4.color) != null ? _d$label$color : null; + }.bind(this)).text(function (d) { + var _d$label5; + _newArrowCheck(this, _this); + return (_d$label5 = d.label) == null ? void 0 : _d$label5.text; + }.bind(this)); return [regions.style("fill-opacity", function (d) { _newArrowCheck(this, _this); return isValue(d.opacity) ? d.opacity : null; }.bind(this)).on("end", function () { // remove unnecessary rect after transition (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this.parentNode).selectAll("rect:not([x])").remove(); - })]; + }), label.style("opacity", null)]; }, getRegionXY: function getRegionXY(type, d) { var $$ = this, @@ -16711,6 +16753,7 @@ function smoothLines(el, type) { * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license */ + /** * Axis based chart data config options */ @@ -25195,7 +25238,7 @@ var _defaults = {}; /** * @namespace bb - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ var bb = { /** @@ -25205,7 +25248,7 @@ var bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.2-nightly-20230805003715", + version: "3.9.2-nightly-20230808003859", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: diff --git a/dist/billboard.min.css b/dist/billboard.min.css index c445e177b..04e956fa4 100644 --- a/dist/billboard.min.css +++ b/dist/billboard.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 - */.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px} \ No newline at end of file + * @version 3.9.2-nightly-20230808003859 + */.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px} \ No newline at end of file diff --git a/dist/billboard.min.js b/dist/billboard.min.js index d761779e4..d82d91328 100644 --- a/dist/billboard.min.js +++ b/dist/billboard.min.js @@ -5,6 +5,6 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom"));else if("function"==typeof define&&define.amd)define(["d3-axis","d3-brush","d3-drag","d3-dsv","d3-ease","d3-hierarchy","d3-interpolate","d3-scale","d3-selection","d3-shape","d3-time-format","d3-transition","d3-zoom"],e);else{var i="object"==typeof exports?e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,(function(t,e,i,n,a,r,s,o,l,c,d,u,h){return function(){"use strict";var g=[,,function(t){t.exports=l},function(t){t.exports=e},function(t){t.exports=d},function(t){t.exports=n},function(t){t.exports=o},function(t){t.exports=i},function(t){t.exports=u},function(t){t.exports=c},function(e){e.exports=t},function(t){t.exports=a},function(t){t.exports=s},function(t){t.exports=r},function(t){t.exports=h}],f={};function p(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return g[t](i,i.exports,p),i.exports}p.d=function(t,e){for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var v={};return function(){p.r(v),p.d(v,{bb:function(){return Xa},default:function(){return Xa}});var t={};p.r(t),p.d(t,{area:function(){return Qn},areaLineRange:function(){return ta},areaSpline:function(){return ea},areaSplineRange:function(){return ia},areaStep:function(){return na},bar:function(){return ha},bubble:function(){return ga},candlestick:function(){return fa},donut:function(){return oa},gauge:function(){return la},line:function(){return aa},pie:function(){return ca},polar:function(){return da},radar:function(){return ua},scatter:function(){return pa},spline:function(){return ra},step:function(){return sa},treemap:function(){return va}});var e={};function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}p.r(e),p.d(e,{selection:function(){return Da},subchart:function(){return za},zoom:function(){return Ma}});var n=p(4),a=p(2),r=void 0,s=function(){return i(this,r),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),o="function"==typeof s.requestAnimationFrame,l="function"==typeof s.requestIdleCallback,c=o?s.requestAnimationFrame:function(t){return i(this,r),setTimeout(t,1)}.bind(void 0),d=o?s.cancelAnimationFrame:function(t){return i(this,r),clearTimeout(t)}.bind(void 0),u=l?s.requestIdleCallback:c,h=(l&&s.cancelIdleCallback,null==s?void 0:s.document),g={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},f={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},x={Area:[g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.AREA_STEP],AreaRange:[g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE],Arc:[g.PIE,g.DONUT,g.GAUGE,g.POLAR,g.RADAR],Line:[g.LINE,g.SPLINE,g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.STEP,g.AREA_STEP],Step:[g.STEP,g.AREA_STEP],Spline:[g.SPLINE,g.AREA_SPLINE,g.AREA_SPLINE_RANGE]};function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function _(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===b(e)?e:String(e)}function m(t,e,i){return(e=_(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var y=p(3),T=void 0;function w(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e,i=1;i2?n-2:0),r=2;r/g,">"):t}function V(t,e,n,a){var r=this;if(void 0===n&&(n=[-1,1]),void 0===a&&(a=!1),t&&C(e))if(-1===e.indexOf("\n"))t.text(e);else{var s=[t.text(),e].map(function(t){return i(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(s[0]!==s[1]){var o=e.split("\n"),l=a?o.length-1:1;t.html(""),o.forEach(function(e,a){i(this,r),t.append("tspan").attr("x",0).attr("dy",(0===a?n[0]*l:n[1])+"em").text(e)}.bind(this))}}}function Y(t){var e=t.getBBox(),i=e.x,n=e.y,a=e.width,r=e.height;return[{x:i,y:n+r},{x:i,y:n},{x:i+a,y:n},{x:i+a,y:n+r}]}function H(t,e){var n,r=t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0]),s=(0,a.pointer)(r||t,e),o=this;return s.map(function(t){return i(this,o),isNaN(t)?0:t}.bind(this))}function W(t){var e,i=t.event,n=t.$el,a=n.subchart.main||n.main;return i&&"brush"===i.type?e=i.selection:a&&(e=a.select(".bb-brush").node())&&(e=(0,y.brushSelection)(e)),e}function U(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function Z(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===i&&(i=1e4);var n=s.crypto||s.msCrypto,a=n?e+n.getRandomValues(new Uint32Array(1))[0]%(i-e+1):Math.floor(Math.random()*(i-e)+e);return t?a+"":a}function q(t,e,i,n,a){if(i>n)return-1;var r=Math.floor((i+n)/2),s=t[r],o=s.x,l=s.w,c=void 0===l?0:l;return a&&(o=t[r].y,c=t[r].h),e>=o&&e<=o+c?r:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},Jt={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Qt=void 0,te={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){i(this,Qt)}.bind(void 0),tooltip_onhide:function(){i(this,Qt)}.bind(void 0),tooltip_onshown:function(){i(this,Qt)}.bind(void 0),tooltip_onhidden:function(){i(this,Qt)}.bind(void 0),tooltip_order:null};function ee(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ie(t){for(var e,i=1;i0){if(void 0===e[a-1]&&(e[a-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+i+", "+a+")!");e[a-1][n]=t}}))})),e}function Te(t){var e=t[0],i=[];return t.forEach((function(t,n){if(n>0){var a={};t.forEach((function(t,i){if(void 0===t)throw new Error("Source data is missing a component at ("+n+", "+i+")!");a[e[i]]=t})),i.push(a)}})),i}function we(t,e){var i,n,a=[];if(Array.isArray(t)){i=e.x?e.value.concat(e.x):e.value,a.push(i),t.forEach((function(t){var e=i.map((function(e){var i=function(t,e){if(void 0!==t[e])return t[e];var i=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),n=t;return i.some((function(t){return!(n=n&&t in n?n[t]:void 0)})),n}(t,e);return void 0===i&&(i=null),i}));a.push(e)})),n=Te(a)}else Object.keys(t).forEach((function(e){var i=t[e].concat();null==i.unshift||i.unshift(e),a.push(i)})),n=ye(a);return n}function Ae(t,e){var n,a=this,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach(function(t){i(this,a),n[0][t]=null}.bind(this))):n=t.parse(e),n}function Se(t){return Ae({rows:me.csvParseRows,parse:me.csvParse},t)}function ke(t){return Ae({rows:me.tsvParseRows,parse:me.tsvParse},t)}function Ce(t,e){var i=t||(null==e?void 0:e.data_keys);return null!=i&&i.x&&(e.data_x=i.x),i}var Re={convertData:function(t,e){var n=this,a=this.config,r=a.boost_useWorker,s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){i(this,n);var a="data_"+e;a in t&&(s[e]=t[a])}.bind(this))),s.url&&e)!function(t,e,i,n,a){void 0===e&&(e="csv");var r=new XMLHttpRequest,s={csv:Se,tsv:ke,json:we};r.open("GET",t),i&&Object.keys(i).forEach((function(t){r.setRequestHeader(t,i[t])})),r.onreadystatechange=function(){if(4===r.readyState){if(200!==r.status)throw new Error(t+": Something went wrong loading!");var i=r.responseText;i&&a.call(this,s[e]("json"===e?JSON.parse(i):i,n))}},r.send()}(s.url,s.mimeType,s.headers,Ce(s.keys,a),e);else if(s.json)_e(r,we,e,[ye,Te])(s.json,Ce(s.keys,a));else if(s.rows)_e(r,Te,e)(s.rows);else if(s.columns)_e(r,ye,e)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this,a=this,r=a.axis,s=a.config,o=a.state,l=s.data_type,c=!1,d=!1,u=!1;r&&(c=r.isCategorized(),d=r.isTimeSeries(),u=r.isCustomX());var h,g=Object.keys(t[0]||{}),f=g.length?g.filter(a.isNotX,a):[],p=g.length?g.filter(a.isX,a):[];f.forEach(function(r){var o=this;i(this,n);var l=this.getXKey(r);u||d?p.indexOf(l)>=0?h=(e&&a.data.xs[r]||[]).concat(t.map(function(t){return i(this,o),t[l]}.bind(this)).filter(S).map(function(t,e){return i(this,o),a.generateTargetX(t,r,e)}.bind(this))):s.data_x?h=this.getOtherTargetXs():$(s.data_xs)&&(h=a.getXValuesOfXKey(l,a.data.targets)):h=t.map(function(t,e){return i(this,o),e}.bind(this)),h&&(this.data.xs[r]=h)}.bind(this)),f.forEach(function(t){if(i(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));var v=f.map(function(e,r){var l=this;i(this,n);var d=s.data_idConverter.bind(a.api)(e),h=a.getXKey(e),g=u&&c,f=g&&t.map(function(t){return i(this,l),t.x}.bind(this)).every(function(t){return i(this,l),s.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===h&&p?a.api.data.values(e).length:0;return{id:d,id_org:e,values:t.map(function(t,n){i(this,l);var c,u=t[h],x=t[e];return x=null===x||isNaN(x)||F(x)?X(x)||F(x)?x:null:+x,!g&&!o.hasRadar||0!==r||E(u)?c=a.generateTargetX(u,e,v+n):(f||0!==r||0!==n||p||(s.axis_x_categories=[]),-1===(c=s.axis_x_categories.indexOf(u))&&(c=s.axis_x_categories.length,s.axis_x_categories.push(u))),(E(x)||a.data.xs[e].length<=n)&&(c=void 0),{x:c,value:x,id:d,index:-1}}.bind(this)).filter(function(t){return i(this,l),L(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;i(this,n),s.data_xSort&&(t.values=t.values.sort(function(t,e){return i(this,r),(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return i(this,r),t.index=e}.bind(this)),null==(e=a.data.xs[t.id])||e.sort(function(t,e){return i(this,r),t-e}.bind(this))}.bind(this)),o.hasNegativeValue=a.hasNegativeValueInTargets(v),o.hasPositiveValue=a.hasPositiveValueInTargets(v),l&&a.isValidChartType(l)){var x=a.mapToIds(v).filter(function(t){return i(this,n),!(t in s.data_types)||!a.isValidChartType(s.data_types[t])}.bind(this));a.setTargetType(x,l)}return v.forEach(function(t){return i(this,n),a.cache.add(t.id_org,t,!0)}.bind(this)),v}},Ee={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,a=$(e.data_xs)&&function(t,e){var n=this,a=!1;return Object.keys(t).forEach(function(r){return i(this,n),t[r]===e&&(a=!0)}.bind(this)),a}(e.data_xs,t);return n||a},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this,n=this.config.data_groups;return t?n.some(function(n){return i(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:$(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,a=this,r=this;return(e&&$(e)?r.mapToIds(e):[]).forEach(function(e){i(this,a),r.getXKey(e)===t&&(n=r.data.xs[e])}.bind(this)),n},getIndexByX:function(t,e){return e?e.indexOf(C(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var i=this;return t in i.data.xs&&i.data.xs[t]&&S(i.data.xs[t][e])?i.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t1?e=rt(it(e=e.map(function(e){return i(this,t),e.values}.bind(this)).reduce(function(e,n){return i(this,t),e.concat(n)}.bind(this)).map(function(e){return i(this,t),e.x}.bind(this)))).map(function(e,n,r){return i(this,t),{x:e,index:a?r.length-n-1:n}}.bind(this)):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return i(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?X(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var i,n=this.mapToIds(t),a=0;i=n[a];a++)if(i===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this,n=this;return(t||n.data.targets).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this,n=this.axis,a=[];return null!=t&&t.length&&(a=it(nt(t.map(function(t){var n=this;return i(this,e),t.values.map(function(t){return i(this,n),+t.x}.bind(this))}.bind(this)))),a=null!=n&&n.isTimeSeries()?a.map(function(t){return i(this,e),new Date(+t)}.bind(this)):a.map(Number)),rt(a)},addTargetIds:function(t,e){var n=this,a=this.state;(X(e)?e:[e]).forEach(function(e){i(this,n),a[t].indexOf(e)<0&&a[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this,a=this.state;(X(e)?e:[e]).forEach(function(e){i(this,n);var r=a[t].indexOf(e);r>=0&&a[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=this,a=n.state.hasAxis,r={},s=n.isMultipleX(),o=s?n.mapTargetsToUniqueXs(t).map(function(t){return i(this,e),C(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var l=this;i(this,e);var c=[];t.values.filter(function(t){var e=t.value;return i(this,l),S(e)||null===e}.bind(this)).forEach(function(t){i(this,l);var e=t.value;null!==e&&n.isCandlestickType(t)&&(e=X(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),X(e)?c.push.apply(c,e):F(e)&&"high"in e?c.push.apply(c,Object.values(e)):n.isBubbleZType(t)?c.push(a&&n.getBubbleZData(e,"y")):s?c[n.getIndexByX(t.x,o)]=e:c.push(e)}.bind(this)),r[t.id]=c}.bind(this)),r},checkValueInTargets:function(t,e){for(var i,n=Object.keys(t),a=0;a1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t>0}.bind(this))},orderTargets:function(t){var e=[].concat(t),i=this.getSortCompareFn();return i&&e.sort(i),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);var n,a=this.config.data_order,r=/asc/i.test(a),s=/desc/i.test(a);if(r||s){var o=function(t,n){return i(this,e),t+Math.abs(n.value)}.bind(this);n=function(n,a){i(this,e);var s="values"in n?n.values.reduce(o,0):n.value,l="values"in a?a.values.reduce(o,0):a.value;return t?r?s-l:l-s:r?l-s:s-l}.bind(this)}else k(a)&&(n=a.bind(this.api));return n||null},filterByX:function(t,e){var n=this;return nt(t.map(function(t){return i(this,n),t.values}.bind(this))).filter(function(t){return i(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return i(this,e),S(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var a=this;return i(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return i(this,a),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){var t=this.config.data_labels;return O(t)&&t||z(t)&&$(t)},getDataIndexFromEvent:function(t){var e,i=this.config,n=this.state,r=n.hasRadar,s=n.inputType,o=n.eventReceiver,l=o.coords,c=o.rect;if(r){var d=t.target;/tspan/i.test(d.tagName)&&(d=d.parentNode);var u=(0,a.select)(d).datum();e=u&&1===Object.keys(u).length?u.index:void 0}else{var h=i.axis_rotated,g="touch"===s&&t.changedTouches?t.changedTouches[0]:t;e=q(l,h?g.clientY-c.top:g.clientX-c.left,0,l.length-1,h)}return e},getDataLabelLength:function(t,e,n){var a=this,r=this,s=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i(this,a),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){s[e]=1.3*this.getBoundingClientRect()[n]})).remove(),s},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var i,n=t[e].x,a=[];for(i=e-1;i>=0&&n===t[i].x;i--)a.push(t[i]);for(i=e;i=0&&n?n[a]:void 0}return n?n[e]:n},setRatioForGroupedData:function(t){var e=this,n=this;if(n.config.data_groups.length&&t.some(function(t){return i(this,e),n.isGrouped(t.id)}.bind(this))){var a=function(t){return i(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){i(this,e),"values"in t?t.values.forEach(a):a(t)}.bind(this))}},getRatio:function(t,e,n){var a=this;void 0===n&&(n=!1);var r=this,s=r.config,o=r.state,l=r.api,c=0;if(e&&l.data.shown().length)if(c=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())c=e.value/r.getTotalDataSum(!0);else{var d=s.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),u=r.hasType("gauge")?d:2*Math.PI;c=(e.endAngle-e.startAngle)/u}else if("index"===t){var h=l.data.values.bind(l),g=this.getTotalPerIndex();if(o.hiddenTargetIds.length){var f=h(o.hiddenTargetIds,!1);f.length&&(f=f.reduce(function(t,e){var n=this;return i(this,a),t.map(function(t,a){return i(this,n),(R(t)?t:0)+e[a]}.bind(this))}.bind(this)),g=g.map(function(t,e){return i(this,a),t-f[e]}.bind(this)))}var p=g[e.index];e.ratio=R(e.value)&&g&&p?e.value/p:0,c=e.ratio}else if("radar"===t)c=parseFloat(Math.max(e.value,0)+"")/o.current.dataMax*s.radar_size_ratio;else if("bar"===t){var v=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return i(this,a),e-t}.bind(this));c=0===v?0:Math.abs(e.value)/v}else"treemap"===t&&(c/=r.getTotalDataSum(!0));return n&&c?100*c:c},updateDataIndexByX:function(t){var e=this,n=t.reduce(function(t,n,a){return i(this,e),t[+n.x]=a,t}.bind(this),{});this.data.targets.forEach(function(t){var a=this;i(this,e),t.values.forEach(function(t,e){i(this,a);var r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(F(t.value)&&("z"in t.value||"y"in t.value)||X(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this,n=t.value;return this.isBarType(t)&&X(n)&&n.length>=2&&n.every(function(t){return i(this,e),R(t)}.bind(this))},getDataById:function(t){var e,i=this.cache.get(t)||this.api.data(t);return null!=(e=null==i?void 0:i[0])?e:i}};function Le(t,e){void 0===e&&(e=!1);var i=this.api;e&&this.api.flush(!0),null==t||t.call(i)}var Oe={load:function(t,e){var n=this,a=this,r=a.data,s=e.append,o=t;o&&(e.filter&&(o=o.filter(e.filter)),(e.type||e.types)&&o.forEach(function(t){var r;i(this,n);var s=(null==(r=e.types)?void 0:r[t.id])||e.type;a.setTargetType(t.id,s)}.bind(this)),r.targets.forEach(function(t){i(this,n);for(var e=0;e=0?Gt.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?Gt.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,i){void 0===e&&(e=""),void 0===i&&(i="");var n=this.getTargetSelectorSuffix(t);return e+"."+(Gt.target+n)+" "+i+", "+e+"."+(Gt.circles+n)+" "+i},selectorTargets:function(t,e){var n=this,a=t||[];return a.length?a.map(function(t){return i(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(Gt.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return i(this,e),this.selectorLegend(t)}.bind(this)):null}},ze=p(6),Me=function(t,e,n){i(this,undefined);var r=(0,a.select)(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}}.bind(void 0);var $e=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Xe={generateColor:function(){var t=this,e=this,n=e.$el,a=e.config,r=a.data_colors,s=a.data_color,o=[],l=$(a.color_pattern)?a.color_pattern:(0,ze.scaleOrdinal)(function(t){var e=this,n=re,a=h.body,r=a[n];if(!r){var s=t.classed(wt.colorPattern,!0).style("background-image");t.classed(wt.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return i(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),a[n]=r)}return r}(n.chart)||$e).range(),c=l;if(k(a.color_tiles)){var d=a.color_tiles.bind(e.api)(),u=l.map(function(n,a){i(this,t);var r=n.replace(/[#\(\)\s,]/g,""),s=e.state.datetimeId+"-pattern-"+r+"-"+a;return Me(d[a%d.length],n,s)}.bind(this));l=u.map(function(e){return i(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=u}return function(t){var i,n,d=t.id||(null==(i=t.data)?void 0:i.id)||t,u=e.isTypeOf(d,["line","spline","step"])||!a.data_types[d];return k(r[d])?n=r[d].bind(e.api)(t):r[d]?n=r[d]:(o.indexOf(d)<0&&o.push(d),n=u?c[o.indexOf(d)%c.length]:l[o.indexOf(d)%l.length],r[d]=n),k(s)?s.bind(e.api)(n,t):n}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,a=i.max||100,r=i.values&&i.values.length?i.values:[];return $(i)?function(t){for(var i=n?t:100*t/a,s=e[e.length-1],o=0,l=r.length;o')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this,e=this,n=e.config,a=e.data.targets,r=e.state.datetimeId,s=e.$el.defs;a.forEach(function(a){var o=this;i(this,t);var l=r+"-gradient"+e.getTargetSelectorSuffix(a.id),c=e.isAreaType(a)?"area":e.isBarType(a)&&"bar",d=n.axis_rotated;if(c&&s.select("#"+l).empty()){var u=e.color(a),h=n[c+"_linearGradient"],g=h.x,f=void 0===g?d?[1,0]:[0,0]:g,p=h.y,v=void 0===p?d?[0,0]:[0,1]:p,x=h.stops,b=void 0===x?[[0,u,1],[1,u,0]]:x,_=s.append("linearGradient").attr("id",""+l).attr("x1",f[0]).attr("x2",f[1]).attr("y1",v[0]).attr("y2",v[1]);b.forEach(function(t){i(this,o);var n=k(t[1])?t[1].bind(e.api)(a.id):t[1];_.append("stop").attr("offset",t[0]).attr("stop-color",n||u).attr("stop-opacity",t[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this,a=this,r=a.config,s=a.$el.main,o=r.color_onover,l=t?o:a.color;F(l)?l=function(t){var e=t.id;return i(this,n),e in o?o[e]:a.color(e)}.bind(this):C(l)?l=function(){return i(this,n),o}.bind(this):k(o)&&(l=l.bind(a.api)),s.selectAll(F(e)?"."+xt.arc+a.getTargetSelectorSuffix(e.id):"."+Mt.shape+"-"+e).style("fill",l)}},Fe={getYDomainMinMax:function(t,e){var n=this,a=this,r=a.axis,s=a.config,o="min"===e,l=s.data_groups,c=a.mapToIds(t),d=a.getValuesAsIdKeyed(t);if(l.length>0){var u=a["has"+(o?"Negative":"Positive")+"ValueInTargets"](t);l.forEach(function(t){var e=this;i(this,n);var a=t.filter(function(t){return i(this,e),c.indexOf(t)>=0}.bind(this));if(a.length){var s=a[0],l=r.getId(s);u&&d[s]&&(d[s]=d[s].map(function(t){return i(this,e),(o?t<0:t>0)?t:0}.bind(this))),a.filter(function(t,n){return i(this,e),n>0}.bind(this)).forEach(function(t){var n=this;if(i(this,e),d[t]){var a=r.getId(t);d[t].forEach(function(t,e){i(this,n);var r=+t;a!==l||u&&(o?r>0:r<0)||(d[s][e]+=r)}.bind(this))}}.bind(this))}}.bind(this))}return st(e,Object.keys(d).map(function(t){return i(this,n),st(e,d[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this,n=this;return n.state.hiddenTargetIds.some(function(a){return i(this,e),n.axis.getId(a)===t}.bind(this))},getYDomain:function(t,e,n){var a=this,r=this,s=r.axis,o=r.config,l=r.scale,c="axis_"+e;if(r.isStackNormalized())return[0,100];var d=(null==l?void 0:l[e])&&"log"===l[e].type,u=t.filter(function(t){return i(this,a),s.getId(t.id)===e}.bind(this)),h=n?r.filterByXDomain(u,n):u;if(0===h.length)return r.isHiddenTargetWithYDomain(e)?l[e].domain():"y2"===e?l.y.domain():r.getYDomain(t,"y2",n);var f=o[c+"_min"],p=o[c+"_max"],v=o[c+"_center"],b=o[c+"_inverted"],_=r.hasDataLabel()&&o.axis_rotated,m=r.hasDataLabel()&&!o.axis_rotated,y=r.getYDomainMinMax(h,"min"),T=r.getYDomainMinMax(h,"max"),w=[g.BAR,g.BUBBLE,g.SCATTER].concat(x.Line).some(function(t){i(this,a);var e=t.indexOf("area")>-1?"area":t;return r.hasType(t,h,!0)&&o[e+"_zerobased"]}.bind(this));y=S(f)?f:S(p)?y<=p?y:p-10:y,T=S(p)?p:S(f)?f<=T?T:f+10:T,isNaN(y)&&(y=0),isNaN(T)&&(T=y),y===T&&(y<0?T=0:y=0);var A=y>=0&&T>=0,k=y<=0&&T<=0;(S(f)&&A||S(p)&&k)&&(w=!1),w&&(A&&(y=0),k&&(T=0));var C=Math.abs(T-y),R={top:.1*C,bottom:.1*C};if(L(v)){var E=Math.max(Math.abs(y),Math.abs(T));T=v+E,y=v-E}if(_){var O=D(l.y.range()),P=r.getDataLabelLength(y,T,"width").map(function(t){return i(this,a),t/O}.bind(this));["bottom","top"].forEach(function(t,e){i(this,a),R[t]+=C*(P[e]/(1-P[0]-P[1]))}.bind(this))}else if(m){var I=r.getDataLabelLength(y,T,"height");["bottom","top"].forEach(function(t,e){i(this,a),R[t]+=r.convertPixelToScale("y",I[e],C)}.bind(this))}R=r.getResettedPadding(R);var z=o[c+"_padding"];$(z)&&["bottom","top"].forEach(function(t){i(this,a),R[t]=s.getPadding(z,t,R[t],C)}.bind(this)),w&&(A&&(R.bottom=y),k&&(R.top=-T));var M=d?[y,T].map(function(t){return i(this,a),t<0?0:t}.bind(this)):[y-R.bottom,T+R.top];return b?M.reverse():M},getXDomainMinMax:function(t,e){var n,a=this,r=this.config["axis_x_"+e],s=st(e,t.map(function(t){var n=this;return i(this,a),st(e,t.values.map(function(t){return i(this,n),t.x}.bind(this)))}.bind(this))),o=F(r)?r.value:r;return o=L(o)&&null!=(n=this.axis)&&n.isTimeSeries()?dt.bind(this)(o):o,F(r)&&r.fit&&("min"===e&&os)&&(o=void 0),L(o)?o:s},getXDomainPadding:function(t,e){var i,n=this,a=n.axis,r=n.config.axis_x_padding,s=a.isTimeSeries()&&e,o=D(t);if(a.isCategorized()||s)i=0;else if(n.hasType("bar")){var l=n.getMaxDataCount();i=l>1?o/(l-1)/2:.5}else i=n.getResettedPadding(.01*o);var c=R(r)?{left:r,right:r}:r,d=c.left,u=void 0===d?i:d,h=c.right,g=void 0===h?i:h;if("px"===r.unit){var f=Math.abs(o+.2*o);u=a.getPadding(r,"left",i,f),g=a.getPadding(r,"right",i,f)}else{var p=o+u+g;if(s&&p){var v=o/e/p;u=u/p/v,g=g/p/v}}return{left:u,right:g}},getXDomain:function(t){var e=this,i=e.axis,n=e.config,a=e.scale.x,r=n.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],o=s[0],l=void 0===o?0:o,c=s[1],d=void 0===c?0:c;if("log"!==a.type){var u=i.isCategorized(),h=i.isTimeSeries(),g=e.getXDomainPadding(s),f=s[0],p=s[1];f-p!=0||u||(h?(f=new Date(.5*f.getTime()),p=new Date(1.5*p.getTime())):(f=0===f?1:.5*f,p=0===p?-1:1.5*p)),(f||0===f)&&(l=h?new Date(f.getTime()-g.left):f-g.left),(p||0===p)&&(d=h?new Date(p.getTime()+g.right):p+g.right)}return r?[d,l]:[l,d]},updateXDomain:function(t,e,i,n,a){var r,s=this,o=s.config,l=s.org,c=s.scale,d=c.x,u=c.subX,h=o.zoom_enabled;i&&(d.domain(a||rt(s.getXDomain(t),!o.axis_x_inverted)),l.xDomain=d.domain(),h&&s.zoom.updateScaleExtent(),u.domain(d.domain()),null==(r=s.brush)||r.scale(u));if(e){var g=a||!s.brush||K(s)?l.xDomain:W(s).map(u.invert);d.domain(g),h&&s.zoom.updateScaleExtent()}return n&&d.domain(s.trimXDomain(d.orgDomain())),d.domain()},trimXDomain:function(t){var e=this.config.axis_x_inverted,i=this.getZoomDomain(),n=i[0],a=i[1];return(e?t[0]>=n:t[0]<=n)&&(t[0]=n,t[1]=+t[1]+(n-t[0])),(e?t[1]<=a:t[1]>=a)&&(t[0]=+t[0]-(t[1]-a),t[1]=a),t},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,i=e[0],n=e[1];return L(t.zoom_x_min)&&(i=st("min",[i,t.zoom_x_min])),L(t.zoom_x_max)&&(n=st("max",[n,t.zoom_x_max])),[i,n]},convertPixelToScale:function(t,e,i){var n=this.config,a=this.state,r=n.axis_rotated;return i*(e/a["x"===t?r?"height":"width":r?"width":"height"])}};function Be(t,e,i){var n=t.config,a="axis_"+e+"_tick_format";return(n[a]?n[a]:t.defaultValueFormat).call(t.api,i)}var Ne={yFormat:function(t){return Be(this,"y",t)},y2Format:function(t){return Be(this,"y2",t)},getDefaultValueFormat:function(){var t=this,e=t.defaultArcValueFormat,i=t.yFormat,n=t.y2Format,a=t.hasArcType(null,["gauge","polar","radar"]);return function(r,s,o){return(a?e:t.axis&&"y2"===t.axis.getId(o)?n:i).call(t,r,s)}},defaultValueFormat:function(t){return S(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this,n=this.config.data_labels,a=function(t){return i(this,e),S(t)?+t:""}.bind(this),r=a;return k(n.format)?r=n.format:z(n.format)&&(r=n.format[t]?!0===n.format[t]?a:n.format[t]:function(){return i(this,e),""}.bind(this)),r.bind(this.api)}};function Ge(t){var e=this,i=e.getDataById(t);return e.levelColor?e.levelColor(i.values[0].value):e.color(i)}var je={initLegend:function(){var t=this,e=t.config,i=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(i.legend=t.$el.svg.append("g").classed(kt.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,i){var n,a=this,r=a.config,s=a.state,o=a.scale,l=a.$el,c=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};c.withTransition=B(c,"withTransition",!0),c.withTransitionForTransform=B(c,"withTransitionForTransform",!0),r.legend_contents_bindto&&r.legend_contents_template?a.updateLegendTemplate():s.hasTreemap||a.updateLegendElement(t||a.mapToIds(a.data.targets),c,i),null==(n=l.legend)||n.selectAll("."+kt.legendItem).classed(kt.legendItemHidden,(function(t){var e=!a.isTargetToShow(t);return e&&(this.style.opacity=null),e})),a.updateScales(!1,!o.zoom),a.updateSvgSize(),a.transformAll(c.withTransitionForTransform,i),s.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=this,n=e.config,r=e.$el,s=(0,a.select)(n.legend_contents_bindto),o=n.legend_contents_template;if(!s.empty()){var l=e.mapToIds(e.data.targets),c=[],d="";l.forEach(function(n){i(this,t);var a=k(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):ct(o,{COLOR:e.color(n),TITLE:n});a&&(c.push(n),d+=a)}.bind(this));var u=s.html(d).selectAll((function(){return this.childNodes})).data(c);e.setLegendItem(u),r.legend=s}},updateSizeForLegend:function(t){var e=this,i=e.config,n=e.state,a=n.isLegendTop,r=n.isLegendLeft,s=n.isLegendRight,o=n.isLegendInset,l=n.current,c=t.width,d=t.height,u={top:a?e.getCurrentPaddingTop()+i.legend_inset_y+5.5:l.height-d-e.getCurrentPaddingBottom()-i.legend_inset_y,left:r?e.getCurrentPaddingLeft()+i.legend_inset_x+.5:l.width-c-e.getCurrentPaddingRight()-i.legend_inset_x+.5};e.state.margin3={top:s?0:o?u.top:l.height-d,right:NaN,bottom:0,left:s?l.width-c:o?u.left:0}},transformLegend:function(t){var e=this,i=e.$el.legend;(0,e.$T)(i,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var i=this.$el.legend;i&&i.select("."+kt.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){var t=this.state,e=t.current.width,i=t.isLegendRight,n=t.isLegendInset,a=t.legendItemWidth,r=t.legendStep;return this.config.legend_show?i||n?a*(r+1):e:0},getLegendHeight:function(){var t,e=this,i=e.state,n=i.current,a=i.isLegendRight,r=i.legendItemHeight,s=i.legendStep,o="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?a?n.height:(o?10:Math.max(20,r))*(s+1):0},opacityForUnfocusedLegend:function(t){return t.classed(kt.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,r=this,s=r.$el.legend,o=r.$T,l=r.mapToTargetIds(t);s&&o(s.selectAll("."+kt.legendItem).filter(function(t){return i(this,n),l.indexOf(t)>=0}.bind(this)).classed(Et.legendItemFocused,e)).style("opacity",(function(){return e?null:r.opacityForUnfocusedLegend.call(r,(0,a.select)(this))}))},revertLegend:function(){var t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+kt.legendItem).classed(Et.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){var e=this,i=e.config,n=e.$el,a=e.$T;i.legend_show||(i.legend_show=!0,n.legend?n.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),a(n.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){var e=this,i=e.config,n=e.$el.legend;i.legend_show&&M(t)&&(i.legend_show=!1,n.style("visibility","hidden")),e.addHiddenLegendIds(t),n.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var i,n=this,a=n.cache,r=n.state,s=ce;return t&&((i=!r.redrawing&&a.get(s)||{})[t]||(i[t]=n.getTextRect(e,kt.legendItem),a.add(s,i)),i=i[t]),i},setLegendItem:function(t){var e=this,n=this,r=n.$el,s=n.api,o=n.config,l=n.state,c="touch"===l.inputType,d=n.hasType("gauge"),u=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){var e=(0,a.select)(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(kt.legendItem,t)})).style("visibility",function(t){return i(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(u&&[["."+kt.legendItem,"cursor:pointer"],["."+kt.legendItem+" text","pointer-events:none"],["."+kt.legendItemPoint+" text","pointer-events:none"],["."+kt.legendItemTile,"pointer-events:none"],["."+kt.legendItemEvent,"fill-opacity:0"]].forEach(function(t){i(this,e);var a=t[0],s=t[1];n.setCssRule(!1,a,[s])(r.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||k(o.legend_item_onclick)?function(t,e){if(!N(o.legend_item_onclick,s,e)){var i=t.altKey,r=t.target;"dblclick"===t.type||i?l.hiddenTargetIds.length&&-1===r.parentNode.getAttribute("class").indexOf(kt.legendItemHidden)?s.show():(s.hide(),s.show(e)):(s.toggle(e),(0,a.select)(this).classed(Et.legendItemFocused,!1))}c&&n.hideTooltip()}:null),c||t.on("mouseout",h||k(o.legend_item_onout)?function(t,e){N(o.legend_item_onout,s,e)||((0,a.select)(this).classed(Et.legendItemFocused,!1),d&&n.undoMarkOverlapped(n,"."+St.gaugeValue),n.api.revert())}:null).on("mouseover",h||k(o.legend_item_onover)?function(t,e){N(o.legend_item_onover,s,e)||((0,a.select)(this).classed(Et.legendItemFocused,!0),d&&n.markOverlapped(e,n,"."+St.gaugeValue),!l.transiting&&n.isTargetToShow(e)&&s.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n,a,r,s=this,o=this,l=o.config,c=o.state,d=o.$el.legend,u=o.$T,h="circle"!==l.legend_item_tile_type,g=l.legend_item_tile_r,f={width:h?l.legend_item_tile_width:2*g,height:h?l.legend_item_tile_height:2*g},p={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},v={offsets:{},widths:{},heights:{},margins:[0],steps:{}},x=t.filter(function(t){return i(this,s),!L(l.data_names[t])||null!==l.data_names[t]}.bind(this)),b=e.withTransition,_=o.getUpdateLegendPositions(x,p,v);c.isLegendInset&&(p.step=l.legend_inset_step?l.legend_inset_step:x.length,o.updateLegendStep(p.step)),c.isLegendRight?(n=function(t){return i(this,s),p.max.width*v.steps[t]}.bind(this),a=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):c.isLegendInset?(n=function(t){return i(this,s),p.max.width*v.steps[t]+10}.bind(this),a=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):(n=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this),a=function(t){return i(this,s),p.max.height*v.steps[t]}.bind(this));var m={xText:function(t,e){return i(this,s),n(t,e)+4+f.width}.bind(this),xRect:function(t,e){return i(this,s),n(t,e)}.bind(this),x1Tile:function(t,e){return i(this,s),n(t,e)-2}.bind(this),x2Tile:function(t,e){return i(this,s),n(t,e)-2+f.width}.bind(this),yText:function(t,e){return i(this,s),a(t,e)+9}.bind(this),yRect:function(t,e){return i(this,s),a(t,e)-5}.bind(this),yTile:function(t,e){return i(this,s),a(t,e)+4}.bind(this)};o.generateLegendItem(x,f,_,m),r=d.select("."+kt.legendBackground+" rect"),c.isLegendInset&&p.max.width>0&&0===r.size()&&(r=d.insert("g","."+kt.legendItem).attr("class",kt.legendBackground).append("rect")),u(d.selectAll("text").data(x).text(function(t){return i(this,s),L(l.data_names[t])?l.data_names[t]:t}.bind(this)).each((function(t,e){_(this,t,e)})),b).attr("x",m.xText).attr("y",m.yText),u(d.selectAll("rect."+kt.legendItemEvent).data(x),b).attr("width",function(t){return i(this,s),v.widths[t]}.bind(this)).attr("height",function(t){return i(this,s),v.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),o.updateLegendItemPos(x,b,m),r&&u(r,b).attr("height",o.getLegendHeight()-12).attr("width",p.max.width*(p.step+1)+10),o.updateLegendItemWidth(p.max.width),o.updateLegendItemHeight(p.max.height),o.updateLegendStep(p.step)},getUpdateLegendPositions:function(t,e,n){var a=this,r=a.config,s=a.state,o=s.isLegendRight||s.isLegendInset;return function(l,c,d){var u,h=this,g=d===t.length-1,f=a.getLegendItemTextBox(c,l),p=f.width+e.tileWidth+(g&&!o?0:e.padding.right)+r.legend_padding,v=f.height+e.padding.top,x=o?v:p,b=o?a.getLegendHeight():a.getLegendWidth(),_=function(t,i){i||(u=(b-e.totalLength-x)/2)=e.max.width)&&(e.max.width=p),(!e.max.height||v>=e.max.height)&&(e.max.height=v);var m=o?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return i(this,h),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return i(this,h),n.heights[t]=e.max.height}.bind(this)),(u=(b-m*t.length)/2)1&&d&&(o&&(f+=d*o),g>2?f-=(g-1)*d/2:2===g&&(f-=d/2)),f}.bind(this)},getShapeY:function(t){var e=this,n=this,a=n.isStackNormalized();return function(r){i(this,e);var s=r.value;return R(r)?s=r:a?s=n.getRatio("index",r,!0):n.isBubbleZType(r)?s=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(s=s[1]),n.getYScaleById(r.id,t)(s)}.bind(this)},getShapeYMin:function(t){var e=this,i=e.axis.getId(t),n=e.scale[i].domain()[0],a=e.config["axis_"+i+"_inverted"];return!e.isGrouped(t)&&!a&&n>0?n:0},getShapeOffsetData:function(t){var e=this,n=this,a=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),s=a.map(function(t){var a=this;i(this,e);var s=t.values,o={};n.isStepType(t)&&(s=n.convertValuesToStep(s));var l=s.reduce(function(t,e){i(this,a);var s=+e.x;return t[s]=e,o[s]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:s,rowValueMapByXValue:l,values:o}}.bind(this));return{indexMapByTargetId:a.reduce(function(t,n,a){var r=n.id;return i(this,e),t[r]=a,t}.bind(this),{}),shapeOffsetTargets:s}},getShapeOffset:function(t,e,n){var a=this,r=this,s=r.getShapeOffsetData(t),o=s.shapeOffsetTargets,l=s.indexMapByTargetId,c=r.config.data_groupsZeroAs;return function(t,s){var d=this;i(this,a);var u=t.id,h=t.value,g=t.x,f=r.getIndices(e,t),p=r.getYScaleById(u,n);if(r.isBarRangeType(t))return p(h[0]);var v=+g,x=p("zero"===c?0:r.getShapeYMin(u)),b=x;return o.filter(function(t){return i(this,d),t.id!==u&&f[t.id]===f[u]}.bind(this)).forEach(function(t){i(this,d);var e=t.id,n=t.rowValueMapByXValue,a=t.rowValues,r=t.values;if(l[e]=0&&R(g))(0!==h||("positive"===c&&g>0||"negative"===c&&g<0))&&(b+=p(g)-x)}}.bind(this)),b}.bind(this)},getBarW:function(t,e,n){var a=this,r=this,s=r.config,o=r.org,l=r.scale,c=r.getMaxDataCount(),d="bar"===t&&s.data_groups.length,u=t+"_width",h=l.zoom&&!r.axis.isCategorized()?o.xDomain.map(function(t){return i(this,a),l.zoom(t)}.bind(this)).reduce(function(t,e){return i(this,a),Math.abs(t)+e}.bind(this))/c:e.tickInterval(c),g=function(t){i(this,a);var e=t?s[u][t]:s[u],r=t?e.ratio:s[u+"_ratio"],o=t?e.max:s[u+"_max"],l=R(e)?e:n?h*r/n:0;return o&&l>o?o:l}.bind(this),f=g();return!d&&z(s[u])&&(f={_$width:f,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){i(this,a),s[u][t.id]&&(f[t.id]=g(t.id),f._$total.push(f[t.id]||f._$width))}.bind(this))),f},getShapeByIndex:function(t,e,n){var a=this,r=this.$el,s=S(e)?"-"+e:"",o=r[t];return o=o&&!o.empty()?o.filter(function(t){return i(this,a),!n||t.id===n}.bind(this)).filter(function(t){return i(this,a),!S(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+Gt[t+"s"]+this.getTargetSelectorSuffix(n)):r.main).selectAll("."+Gt[t]+s)},isWithinShape:function(t,e){var i,n=this,r=(0,a.select)(t);return n.isTargetToShow(e.id)?null!=n.hasValidPointType&&n.hasValidPointType(t.nodeName)?i=n.isStepType(e)?n.isWithinStep(t,n.getYScaleById(e.id)(e.value)):n.isWithinCircle(t,n.isBubbleType(e)?1.5*n.pointSelectR(e):0):"path"===t.nodeName&&(i=!r.classed(Gt.bar)||n.isWithinBar(t)):i=!1,i},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:Ue.curveBasis,"basis-closed":Ue.curveBasisClosed,"basis-open":Ue.curveBasisOpen,bundle:Ue.curveBundle,cardinal:Ue.curveCardinal,"cardinal-closed":Ue.curveCardinalClosed,"cardinal-open":Ue.curveCardinalOpen,"catmull-rom":Ue.curveCatmullRom,"catmull-rom-closed":Ue.curveCatmullRomClosed,"catmull-rom-open":Ue.curveCatmullRomOpen,"monotone-x":Ue.curveMonotoneX,"monotone-y":Ue.curveMonotoneY,natural:Ue.curveNatural,"linear-closed":Ue.curveLinearClosed,linear:Ue.curveLinear,step:Ue.curveStep,"step-after":Ue.curveStepAfter,"step-before":Ue.curveStepBefore}[e]},getInterpolateType:function(t){var e=this,i=e.config,n=i.spline_interpolation_type,a=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?a:e.isStepType(t)?i.line_step_type:"linear"},isWithinBar:function(t){var e=H(this.state.event,t),i=Y(t),n=i[0],a=i[1],r=Math.min(n.x,a.x),s=Math.min(n.y,a.y),o=this.config.bar_sensitivity,l=t.getBBox(),c=l.width,d=l.height;return r-o0?i:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){var t=this,e=t.config,i=t.state.hasAxis,n=t.$el,a=i?e.axis_y2_axes.length:0,r=S(e.padding_top)?e.padding_top:0;return n.title&&n.title.node()&&(r+=t.getTitlePadding()),a&&e.axis_rotated&&(r+=t.getHorizontalAxisHeight("y2")*a),r},getCurrentPaddingBottom:function(){var t=this,e=t.config,i=t.state.hasAxis,n=e.axis_rotated?"y":"x",a=i?e["axis_"+n+"_axes"].length:0;return(S(e.padding_bottom)?e.padding_bottom:0)+(a?t.getHorizontalAxisHeight(n)*a:0)},getCurrentPaddingLeft:function(t){var e,i=this,n=i.config,a=i.state.hasAxis,r=n.axis_rotated,s="fit"===(null==(e=n.padding)?void 0:e.mode),o=r?"x":"y",l=a?n["axis_"+o+"_axes"].length:0,c=a?i.getAxisWidthByAxisId(o,t):0;s||(c=P(c));var d=n["axis_"+o+"_inner"]||!n["axis_"+o+"_show"]?0:c;return S(n.padding_left)?d=n.padding_left+(s&&r?c:0):a&&r&&(d=n.axis_x_show?s?c:Math.max(c,40):1),a&&(s||n["axis_"+o+"_inner"])&&n["axis_"+o+"_label"].text&&(d+=i.axis.getAxisLabelPosition("y").isOuter?20:0),d+c*l},getCurrentPaddingRight:function(t){var e,i;void 0===t&&(t=!1);var n=this,a=n.config,r=n.state.hasAxis,s=a.axis_rotated,o="fit"===(null==(e=a.padding)?void 0:e.mode),l=o?2:10,c=n.state.isLegendRight?n.getLegendWidth()+20:0,d=r?a.axis_y2_axes.length:0,u=null!=(i=n.axis)&&i.getAxisLabelPosition("y2").isOuter?20:0,h=t?n.axis.getXAxisTickTextY2Overflow(l):0,g=r&&!a.axis_y2_inner?n.getAxisWidthByAxisId("y2"):1;o||(g=P(g));var f=s?0:Math.max(g+c,h);return S(a.padding_right)?f=a.padding_right+(o&&(s||!a.axis_y2_show?l:f))+(r&&!o?1:0):n.axis&&s?f=l+c:!n.axis||a.axis_y2_show&&!a.axis_y2_inner||(f=Math.max((o&&!a.axis_y2_show?2:1)+c+u,h)),r&&!s&&o&&a.axis_y2_show&&!a.axis_y2_inner&&a.axis_y2_label.text&&(f+=u),f+g*d},getParentRectValue:function(t){for(var e="offset"+Q(t),i=this.$el.chart.node(),n=0;n<30&&i&&"BODY"!==i.tagName;){try{n=i.getBoundingClientRect()[t]}catch(t){e in i&&(n=i[e])}i=i.parentNode}var a=h.body[e];return n>a&&(n=a),n},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,i=e.config,n=e.$el,a=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,r=i.axis_rotated?_t.axisX:_t.axisY,s=n.main.select("."+r).node(),o=s&&a?s.getBoundingClientRect():{right:0},l=n.chart.node().getBoundingClientRect(),c=e.hasArcType(),d=o.right-l.left-(c?0:e.getCurrentPaddingLeft(t));return d>0?d:0},updateDimension:function(t){var e,i=this,n=i.config,a=i.state.hasAxis,r=i.$el;a&&!t&&i.axis.x&&n.axis_rotated&&(null==(e=i.axis.subX)||e.create(r.axis.subX));i.updateScales(t),i.updateSvgSize(),i.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,i=e.clip,n=e.current,a=e.hasAxis,r=e.width,s=e.height,o=t.$el.svg;if(o.attr("width",n.width).attr("height",n.height),a){var l=o.select("."+$t.brush+" .overlay"),c={width:0,height:0};l.size()&&(c.width=+l.attr("width"),c.height=+l.attr("height")),o.selectAll(["#"+i.id,"#"+i.idGrid]).select("rect").attr("width",r).attr("height",s),o.select("#"+i.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),o.select("#"+i.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),i.idSubchart&&o.select("#"+i.idSubchart).select("rect").attr("width",r).attr("height",c.height)}},getCurrentPadding:function(){var t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this,n=this.config,a=R(t),r=a?0:{};return!1===n.padding?a||Object.keys(t).forEach(function(a){i(this,e),r[a]=M(n.data_labels)||!1===n.data_labels||"top"!==a?0:t[a]}.bind(this)):r=t,r},updateSizes:function(t){var e,i=this,n=i.config,a=i.state,r=i.$el.legend,s=n.axis_rotated,o=i.hasArcType()||a.hasTreemap,l="fit"===(null==(e=n.padding)?void 0:e.mode);t||i.setContainerSize();var c={width:r?i.getLegendWidth():0,height:r?i.getLegendHeight():0};!o&&n.axis_x_show&&n.axis_x_tick_autorotate&&i.updateXAxisTickClip();var d=a.isLegendRight||a.isLegendInset?0:c.height,u=s||o?0:i.getHorizontalAxisHeight("x"),h=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?u:30,g=n.subchart_show&&!o?n.subchart_size_height+h:0,f=i.hasType("gauge")&&n.arc_needle_show&&!n.gauge_fullCircle&&!n.gauge_label_show?10:0,p=i.getCurrentPadding();if(a.margin=!o&&s?{top:i.getHorizontalAxisHeight("y2")+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:i.getHorizontalAxisHeight("y")+d+p.bottom,left:g+(o?0:p.left)}:{top:(l?0:4)+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:f+u+g+d+p.bottom,left:o?0:p.left},a.margin=i.getResettedPadding(a.margin),a.margin2=s?{top:a.margin.top,right:NaN,bottom:20+d,left:i.state.rotatedPadding.left}:{top:a.current.height-g-d,right:NaN,bottom:h+d,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},null==i.updateSizeForLegend||i.updateSizeForLegend(c),a.width=a.current.width-a.margin.left-a.margin.right,a.height=a.current.height-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=s?a.margin.left-a.rotatedPadding.left-a.rotatedPadding.right:a.width,a.height2=s?a.height:a.current.height-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),i.hasArcType()){var v=i.hasType("gauge"),x=n.legend_show&&a.isLegendRight;a.arcWidth=a.width-(x?c.width+10:0),a.arcHeight=a.height-(x&&!v?0:10),v&&!n.gauge_fullCircle&&(a.arcHeight+=a.height-i.getPaddingBottomForGauge()),null==i.updateRadius||i.updateRadius()}a.isLegendRight&&o&&(a.margin3.left=a.arcWidth/2+1.1*a.radiusExpanded)}},Ke={setCssRule:function(t,e,n,a){var r=this,s=this,o=s.config,l=s.state,c=l.cssRule,d=l.style;return o.boost_useCssRule?function(o){var l=this;i(this,r),o.each(function(r){var o=this;i(this,l);var u=a&&(null==a?void 0:a.call(s,r)),h=(t?"."+(Mt.shapes+s.getTargetSelectorSuffix(r.id)):"")+e;e in c&&d.sheet.deleteRule(c[h]),s.state.cssRule[h]=function(t,e,n){var a=this,r=t.rootSelctor,s=t.sheet,o=r+" "+function(t){return i(this,a),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return s[s.insertRule?"insertRule":"addRule"](o,s.cssRules.length)}(d,h,n.filter(Boolean).map(function(t){return i(this,o),C(u)&&-1===t.indexOf(":")?t+": "+u:t||""}.bind(this)))}.bind(this))}.bind(this):function(){i(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:k(t)?t.bind(this):t}};function Je(t,e,i,n,a){var r,s=t.value,o=this.isCandlestickType(t),l=R(s)&&s<0||o&&!(null!=(r=this.getCandlestickData(t))&&r._isUp),c=e.x,d=e.y;return n?"start"===i?(c+=l?0:8,d+=4):"middle"===i?(c+=8,d-=8):"end"===i&&(l&&(c-=8),d+=4):("start"===i?(c+=4,l&&(d+=16)):"middle"===i?d-=8:"end"===i&&(c-=4,l&&(d+=16)),a&&(d+=l?-17:o?13:7)),{x:c,y:d}}function Qe(t,e){var i,n=this.config.data_labels_position,a=t.id,r=t.index,s=t.value;return null!=(i=k(n)?n.bind(this.api)(e,s,a,r,this.$el.text):(a in n?n[a]:n)[e])?i:0}var ti={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){var t=this.$el;t.main.select("."+vt.chart).append("g").attr("class",Xt.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this,n=this,a=n.getChartClass("Text"),r=n.getClass("texts","id"),s=n.classFocus.bind(n);n.$el.main.select("."+Xt.chartTexts).selectAll("."+Xt.chartText).data(t).attr("class",function(t){return i(this,e),(""+a(t)+s(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",a).call(n.setCssRule(!0," ."+Xt.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this,e=this,n=e.$el,r=e.$T,s=e.config,o=e.axis,l=e.getClass("text","index"),c=s.data_labels.centered,d=n.main.selectAll("."+Xt.texts).selectAll("."+Xt.text).data(e.labelishData.bind(e));r(d.exit()).style("fill-opacity","0").remove(),n.text=d.enter().append("text").merge(d).attr("class",l).attr("text-anchor",function(n){i(this,t);var a=s["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){var r=e.getCandlestickData(n);a=!(null!=r&&r._isUp)}else if(e.isTreemapType(n))return c?"middle":"start";return s.axis_rotated?a?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,i,n){var r=(0,a.select)(this),s=t.value;if(e.isBubbleZType(t))s=e.getBubbleZData(s,"z");else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(s=o.close)}s=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(s,t.id,i,n),R(s)?this.textContent=s:V(r,s)}))},updateTextColor:function(t){var e,i=this,n=i.config,a=n.data_labels_colors,r=i.isArcType(t)&&!i.isRadarType(t)||i.isTreemapType(t)?null:i.color(t);if(C(a))e=a;else if(F(a)){e=a[(t.data||t).id]}else k(a)&&(e=a.bind(i.api)(r,t));if(i.isCandlestickType(t)&&!k(a)){var s=i.getCandlestickData(t);if(null==s||!s._isUp){var o=n.candlestick_color_down;e=F(o)?o[t.id]:o}}return e||r},updateTextBacgroundColor:function(t){var e=this,i=e.$el,n=e.config.data_labels_backgroundColors,a="";if(C(n)||F(n)){var r=C(n)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=i.defs.select(["filter[id*='labels-bg","']"].join(r));s.size()&&(a="url(#"+s.attr("id")+")")}return a||null},redrawText:function(t,e,i,n){var a=this,r=a.$T,s=a.axis,o=a.config,l=a.state.hasTreemap,c=Z(!0),d=o.axis_rotated,u=o.data_labels.rotate,h=function(t){var e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(u),g=u?"rotate("+u+")":"";return a.$el.text.style("fill",a.getStylePropValue(a.updateTextColor)).attr("filter",a.updateTextBacgroundColor.bind(a)).style("fill-opacity",i?0:a.opacityForText.bind(a)).each((function(i,f){var p=r(l&&this.childElementCount?this.parentNode:this,!(!n||!this.getAttribute("x")),c),v=o["axis_"+(null==s?void 0:s.getId(i.id))+"_inverted"],x={x:t.bind(this)(i,f),y:e.bind(this)(i,f)};u&&(x=Je.bind(a)(i,x,h,d,v),p.attr("text-anchor",h)),this.childElementCount||u?p.attr("transform","translate("+x.x+" "+x.y+") "+g):p.attr("x",x.x).attr("y",x.y)})),!0},getTextRect:function(t,e){var n=this,r=this,s=t.node?t.node():t;/text/i.test(s.tagName)||(s=s.querySelector("text"));var o=s.textContent,l=ge+"-"+o.replace(/\W/g,"_"),c=r.cache.get(l);return c||(r.$el.svg.append("text").style("visibility","hidden").style("font",(0,a.select)(s).style("font")).classed(e,!0).text(o).call(function(t){i(this,n),c=U(t.node())}.bind(this)).remove(),r.cache.add(l,c)),c},generateXYForText:function(t,e){var n=this,a=this,r=a.state,s=r.hasRadar,o=r.hasTreemap,l=Object.keys(t),c={},d=e?a.getXForText:a.getYForText;return s&&l.push("radar"),o&&l.push("treemap"),l.forEach(function(e){i(this,n),c[e]=a["generateGet"+Q(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){var i=(a.isAreaType(t)?"area":a.isBarType(t)&&"bar")||a.isCandlestickType(t)&&"candlestick"||a.isRadarType(t)&&"radar"||a.isTreemapType(t)&&"treemap"||"line";return d.call(a,c[i](t,e),t,this)}},getCenteredTextPos:function(t,e,i,n){var a=this,r=a.config,s=r.axis_rotated,o=a.isBarType(t),l=a.isTreemapType(t);if(r.data_labels.centered&&(o||l)){var c=U(i);if(o){var d=t.value>=0;if(s){var u=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+c.width/2;return d?-u-3:u+2}var h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+c.height/2;return d?h:-h-2}if(l)return"x"===n?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+c.height/2}return 0},getXForText:function(t,e,i){var n,a=this,r=a.config,s=a.state,o=r.axis_rotated,l=a.isTreemapType(e),c=t[0][0];if(a.isCandlestickType(e))o?c=null!=(n=a.getCandlestickData(e))&&n._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(l)c+=r.data_labels.centered?0:5;else if(o){var d=r["axis_"+a.axis.getId(e.id)+"_inverted"],u=a.isBarType(e)?4:6,h=e.value;c=t[2][1],d?c-=u*(h>0?1:-1):c+=u*(h<0?-1:1)}else c=a.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>s.width){var g=U(i).width;c=s.width-g}else c<0&&(c=4);return(o||l)&&(c+=a.getCenteredTextPos(e,t,i,"x")),c+Qe.call(this,e,"x")},getYForText:function(t,e,i){var n,a=this,r=a.axis,s=a.config,o=a.state,l=s.axis_rotated,c=s["axis_"+(null==r?void 0:r.getId(e.id))+"_inverted"],d=a.isBarType(e),u=a.isTreemapType(e),h=s.point_r,g=U(i),f=e.value,p=3;if(a.isCandlestickType(e))f=a.getCandlestickData(e),l?(n=t[0][0],n+=(t[1][0]-n)/2+p):(n=f&&f._isUp?t[2][2]-p:t[2][1]+4*p,c&&(n+=15*(f._isUp?1:-1)));else if(u)n=t[0][1]+(s.data_labels.centered?0:g.height+5);else if(l)n=(t[0][0]+t[2][0]+.6*g.height)/2;else if(n=t[2][1],R(h)&&h>5&&(a.isLineType(e)||a.isScatterType(e))&&(p+=s.point_r/2.3),f<0||0===f&&!o.hasPositiveValue&&o.hasNegativeValue)n+=c?d?-3:-5:g.height+(d?-p:p);else{var v=2*-p;d?v=-p:a.isBubbleType(e)&&(v=p),c&&(v=d?10:15),n+=v}if(null===e.value&&!l){var x=g.height;no.height&&(n=o.height-4)}return l&&!u||(n+=a.getCenteredTextPos(e,t,i,"y")),n+Qe.call(this,e,"y")},markOverlapped:function(t,e,n){var r=this,s=e.$el.arcs.selectAll(n),o=s.filter(function(e){return i(this,r),e.data.id!==t}.bind(this)),l=s.filter(function(e){return i(this,r),e.data.id===t}.bind(this)),c=et(l.node()),d=function(t,e){return i(this,r),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);l.node()&&o.each((function(){var t=et(this),e=(0,a.select)(this),i=d(c.e,c.f)>d(t.e,t.f)?l:e,n=Math.ceil(Math.abs(c.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function ei(t,e){void 0===t&&(t="left");var i=R(e);return t.indexOf("center")>-1?i?e/2:"middle":t.indexOf("right")>-1?i?e:"end":i?0:"start"}var ii={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),V(e.title.append("text").style("text-anchor",ei(t.title_position)).attr("class",Xt.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var t=this,e=t.config,i=t.state.current,n=t.$el.title;if(n){var a=t.yForTitle.call(t);/g/i.test(n.node().tagName)?n.attr("transform","translate("+ei(e.title_position,i.width)+", "+a+")"):n.attr("x",t.xForTitle.call(t)).attr("y",a)}},xForTitle:function(){var t,e=this,i=e.config,n=e.state.current,a=i.title_position||"left",r=e.getTextRect(e.$el.title,Xt.title).width;return/(right|center)/.test(a)?(t=n.width-r,a.indexOf("right")>=0?t=n.width-r-i.title_padding.right:a.indexOf("center")>=0&&(t=(n.width-r)/2)):t=i.title_padding.left||0,t},yForTitle:function(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,Xt.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},ni={initTooltip:function(){var t=this,e=t.config,i=t.$el;i.tooltip=(0,a.select)(e.tooltip_contents.bindto),i.tooltip.empty()&&(i.tooltip=i.chart.append("div").attr("class",Ft.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this,e=this,n=e.config,a=e.$el,r=e.state,s=r.hasAxis,o=r.hasRadar;if(n.tooltip_init_show){var l,c,d=!(s&&o);if(null!=(l=e.axis)&&l.isTimeSeries()&&C(n.tooltip_init_x)){var u,h,g=e.data.targets[0];for(n.tooltip_init_x=dt.call(e,n.tooltip_init_x),u=0;(h=g.values[u])&&h.x-n.tooltip_init_x!=0;u++);n.tooltip_init_x=u}var f=e.data.targets.map(function(a){i(this,t);var r=d?0:n.tooltip_init_x;return e.addName(a.values[r])}.bind(this));d&&(f=[f[n.tooltip_init_x]]),a.tooltip.html(e.getTooltipHTML(f,null==(c=e.axis)?void 0:c.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||a.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){var t=this,e=t.api,i=t.config;return k(i.tooltip_contents)?i.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,a){var r=this,s=this,o=s.api,l=s.config,c=s.state,d=s.$el,u=["title","name","value"].map(function(t){i(this,r);var e=l["tooltip_format_"+t];return k(e)?e.bind(o):e}.bind(this)),h=u[0],g=u[1],f=u[2];h=h||e,g=g||function(t){return i(this,r),t}.bind(this),f=f||(c.hasTreemap||s.isStackNormalized()?function(t,e){return i(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);var p=l.tooltip_order,v=function(t){return i(this,r),s.axis&&s.isBubbleZType(t)?s.getBubbleZData(t.value,"z"):s.getBaseValue(t)}.bind(this),x=s.levelColor?function(t){return i(this,r),s.levelColor(t.value)}.bind(this):function(t){return i(this,r),a(t)}.bind(this),b=l.tooltip_contents,_=b.template,m=s.mapToTargetIds();if(null===p&&l.data_groups.length){var y=s.orderTargets(s.data.targets).map(function(t){return i(this,r),t.id}.bind(this)).reverse();t.sort(function(t,e){i(this,r);var n=t?t.value:null,a=e?e.value:null;return n>0&&a>0&&(n=t.id?y.indexOf(t.id):null,a=e.id?y.indexOf(e.id):null),n-a}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){i(this,r);var n=t?v(t):null,a=e?v(e):null;return"asc"===p?n-a:a-n}.bind(this)):k(p)&&t.sort(p.bind(o));var T,w,A,C,R,L=s.getTooltipContentTemplate(_),O=t.length,P=function(){var e=this;if(!(w=t[R])||!v(w)&&0!==v(w))return"continue";if(E(T)){var n=(c.hasAxis||c.hasRadar)&&j(h?h(w.x):w.x);T=ct(L[0],{CLASS_TOOLTIP:Ft.tooltip,TITLE:S(n)?_?n:''+n+"":""})}if(!w.ratio&&d.arcs&&(A=["arc",s.$el.arcs.select("path."+xt.arc+"-"+w.id).data()[0]],w.ratio=s.getRatio.apply(s,A)),A=[w.ratio,w.id,w.index,t],C=j(f.apply(void 0,[v(w)].concat(A))),s.isAreaRangeType(w)){var a=["high","low"].map(function(t){return i(this,e),j(f.apply(void 0,[s.getRangedData(w,t)].concat(A)))}.bind(this)),r=a[0],o=a[1];C="Mid: "+C+" High: "+r+" Low: "+o}else if(s.isCandlestickType(w)){var l=["open","high","low","close","volume"].map(function(t){return i(this,e),j(f.apply(void 0,[s.getRangedData(w,t,"candlestick")].concat(A)))}.bind(this)),u=l[0],p=l[1],y=l[2],k=l[3],O=l[4];C="Open: "+u+" High: "+p+" Low: "+y+" Close: "+k+(O?" Volume: "+O:"")}else if(s.isBarRangeType(w)){var P=w.value,I=P[0],D=P[1];C=f(I)+" ~ "+f(D)}if(void 0!==C){if(null===w.name)return"continue";var z=j(g.apply(void 0,[w.name].concat(A))),M=x(w),$={CLASS_TOOLTIP_NAME:Ft.tooltipName+s.getTargetSelectorSuffix(w.id),COLOR:_||!s.patterns?M:'',NAME:z,VALUE:C};if(_&&F(b.text)){var X=m.indexOf(w.id);Object.keys(b.text).forEach(function(t){i(this,e),$[t]=b.text[t][X]}.bind(this))}T+=ct(L[1],$)}};for(R=0;R"},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this,a=this,r=a.config,s=a.scale,o=a.state,l=a.$el,c=l.eventRect,d=l.tooltip,u=r.tooltip_contents.bindto,h=d.datum();if(!u&&h){var g,f,p=H(o.event,null!=e?e:null==c?void 0:c.node()),v={x:p[0],y:p[1]};s.x&&h&&"x"in h&&(v.xAxis=s.x(h.x));var x=h.width,b=void 0===x?0:x,_=h.height,m=void 0===_?0:_,y=null!=(g=null==(f=r.tooltip_position)?void 0:f.bind(a.api)(null!=t?t:JSON.parse(h.current),b,m,null==c?void 0:c.node(),v))?g:a.getTooltipPosition.bind(a)(b,m,v);["top","left"].forEach(function(t){i(this,n);var e=y[t];d.style(t,e+"px"),"left"!==t||h.xPosInPercent||(h.xPosInPercent=e/o.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var a=this,r=this,s=r.config,o=r.scale,l=r.state,c=l,d=c.width,u=c.height,h=c.current,g=c.isLegendRight,f=c.inputType,p=r.hasType("gauge")&&!s.gauge_fullCircle,v=l.hasTreemap,x=s.axis_rotated,b=r.getSvgLeft(!0),_=b+h.width-r.getCurrentPaddingRight(),m=r.getCurrentPaddingLeft(!0),y=n.x,T=n.y;r.hasArcType()?"touch"===f||r.hasType("radar")||(T+=p?u:u/2,y+=(d-(g?r.getLegendWidth():0))/2):v||(x?(T=n.xAxis+20,y+=b,_-=b):(T-=5,y=b+m+20+(o.zoom?y:n.xAxis)));(y+t+15>_&&(y-=x?t-m:t+(v?0:m)),T+e>h.height)&&(T-=p?3*e:e+(v?0:30));var w={top:T,left:y};return Object.keys(w).forEach(function(t){i(this,a),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this,a=this,r=a.config,s=a.$el.tooltip,o=t.filter(function(t){return i(this,n),t&&S(a.getBaseValue(t))}.bind(this));if(s&&0!==o.length&&r.tooltip_show){var l=s.datum(),c=JSON.stringify(t);if(!l||l.current!==c){var d=t.concat().sort()[0],u=d.index,h=d.x;N(r.tooltip_onshow,a.api,t),s.html(a.getTooltipHTML(t,a.axis?a.axis.getXAxisTickFormat():a.categoryName.bind(a),a.getDefaultValueFormat(),a.color)).style("display",null).style("visibility",null).datum(l={index:u,x:h,current:c,width:s.property("offsetWidth"),height:s.property("offsetHeight")}),N(r.tooltip_onshown,a.api,t),a._handleLinkedCharts(!0,u)}a.setTooltipPosition(o,e)}},bindTooltipResizePos:function(){var t=this,e=this,n=e.resizeFunction,a=e.state,r=e.$el.tooltip;n.add(function(){if(i(this,t),"block"===r.style("display")){var e=a.current,n=r.datum(),s=n.width,o=n.xPosInPercent,l=e.width/100*o,c=e.width-(l+s);c<0&&(l+=c),r.style("left",l+"px")}}.bind(this))},hideTooltip:function(t){var e=this,i=e.api,n=e.config,a=e.$el.tooltip;if(a&&"none"!==a.style("display")&&(!n.tooltip_doNotHide||t)){var r=JSON.parse(a.datum().current);N(n.tooltip_onhide,i,r),a.style("display","none").style("visibility","hidden").datum(null),N(n.tooltip_onhidden,i,r)}},_handleLinkedCharts:function(t,e){var n=this,a=this,r=a.charts,s=a.config,o=a.state.event;if(null!=o&&o.isTrusted&&s.tooltip_linked&&r.length>1){var l=s.tooltip_linked_name;r.filter(function(t){return i(this,n),t!==a.api}.bind(this)).forEach(function(a){i(this,n);var r=a.internal,s=r.config,o=r.$el,c=s.tooltip_linked,d=s.tooltip_linked_name,u=h.body.contains(o.chart.node());if(c&&l===d&&u){var g=o.tooltip.data()[0],f=e!==(null==g?void 0:g.index);try{a.tooltip[t&&f?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this,r=this,s=r.config,o=r.$el,l=o.eventRect,c=o.svg,d=o.tooltip,u=r.state,g=u.event,f=u.hasAxis,p=u.hasRadar,v=u.hasTreemap;if("block"===(null==d?void 0:d.style("display"))&&g){var x,b=null!=t?t:null==(x=p?c:l)?void 0:x.node();if(f||p)if(r.isMultipleX())r.selectRectForMultipleXs(b,!1);else{var _=null!=e?e:r.getDataIndexFromEvent(g);-1===e?r.api.tooltip.hide():(r.selectRectForSingle(b,_),r.setExpand(_,null,!0))}else{var m=g.clientX,y=g.clientY;setTimeout(function(){i(this,n);var t=h.elementFromPoint(m,y),e=(0,a.select)(t).datum();if(e){var s=r.hasArcType()?r.convertToArcData(r.updateAngle(e)):null==e?void 0:e.data;v&&(t=c.node()),s&&r.showTooltip([s],t)}else r.api.tooltip.hide()}.bind(this),s.transition_duration)}}}},ai={getTranslate:function(t,e){void 0===e&&(e=0);var i,n,a=this,r=a.config,s=a.state,o=r.axis_rotated,l=0;if(e&&/^(x|y2?)$/.test(t)&&(l=a.getAxisSize(t)*e),"main"===t)i=I(s.margin.left),n=I(s.margin.top);else if("context"===t)i=I(s.margin2.left),n=I(s.margin2.top);else if("legend"===t)i=s.margin3.left,n=s.margin3.top;else if("x"===t)i=o?-l:0,n=o?0:s.height+l;else if("y"===t)i=o?0:-l,n=o?s.height+l:0;else if("y2"===t)i=o?0:s.width+l,n=o&&l?1-l:0;else if("subX"===t)i=0,n=o?0:s.height2;else if("arc"===t)i=s.arcWidth/2,n=s.arcHeight/2;else if("polar"===t)i=s.arcWidth/2,n=s.arcHeight/2;else if("radar"===t){var c=a.getRadarSize()[0];i=s.width/2-c,n=I(s.margin.top)}return"translate("+i+", "+n+")"},transformMain:function(t,e){var i=this,n=i.$el.main,a=i.$T,r=null!=e&&e.axisX?e.axisX:a(n.select("."+_t.axisX),t),s=null!=e&&e.axisY?e.axisY:a(n.select("."+_t.axisY),t),o=null!=e&&e.axisY2?e.axisY2:a(n.select("."+_t.axisY2),t);a(n,t).attr("transform",i.getTranslate("main")),r.attr("transform",i.getTranslate("x")),s.attr("transform",i.getTranslate("y")),o.attr("transform",i.getTranslate("y2")),n.select("."+xt.chartArcs).attr("transform",i.getTranslate("arc"))},transformAll:function(t,e){var i=this,n=i.config,a=i.state,r=a.hasAxis,s=a.hasTreemap,o=i.$el;s||i.transformMain(t,e),r&&n.subchart_show&&i.transformContext(t,e),o.legend&&i.transformLegend(t)}},ri={isValidChartType:function(t){return!!(t&&Object.values(g).indexOf(t)>-1)},setTargetType:function(t,e){var n=this,a=this,r=a.config,s=a.state.withoutFadeIn;a.mapToTargetIds(t).forEach(function(t){i(this,n),s[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this,e=this,n=e.state.current;Object.keys(g).forEach(function(a){i(this,t);var r=g[a],s=e.hasType(r,null,!0),o=n.types.indexOf(r);-1===o&&s?n.types.push(r):o>-1&&!s&&n.types.splice(o,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var a,r=this;void 0===n&&(n=!1);var s=this,o=s.config,l=s.state.current,c=o.data_types,d=e||s.data.targets,u=!1;return!n&&(null==(a=l.types)?void 0:a.indexOf(t))>-1?u=!0:null!=d&&d.length?d.forEach(function(e){i(this,r);var n=c[e.id];(n===t||!n&&"line"===t)&&(u=!0)}.bind(this)):Object.keys(c).length?Object.keys(c).forEach(function(e){i(this,r),c[e]===t&&(u=!0)}.bind(this)):u=o.data_type===t,u},hasTypeOf:function(t,e,n){var a=this;return void 0===n&&(n=[]),t in x&&!x[t].filter(function(t){return i(this,a),-1===n.indexOf(t)}.bind(this)).every(function(t){return i(this,a),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){var i=C(t)?t:t.id,n=this.config.data_types[i]||this.config.data_type;return X(e)?e.indexOf(n)>=0:n===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=C(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,x.Line)},isStepType:function(t){return this.isTypeOf(t,x.Step)},isSplineType:function(t){return this.isTypeOf(t,x.Spline)},isAreaType:function(t){return this.isTypeOf(t,x.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,x.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,i=e.point_pattern;return"circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!i||X(i)&&0===i.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return i(this,e),R(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}},si=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var e=this;e.api=t,e.config=new ne,e.cache=new fe;var i=new Vt;e.$el=i.getStore("element"),e.state=i.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,i){var n=this.config,r=this.state,s=n.transition_duration,o=n.subchart_show,l=t;l&&("tagName"in l&&(l=(0,a.select)(l)),l=(!1!==e&&s||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!o?l.transition(i).duration(s):l);return l},e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),N(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),N(t.config.onafterinit,t.api)},e.init=function(){var t=this,e=t.config,i=t.state,n=t.$el,r=e.boost_useCssRule;if(gt(t),i.hasRadar=!i.hasAxis&&t.hasType("radar"),i.hasTreemap=!i.hasAxis&&t.hasType("treemap"),i.hasAxis=!t.hasArcType()&&!i.hasTreemap,i.datetimeId="bb-"+ +new Date*Z(),r){var s=h.createElement("style");s.type="text/css",h.head.appendChild(s),i.style={rootSelctor:"."+i.datetimeId,sheet:s.sheet},n.style=s}var o={element:e.bindto,classname:"bb"};F(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),n.chart=k(o.element.node)?e.bindto.element:(0,a.select)(o.element||[]),n.chart.empty()&&(n.chart=(0,a.select)(h.body.appendChild(h.createElement("div")))),n.chart.html("").classed(o.classname,!0).classed(i.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this,n=this,a=n.config,r=n.state,o=n.$el.chart,l=function(){return i(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),c=a.render.lazy||l(),d=s.MutationObserver;c&&d&&!1!==a.render.observe&&!t&&new d(function(t,a){i(this,e),l()||(a.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),c&&!t||n.convertData(a,function(t){i(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this,e=this,a=e.config,r=e.format,o=e.state,l=a.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===a.padding&&(a.axis_x_show=!1,a.axis_y_show=!1,a.axis_y2_show=!1,a.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),o.hasAxis){e.initClip(),r.extraLineClasses=e.generateExtraLineClass(),r.dataTime=a.data_xLocaltime?n.timeParse:n.utcParse,r.axisTime=a.axis_x_localtime?n.timeFormat:n.utcFormat;var c=e.config.zoom_enabled&&"drag"===e.config.zoom_type;r.defaultAxisTime=function(n){i(this,t);var a=e.scale,s=a.x,o=a.zoom,l=c?o:o&&s.orgDomain().toString()!==o.domain().toString(),d=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||l&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return r.axisTime(d)(n)}.bind(this)}o.isLegendRight="right"===a.legend_position,o.isLegendInset="inset"===a.legend_position,o.isLegendTop="top-left"===a.legend_inset_anchor||"top-right"===a.legend_inset_anchor,o.isLegendLeft="top-left"===a.legend_inset_anchor||"bottom-left"===a.legend_inset_anchor,o.rotatedPadding.top=e.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=l&&!a.axis_x_show?0:30,o.inputType=function(t,e){var n=this,a=s.DocumentTouch,r=s.matchMedia,o=s.navigator,l=!1;if(e)if(o&&"maxTouchPoints"in o)l=o.maxTouchPoints>0;else if("ontouchmove"in s||a&&h instanceof a)l=!0;else if(null!=r&&r("(pointer:coarse)").matches)l=!0;else{var c=o.userAgent;l=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return i(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":l&&"touch")||"mouse"}(a.interaction_inputType_mouse,a.interaction_inputType_touch)},e.initWithData=function(t){var e=this,n=this,a=n.config,r=n.scale,s=n.state,o=n.$el,l=n.org,c=s,d=c.hasAxis,u=c.hasTreemap,h=a.interaction_enabled,g=n.hasType("polar");if(d&&(n.axis=n.getAxisInstance(),a.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),a.data_filter&&(n.data.targets=n.data.targets.filter(a.data_filter.bind(n.api))),a.data_hide&&n.addHiddenTargetIds(!0===a.data_hide?n.mapToIds(n.data.targets):a.data_hide),a.legend_hide&&n.addHiddenLegendIds(!0===a.legend_hide?n.mapToIds(n.data.targets):a.legend_hide),n.updateSizes(),n.updateScales(!0),d){var f=r.x,p=r.y,v=r.y2,x=r.subX,b=r.subY,_=r.subY2;f&&(f.domain(rt(n.getXDomain(n.data.targets),!a.axis_x_inverted)),x.domain(f.domain()),l.xDomain=f.domain()),p&&(p.domain(n.getYDomain(n.data.targets,"y")),b.domain(p.domain())),v&&(v.domain(n.getYDomain(n.data.targets,"y2")),_&&_.domain(v.domain()))}if(o.svg=o.chart.append("svg").style("overflow","hidden").style("display","block"),h&&s.inputType){var m="touch"===s.inputType,y=a.onclick,T=a.onover,w=a.onout;o.svg.on("click",(null==y?void 0:y.bind(n.api))||null).on(m?"touchstart":"mouseenter",(null==T?void 0:T.bind(n.api))||null).on(m?"touchend":"mouseleave",(null==w?void 0:w.bind(n.api))||null)}a.svg_classname&&o.svg.attr("class",a.svg_classname);var A=k(a.color_tiles)&&n.patterns;(d||A||g||u||a.data_labels_backgroundColors)&&(o.defs=o.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){i(this,e),n.appendClip(o.defs,s.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),A&&n.patterns.forEach(function(t){var n=this;return i(this,e),o.defs.append(function(){return i(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();var S,C=o.svg.append("g").classed(vt.main,!0).attr("transform",u?null:n.getTranslate("main"));(o.main=C,a.subchart_show&&n.initSubchart(),a.tooltip_show&&n.initTooltip(),a.title_text&&n.initTitle(),!u&&a.legend_show&&n.initLegend(),a.data_empty_label_text&&C.append("text").attr("class",Xt.text+" "+vt.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(a.regions.length&&n.initRegion(),a.clipPath||n.axis.init()),C.append("g").classed(vt.chart,!0).attr("clip-path",d?s.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),d)&&(h&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),a.clipPath&&(null==(S=n.axis)||S.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),N(a.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),a.data_onmin||a.data_onmax){var R=n.getMinMaxData();N(a.data_onmin,n.api,R.min),N(a.data_onmax,n.api,R.max)}a.tooltip_show&&n.initShowTooltip(),s.rendered=!0},e.initChartElements=function(){var t=this,e=this,n=e.state,a=n.hasAxis,r=n.hasRadar,s=n.hasTreemap,o=[];if(a){var l=["bar","bubble","candlestick","line"];e.config.bar_front&&l.push(l.shift()),l.forEach(function(n){i(this,t);var a=Q(n);("line"===n&&e.hasTypeOf(a)||e.hasType(n))&&o.push(a)}.bind(this))}else if(s)o.push("Treemap");else{var c=e.hasType("polar");r||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):r?o.push("Radar"):c&&o.push("Polar")}o.forEach(function(n){i(this,t),e["init"+n]()}.bind(this)),$(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){var t=this.$el,e=t.chart,i=t.svg,n=t.defs,a=t.main,r=t.tooltip,s=t.legend,o=t.title,l=t.grid,c=t.needle,d=t.arcs,u=t.circle,h=t.bar,g=t.candlestick,f=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:i,defs:n,main:a,tooltip:r,legend:s,title:o,grid:l,arc:d,circles:u,bar:{bars:h},candlestick:g,line:{lines:f,areas:p},needle:c,text:{texts:v}}},e.setBackground=function(){var t=this,e=t.config.background,i=t.state,n=t.$el.svg;if($(e)){var a=n.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?a.attr("href",e.imgUrl):e.color&&a.style("fill",e.color).attr("clip-path",i.clip.path),a.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this,n=this,a=n.state,r=a.hasAxis,s=a.hasRadar,o=a.hasTreemap,l=function(a){return i(this,e),n["updateTargetsFor"+a](t.filter(n["is"+a+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){i(this,e);var a=Q(t);("line"===t&&n.hasTypeOf(a)||n.hasType(t))&&l(a)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){var c="Arc";s?c="Radar":n.hasType("polar")&&(c="Polar"),l(c)}else o&&l("Treemap");var d=n.hasType("bubble")||n.hasType("scatter");d&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(d)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.$el.svg,r=n.$T,s="."+vt.target;t&&(s+=", ."+Tt.chartCircles+" > ."+Tt.circles),r(a.selectAll(s).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this,n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(a){i(this,e);var r=n[a];C(r)&&(r=n[r]),n[a]=B(t,"with"+a,r)}.bind(this)),n},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this,e=this,n=e.config,a=e.state,r=function(t){var e,n=this,a=[],r=function(){var n=this;r.clear(),!1===t?u(function(){var t=this;i(this,n),a.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),{timeout:200}):e=pe(function(){var t=this;i(this,n),a.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),R(t)?t:200)};return r.clear=function(){i(this,n),e&&(ve(e),e=null)}.bind(this),r.add=function(t){return i(this,n),a.push(t)}.bind(this),r.remove=function(t){return i(this,n),a.splice(a.indexOf(t),1)}.bind(this),r}(n.resize_timer),o=[];o.push(function(){return i(this,t),N(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){i(this,t),a.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){i(this,t),N(n.onresized,e.api),a.resizing=!1}.bind(this)),o.forEach(function(e){return i(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,s.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,a=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+v+"\n\t\t\t\t"+f.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t").replace("/\n/g","%0A");return"data:image/svg+xml;base64,"+ui(x)}function gi(t){var e=this,n=t.getBoundingClientRect(),a=n.left,r=n.top,o=function(t){return i(this,e),t.textContent||t.childElementCount}.bind(this),l=[];return tt(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;i(this,e);var c=function(t){var e;i(this,n);var o=s.getComputedStyle(t),l=o.fill,c=o.fontFamily,d=o.fontSize,u=o.textAnchor,h=o.transform,g=function(t,e){var i=e.top,n=e.left,a=t.getBBox(),r=a.x,s=a.y,o=t.getScreenCTM(),l=o.a,c=o.b,d=o.c,u=o.d,h=o.e,g=o.f,f=t.getBoundingClientRect(),p=f.width,v=f.height;return{x:l*r+d*s+h-n,y:c*r+u*s+g-i+(v-Math.round(v/4)),width:p,height:v}}(t,{left:a,top:r}),f=g.x,p=g.y,v=g.width,x=g.height;return(e={})[t.textContent]={x:f,y:p,width:v,height:x,fill:l,fontFamily:c,fontSize:d,textAnchor:u,transform:h},e}.bind(this);if(t.childElementCount>1)return tt(t.querySelectorAll("tspan")).filter(o).forEach(function(t){i(this,n),l.push(c(t))}.bind(this)),[];l.push(c(t))}.bind(this)),l}var fi={export:function(t,e){var n=this,a=this.internal,r=a.state,s=a.$el,o=s.chart,l=s.svg,c=r.current,d=c.width,u=c.height,g=at({width:d,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),f=hi(o.node(),g,{width:d,height:u}),p=g.preserveFontStyle?gi(l.node()):[];if(e&&k(e)){var v=new Image;v.crossOrigin="Anonymous",v.onload=function(){i(this,n);var t=h.createElement("canvas"),a=t.getContext("2d");t.width=g.width||d,t.height=g.height||u,a.drawImage(v,0,0),p.length&&(!function(t,e){var n=this;e.forEach(function(e){var a=this;i(this,n),Object.keys(e).forEach(function(n){var r=this;i(this,a);var s=e[n],o=s.x,l=s.y,c=s.width,d=s.height,u=s.fill,h=s.fontFamily,g=s.fontSize,f=s.transform;if(t.save(),t.font=g+" "+h,t.fillStyle=u,"none"===f)t.fillText(n,o,l);else{var p=f.replace(/(matrix|\(|\))/g,"").split(",");p.splice(4).every(function(t){return i(this,r),0==+t}.bind(this))?(p.push(o+c-c/4),p.push(l-d+d/3)):(p.push(o),p.push(l)),t.transform.apply(t,p),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(a,p),p.length=0),e.bind(this)(t.toDataURL(g.mimeType))}.bind(this),v.src=f}return f}},pi={focus:function(t){var e=this,n=this.internal,a=n.state,r=n.mapToTargetIds(t),s=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(Et.focused,!0).classed(Et.defocused,!1),n.hasArcType()&&!a.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+St.gaugeValue)),n.toggleFocusLegend(r,!0),a.focusedTargetIds=r,a.defocusedTargetIds=a.defocusedTargetIds.filter(function(t){return i(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this,n=this.internal,a=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Et.focused,!1).classed(Et.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+St.gaugeValue)),n.toggleFocusLegend(r,!1),a.focusedTargetIds=a.focusedTargetIds.filter(function(t){return i(this,e),r.indexOf(t)<0}.bind(this)),a.defocusedTargetIds=r},revert:function(t){var e=this.internal,i=e.config,n=e.state,r=e.$el,s=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(s)).classed(Et.focused,!1).classed(Et.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(s),i.legend_show&&(e.showLegend(s.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(s)).filter((function(){return(0,a.select)(this).classed(Et.legendItemFocused)})).classed(Et.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]}},vi={legend:{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},xi={load:function(t){var e=this,n=this.internal,a=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){i(this,e),a.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(a.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){i(this,e),a.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){i(this,e),a.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var a=this;i(this,e),u(function(){return i(this,a),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,a=t||{};M(a)&&this.tooltip.hide(),X(a)?a={ids:a}:C(a)&&(a={ids:[a]});var r=n.mapToTargetIds(a.ids);n.unload(r,function(){i(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),Le.call(n,a.done,a.resizeAfter)}.bind(this))}};function bi(t,e,n){var a=this,r=this.internal,s=r.mapToTargetIds(e),o=r.state.hiddenTargetIds.map(function(t){return i(this,a),s.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](s);var l=r.$el.svg.selectAll(r.selectorTargets(s)),c=t?null:"0";t&&o.length&&(l.style("display",null),N(r.config.data_onshown,this,o)),r.$T(l).style("opacity",c,"important").call(G,function(){i(this,a),t||0!==o.length||(l.style("display","none"),N(r.config.data_onhidden,this,s)),l.style("opacity",c)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](s),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var _i={show:function(t,e){void 0===e&&(e={}),bi.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),bi.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});var a=this.internal,r={show:[],hide:[]};a.mapToTargetIds(t).forEach(function(t){return i(this,n),r[a.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return i(this,n),this.hide(r.hide,e)}.bind(this),0)}},mi={show:function(t){var e,n,a=this,r=this.internal,s=r.$el,o=r.config,l=r.state,c=l.eventReceiver,d=l.hasTreemap,u=l.inputType;if(t.mouse&&(n=t.mouse),t.data){var h,g=t.data,f=null==(h=r.getYScaleById(g.id))?void 0:h(g.value);if(d&&g.id)c.rect=s.main.select(""+r.selectorTarget(g.id,void 0,"rect"));else if(r.isMultipleX())n=[r.xx(g),f];else{var p,v;o.tooltip_grouped||(n=[0,f]),e=null!=(p=g.index)?p:r.hasArcType()&&g.id?null==(v=r.getArcElementByIdOrIndex(g.id))?void 0:v.datum().index:r.getIndexByX(g.x)}}else L(t.x)?e=r.getIndexByX(t.x):L(t.index)&&(e=t.index);("mouse"===u?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){i(this,a),r.dispatchEvent(t,e,n)}.bind(this))},hide:function(){var t=this,e=this.internal,n=e.state.inputType,a=e.$el.tooltip,r=null==a?void 0:a.datum();if(r){var s=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){i(this,t),e.dispatchEvent(n,s)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}},yi={tooltip:mi},Ti=function t(e){this.plugins=[],this.internal=void 0;var n=new si(this);this.internal=n,function t(e,n,a){var r=this;Object.keys(e).forEach(function(s){i(this,r);var o=k(e[s]),l=n!==a,c=$(e[s]),d=c&&Object.keys(e[s]).length>0;n[s]=o&&(!l&&d||l)?e[s].bind(a):c&&!o?{}:e[s],d&&t(e[s],n[s],a)}.bind(this))}(t.prototype,this,this),oi.call(n,e),n.beforeInit(),n.init()};function wi(t,e,n){var a=this,r=t.config,s=function(t,n){i(this,a);var s=R(n)?n:!1===n?void 0:null;null!==s&&(r["axis_"+t+"_"+e]=s)}.bind(this);L(n)&&(z(n)?Object.keys(n).forEach(function(t){i(this,a),s(t,n[t])}.bind(this)):(R(n)||!1===n)&&["y","y2"].forEach(function(t){i(this,a),s(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Ai(t,e){var i=t.config;return{x:i["axis_x_"+e],y:i["axis_y_"+e],y2:i["axis_y2_"+e]}}J(Ti.prototype,[li,{color:function(t){return this.internal.color(t)}},di,fi,pi,vi,xi,_i,yi]);var Si={labels:function(t){var e,n=this,a=this.internal;return t&&(Object.keys(t).forEach(function(e){i(this,n),a.axis.setLabelText(e,t[e])}.bind(this)),a.axis.updateLabels()),["x","y","y2"].forEach(function(t){i(this,n);var r=a.axis.getLabelText(t);r&&(e||(e={}),e[t]=r)}.bind(this)),e},min:function(t){var e=this.internal;return S(t)||!1===t?wi(e,"min",t):Ai(e,"min")},max:function(t){var e=this.internal;return S(t)||!1===t?wi(e,"max",t):Ai(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};var i=t.min,n=t.max;L(n)&&e.max(n),L(i)&&e.min(i)}},ki={axis:Si};function Ci(t,e){var i=this.internal,n=i.config,a=n.transition_duration&&ut(),r="grid_"+e+"_lines";return t?(n[r]=t,i.updateGrid(),i.redrawGrid(a),n[r]):n[r]}function Ri(t,e){return Ci.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function Ei(t,e){this.internal.removeGridLines(t,e)}var Li=function(t){return Ci.bind(this)(t,"x")};J(Li,{add:function(t){return Ri.bind(this)(t,"x")},remove:function(t){return Ei.bind(this)(t,!0)}});var Oi=function(t){return Ci.bind(this)(t,"y")};J(Oi,{add:function(t){return Ri.bind(this)(t,"y")},remove:function(t){return Ei.bind(this)(t,!1)}});var Pi={xgrids:Li,ygrids:Oi},Ii={groups:function(t){var e=this.internal,i=e.config;return E(t)||(i.data_groups=t,e.redraw()),i.data_groups}};function Di(t,e){void 0===e&&(e=!1);var i=this.internal,n=i.config,a=n.transition_duration&&ut();return t?(n.regions=e?n.regions.concat(t):t,i.updateRegion(),i.redrawRegion(a),e?n.regions:t):n.regions}var zi=function(t){return Di.bind(this)(t)};J(zi,{add:function(t){return Di.bind(this)(t,!0)},remove:function(t){var e=this,n=this.internal,a=n.config,r=n.$T,s=t||{},o=B(s,"classes",[Dt.region]),l=n.$el.main.select("."+Dt.regions).selectAll(o.map(function(t){return i(this,e),"."+t}.bind(this)));return r(l).style("opacity","0").remove(),l=a.regions,Object.keys(s).length?(l=l.filter(function(t){var n=this;i(this,e);var a=!1;return!t.class||(t.class.split(" ").forEach(function(t){i(this,n),o.indexOf(t)>=0&&(a=!0)}.bind(this)),!a)}.bind(this)),a.regions=l):a.regions=[],l}});var Mi={regions:zi},$i={x:function(t){var e=this.internal,i=e.axis,n=e.data,a=i.isCustomX()&&i.isCategorized();return X(t)&&(a?this.categories(t):(e.updateTargetX(n.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),a?this.categories():n.xs},xs:function(t){var e=this.internal;return F(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},Xi={flow:function(t){var e,n=this,a=this.internal;(t.json||t.rows||t.columns)&&a.convertData(t,function(r){i(this,n),e=r,function(){var n,r,s,o=this,l=0,c=0;if(a.state.redrawing||!e||!ut())return;var d=[],u=a.getMaxDataCount(),h=a.convertDataToTargets(e,!0),g=a.axis.isTimeSeries();a.data.targets.forEach(function(t){i(this,o);for(var e=!1,n=0;n1?f.values[f.values.length-1].x-p.x:p.x-a.getXDomain(a.data.targets)[0]:1,n=[p.x-r,p.x]);n&&a.updateXDomain(null,!0,!0,!1,n),a.updateTargets(a.data.targets),a.redraw({flow:{index:p.index,length:l,duration:S(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}},Fi=p(10),Bi=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=He(),i=t.config,n=t.params;this.owner=t,this.config=i,this.scale=e,!i.noTransition&&n.config.transition_duration||(i.withoutTransition=!0),i.range=this.scaleExtent((n.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this,n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){i(this,e);try{var a=t.node().getBBox(),r=a.width,s=a.height;r&&s&&(n.w=r,n.h=s)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return i(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this,n=this.config,a="x"===t?function(t){return i(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return i(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;i(this,e),t.attr("transform",function(t){return i(this,r),S(t)?a(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){var e=t[0],i=t[t.length-1];return e0?s:1,o]).range(t.range());l=u.ticks();for(var h=o.toFixed().length;l.length>15;h--)l=u.ticks(h);l.splice(0,1,s),l.splice(l.length-1,1,o)}l=l.map(function(t){return i(this,n),C(t)&&R(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(var g=Math.ceil(s);g0&&l[0]>0&&l.unshift(l[0]-(l[1]-l[0]))}return l},e.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){var e=this.config.tickFormat,i=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,n=e?e(i):i;return L(n)?n:""},e.transitionise=function(t){var e=this.config,i=t;if(e.withoutTransition)i=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{i=t.transition(e.transition)}catch(t){}return i},t}(),Ni=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new Bi(this)}var e=t.prototype;return e.create=function(t){var e=this,n=e.config,r=e.helper,s=e.params,o=r.scale,l=n.orient,c=this.splitTickText.bind(e),d=/^(left|right)$/.test(l),u=/^(top|bottom)$/.test(l),h=r.getTickTransformSetter(u?"x":"y"),g=h===r.axisX?"y":"x",f=/^(top|left)$/.test(l)?-1:1,p=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():r.scaleExtent((s.orgXScale||o).range());var v,x=n.innerTickSize,b=n.tickLength,_=n.range,m=s.id,y=m&&/^(x|y|y2)$/.test(m)?s.config["axis_"+m+"_tick_text_position"]:{x:0,y:0},T="subX"===m?"subchart_axis_x":"axis_"+m,w=s.config[T+"_show"],A=!!w&&s.config[T+"_tick_show"],S=!!w&&s.config[T+"_tick_text_show"];t.each((function(){var t=this,m=(0,a.select)(this),T=this.__chart__||o,w=r.copyScale();v=m,this.__chart__=w,n.tickOffset=s.isCategory?Math.ceil((w(1)-w(0))/2):0;var k=m.selectAll(".domain").data([0]);if(k.enter().append("path").attr("class","domain").merge(k).attr("d",function(){i(this,t);var e=n.outerTickSize*f;return u?"M"+_[0]+","+e+"V0H"+_[1]+"V"+e:"M"+e+","+_[0]+"H0V"+_[1]+"H"+e}.bind(this)),A||S){var C=n.tickValues||r.generateTicks(w,d);e.generatedTicks=C;var E=m.selectAll(".tick").data(C,w),L=E.enter().insert("g",".domain").attr("class","tick"),O=E.exit().remove();E=L.merge(E),A&&L.append("line"),S&&L.append("text");var P=Bi.getSizeFor1Char(E),I=[],D=E.select("text").selectAll("tspan").data(function(e,n){var a=this;i(this,t);var o=s.tickMultiline?c(e,w,C,d,P.w):X(r.textFormatted(e))?r.textFormatted(e).concat():[r.textFormatted(e)];return I[n]=o.length,o.map(function(t){return i(this,a),{index:n,splitted:t}}.bind(this))}.bind(this));D.exit().remove(),(D=D.enter().append("tspan").merge(D).text(function(e){return i(this,t),e.splitted}.bind(this))).attr("x",u?0:b*f).attr("dx",function(){i(this,t);var e=0;return/(top|bottom)/.test(l)&&p&&(e=8*Math.sin(Math.PI*(p/180))*("top"===l?-1:1)),e+(y.x||0)}.bind(this)()).attr("dy",function(e,n){i(this,t);var a=0;return"top"!==l&&(a=P.h,0===n&&(a=d?-((I[e.index]-1)*(P.h/2)-3):0===y.y?".71em":0)),R(a)&&y.y?a+y.y:a||".71em"}.bind(this));var z=E.select("line"),M=E.select("text");if(L.select("line").attr(g+"2",x*f),L.select("text").attr(g,b*f),e.setTickLineTextPosition(z,M),s.tickTitle){var $=M.select("title");($.empty()?M.append("title"):$).text(function(e){return i(this,t),s.tickTitle[e]}.bind(this))}if(w.bandwidth){var F=w,B=F.bandwidth()/2;T=function(e){return i(this,t),F(e)+B}.bind(this),w=T}else T.bandwidth?T=w:h(O,w);E=s.owner.state.flowing?r.transitionise(E):s.owner.$T(E),h(L,T),h(E.style("opacity",null),w)}})),this.g=v},e.getGeneratedTicks=function(t){var e,n=this,a=(null==(e=this.generatedTicks)?void 0:e.length)-1,r=this.generatedTicks;if(a>t){var s=Math.round(a/t+.1);r=this.generatedTicks.map(function(t,e){return i(this,n),e%s==0?t:null}.bind(this)).filter(function(t){return i(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){var e=this.helper.scale,i=this.config,n=i,a=n.innerTickSize,r=n.range,s=e(t)+(i.tickCentered?0:i.tickOffset);return r[0]0?0:1]:"middle"}.bind(this),h=function(t){return i(this,n),t?"rotate("+t+")":null}.bind(this),g=function(t){return i(this,n),t?11.5-2.5*(t/("bottom"===o?15:23))*(t>0?1:-1):l}.bind(this);switch(o){case"bottom":t.attr("x1",a.x).attr("x2",a.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"top":t.attr("x2",0).attr("y2",-s),e.attr("x",0).attr("y",2*-g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"left":t.attr("x2",-s).attr("y1",a.y).attr("y2",a.y),e.attr("x",-l).attr("y",c).style("text-anchor","end");break;case"right":t.attr("x2",s).attr("y2",0),e.attr("x",l).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,i,n,a){var r=this.params,s=this.helper.textFormatted(t),o=C(s)&&s.indexOf("\n")>-1?s.split("\n"):[];if(o.length)return o;if(X(s))return s;var l=r.tickWidth;return(!l||l<=0)&&(l=n?95:r.isCategory?Math.ceil(r.isInverted?e(i[0])-e(i[1]):e(i[1])-e(i[0]))-12:110),function t(e,i){for(var n,r,s,o=1;o=0||i.hasRadar},e.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||$(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");var e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this,e=this.owner,n=e.config,a=e.$el,r=a.main,s=a.axis,o=e.state.clip,l=n.axis_rotated,c=["x","y"];n.axis_y2_show&&c.push("y2"),c.forEach(function(a){var c=this;i(this,t);var d=this.getAxisClassName(a),u=_t["axis"+a.toUpperCase()+"Label"];s[a]=r.append("g").attr("class",d).attr("clip-path",function(){i(this,c);var t=null;return"x"===a?t=o.pathXAxis:"y"===a&&(t=o.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(a)).style("visibility",n["axis_"+a+"_show"]?null:"hidden"),s[a].append("text").attr("class",u).attr("transform",["rotate(-90)",null]["x"===a?+!l:+l]).style("text-anchor",function(){return i(this,c),this.textAnchorForAxisLabel(a)}.bind(this)),this.generateAxes(a)}.bind(this))},e.setOrient=function(){var t=this.owner.config,e=t.axis_rotated,i=t.axis_y_inner,n=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?i?"top":"bottom":i?"right":"left",y2:e?n?"bottom":"top":n?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e,n=this,a=this.owner,r=a.config,s=[],o=r["axis_"+t+"_axes"],l=r.axis_rotated;"x"===t?e=l?Fi.axisLeft:Fi.axisBottom:"y"===t?e=l?Fi.axisBottom:Fi.axisLeft:"y2"===t&&(e=l?Fi.axisTop:Fi.axisRight),o.length&&o.forEach(function(r){var o=this;i(this,n);var l=r.tick||{},c=a.scale[t].copy();r.domain&&c.domain(r.domain),s.push(e(c).ticks(l.count).tickFormat(k(l.format)?l.format.bind(a.api):function(t){return i(this,o),t}.bind(this)).tickValues(l.values).tickSizeOuter(!1===l.outer?0:6))}.bind(this)),this.axesList[t]=s},e.updateAxes=function(){var t=this,e=this.owner,n=e.config,a=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(s){var o=this;i(this,t);var l=n["axis_"+s+"_axes"],c=e.scale[s].copy(),d=c.range();this.axesList[s].forEach(function(t,u){var h=this;i(this,o);var g=t.scale().range();d.every(function(t,e){return i(this,h),t===g[e]}.bind(this))||t.scale().range(d);var f=this.getAxisClassName(s)+"-"+(u+1),p=a.select("."+f.replace(/\s/,"."));p.empty()?p=a.append("g").attr("class",f).style("visibility",n["axis_"+s+"_show"]?null:"hidden").call(t):(l[u].domain&&c.domain(l[u].domain),r(p).call(t.scale(c))),p.attr("transform",e.getTranslate(s,u+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,i,n){var a=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,i,!("x"!==t||!(a.scale.zoom||a.config.subchart_show||a.state.resizing))||n)},e.getAxis=function(t,e,n,a,r){var s,o=this,l=this.owner,c=l.config,d=/^(x|subX)$/.test(t),u=d?"x":t,h=d&&this.isCategorized(),g=this.orient[t],f=r?0:l.getAxisTickRotate(u);if(d)s="subX"===t?l.format.subXAxisTick:l.format.xAxisTick;else{var p=c["axis_"+t+"_tick_format"];k(p)&&(s=p.bind(l.api))}var v=this.tick[u],x=at({outerTick:n,noTransition:a,config:c,id:t,tickTextRotate:f,owner:l},d&&{isCategory:h,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:h&&c.axis_x_tick_tooltip&&l.api.categories(),orgXScale:l.scale.x});d||(x.tickStepSize=c["axis_"+u+"_tick_stepSize"]);var b=new Ni(x).scale(d&&l.scale.zoom||e).orient(g);if(d&&this.isTimeSeries()&&v&&!k(v)){var _=dt.bind(l);v=v.map(function(t){return i(this,o),_(t)}.bind(this))}else!d&&this.isTimeSeriesY()&&(b.ticks(c.axis_y_tick_time_value),v=null);v&&b.tickValues(v),b.tickFormat(s||!d&&l.isStackNormalized()&&function(t){return i(this,o),t+"%"}.bind(this)),h&&(b.tickCentered(c.axis_x_tick_centered),M(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));var m=c["axis_"+u+"_tick_count"];return m&&b.ticks(m),b},e.updateXAxisTickValues=function(t,e){var i,n=this.owner,a=n.config,r=a.axis_x_tick_fit,s=a.axis_x_tick_count;if((r||s&&r)&&(i=n.mapTargetsToUniqueXs(t),this.isCategorized()&&s>i.length&&(s=i.length),i=this.generateTickValues(i,s,this.isTimeSeries())),e)e.tickValues(i);else if(this.x){var o;this.x.tickValues(i),null==(o=this.subX)||o.tickValues(i)}return i},e.getId=function(t){var e=this.owner,i=e.config,n=e.scale,a=i.data_axes[t];return a&&n[a]||(a="y"),a},e.getXAxisTickFormat=function(t){var e,n=this,a=this.owner,r=a.config,s=a.format,o=t&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,l=this.isTimeSeries(),c=this.isCategorized();return o?k(o)?e=o.bind(a.api):l&&(e=function(t){return i(this,n),t?s.axisTime(o)(t):""}.bind(this)):e=l?s.defaultAxisTime:c?a.categoryName:function(t){return i(this,n),t<0?t.toFixed(0):t}.bind(this),k(e)?function(t){return i(this,n),e.apply(a,c?[t,a.categoryName(t)]:[t])}.bind(this):e},e.getTickValues=function(t){var e=this.owner,i=e.config["axis_"+t+"_tick_values"],n=e[t+"Axis"];return(k(i)?i.call(e.api):i)||(n?n.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return C(e)?e:e?e.text:null},e.setLabelText=function(t,e){var i=this.owner.config,n=this.getLabelOptionByAxisId(t);C(n)?i["axis_"+t+"_label"]=e:n&&(n.text=e)},e.getLabelPosition=function(t,e){var n=this,a=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),s=z(r)&&r.position?r.position:e[+!a],o=function(t){return i(this,n),!!~s.indexOf(t)}.bind(this);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){var e=this.owner,i=e.state,n=i.width,a=i.height,r=this.getAxisLabelPosition(t),s=r.isMiddle?-a/2:0;return this.isHorizontal(e,"x"!==t)?s=r.isLeft?0:r.isCenter?n/2:n:r.isBottom&&(s=-a),s},e.dxForAxisLabel=function(t){var e=this.owner,i=this.getAxisLabelPosition(t),n=i.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"0.5em":i.isRight?"-0.5em":"0":i.isTop&&(n="-0.5em"),n},e.textAnchorForAxisLabel=function(t){var e=this.owner,i=this.getAxisLabelPosition(t),n=i.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"start":i.isCenter?"middle":"end":i.isBottom&&(n="start"),n},e.dyForAxisLabel=function(t){var e,i=this.owner,n=i.config,a=n.axis_rotated,r=this.getAxisLabelPosition(t).isInner,s=n["axis_"+t+"_tick_rotate"]?i.getHorizontalAxisHeight(t):0,o=this.getMaxTickWidth(t);if("x"===t){var l=n.axis_x_height;e=a?r?"1.2em":-25-o:r?"-0.5em":l?l-10:s?s-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=a?r?e[0]:s?s*("y2"===t?-1:1)-e[1]:e[2]:r?e[3]:(e[4]+(n["axis_"+t+"_inner"]?0:o+e[4]))*("y"===t?-1:1);return e},e.getMaxTickWidth=function(t,e){var n=this,a=this.owner,r=a.config,s=a.state.current,o=a.$el,l=o.svg,c=o.chart,d=s.maxTickWidths[t],u=0;if(e||!r["axis_"+t+"_show"]||d.size>0&&0===a.filterTargetsToShow().length)return d.size;if(l){var h=/^y2?$/.test(t),g=a.filterTargetsToShow(a.data.targets),f=a.scale[t].copy().domain(a["get"+(h?"Y":"X")+"Domain"](g,t)),p=f.domain(),v=p[0]===p[1]&&p.every(function(t){return i(this,n),t>0}.bind(this)),x=X(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(function(t){return i(this,n),t>0}.bind(this));if(v||x)return d.size;d.domain=p,h||d.ticks.splice(0);var b=this.getAxis(t,f,!1,!1,!0),_=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&_&&b.tickValues(this.generateTickValues(p,_,h?this.isTimeSeriesY():this.isTimeSeries())),h||this.updateXAxisTickValues(g,b);var m=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");b.create(m),m.selectAll("text").each((function(t,e){var i=this.getBoundingClientRect().width;u=Math.max(u,i),h||(d.ticks[e]=i)})),m.remove()}return u>0&&(d.size=u),d.size},e.getXAxisTickTextY2Overflow=function(t){var e=this.owner,i=e.axis,n=e.config,a=e.state,r=e.getAxisTickRotate("x");if((i.isCategorized()||i.isTimeSeries())&&n.axis_x_tick_fit&&!n.axis_x_tick_culling&&!n.axis_x_tick_multiline&&r>0&&r<90){var s=a.current.width-e.getCurrentPaddingLeft(),o=this.getXAxisTickMaxOverflow(r,s-t),l=Math.max(0,o)+t;return Math.min(l,s/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){for(var i=this.owner,n=i.axis,a=i.config,r=i.state,s=n.isTimeSeries(),o=r.current.maxTickWidths.x.ticks,l=o.length,c=r.axis.x.padding,d=c.left,u=c.right,h=0,g=l-(s&&a.axis_x_tick_fit?.5:0),f=0;f2){var o,l=this.isCategorized(),c=s-2,d=t[0],u=t[t.length-1];r=[d];for(var h=0;h=g)&&(t=!0,n.preventDefault())}.bind(this);o.on("touchstart",function(t){i(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(t){if(i(this,e),r.event=t,!o.empty()&&o.classed(Rt.eventRect)){if(r.dragging||r.flowing||n.hasArcType()||t.touches.length>1)return;f(t),c(o.node())}else d()}.bind(this),!0).on("touchend.eventRect",function(t){i(this,e),r.event=t,!o.empty()&&o.classed(Rt.eventRect)&&(n.hasArcType()||!n.toggleShape||r.cancelClick)&&r.cancelClick&&(r.cancelClick=!1)}.bind(this),!0),l.on("touchstart",function(t){i(this,e),r.event=t;var n=t.target;n&&n!==o.node()&&d()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);var a=this.state,r=this.$el,s=a,o=s.eventReceiver,l=s.width,c=s.height,d=s.rendered,u=s.resizing,h=t||r.eventRect,g=function(){i(this,n),o&&(o.rect=h.node().getBoundingClientRect())}.bind(this);(!d||u||e)&&(h.attr("x",0).attr("y",0).attr("width",l).attr("height",c),d&&!e||h.classed(Rt.eventRect,!0)),g()},updateEventRectData:function(){var t,e,n,a,r=this,s=this,o=s.config,l=s.scale,c=s.state,d=l.zoom||l.x,u=o.axis_rotated;if(s.isMultipleX())t=0,e=0,n=c.width,a=c.height;else{var h,g;if(s.axis.isCategorized())h=s.getEventRectWidth(),g=function(t){return i(this,r),d(t.x)-h/2}.bind(this);else{var f=function(t){var e=t.index;return i(this,r),{prev:s.getPrevX(e),next:s.getNextX(e)}}.bind(this);h=function(t){var e=this;i(this,r);var n,a=f(t),s=d.domain();return null===a.prev&&null===a.next?n=u?c.height:c.width:null===a.prev?n=(d(a.next)+d(t.x))/2:null===a.next?n=d(s[1])-(d(a.prev)+d(t.x))/2:(Object.keys(a).forEach(function(t,n){var r;i(this,e),a[t]=null!=(r=a[t])?r:s[n]}.bind(this)),n=Math.max(0,(d(a.next)-d(a.prev))/2)),n}.bind(this),g=function(t){i(this,r);var e=f(t);return null===e.prev&&null===e.next?0:null===e.prev?d(d.domain()[0]):(d(t.x)+d(e.prev))/2}.bind(this)}t=u?0:g,e=u?g:0,n=u?c.width:h,a=u?h:c.height}var p=c.eventReceiver,v=function(t,e){return i(this,r),k(t)?t(e):t}.bind(this);p.coords.splice(p.data.length),p.data.forEach(function(s,o){i(this,r),p.coords[o]={x:v(t,s),y:v(e,s),w:v(n,s),h:v(a,s)}}.bind(this))},selectRectForSingle:function(t,e){var n=this,a=this,r=a.config,s=a.$el,o=s.main,l=s.circle,c=r.data_selection_enabled,d=r.data_selection_grouped,u=r.data_selection_isselectable,h=r.tooltip_grouped,g=a.getAllValuesOnIndex(e);if(!h||(a.showTooltip(g,t),null==a.showGridFocus||a.showGridFocus(g),c&&!d)){l||o.selectAll("."+vt.EXPANDED+":not(."+Mt.shape+"-"+e+")").classed(vt.EXPANDED,!1);var f=o.selectAll("."+Mt.shape+"-"+e).classed(vt.EXPANDED,!0).style("cursor",u?"pointer":null).filter((function(t){return a.isWithinShape(this,t)}));f.empty()&&!h&&(null==a.hideGridFocus||a.hideGridFocus(),a.hideTooltip(),d||a.setExpand(e)),f.call(function(r){var s=this;i(this,n);var o=r.data();c&&(d||null!=u&&u.bind(a.api)(o))&&(t.style.cursor="pointer"),h||(a.showTooltip(o,t),null==a.showGridFocus||a.showGridFocus(o),null==a.unexpandCircles||a.unexpandCircles(),r.each(function(t){return i(this,s),a.setExpand(e,t.id)}.bind(this)))}.bind(this))}},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);var a=this,r=a.config,s=a.state,o=a.filterTargetsToShow(a.data.targets);if(!s.dragging&&!a.hasArcType(o)){var l=H(s.event,t),c=a.findClosestFromTargets(o,l);if(!e||!s.mouseover||c&&c.id===s.mouseover.id||(r.data_onout.call(a.api,s.mouseover),s.mouseover=void 0),c){var d=(a.isBubbleType(c)||a.isScatterType(c)||!r.tooltip_grouped?[c]:a.filterByX(o,c.x)).map(function(t){return i(this,n),a.addName(t)}.bind(this));a.showTooltip(d,t),a.setExpand(c.index,c.id,!0),a.showGridFocus(d);var u=a.dist(c,l);(a.isBarType(c.id)||u-1?s.data[a]:null}.bind(this);o.on("mouseover",function(t){i(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(t){var e=l(t);if(r.event=t,e){var i=e.index,o=a.line_step_type;if(a.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(o)){var c=n.scale.zoom||n.scale.x,d=n.axis.xs[i],u=c.invert(H(t,this)[0]);"step-after"===o&&ud&&(i+=1)}var h=a.tooltip_grouped&&i===s.currentIdx;r.dragging||r.flowing||n.hasArcType()||h?h&&n.setTooltipPosition():(i!==s.currentIdx&&(n.setOverOut(!1,s.currentIdx),s.currentIdx=i),-1===i?n.unselectRect():n.selectRectForSingle(this,i),n.setOverOut(-1!==i,i))}})).on("mouseout",function(t){i(this,e),r.event=t,a&&!n.hasArcType()&&-1!==s.currentIdx&&(n.unselectRect(),n.setOverOut(!1,s.currentIdx),s.currentIdx=-1)}.bind(this))}return o},clickHandlerForSingleX:function(t,e){var i=e,n=i.config,a=i.state,r=i.$el.main;if(!t||i.hasArcType()||a.cancelClick)a.cancelClick&&(a.cancelClick=!1);else{var s=t.index;r.selectAll("."+Mt.shape+"-"+s).each((function(t){(n.data_selection_grouped||i.isWithinShape(this,t))&&(null==i.toggleShape||i.toggleShape(this,t,s),n.data_onclick.bind(i.api)(t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=this,a=n.state;t.on("click",(function(t){a.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===a.inputType&&t.on("mouseover mousemove",(function(t){a.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){i(this,e),a.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){var e=t,i=e.config,n=e.state,a=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(a)){var r=H(n.event,this),s=e.findClosestFromTargets(a,r);s&&(e.isBarType(s.id)||e.dist(s,r)1&&(a=a[n[1]]),null!=(e=a)&&e.size()&&(l[t]=a)}.bind(this)),e.hideGridFocus(),e.setFlowList(l,t)}},setFlowList:function(t,e){var n,a=this,r=this,s=e.flow,o=e.targets,l=s,c=l.duration,d=void 0===c?e.duration:c,u=l.index,h=l.length,g=l.orgDataCount,f=r.getFlowTransform(o,g,u,h),p=xe();p.add(Object.keys(t).map(function(e){var s=this;return i(this,a),n=t[e].transition().ease(Yi.easeLinear).duration(d),n="axis.x"===e?n.call(function(t){i(this,s),r.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?n.filter(r.isRegionOnX).attr("transform",f):n.attr("transform",f)}.bind(this))),n.call(p,function(){i(this,a),r.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this,a=this,r=a.config,s=a.state,o=a.$el.svg,l=r.axis_rotated,c=e.flow,d=e.shape,u=e.xv,h=d.pos,g=h.cx,f=h.cy,p=h.xForText,v=h.yForText,x=c,b=x.done,_=void 0===b?function(){i(this,n)}.bind(this):b,m=x.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){i(this,n);for(var e=[],a=0;a=0?"":h.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this.config,i=this.state,n=i.margin,a=i.width,r=i.height,s=e.axis_rotated,o=Math.max(30,n.left)-(s?0:20),l=s?-(1+o):-(o-1),c=-Math.max(15,n.top),d=s?n.left+20:a+10+o,u=(s?n.top+r+10:n.bottom)+20;t.attr("x",l).attr("y",c).attr("width",d).attr("height",u)},setYAxisClipPath:function(t){var e,i=this.config,n=this.state,a=n.margin,r=n.width,s=n.height,o=i.axis_rotated,l=Math.max(30,a.left)-(o?20:0),c=i.axis_y_inner,d=c&&!o?i.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),u=-(o?20:a.top),h=(o?r+15+l:a.left+20)+(c?20:0),g=(o?a.bottom+("fit"===(null==(e=i.padding)?void 0:e.mode)?10:0):a.top+s)+10;t.attr("x",d).attr("y",u).attr("width",h).attr("height",g)},updateXAxisTickClip:function(){var t=this,e=t.config,i=t.state,n=i.clip,a=i.xAxisHeight,r=t.$el.defs,s=t.getHorizontalAxisHeight("x");if(r&&!n.idXAxisTickTexts){var o=n.id+"-xaxisticktexts";t.appendClip(r,o),n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=o}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==a&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth:function(){var t=this,e=t.config,i=t.state.current.maxTickWidths,n=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&n){var a=Math.sin(Math.PI/180*Math.abs(n));i.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/a}else i.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this.state,e=t.clip,i=t.current,n=this.$el.svg;n&&n.select("#"+e.idXAxisTickTexts+" rect").attr("width",i.maxTickWidths.x.clipPath).attr("height",30)}},Ui=void 0,Zi=function(t){return i(this,Ui),S(t.position)||"end"}.bind(void 0),qi=function(t){return i(this,Ui),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ki(t,e,n){var a=this;return function(r){i(this,a);var s=t?0:e;return"start"===r.position?s=t?-n:0:"middle"===r.position&&(s=(t?-n:e)/2),s}.bind(this)}function Ji(t,e){"grid"===e&&t.each((function(){var t=this,e=(0,a.select)(this);["x1","x2","y1","y2"].forEach(function(n){return i(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Qi={hasGrid:function(){var t=this,e=this.config;return["x","y"].some(function(n){return i(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,i=t.state.clip,n=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(n.gridLines.main=n.main.insert("g","."+vt.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",i.pathGrid).attr("class",Lt.grid+" "+Lt.gridLines),n.gridLines.main.append("g").attr("class",Lt.xgridLines),n.gridLines.main.append("g").attr("class",Lt.ygridLines),n.gridLines.x=(0,a.selectAll)([]))},updateXGrid:function(t){var e=this,n=this,r=n.config,s=n.scale,o=n.state,l=n.$el,c=l.main,d=l.grid,u=r.axis_rotated,h=n.generateGridData(r.grid_x_type,s.x),g=n.axis.isCategorized()?n.axis.x.tickOffset():0,f=function(t){return i(this,e),(s.zoom||s.x)(t)+g*(u?-1:1)}.bind(this);o.xgridAttr=u?{x1:0,x2:o.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:o.height},d.x=c.select("."+Lt.xgrids).selectAll("."+Lt.xgrid).data(h),d.x.exit().remove(),d.x=d.x.enter().append("line").attr("class",Lt.xgrid).merge(d.x),t||d.x.each((function(){var t=this,e=(0,a.select)(this);Object.keys(o.xgridAttr).forEach(function(n){var a=this;i(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return i(this,a),e.attr(u?"y1":"x1")===(u?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this,e=this,n=e.axis,a=e.config,r=e.scale,s=e.state,o=e.$el,l=o.grid,c=o.main,d=a.axis_rotated,u=function(e){return i(this,t),Math.ceil(r.y(e))}.bind(this),h=n.y.getGeneratedTicks(a.grid_y_ticks)||e.scale.y.ticks(a.grid_y_ticks);l.y=c.select("."+Lt.ygrids).selectAll("."+Lt.ygrid).data(h),l.y.exit().remove(),l.y=l.y.enter().append("line").attr("class",Lt.ygrid).merge(l.y),l.y.attr("x1",d?u:0).attr("x2",d?u:s.width).attr("y1",d?0:u).attr("y2",d?s.height:u),Ji(l.y,"grid")},updateGrid:function(){var t=this,e=t.$el,i=e.grid;e.gridLines.main||t.initGridLines(),i.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateXGridLines(),t.updateYGridLines()},updateXGridLines:function(){var t=this,e=this,n=e.config,a=e.$el,r=a.gridLines,s=a.main,o=e.$T,l=n.axis_rotated;n.grid_x_show&&e.updateXGrid();var c=s.select("."+Lt.xgridLines).selectAll("."+Lt.xgridLine).data(n.grid_x_lines);o(c.exit()).style("opacity","0").remove();var d=c.enter().append("g");d.append("line").style("opacity","0"),d.append("text").attr("transform",l?null:"rotate(-90)").attr("dy",-5).style("opacity","0"),o((c=d.merge(c)).attr("class",function(e){return i(this,t),(Lt.xgridLine+" "+(e.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Zi).attr("dx",qi)).text(function(e){return i(this,t),e.text}.bind(this)).style("opacity",null),r.x=c},updateYGridLines:function(){var t=this,e=this,n=e.config,a=e.state,r=a.width,s=a.height,o=e.$el,l=e.$T,c=n.axis_rotated;n.grid_y_show&&e.updateYGrid();var d=o.main.select("."+Lt.ygridLines).selectAll("."+Lt.ygridLine).data(n.grid_y_lines);l(d.exit()).style("opacity","0").remove();var u=d.enter().append("g");u.append("line").style("opacity","0"),u.append("text").attr("transform",c?"rotate(-90)":"").style("opacity","0"),d=u.merge(d);var h=e.yv.bind(e);l(d.attr("class",function(e){return i(this,t),(Lt.ygridLine+" "+(e.class||"")).trim()}.bind(this)).select("line")).attr("x1",c?h:0).attr("x2",c?h:r).attr("y1",c?0:h).attr("y2",c?s:h).style("opacity",null),l(d.select("text").attr("text-anchor",Zi).attr("dx",qi)).attr("dy",-5).attr("x",Ki(c,r,s)).attr("y",h).text(function(e){return i(this,t),e.text}.bind(this)).style("opacity",null),o.gridLines.y=d},redrawGrid:function(t){var e=this,n=this,a=n.config.axis_rotated,r=n.state,s=r.width,o=r.height,l=n.$el.gridLines,c=n.$T,d=n.xv.bind(n),u=l.x.select("line"),h=l.x.select("text");return u=c(u,t).attr("x1",a?0:d).attr("x2",a?s:d).attr("y1",a?d:0).attr("y2",a?d:o),h=c(h,t).attr("x",Ki(!a,s,o)).attr("y",d).text(function(t){return i(this,e),t.text}.bind(this)),[u.style("opacity",null),h.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,i=t.state.clip,n=t.$el,a=e.grid_front,r="."+(a&&n.gridLines.main?Lt.gridLines:vt.chart)+(a?" + *":""),s=n.main.insert("g",r).attr("clip-path",i.pathGrid).attr("class",Lt.grid);n.grid.main=s,e.grid_x_show&&s.append("g").attr("class",Lt.xgrids),e.grid_y_show&&s.append("g").attr("class",Lt.ygrids),e.interaction_enabled&&e.grid_focus_show&&(s.append("g").attr("class",Et.xgridFocus).append("line").attr("class",Et.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&s.append("g").attr("class",Et.ygridFocus).append("line").attr("class",Et.ygridFocus))},showGridFocus:function(t){var e=this,n=this,r=n.config,s=n.state,o=s.width,l=s.height,c=r.axis_rotated,d=n.$el.main.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus),u=(t||[d.datum()]).filter(function(t){return i(this,e),t&&S(n.getBaseValue(t))}.bind(this));if(r.tooltip_show&&0!==u.length&&!n.hasType("bubble")&&!n.hasArcType()){var h=r.grid_focus_edge&&!r.tooltip_grouped,g=n.xx.bind(n);d.style("visibility",null).data(u.concat(u)).each((function(t){var e,r=this,s=(0,a.select)(this),d={x:g(t),y:n.getYScaleById(t.id)(t.value)};if(s.classed(Et.xgridFocus))e=c?[null,d.x,h?d.y:o,d.x]:[d.x,h?d.y:null,d.x,l];else{var u="y2"===n.axis.getId(t.id);e=c?[d.y,h&&!u?d.x:null,d.y,h&&u?d.x:l]:[h&&u?d.x:null,d.y,h&&!u?d.x:o,d.y]}["x1","y1","x2","y2"].forEach(function(t,n){return i(this,r),s.attr(t,e[n])}.bind(this))})),Ji(d,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)}},hideGridFocus:function(){var t=this,e=t.state,i=e.inputType,n=e.resizing,a=t.$el.main;"mouse"!==i&&n||(a.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){var t=this,e=t.state,i=e.inputType,n=e.width,a=e.height,r=e.resizing,s=t.$el.grid.main.select("line."+Et.xgridFocus);if("touch"===i)s.empty()?r&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{var o=t.config.axis_rotated;s.attr("x1",o?0:-10).attr("x2",o?n:-10).attr("y1",o?-10:0).attr("y2",o?-10:a)}return!0},generateGridData:function(t,e){var n=this,a=this.$el.main.select("."+_t.axisX).selectAll(".tick").size(),r=[];if("year"===t)for(var s=this.getXDomain().map(function(t){return i(this,n),t.getFullYear()}.bind(this)),o=s[0],l=s[1],c=o;c<=l;c++)r.push(new Date(c+"-01-01 00:00:00"));else(r=e.ticks(10)).length>a&&(r=r.filter(function(t){return i(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var a=this;i(this,e);var r=!1;return(X(t)?t.concat():[t]).forEach(function(t){i(this,a),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return i(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this,a=this,r=a.config,s=a.$T,o=a.getGridFilterToRemove(t),l=function(t){return i(this,n),!o(t)}.bind(this),c=e?Lt.xgridLines:Lt.ygridLines,d=e?Lt.xgridLine:Lt.ygridLine;s(a.$el.main.select("."+c).selectAll("."+d).filter(o)).style("opacity","0").remove();var u="grid_"+(e?"x":"y")+"_lines";r[u]=r[u].filter(l)}},tn={initRegion:function(){var t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Dt.regions)},updateRegion:function(){var t=this,e=t.config,i=t.$el.region,n=t.$T;i.main||t.initRegion(),i.main.style("visibility",t.hasArcType()?"hidden":null);var a=i.main.selectAll("."+Dt.region).data(e.regions);n(a.exit()).style("opacity","0").remove();var r=a.enter().append("g");r.append("rect").style("fill-opacity","0"),i.list=r.merge(a).attr("class",t.classRegion.bind(t))},redrawRegion:function(t){var e=this,n=this,r=n.$el.region,s=n.$T,o=r.list.select("rect");return[(o=s(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n))).style("fill-opacity",function(t){return i(this,e),S(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){(0,a.select)(this.parentNode).selectAll("rect:not([x])").remove()}))]},getRegionXY:function(t,e){var i=this,n=i.config,a=i.scale,r=n.axis_rotated,s="x"===t,o="start",l=0;return"y"===e.axis||"y2"===e.axis?(s||(o="end"),(s?r:!r)&&o in e&&(l=(0,a[e.axis])(e[o]))):(s?!r:r)&&o in e&&(l=(a.zoom||a.x)(i.axis.isTimeSeries()?dt.call(i,e[o]):e[o])),l},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var i=this,n=i.config,a=i.scale,r=i.state,s=n.axis_rotated,o="width"===t,l=i[o?"regionX":"regionY"](e),c="end",d=r[t];return"y"===e.axis||"y2"===e.axis?(o||(c="start"),(o?s:!s)&&c in e&&(d=(0,a[e.axis])(e[c]))):(o?!s:s)&&c in e&&(d=(a.zoom||a.x)(i.axis.isTimeSeries()?dt.call(i,e[c]):e[c])),ds.height/2&&(f=s.height/2)),f+(n.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||d?0:-10)},getEventRectWidth:function(){var t=this.config,e=this.axis,i=t.axis_x_inverted,n=e.x.tickInterval();return Math.max(0,i?Math.abs(n):n)},getAxisTickRotate:function(t){var e=this,i=e.axis,n=e.config,a=e.state,r=e.$el,s=n["axis_"+t+"_tick_rotate"];if("x"===t){var o=i.isCategorized()||i.isTimeSeries();if(n.axis_x_tick_fit&&o){var l=n.axis_x_tick_count,c=a.current.maxTickWidths.x.ticks.length,d=0;if(l?d=l>c?c:l:c&&(d=c),d!==a.axis.x.tickCount){var u=e.data.targets;a.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(u,"min"),e.getXDomainMinMax(u,"max")],d)}a.axis.x.tickCount=d}r.svg&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&n.axis_x_tick_autorotate&&o&&(s=e.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,i=e.axis,n=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),a=i.x.tickCount+i.x.padding.left+i.x.padding.right;return t.axis.getMaxTickWidth("x")>(a?n/a:0)}},nn={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},an={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function rn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function sn(t){for(var e,i=1;i1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},categories:function(t){var e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories}},Xi,Pi,Ii,Mi,$i],cn=[Gi,Wi,Vi,Hi,Qi,tn,en],dn=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},on,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}],un=p(12);function hn(t){void 0===t&&(t=0);var e=this,i=e.config,n=e.state,a=e.hasMultiArcGauge(),r=n.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,s=t?Math.min(n.radiusExpanded*t-n.radius,.8*r-100*(1-t)):0;return{inner:function(t){var i=e.getRadius(t).innerRadius;return a?n.radius-r*(t.index+1):R(i)?i:0},outer:function(i){var o,l=e.getRadius(i).outerRadius;if(a)o=n.radius-r*i.index+s;else if(e.hasType("polar")&&!t)o=e.getPolarOuterRadius(i,l);else if(o=l,t){var c=n.radiusExpanded;n.radius!==l&&(c-=Math.abs(n.radius-l)),o=c*t}return o},corner:function(t,n){var a=i.arc_cornerRadius_ratio,r=void 0===a?0:a,s=i.arc_cornerRadius,o=void 0===s?0:s,l=t.data.id,c=t.value;return r?r*n:R(o)?o:o.call(e.api,l,c,n)}}}function gn(t){return function(e){var i=(0,un.interpolate)(this._current,e);return this._current=e,function(e){var n=i(e);return t(n)}}}var fn={initPie:function(){var t=this,e=this,n=e.config,a=n.data_type,r=n[a+"_padding"],s=n[a+"_startingAngle"]||0,o=(r?.01*r:n[a+"_padAngle"])||0;e.pie=(0,Ue.pie)().startAngle(s).endAngle(s+2*Math.PI).padAngle(o).value(function(e){var n=this;return i(this,t),e.values.reduce(function(t,e){return i(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var t=this,e=t.config,i=t.state,n=e[e.data_type+"_padding"],a=e.gauge_width||e.donut_width,r=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;i.radiusExpanded=Math.min(i.arcWidth,i.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),i.radius=.95*i.radiusExpanded,i.innerRadiusRatio=a?(i.radius-a)/i.radius:.6,i.gaugeArcWidth=a||(r<=i.radius-i.innerRadius?i.radius-i.innerRadius:r<=i.radius?r:i.radius);var s=e.pie_innerRadius||(n?n*(i.innerRadiusRatio+.1):0);i.outerRadius=e.pie_outerRadius,i.innerRadius=t.hasType("donut")||t.hasType("gauge")?i.radius*i.innerRadiusRatio:s},getRadius:function(t){var e=null==t?void 0:t.data,i=this.state,n=i.innerRadius,a=i.outerRadius;return!R(n)&&e&&(n=n[e.id]||0),F(a)&&e&&e.id in a?a=a[e.id]:R(a)||(a=this.state.radius),{innerRadius:n,outerRadius:a}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=3.6*this.config.gauge_arcLength,e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){var t=this.config,e=t.gauge_fullCircle,i=-1*Math.PI/2,n=Math.PI/2,a=t.gauge_startingAngle;return!e&&a<=i?a=i:!e&&a>=n?a=n:(a>Math.PI||a<-1*Math.PI)&&(a=Math.PI),a},updateAngle:function(t){var e=this,n=this,a=n.config,r=n.state,s=n.pie,o=t,l=!1;if(!a)return null;var c=n.getGaugeStartAngle(),d=a.gauge_fullCircle?n.getArcLength():-2*c;if(o.data&&n.isGaugeType(o.data)&&!n.hasMultiArcGauge()){var u=a.gauge_min,h=a.gauge_max,g=n.getTotalDataSum(r.rendered);s=s.startAngle(c).endAngle(d*((g-u)/(h-u))+c)}if(s(n.filterTargetsToShow()).forEach(function(t,n){var a;i(this,e),l||t.data.id!==(null==(a=o.data)?void 0:a.id)||(l=!0,(o=t).index=n)}.bind(this)),isNaN(o.startAngle)&&(o.startAngle=0),isNaN(o.endAngle)&&(o.endAngle=o.startAngle),o.data&&n.hasMultiArcGauge()){var f=a.gauge_min,p=a.gauge_max,v=o.value1){var c,d=n.getRadius(t).outerRadius;n.hasType("polar")&&(d=n.getPolarOuterRadius(t,d));var u=this.svgArc.centroid(s).map(function(t){return i(this,e),isNaN(t)?0:t}.bind(this)),h=u[0],g=u[1],f=Math.sqrt(h*h+g*g),p=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return i(this,e),a[t+"_label_ratio"]}.bind(this)))?void 0:c[0];o="translate("+h*(p=p?k(p)?p.bind(n.api)(t,d,f):p:d&&(f?(36/d>.375?1.175-36/d:.8)*d/f:0))+","+g*p+")"}return o},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,i=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var n,r=(0,a.select)(this),s=e.updateAngle(t),o=e.getRatio("arc",s);if(e.meetsLabelThreshold(o,null==(n=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:n[0])){var l=(s||t).value;V(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(l,o,t.data.id).toString(),[-1,1],i)}else r.text("")}))},expandArc:function(t){var e=this,n=this,r=n.state.transiting,s=n.$el;if(r)var o=setInterval(function(){i(this,e),r||(clearInterval(o),s.legend.selectAll("."+Et.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);else{var l=n.mapToTargetIds(t);s.svg.selectAll(n.selectorTargets(l,"."+xt.chartArc)).each((function(t){if(n.shouldExpand(t.data.id)){var e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));(0,a.select)(this).selectAll("path").transition().duration(e).attrTween("d",gn(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",gn(i.bind(n)))}}))}},unexpandArc:function(t){var e=this,n=this,a=n.state.transiting,r=n.$el.svg;if(!a){var s=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(s,"."+xt.chartArc)).selectAll("path").transition().duration(function(t){return i(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",gn(n.svgArc.bind(n))),r.selectAll(""+xt.arc).style("opacity",null)}},getExpandConfig:function(t,e){var i,n=this,a=n.config;return n.isDonutType(t)?i="donut":n.isGaugeType(t)?i="gauge":n.isPieType(t)&&(i="pie"),i?a[i+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this,i=e.config;return e.isDonutType(t)&&i.donut_expand||e.isGaugeType(t)&&i.gauge_expand||e.isPieType(t)&&i.pie_expand},shouldShowArcLabel:function(){var t=this,e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(a){return i(this,t),e.hasType(a)&&n[a+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this,e=this,n=e.config,a=function(e){return i(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){i(this,t),a=n[e+"_label_format"]}.bind(this)),k(a)?a.bind(e.api):a},updateTargetsForArc:function(t){var e=this,n=this,a=n.$el,r=n.hasType("gauge"),s=n.getChartClass("Arc"),o=n.getClass("arcs",!0),l=n.classFocus.bind(n),c=a.main.select("."+xt.chartArcs),d=c.selectAll("."+xt.chartArc).data(n.pie(t)).attr("class",function(t){return i(this,e),s(t)+l(t.data)}.bind(this)),u=d.enter().append("g").attr("class",s).call(this.setCssRule(!1,"."+xt.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(d),u.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),a.text=c.selectAll("."+vt.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+vt.chart).append("g").attr("class",xt.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){var e=this,i=t||e.getArcTitle(),n=e.hasType("gauge");if(i){var a=n?St.chartArcsGaugeTitle:xt.chartArcsTitle,r=e.$el.arcs.select("."+a);r.empty()&&(r=e.$el.arcs.append("text").attr("class",a).style("text-anchor","middle")),n&&r.attr("dy","-0.3em"),V(r,i,n?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){var t=this,e=t.config,i=t.state,n=t.getArcTitle();if(n&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(n)){var a=i.current.needle;return R(a)||(a=e.arc_needle_value),ct(n,{NEEDLE_VALUE:R(a)?a:0})}return!1},redrawArc:function(t,e,n){var r=this,s=this,o=s.config,l=s.state,c=s.$el.main,d=o.interaction_enabled,u=d&&o.data_selection_isselectable,h=c.selectAll("."+xt.arcs).selectAll("."+xt.arc).data(s.arcData.bind(s));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",s.getClass("arc",!0)).style("fill",function(t){return i(this,r),s.color(t.data)}.bind(this)).style("cursor",function(t){return i(this,r),null!=u&&null!=u.bind&&u.bind(s.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){s.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),s.hasType("gauge")&&(s.updateGaugeMax(),s.hasMultiArcGauge()&&s.redrawMultiArcGauge()),h.attr("transform",function(t){return i(this,r),!s.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){i(this,r),l.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this,n=s.updateAngle(t);if(!n)return function(){return i(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var a=(0,un.interpolate)(this._current,n);return this._current=a(0),function(e){var i=a(e);return i.data=t.data,s.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){var e;return i(this,r),s.levelColor?(e=s.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=s.color(t.data),e}.bind(this)).style("opacity",null).call(G,(function(){if(s.levelColor){var t=(0,a.select)(this),e=t.datum(this._current);s.updateLegendItemColor(e.data.id,t.style("fill"))}l.transiting=!1,N(o.onrendered,s.api)})),d&&s.bindArcEvent(h),s.hasType("polar")&&s.redrawPolar(),s.hasType("gauge")&&s.redrawBackgroundArcs(),o.arc_needle_show&&s.redrawNeedle(),s.redrawArcText(t)},redrawNeedle:function(){var t=this,e=this,n=e.$el,a=e.config,r=e.state,s=r.hiddenTargetIds,o=(r.radius-1)/100*a.arc_needle_length,l=s.length!==e.data.targets.length,c=e.$el.arcs.select("."+xt.needle),d=a.arc_needle_path,u=a.arc_needle_bottom_width/2,h=a.arc_needle_top_width/2,g=a.arc_needle_top_rx,f=a.arc_needle_top_ry,p=a.arc_needle_bottom_len,v=a.arc_needle_bottom_rx,x=a.arc_needle_bottom_ry,b=e.getNeedleAngle(),_=function(){i(this,t);var n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(_(),c.empty()&&(c=n.arcs.append("path").classed(xt.needle,!0),n.needle=c,n.needle.updateHelper=function(r,s){var o=this;void 0===s&&(s=!1),i(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(G,function(){i(this,o),s&&(a.arc_needle_value=r),_()}.bind(this))}.bind(this)),l){var m=k(d)?d.call(e,o):"M-"+u+" "+p+" A"+v+" "+x+" 0 0 0 "+u+" "+p+" L"+h+" -"+o+" A"+g+" "+f+" 0 0 0 -"+h+" -"+o+" L-"+u+" "+p+" Z";e.$T(c).attr("d",m).style("fill",a.arc_needle_color).style("display",null).style("transform","rotate("+b+"deg)")}else c.style("display","none")},getNeedleAngle:function(t){var e=this,i=e.config,n=e.state,a=e.getArcLength(),r=e.hasType("gauge"),s=e.getTotalDataSum(!0),o=L(t)?t:i.arc_needle_value,l=i[i.data_type+"_startingAngle"]||0,c=0;if(R(o)||(o=r&&1===e.data.targets.length?s:0),n.current.needle=o,r){l=e.getGaugeStartAngle();var d=i.gauge_fullCircle?a:-2*l,u=i.gauge_min;c=d*((o-u)/(i.gauge_max-u))}else c=a*(o/s);return(l+c)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this,e=this,n=e.config,a=e.state,r=e.hasMultiArcGauge(),s=n.gauge_fullCircle,o=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,l=e.getGaugeStartAngle(),c=s?l+e.getArcLength():-1*l,d=e.$el.arcs.select((r?"g":"")+"."+xt.chartArcsBackground);if(r){var u=0;(d=d.selectAll("path."+xt.chartArcsBackground).data(e.data.targets)).enter().append("path").attr("class",function(e,n){return i(this,t),xt.chartArcsBackground+" "+xt.chartArcsBackground+"-"+n}.bind(this)).merge(d).style("fill",n.gauge_background||null).attr("d",function(r){var s=r.id;if(i(this,t),o||a.hiddenTargetIds.indexOf(s)>=0)return"M 0 0";var d={data:[{value:n.gauge_max}],startAngle:l,endAngle:c,index:u++};return e.getArc(d,!0,!0)}.bind(this)),d.exit().remove()}else d.attr("d",o?"M 0 0":function(){i(this,t);var a={data:[{value:n.gauge_max}],startAngle:l,endAngle:c};return e.getArc(a,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this,n=this,r=n.config,s=n.state,o="touch"===s.inputType,l="mouse"===s.inputType;function c(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function d(t){var e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,i){var a,s=n.updateAngle(e);s&&(a=n.convertToArcData(s),null==n.toggleShape||n.toggleShape(this,a,i),r.data_onclick.bind(n.api)(a,this))})),l&&t.on("mouseover",(function(t,e){var i;if(!s.transiting){s.event=t;var a=n.updateAngle(e),r=a?n.convertToArcData(a):null;c(this,r,(null==(i=r)?void 0:i.id)||void 0),n.setOverOut(!0,r)}})).on("mouseout",function(t,a){if(i(this,e),!s.transiting){s.event=t;var r=n.updateAngle(a),o=r?n.convertToArcData(r):null;d(),n.setOverOut(!1,o)}}.bind(this)).on("mousemove",(function(t,e){var i=n.updateAngle(e),a=i?n.convertToArcData(i):null;s.event=t,n.showTooltip([a],this)})),o&&n.hasArcType()&&!n.radars){var u=function(t){i(this,e);var n=t.changedTouches[0];return(0,a.select)(h.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(t){var e,i;if(!s.transiting){s.event=t;var a=u(t).datum(),r=null!=(e=a)&&e.data&&a.data.id?n.updateAngle(a):null,o=r?n.convertToArcData(r):null,l=(null==(i=o)?void 0:i.id)||void 0;n.callOverOutForTouch(o),E(l)?d():c(this,o,l)}}))}},redrawArcText:function(t){var e,n=this,a=this,r=a.config,s=a.state,o=a.$el,l=o.main,c=o.arcs,d=a.hasType("gauge"),u=a.hasMultiArcGauge();if(d&&1===a.data.targets.length&&r.gauge_title||(e=l.selectAll("."+xt.chartArc).select("text").style("opacity","0").attr("class",function(t){return i(this,n),a.isGaugeType(t.data)?St.gaugeValue:null}.bind(this)).call(a.textForArcLabel.bind(a)).attr("transform",a.transformForArcLabel.bind(a)).style("font-size",function(t){return i(this,n),a.isGaugeType(t.data)&&1===a.data.targets.length&&!u?Math.round(s.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return i(this,n),a.isTargetToShow(t.data.id)&&a.isArcType(t.data)?null:"0"}.bind(this)),u&&e.attr("dy","-.1em")),l.select("."+xt.chartArcsTitle).style("opacity",a.hasType("donut")||d?null:"0"),d){var h,g=r.gauge_fullCircle;g&&(null==(h=e)||h.attr("dy",""+(u?0:Math.round(s.radius/14)))),r.gauge_label_show&&(c.select("."+St.chartArcsGaugeUnit).attr("dy",(g?1.5:.75)+"em").text(r.gauge_units),c.select("."+St.chartArcsGaugeMin).attr("dx",-1*(s.innerRadius+(s.radius-s.innerRadius)/(g?1:2))+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_min,!1)),g||c.select("."+St.chartArcsGaugeMax).attr("dx",s.innerRadius+(s.radius-s.innerRadius)/2+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e,n=this,a=this.$el.arcs,r=R(t)?function(e){return i(this,n),e.index===t}.bind(this):function(e){return i(this,n),e.data.id===t}.bind(this);return null==(e=a)?void 0:e.selectAll("."+vt.target+" path").filter(r)}},pn={initArea:function(t){var e=this.config;t.insert("g","."+(e.area_front?Tt.circles:Ct.lines)).attr("class",this.getClass("areas",!0))},updateAreaColor:function(t){var e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea:function(t,e){void 0===e&&(e=!1);var i=this,n=i.config,r=i.state,s=i.$el,o=i.$T,l=e?s.subchart:s;n.area_linearGradient&&i.updateLinearGradient();var c=l.main.selectAll("."+bt.areas).selectAll("."+bt.area).data(i.lineData.bind(i));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",i.getClass("area",!0)).style("fill",i.updateAreaColor.bind(i)).style("opacity",(function(){return r.orgAreaOpacity=(0,a.select)(this).style("opacity"),"0"})).merge(c),c.style("opacity",r.orgAreaOpacity),i.setRatioForGroupedData(l.area.data())},redrawArea:function(t,e,n){var a=this;void 0===n&&(n=!1);var r=this,s=(n?this.$el.subchart:this.$el).area,o=r.state.orgAreaOpacity;return[r.$T(s,e,Z()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",function(t){return i(this,a),(r.isAreaRangeType(t)?o/1.75:o)+""}.bind(this))]},generateDrawArea:function(t,e){var n=this,a=this,r=a.config,s=r.line_connectNull,o=r.axis_rotated,l=a.generateGetAreaPoints(t,e),c=a.getYScaleById.bind(a),d=function(t){return i(this,n),(e?a.subxx:a.xx).call(a,t)}.bind(this),u=function(t,r){return i(this,n),a.isGrouped(t.id)?l(t,r)[0][1]:c(t.id,e)(a.isAreaRangeType(t)?a.getRangedData(t,"high"):a.getShapeYMin(t.id))}.bind(this),h=function(t,r){return i(this,n),a.isGrouped(t.id)?l(t,r)[1][1]:c(t.id,e)(a.isAreaRangeType(t)?a.getRangedData(t,"low"):t.value)}.bind(this);return function(t){var e=this;i(this,n);var l,c=s?a.filterRemoveNull(t.values):t.values,g=0,f=0;if(a.isAreaType(t)){var p=(0,Ue.area)();p=o?p.y(d).x0(u).x1(h):p.x(d).y0(r.area_above?0:r.area_below?a.state.height:u).y1(h),s||(p=p.defined(function(t){return i(this,e),null!==a.getBaseValue(t)}.bind(this))),a.isStepType(t)&&(c=a.convertValuesToStep(c)),l=p.curve(a.getCurve(t))(c)}else c[0]&&(g=a.scale.x(c[0].x),f=a.getYScaleById(t.id)(c[0].value)),l=o?"M "+f+" "+g:"M "+g+" "+f;return l||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){var i=this,n=i.config,a=i.getShapeX(0,t,e),r=i.getShapeY(!!e),s=i.getShapeOffset(i.isAreaType,t,e),o=i.getYScaleById.bind(i);return function(t,l){var c=o.call(i,t.id,e)(i.getShapeYMin(t.id)),d=s(t,l)||c,u=a(t),h=t.value,g=r(t);return n.axis_rotated&&(h>0&&g0?function(){return i(this,n),l}.bind(this):R(c)?function(t){return i(this,n),t*c}.bind(this):null;return function(t,e){i(this,n);var l=s(t,e),c=+o,u=+!c,h=t.value<0,g=r["axis_"+a.axis.getId(t.id)+"_inverted"],f=!g&&h||g&&!h,p=["",""],v=0,x=a.isGrouped(t.id),b=!(!d||!x)&&a.isStackingRadiusData(t);if(d){var _=o?u:c,m=l[2][_]-l[0][_],y="a"+(v=!x||b?d(m):0)+","+v+" "+(f?"1 0 0":"0 0 1")+" ";p[+!o]=""+y+v+","+v,p[+o]=""+y+[-v,v][o?"sort":"reverse"](),f&&p.reverse()}var T=o?"H"+(l[1][c]+(f?v:-v))+" "+p[0]+"V"+(l[2][u]-v)+" "+p[1]+"H"+l[3][c]:"V"+(l[1][u]+(f?-v:v))+" "+p[0]+"H"+(l[2][c]-v)+" "+p[1]+"V"+l[3][u];return"M"+l[0][c]+","+l[0][u]+T+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this,n=this,a=n.$el,r=n.config,s=n.data,o=n.state,l=t.id,c=t.index,d=t.value;if(o.hiddenTargetIds.indexOf(l)>-1){var u=a.bar.filter(function(t){return i(this,e),t.id===l&&t.value===d}.bind(this));return!u.empty()&&/a\d+/i.test(u.attr("d"))}var h=r.data_groups.find(function(t){return i(this,e),t.indexOf(l)>-1}.bind(this)),g=n.orderTargets(n.filterTargetsToShow(s.targets.filter(n.isBarType,n))).filter(function(t){return i(this,e),h.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return i(this,e),t.values.filter(function(t){return i(this,n),t.index===c&&(R(d)&&d>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return i(this,e),t.id}.bind(this));return 0!==d&&g.indexOf(l)===g.length-1},generateGetBarPoints:function(t,e){var n=this,a=this,r=a.config,s=e?a.axis.subX:a.axis.x,o=a.getIndicesMax(t)+1,l=a.getBarW("bar",s,o),c=a.getShapeX(l,t,!!e),d=a.getShapeY(!!e),u=a.getShapeOffset(a.isBarType,t,!!e),h=a.getYScaleById.bind(a);return function(t,s){i(this,n);var o=t.id,g=h.call(a,o,e)(a.getShapeYMin(o)),f=u(t,s)||g,p=R(l)?l:l[t.id]||l._$width,v=r["axis_"+a.axis.getId(o)+"_inverted"],x=t.value,b=c(t),_=d(t);r.axis_rotated&&!v&&(x>0&&_0&&b.start=e.open),e||null}},_n={initGauge:function(){var t=this,e=this,n=e.config,a=e.$el.arcs,r=function(e){i(this,t),a.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){var s=e.hasMultiArcGauge();a.append(s?"g":"path").attr("class",xt.chartArcsBackground).style("fill",!s&&n.gauge_background||null),n.gauge_units&&r(St.chartArcsGaugeUnit),n.gauge_label_show&&(r(St.chartArcsGaugeMin),n.gauge_fullCircle||r(St.chartArcsGaugeMax))}},updateGaugeMax:function(){var t=this,e=t.config,i=t.state,n=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(i.rendered);n+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=n-e.gauge_min)},redrawMultiArcGauge:function(){var t=this,e=this,n=e.config,r=e.state,s=e.$el,o=e.state.hiddenTargetIds,l=s.main.selectAll("."+xt.arcs).selectAll("."+xt.arcLabelLine).data(e.arcData.bind(e));l.enter().append("rect").attr("class",function(e){return i(this,t),xt.arcLabelLine+" "+vt.target+" "+vt.target+"-"+e.data.id}.bind(this)).merge(l).style("fill",function(n){return i(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){var i=0,n=0,s=0,l="";if(o.indexOf(t.data.id)<0){var c=e.updateAngle(t),d=r.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(c.index+1),u=c.endAngle-Math.PI/2,h=r.radius-d,g=u-(0===h?0:1/h);i=r.radiusExpanded-r.radius+d,n=Math.cos(g)*h,s=Math.sin(g)*h,l="rotate("+180*u/Math.PI+", "+n+", "+s+")"}(0,a.select)(this).attr("x",n).attr("y",s).attr("width",i).attr("height",2).attr("transform",l).style("stroke-dasharray","0, "+(i+2)+", 0")}))},textForGaugeMinMax:function(t,e){var i=this.config.gauge_label_extents;return k(i)?i.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){var t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},mn={initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){var t=this,e=t.state,i=e.width,n=e.height,a=ae,r=t.cache.get(a);return r||t.cache.add(a,r=st("min",[i,n])),r},getBubbleR:function(t){var e=this,n=this,a=n.config.bubble_maxR;k(a)?a=a.bind(n.api)(t):R(a)||(a=n.getBaseLength()/(2*n.getMaxDataCount())+12);var r=st("max",n.getMinMaxData().max.map(function(t){return i(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):F(t.value)?t.value.mid:t.value}.bind(this))),s=a*a*Math.PI,o=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(s/r);return Math.sqrt(o/Math.PI)},getBubbleZData:function(t,e){return F(t)?t[e]:t["y"===e?0:1]}},yn={initLine:function(){var t=this.$el;t.line=t.main.select("."+vt.chart).append("g").attr("class",Ct.chartLines).call(this.setCssRule(!1,"."+Ct.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this,n=this,a=n.$el,r=a.area,s=a.line,o=a.main,l=n.getChartClass("Line"),c=n.getClass("lines",!0),d=n.classFocus.bind(n);s||n.initLine();var u=t.filter(function(t){return i(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),h=o.select("."+Ct.chartLines).selectAll("."+Ct.chartLine).data(u).attr("class",function(t){return i(this,e),l(t)+d(t)}.bind(this)),g=h.enter().append("g").attr("class",l).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(g.append("g").attr("class",c),n.hasTypeOf("Area")){var f=(!r&&g.empty()?h:g).filter(n.isAreaType.bind(n));n.initArea(f)}n.updateTargetForCircle(u,g)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);var a=this,r=a.format.extraLineClasses,s=a.$el,o=a.$T,l=e?s.subchart:s,c=l.main.selectAll("."+Ct.lines).selectAll("."+Ct.line).data(a.lineData.bind(a));o(c.exit(),t).style("opacity","0").remove(),l.line=c.enter().append("path").attr("class",function(t){return i(this,n),a.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",a.color).merge(c).style("opacity",a.initialOpacity.bind(a)).attr("transform",null)},redrawLine:function(t,e,i){void 0===i&&(i=!1);var n=this.$el;return[(0,this.$T)((i?n.subchart:n).line,e,Z()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this,n=this;return n.config.axis_rotated&&n.isStepType(t)?function(a){i(this,e);var r=n.getInterpolate(t)(a);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var i=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,i),this._context.lineTo(t,i),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,a=this,r=a.config,s=a.scale,o=r.line_connectNull,l=r.axis_rotated,c=a.generateGetLinePoints(t,e),d=a.getYScaleById.bind(a),u=function(t){return i(this,n),(e?a.subxx:a.xx).call(a,t)}.bind(this),h=function(t,r){return i(this,n),a.isGrouped(t.id)?c(t,r)[0][1]:d(t.id,e)(a.getBaseValue(t))}.bind(this),g=(0,Ue.line)();g=l?g.x(h).y(u):g.x(u).y(h),o||(g=g.defined(function(t){return i(this,n),null!==a.getBaseValue(t)}.bind(this)));var f=e?s.subX:s.x;return function(t){i(this,n);var c,u=d(t.id,e),h=o?a.filterRemoveNull(t.values):t.values,p=0,v=0;if(a.isLineType(t)){var x=r.data_regions[t.id];x?c=a.lineWithRegions(h,s.zoom||f,u,x):(a.isStepType(t)&&(h=a.convertValuesToStep(h)),c=g.curve(a.getCurve(t))(h))}else h[0]&&(p=f(h[0].x),v=u(h[0].value)),c=l?"M "+v+" "+p:"M "+p+" "+v;return c||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,a){var r,s,o,l,c=this,d=this,u=d.config.axis_rotated,h=d.axis.isTimeSeries(),g=[];if(L(a))for(var f,p=function(t,e){return i(this,c),E(t)?e:h?dt.call(d,t):t}.bind(this),v=0;f=a[v];v++){var x=p(f.start,t[0].x),b=p(f.end,t[t.length-1].x),_=f.style||{dasharray:"2 2"};g[v]={start:x,end:b,style:_}}for(var m,y=u?function(t){return i(this,c),n(t.value)}.bind(this):function(t){return i(this,c),e(t.x)}.bind(this),T=u?function(t){return i(this,c),e(t.x)}.bind(this):function(t){return i(this,c),n(t.value)}.bind(this),w=function(t){return i(this,c),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),A=h?function(t,a,r,l){i(this,c);var d=t.x.getTime(),h=a.x-t.x,g=new Date(d+h*r),f=new Date(d+h*(r+l)),p=u?[[n(s(r)),e(g)],[n(s(r+o)),e(f)]]:[[e(g),n(s(r))],[e(f),n(s(r+o))]];return w(p)}.bind(this):function(t,a,o,l){i(this,c);var d=u?[[n(s(o),!0),e(r(o))],[n(s(o+l),!0),e(r(o+l))]]:[[e(r(o),!0),n(s(o))],[e(r(o+l),!0),n(s(o+l))]];return w(d)}.bind(this),k={x:d.axis.getAxisType("x"),y:d.axis.getAxisType("y")},C="",R=0;m=t[R];R++){var O=t[R-1],P=O&&S(O.value);_=d.isWithinRegions(m.x,g);if(S(m.value))if(!E(g)&&_&&P){if(P){try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}r=He(k.x,O.x,m.x),s=He(k.y,O.value,m.value);var I=e(m.x)-e(O.x),D=n(m.value)-n(O.value),z=Math.sqrt(Math.pow(I,2)+Math.pow(D,2));l=(o=_[0]/z)*_[1];for(var M=o;M<=1;M+=l)C+=A(O,m,M,o),M+l>=1&&(C+=A(O,m,1,0))}}else C+=(R&&P?"L":"M")+y(m)+","+T(m)}return C},isWithinRegions:function(t,e){for(var i,n=0;i=e[n];n++)if(i.start-1?"0":null})),c&&h.forEach(function(t){var e=this;i(this,n),l.main.selectAll("."+zt.selectedCircles+r.getTargetSelectorSuffix(t.id)).selectAll(""+zt.selectedCircle).each(function(n){i(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))}},updateCircle:function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.config,r=n.state,s=n.$el,o=a.point_focus_only,l=t?s.subchart:s;if(a.point_show&&!r.toggling){var c=l.main.selectAll("."+Tt.circles).selectAll("."+Tt.circle).data(function(t){return i(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?o?[t.values[0]]:t.values:[]}.bind(this));c.exit().remove(),c.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),l.circle=l.main.selectAll("."+Tt.circles+" ."+Tt.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,i,n,a){void 0===a&&(a=!1);var r=this,s=r.state.rendered,o=r.$el,l=r.$T,c=a?o.subchart:o,d=c.main.selectAll("."+zt.selectedCircle);if(!r.config.point_show)return[];var u=r.point("update",r,t,e,r.getStylePropValue(r.color),i,n,d),h=r.isCirclePoint()?"c":"",g=Z(),f=r.opacityForCircle.bind(r),p=[];return c.circle.each((function(t){var e=u.bind(this)(t);e=l(e,i||!s,g).style("opacity",f),p.push(e)})),[p,l(d,i).attr(h+"x",t).attr(h+"y",e)]},showCircleFocus:function(t){var e=this,n=e.config,r=e.state,s=r.hasRadar,o=r.resizing,l=r.toggling,c=r.transiting,d=e.$el.circle;if(!1===c&&n.point_focus_only&&d){var u=(s?e.radarCircleX:e.circleX).bind(e),h=(s?e.radarCircleY:e.circleY).bind(e),g=l||E(t),f=e.point("update",e,u,h,e.getStylePropValue(e.color),!o&&g);t&&(d=d.filter((function(e){var n=this,r=null==t.filter?void 0:t.filter(function(t){return i(this,n),t.id===e.id}.bind(this));return!!r.length&&(0,a.select)(this).datum(r[0])}))),d.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){var i=t.id,n=t.index,a=t.value,r="hidden";S(a)&&(f.bind(this)(t),e.expandCircles(n,i),r=""),this.style.visibility=r}))}},hideCircleFocus:function(){var t=this,e=t.config,i=t.$el.circle;e.point_focus_only&&i&&(t.unexpandCircles(),i.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,s){i(this,e);var o=r.id;return n.isGrouped(o)?a(r,s)[0][1]:n.getYScaleById(o,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,i){var n=this,r=n.pointExpandedR.bind(n);i&&n.unexpandCircles();var s=n.getShapeByIndex("circle",t,e).classed(vt.EXPANDED,!0),o=r(s)/n.config.point_r,l=1-o;n.isCirclePoint()?s.attr("r",r):s.each((function(){var t=(0,a.select)(this);if("circle"===this.tagName)t.attr("r",r);else{var e=this.getBBox(),i=e.width,n=e.height,s=l*(+t.attr("x")+i/2),c=l*(+t.attr("y")+n/2);t.attr("transform","translate("+s+" "+c+") scale("+o+")")}}))},unexpandCircles:function(t){var e=this,i=e.pointR.bind(e),n=e.getShapeByIndex("circle",t).filter((function(){return(0,a.select)(this).classed(vt.EXPANDED)})).classed(vt.EXPANDED,!1);if(n.attr("r",i),!e.isCirclePoint()){var r=i(n)/e.config.point_r;n.attr("transform",1!==r?"scale("+r+")":null)}},pointR:function(t){var e=this,i=e.config.point_r,n=i;return e.isBubbleType(t)?n=e.getBubbleR(t):k(i)&&(n=i.bind(e.api)(t)),t.r=n,n},pointExpandedR:function(t){var e=this,i=e.config,n=e.isBubbleType(t)?1.15:1.75;return i.point_focus_expand_enabled?i.point_focus_expand_r||e.pointR(t)*n:e.pointR(t)},pointSelectR:function(t){var e=this.config.point_select_r;return k(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var i=H(this.state.event,t),n=(0,a.select)(t),r=this.isCirclePoint(t)?"c":"",s=+n.attr(r+"x"),o=+n.attr(r+"y");if(!s&&!o&&1===t.nodeType){var l=U(t);s=l.x,o=l.y}return Math.sqrt(Math.pow(s-i[0],2)+Math.pow(o-i[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){var e=this.config.point_sensitivity;return k(e)?e=e.call(this.api,t):"radius"===e&&(e=t.r),e},insertPointInfoDefs:function(t,e){var n,r=this,s=function(t,e){i(this,r);for(var n,a=t.attributes,s=0;n=a[s];s++)n=n.name,e.setAttribute(n,t.getAttribute(n))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,l=h.createElementNS(a.namespaces.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",s(o,l),null!=(n=o.childNodes)&&n.length){var c=(0,a.select)(l);"innerHTML"in l?c.html(o.innerHTML):tt(o.childNodes).forEach(function(t){i(this,r),s(t,c.append(t.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(l)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){var e=this,i=e.$el.circle,n=!1;return(F(t)||i)&&(n=!0===t?i.each((function(t){var i=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(vt.EXPANDED)>-1&&(i+=" "+vt.EXPANDED),this.setAttribute("class",i)})):e.getClass("circle",!0)(t)),n},generateGetLinePoints:function(t,e){var n=this,a=this,r=a.config,s=a.getShapeX(0,t,e),o=a.getShapeY(e),l=a.getShapeOffset(a.isLineType,t,e),c=a.getYScaleById.bind(a);return function(t,d){i(this,n);var u=c.call(a,t.id,e)(a.getShapeYMin(t.id)),h=l(t,d)||u,g=s(t),f=o(t);r.axis_rotated&&(t.value>0&&f2?o-2:0),c=2;ci&&(i=e),i}var Sn={initPolar:function(){var t=this,e=t.$el.arcs,i=t.config,n=i.polar_level_text_show,a=i.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Pt),n&&a&&t.generateDataLabelBackgroundColorFilter(a)},getPolarOuterRadius:function(t,e){var i,n=An(this);return(null!=(i=null==t?void 0:t.data.values[0].value)?i:0)/n*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this,e=this,n=e.config,a=e.state,r=e.$el.arcs.levels,s=n.polar_level_depth,o=An(e),l=ot(0,s),c=a.radius,d=l.map(function(e){return i(this,t),c*((e+1)/s)}.bind(this)),u=(n.polar_level_text_format||function(){}).bind(e.api),h=r.selectAll("."+Ot).data(l);h.exit().remove();var g=h.enter().append("g").attr("class",function(e,n){return i(this,t),Ot+" "+Ot+"-"+n}.bind(this));if(g.append("circle"),g.merge(h).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return i(this,t),d[e]}.bind(this)),n.polar_level_text_show){var f=n.polar_level_text_backgroundColor,p="#"+a.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(f);g.append("text").style("text-anchor","middle"),g.merge(h).selectAll("text").attr("dy",function(e){return i(this,t),5-d[e]}.bind(this)).attr("filter",f?"url("+p+")":null).text(function(e){return i(this,t),u(o/l.length*(e+1))}.bind(this))}}};var kn=de,Cn={initRadar:function(){var t=this,e=t.config,i=t.state.current,n=t.$el;t.hasType("radar")&&(n.radar=n.main.select("."+vt.chart).append("g").attr("class",It.chartRadars),n.radar.levels=n.radar.append("g").attr("class",Pt),n.radar.axes=n.radar.append("g").attr("class",_t.axis),n.radar.shapes=n.radar.append("g").attr("class",Mt.shapes),i.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config,e=this.state,i=e.arcWidth,n=e.arcHeight,a=t.axis_x_categories.length<4?-20:10,r=(Math.min(i,n)-a)/2;return[r,r]},updateTargetsForRadar:function(t){var e=this,n=this.config;M(n.axis_x_categories)&&(n.axis_x_categories=ot(0,st("max",t.map(function(t){return i(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,a){var r=this,s=this.config,o=this.getRadarSize(),l=o[0],c=o[1],d=s.axis_x_categories.length,u=s.radar_direction_clockwise,h=tt(t).map(function(o){return i(this,r),function(t,e,i,n,a,r){var s=t&&n>0?i-n:n,o=2*Math.PI;return a*(1-r*("x"===e?Math.sin:Math.cos)(s*o/i))}(u,o,d,e,L(n)?n:"x"===t?l:c,R(a)?a:s.radar_size_ratio)}.bind(this));return 1===h.length?h[0]:h},generateRadarPoints:function(){var t=this,e=this,n=e.data.targets,a=e.getRadarSize(),r=a[0],s=a[1],o=e.cache.get(kn)||{},l=o._size;(!l||l.width!==r&&l.height!==s)&&(n.forEach(function(n){var a=this;i(this,t),o[n.id]=n.values.map(function(t,n){return i(this,a),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),o._size={width:r,height:s},e.cache.add(kn,o))},redrawRadar:function(){var t=this,e=t.$el,i=e.radar,n=e.main,a=t.getTranslate("radar");a&&(i.attr("transform",a),n.select("."+Xt.chartTexts).attr("transform",a),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this,e=this.cache.get(kn);return function(n,a){i(this,t);var r=e[n.id][a];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this,e=this,n=e.config,a=e.state,r=e.$el.radar,s=e.getRadarSize(),o=s[0],l=s[1],c=n.radar_level_depth,d=n.axis_x_categories.length,u=n.radar_level_text_show,h=r.levels,g=ot(0,c),f=n.radar_size_ratio*Math.min(o,l),p=g.map(function(e){return i(this,t),f*((e+1)/c)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),x=g.map(function(n){var a=this;i(this,t);var r=p[n];return ot(0,d).map(function(t){return i(this,a),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),b=h.selectAll("."+Ot).data(g);b.exit().remove();var _=b.enter().append("g").attr("class",function(e,n){return i(this,t),Ot+" "+Ot+"-"+n}.bind(this));_.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),u&&(h.select("text").empty()&&h.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return i(this,t),v(0)}.bind(this)),_.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return i(this,t),v(a.current.dataMax/g.length*(e+1))}.bind(this))),_.merge(b).attr("transform",function(e){return i(this,t),"translate("+(o-p[e])+", "+(l-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return i(this,t),x[e]}.bind(this)),u&&h.selectAll("text").attr("x",function(e){return i(this,t),E(e)?o:x[e].split(",")[0]}.bind(this)).attr("y",function(e){return i(this,t),E(e)?l:0}.bind(this))},updateRadarAxes:function(){var t=this,e=this,n=e.config,r=e.$el.radar,s=e.getRadarSize(),o=s[0],l=s[1],c=n.axis_x_categories,d=r.axes.selectAll("g").data(c);d.exit().remove();var u=d.enter().append("g").attr("class",function(e,n){return i(this,t),_t.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&u.append("line"),n.radar_axis_text_show&&u.append("text"),d=u.merge(d),n.radar_axis_line_show&&d.select("line").attr("x1",o).attr("y1",l).attr("x2",function(n,a){return i(this,t),e.getRadarPosition("x",a)}.bind(this)).attr("y2",function(n,a){return i(this,t),e.getRadarPosition("y",a)}.bind(this)),n.radar_axis_text_show){var h=n.radar_axis_text_position,g=h.x,f=void 0===g?0:g,p=h.y,v=void 0===p?0:p;d.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){i(this,t),e.each((function(t){V((0,a.select)(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return i(this,t),{index:n}}.bind(this)).attr("transform",(function(t){E(this.width)&&(this.width=this.getBoundingClientRect().width/2);var i=e.getRadarPosition("x",t.index,void 0,1),n=Math.round(e.getRadarPosition("y",t.index,void 0,1));return i>o?i+=this.width+f:Math.round(i)l?(n/2===l&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),n+=v):n=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ln(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=0,p=!i||i.indexOf(h)>=0,v=o.classed(zt.SELECTED);o.classed(Ct.line)||o.classed(bt.area)||(t?f&&p&&c(s)&&!v?g(!0,o.classed(zt.SELECTED,!0),s,h):L(n)&&n&&v&&g(!1,o.classed(zt.SELECTED,!1),s,h):f&&p&&c(s)&&v&&g(!1,o.classed(zt.SELECTED,!1),s,h))}))}var ba={selected:function(t){var e=this,n=this.internal,r=[];return n.$el.main.selectAll("."+(Mt.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Mt.shape).filter((function(){return(0,a.select)(this).classed(zt.SELECTED)})).each(function(t){return i(this,e),r.push(t)}.bind(this)),r},select:function(t,e,i){var n=this.internal;xa.bind(n)(!0,t,e,i)},unselect:function(t,e){var i=this.internal;xa.bind(i)(!1,t,e)}},_a={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,i=t.config,n=i.subchart_show;if(!n){var a,r;t.unbindZoomEvent(),i.subchart_show=!n,e.main||t.initSubchart();var s,o=e.main.selectAll("."+vt.target);if(t.data.targets.length!==o.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),o=null==(s=e.main)?void 0:s.selectAll("."+vt.target);null==(a=o)||a.style("opacity",null),null==(r=e.main)||r.style("display",null),this.resize()}},hide:function(){var t=this.internal,e=t.$el.subchart.main,i=t.config;i.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(i.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){var t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()}}},ma=p(14);var ya=function(t){var e=this,n=this.internal,a=n.$el,r=n.axis,s=n.config,o=n.org,l=n.scale,c=s.axis_rotated,d=s.axis_x_inverted,u=r.isCategorized(),h=t;if(s.zoom_enabled&&h){r.isTimeSeries()&&(h=h.map(function(t){return i(this,e),dt.bind(n)(t)}.bind(this)));var g=function(t,e,n,a){var r=this;void 0===a&&(a=!1);var s=n[0],o=n[1];return t.every(function(n,l){var c=this;return i(this,r),(0===l?a?+n<=s:+n>=s:a?+n>=o:+n<=o)&&!t.every(function(t,n){return i(this,c),t===e[n]}.bind(this))}.bind(this))}(h,n.getZoomDomain(!0),n.getZoomDomain(),d);if(g){if(u&&(h=h.map(function(t,n){return i(this,e),+t+(0===n?0:1)}.bind(this))),n.api.tooltip.hide(),s.subchart_show){var f=l.zoom||l.x;n.brush.getSelection().call(n.brush.move,h.map(f))}else{var p,v=u?l.x.orgScale():o.xScale||l.x,x=[-v(h[0]),0],b=(p=ma.zoomIdentity.scale(v.range()[1]/(v(h[1])-v(h[0])))).translate.apply(p,c?x.reverse():x);a.eventRect.call(n.zoom.transform,b)}n.setZoomResetButton()}}else h=l.zoom?l.zoom.domain():l.x.orgDomain();return h};J(ya,{enable:function(t){var e=this.internal,i=e.config;/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_max=st("max",[n[1],t])),i.zoom_x_max},min:function(t){var e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_min=st("min",[n[0],t])),i.zoom_x_min},range:function(t){var e=this.zoom;if(F(t)){var i=t.min,n=t.max;L(i)&&e.min(i),L(n)&&e.max(n)}return{min:e.min(),max:e.max()}}});var Ta={zoom:ya,unzoom:function(){var t=this.internal,e=t.config,i=t.$el,n=i.eventRect,a=i.zoomResetBtn;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(ma.zoomIdentity),t.updateZoom(!0),null==a||a.style("display","none"),(0,ma.zoomTransform)(n.node())!==ma.zoomIdentity&&t.zoom.transform(n,ma.zoomIdentity))}},wa={drag:function(t){var e=this,n=this,r=n.config,s=n.state,o=n.$el.main,l=r.data_selection_grouped,c=r.interaction_enabled&&r.data_selection_isselectable;if(!n.hasArcType()&&r.data_selection_enabled&&(!r.zoom_enabled||n.zoom.altDomain)&&r.data_selection_multiple){var d=s.dragStart||[0,0],u=d[0],h=d[1],g=t[0],f=t[1],p=Math.min(u,g),v=Math.max(u,g),x=l?s.margin.top:Math.min(h,f),b=l?s.height:Math.max(h,f);o.select("."+At.dragarea).attr("x",p).attr("y",x).attr("width",v-p).attr("height",b-x),o.selectAll("."+Mt.shapes).selectAll("."+Mt.shape).filter(function(t){return i(this,e),null==c?void 0:c.bind(n.api)(t)}.bind(this)).each((function(t,e){var i,r=(0,a.select)(this),s=r.classed(zt.SELECTED),o=r.classed(At.INCLUDED),l=!1;if(r.classed(Tt.circle)){var c=1*+r.attr("cx"),d=1*+r.attr("cy");i=n.togglePoint,l=p0?n:a]}.bind(this))),c&&a[1].reverse(),this.extent(a),this.update()},r.brush.getSelection=function(){return i(this,n),l.main?l.main.select("."+Gt.brush):(0,a.select)([])}.bind(this)},initSubchart:function(){var t=this,e=this,n=e.config,a=e.state,r=a.clip,s=a.hasAxis,o=e.$el,l=o.defs,c=o.svg,d=o.subchart,u=o.axis;if(s){var h=n.subchart_show?null:"hidden",g=r.id+"-subchart",f=e.getClipPath(g);r.idSubchart=g,e.appendClip(l,g),e.initBrush(),d.main=c.append("g").classed(Gt.subchart,!0).attr("transform",e.getTranslate("context"));var p=d.main;p.style("visibility",h),p.append("g").attr("clip-path",f).attr("class",Gt.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){i(this,t);var a=Q(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(a)){var r=p.select("."+Gt.chart),s=Gt["chart"+a+"s"];r.select("."+s).empty()&&r.append("g").attr("class",s)}}.bind(this));var v=p.append("g").attr("clip-path",f).attr("class",Gt.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),u.subX=p.append("g").attr("class",Gt.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?h:"hidden")}},addBrushHandle:function(t){var e=this,n=this.config,a=n.axis_rotated,r=n.subchart_init_range,s=a?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(a?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(a?"ns":"ew")+"-resize").attr("d",function(t){return i(this,e),s[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this,n=this,a=n.config,r=n.state,s=n.$el.subchart.main;a.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return i(this,e),n.hasType(t)||n.hasTypeOf(Q(t))}.bind(this)).forEach(function(a){i(this,e);var r=/^(bubble|scatter)$/.test(a),o=Q(r?"circle":a),l=n.getChartClass(o,!0),c=n.getClass(r?"circles":a+"s",!0),d=s.select("."+Gt["chart"+o+"s"]);if(r){var u=d.selectAll("."+Gt.circles).data(t.filter(n["is"+Q(a)+"Type"].bind(n))).attr("class",c);u.exit().remove(),u.enter().append("g").attr("class",c)}else{var h=d.selectAll("."+Gt["chart"+o]).attr("class",l).data(t.filter(n["is"+o+"Type"].bind(n))),g=h.enter().append("g").style("opacity","0").attr("class",l).append("g").attr("class",c);h.exit().remove(),"line"===a&&n.hasTypeOf("Area")&&g.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),s.selectAll("."+Gt.brush+" rect").attr(a.axis_rotated?"width":"height",a.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var a,r=this,s=this,o=s.config,l=s.$el.subchart.main,c=s.state,d=!!e;if((l.style("visibility",o.subchart_show?null:"hidden"),o.subchart_show)&&("zoom"===(null==(a=c.event)?void 0:a.type)&&s.brush.update(),t)){var u=o.subchart_init_range;if(K(s)||s.brush.update(),Object.keys(n.type).forEach(function(t){i(this,r);var e=Q(t),a=s["generateDraw"+e](n.indices[t],!0);s["update"+e](d,!0),s["redraw"+e](a,d,!0)}.bind(this)),s.hasType("bubble")||s.hasType("scatter")){var h=n.pos.cx,g=s.updateCircleY(!0);s.updateCircle(!0),s.redrawCircle(h,g,d,void 0,!0)}!c.rendered&&u&&s.brush.move(s.brush.getSelection(),u.map(s.scale.x))}},redrawForBrush:function(){var t=this,e=t.config,i=e.subchart_onbrush,n=e.zoom_rescale,a=t.scale;t.redraw({withTransition:!1,withY:n,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),i.bind(t.api)(a.x.orgDomain())},transformContext:function(t,e){var i=this,n=i.$el.subchart,a=i.$T,r=null!=e&&e.axisSubX?e.axisSubX:a(n.main.select("."+Gt.axisX),t);n.main.attr("transform",i.getTranslate("context")),r.attr("transform",i.getTranslate("subX"))},getExtent:function(){var t=this,e=this,n=e.config,a=e.scale,r=n.axis_x_extent;if(r)if(k(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),a.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){var s=dt.bind(e);r=r.map(function(e){return i(this,t),a.subX(s(e))}.bind(this))}return r}},Ra={initZoom:function(){var t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);var e=this,i=e.config;i.zoom_enabled&&t?i.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this,e=this,n=e.config,a=e.org,r=e.scale,s=(0,ma.zoom)().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));s.orgScaleExtent=function(){i(this,t);var a=n.zoom_extent||[1,10];return[a[0],Math.max(e.getMaxDataCount()/a[1],a[1])]}.bind(this),s.updateScaleExtent=function(){var t=D(e.scale.x.orgDomain())/D(e.getZoomDomain()),i=this.orgScaleExtent();return this.scaleExtent([i[0]*t,i[1]*t]),this},s.updateTransformScale=function(s,o){var l;i(this,t);var c=n.axis_rotated;null==(l=a.xScale)||l.range(r.x.range());var d=s[c?"rescaleY":"rescaleX"](a.xScale||r.x),u=e.trimXDomain(d.domain()),h=n.zoom_rescale;if(d.domain(u,a.xDomain),o){var g=d(r.x.domain()[0]),f=c?s.x:g,p=c?g:s.y;e.$el.eventRect.property("__zoom",ma.zoomIdentity.translate(f,p).scale(s.k))}e.state.xTickOffset||(e.state.xTickOffset=e.axis.x.tickOffset()),r.zoom=e.getCustomizedXScale(d),e.axis.x.scale(r.zoom),h&&(a.xScale||(a.xScale=r.x.copy()),r.x.domain(u))}.bind(this),s.getDomain=function(){i(this,t);var n=r[r.zoom?"zoom":"subX"].domain();return e.axis.isCategorized()&&(n[1]-=2),n}.bind(this),e.zoom=s},onZoomStart:function(t){var e=this,i=t.sourceEvent;i&&(e.zoom.startEvent=i,e.state.zooming=!0,N(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e=this,n=this,a=n.config,r=n.scale,s=n.state,o=n.org,l=t.sourceEvent,c=(null==t?void 0:t.transform)===ma.zoomIdentity;if(!(!a.zoom_enabled||0===n.filterTargetsToShow(n.data.targets).length||!r.zoom&&(null==l?void 0:l.type.indexOf("touch"))>-1&&1===(null==l?void 0:l.touches.length))){t.sourceEvent&&(s.zooming=!0);var d="mousemove"===(null==l?void 0:l.type),u=(null==l?void 0:l.wheelDelta)<0,h=t.transform;!d&&u&&r.x.domain().every(function(t,n){return i(this,e),t!==o.xDomain[n]}.bind(this))&&r.x.domain(o.xDomain),n.zoom.updateTransformScale(h,"wheel"===a.zoom_type&&l);var g=a.transition_duration>0&&!a.subchart_show&&(s.dragging||c||!t.sourceEvent);n.redraw({withTransition:g,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n.state.cancelClick=d,c||N(a.zoom_onzoom,n.api,n.zoom.getDomain())}},onZoomEnd:function(t){var e,i,n=this,a=n.config,r=n.state,s=n.zoom.startEvent,o=null==t?void 0:t.sourceEvent,l=(null==t?void 0:t.transform)===ma.zoomIdentity;(null==(e=s)?void 0:e.type.indexOf("touch"))>-1&&(s=s.changedTouches[0],o=null==(i=o)||null==(i=i.changedTouches)?void 0:i[0]);"drag"===a.zoom_type&&o&&s.clientX===o.clientX&&s.clientY===o.clientY||(n.redrawEventRect(),n.updateZoom(),r.zooming=!1,!l&&(o||r.dragging)&&N(a.zoom_onzoomend,n.api,n.zoom.getDomain()))},updateZoom:function(t){var e=this,i=e.scale,n=i.subX,a=i.x,r=i.zoom;if(r){var s=r.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),a.domain(n.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this,e=this,n=e.config,a=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){i(this,t)}.bind(this)),a.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t,e=this,n=this,a=n.config,r=n.state,s=a.axis_rotated,o=0,l=0,c={axis:s?"y":"x",attr:s?"height":"width",index:s?1:0};n.zoomBehaviour=(0,Pe.drag)().clickDistance(4).on("start",(function(e){r.event=e,n.setDragStatus(!0),n.unselectRect(),t||(t=n.$el.main.append("rect").attr("clip-path",r.clip.path).attr("class",Nt.zoomBrush).attr("width",s?r.width:0).attr("height",s?0:r.height)),o=H(e,this)[c.index],l=o,t.attr(c.axis,o).attr(c.attr,0),n.onZoomStart(e)})).on("drag",(function(e){l=H(e,this)[c.index],t.attr(c.axis,Math.min(o,l)).attr(c.attr,Math.abs(l-o))})).on("end",function(a){var s=this;i(this,e);var d=n.scale.zoom||n.scale.x;if(r.event=a,t.attr(c.axis,0).attr(c.attr,0),o>l){var u=[l,o];o=u[0],l=u[1]}o<0&&(l+=Math.abs(o),o=0),o!==l&&n.api.zoom([o,l].map(function(t){return i(this,s),d.invert(t)}.bind(this))),n.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){var t=this,e=t.config,i=t.$el,n=e.zoom_resetButton;n&&"drag"===e.zoom_type&&(i.zoomResetBtn?i.zoomResetBtn.style("display",null):i.zoomResetBtn=t.$el.chart.append("div").classed(vt.button,!0).append("span").on("click",(function(){k(n.onclick)&&n.onclick.bind(t.api)(this),t.api.unzoom()})).classed(Nt.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}},Ea=void 0,La={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return i(this,Ea),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){i(this,Ea)}.bind(void 0),data_onunselected:function(){i(this,Ea)}.bind(void 0)},Oa={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){i(this,undefined)}.bind(void 0)},Pa={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},Ia=void 0,Da=function(){var t=this;return i(this,Ia),J(si.prototype,ka),J(Ti.prototype,ba),ne.setOptions([La]),(Da=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),za=function(){var t=this;return i(this,Ia),J(si.prototype,Ca),J(Ti.prototype,_a),ne.setOptions([Oa]),(za=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Ma=function(){var t=this;return i(this,Ia),J(si.prototype,Ra),J(Ti.prototype,Ta),ne.setOptions([Pa]),(Ma=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),$a={},Xa={version:"3.9.2-nightly-20230805003715",generate:function(t){var e=at({},$a,t),i=new Ti(e);return i.internal.charts=this.instance,this.instance.push(i),i},defaults:function(t){return F(t)&&($a=t),$a},instance:[],plugin:{}},Fa=void 0;Object.keys(t).forEach(function(e){return i(this,Fa),t[e]()}.bind(void 0)),Object.keys(e).forEach(function(t){return i(this,Fa),e[t]()}.bind(void 0))}(),v}()})); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom"));else if("function"==typeof define&&define.amd)define(["d3-axis","d3-brush","d3-drag","d3-dsv","d3-ease","d3-hierarchy","d3-interpolate","d3-scale","d3-selection","d3-shape","d3-time-format","d3-transition","d3-zoom"],e);else{var i="object"==typeof exports?e(require("d3-axis"),require("d3-brush"),require("d3-drag"),require("d3-dsv"),require("d3-ease"),require("d3-hierarchy"),require("d3-interpolate"),require("d3-scale"),require("d3-selection"),require("d3-shape"),require("d3-time-format"),require("d3-transition"),require("d3-zoom")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(this,(function(t,e,i,n,a,r,s,o,l,c,d,u,h){return function(){"use strict";var g=[,,function(t){t.exports=l},function(t){t.exports=e},function(t){t.exports=d},function(t){t.exports=n},function(t){t.exports=o},function(t){t.exports=i},function(t){t.exports=u},function(t){t.exports=c},function(e){e.exports=t},function(t){t.exports=a},function(t){t.exports=s},function(t){t.exports=r},function(t){t.exports=h}],f={};function p(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return g[t](i,i.exports,p),i.exports}p.d=function(t,e){for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var v={};return function(){p.r(v),p.d(v,{bb:function(){return Xa},default:function(){return Xa}});var t={};p.r(t),p.d(t,{area:function(){return Qn},areaLineRange:function(){return ta},areaSpline:function(){return ea},areaSplineRange:function(){return ia},areaStep:function(){return na},bar:function(){return ha},bubble:function(){return ga},candlestick:function(){return fa},donut:function(){return oa},gauge:function(){return la},line:function(){return aa},pie:function(){return ca},polar:function(){return da},radar:function(){return ua},scatter:function(){return pa},spline:function(){return ra},step:function(){return sa},treemap:function(){return va}});var e={};function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}p.r(e),p.d(e,{selection:function(){return Da},subchart:function(){return za},zoom:function(){return Ma}});var n=p(4),a=p(2),r=void 0,s=function(){return i(this,r),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),o="function"==typeof s.requestAnimationFrame,l="function"==typeof s.requestIdleCallback,c=o?s.requestAnimationFrame:function(t){return i(this,r),setTimeout(t,1)}.bind(void 0),d=o?s.cancelAnimationFrame:function(t){return i(this,r),clearTimeout(t)}.bind(void 0),u=l?s.requestIdleCallback:c,h=(l&&s.cancelIdleCallback,null==s?void 0:s.document),g={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},f={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},x={Area:[g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.AREA_STEP],AreaRange:[g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE],Arc:[g.PIE,g.DONUT,g.GAUGE,g.POLAR,g.RADAR],Line:[g.LINE,g.SPLINE,g.AREA,g.AREA_SPLINE,g.AREA_SPLINE_RANGE,g.AREA_LINE_RANGE,g.STEP,g.AREA_STEP],Step:[g.STEP,g.AREA_STEP],Spline:[g.SPLINE,g.AREA_SPLINE,g.AREA_SPLINE_RANGE]};function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function _(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===b(e)?e:String(e)}function m(t,e,i){return(e=_(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var y=p(3),T=void 0;function w(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e,i=1;i2?n-2:0),r=2;r/g,">"):t}function V(t,e,n,a){var r=this;if(void 0===n&&(n=[-1,1]),void 0===a&&(a=!1),t&&C(e))if(-1===e.indexOf("\n"))t.text(e);else{var s=[t.text(),e].map(function(t){return i(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(s[0]!==s[1]){var o=e.split("\n"),l=a?o.length-1:1;t.html(""),o.forEach(function(e,a){i(this,r),t.append("tspan").attr("x",0).attr("dy",(0===a?n[0]*l:n[1])+"em").text(e)}.bind(this))}}}function Y(t){var e=t.getBBox(),i=e.x,n=e.y,a=e.width,r=e.height;return[{x:i,y:n+r},{x:i,y:n},{x:i+a,y:n},{x:i+a,y:n+r}]}function H(t,e){var n,r=t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0]),s=(0,a.pointer)(r||t,e),o=this;return s.map(function(t){return i(this,o),isNaN(t)?0:t}.bind(this))}function W(t){var e,i=t.event,n=t.$el,a=n.subchart.main||n.main;return i&&"brush"===i.type?e=i.selection:a&&(e=a.select(".bb-brush").node())&&(e=(0,y.brushSelection)(e)),e}function U(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function Z(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===i&&(i=1e4);var n=s.crypto||s.msCrypto,a=n?e+n.getRandomValues(new Uint32Array(1))[0]%(i-e+1):Math.floor(Math.random()*(i-e)+e);return t?a+"":a}function q(t,e,i,n,a){if(i>n)return-1;var r=Math.floor((i+n)/2),s=t[r],o=s.x,l=s.w,c=void 0===l?0:l;return a&&(o=t[r].y,c=t[r].h),e>=o&&e<=o+c?r:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},Jt={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},Qt=void 0,te={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){i(this,Qt)}.bind(void 0),tooltip_onhide:function(){i(this,Qt)}.bind(void 0),tooltip_onshown:function(){i(this,Qt)}.bind(void 0),tooltip_onhidden:function(){i(this,Qt)}.bind(void 0),tooltip_order:null};function ee(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ie(t){for(var e,i=1;i0){if(void 0===e[a-1]&&(e[a-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+i+", "+a+")!");e[a-1][n]=t}}))})),e}function Te(t){var e=t[0],i=[];return t.forEach((function(t,n){if(n>0){var a={};t.forEach((function(t,i){if(void 0===t)throw new Error("Source data is missing a component at ("+n+", "+i+")!");a[e[i]]=t})),i.push(a)}})),i}function we(t,e){var i,n,a=[];if(Array.isArray(t)){i=e.x?e.value.concat(e.x):e.value,a.push(i),t.forEach((function(t){var e=i.map((function(e){var i=function(t,e){if(void 0!==t[e])return t[e];var i=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),n=t;return i.some((function(t){return!(n=n&&t in n?n[t]:void 0)})),n}(t,e);return void 0===i&&(i=null),i}));a.push(e)})),n=Te(a)}else Object.keys(t).forEach((function(e){var i=t[e].concat();null==i.unshift||i.unshift(e),a.push(i)})),n=ye(a);return n}function Ae(t,e){var n,a=this,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach(function(t){i(this,a),n[0][t]=null}.bind(this))):n=t.parse(e),n}function Se(t){return Ae({rows:me.csvParseRows,parse:me.csvParse},t)}function ke(t){return Ae({rows:me.tsvParseRows,parse:me.tsvParse},t)}function Ce(t,e){var i=t||(null==e?void 0:e.data_keys);return null!=i&&i.x&&(e.data_x=i.x),i}var Re={convertData:function(t,e){var n=this,a=this.config,r=a.boost_useWorker,s=t;if(t.bindto&&(s={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){i(this,n);var a="data_"+e;a in t&&(s[e]=t[a])}.bind(this))),s.url&&e)!function(t,e,i,n,a){void 0===e&&(e="csv");var r=new XMLHttpRequest,s={csv:Se,tsv:ke,json:we};r.open("GET",t),i&&Object.keys(i).forEach((function(t){r.setRequestHeader(t,i[t])})),r.onreadystatechange=function(){if(4===r.readyState){if(200!==r.status)throw new Error(t+": Something went wrong loading!");var i=r.responseText;i&&a.call(this,s[e]("json"===e?JSON.parse(i):i,n))}},r.send()}(s.url,s.mimeType,s.headers,Ce(s.keys,a),e);else if(s.json)_e(r,we,e,[ye,Te])(s.json,Ce(s.keys,a));else if(s.rows)_e(r,Te,e)(s.rows);else if(s.columns)_e(r,ye,e)(s.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this,a=this,r=a.axis,s=a.config,o=a.state,l=s.data_type,c=!1,d=!1,u=!1;r&&(c=r.isCategorized(),d=r.isTimeSeries(),u=r.isCustomX());var h,g=Object.keys(t[0]||{}),f=g.length?g.filter(a.isNotX,a):[],p=g.length?g.filter(a.isX,a):[];f.forEach(function(r){var o=this;i(this,n);var l=this.getXKey(r);u||d?p.indexOf(l)>=0?h=(e&&a.data.xs[r]||[]).concat(t.map(function(t){return i(this,o),t[l]}.bind(this)).filter(S).map(function(t,e){return i(this,o),a.generateTargetX(t,r,e)}.bind(this))):s.data_x?h=this.getOtherTargetXs():$(s.data_xs)&&(h=a.getXValuesOfXKey(l,a.data.targets)):h=t.map(function(t,e){return i(this,o),e}.bind(this)),h&&(this.data.xs[r]=h)}.bind(this)),f.forEach(function(t){if(i(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));var v=f.map(function(e,r){var l=this;i(this,n);var d=s.data_idConverter.bind(a.api)(e),h=a.getXKey(e),g=u&&c,f=g&&t.map(function(t){return i(this,l),t.x}.bind(this)).every(function(t){return i(this,l),s.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===h&&p?a.api.data.values(e).length:0;return{id:d,id_org:e,values:t.map(function(t,n){i(this,l);var c,u=t[h],x=t[e];return x=null===x||isNaN(x)||F(x)?X(x)||F(x)?x:null:+x,!g&&!o.hasRadar||0!==r||E(u)?c=a.generateTargetX(u,e,v+n):(f||0!==r||0!==n||p||(s.axis_x_categories=[]),-1===(c=s.axis_x_categories.indexOf(u))&&(c=s.axis_x_categories.length,s.axis_x_categories.push(u))),(E(x)||a.data.xs[e].length<=n)&&(c=void 0),{x:c,value:x,id:d,index:-1}}.bind(this)).filter(function(t){return i(this,l),L(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;i(this,n),s.data_xSort&&(t.values=t.values.sort(function(t,e){return i(this,r),(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return i(this,r),t.index=e}.bind(this)),null==(e=a.data.xs[t.id])||e.sort(function(t,e){return i(this,r),t-e}.bind(this))}.bind(this)),o.hasNegativeValue=a.hasNegativeValueInTargets(v),o.hasPositiveValue=a.hasPositiveValueInTargets(v),l&&a.isValidChartType(l)){var x=a.mapToIds(v).filter(function(t){return i(this,n),!(t in s.data_types)||!a.isValidChartType(s.data_types[t])}.bind(this));a.setTargetType(x,l)}return v.forEach(function(t){return i(this,n),a.cache.add(t.id_org,t,!0)}.bind(this)),v}},Ee={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,a=$(e.data_xs)&&function(t,e){var n=this,a=!1;return Object.keys(t).forEach(function(r){return i(this,n),t[r]===e&&(a=!0)}.bind(this)),a}(e.data_xs,t);return n||a},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this,n=this.config.data_groups;return t?n.some(function(n){return i(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:$(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,a=this,r=this;return(e&&$(e)?r.mapToIds(e):[]).forEach(function(e){i(this,a),r.getXKey(e)===t&&(n=r.data.xs[e])}.bind(this)),n},getIndexByX:function(t,e){return e?e.indexOf(C(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var i=this;return t in i.data.xs&&i.data.xs[t]&&S(i.data.xs[t][e])?i.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t1?e=rt(it(e=e.map(function(e){return i(this,t),e.values}.bind(this)).reduce(function(e,n){return i(this,t),e.concat(n)}.bind(this)).map(function(e){return i(this,t),e.x}.bind(this)))).map(function(e,n,r){return i(this,t),{x:e,index:a?r.length-n-1:n}}.bind(this)):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return i(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?X(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var i,n=this.mapToIds(t),a=0;i=n[a];a++)if(i===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this,n=this;return(t||n.data.targets).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this,n=this.axis,a=[];return null!=t&&t.length&&(a=it(nt(t.map(function(t){var n=this;return i(this,e),t.values.map(function(t){return i(this,n),+t.x}.bind(this))}.bind(this)))),a=null!=n&&n.isTimeSeries()?a.map(function(t){return i(this,e),new Date(+t)}.bind(this)):a.map(Number)),rt(a)},addTargetIds:function(t,e){var n=this,a=this.state;(X(e)?e:[e]).forEach(function(e){i(this,n),a[t].indexOf(e)<0&&a[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this,a=this.state;(X(e)?e:[e]).forEach(function(e){i(this,n);var r=a[t].indexOf(e);r>=0&&a[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=this,a=n.state.hasAxis,r={},s=n.isMultipleX(),o=s?n.mapTargetsToUniqueXs(t).map(function(t){return i(this,e),C(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var l=this;i(this,e);var c=[];t.values.filter(function(t){var e=t.value;return i(this,l),S(e)||null===e}.bind(this)).forEach(function(t){i(this,l);var e=t.value;null!==e&&n.isCandlestickType(t)&&(e=X(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),X(e)?c.push.apply(c,e):F(e)&&"high"in e?c.push.apply(c,Object.values(e)):n.isBubbleZType(t)?c.push(a&&n.getBubbleZData(e,"y")):s?c[n.getIndexByX(t.x,o)]=e:c.push(e)}.bind(this)),r[t.id]=c}.bind(this)),r},checkValueInTargets:function(t,e){for(var i,n=Object.keys(t),a=0;a1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return i(this,e),t>0}.bind(this))},orderTargets:function(t){var e=[].concat(t),i=this.getSortCompareFn();return i&&e.sort(i),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);var n,a=this.config.data_order,r=/asc/i.test(a),s=/desc/i.test(a);if(r||s){var o=function(t,n){return i(this,e),t+Math.abs(n.value)}.bind(this);n=function(n,a){i(this,e);var s="values"in n?n.values.reduce(o,0):n.value,l="values"in a?a.values.reduce(o,0):a.value;return t?r?s-l:l-s:r?l-s:s-l}.bind(this)}else k(a)&&(n=a.bind(this.api));return n||null},filterByX:function(t,e){var n=this;return nt(t.map(function(t){return i(this,n),t.values}.bind(this))).filter(function(t){return i(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return i(this,e),S(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var a=this;return i(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return i(this,a),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){var t=this.config.data_labels;return O(t)&&t||z(t)&&$(t)},getDataIndexFromEvent:function(t){var e,i=this.config,n=this.state,r=n.hasRadar,s=n.inputType,o=n.eventReceiver,l=o.coords,c=o.rect;if(r){var d=t.target;/tspan/i.test(d.tagName)&&(d=d.parentNode);var u=(0,a.select)(d).datum();e=u&&1===Object.keys(u).length?u.index:void 0}else{var h=i.axis_rotated,g="touch"===s&&t.changedTouches?t.changedTouches[0]:t;e=q(l,h?g.clientY-c.top:g.clientX-c.left,0,l.length-1,h)}return e},getDataLabelLength:function(t,e,n){var a=this,r=this,s=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i(this,a),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){s[e]=1.3*this.getBoundingClientRect()[n]})).remove(),s},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var i,n=t[e].x,a=[];for(i=e-1;i>=0&&n===t[i].x;i--)a.push(t[i]);for(i=e;i=0&&n?n[a]:void 0}return n?n[e]:n},setRatioForGroupedData:function(t){var e=this,n=this;if(n.config.data_groups.length&&t.some(function(t){return i(this,e),n.isGrouped(t.id)}.bind(this))){var a=function(t){return i(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){i(this,e),"values"in t?t.values.forEach(a):a(t)}.bind(this))}},getRatio:function(t,e,n){var a=this;void 0===n&&(n=!1);var r=this,s=r.config,o=r.state,l=r.api,c=0;if(e&&l.data.shown().length)if(c=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())c=e.value/r.getTotalDataSum(!0);else{var d=s.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),u=r.hasType("gauge")?d:2*Math.PI;c=(e.endAngle-e.startAngle)/u}else if("index"===t){var h=l.data.values.bind(l),g=this.getTotalPerIndex();if(o.hiddenTargetIds.length){var f=h(o.hiddenTargetIds,!1);f.length&&(f=f.reduce(function(t,e){var n=this;return i(this,a),t.map(function(t,a){return i(this,n),(R(t)?t:0)+e[a]}.bind(this))}.bind(this)),g=g.map(function(t,e){return i(this,a),t-f[e]}.bind(this)))}var p=g[e.index];e.ratio=R(e.value)&&g&&p?e.value/p:0,c=e.ratio}else if("radar"===t)c=parseFloat(Math.max(e.value,0)+"")/o.current.dataMax*s.radar_size_ratio;else if("bar"===t){var v=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return i(this,a),e-t}.bind(this));c=0===v?0:Math.abs(e.value)/v}else"treemap"===t&&(c/=r.getTotalDataSum(!0));return n&&c?100*c:c},updateDataIndexByX:function(t){var e=this,n=t.reduce(function(t,n,a){return i(this,e),t[+n.x]=a,t}.bind(this),{});this.data.targets.forEach(function(t){var a=this;i(this,e),t.values.forEach(function(t,e){i(this,a);var r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(F(t.value)&&("z"in t.value||"y"in t.value)||X(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this,n=t.value;return this.isBarType(t)&&X(n)&&n.length>=2&&n.every(function(t){return i(this,e),R(t)}.bind(this))},getDataById:function(t){var e,i=this.cache.get(t)||this.api.data(t);return null!=(e=null==i?void 0:i[0])?e:i}};function Le(t,e){void 0===e&&(e=!1);var i=this.api;e&&this.api.flush(!0),null==t||t.call(i)}var Oe={load:function(t,e){var n=this,a=this,r=a.data,s=e.append,o=t;o&&(e.filter&&(o=o.filter(e.filter)),(e.type||e.types)&&o.forEach(function(t){var r;i(this,n);var s=(null==(r=e.types)?void 0:r[t.id])||e.type;a.setTargetType(t.id,s)}.bind(this)),r.targets.forEach(function(t){i(this,n);for(var e=0;e=0?Gt.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?Gt.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,i){void 0===e&&(e=""),void 0===i&&(i="");var n=this.getTargetSelectorSuffix(t);return e+"."+(Gt.target+n)+" "+i+", "+e+"."+(Gt.circles+n)+" "+i},selectorTargets:function(t,e){var n=this,a=t||[];return a.length?a.map(function(t){return i(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(Gt.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return i(this,e),this.selectorLegend(t)}.bind(this)):null}},ze=p(6),Me=function(t,e,n){i(this,undefined);var r=(0,a.select)(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}}.bind(void 0);var $e=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Xe={generateColor:function(){var t=this,e=this,n=e.$el,a=e.config,r=a.data_colors,s=a.data_color,o=[],l=$(a.color_pattern)?a.color_pattern:(0,ze.scaleOrdinal)(function(t){var e=this,n=re,a=h.body,r=a[n];if(!r){var s=t.classed(wt.colorPattern,!0).style("background-image");t.classed(wt.colorPattern,!1),s.indexOf(";")>-1&&(r=s.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return i(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),a[n]=r)}return r}(n.chart)||$e).range(),c=l;if(k(a.color_tiles)){var d=a.color_tiles.bind(e.api)(),u=l.map(function(n,a){i(this,t);var r=n.replace(/[#\(\)\s,]/g,""),s=e.state.datetimeId+"-pattern-"+r+"-"+a;return Me(d[a%d.length],n,s)}.bind(this));l=u.map(function(e){return i(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=u}return function(t){var i,n,d=t.id||(null==(i=t.data)?void 0:i.id)||t,u=e.isTypeOf(d,["line","spline","step"])||!a.data_types[d];return k(r[d])?n=r[d].bind(e.api)(t):r[d]?n=r[d]:(o.indexOf(d)<0&&o.push(d),n=u?c[o.indexOf(d)%c.length]:l[o.indexOf(d)%l.length],r[d]=n),k(s)?s.bind(e.api)(n,t):n}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,a=i.max||100,r=i.values&&i.values.length?i.values:[];return $(i)?function(t){for(var i=n?t:100*t/a,s=e[e.length-1],o=0,l=r.length;o')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this,e=this,n=e.config,a=e.data.targets,r=e.state.datetimeId,s=e.$el.defs;a.forEach(function(a){var o=this;i(this,t);var l=r+"-gradient"+e.getTargetSelectorSuffix(a.id),c=e.isAreaType(a)?"area":e.isBarType(a)&&"bar",d=n.axis_rotated;if(c&&s.select("#"+l).empty()){var u=e.color(a),h=n[c+"_linearGradient"],g=h.x,f=void 0===g?d?[1,0]:[0,0]:g,p=h.y,v=void 0===p?d?[0,0]:[0,1]:p,x=h.stops,b=void 0===x?[[0,u,1],[1,u,0]]:x,_=s.append("linearGradient").attr("id",""+l).attr("x1",f[0]).attr("x2",f[1]).attr("y1",v[0]).attr("y2",v[1]);b.forEach(function(t){i(this,o);var n=k(t[1])?t[1].bind(e.api)(a.id):t[1];_.append("stop").attr("offset",t[0]).attr("stop-color",n||u).attr("stop-opacity",t[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this,a=this,r=a.config,s=a.$el.main,o=r.color_onover,l=t?o:a.color;F(l)?l=function(t){var e=t.id;return i(this,n),e in o?o[e]:a.color(e)}.bind(this):C(l)?l=function(){return i(this,n),o}.bind(this):k(o)&&(l=l.bind(a.api)),s.selectAll(F(e)?"."+xt.arc+a.getTargetSelectorSuffix(e.id):"."+Mt.shape+"-"+e).style("fill",l)}},Fe={getYDomainMinMax:function(t,e){var n=this,a=this,r=a.axis,s=a.config,o="min"===e,l=s.data_groups,c=a.mapToIds(t),d=a.getValuesAsIdKeyed(t);if(l.length>0){var u=a["has"+(o?"Negative":"Positive")+"ValueInTargets"](t);l.forEach(function(t){var e=this;i(this,n);var a=t.filter(function(t){return i(this,e),c.indexOf(t)>=0}.bind(this));if(a.length){var s=a[0],l=r.getId(s);u&&d[s]&&(d[s]=d[s].map(function(t){return i(this,e),(o?t<0:t>0)?t:0}.bind(this))),a.filter(function(t,n){return i(this,e),n>0}.bind(this)).forEach(function(t){var n=this;if(i(this,e),d[t]){var a=r.getId(t);d[t].forEach(function(t,e){i(this,n);var r=+t;a!==l||u&&(o?r>0:r<0)||(d[s][e]+=r)}.bind(this))}}.bind(this))}}.bind(this))}return st(e,Object.keys(d).map(function(t){return i(this,n),st(e,d[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this,n=this;return n.state.hiddenTargetIds.some(function(a){return i(this,e),n.axis.getId(a)===t}.bind(this))},getYDomain:function(t,e,n){var a=this,r=this,s=r.axis,o=r.config,l=r.scale,c="axis_"+e;if(r.isStackNormalized())return[0,100];var d=(null==l?void 0:l[e])&&"log"===l[e].type,u=t.filter(function(t){return i(this,a),s.getId(t.id)===e}.bind(this)),h=n?r.filterByXDomain(u,n):u;if(0===h.length)return r.isHiddenTargetWithYDomain(e)?l[e].domain():"y2"===e?l.y.domain():r.getYDomain(t,"y2",n);var f=o[c+"_min"],p=o[c+"_max"],v=o[c+"_center"],b=o[c+"_inverted"],_=r.hasDataLabel()&&o.axis_rotated,m=r.hasDataLabel()&&!o.axis_rotated,y=r.getYDomainMinMax(h,"min"),T=r.getYDomainMinMax(h,"max"),w=[g.BAR,g.BUBBLE,g.SCATTER].concat(x.Line).some(function(t){i(this,a);var e=t.indexOf("area")>-1?"area":t;return r.hasType(t,h,!0)&&o[e+"_zerobased"]}.bind(this));y=S(f)?f:S(p)?y<=p?y:p-10:y,T=S(p)?p:S(f)?f<=T?T:f+10:T,isNaN(y)&&(y=0),isNaN(T)&&(T=y),y===T&&(y<0?T=0:y=0);var A=y>=0&&T>=0,k=y<=0&&T<=0;(S(f)&&A||S(p)&&k)&&(w=!1),w&&(A&&(y=0),k&&(T=0));var C=Math.abs(T-y),R={top:.1*C,bottom:.1*C};if(L(v)){var E=Math.max(Math.abs(y),Math.abs(T));T=v+E,y=v-E}if(_){var O=D(l.y.range()),P=r.getDataLabelLength(y,T,"width").map(function(t){return i(this,a),t/O}.bind(this));["bottom","top"].forEach(function(t,e){i(this,a),R[t]+=C*(P[e]/(1-P[0]-P[1]))}.bind(this))}else if(m){var I=r.getDataLabelLength(y,T,"height");["bottom","top"].forEach(function(t,e){i(this,a),R[t]+=r.convertPixelToScale("y",I[e],C)}.bind(this))}R=r.getResettedPadding(R);var z=o[c+"_padding"];$(z)&&["bottom","top"].forEach(function(t){i(this,a),R[t]=s.getPadding(z,t,R[t],C)}.bind(this)),w&&(A&&(R.bottom=y),k&&(R.top=-T));var M=d?[y,T].map(function(t){return i(this,a),t<0?0:t}.bind(this)):[y-R.bottom,T+R.top];return b?M.reverse():M},getXDomainMinMax:function(t,e){var n,a=this,r=this.config["axis_x_"+e],s=st(e,t.map(function(t){var n=this;return i(this,a),st(e,t.values.map(function(t){return i(this,n),t.x}.bind(this)))}.bind(this))),o=F(r)?r.value:r;return o=L(o)&&null!=(n=this.axis)&&n.isTimeSeries()?dt.bind(this)(o):o,F(r)&&r.fit&&("min"===e&&os)&&(o=void 0),L(o)?o:s},getXDomainPadding:function(t,e){var i,n=this,a=n.axis,r=n.config.axis_x_padding,s=a.isTimeSeries()&&e,o=D(t);if(a.isCategorized()||s)i=0;else if(n.hasType("bar")){var l=n.getMaxDataCount();i=l>1?o/(l-1)/2:.5}else i=n.getResettedPadding(.01*o);var c=R(r)?{left:r,right:r}:r,d=c.left,u=void 0===d?i:d,h=c.right,g=void 0===h?i:h;if("px"===r.unit){var f=Math.abs(o+.2*o);u=a.getPadding(r,"left",i,f),g=a.getPadding(r,"right",i,f)}else{var p=o+u+g;if(s&&p){var v=o/e/p;u=u/p/v,g=g/p/v}}return{left:u,right:g}},getXDomain:function(t){var e=this,i=e.axis,n=e.config,a=e.scale.x,r=n.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],o=s[0],l=void 0===o?0:o,c=s[1],d=void 0===c?0:c;if("log"!==a.type){var u=i.isCategorized(),h=i.isTimeSeries(),g=e.getXDomainPadding(s),f=s[0],p=s[1];f-p!=0||u||(h?(f=new Date(.5*f.getTime()),p=new Date(1.5*p.getTime())):(f=0===f?1:.5*f,p=0===p?-1:1.5*p)),(f||0===f)&&(l=h?new Date(f.getTime()-g.left):f-g.left),(p||0===p)&&(d=h?new Date(p.getTime()+g.right):p+g.right)}return r?[d,l]:[l,d]},updateXDomain:function(t,e,i,n,a){var r,s=this,o=s.config,l=s.org,c=s.scale,d=c.x,u=c.subX,h=o.zoom_enabled;i&&(d.domain(a||rt(s.getXDomain(t),!o.axis_x_inverted)),l.xDomain=d.domain(),h&&s.zoom.updateScaleExtent(),u.domain(d.domain()),null==(r=s.brush)||r.scale(u));if(e){var g=a||!s.brush||K(s)?l.xDomain:W(s).map(u.invert);d.domain(g),h&&s.zoom.updateScaleExtent()}return n&&d.domain(s.trimXDomain(d.orgDomain())),d.domain()},trimXDomain:function(t){var e=this.config.axis_x_inverted,i=this.getZoomDomain(),n=i[0],a=i[1];return(e?t[0]>=n:t[0]<=n)&&(t[0]=n,t[1]=+t[1]+(n-t[0])),(e?t[1]<=a:t[1]>=a)&&(t[0]=+t[0]-(t[1]-a),t[1]=a),t},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,i=e[0],n=e[1];return L(t.zoom_x_min)&&(i=st("min",[i,t.zoom_x_min])),L(t.zoom_x_max)&&(n=st("max",[n,t.zoom_x_max])),[i,n]},convertPixelToScale:function(t,e,i){var n=this.config,a=this.state,r=n.axis_rotated;return i*(e/a["x"===t?r?"height":"width":r?"width":"height"])}};function Be(t,e,i){var n=t.config,a="axis_"+e+"_tick_format";return(n[a]?n[a]:t.defaultValueFormat).call(t.api,i)}var Ne={yFormat:function(t){return Be(this,"y",t)},y2Format:function(t){return Be(this,"y2",t)},getDefaultValueFormat:function(){var t=this,e=t.defaultArcValueFormat,i=t.yFormat,n=t.y2Format,a=t.hasArcType(null,["gauge","polar","radar"]);return function(r,s,o){return(a?e:t.axis&&"y2"===t.axis.getId(o)?n:i).call(t,r,s)}},defaultValueFormat:function(t){return S(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this,n=this.config.data_labels,a=function(t){return i(this,e),S(t)?+t:""}.bind(this),r=a;return k(n.format)?r=n.format:z(n.format)&&(r=n.format[t]?!0===n.format[t]?a:n.format[t]:function(){return i(this,e),""}.bind(this)),r.bind(this.api)}};function Ge(t){var e=this,i=e.getDataById(t);return e.levelColor?e.levelColor(i.values[0].value):e.color(i)}var je={initLegend:function(){var t=this,e=t.config,i=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(i.legend=t.$el.svg.append("g").classed(kt.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,i){var n,a=this,r=a.config,s=a.state,o=a.scale,l=a.$el,c=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};c.withTransition=B(c,"withTransition",!0),c.withTransitionForTransform=B(c,"withTransitionForTransform",!0),r.legend_contents_bindto&&r.legend_contents_template?a.updateLegendTemplate():s.hasTreemap||a.updateLegendElement(t||a.mapToIds(a.data.targets),c,i),null==(n=l.legend)||n.selectAll("."+kt.legendItem).classed(kt.legendItemHidden,(function(t){var e=!a.isTargetToShow(t);return e&&(this.style.opacity=null),e})),a.updateScales(!1,!o.zoom),a.updateSvgSize(),a.transformAll(c.withTransitionForTransform,i),s.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=this,n=e.config,r=e.$el,s=(0,a.select)(n.legend_contents_bindto),o=n.legend_contents_template;if(!s.empty()){var l=e.mapToIds(e.data.targets),c=[],d="";l.forEach(function(n){i(this,t);var a=k(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):ct(o,{COLOR:e.color(n),TITLE:n});a&&(c.push(n),d+=a)}.bind(this));var u=s.html(d).selectAll((function(){return this.childNodes})).data(c);e.setLegendItem(u),r.legend=s}},updateSizeForLegend:function(t){var e=this,i=e.config,n=e.state,a=n.isLegendTop,r=n.isLegendLeft,s=n.isLegendRight,o=n.isLegendInset,l=n.current,c=t.width,d=t.height,u={top:a?e.getCurrentPaddingTop()+i.legend_inset_y+5.5:l.height-d-e.getCurrentPaddingBottom()-i.legend_inset_y,left:r?e.getCurrentPaddingLeft()+i.legend_inset_x+.5:l.width-c-e.getCurrentPaddingRight()-i.legend_inset_x+.5};e.state.margin3={top:s?0:o?u.top:l.height-d,right:NaN,bottom:0,left:s?l.width-c:o?u.left:0}},transformLegend:function(t){var e=this,i=e.$el.legend;(0,e.$T)(i,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var i=this.$el.legend;i&&i.select("."+kt.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){var t=this.state,e=t.current.width,i=t.isLegendRight,n=t.isLegendInset,a=t.legendItemWidth,r=t.legendStep;return this.config.legend_show?i||n?a*(r+1):e:0},getLegendHeight:function(){var t,e=this,i=e.state,n=i.current,a=i.isLegendRight,r=i.legendItemHeight,s=i.legendStep,o="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?a?n.height:(o?10:Math.max(20,r))*(s+1):0},opacityForUnfocusedLegend:function(t){return t.classed(kt.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,r=this,s=r.$el.legend,o=r.$T,l=r.mapToTargetIds(t);s&&o(s.selectAll("."+kt.legendItem).filter(function(t){return i(this,n),l.indexOf(t)>=0}.bind(this)).classed(Et.legendItemFocused,e)).style("opacity",(function(){return e?null:r.opacityForUnfocusedLegend.call(r,(0,a.select)(this))}))},revertLegend:function(){var t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+kt.legendItem).classed(Et.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){var e=this,i=e.config,n=e.$el,a=e.$T;i.legend_show||(i.legend_show=!0,n.legend?n.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),a(n.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){var e=this,i=e.config,n=e.$el.legend;i.legend_show&&M(t)&&(i.legend_show=!1,n.style("visibility","hidden")),e.addHiddenLegendIds(t),n.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var i,n=this,a=n.cache,r=n.state,s=ce;return t&&((i=!r.redrawing&&a.get(s)||{})[t]||(i[t]=n.getTextRect(e,kt.legendItem),a.add(s,i)),i=i[t]),i},setLegendItem:function(t){var e=this,n=this,r=n.$el,s=n.api,o=n.config,l=n.state,c="touch"===l.inputType,d=n.hasType("gauge"),u=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){var e=(0,a.select)(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(kt.legendItem,t)})).style("visibility",function(t){return i(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(u&&[["."+kt.legendItem,"cursor:pointer"],["."+kt.legendItem+" text","pointer-events:none"],["."+kt.legendItemPoint+" text","pointer-events:none"],["."+kt.legendItemTile,"pointer-events:none"],["."+kt.legendItemEvent,"fill-opacity:0"]].forEach(function(t){i(this,e);var a=t[0],s=t[1];n.setCssRule(!1,a,[s])(r.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||k(o.legend_item_onclick)?function(t,e){if(!N(o.legend_item_onclick,s,e)){var i=t.altKey,r=t.target;"dblclick"===t.type||i?l.hiddenTargetIds.length&&-1===r.parentNode.getAttribute("class").indexOf(kt.legendItemHidden)?s.show():(s.hide(),s.show(e)):(s.toggle(e),(0,a.select)(this).classed(Et.legendItemFocused,!1))}c&&n.hideTooltip()}:null),c||t.on("mouseout",h||k(o.legend_item_onout)?function(t,e){N(o.legend_item_onout,s,e)||((0,a.select)(this).classed(Et.legendItemFocused,!1),d&&n.undoMarkOverlapped(n,"."+St.gaugeValue),n.api.revert())}:null).on("mouseover",h||k(o.legend_item_onover)?function(t,e){N(o.legend_item_onover,s,e)||((0,a.select)(this).classed(Et.legendItemFocused,!0),d&&n.markOverlapped(e,n,"."+St.gaugeValue),!l.transiting&&n.isTargetToShow(e)&&s.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n,a,r,s=this,o=this,l=o.config,c=o.state,d=o.$el.legend,u=o.$T,h="circle"!==l.legend_item_tile_type,g=l.legend_item_tile_r,f={width:h?l.legend_item_tile_width:2*g,height:h?l.legend_item_tile_height:2*g},p={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},v={offsets:{},widths:{},heights:{},margins:[0],steps:{}},x=t.filter(function(t){return i(this,s),!L(l.data_names[t])||null!==l.data_names[t]}.bind(this)),b=e.withTransition,_=o.getUpdateLegendPositions(x,p,v);c.isLegendInset&&(p.step=l.legend_inset_step?l.legend_inset_step:x.length,o.updateLegendStep(p.step)),c.isLegendRight?(n=function(t){return i(this,s),p.max.width*v.steps[t]}.bind(this),a=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):c.isLegendInset?(n=function(t){return i(this,s),p.max.width*v.steps[t]+10}.bind(this),a=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):(n=function(t){return i(this,s),v.margins[v.steps[t]]+v.offsets[t]}.bind(this),a=function(t){return i(this,s),p.max.height*v.steps[t]}.bind(this));var m={xText:function(t,e){return i(this,s),n(t,e)+4+f.width}.bind(this),xRect:function(t,e){return i(this,s),n(t,e)}.bind(this),x1Tile:function(t,e){return i(this,s),n(t,e)-2}.bind(this),x2Tile:function(t,e){return i(this,s),n(t,e)-2+f.width}.bind(this),yText:function(t,e){return i(this,s),a(t,e)+9}.bind(this),yRect:function(t,e){return i(this,s),a(t,e)-5}.bind(this),yTile:function(t,e){return i(this,s),a(t,e)+4}.bind(this)};o.generateLegendItem(x,f,_,m),r=d.select("."+kt.legendBackground+" rect"),c.isLegendInset&&p.max.width>0&&0===r.size()&&(r=d.insert("g","."+kt.legendItem).attr("class",kt.legendBackground).append("rect")),u(d.selectAll("text").data(x).text(function(t){return i(this,s),L(l.data_names[t])?l.data_names[t]:t}.bind(this)).each((function(t,e){_(this,t,e)})),b).attr("x",m.xText).attr("y",m.yText),u(d.selectAll("rect."+kt.legendItemEvent).data(x),b).attr("width",function(t){return i(this,s),v.widths[t]}.bind(this)).attr("height",function(t){return i(this,s),v.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),o.updateLegendItemPos(x,b,m),r&&u(r,b).attr("height",o.getLegendHeight()-12).attr("width",p.max.width*(p.step+1)+10),o.updateLegendItemWidth(p.max.width),o.updateLegendItemHeight(p.max.height),o.updateLegendStep(p.step)},getUpdateLegendPositions:function(t,e,n){var a=this,r=a.config,s=a.state,o=s.isLegendRight||s.isLegendInset;return function(l,c,d){var u,h=this,g=d===t.length-1,f=a.getLegendItemTextBox(c,l),p=f.width+e.tileWidth+(g&&!o?0:e.padding.right)+r.legend_padding,v=f.height+e.padding.top,x=o?v:p,b=o?a.getLegendHeight():a.getLegendWidth(),_=function(t,i){i||(u=(b-e.totalLength-x)/2)=e.max.width)&&(e.max.width=p),(!e.max.height||v>=e.max.height)&&(e.max.height=v);var m=o?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return i(this,h),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return i(this,h),n.heights[t]=e.max.height}.bind(this)),(u=(b-m*t.length)/2)1&&d&&(o&&(f+=d*o),g>2?f-=(g-1)*d/2:2===g&&(f-=d/2)),f}.bind(this)},getShapeY:function(t){var e=this,n=this,a=n.isStackNormalized();return function(r){i(this,e);var s=r.value;return R(r)?s=r:a?s=n.getRatio("index",r,!0):n.isBubbleZType(r)?s=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(s=s[1]),n.getYScaleById(r.id,t)(s)}.bind(this)},getShapeYMin:function(t){var e=this,i=e.axis.getId(t),n=e.scale[i].domain()[0],a=e.config["axis_"+i+"_inverted"];return!e.isGrouped(t)&&!a&&n>0?n:0},getShapeOffsetData:function(t){var e=this,n=this,a=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),s=a.map(function(t){var a=this;i(this,e);var s=t.values,o={};n.isStepType(t)&&(s=n.convertValuesToStep(s));var l=s.reduce(function(t,e){i(this,a);var s=+e.x;return t[s]=e,o[s]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:s,rowValueMapByXValue:l,values:o}}.bind(this));return{indexMapByTargetId:a.reduce(function(t,n,a){var r=n.id;return i(this,e),t[r]=a,t}.bind(this),{}),shapeOffsetTargets:s}},getShapeOffset:function(t,e,n){var a=this,r=this,s=r.getShapeOffsetData(t),o=s.shapeOffsetTargets,l=s.indexMapByTargetId,c=r.config.data_groupsZeroAs;return function(t,s){var d=this;i(this,a);var u=t.id,h=t.value,g=t.x,f=r.getIndices(e,t),p=r.getYScaleById(u,n);if(r.isBarRangeType(t))return p(h[0]);var v=+g,x=p("zero"===c?0:r.getShapeYMin(u)),b=x;return o.filter(function(t){return i(this,d),t.id!==u&&f[t.id]===f[u]}.bind(this)).forEach(function(t){i(this,d);var e=t.id,n=t.rowValueMapByXValue,a=t.rowValues,r=t.values;if(l[e]=0&&R(g))(0!==h||("positive"===c&&g>0||"negative"===c&&g<0))&&(b+=p(g)-x)}}.bind(this)),b}.bind(this)},getBarW:function(t,e,n){var a=this,r=this,s=r.config,o=r.org,l=r.scale,c=r.getMaxDataCount(),d="bar"===t&&s.data_groups.length,u=t+"_width",h=l.zoom&&!r.axis.isCategorized()?o.xDomain.map(function(t){return i(this,a),l.zoom(t)}.bind(this)).reduce(function(t,e){return i(this,a),Math.abs(t)+e}.bind(this))/c:e.tickInterval(c),g=function(t){i(this,a);var e=t?s[u][t]:s[u],r=t?e.ratio:s[u+"_ratio"],o=t?e.max:s[u+"_max"],l=R(e)?e:n?h*r/n:0;return o&&l>o?o:l}.bind(this),f=g();return!d&&z(s[u])&&(f={_$width:f,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){i(this,a),s[u][t.id]&&(f[t.id]=g(t.id),f._$total.push(f[t.id]||f._$width))}.bind(this))),f},getShapeByIndex:function(t,e,n){var a=this,r=this.$el,s=S(e)?"-"+e:"",o=r[t];return o=o&&!o.empty()?o.filter(function(t){return i(this,a),!n||t.id===n}.bind(this)).filter(function(t){return i(this,a),!S(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+Gt[t+"s"]+this.getTargetSelectorSuffix(n)):r.main).selectAll("."+Gt[t]+s)},isWithinShape:function(t,e){var i,n=this,r=(0,a.select)(t);return n.isTargetToShow(e.id)?null!=n.hasValidPointType&&n.hasValidPointType(t.nodeName)?i=n.isStepType(e)?n.isWithinStep(t,n.getYScaleById(e.id)(e.value)):n.isWithinCircle(t,n.isBubbleType(e)?1.5*n.pointSelectR(e):0):"path"===t.nodeName&&(i=!r.classed(Gt.bar)||n.isWithinBar(t)):i=!1,i},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:Ue.curveBasis,"basis-closed":Ue.curveBasisClosed,"basis-open":Ue.curveBasisOpen,bundle:Ue.curveBundle,cardinal:Ue.curveCardinal,"cardinal-closed":Ue.curveCardinalClosed,"cardinal-open":Ue.curveCardinalOpen,"catmull-rom":Ue.curveCatmullRom,"catmull-rom-closed":Ue.curveCatmullRomClosed,"catmull-rom-open":Ue.curveCatmullRomOpen,"monotone-x":Ue.curveMonotoneX,"monotone-y":Ue.curveMonotoneY,natural:Ue.curveNatural,"linear-closed":Ue.curveLinearClosed,linear:Ue.curveLinear,step:Ue.curveStep,"step-after":Ue.curveStepAfter,"step-before":Ue.curveStepBefore}[e]},getInterpolateType:function(t){var e=this,i=e.config,n=i.spline_interpolation_type,a=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?a:e.isStepType(t)?i.line_step_type:"linear"},isWithinBar:function(t){var e=H(this.state.event,t),i=Y(t),n=i[0],a=i[1],r=Math.min(n.x,a.x),s=Math.min(n.y,a.y),o=this.config.bar_sensitivity,l=t.getBBox(),c=l.width,d=l.height;return r-o0?i:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){var t=this,e=t.config,i=t.state.hasAxis,n=t.$el,a=i?e.axis_y2_axes.length:0,r=S(e.padding_top)?e.padding_top:0;return n.title&&n.title.node()&&(r+=t.getTitlePadding()),a&&e.axis_rotated&&(r+=t.getHorizontalAxisHeight("y2")*a),r},getCurrentPaddingBottom:function(){var t=this,e=t.config,i=t.state.hasAxis,n=e.axis_rotated?"y":"x",a=i?e["axis_"+n+"_axes"].length:0;return(S(e.padding_bottom)?e.padding_bottom:0)+(a?t.getHorizontalAxisHeight(n)*a:0)},getCurrentPaddingLeft:function(t){var e,i=this,n=i.config,a=i.state.hasAxis,r=n.axis_rotated,s="fit"===(null==(e=n.padding)?void 0:e.mode),o=r?"x":"y",l=a?n["axis_"+o+"_axes"].length:0,c=a?i.getAxisWidthByAxisId(o,t):0;s||(c=P(c));var d=n["axis_"+o+"_inner"]||!n["axis_"+o+"_show"]?0:c;return S(n.padding_left)?d=n.padding_left+(s&&r?c:0):a&&r&&(d=n.axis_x_show?s?c:Math.max(c,40):1),a&&(s||n["axis_"+o+"_inner"])&&n["axis_"+o+"_label"].text&&(d+=i.axis.getAxisLabelPosition("y").isOuter?20:0),d+c*l},getCurrentPaddingRight:function(t){var e,i;void 0===t&&(t=!1);var n=this,a=n.config,r=n.state.hasAxis,s=a.axis_rotated,o="fit"===(null==(e=a.padding)?void 0:e.mode),l=o?2:10,c=n.state.isLegendRight?n.getLegendWidth()+20:0,d=r?a.axis_y2_axes.length:0,u=null!=(i=n.axis)&&i.getAxisLabelPosition("y2").isOuter?20:0,h=t?n.axis.getXAxisTickTextY2Overflow(l):0,g=r&&!a.axis_y2_inner?n.getAxisWidthByAxisId("y2"):1;o||(g=P(g));var f=s?0:Math.max(g+c,h);return S(a.padding_right)?f=a.padding_right+(o&&(s||!a.axis_y2_show?l:f))+(r&&!o?1:0):n.axis&&s?f=l+c:!n.axis||a.axis_y2_show&&!a.axis_y2_inner||(f=Math.max((o&&!a.axis_y2_show?2:1)+c+u,h)),r&&!s&&o&&a.axis_y2_show&&!a.axis_y2_inner&&a.axis_y2_label.text&&(f+=u),f+g*d},getParentRectValue:function(t){for(var e="offset"+Q(t),i=this.$el.chart.node(),n=0;n<30&&i&&"BODY"!==i.tagName;){try{n=i.getBoundingClientRect()[t]}catch(t){e in i&&(n=i[e])}i=i.parentNode}var a=h.body[e];return n>a&&(n=a),n},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,i=e.config,n=e.$el,a=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,r=i.axis_rotated?_t.axisX:_t.axisY,s=n.main.select("."+r).node(),o=s&&a?s.getBoundingClientRect():{right:0},l=n.chart.node().getBoundingClientRect(),c=e.hasArcType(),d=o.right-l.left-(c?0:e.getCurrentPaddingLeft(t));return d>0?d:0},updateDimension:function(t){var e,i=this,n=i.config,a=i.state.hasAxis,r=i.$el;a&&!t&&i.axis.x&&n.axis_rotated&&(null==(e=i.axis.subX)||e.create(r.axis.subX));i.updateScales(t),i.updateSvgSize(),i.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,i=e.clip,n=e.current,a=e.hasAxis,r=e.width,s=e.height,o=t.$el.svg;if(o.attr("width",n.width).attr("height",n.height),a){var l=o.select("."+$t.brush+" .overlay"),c={width:0,height:0};l.size()&&(c.width=+l.attr("width"),c.height=+l.attr("height")),o.selectAll(["#"+i.id,"#"+i.idGrid]).select("rect").attr("width",r).attr("height",s),o.select("#"+i.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),o.select("#"+i.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),i.idSubchart&&o.select("#"+i.idSubchart).select("rect").attr("width",r).attr("height",c.height)}},getCurrentPadding:function(){var t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this,n=this.config,a=R(t),r=a?0:{};return!1===n.padding?a||Object.keys(t).forEach(function(a){i(this,e),r[a]=M(n.data_labels)||!1===n.data_labels||"top"!==a?0:t[a]}.bind(this)):r=t,r},updateSizes:function(t){var e,i=this,n=i.config,a=i.state,r=i.$el.legend,s=n.axis_rotated,o=i.hasArcType()||a.hasTreemap,l="fit"===(null==(e=n.padding)?void 0:e.mode);t||i.setContainerSize();var c={width:r?i.getLegendWidth():0,height:r?i.getLegendHeight():0};!o&&n.axis_x_show&&n.axis_x_tick_autorotate&&i.updateXAxisTickClip();var d=a.isLegendRight||a.isLegendInset?0:c.height,u=s||o?0:i.getHorizontalAxisHeight("x"),h=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?u:30,g=n.subchart_show&&!o?n.subchart_size_height+h:0,f=i.hasType("gauge")&&n.arc_needle_show&&!n.gauge_fullCircle&&!n.gauge_label_show?10:0,p=i.getCurrentPadding();if(a.margin=!o&&s?{top:i.getHorizontalAxisHeight("y2")+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:i.getHorizontalAxisHeight("y")+d+p.bottom,left:g+(o?0:p.left)}:{top:(l?0:4)+p.top,right:o?0:i.getCurrentPaddingRight(!0),bottom:f+u+g+d+p.bottom,left:o?0:p.left},a.margin=i.getResettedPadding(a.margin),a.margin2=s?{top:a.margin.top,right:NaN,bottom:20+d,left:i.state.rotatedPadding.left}:{top:a.current.height-g-d,right:NaN,bottom:h+d,left:a.margin.left},a.margin3={top:0,right:NaN,bottom:0,left:0},null==i.updateSizeForLegend||i.updateSizeForLegend(c),a.width=a.current.width-a.margin.left-a.margin.right,a.height=a.current.height-a.margin.top-a.margin.bottom,a.width<0&&(a.width=0),a.height<0&&(a.height=0),a.width2=s?a.margin.left-a.rotatedPadding.left-a.rotatedPadding.right:a.width,a.height2=s?a.height:a.current.height-a.margin2.top-a.margin2.bottom,a.width2<0&&(a.width2=0),a.height2<0&&(a.height2=0),i.hasArcType()){var v=i.hasType("gauge"),x=n.legend_show&&a.isLegendRight;a.arcWidth=a.width-(x?c.width+10:0),a.arcHeight=a.height-(x&&!v?0:10),v&&!n.gauge_fullCircle&&(a.arcHeight+=a.height-i.getPaddingBottomForGauge()),null==i.updateRadius||i.updateRadius()}a.isLegendRight&&o&&(a.margin3.left=a.arcWidth/2+1.1*a.radiusExpanded)}},Ke={setCssRule:function(t,e,n,a){var r=this,s=this,o=s.config,l=s.state,c=l.cssRule,d=l.style;return o.boost_useCssRule?function(o){var l=this;i(this,r),o.each(function(r){var o=this;i(this,l);var u=a&&(null==a?void 0:a.call(s,r)),h=(t?"."+(Mt.shapes+s.getTargetSelectorSuffix(r.id)):"")+e;e in c&&d.sheet.deleteRule(c[h]),s.state.cssRule[h]=function(t,e,n){var a=this,r=t.rootSelctor,s=t.sheet,o=r+" "+function(t){return i(this,a),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return s[s.insertRule?"insertRule":"addRule"](o,s.cssRules.length)}(d,h,n.filter(Boolean).map(function(t){return i(this,o),C(u)&&-1===t.indexOf(":")?t+": "+u:t||""}.bind(this)))}.bind(this))}.bind(this):function(){i(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:k(t)?t.bind(this):t}};function Je(t,e,i,n,a){var r,s=t.value,o=this.isCandlestickType(t),l=R(s)&&s<0||o&&!(null!=(r=this.getCandlestickData(t))&&r._isUp),c=e.x,d=e.y;return n?"start"===i?(c+=l?0:8,d+=4):"middle"===i?(c+=8,d-=8):"end"===i&&(l&&(c-=8),d+=4):("start"===i?(c+=4,l&&(d+=16)):"middle"===i?d-=8:"end"===i&&(c-=4,l&&(d+=16)),a&&(d+=l?-17:o?13:7)),{x:c,y:d}}function Qe(t,e){var i,n=this.config.data_labels_position,a=t.id,r=t.index,s=t.value;return null!=(i=k(n)?n.bind(this.api)(e,s,a,r,this.$el.text):(a in n?n[a]:n)[e])?i:0}var ti={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){var t=this.$el;t.main.select("."+vt.chart).append("g").attr("class",Xt.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this,n=this,a=n.getChartClass("Text"),r=n.getClass("texts","id"),s=n.classFocus.bind(n);n.$el.main.select("."+Xt.chartTexts).selectAll("."+Xt.chartText).data(t).attr("class",function(t){return i(this,e),(""+a(t)+s(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",a).call(n.setCssRule(!0," ."+Xt.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this,e=this,n=e.$el,r=e.$T,s=e.config,o=e.axis,l=e.getClass("text","index"),c=s.data_labels.centered,d=n.main.selectAll("."+Xt.texts).selectAll("."+Xt.text).data(e.labelishData.bind(e));r(d.exit()).style("fill-opacity","0").remove(),n.text=d.enter().append("text").merge(d).attr("class",l).attr("text-anchor",function(n){i(this,t);var a=s["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){var r=e.getCandlestickData(n);a=!(null!=r&&r._isUp)}else if(e.isTreemapType(n))return c?"middle":"start";return s.axis_rotated?a?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,i,n){var r=(0,a.select)(this),s=t.value;if(e.isBubbleZType(t))s=e.getBubbleZData(s,"z");else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(s=o.close)}s=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(s,t.id,i,n),R(s)?this.textContent=s:V(r,s)}))},updateTextColor:function(t){var e,i=this,n=i.config,a=n.data_labels_colors,r=i.isArcType(t)&&!i.isRadarType(t)||i.isTreemapType(t)?null:i.color(t);if(C(a))e=a;else if(F(a)){e=a[(t.data||t).id]}else k(a)&&(e=a.bind(i.api)(r,t));if(i.isCandlestickType(t)&&!k(a)){var s=i.getCandlestickData(t);if(null==s||!s._isUp){var o=n.candlestick_color_down;e=F(o)?o[t.id]:o}}return e||r},updateTextBacgroundColor:function(t){var e=this,i=e.$el,n=e.config.data_labels_backgroundColors,a="";if(C(n)||F(n)){var r=C(n)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=i.defs.select(["filter[id*='labels-bg","']"].join(r));s.size()&&(a="url(#"+s.attr("id")+")")}return a||null},redrawText:function(t,e,i,n){var a=this,r=a.$T,s=a.axis,o=a.config,l=a.state.hasTreemap,c=Z(!0),d=o.axis_rotated,u=o.data_labels.rotate,h=function(t){var e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(u),g=u?"rotate("+u+")":"";return a.$el.text.style("fill",a.getStylePropValue(a.updateTextColor)).attr("filter",a.updateTextBacgroundColor.bind(a)).style("fill-opacity",i?0:a.opacityForText.bind(a)).each((function(i,f){var p=r(l&&this.childElementCount?this.parentNode:this,!(!n||!this.getAttribute("x")),c),v=o["axis_"+(null==s?void 0:s.getId(i.id))+"_inverted"],x={x:t.bind(this)(i,f),y:e.bind(this)(i,f)};u&&(x=Je.bind(a)(i,x,h,d,v),p.attr("text-anchor",h)),this.childElementCount||u?p.attr("transform","translate("+x.x+" "+x.y+") "+g):p.attr("x",x.x).attr("y",x.y)})),!0},getTextRect:function(t,e){var n=this,r=this,s=t.node?t.node():t;/text/i.test(s.tagName)||(s=s.querySelector("text"));var o=s.textContent,l=ge+"-"+o.replace(/\W/g,"_"),c=r.cache.get(l);return c||(r.$el.svg.append("text").style("visibility","hidden").style("font",(0,a.select)(s).style("font")).classed(e,!0).text(o).call(function(t){i(this,n),c=U(t.node())}.bind(this)).remove(),r.cache.add(l,c)),c},generateXYForText:function(t,e){var n=this,a=this,r=a.state,s=r.hasRadar,o=r.hasTreemap,l=Object.keys(t),c={},d=e?a.getXForText:a.getYForText;return s&&l.push("radar"),o&&l.push("treemap"),l.forEach(function(e){i(this,n),c[e]=a["generateGet"+Q(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){var i=(a.isAreaType(t)?"area":a.isBarType(t)&&"bar")||a.isCandlestickType(t)&&"candlestick"||a.isRadarType(t)&&"radar"||a.isTreemapType(t)&&"treemap"||"line";return d.call(a,c[i](t,e),t,this)}},getCenteredTextPos:function(t,e,i,n){var a=this,r=a.config,s=r.axis_rotated,o=a.isBarType(t),l=a.isTreemapType(t);if(r.data_labels.centered&&(o||l)){var c=U(i);if(o){var d=t.value>=0;if(s){var u=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+c.width/2;return d?-u-3:u+2}var h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+c.height/2;return d?h:-h-2}if(l)return"x"===n?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+c.height/2}return 0},getXForText:function(t,e,i){var n,a=this,r=a.config,s=a.state,o=r.axis_rotated,l=a.isTreemapType(e),c=t[0][0];if(a.isCandlestickType(e))o?c=null!=(n=a.getCandlestickData(e))&&n._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(l)c+=r.data_labels.centered?0:5;else if(o){var d=r["axis_"+a.axis.getId(e.id)+"_inverted"],u=a.isBarType(e)?4:6,h=e.value;c=t[2][1],d?c-=u*(h>0?1:-1):c+=u*(h<0?-1:1)}else c=a.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>s.width){var g=U(i).width;c=s.width-g}else c<0&&(c=4);return(o||l)&&(c+=a.getCenteredTextPos(e,t,i,"x")),c+Qe.call(this,e,"x")},getYForText:function(t,e,i){var n,a=this,r=a.axis,s=a.config,o=a.state,l=s.axis_rotated,c=s["axis_"+(null==r?void 0:r.getId(e.id))+"_inverted"],d=a.isBarType(e),u=a.isTreemapType(e),h=s.point_r,g=U(i),f=e.value,p=3;if(a.isCandlestickType(e))f=a.getCandlestickData(e),l?(n=t[0][0],n+=(t[1][0]-n)/2+p):(n=f&&f._isUp?t[2][2]-p:t[2][1]+4*p,c&&(n+=15*(f._isUp?1:-1)));else if(u)n=t[0][1]+(s.data_labels.centered?0:g.height+5);else if(l)n=(t[0][0]+t[2][0]+.6*g.height)/2;else if(n=t[2][1],R(h)&&h>5&&(a.isLineType(e)||a.isScatterType(e))&&(p+=s.point_r/2.3),f<0||0===f&&!o.hasPositiveValue&&o.hasNegativeValue)n+=c?d?-3:-5:g.height+(d?-p:p);else{var v=2*-p;d?v=-p:a.isBubbleType(e)&&(v=p),c&&(v=d?10:15),n+=v}if(null===e.value&&!l){var x=g.height;no.height&&(n=o.height-4)}return l&&!u||(n+=a.getCenteredTextPos(e,t,i,"y")),n+Qe.call(this,e,"y")},markOverlapped:function(t,e,n){var r=this,s=e.$el.arcs.selectAll(n),o=s.filter(function(e){return i(this,r),e.data.id!==t}.bind(this)),l=s.filter(function(e){return i(this,r),e.data.id===t}.bind(this)),c=et(l.node()),d=function(t,e){return i(this,r),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);l.node()&&o.each((function(){var t=et(this),e=(0,a.select)(this),i=d(c.e,c.f)>d(t.e,t.f)?l:e,n=Math.ceil(Math.abs(c.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function ei(t,e){void 0===t&&(t="left");var i=R(e);return t.indexOf("center")>-1?i?e/2:"middle":t.indexOf("right")>-1?i?e:"end":i?0:"start"}var ii={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),V(e.title.append("text").style("text-anchor",ei(t.title_position)).attr("class",Xt.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var t=this,e=t.config,i=t.state.current,n=t.$el.title;if(n){var a=t.yForTitle.call(t);/g/i.test(n.node().tagName)?n.attr("transform","translate("+ei(e.title_position,i.width)+", "+a+")"):n.attr("x",t.xForTitle.call(t)).attr("y",a)}},xForTitle:function(){var t,e=this,i=e.config,n=e.state.current,a=i.title_position||"left",r=e.getTextRect(e.$el.title,Xt.title).width;return/(right|center)/.test(a)?(t=n.width-r,a.indexOf("right")>=0?t=n.width-r-i.title_padding.right:a.indexOf("center")>=0&&(t=(n.width-r)/2)):t=i.title_padding.left||0,t},yForTitle:function(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,Xt.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},ni={initTooltip:function(){var t=this,e=t.config,i=t.$el;i.tooltip=(0,a.select)(e.tooltip_contents.bindto),i.tooltip.empty()&&(i.tooltip=i.chart.append("div").attr("class",Ft.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this,e=this,n=e.config,a=e.$el,r=e.state,s=r.hasAxis,o=r.hasRadar;if(n.tooltip_init_show){var l,c,d=!(s&&o);if(null!=(l=e.axis)&&l.isTimeSeries()&&C(n.tooltip_init_x)){var u,h,g=e.data.targets[0];for(n.tooltip_init_x=dt.call(e,n.tooltip_init_x),u=0;(h=g.values[u])&&h.x-n.tooltip_init_x!=0;u++);n.tooltip_init_x=u}var f=e.data.targets.map(function(a){i(this,t);var r=d?0:n.tooltip_init_x;return e.addName(a.values[r])}.bind(this));d&&(f=[f[n.tooltip_init_x]]),a.tooltip.html(e.getTooltipHTML(f,null==(c=e.axis)?void 0:c.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||a.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){var t=this,e=t.api,i=t.config;return k(i.tooltip_contents)?i.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,a){var r=this,s=this,o=s.api,l=s.config,c=s.state,d=s.$el,u=["title","name","value"].map(function(t){i(this,r);var e=l["tooltip_format_"+t];return k(e)?e.bind(o):e}.bind(this)),h=u[0],g=u[1],f=u[2];h=h||e,g=g||function(t){return i(this,r),t}.bind(this),f=f||(c.hasTreemap||s.isStackNormalized()?function(t,e){return i(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);var p=l.tooltip_order,v=function(t){return i(this,r),s.axis&&s.isBubbleZType(t)?s.getBubbleZData(t.value,"z"):s.getBaseValue(t)}.bind(this),x=s.levelColor?function(t){return i(this,r),s.levelColor(t.value)}.bind(this):function(t){return i(this,r),a(t)}.bind(this),b=l.tooltip_contents,_=b.template,m=s.mapToTargetIds();if(null===p&&l.data_groups.length){var y=s.orderTargets(s.data.targets).map(function(t){return i(this,r),t.id}.bind(this)).reverse();t.sort(function(t,e){i(this,r);var n=t?t.value:null,a=e?e.value:null;return n>0&&a>0&&(n=t.id?y.indexOf(t.id):null,a=e.id?y.indexOf(e.id):null),n-a}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){i(this,r);var n=t?v(t):null,a=e?v(e):null;return"asc"===p?n-a:a-n}.bind(this)):k(p)&&t.sort(p.bind(o));var T,w,A,C,R,L=s.getTooltipContentTemplate(_),O=t.length,P=function(){var e=this;if(!(w=t[R])||!v(w)&&0!==v(w))return 0;if(E(T)){var n=(c.hasAxis||c.hasRadar)&&j(h?h(w.x):w.x);T=ct(L[0],{CLASS_TOOLTIP:Ft.tooltip,TITLE:S(n)?_?n:''+n+"":""})}if(!w.ratio&&d.arcs&&(A=["arc",s.$el.arcs.select("path."+xt.arc+"-"+w.id).data()[0]],w.ratio=s.getRatio.apply(s,A)),A=[w.ratio,w.id,w.index,t],C=j(f.apply(void 0,[v(w)].concat(A))),s.isAreaRangeType(w)){var a=["high","low"].map(function(t){return i(this,e),j(f.apply(void 0,[s.getRangedData(w,t)].concat(A)))}.bind(this)),r=a[0],o=a[1];C="Mid: "+C+" High: "+r+" Low: "+o}else if(s.isCandlestickType(w)){var l=["open","high","low","close","volume"].map(function(t){return i(this,e),j(f.apply(void 0,[s.getRangedData(w,t,"candlestick")].concat(A)))}.bind(this)),u=l[0],p=l[1],y=l[2],k=l[3],O=l[4];C="Open: "+u+" High: "+p+" Low: "+y+" Close: "+k+(O?" Volume: "+O:"")}else if(s.isBarRangeType(w)){var P=w.value,I=P[0],D=P[1];C=f(I)+" ~ "+f(D)}if(void 0!==C){if(null===w.name)return 0;var z=j(g.apply(void 0,[w.name].concat(A))),M=x(w),$={CLASS_TOOLTIP_NAME:Ft.tooltipName+s.getTargetSelectorSuffix(w.id),COLOR:_||!s.patterns?M:'',NAME:z,VALUE:C};if(_&&F(b.text)){var X=m.indexOf(w.id);Object.keys(b.text).forEach(function(t){i(this,e),$[t]=b.text[t][X]}.bind(this))}T+=ct(L[1],$)}};for(R=0;R"},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this,a=this,r=a.config,s=a.scale,o=a.state,l=a.$el,c=l.eventRect,d=l.tooltip,u=r.tooltip_contents.bindto,h=d.datum();if(!u&&h){var g,f,p=H(o.event,null!=e?e:null==c?void 0:c.node()),v={x:p[0],y:p[1]};s.x&&h&&"x"in h&&(v.xAxis=s.x(h.x));var x=h.width,b=void 0===x?0:x,_=h.height,m=void 0===_?0:_,y=null!=(g=null==(f=r.tooltip_position)?void 0:f.bind(a.api)(null!=t?t:JSON.parse(h.current),b,m,null==c?void 0:c.node(),v))?g:a.getTooltipPosition.bind(a)(b,m,v);["top","left"].forEach(function(t){i(this,n);var e=y[t];d.style(t,e+"px"),"left"!==t||h.xPosInPercent||(h.xPosInPercent=e/o.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var a=this,r=this,s=r.config,o=r.scale,l=r.state,c=l,d=c.width,u=c.height,h=c.current,g=c.isLegendRight,f=c.inputType,p=r.hasType("gauge")&&!s.gauge_fullCircle,v=l.hasTreemap,x=s.axis_rotated,b=r.getSvgLeft(!0),_=b+h.width-r.getCurrentPaddingRight(),m=r.getCurrentPaddingLeft(!0),y=n.x,T=n.y;r.hasArcType()?"touch"===f||r.hasType("radar")||(T+=p?u:u/2,y+=(d-(g?r.getLegendWidth():0))/2):v||(x?(T=n.xAxis+20,y+=b,_-=b):(T-=5,y=b+m+20+(o.zoom?y:n.xAxis)));(y+t+15>_&&(y-=x?t-m:t+(v?0:m)),T+e>h.height)&&(T-=p?3*e:e+(v?0:30));var w={top:T,left:y};return Object.keys(w).forEach(function(t){i(this,a),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this,a=this,r=a.config,s=a.$el.tooltip,o=t.filter(function(t){return i(this,n),t&&S(a.getBaseValue(t))}.bind(this));if(s&&0!==o.length&&r.tooltip_show){var l=s.datum(),c=JSON.stringify(t);if(!l||l.current!==c){var d=t.concat().sort()[0],u=d.index,h=d.x;N(r.tooltip_onshow,a.api,t),s.html(a.getTooltipHTML(t,a.axis?a.axis.getXAxisTickFormat():a.categoryName.bind(a),a.getDefaultValueFormat(),a.color)).style("display",null).style("visibility",null).datum(l={index:u,x:h,current:c,width:s.property("offsetWidth"),height:s.property("offsetHeight")}),N(r.tooltip_onshown,a.api,t),a._handleLinkedCharts(!0,u)}a.setTooltipPosition(o,e)}},bindTooltipResizePos:function(){var t=this,e=this,n=e.resizeFunction,a=e.state,r=e.$el.tooltip;n.add(function(){if(i(this,t),"block"===r.style("display")){var e=a.current,n=r.datum(),s=n.width,o=n.xPosInPercent,l=e.width/100*o,c=e.width-(l+s);c<0&&(l+=c),r.style("left",l+"px")}}.bind(this))},hideTooltip:function(t){var e=this,i=e.api,n=e.config,a=e.$el.tooltip;if(a&&"none"!==a.style("display")&&(!n.tooltip_doNotHide||t)){var r=JSON.parse(a.datum().current);N(n.tooltip_onhide,i,r),a.style("display","none").style("visibility","hidden").datum(null),N(n.tooltip_onhidden,i,r)}},_handleLinkedCharts:function(t,e){var n=this,a=this,r=a.charts,s=a.config,o=a.state.event;if(null!=o&&o.isTrusted&&s.tooltip_linked&&r.length>1){var l=s.tooltip_linked_name;r.filter(function(t){return i(this,n),t!==a.api}.bind(this)).forEach(function(a){i(this,n);var r=a.internal,s=r.config,o=r.$el,c=s.tooltip_linked,d=s.tooltip_linked_name,u=h.body.contains(o.chart.node());if(c&&l===d&&u){var g=o.tooltip.data()[0],f=e!==(null==g?void 0:g.index);try{a.tooltip[t&&f?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this,r=this,s=r.config,o=r.$el,l=o.eventRect,c=o.svg,d=o.tooltip,u=r.state,g=u.event,f=u.hasAxis,p=u.hasRadar,v=u.hasTreemap;if("block"===(null==d?void 0:d.style("display"))&&g){var x,b=null!=t?t:null==(x=p?c:l)?void 0:x.node();if(f||p)if(r.isMultipleX())r.selectRectForMultipleXs(b,!1);else{var _=null!=e?e:r.getDataIndexFromEvent(g);-1===e?r.api.tooltip.hide():(r.selectRectForSingle(b,_),r.setExpand(_,null,!0))}else{var m=g.clientX,y=g.clientY;setTimeout(function(){i(this,n);var t=h.elementFromPoint(m,y),e=(0,a.select)(t).datum();if(e){var s=r.hasArcType()?r.convertToArcData(r.updateAngle(e)):null==e?void 0:e.data;v&&(t=c.node()),s&&r.showTooltip([s],t)}else r.api.tooltip.hide()}.bind(this),s.transition_duration)}}}},ai={getTranslate:function(t,e){void 0===e&&(e=0);var i,n,a=this,r=a.config,s=a.state,o=r.axis_rotated,l=0;if(e&&/^(x|y2?)$/.test(t)&&(l=a.getAxisSize(t)*e),"main"===t)i=I(s.margin.left),n=I(s.margin.top);else if("context"===t)i=I(s.margin2.left),n=I(s.margin2.top);else if("legend"===t)i=s.margin3.left,n=s.margin3.top;else if("x"===t)i=o?-l:0,n=o?0:s.height+l;else if("y"===t)i=o?0:-l,n=o?s.height+l:0;else if("y2"===t)i=o?0:s.width+l,n=o&&l?1-l:0;else if("subX"===t)i=0,n=o?0:s.height2;else if("arc"===t)i=s.arcWidth/2,n=s.arcHeight/2;else if("polar"===t)i=s.arcWidth/2,n=s.arcHeight/2;else if("radar"===t){var c=a.getRadarSize()[0];i=s.width/2-c,n=I(s.margin.top)}return"translate("+i+", "+n+")"},transformMain:function(t,e){var i=this,n=i.$el.main,a=i.$T,r=null!=e&&e.axisX?e.axisX:a(n.select("."+_t.axisX),t),s=null!=e&&e.axisY?e.axisY:a(n.select("."+_t.axisY),t),o=null!=e&&e.axisY2?e.axisY2:a(n.select("."+_t.axisY2),t);a(n,t).attr("transform",i.getTranslate("main")),r.attr("transform",i.getTranslate("x")),s.attr("transform",i.getTranslate("y")),o.attr("transform",i.getTranslate("y2")),n.select("."+xt.chartArcs).attr("transform",i.getTranslate("arc"))},transformAll:function(t,e){var i=this,n=i.config,a=i.state,r=a.hasAxis,s=a.hasTreemap,o=i.$el;s||i.transformMain(t,e),r&&n.subchart_show&&i.transformContext(t,e),o.legend&&i.transformLegend(t)}},ri={isValidChartType:function(t){return!!(t&&Object.values(g).indexOf(t)>-1)},setTargetType:function(t,e){var n=this,a=this,r=a.config,s=a.state.withoutFadeIn;a.mapToTargetIds(t).forEach(function(t){i(this,n),s[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this,e=this,n=e.state.current;Object.keys(g).forEach(function(a){i(this,t);var r=g[a],s=e.hasType(r,null,!0),o=n.types.indexOf(r);-1===o&&s?n.types.push(r):o>-1&&!s&&n.types.splice(o,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var a,r=this;void 0===n&&(n=!1);var s=this,o=s.config,l=s.state.current,c=o.data_types,d=e||s.data.targets,u=!1;return!n&&(null==(a=l.types)?void 0:a.indexOf(t))>-1?u=!0:null!=d&&d.length?d.forEach(function(e){i(this,r);var n=c[e.id];(n===t||!n&&"line"===t)&&(u=!0)}.bind(this)):Object.keys(c).length?Object.keys(c).forEach(function(e){i(this,r),c[e]===t&&(u=!0)}.bind(this)):u=o.data_type===t,u},hasTypeOf:function(t,e,n){var a=this;return void 0===n&&(n=[]),t in x&&!x[t].filter(function(t){return i(this,a),-1===n.indexOf(t)}.bind(this)).every(function(t){return i(this,a),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){var i=C(t)?t:t.id,n=this.config.data_types[i]||this.config.data_type;return X(e)?e.indexOf(n)>=0:n===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=C(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,x.Line)},isStepType:function(t){return this.isTypeOf(t,x.Step)},isSplineType:function(t){return this.isTypeOf(t,x.Spline)},isAreaType:function(t){return this.isTypeOf(t,x.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,x.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,i=e.point_pattern;return"circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!i||X(i)&&0===i.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return i(this,e),R(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}},si=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var e=this;e.api=t,e.config=new ne,e.cache=new fe;var i=new Vt;e.$el=i.getStore("element"),e.state=i.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,i){var n=this.config,r=this.state,s=n.transition_duration,o=n.subchart_show,l=t;l&&("tagName"in l&&(l=(0,a.select)(l)),l=(!1!==e&&s||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!o?l.transition(i).duration(s):l);return l},e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),N(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),N(t.config.onafterinit,t.api)},e.init=function(){var t=this,e=t.config,i=t.state,n=t.$el,r=e.boost_useCssRule;if(gt(t),i.hasRadar=!i.hasAxis&&t.hasType("radar"),i.hasTreemap=!i.hasAxis&&t.hasType("treemap"),i.hasAxis=!t.hasArcType()&&!i.hasTreemap,i.datetimeId="bb-"+ +new Date*Z(),r){var s=h.createElement("style");s.type="text/css",h.head.appendChild(s),i.style={rootSelctor:"."+i.datetimeId,sheet:s.sheet},n.style=s}var o={element:e.bindto,classname:"bb"};F(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),n.chart=k(o.element.node)?e.bindto.element:(0,a.select)(o.element||[]),n.chart.empty()&&(n.chart=(0,a.select)(h.body.appendChild(h.createElement("div")))),n.chart.html("").classed(o.classname,!0).classed(i.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this,n=this,a=n.config,r=n.state,o=n.$el.chart,l=function(){return i(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),c=a.render.lazy||l(),d=s.MutationObserver;c&&d&&!1!==a.render.observe&&!t&&new d(function(t,a){i(this,e),l()||(a.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),c&&!t||n.convertData(a,function(t){i(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this,e=this,a=e.config,r=e.format,o=e.state,l=a.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===a.padding&&(a.axis_x_show=!1,a.axis_y_show=!1,a.axis_y2_show=!1,a.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),o.hasAxis){e.initClip(),r.extraLineClasses=e.generateExtraLineClass(),r.dataTime=a.data_xLocaltime?n.timeParse:n.utcParse,r.axisTime=a.axis_x_localtime?n.timeFormat:n.utcFormat;var c=e.config.zoom_enabled&&"drag"===e.config.zoom_type;r.defaultAxisTime=function(n){i(this,t);var a=e.scale,s=a.x,o=a.zoom,l=c?o:o&&s.orgDomain().toString()!==o.domain().toString(),d=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||l&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return r.axisTime(d)(n)}.bind(this)}o.isLegendRight="right"===a.legend_position,o.isLegendInset="inset"===a.legend_position,o.isLegendTop="top-left"===a.legend_inset_anchor||"top-right"===a.legend_inset_anchor,o.isLegendLeft="top-left"===a.legend_inset_anchor||"bottom-left"===a.legend_inset_anchor,o.rotatedPadding.top=e.getResettedPadding(o.rotatedPadding.top),o.rotatedPadding.right=l&&!a.axis_x_show?0:30,o.inputType=function(t,e){var n=this,a=s.DocumentTouch,r=s.matchMedia,o=s.navigator,l=!1;if(e)if(o&&"maxTouchPoints"in o)l=o.maxTouchPoints>0;else if("ontouchmove"in s||a&&h instanceof a)l=!0;else if(null!=r&&r("(pointer:coarse)").matches)l=!0;else{var c=o.userAgent;l=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return i(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":l&&"touch")||"mouse"}(a.interaction_inputType_mouse,a.interaction_inputType_touch)},e.initWithData=function(t){var e=this,n=this,a=n.config,r=n.scale,s=n.state,o=n.$el,l=n.org,c=s,d=c.hasAxis,u=c.hasTreemap,h=a.interaction_enabled,g=n.hasType("polar");if(d&&(n.axis=n.getAxisInstance(),a.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),a.data_filter&&(n.data.targets=n.data.targets.filter(a.data_filter.bind(n.api))),a.data_hide&&n.addHiddenTargetIds(!0===a.data_hide?n.mapToIds(n.data.targets):a.data_hide),a.legend_hide&&n.addHiddenLegendIds(!0===a.legend_hide?n.mapToIds(n.data.targets):a.legend_hide),n.updateSizes(),n.updateScales(!0),d){var f=r.x,p=r.y,v=r.y2,x=r.subX,b=r.subY,_=r.subY2;f&&(f.domain(rt(n.getXDomain(n.data.targets),!a.axis_x_inverted)),x.domain(f.domain()),l.xDomain=f.domain()),p&&(p.domain(n.getYDomain(n.data.targets,"y")),b.domain(p.domain())),v&&(v.domain(n.getYDomain(n.data.targets,"y2")),_&&_.domain(v.domain()))}if(o.svg=o.chart.append("svg").style("overflow","hidden").style("display","block"),h&&s.inputType){var m="touch"===s.inputType,y=a.onclick,T=a.onover,w=a.onout;o.svg.on("click",(null==y?void 0:y.bind(n.api))||null).on(m?"touchstart":"mouseenter",(null==T?void 0:T.bind(n.api))||null).on(m?"touchend":"mouseleave",(null==w?void 0:w.bind(n.api))||null)}a.svg_classname&&o.svg.attr("class",a.svg_classname);var A=k(a.color_tiles)&&n.patterns;(d||A||g||u||a.data_labels_backgroundColors)&&(o.defs=o.svg.append("defs"),d&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){i(this,e),n.appendClip(o.defs,s.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),A&&n.patterns.forEach(function(t){var n=this;return i(this,e),o.defs.append(function(){return i(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();var S,C=o.svg.append("g").classed(vt.main,!0).attr("transform",u?null:n.getTranslate("main"));(o.main=C,a.subchart_show&&n.initSubchart(),a.tooltip_show&&n.initTooltip(),a.title_text&&n.initTitle(),!u&&a.legend_show&&n.initLegend(),a.data_empty_label_text&&C.append("text").attr("class",Xt.text+" "+vt.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),d&&(a.regions.length&&n.initRegion(),a.clipPath||n.axis.init()),C.append("g").classed(vt.chart,!0).attr("clip-path",d?s.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),d)&&(h&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),a.clipPath&&(null==(S=n.axis)||S.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),N(a.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),a.data_onmin||a.data_onmax){var R=n.getMinMaxData();N(a.data_onmin,n.api,R.min),N(a.data_onmax,n.api,R.max)}a.tooltip_show&&n.initShowTooltip(),s.rendered=!0},e.initChartElements=function(){var t=this,e=this,n=e.state,a=n.hasAxis,r=n.hasRadar,s=n.hasTreemap,o=[];if(a){var l=["bar","bubble","candlestick","line"];e.config.bar_front&&l.push(l.shift()),l.forEach(function(n){i(this,t);var a=Q(n);("line"===n&&e.hasTypeOf(a)||e.hasType(n))&&o.push(a)}.bind(this))}else if(s)o.push("Treemap");else{var c=e.hasType("polar");r||o.push("Arc","Pie"),e.hasType("gauge")?o.push("Gauge"):r?o.push("Radar"):c&&o.push("Polar")}o.forEach(function(n){i(this,t),e["init"+n]()}.bind(this)),$(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){var t=this.$el,e=t.chart,i=t.svg,n=t.defs,a=t.main,r=t.tooltip,s=t.legend,o=t.title,l=t.grid,c=t.needle,d=t.arcs,u=t.circle,h=t.bar,g=t.candlestick,f=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:i,defs:n,main:a,tooltip:r,legend:s,title:o,grid:l,arc:d,circles:u,bar:{bars:h},candlestick:g,line:{lines:f,areas:p},needle:c,text:{texts:v}}},e.setBackground=function(){var t=this,e=t.config.background,i=t.state,n=t.$el.svg;if($(e)){var a=n.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?a.attr("href",e.imgUrl):e.color&&a.style("fill",e.color).attr("clip-path",i.clip.path),a.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this,n=this,a=n.state,r=a.hasAxis,s=a.hasRadar,o=a.hasTreemap,l=function(a){return i(this,e),n["updateTargetsFor"+a](t.filter(n["is"+a+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){i(this,e);var a=Q(t);("line"===t&&n.hasTypeOf(a)||n.hasType(t))&&l(a)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){var c="Arc";s?c="Radar":n.hasType("polar")&&(c="Polar"),l(c)}else o&&l("Treemap");var d=n.hasType("bubble")||n.hasType("scatter");d&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(d)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.$el.svg,r=n.$T,s="."+vt.target;t&&(s+=", ."+Tt.chartCircles+" > ."+Tt.circles),r(a.selectAll(s).filter(function(t){return i(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this,n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(a){i(this,e);var r=n[a];C(r)&&(r=n[r]),n[a]=B(t,"with"+a,r)}.bind(this)),n},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this,e=this,n=e.config,a=e.state,r=function(t){var e,n=this,a=[],r=function(){var n=this;r.clear(),!1===t?u(function(){var t=this;i(this,n),a.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),{timeout:200}):e=pe(function(){var t=this;i(this,n),a.forEach(function(e){return i(this,t),e()}.bind(this))}.bind(this),R(t)?t:200)};return r.clear=function(){i(this,n),e&&(ve(e),e=null)}.bind(this),r.add=function(t){return i(this,n),a.push(t)}.bind(this),r.remove=function(t){return i(this,n),a.splice(a.indexOf(t),1)}.bind(this),r}(n.resize_timer),o=[];o.push(function(){return i(this,t),N(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){i(this,t),a.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){i(this,t),N(n.onresized,e.api),a.resizing=!1}.bind(this)),o.forEach(function(e){return i(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,s.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,a=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+v+"\n\t\t\t\t"+f.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t").replace("/\n/g","%0A");return"data:image/svg+xml;base64,"+ui(x)}function gi(t){var e=this,n=t.getBoundingClientRect(),a=n.left,r=n.top,o=function(t){return i(this,e),t.textContent||t.childElementCount}.bind(this),l=[];return tt(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;i(this,e);var c=function(t){var e;i(this,n);var o=s.getComputedStyle(t),l=o.fill,c=o.fontFamily,d=o.fontSize,u=o.textAnchor,h=o.transform,g=function(t,e){var i=e.top,n=e.left,a=t.getBBox(),r=a.x,s=a.y,o=t.getScreenCTM(),l=o.a,c=o.b,d=o.c,u=o.d,h=o.e,g=o.f,f=t.getBoundingClientRect(),p=f.width,v=f.height;return{x:l*r+d*s+h-n,y:c*r+u*s+g-i+(v-Math.round(v/4)),width:p,height:v}}(t,{left:a,top:r}),f=g.x,p=g.y,v=g.width,x=g.height;return(e={})[t.textContent]={x:f,y:p,width:v,height:x,fill:l,fontFamily:c,fontSize:d,textAnchor:u,transform:h},e}.bind(this);if(t.childElementCount>1)return tt(t.querySelectorAll("tspan")).filter(o).forEach(function(t){i(this,n),l.push(c(t))}.bind(this)),[];l.push(c(t))}.bind(this)),l}var fi={export:function(t,e){var n=this,a=this.internal,r=a.state,s=a.$el,o=s.chart,l=s.svg,c=r.current,d=c.width,u=c.height,g=at({width:d,height:u,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),f=hi(o.node(),g,{width:d,height:u}),p=g.preserveFontStyle?gi(l.node()):[];if(e&&k(e)){var v=new Image;v.crossOrigin="Anonymous",v.onload=function(){i(this,n);var t=h.createElement("canvas"),a=t.getContext("2d");t.width=g.width||d,t.height=g.height||u,a.drawImage(v,0,0),p.length&&(!function(t,e){var n=this;e.forEach(function(e){var a=this;i(this,n),Object.keys(e).forEach(function(n){var r=this;i(this,a);var s=e[n],o=s.x,l=s.y,c=s.width,d=s.height,u=s.fill,h=s.fontFamily,g=s.fontSize,f=s.transform;if(t.save(),t.font=g+" "+h,t.fillStyle=u,"none"===f)t.fillText(n,o,l);else{var p=f.replace(/(matrix|\(|\))/g,"").split(",");p.splice(4).every(function(t){return i(this,r),0==+t}.bind(this))?(p.push(o+c-c/4),p.push(l-d+d/3)):(p.push(o),p.push(l)),t.transform.apply(t,p),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(a,p),p.length=0),e.bind(this)(t.toDataURL(g.mimeType))}.bind(this),v.src=f}return f}},pi={focus:function(t){var e=this,n=this.internal,a=n.state,r=n.mapToTargetIds(t),s=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),s.classed(Et.focused,!0).classed(Et.defocused,!1),n.hasArcType()&&!a.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+St.gaugeValue)),n.toggleFocusLegend(r,!0),a.focusedTargetIds=r,a.defocusedTargetIds=a.defocusedTargetIds.filter(function(t){return i(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this,n=this.internal,a=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Et.focused,!1).classed(Et.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+St.gaugeValue)),n.toggleFocusLegend(r,!1),a.focusedTargetIds=a.focusedTargetIds.filter(function(t){return i(this,e),r.indexOf(t)<0}.bind(this)),a.defocusedTargetIds=r},revert:function(t){var e=this.internal,i=e.config,n=e.state,r=e.$el,s=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(s)).classed(Et.focused,!1).classed(Et.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(s),i.legend_show&&(e.showLegend(s.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(s)).filter((function(){return(0,a.select)(this).classed(Et.legendItemFocused)})).classed(Et.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]}},vi={legend:{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},xi={load:function(t){var e=this,n=this.internal,a=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){i(this,e),a.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(a.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){i(this,e),a.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){i(this,e),a.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var a=this;i(this,e),u(function(){return i(this,a),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,a=t||{};M(a)&&this.tooltip.hide(),X(a)?a={ids:a}:C(a)&&(a={ids:[a]});var r=n.mapToTargetIds(a.ids);n.unload(r,function(){i(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),Le.call(n,a.done,a.resizeAfter)}.bind(this))}};function bi(t,e,n){var a=this,r=this.internal,s=r.mapToTargetIds(e),o=r.state.hiddenTargetIds.map(function(t){return i(this,a),s.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](s);var l=r.$el.svg.selectAll(r.selectorTargets(s)),c=t?null:"0";t&&o.length&&(l.style("display",null),N(r.config.data_onshown,this,o)),r.$T(l).style("opacity",c,"important").call(G,function(){i(this,a),t||0!==o.length||(l.style("display","none"),N(r.config.data_onhidden,this,s)),l.style("opacity",c)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](s),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var _i={show:function(t,e){void 0===e&&(e={}),bi.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),bi.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});var a=this.internal,r={show:[],hide:[]};a.mapToTargetIds(t).forEach(function(t){return i(this,n),r[a.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return i(this,n),this.hide(r.hide,e)}.bind(this),0)}},mi={show:function(t){var e,n,a=this,r=this.internal,s=r.$el,o=r.config,l=r.state,c=l.eventReceiver,d=l.hasTreemap,u=l.inputType;if(t.mouse&&(n=t.mouse),t.data){var h,g=t.data,f=null==(h=r.getYScaleById(g.id))?void 0:h(g.value);if(d&&g.id)c.rect=s.main.select(""+r.selectorTarget(g.id,void 0,"rect"));else if(r.isMultipleX())n=[r.xx(g),f];else{var p,v;o.tooltip_grouped||(n=[0,f]),e=null!=(p=g.index)?p:r.hasArcType()&&g.id?null==(v=r.getArcElementByIdOrIndex(g.id))?void 0:v.datum().index:r.getIndexByX(g.x)}}else L(t.x)?e=r.getIndexByX(t.x):L(t.index)&&(e=t.index);("mouse"===u?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){i(this,a),r.dispatchEvent(t,e,n)}.bind(this))},hide:function(){var t=this,e=this.internal,n=e.state.inputType,a=e.$el.tooltip,r=null==a?void 0:a.datum();if(r){var s=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){i(this,t),e.dispatchEvent(n,s)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}},yi={tooltip:mi},Ti=function t(e){this.plugins=[],this.internal=void 0;var n=new si(this);this.internal=n,function t(e,n,a){var r=this;Object.keys(e).forEach(function(s){i(this,r);var o=k(e[s]),l=n!==a,c=$(e[s]),d=c&&Object.keys(e[s]).length>0;n[s]=o&&(!l&&d||l)?e[s].bind(a):c&&!o?{}:e[s],d&&t(e[s],n[s],a)}.bind(this))}(t.prototype,this,this),oi.call(n,e),n.beforeInit(),n.init()};function wi(t,e,n){var a=this,r=t.config,s=function(t,n){i(this,a);var s=R(n)?n:!1===n?void 0:null;null!==s&&(r["axis_"+t+"_"+e]=s)}.bind(this);L(n)&&(z(n)?Object.keys(n).forEach(function(t){i(this,a),s(t,n[t])}.bind(this)):(R(n)||!1===n)&&["y","y2"].forEach(function(t){i(this,a),s(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Ai(t,e){var i=t.config;return{x:i["axis_x_"+e],y:i["axis_y_"+e],y2:i["axis_y2_"+e]}}J(Ti.prototype,[li,{color:function(t){return this.internal.color(t)}},di,fi,pi,vi,xi,_i,yi]);var Si={labels:function(t){var e,n=this,a=this.internal;return t&&(Object.keys(t).forEach(function(e){i(this,n),a.axis.setLabelText(e,t[e])}.bind(this)),a.axis.updateLabels()),["x","y","y2"].forEach(function(t){i(this,n);var r=a.axis.getLabelText(t);r&&(e||(e={}),e[t]=r)}.bind(this)),e},min:function(t){var e=this.internal;return S(t)||!1===t?wi(e,"min",t):Ai(e,"min")},max:function(t){var e=this.internal;return S(t)||!1===t?wi(e,"max",t):Ai(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};var i=t.min,n=t.max;L(n)&&e.max(n),L(i)&&e.min(i)}},ki={axis:Si};function Ci(t,e){var i=this.internal,n=i.config,a=n.transition_duration&&ut(),r="grid_"+e+"_lines";return t?(n[r]=t,i.updateGrid(),i.redrawGrid(a),n[r]):n[r]}function Ri(t,e){return Ci.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function Ei(t,e){this.internal.removeGridLines(t,e)}var Li=function(t){return Ci.bind(this)(t,"x")};J(Li,{add:function(t){return Ri.bind(this)(t,"x")},remove:function(t){return Ei.bind(this)(t,!0)}});var Oi=function(t){return Ci.bind(this)(t,"y")};J(Oi,{add:function(t){return Ri.bind(this)(t,"y")},remove:function(t){return Ei.bind(this)(t,!1)}});var Pi={xgrids:Li,ygrids:Oi},Ii={groups:function(t){var e=this.internal,i=e.config;return E(t)||(i.data_groups=t,e.redraw()),i.data_groups}};function Di(t,e){void 0===e&&(e=!1);var i=this.internal,n=i.config,a=n.transition_duration&&ut();return t?(n.regions=e?n.regions.concat(t):t,i.updateRegion(),i.redrawRegion(a),e?n.regions:t):n.regions}var zi=function(t){return Di.bind(this)(t)};J(zi,{add:function(t){return Di.bind(this)(t,!0)},remove:function(t){var e=this,n=this.internal,a=n.config,r=n.$T,s=t||{},o=B(s,"classes",[Dt.region]),l=n.$el.main.select("."+Dt.regions).selectAll(o.map(function(t){return i(this,e),"."+t}.bind(this)));return r(l).style("opacity","0").remove(),l=a.regions,Object.keys(s).length?(l=l.filter(function(t){var n=this;i(this,e);var a=!1;return!t.class||(t.class.split(" ").forEach(function(t){i(this,n),o.indexOf(t)>=0&&(a=!0)}.bind(this)),!a)}.bind(this)),a.regions=l):a.regions=[],l}});var Mi={regions:zi},$i={x:function(t){var e=this.internal,i=e.axis,n=e.data,a=i.isCustomX()&&i.isCategorized();return X(t)&&(a?this.categories(t):(e.updateTargetX(n.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),a?this.categories():n.xs},xs:function(t){var e=this.internal;return F(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},Xi={flow:function(t){var e,n=this,a=this.internal;(t.json||t.rows||t.columns)&&a.convertData(t,function(r){i(this,n),e=r,function(){var n,r,s,o=this,l=0,c=0;if(a.state.redrawing||!e||!ut())return;var d=[],u=a.getMaxDataCount(),h=a.convertDataToTargets(e,!0),g=a.axis.isTimeSeries();a.data.targets.forEach(function(t){i(this,o);for(var e=!1,n=0;n1?f.values[f.values.length-1].x-p.x:p.x-a.getXDomain(a.data.targets)[0]:1,n=[p.x-r,p.x]);n&&a.updateXDomain(null,!0,!0,!1,n),a.updateTargets(a.data.targets),a.redraw({flow:{index:p.index,length:l,duration:S(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}},Fi=p(10),Bi=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=He(),i=t.config,n=t.params;this.owner=t,this.config=i,this.scale=e,!i.noTransition&&n.config.transition_duration||(i.withoutTransition=!0),i.range=this.scaleExtent((n.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this,n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){i(this,e);try{var a=t.node().getBBox(),r=a.width,s=a.height;r&&s&&(n.w=r,n.h=s)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return i(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this,n=this.config,a="x"===t?function(t){return i(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return i(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;i(this,e),t.attr("transform",function(t){return i(this,r),S(t)?a(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){var e=t[0],i=t[t.length-1];return e0?s:1,o]).range(t.range());l=u.ticks();for(var h=o.toFixed().length;l.length>15;h--)l=u.ticks(h);l.splice(0,1,s),l.splice(l.length-1,1,o)}l=l.map(function(t){return i(this,n),C(t)&&R(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(var g=Math.ceil(s);g0&&l[0]>0&&l.unshift(l[0]-(l[1]-l[0]))}return l},e.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){var e=this.config.tickFormat,i=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,n=e?e(i):i;return L(n)?n:""},e.transitionise=function(t){var e=this.config,i=t;if(e.withoutTransition)i=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{i=t.transition(e.transition)}catch(t){}return i},t}(),Ni=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new Bi(this)}var e=t.prototype;return e.create=function(t){var e=this,n=e.config,r=e.helper,s=e.params,o=r.scale,l=n.orient,c=this.splitTickText.bind(e),d=/^(left|right)$/.test(l),u=/^(top|bottom)$/.test(l),h=r.getTickTransformSetter(u?"x":"y"),g=h===r.axisX?"y":"x",f=/^(top|left)$/.test(l)?-1:1,p=s.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():r.scaleExtent((s.orgXScale||o).range());var v,x=n.innerTickSize,b=n.tickLength,_=n.range,m=s.id,y=m&&/^(x|y|y2)$/.test(m)?s.config["axis_"+m+"_tick_text_position"]:{x:0,y:0},T="subX"===m?"subchart_axis_x":"axis_"+m,w=s.config[T+"_show"],A=!!w&&s.config[T+"_tick_show"],S=!!w&&s.config[T+"_tick_text_show"];t.each((function(){var t=this,m=(0,a.select)(this),T=this.__chart__||o,w=r.copyScale();v=m,this.__chart__=w,n.tickOffset=s.isCategory?Math.ceil((w(1)-w(0))/2):0;var k=m.selectAll(".domain").data([0]);if(k.enter().append("path").attr("class","domain").merge(k).attr("d",function(){i(this,t);var e=n.outerTickSize*f;return u?"M"+_[0]+","+e+"V0H"+_[1]+"V"+e:"M"+e+","+_[0]+"H0V"+_[1]+"H"+e}.bind(this)),A||S){var C=n.tickValues||r.generateTicks(w,d);e.generatedTicks=C;var E=m.selectAll(".tick").data(C,w),L=E.enter().insert("g",".domain").attr("class","tick"),O=E.exit().remove();E=L.merge(E),A&&L.append("line"),S&&L.append("text");var P=Bi.getSizeFor1Char(E),I=[],D=E.select("text").selectAll("tspan").data(function(e,n){var a=this;i(this,t);var o=s.tickMultiline?c(e,w,C,d,P.w):X(r.textFormatted(e))?r.textFormatted(e).concat():[r.textFormatted(e)];return I[n]=o.length,o.map(function(t){return i(this,a),{index:n,splitted:t}}.bind(this))}.bind(this));D.exit().remove(),(D=D.enter().append("tspan").merge(D).text(function(e){return i(this,t),e.splitted}.bind(this))).attr("x",u?0:b*f).attr("dx",function(){i(this,t);var e=0;return/(top|bottom)/.test(l)&&p&&(e=8*Math.sin(Math.PI*(p/180))*("top"===l?-1:1)),e+(y.x||0)}.bind(this)()).attr("dy",function(e,n){i(this,t);var a=0;return"top"!==l&&(a=P.h,0===n&&(a=d?-((I[e.index]-1)*(P.h/2)-3):0===y.y?".71em":0)),R(a)&&y.y?a+y.y:a||".71em"}.bind(this));var z=E.select("line"),M=E.select("text");if(L.select("line").attr(g+"2",x*f),L.select("text").attr(g,b*f),e.setTickLineTextPosition(z,M),s.tickTitle){var $=M.select("title");($.empty()?M.append("title"):$).text(function(e){return i(this,t),s.tickTitle[e]}.bind(this))}if(w.bandwidth){var F=w,B=F.bandwidth()/2;T=function(e){return i(this,t),F(e)+B}.bind(this),w=T}else T.bandwidth?T=w:h(O,w);E=s.owner.state.flowing?r.transitionise(E):s.owner.$T(E),h(L,T),h(E.style("opacity",null),w)}})),this.g=v},e.getGeneratedTicks=function(t){var e,n=this,a=(null==(e=this.generatedTicks)?void 0:e.length)-1,r=this.generatedTicks;if(a>t){var s=Math.round(a/t+.1);r=this.generatedTicks.map(function(t,e){return i(this,n),e%s==0?t:null}.bind(this)).filter(function(t){return i(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){var e=this.helper.scale,i=this.config,n=i,a=n.innerTickSize,r=n.range,s=e(t)+(i.tickCentered?0:i.tickOffset);return r[0]0?0:1]:"middle"}.bind(this),h=function(t){return i(this,n),t?"rotate("+t+")":null}.bind(this),g=function(t){return i(this,n),t?11.5-2.5*(t/("bottom"===o?15:23))*(t>0?1:-1):l}.bind(this);switch(o){case"bottom":t.attr("x1",a.x).attr("x2",a.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"top":t.attr("x2",0).attr("y2",-s),e.attr("x",0).attr("y",2*-g(d)).style("text-anchor",u(d)).attr("transform",h(d));break;case"left":t.attr("x2",-s).attr("y1",a.y).attr("y2",a.y),e.attr("x",-l).attr("y",c).style("text-anchor","end");break;case"right":t.attr("x2",s).attr("y2",0),e.attr("x",l).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,i,n,a){var r=this.params,s=this.helper.textFormatted(t),o=C(s)&&s.indexOf("\n")>-1?s.split("\n"):[];if(o.length)return o;if(X(s))return s;var l=r.tickWidth;return(!l||l<=0)&&(l=n?95:r.isCategory?Math.ceil(r.isInverted?e(i[0])-e(i[1]):e(i[1])-e(i[0]))-12:110),function t(e,i){for(var n,r,s,o=1;o=0||i.hasRadar},e.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||$(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");var e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this,e=this.owner,n=e.config,a=e.$el,r=a.main,s=a.axis,o=e.state.clip,l=n.axis_rotated,c=["x","y"];n.axis_y2_show&&c.push("y2"),c.forEach(function(a){var c=this;i(this,t);var d=this.getAxisClassName(a),u=_t["axis"+a.toUpperCase()+"Label"];s[a]=r.append("g").attr("class",d).attr("clip-path",function(){i(this,c);var t=null;return"x"===a?t=o.pathXAxis:"y"===a&&(t=o.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(a)).style("visibility",n["axis_"+a+"_show"]?null:"hidden"),s[a].append("text").attr("class",u).attr("transform",["rotate(-90)",null]["x"===a?+!l:+l]).style("text-anchor",function(){return i(this,c),this.textAnchorForAxisLabel(a)}.bind(this)),this.generateAxes(a)}.bind(this))},e.setOrient=function(){var t=this.owner.config,e=t.axis_rotated,i=t.axis_y_inner,n=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?i?"top":"bottom":i?"right":"left",y2:e?n?"bottom":"top":n?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e,n=this,a=this.owner,r=a.config,s=[],o=r["axis_"+t+"_axes"],l=r.axis_rotated;"x"===t?e=l?Fi.axisLeft:Fi.axisBottom:"y"===t?e=l?Fi.axisBottom:Fi.axisLeft:"y2"===t&&(e=l?Fi.axisTop:Fi.axisRight),o.length&&o.forEach(function(r){var o=this;i(this,n);var l=r.tick||{},c=a.scale[t].copy();r.domain&&c.domain(r.domain),s.push(e(c).ticks(l.count).tickFormat(k(l.format)?l.format.bind(a.api):function(t){return i(this,o),t}.bind(this)).tickValues(l.values).tickSizeOuter(!1===l.outer?0:6))}.bind(this)),this.axesList[t]=s},e.updateAxes=function(){var t=this,e=this.owner,n=e.config,a=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(s){var o=this;i(this,t);var l=n["axis_"+s+"_axes"],c=e.scale[s].copy(),d=c.range();this.axesList[s].forEach(function(t,u){var h=this;i(this,o);var g=t.scale().range();d.every(function(t,e){return i(this,h),t===g[e]}.bind(this))||t.scale().range(d);var f=this.getAxisClassName(s)+"-"+(u+1),p=a.select("."+f.replace(/\s/,"."));p.empty()?p=a.append("g").attr("class",f).style("visibility",n["axis_"+s+"_show"]?null:"hidden").call(t):(l[u].domain&&c.domain(l[u].domain),r(p).call(t.scale(c))),p.attr("transform",e.getTranslate(s,u+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,i,n){var a=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,i,!("x"!==t||!(a.scale.zoom||a.config.subchart_show||a.state.resizing))||n)},e.getAxis=function(t,e,n,a,r){var s,o=this,l=this.owner,c=l.config,d=/^(x|subX)$/.test(t),u=d?"x":t,h=d&&this.isCategorized(),g=this.orient[t],f=r?0:l.getAxisTickRotate(u);if(d)s="subX"===t?l.format.subXAxisTick:l.format.xAxisTick;else{var p=c["axis_"+t+"_tick_format"];k(p)&&(s=p.bind(l.api))}var v=this.tick[u],x=at({outerTick:n,noTransition:a,config:c,id:t,tickTextRotate:f,owner:l},d&&{isCategory:h,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:h&&c.axis_x_tick_tooltip&&l.api.categories(),orgXScale:l.scale.x});d||(x.tickStepSize=c["axis_"+u+"_tick_stepSize"]);var b=new Ni(x).scale(d&&l.scale.zoom||e).orient(g);if(d&&this.isTimeSeries()&&v&&!k(v)){var _=dt.bind(l);v=v.map(function(t){return i(this,o),_(t)}.bind(this))}else!d&&this.isTimeSeriesY()&&(b.ticks(c.axis_y_tick_time_value),v=null);v&&b.tickValues(v),b.tickFormat(s||!d&&l.isStackNormalized()&&function(t){return i(this,o),t+"%"}.bind(this)),h&&(b.tickCentered(c.axis_x_tick_centered),M(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));var m=c["axis_"+u+"_tick_count"];return m&&b.ticks(m),b},e.updateXAxisTickValues=function(t,e){var i,n=this.owner,a=n.config,r=a.axis_x_tick_fit,s=a.axis_x_tick_count;if((r||s&&r)&&(i=n.mapTargetsToUniqueXs(t),this.isCategorized()&&s>i.length&&(s=i.length),i=this.generateTickValues(i,s,this.isTimeSeries())),e)e.tickValues(i);else if(this.x){var o;this.x.tickValues(i),null==(o=this.subX)||o.tickValues(i)}return i},e.getId=function(t){var e=this.owner,i=e.config,n=e.scale,a=i.data_axes[t];return a&&n[a]||(a="y"),a},e.getXAxisTickFormat=function(t){var e,n=this,a=this.owner,r=a.config,s=a.format,o=t&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,l=this.isTimeSeries(),c=this.isCategorized();return o?k(o)?e=o.bind(a.api):l&&(e=function(t){return i(this,n),t?s.axisTime(o)(t):""}.bind(this)):e=l?s.defaultAxisTime:c?a.categoryName:function(t){return i(this,n),t<0?t.toFixed(0):t}.bind(this),k(e)?function(t){return i(this,n),e.apply(a,c?[t,a.categoryName(t)]:[t])}.bind(this):e},e.getTickValues=function(t){var e=this.owner,i=e.config["axis_"+t+"_tick_values"],n=e[t+"Axis"];return(k(i)?i.call(e.api):i)||(n?n.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return C(e)?e:e?e.text:null},e.setLabelText=function(t,e){var i=this.owner.config,n=this.getLabelOptionByAxisId(t);C(n)?i["axis_"+t+"_label"]=e:n&&(n.text=e)},e.getLabelPosition=function(t,e){var n=this,a=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),s=z(r)&&r.position?r.position:e[+!a],o=function(t){return i(this,n),!!~s.indexOf(t)}.bind(this);return{isInner:o("inner"),isOuter:o("outer"),isLeft:o("left"),isCenter:o("center"),isRight:o("right"),isTop:o("top"),isMiddle:o("middle"),isBottom:o("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){var e=this.owner,i=e.state,n=i.width,a=i.height,r=this.getAxisLabelPosition(t),s=r.isMiddle?-a/2:0;return this.isHorizontal(e,"x"!==t)?s=r.isLeft?0:r.isCenter?n/2:n:r.isBottom&&(s=-a),s},e.dxForAxisLabel=function(t){var e=this.owner,i=this.getAxisLabelPosition(t),n=i.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"0.5em":i.isRight?"-0.5em":"0":i.isTop&&(n="-0.5em"),n},e.textAnchorForAxisLabel=function(t){var e=this.owner,i=this.getAxisLabelPosition(t),n=i.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?n=i.isLeft?"start":i.isCenter?"middle":"end":i.isBottom&&(n="start"),n},e.dyForAxisLabel=function(t){var e,i=this.owner,n=i.config,a=n.axis_rotated,r=this.getAxisLabelPosition(t).isInner,s=n["axis_"+t+"_tick_rotate"]?i.getHorizontalAxisHeight(t):0,o=this.getMaxTickWidth(t);if("x"===t){var l=n.axis_x_height;e=a?r?"1.2em":-25-o:r?"-0.5em":l?l-10:s?s-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=a?r?e[0]:s?s*("y2"===t?-1:1)-e[1]:e[2]:r?e[3]:(e[4]+(n["axis_"+t+"_inner"]?0:o+e[4]))*("y"===t?-1:1);return e},e.getMaxTickWidth=function(t,e){var n=this,a=this.owner,r=a.config,s=a.state.current,o=a.$el,l=o.svg,c=o.chart,d=s.maxTickWidths[t],u=0;if(e||!r["axis_"+t+"_show"]||d.size>0&&0===a.filterTargetsToShow().length)return d.size;if(l){var h=/^y2?$/.test(t),g=a.filterTargetsToShow(a.data.targets),f=a.scale[t].copy().domain(a["get"+(h?"Y":"X")+"Domain"](g,t)),p=f.domain(),v=p[0]===p[1]&&p.every(function(t){return i(this,n),t>0}.bind(this)),x=X(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(function(t){return i(this,n),t>0}.bind(this));if(v||x)return d.size;d.domain=p,h||d.ticks.splice(0);var b=this.getAxis(t,f,!1,!1,!0),_=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&_&&b.tickValues(this.generateTickValues(p,_,h?this.isTimeSeriesY():this.isTimeSeries())),h||this.updateXAxisTickValues(g,b);var m=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");b.create(m),m.selectAll("text").each((function(t,e){var i=this.getBoundingClientRect().width;u=Math.max(u,i),h||(d.ticks[e]=i)})),m.remove()}return u>0&&(d.size=u),d.size},e.getXAxisTickTextY2Overflow=function(t){var e=this.owner,i=e.axis,n=e.config,a=e.state,r=e.getAxisTickRotate("x");if((i.isCategorized()||i.isTimeSeries())&&n.axis_x_tick_fit&&!n.axis_x_tick_culling&&!n.axis_x_tick_multiline&&r>0&&r<90){var s=a.current.width-e.getCurrentPaddingLeft(),o=this.getXAxisTickMaxOverflow(r,s-t),l=Math.max(0,o)+t;return Math.min(l,s/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){for(var i=this.owner,n=i.axis,a=i.config,r=i.state,s=n.isTimeSeries(),o=r.current.maxTickWidths.x.ticks,l=o.length,c=r.axis.x.padding,d=c.left,u=c.right,h=0,g=l-(s&&a.axis_x_tick_fit?.5:0),f=0;f2){var o,l=this.isCategorized(),c=s-2,d=t[0],u=t[t.length-1];r=[d];for(var h=0;h=g)&&(t=!0,n.preventDefault())}.bind(this);o.on("touchstart",function(t){i(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(t){if(i(this,e),r.event=t,!o.empty()&&o.classed(Rt.eventRect)){if(r.dragging||r.flowing||n.hasArcType()||t.touches.length>1)return;f(t),c(o.node())}else d()}.bind(this),!0).on("touchend.eventRect",function(t){i(this,e),r.event=t,!o.empty()&&o.classed(Rt.eventRect)&&(n.hasArcType()||!n.toggleShape||r.cancelClick)&&r.cancelClick&&(r.cancelClick=!1)}.bind(this),!0),l.on("touchstart",function(t){i(this,e),r.event=t;var n=t.target;n&&n!==o.node()&&d()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);var a=this.state,r=this.$el,s=a,o=s.eventReceiver,l=s.width,c=s.height,d=s.rendered,u=s.resizing,h=t||r.eventRect,g=function(){i(this,n),o&&(o.rect=h.node().getBoundingClientRect())}.bind(this);(!d||u||e)&&(h.attr("x",0).attr("y",0).attr("width",l).attr("height",c),d&&!e||h.classed(Rt.eventRect,!0)),g()},updateEventRectData:function(){var t,e,n,a,r=this,s=this,o=s.config,l=s.scale,c=s.state,d=l.zoom||l.x,u=o.axis_rotated;if(s.isMultipleX())t=0,e=0,n=c.width,a=c.height;else{var h,g;if(s.axis.isCategorized())h=s.getEventRectWidth(),g=function(t){return i(this,r),d(t.x)-h/2}.bind(this);else{var f=function(t){var e=t.index;return i(this,r),{prev:s.getPrevX(e),next:s.getNextX(e)}}.bind(this);h=function(t){var e=this;i(this,r);var n,a=f(t),s=d.domain();return null===a.prev&&null===a.next?n=u?c.height:c.width:null===a.prev?n=(d(a.next)+d(t.x))/2:null===a.next?n=d(s[1])-(d(a.prev)+d(t.x))/2:(Object.keys(a).forEach(function(t,n){var r;i(this,e),a[t]=null!=(r=a[t])?r:s[n]}.bind(this)),n=Math.max(0,(d(a.next)-d(a.prev))/2)),n}.bind(this),g=function(t){i(this,r);var e=f(t);return null===e.prev&&null===e.next?0:null===e.prev?d(d.domain()[0]):(d(t.x)+d(e.prev))/2}.bind(this)}t=u?0:g,e=u?g:0,n=u?c.width:h,a=u?h:c.height}var p=c.eventReceiver,v=function(t,e){return i(this,r),k(t)?t(e):t}.bind(this);p.coords.splice(p.data.length),p.data.forEach(function(s,o){i(this,r),p.coords[o]={x:v(t,s),y:v(e,s),w:v(n,s),h:v(a,s)}}.bind(this))},selectRectForSingle:function(t,e){var n=this,a=this,r=a.config,s=a.$el,o=s.main,l=s.circle,c=r.data_selection_enabled,d=r.data_selection_grouped,u=r.data_selection_isselectable,h=r.tooltip_grouped,g=a.getAllValuesOnIndex(e);if(!h||(a.showTooltip(g,t),null==a.showGridFocus||a.showGridFocus(g),c&&!d)){l||o.selectAll("."+vt.EXPANDED+":not(."+Mt.shape+"-"+e+")").classed(vt.EXPANDED,!1);var f=o.selectAll("."+Mt.shape+"-"+e).classed(vt.EXPANDED,!0).style("cursor",u?"pointer":null).filter((function(t){return a.isWithinShape(this,t)}));f.empty()&&!h&&(null==a.hideGridFocus||a.hideGridFocus(),a.hideTooltip(),d||a.setExpand(e)),f.call(function(r){var s=this;i(this,n);var o=r.data();c&&(d||null!=u&&u.bind(a.api)(o))&&(t.style.cursor="pointer"),h||(a.showTooltip(o,t),null==a.showGridFocus||a.showGridFocus(o),null==a.unexpandCircles||a.unexpandCircles(),r.each(function(t){return i(this,s),a.setExpand(e,t.id)}.bind(this)))}.bind(this))}},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);var a=this,r=a.config,s=a.state,o=a.filterTargetsToShow(a.data.targets);if(!s.dragging&&!a.hasArcType(o)){var l=H(s.event,t),c=a.findClosestFromTargets(o,l);if(!e||!s.mouseover||c&&c.id===s.mouseover.id||(r.data_onout.call(a.api,s.mouseover),s.mouseover=void 0),c){var d=(a.isBubbleType(c)||a.isScatterType(c)||!r.tooltip_grouped?[c]:a.filterByX(o,c.x)).map(function(t){return i(this,n),a.addName(t)}.bind(this));a.showTooltip(d,t),a.setExpand(c.index,c.id,!0),a.showGridFocus(d);var u=a.dist(c,l);(a.isBarType(c.id)||u-1?s.data[a]:null}.bind(this);o.on("mouseover",function(t){i(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(t){var e=l(t);if(r.event=t,e){var i=e.index,o=a.line_step_type;if(a.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(o)){var c=n.scale.zoom||n.scale.x,d=n.axis.xs[i],u=c.invert(H(t,this)[0]);"step-after"===o&&ud&&(i+=1)}var h=a.tooltip_grouped&&i===s.currentIdx;r.dragging||r.flowing||n.hasArcType()||h?h&&n.setTooltipPosition():(i!==s.currentIdx&&(n.setOverOut(!1,s.currentIdx),s.currentIdx=i),-1===i?n.unselectRect():n.selectRectForSingle(this,i),n.setOverOut(-1!==i,i))}})).on("mouseout",function(t){i(this,e),r.event=t,a&&!n.hasArcType()&&-1!==s.currentIdx&&(n.unselectRect(),n.setOverOut(!1,s.currentIdx),s.currentIdx=-1)}.bind(this))}return o},clickHandlerForSingleX:function(t,e){var i=e,n=i.config,a=i.state,r=i.$el.main;if(!t||i.hasArcType()||a.cancelClick)a.cancelClick&&(a.cancelClick=!1);else{var s=t.index;r.selectAll("."+Mt.shape+"-"+s).each((function(t){(n.data_selection_grouped||i.isWithinShape(this,t))&&(null==i.toggleShape||i.toggleShape(this,t,s),n.data_onclick.bind(i.api)(t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=this,a=n.state;t.on("click",(function(t){a.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===a.inputType&&t.on("mouseover mousemove",(function(t){a.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){i(this,e),a.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){var e=t,i=e.config,n=e.state,a=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(a)){var r=H(n.event,this),s=e.findClosestFromTargets(a,r);s&&(e.isBarType(s.id)||e.dist(s,r)1&&(a=a[n[1]]),null!=(e=a)&&e.size()&&(l[t]=a)}.bind(this)),e.hideGridFocus(),e.setFlowList(l,t)}},setFlowList:function(t,e){var n,a=this,r=this,s=e.flow,o=e.targets,l=s,c=l.duration,d=void 0===c?e.duration:c,u=l.index,h=l.length,g=l.orgDataCount,f=r.getFlowTransform(o,g,u,h),p=xe();p.add(Object.keys(t).map(function(e){var s=this;return i(this,a),n=t[e].transition().ease(Yi.easeLinear).duration(d),n="axis.x"===e?n.call(function(t){i(this,s),r.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?n.filter(r.isRegionOnX).attr("transform",f):n.attr("transform",f)}.bind(this))),n.call(p,function(){i(this,a),r.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this,a=this,r=a.config,s=a.state,o=a.$el.svg,l=r.axis_rotated,c=e.flow,d=e.shape,u=e.xv,h=d.pos,g=h.cx,f=h.cy,p=h.xForText,v=h.yForText,x=c,b=x.done,_=void 0===b?function(){i(this,n)}.bind(this):b,m=x.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){i(this,n);for(var e=[],a=0;a=0?"":h.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this.config,i=this.state,n=i.margin,a=i.width,r=i.height,s=e.axis_rotated,o=Math.max(30,n.left)-(s?0:20),l=s?-(1+o):-(o-1),c=-Math.max(15,n.top),d=s?n.left+20:a+10+o,u=(s?n.top+r+10:n.bottom)+20;t.attr("x",l).attr("y",c).attr("width",d).attr("height",u)},setYAxisClipPath:function(t){var e,i=this.config,n=this.state,a=n.margin,r=n.width,s=n.height,o=i.axis_rotated,l=Math.max(30,a.left)-(o?20:0),c=i.axis_y_inner,d=c&&!o?i.axis_y_label.text?-20:-1:o?-(1+l):-(l-1),u=-(o?20:a.top),h=(o?r+15+l:a.left+20)+(c?20:0),g=(o?a.bottom+("fit"===(null==(e=i.padding)?void 0:e.mode)?10:0):a.top+s)+10;t.attr("x",d).attr("y",u).attr("width",h).attr("height",g)},updateXAxisTickClip:function(){var t=this,e=t.config,i=t.state,n=i.clip,a=i.xAxisHeight,r=t.$el.defs,s=t.getHorizontalAxisHeight("x");if(r&&!n.idXAxisTickTexts){var o=n.id+"-xaxisticktexts";t.appendClip(r,o),n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts),n.idXAxisTickTexts=o}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&s!==a&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=s},setXAxisTickClipWidth:function(){var t=this,e=t.config,i=t.state.current.maxTickWidths,n=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&n){var a=Math.sin(Math.PI/180*Math.abs(n));i.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/a}else i.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this.state,e=t.clip,i=t.current,n=this.$el.svg;n&&n.select("#"+e.idXAxisTickTexts+" rect").attr("width",i.maxTickWidths.x.clipPath).attr("height",30)}},Ui=void 0,Zi=function(t){return i(this,Ui),S(t.position)||"end"}.bind(void 0),qi=function(t){return i(this,Ui),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function Ki(t,e,n){var a=this;return function(r){i(this,a);var s=t?0:e;return"start"===r.position?s=t?-n:0:"middle"===r.position&&(s=(t?-n:e)/2),s}.bind(this)}function Ji(t,e){"grid"===e&&t.each((function(){var t=this,e=(0,a.select)(this);["x1","x2","y1","y2"].forEach(function(n){return i(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Qi={hasGrid:function(){var t=this,e=this.config;return["x","y"].some(function(n){return i(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,i=t.state.clip,n=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(n.gridLines.main=n.main.insert("g","."+vt.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",i.pathGrid).attr("class",Lt.grid+" "+Lt.gridLines),n.gridLines.main.append("g").attr("class",Lt.xgridLines),n.gridLines.main.append("g").attr("class",Lt.ygridLines),n.gridLines.x=(0,a.selectAll)([]))},updateXGrid:function(t){var e=this,n=this,r=n.config,s=n.scale,o=n.state,l=n.$el,c=l.main,d=l.grid,u=r.axis_rotated,h=n.generateGridData(r.grid_x_type,s.x),g=n.axis.isCategorized()?n.axis.x.tickOffset():0,f=function(t){return i(this,e),(s.zoom||s.x)(t)+g*(u?-1:1)}.bind(this);o.xgridAttr=u?{x1:0,x2:o.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:o.height},d.x=c.select("."+Lt.xgrids).selectAll("."+Lt.xgrid).data(h),d.x.exit().remove(),d.x=d.x.enter().append("line").attr("class",Lt.xgrid).merge(d.x),t||d.x.each((function(){var t=this,e=(0,a.select)(this);Object.keys(o.xgridAttr).forEach(function(n){var a=this;i(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return i(this,a),e.attr(u?"y1":"x1")===(u?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this,e=this,n=e.axis,a=e.config,r=e.scale,s=e.state,o=e.$el,l=o.grid,c=o.main,d=a.axis_rotated,u=function(e){return i(this,t),Math.ceil(r.y(e))}.bind(this),h=n.y.getGeneratedTicks(a.grid_y_ticks)||e.scale.y.ticks(a.grid_y_ticks);l.y=c.select("."+Lt.ygrids).selectAll("."+Lt.ygrid).data(h),l.y.exit().remove(),l.y=l.y.enter().append("line").attr("class",Lt.ygrid).merge(l.y),l.y.attr("x1",d?u:0).attr("x2",d?u:s.width).attr("y1",d?0:u).attr("y2",d?s.height:u),Ji(l.y,"grid")},updateGrid:function(){var t=this,e=t.$el,i=e.grid;e.gridLines.main||t.initGridLines(),i.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateXGridLines(),t.updateYGridLines()},updateXGridLines:function(){var t=this,e=this,n=e.config,a=e.$el,r=a.gridLines,s=a.main,o=e.$T,l=n.axis_rotated;n.grid_x_show&&e.updateXGrid();var c=s.select("."+Lt.xgridLines).selectAll("."+Lt.xgridLine).data(n.grid_x_lines);o(c.exit()).style("opacity","0").remove();var d=c.enter().append("g");d.append("line").style("opacity","0"),d.append("text").attr("transform",l?null:"rotate(-90)").attr("dy",-5).style("opacity","0"),o((c=d.merge(c)).attr("class",function(e){return i(this,t),(Lt.xgridLine+" "+(e.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Zi).attr("dx",qi)).text(function(e){return i(this,t),e.text}.bind(this)).style("opacity",null),r.x=c},updateYGridLines:function(){var t=this,e=this,n=e.config,a=e.state,r=a.width,s=a.height,o=e.$el,l=e.$T,c=n.axis_rotated;n.grid_y_show&&e.updateYGrid();var d=o.main.select("."+Lt.ygridLines).selectAll("."+Lt.ygridLine).data(n.grid_y_lines);l(d.exit()).style("opacity","0").remove();var u=d.enter().append("g");u.append("line").style("opacity","0"),u.append("text").attr("transform",c?"rotate(-90)":"").style("opacity","0"),d=u.merge(d);var h=e.yv.bind(e);l(d.attr("class",function(e){return i(this,t),(Lt.ygridLine+" "+(e.class||"")).trim()}.bind(this)).select("line")).attr("x1",c?h:0).attr("x2",c?h:r).attr("y1",c?0:h).attr("y2",c?s:h).style("opacity",null),l(d.select("text").attr("text-anchor",Zi).attr("dx",qi)).attr("dy",-5).attr("x",Ki(c,r,s)).attr("y",h).text(function(e){return i(this,t),e.text}.bind(this)).style("opacity",null),o.gridLines.y=d},redrawGrid:function(t){var e=this,n=this,a=n.config.axis_rotated,r=n.state,s=r.width,o=r.height,l=n.$el.gridLines,c=n.$T,d=n.xv.bind(n),u=l.x.select("line"),h=l.x.select("text");return u=c(u,t).attr("x1",a?0:d).attr("x2",a?s:d).attr("y1",a?d:0).attr("y2",a?d:o),h=c(h,t).attr("x",Ki(!a,s,o)).attr("y",d).text(function(t){return i(this,e),t.text}.bind(this)),[u.style("opacity",null),h.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,i=t.state.clip,n=t.$el,a=e.grid_front,r="."+(a&&n.gridLines.main?Lt.gridLines:vt.chart)+(a?" + *":""),s=n.main.insert("g",r).attr("clip-path",i.pathGrid).attr("class",Lt.grid);n.grid.main=s,e.grid_x_show&&s.append("g").attr("class",Lt.xgrids),e.grid_y_show&&s.append("g").attr("class",Lt.ygrids),e.interaction_enabled&&e.grid_focus_show&&(s.append("g").attr("class",Et.xgridFocus).append("line").attr("class",Et.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&s.append("g").attr("class",Et.ygridFocus).append("line").attr("class",Et.ygridFocus))},showGridFocus:function(t){var e=this,n=this,r=n.config,s=n.state,o=s.width,l=s.height,c=r.axis_rotated,d=n.$el.main.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus),u=(t||[d.datum()]).filter(function(t){return i(this,e),t&&S(n.getBaseValue(t))}.bind(this));if(r.tooltip_show&&0!==u.length&&!n.hasType("bubble")&&!n.hasArcType()){var h=r.grid_focus_edge&&!r.tooltip_grouped,g=n.xx.bind(n);d.style("visibility",null).data(u.concat(u)).each((function(t){var e,r=this,s=(0,a.select)(this),d={x:g(t),y:n.getYScaleById(t.id)(t.value)};if(s.classed(Et.xgridFocus))e=c?[null,d.x,h?d.y:o,d.x]:[d.x,h?d.y:null,d.x,l];else{var u="y2"===n.axis.getId(t.id);e=c?[d.y,h&&!u?d.x:null,d.y,h&&u?d.x:l]:[h&&u?d.x:null,d.y,h&&!u?d.x:o,d.y]}["x1","y1","x2","y2"].forEach(function(t,n){return i(this,r),s.attr(t,e[n])}.bind(this))})),Ji(d,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)}},hideGridFocus:function(){var t=this,e=t.state,i=e.inputType,n=e.resizing,a=t.$el.main;"mouse"!==i&&n||(a.selectAll("line."+Et.xgridFocus+", line."+Et.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){var t=this,e=t.state,i=e.inputType,n=e.width,a=e.height,r=e.resizing,s=t.$el.grid.main.select("line."+Et.xgridFocus);if("touch"===i)s.empty()?r&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{var o=t.config.axis_rotated;s.attr("x1",o?0:-10).attr("x2",o?n:-10).attr("y1",o?-10:0).attr("y2",o?-10:a)}return!0},generateGridData:function(t,e){var n=this,a=this.$el.main.select("."+_t.axisX).selectAll(".tick").size(),r=[];if("year"===t)for(var s=this.getXDomain().map(function(t){return i(this,n),t.getFullYear()}.bind(this)),o=s[0],l=s[1],c=o;c<=l;c++)r.push(new Date(c+"-01-01 00:00:00"));else(r=e.ticks(10)).length>a&&(r=r.filter(function(t){return i(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var a=this;i(this,e);var r=!1;return(X(t)?t.concat():[t]).forEach(function(t){i(this,a),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return i(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this,a=this,r=a.config,s=a.$T,o=a.getGridFilterToRemove(t),l=function(t){return i(this,n),!o(t)}.bind(this),c=e?Lt.xgridLines:Lt.ygridLines,d=e?Lt.xgridLine:Lt.ygridLine;s(a.$el.main.select("."+c).selectAll("."+d).filter(o)).style("opacity","0").remove();var u="grid_"+(e?"x":"y")+"_lines";r[u]=r[u].filter(l)}},tn={initRegion:function(){var t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Dt.regions)},updateRegion:function(){var t=this,e=t.config,i=t.$el.region,n=t.$T;i.main||t.initRegion(),i.main.style("visibility",t.hasArcType()?"hidden":null);var r=i.main.selectAll("."+Dt.region).data(e.regions);n(r.exit()).style("opacity","0").remove();var s=r.enter().append("g");s.append("rect").style("fill-opacity","0"),i.list=s.merge(r).attr("class",t.classRegion.bind(t)),i.list.each((function(t){var e;0===(0,a.select)(this).select("text").size()&&null!=(e=t.label)&&e.text&&(0,a.select)(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this,n=this,r=n.$el.region,s=n.$T,o=r.list.select("rect"),l=r.list.selectAll("text");return o=s(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),l=s(l,t).attr("transform",function(t){var a;i(this,e);var r=null!=(a=t.label)?a:{},s=r.x,o=void 0===s?0:s,l=r.y,c=void 0===l?0:l,d=r.rotated,u=void 0!==d&&d;return"translate("+(n.regionX.bind(n)(t)+o)+", "+(n.regionY.bind(n)(t)+c)+")"+(u?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return i(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,a;return i(this,e),null!=(n=null==(a=t.label)?void 0:a.color)?n:null}.bind(this)).text(function(t){var n;return i(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[o.style("fill-opacity",function(t){return i(this,e),S(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){(0,a.select)(this.parentNode).selectAll("rect:not([x])").remove()})),l.style("opacity",null)]},getRegionXY:function(t,e){var i=this,n=i.config,a=i.scale,r=n.axis_rotated,s="x"===t,o="start",l=0;return"y"===e.axis||"y2"===e.axis?(s||(o="end"),(s?r:!r)&&o in e&&(l=(0,a[e.axis])(e[o]))):(s?!r:r)&&o in e&&(l=(a.zoom||a.x)(i.axis.isTimeSeries()?dt.call(i,e[o]):e[o])),l},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var i=this,n=i.config,a=i.scale,r=i.state,s=n.axis_rotated,o="width"===t,l=i[o?"regionX":"regionY"](e),c="end",d=r[t];return"y"===e.axis||"y2"===e.axis?(o||(c="start"),(o?s:!s)&&c in e&&(d=(0,a[e.axis])(e[c]))):(o?!s:s)&&c in e&&(d=(a.zoom||a.x)(i.axis.isTimeSeries()?dt.call(i,e[c]):e[c])),ds.height/2&&(f=s.height/2)),f+(n.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||d?0:-10)},getEventRectWidth:function(){var t=this.config,e=this.axis,i=t.axis_x_inverted,n=e.x.tickInterval();return Math.max(0,i?Math.abs(n):n)},getAxisTickRotate:function(t){var e=this,i=e.axis,n=e.config,a=e.state,r=e.$el,s=n["axis_"+t+"_tick_rotate"];if("x"===t){var o=i.isCategorized()||i.isTimeSeries();if(n.axis_x_tick_fit&&o){var l=n.axis_x_tick_count,c=a.current.maxTickWidths.x.ticks.length,d=0;if(l?d=l>c?c:l:c&&(d=c),d!==a.axis.x.tickCount){var u=e.data.targets;a.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(u,"min"),e.getXDomainMinMax(u,"max")],d)}a.axis.x.tickCount=d}r.svg&&n.axis_x_tick_fit&&!n.axis_x_tick_multiline&&!n.axis_x_tick_culling&&n.axis_x_tick_autorotate&&o&&(s=e.needToRotateXAxisTickTexts()?n.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,i=e.axis,n=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),a=i.x.tickCount+i.x.padding.left+i.x.padding.right;return t.axis.getMaxTickWidth("x")>(a?n/a:0)}},nn={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},an={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function rn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function sn(t){for(var e,i=1;i1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},categories:function(t){var e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories}},Xi,Pi,Ii,Mi,$i],cn=[Gi,Wi,Vi,Hi,Qi,tn,en],dn=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},on,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}],un=p(12);function hn(t){void 0===t&&(t=0);var e=this,i=e.config,n=e.state,a=e.hasMultiArcGauge(),r=n.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length,s=t?Math.min(n.radiusExpanded*t-n.radius,.8*r-100*(1-t)):0;return{inner:function(t){var i=e.getRadius(t).innerRadius;return a?n.radius-r*(t.index+1):R(i)?i:0},outer:function(i){var o,l=e.getRadius(i).outerRadius;if(a)o=n.radius-r*i.index+s;else if(e.hasType("polar")&&!t)o=e.getPolarOuterRadius(i,l);else if(o=l,t){var c=n.radiusExpanded;n.radius!==l&&(c-=Math.abs(n.radius-l)),o=c*t}return o},corner:function(t,n){var a=i.arc_cornerRadius_ratio,r=void 0===a?0:a,s=i.arc_cornerRadius,o=void 0===s?0:s,l=t.data.id,c=t.value;return r?r*n:R(o)?o:o.call(e.api,l,c,n)}}}function gn(t){return function(e){var i=(0,un.interpolate)(this._current,e);return this._current=e,function(e){var n=i(e);return t(n)}}}var fn={initPie:function(){var t=this,e=this,n=e.config,a=n.data_type,r=n[a+"_padding"],s=n[a+"_startingAngle"]||0,o=(r?.01*r:n[a+"_padAngle"])||0;e.pie=(0,Ue.pie)().startAngle(s).endAngle(s+2*Math.PI).padAngle(o).value(function(e){var n=this;return i(this,t),e.values.reduce(function(t,e){return i(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var t=this,e=t.config,i=t.state,n=e[e.data_type+"_padding"],a=e.gauge_width||e.donut_width,r=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;i.radiusExpanded=Math.min(i.arcWidth,i.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),i.radius=.95*i.radiusExpanded,i.innerRadiusRatio=a?(i.radius-a)/i.radius:.6,i.gaugeArcWidth=a||(r<=i.radius-i.innerRadius?i.radius-i.innerRadius:r<=i.radius?r:i.radius);var s=e.pie_innerRadius||(n?n*(i.innerRadiusRatio+.1):0);i.outerRadius=e.pie_outerRadius,i.innerRadius=t.hasType("donut")||t.hasType("gauge")?i.radius*i.innerRadiusRatio:s},getRadius:function(t){var e=null==t?void 0:t.data,i=this.state,n=i.innerRadius,a=i.outerRadius;return!R(n)&&e&&(n=n[e.id]||0),F(a)&&e&&e.id in a?a=a[e.id]:R(a)||(a=this.state.radius),{innerRadius:n,outerRadius:a}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=3.6*this.config.gauge_arcLength,e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){var t=this.config,e=t.gauge_fullCircle,i=-1*Math.PI/2,n=Math.PI/2,a=t.gauge_startingAngle;return!e&&a<=i?a=i:!e&&a>=n?a=n:(a>Math.PI||a<-1*Math.PI)&&(a=Math.PI),a},updateAngle:function(t){var e=this,n=this,a=n.config,r=n.state,s=n.pie,o=t,l=!1;if(!a)return null;var c=n.getGaugeStartAngle(),d=a.gauge_fullCircle?n.getArcLength():-2*c;if(o.data&&n.isGaugeType(o.data)&&!n.hasMultiArcGauge()){var u=a.gauge_min,h=a.gauge_max,g=n.getTotalDataSum(r.rendered);s=s.startAngle(c).endAngle(d*((g-u)/(h-u))+c)}if(s(n.filterTargetsToShow()).forEach(function(t,n){var a;i(this,e),l||t.data.id!==(null==(a=o.data)?void 0:a.id)||(l=!0,(o=t).index=n)}.bind(this)),isNaN(o.startAngle)&&(o.startAngle=0),isNaN(o.endAngle)&&(o.endAngle=o.startAngle),o.data&&n.hasMultiArcGauge()){var f=a.gauge_min,p=a.gauge_max,v=o.value1){var c,d=n.getRadius(t).outerRadius;n.hasType("polar")&&(d=n.getPolarOuterRadius(t,d));var u=this.svgArc.centroid(s).map(function(t){return i(this,e),isNaN(t)?0:t}.bind(this)),h=u[0],g=u[1],f=Math.sqrt(h*h+g*g),p=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return i(this,e),a[t+"_label_ratio"]}.bind(this)))?void 0:c[0];o="translate("+h*(p=p?k(p)?p.bind(n.api)(t,d,f):p:d&&(f?(36/d>.375?1.175-36/d:.8)*d/f:0))+","+g*p+")"}return o},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,i=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var n,r=(0,a.select)(this),s=e.updateAngle(t),o=e.getRatio("arc",s);if(e.meetsLabelThreshold(o,null==(n=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:n[0])){var l=(s||t).value;V(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(l,o,t.data.id).toString(),[-1,1],i)}else r.text("")}))},expandArc:function(t){var e=this,n=this,r=n.state.transiting,s=n.$el;if(r)var o=setInterval(function(){i(this,e),r||(clearInterval(o),s.legend.selectAll("."+Et.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);else{var l=n.mapToTargetIds(t);s.svg.selectAll(n.selectorTargets(l,"."+xt.chartArc)).each((function(t){if(n.shouldExpand(t.data.id)){var e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));(0,a.select)(this).selectAll("path").transition().duration(e).attrTween("d",gn(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",gn(i.bind(n)))}}))}},unexpandArc:function(t){var e=this,n=this,a=n.state.transiting,r=n.$el.svg;if(!a){var s=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(s,"."+xt.chartArc)).selectAll("path").transition().duration(function(t){return i(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",gn(n.svgArc.bind(n))),r.selectAll(""+xt.arc).style("opacity",null)}},getExpandConfig:function(t,e){var i,n=this,a=n.config;return n.isDonutType(t)?i="donut":n.isGaugeType(t)?i="gauge":n.isPieType(t)&&(i="pie"),i?a[i+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this,i=e.config;return e.isDonutType(t)&&i.donut_expand||e.isGaugeType(t)&&i.gauge_expand||e.isPieType(t)&&i.pie_expand},shouldShowArcLabel:function(){var t=this,e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(a){return i(this,t),e.hasType(a)&&n[a+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this,e=this,n=e.config,a=function(e){return i(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){i(this,t),a=n[e+"_label_format"]}.bind(this)),k(a)?a.bind(e.api):a},updateTargetsForArc:function(t){var e=this,n=this,a=n.$el,r=n.hasType("gauge"),s=n.getChartClass("Arc"),o=n.getClass("arcs",!0),l=n.classFocus.bind(n),c=a.main.select("."+xt.chartArcs),d=c.selectAll("."+xt.chartArc).data(n.pie(t)).attr("class",function(t){return i(this,e),s(t)+l(t.data)}.bind(this)),u=d.enter().append("g").attr("class",s).call(this.setCssRule(!1,"."+xt.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(d),u.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),a.text=c.selectAll("."+vt.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+vt.chart).append("g").attr("class",xt.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){var e=this,i=t||e.getArcTitle(),n=e.hasType("gauge");if(i){var a=n?St.chartArcsGaugeTitle:xt.chartArcsTitle,r=e.$el.arcs.select("."+a);r.empty()&&(r=e.$el.arcs.append("text").attr("class",a).style("text-anchor","middle")),n&&r.attr("dy","-0.3em"),V(r,i,n?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){var t=this,e=t.config,i=t.state,n=t.getArcTitle();if(n&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(n)){var a=i.current.needle;return R(a)||(a=e.arc_needle_value),ct(n,{NEEDLE_VALUE:R(a)?a:0})}return!1},redrawArc:function(t,e,n){var r=this,s=this,o=s.config,l=s.state,c=s.$el.main,d=o.interaction_enabled,u=d&&o.data_selection_isselectable,h=c.selectAll("."+xt.arcs).selectAll("."+xt.arc).data(s.arcData.bind(s));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",s.getClass("arc",!0)).style("fill",function(t){return i(this,r),s.color(t.data)}.bind(this)).style("cursor",function(t){return i(this,r),null!=u&&null!=u.bind&&u.bind(s.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){s.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),s.hasType("gauge")&&(s.updateGaugeMax(),s.hasMultiArcGauge()&&s.redrawMultiArcGauge()),h.attr("transform",function(t){return i(this,r),!s.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){i(this,r),l.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this,n=s.updateAngle(t);if(!n)return function(){return i(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var a=(0,un.interpolate)(this._current,n);return this._current=a(0),function(e){var i=a(e);return i.data=t.data,s.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){var e;return i(this,r),s.levelColor?(e=s.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=s.color(t.data),e}.bind(this)).style("opacity",null).call(G,(function(){if(s.levelColor){var t=(0,a.select)(this),e=t.datum(this._current);s.updateLegendItemColor(e.data.id,t.style("fill"))}l.transiting=!1,N(o.onrendered,s.api)})),d&&s.bindArcEvent(h),s.hasType("polar")&&s.redrawPolar(),s.hasType("gauge")&&s.redrawBackgroundArcs(),o.arc_needle_show&&s.redrawNeedle(),s.redrawArcText(t)},redrawNeedle:function(){var t=this,e=this,n=e.$el,a=e.config,r=e.state,s=r.hiddenTargetIds,o=(r.radius-1)/100*a.arc_needle_length,l=s.length!==e.data.targets.length,c=e.$el.arcs.select("."+xt.needle),d=a.arc_needle_path,u=a.arc_needle_bottom_width/2,h=a.arc_needle_top_width/2,g=a.arc_needle_top_rx,f=a.arc_needle_top_ry,p=a.arc_needle_bottom_len,v=a.arc_needle_bottom_rx,x=a.arc_needle_bottom_ry,b=e.getNeedleAngle(),_=function(){i(this,t);var n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(_(),c.empty()&&(c=n.arcs.append("path").classed(xt.needle,!0),n.needle=c,n.needle.updateHelper=function(r,s){var o=this;void 0===s&&(s=!1),i(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(G,function(){i(this,o),s&&(a.arc_needle_value=r),_()}.bind(this))}.bind(this)),l){var m=k(d)?d.call(e,o):"M-"+u+" "+p+" A"+v+" "+x+" 0 0 0 "+u+" "+p+" L"+h+" -"+o+" A"+g+" "+f+" 0 0 0 -"+h+" -"+o+" L-"+u+" "+p+" Z";e.$T(c).attr("d",m).style("fill",a.arc_needle_color).style("display",null).style("transform","rotate("+b+"deg)")}else c.style("display","none")},getNeedleAngle:function(t){var e=this,i=e.config,n=e.state,a=e.getArcLength(),r=e.hasType("gauge"),s=e.getTotalDataSum(!0),o=L(t)?t:i.arc_needle_value,l=i[i.data_type+"_startingAngle"]||0,c=0;if(R(o)||(o=r&&1===e.data.targets.length?s:0),n.current.needle=o,r){l=e.getGaugeStartAngle();var d=i.gauge_fullCircle?a:-2*l,u=i.gauge_min;c=d*((o-u)/(i.gauge_max-u))}else c=a*(o/s);return(l+c)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this,e=this,n=e.config,a=e.state,r=e.hasMultiArcGauge(),s=n.gauge_fullCircle,o=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,l=e.getGaugeStartAngle(),c=s?l+e.getArcLength():-1*l,d=e.$el.arcs.select((r?"g":"")+"."+xt.chartArcsBackground);if(r){var u=0;(d=d.selectAll("path."+xt.chartArcsBackground).data(e.data.targets)).enter().append("path").attr("class",function(e,n){return i(this,t),xt.chartArcsBackground+" "+xt.chartArcsBackground+"-"+n}.bind(this)).merge(d).style("fill",n.gauge_background||null).attr("d",function(r){var s=r.id;if(i(this,t),o||a.hiddenTargetIds.indexOf(s)>=0)return"M 0 0";var d={data:[{value:n.gauge_max}],startAngle:l,endAngle:c,index:u++};return e.getArc(d,!0,!0)}.bind(this)),d.exit().remove()}else d.attr("d",o?"M 0 0":function(){i(this,t);var a={data:[{value:n.gauge_max}],startAngle:l,endAngle:c};return e.getArc(a,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this,n=this,r=n.config,s=n.state,o="touch"===s.inputType,l="mouse"===s.inputType;function c(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function d(t){var e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,i){var a,s=n.updateAngle(e);s&&(a=n.convertToArcData(s),null==n.toggleShape||n.toggleShape(this,a,i),r.data_onclick.bind(n.api)(a,this))})),l&&t.on("mouseover",(function(t,e){var i;if(!s.transiting){s.event=t;var a=n.updateAngle(e),r=a?n.convertToArcData(a):null;c(this,r,(null==(i=r)?void 0:i.id)||void 0),n.setOverOut(!0,r)}})).on("mouseout",function(t,a){if(i(this,e),!s.transiting){s.event=t;var r=n.updateAngle(a),o=r?n.convertToArcData(r):null;d(),n.setOverOut(!1,o)}}.bind(this)).on("mousemove",(function(t,e){var i=n.updateAngle(e),a=i?n.convertToArcData(i):null;s.event=t,n.showTooltip([a],this)})),o&&n.hasArcType()&&!n.radars){var u=function(t){i(this,e);var n=t.changedTouches[0];return(0,a.select)(h.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(t){var e,i;if(!s.transiting){s.event=t;var a=u(t).datum(),r=null!=(e=a)&&e.data&&a.data.id?n.updateAngle(a):null,o=r?n.convertToArcData(r):null,l=(null==(i=o)?void 0:i.id)||void 0;n.callOverOutForTouch(o),E(l)?d():c(this,o,l)}}))}},redrawArcText:function(t){var e,n=this,a=this,r=a.config,s=a.state,o=a.$el,l=o.main,c=o.arcs,d=a.hasType("gauge"),u=a.hasMultiArcGauge();if(d&&1===a.data.targets.length&&r.gauge_title||(e=l.selectAll("."+xt.chartArc).select("text").style("opacity","0").attr("class",function(t){return i(this,n),a.isGaugeType(t.data)?St.gaugeValue:null}.bind(this)).call(a.textForArcLabel.bind(a)).attr("transform",a.transformForArcLabel.bind(a)).style("font-size",function(t){return i(this,n),a.isGaugeType(t.data)&&1===a.data.targets.length&&!u?Math.round(s.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return i(this,n),a.isTargetToShow(t.data.id)&&a.isArcType(t.data)?null:"0"}.bind(this)),u&&e.attr("dy","-.1em")),l.select("."+xt.chartArcsTitle).style("opacity",a.hasType("donut")||d?null:"0"),d){var h,g=r.gauge_fullCircle;g&&(null==(h=e)||h.attr("dy",""+(u?0:Math.round(s.radius/14)))),r.gauge_label_show&&(c.select("."+St.chartArcsGaugeUnit).attr("dy",(g?1.5:.75)+"em").text(r.gauge_units),c.select("."+St.chartArcsGaugeMin).attr("dx",-1*(s.innerRadius+(s.radius-s.innerRadius)/(g?1:2))+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_min,!1)),g||c.select("."+St.chartArcsGaugeMax).attr("dx",s.innerRadius+(s.radius-s.innerRadius)/2+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e,n=this,a=this.$el.arcs,r=R(t)?function(e){return i(this,n),e.index===t}.bind(this):function(e){return i(this,n),e.data.id===t}.bind(this);return null==(e=a)?void 0:e.selectAll("."+vt.target+" path").filter(r)}},pn={initArea:function(t){var e=this.config;t.insert("g","."+(e.area_front?Tt.circles:Ct.lines)).attr("class",this.getClass("areas",!0))},updateAreaColor:function(t){var e=this;return e.config.area_linearGradient?e.getGradienColortUrl(t.id):e.color(t)},updateArea:function(t,e){void 0===e&&(e=!1);var i=this,n=i.config,r=i.state,s=i.$el,o=i.$T,l=e?s.subchart:s;n.area_linearGradient&&i.updateLinearGradient();var c=l.main.selectAll("."+bt.areas).selectAll("."+bt.area).data(i.lineData.bind(i));o(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",i.getClass("area",!0)).style("fill",i.updateAreaColor.bind(i)).style("opacity",(function(){return r.orgAreaOpacity=(0,a.select)(this).style("opacity"),"0"})).merge(c),c.style("opacity",r.orgAreaOpacity),i.setRatioForGroupedData(l.area.data())},redrawArea:function(t,e,n){var a=this;void 0===n&&(n=!1);var r=this,s=(n?this.$el.subchart:this.$el).area,o=r.state.orgAreaOpacity;return[r.$T(s,e,Z()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",function(t){return i(this,a),(r.isAreaRangeType(t)?o/1.75:o)+""}.bind(this))]},generateDrawArea:function(t,e){var n=this,a=this,r=a.config,s=r.line_connectNull,o=r.axis_rotated,l=a.generateGetAreaPoints(t,e),c=a.getYScaleById.bind(a),d=function(t){return i(this,n),(e?a.subxx:a.xx).call(a,t)}.bind(this),u=function(t,r){return i(this,n),a.isGrouped(t.id)?l(t,r)[0][1]:c(t.id,e)(a.isAreaRangeType(t)?a.getRangedData(t,"high"):a.getShapeYMin(t.id))}.bind(this),h=function(t,r){return i(this,n),a.isGrouped(t.id)?l(t,r)[1][1]:c(t.id,e)(a.isAreaRangeType(t)?a.getRangedData(t,"low"):t.value)}.bind(this);return function(t){var e=this;i(this,n);var l,c=s?a.filterRemoveNull(t.values):t.values,g=0,f=0;if(a.isAreaType(t)){var p=(0,Ue.area)();p=o?p.y(d).x0(u).x1(h):p.x(d).y0(r.area_above?0:r.area_below?a.state.height:u).y1(h),s||(p=p.defined(function(t){return i(this,e),null!==a.getBaseValue(t)}.bind(this))),a.isStepType(t)&&(c=a.convertValuesToStep(c)),l=p.curve(a.getCurve(t))(c)}else c[0]&&(g=a.scale.x(c[0].x),f=a.getYScaleById(t.id)(c[0].value)),l=o?"M "+f+" "+g:"M "+g+" "+f;return l||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){var i=this,n=i.config,a=i.getShapeX(0,t,e),r=i.getShapeY(!!e),s=i.getShapeOffset(i.isAreaType,t,e),o=i.getYScaleById.bind(i);return function(t,l){var c=o.call(i,t.id,e)(i.getShapeYMin(t.id)),d=s(t,l)||c,u=a(t),h=t.value,g=r(t);return n.axis_rotated&&(h>0&&g0?function(){return i(this,n),l}.bind(this):R(c)?function(t){return i(this,n),t*c}.bind(this):null;return function(t,e){i(this,n);var l=s(t,e),c=+o,u=+!c,h=t.value<0,g=r["axis_"+a.axis.getId(t.id)+"_inverted"],f=!g&&h||g&&!h,p=["",""],v=0,x=a.isGrouped(t.id),b=!(!d||!x)&&a.isStackingRadiusData(t);if(d){var _=o?u:c,m=l[2][_]-l[0][_],y="a"+(v=!x||b?d(m):0)+","+v+" "+(f?"1 0 0":"0 0 1")+" ";p[+!o]=""+y+v+","+v,p[+o]=""+y+[-v,v][o?"sort":"reverse"](),f&&p.reverse()}var T=o?"H"+(l[1][c]+(f?v:-v))+" "+p[0]+"V"+(l[2][u]-v)+" "+p[1]+"H"+l[3][c]:"V"+(l[1][u]+(f?-v:v))+" "+p[0]+"H"+(l[2][c]-v)+" "+p[1]+"V"+l[3][u];return"M"+l[0][c]+","+l[0][u]+T+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this,n=this,a=n.$el,r=n.config,s=n.data,o=n.state,l=t.id,c=t.index,d=t.value;if(o.hiddenTargetIds.indexOf(l)>-1){var u=a.bar.filter(function(t){return i(this,e),t.id===l&&t.value===d}.bind(this));return!u.empty()&&/a\d+/i.test(u.attr("d"))}var h=r.data_groups.find(function(t){return i(this,e),t.indexOf(l)>-1}.bind(this)),g=n.orderTargets(n.filterTargetsToShow(s.targets.filter(n.isBarType,n))).filter(function(t){return i(this,e),h.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return i(this,e),t.values.filter(function(t){return i(this,n),t.index===c&&(R(d)&&d>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return i(this,e),t.id}.bind(this));return 0!==d&&g.indexOf(l)===g.length-1},generateGetBarPoints:function(t,e){var n=this,a=this,r=a.config,s=e?a.axis.subX:a.axis.x,o=a.getIndicesMax(t)+1,l=a.getBarW("bar",s,o),c=a.getShapeX(l,t,!!e),d=a.getShapeY(!!e),u=a.getShapeOffset(a.isBarType,t,!!e),h=a.getYScaleById.bind(a);return function(t,s){i(this,n);var o=t.id,g=h.call(a,o,e)(a.getShapeYMin(o)),f=u(t,s)||g,p=R(l)?l:l[t.id]||l._$width,v=r["axis_"+a.axis.getId(o)+"_inverted"],x=t.value,b=c(t),_=d(t);r.axis_rotated&&!v&&(x>0&&_0&&b.start=e.open),e||null}},_n={initGauge:function(){var t=this,e=this,n=e.config,a=e.$el.arcs,r=function(e){i(this,t),a.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){var s=e.hasMultiArcGauge();a.append(s?"g":"path").attr("class",xt.chartArcsBackground).style("fill",!s&&n.gauge_background||null),n.gauge_units&&r(St.chartArcsGaugeUnit),n.gauge_label_show&&(r(St.chartArcsGaugeMin),n.gauge_fullCircle||r(St.chartArcsGaugeMax))}},updateGaugeMax:function(){var t=this,e=t.config,i=t.state,n=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(i.rendered);n+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=n-e.gauge_min)},redrawMultiArcGauge:function(){var t=this,e=this,n=e.config,r=e.state,s=e.$el,o=e.state.hiddenTargetIds,l=s.main.selectAll("."+xt.arcs).selectAll("."+xt.arcLabelLine).data(e.arcData.bind(e));l.enter().append("rect").attr("class",function(e){return i(this,t),xt.arcLabelLine+" "+vt.target+" "+vt.target+"-"+e.data.id}.bind(this)).merge(l).style("fill",function(n){return i(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){var i=0,n=0,s=0,l="";if(o.indexOf(t.data.id)<0){var c=e.updateAngle(t),d=r.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(c.index+1),u=c.endAngle-Math.PI/2,h=r.radius-d,g=u-(0===h?0:1/h);i=r.radiusExpanded-r.radius+d,n=Math.cos(g)*h,s=Math.sin(g)*h,l="rotate("+180*u/Math.PI+", "+n+", "+s+")"}(0,a.select)(this).attr("x",n).attr("y",s).attr("width",i).attr("height",2).attr("transform",l).style("stroke-dasharray","0, "+(i+2)+", 0")}))},textForGaugeMinMax:function(t,e){var i=this.config.gauge_label_extents;return k(i)?i.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){var t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},mn={initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){var t=this,e=t.state,i=e.width,n=e.height,a=ae,r=t.cache.get(a);return r||t.cache.add(a,r=st("min",[i,n])),r},getBubbleR:function(t){var e=this,n=this,a=n.config.bubble_maxR;k(a)?a=a.bind(n.api)(t):R(a)||(a=n.getBaseLength()/(2*n.getMaxDataCount())+12);var r=st("max",n.getMinMaxData().max.map(function(t){return i(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):F(t.value)?t.value.mid:t.value}.bind(this))),s=a*a*Math.PI,o=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(s/r);return Math.sqrt(o/Math.PI)},getBubbleZData:function(t,e){return F(t)?t[e]:t["y"===e?0:1]}},yn={initLine:function(){var t=this.$el;t.line=t.main.select("."+vt.chart).append("g").attr("class",Ct.chartLines).call(this.setCssRule(!1,"."+Ct.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this,n=this,a=n.$el,r=a.area,s=a.line,o=a.main,l=n.getChartClass("Line"),c=n.getClass("lines",!0),d=n.classFocus.bind(n);s||n.initLine();var u=t.filter(function(t){return i(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),h=o.select("."+Ct.chartLines).selectAll("."+Ct.chartLine).data(u).attr("class",function(t){return i(this,e),l(t)+d(t)}.bind(this)),g=h.enter().append("g").attr("class",l).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(g.append("g").attr("class",c),n.hasTypeOf("Area")){var f=(!r&&g.empty()?h:g).filter(n.isAreaType.bind(n));n.initArea(f)}n.updateTargetForCircle(u,g)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);var a=this,r=a.format.extraLineClasses,s=a.$el,o=a.$T,l=e?s.subchart:s,c=l.main.selectAll("."+Ct.lines).selectAll("."+Ct.line).data(a.lineData.bind(a));o(c.exit(),t).style("opacity","0").remove(),l.line=c.enter().append("path").attr("class",function(t){return i(this,n),a.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",a.color).merge(c).style("opacity",a.initialOpacity.bind(a)).attr("transform",null)},redrawLine:function(t,e,i){void 0===i&&(i=!1);var n=this.$el;return[(0,this.$T)((i?n.subchart:n).line,e,Z()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this,n=this;return n.config.axis_rotated&&n.isStepType(t)?function(a){i(this,e);var r=n.getInterpolate(t)(a);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var i=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,i),this._context.lineTo(t,i),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,a=this,r=a.config,s=a.scale,o=r.line_connectNull,l=r.axis_rotated,c=a.generateGetLinePoints(t,e),d=a.getYScaleById.bind(a),u=function(t){return i(this,n),(e?a.subxx:a.xx).call(a,t)}.bind(this),h=function(t,r){return i(this,n),a.isGrouped(t.id)?c(t,r)[0][1]:d(t.id,e)(a.getBaseValue(t))}.bind(this),g=(0,Ue.line)();g=l?g.x(h).y(u):g.x(u).y(h),o||(g=g.defined(function(t){return i(this,n),null!==a.getBaseValue(t)}.bind(this)));var f=e?s.subX:s.x;return function(t){i(this,n);var c,u=d(t.id,e),h=o?a.filterRemoveNull(t.values):t.values,p=0,v=0;if(a.isLineType(t)){var x=r.data_regions[t.id];x?c=a.lineWithRegions(h,s.zoom||f,u,x):(a.isStepType(t)&&(h=a.convertValuesToStep(h)),c=g.curve(a.getCurve(t))(h))}else h[0]&&(p=f(h[0].x),v=u(h[0].value)),c=l?"M "+v+" "+p:"M "+p+" "+v;return c||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,a){var r,s,o,l,c=this,d=this,u=d.config.axis_rotated,h=d.axis.isTimeSeries(),g=[];if(L(a))for(var f,p=function(t,e){return i(this,c),E(t)?e:h?dt.call(d,t):t}.bind(this),v=0;f=a[v];v++){var x=p(f.start,t[0].x),b=p(f.end,t[t.length-1].x),_=f.style||{dasharray:"2 2"};g[v]={start:x,end:b,style:_}}for(var m,y=u?function(t){return i(this,c),n(t.value)}.bind(this):function(t){return i(this,c),e(t.x)}.bind(this),T=u?function(t){return i(this,c),e(t.x)}.bind(this):function(t){return i(this,c),n(t.value)}.bind(this),w=function(t){return i(this,c),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),A=h?function(t,a,r,l){i(this,c);var d=t.x.getTime(),h=a.x-t.x,g=new Date(d+h*r),f=new Date(d+h*(r+l)),p=u?[[n(s(r)),e(g)],[n(s(r+o)),e(f)]]:[[e(g),n(s(r))],[e(f),n(s(r+o))]];return w(p)}.bind(this):function(t,a,o,l){i(this,c);var d=u?[[n(s(o),!0),e(r(o))],[n(s(o+l),!0),e(r(o+l))]]:[[e(r(o),!0),n(s(o))],[e(r(o+l),!0),n(s(o+l))]];return w(d)}.bind(this),k={x:d.axis.getAxisType("x"),y:d.axis.getAxisType("y")},C="",R=0;m=t[R];R++){var O=t[R-1],P=O&&S(O.value);_=d.isWithinRegions(m.x,g);if(S(m.value))if(!E(g)&&_&&P){if(P){try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}r=He(k.x,O.x,m.x),s=He(k.y,O.value,m.value);var I=e(m.x)-e(O.x),D=n(m.value)-n(O.value),z=Math.sqrt(Math.pow(I,2)+Math.pow(D,2));l=(o=_[0]/z)*_[1];for(var M=o;M<=1;M+=l)C+=A(O,m,M,o),M+l>=1&&(C+=A(O,m,1,0))}}else C+=(R&&P?"L":"M")+y(m)+","+T(m)}return C},isWithinRegions:function(t,e){for(var i,n=0;i=e[n];n++)if(i.start-1?"0":null})),c&&h.forEach(function(t){var e=this;i(this,n),l.main.selectAll("."+zt.selectedCircles+r.getTargetSelectorSuffix(t.id)).selectAll(""+zt.selectedCircle).each(function(n){i(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))}},updateCircle:function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.config,r=n.state,s=n.$el,o=a.point_focus_only,l=t?s.subchart:s;if(a.point_show&&!r.toggling){var c=l.main.selectAll("."+Tt.circles).selectAll("."+Tt.circle).data(function(t){return i(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?o?[t.values[0]]:t.values:[]}.bind(this));c.exit().remove(),c.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),l.circle=l.main.selectAll("."+Tt.circles+" ."+Tt.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,i,n,a){void 0===a&&(a=!1);var r=this,s=r.state.rendered,o=r.$el,l=r.$T,c=a?o.subchart:o,d=c.main.selectAll("."+zt.selectedCircle);if(!r.config.point_show)return[];var u=r.point("update",r,t,e,r.getStylePropValue(r.color),i,n,d),h=r.isCirclePoint()?"c":"",g=Z(),f=r.opacityForCircle.bind(r),p=[];return c.circle.each((function(t){var e=u.bind(this)(t);e=l(e,i||!s,g).style("opacity",f),p.push(e)})),[p,l(d,i).attr(h+"x",t).attr(h+"y",e)]},showCircleFocus:function(t){var e=this,n=e.config,r=e.state,s=r.hasRadar,o=r.resizing,l=r.toggling,c=r.transiting,d=e.$el.circle;if(!1===c&&n.point_focus_only&&d){var u=(s?e.radarCircleX:e.circleX).bind(e),h=(s?e.radarCircleY:e.circleY).bind(e),g=l||E(t),f=e.point("update",e,u,h,e.getStylePropValue(e.color),!o&&g);t&&(d=d.filter((function(e){var n=this,r=null==t.filter?void 0:t.filter(function(t){return i(this,n),t.id===e.id}.bind(this));return!!r.length&&(0,a.select)(this).datum(r[0])}))),d.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){var i=t.id,n=t.index,a=t.value,r="hidden";S(a)&&(f.bind(this)(t),e.expandCircles(n,i),r=""),this.style.visibility=r}))}},hideCircleFocus:function(){var t=this,e=t.config,i=t.$el.circle;e.point_focus_only&&i&&(t.unexpandCircles(),i.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);var n=this,a=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,s){i(this,e);var o=r.id;return n.isGrouped(o)?a(r,s)[0][1]:n.getYScaleById(o,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,i){var n=this,r=n.pointExpandedR.bind(n);i&&n.unexpandCircles();var s=n.getShapeByIndex("circle",t,e).classed(vt.EXPANDED,!0),o=r(s)/n.config.point_r,l=1-o;n.isCirclePoint()?s.attr("r",r):s.each((function(){var t=(0,a.select)(this);if("circle"===this.tagName)t.attr("r",r);else{var e=this.getBBox(),i=e.width,n=e.height,s=l*(+t.attr("x")+i/2),c=l*(+t.attr("y")+n/2);t.attr("transform","translate("+s+" "+c+") scale("+o+")")}}))},unexpandCircles:function(t){var e=this,i=e.pointR.bind(e),n=e.getShapeByIndex("circle",t).filter((function(){return(0,a.select)(this).classed(vt.EXPANDED)})).classed(vt.EXPANDED,!1);if(n.attr("r",i),!e.isCirclePoint()){var r=i(n)/e.config.point_r;n.attr("transform",1!==r?"scale("+r+")":null)}},pointR:function(t){var e=this,i=e.config.point_r,n=i;return e.isBubbleType(t)?n=e.getBubbleR(t):k(i)&&(n=i.bind(e.api)(t)),t.r=n,n},pointExpandedR:function(t){var e=this,i=e.config,n=e.isBubbleType(t)?1.15:1.75;return i.point_focus_expand_enabled?i.point_focus_expand_r||e.pointR(t)*n:e.pointR(t)},pointSelectR:function(t){var e=this.config.point_select_r;return k(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var i=H(this.state.event,t),n=(0,a.select)(t),r=this.isCirclePoint(t)?"c":"",s=+n.attr(r+"x"),o=+n.attr(r+"y");if(!s&&!o&&1===t.nodeType){var l=U(t);s=l.x,o=l.y}return Math.sqrt(Math.pow(s-i[0],2)+Math.pow(o-i[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){var e=this.config.point_sensitivity;return k(e)?e=e.call(this.api,t):"radius"===e&&(e=t.r),e},insertPointInfoDefs:function(t,e){var n,r=this,s=function(t,e){i(this,r);for(var n,a=t.attributes,s=0;n=a[s];s++)n=n.name,e.setAttribute(n,t.getAttribute(n))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,l=h.createElementNS(a.namespaces.svg,o.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",s(o,l),null!=(n=o.childNodes)&&n.length){var c=(0,a.select)(l);"innerHTML"in l?c.html(o.innerHTML):tt(o.childNodes).forEach(function(t){i(this,r),s(t,c.append(t.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(l)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){var e=this,i=e.$el.circle,n=!1;return(F(t)||i)&&(n=!0===t?i.each((function(t){var i=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(vt.EXPANDED)>-1&&(i+=" "+vt.EXPANDED),this.setAttribute("class",i)})):e.getClass("circle",!0)(t)),n},generateGetLinePoints:function(t,e){var n=this,a=this,r=a.config,s=a.getShapeX(0,t,e),o=a.getShapeY(e),l=a.getShapeOffset(a.isLineType,t,e),c=a.getYScaleById.bind(a);return function(t,d){i(this,n);var u=c.call(a,t.id,e)(a.getShapeYMin(t.id)),h=l(t,d)||u,g=s(t),f=o(t);r.axis_rotated&&(t.value>0&&f2?o-2:0),c=2;ci&&(i=e),i}var Sn={initPolar:function(){var t=this,e=t.$el.arcs,i=t.config,n=i.polar_level_text_show,a=i.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Pt),n&&a&&t.generateDataLabelBackgroundColorFilter(a)},getPolarOuterRadius:function(t,e){var i,n=An(this);return(null!=(i=null==t?void 0:t.data.values[0].value)?i:0)/n*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this,e=this,n=e.config,a=e.state,r=e.$el.arcs.levels,s=n.polar_level_depth,o=An(e),l=ot(0,s),c=a.radius,d=l.map(function(e){return i(this,t),c*((e+1)/s)}.bind(this)),u=(n.polar_level_text_format||function(){}).bind(e.api),h=r.selectAll("."+Ot).data(l);h.exit().remove();var g=h.enter().append("g").attr("class",function(e,n){return i(this,t),Ot+" "+Ot+"-"+n}.bind(this));if(g.append("circle"),g.merge(h).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return i(this,t),d[e]}.bind(this)),n.polar_level_text_show){var f=n.polar_level_text_backgroundColor,p="#"+a.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(f);g.append("text").style("text-anchor","middle"),g.merge(h).selectAll("text").attr("dy",function(e){return i(this,t),5-d[e]}.bind(this)).attr("filter",f?"url("+p+")":null).text(function(e){return i(this,t),u(o/l.length*(e+1))}.bind(this))}}};var kn=de,Cn={initRadar:function(){var t=this,e=t.config,i=t.state.current,n=t.$el;t.hasType("radar")&&(n.radar=n.main.select("."+vt.chart).append("g").attr("class",It.chartRadars),n.radar.levels=n.radar.append("g").attr("class",Pt),n.radar.axes=n.radar.append("g").attr("class",_t.axis),n.radar.shapes=n.radar.append("g").attr("class",Mt.shapes),i.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config,e=this.state,i=e.arcWidth,n=e.arcHeight,a=t.axis_x_categories.length<4?-20:10,r=(Math.min(i,n)-a)/2;return[r,r]},updateTargetsForRadar:function(t){var e=this,n=this.config;M(n.axis_x_categories)&&(n.axis_x_categories=ot(0,st("max",t.map(function(t){return i(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,a){var r=this,s=this.config,o=this.getRadarSize(),l=o[0],c=o[1],d=s.axis_x_categories.length,u=s.radar_direction_clockwise,h=tt(t).map(function(o){return i(this,r),function(t,e,i,n,a,r){var s=t&&n>0?i-n:n,o=2*Math.PI;return a*(1-r*("x"===e?Math.sin:Math.cos)(s*o/i))}(u,o,d,e,L(n)?n:"x"===t?l:c,R(a)?a:s.radar_size_ratio)}.bind(this));return 1===h.length?h[0]:h},generateRadarPoints:function(){var t=this,e=this,n=e.data.targets,a=e.getRadarSize(),r=a[0],s=a[1],o=e.cache.get(kn)||{},l=o._size;(!l||l.width!==r&&l.height!==s)&&(n.forEach(function(n){var a=this;i(this,t),o[n.id]=n.values.map(function(t,n){return i(this,a),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),o._size={width:r,height:s},e.cache.add(kn,o))},redrawRadar:function(){var t=this,e=t.$el,i=e.radar,n=e.main,a=t.getTranslate("radar");a&&(i.attr("transform",a),n.select("."+Xt.chartTexts).attr("transform",a),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this,e=this.cache.get(kn);return function(n,a){i(this,t);var r=e[n.id][a];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this,e=this,n=e.config,a=e.state,r=e.$el.radar,s=e.getRadarSize(),o=s[0],l=s[1],c=n.radar_level_depth,d=n.axis_x_categories.length,u=n.radar_level_text_show,h=r.levels,g=ot(0,c),f=n.radar_size_ratio*Math.min(o,l),p=g.map(function(e){return i(this,t),f*((e+1)/c)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),x=g.map(function(n){var a=this;i(this,t);var r=p[n];return ot(0,d).map(function(t){return i(this,a),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),b=h.selectAll("."+Ot).data(g);b.exit().remove();var _=b.enter().append("g").attr("class",function(e,n){return i(this,t),Ot+" "+Ot+"-"+n}.bind(this));_.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),u&&(h.select("text").empty()&&h.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return i(this,t),v(0)}.bind(this)),_.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return i(this,t),v(a.current.dataMax/g.length*(e+1))}.bind(this))),_.merge(b).attr("transform",function(e){return i(this,t),"translate("+(o-p[e])+", "+(l-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return i(this,t),x[e]}.bind(this)),u&&h.selectAll("text").attr("x",function(e){return i(this,t),E(e)?o:x[e].split(",")[0]}.bind(this)).attr("y",function(e){return i(this,t),E(e)?l:0}.bind(this))},updateRadarAxes:function(){var t=this,e=this,n=e.config,r=e.$el.radar,s=e.getRadarSize(),o=s[0],l=s[1],c=n.axis_x_categories,d=r.axes.selectAll("g").data(c);d.exit().remove();var u=d.enter().append("g").attr("class",function(e,n){return i(this,t),_t.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&u.append("line"),n.radar_axis_text_show&&u.append("text"),d=u.merge(d),n.radar_axis_line_show&&d.select("line").attr("x1",o).attr("y1",l).attr("x2",function(n,a){return i(this,t),e.getRadarPosition("x",a)}.bind(this)).attr("y2",function(n,a){return i(this,t),e.getRadarPosition("y",a)}.bind(this)),n.radar_axis_text_show){var h=n.radar_axis_text_position,g=h.x,f=void 0===g?0:g,p=h.y,v=void 0===p?0:p;d.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){i(this,t),e.each((function(t){V((0,a.select)(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return i(this,t),{index:n}}.bind(this)).attr("transform",(function(t){E(this.width)&&(this.width=this.getBoundingClientRect().width/2);var i=e.getRadarPosition("x",t.index,void 0,1),n=Math.round(e.getRadarPosition("y",t.index,void 0,1));return i>o?i+=this.width+f:Math.round(i)l?(n/2===l&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),n+=v):n=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ln(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i=0,p=!i||i.indexOf(h)>=0,v=o.classed(zt.SELECTED);o.classed(Ct.line)||o.classed(bt.area)||(t?f&&p&&c(s)&&!v?g(!0,o.classed(zt.SELECTED,!0),s,h):L(n)&&n&&v&&g(!1,o.classed(zt.SELECTED,!1),s,h):f&&p&&c(s)&&v&&g(!1,o.classed(zt.SELECTED,!1),s,h))}))}var ba={selected:function(t){var e=this,n=this.internal,r=[];return n.$el.main.selectAll("."+(Mt.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Mt.shape).filter((function(){return(0,a.select)(this).classed(zt.SELECTED)})).each(function(t){return i(this,e),r.push(t)}.bind(this)),r},select:function(t,e,i){var n=this.internal;xa.bind(n)(!0,t,e,i)},unselect:function(t,e){var i=this.internal;xa.bind(i)(!1,t,e)}},_a={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,i=t.config,n=i.subchart_show;if(!n){var a,r;t.unbindZoomEvent(),i.subchart_show=!n,e.main||t.initSubchart();var s,o=e.main.selectAll("."+vt.target);if(t.data.targets.length!==o.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),o=null==(s=e.main)?void 0:s.selectAll("."+vt.target);null==(a=o)||a.style("opacity",null),null==(r=e.main)||r.style("display",null),this.resize()}},hide:function(){var t=this.internal,e=t.$el.subchart.main,i=t.config;i.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(i.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){var t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()}}},ma=p(14);var ya=function(t){var e=this,n=this.internal,a=n.$el,r=n.axis,s=n.config,o=n.org,l=n.scale,c=s.axis_rotated,d=s.axis_x_inverted,u=r.isCategorized(),h=t;if(s.zoom_enabled&&h){r.isTimeSeries()&&(h=h.map(function(t){return i(this,e),dt.bind(n)(t)}.bind(this)));var g=function(t,e,n,a){var r=this;void 0===a&&(a=!1);var s=n[0],o=n[1];return t.every(function(n,l){var c=this;return i(this,r),(0===l?a?+n<=s:+n>=s:a?+n>=o:+n<=o)&&!t.every(function(t,n){return i(this,c),t===e[n]}.bind(this))}.bind(this))}(h,n.getZoomDomain(!0),n.getZoomDomain(),d);if(g){if(u&&(h=h.map(function(t,n){return i(this,e),+t+(0===n?0:1)}.bind(this))),n.api.tooltip.hide(),s.subchart_show){var f=l.zoom||l.x;n.brush.getSelection().call(n.brush.move,h.map(f))}else{var p,v=u?l.x.orgScale():o.xScale||l.x,x=[-v(h[0]),0],b=(p=ma.zoomIdentity.scale(v.range()[1]/(v(h[1])-v(h[0])))).translate.apply(p,c?x.reverse():x);a.eventRect.call(n.zoom.transform,b)}n.setZoomResetButton()}}else h=l.zoom?l.zoom.domain():l.x.orgDomain();return h};J(ya,{enable:function(t){var e=this.internal,i=e.config;/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_max=st("max",[n[1],t])),i.zoom_x_max},min:function(t){var e=this.internal,i=e.config,n=e.org.xDomain;return(0===t||t)&&(i.zoom_x_min=st("min",[n[0],t])),i.zoom_x_min},range:function(t){var e=this.zoom;if(F(t)){var i=t.min,n=t.max;L(i)&&e.min(i),L(n)&&e.max(n)}return{min:e.min(),max:e.max()}}});var Ta={zoom:ya,unzoom:function(){var t=this.internal,e=t.config,i=t.$el,n=i.eventRect,a=i.zoomResetBtn;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(ma.zoomIdentity),t.updateZoom(!0),null==a||a.style("display","none"),(0,ma.zoomTransform)(n.node())!==ma.zoomIdentity&&t.zoom.transform(n,ma.zoomIdentity))}},wa={drag:function(t){var e=this,n=this,r=n.config,s=n.state,o=n.$el.main,l=r.data_selection_grouped,c=r.interaction_enabled&&r.data_selection_isselectable;if(!n.hasArcType()&&r.data_selection_enabled&&(!r.zoom_enabled||n.zoom.altDomain)&&r.data_selection_multiple){var d=s.dragStart||[0,0],u=d[0],h=d[1],g=t[0],f=t[1],p=Math.min(u,g),v=Math.max(u,g),x=l?s.margin.top:Math.min(h,f),b=l?s.height:Math.max(h,f);o.select("."+At.dragarea).attr("x",p).attr("y",x).attr("width",v-p).attr("height",b-x),o.selectAll("."+Mt.shapes).selectAll("."+Mt.shape).filter(function(t){return i(this,e),null==c?void 0:c.bind(n.api)(t)}.bind(this)).each((function(t,e){var i,r=(0,a.select)(this),s=r.classed(zt.SELECTED),o=r.classed(At.INCLUDED),l=!1;if(r.classed(Tt.circle)){var c=1*+r.attr("cx"),d=1*+r.attr("cy");i=n.togglePoint,l=p0?n:a]}.bind(this))),c&&a[1].reverse(),this.extent(a),this.update()},r.brush.getSelection=function(){return i(this,n),l.main?l.main.select("."+Gt.brush):(0,a.select)([])}.bind(this)},initSubchart:function(){var t=this,e=this,n=e.config,a=e.state,r=a.clip,s=a.hasAxis,o=e.$el,l=o.defs,c=o.svg,d=o.subchart,u=o.axis;if(s){var h=n.subchart_show?null:"hidden",g=r.id+"-subchart",f=e.getClipPath(g);r.idSubchart=g,e.appendClip(l,g),e.initBrush(),d.main=c.append("g").classed(Gt.subchart,!0).attr("transform",e.getTranslate("context"));var p=d.main;p.style("visibility",h),p.append("g").attr("clip-path",f).attr("class",Gt.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){i(this,t);var a=Q(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(a)){var r=p.select("."+Gt.chart),s=Gt["chart"+a+"s"];r.select("."+s).empty()&&r.append("g").attr("class",s)}}.bind(this));var v=p.append("g").attr("clip-path",f).attr("class",Gt.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),u.subX=p.append("g").attr("class",Gt.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?h:"hidden")}},addBrushHandle:function(t){var e=this,n=this.config,a=n.axis_rotated,r=n.subchart_init_range,s=a?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(a?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(a?"ns":"ew")+"-resize").attr("d",function(t){return i(this,e),s[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this,n=this,a=n.config,r=n.state,s=n.$el.subchart.main;a.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return i(this,e),n.hasType(t)||n.hasTypeOf(Q(t))}.bind(this)).forEach(function(a){i(this,e);var r=/^(bubble|scatter)$/.test(a),o=Q(r?"circle":a),l=n.getChartClass(o,!0),c=n.getClass(r?"circles":a+"s",!0),d=s.select("."+Gt["chart"+o+"s"]);if(r){var u=d.selectAll("."+Gt.circles).data(t.filter(n["is"+Q(a)+"Type"].bind(n))).attr("class",c);u.exit().remove(),u.enter().append("g").attr("class",c)}else{var h=d.selectAll("."+Gt["chart"+o]).attr("class",l).data(t.filter(n["is"+o+"Type"].bind(n))),g=h.enter().append("g").style("opacity","0").attr("class",l).append("g").attr("class",c);h.exit().remove(),"line"===a&&n.hasTypeOf("Area")&&g.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),s.selectAll("."+Gt.brush+" rect").attr(a.axis_rotated?"width":"height",a.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var a,r=this,s=this,o=s.config,l=s.$el.subchart.main,c=s.state,d=!!e;if((l.style("visibility",o.subchart_show?null:"hidden"),o.subchart_show)&&("zoom"===(null==(a=c.event)?void 0:a.type)&&s.brush.update(),t)){var u=o.subchart_init_range;if(K(s)||s.brush.update(),Object.keys(n.type).forEach(function(t){i(this,r);var e=Q(t),a=s["generateDraw"+e](n.indices[t],!0);s["update"+e](d,!0),s["redraw"+e](a,d,!0)}.bind(this)),s.hasType("bubble")||s.hasType("scatter")){var h=n.pos.cx,g=s.updateCircleY(!0);s.updateCircle(!0),s.redrawCircle(h,g,d,void 0,!0)}!c.rendered&&u&&s.brush.move(s.brush.getSelection(),u.map(s.scale.x))}},redrawForBrush:function(){var t=this,e=t.config,i=e.subchart_onbrush,n=e.zoom_rescale,a=t.scale;t.redraw({withTransition:!1,withY:n,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),i.bind(t.api)(a.x.orgDomain())},transformContext:function(t,e){var i=this,n=i.$el.subchart,a=i.$T,r=null!=e&&e.axisSubX?e.axisSubX:a(n.main.select("."+Gt.axisX),t);n.main.attr("transform",i.getTranslate("context")),r.attr("transform",i.getTranslate("subX"))},getExtent:function(){var t=this,e=this,n=e.config,a=e.scale,r=n.axis_x_extent;if(r)if(k(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),a.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){var s=dt.bind(e);r=r.map(function(e){return i(this,t),a.subX(s(e))}.bind(this))}return r}},Ra={initZoom:function(){var t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);var e=this,i=e.config;i.zoom_enabled&&t?i.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this,e=this,n=e.config,a=e.org,r=e.scale,s=(0,ma.zoom)().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));s.orgScaleExtent=function(){i(this,t);var a=n.zoom_extent||[1,10];return[a[0],Math.max(e.getMaxDataCount()/a[1],a[1])]}.bind(this),s.updateScaleExtent=function(){var t=D(e.scale.x.orgDomain())/D(e.getZoomDomain()),i=this.orgScaleExtent();return this.scaleExtent([i[0]*t,i[1]*t]),this},s.updateTransformScale=function(s,o){var l;i(this,t);var c=n.axis_rotated;null==(l=a.xScale)||l.range(r.x.range());var d=s[c?"rescaleY":"rescaleX"](a.xScale||r.x),u=e.trimXDomain(d.domain()),h=n.zoom_rescale;if(d.domain(u,a.xDomain),o){var g=d(r.x.domain()[0]),f=c?s.x:g,p=c?g:s.y;e.$el.eventRect.property("__zoom",ma.zoomIdentity.translate(f,p).scale(s.k))}e.state.xTickOffset||(e.state.xTickOffset=e.axis.x.tickOffset()),r.zoom=e.getCustomizedXScale(d),e.axis.x.scale(r.zoom),h&&(a.xScale||(a.xScale=r.x.copy()),r.x.domain(u))}.bind(this),s.getDomain=function(){i(this,t);var n=r[r.zoom?"zoom":"subX"].domain();return e.axis.isCategorized()&&(n[1]-=2),n}.bind(this),e.zoom=s},onZoomStart:function(t){var e=this,i=t.sourceEvent;i&&(e.zoom.startEvent=i,e.state.zooming=!0,N(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(t){var e=this,n=this,a=n.config,r=n.scale,s=n.state,o=n.org,l=t.sourceEvent,c=(null==t?void 0:t.transform)===ma.zoomIdentity;if(!(!a.zoom_enabled||0===n.filterTargetsToShow(n.data.targets).length||!r.zoom&&(null==l?void 0:l.type.indexOf("touch"))>-1&&1===(null==l?void 0:l.touches.length))){t.sourceEvent&&(s.zooming=!0);var d="mousemove"===(null==l?void 0:l.type),u=(null==l?void 0:l.wheelDelta)<0,h=t.transform;!d&&u&&r.x.domain().every(function(t,n){return i(this,e),t!==o.xDomain[n]}.bind(this))&&r.x.domain(o.xDomain),n.zoom.updateTransformScale(h,"wheel"===a.zoom_type&&l);var g=a.transition_duration>0&&!a.subchart_show&&(s.dragging||c||!t.sourceEvent);n.redraw({withTransition:g,withY:a.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n.state.cancelClick=d,c||N(a.zoom_onzoom,n.api,n.zoom.getDomain())}},onZoomEnd:function(t){var e,i,n=this,a=n.config,r=n.state,s=n.zoom.startEvent,o=null==t?void 0:t.sourceEvent,l=(null==t?void 0:t.transform)===ma.zoomIdentity;(null==(e=s)?void 0:e.type.indexOf("touch"))>-1&&(s=s.changedTouches[0],o=null==(i=o)||null==(i=i.changedTouches)?void 0:i[0]);"drag"===a.zoom_type&&o&&s.clientX===o.clientX&&s.clientY===o.clientY||(n.redrawEventRect(),n.updateZoom(),r.zooming=!1,!l&&(o||r.dragging)&&N(a.zoom_onzoomend,n.api,n.zoom.getDomain()))},updateZoom:function(t){var e=this,i=e.scale,n=i.subX,a=i.x,r=i.zoom;if(r){var s=r.domain(),o=n.domain(),l=.015,c=e.config.axis_x_inverted?(s[0]>=o[0]||s[0]+l>=o[0])&&(o[1]>=s[1]||o[1]>=s[1]+l):(s[0]<=o[0]||s[0]-l<=o[0])&&(o[1]<=s[1]||o[1]<=s[1]-l);(t||c)&&(e.axis.x.scale(n),a.domain(n.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this,e=this,n=e.config,a=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){i(this,t)}.bind(this)),a.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t,e=this,n=this,a=n.config,r=n.state,s=a.axis_rotated,o=0,l=0,c={axis:s?"y":"x",attr:s?"height":"width",index:s?1:0};n.zoomBehaviour=(0,Pe.drag)().clickDistance(4).on("start",(function(e){r.event=e,n.setDragStatus(!0),n.unselectRect(),t||(t=n.$el.main.append("rect").attr("clip-path",r.clip.path).attr("class",Nt.zoomBrush).attr("width",s?r.width:0).attr("height",s?0:r.height)),o=H(e,this)[c.index],l=o,t.attr(c.axis,o).attr(c.attr,0),n.onZoomStart(e)})).on("drag",(function(e){l=H(e,this)[c.index],t.attr(c.axis,Math.min(o,l)).attr(c.attr,Math.abs(l-o))})).on("end",function(a){var s=this;i(this,e);var d=n.scale.zoom||n.scale.x;if(r.event=a,t.attr(c.axis,0).attr(c.attr,0),o>l){var u=[l,o];o=u[0],l=u[1]}o<0&&(l+=Math.abs(o),o=0),o!==l&&n.api.zoom([o,l].map(function(t){return i(this,s),d.invert(t)}.bind(this))),n.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){var t=this,e=t.config,i=t.$el,n=e.zoom_resetButton;n&&"drag"===e.zoom_type&&(i.zoomResetBtn?i.zoomResetBtn.style("display",null):i.zoomResetBtn=t.$el.chart.append("div").classed(vt.button,!0).append("span").on("click",(function(){k(n.onclick)&&n.onclick.bind(t.api)(this),t.api.unzoom()})).classed(Nt.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}},Ea=void 0,La={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return i(this,Ea),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){i(this,Ea)}.bind(void 0),data_onunselected:function(){i(this,Ea)}.bind(void 0)},Oa={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){i(this,undefined)}.bind(void 0)},Pa={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},Ia=void 0,Da=function(){var t=this;return i(this,Ia),J(si.prototype,ka),J(Ti.prototype,ba),ne.setOptions([La]),(Da=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),za=function(){var t=this;return i(this,Ia),J(si.prototype,Ca),J(Ti.prototype,_a),ne.setOptions([Oa]),(za=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),Ma=function(){var t=this;return i(this,Ia),J(si.prototype,Ra),J(Ti.prototype,Ta),ne.setOptions([Pa]),(Ma=function(){return i(this,t),!0}.bind(this))()}.bind(void 0),$a={},Xa={version:"3.9.2-nightly-20230808003859",generate:function(t){var e=at({},$a,t),i=new Ti(e);return i.internal.charts=this.instance,this.instance.push(i),i},defaults:function(t){return F(t)&&($a=t),$a},instance:[],plugin:{}},Fa=void 0;Object.keys(t).forEach(function(e){return i(this,Fa),t[e]()}.bind(void 0)),Object.keys(e).forEach(function(t){return i(this,Fa),e[t]()}.bind(void 0))}(),v}()})); \ No newline at end of file diff --git a/dist/billboard.pkgd.js b/dist/billboard.pkgd.js index 4f58cabfd..317ae330d 100644 --- a/dist/billboard.pkgd.js +++ b/dist/billboard.pkgd.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills. * - @types/d3-selection ^3.0.5 @@ -24824,6 +24824,7 @@ var Store = /*#__PURE__*/function () { * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license */ + /** * main config options */ @@ -25198,13 +25199,21 @@ var Store = /*#__PURE__*/function () { * @memberof Options * @type {Array} * @default [] + * @see [Demo](https://naver.github.io/billboard.js/demo/#Region.RegionLabel) * @example * regions: [ * { * axis: "x", * start: 1, * end: 4, - * class: "region-1-4" + * class: "region-1-4", + * label: { + * text: "Region Text", + * x: 5, // position relative of the initial x coordinate + * y: 5, // position relative of the initial y coordinate + * color: "red", // color string + * rotated: true // make text to show in vertical or horizontal + * } * } * ] */ @@ -35548,75 +35557,76 @@ function title_getTextPos(pos, width) { len = d.length; var text, row, param, value, i; var _loop = function () { - var _this3 = this; - row = d[i]; - if (!row || !(getRowValue(row) || getRowValue(row) === 0)) { - return "continue"; - } - if (isUndefined(text)) { - var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x); - text = tplProcess(tpl[0], { - CLASS_TOOLTIP: $TOOLTIP.tooltip, - TITLE: isValue(title) ? tplStr ? title : "" + title + "" : "" - }); - } - if (!row.ratio && $el.arcs) { - param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]]; - row.ratio = $$.getRatio.apply($$, param); - } - param = [row.ratio, row.id, row.index, d]; - value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param))); - if ($$.isAreaRangeType(row)) { - var _map2 = ["high", "low"].map(function (v) { - _newArrowCheck(this, _this3); - return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param))); - }.bind(this)), - high = _map2[0], - low = _map2[1]; - value = "Mid: " + value + " High: " + high + " Low: " + low; - } else if ($$.isCandlestickType(row)) { - var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) { - _newArrowCheck(this, _this3); - return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param))); - }.bind(this)), - open = _map3[0], - _high = _map3[1], - _low = _map3[2], - close = _map3[3], - volume = _map3[4]; - value = "Open: " + open + " High: " + _high + " Low: " + _low + " Close: " + close + (volume ? " Volume: " + volume : ""); - } else if ($$.isBarRangeType(row)) { - var _row$value = row.value, - start = _row$value[0], - end = _row$value[1]; - value = valueFormat(start) + " ~ " + valueFormat(end); - } - if (value !== undefined) { - // Skip elements when their name is set to null - if (row.name === null) { - return "continue"; + var _this3 = this; + row = d[i]; + if (!row || !(getRowValue(row) || getRowValue(row) === 0)) { + return 0; // continue } - var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))), - _color = getBgColor(row), - contentValue = { - CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id), - COLOR: tplStr || !$$.patterns ? _color : "", - NAME: name, - VALUE: value - }; - if (tplStr && isObject(contents.text)) { - var index = targetIds.indexOf(row.id); - Object.keys(contents.text).forEach(function (key) { - _newArrowCheck(this, _this3); - contentValue[key] = contents.text[key][index]; - }.bind(this)); + if (isUndefined(text)) { + var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x); + text = tplProcess(tpl[0], { + CLASS_TOOLTIP: $TOOLTIP.tooltip, + TITLE: isValue(title) ? tplStr ? title : "" + title + "" : "" + }); } - text += tplProcess(tpl[1], contentValue); - } - }; + if (!row.ratio && $el.arcs) { + param = ["arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]]; + row.ratio = $$.getRatio.apply($$, param); + } + param = [row.ratio, row.id, row.index, d]; + value = sanitise(valueFormat.apply(void 0, [getRowValue(row)].concat(param))); + if ($$.isAreaRangeType(row)) { + var _map2 = ["high", "low"].map(function (v) { + _newArrowCheck(this, _this3); + return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v)].concat(param))); + }.bind(this)), + high = _map2[0], + low = _map2[1]; + value = "Mid: " + value + " High: " + high + " Low: " + low; + } else if ($$.isCandlestickType(row)) { + var _map3 = ["open", "high", "low", "close", "volume"].map(function (v) { + _newArrowCheck(this, _this3); + return sanitise(valueFormat.apply(void 0, [$$.getRangedData(row, v, "candlestick")].concat(param))); + }.bind(this)), + open = _map3[0], + _high = _map3[1], + _low = _map3[2], + close = _map3[3], + volume = _map3[4]; + value = "Open: " + open + " High: " + _high + " Low: " + _low + " Close: " + close + (volume ? " Volume: " + volume : ""); + } else if ($$.isBarRangeType(row)) { + var _row$value = row.value, + start = _row$value[0], + end = _row$value[1]; + value = valueFormat(start) + " ~ " + valueFormat(end); + } + if (value !== undefined) { + // Skip elements when their name is set to null + if (row.name === null) { + return 0; // continue + } + var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))), + _color = getBgColor(row), + contentValue = { + CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id), + COLOR: tplStr || !$$.patterns ? _color : "", + NAME: name, + VALUE: value + }; + if (tplStr && isObject(contents.text)) { + var index = targetIds.indexOf(row.id); + Object.keys(contents.text).forEach(function (key) { + _newArrowCheck(this, _this3); + contentValue[key] = contents.text[key][index]; + }.bind(this)); + } + text += tplProcess(tpl[1], contentValue); + } + }, + _ret; for (i = 0; i < len; i++) { - var _ret = _loop(); - if (_ret === "continue") continue; + _ret = _loop(); + if (_ret === 0) continue; } return text + ""; }, @@ -42591,21 +42601,53 @@ function smoothLines(el, type) { var regionsEnter = regions.enter().append("g"); regionsEnter.append("rect").style("fill-opacity", "0"); region.list = regionsEnter.merge(regions).attr("class", $$.classRegion.bind($$)); + region.list.each(function (d) { + var _d$label, + g = src_select(this); + if (g.select("text").size() === 0 && (_d$label = d.label) != null && _d$label.text) { + src_select(this).append("text").style("opacity", "0"); + } + }); }, redrawRegion: function redrawRegion(withTransition) { var _this = this, $$ = this, region = $$.$el.region, $T = $$.$T, - regions = region.list.select("rect"); + regions = region.list.select("rect"), + label = region.list.selectAll("text"); regions = $T(regions, withTransition).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$)); + label = $T(label, withTransition).attr("transform", function (d) { + var _d$label2; + _newArrowCheck(this, _this); + var _ref = (_d$label2 = d.label) != null ? _d$label2 : {}, + _ref$x = _ref.x, + x = _ref$x === void 0 ? 0 : _ref$x, + _ref$y = _ref.y, + y = _ref$y === void 0 ? 0 : _ref$y, + _ref$rotated = _ref.rotated, + rotated = _ref$rotated === void 0 ? !1 : _ref$rotated; + return "translate(" + ($$.regionX.bind($$)(d) + x) + ", " + ($$.regionY.bind($$)(d) + y) + ")" + (rotated ? " rotate(-90)" : ""); + }.bind(this)).attr("text-anchor", function (d) { + var _d$label3; + _newArrowCheck(this, _this); + return (_d$label3 = d.label) != null && _d$label3.rotated ? "end" : null; + }.bind(this)).attr("dy", "1em").style("fill", function (d) { + var _d$label$color, _d$label4; + _newArrowCheck(this, _this); + return (_d$label$color = (_d$label4 = d.label) == null ? void 0 : _d$label4.color) != null ? _d$label$color : null; + }.bind(this)).text(function (d) { + var _d$label5; + _newArrowCheck(this, _this); + return (_d$label5 = d.label) == null ? void 0 : _d$label5.text; + }.bind(this)); return [regions.style("fill-opacity", function (d) { _newArrowCheck(this, _this); return isValue(d.opacity) ? d.opacity : null; }.bind(this)).on("end", function () { // remove unnecessary rect after transition src_select(this.parentNode).selectAll("rect:not([x])").remove(); - })]; + }), label.style("opacity", null)]; }, getRegionXY: function getRegionXY(type, d) { var $$ = this, @@ -42809,6 +42851,7 @@ function smoothLines(el, type) { * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license */ + /** * Axis based chart data config options */ @@ -53082,7 +53125,7 @@ var _defaults = {}; /** * @namespace bb - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ var bb = { /** @@ -53092,7 +53135,7 @@ var bb = { * bb.version; // "1.0.0" * @memberof bb */ - version: "3.9.2-nightly-20230805003715", + version: "3.9.2-nightly-20230808003859", /** * Generate chart * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: @@ -53376,7 +53419,10 @@ function _regeneratorRuntime() { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; - return doneResult(); + return { + value: void 0, + done: !0 + }; } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; @@ -53429,7 +53475,7 @@ function _regeneratorRuntime() { }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { - if (iterable) { + if (iterable || "" === iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; @@ -53442,15 +53488,7 @@ function _regeneratorRuntime() { return next.next = next; } } - return { - next: doneResult - }; - } - function doneResult() { - return { - value: undefined, - done: !0 - }; + throw new TypeError(_typeof(iterable) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, diff --git a/dist/billboard.pkgd.min.js b/dist/billboard.pkgd.min.js index 52027830d..bba337984 100644 --- a/dist/billboard.pkgd.min.js +++ b/dist/billboard.pkgd.min.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills. * - @types/d3-selection ^3.0.5 @@ -24,4 +24,4 @@ * - d3-transition ^3.0.1 * - d3-zoom ^3.0.0 */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(function(){return function(){var t=[function(t,e,n){"use strict";n(1),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(126),n(128),n(138),n(139),n(141),n(144),n(147),n(149),n(151),n(152),n(153),n(154),n(156),n(157),n(159),n(160),n(162),n(166),n(167),n(168),n(169),n(174),n(175),n(177),n(178),n(179),n(181),n(184),n(185),n(186),n(187),n(188),n(193),n(195),n(196),n(198),n(201),n(202),n(203),n(204),n(205),n(207),n(214),n(216),n(219),n(221),n(222),n(223),n(224),n(225),n(229),n(230),n(232),n(233),n(234),n(236),n(237),n(238),n(95),n(239),n(240),n(248),n(250),n(251),n(252),n(254),n(255),n(257),n(258),n(260),n(261),n(262),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(275),n(276),n(278),n(280),n(281),n(282),n(283),n(284),n(286),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(325),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(373),n(374),n(376),n(377),n(378),n(379),n(380),n(382),n(383),n(385),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(399),n(400),n(401),n(402),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(412),n(415),n(418),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(487),n(489),n(491),n(492),n(495),n(496),n(499),n(500),n(501),n(506),n(507),n(508),n(512),n(515),n(520),n(521),n(522),n(523),n(524),n(525),n(82)},function(t,e,n){"use strict";n(2),n(92),n(94),n(95),n(99)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(8),o=n(14),s=n(36),u=n(6),c=n(27),l=n(7),h=n(39),f=n(25),d=n(47),g=n(12),p=n(18),v=n(69),y=n(11),x=n(72),b=n(74),m=n(58),_=n(76),T=n(67),w=n(5),A=n(45),S=n(73),E=n(10),k=n(48),M=n(79),O=n(35),R=n(54),C=n(55),I=n(41),L=n(34),P=n(80),D=n(81),N=n(83),F=n(84),z=n(52),j=n(85).forEach,B=R("hidden"),$="Symbol",X="prototype",U=z.set,Y=z.getterFor($),V=Object[X],G=r.Symbol,H=G&&G[X],W=r.TypeError,q=r.QObject,Z=w.f,K=A.f,J=_.f,Q=E.f,tt=o([].push),et=O("symbols"),nt=O("op-symbols"),it=O("wks"),rt=!q||!q[X]||!q[X].findChild,at=u&&l((function(){return 7!=x(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=Z(V,e);i&&delete V[e],K(t,e,n),i&&t!==V&&K(V,e,i)}:K,ot=function(t,e){var n=et[t]=x(H);return U(n,{type:$,tag:t,description:e}),u||(n.description=e),n},st=function(t,e,n){t===V&&st(nt,e,n),d(t);var i=p(e);return d(n),h(et,i)?(n.enumerable?(h(t,B)&&t[B][i]&&(t[B][i]=!1),n=x(n,{enumerable:y(0,!1)})):(h(t,B)||K(t,B,y(1,{})),t[B][i]=!0),at(t,i,n)):K(t,i,n)},ut=function(t,e){d(t);var n=g(e),i=b(n).concat(ft(n));return j(i,(function(e){u&&!a(ct,n,e)||st(t,e,n[e])})),t},ct=function(t){var e=p(t),n=a(Q,this,e);return!(this===V&&h(et,e)&&!h(nt,e))&&(!(n||!h(this,e)||!h(et,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=g(t),i=p(e);if(n!==V||!h(et,i)||h(nt,i)){var r=Z(n,i);return!r||!h(et,i)||h(n,B)&&n[B][i]||(r.enumerable=!0),r}},ht=function(t){var e=J(g(t)),n=[];return j(e,(function(t){h(et,t)||h(C,t)||tt(n,t)})),n},ft=function(t){var e=t===V,n=J(e?nt:g(t)),i=[];return j(n,(function(t){!h(et,t)||e&&!h(V,t)||tt(i,et[t])})),i};c||(G=function(){if(f(H,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=I(t),n=function(t){this===V&&a(n,nt,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),at(this,e,y(1,t))};return u&&rt&&at(V,e,{configurable:!0,set:n}),ot(e,t)},k(H=G[X],"toString",(function(){return Y(this).tag})),k(G,"withoutSetter",(function(t){return ot(I(t),t)})),E.f=ct,A.f=st,S.f=ut,w.f=lt,m.f=_.f=ht,T.f=ft,P.f=function(t){return ot(L(t),t)},u&&(M(H,"description",{configurable:!0,get:function(){return Y(this).description}}),s||k(V,"propertyIsEnumerable",ct,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),j(b(it),(function(t){D(t)})),i({target:$,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?x(t):ut(x(t),e)},defineProperty:st,defineProperties:ut,getOwnPropertyDescriptor:lt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ht}),N(),F(G,$),C[B]=!0},function(t,e,n){"use strict";var i=n(4),r=n(5).f,a=n(44),o=n(48),s=n(38),u=n(56),c=n(68);t.exports=function(t,e){var n,l,h,f,d,g=t.target,p=t.global,v=t.stat;if(n=p?i:v?i[g]||s(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=r(n,l))&&d.value:n[l],!c(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;u(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(n,l,f,t)}}},function(t){"use strict";var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},function(t,e,n){"use strict";var i=n(6),r=n(8),a=n(10),o=n(11),s=n(12),u=n(18),c=n(39),l=n(42),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=s(t),e=u(e),l)try{return h(t,e)}catch(t){}if(c(t,e))return o(!r(a.f,t,e),t[e])}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var i=n(9),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var i=n(13),r=n(16);t.exports=function(t){return i(r(t))}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(15),o=Object,s=i("".split);t.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,a=r.call,o=i&&r.bind.bind(a,a);t.exports=i?o:function(t){return function(){return a.apply(t,arguments)}}},function(t,e,n){"use strict";var i=n(14),r=i({}.toString),a=i("".slice);t.exports=function(t){return a(r(t),8,-1)}},function(t,e,n){"use strict";var i=n(17),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},function(t){"use strict";t.exports=function(t){return null==t}},function(t,e,n){"use strict";var i=n(19),r=n(23);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},function(t,e,n){"use strict";var i=n(8),r=n(20),a=n(23),o=n(30),s=n(33),u=n(34),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!r(t)||a(t))return t;var n,u=o(t,l);if(u){if(void 0===e&&(e="default"),n=i(u,t,e),!r(n)||a(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},function(t,e,n){"use strict";var i=n(21),r=n(22),a=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===a}:function(t){return"object"==typeof t?null!==t:i(t)}},function(t,e,n){"use strict";var i=n(22),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},function(t,e,n){"use strict";var i=n(24),r=n(21),a=n(25),o=n(26),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&a(e.prototype,s(t))}},function(t,e,n){"use strict";var i=n(4),r=n(21);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},function(t,e,n){"use strict";var i=n(14);t.exports=i({}.isPrototypeOf)},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){"use strict";var i=n(28),r=n(7),a=n(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(t,e,n){"use strict";var i,r,a=n(4),o=n(29),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(r=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){"use strict";var i=n(31),r=n(17);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},function(t,e,n){"use strict";var i=n(21),r=n(32),a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not a function")}},function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,e,n){"use strict";var i=n(8),r=n(21),a=n(20),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&r(n=t.toString)&&!a(s=i(n,t)))return s;if(r(n=t.valueOf)&&!a(s=i(n,t)))return s;if("string"!==e&&r(n=t.toString)&&!a(s=i(n,t)))return s;throw o("Can't convert object to primitive value")}},function(t,e,n){"use strict";var i=n(4),r=n(35),a=n(39),o=n(41),s=n(27),u=n(26),c=i.Symbol,l=r("wks"),h=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return a(l,t)||(l[t]=s&&a(c,t)?c[t]:h("Symbol."+t)),l[t]}},function(t,e,n){"use strict";var i=n(36),r=n(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t){"use strict";t.exports=!1},function(t,e,n){"use strict";var i=n(4),r=n(38),a="__core-js_shared__",o=i[a]||r(a,{});t.exports=o},function(t,e,n){"use strict";var i=n(4),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},function(t,e,n){"use strict";var i=n(14),r=n(40),a=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(r(t),e)}},function(t,e,n){"use strict";var i=n(16),r=Object;t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var i=n(14),r=0,a=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++r+a,36)}},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(43);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var i=n(4),r=n(20),a=i.document,o=r(a)&&r(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},function(t,e,n){"use strict";var i=n(6),r=n(45),a=n(11);t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var i=n(6),r=n(42),a=n(46),o=n(47),s=n(18),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=i?a?function(t,e,n){if(o(t),e=s(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var i=l(t,e);i&&i[d]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:h in n?n[h]:i[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=s(e),o(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var i=n(6),r=n(7);t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){"use strict";var i=n(20),r=String,a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not an object")}},function(t,e,n){"use strict";var i=n(21),r=n(45),a=n(49),o=n(38);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(i(n)&&a(n,c,s),s.global)u?t[e]=n:o(e,n);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(21),o=n(39),s=n(6),u=n(50).CONFIGURABLE,c=n(51),l=n(52),h=l.enforce,f=l.get,d=String,g=Object.defineProperty,p=i("".slice),v=i("".replace),y=i([].join),x=s&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),b=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===p(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(s?g(t,"name",{value:e,configurable:!0}):t.name=e),x&&n&&o(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return o(i,"source")||(i.source=y(b,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return a(this)&&f(this).source||c(this)}),"toString")},function(t,e,n){"use strict";var i=n(6),r=n(39),a=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,s=r(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!i||i&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},function(t,e,n){"use strict";var i=n(14),r=n(21),a=n(37),o=i(Function.toString);r(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},function(t,e,n){"use strict";var i,r,a,o=n(53),s=n(4),u=n(20),c=n(44),l=n(39),h=n(37),f=n(54),d=n(55),g="Object already initialized",p=s.TypeError,v=s.WeakMap;if(o||h.state){var y=h.state||(h.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(t,e){if(y.has(t))throw p(g);return e.facade=t,y.set(t,e),e},r=function(t){return y.get(t)||{}},a=function(t){return y.has(t)}}else{var x=f("state");d[x]=!0,i=function(t,e){if(l(t,x))throw p(g);return e.facade=t,c(t,x,e),e},r=function(t){return l(t,x)?t[x]:{}},a=function(t){return l(t,x)}}t.exports={set:i,get:r,has:a,enforce:function(t){return a(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=r(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";var i=n(4),r=n(21),a=i.WeakMap;t.exports=r(a)&&/native code/.test(String(a))},function(t,e,n){"use strict";var i=n(35),r=n(41),a=i("keys");t.exports=function(t){return a[t]||(a[t]=r(t))}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(39),r=n(57),a=n(5),o=n(45);t.exports=function(t,e,n){for(var s=r(e),u=o.f,c=a.f,l=0;lc;)r(i,n=e[c++])&&(~o(l,n)||u(l,n));return l}},function(t,e,n){"use strict";var i=n(12),r=n(61),a=n(64),o=function(t){return function(e,n,o){var s,u=i(e),c=a(u),l=r(o,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},function(t,e,n){"use strict";var i=n(62),r=Math.max,a=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):a(n,e)}},function(t,e,n){"use strict";var i=n(63);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},function(t,e,n){"use strict";var i=n(65);t.exports=function(t){return i(t.length)}},function(t,e,n){"use strict";var i=n(62),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var i=n(7),r=n(21),a=/#|\.prototype\./,o=function(t,e){var n=u[s(t)];return n==l||n!=c&&(r(e)?i(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},function(t,e,n){"use strict";var i=n(70),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},function(t,e,n){"use strict";var i=n(71),r=n(21),a=n(15),o=n(34)("toStringTag"),s=Object,u="Arguments"==a(function(){return arguments}());t.exports=i?a:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?n:u?a(e):"Object"==(i=a(e))&&r(e.callee)?"Arguments":i}},function(t,e,n){"use strict";var i={};i[n(34)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){"use strict";var i,r=n(47),a=n(73),o=n(66),s=n(55),u=n(75),c=n(43),l=n(54),h="prototype",f="script",d=l("IE_PROTO"),g=function(){},p=function(t){return"<"+f+">"+t+""},v=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;y="undefined"!=typeof document?document.domain&&i?v(i):(e=c("iframe"),n="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):v(i);for(var r=o.length;r--;)delete y[h][o[r]];return y()};s[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[h]=r(t),n=new g,g[h]=null,n[d]=t):n=y(),void 0===e?n:a.f(n,e)}},function(t,e,n){"use strict";var i=n(6),r=n(46),a=n(45),o=n(47),s=n(12),u=n(74);e.f=i&&!r?Object.defineProperties:function(t,e){o(t);for(var n,i=s(e),r=u(e),c=r.length,l=0;c>l;)a.f(t,n=r[l++],i[n]);return t}},function(t,e,n){"use strict";var i=n(59),r=n(66);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";var i=n(24);t.exports=i("document","documentElement")},function(t,e,n){"use strict";var i=n(15),r=n(12),a=n(58).f,o=n(77),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==i(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(r(t))}},function(t,e,n){"use strict";var i=n(61),r=n(64),a=n(78),o=Array,s=Math.max;t.exports=function(t,e,n){for(var u=r(t),c=i(e,u),l=i(void 0===n?u:n,u),h=o(s(l-c,0)),f=0;cA;A++)if((d||A in _)&&(b=T(x=_[A],A,m),t))if(e)E[A]=b;else if(b)switch(t){case 3:return!0;case 5:return x;case 6:return A;case 2:c(E,x)}else switch(t){case 4:return!1;case 7:c(E,x)}return h?-1:r||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){"use strict";var i=n(87),r=n(31),a=n(9),o=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var i=n(15),r=n(14);t.exports=function(t){if("Function"===i(t))return r(t)}},function(t,e,n){"use strict";var i=n(89);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},function(t,e,n){"use strict";var i=n(90),r=n(91),a=n(20),o=n(34)("species"),s=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(r(e)&&(e===s||i(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},function(t,e,n){"use strict";var i=n(15);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(21),o=n(70),s=n(24),u=n(51),c=function(){},l=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=i(f.exec),g=!f.exec(c),p=function(t){if(!a(t))return!1;try{return h(c,l,t),!0}catch(t){return!1}},v=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!d(f,u(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?v:p},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(39),o=n(69),s=n(35),u=n(93),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=o(t);if(a(c,e))return c[e];var n=r("Symbol")(e);return c[e]=n,l[n]=e,n}})},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,n){"use strict";var i=n(3),r=n(39),a=n(23),o=n(32),s=n(35),u=n(93),c=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!a(t))throw TypeError(o(t)+" is not a symbol");if(r(c,t))return c[t]}})},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(96),o=n(8),s=n(14),u=n(7),c=n(21),l=n(23),h=n(97),f=n(98),d=n(27),g=String,p=r("JSON","stringify"),v=s(/./.exec),y=s("".charAt),x=s("".charCodeAt),b=s("".replace),m=s(1..toString),_=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,A=!d||u((function(){var t=r("Symbol")();return"[null]"!=p([t])||"{}"!=p({a:t})||"{}"!=p(Object(t))})),S=u((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),E=function(t,e){var n=h(arguments),i=f(e);if(c(i)||void 0!==t&&!l(t))return n[1]=function(t,e){if(c(i)&&(e=o(i,this,g(t),e)),!l(e))return e},a(p,null,n)},k=function(t,e,n){var i=y(n,e-1),r=y(n,e+1);return v(T,t)&&!v(w,r)||v(w,t)&&!v(T,i)?"\\u"+m(x(t,0),16):t};p&&i({target:"JSON",stat:!0,arity:3,forced:A||S},{stringify:function(t,e,n){var i=h(arguments),r=a(A?E:p,null,i);return S&&"string"==typeof r?b(r,_,k):r}})},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,a=r.apply,o=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(a):function(){return o.apply(a,arguments)})},function(t,e,n){"use strict";var i=n(14);t.exports=i([].slice)},function(t,e,n){"use strict";var i=n(14),r=n(90),a=n(21),o=n(15),s=n(69),u=i([].push);t.exports=function(t){if(a(t))return t;if(r(t)){for(var e=t.length,n=[],i=0;ix&&f(i,arguments[x]),i}));if(A.prototype=T,"Error"!==m?s?s(A,w):u(A,w,{name:!0}):g&&y in _&&(c(A,_,y),c(A,_,"prepareStackTrace")),u(A,_),!p)try{T.name!==m&&a(T,"name",m),T.constructor=A}catch(t){}return A}}},function(t,e,n){"use strict";var i=n(117),r=n(47),a=n(118);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),a(i),e?t(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){"use strict";var i=n(14),r=n(31);t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){"use strict";var i=n(21),r=String,a=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw a("Can't set "+r(t)+" as a prototype")}},function(t,e,n){"use strict";var i=n(45).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){"use strict";var i=n(21),r=n(20),a=n(116);t.exports=function(t,e,n){var o,s;return a&&i(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},function(t,e,n){"use strict";var i=n(69);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},function(t,e,n){"use strict";var i=n(20),r=n(44);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},function(t,e,n){"use strict";var i=n(44),r=n(124),a=n(125),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):i(t,"stack",r(n,s)))}},function(t,e,n){"use strict";var i=n(14),r=Error,a=i("".replace),o=String(r("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(o);t.exports=function(t,e){if(u&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},function(t,e,n){"use strict";var i=n(7),r=n(11);t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var i=n(48),r=n(127),a=Error.prototype;a.toString!==r&&i(a,"toString",r)},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(47),o=n(72),s=n(121),u=Error.prototype.toString,c=r((function(){if(i){var t=o(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==u.call(t))return!0}return"2: 1"!==u.call({message:1,name:2})||"Error"!==u.call({})}));t.exports=c?function(){var t=a(this),e=s(t.name,"Error"),n=s(t.message);return e?n?e+": "+n:e:n}:u},function(t,e,n){"use strict";n(129)},function(t,e,n){"use strict";var i=n(3),r=n(25),a=n(130),o=n(116),s=n(56),u=n(72),c=n(44),l=n(11),h=n(122),f=n(123),d=n(132),g=n(121),p=n(34)("toStringTag"),v=Error,y=[].push,x=function(t,e){var n,i=r(b,this);o?n=o(v(),i?a(this):b):(n=i?this:u(b),c(n,p,"Error")),void 0!==e&&c(n,"message",g(e)),f(n,x,n.stack,1),arguments.length>2&&h(n,arguments[2]);var s=[];return d(t,y,{that:s}),c(n,"errors",s),n};o?o(x,v):s(x,v,{name:!0});var b=x.prototype=u(v.prototype,{constructor:l(1,x),message:l(1,""),name:l(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:x})},function(t,e,n){"use strict";var i=n(39),r=n(21),a=n(40),o=n(54),s=n(131),u=o("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=a(t);if(i(e,u))return e[u];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?l:null}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(47),o=n(32),s=n(133),u=n(64),c=n(25),l=n(135),h=n(136),f=n(137),d=TypeError,g=function(t,e){this.stopped=t,this.result=e},p=g.prototype;t.exports=function(t,e,n){var v,y,x,b,m,_,T,w=n&&n.that,A=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),M=i(e,w),O=function(t){return v&&f(v,"normal",t),new g(!0,t)},R=function(t){return A?(a(t),k?M(t[0],t[1],O):M(t[0],t[1])):k?M(t,O):M(t)};if(S)v=t.iterator;else if(E)v=t;else{if(!(y=h(t)))throw d(o(t)+" is not iterable");if(s(y)){for(x=0,b=u(t);b>x;x++)if((m=R(t[x]))&&c(p,m))return m;return new g(!1)}v=l(t,y)}for(_=S?t.next:v.next;!(T=r(_,v)).done;){try{m=R(T.value)}catch(t){f(v,"throw",t)}if("object"==typeof m&&m&&c(p,m))return m}return new g(!1)}},function(t,e,n){"use strict";var i=n(34),r=n(134),a=i("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[a]===t)}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(8),r=n(31),a=n(47),o=n(32),s=n(136),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(r(n))return a(i(n,t));throw u(o(t)+" is not iterable")}},function(t,e,n){"use strict";var i=n(70),r=n(30),a=n(17),o=n(134),s=n(34)("iterator");t.exports=function(t){if(!a(t))return r(t,s)||r(t,"@@iterator")||o[i(t)]}},function(t,e,n){"use strict";var i=n(8),r=n(47),a=n(30);t.exports=function(t,e,n){var o,s;r(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw n;return n}o=i(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw n;if(s)throw o;return r(o),n}},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(96),o=n(7),s=n(115),u="AggregateError",c=r(u),l=!o((function(){return 1!==c([1]).errors[0]}))&&o((function(){return 7!==c([1],u,{cause:7}).cause}));i({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:s(u,(function(t){return function(e,n){return a(t,this,arguments)}}),l,!0)})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(64),o=n(62),s=n(140);i({target:"Array",proto:!0},{at:function(t){var e=r(this),n=a(e),i=o(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}}),s("at")},function(t,e,n){"use strict";var i=n(34),r=n(72),a=n(45).f,o=i("unscopables"),s=Array.prototype;null==s[o]&&a(s,o,{configurable:!0,value:r(null)}),t.exports=function(t){s[o][t]=!0}},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(90),o=n(20),s=n(40),u=n(64),c=n(142),l=n(78),h=n(88),f=n(143),d=n(34),g=n(28),p=d("isConcatSpreadable"),v=g>=51||!r((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=function(t){if(!o(t))return!1;var e=t[p];return void 0!==e?!!e:a(t)};i({target:"Array",proto:!0,arity:1,forced:!v||!f("concat")},{concat:function(t){var e,n,i,r,a,o=s(this),f=h(o,0),d=0;for(e=-1,i=arguments.length;e9007199254740991)throw e("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var i=n(7),r=n(34),a=n(28),o=r("species");t.exports=function(t){return a>=51||!i((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){"use strict";var i=n(3),r=n(145),a=n(140);i({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(t,e,n){"use strict";var i=n(40),r=n(61),a=n(64),o=n(146),s=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),u=a(n),c=r(t,u),l=r(e,u),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?u:r(h,u))-l,u-c),d=1;for(l0;)l in n?n[c]=n[l]:o(n,c),c+=d,l+=d;return n}},function(t,e,n){"use strict";var i=n(32),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw r("Cannot delete property "+i(e)+" of "+i(t))}},function(t,e,n){"use strict";var i=n(3),r=n(85).every;i({target:"Array",proto:!0,forced:!n(148)("every")},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(7);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var i=n(3),r=n(150),a=n(140);i({target:"Array",proto:!0},{fill:r}),a("fill")},function(t,e,n){"use strict";var i=n(40),r=n(61),a=n(64);t.exports=function(t){for(var e=i(this),n=a(e),o=arguments.length,s=r(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:r(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var i=n(3),r=n(85).filter;i({target:"Array",proto:!0,forced:!n(143)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(85).find,a=n(140),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var i=n(3),r=n(85).findIndex,a=n(140),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var i=n(3),r=n(155).findLast,a=n(140);i({target:"Array",proto:!0},{findLast:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},function(t,e,n){"use strict";var i=n(86),r=n(13),a=n(40),o=n(64),s=function(t){var e=1==t;return function(n,s,u){for(var c,l=a(n),h=r(l),f=i(s,u),d=o(h);d-- >0;)if(f(c=h[d],d,l))switch(t){case 0:return c;case 1:return d}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},function(t,e,n){"use strict";var i=n(3),r=n(155).findLastIndex,a=n(140);i({target:"Array",proto:!0},{findLastIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},function(t,e,n){"use strict";var i=n(3),r=n(158),a=n(40),o=n(64),s=n(62),u=n(88);i({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),n=o(e),i=u(e,0);return i.length=r(i,e,e,n,0,void 0===t?1:s(t)),i}})},function(t,e,n){"use strict";var i=n(90),r=n(64),a=n(142),o=n(86),s=function(t,e,n,u,c,l,h,f){for(var d,g,p=c,v=0,y=!!h&&o(h,f);v0&&i(d)?(g=r(d),p=s(t,e,d,g,p,l-1)-1):(a(p+1),t[p]=d),p++),v++;return p};t.exports=s},function(t,e,n){"use strict";var i=n(3),r=n(158),a=n(31),o=n(40),s=n(64),u=n(88);i({target:"Array",proto:!0},{flatMap:function(t){var e,n=o(this),i=s(n);return a(t),(e=u(n,0)).length=r(e,n,n,i,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var i=n(3),r=n(161);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(t,e,n){"use strict";var i=n(85).forEach,r=n(148)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var i=n(3),r=n(163);i({target:"Array",stat:!0,forced:!n(165)((function(t){Array.from(t)}))},{from:r})},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(40),o=n(164),s=n(133),u=n(91),c=n(64),l=n(78),h=n(135),f=n(136),d=Array;t.exports=function(t){var e=a(t),n=u(this),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p;v&&(p=i(p,g>2?arguments[2]:void 0));var y,x,b,m,_,T,w=f(e),A=0;if(!w||this===d&&s(w))for(y=c(e),x=n?new this(y):d(y);y>A;A++)T=v?p(e[A],A):e[A],l(x,A,T);else for(_=(m=h(e,w)).next,x=n?new this:[];!(b=r(_,m)).done;A++)T=v?o(m,p,[b.value,A],!0):b.value,l(x,A,T);return x.length=A,x}},function(t,e,n){"use strict";var i=n(47),r=n(137);t.exports=function(t,e,n,a){try{return a?e(i(n)[0],n[1]):e(n)}catch(e){r(t,"throw",e)}}},function(t,e,n){"use strict";var i=n(34)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},t(a)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(3),r=n(60).includes,a=n(7),o=n(140);i({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(t,e,n){"use strict";var i=n(3),r=n(87),a=n(60).indexOf,o=n(148),s=r([].indexOf),u=!!s&&1/s([1],1,-0)<0;i({target:"Array",proto:!0,forced:u||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:a(this,t,e)}})},function(t,e,n){"use strict";n(3)({target:"Array",stat:!0},{isArray:n(90)})},function(t,e,n){"use strict";var i=n(12),r=n(140),a=n(134),o=n(52),s=n(45).f,u=n(170),c=n(173),l=n(36),h=n(6),f="Array Iterator",d=o.set,g=o.getterFor(f);t.exports=u(Array,"Array",(function(t,e){d(this,{type:f,target:i(t),index:0,kind:e})}),(function(){var t=g(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==n?i:"values"==n?e[i]:[i,e[i]],!1)}),"values");var p=a.Arguments=a.Array;if(r("keys"),r("values"),r("entries"),!l&&h&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(36),o=n(50),s=n(21),u=n(171),c=n(130),l=n(116),h=n(84),f=n(44),d=n(48),g=n(34),p=n(134),v=n(172),y=o.PROPER,x=o.CONFIGURABLE,b=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,_=g("iterator"),T="keys",w="values",A="entries",S=function(){return this};t.exports=function(t,e,n,o,g,v,E){u(n,e,o);var k,M,O,R=function(t){if(t===g&&D)return D;if(!m&&t in L)return L[t];switch(t){case T:case w:case A:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",I=!1,L=t.prototype,P=L[_]||L["@@iterator"]||g&&L[g],D=!m&&P||R(g),N="Array"==e&&L.entries||P;if(N&&(k=c(N.call(new t)))!==Object.prototype&&k.next&&(a||c(k)===b||(l?l(k,b):s(k[_])||d(k,_,S)),h(k,C,!0,!0),a&&(p[C]=S)),y&&g==w&&P&&P.name!==w&&(!a&&x?f(L,"name",w):(I=!0,D=function(){return r(P,this)})),g)if(M={values:R(w),keys:v?D:R(T),entries:R(A)},E)for(O in M)(m||I||!(O in L))&&d(L,O,M[O]);else i({target:e,proto:!0,forced:m||I},M);return a&&!E||L[_]===D||d(L,_,D,{name:g}),p[e]=D,M}},function(t,e,n){"use strict";var i=n(172).IteratorPrototype,r=n(72),a=n(11),o=n(84),s=n(134),u=function(){return this};t.exports=function(t,e,n,c){var l=e+" Iterator";return t.prototype=r(i,{next:a(+!c,n)}),o(t,l,!1,!0),s[l]=u,t}},function(t,e,n){"use strict";var i,r,a,o=n(7),s=n(21),u=n(20),c=n(72),l=n(130),h=n(48),f=n(34),d=n(36),g=f("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(r=l(l(a)))!==Object.prototype&&(i=r):p=!0),!u(i)||o((function(){var t={};return i[g].call(t)!==t}))?i={}:d&&(i=c(i)),s(i[g])||h(i,g,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(13),o=n(12),s=n(148),u=r([].join);i({target:"Array",proto:!0,forced:a!=Object||!s("join",",")},{join:function(t){return u(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(3),r=n(176);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,e,n){"use strict";var i=n(96),r=n(12),a=n(62),o=n(64),s=n(148),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return i(c,this,arguments)||0;var e=r(this),n=o(e),s=n-1;for(arguments.length>1&&(s=u(s,a(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:c},function(t,e,n){"use strict";var i=n(3),r=n(85).map;i({target:"Array",proto:!0,forced:!n(143)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(91),o=n(78),s=Array;i({target:"Array",stat:!0,forced:r((function(){function t(){}return!(s.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(a(this)?this:s)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(64),o=n(180),s=n(142);i({target:"Array",proto:!0,arity:1,forced:n(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=r(this),n=a(e),i=arguments.length;s(n+i);for(var u=0;u79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(31),r=n(40),a=n(13),o=n(64),s=TypeError,u=function(t){return function(e,n,u,c){i(n);var l=r(e),h=a(l),f=o(l),d=t?f-1:0,g=t?-1:1;if(u<2)for(;;){if(d in h){c=h[d],d+=g;break}if(d+=g,t?d<0:f<=d)throw s("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=g)d in h&&(c=n(c,h[d],d,l));return c}};t.exports={left:u(!1),right:u(!0)}},function(t,e,n){"use strict";var i=n(15);t.exports="undefined"!=typeof process&&"process"==i(process)},function(t,e,n){"use strict";var i=n(3),r=n(182).right,a=n(148),o=n(28);i({target:"Array",proto:!0,forced:!n(183)&&o>79&&o<83||!a("reduceRight")},{reduceRight:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(90),o=r([].reverse),s=[1,2];i({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},function(t,e,n){"use strict";var i=n(3),r=n(90),a=n(91),o=n(20),s=n(61),u=n(64),c=n(12),l=n(78),h=n(34),f=n(143),d=n(97),g=f("slice"),p=h("species"),v=Array,y=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function(t,e){var n,i,h,f=c(this),g=u(f),x=s(t,g),b=s(void 0===e?g:e,g);if(r(f)&&(n=f.constructor,(a(n)&&(n===v||r(n.prototype))||o(n)&&null===(n=n[p]))&&(n=void 0),n===v||void 0===n))return d(f,x,b);for(i=new(void 0===n?v:n)(y(b-x,0)),h=0;x1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(31),o=n(40),s=n(64),u=n(146),c=n(69),l=n(7),h=n(189),f=n(148),d=n(190),g=n(191),p=n(28),v=n(192),y=[],x=r(y.sort),b=r(y.push),m=l((function(){y.sort(void 0)})),_=l((function(){y.sort(null)})),T=f("sort"),w=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(g)return!0;if(v)return v<603;var t,e,n,i,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)y.push({k:e+i,v:n})}for(y.sort((function(t,e){return e.v-t.v})),i=0;ic(n)?1:-1}}(t)),n=s(r),i=0;i0;)t[i]=t[--i];i!==a++&&(t[i]=n)}return t},s=function(t,e,n,i){for(var r=e.length,a=n.length,o=0,s=0;om-i+n;v--)f(b,v-1)}else if(n>i)for(v=m-i;v>_;v--)x=v+n-1,(y=v+i-1)in b?b[x]=b[y]:f(b,x);for(v=0;vn;)a[n]=e[n++];return a}},function(t,e,n){"use strict";var i=n(4);t.exports=function(t){return i[t].prototype}},function(t,e,n){"use strict";var i=n(3),r=n(140),a=n(142),o=n(64),s=n(61),u=n(12),c=n(62),l=Array,h=Math.max,f=Math.min;i({target:"Array",proto:!0},{toSpliced:function(t,e){var n,i,r,d,g=u(this),p=o(g),v=s(t,p),y=arguments.length,x=0;for(0===y?n=i=0:1===y?(n=0,i=p-v):(n=y-2,i=f(h(c(e),0),p-v)),r=a(p+n-i),d=l(r);x=s||c<0)throw a("Incorrect index");for(var l=new e(s),h=0;h>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return U(t,23,4)},Z=function(t){return U(t,52,8)},K=function(t,e,n){c(t[M],e,{configurable:!0,get:function(){return n(this)[e]}})},J=function(t,e,n,i){var r=C(t),a=p(n),o=!!i;if(a+e>r.byteLength)throw B(O);var s=r.bytes,u=a+r.byteOffset,c=_(s,u,u+e);return o?c:X(c)},Q=function(t,e,n,i,r,a){var o=C(t),s=p(n),u=i(+r),c=!!a;if(s+e>o.byteLength)throw B(O);for(var l=o.bytes,h=s+o.byteOffset,f=0;fit;)(et=nt[it++])in P||u(P,et,L[et]);D.constructor=P}x&&y(F)!==z&&x(F,z);var rt=new N(new P(2)),at=r(F.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||l(F,{setInt8:function(t,e){at(this,t,e<<24>>24)},setUint8:function(t,e){at(this,t,e<<24>>24)}},{unsafe:!0})}else D=(P=function(t){f(this,D);var e=p(t);I(this,{type:E,bytes:$(j(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[M],F=(N=function(t,e,n){f(this,F),f(t,D);var i=R(t),r=i.byteLength,o=d(e);if(o<0||o>r)throw B("Wrong offset");if(o+(n=void 0===n?r-o:g(n))>r)throw B("Wrong length");I(this,{type:k,buffer:t,byteLength:n,byteOffset:o,bytes:i.bytes}),a||(this.buffer=t,this.byteLength=n,this.byteOffset=o)})[M],a&&(K(P,"byteLength",R),K(N,"buffer",C),K(N,"byteLength",C),K(N,"byteOffset",C)),l(F,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(J(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(J(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Q(this,1,t,V,e)},setUint8:function(t,e){Q(this,1,t,V,e)},setInt16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Q(this,4,t,q,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Q(this,8,t,Z,e,arguments.length>2&&arguments[2])}});T(P,E),T(N,k),t.exports={ArrayBuffer:P,DataView:N}},function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){"use strict";var i=n(48);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(25),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},function(t,e,n){"use strict";var i=n(62),r=n(65),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw a("Wrong length or index");return n}},function(t){"use strict";var e=Array,n=Math.abs,i=Math.pow,r=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,u){var c,l,h,f=e(u),d=8*u-s-1,g=(1<>1,v=23===s?i(2,-24)-i(2,-77):0,y=t<0||0===t&&1/t<0?1:0,x=0;for((t=n(t))!=t||t===1/0?(l=t!=t?1:0,c=g):(c=r(a(t)/o),t*(h=i(2,-c))<1&&(c--,h*=2),(t+=c+p>=1?v/h:v*i(2,1-p))*h>=2&&(c++,h/=2),c+p>=g?(l=0,c=g):c+p>=1?(l=(t*h-1)*i(2,s),c+=p):(l=t*i(2,p-1)*i(2,s),c=0));s>=8;)f[x++]=255&l,l/=256,s-=8;for(c=c<0;)f[x++]=255&c,c/=256,d-=8;return f[--x]|=128*y,f},unpack:function(t,e){var n,r=t.length,a=8*r-e-1,o=(1<>1,u=a-7,c=r-1,l=t[c--],h=127&l;for(l>>=7;u>0;)h=256*h+t[c--],u-=8;for(n=h&(1<<-u)-1,h>>=-u,u+=e;u>0;)n=256*n+t[c--],u-=8;if(0===h)h=1-s;else{if(h===o)return n?NaN:l?-1/0:1/0;n+=i(2,e),h-=s}return(l?-1:1)*n*i(2,h-e)}}},function(t,e,n){"use strict";var i=n(3),r=n(215);i({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(t,e,n){"use strict";var i,r,a,o=n(209),s=n(6),u=n(4),c=n(21),l=n(20),h=n(39),f=n(70),d=n(32),g=n(44),p=n(48),v=n(79),y=n(25),x=n(130),b=n(116),m=n(34),_=n(41),T=n(52),w=T.enforce,A=T.get,S=u.Int8Array,E=S&&S.prototype,k=u.Uint8ClampedArray,M=k&&k.prototype,O=S&&x(S),R=E&&x(E),C=Object.prototype,I=u.TypeError,L=m("toStringTag"),P=_("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",N=o&&!!b&&"Opera"!==f(u.opera),F=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=x(t);if(l(e)){var n=A(e);return n&&h(n,D)?n[D]:B(e)}},$=function(t){if(!l(t))return!1;var e=f(t);return h(z,e)||h(j,e)};for(i in z)(a=(r=u[i])&&r.prototype)?w(a)[D]=r:N=!1;for(i in j)(a=(r=u[i])&&r.prototype)&&(w(a)[D]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw I("Incorrect invocation")},N))for(i in z)u[i]&&b(u[i],O);if((!N||!R||R===C)&&(R=O.prototype,N))for(i in z)u[i]&&b(u[i].prototype,R);if(N&&x(M)!==R&&b(M,R),s&&!h(R,L))for(i in F=!0,v(R,L,{configurable:!0,get:function(){return l(this)?this[P]:void 0}}),z)u[i]&&g(u[i],P,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&P,aTypedArray:function(t){if($(t))return t;throw I("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||y(O,t)))return t;throw I(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(s){if(n)for(var r in z){var a=u[r];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(n){try{a.prototype[t]=e}catch(t){}}}R[t]&&!n||p(R,t,n?e:N&&E[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(s){if(b){if(n)for(i in z)if((r=u[i])&&h(r,t))try{delete r[t]}catch(t){}if(O[t]&&!n)return;try{return p(O,t,n?e:N&&O[t]||e)}catch(t){}}for(i in z)!(r=u[i])||r[t]&&!n||p(r,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(z,e)||h(j,e)},isTypedArray:$,TypedArray:O,TypedArrayPrototype:R}},function(t,e,n){"use strict";var i=n(3),r=n(87),a=n(7),o=n(208),s=n(47),u=n(61),c=n(65),l=n(217),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,g=r(h.prototype.slice),p=r(d.getUint8),v=r(d.setUint8);i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(g&&void 0===e)return g(s(this),t);for(var n=s(this).byteLength,i=u(t,n),r=u(void 0===e?n:e,n),a=new(l(this,h))(c(r-i)),o=new f(this),d=new f(a),y=0;i9999?"+":"";return i+a(u(e),i?6:4,0)+"-"+a(y(t)+1,2,0)+"-"+a(f(t),2,0)+"T"+a(g(t),2,0)+":"+a(v(t),2,0)+":"+a(x(t),2,0)+"."+a(n,3,0)+"Z"}:l},function(t,e,n){"use strict";var i=n(14),r=n(65),a=n(69),o=n(228),s=n(16),u=i(o),c=i("".slice),l=Math.ceil,h=function(t){return function(e,n,i){var o,h,f=a(s(e)),d=r(n),g=f.length,p=void 0===i?" ":a(i);return d<=g||""==p?f:((h=u(p,l((o=d-g)/p.length))).length>o&&(h=c(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},function(t,e,n){"use strict";var i=n(62),r=n(69),a=n(16),o=RangeError;t.exports=function(t){var e=r(a(this)),n="",s=i(t);if(s<0||s==1/0)throw o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(n+=e);return n}},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(40),o=n(19);i({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),n=o(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var i=n(39),r=n(48),a=n(231),o=n(34)("toPrimitive"),s=Date.prototype;i(s,o)||r(s,o,a)},function(t,e,n){"use strict";var i=n(47),r=n(33),a=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return r(this,t)}},function(t,e,n){"use strict";var i=n(14),r=n(48),a=Date.prototype,o="Invalid Date",s="toString",u=i(a[s]),c=i(a.getTime);String(new Date(NaN))!=o&&r(a,s,(function(){var t=c(this);return t==t?u(this):o}))},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(69),o=r("".charAt),s=r("".charCodeAt),u=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var n=c(t,16);n.length1?arguments[1]:void 0);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),a(f,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return x(this,0===t?0:t,e)}}:{add:function(t){return x(this,t=0===t?0:t,t)}}),d&&r(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,n){var i=e+" Iterator",r=y(e),a=y(i);l(t,e,(function(t,e){v(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?h("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var i=n(3),r=n(249),a=Math.acosh,o=Math.log,s=Math.sqrt,u=Math.LN2;i({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(1/0)!=1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?o(e)+u:r(e-1+s(e-1)*s(e+1))}})},function(t){"use strict";var e=Math.log;t.exports=Math.log1p||function(t){var n=+t;return n>-1e-8&&n<1e-8?n-n*n/2:e(1+n)}},function(t,e,n){"use strict";var i=n(3),r=Math.asinh,a=Math.log,o=Math.sqrt;i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function t(e){var n=+e;return isFinite(n)&&0!=n?n<0?-t(-n):a(n+o(n*n+1)):n}})},function(t,e,n){"use strict";var i=n(3),r=Math.atanh,a=Math.log;i({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(t){var e=+t;return 0==e?e:a((1+e)/(1-e))/2}})},function(t,e,n){"use strict";var i=n(3),r=n(253),a=Math.abs,o=Math.pow;i({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return r(e)*o(a(e),1/3)}})},function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0==e||e!=e?e:e<0?-1:1}},function(t,e,n){"use strict";var i=n(3),r=Math.floor,a=Math.log,o=Math.LOG2E;i({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-r(a(e+.5)*o):32}})},function(t,e,n){"use strict";var i=n(3),r=n(256),a=Math.cosh,o=Math.abs,s=Math.E;i({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=r(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},function(t){"use strict";var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:e},function(t,e,n){"use strict";var i=n(3),r=n(256);i({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{fround:n(259)})},function(t,e,n){"use strict";var i=n(253),r=Math.abs,a=Math.pow,o=a(2,-52),s=a(2,-23),u=a(2,127)*(2-s),c=a(2,-126);t.exports=Math.fround||function(t){var e,n,a=+t,l=r(a),h=i(a);return lu||n!=n?h*(1/0):h*n}},function(t,e,n){"use strict";var i=n(3),r=Math.hypot,a=Math.abs,o=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,i,r=0,s=0,u=arguments.length,c=0;s0?(i=n/c)*i:n;return c===1/0?1/0:c*o(r)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=Math.imul;i({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(t,e){var n=65535,i=+t,r=+e,a=n&i,o=n&r;return 0|a*o+((n&i>>>16)*o+a*(n&r>>>16)<<16>>>0)}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log10:n(263)})},function(t){"use strict";var e=Math.log,n=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*n}},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log1p:n(249)})},function(t,e,n){"use strict";var i=n(3),r=Math.log,a=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/a}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{sign:n(253)})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(256),o=Math.abs,s=Math.exp,u=Math.E;i({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return o(e)<1?(a(e)-a(-e))/2:(s(e-1)-s(-e-1))*(u/2)}})},function(t,e,n){"use strict";var i=n(3),r=n(256),a=Math.exp;i({target:"Math",stat:!0},{tanh:function(t){var e=+t,n=r(e),i=r(-e);return n==1/0?1:i==1/0?-1:(n-i)/(a(e)+a(-e))}})},function(t,e,n){"use strict";n(84)(Math,"Math",!0)},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{trunc:n(63)})},function(t,e,n){"use strict";var i=n(3),r=n(36),a=n(6),o=n(4),s=n(82),u=n(14),c=n(68),l=n(39),h=n(120),f=n(25),d=n(23),g=n(19),p=n(7),v=n(58).f,y=n(5).f,x=n(45).f,b=n(272),m=n(273).trim,_="Number",T=o[_],w=s[_],A=T.prototype,S=o.TypeError,E=u("".slice),k=u("".charCodeAt),M=function(t){var e,n,i,r,a,o,s,u,c=g(t,"number");if(d(c))throw S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(e=k(c,0))||45===e){if(88===(n=k(c,2))||120===n)return NaN}else if(48===e){switch(k(c,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(o=(a=E(c,2)).length,s=0;sr)return NaN;return parseInt(a,i)}return+c},O=c(_,!T(" 0o1")||!T("0b1")||T("+0x1")),R=function(t){var e,n=arguments.length<1?0:T(function(t){var e=g(t,"number");return"bigint"==typeof e?e:M(e)}(t));return f(A,e=this)&&p((function(){b(e)}))?h(Object(n),this,R):n};R.prototype=A,O&&!r&&(A.constructor=R),i({global:!0,constructor:!0,wrap:!0,forced:O},{Number:R});var C=function(t,e){for(var n,i=a?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;i.length>r;r++)l(e,n=i[r])&&!l(t,n)&&x(t,n,y(e,n))};r&&w&&C(s[_],w),(O||r)&&C(s[_],T)},function(t,e,n){"use strict";var i=n(14);t.exports=i(1..valueOf)},function(t,e,n){"use strict";var i=n(14),r=n(16),a=n(69),o=n(274),s=i("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(t){return function(e){var n=a(r(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},function(t){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isFinite:n(277)})},function(t,e,n){"use strict";var i=n(4).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&i(t)}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isInteger:n(279)})},function(t,e,n){"use strict";var i=n(20),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";var i=n(3),r=n(279),a=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return r(t)&&a(t)<=9007199254740991}})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(69),s=n(273).trim,u=n(274),c=a("".charAt),l=i.parseFloat,h=i.Symbol,f=h&&h.iterator,d=1/l(u+"-0")!=-1/0||f&&!r((function(){l(Object(f))}));t.exports=d?function(t){var e=s(o(t)),n=l(e);return 0===n&&"-"==c(e,0)?-0:n}:l},function(t,e,n){"use strict";var i=n(3),r=n(287);i({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(69),s=n(273).trim,u=n(274),c=i.parseInt,l=i.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=a(f.exec),g=8!==c(u+"08")||22!==c(u+"0x16")||h&&!r((function(){c(Object(h))}));t.exports=g?function(t,e){var n=s(o(t));return c(n,e>>>0||(d(f,n)?16:10))}:c},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(62),o=n(272),s=n(228),u=n(263),c=n(7),l=RangeError,h=String,f=isFinite,d=Math.abs,g=Math.floor,p=Math.pow,v=Math.round,y=r(1..toExponential),x=r(s),b=r("".slice),m="-6.9000e-11"===y(-69e-12,4)&&"1.25e+0"===y(1.255,2)&&"1.235e+4"===y(12345,3)&&"3e+1"===y(25,0);i({target:"Number",proto:!0,forced:!m||!(c((function(){y(1,1/0)}))&&c((function(){y(1,-1/0)})))||!!c((function(){y(1/0,1/0),y(NaN,1/0)}))},{toExponential:function(t){var e=o(this);if(void 0===t)return y(e);var n=a(t);if(!f(e))return String(e);if(n<0||n>20)throw l("Incorrect fraction digits");if(m)return y(e,n);var i="",r="",s=0,c="",_="";if(e<0&&(i="-",e=-e),0===e)s=0,r=x("0",n+1);else{var T=u(e);s=g(T);var w=0,A=p(10,s-n);2*e>=(2*(w=v(e/A))+1)*A&&(w+=1),w>=p(10,n+1)&&(w/=10,s+=1),r=h(w)}return 0!==n&&(r=b(r,0,1)+"."+b(r,1)),0===s?(c="+",_="0"):(c=s>0?"+":"-",_=h(d(s))),i+(r+="e"+c+_)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(62),o=n(272),s=n(228),u=n(7),c=RangeError,l=String,h=Math.floor,f=r(s),d=r("".slice),g=r(1..toFixed),p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)},v=function(t,e,n){for(var i=-1,r=n;++i<6;)r+=e*t[i],t[i]=r%1e7,r=h(r/1e7)},y=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},x=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=l(t[e]);n=""===n?i:n+f("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:u((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!u((function(){g({})}))},{toFixed:function(t){var e,n,i,r,s=o(this),u=a(t),h=[0,0,0,0,0,0],g="",b="0";if(u<0||u>20)throw c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return l(s);if(s<0&&(g="-",s=-s),s>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(s*p(2,69,1))-69)<0?s*p(2,-e,1):s/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),i=u;i>=7;)v(h,1e7,0),i-=7;for(v(h,p(10,i,1),0),i=e-1;i>=23;)y(h,1<<23),i-=23;y(h,1<0?g+((r=b.length)<=u?"0."+f("0",u-r)+b:d(b,0,r-u)+"."+d(b,r-u)):g+b}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(7),o=n(272),s=r(1..toPrecision);i({target:"Number",proto:!0,forced:a((function(){return"1"!==s(1,void 0)}))||!a((function(){s({})}))},{toPrecision:function(t){return void 0===t?s(o(this)):s(o(this),t)}})},function(t,e,n){"use strict";var i=n(3),r=n(292);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(t,e,n){"use strict";var i=n(6),r=n(14),a=n(8),o=n(7),s=n(74),u=n(67),c=n(10),l=n(40),h=n(13),f=Object.assign,d=Object.defineProperty,g=r([].concat);t.exports=!f||o((function(){if(i&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||s(f({},e)).join("")!=r}))?function(t,e){for(var n=l(t),r=arguments.length,o=1,f=u.f,d=c.f;r>o;)for(var p,v=h(arguments[o++]),y=f?g(s(v),f(v)):s(v),x=y.length,b=0;x>b;)p=y[b++],i&&!a(d,v,p)||(n[p]=v[p]);return n}:f},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0,sham:!n(6)},{create:n(72)})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(31),s=n(40),u=n(45);r&&i({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){u.f(s(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(36),r=n(4),a=n(7),o=n(192);t.exports=i||!a((function(){if(!(o&&o<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t]}}))},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(73).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!r},{defineProperties:a})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(45).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!r},{defineProperty:a})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(31),s=n(40),u=n(45);r&&i({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){u.f(s(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(3),r=n(300).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(14),o=n(130),s=n(74),u=n(12),c=a(n(10).f),l=a([].push),h=i&&r((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),f=function(t){return function(e){for(var n,r=u(e),a=s(r),f=h&&null===o(r),d=a.length,g=0,p=[];d>g;)n=a[g++],i&&!(f?n in r:c(r,n))||l(p,t?[n,r[n]]:r[n]);return p}};t.exports={entries:f(!0),values:f(!1)}},function(t,e,n){"use strict";var i=n(3),r=n(246),a=n(7),o=n(20),s=n(243).onFreeze,u=Object.freeze;i({target:"Object",stat:!0,forced:a((function(){u(1)})),sham:!r},{freeze:function(t){return u&&o(t)?u(s(t)):t}})},function(t,e,n){"use strict";var i=n(3),r=n(132),a=n(78);i({target:"Object",stat:!0},{fromEntries:function(t){var e={};return r(t,(function(t,n){a(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(12),o=n(5).f,s=n(6);i({target:"Object",stat:!0,forced:!s||r((function(){o(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(57),o=n(12),s=n(5),u=n(78);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),r=s.f,c=a(i),l={},h=0;c.length>h;)void 0!==(n=r(i,e=c[h++]))&&u(l,e,n);return l}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(76).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(40),o=n(130),s=n(131);i({target:"Object",stat:!0,forced:r((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{hasOwn:n(39)})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{is:n(309)})},function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(3),r=n(244);i({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(20),o=n(15),s=n(245),u=Object.isFrozen;i({target:"Object",stat:!0,forced:s||r((function(){u(1)}))},{isFrozen:function(t){return!a(t)||(!(!s||"ArrayBuffer"!=o(t))||!!u&&u(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(20),o=n(15),s=n(245),u=Object.isSealed;i({target:"Object",stat:!0,forced:s||r((function(){u(1)}))},{isSealed:function(t){return!a(t)||(!(!s||"ArrayBuffer"!=o(t))||!!u&&u(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(74);i({target:"Object",stat:!0,forced:n(7)((function(){a(1)}))},{keys:function(t){return a(r(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(40),s=n(18),u=n(130),c=n(5).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,n=o(this),i=s(t);do{if(e=c(n,i))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(40),s=n(18),u=n(130),c=n(5).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,n=o(this),i=s(t);do{if(e=c(n,i))return e.set}while(n=u(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(20),a=n(243).onFreeze,o=n(246),s=n(7),u=Object.preventExtensions;i({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{preventExtensions:function(t){return u&&r(t)?u(a(t)):t}})},function(t,e,n){"use strict";var i=n(6),r=n(79),a=n(20),o=n(40),s=n(16),u=Object.getPrototypeOf,c=Object.setPrototypeOf,l=Object.prototype,h="__proto__";if(i&&u&&c&&!(h in l))try{r(l,h,{configurable:!0,get:function(){return u(o(this))},set:function(t){var e=s(this);(a(t)||null===t)&&a(e)&&c(e,t)}})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(20),a=n(243).onFreeze,o=n(246),s=n(7),u=Object.seal;i({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{seal:function(t){return u&&r(t)?u(a(t)):t}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{setPrototypeOf:n(116)})},function(t,e,n){"use strict";var i=n(71),r=n(48),a=n(321);i||r(Object.prototype,"toString",a,{unsafe:!0})},function(t,e,n){"use strict";var i=n(71),r=n(70);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(t,e,n){"use strict";var i=n(3),r=n(300).values;i({target:"Object",stat:!0},{values:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(3),r=n(287);i({global:!0,forced:parseInt!=r},{parseInt:r})},function(t,e,n){"use strict";n(326),n(341),n(343),n(344),n(345),n(346)},function(t,e,n){"use strict";var i,r,a,o=n(3),s=n(36),u=n(183),c=n(4),l=n(8),h=n(48),f=n(116),d=n(84),g=n(194),p=n(31),v=n(21),y=n(20),x=n(211),b=n(217),m=n(327).set,_=n(330),T=n(334),w=n(335),A=n(331),S=n(52),E=n(336),k=n(337),M=n(340),O="Promise",R=k.CONSTRUCTOR,C=k.REJECTION_EVENT,I=k.SUBCLASSING,L=S.getterFor(O),P=S.set,D=E&&E.prototype,N=E,F=D,z=c.TypeError,j=c.document,B=c.process,$=M.f,X=$,U=!!(j&&j.createEvent&&c.dispatchEvent),Y="unhandledrejection",V=function(t){var e;return!(!y(t)||!v(e=t.then))&&e},G=function(t,e){var n,i,r,a=e.value,o=1==e.state,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&K(e),e.rejection=1),!0===s?n=a:(h&&h.enter(),n=s(a),h&&(h.exit(),r=!0)),n===t.promise?c(z("Promise-chain cycle")):(i=V(n))?l(i,n,u,c):u(n)):c(a)}catch(t){h&&!r&&h.exit(),c(t)}},H=function(t,e){t.notified||(t.notified=!0,_((function(){for(var n,i=t.reactions;n=i.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},W=function(t,e,n){var i,r;U?((i=j.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),c.dispatchEvent(i)):i={promise:e,reason:n},!C&&(r=c["on"+t])?r(i):t===Y&&T("Unhandled promise rejection",n)},q=function(t){l(m,c,(function(){var e,n=t.facade,i=t.value;if(Z(t)&&(e=w((function(){u?B.emit("unhandledRejection",i,n):W(Y,n,i)})),t.rejection=u||Z(t)?2:1,e.error))throw e.value}))},Z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){l(m,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw z("Promise can't be resolved itself");var i=V(e);i?_((function(){var n={done:!1};try{l(i,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){Q({done:!1},e,t)}}};if(R&&(F=(N=function(t){x(this,F),p(t),l(i,this);var e=L(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){P(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:void 0})}).prototype=h(F,"then",(function(t,e){var n=L(this),i=$(b(this,N));return n.parent=!0,i.ok=!v(t)||t,i.fail=v(e)&&e,i.domain=u?B.domain:void 0,0==n.state?n.reactions.add(i):_((function(){G(i,n)})),i.promise})),r=function(){var t=new i,e=L(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},M.f=$=function(t){return t===N||undefined===t?new r(t):X(t)},!s&&v(E)&&D!==Object.prototype)){a=D.then,I||h(D,"then",(function(t,e){var n=this;return new N((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,F)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:N}),d(N,O,!1,!0),g(O)},function(t,e,n){"use strict";var i,r,a,o,s=n(4),u=n(96),c=n(86),l=n(21),h=n(39),f=n(7),d=n(75),g=n(97),p=n(43),v=n(328),y=n(329),x=n(183),b=s.setImmediate,m=s.clearImmediate,_=s.process,T=s.Dispatch,w=s.Function,A=s.MessageChannel,S=s.String,E=0,k={},M="onreadystatechange";f((function(){i=s.location}));var O=function(t){if(h(k,t)){var e=k[t];delete k[t],e()}},R=function(t){return function(){O(t)}},C=function(t){O(t.data)},I=function(t){s.postMessage(S(t),i.protocol+"//"+i.host)};b&&m||(b=function(t){v(arguments.length,1);var e=l(t)?t:w(t),n=g(arguments,1);return k[++E]=function(){u(e,void 0,n)},r(E),E},m=function(t){delete k[t]},x?r=function(t){_.nextTick(R(t))}:T&&T.now?r=function(t){T.now(R(t))}:A&&!y?(o=(a=new A).port2,a.port1.onmessage=C,r=c(o.postMessage,o)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&i&&"file:"!==i.protocol&&!f(I)?(r=I,s.addEventListener("message",C,!1)):r=M in p("script")?function(t){d.appendChild(p("script"))[M]=function(){d.removeChild(this),O(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:b,clear:m}},function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t@^][^\s!#%&*+<=>@^]*>/,P=/a/g,D=/a/g,N=new S(P)!==P,F=g.MISSED_STICKY,z=g.UNSUPPORTED_Y,j=i&&(!N||F||T||w||y((function(){return D[A]=!1,S(P)!=P||S(D)==D||"/a/i"!=S(P,"i")})));if(o("RegExp",j)){for(var B=function(t,e){var n,i,r,a,o,c,g=l(E,this),p=h(t),v=void 0===e,y=[],m=t;if(!g&&p&&v&&t.constructor===B)return t;if((p||l(E,t))&&(t=t.source,v&&(e=d(m))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),m=t,T&&"dotAll"in P&&(i=!!e&&C(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,F&&"sticky"in P&&(r=!!e&&C(e,"y")>-1)&&z&&(e=R(e,/y/g,"")),w&&(a=function(t){for(var e,n=t.length,i=0,r="",a=[],o={},s=!1,u=!1,c=0,l="";i<=n;i++){if("\\"===(e=O(t,i)))e+=O(t,++i);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:M(L,I(t,i+1))&&(i+=2,u=!0),r+=e,c++;continue;case">"===e&&u:if(""===l||x(o,l))throw new k("Invalid capture group name");o[l]=!0,a[a.length]=[l,c],u=!1,l="";continue}u?l+=e:r+=e}return[r,a]}(t),t=a[0],y=a[1]),o=s(S(t,e),g?this:E,B),(i||r||y.length)&&(c=b(o),i&&(c.dotAll=!0,c.raw=B(function(t){for(var e,n=t.length,i=0,r="",a=!1;i<=n;i++)"\\"!==(e=O(t,i))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),r+=e):r+="[\\s\\S]":r+=e+O(t,++i);return r}(t),n)),r&&(c.sticky=!0),y.length&&(c.groups=y)),t!==m)try{u(o,"source",""===m?"(?:)":m)}catch(t){}return o},$=c(S),X=0;$.length>X;)p(B,S,$[X++]);E.constructor=B,B.prototype=E,v(r,"RegExp",B,{constructor:!0})}m("RegExp")},function(t,e,n){"use strict";var i=n(20),r=n(15),a=n(34)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==r(t))}},function(t,e,n){"use strict";var i=n(8),r=n(39),a=n(25),o=n(369),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||r(t,"flags")||!a(s,t)?e:i(o,t)}},function(t,e,n){"use strict";var i=n(47);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp,a=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),o=a||i((function(){return!r("a","y").sticky})),s=a||i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},function(t,e,n){"use strict";var i=n(6),r=n(371),a=n(15),o=n(79),s=n(52).get,u=RegExp.prototype,c=TypeError;i&&r&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).dotAll;throw c("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";var i=n(3),r=n(375);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,n){"use strict";var i,r,a=n(8),o=n(14),s=n(69),u=n(369),c=n(370),l=n(35),h=n(72),f=n(52).get,d=n(371),g=n(372),p=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,y=v,x=o("".charAt),b=o("".indexOf),m=o("".replace),_=o("".slice),T=(r=/b*/g,a(v,i=/a/,"a"),a(v,r,"a"),0!==i.lastIndex||0!==r.lastIndex),w=c.BROKEN_CARET,A=void 0!==/()??/.exec("")[1];(T||A||w||d||g)&&(y=function(t){var e,n,i,r,o,c,l,d=this,g=f(d),S=s(t),E=g.raw;if(E)return E.lastIndex=d.lastIndex,e=a(y,E,S),d.lastIndex=E.lastIndex,e;var k=g.groups,M=w&&d.sticky,O=a(u,d),R=d.source,C=0,I=S;if(M&&(O=m(O,"y",""),-1===b(O,"g")&&(O+="g"),I=_(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==x(S,d.lastIndex-1))&&(R="(?: "+R+")",I=" "+I,C++),n=new RegExp("^(?:"+R+")",O)),A&&(n=new RegExp("^"+R+"$(?!\\s)",O)),T&&(i=d.lastIndex),r=a(v,M?n:d,I),M?r?(r.input=_(r.input,C),r[0]=_(r[0],C),r.index=d.lastIndex,d.lastIndex+=r[0].length):d.lastIndex=0:T&&r&&(d.lastIndex=d.global?r.index+r[0].length:i),A&&r&&r.length>1&&a(p,r[0],n,(function(){for(o=1;o=0?i:n+i;return r<0||r>=n?void 0:c(e,r)}})},function(t,e,n){"use strict";var i=n(3),r=n(384).codeAt;i({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(14),r=n(62),a=n(69),o=n(16),s=i("".charAt),u=i("".charCodeAt),c=i("".slice),l=function(t){return function(e,n){var i,l,h=a(o(e)),f=r(n),d=h.length;return f<0||f>=d?t?"":void 0:(i=u(h,f))<55296||i>56319||f+1===d||(l=u(h,f+1))<56320||l>57343?t?s(h,f):i:t?c(h,f,f+2):l-56320+(i-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e,n){"use strict";var i,r=n(3),a=n(87),o=n(5).f,s=n(65),u=n(69),c=n(386),l=n(16),h=n(387),f=n(36),d=a("".endsWith),g=a("".slice),p=Math.min,v=h("endsWith");r({target:"String",proto:!0,forced:!!(f||v||(i=o(String.prototype,"endsWith"),!i||i.writable))&&!v},{endsWith:function(t){var e=u(l(this));c(t);var n=arguments.length>1?arguments[1]:void 0,i=e.length,r=void 0===n?i:p(s(n),i),a=u(t);return d?d(e,a,r):g(e,r-a.length,r)===a}})},function(t,e,n){"use strict";var i=n(367),r=TypeError;t.exports=function(t){if(i(t))throw r("The method doesn't accept regular expressions");return t}},function(t,e,n){"use strict";var i=n(34)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(61),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,c=r([].join);i({target:"String",stat:!0,arity:1,forced:!!u&&1!=u.length},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,r=0;i>r;){if(e=+arguments[r++],a(e,1114111)!==e)throw o(e+" is not a valid code point");n[r]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return c(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(386),o=n(16),s=n(69),u=n(387),c=r("".indexOf);i({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(16),o=n(69),s=r("".charCodeAt);i({target:"String",proto:!0},{isWellFormed:function(){for(var t=o(a(this)),e=t.length,n=0;n=56320||++n>=e||56320!=(64512&s(t,n))))return!1}return!0}})},function(t,e,n){"use strict";var i=n(384).charAt,r=n(69),a=n(52),o=n(170),s=n(173),u="String Iterator",c=a.set,l=a.getterFor(u);o(String,"String",(function(t){c(this,{type:u,string:r(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?s(void 0,!0):(t=i(n,r),e.index+=t.length,s(t,!1))}))},function(t,e,n){"use strict";var i=n(8),r=n(393),a=n(47),o=n(17),s=n(65),u=n(69),c=n(16),l=n(30),h=n(394),f=n(395);r("match",(function(t,e,n){return[function(e){var n=c(this),r=o(e)?void 0:l(e,t);return r?i(r,e,n):new RegExp(e)[t](u(n))},function(t){var i=a(this),r=u(t),o=n(e,i,r);if(o.done)return o.value;if(!i.global)return f(i,r);var c=i.unicode;i.lastIndex=0;for(var l,d=[],g=0;null!==(l=f(i,r));){var p=u(l[0]);d[g]=p,""===p&&(i.lastIndex=h(r,s(i.lastIndex),c)),g++}return 0===g?null:d}]}))},function(t,e,n){"use strict";n(374);var i=n(87),r=n(48),a=n(375),o=n(7),s=n(34),u=n(44),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),g=d&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!g||n){var p=i(/./[f]),v=e(f,""[t],(function(t,e,n,r,o){var s=i(t),u=e.exec;return u===a||u===l.exec?d&&!o?{done:!0,value:p(e,n,r)}:{done:!0,value:s(n,e,r)}:{done:!1}}));r(String.prototype,t,v[0]),r(l,f,v[1])}h&&u(l[f],"sham",!0)}},function(t,e,n){"use strict";var i=n(384).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},function(t,e,n){"use strict";var i=n(8),r=n(47),a=n(21),o=n(15),s=n(375),u=TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var c=i(n,t,e);return null!==c&&r(c),c}if("RegExp"===o(t))return i(s,t,e);throw u("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(87),o=n(171),s=n(173),u=n(16),c=n(65),l=n(69),h=n(47),f=n(17),d=n(15),g=n(367),p=n(368),v=n(30),y=n(48),x=n(7),b=n(34),m=n(217),_=n(394),T=n(395),w=n(52),A=n(36),S=b("matchAll"),E="RegExp String",k=E+" Iterator",M=w.set,O=w.getterFor(k),R=RegExp.prototype,C=TypeError,I=a("".indexOf),L=a("".matchAll),P=!!L&&!x((function(){L("a",/./)})),D=o((function(t,e,n,i){M(this,{type:k,regexp:t,string:e,global:n,unicode:i,done:!1})}),E,(function(){var t=O(this);if(t.done)return s(void 0,!0);var e=t.regexp,n=t.string,i=T(e,n);return null===i?(t.done=!0,s(void 0,!0)):t.global?(""===l(i[0])&&(e.lastIndex=_(n,c(e.lastIndex),t.unicode)),s(i,!1)):(t.done=!0,s(i,!1))})),N=function(t){var e,n,i,r=h(this),a=l(t),o=m(r,RegExp),s=l(p(r));return e=new o(o===RegExp?r.source:r,s),n=!!~I(s,"g"),i=!!~I(s,"u"),e.lastIndex=c(r.lastIndex),new D(e,a,n,i)};i({target:"String",proto:!0,forced:P},{matchAll:function(t){var e,n,i,a,o=u(this);if(f(t)){if(P)return L(o,t)}else{if(g(t)&&(e=l(u(p(t))),!~I(e,"g")))throw C("`.matchAll` does not allow non-global regexes");if(P)return L(o,t);if(void 0===(i=v(t,S))&&A&&"RegExp"==d(t)&&(i=N),i)return r(i,t,o)}return n=l(o),a=new RegExp(t,"g"),A?r(N,a,n):a[S](n)}}),A||S in R||y(R,S,N)},function(t,e,n){"use strict";var i=n(3),r=n(227).end;i({target:"String",proto:!0,forced:n(398)},{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},function(t,e,n){"use strict";var i=n(3),r=n(227).start;i({target:"String",proto:!0,forced:n(398)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(12),o=n(40),s=n(69),u=n(64),c=r([].push),l=r([].join);i({target:"String",stat:!0},{raw:function(t){var e=a(o(t).raw),n=u(e);if(!n)return"";for(var i=arguments.length,r=[],h=0;;){if(c(r,s(e[h++])),h===n)return l(r,"");h=R&&(O+=S(s,R,L)+z,R=L+I.length)}return O+S(s,R)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!E||k)},function(t,e,n){"use strict";var i=n(14),r=n(40),a=Math.floor,o=i("".charAt),s=i("".replace),u=i("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,f){var d=n+t.length,g=i.length,p=l;return void 0!==h&&(h=r(h),p=c),s(f,p,(function(r,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,n);case"'":return u(e,d);case"<":c=h[u(s,1,-1)];break;default:var l=+s;if(0===l)return r;if(l>g){var f=a(l/10);return 0===f?r:f<=g?void 0===i[f-1]?o(s,1):i[f-1]+o(s,1):r}c=i[l-1]}return void 0===c?"":c}))}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(14),o=n(16),s=n(21),u=n(17),c=n(367),l=n(69),h=n(30),f=n(368),d=n(403),g=n(34),p=n(36),v=g("replace"),y=TypeError,x=a("".indexOf),b=a("".replace),m=a("".slice),_=Math.max,T=function(t,e,n){return n>t.length?-1:""===e?n:x(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,a,g,w,A,S,E,k,M=o(this),O=0,R=0,C="";if(!u(t)){if((n=c(t))&&(i=l(o(f(t))),!~x(i,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(a=h(t,v))return r(a,t,M,e);if(p&&n)return b(l(M),t,e)}for(g=l(M),w=l(t),(A=s(e))||(e=l(e)),S=w.length,E=_(1,S),O=T(g,w,0);-1!==O;)k=A?l(e(w,O,g)):d(w,g,O,[],void 0,e),C+=m(g,R,O)+k,R=O+S,O=T(g,w,O+E);return R1||"".split(/.?/).length?function(t,n){var a=g(l(this)),o=void 0===n?T:n>>>0;if(0===o)return[];if(void 0===t)return[a];if(!c(t))return r(e,a,t,o);for(var s,u,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,y=new RegExp(t.source,d+"g");(s=r(x,y,a))&&!((u=y.lastIndex)>p&&(E(f,k(a,p,s.index)),s.length>1&&s.index=o));)y.lastIndex===s.index&&y.lastIndex++;return p===a.length?!h&&S(y,"")||E(f,""):E(f,k(a,p)),f.length>o?v(f,0,o):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:r(e,this,t,n)}:e,[function(e,n){var i=l(this),o=u(e)?void 0:p(e,t);return o?r(o,e,i,n):r(a,g(i),e,n)},function(t,i){var r=s(this),o=g(t),u=n(a,r,o,i,a!==e);if(u.done)return u.value;var c=h(r,RegExp),l=r.unicode,p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(_?"g":"y"),v=new c(_?"^(?:"+r.source+")":r,p),x=void 0===i?T:i>>>0;if(0===x)return[];if(0===o.length)return null===y(v,o)?[o]:[];for(var b=0,m=0,A=[];m1?arguments[1]:void 0,e.length)),i=u(t);return d?d(e,i,n):g(e,n,n+i.length)===i}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(16),o=n(62),s=n(69),u=r("".slice),c=Math.max,l=Math.min;i({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,i,r=s(a(this)),h=r.length,f=o(t);return f===1/0&&(f=0),f<0&&(f=c(h+f,0)),(n=void 0===e?h:o(e))<=0||n===1/0||f>=(i=l(f+n,h))?"":u(r,f,i)}})},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(14),o=n(16),s=n(69),u=n(7),c=Array,l=a("".charAt),h=a("".charCodeAt),f=a([].join),d="".toWellFormed,g=d&&u((function(){return"1"!==r(d,1)}));i({target:"String",proto:!0,forced:g},{toWellFormed:function(){var t=s(o(this));if(g)return r(d,t);for(var e=t.length,n=c(e),i=0;i=56320||i+1>=e||56320!=(64512&h(t,i+1))?n[i]="�":(n[i]=l(t,i),n[++i]=l(t,i))}return f(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(273).trim;i({target:"String",proto:!0,forced:n(411)("trim")},{trim:function(){return r(this)}})},function(t,e,n){"use strict";var i=n(50).PROPER,r=n(7),a=n(274);t.exports=function(t){return r((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||i&&a[t].name!==t}))}},function(t,e,n){"use strict";n(413);var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(t,e,n){"use strict";var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(t,e,n){"use strict";var i=n(273).end,r=n(411);t.exports=r("trimEnd")?function(){return i(this)}:"".trimEnd},function(t,e,n){"use strict";n(416);var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(t,e,n){"use strict";var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(t,e,n){"use strict";var i=n(273).start,r=n(411);t.exports=r("trimStart")?function(){return i(this)}:"".trimStart},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("anchor")},{anchor:function(t){return r(this,"a","name",t)}})},function(t,e,n){"use strict";var i=n(14),r=n(16),a=n(69),o=/"/g,s=i("".replace);t.exports=function(t,e,n,i){var u=a(r(t)),c="<"+e;return""!==n&&(c+=" "+n+'="'+s(a(i),o,""")+'"'),c+">"+u+""}},function(t,e,n){"use strict";var i=n(7);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("big")},{big:function(){return r(this,"big","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("blink")},{blink:function(){return r(this,"blink","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("bold")},{bold:function(){return r(this,"b","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontcolor")},{fontcolor:function(t){return r(this,"font","color",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontsize")},{fontsize:function(t){return r(this,"font","size",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("italics")},{italics:function(){return r(this,"i","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("link")},{link:function(t){return r(this,"a","href",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("small")},{small:function(){return r(this,"small","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("strike")},{strike:function(){return r(this,"strike","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sub")},{sub:function(){return r(this,"sub","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sup")},{sup:function(){return r(this,"sup","","")}})},function(t,e,n){"use strict";n(434)("Float32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(8),o=n(6),s=n(435),u=n(215),c=n(208),l=n(211),h=n(11),f=n(44),d=n(279),g=n(65),p=n(212),v=n(436),y=n(438),x=n(18),b=n(39),m=n(70),_=n(20),T=n(23),w=n(72),A=n(25),S=n(116),E=n(58).f,k=n(439),M=n(85).forEach,O=n(194),R=n(79),C=n(45),I=n(5),L=n(52),P=n(120),D=L.get,N=L.set,F=L.enforce,z=C.f,j=I.f,B=r.RangeError,$=c.ArrayBuffer,X=$.prototype,U=c.DataView,Y=u.NATIVE_ARRAY_BUFFER_VIEWS,V=u.TYPED_ARRAY_TAG,G=u.TypedArray,H=u.TypedArrayPrototype,W=u.aTypedArrayConstructor,q=u.isTypedArray,Z="BYTES_PER_ELEMENT",K="Wrong length",J=function(t,e){W(t);for(var n=0,i=e.length,r=new t(i);i>n;)r[n]=e[n++];return r},Q=function(t,e){R(t,e,{configurable:!0,get:function(){return D(this)[e]}})},tt=function(t){var e;return A(X,t)||"ArrayBuffer"==(e=m(t))||"SharedArrayBuffer"==e},et=function(t,e){return q(t)&&!T(e)&&e in t&&d(+e)&&e>=0},nt=function(t,e){return e=x(e),et(t,e)?h(2,t[e]):j(t,e)},it=function(t,e,n){return e=x(e),!(et(t,e)&&_(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?z(t,e,n):(t[e]=n.value,t)};o?(Y||(I.f=nt,C.f=it,Q(H,"buffer"),Q(H,"byteOffset"),Q(H,"byteLength"),Q(H,"length")),i({target:"Object",stat:!0,forced:!Y},{getOwnPropertyDescriptor:nt,defineProperty:it}),t.exports=function(t,e,n){var o=t.match(/\d+/)[0]/8,u=t+(n?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=r[u],x=d,b=x&&x.prototype,m={},T=function(t,e){z(t,e,{get:function(){return function(t,e){var n=D(t);return n.view[c](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=D(t);r.view[h](e*o+r.byteOffset,n?y(i):i,!0)}(this,e,t)},enumerable:!0})};Y?s&&(x=e((function(t,e,n,i){return l(t,b),P(_(e)?tt(e)?void 0!==i?new d(e,v(n,o),i):void 0!==n?new d(e,v(n,o)):new d(e):q(e)?J(x,e):a(k,x,e):new d(p(e)),t,x)})),S&&S(x,G),M(E(d),(function(t){t in x||f(x,t,d[t])})),x.prototype=b):(x=e((function(t,e,n,i){l(t,b);var r,s,u,c=0,h=0;if(_(e)){if(!tt(e))return q(e)?J(x,e):a(k,x,e);r=e,h=v(n,o);var f=e.byteLength;if(void 0===i){if(f%o)throw B(K);if((s=f-h)<0)throw B(K)}else if((s=g(i)*o)+h>f)throw B(K);u=s/o}else u=p(e),r=new $(s=u*o);for(N(t,{buffer:r,byteOffset:h,byteLength:s,length:u,view:new U(r)});c255?255:255&n}},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(218),o=n(40),s=n(64),u=n(135),c=n(136),l=n(133),h=n(440),f=n(215).aTypedArrayConstructor,d=n(441);t.exports=function(t){var e,n,g,p,v,y,x,b,m=a(this),_=o(t),T=arguments.length,w=T>1?arguments[1]:void 0,A=void 0!==w,S=c(_);if(S&&!l(S))for(b=(x=u(_,S)).next,_=[];!(y=r(b,x)).done;)_.push(y.value);for(A&&T>2&&(w=i(w,arguments[2])),n=s(_),g=new(f(m))(n),p=h(g),e=0;n>e;e++)v=A?w(_[e],e):_[e],g[e]=p?d(v):+v;return g}},function(t,e,n){"use strict";var i=n(70);t.exports=function(t){var e=i(t);return"BigInt64Array"==e||"BigUint64Array"==e}},function(t,e,n){"use strict";var i=n(19),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},function(t,e,n){"use strict";n(434)("Float64",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}),!0)},function(t,e,n){"use strict";n(434)("Uint16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(215),r=n(64),a=n(62),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function(t){var e=o(this),n=r(e),i=a(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},function(t,e,n){"use strict";var i=n(14),r=n(215),a=i(n(145)),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).every,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(150),a=n(441),o=n(70),s=n(8),u=n(14),c=n(7),l=i.aTypedArray,h=i.exportTypedArrayMethod,f=u("".slice);h("fill",(function(t){var e=arguments.length;l(this);var n="Big"===f(o(this),0,3)?a(t):+t;return s(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},function(t,e,n){"use strict";var i=n(215),r=n(85).filter,a=n(455),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function(t){var e=r(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},function(t,e,n){"use strict";var i=n(199),r=n(456);t.exports=function(t,e){return i(r(t),e)}},function(t,e,n){"use strict";var i=n(215),r=n(217),a=i.aTypedArrayConstructor,o=i.getTypedArrayConstructor;t.exports=function(t){return a(r(t,o(t)))}},function(t,e,n){"use strict";var i=n(215),r=n(85).find,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).findIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(155).findLast,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(155).findLastIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).forEach,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(435);(0,n(215).exportTypedArrayStaticMethod)("from",n(439),i)},function(t,e,n){"use strict";var i=n(215),r=n(60).includes,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(60).indexOf,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(215),s=n(169),u=n(34)("iterator"),c=i.Uint8Array,l=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,g=o.exportTypedArrayMethod,p=c&&c.prototype,v=!r((function(){p[u].call([1])})),y=!!p&&p.values&&p[u]===p.values&&"values"===p.values.name,x=function(){return l(d(this))};g("entries",(function(){return f(d(this))}),v),g("keys",(function(){return h(d(this))}),v),g("values",x,v||!y,{name:"values"}),g(u,x,v||!y,{name:"values"})},function(t,e,n){"use strict";var i=n(215),r=n(14),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=r([].join);o("join",(function(t){return s(a(this),t)}))},function(t,e,n){"use strict";var i=n(215),r=n(96),a=n(176),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return r(a,o(this),e>1?[t,arguments[1]]:[t])}))},function(t,e,n){"use strict";var i=n(215),r=n(85).map,a=n(456),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},function(t,e,n){"use strict";var i=n(215),r=n(435),a=i.aTypedArrayConstructor;(0,i.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(a(this))(e);e>t;)n[t]=arguments[t++];return n}),r)},function(t,e,n){"use strict";var i=n(215),r=n(182).left,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return r(a(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(182).right,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return r(a(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=i.aTypedArray,a=i.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,n=r(e).length,i=o(n/2),a=0;a1?arguments[1]:void 0,1),n=u(t);if(v)return r(d,this,n,e);var i=this.length,a=o(n),c=0;if(a+e>i)throw l("Wrong length");for(;ca;)c[a]=n[a++];return c}),a((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var i=n(215),r=n(85).some,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(87),a=n(7),o=n(31),s=n(189),u=n(215),c=n(190),l=n(191),h=n(28),f=n(192),d=u.aTypedArray,g=u.exportTypedArrayMethod,p=i.Uint16Array,v=p&&r(p.prototype.sort),y=!(!v||a((function(){v(new p(2),null)}))&&a((function(){v(new p(2),{})}))),x=!!v&&!a((function(){if(h)return h<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var t,e,n=new p(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(v(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0}));g("sort",(function(t){return void 0!==t&&o(t),x?v(this,t):s(d(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!x||y)},function(t,e,n){"use strict";var i=n(215),r=n(65),a=n(61),o=n(456),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),i=n.length,u=a(t,i);return new(o(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,r((void 0===e?i:a(e,i))-u))}))},function(t,e,n){"use strict";var i=n(4),r=n(96),a=n(215),o=n(7),s=n(97),u=i.Int8Array,c=a.aTypedArray,l=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!u&&o((function(){h.call(new u(1))}));l("toLocaleString",(function(){return r(h,f?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var i=n(197),r=n(215),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;o("toReversed",(function(){return i(a(this),s(this))}))},function(t,e,n){"use strict";var i=n(215),r=n(14),a=n(31),o=n(199),s=i.aTypedArray,u=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,l=r(i.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),n=o(u(e),e);return l(n,t)}))},function(t,e,n){"use strict";var i=n(215).exportTypedArrayMethod,r=n(7),a=n(4),o=n(14),s=a.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=o([].join);r((function(){c.call({})}))&&(c=function(){return l(this)});var h=u.toString!=c;i("toString",c,h)},function(t,e,n){"use strict";var i=n(206),r=n(215),a=n(440),o=n(62),s=n(441),u=r.aTypedArray,c=r.getTypedArrayConstructor,l=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=u(this),r=o(t),l=a(n)?s(e):+e;return i(n,c(n),r,l)}}.with,!h)},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(69),o=String.fromCharCode,s=r("".charAt),u=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;i({global:!0},{unescape:function(t){for(var e,n,i=a(t),r="",f=i.length,d=0;d>(-2*_&6))));return o}})},function(t){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n={},i=0;i<66;i++)n[e.charAt(i)]=i;t.exports={itoc:e,ctoi:n}},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(24),o=n(14),s=n(8),u=n(7),c=n(69),l=n(328),h=n(490).itoc,f=a("btoa"),d=o("".charAt),g=o("".charCodeAt),p=!!f&&!u((function(){f()})),v=!!f&&u((function(){return"bnVsbA=="!==f(null)})),y=!!f&&1!==f.length;i({global:!0,bind:!0,enumerable:!0,forced:p||v||y},{btoa:function(t){if(l(arguments.length,1),p||v||y)return s(f,r,c(t));for(var e,n,i=c(t),o="",u=0,x=h;d(i,u)||(x="=",u%1);){if((n=g(i,u+=3/4))>255)throw new(a("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o+=d(x,63&(e=e<<8|n)>>8-u%1*8)}return o}})},function(t,e,n){"use strict";var i=n(4),r=n(493),a=n(494),o=n(161),s=n(44),u=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in r)r[c]&&u(i[c]&&i[c].prototype);u(a)},function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var i=n(43)("span").classList,r=i&&i.constructor&&i.constructor.prototype;t.exports=r===Object.prototype?void 0:r},function(t,e,n){"use strict";var i=n(4),r=n(493),a=n(494),o=n(169),s=n(44),u=n(34),c=u("iterator"),l=u("toStringTag"),h=o.values,f=function(t,e){if(t){if(t[c]!==h)try{s(t,c,h)}catch(e){t[c]=h}if(t[l]||s(t,l,e),r[e])for(var n in o)if(t[n]!==o[n])try{s(t,n,o[n])}catch(e){t[n]=o[n]}}};for(var d in r)f(i[d]&&i[d].prototype,d);f(a,"DOMTokenList")},function(t,e,n){"use strict";var i=n(3),r=n(497),a=n(24),o=n(7),s=n(72),u=n(11),c=n(45).f,l=n(48),h=n(79),f=n(39),d=n(211),g=n(47),p=n(127),v=n(121),y=n(498),x=n(124),b=n(52),m=n(6),_=n(36),T="DOMException",w="DATA_CLONE_ERR",A=a("Error"),S=a(T)||function(){try{(new(a("MessageChannel")||r("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name==w&&25==t.code)return t.constructor}}(),E=S&&S.prototype,k=A.prototype,M=b.set,O=b.getterFor(T),R="stack"in A(T),C=function(t){return f(y,t)&&y[t].m?y[t].c:0},I=function(){d(this,L);var t=arguments.length,e=v(t<1?void 0:arguments[0]),n=v(t<2?void 0:arguments[1],"Error"),i=C(n);if(M(this,{type:T,name:n,message:e,code:i}),m||(this.name=n,this.message=e,this.code=i),R){var r=A(e);r.name=T,c(this,"stack",u(1,x(r.stack,1)))}},L=I.prototype=s(k),P=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return P((function(){return O(this)[t]}))};m&&(h(L,"code",D("code")),h(L,"message",D("message")),h(L,"name",D("name"))),c(L,"constructor",u(1,I));var N=o((function(){return!(new S instanceof A)})),F=N||o((function(){return k.toString!==p||"2: 1"!==String(new S(1,2))})),z=N||o((function(){return 25!==new S(1,"DataCloneError").code})),j=N||25!==S[w]||25!==E[w],B=_?F||z||j:N;i({global:!0,constructor:!0,forced:B},{DOMException:B?I:S});var $=a(T),X=$.prototype;for(var U in F&&(_||S===$)&&l(X,"toString",p),z&&m&&S===$&&h(X,"code",P((function(){return C(g(this).name)}))),y)if(f(y,U)){var Y=y[U],V=Y.s,G=u(6,Y.c);f($,V)||c($,V,G),f(X,V)||c(X,V,G)}},function(t,e,n){"use strict";var i=n(183);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},function(t){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(24),o=n(11),s=n(45).f,u=n(39),c=n(211),l=n(120),h=n(121),f=n(498),d=n(124),g=n(6),p=n(36),v="DOMException",y=a("Error"),x=a(v),b=function(){c(this,m);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),i=new x(e,n),r=y(e);return r.name=v,s(i,"stack",o(1,d(r.stack,1))),l(i,this,b),i},m=b.prototype=x.prototype,_="stack"in y(v),T="stack"in new x(1,2),w=x&&g&&Object.getOwnPropertyDescriptor(r,v),A=!(!w||w.writable&&w.configurable),S=_&&!A&&!T;i({global:!0,constructor:!0,forced:p||S},{DOMException:S?b:x});var E=a(v),k=E.prototype;if(k.constructor!==E)for(var M in p||s(k,"constructor",o(1,E)),f)if(u(f,M)){var O=f[M],R=O.s;u(E,R)||s(E,R,o(6,O.c))}},function(t,e,n){"use strict";var i=n(24),r="DOMException";n(84)(i(r),r)},function(t,e,n){"use strict";n(502),n(503)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(327).clear;i({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==a},{clearImmediate:a})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(327).set,o=n(504),s=r.setImmediate?o(a,!1):a;i({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==s},{setImmediate:s})},function(t,e,n){"use strict";var i,r=n(4),a=n(96),o=n(21),s=n(505),u=n(29),c=n(97),l=n(328),h=r.Function,f=/MSIE .\./.test(u)||s&&((i=r.Bun.version.split(".")).length<3||0==i[0]&&(i[1]<3||3==i[1]&&0==i[2]));t.exports=function(t,e){var n=e?2:1;return f?function(i,r){var s=l(arguments.length,1)>n,u=o(i)?i:h(i),f=s?c(arguments,n):[],d=s?function(){a(u,this,f)}:u;return e?t(d,r):t(d)}:t}},function(t){"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(330),o=n(31),s=n(328),u=n(183),c=r.process;i({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){s(arguments.length,1),o(t);var e=u&&c.domain;a(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(79),o=n(6),s=TypeError,u=Object.defineProperty,c=r.self!==r;try{if(o){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||a(r,"self",{get:function(){return r},set:function(t){if(this!==r)throw s("Illegal invocation");u(r,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:c},{self:r})}catch(t){}},function(t,e,n){"use strict";var i,r=n(36),a=n(3),o=n(4),s=n(24),u=n(14),c=n(7),l=n(41),h=n(21),f=n(91),d=n(17),g=n(20),p=n(23),v=n(132),y=n(47),x=n(70),b=n(39),m=n(78),_=n(44),T=n(64),w=n(328),A=n(368),S=n(509),E=n(510),k=n(125),M=n(511),O=o.Object,R=o.Array,C=o.Date,I=o.Error,L=o.EvalError,P=o.RangeError,D=o.ReferenceError,N=o.SyntaxError,F=o.TypeError,z=o.URIError,j=o.PerformanceMark,B=o.WebAssembly,$=B&&B.CompileError||I,X=B&&B.LinkError||I,U=B&&B.RuntimeError||I,Y=s("DOMException"),V=S.Map,G=S.has,H=S.get,W=S.set,q=E.Set,Z=E.add,K=s("Object","keys"),J=u([].push),Q=u((!0).valueOf),tt=u(1..valueOf),et=u("".valueOf),nt=u(C.prototype.getTime),it=l("structuredClone"),rt="DataCloneError",at="Transferring",ot=function(t){return!c((function(){var e=new o.Set([7]),n=t(e),i=t(O(7));return n==e||!n.has(7)||"object"!=typeof i||7!=i}))&&t},st=function(t,e){return!c((function(){var n=new e,i=t({a:n,b:n});return!(i&&i.a===i.b&&i.a instanceof e&&i.a.stack===n.stack)}))},ut=o.structuredClone,ct=r||!st(ut,I)||!st(ut,Y)||(i=ut,!!c((function(){var t=i(new o.AggregateError([1],it,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=it||3!=t.cause}))),lt=!ut&&ot((function(t){return new j(it,{detail:t}).detail})),ht=ot(ut)||lt,ft=function(t){throw new Y("Uncloneable type: "+t,rt)},dt=function(t,e){throw new Y((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",rt)},gt=function(t,e){return ht||dt(e),ht(t)},pt=function(t,e,n){if(G(e,t))return H(e,t);var i,r,a,s,u,c;if("SharedArrayBuffer"===(n||x(t)))i=ht?ht(t):t;else{var l=o.DataView;l||"function"==typeof t.slice||dt("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength,a="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(r,a),s=new l(t),u=new l(i);for(c=0;c1&&!d(arguments[1])?y(arguments[1]):void 0,r=i?i.transfer:void 0,a=!1;void 0!==r&&(n=function(t,e){if(!g(t))throw F("Transfer option cannot be converted to a sequence");var n=[];v(t,(function(t){J(n,y(t))}));for(var i,r,a,s,u,c=0,l=T(n),d=[];c92||u&&a>94||o&&a>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength}))},function(t,e,n){"use strict";n(513),n(514)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(504)(r.setInterval,!0);i({global:!0,bind:!0,forced:r.setInterval!==a},{setInterval:a})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(504)(r.setTimeout,!0);i({global:!0,bind:!0,forced:r.setTimeout!==a},{setTimeout:a})},function(t,e,n){"use strict";n(516)},function(t,e,n){"use strict";n(391);var i,r=n(3),a=n(6),o=n(517),s=n(4),u=n(86),c=n(14),l=n(48),h=n(79),f=n(211),d=n(39),g=n(292),p=n(163),v=n(77),y=n(384).codeAt,x=n(518),b=n(69),m=n(84),_=n(328),T=n(519),w=n(52),A=w.set,S=w.getterFor("URL"),E=T.URLSearchParams,k=T.getState,M=s.URL,O=s.TypeError,R=s.parseInt,C=Math.floor,I=Math.pow,L=c("".charAt),P=c(/./.exec),D=c([].join),N=c(1..toString),F=c([].pop),z=c([].push),j=c("".replace),B=c([].shift),$=c("".split),X=c("".slice),U=c("".toLowerCase),Y=c([].unshift),V="Invalid scheme",G="Invalid host",H="Invalid port",W=/[a-z]/i,q=/[\d+-.a-z]/i,Z=/\d/,K=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+/,rt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,ot=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)Y(e,t%256),t=C(t/256);return D(e,".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,a=0;a<8;a++)0!==t[a]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=a),++r);return r>n&&(e=i,n=r),e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=N(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},st={},ut=g({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),ct=g({},ut,{"#":1,"?":1,"{":1,"}":1}),lt=g({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var n=y(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var n;return 2==t.length&&P(W,L(t,0))&&(":"==(n=L(t,1))||!e&&"|"==n)},gt=function(t){var e;return t.length>1&&dt(X(t,0,2))&&(2==t.length||"/"===(e=L(t,2))||"\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},vt={},yt={},xt={},bt={},mt={},_t={},Tt={},wt={},At={},St={},Et={},kt={},Mt={},Ot={},Rt={},Ct={},It={},Lt={},Pt={},Dt={},Nt={},Ft=function(t,e,n){var i,r,a,o=b(t);if(e){if(r=this.parse(o))throw O(r);this.searchParams=null}else{if(void 0!==n&&(i=new Ft(n,!0)),r=this.parse(o,null,i))throw O(r);(a=k(new E)).bindURL(this),this.searchParams=a}};Ft.prototype={type:"URL",parse:function(t,e,n){var r,a,o,s,u,c=this,l=e||vt,h=0,f="",g=!1,y=!1,x=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=j(t,it,""),t=j(t,rt,"$1")),t=j(t,at,""),r=p(t);h<=r.length;){switch(a=r[h],l){case vt:if(!a||!P(W,a)){if(e)return V;l=xt;continue}f+=U(a),l=yt;break;case yt:if(a&&(P(q,a)||"+"==a||"-"==a||"."==a))f+=U(a);else{if(":"!=a){if(e)return V;f="",l=xt,h=0;continue}if(e&&(c.isSpecial()!=d(ft,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ft[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?l=Ot:c.isSpecial()&&n&&n.scheme==c.scheme?l=bt:c.isSpecial()?l=wt:"/"==r[h+1]?(l=mt,h++):(c.cannotBeABaseURL=!0,z(c.path,""),l=Pt)}break;case xt:if(!n||n.cannotBeABaseURL&&"#"!=a)return V;if(n.cannotBeABaseURL&&"#"==a){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=Nt;break}l="file"==n.scheme?Ot:_t;continue;case bt:if("/"!=a||"/"!=r[h+1]){l=_t;continue}l=At,h++;break;case mt:if("/"==a){l=St;break}l=Lt;continue;case _t:if(c.scheme=n.scheme,a==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"==a||"\\"==a&&c.isSpecial())l=Tt;else if("?"==a)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",l=Dt;else{if("#"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,l=Lt;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",l=Nt}break;case Tt:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Lt;continue}l=St}else l=At;break;case wt:if(l=At,"/"!=a||"/"!=L(f,h+1))continue;h++;break;case At:if("/"!=a&&"\\"!=a){l=St;continue}break;case St:if("@"==a){g&&(f="%40"+f),g=!0,o=p(f);for(var m=0;m65535)return H;c.port=c.isSpecial()&&w===ft[c.scheme]?null:w,f=""}if(e)return;l=It;continue}return H}f+=a;break;case Ot:if(c.scheme="file","/"==a||"\\"==a)l=Rt;else{if(!n||"file"!=n.scheme){l=Lt;continue}if(a==i)c.host=n.host,c.path=v(n.path),c.query=n.query;else if("?"==a)c.host=n.host,c.path=v(n.path),c.query="",l=Dt;else{if("#"!=a){gt(D(v(r,h),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),l=Lt;continue}c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",l=Nt}}break;case Rt:if("/"==a||"\\"==a){l=Ct;break}n&&"file"==n.scheme&&!gt(D(v(r,h),""))&&(dt(n.path[0],!0)?z(c.path,n.path[0]):c.host=n.host),l=Lt;continue;case Ct:if(a==i||"/"==a||"\\"==a||"?"==a||"#"==a){if(!e&&dt(f))l=Lt;else if(""==f){if(c.host="",e)return;l=It}else{if(s=c.parseHost(f))return s;if("localhost"==c.host&&(c.host=""),e)return;f="",l=It}continue}f+=a;break;case It:if(c.isSpecial()){if(l=Lt,"/"!=a&&"\\"!=a)continue}else if(e||"?"!=a)if(e||"#"!=a){if(a!=i&&(l=Lt,"/"!=a))continue}else c.fragment="",l=Nt;else c.query="",l=Dt;break;case Lt:if(a==i||"/"==a||"\\"==a&&c.isSpecial()||!e&&("?"==a||"#"==a)){if(".."===(u=U(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||z(c.path,"")):pt(f)?"/"==a||"\\"==a&&c.isSpecial()||z(c.path,""):("file"==c.scheme&&!c.path.length&&dt(f)&&(c.host&&(c.host=""),f=L(f,0)+":"),z(c.path,f)),f="","file"==c.scheme&&(a==i||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"==a?(c.query="",l=Dt):"#"==a&&(c.fragment="",l=Nt)}else f+=ht(a,ct);break;case Pt:"?"==a?(c.query="",l=Dt):"#"==a?(c.fragment="",l=Nt):a!=i&&(c.path[0]+=ht(a,st));break;case Dt:e||"#"!=a?a!=i&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":ht(a,st)):(c.fragment="",l=Nt);break;case Nt:a!=i&&(c.fragment+=ht(a,ut))}h++}},parseHost:function(t){var e,n,i;if("["==L(t,0)){if("]"!=L(t,t.length-1))return G;if(e=function(t){var e,n,i,r,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return L(t,h)};if(":"==f()){if(":"!=L(t,1))return;h+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(e=n=0;n<4&&P(tt,f());)e=16*e+R(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,c>6)return;for(i=0;f();){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!P(Z,f()))return;for(;P(Z,f());){if(a=R(f(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;h++}u[c]=256*u[c]+r,2!=++i&&4!=i||c++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(X(t,1,-1)),!e)return G;this.host=e}else if(this.isSpecial()){if(t=x(t),P(et,t))return G;if(e=function(t){var e,n,i,r,a,o,s,u=$(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],i=0;i1&&"0"==L(r,0)&&(a=P(K,r)?16:8,r=X(r,8==a?1:2)),""===r)o=0;else{if(!P(10==a?Q:8==a?J:tt,r))return t;o=R(r,a)}z(n,o)}for(i=0;i=I(256,5-e))return null}else if(o>255)return null;for(s=F(n),i=0;i1?arguments[1]:void 0,i=A(e,new Ft(t,!1,n));a||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=zt.prototype,Bt=function(t,e){return{get:function(){return S(this)[t]()},set:e&&function(t){return S(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(jt,"href",Bt("serialize","setHref")),h(jt,"origin",Bt("getOrigin")),h(jt,"protocol",Bt("getProtocol","setProtocol")),h(jt,"username",Bt("getUsername","setUsername")),h(jt,"password",Bt("getPassword","setPassword")),h(jt,"host",Bt("getHost","setHost")),h(jt,"hostname",Bt("getHostname","setHostname")),h(jt,"port",Bt("getPort","setPort")),h(jt,"pathname",Bt("getPathname","setPathname")),h(jt,"search",Bt("getSearch","setSearch")),h(jt,"searchParams",Bt("getSearchParams")),h(jt,"hash",Bt("getHash","setHash"))),l(jt,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(jt,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),M){var $t=M.createObjectURL,Xt=M.revokeObjectURL;$t&&l(zt,"createObjectURL",u($t,M)),Xt&&l(zt,"revokeObjectURL",u(Xt,M))}m(zt,"URL"),r({global:!0,constructor:!0,forced:!o,sham:!a},{URL:zt})},function(t,e,n){"use strict";var i=n(7),r=n(34),a=n(6),o=n(36),s=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),n.delete("a",2),n.delete("b",void 0),o&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(o||!a)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";var i=n(14),r=2147483647,a=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",u=RangeError,c=i(o.exec),l=Math.floor,h=String.fromCharCode,f=i("".charCodeAt),d=i([].join),g=i([].push),p=i("".replace),v=i("".split),y=i("".toLowerCase),x=function(t){return t+22+75*(t<26)},b=function(t,e,n){var i=0;for(t=n?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),i+=36;return l(i+36*t/(t+38))},m=function(t){var e=[];t=function(t){for(var e=[],n=0,i=t.length;n=55296&&r<=56319&&n=o&&il((r-c)/_))throw u(s);for(c+=(m-o)*_,o=m,n=0;nr)throw u(s);if(i==o){for(var T=c,w=36;;){var A=w<=p?1:w>=p+26?26:w-p;if(T0?arguments[0]:void 0));s||(this.size=t.entries.length)},dt=ft.prototype;if(h(dt,{append:function(t,e){var n=P(this);k(arguments.length,2),q(n.entries,{key:T(t),value:T(e)}),s||this.length++,n.updateURL()},delete:function(t){for(var e=P(this),n=k(arguments.length,1),i=e.entries,r=T(t),a=n<2?void 0:arguments[1],o=void 0===a?a:T(a),u=0;ue.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=P(this).entries,i=x(t,arguments.length>1?arguments[1]:void 0),r=0;r1?vt(arguments[1]):{})}}),v(j)){var yt=function(t){return p(this,$),new j(t,arguments.length>1?vt(arguments[1]):{})};$.constructor=yt,yt.prototype=$,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:ft,getState:P}},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(7),o=n(328),s=n(69),u=n(517),c=r("URL");i({target:"URL",stat:!0,forced:!(u&&a((function(){c.canParse()})))},{canParse:function(t){var e=o(arguments.length,1),n=s(t),i=e<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new c(n,i)}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(3),r=n(8);i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},function(t,e,n){"use strict";n(519)},function(t,e,n){"use strict";var i=n(48),r=n(14),a=n(69),o=n(328),s=URLSearchParams,u=s.prototype,c=r(u.append),l=r(u.delete),h=r(u.forEach),f=r([].push),d=new s("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(u,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return l(this,t);var i=[];h(this,(function(t,e){f(i,{key:e,value:t})})),o(e,1);for(var r,s=a(t),u=a(n),d=0,g=0,p=!1,v=i.length;d0))return u;do{u.push(s=new Date(+n)),e(n,o),t(n)}while(s=e)for(;t(e),!n(e);)e.setTime(e-1)}.bind(this),function(t,r){if(a(this,i),t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}.bind(this))}.bind(this),n&&(c.count=function(e,i){return a(this,r),o.setTime(+e),s.setTime(+i),t(o),t(s),Math.floor(n(o,s))}.bind(this),c.every=function(t){var e=this;return a(this,r),t=Math.floor(t),isFinite(t)&&t>0?t>1?c.filter(i?function(n){return a(this,e),i(n)%t==0}.bind(this):function(n){return a(this,e),c.count(0,n)%t==0}.bind(this)):c:null}.bind(this)),c}var c=1e3,l=6e4,h=36e5,f=864e5,d=6048e5,g=2592e6,p=31536e6;function v(t){var e=this;return u(function(n){a(this,e),n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}.bind(this),function(t,n){a(this,e),t.setDate(t.getDate()+7*n)}.bind(this),function(t,n){return a(this,e),(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*l)/d}.bind(this))}var y=v(0),x=v(1),b=v(2),m=v(3),_=v(4),T=v(5),w=v(6);y.range,x.range,b.range,m.range,_.range,T.range,w.range;function A(t){var e=this;return u(function(n){a(this,e),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}.bind(this),function(t,n){a(this,e),t.setUTCDate(t.getUTCDate()+7*n)}.bind(this),function(t,n){return a(this,e),(n-t)/d}.bind(this))}var S=A(0),E=A(1),k=A(2),M=A(3),O=A(4),R=A(5),C=A(6),I=(S.range,E.range,k.range,M.range,O.range,R.range,C.range,void 0),L=u(function(t){return a(this,I),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){return a(this,I),t.setDate(t.getDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*l)/f}.bind(void 0),function(t){return a(this,I),t.getDate()-1}.bind(void 0)),P=(L.range,u(function(t){a(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t)/f}.bind(void 0),function(t){return a(this,I),t.getUTCDate()-1}.bind(void 0))),D=(P.range,u(function(t){a(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t)/f}.bind(void 0),function(t){return a(this,I),Math.floor(t/f)}.bind(void 0))),N=(D.range,void 0),F=u(function(t){a(this,N),t.setMonth(0,1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,N),t.setFullYear(t.getFullYear()+e)}.bind(void 0),function(t,e){return a(this,N),e.getFullYear()-t.getFullYear()}.bind(void 0),function(t){return a(this,N),t.getFullYear()}.bind(void 0));F.every=function(t){var e=this;return a(this,N),isFinite(t=Math.floor(t))&&t>0?u(function(n){a(this,e),n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}.bind(this),function(n,i){a(this,e),n.setFullYear(n.getFullYear()+i*t)}.bind(this)):null}.bind(void 0);F.range;var z=u(function(t){a(this,N),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,N),t.setUTCFullYear(t.getUTCFullYear()+e)}.bind(void 0),function(t,e){return a(this,N),e.getUTCFullYear()-t.getUTCFullYear()}.bind(void 0),function(t){return a(this,N),t.getUTCFullYear()}.bind(void 0));z.every=function(t){var e=this;return a(this,N),isFinite(t=Math.floor(t))&&t>0?u(function(n){a(this,e),n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}.bind(this),function(n,i){a(this,e),n.setUTCFullYear(n.getUTCFullYear()+i*t)}.bind(this)):null}.bind(void 0);z.range;function j(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function B(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var X,U,Y,V,G,H={"-":"",_:" ",0:"0"},W=/^\s*\d+/,q=/^%/,Z=/[\\^$*+?|[\]().{}]/g;function K(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a68?1900:2e3),n+i[0].length):-1}function ut(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ct(t,e,n){var i=W.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function lt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ht(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ft(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function dt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function gt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function pt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function vt(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function yt(t,e,n){var i=W.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function xt(t,e,n){var i=q.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function bt(t,e,n){var i=W.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function mt(t,e,n){var i=W.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _t(t,e){return K(t.getDate(),e,2)}function Tt(t,e){return K(t.getHours(),e,2)}function wt(t,e){return K(t.getHours()%12||12,e,2)}function At(t,e){return K(1+L.count(F(t),t),e,3)}function St(t,e){return K(t.getMilliseconds(),e,3)}function Et(t,e){return St(t,e)+"000"}function kt(t,e){return K(t.getMonth()+1,e,2)}function Mt(t,e){return K(t.getMinutes(),e,2)}function Ot(t,e){return K(t.getSeconds(),e,2)}function Rt(t){var e=t.getDay();return 0===e?7:e}function Ct(t,e){return K(y.count(F(t)-1,t),e,2)}function It(t){var e=t.getDay();return e>=4||0===e?_(t):_.ceil(t)}function Lt(t,e){return t=It(t),K(_.count(F(t),t)+(4===F(t).getDay()),e,2)}function Pt(t){return t.getDay()}function Dt(t,e){return K(x.count(F(t)-1,t),e,2)}function Nt(t,e){return K(t.getFullYear()%100,e,2)}function Ft(t,e){return K((t=It(t)).getFullYear()%100,e,2)}function zt(t,e){return K(t.getFullYear()%1e4,e,4)}function jt(t,e){var n=t.getDay();return K((t=n>=4||0===n?_(t):_.ceil(t)).getFullYear()%1e4,e,4)}function Bt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+K(e/60|0,"0",2)+K(e%60,"0",2)}function $t(t,e){return K(t.getUTCDate(),e,2)}function Xt(t,e){return K(t.getUTCHours(),e,2)}function Ut(t,e){return K(t.getUTCHours()%12||12,e,2)}function Yt(t,e){return K(1+P.count(z(t),t),e,3)}function Vt(t,e){return K(t.getUTCMilliseconds(),e,3)}function Gt(t,e){return Vt(t,e)+"000"}function Ht(t,e){return K(t.getUTCMonth()+1,e,2)}function Wt(t,e){return K(t.getUTCMinutes(),e,2)}function qt(t,e){return K(t.getUTCSeconds(),e,2)}function Zt(t){var e=t.getUTCDay();return 0===e?7:e}function Kt(t,e){return K(S.count(z(t)-1,t),e,2)}function Jt(t){var e=t.getUTCDay();return e>=4||0===e?O(t):O.ceil(t)}function Qt(t,e){return t=Jt(t),K(O.count(z(t),t)+(4===z(t).getUTCDay()),e,2)}function te(t){return t.getUTCDay()}function ee(t,e){return K(E.count(z(t)-1,t),e,2)}function ne(t,e){return K(t.getUTCFullYear()%100,e,2)}function ie(t,e){return K((t=Jt(t)).getUTCFullYear()%100,e,2)}function re(t,e){return K(t.getUTCFullYear()%1e4,e,4)}function ae(t,e){var n=t.getUTCDay();return K((t=n>=4||0===n?O(t):O.ceil(t)).getUTCFullYear()%1e4,e,4)}function oe(){return"+0000"}function se(){return"%"}function ue(t){return+t}function ce(t){return Math.floor(+t/1e3)}function le(){}function he(t){return null==t?le:function(){return this.querySelector(t)}}function fe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function de(){return[]}function ge(t){return null==t?de:function(){return this.querySelectorAll(t)}}function pe(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}X=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=Q(r),l=tt(r),h=Q(a),f=tt(a),d=Q(o),g=tt(o),p=Q(s),v=tt(s),y=Q(u),b=tt(u),m={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:_t,e:_t,f:Et,g:Ft,G:jt,H:Tt,I:wt,j:At,L:St,m:kt,M:Mt,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ue,s:ce,S:Ot,u:Rt,U:Ct,V:Lt,w:Pt,W:Dt,x:null,X:null,y:Nt,Y:zt,Z:Bt,"%":se},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:$t,e:$t,f:Gt,g:ie,G:ae,H:Xt,I:Ut,j:Yt,L:Vt,m:Ht,M:Wt,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ue,s:ce,S:qt,u:Zt,U:Kt,V:Qt,w:te,W:ee,x:null,X:null,y:ne,Y:re,Z:oe,"%":se},T={a:function(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=g.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=b.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:ht,e:ht,f:yt,g:st,G:ot,H:dt,I:dt,j:ft,L:vt,m:lt,M:gt,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=l.get(i[0].toLowerCase()),n+i[0].length):-1},q:ct,Q:bt,s:mt,S:pt,u:nt,U:it,V:rt,w:et,W:at,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:st,Y:ot,Z:ut,"%":xt};function w(t,e){return function(n){var i,r,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=B($(a.y,0,1))).getUTCDay(),i=r>4||0===r?E.ceil(i):E(i),i=P.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=j($(a.y,0,1))).getDay(),i=r>4||0===r?x.ceil(i):x(i),i=L.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?B($(a.y,0,1)).getUTCDay():j($(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,B(a)):j(a)}}function S(t,e,n,i){for(var r,a,o=0,s=e.length,u=n.length;o=u)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(a=T[r in H?e.charAt(o++):r])||(i=a(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return m.x=w(n,m),m.X=w(i,m),m.c=w(e,m),_.x=w(n,_),_.X=w(i,_),_.c=w(e,_),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),U=X.format,Y=X.parse,V=X.utcFormat,G=X.utcParse;var ye=Array.prototype.find;function xe(){return this.firstElementChild}var be=Array.prototype.filter;function me(){return Array.from(this.children)}function _e(t){return Array(t.length)}function Te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function we(t,e,n,i,r,a){for(var o,s=0,u=e.length,c=a.length;se?1:t>=e?0:NaN}function Me(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Oe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ce.hasOwnProperty(e)?{space:Ce[e],local:t}:t}function Le(t){return function(){this.removeAttribute(t)}}function Pe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function De(t,e){return function(){this.setAttribute(t,e)}}function Ne(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Be(t){return function(){this.style.removeProperty(t)}}function $e(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Xe(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function Ye(t){return function(){delete this[t]}}function Ve(t,e){return function(){this[t]=e}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function He(t){return t.trim().split(/^|\s+/)}function We(t){return t.classList||new qe(t)}function qe(t){this._node=t,this._names=He(t.getAttribute("class")||"")}function Ze(t,e){for(var n=We(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Tn,wn=n(527),An=wn.mark(Sn);function Sn(){var t,e,n,i,r,a,o;return wn.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e=m&&(m=b+1);!(x=v[m])&&++m=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ke);for(var n=this._groups,i=n.length,r=Array(i),a=0;a1?this.each((null==e?Be:"function"==typeof e?Xe:$e)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ye:"function"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=He(t+"");if(arguments.length<2){for(var i=We(this.node()),r=-1,a=n.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?xn:yn,i=0;i=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,i,r=Array(n),a=0;a>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_i(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_i(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=li.exec(t))?new wi(e[1],e[2],e[3],1):(e=hi.exec(t))?new wi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fi.exec(t))?_i(e[1],e[2],e[3],e[4]):(e=di.exec(t))?_i(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gi.exec(t))?Oi(e[1],e[2]/100,e[3]/100,1):(e=pi.exec(t))?Oi(e[1],e[2]/100,e[3]/100,e[4]):vi.hasOwnProperty(t)?mi(vi[t]):"transparent"===t?new wi(NaN,NaN,NaN,0):null}function mi(t){return new wi(t>>16&255,t>>8&255,255&t,1)}function _i(t,e,n,i){return i<=0&&(t=e=n=NaN),new wi(t,e,n,i)}function Ti(t,e,n,i){return 1===arguments.length?((r=t)instanceof oi||(r=bi(r)),r?new wi((r=r.rgb()).r,r.g,r.b,r.opacity):new wi):new wi(t,e,n,null==i?1:i);var r}function wi(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Ai(){return"#"+Mi(this.r)+Mi(this.g)+Mi(this.b)}function Si(){var t=Ei(this.opacity);return(1===t?"rgb(":"rgba(")+ki(this.r)+", "+ki(this.g)+", "+ki(this.b)+(1===t?")":", "+t+")")}function Ei(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ki(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mi(t){return((t=ki(t))<16?"0":"")+t.toString(16)}function Oi(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,i)}function Ri(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof oi||(t=bi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,u=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n0&&u<1?0:o,new Ci(o,s,u,t.opacity)}function Ci(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ii(t){return(t=(t||0)%360)<0?t+360:t}function Li(t){return Math.max(0,Math.min(1,t||0))}function Pi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Di(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}ri(oi,bi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ri(this).formatHsl()},formatRgb:xi,toString:xi}),ri(wi,Ti,ai(oi,{brighter:function(t){return t=null==t?ui:Math.pow(ui,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?si:Math.pow(si,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new wi(ki(this.r),ki(this.g),ki(this.b),Ei(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ai,formatHex:Ai,formatHex8:function(){return"#"+Mi(this.r)+Mi(this.g)+Mi(this.b)+Mi(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:Si,toString:Si})),ri(Ci,(function(t,e,n,i){return 1===arguments.length?Ri(t):new Ci(t,e,n,null==i?1:i)}),ai(oi,{brighter:function(t){return t=null==t?ui:Math.pow(ui,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?si:Math.pow(si,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new wi(Pi(t>=240?t-240:t+120,r,i),Pi(t,r,i),Pi(t<120?t+240:t-120,r,i),this.opacity)},clamp:function(){return new Ci(Ii(this.h),Li(this.s),Li(this.l),Ei(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=Ei(this.opacity);return(1===t?"hsl(":"hsla(")+Ii(this.h)+", "+100*Li(this.s)+"%, "+100*Li(this.l)+"%"+(1===t?")":", "+t+")")}}));var Ni=function(t){var e=this;return a(this,undefined),function(){return a(this,e),t}.bind(this)}.bind(void 0);function Fi(t,e){return function(n){return t+n*e}}function zi(t){return 1==(t=+t)?ji:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ni(isNaN(e)?n:e)}}function ji(t,e){var n=e-t;return n?Fi(t,n):Ni(isNaN(t)?e:t)}var Bi=function t(e){var n=zi(e);function i(t,e){var i=n((t=Ti(t)).r,(e=Ti(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),o=ji(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function $i(t){return function(e){var n,i,r=e.length,a=Array(r),o=Array(r),s=Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=ia&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Gi(n,i)})),a=qi.lastIndex;return a=0&&e._call.call(void 0,t),e=e._next;--tr}()}finally{tr=0,function(){var t,e,n=Ji,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ji=e);Qi=t,pr(i)}(),ar=0}}function gr(){var t=sr.now(),e=t-rr;e>ir&&(or-=e,rr=t)}function pr(t){tr||(er&&(er=clearTimeout(er)),t-ar>24?(t<1/0&&(er=setTimeout(dr,t-sr.now()-or)),nr&&(nr=clearInterval(nr))):(nr||(rr=sr.now(),nr=setInterval(gr,ir)),tr=1,ur(dr)))}function vr(t,e,n){var i=this,r=new hr;return e=null==e?0:+e,r.restart(function(n){a(this,i),r.stop(),t(n+e)}.bind(this),e,n),r}hr.prototype=fr.prototype={constructor:hr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cr():+n)+(null==e?0:+e),this._next||Qi===this||(Qi?Qi._next=this:Ji=this,Qi=this),this._call=t,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var yr=Kn("start","end","cancel","interrupt"),xr=[],br=0,mr=1,_r=2,Tr=3,wr=4,Ar=5,Sr=6;function Er(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(u){var c,l,h,f;if(n.state!==mr)return s();for(c in r)if((f=r[c]).name===n.name){if(f.state===Tr)return vr(a);f.state===wr?(f.state=Sr,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[c]):+cbr)throw new Error("too late; already scheduled");return n}function Mr(t,e){var n=Or(t,e);if(n.state>Tr)throw new Error("too late; already running");return n}function Or(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rr(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>_r&&n.state180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Gi(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Gi(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,o.skewX,s,u),function(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Gi(t,n)},{i:s-2,x:Gi(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,i=u.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?kr:Mr;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}(n,t,e))},attr:function(t,e){var n=Ie(t),i="transform"===n?Fr:$r;return this.attrTween(t,"function"==typeof e?(n.local?Hr:Gr)(n,i,Br(this,"attr."+t,e)):null==e?(n.local?Ur:Xr)(n):(n.local?Vr:Yr)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Ie(t);return this.tween(n,(i.local?Wr:qr)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Nr:$r;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=Ue(this,t),o=(this.style.removeProperty(t),Ue(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}(t,i)).on("end.style."+t,na(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var o=Ue(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ue(this,t)),o===u?null:o===i&&u===r?a:(r=u,a=e(i=o,s))}}(t,i,Br(this,"style."+t,e))).each(function(t,e){var n,i,r,a,o="style."+e;return function(){var s=Mr(this,t),u=s.on,c=null==s.value[o]?a||(a=na(e)):void 0;u===n&&r===c||(i=(n=u).copy()).on("end."+o,r=c),s.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r;return function(){var a=Ue(this,t);return a===n+""?null:a===i?r:r=e(i=a,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function a(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,a,n)),i}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Br(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Or(this.node(),n).tween,a=0,o=r.length;a=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ga(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n1&&X(n)}else s=k[0][0],c=k[0][1],d=k[1][0],p=k[1][1];u=s,f=c,g=d,v=p;var z=Rn(m).attr("pointer-events","none"),j=z.selectAll(".overlay").attr("cursor",Ea[_]);if(n.touches)N.moved=$,N.ended=U;else{var B=Rn(n.view).on("mousemove.brush",$,!0).on("mouseup.brush",U,!0);o&&B.on("keydown.brush",(function(t){switch(t.keyCode){case 16:P=w&&A;break;case 18:T===ya&&(w&&(d=g-I*w,s=u+I*w),A&&(p=v-L*A,c=f+L*A),T=xa,X(t));break;case 32:T!==ya&&T!==xa||(w<0?d=g-I:w>0&&(s=u-I),A<0?p=v-L:A>0&&(c=f-L),T=va,j.attr("cursor",Ea.selection),X(t));break;default:return}fa(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:P&&(x=b=P=!1,X(t));break;case 18:T===xa&&(w<0?d=g:w>0&&(s=u),A<0?p=v:A>0&&(c=f),T=ya,X(t));break;case 32:T===va&&(t.altKey?(w&&(d=g-I*w,s=u+I*w),A&&(p=v-L*A,c=f+L*A),T=xa):(w<0?d=g:w>0&&(s=u),A<0?p=v:A>0&&(c=f),T=ya),j.attr("cursor",Ea[_]),X(t));break;default:return}fa(t)}),!0),ni(n.view)}l.call(m),N.start(n,T.name)}function $(t){for(var e,n=da(t.changedTouches||[t]);!(e=n()).done;)for(var i,r=e.value,a=da(D);!(i=a()).done;){var o=i.value;o.identifier===r.identifier&&(o.cur=Vn(r,m))}if(P&&!x&&!b&&1===D.length){var s=D[0];ba(s.cur[0]-s[0])>ba(s.cur[1]-s[1])?b=!0:x=!0}for(var u,c=da(D);!(u=c()).done;){var l=u.value;l.cur&&(l[0]=l.cur[0],l[1]=l.cur[1])}y=!0,fa(t),X(t)}function X(t){var e,n=D[0],i=n.point0;switch(I=n[0]-i[0],L=n[1]-i[1],T){case va:case pa:w&&(I=ma(M-s,_a(R-d,I)),u=s+I,g=d+I),A&&(L=ma(O-c,_a(C-p,L)),f=c+L,v=p+L);break;case ya:D[1]?(w&&(u=ma(M,_a(R,D[0][0])),g=ma(M,_a(R,D[1][0])),w=1),A&&(f=ma(O,_a(C,D[0][1])),v=ma(O,_a(C,D[1][1])),A=1)):(w<0?(I=ma(M-s,_a(R-s,I)),u=s+I,g=d):w>0&&(I=ma(M-d,_a(R-d,I)),u=s,g=d+I),A<0?(L=ma(O-c,_a(C-c,L)),f=c+L,v=p):A>0&&(L=ma(O-p,_a(C-p,L)),f=c,v=p+L));break;case xa:w&&(u=ma(M,_a(R,s-I*w)),g=ma(M,_a(R,d+I*w))),A&&(f=ma(O,_a(C,c-L*A)),v=ma(O,_a(C,p+L*A)))}g2?i-2:0),a=2;a/g,">"):t}function oo(t,e,n,i){var r=this;if(void 0===n&&(n=[-1,1]),void 0===i&&(i=!1),t&&Ua(e))if(-1===e.indexOf("\n"))t.text(e);else{var o=[t.text(),e].map(function(t){return a(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(o[0]!==o[1]){var s=e.split("\n"),u=i?s.length-1:1;t.html(""),s.forEach(function(e,i){a(this,r),t.append("tspan").attr("x",0).attr("dy",(0===i?n[0]*u:n[1])+"em").text(e)}.bind(this))}}}function so(t){var e=t.getBBox(),n=e.x,i=e.y,r=e.width,a=e.height;return[{x:n,y:i+a},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+a}]}function uo(t,e){var n,i=Vn(t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0])||t,e),r=this;return i.map(function(t){return a(this,r),isNaN(t)?0:t}.bind(this))}function co(t){var e,n=t.event,i=t.$el,r=i.subchart.main||i.main;return n&&"brush"===n.type?e=n.selection:r&&(e=r.select(".bb-brush").node())&&(e=Na(e)),e}function lo(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function ho(t,e,n){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===n&&(n=1e4);var i=In.crypto||In.msCrypto,r=i?e+i.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?r+"":r}function fo(t,e,n,i,r){if(n>i)return-1;var a=Math.floor((n+i)/2),o=t[a],s=o.x,u=o.w,c=void 0===u?0:u;return r&&(s=t[a].y,c=t[a].h),e>=s&&e<=s+c?a:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},ps={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},vs=void 0,ys={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){a(this,vs)}.bind(void 0),tooltip_onhide:function(){a(this,vs)}.bind(void 0),tooltip_onshown:function(){a(this,vs)}.bind(void 0),tooltip_onhidden:function(){a(this,vs)}.bind(void 0),tooltip_order:null};function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function bs(t){for(var e,n=1;n9999?"+"+$s(e,6):$s(e,4))+"-"+$s(t.getUTCMonth()+1,2)+"-"+$s(t.getUTCDate(),2)+(a?"T"+$s(n,2)+":"+$s(i,2)+":"+$s(r,2)+"."+$s(a,3)+"Z":r?"T"+$s(n,2)+":"+$s(i,2)+":"+$s(r,2)+"Z":i||n?"T"+$s(n,2)+":"+$s(i,2)+"Z":"")}function Us(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],a=t.length,o=0,s=0,u=a<=0,c=!1;function l(){if(u)return zs;if(c)return c=!1,Fs;var e,i,r=o;if(34===t.charCodeAt(r)){for(;o++=a?u=!0:10===(i=t.charCodeAt(o++))?c=!0:13===i&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,e-1).replace(/""/g,'"')}for(;o0){if(void 0===e[r-1]&&(e[r-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+n+", "+r+")!");e[r-1][i]=t}}))})),e}function Ks(t){var e=t[0],n=[];return t.forEach((function(t,i){if(i>0){var r={};t.forEach((function(t,n){if(void 0===t)throw new Error("Source data is missing a component at ("+i+", "+n+")!");r[e[n]]=t})),n.push(r)}})),n}function Js(t,e){var n,i,r=[];if(Array.isArray(t)){n=e.x?e.value.concat(e.x):e.value,r.push(n),t.forEach((function(t){var e=n.map((function(e){var n=function(t,e){if(void 0!==t[e])return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=t;return n.some((function(t){return!(i=i&&t in i?i[t]:void 0)})),i}(t,e);return void 0===n&&(n=null),n}));r.push(e)})),i=Ks(r)}else Object.keys(t).forEach((function(e){var n=t[e].concat();null==n.unshift||n.unshift(e),r.push(n)})),i=Zs(r);return i}function Qs(t,e){var n,i=this,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach(function(t){a(this,i),n[0][t]=null}.bind(this))):n=t.parse(e),n}function tu(t){return Qs({rows:Gs,parse:Vs},t)}function eu(t){return Qs({rows:qs,parse:Ws},t)}function nu(t,e){var n=t||(null==e?void 0:e.data_keys);return null!=n&&n.x&&(e.data_x=n.x),n}var iu={convertData:function(t,e){var n=this,i=this.config,r=i.boost_useWorker,o=t;if(t.bindto&&(o={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){a(this,n);var i="data_"+e;i in t&&(o[e]=t[i])}.bind(this))),o.url&&e)!function(t,e,n,i,r){void 0===e&&(e="csv");var a=new XMLHttpRequest,o={csv:tu,tsv:eu,json:Js};a.open("GET",t),n&&Object.keys(n).forEach((function(t){a.setRequestHeader(t,n[t])})),a.onreadystatechange=function(){if(4===a.readyState){if(200!==a.status)throw new Error(t+": Something went wrong loading!");var n=a.responseText;n&&r.call(this,o[e]("json"===e?JSON.parse(n):n,i))}},a.send()}(o.url,o.mimeType,o.headers,nu(o.keys,i),e);else if(o.json)Ns(r,Js,e,[Zs,Ks])(o.json,nu(o.keys,i));else if(o.rows)Ns(r,Ks,e)(o.rows);else if(o.columns)Ns(r,Zs,e)(o.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this,i=this,r=i.axis,o=i.config,s=i.state,u=o.data_type,c=!1,l=!1,h=!1;r&&(c=r.isCategorized(),l=r.isTimeSeries(),h=r.isCustomX());var f,d=Object.keys(t[0]||{}),g=d.length?d.filter(i.isNotX,i):[],p=d.length?d.filter(i.isX,i):[];g.forEach(function(r){var s=this;a(this,n);var u=this.getXKey(r);h||l?p.indexOf(u)>=0?f=(e&&i.data.xs[r]||[]).concat(t.map(function(t){return a(this,s),t[u]}.bind(this)).filter($a).map(function(t,e){return a(this,s),i.generateTargetX(t,r,e)}.bind(this))):o.data_x?f=this.getOtherTargetXs():Qa(o.data_xs)&&(f=i.getXValuesOfXKey(u,i.data.targets)):f=t.map(function(t,e){return a(this,s),e}.bind(this)),f&&(this.data.xs[r]=f)}.bind(this)),g.forEach(function(t){if(a(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));var v=g.map(function(e,r){var u=this;a(this,n);var l=o.data_idConverter.bind(i.api)(e),f=i.getXKey(e),d=h&&c,g=d&&t.map(function(t){return a(this,u),t.x}.bind(this)).every(function(t){return a(this,u),o.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===f&&p?i.api.data.values(e).length:0;return{id:l,id_org:e,values:t.map(function(t,n){a(this,u);var c,h=t[f],y=t[e];return y=null===y||isNaN(y)||eo(y)?to(y)||eo(y)?y:null:+y,!d&&!s.hasRadar||0!==r||Va(h)?c=i.generateTargetX(h,e,v+n):(g||0!==r||0!==n||p||(o.axis_x_categories=[]),-1===(c=o.axis_x_categories.indexOf(h))&&(c=o.axis_x_categories.length,o.axis_x_categories.push(h))),(Va(y)||i.data.xs[e].length<=n)&&(c=void 0),{x:c,value:y,id:l,index:-1}}.bind(this)).filter(function(t){return a(this,u),Ga(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;a(this,n),o.data_xSort&&(t.values=t.values.sort(function(t,e){return a(this,r),(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return a(this,r),t.index=e}.bind(this)),null==(e=i.data.xs[t.id])||e.sort(function(t,e){return a(this,r),t-e}.bind(this))}.bind(this)),s.hasNegativeValue=i.hasNegativeValueInTargets(v),s.hasPositiveValue=i.hasPositiveValueInTargets(v),u&&i.isValidChartType(u)){var y=i.mapToIds(v).filter(function(t){return a(this,n),!(t in o.data_types)||!i.isValidChartType(o.data_types[t])}.bind(this));i.setTargetType(y,u)}return v.forEach(function(t){return a(this,n),i.cache.add(t.id_org,t,!0)}.bind(this)),v}},ru={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,i=Qa(e.data_xs)&&function(t,e){var n=this,i=!1;return Object.keys(t).forEach(function(r){return a(this,n),t[r]===e&&(i=!0)}.bind(this)),i}(e.data_xs,t);return n||i},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this,n=this.config.data_groups;return t?n.some(function(n){return a(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:Qa(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,i=this,r=this;return(e&&Qa(e)?r.mapToIds(e):[]).forEach(function(e){a(this,i),r.getXKey(e)===t&&(n=r.data.xs[e])}.bind(this)),n},getIndexByX:function(t,e){return e?e.indexOf(Ua(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&$a(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t1?e=To(bo(e=e.map(function(e){return a(this,t),e.values}.bind(this)).reduce(function(e,n){return a(this,t),e.concat(n)}.bind(this)).map(function(e){return a(this,t),e.x}.bind(this)))).map(function(e,n,r){return a(this,t),{x:e,index:i?r.length-n-1:n}}.bind(this)):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return a(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?to(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var n,i=this.mapToIds(t),r=0;n=i[r];r++)if(n===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this,n=this;return(t||n.data.targets).filter(function(t){return a(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this,n=this.axis,i=[];return null!=t&&t.length&&(i=bo(mo(t.map(function(t){var n=this;return a(this,e),t.values.map(function(t){return a(this,n),+t.x}.bind(this))}.bind(this)))),i=null!=n&&n.isTimeSeries()?i.map(function(t){return a(this,e),new Date(+t)}.bind(this)):i.map(Number)),To(i)},addTargetIds:function(t,e){var n=this,i=this.state;(to(e)?e:[e]).forEach(function(e){a(this,n),i[t].indexOf(e)<0&&i[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this,i=this.state;(to(e)?e:[e]).forEach(function(e){a(this,n);var r=i[t].indexOf(e);r>=0&&i[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=this,i=n.state.hasAxis,r={},o=n.isMultipleX(),s=o?n.mapTargetsToUniqueXs(t).map(function(t){return a(this,e),Ua(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var u=this;a(this,e);var c=[];t.values.filter(function(t){var e=t.value;return a(this,u),$a(e)||null===e}.bind(this)).forEach(function(t){a(this,u);var e=t.value;null!==e&&n.isCandlestickType(t)&&(e=to(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),to(e)?c.push.apply(c,e):eo(e)&&"high"in e?c.push.apply(c,Object.values(e)):n.isBubbleZType(t)?c.push(i&&n.getBubbleZData(e,"y")):o?c[n.getIndexByX(t.x,s)]=e:c.push(e)}.bind(this)),r[t.id]=c}.bind(this)),r},checkValueInTargets:function(t,e){for(var n,i=Object.keys(t),r=0;r1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return a(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return a(this,e),t>0}.bind(this))},orderTargets:function(t){var e=[].concat(t),n=this.getSortCompareFn();return n&&e.sort(n),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);var n,i=this.config.data_order,r=/asc/i.test(i),o=/desc/i.test(i);if(r||o){var s=function(t,n){return a(this,e),t+Math.abs(n.value)}.bind(this);n=function(n,i){a(this,e);var o="values"in n?n.values.reduce(s,0):n.value,u="values"in i?i.values.reduce(s,0):i.value;return t?r?o-u:u-o:r?u-o:o-u}.bind(this)}else Xa(i)&&(n=i.bind(this.api));return n||null},filterByX:function(t,e){var n=this;return mo(t.map(function(t){return a(this,n),t.values}.bind(this))).filter(function(t){return a(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return a(this,e),$a(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var i=this;return a(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return a(this,i),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){var t=this.config.data_labels;return Ha(t)&&t||Ka(t)&&Qa(t)},getDataIndexFromEvent:function(t){var e,n=this.config,i=this.state,r=i.hasRadar,a=i.inputType,o=i.eventReceiver,s=o.coords,u=o.rect;if(r){var c=t.target;/tspan/i.test(c.tagName)&&(c=c.parentNode);var l=Rn(c).datum();e=l&&1===Object.keys(l).length?l.index:void 0}else{var h=n.axis_rotated,f="touch"===a&&t.changedTouches?t.changedTouches[0]:t;e=fo(s,h?f.clientY-u.top:f.clientX-u.left,0,s.length-1,h)}return e},getDataLabelLength:function(t,e,n){var i=this,r=this,o=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return a(this,i),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){o[e]=1.3*this.getBoundingClientRect()[n]})).remove(),o},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var n,i=t[e].x,r=[];for(n=e-1;n>=0&&i===t[n].x;n--)r.push(t[n]);for(n=e;n=0&&i?i[r]:void 0}return i?i[e]:i},setRatioForGroupedData:function(t){var e=this,n=this;if(n.config.data_groups.length&&t.some(function(t){return a(this,e),n.isGrouped(t.id)}.bind(this))){var i=function(t){return a(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){a(this,e),"values"in t?t.values.forEach(i):i(t)}.bind(this))}},getRatio:function(t,e,n){var i=this;void 0===n&&(n=!1);var r=this,o=r.config,s=r.state,u=r.api,c=0;if(e&&u.data.shown().length)if(c=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())c=e.value/r.getTotalDataSum(!0);else{var l=o.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),h=r.hasType("gauge")?l:2*Math.PI;c=(e.endAngle-e.startAngle)/h}else if("index"===t){var f=u.data.values.bind(u),d=this.getTotalPerIndex();if(s.hiddenTargetIds.length){var g=f(s.hiddenTargetIds,!1);g.length&&(g=g.reduce(function(t,e){var n=this;return a(this,i),t.map(function(t,i){return a(this,n),(Ya(t)?t:0)+e[i]}.bind(this))}.bind(this)),d=d.map(function(t,e){return a(this,i),t-g[e]}.bind(this)))}var p=d[e.index];e.ratio=Ya(e.value)&&d&&p?e.value/p:0,c=e.ratio}else if("radar"===t)c=parseFloat(Math.max(e.value,0)+"")/s.current.dataMax*o.radar_size_ratio;else if("bar"===t){var v=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return a(this,i),e-t}.bind(this));c=0===v?0:Math.abs(e.value)/v}else"treemap"===t&&(c/=r.getTotalDataSum(!0));return n&&c?100*c:c},updateDataIndexByX:function(t){var e=this,n=t.reduce(function(t,n,i){return a(this,e),t[+n.x]=i,t}.bind(this),{});this.data.targets.forEach(function(t){var i=this;a(this,e),t.values.forEach(function(t,e){a(this,i);var r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(eo(t.value)&&("z"in t.value||"y"in t.value)||to(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this,n=t.value;return this.isBarType(t)&&to(n)&&n.length>=2&&n.every(function(t){return a(this,e),Ya(t)}.bind(this))},getDataById:function(t){var e,n=this.cache.get(t)||this.api.data(t);return null!=(e=null==n?void 0:n[0])?e:n}};function au(t,e){void 0===e&&(e=!1);var n=this.api;e&&this.api.flush(!0),null==t||t.call(n)}var ou={load:function(t,e){var n=this,i=this,r=i.data,o=e.append,s=t;s&&(e.filter&&(s=s.filter(e.filter)),(e.type||e.types)&&s.forEach(function(t){var r;a(this,n);var o=(null==(r=e.types)?void 0:r[t.id])||e.type;i.setTargetType(t.id,o)}.bind(this)),r.targets.forEach(function(t){a(this,n);for(var e=0;eh}u.mouse("drag",i)}function p(t){Rn(t.view).on("mousemove.drag mouseup.drag",null),ii(t.view,n),ei(t),u.mouse("end",t)}function v(t,e){if(r.call(this,t,e)){var n,i,o=t.changedTouches,s=a.call(this,t,e),u=o.length;for(n=0;n=0?as.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?as.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,n){void 0===e&&(e=""),void 0===n&&(n="");var i=this.getTargetSelectorSuffix(t);return e+"."+(as.target+i)+" "+n+", "+e+"."+(as.circles+i)+" "+n},selectorTargets:function(t,e){var n=this,i=t||[];return i.length?i.map(function(t){return a(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(as.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return a(this,e),this.selectorLegend(t)}.bind(this)):null}};function vu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yu(t,e){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yu(t,e)}function xu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yu(t,e)}function bu(t){return bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bu(t)}function mu(t,e,n){return mu=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&yu(r,n.prototype),r},mu.apply(null,arguments)}function _u(t){var e="function"==typeof Map?new Map:void 0;return _u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return mu(t,arguments,bu(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),yu(i,t)},_u(t)}function Tu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n-1&&(r=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return a(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),i[n]=r)}return r}(n.chart)||Du).range(),c=u;if(Xa(i.color_tiles)){var l=i.color_tiles.bind(e.api)(),h=u.map(function(n,i){a(this,t);var r=n.replace(/[#\(\)\s,]/g,""),o=e.state.datetimeId+"-pattern-"+r+"-"+i;return Pu(l[i%l.length],n,o)}.bind(this));u=h.map(function(e){return a(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=h}return function(t){var n,a,l=t.id||(null==(n=t.data)?void 0:n.id)||t,h=e.isTypeOf(l,["line","spline","step"])||!i.data_types[l];return Xa(r[l])?a=r[l].bind(e.api)(t):r[l]?a=r[l]:(s.indexOf(l)<0&&s.push(l),a=h?c[s.indexOf(l)%c.length]:u[s.indexOf(l)%u.length],r[l]=a),Xa(o)?o.bind(e.api)(a,t):a}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,a=n.values&&n.values.length?n.values:[];return Qa(n)?function(t){for(var n=i?t:100*t/r,o=e[e.length-1],s=0,u=a.length;s')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this,e=this,n=e.config,i=e.data.targets,r=e.state.datetimeId,o=e.$el.defs;i.forEach(function(i){var s=this;a(this,t);var u=r+"-gradient"+e.getTargetSelectorSuffix(i.id),c=e.isAreaType(i)?"area":e.isBarType(i)&&"bar",l=n.axis_rotated;if(c&&o.select("#"+u).empty()){var h=e.color(i),f=n[c+"_linearGradient"],d=f.x,g=void 0===d?l?[1,0]:[0,0]:d,p=f.y,v=void 0===p?l?[0,0]:[0,1]:p,y=f.stops,x=void 0===y?[[0,h,1],[1,h,0]]:y,b=o.append("linearGradient").attr("id",""+u).attr("x1",g[0]).attr("x2",g[1]).attr("y1",v[0]).attr("y2",v[1]);x.forEach(function(t){a(this,s);var n=Xa(t[1])?t[1].bind(e.api)(i.id):t[1];b.append("stop").attr("offset",t[0]).attr("stop-color",n||h).attr("stop-opacity",t[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this,i=this,r=i.config,o=i.$el.main,s=r.color_onover,u=t?s:i.color;eo(u)?u=function(t){var e=t.id;return a(this,n),e in s?s[e]:i.color(e)}.bind(this):Ua(u)?u=function(){return a(this,n),s}.bind(this):Xa(s)&&(u=u.bind(i.api)),o.selectAll(eo(e)?"."+Po.arc+i.getTargetSelectorSuffix(e.id):"."+Qo.shape+"-"+e).style("fill",u)}},Fu={getYDomainMinMax:function(t,e){var n=this,i=this,r=i.axis,o=i.config,s="min"===e,u=o.data_groups,c=i.mapToIds(t),l=i.getValuesAsIdKeyed(t);if(u.length>0){var h=i["has"+(s?"Negative":"Positive")+"ValueInTargets"](t);u.forEach(function(t){var e=this;a(this,n);var i=t.filter(function(t){return a(this,e),c.indexOf(t)>=0}.bind(this));if(i.length){var o=i[0],u=r.getId(o);h&&l[o]&&(l[o]=l[o].map(function(t){return a(this,e),(s?t<0:t>0)?t:0}.bind(this))),i.filter(function(t,n){return a(this,e),n>0}.bind(this)).forEach(function(t){var n=this;if(a(this,e),l[t]){var i=r.getId(t);l[t].forEach(function(t,e){a(this,n);var r=+t;i!==u||h&&(s?r>0:r<0)||(l[o][e]+=r)}.bind(this))}}.bind(this))}}.bind(this))}return wo(e,Object.keys(l).map(function(t){return a(this,n),wo(e,l[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this,n=this;return n.state.hiddenTargetIds.some(function(i){return a(this,e),n.axis.getId(i)===t}.bind(this))},getYDomain:function(t,e,n){var i=this,r=this,o=r.axis,s=r.config,u=r.scale,c="axis_"+e;if(r.isStackNormalized())return[0,100];var l=(null==u?void 0:u[e])&&"log"===u[e].type,h=t.filter(function(t){return a(this,i),o.getId(t.id)===e}.bind(this)),f=n?r.filterByXDomain(h,n):h;if(0===f.length)return r.isHiddenTargetWithYDomain(e)?u[e].domain():"y2"===e?u.y.domain():r.getYDomain(t,"y2",n);var d=s[c+"_min"],g=s[c+"_max"],p=s[c+"_center"],v=s[c+"_inverted"],y=r.hasDataLabel()&&s.axis_rotated,x=r.hasDataLabel()&&!s.axis_rotated,b=r.getYDomainMinMax(f,"min"),m=r.getYDomainMinMax(f,"max"),_=[jn.BAR,jn.BUBBLE,jn.SCATTER].concat($n.Line).some(function(t){a(this,i);var e=t.indexOf("area")>-1?"area":t;return r.hasType(t,f,!0)&&s[e+"_zerobased"]}.bind(this));b=$a(d)?d:$a(g)?b<=g?b:g-10:b,m=$a(g)?g:$a(d)?d<=m?m:d+10:m,isNaN(b)&&(b=0),isNaN(m)&&(m=b),b===m&&(b<0?m=0:b=0);var T=b>=0&&m>=0,w=b<=0&&m<=0;($a(d)&&T||$a(g)&&w)&&(_=!1),_&&(T&&(b=0),w&&(m=0));var A=Math.abs(m-b),S={top:.1*A,bottom:.1*A};if(Ga(p)){var E=Math.max(Math.abs(b),Math.abs(m));m=p+E,b=p-E}if(y){var k=Za(u.y.range()),M=r.getDataLabelLength(b,m,"width").map(function(t){return a(this,i),t/k}.bind(this));["bottom","top"].forEach(function(t,e){a(this,i),S[t]+=A*(M[e]/(1-M[0]-M[1]))}.bind(this))}else if(x){var O=r.getDataLabelLength(b,m,"height");["bottom","top"].forEach(function(t,e){a(this,i),S[t]+=r.convertPixelToScale("y",O[e],A)}.bind(this))}S=r.getResettedPadding(S);var R=s[c+"_padding"];Qa(R)&&["bottom","top"].forEach(function(t){a(this,i),S[t]=o.getPadding(R,t,S[t],A)}.bind(this)),_&&(T&&(S.bottom=b),w&&(S.top=-m));var C=l?[b,m].map(function(t){return a(this,i),t<0?0:t}.bind(this)):[b-S.bottom,m+S.top];return v?C.reverse():C},getXDomainMinMax:function(t,e){var n,i=this,r=this.config["axis_x_"+e],o=wo(e,t.map(function(t){var n=this;return a(this,i),wo(e,t.values.map(function(t){return a(this,n),t.x}.bind(this)))}.bind(this))),s=eo(r)?r.value:r;return s=Ga(s)&&null!=(n=this.axis)&&n.isTimeSeries()?ko.bind(this)(s):s,eo(r)&&r.fit&&("min"===e&&so)&&(s=void 0),Ga(s)?s:o},getXDomainPadding:function(t,e){var n,i=this,r=i.axis,a=i.config.axis_x_padding,o=r.isTimeSeries()&&e,s=Za(t);if(r.isCategorized()||o)n=0;else if(i.hasType("bar")){var u=i.getMaxDataCount();n=u>1?s/(u-1)/2:.5}else n=i.getResettedPadding(.01*s);var c=Ya(a)?{left:a,right:a}:a,l=c.left,h=void 0===l?n:l,f=c.right,d=void 0===f?n:f;if("px"===a.unit){var g=Math.abs(s+.2*s);h=r.getPadding(a,"left",n,g),d=r.getPadding(a,"right",n,g)}else{var p=s+h+d;if(o&&p){var v=s/e/p;h=h/p/v,d=d/p/v}}return{left:h,right:d}},getXDomain:function(t){var e=this,n=e.axis,i=e.config,r=e.scale.x,a=i.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],s=o[0],u=void 0===s?0:s,c=o[1],l=void 0===c?0:c;if("log"!==r.type){var h=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o),g=o[0],p=o[1];g-p!=0||h||(f?(g=new Date(.5*g.getTime()),p=new Date(1.5*p.getTime())):(g=0===g?1:.5*g,p=0===p?-1:1.5*p)),(g||0===g)&&(u=f?new Date(g.getTime()-d.left):g-d.left),(p||0===p)&&(l=f?new Date(p.getTime()+d.right):p+d.right)}return a?[l,u]:[u,l]},updateXDomain:function(t,e,n,i,r){var a,o=this,s=o.config,u=o.org,c=o.scale,l=c.x,h=c.subX,f=s.zoom_enabled;n&&(l.domain(r||To(o.getXDomain(t),!s.axis_x_inverted)),u.xDomain=l.domain(),f&&o.zoom.updateScaleExtent(),h.domain(l.domain()),null==(a=o.brush)||a.scale(h));if(e){var d=r||!o.brush||go(o)?u.xDomain:co(o).map(h.invert);l.domain(d),f&&o.zoom.updateScaleExtent()}return i&&l.domain(o.trimXDomain(l.orgDomain())),l.domain()},trimXDomain:function(t){var e=this.config.axis_x_inverted,n=this.getZoomDomain(),i=n[0],r=n[1];return(e?t[0]>=i:t[0]<=i)&&(t[0]=i,t[1]=+t[1]+(i-t[0])),(e?t[1]<=r:t[1]>=r)&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,n=e[0],i=e[1];return Ga(t.zoom_x_min)&&(n=wo("min",[n,t.zoom_x_min])),Ga(t.zoom_x_max)&&(i=wo("max",[i,t.zoom_x_max])),[n,i]},convertPixelToScale:function(t,e,n){var i=this.config,r=this.state,a=i.axis_rotated;return n*(e/r["x"===t?a?"height":"width":a?"width":"height"])}};function zu(t,e,n){var i=t.config,r="axis_"+e+"_tick_format";return(i[r]?i[r]:t.defaultValueFormat).call(t.api,n)}var ju={yFormat:function(t){return zu(this,"y",t)},y2Format:function(t){return zu(this,"y2",t)},getDefaultValueFormat:function(){var t=this,e=t.defaultArcValueFormat,n=t.yFormat,i=t.y2Format,r=t.hasArcType(null,["gauge","polar","radar"]);return function(a,o,s){return(r?e:t.axis&&"y2"===t.axis.getId(s)?i:n).call(t,a,o)}},defaultValueFormat:function(t){return $a(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this,n=this.config.data_labels,i=function(t){return a(this,e),$a(t)?+t:""}.bind(this),r=i;return Xa(n.format)?r=n.format:Ka(n.format)&&(r=n.format[t]?!0===n.format[t]?i:n.format[t]:function(){return a(this,e),""}.bind(this)),r.bind(this.api)}};function Bu(t){var e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}var $u={initLegend:function(){var t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(Uo.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var i,r=this,a=r.config,o=r.state,s=r.scale,u=r.$el,c=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};c.withTransition=no(c,"withTransition",!0),c.withTransitionForTransform=no(c,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?r.updateLegendTemplate():o.hasTreemap||r.updateLegendElement(t||r.mapToIds(r.data.targets),c,n),null==(i=u.legend)||i.selectAll("."+Uo.legendItem).classed(Uo.legendItemHidden,(function(t){var e=!r.isTargetToShow(t);return e&&(this.style.opacity=null),e})),r.updateScales(!1,!s.zoom),r.updateSvgSize(),r.transformAll(c.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=this,n=e.config,i=e.$el,r=Rn(n.legend_contents_bindto),o=n.legend_contents_template;if(!r.empty()){var s=e.mapToIds(e.data.targets),u=[],c="";s.forEach(function(n){a(this,t);var i=Xa(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):Eo(o,{COLOR:e.color(n),TITLE:n});i&&(u.push(n),c+=i)}.bind(this));var l=r.html(c).selectAll((function(){return this.childNodes})).data(u);e.setLegendItem(l),i.legend=r}},updateSizeForLegend:function(t){var e=this,n=e.config,i=e.state,r=i.isLegendTop,a=i.isLegendLeft,o=i.isLegendRight,s=i.isLegendInset,u=i.current,c=t.width,l=t.height,h={top:r?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:u.height-l-e.getCurrentPaddingBottom()-n.legend_inset_y,left:a?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:u.width-c-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?h.top:u.height-l,right:NaN,bottom:0,left:o?u.width-c:s?h.left:0}},transformLegend:function(t){var e=this,n=e.$el.legend;(0,e.$T)(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var n=this.$el.legend;n&&n.select("."+Uo.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){var t=this.state,e=t.current.width,n=t.isLegendRight,i=t.isLegendInset,r=t.legendItemWidth,a=t.legendStep;return this.config.legend_show?n||i?r*(a+1):e:0},getLegendHeight:function(){var t,e=this,n=e.state,i=n.current,r=n.isLegendRight,a=n.legendItemHeight,o=n.legendStep,s="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?r?i.height:(s?10:Math.max(20,a))*(o+1):0},opacityForUnfocusedLegend:function(t){return t.classed(Uo.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,i=this,r=i.$el.legend,o=i.$T,s=i.mapToTargetIds(t);r&&o(r.selectAll("."+Uo.legendItem).filter(function(t){return a(this,n),s.indexOf(t)>=0}.bind(this)).classed(Go.legendItemFocused,e)).style("opacity",(function(){return e?null:i.opacityForUnfocusedLegend.call(i,Rn(this))}))},revertLegend:function(){var t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+Uo.legendItem).classed(Go.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){var e=this,n=e.config,i=e.$el,r=e.$T;n.legend_show||(n.legend_show=!0,i.legend?i.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),r(i.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){var e=this,n=e.config,i=e.$el.legend;n.legend_show&&Ja(t)&&(n.legend_show=!1,i.style("visibility","hidden")),e.addHiddenLegendIds(t),i.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var n,i=this,r=i.cache,a=i.state,o=Es;return t&&((n=!a.redrawing&&r.get(o)||{})[t]||(n[t]=i.getTextRect(e,Uo.legendItem),r.add(o,n)),n=n[t]),n},setLegendItem:function(t){var e=this,n=this,i=n.$el,r=n.api,o=n.config,s=n.state,u="touch"===s.inputType,c=n.hasType("gauge"),l=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){var e=Rn(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(Uo.legendItem,t)})).style("visibility",function(t){return a(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(l&&[["."+Uo.legendItem,"cursor:pointer"],["."+Uo.legendItem+" text","pointer-events:none"],["."+Uo.legendItemPoint+" text","pointer-events:none"],["."+Uo.legendItemTile,"pointer-events:none"],["."+Uo.legendItemEvent,"fill-opacity:0"]].forEach(function(t){a(this,e);var r=t[0],o=t[1];n.setCssRule(!1,r,[o])(i.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||Xa(o.legend_item_onclick)?function(t,e){if(!io(o.legend_item_onclick,r,e)){var i=t.altKey,a=t.target;"dblclick"===t.type||i?s.hiddenTargetIds.length&&-1===a.parentNode.getAttribute("class").indexOf(Uo.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),Rn(this).classed(Go.legendItemFocused,!1))}u&&n.hideTooltip()}:null),u||t.on("mouseout",h||Xa(o.legend_item_onout)?function(t,e){io(o.legend_item_onout,r,e)||(Rn(this).classed(Go.legendItemFocused,!1),c&&n.undoMarkOverlapped(n,"."+Xo.gaugeValue),n.api.revert())}:null).on("mouseover",h||Xa(o.legend_item_onover)?function(t,e){io(o.legend_item_onover,r,e)||(Rn(this).classed(Go.legendItemFocused,!0),c&&n.markOverlapped(e,n,"."+Xo.gaugeValue),!s.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n,i,r,o=this,s=this,u=s.config,c=s.state,l=s.$el.legend,h=s.$T,f="circle"!==u.legend_item_tile_type,d=u.legend_item_tile_r,g={width:f?u.legend_item_tile_width:2*d,height:f?u.legend_item_tile_height:2*d},p={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:g.width+5,totalLength:0},v={offsets:{},widths:{},heights:{},margins:[0],steps:{}},y=t.filter(function(t){return a(this,o),!Ga(u.data_names[t])||null!==u.data_names[t]}.bind(this)),x=e.withTransition,b=s.getUpdateLegendPositions(y,p,v);c.isLegendInset&&(p.step=u.legend_inset_step?u.legend_inset_step:y.length,s.updateLegendStep(p.step)),c.isLegendRight?(n=function(t){return a(this,o),p.max.width*v.steps[t]}.bind(this),i=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):c.isLegendInset?(n=function(t){return a(this,o),p.max.width*v.steps[t]+10}.bind(this),i=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):(n=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this),i=function(t){return a(this,o),p.max.height*v.steps[t]}.bind(this));var m={xText:function(t,e){return a(this,o),n(t,e)+4+g.width}.bind(this),xRect:function(t,e){return a(this,o),n(t,e)}.bind(this),x1Tile:function(t,e){return a(this,o),n(t,e)-2}.bind(this),x2Tile:function(t,e){return a(this,o),n(t,e)-2+g.width}.bind(this),yText:function(t,e){return a(this,o),i(t,e)+9}.bind(this),yRect:function(t,e){return a(this,o),i(t,e)-5}.bind(this),yTile:function(t,e){return a(this,o),i(t,e)+4}.bind(this)};s.generateLegendItem(y,g,b,m),r=l.select("."+Uo.legendBackground+" rect"),c.isLegendInset&&p.max.width>0&&0===r.size()&&(r=l.insert("g","."+Uo.legendItem).attr("class",Uo.legendBackground).append("rect"));var _=l.selectAll("text").data(y).text(function(t){return a(this,o),Ga(u.data_names[t])?u.data_names[t]:t}.bind(this)).each((function(t,e){b(this,t,e)}));h(_,x).attr("x",m.xText).attr("y",m.yText),h(l.selectAll("rect."+Uo.legendItemEvent).data(y),x).attr("width",function(t){return a(this,o),v.widths[t]}.bind(this)).attr("height",function(t){return a(this,o),v.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),s.updateLegendItemPos(y,x,m),r&&h(r,x).attr("height",s.getLegendHeight()-12).attr("width",p.max.width*(p.step+1)+10),s.updateLegendItemWidth(p.max.width),s.updateLegendItemHeight(p.max.height),s.updateLegendStep(p.step)},getUpdateLegendPositions:function(t,e,n){var i=this,r=i.config,o=i.state,s=o.isLegendRight||o.isLegendInset;return function(u,c,l){var h,f=this,d=l===t.length-1,g=i.getLegendItemTextBox(c,u),p=g.width+e.tileWidth+(d&&!s?0:e.padding.right)+r.legend_padding,v=g.height+e.padding.top,y=s?v:p,x=s?i.getLegendHeight():i.getLegendWidth(),b=function(t,i){i||(h=(x-e.totalLength-y)/2)=e.max.width)&&(e.max.width=p),(!e.max.height||v>=e.max.height)&&(e.max.height=v);var m=s?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return a(this,f),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return a(this,f),n.heights[t]=e.max.height}.bind(this)),(h=(x-m*t.length)/2)=Uu?10:u>=Yu?5:u>=Vu?2:1;return s<0?(a=Math.pow(10,-s)/c,(i=Math.round(t*a))/ae&&--r,a=-a):(a=Math.pow(10,s)*c,(i=Math.round(t/a))*ae&&--r),r0))return[];if((t=+t)===(e=+e))return[t];var i=e=a))return[];var u=o-a+1,c=Array(u);if(i)if(s<0)for(var l=0;le?1:t>=e?0:NaN}function Ku(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Ju(t){var e,n,i,r=this;function o(t,i,r,a){if(void 0===r&&(r=0),void 0===a&&(a=t.length),r>>1;n(t[o],i)<0?r=o+1:a=o}while(rn&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,r,a){if(void 0===r&&(r=0),void 0===a&&(a=t.length),r>>1;n(t[o],i)<=0?r=o+1:a=o}while(re&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=u>2?cc:uc,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=i(s,o.map(t),Gi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,rc),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),u=ic,l()},h.clamp=function(t){return arguments.length?(c=!!t||oc,l()):c!==oc},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,l()}}function fc(){return hc()(oc,oc)}var dc,gc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pc(t){if(!(e=gc.exec(t)))throw new Error("invalid format: "+t);var e;return new vc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function vc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function xc(t){return(t=yc(Math.abs(t)))?t[1]:NaN}function bc(t,e){var n=yc(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+Array(r-i.length+2).join("0")}pc.prototype=vc.prototype,vc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mc=void 0,_c={"%":function(t,e){return a(this,mc),(100*t).toFixed(e)}.bind(void 0),b:function(t){return a(this,mc),Math.round(t).toString(2)}.bind(void 0),c:function(t){return a(this,mc),t+""}.bind(void 0),d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return a(this,mc),t.toExponential(e)}.bind(void 0),f:function(t,e){return a(this,mc),t.toFixed(e)}.bind(void 0),g:function(t,e){return a(this,mc),t.toPrecision(e)}.bind(void 0),o:function(t){return a(this,mc),Math.round(t).toString(8)}.bind(void 0),p:function(t,e){return a(this,mc),bc(100*t,e)}.bind(void 0),r:bc,s:function(t,e){var n=yc(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(dc=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+yc(t,Math.max(0,e+a-1))[0]},X:function(t){return a(this,mc),Math.round(t).toString(16).toUpperCase()}.bind(void 0),x:function(t){return a(this,mc),Math.round(t).toString(16)}.bind(void 0)};function Tc(t){return t}var wc,Ac,Sc,Ec=Array.prototype.map,kc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mc(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Tc:(e=Ec.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],o=0,s=e[0],u=0;r>0&&s>0&&(u+s+1>i&&(s=Math.max(1,i-u)),a.push(t.substring(r-=s,r+s)),!((u+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Tc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ec.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=pc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,g=t.width,p=t.comma,v=t.precision,y=t.trim,x=t.type;"n"===x?(p=!0,x="g"):_c[x]||(void 0===v&&(v=12),y=!0,x="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",m="$"===f?a:/[%p]/.test(x)?u:"",_=_c[x],T=/[defgprs%]/.test(x);function w(t){var r,a,u,f=b,w=m;if("c"===x)w=_(t)+w,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:_(Math.abs(t),v),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==h&&(A=!1),f=(A?"("===h?h:c:"-"===h||"("===h?"":h)+f,w=("s"===x?kc[8+dc/3]:"")+w+(A&&"("===h?")":""),T)for(r=-1,a=t.length;++r(u=t.charCodeAt(r))||u>57){w=(46===u?o+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}p&&!d&&(t=i(t,1/0));var S=f.length+t.length+w.length,E=S>1)+f+t+w+E.slice(S);break;default:t=E+f+t+w}return s(t)}return v=void 0===v?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=pc(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3))),r=Math.pow(10,-i),a=kc[8+i/3];return function(t){return n(r*t)+a}}}}function Oc(t,e,n,i){var r,a=qu(t,e,n);switch((i=pc(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3)))-xc(Math.abs(t)))}(a,o))||(i.precision=r),Sc(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,xc(e)-xc(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-xc(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return Ac(i)}function Rc(t){var e=t.domain;return t.ticks=function(t){var n=e();return Hu(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Oc(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),o=0,s=a.length-1,u=a[o],c=a[s],l=10;for(c0;){if((r=Wu(u,c,n))===i)return a[o]=u,a[s]=c,e(a);if(r>0)u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function Cc(){var t=fc();return t.copy=function(){return lc(t,Cc())},Ou.apply(t,arguments),Rc(t)}function Ic(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Lc(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Pc(){var t=function(t){var e=1,n=t(Ic(e),Lc(e));return n.constant=function(n){return arguments.length?t(Ic(e=+n),Lc(e)):e},Rc(n)}(hc());return t.copy=function(){return lc(t,Pc()).constant(t.constant())},Ou.apply(t,arguments)}function Dc(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o0){for(;g<=p;++g)for(f=1;fc)break;y.push(d)}}else for(;g<=p;++g)for(f=s-1;f>=1;--f)if(!((d=g>0?f/n(-g):f*n(g))c)break;y.push(d)}2*y.length0?t>1?u(function(n){a(this,e),n.setTime(Math.floor(n/t)*t)}.bind(this),function(n,i){a(this,e),n.setTime(+n+i*t)}.bind(this),function(n,i){return a(this,e),(i-n)/t}.bind(this)):Vc:null}.bind(void 0);Vc.range;var Gc=void 0,Hc=u(function(t){a(this,Gc),t.setTime(t-t.getMilliseconds())}.bind(void 0),function(t,e){a(this,Gc),t.setTime(+t+e*c)}.bind(void 0),function(t,e){return a(this,Gc),(e-t)/c}.bind(void 0),function(t){return a(this,Gc),t.getUTCSeconds()}.bind(void 0)),Wc=(Hc.range,void 0),qc=u(function(t){a(this,Wc),t.setTime(t-t.getMilliseconds()-t.getSeconds()*c)}.bind(void 0),function(t,e){a(this,Wc),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return a(this,Wc),(e-t)/l}.bind(void 0),function(t){return a(this,Wc),t.getMinutes()}.bind(void 0)),Zc=(qc.range,u(function(t){a(this,Wc),t.setUTCSeconds(0,0)}.bind(void 0),function(t,e){a(this,Wc),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return a(this,Wc),(e-t)/l}.bind(void 0),function(t){return a(this,Wc),t.getUTCMinutes()}.bind(void 0))),Kc=(Zc.range,void 0),Jc=u(function(t){a(this,Kc),t.setTime(t-t.getMilliseconds()-t.getSeconds()*c-t.getMinutes()*l)}.bind(void 0),function(t,e){a(this,Kc),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return a(this,Kc),(e-t)/h}.bind(void 0),function(t){return a(this,Kc),t.getHours()}.bind(void 0)),Qc=(Jc.range,u(function(t){a(this,Kc),t.setUTCMinutes(0,0,0)}.bind(void 0),function(t,e){a(this,Kc),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return a(this,Kc),(e-t)/h}.bind(void 0),function(t){return a(this,Kc),t.getUTCHours()}.bind(void 0))),tl=(Qc.range,void 0),el=u(function(t){a(this,tl),t.setDate(1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,tl),t.setMonth(t.getMonth()+e)}.bind(void 0),function(t,e){return a(this,tl),e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}.bind(void 0),function(t){return a(this,tl),t.getMonth()}.bind(void 0)),nl=(el.range,u(function(t){a(this,tl),t.setUTCDate(1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,tl),t.setUTCMonth(t.getUTCMonth()+e)}.bind(void 0),function(t,e){return a(this,tl),e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}.bind(void 0),function(t){return a(this,tl),t.getUTCMonth()}.bind(void 0)));nl.range;function il(t,e,n,i,r,o){var s=[[Hc,1,c],[Hc,5,5e3],[Hc,15,15e3],[Hc,30,3e4],[o,1,l],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,h],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,f],[i,2,1728e5],[n,1,d],[e,1,g],[e,3,7776e6],[t,1,p]];function u(e,n,i){var r=this,o=Math.abs(n-e)/i,u=Ju(function(t){var e=t[2];return a(this,r),e}.bind(this)).right(s,o);if(u===s.length)return t.every(qu(e/p,n/p,i));if(0===u)return Vc.every(Math.max(qu(e,n,i),1));var c=s[o/s[u-1][2]0)for(var i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,u=-1;++u<=n;)i=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+i*o),this._beta*e[u]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var El=function t(e){function n(t){return 1===e?new xl(t):new Sl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function kl(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ml(t,e){this._context=t,this._k=(1-e)/6}Ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kl(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ol=function t(e){function n(t){return new Ml(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rl(t,e){this._context=t,this._k=(1-e)/6}Rl.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cl=function t(e){function n(t){return new Rl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Il(t,e){this._context=t,this._k=(1-e)/6}Il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ll=function t(e){function n(t){return new Il(t,e)}return n.tension=function(e){return t(+e)},n}(0),Pl=Math.abs,Dl=Math.atan2,Nl=Math.cos,Fl=Math.max,zl=Math.min,jl=Math.sin,Bl=Math.sqrt,$l=1e-12,Xl=Math.PI,Ul=Xl/2,Yl=2*Xl;function Vl(t){return t>=1?Ul:t<=-1?-Ul:Math.asin(t)}function Gl(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>$l){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>$l){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function Hl(t,e){this._context=t,this._alpha=e}Hl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Wl=function t(e){function n(t){return e?new Hl(t,e):new Ml(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ql(t,e){this._context=t,this._alpha=e}ql.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zl=function t(e){function n(t){return e?new ql(t,e):new Rl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Kl(t,e){this._context=t,this._alpha=e}Kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jl=function t(e){function n(t){return e?new Kl(t,e):new Il(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ql(t){return t<0?-1:1}function th(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0);return(Ql(a)+Ql(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*r+o*i)/(i+r)))||0}function eh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nh(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function ih(t){this._context=t}function rh(t){this._context=new ah(t)}function ah(t){this._context=t}function oh(t){return new ih(t)}function sh(t){return new rh(t)}function uh(t){this._context=t}function ch(t){var e,n,i=t.length-1,r=Array(i),a=Array(i),o=Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var bh={getDrawShape:function(){var t,e,n=this,i=this,r=i.config.axis_rotated,o=i.state,s=o.hasRadar,u=o.hasTreemap,c={type:{},indices:{},pos:{}};(u||["bar","candlestick","line","area"].forEach(function(t){a(this,n);var e=vo(/^(bubble|scatter)$/.test(t)?"line":t);if(i.hasType(t)||i.hasTypeOf(e)||"line"===t&&(i.hasType("bubble")||i.hasType("scatter"))){var r=i.getShapeIndices(i["is"+e+"Type"]),o=i["generateDraw"+e];c.indices[t]=r,c.type[t]=o?o.bind(i)(r,!1):void 0}}.bind(this)),!i.hasArcType()||s||u)&&(u||(t=s?i.radarCircleX:r?i.circleY:i.circleX,e=s?i.radarCircleY:r?i.circleX:i.circleY),c.pos={xForText:i.generateXYForText(c.indices,!0),yForText:i.generateXYForText(c.indices,!1),cx:(t||function(){}).bind(i),cy:(e||function(){}).bind(i)});return c},getShapeIndices:function(t){var e=this,n=this,i=n.config,r=i.data_xs,o=Qa(r),s={},u=o?{}:0;return o&&bo(Object.keys(r).map(function(t){return a(this,e),r[t]}.bind(this))).forEach(function(t){a(this,e),u[t]=0,s[t]={}}.bind(this)),n.filterTargetsToShow(n.data.targets.filter(t,n)).forEach(function(t){a(this,e);for(var n,o=(t.id in r?r[t.id]:""),c=o?s[o]:s,l=0;n=i.data_groups[l];l++)if(!(n.indexOf(t.id)<0))for(var h,f=0;h=n[f];f++)if(h in c){c[t.id]=c[h];break}Va(c[t.id])&&(c[t.id]=o?u[o]++:u++,c.__max__=(o?u[o]:u)-1)}.bind(this)),s},getIndices:function(t,e){var n=this,i=this,r=i.config,o=r.data_xs,s=r.bar_indices_removeNull,u=e.id,c=e.index;if(i.isBarType(u)&&s){var l={};return i.getAllValuesOnIndex(c,!0).forEach(function(t,e){a(this,n),l[t.id]=e,l.__max__=e}.bind(this)),l}return Qa(o)?t[o[u]]:t},getIndicesMax:function(t){var e=this;return Qa(this.config.data_xs)?Object.keys(t).map(function(n){return a(this,e),t[n].__max__||0}.bind(this)).reduce(function(t,n){return a(this,e),t+n}.bind(this)):t.__max__},getShapeX:function(t,e,n){var i=this,r=this,o=r.config,s=r.scale,u=n?s.subX:s.zoom||s.x,c=o.bar_overlap,l=o.bar_padding,h=function(t,e){return a(this,i),t+e}.bind(this),f=Ka(t)&&(t._$total.length?t._$total.reduce(h)/2:0);return function(n){a(this,i);var o=r.getIndices(e,n,"getShapeX"),s=n.id in o?o[n.id]:0,d=(o.__max__||0)+1,g=0;if(Qa(n.x)){var p=u(n.x,!0);if(f){var v=t[n.id]||t._$width;g=c?p-v/2:p-v+t._$total.slice(0,s+1).reduce(h)-f}else g=p-(Ya(t)?t:t._$width)*(d/2-(c?1:s))}return t&&g&&d>1&&l&&(s&&(g+=l*s),d>2?g-=(d-1)*l/2:2===d&&(g-=l/2)),g}.bind(this)},getShapeY:function(t){var e=this,n=this,i=n.isStackNormalized();return function(r){a(this,e);var o=r.value;return Ya(r)?o=r:i?o=n.getRatio("index",r,!0):n.isBubbleZType(r)?o=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(o=o[1]),n.getYScaleById(r.id,t)(o)}.bind(this)},getShapeYMin:function(t){var e=this,n=e.axis.getId(t),i=e.scale[n].domain()[0],r=e.config["axis_"+n+"_inverted"];return!e.isGrouped(t)&&!r&&i>0?i:0},getShapeOffsetData:function(t){var e=this,n=this,i=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),o=i.map(function(t){var i=this;a(this,e);var o=t.values,s={};n.isStepType(t)&&(o=n.convertValuesToStep(o));var u=o.reduce(function(t,e){a(this,i);var o=+e.x;return t[o]=e,s[o]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:o,rowValueMapByXValue:u,values:s}}.bind(this)),s=i.reduce(function(t,n,i){var r=n.id;return a(this,e),t[r]=i,t}.bind(this),{});return{indexMapByTargetId:s,shapeOffsetTargets:o}},getShapeOffset:function(t,e,n){var i=this,r=this,o=r.getShapeOffsetData(t),s=o.shapeOffsetTargets,u=o.indexMapByTargetId,c=r.config.data_groupsZeroAs;return function(t,o){var l=this;a(this,i);var h=t.id,f=t.value,d=t.x,g=r.getIndices(e,t),p=r.getYScaleById(h,n);if(r.isBarRangeType(t))return p(f[0]);var v=+d,y=p("zero"===c?0:r.getShapeYMin(h)),x=y;return s.filter(function(t){return a(this,l),t.id!==h&&g[t.id]===g[h]}.bind(this)).forEach(function(t){a(this,l);var e=t.id,n=t.rowValueMapByXValue,i=t.rowValues,r=t.values;if(u[e]=0&&Ya(d))(0!==f||("positive"===c&&d>0||"negative"===c&&d<0))&&(x+=p(d)-y)}}.bind(this)),x}.bind(this)},getBarW:function(t,e,n){var i=this,r=this,o=r.config,s=r.org,u=r.scale,c=r.getMaxDataCount(),l="bar"===t&&o.data_groups.length,h=t+"_width",f=u.zoom&&!r.axis.isCategorized()?s.xDomain.map(function(t){return a(this,i),u.zoom(t)}.bind(this)).reduce(function(t,e){return a(this,i),Math.abs(t)+e}.bind(this))/c:e.tickInterval(c),d=function(t){a(this,i);var e=t?o[h][t]:o[h],r=t?e.ratio:o[h+"_ratio"],s=t?e.max:o[h+"_max"],u=Ya(e)?e:n?f*r/n:0;return s&&u>s?s:u}.bind(this),g=d();return!l&&Ka(o[h])&&(g={_$width:g,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){a(this,i),o[h][t.id]&&(g[t.id]=d(t.id),g._$total.push(g[t.id]||g._$width))}.bind(this))),g},getShapeByIndex:function(t,e,n){var i=this,r=this.$el,o=$a(e)?"-"+e:"",s=r[t];return s=s&&!s.empty()?s.filter(function(t){return a(this,i),!n||t.id===n}.bind(this)).filter(function(t){return a(this,i),!$a(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+as[t+"s"]+this.getTargetSelectorSuffix(n)):r.main).selectAll("."+as[t]+o)},isWithinShape:function(t,e){var n,i=this,r=Rn(t);return i.isTargetToShow(e.id)?null!=i.hasValidPointType&&i.hasValidPointType(t.nodeName)?n=i.isStepType(e)?i.isWithinStep(t,i.getYScaleById(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?1.5*i.pointSelectR(e):0):"path"===t.nodeName&&(n=!r.classed(as.bar)||i.isWithinBar(t)):n=!1,n},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:bl,"basis-closed":Tl,"basis-open":Al,bundle:El,cardinal:Ol,"cardinal-closed":Cl,"cardinal-open":Ll,"catmull-rom":Wl,"catmull-rom-closed":Zl,"catmull-rom-open":Jl,"monotone-x":oh,"monotone-y":sh,natural:lh,"linear-closed":fh,linear:gh,step:vh,"step-after":xh,"step-before":yh}[e]},getInterpolateType:function(t){var e=this,n=e.config,i=n.spline_interpolation_type,r=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar:function(t){var e=uo(this.state.event,t),n=so(t),i=n[0],r=n[1],a=Math.min(i.x,r.x),o=Math.min(i.y,r.y),s=this.config.bar_sensitivity,u=t.getBBox(),c=u.width,l=u.height;return a-s0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){var t=this,e=t.config,n=t.state.hasAxis,i=t.$el,r=n?e.axis_y2_axes.length:0,a=$a(e.padding_top)?e.padding_top:0;return i.title&&i.title.node()&&(a+=t.getTitlePadding()),r&&e.axis_rotated&&(a+=t.getHorizontalAxisHeight("y2")*r),a},getCurrentPaddingBottom:function(){var t=this,e=t.config,n=t.state.hasAxis,i=e.axis_rotated?"y":"x",r=n?e["axis_"+i+"_axes"].length:0;return($a(e.padding_bottom)?e.padding_bottom:0)+(r?t.getHorizontalAxisHeight(i)*r:0)},getCurrentPaddingLeft:function(t){var e,n=this,i=n.config,r=n.state.hasAxis,a=i.axis_rotated,o="fit"===(null==(e=i.padding)?void 0:e.mode),s=a?"x":"y",u=r?i["axis_"+s+"_axes"].length:0,c=r?n.getAxisWidthByAxisId(s,t):0;o||(c=Wa(c));var l=i["axis_"+s+"_inner"]||!i["axis_"+s+"_show"]?0:c;return $a(i.padding_left)?l=i.padding_left+(o&&a?c:0):r&&a&&(l=i.axis_x_show?o?c:Math.max(c,40):1),r&&(o||i["axis_"+s+"_inner"])&&i["axis_"+s+"_label"].text&&(l+=n.axis.getAxisLabelPosition("y").isOuter?20:0),l+c*u},getCurrentPaddingRight:function(t){var e,n;void 0===t&&(t=!1);var i=this,r=i.config,a=i.state.hasAxis,o=r.axis_rotated,s="fit"===(null==(e=r.padding)?void 0:e.mode),u=s?2:10,c=i.state.isLegendRight?i.getLegendWidth()+20:0,l=a?r.axis_y2_axes.length:0,h=null!=(n=i.axis)&&n.getAxisLabelPosition("y2").isOuter?20:0,f=t?i.axis.getXAxisTickTextY2Overflow(u):0,d=a&&!r.axis_y2_inner?i.getAxisWidthByAxisId("y2"):1;s||(d=Wa(d));var g=o?0:Math.max(d+c,f);return $a(r.padding_right)?g=r.padding_right+(s&&(o||!r.axis_y2_show?u:g))+(a&&!s?1:0):i.axis&&o?g=u+c:!i.axis||r.axis_y2_show&&!r.axis_y2_inner||(g=Math.max((s&&!r.axis_y2_show?2:1)+c+h,f)),a&&!o&&s&&r.axis_y2_show&&!r.axis_y2_inner&&r.axis_y2_label.text&&(g+=h),g+d*l},getParentRectValue:function(t){for(var e="offset"+vo(t),n=this.$el.chart.node(),i=0;i<30&&n&&"BODY"!==n.tagName;){try{i=n.getBoundingClientRect()[t]}catch(t){e in n&&(i=n[e])}n=n.parentNode}var r=zn.body[e];return i>r&&(i=r),i},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,n=e.config,i=e.$el,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,a=n.axis_rotated?No.axisX:No.axisY,o=i.main.select("."+a).node(),s=o&&r?o.getBoundingClientRect():{right:0},u=i.chart.node().getBoundingClientRect(),c=e.hasArcType(),l=s.right-u.left-(c?0:e.getCurrentPaddingLeft(t));return l>0?l:0},updateDimension:function(t){var e,n=this,i=n.config,r=n.state.hasAxis,a=n.$el;r&&!t&&n.axis.x&&i.axis_rotated&&(null==(e=n.axis.subX)||e.create(a.axis.subX));n.updateScales(t),n.updateSvgSize(),n.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,n=e.clip,i=e.current,r=e.hasAxis,a=e.width,o=e.height,s=t.$el.svg;if(s.attr("width",i.width).attr("height",i.height),r){var u=s.select("."+ts.brush+" .overlay"),c={width:0,height:0};u.size()&&(c.width=+u.attr("width"),c.height=+u.attr("height")),s.selectAll(["#"+n.id,"#"+n.idGrid]).select("rect").attr("width",a).attr("height",o),s.select("#"+n.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),s.select("#"+n.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&s.select("#"+n.idSubchart).select("rect").attr("width",a).attr("height",c.height)}},getCurrentPadding:function(){var t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this,n=this.config,i=Ya(t),r=i?0:{};return!1===n.padding?i||Object.keys(t).forEach(function(i){a(this,e),r[i]=Ja(n.data_labels)||!1===n.data_labels||"top"!==i?0:t[i]}.bind(this)):r=t,r},updateSizes:function(t){var e,n=this,i=n.config,r=n.state,a=n.$el.legend,o=i.axis_rotated,s=n.hasArcType()||r.hasTreemap,u="fit"===(null==(e=i.padding)?void 0:e.mode);t||n.setContainerSize();var c={width:a?n.getLegendWidth():0,height:a?n.getLegendHeight():0};!s&&i.axis_x_show&&i.axis_x_tick_autorotate&&n.updateXAxisTickClip();var l=r.isLegendRight||r.isLegendInset?0:c.height,h=o||s?0:n.getHorizontalAxisHeight("x"),f=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?h:30,d=i.subchart_show&&!s?i.subchart_size_height+f:0,g=n.hasType("gauge")&&i.arc_needle_show&&!i.gauge_fullCircle&&!i.gauge_label_show?10:0,p=n.getCurrentPadding();if(r.margin=!s&&o?{top:n.getHorizontalAxisHeight("y2")+p.top,right:s?0:n.getCurrentPaddingRight(!0),bottom:n.getHorizontalAxisHeight("y")+l+p.bottom,left:d+(s?0:p.left)}:{top:(u?0:4)+p.top,right:s?0:n.getCurrentPaddingRight(!0),bottom:g+h+d+l+p.bottom,left:s?0:p.left},r.margin=n.getResettedPadding(r.margin),r.margin2=o?{top:r.margin.top,right:NaN,bottom:20+l,left:n.state.rotatedPadding.left}:{top:r.current.height-d-l,right:NaN,bottom:f+l,left:r.margin.left},r.margin3={top:0,right:NaN,bottom:0,left:0},null==n.updateSizeForLegend||n.updateSizeForLegend(c),r.width=r.current.width-r.margin.left-r.margin.right,r.height=r.current.height-r.margin.top-r.margin.bottom,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r.width2=o?r.margin.left-r.rotatedPadding.left-r.rotatedPadding.right:r.width,r.height2=o?r.height:r.current.height-r.margin2.top-r.margin2.bottom,r.width2<0&&(r.width2=0),r.height2<0&&(r.height2=0),n.hasArcType()){var v=n.hasType("gauge"),y=i.legend_show&&r.isLegendRight;r.arcWidth=r.width-(y?c.width+10:0),r.arcHeight=r.height-(y&&!v?0:10),v&&!i.gauge_fullCircle&&(r.arcHeight+=r.height-n.getPaddingBottomForGauge()),null==n.updateRadius||n.updateRadius()}r.isLegendRight&&s&&(r.margin3.left=r.arcWidth/2+1.1*r.radiusExpanded)}},_h={setCssRule:function(t,e,n,i){var r=this,o=this,s=o.config,u=o.state,c=u.cssRule,l=u.style;return s.boost_useCssRule?function(s){var u=this;a(this,r),s.each(function(r){var s=this;a(this,u);var h=i&&(null==i?void 0:i.call(o,r)),f=(t?"."+(Qo.shapes+o.getTargetSelectorSuffix(r.id)):"")+e;e in c&&l.sheet.deleteRule(c[f]),o.state.cssRule[f]=function(t,e,n){var i=this,r=t.rootSelctor,o=t.sheet,s=r+" "+function(t){return a(this,i),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return o[o.insertRule?"insertRule":"addRule"](s,o.cssRules.length)}(l,f,n.filter(Boolean).map(function(t){return a(this,s),Ua(h)&&-1===t.indexOf(":")?t+": "+h:t||""}.bind(this)))}.bind(this))}.bind(this):function(){a(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:Xa(t)?t.bind(this):t}};function Th(t){return"string"==typeof t?new kn([document.querySelectorAll(t)],[document.documentElement]):new kn([fe(t)],En)}function wh(t,e,n,i,r){var a,o=t.value,s=this.isCandlestickType(t),u=Ya(o)&&o<0||s&&!(null!=(a=this.getCandlestickData(t))&&a._isUp),c=e.x,l=e.y;return i?"start"===n?(c+=u?0:8,l+=4):"middle"===n?(c+=8,l-=8):"end"===n&&(u&&(c-=8),l+=4):("start"===n?(c+=4,u&&(l+=16)):"middle"===n?l-=8:"end"===n&&(c-=4,u&&(l+=16)),r&&(l+=u?-17:s?13:7)),{x:c,y:l}}function Ah(t,e){var n,i=this.config.data_labels_position,r=t.id,a=t.index,o=t.value;return null!=(n=Xa(i)?i.bind(this.api)(e,o,r,a,this.$el.text):(r in i?i[r]:i)[e])?n:0}var Sh={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){var t=this.$el;t.main.select("."+Lo.chart).append("g").attr("class",es.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this,n=this,i=n.getChartClass("Text"),r=n.getClass("texts","id"),o=n.classFocus.bind(n);n.$el.main.select("."+es.chartTexts).selectAll("."+es.chartText).data(t).attr("class",function(t){return a(this,e),(""+i(t)+o(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",i).call(n.setCssRule(!0," ."+es.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this,e=this,n=e.$el,i=e.$T,r=e.config,o=e.axis,s=e.getClass("text","index"),u=r.data_labels.centered,c=n.main.selectAll("."+es.texts).selectAll("."+es.text).data(e.labelishData.bind(e));i(c.exit()).style("fill-opacity","0").remove(),n.text=c.enter().append("text").merge(c).attr("class",s).attr("text-anchor",function(n){a(this,t);var i=r["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){var s=e.getCandlestickData(n);i=!(null!=s&&s._isUp)}else if(e.isTreemapType(n))return u?"middle":"start";return r.axis_rotated?i?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,n,i){var r=Rn(this),a=t.value;if(e.isBubbleZType(t))a=e.getBubbleZData(a,"z");else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(a=o.close)}a=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(a,t.id,n,i),Ya(a)?this.textContent=a:oo(r,a)}))},updateTextColor:function(t){var e,n=this,i=n.config,r=i.data_labels_colors,a=n.isArcType(t)&&!n.isRadarType(t)||n.isTreemapType(t)?null:n.color(t);if(Ua(r))e=r;else if(eo(r)){e=r[(t.data||t).id]}else Xa(r)&&(e=r.bind(n.api)(a,t));if(n.isCandlestickType(t)&&!Xa(r)){var o=n.getCandlestickData(t);if(null==o||!o._isUp){var s=i.candlestick_color_down;e=eo(s)?s[t.id]:s}}return e||a},updateTextBacgroundColor:function(t){var e=this,n=e.$el,i=e.config.data_labels_backgroundColors,r="";if(Ua(i)||eo(i)){var a=Ua(i)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=n.defs.select(["filter[id*='labels-bg","']"].join(a));o.size()&&(r="url(#"+o.attr("id")+")")}return r||null},redrawText:function(t,e,n,i){var r=this,a=r.$T,o=r.axis,s=r.config,u=r.state.hasTreemap,c=ho(!0),l=s.axis_rotated,h=s.data_labels.rotate,f=function(t){var e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(h),d=h?"rotate("+h+")":"";return r.$el.text.style("fill",r.getStylePropValue(r.updateTextColor)).attr("filter",r.updateTextBacgroundColor.bind(r)).style("fill-opacity",n?0:r.opacityForText.bind(r)).each((function(n,g){var p=a(u&&this.childElementCount?this.parentNode:this,!(!i||!this.getAttribute("x")),c),v=s["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"],y={x:t.bind(this)(n,g),y:e.bind(this)(n,g)};h&&(y=wh.bind(r)(n,y,f,l,v),p.attr("text-anchor",f)),this.childElementCount||h?p.attr("transform","translate("+y.x+" "+y.y+") "+d):p.attr("x",y.x).attr("y",y.y)})),!0},getTextRect:function(t,e){var n=this,i=this,r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));var o=r.textContent,s=Rs+"-"+o.replace(/\W/g,"_"),u=i.cache.get(s);return u||(i.$el.svg.append("text").style("visibility","hidden").style("font",Rn(r).style("font")).classed(e,!0).text(o).call(function(t){a(this,n),u=lo(t.node())}.bind(this)).remove(),i.cache.add(s,u)),u},generateXYForText:function(t,e){var n=this,i=this,r=i.state,o=r.hasRadar,s=r.hasTreemap,u=Object.keys(t),c={},l=e?i.getXForText:i.getYForText;return o&&u.push("radar"),s&&u.push("treemap"),u.forEach(function(e){a(this,n),c[e]=i["generateGet"+vo(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){var n=(i.isAreaType(t)?"area":i.isBarType(t)&&"bar")||i.isCandlestickType(t)&&"candlestick"||i.isRadarType(t)&&"radar"||i.isTreemapType(t)&&"treemap"||"line";return l.call(i,c[n](t,e),t,this)}},getCenteredTextPos:function(t,e,n,i){var r=this,a=r.config,o=a.axis_rotated,s=r.isBarType(t),u=r.isTreemapType(t);if(a.data_labels.centered&&(s||u)){var c=lo(n);if(s){var l=t.value>=0;if(o){var h=(l?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+c.width/2;return l?-h-3:h+2}var f=(l?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+c.height/2;return l?f:-f-2}if(u)return"x"===i?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+c.height/2}return 0},getXForText:function(t,e,n){var i,r=this,a=r.config,o=r.state,s=a.axis_rotated,u=r.isTreemapType(e),c=t[0][0];if(r.isCandlestickType(e))s?c=null!=(i=r.getCandlestickData(e))&&i._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(u)c+=a.data_labels.centered?0:5;else if(s){var l=a["axis_"+r.axis.getId(e.id)+"_inverted"],h=r.isBarType(e)?4:6,f=e.value;c=t[2][1],l?c-=h*(f>0?1:-1):c+=h*(f<0?-1:1)}else c=r.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>o.width){var d=lo(n).width;c=o.width-d}else c<0&&(c=4);return(s||u)&&(c+=r.getCenteredTextPos(e,t,n,"x")),c+Ah.call(this,e,"x")},getYForText:function(t,e,n){var i,r=this,a=r.axis,o=r.config,s=r.state,u=o.axis_rotated,c=o["axis_"+(null==a?void 0:a.getId(e.id))+"_inverted"],l=r.isBarType(e),h=r.isTreemapType(e),f=o.point_r,d=lo(n),g=e.value,p=3;if(r.isCandlestickType(e))g=r.getCandlestickData(e),u?(i=t[0][0],i+=(t[1][0]-i)/2+p):(i=g&&g._isUp?t[2][2]-p:t[2][1]+4*p,c&&(i+=15*(g._isUp?1:-1)));else if(h)i=t[0][1]+(o.data_labels.centered?0:d.height+5);else if(u)i=(t[0][0]+t[2][0]+.6*d.height)/2;else if(i=t[2][1],Ya(f)&&f>5&&(r.isLineType(e)||r.isScatterType(e))&&(p+=o.point_r/2.3),g<0||0===g&&!s.hasPositiveValue&&s.hasNegativeValue)i+=c?l?-3:-5:d.height+(l?-p:p);else{var v=2*-p;l?v=-p:r.isBubbleType(e)&&(v=p),c&&(v=l?10:15),i+=v}if(null===e.value&&!u){var y=d.height;is.height&&(i=s.height-4)}return u&&!h||(i+=r.getCenteredTextPos(e,t,n,"y")),i+Ah.call(this,e,"y")},markOverlapped:function(t,e,n){var i=this,r=e.$el.arcs.selectAll(n),o=r.filter(function(e){return a(this,i),e.data.id!==t}.bind(this)),s=r.filter(function(e){return a(this,i),e.data.id===t}.bind(this)),u=xo(s.node()),c=function(t,e){return a(this,i),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);s.node()&&o.each((function(){var t=xo(this),e=Rn(this),n=c(u.e,u.f)>c(t.e,t.f)?s:e,i=Math.ceil(Math.abs(u.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function Eh(t,e){void 0===t&&(t="left");var n=Ya(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"}var kh={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),oo(e.title.append("text").style("text-anchor",Eh(t.title_position)).attr("class",es.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var t=this,e=t.config,n=t.state.current,i=t.$el.title;if(i){var r=t.yForTitle.call(t);/g/i.test(i.node().tagName)?i.attr("transform","translate("+Eh(e.title_position,n.width)+", "+r+")"):i.attr("x",t.xForTitle.call(t)).attr("y",r)}},xForTitle:function(){var t,e=this,n=e.config,i=e.state.current,r=n.title_position||"left",a=e.getTextRect(e.$el.title,es.title).width;return/(right|center)/.test(r)?(t=i.width-a,r.indexOf("right")>=0?t=i.width-a-n.title_padding.right:r.indexOf("center")>=0&&(t=(i.width-a)/2)):t=n.title_padding.left||0,t},yForTitle:function(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,es.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},Mh={initTooltip:function(){var t=this,e=t.config,n=t.$el;n.tooltip=Rn(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",ns.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this,e=this,n=e.config,i=e.$el,r=e.state,o=r.hasAxis,s=r.hasRadar;if(n.tooltip_init_show){var u,c,l=!(o&&s);if(null!=(u=e.axis)&&u.isTimeSeries()&&Ua(n.tooltip_init_x)){var h,f,d=e.data.targets[0];for(n.tooltip_init_x=ko.call(e,n.tooltip_init_x),h=0;(f=d.values[h])&&f.x-n.tooltip_init_x!=0;h++);n.tooltip_init_x=h}var g=e.data.targets.map(function(i){a(this,t);var r=l?0:n.tooltip_init_x;return e.addName(i.values[r])}.bind(this));l&&(g=[g[n.tooltip_init_x]]),i.tooltip.html(e.getTooltipHTML(g,null==(c=e.axis)?void 0:c.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||i.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){var t=this,e=t.api,n=t.config;return Xa(n.tooltip_contents)?n.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,i){var r=this,o=this,s=o.api,u=o.config,c=o.state,l=o.$el,h=["title","name","value"].map(function(t){a(this,r);var e=u["tooltip_format_"+t];return Xa(e)?e.bind(s):e}.bind(this)),f=h[0],d=h[1],g=h[2];f=f||e,d=d||function(t){return a(this,r),t}.bind(this),g=g||(c.hasTreemap||o.isStackNormalized()?function(t,e){return a(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);var p=u.tooltip_order,v=function(t){return a(this,r),o.axis&&o.isBubbleZType(t)?o.getBubbleZData(t.value,"z"):o.getBaseValue(t)}.bind(this),y=o.levelColor?function(t){return a(this,r),o.levelColor(t.value)}.bind(this):function(t){return a(this,r),i(t)}.bind(this),x=u.tooltip_contents,b=x.template,m=o.mapToTargetIds();if(null===p&&u.data_groups.length){var _=o.orderTargets(o.data.targets).map(function(t){return a(this,r),t.id}.bind(this)).reverse();t.sort(function(t,e){a(this,r);var n=t?t.value:null,i=e?e.value:null;return n>0&&i>0&&(n=t.id?_.indexOf(t.id):null,i=e.id?_.indexOf(e.id):null),n-i}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){a(this,r);var n=t?v(t):null,i=e?v(e):null;return"asc"===p?n-i:i-n}.bind(this)):Xa(p)&&t.sort(p.bind(s));var T,w,A,S,E,k=o.getTooltipContentTemplate(b),M=t.length,O=function(){var e=this;if(!(w=t[E])||!v(w)&&0!==v(w))return"continue";if(Va(T)){var n=(c.hasAxis||c.hasRadar)&&ao(f?f(w.x):w.x);T=Eo(k[0],{CLASS_TOOLTIP:ns.tooltip,TITLE:$a(n)?b?n:''+n+"":""})}if(!w.ratio&&l.arcs&&(A=["arc",o.$el.arcs.select("path."+Po.arc+"-"+w.id).data()[0]],w.ratio=o.getRatio.apply(o,A)),A=[w.ratio,w.id,w.index,t],S=ao(g.apply(void 0,[v(w)].concat(A))),o.isAreaRangeType(w)){var i=["high","low"].map(function(t){return a(this,e),ao(g.apply(void 0,[o.getRangedData(w,t)].concat(A)))}.bind(this)),r=i[0],s=i[1];S="Mid: "+S+" High: "+r+" Low: "+s}else if(o.isCandlestickType(w)){var u=["open","high","low","close","volume"].map(function(t){return a(this,e),ao(g.apply(void 0,[o.getRangedData(w,t,"candlestick")].concat(A)))}.bind(this)),h=u[0],p=u[1],_=u[2],M=u[3],O=u[4];S="Open: "+h+" High: "+p+" Low: "+_+" Close: "+M+(O?" Volume: "+O:"")}else if(o.isBarRangeType(w)){var R=w.value,C=R[0],I=R[1];S=g(C)+" ~ "+g(I)}if(void 0!==S){if(null===w.name)return"continue";var L=ao(d.apply(void 0,[w.name].concat(A))),P=y(w),D={CLASS_TOOLTIP_NAME:ns.tooltipName+o.getTargetSelectorSuffix(w.id),COLOR:b||!o.patterns?P:'',NAME:L,VALUE:S};if(b&&eo(x.text)){var N=m.indexOf(w.id);Object.keys(x.text).forEach(function(t){a(this,e),D[t]=x.text[t][N]}.bind(this))}T+=Eo(k[1],D)}};for(E=0;E"},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this,i=this,r=i.config,o=i.scale,s=i.state,u=i.$el,c=u.eventRect,l=u.tooltip,h=r.tooltip_contents.bindto,f=l.datum();if(!h&&f){var d,g,p=uo(s.event,null!=e?e:null==c?void 0:c.node()),v={x:p[0],y:p[1]};o.x&&f&&"x"in f&&(v.xAxis=o.x(f.x));var y=f.width,x=void 0===y?0:y,b=f.height,m=void 0===b?0:b,_=null!=(d=null==(g=r.tooltip_position)?void 0:g.bind(i.api)(null!=t?t:JSON.parse(f.current),x,m,null==c?void 0:c.node(),v))?d:i.getTooltipPosition.bind(i)(x,m,v);["top","left"].forEach(function(t){a(this,n);var e=_[t];l.style(t,e+"px"),"left"!==t||f.xPosInPercent||(f.xPosInPercent=e/s.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var i=this,r=this,o=r.config,s=r.scale,u=r.state,c=u,l=c.width,h=c.height,f=c.current,d=c.isLegendRight,g=c.inputType,p=r.hasType("gauge")&&!o.gauge_fullCircle,v=u.hasTreemap,y=o.axis_rotated,x=r.getSvgLeft(!0),b=x+f.width-r.getCurrentPaddingRight(),m=r.getCurrentPaddingLeft(!0),_=n.x,T=n.y;r.hasArcType()?"touch"===g||r.hasType("radar")||(T+=p?h:h/2,_+=(l-(d?r.getLegendWidth():0))/2):v||(y?(T=n.xAxis+20,_+=x,b-=x):(T-=5,_=x+m+20+(s.zoom?_:n.xAxis)));(_+t+15>b&&(_-=y?t-m:t+(v?0:m)),T+e>f.height)&&(T-=p?3*e:e+(v?0:30));var w={top:T,left:_};return Object.keys(w).forEach(function(t){a(this,i),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this,i=this,r=i.config,o=i.$el.tooltip,s=t.filter(function(t){return a(this,n),t&&$a(i.getBaseValue(t))}.bind(this));if(o&&0!==s.length&&r.tooltip_show){var u=o.datum(),c=JSON.stringify(t);if(!u||u.current!==c){var l=t.concat().sort()[0],h=l.index,f=l.x;io(r.tooltip_onshow,i.api,t),o.html(i.getTooltipHTML(t,i.axis?i.axis.getXAxisTickFormat():i.categoryName.bind(i),i.getDefaultValueFormat(),i.color)).style("display",null).style("visibility",null).datum(u={index:h,x:f,current:c,width:o.property("offsetWidth"),height:o.property("offsetHeight")}),io(r.tooltip_onshown,i.api,t),i._handleLinkedCharts(!0,h)}i.setTooltipPosition(s,e)}},bindTooltipResizePos:function(){var t=this,e=this,n=e.resizeFunction,i=e.state,r=e.$el.tooltip;n.add(function(){if(a(this,t),"block"===r.style("display")){var e=i.current,n=r.datum(),o=n.width,s=n.xPosInPercent,u=e.width/100*s,c=e.width-(u+o);c<0&&(u+=c),r.style("left",u+"px")}}.bind(this))},hideTooltip:function(t){var e=this,n=e.api,i=e.config,r=e.$el.tooltip;if(r&&"none"!==r.style("display")&&(!i.tooltip_doNotHide||t)){var a=JSON.parse(r.datum().current);io(i.tooltip_onhide,n,a),r.style("display","none").style("visibility","hidden").datum(null),io(i.tooltip_onhidden,n,a)}},_handleLinkedCharts:function(t,e){var n=this,i=this,r=i.charts,o=i.config,s=i.state.event;if(null!=s&&s.isTrusted&&o.tooltip_linked&&r.length>1){var u=o.tooltip_linked_name;r.filter(function(t){return a(this,n),t!==i.api}.bind(this)).forEach(function(i){a(this,n);var r=i.internal,o=r.config,s=r.$el,c=o.tooltip_linked,l=o.tooltip_linked_name,h=zn.body.contains(s.chart.node());if(c&&u===l&&h){var f=s.tooltip.data()[0],d=e!==(null==f?void 0:f.index);try{i.tooltip[t&&d?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this,i=this,r=i.config,o=i.$el,s=o.eventRect,u=o.svg,c=o.tooltip,l=i.state,h=l.event,f=l.hasAxis,d=l.hasRadar,g=l.hasTreemap;if("block"===(null==c?void 0:c.style("display"))&&h){var p,v=null!=t?t:null==(p=d?u:s)?void 0:p.node();if(f||d)if(i.isMultipleX())i.selectRectForMultipleXs(v,!1);else{var y=null!=e?e:i.getDataIndexFromEvent(h);-1===e?i.api.tooltip.hide():(i.selectRectForSingle(v,y),i.setExpand(y,null,!0))}else{var x=h.clientX,b=h.clientY;setTimeout(function(){a(this,n);var t=zn.elementFromPoint(x,b),e=Rn(t).datum();if(e){var r=i.hasArcType()?i.convertToArcData(i.updateAngle(e)):null==e?void 0:e.data;g&&(t=u.node()),r&&i.showTooltip([r],t)}else i.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},Oh={getTranslate:function(t,e){void 0===e&&(e=0);var n,i,r=this,a=r.config,o=r.state,s=a.axis_rotated,u=0;if(e&&/^(x|y2?)$/.test(t)&&(u=r.getAxisSize(t)*e),"main"===t)n=qa(o.margin.left),i=qa(o.margin.top);else if("context"===t)n=qa(o.margin2.left),i=qa(o.margin2.top);else if("legend"===t)n=o.margin3.left,i=o.margin3.top;else if("x"===t)n=s?-u:0,i=s?0:o.height+u;else if("y"===t)n=s?0:-u,i=s?o.height+u:0;else if("y2"===t)n=s?0:o.width+u,i=s&&u?1-u:0;else if("subX"===t)n=0,i=s?0:o.height2;else if("arc"===t)n=o.arcWidth/2,i=o.arcHeight/2;else if("polar"===t)n=o.arcWidth/2,i=o.arcHeight/2;else if("radar"===t){var c=r.getRadarSize()[0];n=o.width/2-c,i=qa(o.margin.top)}return"translate("+n+", "+i+")"},transformMain:function(t,e){var n=this,i=n.$el.main,r=n.$T,a=null!=e&&e.axisX?e.axisX:r(i.select("."+No.axisX),t),o=null!=e&&e.axisY?e.axisY:r(i.select("."+No.axisY),t),s=null!=e&&e.axisY2?e.axisY2:r(i.select("."+No.axisY2),t);r(i,t).attr("transform",n.getTranslate("main")),a.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),s.attr("transform",n.getTranslate("y2")),i.select("."+Po.chartArcs).attr("transform",n.getTranslate("arc"))},transformAll:function(t,e){var n=this,i=n.config,r=n.state,a=r.hasAxis,o=r.hasTreemap,s=n.$el;o||n.transformMain(t,e),a&&i.subchart_show&&n.transformContext(t,e),s.legend&&n.transformLegend(t)}},Rh={isValidChartType:function(t){return!!(t&&Object.values(jn).indexOf(t)>-1)},setTargetType:function(t,e){var n=this,i=this,r=i.config,o=i.state.withoutFadeIn;i.mapToTargetIds(t).forEach(function(t){a(this,n),o[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this,e=this,n=e.state.current;Object.keys(jn).forEach(function(i){a(this,t);var r=jn[i],o=e.hasType(r,null,!0),s=n.types.indexOf(r);-1===s&&o?n.types.push(r):s>-1&&!o&&n.types.splice(s,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var i,r=this;void 0===n&&(n=!1);var o=this,s=o.config,u=o.state.current,c=s.data_types,l=e||o.data.targets,h=!1;return!n&&(null==(i=u.types)?void 0:i.indexOf(t))>-1?h=!0:null!=l&&l.length?l.forEach(function(e){a(this,r);var n=c[e.id];(n===t||!n&&"line"===t)&&(h=!0)}.bind(this)):Object.keys(c).length?Object.keys(c).forEach(function(e){a(this,r),c[e]===t&&(h=!0)}.bind(this)):h=s.data_type===t,h},hasTypeOf:function(t,e,n){var i=this;return void 0===n&&(n=[]),t in $n&&!$n[t].filter(function(t){return a(this,i),-1===n.indexOf(t)}.bind(this)).every(function(t){return a(this,i),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){var n=Ua(t)?t:t.id,i=this.config.data_types[n]||this.config.data_type;return to(e)?e.indexOf(i)>=0:i===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=Ua(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,$n.Line)},isStepType:function(t){return this.isTypeOf(t,$n.Step)},isSplineType:function(t){return this.isTypeOf(t,$n.Spline)},isAreaType:function(t){return this.isTypeOf(t,$n.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,$n.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,n=e.point_pattern;return"circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!n||to(n)&&0===n.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return a(this,e),Ya(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}},Ch=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var e=this;e.api=t,e.config=new ms,e.cache=new Cs;var n=new ss;e.$el=n.getStore("element"),e.state=n.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,n){var i=this.config,r=this.state,a=i.transition_duration,o=i.subchart_show,s=t;s&&("tagName"in s&&(s=Rn(s)),s=(!1!==e&&a||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!o?s.transition(n).duration(a):s);return s},e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),io(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),io(t.config.onafterinit,t.api)},e.init=function(){var t=this,e=t.config,n=t.state,i=t.$el,r=e.boost_useCssRule;if(Ro(t),n.hasRadar=!n.hasAxis&&t.hasType("radar"),n.hasTreemap=!n.hasAxis&&t.hasType("treemap"),n.hasAxis=!t.hasArcType()&&!n.hasTreemap,n.datetimeId="bb-"+ +new Date*ho(),r){var a=zn.createElement("style");a.type="text/css",zn.head.appendChild(a),n.style={rootSelctor:"."+n.datetimeId,sheet:a.sheet},i.style=a}var o={element:e.bindto,classname:"bb"};eo(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),i.chart=Xa(o.element.node)?e.bindto.element:Rn(o.element||[]),i.chart.empty()&&(i.chart=Rn(zn.body.appendChild(zn.createElement("div")))),i.chart.html("").classed(o.classname,!0).classed(n.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.chart,s=function(){return a(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),u=i.render.lazy||s(),c=In.MutationObserver;u&&c&&!1!==i.render.observe&&!t&&new c(function(t,i){a(this,e),s()||(i.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),u&&!t||n.convertData(i,function(t){a(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this,e=this,n=e.config,i=e.format,r=e.state,o=n.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===n.padding&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),i.extraLineClasses=e.generateExtraLineClass(),i.dataTime=n.data_xLocaltime?Y:G,i.axisTime=n.axis_x_localtime?U:V;var s=e.config.zoom_enabled&&"drag"===e.config.zoom_type;i.defaultAxisTime=function(n){a(this,t);var r=e.scale,o=r.x,u=r.zoom,c=s?u:u&&o.orgDomain().toString()!==u.domain().toString(),l=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||c&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(l)(n)}.bind(this)}r.isLegendRight="right"===n.legend_position,r.isLegendInset="inset"===n.legend_position,r.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,r.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=o&&!n.axis_x_show?0:30,r.inputType=function(t,e){var n=this,i=In.DocumentTouch,r=In.matchMedia,o=In.navigator,s=!1;if(e)if(o&&"maxTouchPoints"in o)s=o.maxTouchPoints>0;else if("ontouchmove"in In||i&&zn instanceof i)s=!0;else if(null!=r&&r("(pointer:coarse)").matches)s=!0;else{var u=o.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(u)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(u)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return a(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":s&&"touch")||"mouse"}(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.initWithData=function(t){var e=this,n=this,i=n.config,r=n.scale,o=n.state,s=n.$el,u=n.org,c=o,l=c.hasAxis,h=c.hasTreemap,f=i.interaction_enabled,d=n.hasType("polar");if(l&&(n.axis=n.getAxisInstance(),i.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),i.data_filter&&(n.data.targets=n.data.targets.filter(i.data_filter.bind(n.api))),i.data_hide&&n.addHiddenTargetIds(!0===i.data_hide?n.mapToIds(n.data.targets):i.data_hide),i.legend_hide&&n.addHiddenLegendIds(!0===i.legend_hide?n.mapToIds(n.data.targets):i.legend_hide),n.updateSizes(),n.updateScales(!0),l){var g=r.x,p=r.y,v=r.y2,y=r.subX,x=r.subY,b=r.subY2;g&&(g.domain(To(n.getXDomain(n.data.targets),!i.axis_x_inverted)),y.domain(g.domain()),u.xDomain=g.domain()),p&&(p.domain(n.getYDomain(n.data.targets,"y")),x.domain(p.domain())),v&&(v.domain(n.getYDomain(n.data.targets,"y2")),b&&b.domain(v.domain()))}if(s.svg=s.chart.append("svg").style("overflow","hidden").style("display","block"),f&&o.inputType){var m="touch"===o.inputType,_=i.onclick,T=i.onover,w=i.onout;s.svg.on("click",(null==_?void 0:_.bind(n.api))||null).on(m?"touchstart":"mouseenter",(null==T?void 0:T.bind(n.api))||null).on(m?"touchend":"mouseleave",(null==w?void 0:w.bind(n.api))||null)}i.svg_classname&&s.svg.attr("class",i.svg_classname);var A=Xa(i.color_tiles)&&n.patterns;(l||A||d||h||i.data_labels_backgroundColors)&&(s.defs=s.svg.append("defs"),l&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){a(this,e),n.appendClip(s.defs,o.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),A&&n.patterns.forEach(function(t){var n=this;return a(this,e),s.defs.append(function(){return a(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();var S,E=s.svg.append("g").classed(Lo.main,!0).attr("transform",h?null:n.getTranslate("main"));(s.main=E,i.subchart_show&&n.initSubchart(),i.tooltip_show&&n.initTooltip(),i.title_text&&n.initTitle(),!h&&i.legend_show&&n.initLegend(),i.data_empty_label_text&&E.append("text").attr("class",es.text+" "+Lo.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),l&&(i.regions.length&&n.initRegion(),i.clipPath||n.axis.init()),E.append("g").classed(Lo.chart,!0).attr("clip-path",l?o.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),l)&&(f&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),i.clipPath&&(null==(S=n.axis)||S.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),io(i.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){var k=n.getMinMaxData();io(i.data_onmin,n.api,k.min),io(i.data_onmax,n.api,k.max)}i.tooltip_show&&n.initShowTooltip(),o.rendered=!0},e.initChartElements=function(){var t=this,e=this,n=e.state,i=n.hasAxis,r=n.hasRadar,o=n.hasTreemap,s=[];if(i){var u=["bar","bubble","candlestick","line"];e.config.bar_front&&u.push(u.shift()),u.forEach(function(n){a(this,t);var i=vo(n);("line"===n&&e.hasTypeOf(i)||e.hasType(n))&&s.push(i)}.bind(this))}else if(o)s.push("Treemap");else{var c=e.hasType("polar");r||s.push("Arc","Pie"),e.hasType("gauge")?s.push("Gauge"):r?s.push("Radar"):c&&s.push("Polar")}s.forEach(function(n){a(this,t),e["init"+n]()}.bind(this)),Qa(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){var t=this.$el,e=t.chart,n=t.svg,i=t.defs,r=t.main,a=t.tooltip,o=t.legend,s=t.title,u=t.grid,c=t.needle,l=t.arcs,h=t.circle,f=t.bar,d=t.candlestick,g=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:n,defs:i,main:r,tooltip:a,legend:o,title:s,grid:u,arc:l,circles:h,bar:{bars:f},candlestick:d,line:{lines:g,areas:p},needle:c,text:{texts:v}}},e.setBackground=function(){var t=this,e=t.config.background,n=t.state,i=t.$el.svg;if(Qa(e)){var r=i.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?r.attr("href",e.imgUrl):e.color&&r.style("fill",e.color).attr("clip-path",n.clip.path),r.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this,n=this,i=n.state,r=i.hasAxis,o=i.hasRadar,s=i.hasTreemap,u=function(i){return a(this,e),n["updateTargetsFor"+i](t.filter(n["is"+i+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){a(this,e);var i=vo(t);("line"===t&&n.hasTypeOf(i)||n.hasType(t))&&u(i)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){var c="Arc";o?c="Radar":n.hasType("polar")&&(c="Polar"),u(c)}else s&&u("Treemap");var l=n.hasType("bubble")||n.hasType("scatter");l&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(l)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.$el.svg,r=n.$T,o="."+Lo.target;t&&(o+=", ."+jo.chartCircles+" > ."+jo.circles),r(i.selectAll(o).filter(function(t){return a(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this,n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(i){a(this,e);var r=n[i];Ua(r)&&(r=n[r]),n[i]=no(t,"with"+i,r)}.bind(this)),n},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this,e=this,n=e.config,i=e.state,r=function(t){var e,n=this,i=[],r=function(){var n=this;r.clear(),!1===t?Fn(function(){var t=this;a(this,n),i.forEach(function(e){return a(this,t),e()}.bind(this))}.bind(this),{timeout:200}):e=Is(function(){var t=this;a(this,n),i.forEach(function(e){return a(this,t),e()}.bind(this))}.bind(this),Ya(t)?t:200)};return r.clear=function(){a(this,n),e&&(Ls(e),e=null)}.bind(this),r.add=function(t){return a(this,n),i.push(t)}.bind(this),r.remove=function(t){return a(this,n),i.splice(i.indexOf(t),1)}.bind(this),r}(n.resize_timer),o=[];o.push(function(){return a(this,t),io(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){a(this,t),i.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){a(this,t),io(n.onresized,e.api),i.resizing=!1}.bind(this)),o.forEach(function(e){return a(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,In.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+d+"\n\t\t\t\t"+h.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t").replace("/\n/g","%0A");return"data:image/svg+xml;base64,"+Nh(g)}function zh(t){var e=this,n=t.getBoundingClientRect(),i=n.left,r=n.top,o=function(t){return a(this,e),t.textContent||t.childElementCount}.bind(this),s=[];return yo(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;a(this,e);var u=function(t){var e;a(this,n);var o=In.getComputedStyle(t),s=o.fill,u=o.fontFamily,c=o.fontSize,l=o.textAnchor,h=o.transform,f=function(t,e){var n=e.top,i=e.left,r=t.getBBox(),a=r.x,o=r.y,s=t.getScreenCTM(),u=s.a,c=s.b,l=s.c,h=s.d,f=s.e,d=s.f,g=t.getBoundingClientRect(),p=g.width,v=g.height;return{x:u*a+l*o+f-i,y:c*a+h*o+d-n+(v-Math.round(v/4)),width:p,height:v}}(t,{left:i,top:r}),d=f.x,g=f.y,p=f.width,v=f.height;return(e={})[t.textContent]={x:d,y:g,width:p,height:v,fill:s,fontFamily:u,fontSize:c,textAnchor:l,transform:h},e}.bind(this);if(t.childElementCount>1)return yo(t.querySelectorAll("tspan")).filter(o).forEach(function(t){a(this,n),s.push(u(t))}.bind(this)),[];s.push(u(t))}.bind(this)),s}var jh={export:function(t,e){var n=this,i=this.internal,r=i.state,o=i.$el,s=o.chart,u=o.svg,c=r.current,l=c.width,h=c.height,f=_o({width:l,height:h,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),d=Fh(s.node(),f,{width:l,height:h}),g=f.preserveFontStyle?zh(u.node()):[];if(e&&Xa(e)){var p=new Image;p.crossOrigin="Anonymous",p.onload=function(){a(this,n);var t=zn.createElement("canvas"),i=t.getContext("2d");t.width=f.width||l,t.height=f.height||h,i.drawImage(p,0,0),g.length&&(!function(t,e){var n=this;e.forEach(function(e){var i=this;a(this,n),Object.keys(e).forEach(function(n){var r=this;a(this,i);var o=e[n],s=o.x,u=o.y,c=o.width,l=o.height,h=o.fill,f=o.fontFamily,d=o.fontSize,g=o.transform;if(t.save(),t.font=d+" "+f,t.fillStyle=h,"none"===g)t.fillText(n,s,u);else{var p=g.replace(/(matrix|\(|\))/g,"").split(",");p.splice(4).every(function(t){return a(this,r),0==+t}.bind(this))?(p.push(s+c-c/4),p.push(u-l+l/3)):(p.push(s),p.push(u)),t.transform.apply(t,p),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(i,g),g.length=0),e.bind(this)(t.toDataURL(f.mimeType))}.bind(this),p.src=d}return d}},Bh={focus:function(t){var e=this,n=this.internal,i=n.state,r=n.mapToTargetIds(t),o=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),o.classed(Go.focused,!0).classed(Go.defocused,!1),n.hasArcType()&&!i.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+Xo.gaugeValue)),n.toggleFocusLegend(r,!0),i.focusedTargetIds=r,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return a(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this,n=this.internal,i=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Go.focused,!1).classed(Go.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+Xo.gaugeValue)),n.toggleFocusLegend(r,!1),i.focusedTargetIds=i.focusedTargetIds.filter(function(t){return a(this,e),r.indexOf(t)<0}.bind(this)),i.defocusedTargetIds=r},revert:function(t){var e=this.internal,n=e.config,i=e.state,r=e.$el,a=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(a)).classed(Go.focused,!1).classed(Go.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(a),n.legend_show&&(e.showLegend(a.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(a)).filter((function(){return Rn(this).classed(Go.legendItemFocused)})).classed(Go.legendItemFocused,!1)),i.focusedTargetIds=[],i.defocusedTargetIds=[]}},$h={legend:{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},Xh={load:function(t){var e=this,n=this.internal,i=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){a(this,e),i.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){a(this,e),i.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){a(this,e),i.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var i=this;a(this,e),Fn(function(){return a(this,i),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,i=t||{};Ja(i)&&this.tooltip.hide(),to(i)?i={ids:i}:Ua(i)&&(i={ids:[i]});var r=n.mapToTargetIds(i.ids);n.unload(r,function(){a(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),au.call(n,i.done,i.resizeAfter)}.bind(this))}};function Uh(t,e,n){var i=this,r=this.internal,o=r.mapToTargetIds(e),s=r.state.hiddenTargetIds.map(function(t){return a(this,i),o.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](o);var u=r.$el.svg.selectAll(r.selectorTargets(o)),c=t?null:"0";t&&s.length&&(u.style("display",null),io(r.config.data_onshown,this,s)),r.$T(u).style("opacity",c,"important").call(ro,function(){a(this,i),t||0!==s.length||(u.style("display","none"),io(r.config.data_onhidden,this,o)),u.style("opacity",c)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](o),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var Yh={show:function(t,e){void 0===e&&(e={}),Uh.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),Uh.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});var i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(t){return a(this,n),r[i.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return a(this,n),this.hide(r.hide,e)}.bind(this),0)}},Vh={show:function(t){var e,n,i=this,r=this.internal,o=r.$el,s=r.config,u=r.state,c=u.eventReceiver,l=u.hasTreemap,h=u.inputType;if(t.mouse&&(n=t.mouse),t.data){var f,d=t.data,g=null==(f=r.getYScaleById(d.id))?void 0:f(d.value);if(l&&d.id)c.rect=o.main.select(""+r.selectorTarget(d.id,void 0,"rect"));else if(r.isMultipleX())n=[r.xx(d),g];else{var p,v;s.tooltip_grouped||(n=[0,g]),e=null!=(p=d.index)?p:r.hasArcType()&&d.id?null==(v=r.getArcElementByIdOrIndex(d.id))?void 0:v.datum().index:r.getIndexByX(d.x)}}else Ga(t.x)?e=r.getIndexByX(t.x):Ga(t.index)&&(e=t.index);("mouse"===h?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){a(this,i),r.dispatchEvent(t,e,n)}.bind(this))},hide:function(){var t=this,e=this.internal,n=e.state.inputType,i=e.$el.tooltip,r=null==i?void 0:i.datum();if(r){var o=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){a(this,t),e.dispatchEvent(n,o)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}},Gh={tooltip:Vh},Hh=function t(e){this.plugins=[],this.internal=void 0;var n=new Ch(this);this.internal=n,function t(e,n,i){var r=this;Object.keys(e).forEach(function(o){a(this,r);var s=Xa(e[o]),u=n!==i,c=Qa(e[o]),l=c&&Object.keys(e[o]).length>0;n[o]=s&&(!u&&l||u)?e[o].bind(i):c&&!s?{}:e[o],l&&t(e[o],n[o],i)}.bind(this))}(t.prototype,this,this),Ih.call(n,e),n.beforeInit(),n.init()};function Wh(t,e,n){var i=this,r=t.config,o=function(t,n){a(this,i);var o=Ya(n)?n:!1===n?void 0:null;null!==o&&(r["axis_"+t+"_"+e]=o)}.bind(this);Ga(n)&&(Ka(n)?Object.keys(n).forEach(function(t){a(this,i),o(t,n[t])}.bind(this)):(Ya(n)||!1===n)&&["y","y2"].forEach(function(t){a(this,i),o(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qh(t,e){var n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}po(Hh.prototype,[Lh,{color:function(t){return this.internal.color(t)}},Dh,jh,Bh,$h,Xh,Yh,Gh]);var Zh={labels:function(t){var e,n=this,i=this.internal;return t&&(Object.keys(t).forEach(function(e){a(this,n),i.axis.setLabelText(e,t[e])}.bind(this)),i.axis.updateLabels()),["x","y","y2"].forEach(function(t){a(this,n);var r=i.axis.getLabelText(t);r&&(e||(e={}),e[t]=r)}.bind(this)),e},min:function(t){var e=this.internal;return $a(t)||!1===t?Wh(e,"min",t):qh(e,"min")},max:function(t){var e=this.internal;return $a(t)||!1===t?Wh(e,"max",t):qh(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};var n=t.min,i=t.max;Ga(i)&&e.max(i),Ga(n)&&e.min(n)}},Kh={axis:Zh};function Jh(t,e){var n=this.internal,i=n.config,r=i.transition_duration&&Mo(),a="grid_"+e+"_lines";return t?(i[a]=t,n.updateGrid(),n.redrawGrid(r),i[a]):i[a]}function Qh(t,e){return Jh.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function tf(t,e){this.internal.removeGridLines(t,e)}var ef=function(t){return Jh.bind(this)(t,"x")};po(ef,{add:function(t){return Qh.bind(this)(t,"x")},remove:function(t){return tf.bind(this)(t,!0)}});var nf=function(t){return Jh.bind(this)(t,"y")};po(nf,{add:function(t){return Qh.bind(this)(t,"y")},remove:function(t){return tf.bind(this)(t,!1)}});var rf={xgrids:ef,ygrids:nf},af={groups:function(t){var e=this.internal,n=e.config;return Va(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function of(t,e){void 0===e&&(e=!1);var n=this.internal,i=n.config,r=i.transition_duration&&Mo();return t?(i.regions=e?i.regions.concat(t):t,n.updateRegion(),n.redrawRegion(r),e?i.regions:t):i.regions}var sf=function(t){return of.bind(this)(t)};po(sf,{add:function(t){return of.bind(this)(t,!0)},remove:function(t){var e=this,n=this.internal,i=n.config,r=n.$T,o=t||{},s=no(o,"classes",[Ko.region]),u=n.$el.main.select("."+Ko.regions).selectAll(s.map(function(t){return a(this,e),"."+t}.bind(this)));return r(u).style("opacity","0").remove(),u=i.regions,Object.keys(o).length?(u=u.filter(function(t){var n=this;a(this,e);var i=!1;return!t.class||(t.class.split(" ").forEach(function(t){a(this,n),s.indexOf(t)>=0&&(i=!0)}.bind(this)),!i)}.bind(this)),i.regions=u):i.regions=[],u}});var uf={regions:sf},cf={x:function(t){var e=this.internal,n=e.axis,i=e.data,r=n.isCustomX()&&n.isCategorized();return to(t)&&(r?this.categories(t):(e.updateTargetX(i.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),r?this.categories():i.xs},xs:function(t){var e=this.internal;return eo(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},lf={flow:function(t){var e,n=this,i=this.internal;(t.json||t.rows||t.columns)&&i.convertData(t,function(r){a(this,n),e=r,function(){var n,r,o,s=this,u=0,c=0;if(i.state.redrawing||!e||!Mo())return;var l=[],h=i.getMaxDataCount(),f=i.convertDataToTargets(e,!0),d=i.axis.isTimeSeries();i.data.targets.forEach(function(t){a(this,s);for(var e=!1,n=0;n1?g.values[g.values.length-1].x-p.x:p.x-i.getXDomain(i.data.targets)[0]:1,n=[p.x-r,p.x]);n&&i.updateXDomain(null,!0,!0,!1,n),i.updateTargets(i.data.targets),i.redraw({flow:{index:p.index,length:u,duration:$a(t.duration)?t.duration:i.config.transition_duration,done:t.done,orgDataCount:h},withLegend:!0,withTransition:h>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}};function hf(t){return t}var ff=1,df=2,gf=3,pf=4,vf=1e-6;function yf(t){return"translate("+t+",0)"}function xf(t){return"translate(0,"+t+")"}function bf(t){var e=this;return function(n){return a(this,e),+t(n)}.bind(this)}function mf(t,e){var n=this;return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(i){return a(this,n),+t(i)+e}.bind(this)}function _f(){return!this.__axis}function Tf(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=t===ff||t===pf?-1:1,l=t===pf||t===df?"x":"y",h=t===ff||t===gf?yf:xf;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,g=null==r?e.tickFormat?e.tickFormat.apply(e,n):hf:r,p=Math.max(a,0)+s,v=e.range(),y=+v[0]+u,x=+v[v.length-1]+u,b=(e.bandwidth?mf:bf)(e.copy(),u),m=f.selection?f.selection():f,_=m.selectAll(".domain").data([null]),T=m.selectAll(".tick").data(d,e).order(),w=T.exit(),A=T.enter().append("g").attr("class","tick"),S=T.select("line"),E=T.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(l+"2",c*a)),E=E.merge(A.append("text").attr("fill","currentColor").attr(l,c*p).attr("dy",t===ff?"0em":t===gf?"0.71em":"0.32em")),f!==m&&(_=_.transition(f),T=T.transition(f),S=S.transition(f),E=E.transition(f),w=w.transition(f).attr("opacity",vf).attr("transform",(function(t){return isFinite(t=b(t))?h(t+u):this.getAttribute("transform")})),A.attr("opacity",vf).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+u)}))),w.remove(),_.attr("d",t===pf||t===df?o?"M"+c*o+","+y+"H"+u+"V"+x+"H"+c*o:"M"+u+","+y+"V"+x:o?"M"+y+","+c*o+"V"+u+"H"+x+"V"+c*o:"M"+y+","+u+"H"+x),T.attr("opacity",1).attr("transform",(function(t){return h(b(t)+u)})),S.attr(l+"2",c*a),E.attr(l,c*p).text(g),m.filter(_f).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===df?"start":t===pf?"end":"middle"),m.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(u=+t,f):u},f}function wf(t){return Tf(ff,t)}function Af(t){return Tf(df,t)}function Sf(t){return Tf(gf,t)}function Ef(t){return Tf(pf,t)}var kf=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=pl(),n=t.config,i=t.params;this.owner=t,this.config=n,this.scale=e,!n.noTransition&&i.config.transition_duration||(n.withoutTransition=!0),n.range=this.scaleExtent((i.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this,n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){a(this,e);try{var i=t.node().getBBox(),r=i.width,o=i.height;r&&o&&(n.w=r,n.h=o)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return a(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this,n=this.config,i="x"===t?function(t){return a(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return a(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;a(this,e),t.attr("transform",function(t){return a(this,r),$a(t)?i(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){var e=t[0],n=t[t.length-1];return e0?o:1,s]).range(t.range());u=h.ticks();for(var f=s.toFixed().length;u.length>15;f--)u=h.ticks(f);u.splice(0,1,o),u.splice(u.length-1,1,s)}u=u.map(function(t){return a(this,n),Ua(t)&&Ya(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(var d=Math.ceil(o);d0&&u[0]>0&&u.unshift(u[0]-(u[1]-u[0]))}return u},e.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){var e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=e?e(n):n;return Ga(i)?i:""},e.transitionise=function(t){var e=this.config,n=t;if(e.withoutTransition)n=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{n=t.transition(e.transition)}catch(t){}return n},t}(),Mf=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new kf(this)}var e=t.prototype;return e.create=function(t){var e=this,n=e.config,i=e.helper,r=e.params,o=i.scale,s=n.orient,u=this.splitTickText.bind(e),c=/^(left|right)$/.test(s),l=/^(top|bottom)$/.test(s),h=i.getTickTransformSetter(l?"x":"y"),f=h===i.axisX?"y":"x",d=/^(top|left)$/.test(s)?-1:1,g=r.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():i.scaleExtent((r.orgXScale||o).range());var p,v=n.innerTickSize,y=n.tickLength,x=n.range,b=r.id,m=b&&/^(x|y|y2)$/.test(b)?r.config["axis_"+b+"_tick_text_position"]:{x:0,y:0},_="subX"===b?"subchart_axis_x":"axis_"+b,T=r.config[_+"_show"],w=!!T&&r.config[_+"_tick_show"],A=!!T&&r.config[_+"_tick_text_show"];t.each((function(){var t=this,b=Rn(this),_=this.__chart__||o,T=i.copyScale();p=b,this.__chart__=T,n.tickOffset=r.isCategory?Math.ceil((T(1)-T(0))/2):0;var S=b.selectAll(".domain").data([0]);if(S.enter().append("path").attr("class","domain").merge(S).attr("d",function(){a(this,t);var e=n.outerTickSize*d;return l?"M"+x[0]+","+e+"V0H"+x[1]+"V"+e:"M"+e+","+x[0]+"H0V"+x[1]+"H"+e}.bind(this)),w||A){var E=n.tickValues||i.generateTicks(T,c);e.generatedTicks=E;var k=b.selectAll(".tick").data(E,T),M=k.enter().insert("g",".domain").attr("class","tick"),O=k.exit().remove();k=M.merge(k),w&&M.append("line"),A&&M.append("text");var R=kf.getSizeFor1Char(k),C=[],I=k.select("text").selectAll("tspan").data(function(e,n){var o=this;a(this,t);var s=r.tickMultiline?u(e,T,E,c,R.w):to(i.textFormatted(e))?i.textFormatted(e).concat():[i.textFormatted(e)];return C[n]=s.length,s.map(function(t){return a(this,o),{index:n,splitted:t}}.bind(this))}.bind(this));I.exit().remove(),(I=I.enter().append("tspan").merge(I).text(function(e){return a(this,t),e.splitted}.bind(this))).attr("x",l?0:y*d).attr("dx",function(){a(this,t);var e=0;return/(top|bottom)/.test(s)&&g&&(e=8*Math.sin(Math.PI*(g/180))*("top"===s?-1:1)),e+(m.x||0)}.bind(this)()).attr("dy",function(e,n){a(this,t);var i=0;return"top"!==s&&(i=R.h,0===n&&(i=c?-((C[e.index]-1)*(R.h/2)-3):0===m.y?".71em":0)),Ya(i)&&m.y?i+m.y:i||".71em"}.bind(this));var L=k.select("line"),P=k.select("text");if(M.select("line").attr(f+"2",v*d),M.select("text").attr(f,y*d),e.setTickLineTextPosition(L,P),r.tickTitle){var D=P.select("title");(D.empty()?P.append("title"):D).text(function(e){return a(this,t),r.tickTitle[e]}.bind(this))}if(T.bandwidth){var N=T,F=N.bandwidth()/2;_=function(e){return a(this,t),N(e)+F}.bind(this),T=_}else _.bandwidth?_=T:h(O,T);k=r.owner.state.flowing?i.transitionise(k):r.owner.$T(k),h(M,_),h(k.style("opacity",null),T)}})),this.g=p},e.getGeneratedTicks=function(t){var e,n=this,i=(null==(e=this.generatedTicks)?void 0:e.length)-1,r=this.generatedTicks;if(i>t){var o=Math.round(i/t+.1);r=this.generatedTicks.map(function(t,e){return a(this,n),e%o==0?t:null}.bind(this)).filter(function(t){return a(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){var e=this.helper.scale,n=this.config,i=n,r=i.innerTickSize,a=i.range,o=e(t)+(n.tickCentered?0:n.tickOffset);return a[0]0?0:1]:"middle"}.bind(this),f=function(t){return a(this,n),t?"rotate("+t+")":null}.bind(this),d=function(t){return a(this,n),t?11.5-2.5*(t/("bottom"===s?15:23))*(t>0?1:-1):u}.bind(this);switch(s){case"bottom":t.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"top":t.attr("x2",0).attr("y2",-o),e.attr("x",0).attr("y",2*-d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"left":t.attr("x2",-o).attr("y1",i.y).attr("y2",i.y),e.attr("x",-u).attr("y",c).style("text-anchor","end");break;case"right":t.attr("x2",o).attr("y2",0),e.attr("x",u).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,n,i,r){var a=this.params,o=this.helper.textFormatted(t),s=Ua(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(s.length)return s;if(to(o))return o;var u=a.tickWidth;return(!u||u<=0)&&(u=i?95:a.isCategory?Math.ceil(a.isInverted?e(n[0])-e(n[1]):e(n[1])-e(n[0]))-12:110),function t(e,n){for(var i,a,o,s=1;s=0||n.hasRadar},e.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||Qa(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");var e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this,e=this.owner,n=e.config,i=e.$el,r=i.main,o=i.axis,s=e.state.clip,u=n.axis_rotated,c=["x","y"];n.axis_y2_show&&c.push("y2"),c.forEach(function(i){var c=this;a(this,t);var l=this.getAxisClassName(i),h=No["axis"+i.toUpperCase()+"Label"];o[i]=r.append("g").attr("class",l).attr("clip-path",function(){a(this,c);var t=null;return"x"===i?t=s.pathXAxis:"y"===i&&(t=s.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(i)).style("visibility",n["axis_"+i+"_show"]?null:"hidden"),o[i].append("text").attr("class",h).attr("transform",["rotate(-90)",null]["x"===i?+!u:+u]).style("text-anchor",function(){return a(this,c),this.textAnchorForAxisLabel(i)}.bind(this)),this.generateAxes(i)}.bind(this))},e.setOrient=function(){var t=this.owner.config,e=t.axis_rotated,n=t.axis_y_inner,i=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?n?"top":"bottom":n?"right":"left",y2:e?i?"bottom":"top":i?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e,n=this,i=this.owner,r=i.config,o=[],s=r["axis_"+t+"_axes"],u=r.axis_rotated;"x"===t?e=u?Ef:Sf:"y"===t?e=u?Sf:Ef:"y2"===t&&(e=u?wf:Af),s.length&&s.forEach(function(r){var s=this;a(this,n);var u=r.tick||{},c=i.scale[t].copy();r.domain&&c.domain(r.domain),o.push(e(c).ticks(u.count).tickFormat(Xa(u.format)?u.format.bind(i.api):function(t){return a(this,s),t}.bind(this)).tickValues(u.values).tickSizeOuter(!1===u.outer?0:6))}.bind(this)),this.axesList[t]=o},e.updateAxes=function(){var t=this,e=this.owner,n=e.config,i=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(o){var s=this;a(this,t);var u=n["axis_"+o+"_axes"],c=e.scale[o].copy(),l=c.range();this.axesList[o].forEach(function(t,h){var f=this;a(this,s);var d=t.scale().range();l.every(function(t,e){return a(this,f),t===d[e]}.bind(this))||t.scale().range(l);var g=this.getAxisClassName(o)+"-"+(h+1),p=i.select("."+g.replace(/\s/,"."));p.empty()?p=i.append("g").attr("class",g).style("visibility",n["axis_"+o+"_show"]?null:"hidden").call(t):(u[h].domain&&c.domain(u[h].domain),r(p).call(t.scale(c))),p.attr("transform",e.getTranslate(o,h+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,n,i){var r=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,n,!("x"!==t||!(r.scale.zoom||r.config.subchart_show||r.state.resizing))||i)},e.getAxis=function(t,e,n,i,r){var o,s=this,u=this.owner,c=u.config,l=/^(x|subX)$/.test(t),h=l?"x":t,f=l&&this.isCategorized(),d=this.orient[t],g=r?0:u.getAxisTickRotate(h);if(l)o="subX"===t?u.format.subXAxisTick:u.format.xAxisTick;else{var p=c["axis_"+t+"_tick_format"];Xa(p)&&(o=p.bind(u.api))}var v=this.tick[h],y=_o({outerTick:n,noTransition:i,config:c,id:t,tickTextRotate:g,owner:u},l&&{isCategory:f,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:f&&c.axis_x_tick_tooltip&&u.api.categories(),orgXScale:u.scale.x});l||(y.tickStepSize=c["axis_"+h+"_tick_stepSize"]);var x=new Mf(y).scale(l&&u.scale.zoom||e).orient(d);if(l&&this.isTimeSeries()&&v&&!Xa(v)){var b=ko.bind(u);v=v.map(function(t){return a(this,s),b(t)}.bind(this))}else!l&&this.isTimeSeriesY()&&(x.ticks(c.axis_y_tick_time_value),v=null);v&&x.tickValues(v),x.tickFormat(o||!l&&u.isStackNormalized()&&function(t){return a(this,s),t+"%"}.bind(this)),f&&(x.tickCentered(c.axis_x_tick_centered),Ja(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));var m=c["axis_"+h+"_tick_count"];return m&&x.ticks(m),x},e.updateXAxisTickValues=function(t,e){var n,i=this.owner,r=i.config,a=r.axis_x_tick_fit,o=r.axis_x_tick_count;if((a||o&&a)&&(n=i.mapTargetsToUniqueXs(t),this.isCategorized()&&o>n.length&&(o=n.length),n=this.generateTickValues(n,o,this.isTimeSeries())),e)e.tickValues(n);else if(this.x){var s;this.x.tickValues(n),null==(s=this.subX)||s.tickValues(n)}return n},e.getId=function(t){var e=this.owner,n=e.config,i=e.scale,r=n.data_axes[t];return r&&i[r]||(r="y"),r},e.getXAxisTickFormat=function(t){var e,n=this,i=this.owner,r=i.config,o=i.format,s=t&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,u=this.isTimeSeries(),c=this.isCategorized();return s?Xa(s)?e=s.bind(i.api):u&&(e=function(t){return a(this,n),t?o.axisTime(s)(t):""}.bind(this)):e=u?o.defaultAxisTime:c?i.categoryName:function(t){return a(this,n),t<0?t.toFixed(0):t}.bind(this),Xa(e)?function(t){return a(this,n),e.apply(i,c?[t,i.categoryName(t)]:[t])}.bind(this):e},e.getTickValues=function(t){var e=this.owner,n=e.config["axis_"+t+"_tick_values"],i=e[t+"Axis"];return(Xa(n)?n.call(e.api):n)||(i?i.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return Ua(e)?e:e?e.text:null},e.setLabelText=function(t,e){var n=this.owner.config,i=this.getLabelOptionByAxisId(t);Ua(i)?n["axis_"+t+"_label"]=e:i&&(i.text=e)},e.getLabelPosition=function(t,e){var n=this,i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),o=Ka(r)&&r.position?r.position:e[+!i],s=function(t){return a(this,n),!!~o.indexOf(t)}.bind(this);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){var e=this.owner,n=e.state,i=n.width,r=n.height,a=this.getAxisLabelPosition(t),o=a.isMiddle?-r/2:0;return this.isHorizontal(e,"x"!==t)?o=a.isLeft?0:a.isCenter?i/2:i:a.isBottom&&(o=-r),o},e.dxForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(i="-0.5em"),i},e.textAnchorForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(i="start"),i},e.dyForAxisLabel=function(t){var e,n=this.owner,i=n.config,r=i.axis_rotated,a=this.getAxisLabelPosition(t).isInner,o=i["axis_"+t+"_tick_rotate"]?n.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);if("x"===t){var u=i.axis_x_height;e=r?a?"1.2em":-25-s:a?"-0.5em":u?u-10:o?o-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=r?a?e[0]:o?o*("y2"===t?-1:1)-e[1]:e[2]:a?e[3]:(e[4]+(i["axis_"+t+"_inner"]?0:s+e[4]))*("y"===t?-1:1);return e},e.getMaxTickWidth=function(t,e){var n=this,i=this.owner,r=i.config,o=i.state.current,s=i.$el,u=s.svg,c=s.chart,l=o.maxTickWidths[t],h=0;if(e||!r["axis_"+t+"_show"]||l.size>0&&0===i.filterTargetsToShow().length)return l.size;if(u){var f=/^y2?$/.test(t),d=i.filterTargetsToShow(i.data.targets),g=i.scale[t].copy().domain(i["get"+(f?"Y":"X")+"Domain"](d,t)),p=g.domain(),v=p[0]===p[1]&&p.every(function(t){return a(this,n),t>0}.bind(this)),y=to(l.domain)&&l.domain[0]===l.domain[1]&&l.domain.every(function(t){return a(this,n),t>0}.bind(this));if(v||y)return l.size;l.domain=p,f||l.ticks.splice(0);var x=this.getAxis(t,g,!1,!1,!0),b=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&b&&x.tickValues(this.generateTickValues(p,b,f?this.isTimeSeriesY():this.isTimeSeries())),f||this.updateXAxisTickValues(d,x);var m=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");x.create(m),m.selectAll("text").each((function(t,e){var n=this.getBoundingClientRect().width;h=Math.max(h,n),f||(l.ticks[e]=n)})),m.remove()}return h>0&&(l.size=h),l.size},e.getXAxisTickTextY2Overflow=function(t){var e=this.owner,n=e.axis,i=e.config,r=e.state,a=e.getAxisTickRotate("x");if((n.isCategorized()||n.isTimeSeries())&&i.axis_x_tick_fit&&!i.axis_x_tick_culling&&!i.axis_x_tick_multiline&&a>0&&a<90){var o=r.current.width-e.getCurrentPaddingLeft(),s=this.getXAxisTickMaxOverflow(a,o-t),u=Math.max(0,s)+t;return Math.min(u,o/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){for(var n=this.owner,i=n.axis,r=n.config,a=n.state,o=i.isTimeSeries(),s=a.current.maxTickWidths.x.ticks,u=s.length,c=a.axis.x.padding,l=c.left,h=c.right,f=0,d=u-(o&&r.axis_x_tick_fit?.5:0),g=0;g2){var s,u=this.isCategorized(),c=o-2,l=t[0],h=t[t.length-1];r=[l];for(var f=0;f=d)&&(t=!0,n.preventDefault())}.bind(this);s.on("touchstart",function(t){a(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(t){if(a(this,e),r.event=t,!s.empty()&&s.classed(Vo.eventRect)){if(r.dragging||r.flowing||n.hasArcType()||t.touches.length>1)return;g(t),c(s.node())}else l()}.bind(this),!0).on("touchend.eventRect",function(t){a(this,e),r.event=t,!s.empty()&&s.classed(Vo.eventRect)&&(n.hasArcType()||!n.toggleShape||r.cancelClick)&&r.cancelClick&&(r.cancelClick=!1)}.bind(this),!0),u.on("touchstart",function(t){a(this,e),r.event=t;var n=t.target;n&&n!==s.node()&&l()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);var i=this.state,r=this.$el,o=i,s=o.eventReceiver,u=o.width,c=o.height,l=o.rendered,h=o.resizing,f=t||r.eventRect,d=function(){a(this,n),s&&(s.rect=f.node().getBoundingClientRect())}.bind(this);(!l||h||e)&&(f.attr("x",0).attr("y",0).attr("width",u).attr("height",c),l&&!e||f.classed(Vo.eventRect,!0)),d()},updateEventRectData:function(){var t,e,n,i,r=this,o=this,s=o.config,u=o.scale,c=o.state,l=u.zoom||u.x,h=s.axis_rotated;if(o.isMultipleX())t=0,e=0,n=c.width,i=c.height;else{var f,d;if(o.axis.isCategorized())f=o.getEventRectWidth(),d=function(t){return a(this,r),l(t.x)-f/2}.bind(this);else{var g=function(t){var e=t.index;return a(this,r),{prev:o.getPrevX(e),next:o.getNextX(e)}}.bind(this);f=function(t){var e=this;a(this,r);var n,i=g(t),o=l.domain();return null===i.prev&&null===i.next?n=h?c.height:c.width:null===i.prev?n=(l(i.next)+l(t.x))/2:null===i.next?n=l(o[1])-(l(i.prev)+l(t.x))/2:(Object.keys(i).forEach(function(t,n){var r;a(this,e),i[t]=null!=(r=i[t])?r:o[n]}.bind(this)),n=Math.max(0,(l(i.next)-l(i.prev))/2)),n}.bind(this),d=function(t){a(this,r);var e=g(t);return null===e.prev&&null===e.next?0:null===e.prev?l(l.domain()[0]):(l(t.x)+l(e.prev))/2}.bind(this)}t=h?0:d,e=h?d:0,n=h?c.width:f,i=h?f:c.height}var p=c.eventReceiver,v=function(t,e){return a(this,r),Xa(t)?t(e):t}.bind(this);p.coords.splice(p.data.length),p.data.forEach(function(o,s){a(this,r),p.coords[s]={x:v(t,o),y:v(e,o),w:v(n,o),h:v(i,o)}}.bind(this))},selectRectForSingle:function(t,e){var n=this,i=this,r=i.config,o=i.$el,s=o.main,u=o.circle,c=r.data_selection_enabled,l=r.data_selection_grouped,h=r.data_selection_isselectable,f=r.tooltip_grouped,d=i.getAllValuesOnIndex(e);if(!f||(i.showTooltip(d,t),null==i.showGridFocus||i.showGridFocus(d),c&&!l)){u||s.selectAll("."+Lo.EXPANDED+":not(."+Qo.shape+"-"+e+")").classed(Lo.EXPANDED,!1);var g=s.selectAll("."+Qo.shape+"-"+e).classed(Lo.EXPANDED,!0).style("cursor",h?"pointer":null).filter((function(t){return i.isWithinShape(this,t)}));g.empty()&&!f&&(null==i.hideGridFocus||i.hideGridFocus(),i.hideTooltip(),l||i.setExpand(e)),g.call(function(r){var o=this;a(this,n);var s=r.data();c&&(l||null!=h&&h.bind(i.api)(s))&&(t.style.cursor="pointer"),f||(i.showTooltip(s,t),null==i.showGridFocus||i.showGridFocus(s),null==i.unexpandCircles||i.unexpandCircles(),r.each(function(t){return a(this,o),i.setExpand(e,t.id)}.bind(this)))}.bind(this))}},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);var i=this,r=i.config,o=i.state,s=i.filterTargetsToShow(i.data.targets);if(!o.dragging&&!i.hasArcType(s)){var u=uo(o.event,t),c=i.findClosestFromTargets(s,u);if(!e||!o.mouseover||c&&c.id===o.mouseover.id||(r.data_onout.call(i.api,o.mouseover),o.mouseover=void 0),c){var l=(i.isBubbleType(c)||i.isScatterType(c)||!r.tooltip_grouped?[c]:i.filterByX(s,c.x)).map(function(t){return a(this,n),i.addName(t)}.bind(this));i.showTooltip(l,t),i.setExpand(c.index,c.id,!0),i.showGridFocus(l);var h=i.dist(c,u);(i.isBarType(c.id)||h-1?o.data[i]:null}.bind(this);s.on("mouseover",function(t){a(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(t){var e=u(t);if(r.event=t,e){var a=e.index,s=i.line_step_type;if(i.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(s)){var c=n.scale.zoom||n.scale.x,l=n.axis.xs[a],h=c.invert(uo(t,this)[0]);"step-after"===s&&hl&&(a+=1)}var f=i.tooltip_grouped&&a===o.currentIdx;r.dragging||r.flowing||n.hasArcType()||f?f&&n.setTooltipPosition():(a!==o.currentIdx&&(n.setOverOut(!1,o.currentIdx),o.currentIdx=a),-1===a?n.unselectRect():n.selectRectForSingle(this,a),n.setOverOut(-1!==a,a))}})).on("mouseout",function(t){a(this,e),r.event=t,i&&!n.hasArcType()&&-1!==o.currentIdx&&(n.unselectRect(),n.setOverOut(!1,o.currentIdx),o.currentIdx=-1)}.bind(this))}return s},clickHandlerForSingleX:function(t,e){var n=e,i=n.config,r=n.state,a=n.$el.main;if(!t||n.hasArcType()||r.cancelClick)r.cancelClick&&(r.cancelClick=!1);else{var o=t.index;a.selectAll("."+Qo.shape+"-"+o).each((function(t){(i.data_selection_grouped||n.isWithinShape(this,t))&&(null==n.toggleShape||n.toggleShape(this,t,o),i.data_onclick.bind(n.api)(t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=this,i=n.state;t.on("click",(function(t){i.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===i.inputType&&t.on("mouseover mousemove",(function(t){i.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){a(this,e),i.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){var e=t,n=e.config,i=e.state,r=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(r)){var a=uo(i.event,this),o=e.findClosestFromTargets(r,a);o&&(e.isBarType(o.id)||e.dist(o,a)1&&(i=i[n[1]]),null!=(e=i)&&e.size()&&(u[t]=i)}.bind(this)),e.hideGridFocus(),e.setFlowList(u,t)}},setFlowList:function(t,e){var n,i=this,r=this,o=e.flow,s=e.targets,u=o,c=u.duration,l=void 0===c?e.duration:c,h=u.index,f=u.length,d=u.orgDataCount,g=r.getFlowTransform(s,d,h,f),p=Ps();p.add(Object.keys(t).map(function(e){var o=this;return a(this,i),n=t[e].transition().ease(If).duration(l),n="axis.x"===e?n.call(function(t){a(this,o),r.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?n.filter(r.isRegionOnX).attr("transform",g):n.attr("transform",g)}.bind(this))),n.call(p,function(){a(this,i),r.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this,i=this,r=i.config,o=i.state,s=i.$el.svg,u=r.axis_rotated,c=e.flow,l=e.shape,h=e.xv,f=l.pos,d=f.cx,g=f.cy,p=f.xForText,v=f.yForText,y=c,x=y.done,b=void 0===x?function(){a(this,n)}.bind(this):x,m=y.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){a(this,n);for(var e=[],i=0;i=0?"":zn.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this.config,n=this.state,i=n.margin,r=n.width,a=n.height,o=e.axis_rotated,s=Math.max(30,i.left)-(o?0:20),u=o?-(1+s):-(s-1),c=-Math.max(15,i.top),l=o?i.left+20:r+10+s,h=(o?i.top+a+10:i.bottom)+20;t.attr("x",u).attr("y",c).attr("width",l).attr("height",h)},setYAxisClipPath:function(t){var e,n=this.config,i=this.state,r=i.margin,a=i.width,o=i.height,s=n.axis_rotated,u=Math.max(30,r.left)-(s?20:0),c=n.axis_y_inner,l=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+u):-(u-1),h=-(s?20:r.top),f=(s?a+15+u:r.left+20)+(c?20:0),d=(s?r.bottom+("fit"===(null==(e=n.padding)?void 0:e.mode)?10:0):r.top+o)+10;t.attr("x",l).attr("y",h).attr("width",f).attr("height",d)},updateXAxisTickClip:function(){var t=this,e=t.config,n=t.state,i=n.clip,r=n.xAxisHeight,a=t.$el.defs,o=t.getHorizontalAxisHeight("x");if(a&&!i.idXAxisTickTexts){var s=i.id+"-xaxisticktexts";t.appendClip(a,s),i.pathXAxisTickTexts=t.getClipPath(i.idXAxisTickTexts),i.idXAxisTickTexts=s}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var t=this,e=t.config,n=t.state.current.maxTickWidths,i=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&i){var r=Math.sin(Math.PI/180*Math.abs(i));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/r}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this.state,e=t.clip,n=t.current,i=this.$el.svg;i&&i.select("#"+e.idXAxisTickTexts+" rect").attr("width",n.maxTickWidths.x.clipPath).attr("height",30)}},Df=void 0,Nf=function(t){return a(this,Df),$a(t.position)||"end"}.bind(void 0),Ff=function(t){return a(this,Df),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function zf(t,e,n){var i=this;return function(r){a(this,i);var o=t?0:e;return"start"===r.position?o=t?-n:0:"middle"===r.position&&(o=(t?-n:e)/2),o}.bind(this)}function jf(t,e){"grid"===e&&t.each((function(){var t=this,e=Rn(this);["x1","x2","y1","y2"].forEach(function(n){return a(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Bf={hasGrid:function(){var t=this,e=this.config;return["x","y"].some(function(n){return a(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g","."+Lo.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",Ho.grid+" "+Ho.gridLines),i.gridLines.main.append("g").attr("class",Ho.xgridLines),i.gridLines.main.append("g").attr("class",Ho.ygridLines),i.gridLines.x=Th([]))},updateXGrid:function(t){var e=this,n=this,i=n.config,r=n.scale,o=n.state,s=n.$el,u=s.main,c=s.grid,l=i.axis_rotated,h=n.generateGridData(i.grid_x_type,r.x),f=n.axis.isCategorized()?n.axis.x.tickOffset():0,d=function(t){return a(this,e),(r.zoom||r.x)(t)+f*(l?-1:1)}.bind(this);o.xgridAttr=l?{x1:0,x2:o.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:o.height},c.x=u.select("."+Ho.xgrids).selectAll("."+Ho.xgrid).data(h),c.x.exit().remove(),c.x=c.x.enter().append("line").attr("class",Ho.xgrid).merge(c.x),t||c.x.each((function(){var t=this,e=Rn(this);Object.keys(o.xgridAttr).forEach(function(n){var i=this;a(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return a(this,i),e.attr(l?"y1":"x1")===(l?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this,e=this,n=e.axis,i=e.config,r=e.scale,o=e.state,s=e.$el,u=s.grid,c=s.main,l=i.axis_rotated,h=function(e){return a(this,t),Math.ceil(r.y(e))}.bind(this),f=n.y.getGeneratedTicks(i.grid_y_ticks)||e.scale.y.ticks(i.grid_y_ticks);u.y=c.select("."+Ho.ygrids).selectAll("."+Ho.ygrid).data(f),u.y.exit().remove(),u.y=u.y.enter().append("line").attr("class",Ho.ygrid).merge(u.y),u.y.attr("x1",l?h:0).attr("x2",l?h:o.width).attr("y1",l?0:h).attr("y2",l?o.height:h),jf(u.y,"grid")},updateGrid:function(){var t=this,e=t.$el,n=e.grid;e.gridLines.main||t.initGridLines(),n.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateXGridLines(),t.updateYGridLines()},updateXGridLines:function(){var t=this,e=this,n=e.config,i=e.$el,r=i.gridLines,o=i.main,s=e.$T,u=n.axis_rotated;n.grid_x_show&&e.updateXGrid();var c=o.select("."+Ho.xgridLines).selectAll("."+Ho.xgridLine).data(n.grid_x_lines);s(c.exit()).style("opacity","0").remove();var l=c.enter().append("g");l.append("line").style("opacity","0"),l.append("text").attr("transform",u?null:"rotate(-90)").attr("dy",-5).style("opacity","0"),s((c=l.merge(c)).attr("class",function(e){return a(this,t),(Ho.xgridLine+" "+(e.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Nf).attr("dx",Ff)).text(function(e){return a(this,t),e.text}.bind(this)).style("opacity",null),r.x=c},updateYGridLines:function(){var t=this,e=this,n=e.config,i=e.state,r=i.width,o=i.height,s=e.$el,u=e.$T,c=n.axis_rotated;n.grid_y_show&&e.updateYGrid();var l=s.main.select("."+Ho.ygridLines).selectAll("."+Ho.ygridLine).data(n.grid_y_lines);u(l.exit()).style("opacity","0").remove();var h=l.enter().append("g");h.append("line").style("opacity","0"),h.append("text").attr("transform",c?"rotate(-90)":"").style("opacity","0"),l=h.merge(l);var f=e.yv.bind(e);u(l.attr("class",function(e){return a(this,t),(Ho.ygridLine+" "+(e.class||"")).trim()}.bind(this)).select("line")).attr("x1",c?f:0).attr("x2",c?f:r).attr("y1",c?0:f).attr("y2",c?o:f).style("opacity",null),u(l.select("text").attr("text-anchor",Nf).attr("dx",Ff)).attr("dy",-5).attr("x",zf(c,r,o)).attr("y",f).text(function(e){return a(this,t),e.text}.bind(this)).style("opacity",null),s.gridLines.y=l},redrawGrid:function(t){var e=this,n=this,i=n.config.axis_rotated,r=n.state,o=r.width,s=r.height,u=n.$el.gridLines,c=n.$T,l=n.xv.bind(n),h=u.x.select("line"),f=u.x.select("text");return h=c(h,t).attr("x1",i?0:l).attr("x2",i?o:l).attr("y1",i?l:0).attr("y2",i?l:s),f=c(f,t).attr("x",zf(!i,o,s)).attr("y",l).text(function(t){return a(this,e),t.text}.bind(this)),[h.style("opacity",null),f.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el,r=e.grid_front,a="."+(r&&i.gridLines.main?Ho.gridLines:Lo.chart)+(r?" + *":""),o=i.main.insert("g",a).attr("clip-path",n.pathGrid).attr("class",Ho.grid);i.grid.main=o,e.grid_x_show&&o.append("g").attr("class",Ho.xgrids),e.grid_y_show&&o.append("g").attr("class",Ho.ygrids),e.interaction_enabled&&e.grid_focus_show&&(o.append("g").attr("class",Go.xgridFocus).append("line").attr("class",Go.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&o.append("g").attr("class",Go.ygridFocus).append("line").attr("class",Go.ygridFocus))},showGridFocus:function(t){var e=this,n=this,i=n.config,r=n.state,o=r.width,s=r.height,u=i.axis_rotated,c=n.$el.main.selectAll("line."+Go.xgridFocus+", line."+Go.ygridFocus),l=(t||[c.datum()]).filter(function(t){return a(this,e),t&&$a(n.getBaseValue(t))}.bind(this));if(i.tooltip_show&&0!==l.length&&!n.hasType("bubble")&&!n.hasArcType()){var h=i.grid_focus_edge&&!i.tooltip_grouped,f=n.xx.bind(n);c.style("visibility",null).data(l.concat(l)).each((function(t){var e,i=this,r=Rn(this),c={x:f(t),y:n.getYScaleById(t.id)(t.value)};if(r.classed(Go.xgridFocus))e=u?[null,c.x,h?c.y:o,c.x]:[c.x,h?c.y:null,c.x,s];else{var l="y2"===n.axis.getId(t.id);e=u?[c.y,h&&!l?c.x:null,c.y,h&&l?c.x:s]:[h&&l?c.x:null,c.y,h&&!l?c.x:o,c.y]}["x1","y1","x2","y2"].forEach(function(t,n){return a(this,i),r.attr(t,e[n])}.bind(this))})),jf(c,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)}},hideGridFocus:function(){var t=this,e=t.state,n=e.inputType,i=e.resizing,r=t.$el.main;"mouse"!==n&&i||(r.selectAll("line."+Go.xgridFocus+", line."+Go.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){var t=this,e=t.state,n=e.inputType,i=e.width,r=e.height,a=e.resizing,o=t.$el.grid.main.select("line."+Go.xgridFocus);if("touch"===n)o.empty()?a&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{var s=t.config.axis_rotated;o.attr("x1",s?0:-10).attr("x2",s?i:-10).attr("y1",s?-10:0).attr("y2",s?-10:r)}return!0},generateGridData:function(t,e){var n=this,i=this.$el.main.select("."+No.axisX).selectAll(".tick").size(),r=[];if("year"===t)for(var o=this.getXDomain().map(function(t){return a(this,n),t.getFullYear()}.bind(this)),s=o[0],u=o[1],c=s;c<=u;c++)r.push(new Date(c+"-01-01 00:00:00"));else(r=e.ticks(10)).length>i&&(r=r.filter(function(t){return a(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var i=this;a(this,e);var r=!1;return(to(t)?t.concat():[t]).forEach(function(t){a(this,i),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return a(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this,i=this,r=i.config,o=i.$T,s=i.getGridFilterToRemove(t),u=function(t){return a(this,n),!s(t)}.bind(this),c=e?Ho.xgridLines:Ho.ygridLines,l=e?Ho.xgridLine:Ho.ygridLine;o(i.$el.main.select("."+c).selectAll("."+l).filter(s)).style("opacity","0").remove();var h="grid_"+(e?"x":"y")+"_lines";r[h]=r[h].filter(u)}},$f={initRegion:function(){var t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Ko.regions)},updateRegion:function(){var t=this,e=t.config,n=t.$el.region,i=t.$T;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);var r=n.main.selectAll("."+Ko.region).data(e.regions);i(r.exit()).style("opacity","0").remove();var a=r.enter().append("g");a.append("rect").style("fill-opacity","0"),n.list=a.merge(r).attr("class",t.classRegion.bind(t))},redrawRegion:function(t){var e=this,n=this,i=n.$el.region,r=n.$T,o=i.list.select("rect");return[(o=r(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n))).style("fill-opacity",function(t){return a(this,e),$a(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){Rn(this.parentNode).selectAll("rect:not([x])").remove()}))]},getRegionXY:function(t,e){var n=this,i=n.config,r=n.scale,a=i.axis_rotated,o="x"===t,s="start",u=0;return"y"===e.axis||"y2"===e.axis?(o||(s="end"),(o?a:!a)&&s in e&&(u=(0,r[e.axis])(e[s]))):(o?!a:a)&&s in e&&(u=(r.zoom||r.x)(n.axis.isTimeSeries()?ko.call(n,e[s]):e[s])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var n=this,i=n.config,r=n.scale,a=n.state,o=i.axis_rotated,s="width"===t,u=n[s?"regionX":"regionY"](e),c="end",l=a[t];return"y"===e.axis||"y2"===e.axis?(s||(c="start"),(s?o:!o)&&c in e&&(l=(0,r[e.axis])(e[c]))):(s?!o:o)&&c in e&&(l=(r.zoom||r.x)(n.axis.isTimeSeries()?ko.call(n,e[c]):e[c])),lo.height/2&&(g=o.height/2)),g+(i.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||l?0:-10)},getEventRectWidth:function(){var t=this.config,e=this.axis,n=t.axis_x_inverted,i=e.x.tickInterval();return Math.max(0,n?Math.abs(i):i)},getAxisTickRotate:function(t){var e=this,n=e.axis,i=e.config,r=e.state,a=e.$el,o=i["axis_"+t+"_tick_rotate"];if("x"===t){var s=n.isCategorized()||n.isTimeSeries();if(i.axis_x_tick_fit&&s){var u=i.axis_x_tick_count,c=r.current.maxTickWidths.x.ticks.length,l=0;if(u?l=u>c?c:u:c&&(l=c),l!==r.axis.x.tickCount){var h=e.data.targets;r.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(h,"min"),e.getXDomainMinMax(h,"max")],l)}r.axis.x.tickCount=l}a.svg&&i.axis_x_tick_fit&&!i.axis_x_tick_multiline&&!i.axis_x_tick_culling&&i.axis_x_tick_autorotate&&s&&(o=e.needToRotateXAxisTickTexts()?i.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,n=e.axis,i=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),r=n.x.tickCount+n.x.padding.left+n.x.padding.right;return t.axis.getMaxTickWidth("x")>(r?i/r:0)}},Uf={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Yf={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gf(t){for(var e,n=1;n1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}},lf,rf,af,uf,cf],qf=[Of,Pf,Cf,Lf,Bf,$f,Xf],Zf=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Hf,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];Array.prototype.slice;function Kf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Jf(t){return function(){return t}}function Qf(t,e){return et?1:e>=t?0:NaN}function td(t){return t}function ed(t,e){return e||(e=t.slice(0)),t.raw=e,t}var nd,id,rd,ad,od,sd,ud,cd,ld,hd,fd,dd,gd,pd,vd=Math.PI,yd=2*vd,xd=1e-6,bd=yd-xd;function md(t){this._+=t[0];for(var e=1,n=t.length;e=0))throw new Error("invalid digits: "+t);if(e>15)return md;var n=Math.pow(10,e);return function(t){this._+=t[0];for(var e=1,i=t.length;exd)if(Math.abs(l*s-u*c)>xd&&r){var f=n-a,d=i-o,g=s*s+u*u,p=Math.sqrt(g),v=Math.sqrt(h),y=r*Math.tan((vd-Math.acos((g+h-(f*f+d*d))/(2*p*v)))/2),x=y/v,b=y/p;Math.abs(x-1)>xd&&this._append(cd||(cd=ed(["L",",",""])),t+x*c,e+x*l),this._append(ld||(ld=ed(["A",",",",0,0,",",",",",""])),r,r,+(l*f>c*d),this._x1=t+b*s,this._y1=e+b*u)}else this._append(ud||(ud=ed(["L",",",""])),this._x1=t,this._y1=e);else;},e.arc=function(t,e,n,i,r,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);var o=n*Math.cos(i),s=n*Math.sin(i),u=t+o,c=e+s,l=1^a,h=a?i-r:r-i;null===this._x1?this._append(hd||(hd=ed(["M",",",""])),u,c):(Math.abs(this._x1-u)>xd||Math.abs(this._y1-c)>xd)&&this._append(fd||(fd=ed(["L",",",""])),u,c),n&&(h<0&&(h=h%yd+yd),h>bd?this._append(dd||(dd=ed(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,l,t-o,e-s,n,n,l,this._x1=u,this._y1=c):h>xd&&this._append(gd||(gd=ed(["A",",",",0,",",",",",",",""])),n,n,+(h>=vd),l,this._x1=t+n*Math.cos(r),this._y1=e+n*Math.sin(r)))},e.rect=function(t,e,n,i){this._append(pd||(pd=ed(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+e,n=+n,+i,-n)},e.toString=function(){return this._},t}();function Td(t){var e=this,n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{var i=Math.floor(e);if(!(i>=0))throw new RangeError("invalid digits: "+e);n=i}return t},function(){return a(this,e),new _d(n)}.bind(this)}function wd(t){return t.innerRadius}function Ad(t){return t.outerRadius}function Sd(t){return t.startAngle}function Ed(t){return t.endAngle}function kd(t){return t&&t.padAngle}function Md(t,e,n,i,r,a,o){var s=t-n,u=e-i,c=(o?a:-a)/Bl(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,g=n+l,p=i+h,v=(f+g)/2,y=(d+p)/2,x=g-f,b=p-d,m=x*x+b*b,_=r-a,T=f*p-g*d,w=(b<0?-1:1)*Bl(Fl(0,_*_*m-T*T)),A=(T*b-x*w)/m,S=(-T*x-b*w)/m,E=(T*b+x*w)/m,k=(-T*x+b*w)/m,M=A-v,O=S-y,R=E-v,C=k-y;return M*M+O*O>R*R+C*C&&(A=E,S=k),{cx:A,cy:S,x01:-l,y01:-h,x11:A*(r/_-1),y11:S*(r/_-1)}}function Od(){var t=wd,e=Ad,n=Jf(0),i=null,r=Sd,a=Ed,o=kd,s=null,u=Td(c);function c(){var c,l,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=r.apply(this,arguments)-Ul,g=a.apply(this,arguments)-Ul,p=Pl(g-d),v=g>d;if(s||(s=c=u()),f$l)if(p>Yl-$l)s.moveTo(f*Nl(d),f*jl(d)),s.arc(0,0,f,d,g,!v),h>$l&&(s.moveTo(h*Nl(g),h*jl(g)),s.arc(0,0,h,g,d,v));else{var y,x,b=d,m=g,_=d,T=g,w=p,A=p,S=o.apply(this,arguments)/2,E=S>$l&&(i?+i.apply(this,arguments):Bl(h*h+f*f)),k=zl(Pl(f-h)/2,+n.apply(this,arguments)),M=k,O=k;if(E>$l){var R=Vl(E/h*jl(S)),C=Vl(E/f*jl(S));(w-=2*R)>$l?(_+=R*=v?1:-1,T-=R):(w=0,_=T=(d+g)/2),(A-=2*C)>$l?(b+=C*=v?1:-1,m-=C):(A=0,b=m=(d+g)/2)}var I=f*Nl(b),L=f*jl(b),P=h*Nl(T),D=h*jl(T);if(k>$l){var N,F=f*Nl(m),z=f*jl(m),j=h*Nl(_),B=h*jl(_);if(p1?0:t<-1?Xl:Math.acos(t)}(($*U+X*Y)/(Bl($*$+X*X)*Bl(U*U+Y*Y)))/2),G=Bl(N[0]*N[0]+N[1]*N[1]);M=zl(k,(h-G)/(V-1)),O=zl(k,(f-G)/(V+1))}else M=O=0}A>$l?O>$l?(y=Md(j,B,I,L,f,O,v),x=Md(F,z,P,D,f,O,v),s.moveTo(y.cx+y.x01,y.cy+y.y01),O$l&&w>$l?M>$l?(y=Md(P,D,F,z,h,-M,v),x=Md(I,L,j,B,h,-M,v),s.lineTo(y.cx+y.x01,y.cy+y.y01),M0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(o[t],o[e])})),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,p[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:x};return p}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jf(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jf(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Jf(+t),o):a},o}().startAngle(o).endAngle(o+2*Math.PI).padAngle(s).value(function(e){var n=this;return a(this,t),e.values.reduce(function(t,e){return a(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var t=this,e=t.config,n=t.state,i=e[e.data_type+"_padding"],r=e.gauge_width||e.donut_width,a=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=r?(n.radius-r)/n.radius:.6,n.gaugeArcWidth=r||(a<=n.radius-n.innerRadius?n.radius-n.innerRadius:a<=n.radius?a:n.radius);var o=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:o},getRadius:function(t){var e=null==t?void 0:t.data,n=this.state,i=n.innerRadius,r=n.outerRadius;return!Ya(i)&&e&&(i=i[e.id]||0),eo(r)&&e&&e.id in r?r=r[e.id]:Ya(r)||(r=this.state.radius),{innerRadius:i,outerRadius:r}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=3.6*this.config.gauge_arcLength,e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){var t=this.config,e=t.gauge_fullCircle,n=-1*Math.PI/2,i=Math.PI/2,r=t.gauge_startingAngle;return!e&&r<=n?r=n:!e&&r>=i?r=i:(r>Math.PI||r<-1*Math.PI)&&(r=Math.PI),r},updateAngle:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.pie,s=t,u=!1;if(!i)return null;var c=n.getGaugeStartAngle(),l=i.gauge_fullCircle?n.getArcLength():-2*c;if(s.data&&n.isGaugeType(s.data)&&!n.hasMultiArcGauge()){var h=i.gauge_min,f=i.gauge_max,d=n.getTotalDataSum(r.rendered);o=o.startAngle(c).endAngle(l*((d-h)/(f-h))+c)}if(o(n.filterTargetsToShow()).forEach(function(t,n){var i;a(this,e),u||t.data.id!==(null==(i=s.data)?void 0:i.id)||(u=!0,(s=t).index=n)}.bind(this)),isNaN(s.startAngle)&&(s.startAngle=0),isNaN(s.endAngle)&&(s.endAngle=s.startAngle),s.data&&n.hasMultiArcGauge()){var g=i.gauge_min,p=i.gauge_max,v=s.value1){var c,l=n.getRadius(t).outerRadius;n.hasType("polar")&&(l=n.getPolarOuterRadius(t,l));var h=this.svgArc.centroid(o).map(function(t){return a(this,e),isNaN(t)?0:t}.bind(this)),f=h[0],d=h[1],g=Math.sqrt(f*f+d*d),p=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return a(this,e),i[t+"_label_ratio"]}.bind(this)))?void 0:c[0];s="translate("+f*(p=p?Xa(p)?p.bind(n.api)(t,l,g):p:l&&(g?(36/l>.375?1.175-36/l:.8)*l/g:0))+","+d*p+")"}return s},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var i,r=Rn(this),a=e.updateAngle(t),o=e.getRatio("arc",a);if(e.meetsLabelThreshold(o,null==(i=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:i[0])){var s=(a||t).value;oo(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(s,o,t.data.id).toString(),[-1,1],n)}else r.text("")}))},expandArc:function(t){var e=this,n=this,i=n.state.transiting,r=n.$el;if(i)var o=setInterval(function(){a(this,e),i||(clearInterval(o),r.legend.selectAll("."+Go.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);else{var s=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(s,"."+Po.chartArc)).each((function(t){if(n.shouldExpand(t.data.id)){var e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));Rn(this).selectAll("path").transition().duration(e).attrTween("d",Cd(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",Cd(i.bind(n)))}}))}},unexpandArc:function(t){var e=this,n=this,i=n.state.transiting,r=n.$el.svg;if(!i){var o=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(o,"."+Po.chartArc)).selectAll("path").transition().duration(function(t){return a(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",Cd(n.svgArc.bind(n))),r.selectAll(""+Po.arc).style("opacity",null)}},getExpandConfig:function(t,e){var n,i=this,r=i.config;return i.isDonutType(t)?n="donut":i.isGaugeType(t)?n="gauge":i.isPieType(t)&&(n="pie"),n?r[n+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this,e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(i){return a(this,t),e.hasType(i)&&n[i+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this,e=this,n=e.config,i=function(e){return a(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){a(this,t),i=n[e+"_label_format"]}.bind(this)),Xa(i)?i.bind(e.api):i},updateTargetsForArc:function(t){var e=this,n=this,i=n.$el,r=n.hasType("gauge"),o=n.getChartClass("Arc"),s=n.getClass("arcs",!0),u=n.classFocus.bind(n),c=i.main.select("."+Po.chartArcs),l=c.selectAll("."+Po.chartArc).data(n.pie(t)).attr("class",function(t){return a(this,e),o(t)+u(t.data)}.bind(this)),h=l.enter().append("g").attr("class",o).call(this.setCssRule(!1,"."+Po.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));h.append("g").attr("class",s).merge(l),h.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),i.text=c.selectAll("."+Lo.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+Lo.chart).append("g").attr("class",Po.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){var e=this,n=t||e.getArcTitle(),i=e.hasType("gauge");if(n){var r=i?Xo.chartArcsGaugeTitle:Po.chartArcsTitle,a=e.$el.arcs.select("."+r);a.empty()&&(a=e.$el.arcs.append("text").attr("class",r).style("text-anchor","middle")),i&&a.attr("dy","-0.3em"),oo(a,n,i?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){var t=this,e=t.config,n=t.state,i=t.getArcTitle();if(i&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(i)){var r=n.current.needle;return Ya(r)||(r=e.arc_needle_value),Eo(i,{NEEDLE_VALUE:Ya(r)?r:0})}return!1},redrawArc:function(t,e,n){var i=this,r=this,o=r.config,s=r.state,u=r.$el.main,c=o.interaction_enabled,l=c&&o.data_selection_isselectable,h=u.selectAll("."+Po.arcs).selectAll("."+Po.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return a(this,i),r.color(t.data)}.bind(this)).style("cursor",function(t){return a(this,i),null!=l&&null!=l.bind&&l.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return a(this,i),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){a(this,i),s.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this,n=r.updateAngle(t);if(!n)return function(){return a(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var i=Ki(this._current,n);return this._current=i(0),function(e){var n=i(e);return n.data=t.data,r.getArc(n,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){var e;return a(this,i),r.levelColor?(e=r.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(ro,(function(){if(r.levelColor){var t=Rn(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}s.transiting=!1,io(o.onrendered,r.api)})),c&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),o.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this,e=this,n=e.$el,i=e.config,r=e.state,o=r.hiddenTargetIds,s=(r.radius-1)/100*i.arc_needle_length,u=o.length!==e.data.targets.length,c=e.$el.arcs.select("."+Po.needle),l=i.arc_needle_path,h=i.arc_needle_bottom_width/2,f=i.arc_needle_top_width/2,d=i.arc_needle_top_rx,g=i.arc_needle_top_ry,p=i.arc_needle_bottom_len,v=i.arc_needle_bottom_rx,y=i.arc_needle_bottom_ry,x=e.getNeedleAngle(),b=function(){a(this,t);var n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(b(),c.empty()&&(c=n.arcs.append("path").classed(Po.needle,!0),n.needle=c,n.needle.updateHelper=function(r,o){var s=this;void 0===o&&(o=!1),a(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(ro,function(){a(this,s),o&&(i.arc_needle_value=r),b()}.bind(this))}.bind(this)),u){var m=Xa(l)?l.call(e,s):"M-"+h+" "+p+" A"+v+" "+y+" 0 0 0 "+h+" "+p+" L"+f+" -"+s+" A"+d+" "+g+" 0 0 0 -"+f+" -"+s+" L-"+h+" "+p+" Z";e.$T(c).attr("d",m).style("fill",i.arc_needle_color).style("display",null).style("transform","rotate("+x+"deg)")}else c.style("display","none")},getNeedleAngle:function(t){var e=this,n=e.config,i=e.state,r=e.getArcLength(),a=e.hasType("gauge"),o=e.getTotalDataSum(!0),s=Ga(t)?t:n.arc_needle_value,u=n[n.data_type+"_startingAngle"]||0,c=0;if(Ya(s)||(s=a&&1===e.data.targets.length?o:0),i.current.needle=s,a){u=e.getGaugeStartAngle();var l=n.gauge_fullCircle?r:-2*u,h=n.gauge_min;c=l*((s-h)/(n.gauge_max-h))}else c=r*(s/o);return(u+c)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this,e=this,n=e.config,i=e.state,r=e.hasMultiArcGauge(),o=n.gauge_fullCircle,s=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,u=e.getGaugeStartAngle(),c=o?u+e.getArcLength():-1*u,l=e.$el.arcs.select((r?"g":"")+"."+Po.chartArcsBackground);if(r){var h=0;(l=l.selectAll("path."+Po.chartArcsBackground).data(e.data.targets)).enter().append("path").attr("class",function(e,n){return a(this,t),Po.chartArcsBackground+" "+Po.chartArcsBackground+"-"+n}.bind(this)).merge(l).style("fill",n.gauge_background||null).attr("d",function(r){var o=r.id;if(a(this,t),s||i.hiddenTargetIds.indexOf(o)>=0)return"M 0 0";var l={data:[{value:n.gauge_max}],startAngle:u,endAngle:c,index:h++};return e.getArc(l,!0,!0)}.bind(this)),l.exit().remove()}else l.attr("d",s?"M 0 0":function(){a(this,t);var i={data:[{value:n.gauge_max}],startAngle:u,endAngle:c};return e.getArc(i,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this,n=this,i=n.config,r=n.state,o="touch"===r.inputType,s="mouse"===r.inputType;function u(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function c(t){var e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,r){var a,o=n.updateAngle(e);o&&(a=n.convertToArcData(o),null==n.toggleShape||n.toggleShape(this,a,r),i.data_onclick.bind(n.api)(a,this))})),s&&t.on("mouseover",(function(t,e){var i;if(!r.transiting){r.event=t;var a=n.updateAngle(e),o=a?n.convertToArcData(a):null;u(this,o,(null==(i=o)?void 0:i.id)||void 0),n.setOverOut(!0,o)}})).on("mouseout",function(t,i){if(a(this,e),!r.transiting){r.event=t;var o=n.updateAngle(i),s=o?n.convertToArcData(o):null;c(),n.setOverOut(!1,s)}}.bind(this)).on("mousemove",(function(t,e){var i=n.updateAngle(e),a=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([a],this)})),o&&n.hasArcType()&&!n.radars){var l=function(t){a(this,e);var n=t.changedTouches[0];return Rn(zn.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(t){var e,i;if(!r.transiting){r.event=t;var a=l(t).datum(),o=null!=(e=a)&&e.data&&a.data.id?n.updateAngle(a):null,s=o?n.convertToArcData(o):null,h=(null==(i=s)?void 0:i.id)||void 0;n.callOverOutForTouch(s),Va(h)?c():u(this,s,h)}}))}},redrawArcText:function(t){var e,n=this,i=this,r=i.config,o=i.state,s=i.$el,u=s.main,c=s.arcs,l=i.hasType("gauge"),h=i.hasMultiArcGauge();if(l&&1===i.data.targets.length&&r.gauge_title||(e=u.selectAll("."+Po.chartArc).select("text").style("opacity","0").attr("class",function(t){return a(this,n),i.isGaugeType(t.data)?Xo.gaugeValue:null}.bind(this)).call(i.textForArcLabel.bind(i)).attr("transform",i.transformForArcLabel.bind(i)).style("font-size",function(t){return a(this,n),i.isGaugeType(t.data)&&1===i.data.targets.length&&!h?Math.round(o.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return a(this,n),i.isTargetToShow(t.data.id)&&i.isArcType(t.data)?null:"0"}.bind(this)),h&&e.attr("dy","-.1em")),u.select("."+Po.chartArcsTitle).style("opacity",i.hasType("donut")||l?null:"0"),l){var f,d=r.gauge_fullCircle;d&&(null==(f=e)||f.attr("dy",""+(h?0:Math.round(o.radius/14)))),r.gauge_label_show&&(c.select("."+Xo.chartArcsGaugeUnit).attr("dy",(d?1.5:.75)+"em").text(r.gauge_units),c.select("."+Xo.chartArcsGaugeMin).attr("dx",-1*(o.innerRadius+(o.radius-o.innerRadius)/(d?1:2))+"px").attr("dy","1.2em").text(i.textForGaugeMinMax(r.gauge_min,!1)),d||c.select("."+Xo.chartArcsGaugeMax).attr("dx",o.innerRadius+(o.radius-o.innerRadius)/2+"px").attr("dy","1.2em").text(i.textForGaugeMinMax(r.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e,n=this,i=this.$el.arcs,r=Ya(t)?function(e){return a(this,n),e.index===t}.bind(this):function(e){return a(this,n),e.data.id===t}.bind(this);return null==(e=i)?void 0:e.selectAll("."+Lo.target+" path").filter(r)}};function Ld(t){return t[0]}function Pd(t){return t[1]}function Dd(t,e){var n=Jf(!0),i=null,r=gh,a=null,o=Td(s);function s(s){var u,c,l,h=(s=Kf(s)).length,f=!1;for(null==i&&(a=r(l=o())),u=0;u<=h;++u)!(u=h;--f)s.point(y[f],x[f]);s.lineEnd(),s.areaEnd()}v&&(y[l]=+t(d,l,c),x[l]=+e(d,l,c),s.point(i?+i(d,l,c):y[l],n?+n(d,l,c):x[l]))}if(g)return s=null,g+""||null}function l(){return Dd().defined(r).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Ld:Jf(+t),e="function"==typeof e?e:Jf(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Pd:Jf(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Jf(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Jf(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Jf(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Jf(+t),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:Jf(!!t),c):r},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}();p=s?p.y(l).x0(h).x1(f):p.x(l).y0(r.area_above?0:r.area_below?i.state.height:h).y1(f),o||(p=p.defined(function(t){return a(this,e),null!==i.getBaseValue(t)}.bind(this))),i.isStepType(t)&&(c=i.convertValuesToStep(c)),u=p.curve(i.getCurve(t))(c)}else c[0]&&(d=i.scale.x(c[0].x),g=i.getYScaleById(t.id)(c[0].value)),u=s?"M "+g+" "+d:"M "+d+" "+g;return u||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){var n=this,i=n.config,r=n.getShapeX(0,t,e),a=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),s=n.getYScaleById.bind(n);return function(t,u){var c=s.call(n,t.id,e)(n.getShapeYMin(t.id)),l=o(t,u)||c,h=r(t),f=t.value,d=a(t);return i.axis_rotated&&(f>0&&d0?function(){return a(this,n),u}.bind(this):Ya(c)?function(t){return a(this,n),t*c}.bind(this):null;return function(t,e){a(this,n);var u=o(t,e),c=+s,h=+!c,f=t.value<0,d=r["axis_"+i.axis.getId(t.id)+"_inverted"],g=!d&&f||d&&!f,p=["",""],v=0,y=i.isGrouped(t.id),x=!(!l||!y)&&i.isStackingRadiusData(t);if(l){var b=s?h:c,m=u[2][b]-u[0][b],_="a"+(v=!y||x?l(m):0)+","+v+" "+(g?"1 0 0":"0 0 1")+" ";p[+!s]=""+_+v+","+v,p[+s]=""+_+[-v,v][s?"sort":"reverse"](),g&&p.reverse()}var T=s?"H"+(u[1][c]+(g?v:-v))+" "+p[0]+"V"+(u[2][h]-v)+" "+p[1]+"H"+u[3][c]:"V"+(u[1][h]+(g?-v:v))+" "+p[0]+"H"+(u[2][c]-v)+" "+p[1]+"V"+u[3][h];return"M"+u[0][c]+","+u[0][h]+T+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this,n=this,i=n.$el,r=n.config,o=n.data,s=n.state,u=t.id,c=t.index,l=t.value;if(s.hiddenTargetIds.indexOf(u)>-1){var h=i.bar.filter(function(t){return a(this,e),t.id===u&&t.value===l}.bind(this));return!h.empty()&&/a\d+/i.test(h.attr("d"))}var f=r.data_groups.find(function(t){return a(this,e),t.indexOf(u)>-1}.bind(this)),d=n.orderTargets(n.filterTargetsToShow(o.targets.filter(n.isBarType,n))).filter(function(t){return a(this,e),f.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return a(this,e),t.values.filter(function(t){return a(this,n),t.index===c&&(Ya(l)&&l>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return a(this,e),t.id}.bind(this));return 0!==l&&d.indexOf(u)===d.length-1},generateGetBarPoints:function(t,e){var n=this,i=this,r=i.config,o=e?i.axis.subX:i.axis.x,s=i.getIndicesMax(t)+1,u=i.getBarW("bar",o,s),c=i.getShapeX(u,t,!!e),l=i.getShapeY(!!e),h=i.getShapeOffset(i.isBarType,t,!!e),f=i.getYScaleById.bind(i);return function(t,o){a(this,n);var s=t.id,d=f.call(i,s,e)(i.getShapeYMin(s)),g=h(t,o)||d,p=Ya(u)?u:u[t.id]||u._$width,v=r["axis_"+i.axis.getId(s)+"_inverted"],y=t.value,x=c(t),b=l(t);r.axis_rotated&&!v&&(y>0&&b0&&x.start=e.open),e||null}},Bd={initGauge:function(){var t=this,e=this,n=e.config,i=e.$el.arcs,r=function(e){a(this,t),i.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){var o=e.hasMultiArcGauge();i.append(o?"g":"path").attr("class",Po.chartArcsBackground).style("fill",!o&&n.gauge_background||null),n.gauge_units&&r(Xo.chartArcsGaugeUnit),n.gauge_label_show&&(r(Xo.chartArcsGaugeMin),n.gauge_fullCircle||r(Xo.chartArcsGaugeMax))}},updateGaugeMax:function(){var t=this,e=t.config,n=t.state,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawMultiArcGauge:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el,o=e.state.hiddenTargetIds,s=r.main.selectAll("."+Po.arcs).selectAll("."+Po.arcLabelLine).data(e.arcData.bind(e));s.enter().append("rect").attr("class",function(e){return a(this,t),Po.arcLabelLine+" "+Lo.target+" "+Lo.target+"-"+e.data.id}.bind(this)).merge(s).style("fill",function(n){return a(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){var n=0,r=0,a=0,s="";if(o.indexOf(t.data.id)<0){var u=e.updateAngle(t),c=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(u.index+1),l=u.endAngle-Math.PI/2,h=i.radius-c,f=l-(0===h?0:1/h);n=i.radiusExpanded-i.radius+c,r=Math.cos(f)*h,a=Math.sin(f)*h,s="rotate("+180*l/Math.PI+", "+r+", "+a+")"}Rn(this).attr("x",r).attr("y",a).attr("width",n).attr("height",2).attr("transform",s).style("stroke-dasharray","0, "+(n+2)+", 0")}))},textForGaugeMinMax:function(t,e){var n=this.config.gauge_label_extents;return Xa(n)?n.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){var t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},$d={initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){var t=this,e=t.state,n=e.width,i=e.height,r=_s,a=t.cache.get(r);return a||t.cache.add(r,a=wo("min",[n,i])),a},getBubbleR:function(t){var e=this,n=this,i=n.config.bubble_maxR;Xa(i)?i=i.bind(n.api)(t):Ya(i)||(i=n.getBaseLength()/(2*n.getMaxDataCount())+12);var r=wo("max",n.getMinMaxData().max.map(function(t){return a(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):eo(t.value)?t.value.mid:t.value}.bind(this))),o=i*i*Math.PI,s=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(o/r);return Math.sqrt(s/Math.PI)},getBubbleZData:function(t,e){return eo(t)?t[e]:t["y"===e?0:1]}},Xd={initLine:function(){var t=this.$el;t.line=t.main.select("."+Lo.chart).append("g").attr("class",Yo.chartLines).call(this.setCssRule(!1,"."+Yo.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this,n=this,i=n.$el,r=i.area,o=i.line,s=i.main,u=n.getChartClass("Line"),c=n.getClass("lines",!0),l=n.classFocus.bind(n);o||n.initLine();var h=t.filter(function(t){return a(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),f=s.select("."+Yo.chartLines).selectAll("."+Yo.chartLine).data(h).attr("class",function(t){return a(this,e),u(t)+l(t)}.bind(this)),d=f.enter().append("g").attr("class",u).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(d.append("g").attr("class",c),n.hasTypeOf("Area")){var g=(!r&&d.empty()?f:d).filter(n.isAreaType.bind(n));n.initArea(g)}n.updateTargetForCircle(h,d)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);var i=this,r=i.format.extraLineClasses,o=i.$el,s=i.$T,u=e?o.subchart:o,c=u.main.selectAll("."+Yo.lines).selectAll("."+Yo.line).data(i.lineData.bind(i));s(c.exit(),t).style("opacity","0").remove(),u.line=c.enter().append("path").attr("class",function(t){return a(this,n),i.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",i.color).merge(c).style("opacity",i.initialOpacity.bind(i)).attr("transform",null)},redrawLine:function(t,e,n){void 0===n&&(n=!1);var i=this.$el;return[(0,this.$T)((n?i.subchart:i).line,e,ho()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this,n=this;return n.config.axis_rotated&&n.isStepType(t)?function(i){a(this,e);var r=n.getInterpolate(t)(i);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,i=this,r=i.config,o=i.scale,s=r.line_connectNull,u=r.axis_rotated,c=i.generateGetLinePoints(t,e),l=i.getYScaleById.bind(i),h=function(t){return a(this,n),(e?i.subxx:i.xx).call(i,t)}.bind(this),f=function(t,r){return a(this,n),i.isGrouped(t.id)?c(t,r)[0][1]:l(t.id,e)(i.getBaseValue(t))}.bind(this),d=Dd();d=u?d.x(f).y(h):d.x(h).y(f),s||(d=d.defined(function(t){return a(this,n),null!==i.getBaseValue(t)}.bind(this)));var g=e?o.subX:o.x;return function(t){a(this,n);var c,h=l(t.id,e),f=s?i.filterRemoveNull(t.values):t.values,p=0,v=0;if(i.isLineType(t)){var y=r.data_regions[t.id];y?c=i.lineWithRegions(f,o.zoom||g,h,y):(i.isStepType(t)&&(f=i.convertValuesToStep(f)),c=d.curve(i.getCurve(t))(f))}else f[0]&&(p=g(f[0].x),v=h(f[0].value)),c=u?"M "+v+" "+p:"M "+p+" "+v;return c||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,i){var r,o,s,u,c=this,l=this,h=l.config.axis_rotated,f=l.axis.isTimeSeries(),d=[];if(Ga(i))for(var g,p=function(t,e){return a(this,c),Va(t)?e:f?ko.call(l,t):t}.bind(this),v=0;g=i[v];v++){var y=p(g.start,t[0].x),x=p(g.end,t[t.length-1].x),b=g.style||{dasharray:"2 2"};d[v]={start:y,end:x,style:b}}for(var m,_=h?function(t){return a(this,c),n(t.value)}.bind(this):function(t){return a(this,c),e(t.x)}.bind(this),T=h?function(t){return a(this,c),e(t.x)}.bind(this):function(t){return a(this,c),n(t.value)}.bind(this),w=function(t){return a(this,c),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),A=f?function(t,i,r,u){a(this,c);var l=t.x.getTime(),f=i.x-t.x,d=new Date(l+f*r),g=new Date(l+f*(r+u)),p=h?[[n(o(r)),e(d)],[n(o(r+s)),e(g)]]:[[e(d),n(o(r))],[e(g),n(o(r+s))]];return w(p)}.bind(this):function(t,i,s,u){a(this,c);var l=h?[[n(o(s),!0),e(r(s))],[n(o(s+u),!0),e(r(s+u))]]:[[e(r(s),!0),n(o(s))],[e(r(s+u),!0),n(o(s+u))]];return w(l)}.bind(this),S={x:l.axis.getAxisType("x"),y:l.axis.getAxisType("y")},E="",k=0;m=t[k];k++){var M=t[k-1],O=M&&$a(M.value);b=l.isWithinRegions(m.x,d);if($a(m.value))if(!Va(d)&&b&&O){if(O){try{b=b.dasharray.split(" ")}catch(t){b="2 2".split(" ")}r=pl(S.x,M.x,m.x),o=pl(S.y,M.value,m.value);var R=e(m.x)-e(M.x),C=n(m.value)-n(M.value),I=Math.sqrt(Math.pow(R,2)+Math.pow(C,2));u=(s=b[0]/I)*b[1];for(var L=s;L<=1;L+=u)E+=A(M,m,L,s),L+u>=1&&(E+=A(M,m,1,0))}}else E+=(k&&O?"L":"M")+_(m)+","+T(m)}return E},isWithinRegions:function(t,e){for(var n,i=0;n=e[i];i++)if(n.start-1?"0":null})),u&&h.forEach(function(t){var e=this;a(this,n),s.main.selectAll("."+Jo.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll(""+Jo.selectedCircle).each(function(n){a(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))}},updateCircle:function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.config,r=n.state,o=n.$el,s=i.point_focus_only,u=t?o.subchart:o;if(i.point_show&&!r.toggling){var c=u.main.selectAll("."+jo.circles).selectAll("."+jo.circle).data(function(t){return a(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?s?[t.values[0]]:t.values:[]}.bind(this));c.exit().remove(),c.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),u.circle=u.main.selectAll("."+jo.circles+" ."+jo.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,n,i,r){void 0===r&&(r=!1);var a=this,o=a.state.rendered,s=a.$el,u=a.$T,c=r?s.subchart:s,l=c.main.selectAll("."+Jo.selectedCircle);if(!a.config.point_show)return[];var h=a.point("update",a,t,e,a.getStylePropValue(a.color),n,i,l),f=a.isCirclePoint()?"c":"",d=ho(),g=a.opacityForCircle.bind(a),p=[];return c.circle.each((function(t){var e=h.bind(this)(t);e=u(e,n||!o,d).style("opacity",g),p.push(e)})),[p,u(l,n).attr(f+"x",t).attr(f+"y",e)]},showCircleFocus:function(t){var e=this,n=e.config,i=e.state,r=i.hasRadar,o=i.resizing,s=i.toggling,u=i.transiting,c=e.$el.circle;if(!1===u&&n.point_focus_only&&c){var l=(r?e.radarCircleX:e.circleX).bind(e),h=(r?e.radarCircleY:e.circleY).bind(e),f=s||Va(t),d=e.point("update",e,l,h,e.getStylePropValue(e.color),!o&&f);t&&(c=c.filter((function(e){var n=this,i=null==t.filter?void 0:t.filter(function(t){return a(this,n),t.id===e.id}.bind(this));return!!i.length&&Rn(this).datum(i[0])}))),c.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){var n=t.id,i=t.index,r=t.value,a="hidden";$a(r)&&(d.bind(this)(t),e.expandCircles(i,n),a=""),this.style.visibility=a}))}},hideCircleFocus:function(){var t=this,e=t.config,n=t.$el.circle;e.point_focus_only&&n&&(t.unexpandCircles(),n.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,o){a(this,e);var s=r.id;return n.isGrouped(s)?i(r,o)[0][1]:n.getYScaleById(s,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var a=i.getShapeByIndex("circle",t,e).classed(Lo.EXPANDED,!0),o=r(a)/i.config.point_r,s=1-o;i.isCirclePoint()?a.attr("r",r):a.each((function(){var t=Rn(this);if("circle"===this.tagName)t.attr("r",r);else{var e=this.getBBox(),n=e.width,i=e.height,a=s*(+t.attr("x")+n/2),u=s*(+t.attr("y")+i/2);t.attr("transform","translate("+a+" "+u+") scale("+o+")")}}))},unexpandCircles:function(t){var e=this,n=e.pointR.bind(e),i=e.getShapeByIndex("circle",t).filter((function(){return Rn(this).classed(Lo.EXPANDED)})).classed(Lo.EXPANDED,!1);if(i.attr("r",n),!e.isCirclePoint()){var r=n(i)/e.config.point_r;i.attr("transform",1!==r?"scale("+r+")":null)}},pointR:function(t){var e=this,n=e.config.point_r,i=n;return e.isBubbleType(t)?i=e.getBubbleR(t):Xa(n)&&(i=n.bind(e.api)(t)),t.r=i,i},pointExpandedR:function(t){var e=this,n=e.config,i=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*i:e.pointR(t)},pointSelectR:function(t){var e=this.config.point_select_r;return Xa(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var n=uo(this.state.event,t),i=Rn(t),r=this.isCirclePoint(t)?"c":"",a=+i.attr(r+"x"),o=+i.attr(r+"y");if(!a&&!o&&1===t.nodeType){var s=lo(t);a=s.x,o=s.y}return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){var e=this.config.point_sensitivity;return Xa(e)?e=e.call(this.api,t):"radius"===e&&(e=t.r),e},insertPointInfoDefs:function(t,e){var n,i=this,r=function(t,e){a(this,i);for(var n,r=t.attributes,o=0;n=r[o];o++)n=n.name,e.setAttribute(n,t.getAttribute(n))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,s=zn.createElementNS(Ce.svg,o.nodeName.toLowerCase());if(s.id=e,s.style.fill="inherit",s.style.stroke="inherit",r(o,s),null!=(n=o.childNodes)&&n.length){var u=Rn(s);"innerHTML"in s?u.html(o.innerHTML):yo(o.childNodes).forEach(function(t){a(this,i),r(t,u.append(t.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(s)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){var e=this,n=e.$el.circle,i=!1;return(eo(t)||n)&&(i=!0===t?n.each((function(t){var n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(Lo.EXPANDED)>-1&&(n+=" "+Lo.EXPANDED),this.setAttribute("class",n)})):e.getClass("circle",!0)(t)),i},generateGetLinePoints:function(t,e){var n=this,i=this,r=i.config,o=i.getShapeX(0,t,e),s=i.getShapeY(e),u=i.getShapeOffset(i.isLineType,t,e),c=i.getYScaleById.bind(i);return function(t,l){a(this,n);var h=c.call(i,t.id,e)(i.getShapeYMin(t.id)),f=u(t,l)||h,d=o(t),g=s(t);r.axis_rotated&&(t.value>0&&g2?o-2:0),u=2;un&&(n=e),n}var Gd={initPolar:function(){var t=this,e=t.$el.arcs,n=t.config,i=n.polar_level_text_show,r=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",qo),i&&r&&t.generateDataLabelBackgroundColorFilter(r)},getPolarOuterRadius:function(t,e){var n,i=Vd(this);return(null!=(n=null==t?void 0:t.data.values[0].value)?n:0)/i*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el.arcs.levels,o=n.polar_level_depth,s=Vd(e),u=Ao(0,o),c=i.radius,l=u.map(function(e){return a(this,t),c*((e+1)/o)}.bind(this)),h=(n.polar_level_text_format||function(){}).bind(e.api),f=r.selectAll("."+Wo).data(u);f.exit().remove();var d=f.enter().append("g").attr("class",function(e,n){return a(this,t),Wo+" "+Wo+"-"+n}.bind(this));if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return a(this,t),l[e]}.bind(this)),n.polar_level_text_show){var g=n.polar_level_text_backgroundColor,p="#"+i.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(g);d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",function(e){return a(this,t),5-l[e]}.bind(this)).attr("filter",g?"url("+p+")":null).text(function(e){return a(this,t),h(s/u.length*(e+1))}.bind(this))}}};var Hd=ks,Wd={initRadar:function(){var t=this,e=t.config,n=t.state.current,i=t.$el;t.hasType("radar")&&(i.radar=i.main.select("."+Lo.chart).append("g").attr("class",Zo.chartRadars),i.radar.levels=i.radar.append("g").attr("class",qo),i.radar.axes=i.radar.append("g").attr("class",No.axis),i.radar.shapes=i.radar.append("g").attr("class",Qo.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config,e=this.state,n=e.arcWidth,i=e.arcHeight,r=t.axis_x_categories.length<4?-20:10,a=(Math.min(n,i)-r)/2;return[a,a]},updateTargetsForRadar:function(t){var e=this,n=this.config;Ja(n.axis_x_categories)&&(n.axis_x_categories=Ao(0,wo("max",t.map(function(t){return a(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,i){var r=this,o=this.config,s=this.getRadarSize(),u=s[0],c=s[1],l=o.axis_x_categories.length,h=o.radar_direction_clockwise,f=yo(t).map(function(s){return a(this,r),function(t,e,n,i,r,a){var o=t&&i>0?n-i:i,s=2*Math.PI;return r*(1-a*("x"===e?Math.sin:Math.cos)(o*s/n))}(h,s,l,e,Ga(n)?n:"x"===t?u:c,Ya(i)?i:o.radar_size_ratio)}.bind(this));return 1===f.length?f[0]:f},generateRadarPoints:function(){var t=this,e=this,n=e.data.targets,i=e.getRadarSize(),r=i[0],o=i[1],s=e.cache.get(Hd)||{},u=s._size;(!u||u.width!==r&&u.height!==o)&&(n.forEach(function(n){var i=this;a(this,t),s[n.id]=n.values.map(function(t,n){return a(this,i),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),s._size={width:r,height:o},e.cache.add(Hd,s))},redrawRadar:function(){var t=this,e=t.$el,n=e.radar,i=e.main,r=t.getTranslate("radar");r&&(n.attr("transform",r),i.select("."+es.chartTexts).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this,e=this.cache.get(Hd);return function(n,i){a(this,t);var r=e[n.id][i];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el.radar,o=e.getRadarSize(),s=o[0],u=o[1],c=n.radar_level_depth,l=n.axis_x_categories.length,h=n.radar_level_text_show,f=r.levels,d=Ao(0,c),g=n.radar_size_ratio*Math.min(s,u),p=d.map(function(e){return a(this,t),g*((e+1)/c)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),y=d.map(function(n){var i=this;a(this,t);var r=p[n];return Ao(0,l).map(function(t){return a(this,i),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),x=f.selectAll("."+Wo).data(d);x.exit().remove();var b=x.enter().append("g").attr("class",function(e,n){return a(this,t),Wo+" "+Wo+"-"+n}.bind(this));b.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),h&&(f.select("text").empty()&&f.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return a(this,t),v(0)}.bind(this)),b.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return a(this,t),v(i.current.dataMax/d.length*(e+1))}.bind(this))),b.merge(x).attr("transform",function(e){return a(this,t),"translate("+(s-p[e])+", "+(u-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return a(this,t),y[e]}.bind(this)),h&&f.selectAll("text").attr("x",function(e){return a(this,t),Va(e)?s:y[e].split(",")[0]}.bind(this)).attr("y",function(e){return a(this,t),Va(e)?u:0}.bind(this))},updateRadarAxes:function(){var t=this,e=this,n=e.config,i=e.$el.radar,r=e.getRadarSize(),o=r[0],s=r[1],u=n.axis_x_categories,c=i.axes.selectAll("g").data(u);c.exit().remove();var l=c.enter().append("g").attr("class",function(e,n){return a(this,t),No.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&l.append("line"),n.radar_axis_text_show&&l.append("text"),c=l.merge(c),n.radar_axis_line_show&&c.select("line").attr("x1",o).attr("y1",s).attr("x2",function(n,i){return a(this,t),e.getRadarPosition("x",i)}.bind(this)).attr("y2",function(n,i){return a(this,t),e.getRadarPosition("y",i)}.bind(this)),n.radar_axis_text_show){var h=n.radar_axis_text_position,f=h.x,d=void 0===f?0:f,g=h.y,p=void 0===g?0:g;c.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){a(this,t),e.each((function(t){oo(Rn(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return a(this,t),{index:n}}.bind(this)).attr("transform",(function(t){Va(this.width)&&(this.width=this.getBoundingClientRect().width/2);var n=e.getRadarPosition("x",t.index,void 0,1),i=Math.round(e.getRadarPosition("y",t.index,void 0,1));return n>o?n+=this.width+d:Math.round(n)s?(i/2===s&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),i+=p):if&&(f=s),v=l*l*p,(d=Math.max(f/v,v/h))>g){l-=s;break}g=d}y.push(o={value:l,dice:u1?e:1)},n}(Jd);function eg(t){if("function"!=typeof t)throw new Error;return t}function ng(){return 0}function ig(t){return function(){return t}}function rg(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function ag(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return og(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return og(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function og(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0;--a)u.push(i=r[a]=new yg(r[a])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(vg)}function dg(t){return t.children}function gg(t){return Array.isArray(t)?t[1]:null}function pg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function vg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function yg(t){this.data=t,this.depth=this.height=0,this.parent=null}function xg(t,e,n,i,r){var a,o,s=t.children,u=s.length,c=Array(u+1);for(c[0]=o=a=0;a=n-1){var l=s[e];return l.x0=r,l.y0=a,l.x1=o,void(l.y1=u)}var h=c[e],f=i/2+h,d=e+1,g=n-1;for(;d>>1;c[p]u-a){var x=i?(r*y+o*v)/i:o;t(e,d,v,r,a,x,u),t(d,n,y,x,a,o,u)}else{var b=i?(a*y+u*v)/i:u;t(e,d,v,r,a,o,b),t(d,n,y,r,b,o,u)}}(0,u,t.value,e,n,i,r)}function bg(t,e,n,i,r){(1&t.depth?Kd:Zd)(t,e,n,i,r)}yg.prototype=fg.prototype=(cg={constructor:yg,count:function(){return this.eachAfter(rg)},each:function(t,e){for(var n,i=-1,r=ag(this);!(n=r()).done;){var a=n.value;t.call(e,a,++i,this)}return this},eachAfter:function(t,e){for(var n,i,r,a=this,o=[a],s=[],u=-1;a=o.pop();)if(s.push(a),n=a.children)for(i=0,r=n.length;i=0;--i)a.push(n[i]);return this},find:function(t,e){for(var n,i=-1,r=sg(this);!(n=r()).done;){var a=n.value;if(t.call(e,a,++i,this))return a}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop(),e=i.pop();for(;t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return fg(this).eachBefore(pg)}},cg[Symbol.iterator]=hg,cg);var mg=function t(e){function n(t,n,i,r,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,u,c,l,h=-1,f=o.length,d=t.value;++h1?e:1)},n}(Jd);function _g(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Tg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tg(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Tg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0,g=!n||n.indexOf(h)>=0,p=o.classed(Jo.SELECTED);o.classed(Yo.line)||o.classed(Do.area)||(t?d&&g&&u(a)&&!p?f(!0,o.classed(Jo.SELECTED,!0),a,h):Ga(i)&&i&&p&&f(!1,o.classed(Jo.SELECTED,!1),a,h):d&&g&&u(a)&&p&&f(!1,o.classed(Jo.SELECTED,!1),a,h))}))}var lp={selected:function(t){var e=this,n=this.internal,i=[];return n.$el.main.selectAll("."+(Qo.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Qo.shape).filter((function(){return Rn(this).classed(Jo.SELECTED)})).each(function(t){return a(this,e),i.push(t)}.bind(this)),i},select:function(t,e,n){var i=this.internal;cp.bind(i)(!0,t,e,n)},unselect:function(t,e){var n=this.internal;cp.bind(n)(!1,t,e)}},hp={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,n=t.config,i=n.subchart_show;if(!i){var r,a;t.unbindZoomEvent(),n.subchart_show=!i,e.main||t.initSubchart();var o,s=e.main.selectAll("."+Lo.target);if(t.data.targets.length!==s.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),s=null==(o=e.main)?void 0:o.selectAll("."+Lo.target);null==(r=s)||r.style("opacity",null),null==(a=e.main)||a.style("display",null),this.resize()}},hide:function(){var t=this.internal,e=t.$el.subchart.main,n=t.config;n.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){var t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()}}};function fp(t){return((t=Math.exp(t))+1/t)/2}var dp=function t(e,n,i){function r(t,r){var a,o,s=t[0],u=t[1],c=t[2],l=r[0],h=r[1],f=r[2],d=l-s,g=h-u,p=d*d+g*g;if(p<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*d,u+t*g,c*Math.exp(e*t*o)]};else{var v=Math.sqrt(p),y=(f*f-c*c+i*p)/(2*c*n*v),x=(f*f-c*c-i*p)/(2*f*n*v),b=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(x*x+1)-x);o=(m-b)/e,a=function(t){var i=t*o,r=fp(b),a=c/(n*v)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+b)-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[s+a*d,u+a*g,c*r/fp(e*i+b)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4),gp=function(t){var e=this;return a(this,undefined),function(){return a(this,e),t}.bind(this)}.bind(void 0);function pp(t,e){var n=e.sourceEvent,i=e.target,r=e.transform,a=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function vp(t,e,n){this.k=t,this.x=e,this.y=n}vp.prototype={constructor:vp,scale:function(t){return 1===t?this:new vp(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new vp(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var yp=new vp(1,0,0);function xp(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yp;return t.__zoom}function bp(t){t.stopImmediatePropagation()}function mp(t){t.preventDefault(),t.stopImmediatePropagation()}function _p(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Tp(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function wp(){return this.__zoom||yp}function Ap(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Sp(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ep(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}xp.prototype=vp.prototype;var kp=function(t){var e=this,n=this.internal,i=n.$el,r=n.axis,o=n.config,s=n.org,u=n.scale,c=o.axis_rotated,l=o.axis_x_inverted,h=r.isCategorized(),f=t;if(o.zoom_enabled&&f){r.isTimeSeries()&&(f=f.map(function(t){return a(this,e),ko.bind(n)(t)}.bind(this)));var d=function(t,e,n,i){var r=this;void 0===i&&(i=!1);var o=n[0],s=n[1];return t.every(function(n,u){var c=this;return a(this,r),(0===u?i?+n<=o:+n>=o:i?+n>=s:+n<=s)&&!t.every(function(t,n){return a(this,c),t===e[n]}.bind(this))}.bind(this))}(f,n.getZoomDomain(!0),n.getZoomDomain(),l);if(d){if(h&&(f=f.map(function(t,n){return a(this,e),+t+(0===n?0:1)}.bind(this))),n.api.tooltip.hide(),o.subchart_show){var g=u.zoom||u.x;n.brush.getSelection().call(n.brush.move,f.map(g))}else{var p,v=h?u.x.orgScale():s.xScale||u.x,y=[-v(f[0]),0],x=(p=yp.scale(v.range()[1]/(v(f[1])-v(f[0])))).translate.apply(p,c?y.reverse():y);i.eventRect.call(n.zoom.transform,x)}n.setZoomResetButton()}}else f=u.zoom?u.zoom.domain():u.x.orgDomain();return f};po(kp,{enable:function(t){var e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_max=wo("max",[i[1],t])),n.zoom_x_max},min:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_min=wo("min",[i[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(eo(t)){var n=t.min,i=t.max;Ga(n)&&e.min(n),Ga(i)&&e.max(i)}return{min:e.min(),max:e.max()}}});var Mp={zoom:kp,unzoom:function(){var t=this.internal,e=t.config,n=t.$el,i=n.eventRect,r=n.zoomResetBtn;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(yp),t.updateZoom(!0),null==r||r.style("display","none"),xp(i.node())!==yp&&t.zoom.transform(i,yp))}},Op={drag:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.main,s=i.data_selection_grouped,u=i.interaction_enabled&&i.data_selection_isselectable;if(!n.hasArcType()&&i.data_selection_enabled&&(!i.zoom_enabled||n.zoom.altDomain)&&i.data_selection_multiple){var c=r.dragStart||[0,0],l=c[0],h=c[1],f=t[0],d=t[1],g=Math.min(l,f),p=Math.max(l,f),v=s?r.margin.top:Math.min(h,d),y=s?r.height:Math.max(h,d);o.select("."+$o.dragarea).attr("x",g).attr("y",v).attr("width",p-g).attr("height",y-v),o.selectAll("."+Qo.shapes).selectAll("."+Qo.shape).filter(function(t){return a(this,e),null==u?void 0:u.bind(n.api)(t)}.bind(this)).each((function(t,e){var i,r=Rn(this),a=r.classed(Jo.SELECTED),o=r.classed($o.INCLUDED),s=!1;if(r.classed(jo.circle)){var u=1*+r.attr("cx"),c=1*+r.attr("cy");i=n.togglePoint,s=g0?n:i]}.bind(this))),u&&o[1].reverse(),this.extent(o),this.update()},i.brush.getSelection=function(){return a(this,n),s.main?s.main.select("."+as.brush):Rn([])}.bind(this)},initSubchart:function(){var t=this,e=this,n=e.config,i=e.state,r=i.clip,o=i.hasAxis,s=e.$el,u=s.defs,c=s.svg,l=s.subchart,h=s.axis;if(o){var f=n.subchart_show?null:"hidden",d=r.id+"-subchart",g=e.getClipPath(d);r.idSubchart=d,e.appendClip(u,d),e.initBrush(),l.main=c.append("g").classed(as.subchart,!0).attr("transform",e.getTranslate("context"));var p=l.main;p.style("visibility",f),p.append("g").attr("clip-path",g).attr("class",as.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){a(this,t);var i=vo(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(i)){var r=p.select("."+as.chart),o=as["chart"+i+"s"];r.select("."+o).empty()&&r.append("g").attr("class",o)}}.bind(this));var v=p.append("g").attr("clip-path",g).attr("class",as.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),h.subX=p.append("g").attr("class",as.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?f:"hidden")}},addBrushHandle:function(t){var e=this,n=this.config,i=n.axis_rotated,r=n.subchart_init_range,o=i?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(i?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(i?"ns":"ew")+"-resize").attr("d",function(t){return a(this,e),o[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.subchart.main;i.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return a(this,e),n.hasType(t)||n.hasTypeOf(vo(t))}.bind(this)).forEach(function(i){a(this,e);var r=/^(bubble|scatter)$/.test(i),s=vo(r?"circle":i),u=n.getChartClass(s,!0),c=n.getClass(r?"circles":i+"s",!0),l=o.select("."+as["chart"+s+"s"]);if(r){var h=l.selectAll("."+as.circles).data(t.filter(n["is"+vo(i)+"Type"].bind(n))).attr("class",c);h.exit().remove(),h.enter().append("g").attr("class",c)}else{var f=l.selectAll("."+as["chart"+s]).attr("class",u).data(t.filter(n["is"+s+"Type"].bind(n))),d=f.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",c);f.exit().remove(),"line"===i&&n.hasTypeOf("Area")&&d.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),o.selectAll("."+as.brush+" rect").attr(i.axis_rotated?"width":"height",i.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var i,r=this,o=this,s=o.config,u=o.$el.subchart.main,c=o.state,l=!!e;if((u.style("visibility",s.subchart_show?null:"hidden"),s.subchart_show)&&("zoom"===(null==(i=c.event)?void 0:i.type)&&o.brush.update(),t)){var h=s.subchart_init_range;if(go(o)||o.brush.update(),Object.keys(n.type).forEach(function(t){a(this,r);var e=vo(t),i=o["generateDraw"+e](n.indices[t],!0);o["update"+e](l,!0),o["redraw"+e](i,l,!0)}.bind(this)),o.hasType("bubble")||o.hasType("scatter")){var f=n.pos.cx,d=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(f,d,l,void 0,!0)}!c.rendered&&h&&o.brush.move(o.brush.getSelection(),h.map(o.scale.x))}},redrawForBrush:function(){var t=this,e=t.config,n=e.subchart_onbrush,i=e.zoom_rescale,r=t.scale;t.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),n.bind(t.api)(r.x.orgDomain())},transformContext:function(t,e){var n=this,i=n.$el.subchart,r=n.$T,a=null!=e&&e.axisSubX?e.axisSubX:r(i.main.select("."+as.axisX),t);i.main.attr("transform",n.getTranslate("context")),a.attr("transform",n.getTranslate("subX"))},getExtent:function(){var t=this,e=this,n=e.config,i=e.scale,r=n.axis_x_extent;if(r)if(Xa(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),i.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){var o=ko.bind(e);r=r.map(function(e){return a(this,t),i.subX(o(e))}.bind(this))}return r}},Pp={initZoom:function(){var t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);var e=this,n=e.config;n.zoom_enabled&&t?n.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this,e=this,n=e.config,i=e.org,r=e.scale,o=function(){var t,e,n,i=_p,r=Tp,a=Ep,o=Ap,s=Sp,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,h=dp,f=Kn("start","zoom","end"),d=0,g=10;function p(t){t.property("__zoom",wp).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new vp(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new vp(t.k,i,r)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,e,n,i){t.on("start.zoom",(function(){m(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,a=arguments,o=m(t,a).event(i),s=r.apply(t,a),u=null==n?x(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=h(l.invert(u).concat(c/l.k),f.invert(u).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=c/e[2];t=new vp(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function T(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),o=1;od}u.event(t).zoom("mouse",a(y(u.that.__zoom,u.mouse[0]=Vn(t,s),u.mouse[1]),u.extent,c))}),!0).on("mouseup.zoom",(function(t){l.on("mousemove.zoom mouseup.zoom",null),ii(t.view,u.moved),mp(t),u.event(t).end()}),!0),h=Vn(t,s),f=t.clientX,g=t.clientY;ni(t.view),bp(t),u.mouse=[h,this.__zoom.invert(h)],Rr(this),u.start()}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o0?Rn(this).transition().duration(l).call(b,d,u,t):Rn(this).call(p.transform,d,u,t)}}function S(n){for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o1?e-1:0),i=1;i1?i-1:0),a=1;a-1&&1===(null==u?void 0:u.touches.length))){t.sourceEvent&&(o.zooming=!0);var l="mousemove"===(null==u?void 0:u.type),h=(null==u?void 0:u.wheelDelta)<0,f=t.transform;!l&&h&&r.x.domain().every(function(t,n){return a(this,e),t!==s.xDomain[n]}.bind(this))&&r.x.domain(s.xDomain),n.zoom.updateTransformScale(f,"wheel"===i.zoom_type&&u);var d=i.transition_duration>0&&!i.subchart_show&&(o.dragging||c||!t.sourceEvent);n.redraw({withTransition:d,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n.state.cancelClick=l,c||io(i.zoom_onzoom,n.api,n.zoom.getDomain())}},onZoomEnd:function(t){var e,n,i=this,r=i.config,a=i.state,o=i.zoom.startEvent,s=null==t?void 0:t.sourceEvent,u=(null==t?void 0:t.transform)===yp;(null==(e=o)?void 0:e.type.indexOf("touch"))>-1&&(o=o.changedTouches[0],s=null==(n=s)||null==(n=n.changedTouches)?void 0:n[0]);"drag"===r.zoom_type&&s&&o.clientX===s.clientX&&o.clientY===s.clientY||(i.redrawEventRect(),i.updateZoom(),a.zooming=!1,!u&&(s||a.dragging)&&io(r.zoom_onzoomend,i.api,i.zoom.getDomain()))},updateZoom:function(t){var e=this,n=e.scale,i=n.subX,r=n.x,a=n.zoom;if(a){var o=a.domain(),s=i.domain(),u=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+u>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+u):(o[0]<=s[0]||o[0]-u<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-u);(t||c)&&(e.axis.x.scale(i),r.domain(i.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this,e=this,n=e.config,i=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){a(this,t)}.bind(this)),i.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t,e=this,n=this,i=n.config,r=n.state,o=i.axis_rotated,s=0,u=0,c={axis:o?"y":"x",attr:o?"height":"width",index:o?1:0};n.zoomBehaviour=du().clickDistance(4).on("start",(function(e){r.event=e,n.setDragStatus(!0),n.unselectRect(),t||(t=n.$el.main.append("rect").attr("clip-path",r.clip.path).attr("class",rs.zoomBrush).attr("width",o?r.width:0).attr("height",o?0:r.height)),s=uo(e,this)[c.index],u=s,t.attr(c.axis,s).attr(c.attr,0),n.onZoomStart(e)})).on("drag",(function(e){u=uo(e,this)[c.index],t.attr(c.axis,Math.min(s,u)).attr(c.attr,Math.abs(u-s))})).on("end",function(i){var o=this;a(this,e);var l=n.scale.zoom||n.scale.x;if(r.event=i,t.attr(c.axis,0).attr(c.attr,0),s>u){var h=[u,s];s=h[0],u=h[1]}s<0&&(u+=Math.abs(s),s=0),s!==u&&n.api.zoom([s,u].map(function(t){return a(this,o),l.invert(t)}.bind(this))),n.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){var t=this,e=t.config,n=t.$el,i=e.zoom_resetButton;i&&"drag"===e.zoom_type&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Lo.button,!0).append("span").on("click",(function(){Xa(i.onclick)&&i.onclick.bind(t.api)(this),t.api.unzoom()})).classed(rs.buttonZoomReset,!0).text(i.text||"Reset Zoom"))}},Dp=void 0,Np={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return a(this,Dp),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){a(this,Dp)}.bind(void 0),data_onunselected:function(){a(this,Dp)}.bind(void 0)},Fp={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){a(this,undefined)}.bind(void 0)},zp={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},jp=void 0,Bp=function(){var t=this;return a(this,jp),po(Ch.prototype,Ip),po(Hh.prototype,lp),ms.setOptions([Np]),(Bp=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),$p=function(){var t=this;return a(this,jp),po(Ch.prototype,Lp),po(Hh.prototype,hp),ms.setOptions([Fp]),($p=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),Xp=function(){var t=this;return a(this,jp),po(Ch.prototype,Pp),po(Hh.prototype,Mp),ms.setOptions([zp]),(Xp=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),Up={},Yp={version:"3.9.2-nightly-20230805003715",generate:function(t){var e=_o({},Up,t),n=new Hh(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return eo(t)&&(Up=t),Up},instance:[],plugin:{}},Vp=void 0;Object.keys(i).forEach(function(t){return a(this,Vp),i[t]()}.bind(void 0)),Object.keys(r).forEach(function(t){return a(this,Vp),r[t]()}.bind(void 0))},function(t,e,n){var i=n(528)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){var i=n(529).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof p?e:p,a=Object.create(r.prototype),s=new M(i||[]);return o(a,"_invoke",{value:A(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g={};function p(){}function v(){}function y(){}var x={};h(x,u,(function(){return this}));var b=Object.getPrototypeOf,m=b&&b(b(O([])));m&&m!==n&&a.call(m,u)&&(x=m);var _=y.prototype=p.prototype=Object.create(x);function T(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(r,o,s,u){var c=d(t[r],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==i(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var r;o(this,"_invoke",{value:function(t,i){function a(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(a,a):a()}})}function A(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return R()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=S(o,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var u=d(t,e,n);if("normal"===u.type){if(i=n.done?"completed":"suspendedYield",u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i="completed",n.method="throw",n.arg=u.arg)}}}function S(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var r=d(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--i){var r=this.tryEntries[i],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=a.call(r,"catchLoc"),u=a.call(r,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}],e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i].call(a.exports,a,a.exports,n),a.exports}return n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(0),n(526)}()})); \ No newline at end of file +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(this,(function(){return function(){var t=[function(t,e,n){"use strict";n(1),n(100),n(101),n(102),n(103),n(104),n(105),n(106),n(107),n(108),n(109),n(110),n(111),n(112),n(113),n(114),n(126),n(128),n(138),n(139),n(141),n(144),n(147),n(149),n(151),n(152),n(153),n(154),n(156),n(157),n(159),n(160),n(162),n(166),n(167),n(168),n(169),n(174),n(175),n(177),n(178),n(179),n(181),n(184),n(185),n(186),n(187),n(188),n(193),n(195),n(196),n(198),n(201),n(202),n(203),n(204),n(205),n(207),n(214),n(216),n(219),n(221),n(222),n(223),n(224),n(225),n(229),n(230),n(232),n(233),n(234),n(236),n(237),n(238),n(95),n(239),n(240),n(248),n(250),n(251),n(252),n(254),n(255),n(257),n(258),n(260),n(261),n(262),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(275),n(276),n(278),n(280),n(281),n(282),n(283),n(284),n(286),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(297),n(298),n(299),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(325),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(373),n(374),n(376),n(377),n(378),n(379),n(380),n(382),n(383),n(385),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(399),n(400),n(401),n(402),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(412),n(415),n(418),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(487),n(489),n(491),n(492),n(495),n(496),n(499),n(500),n(501),n(506),n(507),n(508),n(512),n(515),n(520),n(521),n(522),n(523),n(524),n(525),n(82)},function(t,e,n){"use strict";n(2),n(92),n(94),n(95),n(99)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(8),o=n(14),s=n(36),u=n(6),c=n(27),l=n(7),h=n(39),f=n(25),d=n(47),g=n(12),p=n(18),v=n(69),y=n(11),x=n(72),b=n(74),m=n(58),_=n(76),T=n(67),w=n(5),A=n(45),S=n(73),E=n(10),k=n(48),M=n(79),O=n(35),R=n(54),C=n(55),I=n(41),L=n(34),P=n(80),D=n(81),N=n(83),F=n(84),z=n(52),j=n(85).forEach,B=R("hidden"),$="Symbol",X="prototype",U=z.set,Y=z.getterFor($),V=Object[X],G=r.Symbol,H=G&&G[X],W=r.TypeError,q=r.QObject,Z=w.f,K=A.f,J=_.f,Q=E.f,tt=o([].push),et=O("symbols"),nt=O("op-symbols"),it=O("wks"),rt=!q||!q[X]||!q[X].findChild,at=u&&l((function(){return 7!=x(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(t,e,n){var i=Z(V,e);i&&delete V[e],K(t,e,n),i&&t!==V&&K(V,e,i)}:K,ot=function(t,e){var n=et[t]=x(H);return U(n,{type:$,tag:t,description:e}),u||(n.description=e),n},st=function(t,e,n){t===V&&st(nt,e,n),d(t);var i=p(e);return d(n),h(et,i)?(n.enumerable?(h(t,B)&&t[B][i]&&(t[B][i]=!1),n=x(n,{enumerable:y(0,!1)})):(h(t,B)||K(t,B,y(1,{})),t[B][i]=!0),at(t,i,n)):K(t,i,n)},ut=function(t,e){d(t);var n=g(e),i=b(n).concat(ft(n));return j(i,(function(e){u&&!a(ct,n,e)||st(t,e,n[e])})),t},ct=function(t){var e=p(t),n=a(Q,this,e);return!(this===V&&h(et,e)&&!h(nt,e))&&(!(n||!h(this,e)||!h(et,e)||h(this,B)&&this[B][e])||n)},lt=function(t,e){var n=g(t),i=p(e);if(n!==V||!h(et,i)||h(nt,i)){var r=Z(n,i);return!r||!h(et,i)||h(n,B)&&n[B][i]||(r.enumerable=!0),r}},ht=function(t){var e=J(g(t)),n=[];return j(e,(function(t){h(et,t)||h(C,t)||tt(n,t)})),n},ft=function(t){var e=t===V,n=J(e?nt:g(t)),i=[];return j(n,(function(t){!h(et,t)||e&&!h(V,t)||tt(i,et[t])})),i};c||(G=function(){if(f(H,this))throw W("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=I(t),n=function(t){this===V&&a(n,nt,t),h(this,B)&&h(this[B],e)&&(this[B][e]=!1),at(this,e,y(1,t))};return u&&rt&&at(V,e,{configurable:!0,set:n}),ot(e,t)},k(H=G[X],"toString",(function(){return Y(this).tag})),k(G,"withoutSetter",(function(t){return ot(I(t),t)})),E.f=ct,A.f=st,S.f=ut,w.f=lt,m.f=_.f=ht,T.f=ft,P.f=function(t){return ot(L(t),t)},u&&(M(H,"description",{configurable:!0,get:function(){return Y(this).description}}),s||k(V,"propertyIsEnumerable",ct,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:G}),j(b(it),(function(t){D(t)})),i({target:$,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!u},{create:function(t,e){return void 0===e?x(t):ut(x(t),e)},defineProperty:st,defineProperties:ut,getOwnPropertyDescriptor:lt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:ht}),N(),F(G,$),C[B]=!0},function(t,e,n){"use strict";var i=n(4),r=n(5).f,a=n(44),o=n(48),s=n(38),u=n(56),c=n(68);t.exports=function(t,e){var n,l,h,f,d,g=t.target,p=t.global,v=t.stat;if(n=p?i:v?i[g]||s(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],h=t.dontCallGetSet?(d=r(n,l))&&d.value:n[l],!c(p?l:g+(v?".":"#")+l,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;u(f,h)}(t.sham||h&&h.sham)&&a(f,"sham",!0),o(n,l,f,t)}}},function(t){"use strict";var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},function(t,e,n){"use strict";var i=n(6),r=n(8),a=n(10),o=n(11),s=n(12),u=n(18),c=n(39),l=n(42),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=s(t),e=u(e),l)try{return h(t,e)}catch(t){}if(c(t,e))return o(!r(a.f,t,e),t[e])}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var i=n(9),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";var i=n(13),r=n(16);t.exports=function(t){return i(r(t))}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(15),o=Object,s=i("".split);t.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,a=r.call,o=i&&r.bind.bind(a,a);t.exports=i?o:function(t){return function(){return a.apply(t,arguments)}}},function(t,e,n){"use strict";var i=n(14),r=i({}.toString),a=i("".slice);t.exports=function(t){return a(r(t),8,-1)}},function(t,e,n){"use strict";var i=n(17),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},function(t){"use strict";t.exports=function(t){return null==t}},function(t,e,n){"use strict";var i=n(19),r=n(23);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},function(t,e,n){"use strict";var i=n(8),r=n(20),a=n(23),o=n(30),s=n(33),u=n(34),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!r(t)||a(t))return t;var n,u=o(t,l);if(u){if(void 0===e&&(e="default"),n=i(u,t,e),!r(n)||a(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},function(t,e,n){"use strict";var i=n(21),r=n(22),a=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===a}:function(t){return"object"==typeof t?null!==t:i(t)}},function(t,e,n){"use strict";var i=n(22),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},function(t){"use strict";var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},function(t,e,n){"use strict";var i=n(24),r=n(21),a=n(25),o=n(26),s=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return r(e)&&a(e.prototype,s(t))}},function(t,e,n){"use strict";var i=n(4),r=n(21);t.exports=function(t,e){return arguments.length<2?(n=i[t],r(n)?n:void 0):i[t]&&i[t][e];var n}},function(t,e,n){"use strict";var i=n(14);t.exports=i({}.isPrototypeOf)},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){"use strict";var i=n(28),r=n(7),a=n(4).String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(t,e,n){"use strict";var i,r,a=n(4),o=n(29),s=a.process,u=a.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(r=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,n){"use strict";var i=n(31),r=n(17);t.exports=function(t,e){var n=t[e];return r(n)?void 0:i(n)}},function(t,e,n){"use strict";var i=n(21),r=n(32),a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not a function")}},function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},function(t,e,n){"use strict";var i=n(8),r=n(21),a=n(20),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&r(n=t.toString)&&!a(s=i(n,t)))return s;if(r(n=t.valueOf)&&!a(s=i(n,t)))return s;if("string"!==e&&r(n=t.toString)&&!a(s=i(n,t)))return s;throw o("Can't convert object to primitive value")}},function(t,e,n){"use strict";var i=n(4),r=n(35),a=n(39),o=n(41),s=n(27),u=n(26),c=i.Symbol,l=r("wks"),h=u?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return a(l,t)||(l[t]=s&&a(c,t)?c[t]:h("Symbol."+t)),l[t]}},function(t,e,n){"use strict";var i=n(36),r=n(37);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t){"use strict";t.exports=!1},function(t,e,n){"use strict";var i=n(4),r=n(38),a="__core-js_shared__",o=i[a]||r(a,{});t.exports=o},function(t,e,n){"use strict";var i=n(4),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},function(t,e,n){"use strict";var i=n(14),r=n(40),a=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(r(t),e)}},function(t,e,n){"use strict";var i=n(16),r=Object;t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var i=n(14),r=0,a=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++r+a,36)}},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(43);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var i=n(4),r=n(20),a=i.document,o=r(a)&&r(a.createElement);t.exports=function(t){return o?a.createElement(t):{}}},function(t,e,n){"use strict";var i=n(6),r=n(45),a=n(11);t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";var i=n(6),r=n(42),a=n(46),o=n(47),s=n(18),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,h="enumerable",f="configurable",d="writable";e.f=i?a?function(t,e,n){if(o(t),e=s(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var i=l(t,e);i&&i[d]&&(t[e]=n.value,n={configurable:f in n?n[f]:i[f],enumerable:h in n?n[h]:i[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=s(e),o(n),r)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";var i=n(6),r=n(7);t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){"use strict";var i=n(20),r=String,a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not an object")}},function(t,e,n){"use strict";var i=n(21),r=n(45),a=n(49),o=n(38);t.exports=function(t,e,n,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(i(n)&&a(n,c,s),s.global)u?t[e]=n:o(e,n);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:r.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(21),o=n(39),s=n(6),u=n(50).CONFIGURABLE,c=n(51),l=n(52),h=l.enforce,f=l.get,d=String,g=Object.defineProperty,p=i("".slice),v=i("".replace),y=i([].join),x=s&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),b=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===p(d(e),0,7)&&(e="["+v(d(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||u&&t.name!==e)&&(s?g(t,"name",{value:e,configurable:!0}):t.name=e),x&&n&&o(n,"arity")&&t.length!==n.arity&&g(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return o(i,"source")||(i.source=y(b,"string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return a(this)&&f(this).source||c(this)}),"toString")},function(t,e,n){"use strict";var i=n(6),r=n(39),a=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,s=r(a,"name"),u=s&&"something"===function(){}.name,c=s&&(!i||i&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},function(t,e,n){"use strict";var i=n(14),r=n(21),a=n(37),o=i(Function.toString);r(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},function(t,e,n){"use strict";var i,r,a,o=n(53),s=n(4),u=n(20),c=n(44),l=n(39),h=n(37),f=n(54),d=n(55),g="Object already initialized",p=s.TypeError,v=s.WeakMap;if(o||h.state){var y=h.state||(h.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(t,e){if(y.has(t))throw p(g);return e.facade=t,y.set(t,e),e},r=function(t){return y.get(t)||{}},a=function(t){return y.has(t)}}else{var x=f("state");d[x]=!0,i=function(t,e){if(l(t,x))throw p(g);return e.facade=t,c(t,x,e),e},r=function(t){return l(t,x)?t[x]:{}},a=function(t){return l(t,x)}}t.exports={set:i,get:r,has:a,enforce:function(t){return a(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=r(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";var i=n(4),r=n(21),a=i.WeakMap;t.exports=r(a)&&/native code/.test(String(a))},function(t,e,n){"use strict";var i=n(35),r=n(41),a=i("keys");t.exports=function(t){return a[t]||(a[t]=r(t))}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(39),r=n(57),a=n(5),o=n(45);t.exports=function(t,e,n){for(var s=r(e),u=o.f,c=a.f,l=0;lc;)r(i,n=e[c++])&&(~o(l,n)||u(l,n));return l}},function(t,e,n){"use strict";var i=n(12),r=n(61),a=n(64),o=function(t){return function(e,n,o){var s,u=i(e),c=a(u),l=r(o,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},function(t,e,n){"use strict";var i=n(62),r=Math.max,a=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):a(n,e)}},function(t,e,n){"use strict";var i=n(63);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},function(t,e,n){"use strict";var i=n(65);t.exports=function(t){return i(t.length)}},function(t,e,n){"use strict";var i=n(62),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},function(t,e,n){"use strict";var i=n(7),r=n(21),a=/#|\.prototype\./,o=function(t,e){var n=u[s(t)];return n==l||n!=c&&(r(e)?i(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},u=o.data={},c=o.NATIVE="N",l=o.POLYFILL="P";t.exports=o},function(t,e,n){"use strict";var i=n(70),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},function(t,e,n){"use strict";var i=n(71),r=n(21),a=n(15),o=n(34)("toStringTag"),s=Object,u="Arguments"==a(function(){return arguments}());t.exports=i?a:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=s(t),o))?n:u?a(e):"Object"==(i=a(e))&&r(e.callee)?"Arguments":i}},function(t,e,n){"use strict";var i={};i[n(34)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){"use strict";var i,r=n(47),a=n(73),o=n(66),s=n(55),u=n(75),c=n(43),l=n(54),h="prototype",f="script",d=l("IE_PROTO"),g=function(){},p=function(t){return"<"+f+">"+t+""},v=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;y="undefined"!=typeof document?document.domain&&i?v(i):(e=c("iframe"),n="java"+f+":",e.style.display="none",u.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):v(i);for(var r=o.length;r--;)delete y[h][o[r]];return y()};s[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[h]=r(t),n=new g,g[h]=null,n[d]=t):n=y(),void 0===e?n:a.f(n,e)}},function(t,e,n){"use strict";var i=n(6),r=n(46),a=n(45),o=n(47),s=n(12),u=n(74);e.f=i&&!r?Object.defineProperties:function(t,e){o(t);for(var n,i=s(e),r=u(e),c=r.length,l=0;c>l;)a.f(t,n=r[l++],i[n]);return t}},function(t,e,n){"use strict";var i=n(59),r=n(66);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){"use strict";var i=n(24);t.exports=i("document","documentElement")},function(t,e,n){"use strict";var i=n(15),r=n(12),a=n(58).f,o=n(77),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"Window"==i(t)?function(t){try{return a(t)}catch(t){return o(s)}}(t):a(r(t))}},function(t,e,n){"use strict";var i=n(61),r=n(64),a=n(78),o=Array,s=Math.max;t.exports=function(t,e,n){for(var u=r(t),c=i(e,u),l=i(void 0===n?u:n,u),h=o(s(l-c,0)),f=0;cA;A++)if((d||A in _)&&(b=T(x=_[A],A,m),t))if(e)E[A]=b;else if(b)switch(t){case 3:return!0;case 5:return x;case 6:return A;case 2:c(E,x)}else switch(t){case 4:return!1;case 7:c(E,x)}return h?-1:r||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){"use strict";var i=n(87),r=n(31),a=n(9),o=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";var i=n(15),r=n(14);t.exports=function(t){if("Function"===i(t))return r(t)}},function(t,e,n){"use strict";var i=n(89);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},function(t,e,n){"use strict";var i=n(90),r=n(91),a=n(20),o=n(34)("species"),s=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(r(e)&&(e===s||i(e.prototype))||a(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?s:e}},function(t,e,n){"use strict";var i=n(15);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(14),r=n(7),a=n(21),o=n(70),s=n(24),u=n(51),c=function(){},l=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=i(f.exec),g=!f.exec(c),p=function(t){if(!a(t))return!1;try{return h(c,l,t),!0}catch(t){return!1}},v=function(t){if(!a(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return g||!!d(f,u(t))}catch(t){return!0}};v.sham=!0,t.exports=!h||r((function(){var t;return p(p.call)||!p(Object)||!p((function(){t=!0}))||t}))?v:p},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(39),o=n(69),s=n(35),u=n(93),c=s("string-to-symbol-registry"),l=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{for:function(t){var e=o(t);if(a(c,e))return c[e];var n=r("Symbol")(e);return c[e]=n,l[n]=e,n}})},function(t,e,n){"use strict";var i=n(27);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,n){"use strict";var i=n(3),r=n(39),a=n(23),o=n(32),s=n(35),u=n(93),c=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{keyFor:function(t){if(!a(t))throw TypeError(o(t)+" is not a symbol");if(r(c,t))return c[t]}})},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(96),o=n(8),s=n(14),u=n(7),c=n(21),l=n(23),h=n(97),f=n(98),d=n(27),g=String,p=r("JSON","stringify"),v=s(/./.exec),y=s("".charAt),x=s("".charCodeAt),b=s("".replace),m=s(1..toString),_=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,A=!d||u((function(){var t=r("Symbol")();return"[null]"!=p([t])||"{}"!=p({a:t})||"{}"!=p(Object(t))})),S=u((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),E=function(t,e){var n=h(arguments),i=f(e);if(c(i)||void 0!==t&&!l(t))return n[1]=function(t,e){if(c(i)&&(e=o(i,this,g(t),e)),!l(e))return e},a(p,null,n)},k=function(t,e,n){var i=y(n,e-1),r=y(n,e+1);return v(T,t)&&!v(w,r)||v(w,t)&&!v(T,i)?"\\u"+m(x(t,0),16):t};p&&i({target:"JSON",stat:!0,arity:3,forced:A||S},{stringify:function(t,e,n){var i=h(arguments),r=a(A?E:p,null,i);return S&&"string"==typeof r?b(r,_,k):r}})},function(t,e,n){"use strict";var i=n(9),r=Function.prototype,a=r.apply,o=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(a):function(){return o.apply(a,arguments)})},function(t,e,n){"use strict";var i=n(14);t.exports=i([].slice)},function(t,e,n){"use strict";var i=n(14),r=n(90),a=n(21),o=n(15),s=n(69),u=i([].push);t.exports=function(t){if(a(t))return t;if(r(t)){for(var e=t.length,n=[],i=0;ix&&f(i,arguments[x]),i}));if(A.prototype=T,"Error"!==m?s?s(A,w):u(A,w,{name:!0}):g&&y in _&&(c(A,_,y),c(A,_,"prepareStackTrace")),u(A,_),!p)try{T.name!==m&&a(T,"name",m),T.constructor=A}catch(t){}return A}}},function(t,e,n){"use strict";var i=n(117),r=n(47),a=n(118);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),a(i),e?t(n,i):n.__proto__=i,n}}():void 0)},function(t,e,n){"use strict";var i=n(14),r=n(31);t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},function(t,e,n){"use strict";var i=n(21),r=String,a=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw a("Can't set "+r(t)+" as a prototype")}},function(t,e,n){"use strict";var i=n(45).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},function(t,e,n){"use strict";var i=n(21),r=n(20),a=n(116);t.exports=function(t,e,n){var o,s;return a&&i(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},function(t,e,n){"use strict";var i=n(69);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},function(t,e,n){"use strict";var i=n(20),r=n(44);t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},function(t,e,n){"use strict";var i=n(44),r=n(124),a=n(125),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):i(t,"stack",r(n,s)))}},function(t,e,n){"use strict";var i=n(14),r=Error,a=i("".replace),o=String(r("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(o);t.exports=function(t,e){if(u&&"string"==typeof t&&!r.prepareStackTrace)for(;e--;)t=a(t,s,"");return t}},function(t,e,n){"use strict";var i=n(7),r=n(11);t.exports=!i((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",r(1,7)),7!==t.stack)}))},function(t,e,n){"use strict";var i=n(48),r=n(127),a=Error.prototype;a.toString!==r&&i(a,"toString",r)},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(47),o=n(72),s=n(121),u=Error.prototype.toString,c=r((function(){if(i){var t=o(Object.defineProperty({},"name",{get:function(){return this===t}}));if("true"!==u.call(t))return!0}return"2: 1"!==u.call({message:1,name:2})||"Error"!==u.call({})}));t.exports=c?function(){var t=a(this),e=s(t.name,"Error"),n=s(t.message);return e?n?e+": "+n:e:n}:u},function(t,e,n){"use strict";n(129)},function(t,e,n){"use strict";var i=n(3),r=n(25),a=n(130),o=n(116),s=n(56),u=n(72),c=n(44),l=n(11),h=n(122),f=n(123),d=n(132),g=n(121),p=n(34)("toStringTag"),v=Error,y=[].push,x=function(t,e){var n,i=r(b,this);o?n=o(v(),i?a(this):b):(n=i?this:u(b),c(n,p,"Error")),void 0!==e&&c(n,"message",g(e)),f(n,x,n.stack,1),arguments.length>2&&h(n,arguments[2]);var s=[];return d(t,y,{that:s}),c(n,"errors",s),n};o?o(x,v):s(x,v,{name:!0});var b=x.prototype=u(v.prototype,{constructor:l(1,x),message:l(1,""),name:l(1,"AggregateError")});i({global:!0,constructor:!0,arity:2},{AggregateError:x})},function(t,e,n){"use strict";var i=n(39),r=n(21),a=n(40),o=n(54),s=n(131),u=o("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=a(t);if(i(e,u))return e[u];var n=e.constructor;return r(n)&&e instanceof n?n.prototype:e instanceof c?l:null}},function(t,e,n){"use strict";var i=n(7);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(47),o=n(32),s=n(133),u=n(64),c=n(25),l=n(135),h=n(136),f=n(137),d=TypeError,g=function(t,e){this.stopped=t,this.result=e},p=g.prototype;t.exports=function(t,e,n){var v,y,x,b,m,_,T,w=n&&n.that,A=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),k=!(!n||!n.INTERRUPTED),M=i(e,w),O=function(t){return v&&f(v,"normal",t),new g(!0,t)},R=function(t){return A?(a(t),k?M(t[0],t[1],O):M(t[0],t[1])):k?M(t,O):M(t)};if(S)v=t.iterator;else if(E)v=t;else{if(!(y=h(t)))throw d(o(t)+" is not iterable");if(s(y)){for(x=0,b=u(t);b>x;x++)if((m=R(t[x]))&&c(p,m))return m;return new g(!1)}v=l(t,y)}for(_=S?t.next:v.next;!(T=r(_,v)).done;){try{m=R(T.value)}catch(t){f(v,"throw",t)}if("object"==typeof m&&m&&c(p,m))return m}return new g(!1)}},function(t,e,n){"use strict";var i=n(34),r=n(134),a=i("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[a]===t)}},function(t){"use strict";t.exports={}},function(t,e,n){"use strict";var i=n(8),r=n(31),a=n(47),o=n(32),s=n(136),u=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(r(n))return a(i(n,t));throw u(o(t)+" is not iterable")}},function(t,e,n){"use strict";var i=n(70),r=n(30),a=n(17),o=n(134),s=n(34)("iterator");t.exports=function(t){if(!a(t))return r(t,s)||r(t,"@@iterator")||o[i(t)]}},function(t,e,n){"use strict";var i=n(8),r=n(47),a=n(30);t.exports=function(t,e,n){var o,s;r(t);try{if(!(o=a(t,"return"))){if("throw"===e)throw n;return n}o=i(o,t)}catch(t){s=!0,o=t}if("throw"===e)throw n;if(s)throw o;return r(o),n}},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(96),o=n(7),s=n(115),u="AggregateError",c=r(u),l=!o((function(){return 1!==c([1]).errors[0]}))&&o((function(){return 7!==c([1],u,{cause:7}).cause}));i({global:!0,constructor:!0,arity:2,forced:l},{AggregateError:s(u,(function(t){return function(e,n){return a(t,this,arguments)}}),l,!0)})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(64),o=n(62),s=n(140);i({target:"Array",proto:!0},{at:function(t){var e=r(this),n=a(e),i=o(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}}),s("at")},function(t,e,n){"use strict";var i=n(34),r=n(72),a=n(45).f,o=i("unscopables"),s=Array.prototype;null==s[o]&&a(s,o,{configurable:!0,value:r(null)}),t.exports=function(t){s[o][t]=!0}},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(90),o=n(20),s=n(40),u=n(64),c=n(142),l=n(78),h=n(88),f=n(143),d=n(34),g=n(28),p=d("isConcatSpreadable"),v=g>=51||!r((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),y=function(t){if(!o(t))return!1;var e=t[p];return void 0!==e?!!e:a(t)};i({target:"Array",proto:!0,arity:1,forced:!v||!f("concat")},{concat:function(t){var e,n,i,r,a,o=s(this),f=h(o,0),d=0;for(e=-1,i=arguments.length;e9007199254740991)throw e("Maximum allowed index exceeded");return t}},function(t,e,n){"use strict";var i=n(7),r=n(34),a=n(28),o=r("species");t.exports=function(t){return a>=51||!i((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){"use strict";var i=n(3),r=n(145),a=n(140);i({target:"Array",proto:!0},{copyWithin:r}),a("copyWithin")},function(t,e,n){"use strict";var i=n(40),r=n(61),a=n(64),o=n(146),s=Math.min;t.exports=[].copyWithin||function(t,e){var n=i(this),u=a(n),c=r(t,u),l=r(e,u),h=arguments.length>2?arguments[2]:void 0,f=s((void 0===h?u:r(h,u))-l,u-c),d=1;for(l0;)l in n?n[c]=n[l]:o(n,c),c+=d,l+=d;return n}},function(t,e,n){"use strict";var i=n(32),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw r("Cannot delete property "+i(e)+" of "+i(t))}},function(t,e,n){"use strict";var i=n(3),r=n(85).every;i({target:"Array",proto:!0,forced:!n(148)("every")},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(7);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},function(t,e,n){"use strict";var i=n(3),r=n(150),a=n(140);i({target:"Array",proto:!0},{fill:r}),a("fill")},function(t,e,n){"use strict";var i=n(40),r=n(61),a=n(64);t.exports=function(t){for(var e=i(this),n=a(e),o=arguments.length,s=r(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:r(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var i=n(3),r=n(85).filter;i({target:"Array",proto:!0,forced:!n(143)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(85).find,a=n(140),o="find",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var i=n(3),r=n(85).findIndex,a=n(140),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),i({target:"Array",proto:!0,forced:s},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a(o)},function(t,e,n){"use strict";var i=n(3),r=n(155).findLast,a=n(140);i({target:"Array",proto:!0},{findLast:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},function(t,e,n){"use strict";var i=n(86),r=n(13),a=n(40),o=n(64),s=function(t){var e=1==t;return function(n,s,u){for(var c,l=a(n),h=r(l),f=i(s,u),d=o(h);d-- >0;)if(f(c=h[d],d,l))switch(t){case 0:return c;case 1:return d}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},function(t,e,n){"use strict";var i=n(3),r=n(155).findLastIndex,a=n(140);i({target:"Array",proto:!0},{findLastIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},function(t,e,n){"use strict";var i=n(3),r=n(158),a=n(40),o=n(64),s=n(62),u=n(88);i({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=a(this),n=o(e),i=u(e,0);return i.length=r(i,e,e,n,0,void 0===t?1:s(t)),i}})},function(t,e,n){"use strict";var i=n(90),r=n(64),a=n(142),o=n(86),s=function(t,e,n,u,c,l,h,f){for(var d,g,p=c,v=0,y=!!h&&o(h,f);v0&&i(d)?(g=r(d),p=s(t,e,d,g,p,l-1)-1):(a(p+1),t[p]=d),p++),v++;return p};t.exports=s},function(t,e,n){"use strict";var i=n(3),r=n(158),a=n(31),o=n(40),s=n(64),u=n(88);i({target:"Array",proto:!0},{flatMap:function(t){var e,n=o(this),i=s(n);return a(t),(e=u(n,0)).length=r(e,n,n,i,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},function(t,e,n){"use strict";var i=n(3),r=n(161);i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(t,e,n){"use strict";var i=n(85).forEach,r=n(148)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){"use strict";var i=n(3),r=n(163);i({target:"Array",stat:!0,forced:!n(165)((function(t){Array.from(t)}))},{from:r})},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(40),o=n(164),s=n(133),u=n(91),c=n(64),l=n(78),h=n(135),f=n(136),d=Array;t.exports=function(t){var e=a(t),n=u(this),g=arguments.length,p=g>1?arguments[1]:void 0,v=void 0!==p;v&&(p=i(p,g>2?arguments[2]:void 0));var y,x,b,m,_,T,w=f(e),A=0;if(!w||this===d&&s(w))for(y=c(e),x=n?new this(y):d(y);y>A;A++)T=v?p(e[A],A):e[A],l(x,A,T);else for(_=(m=h(e,w)).next,x=n?new this:[];!(b=r(_,m)).done;A++)T=v?o(m,p,[b.value,A],!0):b.value,l(x,A,T);return x.length=A,x}},function(t,e,n){"use strict";var i=n(47),r=n(137);t.exports=function(t,e,n,a){try{return a?e(i(n)[0],n[1]):e(n)}catch(e){r(t,"throw",e)}}},function(t,e,n){"use strict";var i=n(34)("iterator"),r=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var a={};a[i]=function(){return{next:function(){return{done:n=!0}}}},t(a)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(3),r=n(60).includes,a=n(7),o=n(140);i({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(t,e,n){"use strict";var i=n(3),r=n(87),a=n(60).indexOf,o=n(148),s=r([].indexOf),u=!!s&&1/s([1],1,-0)<0;i({target:"Array",proto:!0,forced:u||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return u?s(this,t,e)||0:a(this,t,e)}})},function(t,e,n){"use strict";n(3)({target:"Array",stat:!0},{isArray:n(90)})},function(t,e,n){"use strict";var i=n(12),r=n(140),a=n(134),o=n(52),s=n(45).f,u=n(170),c=n(173),l=n(36),h=n(6),f="Array Iterator",d=o.set,g=o.getterFor(f);t.exports=u(Array,"Array",(function(t,e){d(this,{type:f,target:i(t),index:0,kind:e})}),(function(){var t=g(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==n?i:"values"==n?e[i]:[i,e[i]],!1)}),"values");var p=a.Arguments=a.Array;if(r("keys"),r("values"),r("entries"),!l&&h&&"values"!==p.name)try{s(p,"name",{value:"values"})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(36),o=n(50),s=n(21),u=n(171),c=n(130),l=n(116),h=n(84),f=n(44),d=n(48),g=n(34),p=n(134),v=n(172),y=o.PROPER,x=o.CONFIGURABLE,b=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,_=g("iterator"),T="keys",w="values",A="entries",S=function(){return this};t.exports=function(t,e,n,o,g,v,E){u(n,e,o);var k,M,O,R=function(t){if(t===g&&D)return D;if(!m&&t in L)return L[t];switch(t){case T:case w:case A:return function(){return new n(this,t)}}return function(){return new n(this)}},C=e+" Iterator",I=!1,L=t.prototype,P=L[_]||L["@@iterator"]||g&&L[g],D=!m&&P||R(g),N="Array"==e&&L.entries||P;if(N&&(k=c(N.call(new t)))!==Object.prototype&&k.next&&(a||c(k)===b||(l?l(k,b):s(k[_])||d(k,_,S)),h(k,C,!0,!0),a&&(p[C]=S)),y&&g==w&&P&&P.name!==w&&(!a&&x?f(L,"name",w):(I=!0,D=function(){return r(P,this)})),g)if(M={values:R(w),keys:v?D:R(T),entries:R(A)},E)for(O in M)(m||I||!(O in L))&&d(L,O,M[O]);else i({target:e,proto:!0,forced:m||I},M);return a&&!E||L[_]===D||d(L,_,D,{name:g}),p[e]=D,M}},function(t,e,n){"use strict";var i=n(172).IteratorPrototype,r=n(72),a=n(11),o=n(84),s=n(134),u=function(){return this};t.exports=function(t,e,n,c){var l=e+" Iterator";return t.prototype=r(i,{next:a(+!c,n)}),o(t,l,!1,!0),s[l]=u,t}},function(t,e,n){"use strict";var i,r,a,o=n(7),s=n(21),u=n(20),c=n(72),l=n(130),h=n(48),f=n(34),d=n(36),g=f("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(r=l(l(a)))!==Object.prototype&&(i=r):p=!0),!u(i)||o((function(){var t={};return i[g].call(t)!==t}))?i={}:d&&(i=c(i)),s(i[g])||h(i,g,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:p}},function(t){"use strict";t.exports=function(t,e){return{value:t,done:e}}},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(13),o=n(12),s=n(148),u=r([].join);i({target:"Array",proto:!0,forced:a!=Object||!s("join",",")},{join:function(t){return u(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(3),r=n(176);i({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(t,e,n){"use strict";var i=n(96),r=n(12),a=n(62),o=n(64),s=n(148),u=Math.min,c=[].lastIndexOf,l=!!c&&1/[1].lastIndexOf(1,-0)<0,h=s("lastIndexOf"),f=l||!h;t.exports=f?function(t){if(l)return i(c,this,arguments)||0;var e=r(this),n=o(e),s=n-1;for(arguments.length>1&&(s=u(s,a(arguments[1]))),s<0&&(s=n+s);s>=0;s--)if(s in e&&e[s]===t)return s||0;return-1}:c},function(t,e,n){"use strict";var i=n(3),r=n(85).map;i({target:"Array",proto:!0,forced:!n(143)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(91),o=n(78),s=Array;i({target:"Array",stat:!0,forced:r((function(){function t(){}return!(s.of.call(t)instanceof t)}))},{of:function(){for(var t=0,e=arguments.length,n=new(a(this)?this:s)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(64),o=n(180),s=n(142);i({target:"Array",proto:!0,arity:1,forced:n(7)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=r(this),n=a(e),i=arguments.length;s(n+i);for(var u=0;u79&&o<83||!a("reduce")},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(31),r=n(40),a=n(13),o=n(64),s=TypeError,u=function(t){return function(e,n,u,c){i(n);var l=r(e),h=a(l),f=o(l),d=t?f-1:0,g=t?-1:1;if(u<2)for(;;){if(d in h){c=h[d],d+=g;break}if(d+=g,t?d<0:f<=d)throw s("Reduce of empty array with no initial value")}for(;t?d>=0:f>d;d+=g)d in h&&(c=n(c,h[d],d,l));return c}};t.exports={left:u(!1),right:u(!0)}},function(t,e,n){"use strict";var i=n(15);t.exports="undefined"!=typeof process&&"process"==i(process)},function(t,e,n){"use strict";var i=n(3),r=n(182).right,a=n(148),o=n(28);i({target:"Array",proto:!0,forced:!n(183)&&o>79&&o<83||!a("reduceRight")},{reduceRight:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(90),o=r([].reverse),s=[1,2];i({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},function(t,e,n){"use strict";var i=n(3),r=n(90),a=n(91),o=n(20),s=n(61),u=n(64),c=n(12),l=n(78),h=n(34),f=n(143),d=n(97),g=f("slice"),p=h("species"),v=Array,y=Math.max;i({target:"Array",proto:!0,forced:!g},{slice:function(t,e){var n,i,h,f=c(this),g=u(f),x=s(t,g),b=s(void 0===e?g:e,g);if(r(f)&&(n=f.constructor,(a(n)&&(n===v||r(n.prototype))||o(n)&&null===(n=n[p]))&&(n=void 0),n===v||void 0===n))return d(f,x,b);for(i=new(void 0===n?v:n)(y(b-x,0)),h=0;x1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(31),o=n(40),s=n(64),u=n(146),c=n(69),l=n(7),h=n(189),f=n(148),d=n(190),g=n(191),p=n(28),v=n(192),y=[],x=r(y.sort),b=r(y.push),m=l((function(){y.sort(void 0)})),_=l((function(){y.sort(null)})),T=f("sort"),w=!l((function(){if(p)return p<70;if(!(d&&d>3)){if(g)return!0;if(v)return v<603;var t,e,n,i,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)y.push({k:e+i,v:n})}for(y.sort((function(t,e){return e.v-t.v})),i=0;ic(n)?1:-1}}(t)),n=s(r),i=0;i0;)t[i]=t[--i];i!==a++&&(t[i]=n)}return t},s=function(t,e,n,i){for(var r=e.length,a=n.length,o=0,s=0;om-i+n;v--)f(b,v-1)}else if(n>i)for(v=m-i;v>_;v--)x=v+n-1,(y=v+i-1)in b?b[x]=b[y]:f(b,x);for(v=0;vn;)a[n]=e[n++];return a}},function(t,e,n){"use strict";var i=n(4);t.exports=function(t){return i[t].prototype}},function(t,e,n){"use strict";var i=n(3),r=n(140),a=n(142),o=n(64),s=n(61),u=n(12),c=n(62),l=Array,h=Math.max,f=Math.min;i({target:"Array",proto:!0},{toSpliced:function(t,e){var n,i,r,d,g=u(this),p=o(g),v=s(t,p),y=arguments.length,x=0;for(0===y?n=i=0:1===y?(n=0,i=p-v):(n=y-2,i=f(h(c(e),0),p-v)),r=a(p+n-i),d=l(r);x=s||c<0)throw a("Incorrect index");for(var l=new e(s),h=0;h>8&255]},H=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},W=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},q=function(t){return U(t,23,4)},Z=function(t){return U(t,52,8)},K=function(t,e,n){c(t[M],e,{configurable:!0,get:function(){return n(this)[e]}})},J=function(t,e,n,i){var r=C(t),a=p(n),o=!!i;if(a+e>r.byteLength)throw B(O);var s=r.bytes,u=a+r.byteOffset,c=_(s,u,u+e);return o?c:X(c)},Q=function(t,e,n,i,r,a){var o=C(t),s=p(n),u=i(+r),c=!!a;if(s+e>o.byteLength)throw B(O);for(var l=o.bytes,h=s+o.byteOffset,f=0;fit;)(et=nt[it++])in P||u(P,et,L[et]);D.constructor=P}x&&y(F)!==z&&x(F,z);var rt=new N(new P(2)),at=r(F.setInt8);rt.setInt8(0,2147483648),rt.setInt8(1,2147483649),!rt.getInt8(0)&&rt.getInt8(1)||l(F,{setInt8:function(t,e){at(this,t,e<<24>>24)},setUint8:function(t,e){at(this,t,e<<24>>24)}},{unsafe:!0})}else D=(P=function(t){f(this,D);var e=p(t);I(this,{type:E,bytes:$(j(e),0),byteLength:e}),a||(this.byteLength=e,this.detached=!1)})[M],F=(N=function(t,e,n){f(this,F),f(t,D);var i=R(t),r=i.byteLength,o=d(e);if(o<0||o>r)throw B("Wrong offset");if(o+(n=void 0===n?r-o:g(n))>r)throw B("Wrong length");I(this,{type:k,buffer:t,byteLength:n,byteOffset:o,bytes:i.bytes}),a||(this.buffer=t,this.byteLength=n,this.byteOffset=o)})[M],a&&(K(P,"byteLength",R),K(N,"buffer",C),K(N,"byteLength",C),K(N,"byteOffset",C)),l(F,{getInt8:function(t){return J(this,1,t)[0]<<24>>24},getUint8:function(t){return J(this,1,t)[0]},getInt16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=J(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return W(J(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Y(J(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Y(J(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Q(this,1,t,V,e)},setUint8:function(t,e){Q(this,1,t,V,e)},setInt16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Q(this,2,t,G,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Q(this,4,t,H,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Q(this,4,t,q,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Q(this,8,t,Z,e,arguments.length>2&&arguments[2])}});T(P,E),T(N,k),t.exports={ArrayBuffer:P,DataView:N}},function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(t,e,n){"use strict";var i=n(48);t.exports=function(t,e,n){for(var r in e)i(t,r,e[r],n);return t}},function(t,e,n){"use strict";var i=n(25),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},function(t,e,n){"use strict";var i=n(62),r=n(65),a=RangeError;t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=r(e);if(e!==n)throw a("Wrong length or index");return n}},function(t){"use strict";var e=Array,n=Math.abs,i=Math.pow,r=Math.floor,a=Math.log,o=Math.LN2;t.exports={pack:function(t,s,u){var c,l,h,f=e(u),d=8*u-s-1,g=(1<>1,v=23===s?i(2,-24)-i(2,-77):0,y=t<0||0===t&&1/t<0?1:0,x=0;for((t=n(t))!=t||t===1/0?(l=t!=t?1:0,c=g):(c=r(a(t)/o),t*(h=i(2,-c))<1&&(c--,h*=2),(t+=c+p>=1?v/h:v*i(2,1-p))*h>=2&&(c++,h/=2),c+p>=g?(l=0,c=g):c+p>=1?(l=(t*h-1)*i(2,s),c+=p):(l=t*i(2,p-1)*i(2,s),c=0));s>=8;)f[x++]=255&l,l/=256,s-=8;for(c=c<0;)f[x++]=255&c,c/=256,d-=8;return f[--x]|=128*y,f},unpack:function(t,e){var n,r=t.length,a=8*r-e-1,o=(1<>1,u=a-7,c=r-1,l=t[c--],h=127&l;for(l>>=7;u>0;)h=256*h+t[c--],u-=8;for(n=h&(1<<-u)-1,h>>=-u,u+=e;u>0;)n=256*n+t[c--],u-=8;if(0===h)h=1-s;else{if(h===o)return n?NaN:l?-1/0:1/0;n+=i(2,e),h-=s}return(l?-1:1)*n*i(2,h-e)}}},function(t,e,n){"use strict";var i=n(3),r=n(215);i({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(t,e,n){"use strict";var i,r,a,o=n(209),s=n(6),u=n(4),c=n(21),l=n(20),h=n(39),f=n(70),d=n(32),g=n(44),p=n(48),v=n(79),y=n(25),x=n(130),b=n(116),m=n(34),_=n(41),T=n(52),w=T.enforce,A=T.get,S=u.Int8Array,E=S&&S.prototype,k=u.Uint8ClampedArray,M=k&&k.prototype,O=S&&x(S),R=E&&x(E),C=Object.prototype,I=u.TypeError,L=m("toStringTag"),P=_("TYPED_ARRAY_TAG"),D="TypedArrayConstructor",N=o&&!!b&&"Opera"!==f(u.opera),F=!1,z={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},B=function(t){var e=x(t);if(l(e)){var n=A(e);return n&&h(n,D)?n[D]:B(e)}},$=function(t){if(!l(t))return!1;var e=f(t);return h(z,e)||h(j,e)};for(i in z)(a=(r=u[i])&&r.prototype)?w(a)[D]=r:N=!1;for(i in j)(a=(r=u[i])&&r.prototype)&&(w(a)[D]=r);if((!N||!c(O)||O===Function.prototype)&&(O=function(){throw I("Incorrect invocation")},N))for(i in z)u[i]&&b(u[i],O);if((!N||!R||R===C)&&(R=O.prototype,N))for(i in z)u[i]&&b(u[i].prototype,R);if(N&&x(M)!==R&&b(M,R),s&&!h(R,L))for(i in F=!0,v(R,L,{configurable:!0,get:function(){return l(this)?this[P]:void 0}}),z)u[i]&&g(u[i],P,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:N,TYPED_ARRAY_TAG:F&&P,aTypedArray:function(t){if($(t))return t;throw I("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||y(O,t)))return t;throw I(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,i){if(s){if(n)for(var r in z){var a=u[r];if(a&&h(a.prototype,t))try{delete a.prototype[t]}catch(n){try{a.prototype[t]=e}catch(t){}}}R[t]&&!n||p(R,t,n?e:N&&E[t]||e,i)}},exportTypedArrayStaticMethod:function(t,e,n){var i,r;if(s){if(b){if(n)for(i in z)if((r=u[i])&&h(r,t))try{delete r[t]}catch(t){}if(O[t]&&!n)return;try{return p(O,t,n?e:N&&O[t]||e)}catch(t){}}for(i in z)!(r=u[i])||r[t]&&!n||p(r,t,e)}},getTypedArrayConstructor:B,isView:function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(z,e)||h(j,e)},isTypedArray:$,TypedArray:O,TypedArrayPrototype:R}},function(t,e,n){"use strict";var i=n(3),r=n(87),a=n(7),o=n(208),s=n(47),u=n(61),c=n(65),l=n(217),h=o.ArrayBuffer,f=o.DataView,d=f.prototype,g=r(h.prototype.slice),p=r(d.getUint8),v=r(d.setUint8);i({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:a((function(){return!new h(2).slice(1,void 0).byteLength}))},{slice:function(t,e){if(g&&void 0===e)return g(s(this),t);for(var n=s(this).byteLength,i=u(t,n),r=u(void 0===e?n:e,n),a=new(l(this,h))(c(r-i)),o=new f(this),d=new f(a),y=0;i9999?"+":"";return i+a(u(e),i?6:4,0)+"-"+a(y(t)+1,2,0)+"-"+a(f(t),2,0)+"T"+a(g(t),2,0)+":"+a(v(t),2,0)+":"+a(x(t),2,0)+"."+a(n,3,0)+"Z"}:l},function(t,e,n){"use strict";var i=n(14),r=n(65),a=n(69),o=n(228),s=n(16),u=i(o),c=i("".slice),l=Math.ceil,h=function(t){return function(e,n,i){var o,h,f=a(s(e)),d=r(n),g=f.length,p=void 0===i?" ":a(i);return d<=g||""==p?f:((h=u(p,l((o=d-g)/p.length))).length>o&&(h=c(h,0,o)),t?f+h:h+f)}};t.exports={start:h(!1),end:h(!0)}},function(t,e,n){"use strict";var i=n(62),r=n(69),a=n(16),o=RangeError;t.exports=function(t){var e=r(a(this)),n="",s=i(t);if(s<0||s==1/0)throw o("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(n+=e);return n}},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(40),o=n(19);i({target:"Date",proto:!0,arity:1,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=a(this),n=o(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var i=n(39),r=n(48),a=n(231),o=n(34)("toPrimitive"),s=Date.prototype;i(s,o)||r(s,o,a)},function(t,e,n){"use strict";var i=n(47),r=n(33),a=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw a("Incorrect hint");return r(this,t)}},function(t,e,n){"use strict";var i=n(14),r=n(48),a=Date.prototype,o="Invalid Date",s="toString",u=i(a[s]),c=i(a.getTime);String(new Date(NaN))!=o&&r(a,s,(function(){var t=c(this);return t==t?u(this):o}))},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(69),o=r("".charAt),s=r("".charCodeAt),u=r(/./.exec),c=r(1..toString),l=r("".toUpperCase),h=/[\w*+\-./@]/,f=function(t,e){for(var n=c(t,16);n.length1?arguments[1]:void 0);e=e?e.next:n.first;)for(i(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),a(f,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return x(this,0===t?0:t,e)}}:{add:function(t){return x(this,t=0===t?0:t,t)}}),d&&r(f,"size",{configurable:!0,get:function(){return p(this).size}}),h},setStrong:function(t,e,n){var i=e+" Iterator",r=y(e),a=y(i);l(t,e,(function(t,e){v(this,{type:i,target:t,state:r(t),kind:e,last:void 0})}),(function(){for(var t=a(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?h("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var i=n(3),r=n(249),a=Math.acosh,o=Math.log,s=Math.sqrt,u=Math.LN2;i({target:"Math",stat:!0,forced:!a||710!=Math.floor(a(Number.MAX_VALUE))||a(1/0)!=1/0},{acosh:function(t){var e=+t;return e<1?NaN:e>94906265.62425156?o(e)+u:r(e-1+s(e-1)*s(e+1))}})},function(t){"use strict";var e=Math.log;t.exports=Math.log1p||function(t){var n=+t;return n>-1e-8&&n<1e-8?n-n*n/2:e(1+n)}},function(t,e,n){"use strict";var i=n(3),r=Math.asinh,a=Math.log,o=Math.sqrt;i({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function t(e){var n=+e;return isFinite(n)&&0!=n?n<0?-t(-n):a(n+o(n*n+1)):n}})},function(t,e,n){"use strict";var i=n(3),r=Math.atanh,a=Math.log;i({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(t){var e=+t;return 0==e?e:a((1+e)/(1-e))/2}})},function(t,e,n){"use strict";var i=n(3),r=n(253),a=Math.abs,o=Math.pow;i({target:"Math",stat:!0},{cbrt:function(t){var e=+t;return r(e)*o(a(e),1/3)}})},function(t){"use strict";t.exports=Math.sign||function(t){var e=+t;return 0==e||e!=e?e:e<0?-1:1}},function(t,e,n){"use strict";var i=n(3),r=Math.floor,a=Math.log,o=Math.LOG2E;i({target:"Math",stat:!0},{clz32:function(t){var e=t>>>0;return e?31-r(a(e+.5)*o):32}})},function(t,e,n){"use strict";var i=n(3),r=n(256),a=Math.cosh,o=Math.abs,s=Math.E;i({target:"Math",stat:!0,forced:!a||a(710)===1/0},{cosh:function(t){var e=r(o(t)-1)+1;return(e+1/(e*s*s))*(s/2)}})},function(t){"use strict";var e=Math.expm1,n=Math.exp;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){var e=+t;return 0==e?e:e>-1e-6&&e<1e-6?e+e*e/2:n(e)-1}:e},function(t,e,n){"use strict";var i=n(3),r=n(256);i({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{fround:n(259)})},function(t,e,n){"use strict";var i=n(253),r=Math.abs,a=Math.pow,o=a(2,-52),s=a(2,-23),u=a(2,127)*(2-s),c=a(2,-126);t.exports=Math.fround||function(t){var e,n,a=+t,l=r(a),h=i(a);return lu||n!=n?h*(1/0):h*n}},function(t,e,n){"use strict";var i=n(3),r=Math.hypot,a=Math.abs,o=Math.sqrt;i({target:"Math",stat:!0,arity:2,forced:!!r&&r(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,i,r=0,s=0,u=arguments.length,c=0;s0?(i=n/c)*i:n;return c===1/0?1/0:c*o(r)}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=Math.imul;i({target:"Math",stat:!0,forced:r((function(){return-5!=a(4294967295,5)||2!=a.length}))},{imul:function(t,e){var n=65535,i=+t,r=+e,a=n&i,o=n&r;return 0|a*o+((n&i>>>16)*o+a*(n&r>>>16)<<16>>>0)}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log10:n(263)})},function(t){"use strict";var e=Math.log,n=Math.LOG10E;t.exports=Math.log10||function(t){return e(t)*n}},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{log1p:n(249)})},function(t,e,n){"use strict";var i=n(3),r=Math.log,a=Math.LN2;i({target:"Math",stat:!0},{log2:function(t){return r(t)/a}})},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{sign:n(253)})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(256),o=Math.abs,s=Math.exp,u=Math.E;i({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(t){var e=+t;return o(e)<1?(a(e)-a(-e))/2:(s(e-1)-s(-e-1))*(u/2)}})},function(t,e,n){"use strict";var i=n(3),r=n(256),a=Math.exp;i({target:"Math",stat:!0},{tanh:function(t){var e=+t,n=r(e),i=r(-e);return n==1/0?1:i==1/0?-1:(n-i)/(a(e)+a(-e))}})},function(t,e,n){"use strict";n(84)(Math,"Math",!0)},function(t,e,n){"use strict";n(3)({target:"Math",stat:!0},{trunc:n(63)})},function(t,e,n){"use strict";var i=n(3),r=n(36),a=n(6),o=n(4),s=n(82),u=n(14),c=n(68),l=n(39),h=n(120),f=n(25),d=n(23),g=n(19),p=n(7),v=n(58).f,y=n(5).f,x=n(45).f,b=n(272),m=n(273).trim,_="Number",T=o[_],w=s[_],A=T.prototype,S=o.TypeError,E=u("".slice),k=u("".charCodeAt),M=function(t){var e,n,i,r,a,o,s,u,c=g(t,"number");if(d(c))throw S("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=m(c),43===(e=k(c,0))||45===e){if(88===(n=k(c,2))||120===n)return NaN}else if(48===e){switch(k(c,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+c}for(o=(a=E(c,2)).length,s=0;sr)return NaN;return parseInt(a,i)}return+c},O=c(_,!T(" 0o1")||!T("0b1")||T("+0x1")),R=function(t){var e,n=arguments.length<1?0:T(function(t){var e=g(t,"number");return"bigint"==typeof e?e:M(e)}(t));return f(A,e=this)&&p((function(){b(e)}))?h(Object(n),this,R):n};R.prototype=A,O&&!r&&(A.constructor=R),i({global:!0,constructor:!0,wrap:!0,forced:O},{Number:R});var C=function(t,e){for(var n,i=a?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),r=0;i.length>r;r++)l(e,n=i[r])&&!l(t,n)&&x(t,n,y(e,n))};r&&w&&C(s[_],w),(O||r)&&C(s[_],T)},function(t,e,n){"use strict";var i=n(14);t.exports=i(1..valueOf)},function(t,e,n){"use strict";var i=n(14),r=n(16),a=n(69),o=n(274),s=i("".replace),u=RegExp("^["+o+"]+"),c=RegExp("(^|[^"+o+"])["+o+"]+$"),l=function(t){return function(e){var n=a(r(e));return 1&t&&(n=s(n,u,"")),2&t&&(n=s(n,c,"$1")),n}};t.exports={start:l(1),end:l(2),trim:l(3)}},function(t){"use strict";t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isFinite:n(277)})},function(t,e,n){"use strict";var i=n(4).isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&i(t)}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isInteger:n(279)})},function(t,e,n){"use strict";var i=n(20),r=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&r(t)===t}},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,n){"use strict";var i=n(3),r=n(279),a=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return r(t)&&a(t)<=9007199254740991}})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){"use strict";n(3)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(69),s=n(273).trim,u=n(274),c=a("".charAt),l=i.parseFloat,h=i.Symbol,f=h&&h.iterator,d=1/l(u+"-0")!=-1/0||f&&!r((function(){l(Object(f))}));t.exports=d?function(t){var e=s(o(t)),n=l(e);return 0===n&&"-"==c(e,0)?-0:n}:l},function(t,e,n){"use strict";var i=n(3),r=n(287);i({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(69),s=n(273).trim,u=n(274),c=i.parseInt,l=i.Symbol,h=l&&l.iterator,f=/^[+-]?0x/i,d=a(f.exec),g=8!==c(u+"08")||22!==c(u+"0x16")||h&&!r((function(){c(Object(h))}));t.exports=g?function(t,e){var n=s(o(t));return c(n,e>>>0||(d(f,n)?16:10))}:c},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(62),o=n(272),s=n(228),u=n(263),c=n(7),l=RangeError,h=String,f=isFinite,d=Math.abs,g=Math.floor,p=Math.pow,v=Math.round,y=r(1..toExponential),x=r(s),b=r("".slice),m="-6.9000e-11"===y(-69e-12,4)&&"1.25e+0"===y(1.255,2)&&"1.235e+4"===y(12345,3)&&"3e+1"===y(25,0);i({target:"Number",proto:!0,forced:!m||!(c((function(){y(1,1/0)}))&&c((function(){y(1,-1/0)})))||!!c((function(){y(1/0,1/0),y(NaN,1/0)}))},{toExponential:function(t){var e=o(this);if(void 0===t)return y(e);var n=a(t);if(!f(e))return String(e);if(n<0||n>20)throw l("Incorrect fraction digits");if(m)return y(e,n);var i="",r="",s=0,c="",_="";if(e<0&&(i="-",e=-e),0===e)s=0,r=x("0",n+1);else{var T=u(e);s=g(T);var w=0,A=p(10,s-n);2*e>=(2*(w=v(e/A))+1)*A&&(w+=1),w>=p(10,n+1)&&(w/=10,s+=1),r=h(w)}return 0!==n&&(r=b(r,0,1)+"."+b(r,1)),0===s?(c="+",_="0"):(c=s>0?"+":"-",_=h(d(s))),i+(r+="e"+c+_)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(62),o=n(272),s=n(228),u=n(7),c=RangeError,l=String,h=Math.floor,f=r(s),d=r("".slice),g=r(1..toFixed),p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)},v=function(t,e,n){for(var i=-1,r=n;++i<6;)r+=e*t[i],t[i]=r%1e7,r=h(r/1e7)},y=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},x=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=l(t[e]);n=""===n?i:n+f("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:u((function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)}))||!u((function(){g({})}))},{toFixed:function(t){var e,n,i,r,s=o(this),u=a(t),h=[0,0,0,0,0,0],g="",b="0";if(u<0||u>20)throw c("Incorrect fraction digits");if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return l(s);if(s<0&&(g="-",s=-s),s>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(s*p(2,69,1))-69)<0?s*p(2,-e,1):s/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(v(h,0,n),i=u;i>=7;)v(h,1e7,0),i-=7;for(v(h,p(10,i,1),0),i=e-1;i>=23;)y(h,1<<23),i-=23;y(h,1<0?g+((r=b.length)<=u?"0."+f("0",u-r)+b:d(b,0,r-u)+"."+d(b,r-u)):g+b}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(7),o=n(272),s=r(1..toPrecision);i({target:"Number",proto:!0,forced:a((function(){return"1"!==s(1,void 0)}))||!a((function(){s({})}))},{toPrecision:function(t){return void 0===t?s(o(this)):s(o(this),t)}})},function(t,e,n){"use strict";var i=n(3),r=n(292);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==r},{assign:r})},function(t,e,n){"use strict";var i=n(6),r=n(14),a=n(8),o=n(7),s=n(74),u=n(67),c=n(10),l=n(40),h=n(13),f=Object.assign,d=Object.defineProperty,g=r([].concat);t.exports=!f||o((function(){if(i&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=f({},t)[n]||s(f({},e)).join("")!=r}))?function(t,e){for(var n=l(t),r=arguments.length,o=1,f=u.f,d=c.f;r>o;)for(var p,v=h(arguments[o++]),y=f?g(s(v),f(v)):s(v),x=y.length,b=0;x>b;)p=y[b++],i&&!a(d,v,p)||(n[p]=v[p]);return n}:f},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0,sham:!n(6)},{create:n(72)})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(31),s=n(40),u=n(45);r&&i({target:"Object",proto:!0,forced:a},{__defineGetter__:function(t,e){u.f(s(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(36),r=n(4),a=n(7),o=n(192);t.exports=i||!a((function(){if(!(o&&o<535)){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete r[t]}}))},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(73).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==a,sham:!r},{defineProperties:a})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(45).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!r},{defineProperty:a})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(31),s=n(40),u=n(45);r&&i({target:"Object",proto:!0,forced:a},{__defineSetter__:function(t,e){u.f(s(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(3),r=n(300).entries;i({target:"Object",stat:!0},{entries:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(6),r=n(7),a=n(14),o=n(130),s=n(74),u=n(12),c=a(n(10).f),l=a([].push),h=i&&r((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),f=function(t){return function(e){for(var n,r=u(e),a=s(r),f=h&&null===o(r),d=a.length,g=0,p=[];d>g;)n=a[g++],i&&!(f?n in r:c(r,n))||l(p,t?[n,r[n]]:r[n]);return p}};t.exports={entries:f(!0),values:f(!1)}},function(t,e,n){"use strict";var i=n(3),r=n(246),a=n(7),o=n(20),s=n(243).onFreeze,u=Object.freeze;i({target:"Object",stat:!0,forced:a((function(){u(1)})),sham:!r},{freeze:function(t){return u&&o(t)?u(s(t)):t}})},function(t,e,n){"use strict";var i=n(3),r=n(132),a=n(78);i({target:"Object",stat:!0},{fromEntries:function(t){var e={};return r(t,(function(t,n){a(e,t,n)}),{AS_ENTRIES:!0}),e}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(12),o=n(5).f,s=n(6);i({target:"Object",stat:!0,forced:!s||r((function(){o(1)})),sham:!s},{getOwnPropertyDescriptor:function(t,e){return o(a(t),e)}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(57),o=n(12),s=n(5),u=n(78);i({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,n,i=o(t),r=s.f,c=a(i),l={},h=0;c.length>h;)void 0!==(n=r(i,e=c[h++]))&&u(l,e,n);return l}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(76).f;i({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:a})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(40),o=n(130),s=n(131);i({target:"Object",stat:!0,forced:r((function(){o(1)})),sham:!s},{getPrototypeOf:function(t){return o(a(t))}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{hasOwn:n(39)})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{is:n(309)})},function(t){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var i=n(3),r=n(244);i({target:"Object",stat:!0,forced:Object.isExtensible!==r},{isExtensible:r})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(20),o=n(15),s=n(245),u=Object.isFrozen;i({target:"Object",stat:!0,forced:s||r((function(){u(1)}))},{isFrozen:function(t){return!a(t)||(!(!s||"ArrayBuffer"!=o(t))||!!u&&u(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(7),a=n(20),o=n(15),s=n(245),u=Object.isSealed;i({target:"Object",stat:!0,forced:s||r((function(){u(1)}))},{isSealed:function(t){return!a(t)||(!(!s||"ArrayBuffer"!=o(t))||!!u&&u(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(40),a=n(74);i({target:"Object",stat:!0,forced:n(7)((function(){a(1)}))},{keys:function(t){return a(r(t))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(40),s=n(18),u=n(130),c=n(5).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupGetter__:function(t){var e,n=o(this),i=s(t);do{if(e=c(n,i))return e.get}while(n=u(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(6),a=n(295),o=n(40),s=n(18),u=n(130),c=n(5).f;r&&i({target:"Object",proto:!0,forced:a},{__lookupSetter__:function(t){var e,n=o(this),i=s(t);do{if(e=c(n,i))return e.set}while(n=u(n))}})},function(t,e,n){"use strict";var i=n(3),r=n(20),a=n(243).onFreeze,o=n(246),s=n(7),u=Object.preventExtensions;i({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{preventExtensions:function(t){return u&&r(t)?u(a(t)):t}})},function(t,e,n){"use strict";var i=n(6),r=n(79),a=n(20),o=n(40),s=n(16),u=Object.getPrototypeOf,c=Object.setPrototypeOf,l=Object.prototype,h="__proto__";if(i&&u&&c&&!(h in l))try{r(l,h,{configurable:!0,get:function(){return u(o(this))},set:function(t){var e=s(this);(a(t)||null===t)&&a(e)&&c(e,t)}})}catch(t){}},function(t,e,n){"use strict";var i=n(3),r=n(20),a=n(243).onFreeze,o=n(246),s=n(7),u=Object.seal;i({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!o},{seal:function(t){return u&&r(t)?u(a(t)):t}})},function(t,e,n){"use strict";n(3)({target:"Object",stat:!0},{setPrototypeOf:n(116)})},function(t,e,n){"use strict";var i=n(71),r=n(48),a=n(321);i||r(Object.prototype,"toString",a,{unsafe:!0})},function(t,e,n){"use strict";var i=n(71),r=n(70);t.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},function(t,e,n){"use strict";var i=n(3),r=n(300).values;i({target:"Object",stat:!0},{values:function(t){return r(t)}})},function(t,e,n){"use strict";var i=n(3),r=n(285);i({global:!0,forced:parseFloat!=r},{parseFloat:r})},function(t,e,n){"use strict";var i=n(3),r=n(287);i({global:!0,forced:parseInt!=r},{parseInt:r})},function(t,e,n){"use strict";n(326),n(341),n(343),n(344),n(345),n(346)},function(t,e,n){"use strict";var i,r,a,o=n(3),s=n(36),u=n(183),c=n(4),l=n(8),h=n(48),f=n(116),d=n(84),g=n(194),p=n(31),v=n(21),y=n(20),x=n(211),b=n(217),m=n(327).set,_=n(330),T=n(334),w=n(335),A=n(331),S=n(52),E=n(336),k=n(337),M=n(340),O="Promise",R=k.CONSTRUCTOR,C=k.REJECTION_EVENT,I=k.SUBCLASSING,L=S.getterFor(O),P=S.set,D=E&&E.prototype,N=E,F=D,z=c.TypeError,j=c.document,B=c.process,$=M.f,X=$,U=!!(j&&j.createEvent&&c.dispatchEvent),Y="unhandledrejection",V=function(t){var e;return!(!y(t)||!v(e=t.then))&&e},G=function(t,e){var n,i,r,a=e.value,o=1==e.state,s=o?t.ok:t.fail,u=t.resolve,c=t.reject,h=t.domain;try{s?(o||(2===e.rejection&&K(e),e.rejection=1),!0===s?n=a:(h&&h.enter(),n=s(a),h&&(h.exit(),r=!0)),n===t.promise?c(z("Promise-chain cycle")):(i=V(n))?l(i,n,u,c):u(n)):c(a)}catch(t){h&&!r&&h.exit(),c(t)}},H=function(t,e){t.notified||(t.notified=!0,_((function(){for(var n,i=t.reactions;n=i.get();)G(n,t);t.notified=!1,e&&!t.rejection&&q(t)})))},W=function(t,e,n){var i,r;U?((i=j.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),c.dispatchEvent(i)):i={promise:e,reason:n},!C&&(r=c["on"+t])?r(i):t===Y&&T("Unhandled promise rejection",n)},q=function(t){l(m,c,(function(){var e,n=t.facade,i=t.value;if(Z(t)&&(e=w((function(){u?B.emit("unhandledRejection",i,n):W(Y,n,i)})),t.rejection=u||Z(t)?2:1,e.error))throw e.value}))},Z=function(t){return 1!==t.rejection&&!t.parent},K=function(t){l(m,c,(function(){var e=t.facade;u?B.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},J=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,H(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw z("Promise can't be resolved itself");var i=V(e);i?_((function(){var n={done:!1};try{l(i,e,J(tt,n,t),J(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,H(t,!1))}catch(e){Q({done:!1},e,t)}}};if(R&&(F=(N=function(t){x(this,F),p(t),l(i,this);var e=L(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){P(this,{type:O,done:!1,notified:!1,parent:!1,reactions:new A,rejection:!1,state:0,value:void 0})}).prototype=h(F,"then",(function(t,e){var n=L(this),i=$(b(this,N));return n.parent=!0,i.ok=!v(t)||t,i.fail=v(e)&&e,i.domain=u?B.domain:void 0,0==n.state?n.reactions.add(i):_((function(){G(i,n)})),i.promise})),r=function(){var t=new i,e=L(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},M.f=$=function(t){return t===N||undefined===t?new r(t):X(t)},!s&&v(E)&&D!==Object.prototype)){a=D.then,I||h(D,"then",(function(t,e){var n=this;return new N((function(t,e){l(a,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete D.constructor}catch(t){}f&&f(D,F)}o({global:!0,constructor:!0,wrap:!0,forced:R},{Promise:N}),d(N,O,!1,!0),g(O)},function(t,e,n){"use strict";var i,r,a,o,s=n(4),u=n(96),c=n(86),l=n(21),h=n(39),f=n(7),d=n(75),g=n(97),p=n(43),v=n(328),y=n(329),x=n(183),b=s.setImmediate,m=s.clearImmediate,_=s.process,T=s.Dispatch,w=s.Function,A=s.MessageChannel,S=s.String,E=0,k={},M="onreadystatechange";f((function(){i=s.location}));var O=function(t){if(h(k,t)){var e=k[t];delete k[t],e()}},R=function(t){return function(){O(t)}},C=function(t){O(t.data)},I=function(t){s.postMessage(S(t),i.protocol+"//"+i.host)};b&&m||(b=function(t){v(arguments.length,1);var e=l(t)?t:w(t),n=g(arguments,1);return k[++E]=function(){u(e,void 0,n)},r(E),E},m=function(t){delete k[t]},x?r=function(t){_.nextTick(R(t))}:T&&T.now?r=function(t){T.now(R(t))}:A&&!y?(o=(a=new A).port2,a.port1.onmessage=C,r=c(o.postMessage,o)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&i&&"file:"!==i.protocol&&!f(I)?(r=I,s.addEventListener("message",C,!1)):r=M in p("script")?function(t){d.appendChild(p("script"))[M]=function(){d.removeChild(this),O(t)}}:function(t){setTimeout(R(t),0)}),t.exports={set:b,clear:m}},function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t@^][^\s!#%&*+<=>@^]*>/,P=/a/g,D=/a/g,N=new S(P)!==P,F=g.MISSED_STICKY,z=g.UNSUPPORTED_Y,j=i&&(!N||F||T||w||y((function(){return D[A]=!1,S(P)!=P||S(D)==D||"/a/i"!=S(P,"i")})));if(o("RegExp",j)){for(var B=function(t,e){var n,i,r,a,o,c,g=l(E,this),p=h(t),v=void 0===e,y=[],m=t;if(!g&&p&&v&&t.constructor===B)return t;if((p||l(E,t))&&(t=t.source,v&&(e=d(m))),t=void 0===t?"":f(t),e=void 0===e?"":f(e),m=t,T&&"dotAll"in P&&(i=!!e&&C(e,"s")>-1)&&(e=R(e,/s/g,"")),n=e,F&&"sticky"in P&&(r=!!e&&C(e,"y")>-1)&&z&&(e=R(e,/y/g,"")),w&&(a=function(t){for(var e,n=t.length,i=0,r="",a=[],o={},s=!1,u=!1,c=0,l="";i<=n;i++){if("\\"===(e=O(t,i)))e+=O(t,++i);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:M(L,I(t,i+1))&&(i+=2,u=!0),r+=e,c++;continue;case">"===e&&u:if(""===l||x(o,l))throw new k("Invalid capture group name");o[l]=!0,a[a.length]=[l,c],u=!1,l="";continue}u?l+=e:r+=e}return[r,a]}(t),t=a[0],y=a[1]),o=s(S(t,e),g?this:E,B),(i||r||y.length)&&(c=b(o),i&&(c.dotAll=!0,c.raw=B(function(t){for(var e,n=t.length,i=0,r="",a=!1;i<=n;i++)"\\"!==(e=O(t,i))?a||"."!==e?("["===e?a=!0:"]"===e&&(a=!1),r+=e):r+="[\\s\\S]":r+=e+O(t,++i);return r}(t),n)),r&&(c.sticky=!0),y.length&&(c.groups=y)),t!==m)try{u(o,"source",""===m?"(?:)":m)}catch(t){}return o},$=c(S),X=0;$.length>X;)p(B,S,$[X++]);E.constructor=B,B.prototype=E,v(r,"RegExp",B,{constructor:!0})}m("RegExp")},function(t,e,n){"use strict";var i=n(20),r=n(15),a=n(34)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==r(t))}},function(t,e,n){"use strict";var i=n(8),r=n(39),a=n(25),o=n(369),s=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in s||r(t,"flags")||!a(s,t)?e:i(o,t)}},function(t,e,n){"use strict";var i=n(47);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp,a=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),o=a||i((function(){return!r("a","y").sticky})),s=a||i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:s,MISSED_STICKY:o,UNSUPPORTED_Y:a}},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){"use strict";var i=n(7),r=n(4).RegExp;t.exports=i((function(){var t=r("(?
b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},function(t,e,n){"use strict";var i=n(6),r=n(371),a=n(15),o=n(79),s=n(52).get,u=RegExp.prototype,c=TypeError;i&&r&&o(u,"dotAll",{configurable:!0,get:function(){if(this!==u){if("RegExp"===a(this))return!!s(this).dotAll;throw c("Incompatible receiver, RegExp required")}}})},function(t,e,n){"use strict";var i=n(3),r=n(375);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(t,e,n){"use strict";var i,r,a=n(8),o=n(14),s=n(69),u=n(369),c=n(370),l=n(35),h=n(72),f=n(52).get,d=n(371),g=n(372),p=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,y=v,x=o("".charAt),b=o("".indexOf),m=o("".replace),_=o("".slice),T=(r=/b*/g,a(v,i=/a/,"a"),a(v,r,"a"),0!==i.lastIndex||0!==r.lastIndex),w=c.BROKEN_CARET,A=void 0!==/()??/.exec("")[1];(T||A||w||d||g)&&(y=function(t){var e,n,i,r,o,c,l,d=this,g=f(d),S=s(t),E=g.raw;if(E)return E.lastIndex=d.lastIndex,e=a(y,E,S),d.lastIndex=E.lastIndex,e;var k=g.groups,M=w&&d.sticky,O=a(u,d),R=d.source,C=0,I=S;if(M&&(O=m(O,"y",""),-1===b(O,"g")&&(O+="g"),I=_(S,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==x(S,d.lastIndex-1))&&(R="(?: "+R+")",I=" "+I,C++),n=new RegExp("^(?:"+R+")",O)),A&&(n=new RegExp("^"+R+"$(?!\\s)",O)),T&&(i=d.lastIndex),r=a(v,M?n:d,I),M?r?(r.input=_(r.input,C),r[0]=_(r[0],C),r.index=d.lastIndex,d.lastIndex+=r[0].length):d.lastIndex=0:T&&r&&(d.lastIndex=d.global?r.index+r[0].length:i),A&&r&&r.length>1&&a(p,r[0],n,(function(){for(o=1;o=0?i:n+i;return r<0||r>=n?void 0:c(e,r)}})},function(t,e,n){"use strict";var i=n(3),r=n(384).codeAt;i({target:"String",proto:!0},{codePointAt:function(t){return r(this,t)}})},function(t,e,n){"use strict";var i=n(14),r=n(62),a=n(69),o=n(16),s=i("".charAt),u=i("".charCodeAt),c=i("".slice),l=function(t){return function(e,n){var i,l,h=a(o(e)),f=r(n),d=h.length;return f<0||f>=d?t?"":void 0:(i=u(h,f))<55296||i>56319||f+1===d||(l=u(h,f+1))<56320||l>57343?t?s(h,f):i:t?c(h,f,f+2):l-56320+(i-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e,n){"use strict";var i,r=n(3),a=n(87),o=n(5).f,s=n(65),u=n(69),c=n(386),l=n(16),h=n(387),f=n(36),d=a("".endsWith),g=a("".slice),p=Math.min,v=h("endsWith");r({target:"String",proto:!0,forced:!!(f||v||(i=o(String.prototype,"endsWith"),!i||i.writable))&&!v},{endsWith:function(t){var e=u(l(this));c(t);var n=arguments.length>1?arguments[1]:void 0,i=e.length,r=void 0===n?i:p(s(n),i),a=u(t);return d?d(e,a,r):g(e,r-a.length,r)===a}})},function(t,e,n){"use strict";var i=n(367),r=TypeError;t.exports=function(t){if(i(t))throw r("The method doesn't accept regular expressions");return t}},function(t,e,n){"use strict";var i=n(34)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(61),o=RangeError,s=String.fromCharCode,u=String.fromCodePoint,c=r([].join);i({target:"String",stat:!0,arity:1,forced:!!u&&1!=u.length},{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,r=0;i>r;){if(e=+arguments[r++],a(e,1114111)!==e)throw o(e+" is not a valid code point");n[r]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return c(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(386),o=n(16),s=n(69),u=n(387),c=r("".indexOf);i({target:"String",proto:!0,forced:!u("includes")},{includes:function(t){return!!~c(s(o(this)),s(a(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(16),o=n(69),s=r("".charCodeAt);i({target:"String",proto:!0},{isWellFormed:function(){for(var t=o(a(this)),e=t.length,n=0;n=56320||++n>=e||56320!=(64512&s(t,n))))return!1}return!0}})},function(t,e,n){"use strict";var i=n(384).charAt,r=n(69),a=n(52),o=n(170),s=n(173),u="String Iterator",c=a.set,l=a.getterFor(u);o(String,"String",(function(t){c(this,{type:u,string:r(t),index:0})}),(function(){var t,e=l(this),n=e.string,r=e.index;return r>=n.length?s(void 0,!0):(t=i(n,r),e.index+=t.length,s(t,!1))}))},function(t,e,n){"use strict";var i=n(8),r=n(393),a=n(47),o=n(17),s=n(65),u=n(69),c=n(16),l=n(30),h=n(394),f=n(395);r("match",(function(t,e,n){return[function(e){var n=c(this),r=o(e)?void 0:l(e,t);return r?i(r,e,n):new RegExp(e)[t](u(n))},function(t){var i=a(this),r=u(t),o=n(e,i,r);if(o.done)return o.value;if(!i.global)return f(i,r);var c=i.unicode;i.lastIndex=0;for(var l,d=[],g=0;null!==(l=f(i,r));){var p=u(l[0]);d[g]=p,""===p&&(i.lastIndex=h(r,s(i.lastIndex),c)),g++}return 0===g?null:d}]}))},function(t,e,n){"use strict";n(374);var i=n(87),r=n(48),a=n(375),o=n(7),s=n(34),u=n(44),c=s("species"),l=RegExp.prototype;t.exports=function(t,e,n,h){var f=s(t),d=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),g=d&&!o((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!d||!g||n){var p=i(/./[f]),v=e(f,""[t],(function(t,e,n,r,o){var s=i(t),u=e.exec;return u===a||u===l.exec?d&&!o?{done:!0,value:p(e,n,r)}:{done:!0,value:s(n,e,r)}:{done:!1}}));r(String.prototype,t,v[0]),r(l,f,v[1])}h&&u(l[f],"sham",!0)}},function(t,e,n){"use strict";var i=n(384).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},function(t,e,n){"use strict";var i=n(8),r=n(47),a=n(21),o=n(15),s=n(375),u=TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var c=i(n,t,e);return null!==c&&r(c),c}if("RegExp"===o(t))return i(s,t,e);throw u("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(87),o=n(171),s=n(173),u=n(16),c=n(65),l=n(69),h=n(47),f=n(17),d=n(15),g=n(367),p=n(368),v=n(30),y=n(48),x=n(7),b=n(34),m=n(217),_=n(394),T=n(395),w=n(52),A=n(36),S=b("matchAll"),E="RegExp String",k=E+" Iterator",M=w.set,O=w.getterFor(k),R=RegExp.prototype,C=TypeError,I=a("".indexOf),L=a("".matchAll),P=!!L&&!x((function(){L("a",/./)})),D=o((function(t,e,n,i){M(this,{type:k,regexp:t,string:e,global:n,unicode:i,done:!1})}),E,(function(){var t=O(this);if(t.done)return s(void 0,!0);var e=t.regexp,n=t.string,i=T(e,n);return null===i?(t.done=!0,s(void 0,!0)):t.global?(""===l(i[0])&&(e.lastIndex=_(n,c(e.lastIndex),t.unicode)),s(i,!1)):(t.done=!0,s(i,!1))})),N=function(t){var e,n,i,r=h(this),a=l(t),o=m(r,RegExp),s=l(p(r));return e=new o(o===RegExp?r.source:r,s),n=!!~I(s,"g"),i=!!~I(s,"u"),e.lastIndex=c(r.lastIndex),new D(e,a,n,i)};i({target:"String",proto:!0,forced:P},{matchAll:function(t){var e,n,i,a,o=u(this);if(f(t)){if(P)return L(o,t)}else{if(g(t)&&(e=l(u(p(t))),!~I(e,"g")))throw C("`.matchAll` does not allow non-global regexes");if(P)return L(o,t);if(void 0===(i=v(t,S))&&A&&"RegExp"==d(t)&&(i=N),i)return r(i,t,o)}return n=l(o),a=new RegExp(t,"g"),A?r(N,a,n):a[S](n)}}),A||S in R||y(R,S,N)},function(t,e,n){"use strict";var i=n(3),r=n(227).end;i({target:"String",proto:!0,forced:n(398)},{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(29);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(i)},function(t,e,n){"use strict";var i=n(3),r=n(227).start;i({target:"String",proto:!0,forced:n(398)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(12),o=n(40),s=n(69),u=n(64),c=r([].push),l=r([].join);i({target:"String",stat:!0},{raw:function(t){var e=a(o(t).raw),n=u(e);if(!n)return"";for(var i=arguments.length,r=[],h=0;;){if(c(r,s(e[h++])),h===n)return l(r,"");h=R&&(O+=S(s,R,L)+z,R=L+I.length)}return O+S(s,R)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!E||k)},function(t,e,n){"use strict";var i=n(14),r=n(40),a=Math.floor,o=i("".charAt),s=i("".replace),u=i("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,f){var d=n+t.length,g=i.length,p=l;return void 0!==h&&(h=r(h),p=c),s(f,p,(function(r,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"`":return u(e,0,n);case"'":return u(e,d);case"<":c=h[u(s,1,-1)];break;default:var l=+s;if(0===l)return r;if(l>g){var f=a(l/10);return 0===f?r:f<=g?void 0===i[f-1]?o(s,1):i[f-1]+o(s,1):r}c=i[l-1]}return void 0===c?"":c}))}},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(14),o=n(16),s=n(21),u=n(17),c=n(367),l=n(69),h=n(30),f=n(368),d=n(403),g=n(34),p=n(36),v=g("replace"),y=TypeError,x=a("".indexOf),b=a("".replace),m=a("".slice),_=Math.max,T=function(t,e,n){return n>t.length?-1:""===e?n:x(t,e,n)};i({target:"String",proto:!0},{replaceAll:function(t,e){var n,i,a,g,w,A,S,E,k,M=o(this),O=0,R=0,C="";if(!u(t)){if((n=c(t))&&(i=l(o(f(t))),!~x(i,"g")))throw y("`.replaceAll` does not allow non-global regexes");if(a=h(t,v))return r(a,t,M,e);if(p&&n)return b(l(M),t,e)}for(g=l(M),w=l(t),(A=s(e))||(e=l(e)),S=w.length,E=_(1,S),O=T(g,w,0);-1!==O;)k=A?l(e(w,O,g)):d(w,g,O,[],void 0,e),C+=m(g,R,O)+k,R=O+S,O=T(g,w,O+E);return R1||"".split(/.?/).length?function(t,n){var a=g(l(this)),o=void 0===n?T:n>>>0;if(0===o)return[];if(void 0===t)return[a];if(!c(t))return r(e,a,t,o);for(var s,u,h,f=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,y=new RegExp(t.source,d+"g");(s=r(x,y,a))&&!((u=y.lastIndex)>p&&(E(f,k(a,p,s.index)),s.length>1&&s.index=o));)y.lastIndex===s.index&&y.lastIndex++;return p===a.length?!h&&S(y,"")||E(f,""):E(f,k(a,p)),f.length>o?v(f,0,o):f}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:r(e,this,t,n)}:e,[function(e,n){var i=l(this),o=u(e)?void 0:p(e,t);return o?r(o,e,i,n):r(a,g(i),e,n)},function(t,i){var r=s(this),o=g(t),u=n(a,r,o,i,a!==e);if(u.done)return u.value;var c=h(r,RegExp),l=r.unicode,p=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(_?"g":"y"),v=new c(_?"^(?:"+r.source+")":r,p),x=void 0===i?T:i>>>0;if(0===x)return[];if(0===o.length)return null===y(v,o)?[o]:[];for(var b=0,m=0,A=[];m1?arguments[1]:void 0,e.length)),i=u(t);return d?d(e,i,n):g(e,n,n+i.length)===i}})},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(16),o=n(62),s=n(69),u=r("".slice),c=Math.max,l=Math.min;i({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(t,e){var n,i,r=s(a(this)),h=r.length,f=o(t);return f===1/0&&(f=0),f<0&&(f=c(h+f,0)),(n=void 0===e?h:o(e))<=0||n===1/0||f>=(i=l(f+n,h))?"":u(r,f,i)}})},function(t,e,n){"use strict";var i=n(3),r=n(8),a=n(14),o=n(16),s=n(69),u=n(7),c=Array,l=a("".charAt),h=a("".charCodeAt),f=a([].join),d="".toWellFormed,g=d&&u((function(){return"1"!==r(d,1)}));i({target:"String",proto:!0,forced:g},{toWellFormed:function(){var t=s(o(this));if(g)return r(d,t);for(var e=t.length,n=c(e),i=0;i=56320||i+1>=e||56320!=(64512&h(t,i+1))?n[i]="�":(n[i]=l(t,i),n[++i]=l(t,i))}return f(n,"")}})},function(t,e,n){"use strict";var i=n(3),r=n(273).trim;i({target:"String",proto:!0,forced:n(411)("trim")},{trim:function(){return r(this)}})},function(t,e,n){"use strict";var i=n(50).PROPER,r=n(7),a=n(274);t.exports=function(t){return r((function(){return!!a[t]()||"​…᠎"!=="​…᠎"[t]()||i&&a[t].name!==t}))}},function(t,e,n){"use strict";n(413);var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==r},{trimEnd:r})},function(t,e,n){"use strict";var i=n(3),r=n(414);i({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==r},{trimRight:r})},function(t,e,n){"use strict";var i=n(273).end,r=n(411);t.exports=r("trimEnd")?function(){return i(this)}:"".trimEnd},function(t,e,n){"use strict";n(416);var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==r},{trimStart:r})},function(t,e,n){"use strict";var i=n(3),r=n(417);i({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==r},{trimLeft:r})},function(t,e,n){"use strict";var i=n(273).start,r=n(411);t.exports=r("trimStart")?function(){return i(this)}:"".trimStart},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("anchor")},{anchor:function(t){return r(this,"a","name",t)}})},function(t,e,n){"use strict";var i=n(14),r=n(16),a=n(69),o=/"/g,s=i("".replace);t.exports=function(t,e,n,i){var u=a(r(t)),c="<"+e;return""!==n&&(c+=" "+n+'="'+s(a(i),o,""")+'"'),c+">"+u+""}},function(t,e,n){"use strict";var i=n(7);t.exports=function(t){return i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("big")},{big:function(){return r(this,"big","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("blink")},{blink:function(){return r(this,"blink","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("bold")},{bold:function(){return r(this,"b","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontcolor")},{fontcolor:function(t){return r(this,"font","color",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("fontsize")},{fontsize:function(t){return r(this,"font","size",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("italics")},{italics:function(){return r(this,"i","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("link")},{link:function(t){return r(this,"a","href",t)}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("small")},{small:function(){return r(this,"small","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("strike")},{strike:function(){return r(this,"strike","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sub")},{sub:function(){return r(this,"sub","","")}})},function(t,e,n){"use strict";var i=n(3),r=n(419);i({target:"String",proto:!0,forced:n(420)("sup")},{sup:function(){return r(this,"sup","","")}})},function(t,e,n){"use strict";n(434)("Float32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(8),o=n(6),s=n(435),u=n(215),c=n(208),l=n(211),h=n(11),f=n(44),d=n(279),g=n(65),p=n(212),v=n(436),y=n(438),x=n(18),b=n(39),m=n(70),_=n(20),T=n(23),w=n(72),A=n(25),S=n(116),E=n(58).f,k=n(439),M=n(85).forEach,O=n(194),R=n(79),C=n(45),I=n(5),L=n(52),P=n(120),D=L.get,N=L.set,F=L.enforce,z=C.f,j=I.f,B=r.RangeError,$=c.ArrayBuffer,X=$.prototype,U=c.DataView,Y=u.NATIVE_ARRAY_BUFFER_VIEWS,V=u.TYPED_ARRAY_TAG,G=u.TypedArray,H=u.TypedArrayPrototype,W=u.aTypedArrayConstructor,q=u.isTypedArray,Z="BYTES_PER_ELEMENT",K="Wrong length",J=function(t,e){W(t);for(var n=0,i=e.length,r=new t(i);i>n;)r[n]=e[n++];return r},Q=function(t,e){R(t,e,{configurable:!0,get:function(){return D(this)[e]}})},tt=function(t){var e;return A(X,t)||"ArrayBuffer"==(e=m(t))||"SharedArrayBuffer"==e},et=function(t,e){return q(t)&&!T(e)&&e in t&&d(+e)&&e>=0},nt=function(t,e){return e=x(e),et(t,e)?h(2,t[e]):j(t,e)},it=function(t,e,n){return e=x(e),!(et(t,e)&&_(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?z(t,e,n):(t[e]=n.value,t)};o?(Y||(I.f=nt,C.f=it,Q(H,"buffer"),Q(H,"byteOffset"),Q(H,"byteLength"),Q(H,"length")),i({target:"Object",stat:!0,forced:!Y},{getOwnPropertyDescriptor:nt,defineProperty:it}),t.exports=function(t,e,n){var o=t.match(/\d+/)[0]/8,u=t+(n?"Clamped":"")+"Array",c="get"+t,h="set"+t,d=r[u],x=d,b=x&&x.prototype,m={},T=function(t,e){z(t,e,{get:function(){return function(t,e){var n=D(t);return n.view[c](e*o+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,i){var r=D(t);r.view[h](e*o+r.byteOffset,n?y(i):i,!0)}(this,e,t)},enumerable:!0})};Y?s&&(x=e((function(t,e,n,i){return l(t,b),P(_(e)?tt(e)?void 0!==i?new d(e,v(n,o),i):void 0!==n?new d(e,v(n,o)):new d(e):q(e)?J(x,e):a(k,x,e):new d(p(e)),t,x)})),S&&S(x,G),M(E(d),(function(t){t in x||f(x,t,d[t])})),x.prototype=b):(x=e((function(t,e,n,i){l(t,b);var r,s,u,c=0,h=0;if(_(e)){if(!tt(e))return q(e)?J(x,e):a(k,x,e);r=e,h=v(n,o);var f=e.byteLength;if(void 0===i){if(f%o)throw B(K);if((s=f-h)<0)throw B(K)}else if((s=g(i)*o)+h>f)throw B(K);u=s/o}else u=p(e),r=new $(s=u*o);for(N(t,{buffer:r,byteOffset:h,byteLength:s,length:u,view:new U(r)});c255?255:255&n}},function(t,e,n){"use strict";var i=n(86),r=n(8),a=n(218),o=n(40),s=n(64),u=n(135),c=n(136),l=n(133),h=n(440),f=n(215).aTypedArrayConstructor,d=n(441);t.exports=function(t){var e,n,g,p,v,y,x,b,m=a(this),_=o(t),T=arguments.length,w=T>1?arguments[1]:void 0,A=void 0!==w,S=c(_);if(S&&!l(S))for(b=(x=u(_,S)).next,_=[];!(y=r(b,x)).done;)_.push(y.value);for(A&&T>2&&(w=i(w,arguments[2])),n=s(_),g=new(f(m))(n),p=h(g),e=0;n>e;e++)v=A?w(_[e],e):_[e],g[e]=p?d(v):+v;return g}},function(t,e,n){"use strict";var i=n(70);t.exports=function(t){var e=i(t);return"BigInt64Array"==e||"BigUint64Array"==e}},function(t,e,n){"use strict";var i=n(19),r=TypeError;t.exports=function(t){var e=i(t,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},function(t,e,n){"use strict";n(434)("Float64",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Int32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint8",(function(t){return function(e,n,i){return t(this,e,n,i)}}),!0)},function(t,e,n){"use strict";n(434)("Uint16",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";n(434)("Uint32",(function(t){return function(e,n,i){return t(this,e,n,i)}}))},function(t,e,n){"use strict";var i=n(215),r=n(64),a=n(62),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("at",(function(t){var e=o(this),n=r(e),i=a(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},function(t,e,n){"use strict";var i=n(14),r=n(215),a=i(n(145)),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("copyWithin",(function(t,e){return a(o(this),t,e,arguments.length>2?arguments[2]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).every,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("every",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(150),a=n(441),o=n(70),s=n(8),u=n(14),c=n(7),l=i.aTypedArray,h=i.exportTypedArrayMethod,f=u("".slice);h("fill",(function(t){var e=arguments.length;l(this);var n="Big"===f(o(this),0,3)?a(t):+t;return s(r,this,n,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),c((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})))},function(t,e,n){"use strict";var i=n(215),r=n(85).filter,a=n(455),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("filter",(function(t){var e=r(o(this),t,arguments.length>1?arguments[1]:void 0);return a(this,e)}))},function(t,e,n){"use strict";var i=n(199),r=n(456);t.exports=function(t,e){return i(r(t),e)}},function(t,e,n){"use strict";var i=n(215),r=n(217),a=i.aTypedArrayConstructor,o=i.getTypedArrayConstructor;t.exports=function(t){return a(r(t,o(t)))}},function(t,e,n){"use strict";var i=n(215),r=n(85).find,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("find",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).findIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(155).findLast,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLast",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(155).findLastIndex,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("findLastIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(85).forEach,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("forEach",(function(t){r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(435);(0,n(215).exportTypedArrayStaticMethod)("from",n(439),i)},function(t,e,n){"use strict";var i=n(215),r=n(60).includes,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("includes",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(60).indexOf,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("indexOf",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(7),a=n(14),o=n(215),s=n(169),u=n(34)("iterator"),c=i.Uint8Array,l=a(s.values),h=a(s.keys),f=a(s.entries),d=o.aTypedArray,g=o.exportTypedArrayMethod,p=c&&c.prototype,v=!r((function(){p[u].call([1])})),y=!!p&&p.values&&p[u]===p.values&&"values"===p.values.name,x=function(){return l(d(this))};g("entries",(function(){return f(d(this))}),v),g("keys",(function(){return h(d(this))}),v),g("values",x,v||!y,{name:"values"}),g(u,x,v||!y,{name:"values"})},function(t,e,n){"use strict";var i=n(215),r=n(14),a=i.aTypedArray,o=i.exportTypedArrayMethod,s=r([].join);o("join",(function(t){return s(a(this),t)}))},function(t,e,n){"use strict";var i=n(215),r=n(96),a=n(176),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return r(a,o(this),e>1?[t,arguments[1]]:[t])}))},function(t,e,n){"use strict";var i=n(215),r=n(85).map,a=n(456),o=i.aTypedArray;(0,i.exportTypedArrayMethod)("map",(function(t){return r(o(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(a(t))(e)}))}))},function(t,e,n){"use strict";var i=n(215),r=n(435),a=i.aTypedArrayConstructor;(0,i.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,e=arguments.length,n=new(a(this))(e);e>t;)n[t]=arguments[t++];return n}),r)},function(t,e,n){"use strict";var i=n(215),r=n(182).left,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return r(a(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=n(182).right,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return r(a(this),t,e,e>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(215),r=i.aTypedArray,a=i.exportTypedArrayMethod,o=Math.floor;a("reverse",(function(){for(var t,e=this,n=r(e).length,i=o(n/2),a=0;a1?arguments[1]:void 0,1),n=u(t);if(v)return r(d,this,n,e);var i=this.length,a=o(n),c=0;if(a+e>i)throw l("Wrong length");for(;ca;)c[a]=n[a++];return c}),a((function(){new Int8Array(1).slice()})))},function(t,e,n){"use strict";var i=n(215),r=n(85).some,a=i.aTypedArray;(0,i.exportTypedArrayMethod)("some",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},function(t,e,n){"use strict";var i=n(4),r=n(87),a=n(7),o=n(31),s=n(189),u=n(215),c=n(190),l=n(191),h=n(28),f=n(192),d=u.aTypedArray,g=u.exportTypedArrayMethod,p=i.Uint16Array,v=p&&r(p.prototype.sort),y=!(!v||a((function(){v(new p(2),null)}))&&a((function(){v(new p(2),{})}))),x=!!v&&!a((function(){if(h)return h<74;if(c)return c<67;if(l)return!0;if(f)return f<602;var t,e,n=new p(516),i=Array(516);for(t=0;t<516;t++)e=t%4,n[t]=515-t,i[t]=t-2*e+3;for(v(n,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(n[t]!==i[t])return!0}));g("sort",(function(t){return void 0!==t&&o(t),x?v(this,t):s(d(this),function(t){return function(e,n){return void 0!==t?+t(e,n)||0:n!=n?-1:e!=e?1:0===e&&0===n?1/e>0&&1/n<0?1:-1:e>n}}(t))}),!x||y)},function(t,e,n){"use strict";var i=n(215),r=n(65),a=n(61),o=n(456),s=i.aTypedArray;(0,i.exportTypedArrayMethod)("subarray",(function(t,e){var n=s(this),i=n.length,u=a(t,i);return new(o(n))(n.buffer,n.byteOffset+u*n.BYTES_PER_ELEMENT,r((void 0===e?i:a(e,i))-u))}))},function(t,e,n){"use strict";var i=n(4),r=n(96),a=n(215),o=n(7),s=n(97),u=i.Int8Array,c=a.aTypedArray,l=a.exportTypedArrayMethod,h=[].toLocaleString,f=!!u&&o((function(){h.call(new u(1))}));l("toLocaleString",(function(){return r(h,f?s(c(this)):c(this),s(arguments))}),o((function(){return[1,2].toLocaleString()!=new u([1,2]).toLocaleString()}))||!o((function(){u.prototype.toLocaleString.call([1,2])})))},function(t,e,n){"use strict";var i=n(197),r=n(215),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;o("toReversed",(function(){return i(a(this),s(this))}))},function(t,e,n){"use strict";var i=n(215),r=n(14),a=n(31),o=n(199),s=i.aTypedArray,u=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,l=r(i.TypedArrayPrototype.sort);c("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),n=o(u(e),e);return l(n,t)}))},function(t,e,n){"use strict";var i=n(215).exportTypedArrayMethod,r=n(7),a=n(4),o=n(14),s=a.Uint8Array,u=s&&s.prototype||{},c=[].toString,l=o([].join);r((function(){c.call({})}))&&(c=function(){return l(this)});var h=u.toString!=c;i("toString",c,h)},function(t,e,n){"use strict";var i=n(206),r=n(215),a=n(440),o=n(62),s=n(441),u=r.aTypedArray,c=r.getTypedArrayConstructor,l=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();l("with",{with:function(t,e){var n=u(this),r=o(t),l=a(n)?s(e):+e;return i(n,c(n),r,l)}}.with,!h)},function(t,e,n){"use strict";var i=n(3),r=n(14),a=n(69),o=String.fromCharCode,s=r("".charAt),u=r(/./.exec),c=r("".slice),l=/^[\da-f]{2}$/i,h=/^[\da-f]{4}$/i;i({global:!0},{unescape:function(t){for(var e,n,i=a(t),r="",f=i.length,d=0;d>(-2*_&6))));return o}})},function(t){"use strict";for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n={},i=0;i<66;i++)n[e.charAt(i)]=i;t.exports={itoc:e,ctoi:n}},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(24),o=n(14),s=n(8),u=n(7),c=n(69),l=n(328),h=n(490).itoc,f=a("btoa"),d=o("".charAt),g=o("".charCodeAt),p=!!f&&!u((function(){f()})),v=!!f&&u((function(){return"bnVsbA=="!==f(null)})),y=!!f&&1!==f.length;i({global:!0,bind:!0,enumerable:!0,forced:p||v||y},{btoa:function(t){if(l(arguments.length,1),p||v||y)return s(f,r,c(t));for(var e,n,i=c(t),o="",u=0,x=h;d(i,u)||(x="=",u%1);){if((n=g(i,u+=3/4))>255)throw new(a("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");o+=d(x,63&(e=e<<8|n)>>8-u%1*8)}return o}})},function(t,e,n){"use strict";var i=n(4),r=n(493),a=n(494),o=n(161),s=n(44),u=function(t){if(t&&t.forEach!==o)try{s(t,"forEach",o)}catch(e){t.forEach=o}};for(var c in r)r[c]&&u(i[c]&&i[c].prototype);u(a)},function(t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){"use strict";var i=n(43)("span").classList,r=i&&i.constructor&&i.constructor.prototype;t.exports=r===Object.prototype?void 0:r},function(t,e,n){"use strict";var i=n(4),r=n(493),a=n(494),o=n(169),s=n(44),u=n(34),c=u("iterator"),l=u("toStringTag"),h=o.values,f=function(t,e){if(t){if(t[c]!==h)try{s(t,c,h)}catch(e){t[c]=h}if(t[l]||s(t,l,e),r[e])for(var n in o)if(t[n]!==o[n])try{s(t,n,o[n])}catch(e){t[n]=o[n]}}};for(var d in r)f(i[d]&&i[d].prototype,d);f(a,"DOMTokenList")},function(t,e,n){"use strict";var i=n(3),r=n(497),a=n(24),o=n(7),s=n(72),u=n(11),c=n(45).f,l=n(48),h=n(79),f=n(39),d=n(211),g=n(47),p=n(127),v=n(121),y=n(498),x=n(124),b=n(52),m=n(6),_=n(36),T="DOMException",w="DATA_CLONE_ERR",A=a("Error"),S=a(T)||function(){try{(new(a("MessageChannel")||r("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(t){if(t.name==w&&25==t.code)return t.constructor}}(),E=S&&S.prototype,k=A.prototype,M=b.set,O=b.getterFor(T),R="stack"in A(T),C=function(t){return f(y,t)&&y[t].m?y[t].c:0},I=function(){d(this,L);var t=arguments.length,e=v(t<1?void 0:arguments[0]),n=v(t<2?void 0:arguments[1],"Error"),i=C(n);if(M(this,{type:T,name:n,message:e,code:i}),m||(this.name=n,this.message=e,this.code=i),R){var r=A(e);r.name=T,c(this,"stack",u(1,x(r.stack,1)))}},L=I.prototype=s(k),P=function(t){return{enumerable:!0,configurable:!0,get:t}},D=function(t){return P((function(){return O(this)[t]}))};m&&(h(L,"code",D("code")),h(L,"message",D("message")),h(L,"name",D("name"))),c(L,"constructor",u(1,I));var N=o((function(){return!(new S instanceof A)})),F=N||o((function(){return k.toString!==p||"2: 1"!==String(new S(1,2))})),z=N||o((function(){return 25!==new S(1,"DataCloneError").code})),j=N||25!==S[w]||25!==E[w],B=_?F||z||j:N;i({global:!0,constructor:!0,forced:B},{DOMException:B?I:S});var $=a(T),X=$.prototype;for(var U in F&&(_||S===$)&&l(X,"toString",p),z&&m&&S===$&&h(X,"code",P((function(){return C(g(this).name)}))),y)if(f(y,U)){var Y=y[U],V=Y.s,G=u(6,Y.c);f($,V)||c($,V,G),f(X,V)||c(X,V,G)}},function(t,e,n){"use strict";var i=n(183);t.exports=function(t){try{if(i)return Function('return require("'+t+'")')()}catch(t){}}},function(t){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(24),o=n(11),s=n(45).f,u=n(39),c=n(211),l=n(120),h=n(121),f=n(498),d=n(124),g=n(6),p=n(36),v="DOMException",y=a("Error"),x=a(v),b=function(){c(this,m);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),i=new x(e,n),r=y(e);return r.name=v,s(i,"stack",o(1,d(r.stack,1))),l(i,this,b),i},m=b.prototype=x.prototype,_="stack"in y(v),T="stack"in new x(1,2),w=x&&g&&Object.getOwnPropertyDescriptor(r,v),A=!(!w||w.writable&&w.configurable),S=_&&!A&&!T;i({global:!0,constructor:!0,forced:p||S},{DOMException:S?b:x});var E=a(v),k=E.prototype;if(k.constructor!==E)for(var M in p||s(k,"constructor",o(1,E)),f)if(u(f,M)){var O=f[M],R=O.s;u(E,R)||s(E,R,o(6,O.c))}},function(t,e,n){"use strict";var i=n(24),r="DOMException";n(84)(i(r),r)},function(t,e,n){"use strict";n(502),n(503)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(327).clear;i({global:!0,bind:!0,enumerable:!0,forced:r.clearImmediate!==a},{clearImmediate:a})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(327).set,o=n(504),s=r.setImmediate?o(a,!1):a;i({global:!0,bind:!0,enumerable:!0,forced:r.setImmediate!==s},{setImmediate:s})},function(t,e,n){"use strict";var i,r=n(4),a=n(96),o=n(21),s=n(505),u=n(29),c=n(97),l=n(328),h=r.Function,f=/MSIE .\./.test(u)||s&&((i=r.Bun.version.split(".")).length<3||0==i[0]&&(i[1]<3||3==i[1]&&0==i[2]));t.exports=function(t,e){var n=e?2:1;return f?function(i,r){var s=l(arguments.length,1)>n,u=o(i)?i:h(i),f=s?c(arguments,n):[],d=s?function(){a(u,this,f)}:u;return e?t(d,r):t(d)}:t}},function(t){"use strict";t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(330),o=n(31),s=n(328),u=n(183),c=r.process;i({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(t){s(arguments.length,1),o(t);var e=u&&c.domain;a(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(79),o=n(6),s=TypeError,u=Object.defineProperty,c=r.self!==r;try{if(o){var l=Object.getOwnPropertyDescriptor(r,"self");!c&&l&&l.get&&l.enumerable||a(r,"self",{get:function(){return r},set:function(t){if(this!==r)throw s("Illegal invocation");u(r,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else i({global:!0,simple:!0,forced:c},{self:r})}catch(t){}},function(t,e,n){"use strict";var i,r=n(36),a=n(3),o=n(4),s=n(24),u=n(14),c=n(7),l=n(41),h=n(21),f=n(91),d=n(17),g=n(20),p=n(23),v=n(132),y=n(47),x=n(70),b=n(39),m=n(78),_=n(44),T=n(64),w=n(328),A=n(368),S=n(509),E=n(510),k=n(125),M=n(511),O=o.Object,R=o.Array,C=o.Date,I=o.Error,L=o.EvalError,P=o.RangeError,D=o.ReferenceError,N=o.SyntaxError,F=o.TypeError,z=o.URIError,j=o.PerformanceMark,B=o.WebAssembly,$=B&&B.CompileError||I,X=B&&B.LinkError||I,U=B&&B.RuntimeError||I,Y=s("DOMException"),V=S.Map,G=S.has,H=S.get,W=S.set,q=E.Set,Z=E.add,K=s("Object","keys"),J=u([].push),Q=u((!0).valueOf),tt=u(1..valueOf),et=u("".valueOf),nt=u(C.prototype.getTime),it=l("structuredClone"),rt="DataCloneError",at="Transferring",ot=function(t){return!c((function(){var e=new o.Set([7]),n=t(e),i=t(O(7));return n==e||!n.has(7)||"object"!=typeof i||7!=i}))&&t},st=function(t,e){return!c((function(){var n=new e,i=t({a:n,b:n});return!(i&&i.a===i.b&&i.a instanceof e&&i.a.stack===n.stack)}))},ut=o.structuredClone,ct=r||!st(ut,I)||!st(ut,Y)||(i=ut,!!c((function(){var t=i(new o.AggregateError([1],it,{cause:3}));return"AggregateError"!=t.name||1!=t.errors[0]||t.message!=it||3!=t.cause}))),lt=!ut&&ot((function(t){return new j(it,{detail:t}).detail})),ht=ot(ut)||lt,ft=function(t){throw new Y("Uncloneable type: "+t,rt)},dt=function(t,e){throw new Y((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",rt)},gt=function(t,e){return ht||dt(e),ht(t)},pt=function(t,e,n){if(G(e,t))return H(e,t);var i,r,a,s,u,c;if("SharedArrayBuffer"===(n||x(t)))i=ht?ht(t):t;else{var l=o.DataView;l||"function"==typeof t.slice||dt("ArrayBuffer");try{if("function"!=typeof t.slice||t.resizable){r=t.byteLength,a="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,i=new ArrayBuffer(r,a),s=new l(t),u=new l(i);for(c=0;c1&&!d(arguments[1])?y(arguments[1]):void 0,r=i?i.transfer:void 0,a=!1;void 0!==r&&(n=function(t,e){if(!g(t))throw F("Transfer option cannot be converted to a sequence");var n=[];v(t,(function(t){J(n,y(t))}));for(var i,r,a,s,u,c=0,l=T(n),d=[];c92||u&&a>94||o&&a>97)return!1;var t=new ArrayBuffer(8),e=c(t,{transfer:[t]});return 0!=t.byteLength||8!=e.byteLength}))},function(t,e,n){"use strict";n(513),n(514)},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(504)(r.setInterval,!0);i({global:!0,bind:!0,forced:r.setInterval!==a},{setInterval:a})},function(t,e,n){"use strict";var i=n(3),r=n(4),a=n(504)(r.setTimeout,!0);i({global:!0,bind:!0,forced:r.setTimeout!==a},{setTimeout:a})},function(t,e,n){"use strict";n(516)},function(t,e,n){"use strict";n(391);var i,r=n(3),a=n(6),o=n(517),s=n(4),u=n(86),c=n(14),l=n(48),h=n(79),f=n(211),d=n(39),g=n(292),p=n(163),v=n(77),y=n(384).codeAt,x=n(518),b=n(69),m=n(84),_=n(328),T=n(519),w=n(52),A=w.set,S=w.getterFor("URL"),E=T.URLSearchParams,k=T.getState,M=s.URL,O=s.TypeError,R=s.parseInt,C=Math.floor,I=Math.pow,L=c("".charAt),P=c(/./.exec),D=c([].join),N=c(1..toString),F=c([].pop),z=c([].push),j=c("".replace),B=c([].shift),$=c("".split),X=c("".slice),U=c("".toLowerCase),Y=c([].unshift),V="Invalid scheme",G="Invalid host",H="Invalid port",W=/[a-z]/i,q=/[\d+-.a-z]/i,Z=/\d/,K=/^0x/i,J=/^[0-7]+$/,Q=/^\d+$/,tt=/^[\da-f]+$/i,et=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nt=/[\0\t\n\r #/:<>?@[\\\]^|]/,it=/^[\u0000-\u0020]+/,rt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,ot=function(t){var e,n,i,r;if("number"==typeof t){for(e=[],n=0;n<4;n++)Y(e,t%256),t=C(t/256);return D(e,".")}if("object"==typeof t){for(e="",i=function(t){for(var e=null,n=1,i=null,r=0,a=0;a<8;a++)0!==t[a]?(r>n&&(e=i,n=r),i=null,r=0):(null===i&&(i=a),++r);return r>n&&(e=i,n=r),e}(t),n=0;n<8;n++)r&&0===t[n]||(r&&(r=!1),i===n?(e+=n?":":"::",r=!0):(e+=N(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},st={},ut=g({},st,{" ":1,'"':1,"<":1,">":1,"`":1}),ct=g({},ut,{"#":1,"?":1,"{":1,"}":1}),lt=g({},ct,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ht=function(t,e){var n=y(t,0);return n>32&&n<127&&!d(e,t)?t:encodeURIComponent(t)},ft={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dt=function(t,e){var n;return 2==t.length&&P(W,L(t,0))&&(":"==(n=L(t,1))||!e&&"|"==n)},gt=function(t){var e;return t.length>1&&dt(X(t,0,2))&&(2==t.length||"/"===(e=L(t,2))||"\\"===e||"?"===e||"#"===e)},pt=function(t){return"."===t||"%2e"===U(t)},vt={},yt={},xt={},bt={},mt={},_t={},Tt={},wt={},At={},St={},Et={},kt={},Mt={},Ot={},Rt={},Ct={},It={},Lt={},Pt={},Dt={},Nt={},Ft=function(t,e,n){var i,r,a,o=b(t);if(e){if(r=this.parse(o))throw O(r);this.searchParams=null}else{if(void 0!==n&&(i=new Ft(n,!0)),r=this.parse(o,null,i))throw O(r);(a=k(new E)).bindURL(this),this.searchParams=a}};Ft.prototype={type:"URL",parse:function(t,e,n){var r,a,o,s,u,c=this,l=e||vt,h=0,f="",g=!1,y=!1,x=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=j(t,it,""),t=j(t,rt,"$1")),t=j(t,at,""),r=p(t);h<=r.length;){switch(a=r[h],l){case vt:if(!a||!P(W,a)){if(e)return V;l=xt;continue}f+=U(a),l=yt;break;case yt:if(a&&(P(q,a)||"+"==a||"-"==a||"."==a))f+=U(a);else{if(":"!=a){if(e)return V;f="",l=xt,h=0;continue}if(e&&(c.isSpecial()!=d(ft,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,e)return void(c.isSpecial()&&ft[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?l=Ot:c.isSpecial()&&n&&n.scheme==c.scheme?l=bt:c.isSpecial()?l=wt:"/"==r[h+1]?(l=mt,h++):(c.cannotBeABaseURL=!0,z(c.path,""),l=Pt)}break;case xt:if(!n||n.cannotBeABaseURL&&"#"!=a)return V;if(n.cannotBeABaseURL&&"#"==a){c.scheme=n.scheme,c.path=v(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=Nt;break}l="file"==n.scheme?Ot:_t;continue;case bt:if("/"!=a||"/"!=r[h+1]){l=_t;continue}l=At,h++;break;case mt:if("/"==a){l=St;break}l=Lt;continue;case _t:if(c.scheme=n.scheme,a==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query;else if("/"==a||"\\"==a&&c.isSpecial())l=Tt;else if("?"==a)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query="",l=Dt;else{if("#"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.path.length--,l=Lt;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=v(n.path),c.query=n.query,c.fragment="",l=Nt}break;case Tt:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=Lt;continue}l=St}else l=At;break;case wt:if(l=At,"/"!=a||"/"!=L(f,h+1))continue;h++;break;case At:if("/"!=a&&"\\"!=a){l=St;continue}break;case St:if("@"==a){g&&(f="%40"+f),g=!0,o=p(f);for(var m=0;m65535)return H;c.port=c.isSpecial()&&w===ft[c.scheme]?null:w,f=""}if(e)return;l=It;continue}return H}f+=a;break;case Ot:if(c.scheme="file","/"==a||"\\"==a)l=Rt;else{if(!n||"file"!=n.scheme){l=Lt;continue}if(a==i)c.host=n.host,c.path=v(n.path),c.query=n.query;else if("?"==a)c.host=n.host,c.path=v(n.path),c.query="",l=Dt;else{if("#"!=a){gt(D(v(r,h),""))||(c.host=n.host,c.path=v(n.path),c.shortenPath()),l=Lt;continue}c.host=n.host,c.path=v(n.path),c.query=n.query,c.fragment="",l=Nt}}break;case Rt:if("/"==a||"\\"==a){l=Ct;break}n&&"file"==n.scheme&&!gt(D(v(r,h),""))&&(dt(n.path[0],!0)?z(c.path,n.path[0]):c.host=n.host),l=Lt;continue;case Ct:if(a==i||"/"==a||"\\"==a||"?"==a||"#"==a){if(!e&&dt(f))l=Lt;else if(""==f){if(c.host="",e)return;l=It}else{if(s=c.parseHost(f))return s;if("localhost"==c.host&&(c.host=""),e)return;f="",l=It}continue}f+=a;break;case It:if(c.isSpecial()){if(l=Lt,"/"!=a&&"\\"!=a)continue}else if(e||"?"!=a)if(e||"#"!=a){if(a!=i&&(l=Lt,"/"!=a))continue}else c.fragment="",l=Nt;else c.query="",l=Dt;break;case Lt:if(a==i||"/"==a||"\\"==a&&c.isSpecial()||!e&&("?"==a||"#"==a)){if(".."===(u=U(u=f))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||z(c.path,"")):pt(f)?"/"==a||"\\"==a&&c.isSpecial()||z(c.path,""):("file"==c.scheme&&!c.path.length&&dt(f)&&(c.host&&(c.host=""),f=L(f,0)+":"),z(c.path,f)),f="","file"==c.scheme&&(a==i||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)B(c.path);"?"==a?(c.query="",l=Dt):"#"==a&&(c.fragment="",l=Nt)}else f+=ht(a,ct);break;case Pt:"?"==a?(c.query="",l=Dt):"#"==a?(c.fragment="",l=Nt):a!=i&&(c.path[0]+=ht(a,st));break;case Dt:e||"#"!=a?a!=i&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":ht(a,st)):(c.fragment="",l=Nt);break;case Nt:a!=i&&(c.fragment+=ht(a,ut))}h++}},parseHost:function(t){var e,n,i;if("["==L(t,0)){if("]"!=L(t,t.length-1))return G;if(e=function(t){var e,n,i,r,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return L(t,h)};if(":"==f()){if(":"!=L(t,1))return;h+=2,l=++c}for(;f();){if(8==c)return;if(":"!=f()){for(e=n=0;n<4&&P(tt,f());)e=16*e+R(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,c>6)return;for(i=0;f();){if(r=null,i>0){if(!("."==f()&&i<4))return;h++}if(!P(Z,f()))return;for(;P(Z,f());){if(a=R(f(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;h++}u[c]=256*u[c]+r,2!=++i&&4!=i||c++}if(4!=i)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[c++]=e}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(o=c-l,c=7;0!=c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!=c)return;return u}(X(t,1,-1)),!e)return G;this.host=e}else if(this.isSpecial()){if(t=x(t),P(et,t))return G;if(e=function(t){var e,n,i,r,a,o,s,u=$(t,".");if(u.length&&""==u[u.length-1]&&u.length--,(e=u.length)>4)return t;for(n=[],i=0;i1&&"0"==L(r,0)&&(a=P(K,r)?16:8,r=X(r,8==a?1:2)),""===r)o=0;else{if(!P(10==a?Q:8==a?J:tt,r))return t;o=R(r,a)}z(n,o)}for(i=0;i=I(256,5-e))return null}else if(o>255)return null;for(s=F(n),i=0;i1?arguments[1]:void 0,i=A(e,new Ft(t,!1,n));a||(e.href=i.serialize(),e.origin=i.getOrigin(),e.protocol=i.getProtocol(),e.username=i.getUsername(),e.password=i.getPassword(),e.host=i.getHost(),e.hostname=i.getHostname(),e.port=i.getPort(),e.pathname=i.getPathname(),e.search=i.getSearch(),e.searchParams=i.getSearchParams(),e.hash=i.getHash())},jt=zt.prototype,Bt=function(t,e){return{get:function(){return S(this)[t]()},set:e&&function(t){return S(this)[e](t)},configurable:!0,enumerable:!0}};if(a&&(h(jt,"href",Bt("serialize","setHref")),h(jt,"origin",Bt("getOrigin")),h(jt,"protocol",Bt("getProtocol","setProtocol")),h(jt,"username",Bt("getUsername","setUsername")),h(jt,"password",Bt("getPassword","setPassword")),h(jt,"host",Bt("getHost","setHost")),h(jt,"hostname",Bt("getHostname","setHostname")),h(jt,"port",Bt("getPort","setPort")),h(jt,"pathname",Bt("getPathname","setPathname")),h(jt,"search",Bt("getSearch","setSearch")),h(jt,"searchParams",Bt("getSearchParams")),h(jt,"hash",Bt("getHash","setHash"))),l(jt,"toJSON",(function(){return S(this).serialize()}),{enumerable:!0}),l(jt,"toString",(function(){return S(this).serialize()}),{enumerable:!0}),M){var $t=M.createObjectURL,Xt=M.revokeObjectURL;$t&&l(zt,"createObjectURL",u($t,M)),Xt&&l(zt,"revokeObjectURL",u(Xt,M))}m(zt,"URL"),r({global:!0,constructor:!0,forced:!o,sham:!a},{URL:zt})},function(t,e,n){"use strict";var i=n(7),r=n(34),a=n(6),o=n(36),s=r("iterator");t.exports=!i((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),i="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),i+=n+t})),n.delete("a",2),n.delete("b",void 0),o&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(o||!a)||!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==i||"x"!==new URL("http://x",void 0).host}))},function(t,e,n){"use strict";var i=n(14),r=2147483647,a=/[^\0-\u007E]/,o=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",u=RangeError,c=i(o.exec),l=Math.floor,h=String.fromCharCode,f=i("".charCodeAt),d=i([].join),g=i([].push),p=i("".replace),v=i("".split),y=i("".toLowerCase),x=function(t){return t+22+75*(t<26)},b=function(t,e,n){var i=0;for(t=n?l(t/700):t>>1,t+=l(t/e);t>455;)t=l(t/35),i+=36;return l(i+36*t/(t+38))},m=function(t){var e=[];t=function(t){for(var e=[],n=0,i=t.length;n=55296&&r<=56319&&n=o&&il((r-c)/_))throw u(s);for(c+=(m-o)*_,o=m,n=0;nr)throw u(s);if(i==o){for(var T=c,w=36;;){var A=w<=p?1:w>=p+26?26:w-p;if(T0?arguments[0]:void 0));s||(this.size=t.entries.length)},dt=ft.prototype;if(h(dt,{append:function(t,e){var n=P(this);k(arguments.length,2),q(n.entries,{key:T(t),value:T(e)}),s||this.length++,n.updateURL()},delete:function(t){for(var e=P(this),n=k(arguments.length,1),i=e.entries,r=T(t),a=n<2?void 0:arguments[1],o=void 0===a?a:T(a),u=0;ue.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=P(this).entries,i=x(t,arguments.length>1?arguments[1]:void 0),r=0;r1?vt(arguments[1]):{})}}),v(j)){var yt=function(t){return p(this,$),new j(t,arguments.length>1?vt(arguments[1]):{})};$.constructor=yt,yt.prototype=$,i({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yt})}}t.exports={URLSearchParams:ft,getState:P}},function(t,e,n){"use strict";var i=n(3),r=n(24),a=n(7),o=n(328),s=n(69),u=n(517),c=r("URL");i({target:"URL",stat:!0,forced:!(u&&a((function(){c.canParse()})))},{canParse:function(t){var e=o(arguments.length,1),n=s(t),i=e<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new c(n,i)}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(3),r=n(8);i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}})},function(t,e,n){"use strict";n(519)},function(t,e,n){"use strict";var i=n(48),r=n(14),a=n(69),o=n(328),s=URLSearchParams,u=s.prototype,c=r(u.append),l=r(u.delete),h=r(u.forEach),f=r([].push),d=new s("a=1&a=2&b=3");d.delete("a",1),d.delete("b",void 0),d+""!="a=2"&&i(u,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return l(this,t);var i=[];h(this,(function(t,e){f(i,{key:e,value:t})})),o(e,1);for(var r,s=a(t),u=a(n),d=0,g=0,p=!1,v=i.length;d0))return u;do{u.push(s=new Date(+n)),e(n,o),t(n)}while(s=e)for(;t(e),!n(e);)e.setTime(e-1)}.bind(this),function(t,r){if(a(this,i),t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}.bind(this))}.bind(this),n&&(c.count=function(e,i){return a(this,r),o.setTime(+e),s.setTime(+i),t(o),t(s),Math.floor(n(o,s))}.bind(this),c.every=function(t){var e=this;return a(this,r),t=Math.floor(t),isFinite(t)&&t>0?t>1?c.filter(i?function(n){return a(this,e),i(n)%t==0}.bind(this):function(n){return a(this,e),c.count(0,n)%t==0}.bind(this)):c:null}.bind(this)),c}var c=1e3,l=6e4,h=36e5,f=864e5,d=6048e5,g=2592e6,p=31536e6;function v(t){var e=this;return u(function(n){a(this,e),n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}.bind(this),function(t,n){a(this,e),t.setDate(t.getDate()+7*n)}.bind(this),function(t,n){return a(this,e),(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*l)/d}.bind(this))}var y=v(0),x=v(1),b=v(2),m=v(3),_=v(4),T=v(5),w=v(6);y.range,x.range,b.range,m.range,_.range,T.range,w.range;function A(t){var e=this;return u(function(n){a(this,e),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}.bind(this),function(t,n){a(this,e),t.setUTCDate(t.getUTCDate()+7*n)}.bind(this),function(t,n){return a(this,e),(n-t)/d}.bind(this))}var S=A(0),E=A(1),k=A(2),M=A(3),O=A(4),R=A(5),C=A(6),I=(S.range,E.range,k.range,M.range,O.range,R.range,C.range,void 0),L=u(function(t){return a(this,I),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){return a(this,I),t.setDate(t.getDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*l)/f}.bind(void 0),function(t){return a(this,I),t.getDate()-1}.bind(void 0)),P=(L.range,u(function(t){a(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t)/f}.bind(void 0),function(t){return a(this,I),t.getUTCDate()-1}.bind(void 0))),D=(P.range,u(function(t){a(this,I),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,I),t.setUTCDate(t.getUTCDate()+e)}.bind(void 0),function(t,e){return a(this,I),(e-t)/f}.bind(void 0),function(t){return a(this,I),Math.floor(t/f)}.bind(void 0))),N=(D.range,void 0),F=u(function(t){a(this,N),t.setMonth(0,1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,N),t.setFullYear(t.getFullYear()+e)}.bind(void 0),function(t,e){return a(this,N),e.getFullYear()-t.getFullYear()}.bind(void 0),function(t){return a(this,N),t.getFullYear()}.bind(void 0));F.every=function(t){var e=this;return a(this,N),isFinite(t=Math.floor(t))&&t>0?u(function(n){a(this,e),n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}.bind(this),function(n,i){a(this,e),n.setFullYear(n.getFullYear()+i*t)}.bind(this)):null}.bind(void 0);F.range;var z=u(function(t){a(this,N),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,N),t.setUTCFullYear(t.getUTCFullYear()+e)}.bind(void 0),function(t,e){return a(this,N),e.getUTCFullYear()-t.getUTCFullYear()}.bind(void 0),function(t){return a(this,N),t.getUTCFullYear()}.bind(void 0));z.every=function(t){var e=this;return a(this,N),isFinite(t=Math.floor(t))&&t>0?u(function(n){a(this,e),n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}.bind(this),function(n,i){a(this,e),n.setUTCFullYear(n.getUTCFullYear()+i*t)}.bind(this)):null}.bind(void 0);z.range;function j(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function B(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var X,U,Y,V,G,H={"-":"",_:" ",0:"0"},W=/^\s*\d+/,q=/^%/,Z=/[\\^$*+?|[\]().{}]/g;function K(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a68?1900:2e3),n+i[0].length):-1}function ut(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ct(t,e,n){var i=W.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function lt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ht(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ft(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function dt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function gt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function pt(t,e,n){var i=W.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function vt(t,e,n){var i=W.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function yt(t,e,n){var i=W.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function xt(t,e,n){var i=q.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function bt(t,e,n){var i=W.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function mt(t,e,n){var i=W.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _t(t,e){return K(t.getDate(),e,2)}function Tt(t,e){return K(t.getHours(),e,2)}function wt(t,e){return K(t.getHours()%12||12,e,2)}function At(t,e){return K(1+L.count(F(t),t),e,3)}function St(t,e){return K(t.getMilliseconds(),e,3)}function Et(t,e){return St(t,e)+"000"}function kt(t,e){return K(t.getMonth()+1,e,2)}function Mt(t,e){return K(t.getMinutes(),e,2)}function Ot(t,e){return K(t.getSeconds(),e,2)}function Rt(t){var e=t.getDay();return 0===e?7:e}function Ct(t,e){return K(y.count(F(t)-1,t),e,2)}function It(t){var e=t.getDay();return e>=4||0===e?_(t):_.ceil(t)}function Lt(t,e){return t=It(t),K(_.count(F(t),t)+(4===F(t).getDay()),e,2)}function Pt(t){return t.getDay()}function Dt(t,e){return K(x.count(F(t)-1,t),e,2)}function Nt(t,e){return K(t.getFullYear()%100,e,2)}function Ft(t,e){return K((t=It(t)).getFullYear()%100,e,2)}function zt(t,e){return K(t.getFullYear()%1e4,e,4)}function jt(t,e){var n=t.getDay();return K((t=n>=4||0===n?_(t):_.ceil(t)).getFullYear()%1e4,e,4)}function Bt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+K(e/60|0,"0",2)+K(e%60,"0",2)}function $t(t,e){return K(t.getUTCDate(),e,2)}function Xt(t,e){return K(t.getUTCHours(),e,2)}function Ut(t,e){return K(t.getUTCHours()%12||12,e,2)}function Yt(t,e){return K(1+P.count(z(t),t),e,3)}function Vt(t,e){return K(t.getUTCMilliseconds(),e,3)}function Gt(t,e){return Vt(t,e)+"000"}function Ht(t,e){return K(t.getUTCMonth()+1,e,2)}function Wt(t,e){return K(t.getUTCMinutes(),e,2)}function qt(t,e){return K(t.getUTCSeconds(),e,2)}function Zt(t){var e=t.getUTCDay();return 0===e?7:e}function Kt(t,e){return K(S.count(z(t)-1,t),e,2)}function Jt(t){var e=t.getUTCDay();return e>=4||0===e?O(t):O.ceil(t)}function Qt(t,e){return t=Jt(t),K(O.count(z(t),t)+(4===z(t).getUTCDay()),e,2)}function te(t){return t.getUTCDay()}function ee(t,e){return K(E.count(z(t)-1,t),e,2)}function ne(t,e){return K(t.getUTCFullYear()%100,e,2)}function ie(t,e){return K((t=Jt(t)).getUTCFullYear()%100,e,2)}function re(t,e){return K(t.getUTCFullYear()%1e4,e,4)}function ae(t,e){var n=t.getUTCDay();return K((t=n>=4||0===n?O(t):O.ceil(t)).getUTCFullYear()%1e4,e,4)}function oe(){return"+0000"}function se(){return"%"}function ue(t){return+t}function ce(t){return Math.floor(+t/1e3)}function le(){}function he(t){return null==t?le:function(){return this.querySelector(t)}}function fe(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function de(){return[]}function ge(t){return null==t?de:function(){return this.querySelectorAll(t)}}function pe(t){return function(){return this.matches(t)}}function ve(t){return function(e){return e.matches(t)}}X=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=Q(r),l=tt(r),h=Q(a),f=tt(a),d=Q(o),g=tt(o),p=Q(s),v=tt(s),y=Q(u),b=tt(u),m={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:_t,e:_t,f:Et,g:Ft,G:jt,H:Tt,I:wt,j:At,L:St,m:kt,M:Mt,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ue,s:ce,S:Ot,u:Rt,U:Ct,V:Lt,w:Pt,W:Dt,x:null,X:null,y:Nt,Y:zt,Z:Bt,"%":se},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:$t,e:$t,f:Gt,g:ie,G:ae,H:Xt,I:Ut,j:Yt,L:Vt,m:Ht,M:Wt,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ue,s:ce,S:qt,u:Zt,U:Kt,V:Qt,w:te,W:ee,x:null,X:null,y:ne,Y:re,Z:oe,"%":se},T={a:function(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=g.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=f.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=b.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=p.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:ht,e:ht,f:yt,g:st,G:ot,H:dt,I:dt,j:ft,L:vt,m:lt,M:gt,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=l.get(i[0].toLowerCase()),n+i[0].length):-1},q:ct,Q:bt,s:mt,S:pt,u:nt,U:it,V:rt,w:et,W:at,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:st,Y:ot,Z:ut,"%":xt};function w(t,e){return function(n){var i,r,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=B($(a.y,0,1))).getUTCDay(),i=r>4||0===r?E.ceil(i):E(i),i=P.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=j($(a.y,0,1))).getDay(),i=r>4||0===r?x.ceil(i):x(i),i=L.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?B($(a.y,0,1)).getUTCDay():j($(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,B(a)):j(a)}}function S(t,e,n,i){for(var r,a,o=0,s=e.length,u=n.length;o=u)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(a=T[r in H?e.charAt(o++):r])||(i=a(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return m.x=w(n,m),m.X=w(i,m),m.c=w(e,m),_.x=w(n,_),_.X=w(i,_),_.c=w(e,_),{format:function(t){var e=w(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),U=X.format,Y=X.parse,V=X.utcFormat,G=X.utcParse;var ye=Array.prototype.find;function xe(){return this.firstElementChild}var be=Array.prototype.filter;function me(){return Array.from(this.children)}function _e(t){return Array(t.length)}function Te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function we(t,e,n,i,r,a){for(var o,s=0,u=e.length,c=a.length;se?1:t>=e?0:NaN}function Me(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Oe(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ce.hasOwnProperty(e)?{space:Ce[e],local:t}:t}function Le(t){return function(){this.removeAttribute(t)}}function Pe(t){return function(){this.removeAttributeNS(t.space,t.local)}}function De(t,e){return function(){this.setAttribute(t,e)}}function Ne(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function je(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Be(t){return function(){this.style.removeProperty(t)}}function $e(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Xe(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||je(t).getComputedStyle(t,null).getPropertyValue(e)}function Ye(t){return function(){delete this[t]}}function Ve(t,e){return function(){this[t]=e}}function Ge(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function He(t){return t.trim().split(/^|\s+/)}function We(t){return t.classList||new qe(t)}function qe(t){this._node=t,this._names=He(t.getAttribute("class")||"")}function Ze(t,e){for(var n=We(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Tn,wn=n(527),An=wn.mark(Sn);function Sn(){var t,e,n,i,r,a,o;return wn.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e=m&&(m=b+1);!(x=v[m])&&++m=0;)(i=r[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ke);for(var n=this._groups,i=n.length,r=Array(i),a=0;a1?this.each((null==e?Be:"function"==typeof e?Xe:$e)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ye:"function"==typeof e?Ge:Ve)(t,e)):this.node()[t]},classed:function(t,e){var n=He(t+"");if(arguments.length<2){for(var i=We(this.node()),r=-1,a=n.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?xn:yn,i=0;i=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,i,r=Array(n),a=0;a>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_i(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_i(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=li.exec(t))?new wi(e[1],e[2],e[3],1):(e=hi.exec(t))?new wi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=fi.exec(t))?_i(e[1],e[2],e[3],e[4]):(e=di.exec(t))?_i(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gi.exec(t))?Oi(e[1],e[2]/100,e[3]/100,1):(e=pi.exec(t))?Oi(e[1],e[2]/100,e[3]/100,e[4]):vi.hasOwnProperty(t)?mi(vi[t]):"transparent"===t?new wi(NaN,NaN,NaN,0):null}function mi(t){return new wi(t>>16&255,t>>8&255,255&t,1)}function _i(t,e,n,i){return i<=0&&(t=e=n=NaN),new wi(t,e,n,i)}function Ti(t,e,n,i){return 1===arguments.length?((r=t)instanceof oi||(r=bi(r)),r?new wi((r=r.rgb()).r,r.g,r.b,r.opacity):new wi):new wi(t,e,n,null==i?1:i);var r}function wi(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Ai(){return"#"+Mi(this.r)+Mi(this.g)+Mi(this.b)}function Si(){var t=Ei(this.opacity);return(1===t?"rgb(":"rgba(")+ki(this.r)+", "+ki(this.g)+", "+ki(this.b)+(1===t?")":", "+t+")")}function Ei(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ki(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mi(t){return((t=ki(t))<16?"0":"")+t.toString(16)}function Oi(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,i)}function Ri(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof oi||(t=bi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,u=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n0&&u<1?0:o,new Ci(o,s,u,t.opacity)}function Ci(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Ii(t){return(t=(t||0)%360)<0?t+360:t}function Li(t){return Math.max(0,Math.min(1,t||0))}function Pi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Di(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}ri(oi,bi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yi,formatHex:yi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ri(this).formatHsl()},formatRgb:xi,toString:xi}),ri(wi,Ti,ai(oi,{brighter:function(t){return t=null==t?ui:Math.pow(ui,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?si:Math.pow(si,t),new wi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new wi(ki(this.r),ki(this.g),ki(this.b),Ei(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ai,formatHex:Ai,formatHex8:function(){return"#"+Mi(this.r)+Mi(this.g)+Mi(this.b)+Mi(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:Si,toString:Si})),ri(Ci,(function(t,e,n,i){return 1===arguments.length?Ri(t):new Ci(t,e,n,null==i?1:i)}),ai(oi,{brighter:function(t){return t=null==t?ui:Math.pow(ui,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?si:Math.pow(si,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new wi(Pi(t>=240?t-240:t+120,r,i),Pi(t,r,i),Pi(t<120?t+240:t-120,r,i),this.opacity)},clamp:function(){return new Ci(Ii(this.h),Li(this.s),Li(this.l),Ei(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=Ei(this.opacity);return(1===t?"hsl(":"hsla(")+Ii(this.h)+", "+100*Li(this.s)+"%, "+100*Li(this.l)+"%"+(1===t?")":", "+t+")")}}));var Ni=function(t){var e=this;return a(this,undefined),function(){return a(this,e),t}.bind(this)}.bind(void 0);function Fi(t,e){return function(n){return t+n*e}}function zi(t){return 1==(t=+t)?ji:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Ni(isNaN(e)?n:e)}}function ji(t,e){var n=e-t;return n?Fi(t,n):Ni(isNaN(t)?e:t)}var Bi=function t(e){var n=zi(e);function i(t,e){var i=n((t=Ti(t)).r,(e=Ti(e)).r),r=n(t.g,e.g),a=n(t.b,e.b),o=ji(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function $i(t){return function(e){var n,i,r=e.length,a=Array(r),o=Array(r),s=Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=ia&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Gi(n,i)})),a=qi.lastIndex;return a=0&&e._call.call(void 0,t),e=e._next;--tr}()}finally{tr=0,function(){var t,e,n=Ji,i=1/0;for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ji=e);Qi=t,pr(i)}(),ar=0}}function gr(){var t=sr.now(),e=t-rr;e>ir&&(or-=e,rr=t)}function pr(t){tr||(er&&(er=clearTimeout(er)),t-ar>24?(t<1/0&&(er=setTimeout(dr,t-sr.now()-or)),nr&&(nr=clearInterval(nr))):(nr||(rr=sr.now(),nr=setInterval(gr,ir)),tr=1,ur(dr)))}function vr(t,e,n){var i=this,r=new hr;return e=null==e?0:+e,r.restart(function(n){a(this,i),r.stop(),t(n+e)}.bind(this),e,n),r}hr.prototype=fr.prototype={constructor:hr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?cr():+n)+(null==e?0:+e),this._next||Qi===this||(Qi?Qi._next=this:Ji=this,Qi=this),this._call=t,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var yr=Kn("start","end","cancel","interrupt"),xr=[],br=0,mr=1,_r=2,Tr=3,wr=4,Ar=5,Sr=6;function Er(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function a(u){var c,l,h,f;if(n.state!==mr)return s();for(c in r)if((f=r[c]).name===n.name){if(f.state===Tr)return vr(a);f.state===wr?(f.state=Sr,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[c]):+cbr)throw new Error("too late; already scheduled");return n}function Mr(t,e){var n=Or(t,e);if(n.state>Tr)throw new Error("too late; already running");return n}function Or(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rr(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>_r&&n.state180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(r(n)+"rotate(",null,i)-2,x:Gi(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(r(n)+"skewX(",null,i)-2,x:Gi(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(a.skewX,o.skewX,s,u),function(t,e,n,i,a,o){if(t!==n||e!==i){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Gi(t,n)},{i:s-2,x:Gi(e,i)})}else 1===n&&1===i||a.push(r(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,i=u.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?kr:Mr;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}(n,t,e))},attr:function(t,e){var n=Ie(t),i="transform"===n?Fr:$r;return this.attrTween(t,"function"==typeof e?(n.local?Hr:Gr)(n,i,Br(this,"attr."+t,e)):null==e?(n.local?Ur:Xr)(n):(n.local?Vr:Yr)(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Ie(t);return this.tween(n,(i.local?Wr:qr)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Nr:$r;return null==e?this.styleTween(t,function(t,e){var n,i,r;return function(){var a=Ue(this,t),o=(this.style.removeProperty(t),Ue(this,t));return a===o?null:a===n&&o===i?r:r=e(n=a,i=o)}}(t,i)).on("end.style."+t,na(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,r,a;return function(){var o=Ue(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ue(this,t)),o===u?null:o===i&&u===r?a:(r=u,a=e(i=o,s))}}(t,i,Br(this,"style."+t,e))).each(function(t,e){var n,i,r,a,o="style."+e;return function(){var s=Mr(this,t),u=s.on,c=null==s.value[o]?a||(a=na(e)):void 0;u===n&&r===c||(i=(n=u).copy()).on("end."+o,r=c),s.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,r;return function(){var a=Ue(this,t);return a===n+""?null:a===i?r:r=e(i=a,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,n){var i,r;function a(){var a=e.apply(this,arguments);return a!==r&&(i=(r=a)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,a,n)),i}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Br(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=Or(this.node(),n).tween,a=0,o=r.length;a=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ga(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n1&&X(n)}else s=k[0][0],c=k[0][1],d=k[1][0],p=k[1][1];u=s,f=c,g=d,v=p;var z=Rn(m).attr("pointer-events","none"),j=z.selectAll(".overlay").attr("cursor",Ea[_]);if(n.touches)N.moved=$,N.ended=U;else{var B=Rn(n.view).on("mousemove.brush",$,!0).on("mouseup.brush",U,!0);o&&B.on("keydown.brush",(function(t){switch(t.keyCode){case 16:P=w&&A;break;case 18:T===ya&&(w&&(d=g-I*w,s=u+I*w),A&&(p=v-L*A,c=f+L*A),T=xa,X(t));break;case 32:T!==ya&&T!==xa||(w<0?d=g-I:w>0&&(s=u-I),A<0?p=v-L:A>0&&(c=f-L),T=va,j.attr("cursor",Ea.selection),X(t));break;default:return}fa(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:P&&(x=b=P=!1,X(t));break;case 18:T===xa&&(w<0?d=g:w>0&&(s=u),A<0?p=v:A>0&&(c=f),T=ya,X(t));break;case 32:T===va&&(t.altKey?(w&&(d=g-I*w,s=u+I*w),A&&(p=v-L*A,c=f+L*A),T=xa):(w<0?d=g:w>0&&(s=u),A<0?p=v:A>0&&(c=f),T=ya),j.attr("cursor",Ea[_]),X(t));break;default:return}fa(t)}),!0),ni(n.view)}l.call(m),N.start(n,T.name)}function $(t){for(var e,n=da(t.changedTouches||[t]);!(e=n()).done;)for(var i,r=e.value,a=da(D);!(i=a()).done;){var o=i.value;o.identifier===r.identifier&&(o.cur=Vn(r,m))}if(P&&!x&&!b&&1===D.length){var s=D[0];ba(s.cur[0]-s[0])>ba(s.cur[1]-s[1])?b=!0:x=!0}for(var u,c=da(D);!(u=c()).done;){var l=u.value;l.cur&&(l[0]=l.cur[0],l[1]=l.cur[1])}y=!0,fa(t),X(t)}function X(t){var e,n=D[0],i=n.point0;switch(I=n[0]-i[0],L=n[1]-i[1],T){case va:case pa:w&&(I=ma(M-s,_a(R-d,I)),u=s+I,g=d+I),A&&(L=ma(O-c,_a(C-p,L)),f=c+L,v=p+L);break;case ya:D[1]?(w&&(u=ma(M,_a(R,D[0][0])),g=ma(M,_a(R,D[1][0])),w=1),A&&(f=ma(O,_a(C,D[0][1])),v=ma(O,_a(C,D[1][1])),A=1)):(w<0?(I=ma(M-s,_a(R-s,I)),u=s+I,g=d):w>0&&(I=ma(M-d,_a(R-d,I)),u=s,g=d+I),A<0?(L=ma(O-c,_a(C-c,L)),f=c+L,v=p):A>0&&(L=ma(O-p,_a(C-p,L)),f=c,v=p+L));break;case xa:w&&(u=ma(M,_a(R,s-I*w)),g=ma(M,_a(R,d+I*w))),A&&(f=ma(O,_a(C,c-L*A)),v=ma(O,_a(C,p+L*A)))}g2?i-2:0),a=2;a/g,">"):t}function oo(t,e,n,i){var r=this;if(void 0===n&&(n=[-1,1]),void 0===i&&(i=!1),t&&Ua(e))if(-1===e.indexOf("\n"))t.text(e);else{var o=[t.text(),e].map(function(t){return a(this,r),t.replace(/[\s\n]/g,"")}.bind(this));if(o[0]!==o[1]){var s=e.split("\n"),u=i?s.length-1:1;t.html(""),s.forEach(function(e,i){a(this,r),t.append("tspan").attr("x",0).attr("dy",(0===i?n[0]*u:n[1])+"em").text(e)}.bind(this))}}}function so(t){var e=t.getBBox(),n=e.x,i=e.y,r=e.width,a=e.height;return[{x:n,y:i+a},{x:n,y:i},{x:n+r,y:i},{x:n+r,y:i+a}]}function uo(t,e){var n,i=Vn(t&&(null==(n=t.touches||t.sourceEvent&&t.sourceEvent.touches)?void 0:n[0])||t,e),r=this;return i.map(function(t){return a(this,r),isNaN(t)?0:t}.bind(this))}function co(t){var e,n=t.event,i=t.$el,r=i.subchart.main||i.main;return n&&"brush"===n.type?e=n.selection:r&&(e=r.select(".bb-brush").node())&&(e=Na(e)),e}function lo(t){return!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+t.getAttribute("width")?t.rect=t.getBoundingClientRect():t.rect}function ho(t,e,n){void 0===t&&(t=!0),void 0===e&&(e=0),void 0===n&&(n=1e4);var i=In.crypto||In.msCrypto,r=i?e+i.getRandomValues(new Uint32Array(1))[0]%(n-e+1):Math.floor(Math.random()*(n-e)+e);return t?r+"":r}function fo(t,e,n,i,r){if(n>i)return-1;var a=Math.floor((n+i)/2),o=t[a],s=o.x,u=o.w,c=void 0===u?0:u;return r&&(s=t[a].y,c=t[a].h),e>=s&&e<=s+c?a:e1?n-1:0),r=1;re?-1:t{=TITLE}",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_padding:0,legend_position:"bottom",legend_show:!0,legend_usePoint:!1},ps={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},vs=void 0,ys={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){a(this,vs)}.bind(void 0),tooltip_onhide:function(){a(this,vs)}.bind(void 0),tooltip_onshown:function(){a(this,vs)}.bind(void 0),tooltip_onhidden:function(){a(this,vs)}.bind(void 0),tooltip_order:null};function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function bs(t){for(var e,n=1;n9999?"+"+$s(e,6):$s(e,4))+"-"+$s(t.getUTCMonth()+1,2)+"-"+$s(t.getUTCDate(),2)+(a?"T"+$s(n,2)+":"+$s(i,2)+":"+$s(r,2)+"."+$s(a,3)+"Z":r?"T"+$s(n,2)+":"+$s(i,2)+":"+$s(r,2)+"Z":i||n?"T"+$s(n,2)+":"+$s(i,2)+"Z":"")}function Us(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var i,r=[],a=t.length,o=0,s=0,u=a<=0,c=!1;function l(){if(u)return zs;if(c)return c=!1,Fs;var e,i,r=o;if(34===t.charCodeAt(r)){for(;o++=a?u=!0:10===(i=t.charCodeAt(o++))?c=!0:13===i&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(r+1,e-1).replace(/""/g,'"')}for(;o0){if(void 0===e[r-1]&&(e[r-1]={}),void 0===t)throw new Error("Source data is missing a component at ("+n+", "+r+")!");e[r-1][i]=t}}))})),e}function Ks(t){var e=t[0],n=[];return t.forEach((function(t,i){if(i>0){var r={};t.forEach((function(t,n){if(void 0===t)throw new Error("Source data is missing a component at ("+i+", "+n+")!");r[e[n]]=t})),n.push(r)}})),n}function Js(t,e){var n,i,r=[];if(Array.isArray(t)){n=e.x?e.value.concat(e.x):e.value,r.push(n),t.forEach((function(t){var e=n.map((function(e){var n=function(t,e){if(void 0!==t[e])return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=t;return n.some((function(t){return!(i=i&&t in i?i[t]:void 0)})),i}(t,e);return void 0===n&&(n=null),n}));r.push(e)})),i=Ks(r)}else Object.keys(t).forEach((function(e){var n=t[e].concat();null==n.unshift||n.unshift(e),r.push(n)})),i=Zs(r);return i}function Qs(t,e){var n,i=this,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach(function(t){a(this,i),n[0][t]=null}.bind(this))):n=t.parse(e),n}function tu(t){return Qs({rows:Gs,parse:Vs},t)}function eu(t){return Qs({rows:qs,parse:Ws},t)}function nu(t,e){var n=t||(null==e?void 0:e.data_keys);return null!=n&&n.x&&(e.data_x=n.x),n}var iu={convertData:function(t,e){var n=this,i=this.config,r=i.boost_useWorker,o=t;if(t.bindto&&(o={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(e){a(this,n);var i="data_"+e;i in t&&(o[e]=t[i])}.bind(this))),o.url&&e)!function(t,e,n,i,r){void 0===e&&(e="csv");var a=new XMLHttpRequest,o={csv:tu,tsv:eu,json:Js};a.open("GET",t),n&&Object.keys(n).forEach((function(t){a.setRequestHeader(t,n[t])})),a.onreadystatechange=function(){if(4===a.readyState){if(200!==a.status)throw new Error(t+": Something went wrong loading!");var n=a.responseText;n&&r.call(this,o[e]("json"===e?JSON.parse(n):n,i))}},a.send()}(o.url,o.mimeType,o.headers,nu(o.keys,i),e);else if(o.json)Ns(r,Js,e,[Zs,Ks])(o.json,nu(o.keys,i));else if(o.rows)Ns(r,Ks,e)(o.rows);else if(o.columns)Ns(r,Zs,e)(o.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets:function(t,e){var n=this,i=this,r=i.axis,o=i.config,s=i.state,u=o.data_type,c=!1,l=!1,h=!1;r&&(c=r.isCategorized(),l=r.isTimeSeries(),h=r.isCustomX());var f,d=Object.keys(t[0]||{}),g=d.length?d.filter(i.isNotX,i):[],p=d.length?d.filter(i.isX,i):[];g.forEach(function(r){var s=this;a(this,n);var u=this.getXKey(r);h||l?p.indexOf(u)>=0?f=(e&&i.data.xs[r]||[]).concat(t.map(function(t){return a(this,s),t[u]}.bind(this)).filter($a).map(function(t,e){return a(this,s),i.generateTargetX(t,r,e)}.bind(this))):o.data_x?f=this.getOtherTargetXs():Qa(o.data_xs)&&(f=i.getXValuesOfXKey(u,i.data.targets)):f=t.map(function(t,e){return a(this,s),e}.bind(this)),f&&(this.data.xs[r]=f)}.bind(this)),g.forEach(function(t){if(a(this,n),!this.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}.bind(this));var v=g.map(function(e,r){var u=this;a(this,n);var l=o.data_idConverter.bind(i.api)(e),f=i.getXKey(e),d=h&&c,g=d&&t.map(function(t){return a(this,u),t.x}.bind(this)).every(function(t){return a(this,u),o.axis_x_categories.indexOf(t)>-1}.bind(this)),p=t.__append__,v=null===f&&p?i.api.data.values(e).length:0;return{id:l,id_org:e,values:t.map(function(t,n){a(this,u);var c,h=t[f],y=t[e];return y=null===y||isNaN(y)||eo(y)?to(y)||eo(y)?y:null:+y,!d&&!s.hasRadar||0!==r||Va(h)?c=i.generateTargetX(h,e,v+n):(g||0!==r||0!==n||p||(o.axis_x_categories=[]),-1===(c=o.axis_x_categories.indexOf(h))&&(c=o.axis_x_categories.length,o.axis_x_categories.push(h))),(Va(y)||i.data.xs[e].length<=n)&&(c=void 0),{x:c,value:y,id:l,index:-1}}.bind(this)).filter(function(t){return a(this,u),Ga(t.x)}.bind(this))}}.bind(this));if(v.forEach(function(t){var e,r=this;a(this,n),o.data_xSort&&(t.values=t.values.sort(function(t,e){return a(this,r),(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}.bind(this))),t.values.forEach(function(t,e){return a(this,r),t.index=e}.bind(this)),null==(e=i.data.xs[t.id])||e.sort(function(t,e){return a(this,r),t-e}.bind(this))}.bind(this)),s.hasNegativeValue=i.hasNegativeValueInTargets(v),s.hasPositiveValue=i.hasPositiveValueInTargets(v),u&&i.isValidChartType(u)){var y=i.mapToIds(v).filter(function(t){return a(this,n),!(t in o.data_types)||!i.isValidChartType(o.data_types[t])}.bind(this));i.setTargetType(y,u)}return v.forEach(function(t){return a(this,n),i.cache.add(t.id_org,t,!0)}.bind(this)),v}},ru={isX:function(t){var e=this.config,n=e.data_x&&t===e.data_x,i=Qa(e.data_xs)&&function(t,e){var n=this,i=!1;return Object.keys(t).forEach(function(r){return a(this,n),t[r]===e&&(i=!0)}.bind(this)),i}(e.data_xs,t);return n||i},isNotX:function(t){return!this.isX(t)},isStackNormalized:function(){var t=this.config;return!(!t.data_stack_normalize||!t.data_groups.length)},isGrouped:function(t){var e=this,n=this.config.data_groups;return t?n.some(function(n){return a(this,e),n.indexOf(t)>=0&&n.length>1}.bind(this)):n.length>0},getXKey:function(t){var e=this.config;return e.data_x?e.data_x:Qa(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function(t,e){var n,i=this,r=this;return(e&&Qa(e)?r.mapToIds(e):[]).forEach(function(e){a(this,i),r.getXKey(e)===t&&(n=r.data.xs[e])}.bind(this)),n},getIndexByX:function(t,e){return e?e.indexOf(Ua(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&$a(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function(t){var e=this.getOtherTargetXs();return e&&t1?e=To(bo(e=e.map(function(e){return a(this,t),e.values}.bind(this)).reduce(function(e,n){return a(this,t),e.concat(n)}.bind(this)).map(function(e){return a(this,t),e.x}.bind(this)))).map(function(e,n,r){return a(this,t),{x:e,index:i?r.length-n-1:n}}.bind(this)):n&&(e=e[0].values.concat()),e},mapToIds:function(t){var e=this;return t.map(function(t){return a(this,e),t.id}.bind(this))},mapToTargetIds:function(t){return t?to(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function(t,e){for(var n,i=this.mapToIds(t),r=0;n=i[r];r++)if(n===e)return!0;return!1},isTargetToShow:function(t){return this.state.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function(t){return this.state.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function(t){var e=this,n=this;return(t||n.data.targets).filter(function(t){return a(this,e),n.isTargetToShow(t.id)}.bind(this))},mapTargetsToUniqueXs:function(t){var e=this,n=this.axis,i=[];return null!=t&&t.length&&(i=bo(mo(t.map(function(t){var n=this;return a(this,e),t.values.map(function(t){return a(this,n),+t.x}.bind(this))}.bind(this)))),i=null!=n&&n.isTimeSeries()?i.map(function(t){return a(this,e),new Date(+t)}.bind(this)):i.map(Number)),To(i)},addTargetIds:function(t,e){var n=this,i=this.state;(to(e)?e:[e]).forEach(function(e){a(this,n),i[t].indexOf(e)<0&&i[t].push(e)}.bind(this))},removeTargetIds:function(t,e){var n=this,i=this.state;(to(e)?e:[e]).forEach(function(e){a(this,n);var r=i[t].indexOf(e);r>=0&&i[t].splice(r,1)}.bind(this))},addHiddenTargetIds:function(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds:function(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds:function(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds:function(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed:function(t){var e=this,n=this,i=n.state.hasAxis,r={},o=n.isMultipleX(),s=o?n.mapTargetsToUniqueXs(t).map(function(t){return a(this,e),Ua(t)?t:+t}.bind(this)):null;return t.forEach(function(t){var u=this;a(this,e);var c=[];t.values.filter(function(t){var e=t.value;return a(this,u),$a(e)||null===e}.bind(this)).forEach(function(t){a(this,u);var e=t.value;null!==e&&n.isCandlestickType(t)&&(e=to(e)?e.slice(0,4):[e.open,e.high,e.low,e.close]),to(e)?c.push.apply(c,e):eo(e)&&"high"in e?c.push.apply(c,Object.values(e)):n.isBubbleZType(t)?c.push(i&&n.getBubbleZData(e,"y")):o?c[n.getIndexByX(t.x,s)]=e:c.push(e)}.bind(this)),r[t.id]=c}.bind(this)),r},checkValueInTargets:function(t,e){for(var n,i=Object.keys(t),r=0;r1},hasNegativeValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return a(this,e),t<0}.bind(this))},hasPositiveValueInTargets:function(t){var e=this;return this.checkValueInTargets(t,function(t){return a(this,e),t>0}.bind(this))},orderTargets:function(t){var e=[].concat(t),n=this.getSortCompareFn();return n&&e.sort(n),e},getSortCompareFn:function(t){var e=this;void 0===t&&(t=!1);var n,i=this.config.data_order,r=/asc/i.test(i),o=/desc/i.test(i);if(r||o){var s=function(t,n){return a(this,e),t+Math.abs(n.value)}.bind(this);n=function(n,i){a(this,e);var o="values"in n?n.values.reduce(s,0):n.value,u="values"in i?i.values.reduce(s,0):i.value;return t?r?o-u:u-o:r?u-o:o-u}.bind(this)}else Xa(i)&&(n=i.bind(this.api));return n||null},filterByX:function(t,e){var n=this;return mo(t.map(function(t){return a(this,n),t.values}.bind(this))).filter(function(t){return a(this,n),t.x-e==0}.bind(this))},filterRemoveNull:function(t){var e=this;return t.filter(function(t){return a(this,e),$a(this.getBaseValue(t))}.bind(this))},filterByXDomain:function(t,e){var n=this;return t.map(function(t){var i=this;return a(this,n),{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return a(this,i),e[0]<=t.x&&t.x<=e[1]}.bind(this))}}.bind(this))},hasDataLabel:function(){var t=this.config.data_labels;return Ha(t)&&t||Ka(t)&&Qa(t)},getDataIndexFromEvent:function(t){var e,n=this.config,i=this.state,r=i.hasRadar,a=i.inputType,o=i.eventReceiver,s=o.coords,u=o.rect;if(r){var c=t.target;/tspan/i.test(c.tagName)&&(c=c.parentNode);var l=Rn(c).datum();e=l&&1===Object.keys(l).length?l.index:void 0}else{var h=n.axis_rotated,f="touch"===a&&t.changedTouches?t.changedTouches[0]:t;e=fo(s,h?f.clientY-u.top:f.clientX-u.left,0,s.length-1,h)}return e},getDataLabelLength:function(t,e,n){var i=this,r=this,o=[0,0];return r.$el.chart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return a(this,i),r.dataLabelFormat(t.id)(t)}.bind(this)).each((function(t,e){o[e]=1.3*this.getBoundingClientRect()[n]})).remove(),o},isNoneArc:function(t){return this.hasTarget(this.data.targets,t.id)},isArc:function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function(t,e){var n,i=t[e].x,r=[];for(n=e-1;n>=0&&i===t[n].x;n--)r.push(t[n]);for(n=e;n=0&&i?i[r]:void 0}return i?i[e]:i},setRatioForGroupedData:function(t){var e=this,n=this;if(n.config.data_groups.length&&t.some(function(t){return a(this,e),n.isGrouped(t.id)}.bind(this))){var i=function(t){return a(this,e),n.getRatio("index",t,!0)}.bind(this);t.forEach(function(t){a(this,e),"values"in t?t.values.forEach(i):i(t)}.bind(this))}},getRatio:function(t,e,n){var i=this;void 0===n&&(n=!1);var r=this,o=r.config,s=r.state,u=r.api,c=0;if(e&&u.data.shown().length)if(c=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()())c=e.value/r.getTotalDataSum(!0);else{var l=o.gauge_fullCircle?r.getArcLength():-2*r.getGaugeStartAngle(),h=r.hasType("gauge")?l:2*Math.PI;c=(e.endAngle-e.startAngle)/h}else if("index"===t){var f=u.data.values.bind(u),d=this.getTotalPerIndex();if(s.hiddenTargetIds.length){var g=f(s.hiddenTargetIds,!1);g.length&&(g=g.reduce(function(t,e){var n=this;return a(this,i),t.map(function(t,i){return a(this,n),(Ya(t)?t:0)+e[i]}.bind(this))}.bind(this)),d=d.map(function(t,e){return a(this,i),t-g[e]}.bind(this)))}var p=d[e.index];e.ratio=Ya(e.value)&&d&&p?e.value/p:0,c=e.ratio}else if("radar"===t)c=parseFloat(Math.max(e.value,0)+"")/s.current.dataMax*o.radar_size_ratio;else if("bar"===t){var v=r.getYScaleById.bind(r)(e.id).domain().reduce(function(t,e){return a(this,i),e-t}.bind(this));c=0===v?0:Math.abs(e.value)/v}else"treemap"===t&&(c/=r.getTotalDataSum(!0));return n&&c?100*c:c},updateDataIndexByX:function(t){var e=this,n=t.reduce(function(t,n,i){return a(this,e),t[+n.x]=i,t}.bind(this),{});this.data.targets.forEach(function(t){var i=this;a(this,e),t.values.forEach(function(t,e){a(this,i);var r=n[+t.x];void 0===r&&(r=e),t.index=r}.bind(this))}.bind(this))},isBubbleZType:function(t){return this.isBubbleType(t)&&(eo(t.value)&&("z"in t.value||"y"in t.value)||to(t.value)&&t.value.length>=2)},isBarRangeType:function(t){var e=this,n=t.value;return this.isBarType(t)&&to(n)&&n.length>=2&&n.every(function(t){return a(this,e),Ya(t)}.bind(this))},getDataById:function(t){var e,n=this.cache.get(t)||this.api.data(t);return null!=(e=null==n?void 0:n[0])?e:n}};function au(t,e){void 0===e&&(e=!1);var n=this.api;e&&this.api.flush(!0),null==t||t.call(n)}var ou={load:function(t,e){var n=this,i=this,r=i.data,o=e.append,s=t;s&&(e.filter&&(s=s.filter(e.filter)),(e.type||e.types)&&s.forEach(function(t){var r;a(this,n);var o=(null==(r=e.types)?void 0:r[t.id])||e.type;i.setTargetType(t.id,o)}.bind(this)),r.targets.forEach(function(t){a(this,n);for(var e=0;eh}u.mouse("drag",i)}function p(t){Rn(t.view).on("mousemove.drag mouseup.drag",null),ii(t.view,n),ei(t),u.mouse("end",t)}function v(t,e){if(r.call(this,t,e)){var n,i,o=t.changedTouches,s=a.call(this,t,e),u=o.length;for(n=0;n=0?as.focused:"")},classDefocused:function(t){return" "+(this.state.defocusedTargetIds.indexOf(t.id)>=0?as.defocused:"")},getTargetSelectorSuffix:function(t){return(t||0===t?"-"+t:"").replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g,"-")},selectorTarget:function(t,e,n){void 0===e&&(e=""),void 0===n&&(n="");var i=this.getTargetSelectorSuffix(t);return e+"."+(as.target+i)+" "+n+", "+e+"."+(as.circles+i)+" "+n},selectorTargets:function(t,e){var n=this,i=t||[];return i.length?i.map(function(t){return a(this,n),this.selectorTarget(t,e)}.bind(this)):null},selectorLegend:function(t){return"."+(as.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function(t){var e=this;return null!=t&&t.length?t.map(function(t){return a(this,e),this.selectorLegend(t)}.bind(this)):null}};function vu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yu(t,e){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yu(t,e)}function xu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,yu(t,e)}function bu(t){return bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bu(t)}function mu(t,e,n){return mu=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}()?Reflect.construct.bind():function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&yu(r,n.prototype),r},mu.apply(null,arguments)}function _u(t){var e="function"==typeof Map?new Map:void 0;return _u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return mu(t,arguments,bu(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),yu(i,t)},_u(t)}function Tu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return wu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Cu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n-1&&(r=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return a(this,e),t.trim().replace(/[\"'\s]/g,"")}.bind(this)).filter(Boolean),i[n]=r)}return r}(n.chart)||Du).range(),c=u;if(Xa(i.color_tiles)){var l=i.color_tiles.bind(e.api)(),h=u.map(function(n,i){a(this,t);var r=n.replace(/[#\(\)\s,]/g,""),o=e.state.datetimeId+"-pattern-"+r+"-"+i;return Pu(l[i%l.length],n,o)}.bind(this));u=h.map(function(e){return a(this,t),"url(#"+e.id+")"}.bind(this)),e.patterns=h}return function(t){var n,a,l=t.id||(null==(n=t.data)?void 0:n.id)||t,h=e.isTypeOf(l,["line","spline","step"])||!i.data_types[l];return Xa(r[l])?a=r[l].bind(e.api)(t):r[l]?a=r[l]:(s.indexOf(l)<0&&s.push(l),a=h?c[s.indexOf(l)%c.length]:u[s.indexOf(l)%u.length],r[l]=a),Xa(o)?o.bind(e.api)(a,t):a}},generateLevelColor:function(){var t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,a=n.values&&n.values.length?n.values:[];return Qa(n)?function(t){for(var n=i?t:100*t/r,o=e[e.length-1],s=0,u=a.length;s')}.bind(this))}},getGradienColortUrl:function(t){return"url(#"+this.state.datetimeId+"-gradient"+this.getTargetSelectorSuffix(t)+")"},updateLinearGradient:function(){var t=this,e=this,n=e.config,i=e.data.targets,r=e.state.datetimeId,o=e.$el.defs;i.forEach(function(i){var s=this;a(this,t);var u=r+"-gradient"+e.getTargetSelectorSuffix(i.id),c=e.isAreaType(i)?"area":e.isBarType(i)&&"bar",l=n.axis_rotated;if(c&&o.select("#"+u).empty()){var h=e.color(i),f=n[c+"_linearGradient"],d=f.x,g=void 0===d?l?[1,0]:[0,0]:d,p=f.y,v=void 0===p?l?[0,0]:[0,1]:p,y=f.stops,x=void 0===y?[[0,h,1],[1,h,0]]:y,b=o.append("linearGradient").attr("id",""+u).attr("x1",g[0]).attr("x2",g[1]).attr("y1",v[0]).attr("y2",v[1]);x.forEach(function(t){a(this,s);var n=Xa(t[1])?t[1].bind(e.api)(i.id):t[1];b.append("stop").attr("offset",t[0]).attr("stop-color",n||h).attr("stop-opacity",t[2])}.bind(this))}}.bind(this))},setOverColor:function(t,e){var n=this,i=this,r=i.config,o=i.$el.main,s=r.color_onover,u=t?s:i.color;eo(u)?u=function(t){var e=t.id;return a(this,n),e in s?s[e]:i.color(e)}.bind(this):Ua(u)?u=function(){return a(this,n),s}.bind(this):Xa(s)&&(u=u.bind(i.api)),o.selectAll(eo(e)?"."+Po.arc+i.getTargetSelectorSuffix(e.id):"."+Qo.shape+"-"+e).style("fill",u)}},Fu={getYDomainMinMax:function(t,e){var n=this,i=this,r=i.axis,o=i.config,s="min"===e,u=o.data_groups,c=i.mapToIds(t),l=i.getValuesAsIdKeyed(t);if(u.length>0){var h=i["has"+(s?"Negative":"Positive")+"ValueInTargets"](t);u.forEach(function(t){var e=this;a(this,n);var i=t.filter(function(t){return a(this,e),c.indexOf(t)>=0}.bind(this));if(i.length){var o=i[0],u=r.getId(o);h&&l[o]&&(l[o]=l[o].map(function(t){return a(this,e),(s?t<0:t>0)?t:0}.bind(this))),i.filter(function(t,n){return a(this,e),n>0}.bind(this)).forEach(function(t){var n=this;if(a(this,e),l[t]){var i=r.getId(t);l[t].forEach(function(t,e){a(this,n);var r=+t;i!==u||h&&(s?r>0:r<0)||(l[o][e]+=r)}.bind(this))}}.bind(this))}}.bind(this))}return wo(e,Object.keys(l).map(function(t){return a(this,n),wo(e,l[t])}.bind(this)))},isHiddenTargetWithYDomain:function(t){var e=this,n=this;return n.state.hiddenTargetIds.some(function(i){return a(this,e),n.axis.getId(i)===t}.bind(this))},getYDomain:function(t,e,n){var i=this,r=this,o=r.axis,s=r.config,u=r.scale,c="axis_"+e;if(r.isStackNormalized())return[0,100];var l=(null==u?void 0:u[e])&&"log"===u[e].type,h=t.filter(function(t){return a(this,i),o.getId(t.id)===e}.bind(this)),f=n?r.filterByXDomain(h,n):h;if(0===f.length)return r.isHiddenTargetWithYDomain(e)?u[e].domain():"y2"===e?u.y.domain():r.getYDomain(t,"y2",n);var d=s[c+"_min"],g=s[c+"_max"],p=s[c+"_center"],v=s[c+"_inverted"],y=r.hasDataLabel()&&s.axis_rotated,x=r.hasDataLabel()&&!s.axis_rotated,b=r.getYDomainMinMax(f,"min"),m=r.getYDomainMinMax(f,"max"),_=[jn.BAR,jn.BUBBLE,jn.SCATTER].concat($n.Line).some(function(t){a(this,i);var e=t.indexOf("area")>-1?"area":t;return r.hasType(t,f,!0)&&s[e+"_zerobased"]}.bind(this));b=$a(d)?d:$a(g)?b<=g?b:g-10:b,m=$a(g)?g:$a(d)?d<=m?m:d+10:m,isNaN(b)&&(b=0),isNaN(m)&&(m=b),b===m&&(b<0?m=0:b=0);var T=b>=0&&m>=0,w=b<=0&&m<=0;($a(d)&&T||$a(g)&&w)&&(_=!1),_&&(T&&(b=0),w&&(m=0));var A=Math.abs(m-b),S={top:.1*A,bottom:.1*A};if(Ga(p)){var E=Math.max(Math.abs(b),Math.abs(m));m=p+E,b=p-E}if(y){var k=Za(u.y.range()),M=r.getDataLabelLength(b,m,"width").map(function(t){return a(this,i),t/k}.bind(this));["bottom","top"].forEach(function(t,e){a(this,i),S[t]+=A*(M[e]/(1-M[0]-M[1]))}.bind(this))}else if(x){var O=r.getDataLabelLength(b,m,"height");["bottom","top"].forEach(function(t,e){a(this,i),S[t]+=r.convertPixelToScale("y",O[e],A)}.bind(this))}S=r.getResettedPadding(S);var R=s[c+"_padding"];Qa(R)&&["bottom","top"].forEach(function(t){a(this,i),S[t]=o.getPadding(R,t,S[t],A)}.bind(this)),_&&(T&&(S.bottom=b),w&&(S.top=-m));var C=l?[b,m].map(function(t){return a(this,i),t<0?0:t}.bind(this)):[b-S.bottom,m+S.top];return v?C.reverse():C},getXDomainMinMax:function(t,e){var n,i=this,r=this.config["axis_x_"+e],o=wo(e,t.map(function(t){var n=this;return a(this,i),wo(e,t.values.map(function(t){return a(this,n),t.x}.bind(this)))}.bind(this))),s=eo(r)?r.value:r;return s=Ga(s)&&null!=(n=this.axis)&&n.isTimeSeries()?ko.bind(this)(s):s,eo(r)&&r.fit&&("min"===e&&so)&&(s=void 0),Ga(s)?s:o},getXDomainPadding:function(t,e){var n,i=this,r=i.axis,a=i.config.axis_x_padding,o=r.isTimeSeries()&&e,s=Za(t);if(r.isCategorized()||o)n=0;else if(i.hasType("bar")){var u=i.getMaxDataCount();n=u>1?s/(u-1)/2:.5}else n=i.getResettedPadding(.01*s);var c=Ya(a)?{left:a,right:a}:a,l=c.left,h=void 0===l?n:l,f=c.right,d=void 0===f?n:f;if("px"===a.unit){var g=Math.abs(s+.2*s);h=r.getPadding(a,"left",n,g),d=r.getPadding(a,"right",n,g)}else{var p=s+h+d;if(o&&p){var v=s/e/p;h=h/p/v,d=d/p/v}}return{left:h,right:d}},getXDomain:function(t){var e=this,n=e.axis,i=e.config,r=e.scale.x,a=i.axis_x_inverted,o=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")],s=o[0],u=void 0===s?0:s,c=o[1],l=void 0===c?0:c;if("log"!==r.type){var h=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(o),g=o[0],p=o[1];g-p!=0||h||(f?(g=new Date(.5*g.getTime()),p=new Date(1.5*p.getTime())):(g=0===g?1:.5*g,p=0===p?-1:1.5*p)),(g||0===g)&&(u=f?new Date(g.getTime()-d.left):g-d.left),(p||0===p)&&(l=f?new Date(p.getTime()+d.right):p+d.right)}return a?[l,u]:[u,l]},updateXDomain:function(t,e,n,i,r){var a,o=this,s=o.config,u=o.org,c=o.scale,l=c.x,h=c.subX,f=s.zoom_enabled;n&&(l.domain(r||To(o.getXDomain(t),!s.axis_x_inverted)),u.xDomain=l.domain(),f&&o.zoom.updateScaleExtent(),h.domain(l.domain()),null==(a=o.brush)||a.scale(h));if(e){var d=r||!o.brush||go(o)?u.xDomain:co(o).map(h.invert);l.domain(d),f&&o.zoom.updateScaleExtent()}return i&&l.domain(o.trimXDomain(l.orgDomain())),l.domain()},trimXDomain:function(t){var e=this.config.axis_x_inverted,n=this.getZoomDomain(),i=n[0],r=n[1];return(e?t[0]>=i:t[0]<=i)&&(t[0]=i,t[1]=+t[1]+(i-t[0])),(e?t[1]<=r:t[1]>=r)&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},getZoomDomain:function(){var t=this.config,e=this.org.xDomain,n=e[0],i=e[1];return Ga(t.zoom_x_min)&&(n=wo("min",[n,t.zoom_x_min])),Ga(t.zoom_x_max)&&(i=wo("max",[i,t.zoom_x_max])),[n,i]},convertPixelToScale:function(t,e,n){var i=this.config,r=this.state,a=i.axis_rotated;return n*(e/r["x"===t?a?"height":"width":a?"width":"height"])}};function zu(t,e,n){var i=t.config,r="axis_"+e+"_tick_format";return(i[r]?i[r]:t.defaultValueFormat).call(t.api,n)}var ju={yFormat:function(t){return zu(this,"y",t)},y2Format:function(t){return zu(this,"y2",t)},getDefaultValueFormat:function(){var t=this,e=t.defaultArcValueFormat,n=t.yFormat,i=t.y2Format,r=t.hasArcType(null,["gauge","polar","radar"]);return function(a,o,s){return(r?e:t.axis&&"y2"===t.axis.getId(s)?i:n).call(t,a,o)}},defaultValueFormat:function(t){return $a(t)?+t:""},defaultArcValueFormat:function(t,e){return(100*e).toFixed(1)+"%"},defaultPolarValueFormat:function(t){return""+t},dataLabelFormat:function(t){var e=this,n=this.config.data_labels,i=function(t){return a(this,e),$a(t)?+t:""}.bind(this),r=i;return Xa(n.format)?r=n.format:Ka(n.format)&&(r=n.format[t]?!0===n.format[t]?i:n.format[t]:function(){return a(this,e),""}.bind(this)),r.bind(this.api)}};function Bu(t){var e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}var $u={initLegend:function(){var t=this,e=t.config,n=t.$el;t.legendItemTextBox={},t.state.legendHasRendered=!1,e.legend_show?(e.legend_contents_bindto||(n.legend=t.$el.svg.append("g").classed(Uo.legend,!0).attr("transform",t.getTranslate("legend"))),t.updateLegend()):t.state.hiddenLegendIds=t.mapToIds(t.data.targets)},updateLegend:function(t,e,n){var i,r=this,a=r.config,o=r.state,s=r.scale,u=r.$el,c=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};c.withTransition=no(c,"withTransition",!0),c.withTransitionForTransform=no(c,"withTransitionForTransform",!0),a.legend_contents_bindto&&a.legend_contents_template?r.updateLegendTemplate():o.hasTreemap||r.updateLegendElement(t||r.mapToIds(r.data.targets),c,n),null==(i=u.legend)||i.selectAll("."+Uo.legendItem).classed(Uo.legendItemHidden,(function(t){var e=!r.isTargetToShow(t);return e&&(this.style.opacity=null),e})),r.updateScales(!1,!s.zoom),r.updateSvgSize(),r.transformAll(c.withTransitionForTransform,n),o.legendHasRendered=!0},updateLegendTemplate:function(){var t=this,e=this,n=e.config,i=e.$el,r=Rn(n.legend_contents_bindto),o=n.legend_contents_template;if(!r.empty()){var s=e.mapToIds(e.data.targets),u=[],c="";s.forEach(function(n){a(this,t);var i=Xa(o)?o.bind(e.api)(n,e.color(n),e.api.data(n)[0].values):Eo(o,{COLOR:e.color(n),TITLE:n});i&&(u.push(n),c+=i)}.bind(this));var l=r.html(c).selectAll((function(){return this.childNodes})).data(u);e.setLegendItem(l),i.legend=r}},updateSizeForLegend:function(t){var e=this,n=e.config,i=e.state,r=i.isLegendTop,a=i.isLegendLeft,o=i.isLegendRight,s=i.isLegendInset,u=i.current,c=t.width,l=t.height,h={top:r?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:u.height-l-e.getCurrentPaddingBottom()-n.legend_inset_y,left:a?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:u.width-c-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?h.top:u.height-l,right:NaN,bottom:0,left:o?u.width-c:s?h.left:0}},transformLegend:function(t){var e=this,n=e.$el.legend;(0,e.$T)(n,t).attr("transform",e.getTranslate("legend"))},updateLegendStep:function(t){this.state.legendStep=t},updateLegendItemWidth:function(t){this.state.legendItemWidth=t},updateLegendItemHeight:function(t){this.state.legendItemHeight=t},updateLegendItemColor:function(t,e){var n=this.$el.legend;n&&n.select("."+Uo.legendItem+"-"+t+" line").style("stroke",e)},getLegendWidth:function(){var t=this.state,e=t.current.width,n=t.isLegendRight,i=t.isLegendInset,r=t.legendItemWidth,a=t.legendStep;return this.config.legend_show?n||i?r*(a+1):e:0},getLegendHeight:function(){var t,e=this,n=e.state,i=n.current,r=n.isLegendRight,a=n.legendItemHeight,o=n.legendStep,s="fit"===(null==(t=e.config.padding)?void 0:t.mode);return e.config.legend_show?r?i.height:(s?10:Math.max(20,a))*(o+1):0},opacityForUnfocusedLegend:function(t){return t.classed(Uo.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(t,e){var n=this,i=this,r=i.$el.legend,o=i.$T,s=i.mapToTargetIds(t);r&&o(r.selectAll("."+Uo.legendItem).filter(function(t){return a(this,n),s.indexOf(t)>=0}.bind(this)).classed(Go.legendItemFocused,e)).style("opacity",(function(){return e?null:i.opacityForUnfocusedLegend.call(i,Rn(this))}))},revertLegend:function(){var t=this.$el.legend,e=this.$T;t&&e(t.selectAll("."+Uo.legendItem).classed(Go.legendItemFocused,!1)).style("opacity",null)},showLegend:function(t){var e=this,n=e.config,i=e.$el,r=e.$T;n.legend_show||(n.legend_show=!0,i.legend?i.legend.style("visibility",null):e.initLegend(),e.state.legendHasRendered||e.updateLegend()),e.removeHiddenLegendIds(t),r(i.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend:function(t){var e=this,n=e.config,i=e.$el.legend;n.legend_show&&Ja(t)&&(n.legend_show=!1,i.style("visibility","hidden")),e.addHiddenLegendIds(t),i.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox:function(t,e){var n,i=this,r=i.cache,a=i.state,o=Es;return t&&((n=!a.redrawing&&r.get(o)||{})[t]||(n[t]=i.getTextRect(e,Uo.legendItem),r.add(o,n)),n=n[t]),n},setLegendItem:function(t){var e=this,n=this,i=n.$el,r=n.api,o=n.config,s=n.state,u="touch"===s.inputType,c=n.hasType("gauge"),l=o.boost_useCssRule,h=o.legend_item_interaction;t.attr("class",(function(t){var e=Rn(this);return(!e.empty()&&e.attr("class")||"")+n.generateClass(Uo.legendItem,t)})).style("visibility",function(t){return a(this,e),n.isLegendToShow(t)?null:"hidden"}.bind(this)),o.interaction_enabled&&(l&&[["."+Uo.legendItem,"cursor:pointer"],["."+Uo.legendItem+" text","pointer-events:none"],["."+Uo.legendItemPoint+" text","pointer-events:none"],["."+Uo.legendItemTile,"pointer-events:none"],["."+Uo.legendItemEvent,"fill-opacity:0"]].forEach(function(t){a(this,e);var r=t[0],o=t[1];n.setCssRule(!1,r,[o])(i.legend)}.bind(this)),t.on(h.dblclick?"dblclick":"click",h||Xa(o.legend_item_onclick)?function(t,e){if(!io(o.legend_item_onclick,r,e)){var i=t.altKey,a=t.target;"dblclick"===t.type||i?s.hiddenTargetIds.length&&-1===a.parentNode.getAttribute("class").indexOf(Uo.legendItemHidden)?r.show():(r.hide(),r.show(e)):(r.toggle(e),Rn(this).classed(Go.legendItemFocused,!1))}u&&n.hideTooltip()}:null),u||t.on("mouseout",h||Xa(o.legend_item_onout)?function(t,e){io(o.legend_item_onout,r,e)||(Rn(this).classed(Go.legendItemFocused,!1),c&&n.undoMarkOverlapped(n,"."+Xo.gaugeValue),n.api.revert())}:null).on("mouseover",h||Xa(o.legend_item_onover)?function(t,e){io(o.legend_item_onover,r,e)||(Rn(this).classed(Go.legendItemFocused,!0),c&&n.markOverlapped(e,n,"."+Xo.gaugeValue),!s.transiting&&n.isTargetToShow(e)&&r.focus(e))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",n.getStylePropValue("pointer")))},updateLegendElement:function(t,e){var n,i,r,o=this,s=this,u=s.config,c=s.state,l=s.$el.legend,h=s.$T,f="circle"!==u.legend_item_tile_type,d=u.legend_item_tile_r,g={width:f?u.legend_item_tile_width:2*d,height:f?u.legend_item_tile_height:2*d},p={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:g.width+5,totalLength:0},v={offsets:{},widths:{},heights:{},margins:[0],steps:{}},y=t.filter(function(t){return a(this,o),!Ga(u.data_names[t])||null!==u.data_names[t]}.bind(this)),x=e.withTransition,b=s.getUpdateLegendPositions(y,p,v);c.isLegendInset&&(p.step=u.legend_inset_step?u.legend_inset_step:y.length,s.updateLegendStep(p.step)),c.isLegendRight?(n=function(t){return a(this,o),p.max.width*v.steps[t]}.bind(this),i=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):c.isLegendInset?(n=function(t){return a(this,o),p.max.width*v.steps[t]+10}.bind(this),i=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this)):(n=function(t){return a(this,o),v.margins[v.steps[t]]+v.offsets[t]}.bind(this),i=function(t){return a(this,o),p.max.height*v.steps[t]}.bind(this));var m={xText:function(t,e){return a(this,o),n(t,e)+4+g.width}.bind(this),xRect:function(t,e){return a(this,o),n(t,e)}.bind(this),x1Tile:function(t,e){return a(this,o),n(t,e)-2}.bind(this),x2Tile:function(t,e){return a(this,o),n(t,e)-2+g.width}.bind(this),yText:function(t,e){return a(this,o),i(t,e)+9}.bind(this),yRect:function(t,e){return a(this,o),i(t,e)-5}.bind(this),yTile:function(t,e){return a(this,o),i(t,e)+4}.bind(this)};s.generateLegendItem(y,g,b,m),r=l.select("."+Uo.legendBackground+" rect"),c.isLegendInset&&p.max.width>0&&0===r.size()&&(r=l.insert("g","."+Uo.legendItem).attr("class",Uo.legendBackground).append("rect"));var _=l.selectAll("text").data(y).text(function(t){return a(this,o),Ga(u.data_names[t])?u.data_names[t]:t}.bind(this)).each((function(t,e){b(this,t,e)}));h(_,x).attr("x",m.xText).attr("y",m.yText),h(l.selectAll("rect."+Uo.legendItemEvent).data(y),x).attr("width",function(t){return a(this,o),v.widths[t]}.bind(this)).attr("height",function(t){return a(this,o),v.heights[t]}.bind(this)).attr("x",m.xRect).attr("y",m.yRect),s.updateLegendItemPos(y,x,m),r&&h(r,x).attr("height",s.getLegendHeight()-12).attr("width",p.max.width*(p.step+1)+10),s.updateLegendItemWidth(p.max.width),s.updateLegendItemHeight(p.max.height),s.updateLegendStep(p.step)},getUpdateLegendPositions:function(t,e,n){var i=this,r=i.config,o=i.state,s=o.isLegendRight||o.isLegendInset;return function(u,c,l){var h,f=this,d=l===t.length-1,g=i.getLegendItemTextBox(c,u),p=g.width+e.tileWidth+(d&&!s?0:e.padding.right)+r.legend_padding,v=g.height+e.padding.top,y=s?v:p,x=s?i.getLegendHeight():i.getLegendWidth(),b=function(t,i){i||(h=(x-e.totalLength-y)/2)=e.max.width)&&(e.max.width=p),(!e.max.height||v>=e.max.height)&&(e.max.height=v);var m=s?e.max.height:e.max.width;r.legend_equally?(Object.keys(n.widths).forEach(function(t){return a(this,f),n.widths[t]=e.max.width}.bind(this)),Object.keys(n.heights).forEach(function(t){return a(this,f),n.heights[t]=e.max.height}.bind(this)),(h=(x-m*t.length)/2)=Uu?10:u>=Yu?5:u>=Vu?2:1;return s<0?(a=Math.pow(10,-s)/c,(i=Math.round(t*a))/ae&&--r,a=-a):(a=Math.pow(10,s)*c,(i=Math.round(t/a))*ae&&--r),r0))return[];if((t=+t)===(e=+e))return[t];var i=e=a))return[];var u=o-a+1,c=Array(u);if(i)if(s<0)for(var l=0;le?1:t>=e?0:NaN}function Ku(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Ju(t){var e,n,i,r=this;function o(t,i,r,a){if(void 0===r&&(r=0),void 0===a&&(a=t.length),r>>1;n(t[o],i)<0?r=o+1:a=o}while(rn&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,r,a){if(void 0===r&&(r=0),void 0===a&&(a=t.length),r>>1;n(t[o],i)<=0?r=o+1:a=o}while(re&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=u>2?cc:uc,r=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(r||(r=i(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=i(s,o.map(t),Gi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,rc),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),u=ic,l()},h.clamp=function(t){return arguments.length?(c=!!t||oc,l()):c!==oc},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,l()}}function fc(){return hc()(oc,oc)}var dc,gc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pc(t){if(!(e=gc.exec(t)))throw new Error("invalid format: "+t);var e;return new vc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function vc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function yc(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function xc(t){return(t=yc(Math.abs(t)))?t[1]:NaN}function bc(t,e){var n=yc(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+Array(r-i.length+2).join("0")}pc.prototype=vc.prototype,vc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var mc=void 0,_c={"%":function(t,e){return a(this,mc),(100*t).toFixed(e)}.bind(void 0),b:function(t){return a(this,mc),Math.round(t).toString(2)}.bind(void 0),c:function(t){return a(this,mc),t+""}.bind(void 0),d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return a(this,mc),t.toExponential(e)}.bind(void 0),f:function(t,e){return a(this,mc),t.toFixed(e)}.bind(void 0),g:function(t,e){return a(this,mc),t.toPrecision(e)}.bind(void 0),o:function(t){return a(this,mc),Math.round(t).toString(8)}.bind(void 0),p:function(t,e){return a(this,mc),bc(100*t,e)}.bind(void 0),r:bc,s:function(t,e){var n=yc(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(dc=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+Array(1-a).join("0")+yc(t,Math.max(0,e+a-1))[0]},X:function(t){return a(this,mc),Math.round(t).toString(16).toUpperCase()}.bind(void 0),x:function(t){return a(this,mc),Math.round(t).toString(16)}.bind(void 0)};function Tc(t){return t}var wc,Ac,Sc,Ec=Array.prototype.map,kc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mc(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?Tc:(e=Ec.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,a=[],o=0,s=e[0],u=0;r>0&&s>0&&(u+s+1>i&&(s=Math.max(1,i-u)),a.push(t.substring(r-=s,r+s)),!((u+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Tc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Ec.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=pc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,g=t.width,p=t.comma,v=t.precision,y=t.trim,x=t.type;"n"===x?(p=!0,x="g"):_c[x]||(void 0===v&&(v=12),y=!0,x="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?r:"#"===f&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",m="$"===f?a:/[%p]/.test(x)?u:"",_=_c[x],T=/[defgprs%]/.test(x);function w(t){var r,a,u,f=b,w=m;if("c"===x)w=_(t)+w,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:_(Math.abs(t),v),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==h&&(A=!1),f=(A?"("===h?h:c:"-"===h||"("===h?"":h)+f,w=("s"===x?kc[8+dc/3]:"")+w+(A&&"("===h?")":""),T)for(r=-1,a=t.length;++r(u=t.charCodeAt(r))||u>57){w=(46===u?o+t.slice(r+1):t.slice(r))+w,t=t.slice(0,r);break}}p&&!d&&(t=i(t,1/0));var S=f.length+t.length+w.length,E=S>1)+f+t+w+E.slice(S);break;default:t=E+f+t+w}return s(t)}return v=void 0===v?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=pc(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3))),r=Math.pow(10,-i),a=kc[8+i/3];return function(t){return n(r*t)+a}}}}function Oc(t,e,n,i){var r,a=qu(t,e,n);switch((i=pc(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(xc(e)/3)))-xc(Math.abs(t)))}(a,o))||(i.precision=r),Sc(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,xc(e)-xc(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-xc(Math.abs(t)))}(a))||(i.precision=r-2*("%"===i.type))}return Ac(i)}function Rc(t){var e=t.domain;return t.ticks=function(t){var n=e();return Hu(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e();return Oc(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,r,a=e(),o=0,s=a.length-1,u=a[o],c=a[s],l=10;for(c0;){if((r=Wu(u,c,n))===i)return a[o]=u,a[s]=c,e(a);if(r>0)u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function Cc(){var t=fc();return t.copy=function(){return lc(t,Cc())},Ou.apply(t,arguments),Rc(t)}function Ic(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Lc(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Pc(){var t=function(t){var e=1,n=t(Ic(e),Lc(e));return n.constant=function(n){return arguments.length?t(Ic(e=+n),Lc(e)):e},Rc(n)}(hc());return t.copy=function(){return lc(t,Pc()).constant(t.constant())},Ou.apply(t,arguments)}function Dc(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o0){for(;g<=p;++g)for(f=1;fc)break;y.push(d)}}else for(;g<=p;++g)for(f=s-1;f>=1;--f)if(!((d=g>0?f/n(-g):f*n(g))c)break;y.push(d)}2*y.length0?t>1?u(function(n){a(this,e),n.setTime(Math.floor(n/t)*t)}.bind(this),function(n,i){a(this,e),n.setTime(+n+i*t)}.bind(this),function(n,i){return a(this,e),(i-n)/t}.bind(this)):Vc:null}.bind(void 0);Vc.range;var Gc=void 0,Hc=u(function(t){a(this,Gc),t.setTime(t-t.getMilliseconds())}.bind(void 0),function(t,e){a(this,Gc),t.setTime(+t+e*c)}.bind(void 0),function(t,e){return a(this,Gc),(e-t)/c}.bind(void 0),function(t){return a(this,Gc),t.getUTCSeconds()}.bind(void 0)),Wc=(Hc.range,void 0),qc=u(function(t){a(this,Wc),t.setTime(t-t.getMilliseconds()-t.getSeconds()*c)}.bind(void 0),function(t,e){a(this,Wc),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return a(this,Wc),(e-t)/l}.bind(void 0),function(t){return a(this,Wc),t.getMinutes()}.bind(void 0)),Zc=(qc.range,u(function(t){a(this,Wc),t.setUTCSeconds(0,0)}.bind(void 0),function(t,e){a(this,Wc),t.setTime(+t+e*l)}.bind(void 0),function(t,e){return a(this,Wc),(e-t)/l}.bind(void 0),function(t){return a(this,Wc),t.getUTCMinutes()}.bind(void 0))),Kc=(Zc.range,void 0),Jc=u(function(t){a(this,Kc),t.setTime(t-t.getMilliseconds()-t.getSeconds()*c-t.getMinutes()*l)}.bind(void 0),function(t,e){a(this,Kc),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return a(this,Kc),(e-t)/h}.bind(void 0),function(t){return a(this,Kc),t.getHours()}.bind(void 0)),Qc=(Jc.range,u(function(t){a(this,Kc),t.setUTCMinutes(0,0,0)}.bind(void 0),function(t,e){a(this,Kc),t.setTime(+t+e*h)}.bind(void 0),function(t,e){return a(this,Kc),(e-t)/h}.bind(void 0),function(t){return a(this,Kc),t.getUTCHours()}.bind(void 0))),tl=(Qc.range,void 0),el=u(function(t){a(this,tl),t.setDate(1),t.setHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,tl),t.setMonth(t.getMonth()+e)}.bind(void 0),function(t,e){return a(this,tl),e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}.bind(void 0),function(t){return a(this,tl),t.getMonth()}.bind(void 0)),nl=(el.range,u(function(t){a(this,tl),t.setUTCDate(1),t.setUTCHours(0,0,0,0)}.bind(void 0),function(t,e){a(this,tl),t.setUTCMonth(t.getUTCMonth()+e)}.bind(void 0),function(t,e){return a(this,tl),e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}.bind(void 0),function(t){return a(this,tl),t.getUTCMonth()}.bind(void 0)));nl.range;function il(t,e,n,i,r,o){var s=[[Hc,1,c],[Hc,5,5e3],[Hc,15,15e3],[Hc,30,3e4],[o,1,l],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,h],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,f],[i,2,1728e5],[n,1,d],[e,1,g],[e,3,7776e6],[t,1,p]];function u(e,n,i){var r=this,o=Math.abs(n-e)/i,u=Ju(function(t){var e=t[2];return a(this,r),e}.bind(this)).right(s,o);if(u===s.length)return t.every(qu(e/p,n/p,i));if(0===u)return Vc.every(Math.max(qu(e,n,i),1));var c=s[o/s[u-1][2]0)for(var i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,u=-1;++u<=n;)i=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+i*o),this._beta*e[u]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var El=function t(e){function n(t){return 1===e?new xl(t):new Sl(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function kl(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ml(t,e){this._context=t,this._k=(1-e)/6}Ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kl(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ol=function t(e){function n(t){return new Ml(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rl(t,e){this._context=t,this._k=(1-e)/6}Rl.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cl=function t(e){function n(t){return new Rl(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Il(t,e){this._context=t,this._k=(1-e)/6}Il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kl(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ll=function t(e){function n(t){return new Il(t,e)}return n.tension=function(e){return t(+e)},n}(0),Pl=Math.abs,Dl=Math.atan2,Nl=Math.cos,Fl=Math.max,zl=Math.min,jl=Math.sin,Bl=Math.sqrt,$l=1e-12,Xl=Math.PI,Ul=Xl/2,Yl=2*Xl;function Vl(t){return t>=1?Ul:t<=-1?-Ul:Math.asin(t)}function Gl(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>$l){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>$l){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function Hl(t,e){this._context=t,this._alpha=e}Hl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Wl=function t(e){function n(t){return e?new Hl(t,e):new Ml(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function ql(t,e){this._context=t,this._alpha=e}ql.prototype={areaStart:ml,areaEnd:ml,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Zl=function t(e){function n(t){return e?new ql(t,e):new Rl(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Kl(t,e){this._context=t,this._alpha=e}Kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gl(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Jl=function t(e){function n(t){return e?new Kl(t,e):new Il(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ql(t){return t<0?-1:1}function th(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0);return(Ql(a)+Ql(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*r+o*i)/(i+r)))||0}function eh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nh(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function ih(t){this._context=t}function rh(t){this._context=new ah(t)}function ah(t){this._context=t}function oh(t){return new ih(t)}function sh(t){return new rh(t)}function uh(t){this._context=t}function ch(t){var e,n,i=t.length-1,r=Array(i),a=Array(i),o=Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var bh={getDrawShape:function(){var t,e,n=this,i=this,r=i.config.axis_rotated,o=i.state,s=o.hasRadar,u=o.hasTreemap,c={type:{},indices:{},pos:{}};(u||["bar","candlestick","line","area"].forEach(function(t){a(this,n);var e=vo(/^(bubble|scatter)$/.test(t)?"line":t);if(i.hasType(t)||i.hasTypeOf(e)||"line"===t&&(i.hasType("bubble")||i.hasType("scatter"))){var r=i.getShapeIndices(i["is"+e+"Type"]),o=i["generateDraw"+e];c.indices[t]=r,c.type[t]=o?o.bind(i)(r,!1):void 0}}.bind(this)),!i.hasArcType()||s||u)&&(u||(t=s?i.radarCircleX:r?i.circleY:i.circleX,e=s?i.radarCircleY:r?i.circleX:i.circleY),c.pos={xForText:i.generateXYForText(c.indices,!0),yForText:i.generateXYForText(c.indices,!1),cx:(t||function(){}).bind(i),cy:(e||function(){}).bind(i)});return c},getShapeIndices:function(t){var e=this,n=this,i=n.config,r=i.data_xs,o=Qa(r),s={},u=o?{}:0;return o&&bo(Object.keys(r).map(function(t){return a(this,e),r[t]}.bind(this))).forEach(function(t){a(this,e),u[t]=0,s[t]={}}.bind(this)),n.filterTargetsToShow(n.data.targets.filter(t,n)).forEach(function(t){a(this,e);for(var n,o=(t.id in r?r[t.id]:""),c=o?s[o]:s,l=0;n=i.data_groups[l];l++)if(!(n.indexOf(t.id)<0))for(var h,f=0;h=n[f];f++)if(h in c){c[t.id]=c[h];break}Va(c[t.id])&&(c[t.id]=o?u[o]++:u++,c.__max__=(o?u[o]:u)-1)}.bind(this)),s},getIndices:function(t,e){var n=this,i=this,r=i.config,o=r.data_xs,s=r.bar_indices_removeNull,u=e.id,c=e.index;if(i.isBarType(u)&&s){var l={};return i.getAllValuesOnIndex(c,!0).forEach(function(t,e){a(this,n),l[t.id]=e,l.__max__=e}.bind(this)),l}return Qa(o)?t[o[u]]:t},getIndicesMax:function(t){var e=this;return Qa(this.config.data_xs)?Object.keys(t).map(function(n){return a(this,e),t[n].__max__||0}.bind(this)).reduce(function(t,n){return a(this,e),t+n}.bind(this)):t.__max__},getShapeX:function(t,e,n){var i=this,r=this,o=r.config,s=r.scale,u=n?s.subX:s.zoom||s.x,c=o.bar_overlap,l=o.bar_padding,h=function(t,e){return a(this,i),t+e}.bind(this),f=Ka(t)&&(t._$total.length?t._$total.reduce(h)/2:0);return function(n){a(this,i);var o=r.getIndices(e,n,"getShapeX"),s=n.id in o?o[n.id]:0,d=(o.__max__||0)+1,g=0;if(Qa(n.x)){var p=u(n.x,!0);if(f){var v=t[n.id]||t._$width;g=c?p-v/2:p-v+t._$total.slice(0,s+1).reduce(h)-f}else g=p-(Ya(t)?t:t._$width)*(d/2-(c?1:s))}return t&&g&&d>1&&l&&(s&&(g+=l*s),d>2?g-=(d-1)*l/2:2===d&&(g-=l/2)),g}.bind(this)},getShapeY:function(t){var e=this,n=this,i=n.isStackNormalized();return function(r){a(this,e);var o=r.value;return Ya(r)?o=r:i?o=n.getRatio("index",r,!0):n.isBubbleZType(r)?o=n.getBubbleZData(r.value,"y"):n.isBarRangeType(r)&&(o=o[1]),n.getYScaleById(r.id,t)(o)}.bind(this)},getShapeYMin:function(t){var e=this,n=e.axis.getId(t),i=e.scale[n].domain()[0],r=e.config["axis_"+n+"_inverted"];return!e.isGrouped(t)&&!r&&i>0?i:0},getShapeOffsetData:function(t){var e=this,n=this,i=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=n.isStackNormalized(),o=i.map(function(t){var i=this;a(this,e);var o=t.values,s={};n.isStepType(t)&&(o=n.convertValuesToStep(o));var u=o.reduce(function(t,e){a(this,i);var o=+e.x;return t[o]=e,s[o]=r?n.getRatio("index",e,!0):e.value,t}.bind(this),{});return{id:t.id,rowValues:o,rowValueMapByXValue:u,values:s}}.bind(this)),s=i.reduce(function(t,n,i){var r=n.id;return a(this,e),t[r]=i,t}.bind(this),{});return{indexMapByTargetId:s,shapeOffsetTargets:o}},getShapeOffset:function(t,e,n){var i=this,r=this,o=r.getShapeOffsetData(t),s=o.shapeOffsetTargets,u=o.indexMapByTargetId,c=r.config.data_groupsZeroAs;return function(t,o){var l=this;a(this,i);var h=t.id,f=t.value,d=t.x,g=r.getIndices(e,t),p=r.getYScaleById(h,n);if(r.isBarRangeType(t))return p(f[0]);var v=+d,y=p("zero"===c?0:r.getShapeYMin(h)),x=y;return s.filter(function(t){return a(this,l),t.id!==h&&g[t.id]===g[h]}.bind(this)).forEach(function(t){a(this,l);var e=t.id,n=t.rowValueMapByXValue,i=t.rowValues,r=t.values;if(u[e]=0&&Ya(d))(0!==f||("positive"===c&&d>0||"negative"===c&&d<0))&&(x+=p(d)-y)}}.bind(this)),x}.bind(this)},getBarW:function(t,e,n){var i=this,r=this,o=r.config,s=r.org,u=r.scale,c=r.getMaxDataCount(),l="bar"===t&&o.data_groups.length,h=t+"_width",f=u.zoom&&!r.axis.isCategorized()?s.xDomain.map(function(t){return a(this,i),u.zoom(t)}.bind(this)).reduce(function(t,e){return a(this,i),Math.abs(t)+e}.bind(this))/c:e.tickInterval(c),d=function(t){a(this,i);var e=t?o[h][t]:o[h],r=t?e.ratio:o[h+"_ratio"],s=t?e.max:o[h+"_max"],u=Ya(e)?e:n?f*r/n:0;return s&&u>s?s:u}.bind(this),g=d();return!l&&Ka(o[h])&&(g={_$width:g,_$total:[]},r.filterTargetsToShow(r.data.targets).forEach(function(t){a(this,i),o[h][t.id]&&(g[t.id]=d(t.id),g._$total.push(g[t.id]||g._$width))}.bind(this))),g},getShapeByIndex:function(t,e,n){var i=this,r=this.$el,o=$a(e)?"-"+e:"",s=r[t];return s=s&&!s.empty()?s.filter(function(t){return a(this,i),!n||t.id===n}.bind(this)).filter(function(t){return a(this,i),!$a(e)||t.index===e}.bind(this)):(n?r.main.selectAll("."+as[t+"s"]+this.getTargetSelectorSuffix(n)):r.main).selectAll("."+as[t]+o)},isWithinShape:function(t,e){var n,i=this,r=Rn(t);return i.isTargetToShow(e.id)?null!=i.hasValidPointType&&i.hasValidPointType(t.nodeName)?n=i.isStepType(e)?i.isWithinStep(t,i.getYScaleById(e.id)(e.value)):i.isWithinCircle(t,i.isBubbleType(e)?1.5*i.pointSelectR(e):0):"path"===t.nodeName&&(n=!r.classed(as.bar)||i.isWithinBar(t)):n=!1,n},getInterpolate:function(t){var e=this.getInterpolateType(t);return{basis:bl,"basis-closed":Tl,"basis-open":Al,bundle:El,cardinal:Ol,"cardinal-closed":Cl,"cardinal-open":Ll,"catmull-rom":Wl,"catmull-rom-closed":Zl,"catmull-rom-open":Jl,"monotone-x":oh,"monotone-y":sh,natural:lh,"linear-closed":fh,linear:gh,step:vh,"step-after":xh,"step-before":yh}[e]},getInterpolateType:function(t){var e=this,n=e.config,i=n.spline_interpolation_type,r=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar:function(t){var e=uo(this.state.event,t),n=so(t),i=n[0],r=n[1],a=Math.min(i.x,r.x),o=Math.min(i.y,r.y),s=this.config.bar_sensitivity,u=t.getBBox(),c=u.width,l=u.height;return a-s0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getCurrentPaddingTop:function(){var t=this,e=t.config,n=t.state.hasAxis,i=t.$el,r=n?e.axis_y2_axes.length:0,a=$a(e.padding_top)?e.padding_top:0;return i.title&&i.title.node()&&(a+=t.getTitlePadding()),r&&e.axis_rotated&&(a+=t.getHorizontalAxisHeight("y2")*r),a},getCurrentPaddingBottom:function(){var t=this,e=t.config,n=t.state.hasAxis,i=e.axis_rotated?"y":"x",r=n?e["axis_"+i+"_axes"].length:0;return($a(e.padding_bottom)?e.padding_bottom:0)+(r?t.getHorizontalAxisHeight(i)*r:0)},getCurrentPaddingLeft:function(t){var e,n=this,i=n.config,r=n.state.hasAxis,a=i.axis_rotated,o="fit"===(null==(e=i.padding)?void 0:e.mode),s=a?"x":"y",u=r?i["axis_"+s+"_axes"].length:0,c=r?n.getAxisWidthByAxisId(s,t):0;o||(c=Wa(c));var l=i["axis_"+s+"_inner"]||!i["axis_"+s+"_show"]?0:c;return $a(i.padding_left)?l=i.padding_left+(o&&a?c:0):r&&a&&(l=i.axis_x_show?o?c:Math.max(c,40):1),r&&(o||i["axis_"+s+"_inner"])&&i["axis_"+s+"_label"].text&&(l+=n.axis.getAxisLabelPosition("y").isOuter?20:0),l+c*u},getCurrentPaddingRight:function(t){var e,n;void 0===t&&(t=!1);var i=this,r=i.config,a=i.state.hasAxis,o=r.axis_rotated,s="fit"===(null==(e=r.padding)?void 0:e.mode),u=s?2:10,c=i.state.isLegendRight?i.getLegendWidth()+20:0,l=a?r.axis_y2_axes.length:0,h=null!=(n=i.axis)&&n.getAxisLabelPosition("y2").isOuter?20:0,f=t?i.axis.getXAxisTickTextY2Overflow(u):0,d=a&&!r.axis_y2_inner?i.getAxisWidthByAxisId("y2"):1;s||(d=Wa(d));var g=o?0:Math.max(d+c,f);return $a(r.padding_right)?g=r.padding_right+(s&&(o||!r.axis_y2_show?u:g))+(a&&!s?1:0):i.axis&&o?g=u+c:!i.axis||r.axis_y2_show&&!r.axis_y2_inner||(g=Math.max((s&&!r.axis_y2_show?2:1)+c+h,f)),a&&!o&&s&&r.axis_y2_show&&!r.axis_y2_inner&&r.axis_y2_label.text&&(g+=h),g+d*l},getParentRectValue:function(t){for(var e="offset"+vo(t),n=this.$el.chart.node(),i=0;i<30&&n&&"BODY"!==n.tagName;){try{i=n.getBoundingClientRect()[t]}catch(t){e in n&&(i=n[e])}n=n.parentNode}var r=zn.body[e];return i>r&&(i=r),i},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var t=this.$el.chart.style("height"),e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft:function(t){var e=this,n=e.config,i=e.$el,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,a=n.axis_rotated?No.axisX:No.axisY,o=i.main.select("."+a).node(),s=o&&r?o.getBoundingClientRect():{right:0},u=i.chart.node().getBoundingClientRect(),c=e.hasArcType(),l=s.right-u.left-(c?0:e.getCurrentPaddingLeft(t));return l>0?l:0},updateDimension:function(t){var e,n=this,i=n.config,r=n.state.hasAxis,a=n.$el;r&&!t&&n.axis.x&&i.axis_rotated&&(null==(e=n.axis.subX)||e.create(a.axis.subX));n.updateScales(t),n.updateSvgSize(),n.transformAll(!1)},updateSvgSize:function(){var t=this,e=t.state,n=e.clip,i=e.current,r=e.hasAxis,a=e.width,o=e.height,s=t.$el.svg;if(s.attr("width",i.width).attr("height",i.height),r){var u=s.select("."+ts.brush+" .overlay"),c={width:0,height:0};u.size()&&(c.width=+u.attr("width"),c.height=+u.attr("height")),s.selectAll(["#"+n.id,"#"+n.idGrid]).select("rect").attr("width",a).attr("height",o),s.select("#"+n.idXAxis).select("rect").call(t.setXAxisClipPath.bind(t)),s.select("#"+n.idYAxis).select("rect").call(t.setYAxisClipPath.bind(t)),n.idSubchart&&s.select("#"+n.idSubchart).select("rect").attr("width",a).attr("height",c.height)}},getCurrentPadding:function(){var t=this;return{top:t.getCurrentPaddingTop(),bottom:t.getCurrentPaddingBottom(),left:t.getCurrentPaddingLeft(),right:t.getCurrentPaddingRight()}},getResettedPadding:function(t){var e=this,n=this.config,i=Ya(t),r=i?0:{};return!1===n.padding?i||Object.keys(t).forEach(function(i){a(this,e),r[i]=Ja(n.data_labels)||!1===n.data_labels||"top"!==i?0:t[i]}.bind(this)):r=t,r},updateSizes:function(t){var e,n=this,i=n.config,r=n.state,a=n.$el.legend,o=i.axis_rotated,s=n.hasArcType()||r.hasTreemap,u="fit"===(null==(e=i.padding)?void 0:e.mode);t||n.setContainerSize();var c={width:a?n.getLegendWidth():0,height:a?n.getLegendHeight():0};!s&&i.axis_x_show&&i.axis_x_tick_autorotate&&n.updateXAxisTickClip();var l=r.isLegendRight||r.isLegendInset?0:c.height,h=o||s?0:n.getHorizontalAxisHeight("x"),f=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?h:30,d=i.subchart_show&&!s?i.subchart_size_height+f:0,g=n.hasType("gauge")&&i.arc_needle_show&&!i.gauge_fullCircle&&!i.gauge_label_show?10:0,p=n.getCurrentPadding();if(r.margin=!s&&o?{top:n.getHorizontalAxisHeight("y2")+p.top,right:s?0:n.getCurrentPaddingRight(!0),bottom:n.getHorizontalAxisHeight("y")+l+p.bottom,left:d+(s?0:p.left)}:{top:(u?0:4)+p.top,right:s?0:n.getCurrentPaddingRight(!0),bottom:g+h+d+l+p.bottom,left:s?0:p.left},r.margin=n.getResettedPadding(r.margin),r.margin2=o?{top:r.margin.top,right:NaN,bottom:20+l,left:n.state.rotatedPadding.left}:{top:r.current.height-d-l,right:NaN,bottom:f+l,left:r.margin.left},r.margin3={top:0,right:NaN,bottom:0,left:0},null==n.updateSizeForLegend||n.updateSizeForLegend(c),r.width=r.current.width-r.margin.left-r.margin.right,r.height=r.current.height-r.margin.top-r.margin.bottom,r.width<0&&(r.width=0),r.height<0&&(r.height=0),r.width2=o?r.margin.left-r.rotatedPadding.left-r.rotatedPadding.right:r.width,r.height2=o?r.height:r.current.height-r.margin2.top-r.margin2.bottom,r.width2<0&&(r.width2=0),r.height2<0&&(r.height2=0),n.hasArcType()){var v=n.hasType("gauge"),y=i.legend_show&&r.isLegendRight;r.arcWidth=r.width-(y?c.width+10:0),r.arcHeight=r.height-(y&&!v?0:10),v&&!i.gauge_fullCircle&&(r.arcHeight+=r.height-n.getPaddingBottomForGauge()),null==n.updateRadius||n.updateRadius()}r.isLegendRight&&s&&(r.margin3.left=r.arcWidth/2+1.1*r.radiusExpanded)}},_h={setCssRule:function(t,e,n,i){var r=this,o=this,s=o.config,u=o.state,c=u.cssRule,l=u.style;return s.boost_useCssRule?function(s){var u=this;a(this,r),s.each(function(r){var s=this;a(this,u);var h=i&&(null==i?void 0:i.call(o,r)),f=(t?"."+(Qo.shapes+o.getTargetSelectorSuffix(r.id)):"")+e;e in c&&l.sheet.deleteRule(c[f]),o.state.cssRule[f]=function(t,e,n){var i=this,r=t.rootSelctor,o=t.sheet,s=r+" "+function(t){return a(this,i),t.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,".")}.bind(this)(e)+" {"+n.join(";")+"}";return o[o.insertRule?"insertRule":"addRule"](s,o.cssRules.length)}(l,f,n.filter(Boolean).map(function(t){return a(this,s),Ua(h)&&-1===t.indexOf(":")?t+": "+h:t||""}.bind(this)))}.bind(this))}.bind(this):function(){a(this,r)}.bind(this)},getStylePropValue:function(t){return this.config.boost_useCssRule?null:Xa(t)?t.bind(this):t}};function Th(t){return"string"==typeof t?new kn([document.querySelectorAll(t)],[document.documentElement]):new kn([fe(t)],En)}function wh(t,e,n,i,r){var a,o=t.value,s=this.isCandlestickType(t),u=Ya(o)&&o<0||s&&!(null!=(a=this.getCandlestickData(t))&&a._isUp),c=e.x,l=e.y;return i?"start"===n?(c+=u?0:8,l+=4):"middle"===n?(c+=8,l-=8):"end"===n&&(u&&(c-=8),l+=4):("start"===n?(c+=4,u&&(l+=16)):"middle"===n?l-=8:"end"===n&&(c-=4,u&&(l+=16)),r&&(l+=u?-17:s?13:7)),{x:c,y:l}}function Ah(t,e){var n,i=this.config.data_labels_position,r=t.id,a=t.index,o=t.value;return null!=(n=Xa(i)?i.bind(this.api)(e,o,r,a,this.$el.text):(r in i?i[r]:i)[e])?n:0}var Sh={opacityForText:function(t){var e=this;return e.isBarType(t)&&!e.meetsLabelThreshold(Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel?null:"0"},initText:function(){var t=this.$el;t.main.select("."+Lo.chart).append("g").attr("class",es.chartTexts).style("pointer-events",t.treemap?"none":null)},updateTargetsForText:function(t){var e=this,n=this,i=n.getChartClass("Text"),r=n.getClass("texts","id"),o=n.classFocus.bind(n);n.$el.main.select("."+es.chartTexts).selectAll("."+es.chartText).data(t).attr("class",function(t){return a(this,e),(""+i(t)+o(t)).trim()}.bind(this)).enter().append("g").style("opacity","0").attr("class",i).call(n.setCssRule(!0," ."+es.text,["fill","pointer-events:none"],n.updateTextColor)).append("g").attr("class",r)},updateText:function(){var t=this,e=this,n=e.$el,i=e.$T,r=e.config,o=e.axis,s=e.getClass("text","index"),u=r.data_labels.centered,c=n.main.selectAll("."+es.texts).selectAll("."+es.text).data(e.labelishData.bind(e));i(c.exit()).style("fill-opacity","0").remove(),n.text=c.enter().append("text").merge(c).attr("class",s).attr("text-anchor",function(n){a(this,t);var i=r["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"]?n.value>0:n.value<0;if(e.isCandlestickType(n)){var s=e.getCandlestickData(n);i=!(null!=s&&s._isUp)}else if(e.isTreemapType(n))return u?"middle":"start";return r.axis_rotated?i?"end":"start":"middle"}.bind(this)).style("fill",e.getStylePropValue(e.updateTextColor)).style("fill-opacity","0").each((function(t,n,i){var r=Rn(this),a=t.value;if(e.isBubbleZType(t))a=e.getBubbleZData(a,"z");else if(e.isCandlestickType(t)){var o=e.getCandlestickData(t);o&&(a=o.close)}a=e.isTreemapType(t)?e.treemapDataLabelFormat(t)(r):e.dataLabelFormat(t.id)(a,t.id,n,i),Ya(a)?this.textContent=a:oo(r,a)}))},updateTextColor:function(t){var e,n=this,i=n.config,r=i.data_labels_colors,a=n.isArcType(t)&&!n.isRadarType(t)||n.isTreemapType(t)?null:n.color(t);if(Ua(r))e=r;else if(eo(r)){e=r[(t.data||t).id]}else Xa(r)&&(e=r.bind(n.api)(a,t));if(n.isCandlestickType(t)&&!Xa(r)){var o=n.getCandlestickData(t);if(null==o||!o._isUp){var s=i.candlestick_color_down;e=eo(s)?s[t.id]:s}}return e||a},updateTextBacgroundColor:function(t){var e=this,n=e.$el,i=e.config.data_labels_backgroundColors,r="";if(Ua(i)||eo(i)){var a=Ua(i)?"":e.getTargetSelectorSuffix("id"in t?t.id:t.data.id),o=n.defs.select(["filter[id*='labels-bg","']"].join(a));o.size()&&(r="url(#"+o.attr("id")+")")}return r||null},redrawText:function(t,e,n,i){var r=this,a=r.$T,o=r.axis,s=r.config,u=r.state.hasTreemap,c=ho(!0),l=s.axis_rotated,h=s.data_labels.rotate,f=function(t){var e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}(h),d=h?"rotate("+h+")":"";return r.$el.text.style("fill",r.getStylePropValue(r.updateTextColor)).attr("filter",r.updateTextBacgroundColor.bind(r)).style("fill-opacity",n?0:r.opacityForText.bind(r)).each((function(n,g){var p=a(u&&this.childElementCount?this.parentNode:this,!(!i||!this.getAttribute("x")),c),v=s["axis_"+(null==o?void 0:o.getId(n.id))+"_inverted"],y={x:t.bind(this)(n,g),y:e.bind(this)(n,g)};h&&(y=wh.bind(r)(n,y,f,l,v),p.attr("text-anchor",f)),this.childElementCount||h?p.attr("transform","translate("+y.x+" "+y.y+") "+d):p.attr("x",y.x).attr("y",y.y)})),!0},getTextRect:function(t,e){var n=this,i=this,r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));var o=r.textContent,s=Rs+"-"+o.replace(/\W/g,"_"),u=i.cache.get(s);return u||(i.$el.svg.append("text").style("visibility","hidden").style("font",Rn(r).style("font")).classed(e,!0).text(o).call(function(t){a(this,n),u=lo(t.node())}.bind(this)).remove(),i.cache.add(s,u)),u},generateXYForText:function(t,e){var n=this,i=this,r=i.state,o=r.hasRadar,s=r.hasTreemap,u=Object.keys(t),c={},l=e?i.getXForText:i.getYForText;return o&&u.push("radar"),s&&u.push("treemap"),u.forEach(function(e){a(this,n),c[e]=i["generateGet"+vo(e)+"Points"](t[e],!1)}.bind(this)),function(t,e){var n=(i.isAreaType(t)?"area":i.isBarType(t)&&"bar")||i.isCandlestickType(t)&&"candlestick"||i.isRadarType(t)&&"radar"||i.isTreemapType(t)&&"treemap"||"line";return l.call(i,c[n](t,e),t,this)}},getCenteredTextPos:function(t,e,n,i){var r=this,a=r.config,o=a.axis_rotated,s=r.isBarType(t),u=r.isTreemapType(t);if(a.data_labels.centered&&(s||u)){var c=lo(n);if(s){var l=t.value>=0;if(o){var h=(l?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+c.width/2;return l?-h-3:h+2}var f=(l?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+c.height/2;return l?f:-f-2}if(u)return"x"===i?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2+c.height/2}return 0},getXForText:function(t,e,n){var i,r=this,a=r.config,o=r.state,s=a.axis_rotated,u=r.isTreemapType(e),c=t[0][0];if(r.isCandlestickType(e))s?c=null!=(i=r.getCandlestickData(e))&&i._isUp?t[2][2]+4:t[2][1]-4:c+=(t[1][0]-c)/2;else if(u)c+=a.data_labels.centered?0:5;else if(s){var l=a["axis_"+r.axis.getId(e.id)+"_inverted"],h=r.isBarType(e)?4:6,f=e.value;c=t[2][1],l?c-=h*(f>0?1:-1):c+=h*(f<0?-1:1)}else c=r.hasType("bar")?(t[2][0]+t[0][0])/2:c;if(null===e.value)if(c>o.width){var d=lo(n).width;c=o.width-d}else c<0&&(c=4);return(s||u)&&(c+=r.getCenteredTextPos(e,t,n,"x")),c+Ah.call(this,e,"x")},getYForText:function(t,e,n){var i,r=this,a=r.axis,o=r.config,s=r.state,u=o.axis_rotated,c=o["axis_"+(null==a?void 0:a.getId(e.id))+"_inverted"],l=r.isBarType(e),h=r.isTreemapType(e),f=o.point_r,d=lo(n),g=e.value,p=3;if(r.isCandlestickType(e))g=r.getCandlestickData(e),u?(i=t[0][0],i+=(t[1][0]-i)/2+p):(i=g&&g._isUp?t[2][2]-p:t[2][1]+4*p,c&&(i+=15*(g._isUp?1:-1)));else if(h)i=t[0][1]+(o.data_labels.centered?0:d.height+5);else if(u)i=(t[0][0]+t[2][0]+.6*d.height)/2;else if(i=t[2][1],Ya(f)&&f>5&&(r.isLineType(e)||r.isScatterType(e))&&(p+=o.point_r/2.3),g<0||0===g&&!s.hasPositiveValue&&s.hasNegativeValue)i+=c?l?-3:-5:d.height+(l?-p:p);else{var v=2*-p;l?v=-p:r.isBubbleType(e)&&(v=p),c&&(v=l?10:15),i+=v}if(null===e.value&&!u){var y=d.height;is.height&&(i=s.height-4)}return u&&!h||(i+=r.getCenteredTextPos(e,t,n,"y")),i+Ah.call(this,e,"y")},markOverlapped:function(t,e,n){var i=this,r=e.$el.arcs.selectAll(n),o=r.filter(function(e){return a(this,i),e.data.id!==t}.bind(this)),s=r.filter(function(e){return a(this,i),e.data.id===t}.bind(this)),u=xo(s.node()),c=function(t,e){return a(this,i),Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}.bind(this);s.node()&&o.each((function(){var t=xo(this),e=Rn(this),n=c(u.e,u.f)>c(t.e,t.f)?s:e,i=Math.ceil(Math.abs(u.e-t.e))=(this.config[e+"_label_threshold"]||0)}};function Eh(t,e){void 0===t&&(t="left");var n=Ya(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"}var kh={initTitle:function(){var t=this.config,e=this.$el;t.title_text&&(e.title=e.svg.append("g"),oo(e.title.append("text").style("text-anchor",Eh(t.title_position)).attr("class",es.title),t.title_text,[.3,1.5]))},redrawTitle:function(){var t=this,e=t.config,n=t.state.current,i=t.$el.title;if(i){var r=t.yForTitle.call(t);/g/i.test(i.node().tagName)?i.attr("transform","translate("+Eh(e.title_position,n.width)+", "+r+")"):i.attr("x",t.xForTitle.call(t)).attr("y",r)}},xForTitle:function(){var t,e=this,n=e.config,i=e.state.current,r=n.title_position||"left",a=e.getTextRect(e.$el.title,es.title).width;return/(right|center)/.test(r)?(t=i.width-a,r.indexOf("right")>=0?t=i.width-a-n.title_padding.right:r.indexOf("center")>=0&&(t=(i.width-a)/2)):t=n.title_padding.left||0,t},yForTitle:function(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.$el.title,es.title).height},getTitlePadding:function(){return this.yForTitle()+(this.config.title_padding.bottom||0)}},Mh={initTooltip:function(){var t=this,e=t.config,n=t.$el;n.tooltip=Rn(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",ns.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip:function(){var t=this,e=this,n=e.config,i=e.$el,r=e.state,o=r.hasAxis,s=r.hasRadar;if(n.tooltip_init_show){var u,c,l=!(o&&s);if(null!=(u=e.axis)&&u.isTimeSeries()&&Ua(n.tooltip_init_x)){var h,f,d=e.data.targets[0];for(n.tooltip_init_x=ko.call(e,n.tooltip_init_x),h=0;(f=d.values[h])&&f.x-n.tooltip_init_x!=0;h++);n.tooltip_init_x=h}var g=e.data.targets.map(function(i){a(this,t);var r=l?0:n.tooltip_init_x;return e.addName(i.values[r])}.bind(this));l&&(g=[g[n.tooltip_init_x]]),i.tooltip.html(e.getTooltipHTML(g,null==(c=e.axis)?void 0:c.getXAxisTickFormat(),e.getDefaultValueFormat(),e.color)),n.tooltip_contents.bindto||i.tooltip.style("top",n.tooltip_init_position.top).style("left",n.tooltip_init_position.left).style("display",null)}},getTooltipHTML:function(){var t=this,e=t.api,n=t.config;return Xa(n.tooltip_contents)?n.tooltip_contents.bind(e).apply(void 0,arguments):t.getTooltipContent.apply(t,arguments)},getTooltipContent:function(t,e,n,i){var r=this,o=this,s=o.api,u=o.config,c=o.state,l=o.$el,h=["title","name","value"].map(function(t){a(this,r);var e=u["tooltip_format_"+t];return Xa(e)?e.bind(s):e}.bind(this)),f=h[0],d=h[1],g=h[2];f=f||e,d=d||function(t){return a(this,r),t}.bind(this),g=g||(c.hasTreemap||o.isStackNormalized()?function(t,e){return a(this,r),(100*e).toFixed(2)+"%"}.bind(this):n);var p=u.tooltip_order,v=function(t){return a(this,r),o.axis&&o.isBubbleZType(t)?o.getBubbleZData(t.value,"z"):o.getBaseValue(t)}.bind(this),y=o.levelColor?function(t){return a(this,r),o.levelColor(t.value)}.bind(this):function(t){return a(this,r),i(t)}.bind(this),x=u.tooltip_contents,b=x.template,m=o.mapToTargetIds();if(null===p&&u.data_groups.length){var _=o.orderTargets(o.data.targets).map(function(t){return a(this,r),t.id}.bind(this)).reverse();t.sort(function(t,e){a(this,r);var n=t?t.value:null,i=e?e.value:null;return n>0&&i>0&&(n=t.id?_.indexOf(t.id):null,i=e.id?_.indexOf(e.id):null),n-i}.bind(this))}else/^(asc|desc)$/.test(p)?t.sort(function(t,e){a(this,r);var n=t?v(t):null,i=e?v(e):null;return"asc"===p?n-i:i-n}.bind(this)):Xa(p)&&t.sort(p.bind(s));var T,w,A,S,E,k=o.getTooltipContentTemplate(b),M=t.length,O=function(){var e=this;if(!(w=t[E])||!v(w)&&0!==v(w))return 0;if(Va(T)){var n=(c.hasAxis||c.hasRadar)&&ao(f?f(w.x):w.x);T=Eo(k[0],{CLASS_TOOLTIP:ns.tooltip,TITLE:$a(n)?b?n:''+n+"":""})}if(!w.ratio&&l.arcs&&(A=["arc",o.$el.arcs.select("path."+Po.arc+"-"+w.id).data()[0]],w.ratio=o.getRatio.apply(o,A)),A=[w.ratio,w.id,w.index,t],S=ao(g.apply(void 0,[v(w)].concat(A))),o.isAreaRangeType(w)){var i=["high","low"].map(function(t){return a(this,e),ao(g.apply(void 0,[o.getRangedData(w,t)].concat(A)))}.bind(this)),r=i[0],s=i[1];S="Mid: "+S+" High: "+r+" Low: "+s}else if(o.isCandlestickType(w)){var u=["open","high","low","close","volume"].map(function(t){return a(this,e),ao(g.apply(void 0,[o.getRangedData(w,t,"candlestick")].concat(A)))}.bind(this)),h=u[0],p=u[1],_=u[2],M=u[3],O=u[4];S="Open: "+h+" High: "+p+" Low: "+_+" Close: "+M+(O?" Volume: "+O:"")}else if(o.isBarRangeType(w)){var R=w.value,C=R[0],I=R[1];S=g(C)+" ~ "+g(I)}if(void 0!==S){if(null===w.name)return 0;var L=ao(d.apply(void 0,[w.name].concat(A))),P=y(w),D={CLASS_TOOLTIP_NAME:ns.tooltipName+o.getTargetSelectorSuffix(w.id),COLOR:b||!o.patterns?P:'',NAME:L,VALUE:S};if(b&&eo(x.text)){var N=m.indexOf(w.id);Object.keys(x.text).forEach(function(t){a(this,e),D[t]=x.text[t][N]}.bind(this))}T+=Eo(k[1],D)}};for(E=0;E"},getTooltipContentTemplate:function(t){return(t||'\n\t\t\t\t{=TITLE}\n\t\t\t\t{{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}}\n\t\t\t
'+(this.patterns?"{=COLOR}":'')+'{=NAME}{=VALUE}
').replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},setTooltipPosition:function(t,e){var n=this,i=this,r=i.config,o=i.scale,s=i.state,u=i.$el,c=u.eventRect,l=u.tooltip,h=r.tooltip_contents.bindto,f=l.datum();if(!h&&f){var d,g,p=uo(s.event,null!=e?e:null==c?void 0:c.node()),v={x:p[0],y:p[1]};o.x&&f&&"x"in f&&(v.xAxis=o.x(f.x));var y=f.width,x=void 0===y?0:y,b=f.height,m=void 0===b?0:b,_=null!=(d=null==(g=r.tooltip_position)?void 0:g.bind(i.api)(null!=t?t:JSON.parse(f.current),x,m,null==c?void 0:c.node(),v))?d:i.getTooltipPosition.bind(i)(x,m,v);["top","left"].forEach(function(t){a(this,n);var e=_[t];l.style(t,e+"px"),"left"!==t||f.xPosInPercent||(f.xPosInPercent=e/s.current.width*100)}.bind(this))}},getTooltipPosition:function(t,e,n){var i=this,r=this,o=r.config,s=r.scale,u=r.state,c=u,l=c.width,h=c.height,f=c.current,d=c.isLegendRight,g=c.inputType,p=r.hasType("gauge")&&!o.gauge_fullCircle,v=u.hasTreemap,y=o.axis_rotated,x=r.getSvgLeft(!0),b=x+f.width-r.getCurrentPaddingRight(),m=r.getCurrentPaddingLeft(!0),_=n.x,T=n.y;r.hasArcType()?"touch"===g||r.hasType("radar")||(T+=p?h:h/2,_+=(l-(d?r.getLegendWidth():0))/2):v||(y?(T=n.xAxis+20,_+=x,b-=x):(T-=5,_=x+m+20+(s.zoom?_:n.xAxis)));(_+t+15>b&&(_-=y?t-m:t+(v?0:m)),T+e>f.height)&&(T-=p?3*e:e+(v?0:30));var w={top:T,left:_};return Object.keys(w).forEach(function(t){a(this,i),w[t]<0&&(w[t]=0)}.bind(this)),w},showTooltip:function(t,e){var n=this,i=this,r=i.config,o=i.$el.tooltip,s=t.filter(function(t){return a(this,n),t&&$a(i.getBaseValue(t))}.bind(this));if(o&&0!==s.length&&r.tooltip_show){var u=o.datum(),c=JSON.stringify(t);if(!u||u.current!==c){var l=t.concat().sort()[0],h=l.index,f=l.x;io(r.tooltip_onshow,i.api,t),o.html(i.getTooltipHTML(t,i.axis?i.axis.getXAxisTickFormat():i.categoryName.bind(i),i.getDefaultValueFormat(),i.color)).style("display",null).style("visibility",null).datum(u={index:h,x:f,current:c,width:o.property("offsetWidth"),height:o.property("offsetHeight")}),io(r.tooltip_onshown,i.api,t),i._handleLinkedCharts(!0,h)}i.setTooltipPosition(s,e)}},bindTooltipResizePos:function(){var t=this,e=this,n=e.resizeFunction,i=e.state,r=e.$el.tooltip;n.add(function(){if(a(this,t),"block"===r.style("display")){var e=i.current,n=r.datum(),o=n.width,s=n.xPosInPercent,u=e.width/100*s,c=e.width-(u+o);c<0&&(u+=c),r.style("left",u+"px")}}.bind(this))},hideTooltip:function(t){var e=this,n=e.api,i=e.config,r=e.$el.tooltip;if(r&&"none"!==r.style("display")&&(!i.tooltip_doNotHide||t)){var a=JSON.parse(r.datum().current);io(i.tooltip_onhide,n,a),r.style("display","none").style("visibility","hidden").datum(null),io(i.tooltip_onhidden,n,a)}},_handleLinkedCharts:function(t,e){var n=this,i=this,r=i.charts,o=i.config,s=i.state.event;if(null!=s&&s.isTrusted&&o.tooltip_linked&&r.length>1){var u=o.tooltip_linked_name;r.filter(function(t){return a(this,n),t!==i.api}.bind(this)).forEach(function(i){a(this,n);var r=i.internal,o=r.config,s=r.$el,c=o.tooltip_linked,l=o.tooltip_linked_name,h=zn.body.contains(s.chart.node());if(c&&u===l&&h){var f=s.tooltip.data()[0],d=e!==(null==f?void 0:f.index);try{i.tooltip[t&&d?"show":"hide"]({index:e})}catch(t){}}}.bind(this))}},updateTooltipOnRedraw:function(t,e){var n=this,i=this,r=i.config,o=i.$el,s=o.eventRect,u=o.svg,c=o.tooltip,l=i.state,h=l.event,f=l.hasAxis,d=l.hasRadar,g=l.hasTreemap;if("block"===(null==c?void 0:c.style("display"))&&h){var p,v=null!=t?t:null==(p=d?u:s)?void 0:p.node();if(f||d)if(i.isMultipleX())i.selectRectForMultipleXs(v,!1);else{var y=null!=e?e:i.getDataIndexFromEvent(h);-1===e?i.api.tooltip.hide():(i.selectRectForSingle(v,y),i.setExpand(y,null,!0))}else{var x=h.clientX,b=h.clientY;setTimeout(function(){a(this,n);var t=zn.elementFromPoint(x,b),e=Rn(t).datum();if(e){var r=i.hasArcType()?i.convertToArcData(i.updateAngle(e)):null==e?void 0:e.data;g&&(t=u.node()),r&&i.showTooltip([r],t)}else i.api.tooltip.hide()}.bind(this),r.transition_duration)}}}},Oh={getTranslate:function(t,e){void 0===e&&(e=0);var n,i,r=this,a=r.config,o=r.state,s=a.axis_rotated,u=0;if(e&&/^(x|y2?)$/.test(t)&&(u=r.getAxisSize(t)*e),"main"===t)n=qa(o.margin.left),i=qa(o.margin.top);else if("context"===t)n=qa(o.margin2.left),i=qa(o.margin2.top);else if("legend"===t)n=o.margin3.left,i=o.margin3.top;else if("x"===t)n=s?-u:0,i=s?0:o.height+u;else if("y"===t)n=s?0:-u,i=s?o.height+u:0;else if("y2"===t)n=s?0:o.width+u,i=s&&u?1-u:0;else if("subX"===t)n=0,i=s?0:o.height2;else if("arc"===t)n=o.arcWidth/2,i=o.arcHeight/2;else if("polar"===t)n=o.arcWidth/2,i=o.arcHeight/2;else if("radar"===t){var c=r.getRadarSize()[0];n=o.width/2-c,i=qa(o.margin.top)}return"translate("+n+", "+i+")"},transformMain:function(t,e){var n=this,i=n.$el.main,r=n.$T,a=null!=e&&e.axisX?e.axisX:r(i.select("."+No.axisX),t),o=null!=e&&e.axisY?e.axisY:r(i.select("."+No.axisY),t),s=null!=e&&e.axisY2?e.axisY2:r(i.select("."+No.axisY2),t);r(i,t).attr("transform",n.getTranslate("main")),a.attr("transform",n.getTranslate("x")),o.attr("transform",n.getTranslate("y")),s.attr("transform",n.getTranslate("y2")),i.select("."+Po.chartArcs).attr("transform",n.getTranslate("arc"))},transformAll:function(t,e){var n=this,i=n.config,r=n.state,a=r.hasAxis,o=r.hasTreemap,s=n.$el;o||n.transformMain(t,e),a&&i.subchart_show&&n.transformContext(t,e),s.legend&&n.transformLegend(t)}},Rh={isValidChartType:function(t){return!!(t&&Object.values(jn).indexOf(t)>-1)},setTargetType:function(t,e){var n=this,i=this,r=i.config,o=i.state.withoutFadeIn;i.mapToTargetIds(t).forEach(function(t){a(this,n),o[t]=e===r.data_types[t],r.data_types[t]=e}.bind(this)),t||(r.data_type=e)},updateTypesElements:function(){var t=this,e=this,n=e.state.current;Object.keys(jn).forEach(function(i){a(this,t);var r=jn[i],o=e.hasType(r,null,!0),s=n.types.indexOf(r);-1===s&&o?n.types.push(r):s>-1&&!o&&n.types.splice(s,1)}.bind(this)),e.setChartElements()},hasType:function(t,e,n){var i,r=this;void 0===n&&(n=!1);var o=this,s=o.config,u=o.state.current,c=s.data_types,l=e||o.data.targets,h=!1;return!n&&(null==(i=u.types)?void 0:i.indexOf(t))>-1?h=!0:null!=l&&l.length?l.forEach(function(e){a(this,r);var n=c[e.id];(n===t||!n&&"line"===t)&&(h=!0)}.bind(this)):Object.keys(c).length?Object.keys(c).forEach(function(e){a(this,r),c[e]===t&&(h=!0)}.bind(this)):h=s.data_type===t,h},hasTypeOf:function(t,e,n){var i=this;return void 0===n&&(n=[]),t in $n&&!$n[t].filter(function(t){return a(this,i),-1===n.indexOf(t)}.bind(this)).every(function(t){return a(this,i),!this.hasType(t,e)}.bind(this))},isTypeOf:function(t,e){var n=Ua(t)?t:t.id,i=this.config.data_types[n]||this.config.data_type;return to(e)?e.indexOf(i)>=0:i===e},hasPointType:function(){var t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType:function(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge:function(){return this.hasType("gauge")&&"multi"===this.config.gauge_type},isLineType:function(t){var e=Ua(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,$n.Line)},isStepType:function(t){return this.isTypeOf(t,$n.Step)},isSplineType:function(t){return this.isTypeOf(t,$n.Spline)},isAreaType:function(t){return this.isTypeOf(t,$n.Area)},isAreaRangeType:function(t){return this.isTypeOf(t,$n.AreaRange)},isBarType:function(t){return this.isTypeOf(t,"bar")},isBubbleType:function(t){return this.isTypeOf(t,"bubble")},isCandlestickType:function(t){return this.isTypeOf(t,"candlestick")},isScatterType:function(t){return this.isTypeOf(t,"scatter")},isTreemapType:function(t){return this.isTypeOf(t,"treemap")},isPieType:function(t){return this.isTypeOf(t,"pie")},isGaugeType:function(t){return this.isTypeOf(t,"gauge")},isDonutType:function(t){return this.isTypeOf(t,"donut")},isPolarType:function(t){return this.isTypeOf(t,"polar")},isRadarType:function(t){return this.isTypeOf(t,"radar")},isArcType:function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint:function(t){var e=this.config,n=e.point_pattern;return"circle"===(null==t?void 0:t.tagName)||"circle"===e.point_type&&(!n||to(n)&&0===n.length)},lineData:function(t){return this.isLineType(t)?[t]:[]},arcData:function(t){return this.isArcType(t.data)?[t]:[]},labelishData:function(t){var e=this;return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(function(t){return a(this,e),Ya(t.value)||!!t.value}.bind(this)):[]},barLineBubbleData:function(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}},Ch=function(){function t(t){this.api=void 0,this.config=void 0,this.cache=void 0,this.$el=void 0,this.state=void 0,this.charts=void 0,this.data={xs:{},targets:[]},this.axis=void 0,this.scale={x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null},this.org={xScale:null,xDomain:null},this.color=void 0,this.patterns=void 0,this.levelColor=void 0,this.point=void 0,this.brush=void 0,this.format={extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null};var e=this;e.api=t,e.config=new ms,e.cache=new Cs;var n=new ss;e.$el=n.getStore("element"),e.state=n.getStore("state"),e.$T=e.$T.bind(e)}var e=t.prototype;return e.$T=function(t,e,n){var i=this.config,r=this.state,a=i.transition_duration,o=i.subchart_show,s=t;s&&("tagName"in s&&(s=Rn(s)),s=(!1!==e&&a||e)&&(!r.zooming||r.dragging)&&!r.resizing&&r.rendered&&!o?s.transition(n).duration(a):s);return s},e.beforeInit=function(){var t=this;t.callPluginHook("$beforeInit"),io(t.config.onbeforeinit,t.api)},e.afterInit=function(){var t=this;t.callPluginHook("$afterInit"),io(t.config.onafterinit,t.api)},e.init=function(){var t=this,e=t.config,n=t.state,i=t.$el,r=e.boost_useCssRule;if(Ro(t),n.hasRadar=!n.hasAxis&&t.hasType("radar"),n.hasTreemap=!n.hasAxis&&t.hasType("treemap"),n.hasAxis=!t.hasArcType()&&!n.hasTreemap,n.datetimeId="bb-"+ +new Date*ho(),r){var a=zn.createElement("style");a.type="text/css",zn.head.appendChild(a),n.style={rootSelctor:"."+n.datetimeId,sheet:a.sheet},i.style=a}var o={element:e.bindto,classname:"bb"};eo(e.bindto)&&(o.element=e.bindto.element||"#chart",o.classname=e.bindto.classname||o.classname),i.chart=Xa(o.element.node)?e.bindto.element:Rn(o.element||[]),i.chart.empty()&&(i.chart=Rn(zn.body.appendChild(zn.createElement("div")))),i.chart.html("").classed(o.classname,!0).classed(n.datetimeId,r).style("position","relative"),t.initParams(),t.initToRender()},e.initToRender=function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.chart,s=function(){return a(this,e),"none"===o.style("display")||"hidden"===o.style("visibility")}.bind(this),u=i.render.lazy||s(),c=In.MutationObserver;u&&c&&!1!==i.render.observe&&!t&&new c(function(t,i){a(this,e),s()||(i.disconnect(),r.rendered||n.initToRender(!0))}.bind(this)).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),u&&!t||n.convertData(i,function(t){a(this,e),n.initWithData(t),n.afterInit()}.bind(this))},e.initParams=function(){var t=this,e=this,n=e.config,i=e.format,r=e.state,o=n.axis_rotated;if(e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),!1===n.padding&&(n.axis_x_show=!1,n.axis_y_show=!1,n.axis_y2_show=!1,n.subchart_show=!1),e.hasPointType()&&(e.point=e.generatePoint()),r.hasAxis){e.initClip(),i.extraLineClasses=e.generateExtraLineClass(),i.dataTime=n.data_xLocaltime?Y:G,i.axisTime=n.axis_x_localtime?U:V;var s=e.config.zoom_enabled&&"drag"===e.config.zoom_type;i.defaultAxisTime=function(n){a(this,t);var r=e.scale,o=r.x,u=r.zoom,c=s?u:u&&o.orgDomain().toString()!==u.domain().toString(),l=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||c&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return i.axisTime(l)(n)}.bind(this)}r.isLegendRight="right"===n.legend_position,r.isLegendInset="inset"===n.legend_position,r.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,r.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,r.rotatedPadding.top=e.getResettedPadding(r.rotatedPadding.top),r.rotatedPadding.right=o&&!n.axis_x_show?0:30,r.inputType=function(t,e){var n=this,i=In.DocumentTouch,r=In.matchMedia,o=In.navigator,s=!1;if(e)if(o&&"maxTouchPoints"in o)s=o.maxTouchPoints>0;else if("ontouchmove"in In||i&&zn instanceof i)s=!0;else if(null!=r&&r("(pointer:coarse)").matches)s=!0;else{var u=o.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(u)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(u)}return(t&&["any-hover:hover","any-pointer:fine"].some(function(t){return a(this,n),null==r?void 0:r("("+t+")").matches}.bind(this))?"mouse":s&&"touch")||"mouse"}(n.interaction_inputType_mouse,n.interaction_inputType_touch)},e.initWithData=function(t){var e=this,n=this,i=n.config,r=n.scale,o=n.state,s=n.$el,u=n.org,c=o,l=c.hasAxis,h=c.hasTreemap,f=i.interaction_enabled,d=n.hasType("polar");if(l&&(n.axis=n.getAxisInstance(),i.zoom_enabled&&n.initZoom()),n.data.xs={},n.data.targets=n.convertDataToTargets(t),i.data_filter&&(n.data.targets=n.data.targets.filter(i.data_filter.bind(n.api))),i.data_hide&&n.addHiddenTargetIds(!0===i.data_hide?n.mapToIds(n.data.targets):i.data_hide),i.legend_hide&&n.addHiddenLegendIds(!0===i.legend_hide?n.mapToIds(n.data.targets):i.legend_hide),n.updateSizes(),n.updateScales(!0),l){var g=r.x,p=r.y,v=r.y2,y=r.subX,x=r.subY,b=r.subY2;g&&(g.domain(To(n.getXDomain(n.data.targets),!i.axis_x_inverted)),y.domain(g.domain()),u.xDomain=g.domain()),p&&(p.domain(n.getYDomain(n.data.targets,"y")),x.domain(p.domain())),v&&(v.domain(n.getYDomain(n.data.targets,"y2")),b&&b.domain(v.domain()))}if(s.svg=s.chart.append("svg").style("overflow","hidden").style("display","block"),f&&o.inputType){var m="touch"===o.inputType,_=i.onclick,T=i.onover,w=i.onout;s.svg.on("click",(null==_?void 0:_.bind(n.api))||null).on(m?"touchstart":"mouseenter",(null==T?void 0:T.bind(n.api))||null).on(m?"touchend":"mouseleave",(null==w?void 0:w.bind(n.api))||null)}i.svg_classname&&s.svg.attr("class",i.svg_classname);var A=Xa(i.color_tiles)&&n.patterns;(l||A||d||h||i.data_labels_backgroundColors)&&(s.defs=s.svg.append("defs"),l&&["id","idXAxis","idYAxis","idGrid"].forEach(function(t){a(this,e),n.appendClip(s.defs,o.clip[t])}.bind(this)),n.generateDataLabelBackgroundColorFilter(),A&&n.patterns.forEach(function(t){var n=this;return a(this,e),s.defs.append(function(){return a(this,n),t.node}.bind(this))}.bind(this))),n.updateSvgSize(),n.bindResize();var S,E=s.svg.append("g").classed(Lo.main,!0).attr("transform",h?null:n.getTranslate("main"));(s.main=E,i.subchart_show&&n.initSubchart(),i.tooltip_show&&n.initTooltip(),i.title_text&&n.initTitle(),!h&&i.legend_show&&n.initLegend(),i.data_empty_label_text&&E.append("text").attr("class",es.text+" "+Lo.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),l&&(i.regions.length&&n.initRegion(),i.clipPath||n.axis.init()),E.append("g").classed(Lo.chart,!0).attr("clip-path",l?o.clip.path:null),n.callPluginHook("$init"),n.initChartElements(),l)&&(f&&(null==n.initEventRect||n.initEventRect()),n.initGrid(),i.clipPath&&(null==(S=n.axis)||S.init()));if(n.updateTargets(n.data.targets),n.updateDimension(),io(i.oninit,n.api),n.setBackground(),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){var k=n.getMinMaxData();io(i.data_onmin,n.api,k.min),io(i.data_onmax,n.api,k.max)}i.tooltip_show&&n.initShowTooltip(),o.rendered=!0},e.initChartElements=function(){var t=this,e=this,n=e.state,i=n.hasAxis,r=n.hasRadar,o=n.hasTreemap,s=[];if(i){var u=["bar","bubble","candlestick","line"];e.config.bar_front&&u.push(u.shift()),u.forEach(function(n){a(this,t);var i=vo(n);("line"===n&&e.hasTypeOf(i)||e.hasType(n))&&s.push(i)}.bind(this))}else if(o)s.push("Treemap");else{var c=e.hasType("polar");r||s.push("Arc","Pie"),e.hasType("gauge")?s.push("Gauge"):r?s.push("Radar"):c&&s.push("Polar")}s.forEach(function(n){a(this,t),e["init"+n]()}.bind(this)),Qa(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()},e.setChartElements=function(){var t=this.$el,e=t.chart,n=t.svg,i=t.defs,r=t.main,a=t.tooltip,o=t.legend,s=t.title,u=t.grid,c=t.needle,l=t.arcs,h=t.circle,f=t.bar,d=t.candlestick,g=t.line,p=t.area,v=t.text;this.api.$={chart:e,svg:n,defs:i,main:r,tooltip:a,legend:o,title:s,grid:u,arc:l,circles:h,bar:{bars:f},candlestick:d,line:{lines:g,areas:p},needle:c,text:{texts:v}}},e.setBackground=function(){var t=this,e=t.config.background,n=t.state,i=t.$el.svg;if(Qa(e)){var r=i.select("g").insert(e.imgUrl?"image":"rect",":first-child");e.imgUrl?r.attr("href",e.imgUrl):e.color&&r.style("fill",e.color).attr("clip-path",n.clip.path),r.attr("class",e.class||null).attr("width","100%").attr("height","100%")}},e.updateTargets=function(t){var e=this,n=this,i=n.state,r=i.hasAxis,o=i.hasRadar,s=i.hasTreemap,u=function(i){return a(this,e),n["updateTargetsFor"+i](t.filter(n["is"+i+"Type"].bind(n)))}.bind(this);if(n.updateTargetsForText(t),r)["bar","candlestick","line"].forEach(function(t){a(this,e);var i=vo(t);("line"===t&&n.hasTypeOf(i)||n.hasType(t))&&u(i)}.bind(this)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t);else if(n.hasArcType(t)){var c="Arc";o?c="Radar":n.hasType("polar")&&(c="Polar"),u(c)}else s&&u("Treemap");var l=n.hasType("bubble")||n.hasType("scatter");l&&(null==n.updateTargetForCircle||n.updateTargetForCircle()),n.filterTargetsToShowAtInit(l)},e.filterTargetsToShowAtInit=function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.$el.svg,r=n.$T,o="."+Lo.target;t&&(o+=", ."+jo.chartCircles+" > ."+jo.circles),r(i.selectAll(o).filter(function(t){return a(this,e),n.isTargetToShow(t.id)}.bind(this))).style("opacity",null)},e.getWithOption=function(t){var e=this,n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};return Object.keys(n).forEach(function(i){a(this,e);var r=n[i];Ua(r)&&(r=n[r]),n[i]=no(t,"with"+i,r)}.bind(this)),n},e.initialOpacity=function(t){var e=this.state.withoutFadeIn;return null!==this.getBaseValue(t)&&e[t.id]?null:"0"},e.bindResize=function(){var t=this,e=this,n=e.config,i=e.state,r=function(t){var e,n=this,i=[],r=function(){var n=this;r.clear(),!1===t?Fn(function(){var t=this;a(this,n),i.forEach(function(e){return a(this,t),e()}.bind(this))}.bind(this),{timeout:200}):e=Is(function(){var t=this;a(this,n),i.forEach(function(e){return a(this,t),e()}.bind(this))}.bind(this),Ya(t)?t:200)};return r.clear=function(){a(this,n),e&&(Ls(e),e=null)}.bind(this),r.add=function(t){return a(this,n),i.push(t)}.bind(this),r.remove=function(t){return a(this,n),i.splice(i.indexOf(t),1)}.bind(this),r}(n.resize_timer),o=[];o.push(function(){return a(this,t),io(n.onresize,e.api)}.bind(this)),n.resize_auto&&o.push(function(){a(this,t),i.resizing=!0,n.legend_show&&(e.updateSizes(),e.updateLegend()),e.api.flush(!1)}.bind(this)),o.push(function(){a(this,t),io(n.onresized,e.api),i.resizing=!1}.bind(this)),o.forEach(function(e){return a(this,t),r.add(e)}.bind(this)),e.resizeFunction=r,In.addEventListener("resize",e.resizeFunction=r)},e.callPluginHook=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),r=1;r\n\t\t\t\n\t\t\t\t'+d+"\n\t\t\t\t"+h.replace(/(url\()[^#]+/g,"$1")+"\n\t\t\t").replace("/\n/g","%0A");return"data:image/svg+xml;base64,"+Nh(g)}function zh(t){var e=this,n=t.getBoundingClientRect(),i=n.left,r=n.top,o=function(t){return a(this,e),t.textContent||t.childElementCount}.bind(this),s=[];return yo(t.querySelectorAll("text")).filter(o).forEach(function(t){var n=this;a(this,e);var u=function(t){var e;a(this,n);var o=In.getComputedStyle(t),s=o.fill,u=o.fontFamily,c=o.fontSize,l=o.textAnchor,h=o.transform,f=function(t,e){var n=e.top,i=e.left,r=t.getBBox(),a=r.x,o=r.y,s=t.getScreenCTM(),u=s.a,c=s.b,l=s.c,h=s.d,f=s.e,d=s.f,g=t.getBoundingClientRect(),p=g.width,v=g.height;return{x:u*a+l*o+f-i,y:c*a+h*o+d-n+(v-Math.round(v/4)),width:p,height:v}}(t,{left:i,top:r}),d=f.x,g=f.y,p=f.width,v=f.height;return(e={})[t.textContent]={x:d,y:g,width:p,height:v,fill:s,fontFamily:u,fontSize:c,textAnchor:l,transform:h},e}.bind(this);if(t.childElementCount>1)return yo(t.querySelectorAll("tspan")).filter(o).forEach(function(t){a(this,n),s.push(u(t))}.bind(this)),[];s.push(u(t))}.bind(this)),s}var jh={export:function(t,e){var n=this,i=this.internal,r=i.state,o=i.$el,s=o.chart,u=o.svg,c=r.current,l=c.width,h=c.height,f=_o({width:l,height:h,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t),d=Fh(s.node(),f,{width:l,height:h}),g=f.preserveFontStyle?zh(u.node()):[];if(e&&Xa(e)){var p=new Image;p.crossOrigin="Anonymous",p.onload=function(){a(this,n);var t=zn.createElement("canvas"),i=t.getContext("2d");t.width=f.width||l,t.height=f.height||h,i.drawImage(p,0,0),g.length&&(!function(t,e){var n=this;e.forEach(function(e){var i=this;a(this,n),Object.keys(e).forEach(function(n){var r=this;a(this,i);var o=e[n],s=o.x,u=o.y,c=o.width,l=o.height,h=o.fill,f=o.fontFamily,d=o.fontSize,g=o.transform;if(t.save(),t.font=d+" "+f,t.fillStyle=h,"none"===g)t.fillText(n,s,u);else{var p=g.replace(/(matrix|\(|\))/g,"").split(",");p.splice(4).every(function(t){return a(this,r),0==+t}.bind(this))?(p.push(s+c-c/4),p.push(u-l+l/3)):(p.push(s),p.push(u)),t.transform.apply(t,p),t.fillText(n,0,0)}t.restore()}.bind(this))}.bind(this))}(i,g),g.length=0),e.bind(this)(t.toDataURL(f.mimeType))}.bind(this),p.src=d}return d}},Bh={focus:function(t){var e=this,n=this.internal,i=n.state,r=n.mapToTargetIds(t),o=n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),o.classed(Go.focused,!0).classed(Go.defocused,!1),n.hasArcType()&&!i.hasRadar&&(n.expandArc(r),n.hasType("gauge")&&n.markOverlapped(t,n,"."+Xo.gaugeValue)),n.toggleFocusLegend(r,!0),i.focusedTargetIds=r,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return a(this,e),r.indexOf(t)<0}.bind(this))},defocus:function(t){var e=this,n=this.internal,i=n.state,r=n.mapToTargetIds(t);n.$el.svg.selectAll(n.selectorTargets(r.filter(n.isTargetToShow,n))).classed(Go.focused,!1).classed(Go.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(r),n.hasType("gauge")&&n.undoMarkOverlapped(n,"."+Xo.gaugeValue)),n.toggleFocusLegend(r,!1),i.focusedTargetIds=i.focusedTargetIds.filter(function(t){return a(this,e),r.indexOf(t)<0}.bind(this)),i.defocusedTargetIds=r},revert:function(t){var e=this.internal,n=e.config,i=e.state,r=e.$el,a=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(a)).classed(Go.focused,!1).classed(Go.defocused,!1),e.hasArcType(null,["polar"])&&e.unexpandArc(a),n.legend_show&&(e.showLegend(a.filter(e.isLegendToShow.bind(e))),r.legend.selectAll(e.selectorLegends(a)).filter((function(){return Rn(this).classed(Go.legendItemFocused)})).classed(Go.legendItemFocused,!1)),i.focusedTargetIds=[],i.defocusedTargetIds=[]}},$h={legend:{show:function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},Xh={load:function(t){var e=this,n=this.internal,i=n.config;t.xs&&n.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(n){a(this,e),i.data_classes[n]=t.classes[n]}.bind(this)),"categories"in t&&n.axis.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(n){a(this,e),i.data_axes[n]=t.axes[n]}.bind(this)),"colors"in t&&Object.keys(t.colors).forEach(function(n){a(this,e),i.data_colors[n]=t.colors[n]}.bind(this)),"unload"in t&&!1!==t.unload?n.unload(n.mapToTargetIds(!0===t.unload?null:t.unload),function(){var i=this;a(this,e),Fn(function(){return a(this,i),n.loadFromArgs(t)}.bind(this))}.bind(this)):n.loadFromArgs(t)},unload:function(t){var e=this,n=this.internal,i=t||{};Ja(i)&&this.tooltip.hide(),to(i)?i={ids:i}:Ua(i)&&(i={ids:[i]});var r=n.mapToTargetIds(i.ids);n.unload(r,function(){a(this,e),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.cache.remove(r),au.call(n,i.done,i.resizeAfter)}.bind(this))}};function Uh(t,e,n){var i=this,r=this.internal,o=r.mapToTargetIds(e),s=r.state.hiddenTargetIds.map(function(t){return a(this,i),o.indexOf(t)>-1&&t}.bind(this)).filter(Boolean);r.state.toggling=!0,r[(t?"remove":"add")+"HiddenTargetIds"](o);var u=r.$el.svg.selectAll(r.selectorTargets(o)),c=t?null:"0";t&&s.length&&(u.style("display",null),io(r.config.data_onshown,this,s)),r.$T(u).style("opacity",c,"important").call(ro,function(){a(this,i),t||0!==s.length||(u.style("display","none"),io(r.config.data_onhidden,this,o)),u.style("opacity",c)}.bind(this)),n.withLegend&&r[(t?"show":"hide")+"Legend"](o),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),r.state.toggling=!1}var Yh={show:function(t,e){void 0===e&&(e={}),Uh.call(this,!0,t,e)},hide:function(t,e){void 0===e&&(e={}),Uh.call(this,!1,t,e)},toggle:function(t,e){var n=this;void 0===e&&(e={});var i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(t){return a(this,n),r[i.isTargetToShow(t)?"hide":"show"].push(t)}.bind(this)),r.show.length&&this.show(r.show,e),r.hide.length&&setTimeout(function(){return a(this,n),this.hide(r.hide,e)}.bind(this),0)}},Vh={show:function(t){var e,n,i=this,r=this.internal,o=r.$el,s=r.config,u=r.state,c=u.eventReceiver,l=u.hasTreemap,h=u.inputType;if(t.mouse&&(n=t.mouse),t.data){var f,d=t.data,g=null==(f=r.getYScaleById(d.id))?void 0:f(d.value);if(l&&d.id)c.rect=o.main.select(""+r.selectorTarget(d.id,void 0,"rect"));else if(r.isMultipleX())n=[r.xx(d),g];else{var p,v;s.tooltip_grouped||(n=[0,g]),e=null!=(p=d.index)?p:r.hasArcType()&&d.id?null==(v=r.getArcElementByIdOrIndex(d.id))?void 0:v.datum().index:r.getIndexByX(d.x)}}else Ga(t.x)?e=r.getIndexByX(t.x):Ga(t.index)&&(e=t.index);("mouse"===h?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){a(this,i),r.dispatchEvent(t,e,n)}.bind(this))},hide:function(){var t=this,e=this.internal,n=e.state.inputType,i=e.$el.tooltip,r=null==i?void 0:i.datum();if(r){var o=JSON.parse(r.current)[0].index;("mouse"===n?["mouseout"]:["touchend"]).forEach(function(n){a(this,t),e.dispatchEvent(n,o)}.bind(this))}"touch"===n&&e.callOverOutForTouch(),e.hideTooltip(!0),null==e.hideGridFocus||e.hideGridFocus(),null==e.unexpandCircles||e.unexpandCircles(),null==e.expandBarTypeShapes||e.expandBarTypeShapes(!1)}},Gh={tooltip:Vh},Hh=function t(e){this.plugins=[],this.internal=void 0;var n=new Ch(this);this.internal=n,function t(e,n,i){var r=this;Object.keys(e).forEach(function(o){a(this,r);var s=Xa(e[o]),u=n!==i,c=Qa(e[o]),l=c&&Object.keys(e[o]).length>0;n[o]=s&&(!u&&l||u)?e[o].bind(i):c&&!s?{}:e[o],l&&t(e[o],n[o],i)}.bind(this))}(t.prototype,this,this),Ih.call(n,e),n.beforeInit(),n.init()};function Wh(t,e,n){var i=this,r=t.config,o=function(t,n){a(this,i);var o=Ya(n)?n:!1===n?void 0:null;null!==o&&(r["axis_"+t+"_"+e]=o)}.bind(this);Ga(n)&&(Ka(n)?Object.keys(n).forEach(function(t){a(this,i),o(t,n[t])}.bind(this)):(Ya(n)||!1===n)&&["y","y2"].forEach(function(t){a(this,i),o(t,n)}.bind(this)),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function qh(t,e){var n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}}po(Hh.prototype,[Lh,{color:function(t){return this.internal.color(t)}},Dh,jh,Bh,$h,Xh,Yh,Gh]);var Zh={labels:function(t){var e,n=this,i=this.internal;return t&&(Object.keys(t).forEach(function(e){a(this,n),i.axis.setLabelText(e,t[e])}.bind(this)),i.axis.updateLabels()),["x","y","y2"].forEach(function(t){a(this,n);var r=i.axis.getLabelText(t);r&&(e||(e={}),e[t]=r)}.bind(this)),e},min:function(t){var e=this.internal;return $a(t)||!1===t?Wh(e,"min",t):qh(e,"min")},max:function(t){var e=this.internal;return $a(t)||!1===t?Wh(e,"max",t):qh(e,"max")},range:function(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};var n=t.min,i=t.max;Ga(i)&&e.max(i),Ga(n)&&e.min(n)}},Kh={axis:Zh};function Jh(t,e){var n=this.internal,i=n.config,r=i.transition_duration&&Mo(),a="grid_"+e+"_lines";return t?(i[a]=t,n.updateGrid(),n.redrawGrid(r),i[a]):i[a]}function Qh(t,e){return Jh.bind(this)(this.internal.config["grid_"+e+"_lines"].concat(t||[]),e)}function tf(t,e){this.internal.removeGridLines(t,e)}var ef=function(t){return Jh.bind(this)(t,"x")};po(ef,{add:function(t){return Qh.bind(this)(t,"x")},remove:function(t){return tf.bind(this)(t,!0)}});var nf=function(t){return Jh.bind(this)(t,"y")};po(nf,{add:function(t){return Qh.bind(this)(t,"y")},remove:function(t){return tf.bind(this)(t,!1)}});var rf={xgrids:ef,ygrids:nf},af={groups:function(t){var e=this.internal,n=e.config;return Va(t)||(n.data_groups=t,e.redraw()),n.data_groups}};function of(t,e){void 0===e&&(e=!1);var n=this.internal,i=n.config,r=i.transition_duration&&Mo();return t?(i.regions=e?i.regions.concat(t):t,n.updateRegion(),n.redrawRegion(r),e?i.regions:t):i.regions}var sf=function(t){return of.bind(this)(t)};po(sf,{add:function(t){return of.bind(this)(t,!0)},remove:function(t){var e=this,n=this.internal,i=n.config,r=n.$T,o=t||{},s=no(o,"classes",[Ko.region]),u=n.$el.main.select("."+Ko.regions).selectAll(s.map(function(t){return a(this,e),"."+t}.bind(this)));return r(u).style("opacity","0").remove(),u=i.regions,Object.keys(o).length?(u=u.filter(function(t){var n=this;a(this,e);var i=!1;return!t.class||(t.class.split(" ").forEach(function(t){a(this,n),s.indexOf(t)>=0&&(i=!0)}.bind(this)),!i)}.bind(this)),i.regions=u):i.regions=[],u}});var uf={regions:sf},cf={x:function(t){var e=this.internal,n=e.axis,i=e.data,r=n.isCustomX()&&n.isCategorized();return to(t)&&(r?this.categories(t):(e.updateTargetX(i.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),r?this.categories():i.xs},xs:function(t){var e=this.internal;return eo(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},lf={flow:function(t){var e,n=this,i=this.internal;(t.json||t.rows||t.columns)&&i.convertData(t,function(r){a(this,n),e=r,function(){var n,r,o,s=this,u=0,c=0;if(i.state.redrawing||!e||!Mo())return;var l=[],h=i.getMaxDataCount(),f=i.convertDataToTargets(e,!0),d=i.axis.isTimeSeries();i.data.targets.forEach(function(t){a(this,s);for(var e=!1,n=0;n1?g.values[g.values.length-1].x-p.x:p.x-i.getXDomain(i.data.targets)[0]:1,n=[p.x-r,p.x]);n&&i.updateXDomain(null,!0,!0,!1,n),i.updateTargets(i.data.targets),i.redraw({flow:{index:p.index,length:u,duration:$a(t.duration)?t.duration:i.config.transition_duration,done:t.done,orgDataCount:h},withLegend:!0,withTransition:h>1,withTrimXDomain:!1,withUpdateXAxis:!0})}()}.bind(this))}};function hf(t){return t}var ff=1,df=2,gf=3,pf=4,vf=1e-6;function yf(t){return"translate("+t+",0)"}function xf(t){return"translate(0,"+t+")"}function bf(t){var e=this;return function(n){return a(this,e),+t(n)}.bind(this)}function mf(t,e){var n=this;return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(i){return a(this,n),+t(i)+e}.bind(this)}function _f(){return!this.__axis}function Tf(t,e){var n=[],i=null,r=null,a=6,o=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=t===ff||t===pf?-1:1,l=t===pf||t===df?"x":"y",h=t===ff||t===gf?yf:xf;function f(f){var d=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,g=null==r?e.tickFormat?e.tickFormat.apply(e,n):hf:r,p=Math.max(a,0)+s,v=e.range(),y=+v[0]+u,x=+v[v.length-1]+u,b=(e.bandwidth?mf:bf)(e.copy(),u),m=f.selection?f.selection():f,_=m.selectAll(".domain").data([null]),T=m.selectAll(".tick").data(d,e).order(),w=T.exit(),A=T.enter().append("g").attr("class","tick"),S=T.select("line"),E=T.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(A),S=S.merge(A.append("line").attr("stroke","currentColor").attr(l+"2",c*a)),E=E.merge(A.append("text").attr("fill","currentColor").attr(l,c*p).attr("dy",t===ff?"0em":t===gf?"0.71em":"0.32em")),f!==m&&(_=_.transition(f),T=T.transition(f),S=S.transition(f),E=E.transition(f),w=w.transition(f).attr("opacity",vf).attr("transform",(function(t){return isFinite(t=b(t))?h(t+u):this.getAttribute("transform")})),A.attr("opacity",vf).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+u)}))),w.remove(),_.attr("d",t===pf||t===df?o?"M"+c*o+","+y+"H"+u+"V"+x+"H"+c*o:"M"+u+","+y+"V"+x:o?"M"+y+","+c*o+"V"+u+"H"+x+"V"+c*o:"M"+y+","+u+"H"+x),T.attr("opacity",1).attr("transform",(function(t){return h(b(t)+u)})),S.attr(l+"2",c*a),E.attr(l,c*p).text(g),m.filter(_f).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===df?"start":t===pf?"end":"middle"),m.each((function(){this.__axis=b}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),f):i&&i.slice()},f.tickFormat=function(t){return arguments.length?(r=t,f):r},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(u=+t,f):u},f}function wf(t){return Tf(ff,t)}function Af(t){return Tf(df,t)}function Sf(t){return Tf(gf,t)}function Ef(t){return Tf(pf,t)}var kf=function(){function t(t){this.owner=void 0,this.config=void 0,this.scale=void 0;var e=pl(),n=t.config,i=t.params;this.owner=t,this.config=n,this.scale=e,!n.noTransition&&i.config.transition_duration||(n.withoutTransition=!0),n.range=this.scaleExtent((i.orgXScale||e).range())}t.getSizeFor1Char=function(t){var e=this,n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){a(this,e);try{var i=t.node().getBBox(),r=i.width,o=i.height;r&&o&&(n.w=r,n.h=o)}catch(t){}finally{t.text("")}}.bind(this)),this.getSizeFor1Char=function(){return a(this,e),n}.bind(this),n};var e=t.prototype;return e.getTickTransformSetter=function(t){var e=this,n=this.config,i="x"===t?function(t){return a(this,e),"translate("+(t+n.tickOffset)+",0)"}.bind(this):function(t){return a(this,e),"translate(0,"+t+")"}.bind(this);return function(t,n){var r=this;a(this,e),t.attr("transform",function(t){return a(this,r),$a(t)?i(Math.ceil(n(t))):null}.bind(this))}.bind(this)},e.scaleExtent=function(t){var e=t[0],n=t[t.length-1];return e0?o:1,s]).range(t.range());u=h.ticks();for(var f=s.toFixed().length;u.length>15;f--)u=h.ticks(f);u.splice(0,1,o),u.splice(u.length-1,1,s)}u=u.map(function(t){return a(this,n),Ua(t)&&Ya(t)&&!isNaN(t)&&Math.round(10*t)/10||t}.bind(this))}else{for(var d=Math.ceil(o);d0&&u[0]>0&&u.unshift(u[0]-(u[1]-u[0]))}return u},e.copyScale=function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t.type=this.scale.type,t},e.textFormatted=function(t){var e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=e?e(n):n;return Ga(i)?i:""},e.transitionise=function(t){var e=this.config,n=t;if(e.withoutTransition)n=t.interrupt();else if(e.transition||!this.owner.params.noTransition)try{n=t.transition(e.transition)}catch(t){}return n},t}(),Mf=function(){function t(t){void 0===t&&(t={}),this.helper=void 0,this.config=void 0,this.params=void 0,this.g=void 0,this.generatedTicks=void 0;var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.config=e,this.params=t,this.helper=new kf(this)}var e=t.prototype;return e.create=function(t){var e=this,n=e.config,i=e.helper,r=e.params,o=i.scale,s=n.orient,u=this.splitTickText.bind(e),c=/^(left|right)$/.test(s),l=/^(top|bottom)$/.test(s),h=i.getTickTransformSetter(l?"x":"y"),f=h===i.axisX?"y":"x",d=/^(top|left)$/.test(s)?-1:1,g=r.tickTextRotate;this.config.range=o.rangeExtent?o.rangeExtent():i.scaleExtent((r.orgXScale||o).range());var p,v=n.innerTickSize,y=n.tickLength,x=n.range,b=r.id,m=b&&/^(x|y|y2)$/.test(b)?r.config["axis_"+b+"_tick_text_position"]:{x:0,y:0},_="subX"===b?"subchart_axis_x":"axis_"+b,T=r.config[_+"_show"],w=!!T&&r.config[_+"_tick_show"],A=!!T&&r.config[_+"_tick_text_show"];t.each((function(){var t=this,b=Rn(this),_=this.__chart__||o,T=i.copyScale();p=b,this.__chart__=T,n.tickOffset=r.isCategory?Math.ceil((T(1)-T(0))/2):0;var S=b.selectAll(".domain").data([0]);if(S.enter().append("path").attr("class","domain").merge(S).attr("d",function(){a(this,t);var e=n.outerTickSize*d;return l?"M"+x[0]+","+e+"V0H"+x[1]+"V"+e:"M"+e+","+x[0]+"H0V"+x[1]+"H"+e}.bind(this)),w||A){var E=n.tickValues||i.generateTicks(T,c);e.generatedTicks=E;var k=b.selectAll(".tick").data(E,T),M=k.enter().insert("g",".domain").attr("class","tick"),O=k.exit().remove();k=M.merge(k),w&&M.append("line"),A&&M.append("text");var R=kf.getSizeFor1Char(k),C=[],I=k.select("text").selectAll("tspan").data(function(e,n){var o=this;a(this,t);var s=r.tickMultiline?u(e,T,E,c,R.w):to(i.textFormatted(e))?i.textFormatted(e).concat():[i.textFormatted(e)];return C[n]=s.length,s.map(function(t){return a(this,o),{index:n,splitted:t}}.bind(this))}.bind(this));I.exit().remove(),(I=I.enter().append("tspan").merge(I).text(function(e){return a(this,t),e.splitted}.bind(this))).attr("x",l?0:y*d).attr("dx",function(){a(this,t);var e=0;return/(top|bottom)/.test(s)&&g&&(e=8*Math.sin(Math.PI*(g/180))*("top"===s?-1:1)),e+(m.x||0)}.bind(this)()).attr("dy",function(e,n){a(this,t);var i=0;return"top"!==s&&(i=R.h,0===n&&(i=c?-((C[e.index]-1)*(R.h/2)-3):0===m.y?".71em":0)),Ya(i)&&m.y?i+m.y:i||".71em"}.bind(this));var L=k.select("line"),P=k.select("text");if(M.select("line").attr(f+"2",v*d),M.select("text").attr(f,y*d),e.setTickLineTextPosition(L,P),r.tickTitle){var D=P.select("title");(D.empty()?P.append("title"):D).text(function(e){return a(this,t),r.tickTitle[e]}.bind(this))}if(T.bandwidth){var N=T,F=N.bandwidth()/2;_=function(e){return a(this,t),N(e)+F}.bind(this),T=_}else _.bandwidth?_=T:h(O,T);k=r.owner.state.flowing?i.transitionise(k):r.owner.$T(k),h(M,_),h(k.style("opacity",null),T)}})),this.g=p},e.getGeneratedTicks=function(t){var e,n=this,i=(null==(e=this.generatedTicks)?void 0:e.length)-1,r=this.generatedTicks;if(i>t){var o=Math.round(i/t+.1);r=this.generatedTicks.map(function(t,e){return a(this,n),e%o==0?t:null}.bind(this)).filter(function(t){return a(this,n),null!==t}.bind(this)).splice(0,t)}return r},e.getTickXY=function(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e},e.getTickSize=function(t){var e=this.helper.scale,n=this.config,i=n,r=i.innerTickSize,a=i.range,o=e(t)+(n.tickCentered?0:n.tickOffset);return a[0]0?0:1]:"middle"}.bind(this),f=function(t){return a(this,n),t?"rotate("+t+")":null}.bind(this),d=function(t){return a(this,n),t?11.5-2.5*(t/("bottom"===s?15:23))*(t>0?1:-1):u}.bind(this);switch(s){case"bottom":t.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"top":t.attr("x2",0).attr("y2",-o),e.attr("x",0).attr("y",2*-d(l)).style("text-anchor",h(l)).attr("transform",f(l));break;case"left":t.attr("x2",-o).attr("y1",i.y).attr("y2",i.y),e.attr("x",-u).attr("y",c).style("text-anchor","end");break;case"right":t.attr("x2",o).attr("y2",0),e.attr("x",u).attr("y",0).style("text-anchor","start")}},e.splitTickText=function(t,e,n,i,r){var a=this.params,o=this.helper.textFormatted(t),s=Ua(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(s.length)return s;if(to(o))return o;var u=a.tickWidth;return(!u||u<=0)&&(u=i?95:a.isCategory?Math.ceil(a.isInverted?e(n[0])-e(n[1]):e(n[1])-e(n[0]))-12:110),function t(e,n){for(var i,a,o,s=1;s=0||n.hasRadar},e.isCustomX=function(){var t=this.owner.config;return!this.isTimeSeries()&&(t.data_x||Qa(t.data_xs))},e.isTimeSeries=function(t){return void 0===t&&(t="x"),"timeseries"===this.owner.config["axis_"+t+"_type"]},e.isLog=function(t){return void 0===t&&(t="x"),"log"===this.owner.config["axis_"+t+"_type"]},e.isTimeSeriesY=function(){return this.isTimeSeries("y")},e.getAxisType=function(t){void 0===t&&(t="x");var e="linear";return this.isTimeSeries(t)?e=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(t)&&(e="log"),e},e.init=function(){var t=this,e=this.owner,n=e.config,i=e.$el,r=i.main,o=i.axis,s=e.state.clip,u=n.axis_rotated,c=["x","y"];n.axis_y2_show&&c.push("y2"),c.forEach(function(i){var c=this;a(this,t);var l=this.getAxisClassName(i),h=No["axis"+i.toUpperCase()+"Label"];o[i]=r.append("g").attr("class",l).attr("clip-path",function(){a(this,c);var t=null;return"x"===i?t=s.pathXAxis:"y"===i&&(t=s.pathYAxis),t}.bind(this)).attr("transform",e.getTranslate(i)).style("visibility",n["axis_"+i+"_show"]?null:"hidden"),o[i].append("text").attr("class",h).attr("transform",["rotate(-90)",null]["x"===i?+!u:+u]).style("text-anchor",function(){return a(this,c),this.textAnchorForAxisLabel(i)}.bind(this)),this.generateAxes(i)}.bind(this))},e.setOrient=function(){var t=this.owner.config,e=t.axis_rotated,n=t.axis_y_inner,i=t.axis_y2_inner;this.orient={x:e?"left":"bottom",y:e?n?"top":"bottom":n?"right":"left",y2:e?i?"bottom":"top":i?"left":"right",subX:e?"left":"bottom"}},e.generateAxes=function(t){var e,n=this,i=this.owner,r=i.config,o=[],s=r["axis_"+t+"_axes"],u=r.axis_rotated;"x"===t?e=u?Ef:Sf:"y"===t?e=u?Sf:Ef:"y2"===t&&(e=u?wf:Af),s.length&&s.forEach(function(r){var s=this;a(this,n);var u=r.tick||{},c=i.scale[t].copy();r.domain&&c.domain(r.domain),o.push(e(c).ticks(u.count).tickFormat(Xa(u.format)?u.format.bind(i.api):function(t){return a(this,s),t}.bind(this)).tickValues(u.values).tickSizeOuter(!1===u.outer?0:6))}.bind(this)),this.axesList[t]=o},e.updateAxes=function(){var t=this,e=this.owner,n=e.config,i=e.$el.main,r=e.$T;Object.keys(this.axesList).forEach(function(o){var s=this;a(this,t);var u=n["axis_"+o+"_axes"],c=e.scale[o].copy(),l=c.range();this.axesList[o].forEach(function(t,h){var f=this;a(this,s);var d=t.scale().range();l.every(function(t,e){return a(this,f),t===d[e]}.bind(this))||t.scale().range(l);var g=this.getAxisClassName(o)+"-"+(h+1),p=i.select("."+g.replace(/\s/,"."));p.empty()?p=i.append("g").attr("class",g).style("visibility",n["axis_"+o+"_show"]?null:"hidden").call(t):(u[h].domain&&c.domain(u[h].domain),r(p).call(t.scale(c))),p.attr("transform",e.getTranslate(o,h+1))}.bind(this))}.bind(this))},e.setAxis=function(t,e,n,i){var r=this.owner;"subX"!==t&&(this.tick[t]=this.getTickValues(t)),this[t]=this.getAxis(t,e,n,!("x"!==t||!(r.scale.zoom||r.config.subchart_show||r.state.resizing))||i)},e.getAxis=function(t,e,n,i,r){var o,s=this,u=this.owner,c=u.config,l=/^(x|subX)$/.test(t),h=l?"x":t,f=l&&this.isCategorized(),d=this.orient[t],g=r?0:u.getAxisTickRotate(h);if(l)o="subX"===t?u.format.subXAxisTick:u.format.xAxisTick;else{var p=c["axis_"+t+"_tick_format"];Xa(p)&&(o=p.bind(u.api))}var v=this.tick[h],y=_o({outerTick:n,noTransition:i,config:c,id:t,tickTextRotate:g,owner:u},l&&{isCategory:f,isInverted:c.axis_x_inverted,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTitle:f&&c.axis_x_tick_tooltip&&u.api.categories(),orgXScale:u.scale.x});l||(y.tickStepSize=c["axis_"+h+"_tick_stepSize"]);var x=new Mf(y).scale(l&&u.scale.zoom||e).orient(d);if(l&&this.isTimeSeries()&&v&&!Xa(v)){var b=ko.bind(u);v=v.map(function(t){return a(this,s),b(t)}.bind(this))}else!l&&this.isTimeSeriesY()&&(x.ticks(c.axis_y_tick_time_value),v=null);v&&x.tickValues(v),x.tickFormat(o||!l&&u.isStackNormalized()&&function(t){return a(this,s),t+"%"}.bind(this)),f&&(x.tickCentered(c.axis_x_tick_centered),Ja(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1));var m=c["axis_"+h+"_tick_count"];return m&&x.ticks(m),x},e.updateXAxisTickValues=function(t,e){var n,i=this.owner,r=i.config,a=r.axis_x_tick_fit,o=r.axis_x_tick_count;if((a||o&&a)&&(n=i.mapTargetsToUniqueXs(t),this.isCategorized()&&o>n.length&&(o=n.length),n=this.generateTickValues(n,o,this.isTimeSeries())),e)e.tickValues(n);else if(this.x){var s;this.x.tickValues(n),null==(s=this.subX)||s.tickValues(n)}return n},e.getId=function(t){var e=this.owner,n=e.config,i=e.scale,r=n.data_axes[t];return r&&i[r]||(r="y"),r},e.getXAxisTickFormat=function(t){var e,n=this,i=this.owner,r=i.config,o=i.format,s=t&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,u=this.isTimeSeries(),c=this.isCategorized();return s?Xa(s)?e=s.bind(i.api):u&&(e=function(t){return a(this,n),t?o.axisTime(s)(t):""}.bind(this)):e=u?o.defaultAxisTime:c?i.categoryName:function(t){return a(this,n),t<0?t.toFixed(0):t}.bind(this),Xa(e)?function(t){return a(this,n),e.apply(i,c?[t,i.categoryName(t)]:[t])}.bind(this):e},e.getTickValues=function(t){var e=this.owner,n=e.config["axis_"+t+"_tick_values"],i=e[t+"Axis"];return(Xa(n)?n.call(e.api):n)||(i?i.tickValues():void 0)},e.getLabelOptionByAxisId=function(t){return this.owner.config["axis_"+t+"_label"]},e.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return Ua(e)?e:e?e.text:null},e.setLabelText=function(t,e){var n=this.owner.config,i=this.getLabelOptionByAxisId(t);Ua(i)?n["axis_"+t+"_label"]=e:i&&(i.text=e)},e.getLabelPosition=function(t,e){var n=this,i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),o=Ka(r)&&r.position?r.position:e[+!i],s=function(t){return a(this,n),!!~o.indexOf(t)}.bind(this);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}},e.getAxisLabelPosition=function(t){return this.getLabelPosition(t,"x"===t?["inner-top","inner-right"]:["inner-right","inner-top"])},e.getLabelPositionById=function(t){return this.getAxisLabelPosition(t)},e.xForAxisLabel=function(t){var e=this.owner,n=e.state,i=n.width,r=n.height,a=this.getAxisLabelPosition(t),o=a.isMiddle?-r/2:0;return this.isHorizontal(e,"x"!==t)?o=a.isLeft?0:a.isCenter?i/2:i:a.isBottom&&(o=-r),o},e.dxForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isBottom?"0.5em":"0";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"0.5em":n.isRight?"-0.5em":"0":n.isTop&&(i="-0.5em"),i},e.textAnchorForAxisLabel=function(t){var e=this.owner,n=this.getAxisLabelPosition(t),i=n.isMiddle?"middle":"end";return this.isHorizontal(e,"x"!==t)?i=n.isLeft?"start":n.isCenter?"middle":"end":n.isBottom&&(i="start"),i},e.dyForAxisLabel=function(t){var e,n=this.owner,i=n.config,r=i.axis_rotated,a=this.getAxisLabelPosition(t).isInner,o=i["axis_"+t+"_tick_rotate"]?n.getHorizontalAxisHeight(t):0,s=this.getMaxTickWidth(t);if("x"===t){var u=i.axis_x_height;e=r?a?"1.2em":-25-s:a?"-0.5em":u?u-10:o?o-10:"3em"}else e={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[t],e=r?a?e[0]:o?o*("y2"===t?-1:1)-e[1]:e[2]:a?e[3]:(e[4]+(i["axis_"+t+"_inner"]?0:s+e[4]))*("y"===t?-1:1);return e},e.getMaxTickWidth=function(t,e){var n=this,i=this.owner,r=i.config,o=i.state.current,s=i.$el,u=s.svg,c=s.chart,l=o.maxTickWidths[t],h=0;if(e||!r["axis_"+t+"_show"]||l.size>0&&0===i.filterTargetsToShow().length)return l.size;if(u){var f=/^y2?$/.test(t),d=i.filterTargetsToShow(i.data.targets),g=i.scale[t].copy().domain(i["get"+(f?"Y":"X")+"Domain"](d,t)),p=g.domain(),v=p[0]===p[1]&&p.every(function(t){return a(this,n),t>0}.bind(this)),y=to(l.domain)&&l.domain[0]===l.domain[1]&&l.domain.every(function(t){return a(this,n),t>0}.bind(this));if(v||y)return l.size;l.domain=p,f||l.ticks.splice(0);var x=this.getAxis(t,g,!1,!1,!0),b=r["axis_"+t+"_tick_count"];!r["axis_"+t+"_tick_values"]&&b&&x.tickValues(this.generateTickValues(p,b,f?this.isTimeSeriesY():this.isTimeSeries())),f||this.updateXAxisTickValues(d,x);var m=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0");x.create(m),m.selectAll("text").each((function(t,e){var n=this.getBoundingClientRect().width;h=Math.max(h,n),f||(l.ticks[e]=n)})),m.remove()}return h>0&&(l.size=h),l.size},e.getXAxisTickTextY2Overflow=function(t){var e=this.owner,n=e.axis,i=e.config,r=e.state,a=e.getAxisTickRotate("x");if((n.isCategorized()||n.isTimeSeries())&&i.axis_x_tick_fit&&!i.axis_x_tick_culling&&!i.axis_x_tick_multiline&&a>0&&a<90){var o=r.current.width-e.getCurrentPaddingLeft(),s=this.getXAxisTickMaxOverflow(a,o-t),u=Math.max(0,s)+t;return Math.min(u,o/2)}return 0},e.getXAxisTickMaxOverflow=function(t,e){for(var n=this.owner,i=n.axis,r=n.config,a=n.state,o=i.isTimeSeries(),s=a.current.maxTickWidths.x.ticks,u=s.length,c=a.axis.x.padding,l=c.left,h=c.right,f=0,d=u-(o&&r.axis_x_tick_fit?.5:0),g=0;g2){var s,u=this.isCategorized(),c=o-2,l=t[0],h=t[t.length-1];r=[l];for(var f=0;f=d)&&(t=!0,n.preventDefault())}.bind(this);s.on("touchstart",function(t){a(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("touchstart.eventRect touchmove.eventRect",function(t){if(a(this,e),r.event=t,!s.empty()&&s.classed(Vo.eventRect)){if(r.dragging||r.flowing||n.hasArcType()||t.touches.length>1)return;g(t),c(s.node())}else l()}.bind(this),!0).on("touchend.eventRect",function(t){a(this,e),r.event=t,!s.empty()&&s.classed(Vo.eventRect)&&(n.hasArcType()||!n.toggleShape||r.cancelClick)&&r.cancelClick&&(r.cancelClick=!1)}.bind(this),!0),u.on("touchstart",function(t){a(this,e),r.event=t;var n=t.target;n&&n!==s.node()&&l()}.bind(this))},updateEventRect:function(t,e){var n=this;void 0===e&&(e=!1);var i=this.state,r=this.$el,o=i,s=o.eventReceiver,u=o.width,c=o.height,l=o.rendered,h=o.resizing,f=t||r.eventRect,d=function(){a(this,n),s&&(s.rect=f.node().getBoundingClientRect())}.bind(this);(!l||h||e)&&(f.attr("x",0).attr("y",0).attr("width",u).attr("height",c),l&&!e||f.classed(Vo.eventRect,!0)),d()},updateEventRectData:function(){var t,e,n,i,r=this,o=this,s=o.config,u=o.scale,c=o.state,l=u.zoom||u.x,h=s.axis_rotated;if(o.isMultipleX())t=0,e=0,n=c.width,i=c.height;else{var f,d;if(o.axis.isCategorized())f=o.getEventRectWidth(),d=function(t){return a(this,r),l(t.x)-f/2}.bind(this);else{var g=function(t){var e=t.index;return a(this,r),{prev:o.getPrevX(e),next:o.getNextX(e)}}.bind(this);f=function(t){var e=this;a(this,r);var n,i=g(t),o=l.domain();return null===i.prev&&null===i.next?n=h?c.height:c.width:null===i.prev?n=(l(i.next)+l(t.x))/2:null===i.next?n=l(o[1])-(l(i.prev)+l(t.x))/2:(Object.keys(i).forEach(function(t,n){var r;a(this,e),i[t]=null!=(r=i[t])?r:o[n]}.bind(this)),n=Math.max(0,(l(i.next)-l(i.prev))/2)),n}.bind(this),d=function(t){a(this,r);var e=g(t);return null===e.prev&&null===e.next?0:null===e.prev?l(l.domain()[0]):(l(t.x)+l(e.prev))/2}.bind(this)}t=h?0:d,e=h?d:0,n=h?c.width:f,i=h?f:c.height}var p=c.eventReceiver,v=function(t,e){return a(this,r),Xa(t)?t(e):t}.bind(this);p.coords.splice(p.data.length),p.data.forEach(function(o,s){a(this,r),p.coords[s]={x:v(t,o),y:v(e,o),w:v(n,o),h:v(i,o)}}.bind(this))},selectRectForSingle:function(t,e){var n=this,i=this,r=i.config,o=i.$el,s=o.main,u=o.circle,c=r.data_selection_enabled,l=r.data_selection_grouped,h=r.data_selection_isselectable,f=r.tooltip_grouped,d=i.getAllValuesOnIndex(e);if(!f||(i.showTooltip(d,t),null==i.showGridFocus||i.showGridFocus(d),c&&!l)){u||s.selectAll("."+Lo.EXPANDED+":not(."+Qo.shape+"-"+e+")").classed(Lo.EXPANDED,!1);var g=s.selectAll("."+Qo.shape+"-"+e).classed(Lo.EXPANDED,!0).style("cursor",h?"pointer":null).filter((function(t){return i.isWithinShape(this,t)}));g.empty()&&!f&&(null==i.hideGridFocus||i.hideGridFocus(),i.hideTooltip(),l||i.setExpand(e)),g.call(function(r){var o=this;a(this,n);var s=r.data();c&&(l||null!=h&&h.bind(i.api)(s))&&(t.style.cursor="pointer"),f||(i.showTooltip(s,t),null==i.showGridFocus||i.showGridFocus(s),null==i.unexpandCircles||i.unexpandCircles(),r.each(function(t){return a(this,o),i.setExpand(e,t.id)}.bind(this)))}.bind(this))}},selectRectForMultipleXs:function(t,e){var n=this;void 0===e&&(e=!0);var i=this,r=i.config,o=i.state,s=i.filterTargetsToShow(i.data.targets);if(!o.dragging&&!i.hasArcType(s)){var u=uo(o.event,t),c=i.findClosestFromTargets(s,u);if(!e||!o.mouseover||c&&c.id===o.mouseover.id||(r.data_onout.call(i.api,o.mouseover),o.mouseover=void 0),c){var l=(i.isBubbleType(c)||i.isScatterType(c)||!r.tooltip_grouped?[c]:i.filterByX(s,c.x)).map(function(t){return a(this,n),i.addName(t)}.bind(this));i.showTooltip(l,t),i.setExpand(c.index,c.id,!0),i.showGridFocus(l);var h=i.dist(c,u);(i.isBarType(c.id)||h-1?o.data[i]:null}.bind(this);s.on("mouseover",function(t){a(this,e),r.event=t,n.updateEventRect()}.bind(this)).on("mousemove",(function(t){var e=u(t);if(r.event=t,e){var a=e.index,s=i.line_step_type;if(i.line_step_tooltipMatch&&n.hasType("step")&&/^step\-(before|after)$/.test(s)){var c=n.scale.zoom||n.scale.x,l=n.axis.xs[a],h=c.invert(uo(t,this)[0]);"step-after"===s&&hl&&(a+=1)}var f=i.tooltip_grouped&&a===o.currentIdx;r.dragging||r.flowing||n.hasArcType()||f?f&&n.setTooltipPosition():(a!==o.currentIdx&&(n.setOverOut(!1,o.currentIdx),o.currentIdx=a),-1===a?n.unselectRect():n.selectRectForSingle(this,a),n.setOverOut(-1!==a,a))}})).on("mouseout",function(t){a(this,e),r.event=t,i&&!n.hasArcType()&&-1!==o.currentIdx&&(n.unselectRect(),n.setOverOut(!1,o.currentIdx),o.currentIdx=-1)}.bind(this))}return s},clickHandlerForSingleX:function(t,e){var n=e,i=n.config,r=n.state,a=n.$el.main;if(!t||n.hasArcType()||r.cancelClick)r.cancelClick&&(r.cancelClick=!1);else{var o=t.index;a.selectAll("."+Qo.shape+"-"+o).each((function(t){(i.data_selection_grouped||n.isWithinShape(this,t))&&(null==n.toggleShape||n.toggleShape(this,t,o),i.data_onclick.bind(n.api)(t,this))}))}},generateEventRectsForMultipleXs:function(t){var e=this,n=this,i=n.state;t.on("click",(function(t){i.event=t,n.clickHandlerForMultipleXS.bind(this)(n)})),"mouse"===i.inputType&&t.on("mouseover mousemove",(function(t){i.event=t,n.selectRectForMultipleXs(this)})).on("mouseout",function(t){a(this,e),i.event=t,n.config&&!n.hasArcType()&&n.unselectRect()}.bind(this))},clickHandlerForMultipleXS:function(t){var e=t,n=e.config,i=e.state,r=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(r)){var a=uo(i.event,this),o=e.findClosestFromTargets(r,a);o&&(e.isBarType(o.id)||e.dist(o,a)1&&(i=i[n[1]]),null!=(e=i)&&e.size()&&(u[t]=i)}.bind(this)),e.hideGridFocus(),e.setFlowList(u,t)}},setFlowList:function(t,e){var n,i=this,r=this,o=e.flow,s=e.targets,u=o,c=u.duration,l=void 0===c?e.duration:c,h=u.index,f=u.length,d=u.orgDataCount,g=r.getFlowTransform(s,d,h,f),p=Ps();p.add(Object.keys(t).map(function(e){var o=this;return a(this,i),n=t[e].transition().ease(If).duration(l),n="axis.x"===e?n.call(function(t){a(this,o),r.axis.x.setTransition(t).create(t)}.bind(this)):"region.list"===e?n.filter(r.isRegionOnX).attr("transform",g):n.attr("transform",g)}.bind(this))),n.call(p,function(){a(this,i),r.cleanUpFlow(t,e)}.bind(this))},cleanUpFlow:function(t,e){var n=this,i=this,r=i.config,o=i.state,s=i.$el.svg,u=r.axis_rotated,c=e.flow,l=e.shape,h=e.xv,f=l.pos,d=f.cx,g=f.cy,p=f.xForText,v=f.yForText,y=c,x=y.done,b=void 0===x?function(){a(this,n)}.bind(this):x,m=y.length;m&&(["circle","text","shape","eventRect"].forEach(function(t){a(this,n);for(var e=[],i=0;i=0?"":zn.URL.split("#")[0])+"#"+t+")"},appendClip:function(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath:function(t){var e=this.config,n=this.state,i=n.margin,r=n.width,a=n.height,o=e.axis_rotated,s=Math.max(30,i.left)-(o?0:20),u=o?-(1+s):-(s-1),c=-Math.max(15,i.top),l=o?i.left+20:r+10+s,h=(o?i.top+a+10:i.bottom)+20;t.attr("x",u).attr("y",c).attr("width",l).attr("height",h)},setYAxisClipPath:function(t){var e,n=this.config,i=this.state,r=i.margin,a=i.width,o=i.height,s=n.axis_rotated,u=Math.max(30,r.left)-(s?20:0),c=n.axis_y_inner,l=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+u):-(u-1),h=-(s?20:r.top),f=(s?a+15+u:r.left+20)+(c?20:0),d=(s?r.bottom+("fit"===(null==(e=n.padding)?void 0:e.mode)?10:0):r.top+o)+10;t.attr("x",l).attr("y",h).attr("width",f).attr("height",d)},updateXAxisTickClip:function(){var t=this,e=t.config,n=t.state,i=n.clip,r=n.xAxisHeight,a=t.$el.defs,o=t.getHorizontalAxisHeight("x");if(a&&!i.idXAxisTickTexts){var s=i.id+"-xaxisticktexts";t.appendClip(a,s),i.pathXAxisTickTexts=t.getClipPath(i.idXAxisTickTexts),i.idXAxisTickTexts=s}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth:function(){var t=this,e=t.config,n=t.state.current.maxTickWidths,i=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&i){var r=Math.sin(Math.PI/180*Math.abs(i));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/r}else n.x.clipPath=null},setXAxisTickTextClipPathWidth:function(){var t=this.state,e=t.clip,n=t.current,i=this.$el.svg;i&&i.select("#"+e.idXAxisTickTexts+" rect").attr("width",n.maxTickWidths.x.clipPath).attr("height",30)}},Df=void 0,Nf=function(t){return a(this,Df),$a(t.position)||"end"}.bind(void 0),Ff=function(t){return a(this,Df),"start"===t.position?4:"middle"===t.position?0:-4}.bind(void 0);function zf(t,e,n){var i=this;return function(r){a(this,i);var o=t?0:e;return"start"===r.position?o=t?-n:0:"middle"===r.position&&(o=(t?-n:e)/2),o}.bind(this)}function jf(t,e){"grid"===e&&t.each((function(){var t=this,e=Rn(this);["x1","x2","y1","y2"].forEach(function(n){return a(this,t),e.attr(n,Math.ceil(+e.attr(n)))}.bind(this))}))}var Bf={hasGrid:function(){var t=this,e=this.config;return["x","y"].some(function(n){return a(this,t),e["grid_"+n+"_show"]||e["grid_"+n+"_lines"].length}.bind(this))},initGrid:function(){var t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el;(e.grid_x_lines.length||e.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g","."+Lo.chart+(e.grid_lines_front?" + *":"")).attr("clip-path",n.pathGrid).attr("class",Ho.grid+" "+Ho.gridLines),i.gridLines.main.append("g").attr("class",Ho.xgridLines),i.gridLines.main.append("g").attr("class",Ho.ygridLines),i.gridLines.x=Th([]))},updateXGrid:function(t){var e=this,n=this,i=n.config,r=n.scale,o=n.state,s=n.$el,u=s.main,c=s.grid,l=i.axis_rotated,h=n.generateGridData(i.grid_x_type,r.x),f=n.axis.isCategorized()?n.axis.x.tickOffset():0,d=function(t){return a(this,e),(r.zoom||r.x)(t)+f*(l?-1:1)}.bind(this);o.xgridAttr=l?{x1:0,x2:o.width,y1:d,y2:d}:{x1:d,x2:d,y1:0,y2:o.height},c.x=u.select("."+Ho.xgrids).selectAll("."+Ho.xgrid).data(h),c.x.exit().remove(),c.x=c.x.enter().append("line").attr("class",Ho.xgrid).merge(c.x),t||c.x.each((function(){var t=this,e=Rn(this);Object.keys(o.xgridAttr).forEach(function(n){var i=this;a(this,t),e.attr(n,o.xgridAttr[n]).style("opacity",function(){return a(this,i),e.attr(l?"y1":"x1")===(l?o.height:0)?"0":null}.bind(this))}.bind(this))}))},updateYGrid:function(){var t=this,e=this,n=e.axis,i=e.config,r=e.scale,o=e.state,s=e.$el,u=s.grid,c=s.main,l=i.axis_rotated,h=function(e){return a(this,t),Math.ceil(r.y(e))}.bind(this),f=n.y.getGeneratedTicks(i.grid_y_ticks)||e.scale.y.ticks(i.grid_y_ticks);u.y=c.select("."+Ho.ygrids).selectAll("."+Ho.ygrid).data(f),u.y.exit().remove(),u.y=u.y.enter().append("line").attr("class",Ho.ygrid).merge(u.y),u.y.attr("x1",l?h:0).attr("x2",l?h:o.width).attr("y1",l?0:h).attr("y2",l?o.height:h),jf(u.y,"grid")},updateGrid:function(){var t=this,e=t.$el,n=e.grid;e.gridLines.main||t.initGridLines(),n.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateXGridLines(),t.updateYGridLines()},updateXGridLines:function(){var t=this,e=this,n=e.config,i=e.$el,r=i.gridLines,o=i.main,s=e.$T,u=n.axis_rotated;n.grid_x_show&&e.updateXGrid();var c=o.select("."+Ho.xgridLines).selectAll("."+Ho.xgridLine).data(n.grid_x_lines);s(c.exit()).style("opacity","0").remove();var l=c.enter().append("g");l.append("line").style("opacity","0"),l.append("text").attr("transform",u?null:"rotate(-90)").attr("dy",-5).style("opacity","0"),s((c=l.merge(c)).attr("class",function(e){return a(this,t),(Ho.xgridLine+" "+(e.class||"")).trim()}.bind(this)).select("text").attr("text-anchor",Nf).attr("dx",Ff)).text(function(e){return a(this,t),e.text}.bind(this)).style("opacity",null),r.x=c},updateYGridLines:function(){var t=this,e=this,n=e.config,i=e.state,r=i.width,o=i.height,s=e.$el,u=e.$T,c=n.axis_rotated;n.grid_y_show&&e.updateYGrid();var l=s.main.select("."+Ho.ygridLines).selectAll("."+Ho.ygridLine).data(n.grid_y_lines);u(l.exit()).style("opacity","0").remove();var h=l.enter().append("g");h.append("line").style("opacity","0"),h.append("text").attr("transform",c?"rotate(-90)":"").style("opacity","0"),l=h.merge(l);var f=e.yv.bind(e);u(l.attr("class",function(e){return a(this,t),(Ho.ygridLine+" "+(e.class||"")).trim()}.bind(this)).select("line")).attr("x1",c?f:0).attr("x2",c?f:r).attr("y1",c?0:f).attr("y2",c?o:f).style("opacity",null),u(l.select("text").attr("text-anchor",Nf).attr("dx",Ff)).attr("dy",-5).attr("x",zf(c,r,o)).attr("y",f).text(function(e){return a(this,t),e.text}.bind(this)).style("opacity",null),s.gridLines.y=l},redrawGrid:function(t){var e=this,n=this,i=n.config.axis_rotated,r=n.state,o=r.width,s=r.height,u=n.$el.gridLines,c=n.$T,l=n.xv.bind(n),h=u.x.select("line"),f=u.x.select("text");return h=c(h,t).attr("x1",i?0:l).attr("x2",i?o:l).attr("y1",i?l:0).attr("y2",i?l:s),f=c(f,t).attr("x",zf(!i,o,s)).attr("y",l).text(function(t){return a(this,e),t.text}.bind(this)),[h.style("opacity",null),f.style("opacity",null)]},initFocusGrid:function(){var t=this,e=t.config,n=t.state.clip,i=t.$el,r=e.grid_front,a="."+(r&&i.gridLines.main?Ho.gridLines:Lo.chart)+(r?" + *":""),o=i.main.insert("g",a).attr("clip-path",n.pathGrid).attr("class",Ho.grid);i.grid.main=o,e.grid_x_show&&o.append("g").attr("class",Ho.xgrids),e.grid_y_show&&o.append("g").attr("class",Ho.ygrids),e.interaction_enabled&&e.grid_focus_show&&(o.append("g").attr("class",Go.xgridFocus).append("line").attr("class",Go.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&o.append("g").attr("class",Go.ygridFocus).append("line").attr("class",Go.ygridFocus))},showGridFocus:function(t){var e=this,n=this,i=n.config,r=n.state,o=r.width,s=r.height,u=i.axis_rotated,c=n.$el.main.selectAll("line."+Go.xgridFocus+", line."+Go.ygridFocus),l=(t||[c.datum()]).filter(function(t){return a(this,e),t&&$a(n.getBaseValue(t))}.bind(this));if(i.tooltip_show&&0!==l.length&&!n.hasType("bubble")&&!n.hasArcType()){var h=i.grid_focus_edge&&!i.tooltip_grouped,f=n.xx.bind(n);c.style("visibility",null).data(l.concat(l)).each((function(t){var e,i=this,r=Rn(this),c={x:f(t),y:n.getYScaleById(t.id)(t.value)};if(r.classed(Go.xgridFocus))e=u?[null,c.x,h?c.y:o,c.x]:[c.x,h?c.y:null,c.x,s];else{var l="y2"===n.axis.getId(t.id);e=u?[c.y,h&&!l?c.x:null,c.y,h&&l?c.x:s]:[h&&l?c.x:null,c.y,h&&!l?c.x:o,c.y]}["x1","y1","x2","y2"].forEach(function(t,n){return a(this,i),r.attr(t,e[n])}.bind(this))})),jf(c,"grid"),null==n.showCircleFocus||n.showCircleFocus(t)}},hideGridFocus:function(){var t=this,e=t.state,n=e.inputType,i=e.resizing,r=t.$el.main;"mouse"!==n&&i||(r.selectAll("line."+Go.xgridFocus+", line."+Go.ygridFocus).style("visibility","hidden"),null==t.hideCircleFocus||t.hideCircleFocus())},updateGridFocus:function(){var t=this,e=t.state,n=e.inputType,i=e.width,r=e.height,a=e.resizing,o=t.$el.grid.main.select("line."+Go.xgridFocus);if("touch"===n)o.empty()?a&&(null==t.showCircleFocus||t.showCircleFocus()):t.showGridFocus();else{var s=t.config.axis_rotated;o.attr("x1",s?0:-10).attr("x2",s?i:-10).attr("y1",s?-10:0).attr("y2",s?-10:r)}return!0},generateGridData:function(t,e){var n=this,i=this.$el.main.select("."+No.axisX).selectAll(".tick").size(),r=[];if("year"===t)for(var o=this.getXDomain().map(function(t){return a(this,n),t.getFullYear()}.bind(this)),s=o[0],u=o[1],c=s;c<=u;c++)r.push(new Date(c+"-01-01 00:00:00"));else(r=e.ticks(10)).length>i&&(r=r.filter(function(t){return a(this,n),(t+"").indexOf(".")<0}.bind(this)));return r},getGridFilterToRemove:function(t){var e=this;return t?function(n){var i=this;a(this,e);var r=!1;return(to(t)?t.concat():[t]).forEach(function(t){a(this,i),("value"in t&&n.value===t.value||"class"in t&&n.class===t.class)&&(r=!0)}.bind(this)),r}.bind(this):function(){return a(this,e),!0}.bind(this)},removeGridLines:function(t,e){var n=this,i=this,r=i.config,o=i.$T,s=i.getGridFilterToRemove(t),u=function(t){return a(this,n),!s(t)}.bind(this),c=e?Ho.xgridLines:Ho.ygridLines,l=e?Ho.xgridLine:Ho.ygridLine;o(i.$el.main.select("."+c).selectAll("."+l).filter(s)).style("opacity","0").remove();var h="grid_"+(e?"x":"y")+"_lines";r[h]=r[h].filter(u)}},$f={initRegion:function(){var t=this.$el;t.region.main=t.main.insert("g",":first-child").attr("clip-path",this.state.clip.path).attr("class",Ko.regions)},updateRegion:function(){var t=this,e=t.config,n=t.$el.region,i=t.$T;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);var r=n.main.selectAll("."+Ko.region).data(e.regions);i(r.exit()).style("opacity","0").remove();var a=r.enter().append("g");a.append("rect").style("fill-opacity","0"),n.list=a.merge(r).attr("class",t.classRegion.bind(t)),n.list.each((function(t){var e;0===Rn(this).select("text").size()&&null!=(e=t.label)&&e.text&&Rn(this).append("text").style("opacity","0")}))},redrawRegion:function(t){var e=this,n=this,i=n.$el.region,r=n.$T,o=i.list.select("rect"),s=i.list.selectAll("text");return o=r(o,t).attr("x",n.regionX.bind(n)).attr("y",n.regionY.bind(n)).attr("width",n.regionWidth.bind(n)).attr("height",n.regionHeight.bind(n)),s=r(s,t).attr("transform",function(t){var i;a(this,e);var r=null!=(i=t.label)?i:{},o=r.x,s=void 0===o?0:o,u=r.y,c=void 0===u?0:u,l=r.rotated,h=void 0!==l&&l;return"translate("+(n.regionX.bind(n)(t)+s)+", "+(n.regionY.bind(n)(t)+c)+")"+(h?" rotate(-90)":"")}.bind(this)).attr("text-anchor",function(t){var n;return a(this,e),null!=(n=t.label)&&n.rotated?"end":null}.bind(this)).attr("dy","1em").style("fill",function(t){var n,i;return a(this,e),null!=(n=null==(i=t.label)?void 0:i.color)?n:null}.bind(this)).text(function(t){var n;return a(this,e),null==(n=t.label)?void 0:n.text}.bind(this)),[o.style("fill-opacity",function(t){return a(this,e),$a(t.opacity)?t.opacity:null}.bind(this)).on("end",(function(){Rn(this.parentNode).selectAll("rect:not([x])").remove()})),s.style("opacity",null)]},getRegionXY:function(t,e){var n=this,i=n.config,r=n.scale,a=i.axis_rotated,o="x"===t,s="start",u=0;return"y"===e.axis||"y2"===e.axis?(o||(s="end"),(o?a:!a)&&s in e&&(u=(0,r[e.axis])(e[s]))):(o?!a:a)&&s in e&&(u=(r.zoom||r.x)(n.axis.isTimeSeries()?ko.call(n,e[s]):e[s])),u},regionX:function(t){return this.getRegionXY("x",t)},regionY:function(t){return this.getRegionXY("y",t)},getRegionSize:function(t,e){var n=this,i=n.config,r=n.scale,a=n.state,o=i.axis_rotated,s="width"===t,u=n[s?"regionX":"regionY"](e),c="end",l=a[t];return"y"===e.axis||"y2"===e.axis?(s||(c="start"),(s?o:!o)&&c in e&&(l=(0,r[e.axis])(e[c]))):(s?!o:o)&&c in e&&(l=(r.zoom||r.x)(n.axis.isTimeSeries()?ko.call(n,e[c]):e[c])),lo.height/2&&(g=o.height/2)),g+(i.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||l?0:-10)},getEventRectWidth:function(){var t=this.config,e=this.axis,n=t.axis_x_inverted,i=e.x.tickInterval();return Math.max(0,n?Math.abs(i):i)},getAxisTickRotate:function(t){var e=this,n=e.axis,i=e.config,r=e.state,a=e.$el,o=i["axis_"+t+"_tick_rotate"];if("x"===t){var s=n.isCategorized()||n.isTimeSeries();if(i.axis_x_tick_fit&&s){var u=i.axis_x_tick_count,c=r.current.maxTickWidths.x.ticks.length,l=0;if(u?l=u>c?c:u:c&&(l=c),l!==r.axis.x.tickCount){var h=e.data.targets;r.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(h,"min"),e.getXDomainMinMax(h,"max")],l)}r.axis.x.tickCount=l}a.svg&&i.axis_x_tick_fit&&!i.axis_x_tick_multiline&&!i.axis_x_tick_culling&&i.axis_x_tick_autorotate&&s&&(o=e.needToRotateXAxisTickTexts()?i.axis_x_tick_rotate:0)}return o},needToRotateXAxisTickTexts:function(){var t=this,e=t.state,n=e.axis,i=e.current.width-t.getCurrentPaddingLeft(!1)-t.getCurrentPaddingRight(),r=n.x.tickCount+n.x.padding.left+n.x.padding.right;return t.axis.getMaxTickWidth("x")>(r?i/r:0)}},Uf={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},Yf={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]};function Vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gf(t){for(var e,n=1;n1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}},lf,rf,af,uf,cf],qf=[Of,Pf,Cf,Lf,Bf,$f,Xf],Zf=[{data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1},Hf,{grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0}];Array.prototype.slice;function Kf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Jf(t){return function(){return t}}function Qf(t,e){return et?1:e>=t?0:NaN}function td(t){return t}function ed(t,e){return e||(e=t.slice(0)),t.raw=e,t}var nd,id,rd,ad,od,sd,ud,cd,ld,hd,fd,dd,gd,pd,vd=Math.PI,yd=2*vd,xd=1e-6,bd=yd-xd;function md(t){this._+=t[0];for(var e=1,n=t.length;e=0))throw new Error("invalid digits: "+t);if(e>15)return md;var n=Math.pow(10,e);return function(t){this._+=t[0];for(var e=1,i=t.length;exd)if(Math.abs(l*s-u*c)>xd&&r){var f=n-a,d=i-o,g=s*s+u*u,p=Math.sqrt(g),v=Math.sqrt(h),y=r*Math.tan((vd-Math.acos((g+h-(f*f+d*d))/(2*p*v)))/2),x=y/v,b=y/p;Math.abs(x-1)>xd&&this._append(cd||(cd=ed(["L",",",""])),t+x*c,e+x*l),this._append(ld||(ld=ed(["A",",",",0,0,",",",",",""])),r,r,+(l*f>c*d),this._x1=t+b*s,this._y1=e+b*u)}else this._append(ud||(ud=ed(["L",",",""])),this._x1=t,this._y1=e);else;},e.arc=function(t,e,n,i,r,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);var o=n*Math.cos(i),s=n*Math.sin(i),u=t+o,c=e+s,l=1^a,h=a?i-r:r-i;null===this._x1?this._append(hd||(hd=ed(["M",",",""])),u,c):(Math.abs(this._x1-u)>xd||Math.abs(this._y1-c)>xd)&&this._append(fd||(fd=ed(["L",",",""])),u,c),n&&(h<0&&(h=h%yd+yd),h>bd?this._append(dd||(dd=ed(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,l,t-o,e-s,n,n,l,this._x1=u,this._y1=c):h>xd&&this._append(gd||(gd=ed(["A",",",",0,",",",",",",",""])),n,n,+(h>=vd),l,this._x1=t+n*Math.cos(r),this._y1=e+n*Math.sin(r)))},e.rect=function(t,e,n,i){this._append(pd||(pd=ed(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+e,n=+n,+i,-n)},e.toString=function(){return this._},t}();function Td(t){var e=this,n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{var i=Math.floor(e);if(!(i>=0))throw new RangeError("invalid digits: "+e);n=i}return t},function(){return a(this,e),new _d(n)}.bind(this)}function wd(t){return t.innerRadius}function Ad(t){return t.outerRadius}function Sd(t){return t.startAngle}function Ed(t){return t.endAngle}function kd(t){return t&&t.padAngle}function Md(t,e,n,i,r,a,o){var s=t-n,u=e-i,c=(o?a:-a)/Bl(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,g=n+l,p=i+h,v=(f+g)/2,y=(d+p)/2,x=g-f,b=p-d,m=x*x+b*b,_=r-a,T=f*p-g*d,w=(b<0?-1:1)*Bl(Fl(0,_*_*m-T*T)),A=(T*b-x*w)/m,S=(-T*x-b*w)/m,E=(T*b+x*w)/m,k=(-T*x+b*w)/m,M=A-v,O=S-y,R=E-v,C=k-y;return M*M+O*O>R*R+C*C&&(A=E,S=k),{cx:A,cy:S,x01:-l,y01:-h,x11:A*(r/_-1),y11:S*(r/_-1)}}function Od(){var t=wd,e=Ad,n=Jf(0),i=null,r=Sd,a=Ed,o=kd,s=null,u=Td(c);function c(){var c,l,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=r.apply(this,arguments)-Ul,g=a.apply(this,arguments)-Ul,p=Pl(g-d),v=g>d;if(s||(s=c=u()),f$l)if(p>Yl-$l)s.moveTo(f*Nl(d),f*jl(d)),s.arc(0,0,f,d,g,!v),h>$l&&(s.moveTo(h*Nl(g),h*jl(g)),s.arc(0,0,h,g,d,v));else{var y,x,b=d,m=g,_=d,T=g,w=p,A=p,S=o.apply(this,arguments)/2,E=S>$l&&(i?+i.apply(this,arguments):Bl(h*h+f*f)),k=zl(Pl(f-h)/2,+n.apply(this,arguments)),M=k,O=k;if(E>$l){var R=Vl(E/h*jl(S)),C=Vl(E/f*jl(S));(w-=2*R)>$l?(_+=R*=v?1:-1,T-=R):(w=0,_=T=(d+g)/2),(A-=2*C)>$l?(b+=C*=v?1:-1,m-=C):(A=0,b=m=(d+g)/2)}var I=f*Nl(b),L=f*jl(b),P=h*Nl(T),D=h*jl(T);if(k>$l){var N,F=f*Nl(m),z=f*jl(m),j=h*Nl(_),B=h*jl(_);if(p1?0:t<-1?Xl:Math.acos(t)}(($*U+X*Y)/(Bl($*$+X*X)*Bl(U*U+Y*Y)))/2),G=Bl(N[0]*N[0]+N[1]*N[1]);M=zl(k,(h-G)/(V-1)),O=zl(k,(f-G)/(V+1))}else M=O=0}A>$l?O>$l?(y=Md(j,B,I,L,f,O,v),x=Md(F,z,P,D,f,O,v),s.moveTo(y.cx+y.x01,y.cy+y.y01),O$l&&w>$l?M>$l?(y=Md(P,D,F,z,h,-M,v),x=Md(I,L,j,B,h,-M,v),s.lineTo(y.cx+y.x01,y.cy+y.y01),M0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(o[t],o[e])})),s=0,c=d?(y-f*b)/d:0;s0?h*c:0)+b,p[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:x};return p}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jf(+t),o):i},o.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jf(+t),o):r},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Jf(+t),o):a},o}().startAngle(o).endAngle(o+2*Math.PI).padAngle(s).value(function(e){var n=this;return a(this,t),e.values.reduce(function(t,e){return a(this,n),t+e.value}.bind(this),0)}.bind(this)).sort(e.getSortCompareFn.bind(e)(!0))},updateRadius:function(){var t=this,e=t.config,n=t.state,i=e[e.data_type+"_padding"],r=e.gauge_width||e.donut_width,a=t.filterTargetsToShow(t.data.targets).length*e.gauge_arcs_minWidth;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?.85:1),n.radius=.95*n.radiusExpanded,n.innerRadiusRatio=r?(n.radius-r)/n.radius:.6,n.gaugeArcWidth=r||(a<=n.radius-n.innerRadius?n.radius-n.innerRadius:a<=n.radius?a:n.radius);var o=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:o},getRadius:function(t){var e=null==t?void 0:t.data,n=this.state,i=n.innerRadius,r=n.outerRadius;return!Ya(i)&&e&&(i=i[e.id]||0),eo(r)&&e&&e.id in r?r=r[e.id]:Ya(r)||(r=this.state.radius),{innerRadius:i,outerRadius:r}},updateArc:function(){var t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength:function(){var t=3.6*this.config.gauge_arcLength,e=t/360*2;return t<-360?e=-2:t>360&&(e=2),e*Math.PI},getGaugeStartAngle:function(){var t=this.config,e=t.gauge_fullCircle,n=-1*Math.PI/2,i=Math.PI/2,r=t.gauge_startingAngle;return!e&&r<=n?r=n:!e&&r>=i?r=i:(r>Math.PI||r<-1*Math.PI)&&(r=Math.PI),r},updateAngle:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.pie,s=t,u=!1;if(!i)return null;var c=n.getGaugeStartAngle(),l=i.gauge_fullCircle?n.getArcLength():-2*c;if(s.data&&n.isGaugeType(s.data)&&!n.hasMultiArcGauge()){var h=i.gauge_min,f=i.gauge_max,d=n.getTotalDataSum(r.rendered);o=o.startAngle(c).endAngle(l*((d-h)/(f-h))+c)}if(o(n.filterTargetsToShow()).forEach(function(t,n){var i;a(this,e),u||t.data.id!==(null==(i=s.data)?void 0:i.id)||(u=!0,(s=t).index=n)}.bind(this)),isNaN(s.startAngle)&&(s.startAngle=0),isNaN(s.endAngle)&&(s.endAngle=s.startAngle),s.data&&n.hasMultiArcGauge()){var g=i.gauge_min,p=i.gauge_max,v=s.value1){var c,l=n.getRadius(t).outerRadius;n.hasType("polar")&&(l=n.getPolarOuterRadius(t,l));var h=this.svgArc.centroid(o).map(function(t){return a(this,e),isNaN(t)?0:t}.bind(this)),f=h[0],d=h[1],g=Math.sqrt(f*f+d*d),p=null==(c=["donut","pie","polar"].filter(n.hasType.bind(n)).map(function(t){return a(this,e),i[t+"_label_ratio"]}.bind(this)))?void 0:c[0];s="translate("+f*(p=p?Xa(p)?p.bind(n.api)(t,l,g):p:l&&(g?(36/l>.375?1.175-36/l:.8)*l/g:0))+","+d*p+")"}return s},convertToArcData:function(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function(t){var e=this,n=e.hasType("gauge");e.shouldShowArcLabel()&&t.style("fill",e.updateTextColor.bind(e)).attr("filter",e.updateTextBacgroundColor.bind(e)).each((function(t){var i,r=Rn(this),a=e.updateAngle(t),o=e.getRatio("arc",a);if(e.meetsLabelThreshold(o,null==(i=["donut","gauge","pie","polar"].filter(e.hasType.bind(e)))?void 0:i[0])){var s=(a||t).value;oo(r,(e.getArcLabelFormat()||e.defaultArcValueFormat)(s,o,t.data.id).toString(),[-1,1],n)}else r.text("")}))},expandArc:function(t){var e=this,n=this,i=n.state.transiting,r=n.$el;if(i)var o=setInterval(function(){a(this,e),i||(clearInterval(o),r.legend.selectAll("."+Go.legendItemFocused).size()>0&&n.expandArc(t))}.bind(this),10);else{var s=n.mapToTargetIds(t);r.svg.selectAll(n.selectorTargets(s,"."+Po.chartArc)).each((function(t){if(n.shouldExpand(t.data.id)){var e=n.getExpandConfig(t.data.id,"duration"),i=n.getSvgArcExpanded(n.getExpandConfig(t.data.id,"rate"));Rn(this).selectAll("path").transition().duration(e).attrTween("d",Cd(n.svgArcExpanded.bind(n))).transition().duration(2*e).attrTween("d",Cd(i.bind(n)))}}))}},unexpandArc:function(t){var e=this,n=this,i=n.state.transiting,r=n.$el.svg;if(!i){var o=n.mapToTargetIds(t);r.selectAll(n.selectorTargets(o,"."+Po.chartArc)).selectAll("path").transition().duration(function(t){return a(this,e),n.getExpandConfig(t.data.id,"duration")}.bind(this)).attrTween("d",Cd(n.svgArc.bind(n))),r.selectAll(""+Po.arc).style("opacity",null)}},getExpandConfig:function(t,e){var n,i=this,r=i.config;return i.isDonutType(t)?n="donut":i.isGaugeType(t)?n="gauge":i.isPieType(t)&&(n="pie"),n?r[n+"_expand_"+e]:{duration:50,rate:.98}[e]},shouldExpand:function(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function(){var t=this,e=this,n=e.config;return["donut","gauge","pie","polar"].some(function(i){return a(this,t),e.hasType(i)&&n[i+"_label_show"]}.bind(this))},getArcLabelFormat:function(){var t=this,e=this,n=e.config,i=function(e){return a(this,t),e}.bind(this);return["donut","gauge","pie","polar"].filter(e.hasType.bind(e)).forEach(function(e){a(this,t),i=n[e+"_label_format"]}.bind(this)),Xa(i)?i.bind(e.api):i},updateTargetsForArc:function(t){var e=this,n=this,i=n.$el,r=n.hasType("gauge"),o=n.getChartClass("Arc"),s=n.getClass("arcs",!0),u=n.classFocus.bind(n),c=i.main.select("."+Po.chartArcs),l=c.selectAll("."+Po.chartArc).data(n.pie(t)).attr("class",function(t){return a(this,e),o(t)+u(t.data)}.bind(this)),h=l.enter().append("g").attr("class",o).call(this.setCssRule(!1,"."+Po.chartArcs+" text",["pointer-events:none","text-anchor:middle"]));h.append("g").attr("class",s).merge(l),h.append("text").attr("dy",r&&!n.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor",n.getStylePropValue("middle")).style("pointer-events",n.getStylePropValue("none")),i.text=c.selectAll("."+Lo.target+" text")},initArc:function(){var t=this,e=t.$el;e.arcs=e.main.select("."+Lo.chart).append("g").attr("class",Po.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function(t){var e=this,n=t||e.getArcTitle(),i=e.hasType("gauge");if(n){var r=i?Xo.chartArcsGaugeTitle:Po.chartArcsTitle,a=e.$el.arcs.select("."+r);a.empty()&&(a=e.$el.arcs.append("text").attr("class",r).style("text-anchor","middle")),i&&a.attr("dy","-0.3em"),oo(a,n,i?void 0:[-.6,1.35],!0)}},getArcTitle:function(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config[e+"_title"]:""},getArcTitleWithNeedleValue:function(){var t=this,e=t.config,n=t.state,i=t.getArcTitle();if(i&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(i)){var r=n.current.needle;return Ya(r)||(r=e.arc_needle_value),Eo(i,{NEEDLE_VALUE:Ya(r)?r:0})}return!1},redrawArc:function(t,e,n){var i=this,r=this,o=r.config,s=r.state,u=r.$el.main,c=o.interaction_enabled,l=c&&o.data_selection_isselectable,h=u.selectAll("."+Po.arcs).selectAll("."+Po.arc).data(r.arcData.bind(r));h.exit().transition().duration(e).style("opacity","0").remove(),h=h.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",function(t){return a(this,i),r.color(t.data)}.bind(this)).style("cursor",function(t){return a(this,i),null!=l&&null!=l.bind&&l.bind(r.api)(t)?"pointer":null}.bind(this)).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=o.gauge_startingAngle,t.endAngle=o.gauge_startingAngle),this._current=t})).merge(h),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawMultiArcGauge()),h.attr("transform",function(t){return a(this,i),!r.isGaugeType(t.data)&&n?"scale(0)":""}.bind(this)).style("opacity",(function(t){return t===this._current?"0":null})).each(function(){a(this,i),s.transiting=!0}.bind(this)).transition().duration(t).attrTween("d",(function(t){var e=this,n=r.updateAngle(t);if(!n)return function(){return a(this,e),"M 0 0"}.bind(this);isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var i=Ki(this._current,n);return this._current=i(0),function(e){var n=i(e);return n.data=t.data,r.getArc(n,!0)}})).attr("transform",n?"scale(1)":"").style("fill",function(t){var e;return a(this,i),r.levelColor?(e=r.levelColor(t.data.values[0].value),o.data_colors[t.data.id]=e):e=r.color(t.data),e}.bind(this)).style("opacity",null).call(ro,(function(){if(r.levelColor){var t=Rn(this),e=t.datum(this._current);r.updateLegendItemColor(e.data.id,t.style("fill"))}s.transiting=!1,io(o.onrendered,r.api)})),c&&r.bindArcEvent(h),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),o.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t)},redrawNeedle:function(){var t=this,e=this,n=e.$el,i=e.config,r=e.state,o=r.hiddenTargetIds,s=(r.radius-1)/100*i.arc_needle_length,u=o.length!==e.data.targets.length,c=e.$el.arcs.select("."+Po.needle),l=i.arc_needle_path,h=i.arc_needle_bottom_width/2,f=i.arc_needle_top_width/2,d=i.arc_needle_top_rx,g=i.arc_needle_top_ry,p=i.arc_needle_bottom_len,v=i.arc_needle_bottom_rx,y=i.arc_needle_bottom_ry,x=e.getNeedleAngle(),b=function(){a(this,t);var n=e.getArcTitleWithNeedleValue();n&&e.setArcTitle(n)}.bind(this);if(b(),c.empty()&&(c=n.arcs.append("path").classed(Po.needle,!0),n.needle=c,n.needle.updateHelper=function(r,o){var s=this;void 0===o&&(o=!1),a(this,t),"none"!==n.needle.style("display")&&e.$T(n.needle).style("transform","rotate("+e.getNeedleAngle(r)+"deg)").call(ro,function(){a(this,s),o&&(i.arc_needle_value=r),b()}.bind(this))}.bind(this)),u){var m=Xa(l)?l.call(e,s):"M-"+h+" "+p+" A"+v+" "+y+" 0 0 0 "+h+" "+p+" L"+f+" -"+s+" A"+d+" "+g+" 0 0 0 -"+f+" -"+s+" L-"+h+" "+p+" Z";e.$T(c).attr("d",m).style("fill",i.arc_needle_color).style("display",null).style("transform","rotate("+x+"deg)")}else c.style("display","none")},getNeedleAngle:function(t){var e=this,n=e.config,i=e.state,r=e.getArcLength(),a=e.hasType("gauge"),o=e.getTotalDataSum(!0),s=Ga(t)?t:n.arc_needle_value,u=n[n.data_type+"_startingAngle"]||0,c=0;if(Ya(s)||(s=a&&1===e.data.targets.length?o:0),i.current.needle=s,a){u=e.getGaugeStartAngle();var l=n.gauge_fullCircle?r:-2*u,h=n.gauge_min;c=l*((s-h)/(n.gauge_max-h))}else c=r*(s/o);return(u+c)*(180/Math.PI)},redrawBackgroundArcs:function(){var t=this,e=this,n=e.config,i=e.state,r=e.hasMultiArcGauge(),o=n.gauge_fullCircle,s=0===e.filterTargetsToShow(e.data.targets).length&&!!n.data_empty_label_text,u=e.getGaugeStartAngle(),c=o?u+e.getArcLength():-1*u,l=e.$el.arcs.select((r?"g":"")+"."+Po.chartArcsBackground);if(r){var h=0;(l=l.selectAll("path."+Po.chartArcsBackground).data(e.data.targets)).enter().append("path").attr("class",function(e,n){return a(this,t),Po.chartArcsBackground+" "+Po.chartArcsBackground+"-"+n}.bind(this)).merge(l).style("fill",n.gauge_background||null).attr("d",function(r){var o=r.id;if(a(this,t),s||i.hiddenTargetIds.indexOf(o)>=0)return"M 0 0";var l={data:[{value:n.gauge_max}],startAngle:u,endAngle:c,index:h++};return e.getArc(l,!0,!0)}.bind(this)),l.exit().remove()}else l.attr("d",s?"M 0 0":function(){a(this,t);var i={data:[{value:n.gauge_max}],startAngle:u,endAngle:c};return e.getArc(i,!0,!0)}.bind(this))},bindArcEvent:function(t){var e=this,n=this,i=n.config,r=n.state,o="touch"===r.inputType,s="mouse"===r.inputType;function u(t,e,i){n.expandArc(i),n.api.focus(i),n.toggleFocusLegend(i,!0),n.showTooltip([e],t)}function c(t){var e=(null==t?void 0:t.id)||void 0;n.unexpandArc(e),n.api.revert(),n.revertLegend(),n.hideTooltip()}if(t.on("click",(function(t,e,r){var a,o=n.updateAngle(e);o&&(a=n.convertToArcData(o),null==n.toggleShape||n.toggleShape(this,a,r),i.data_onclick.bind(n.api)(a,this))})),s&&t.on("mouseover",(function(t,e){var i;if(!r.transiting){r.event=t;var a=n.updateAngle(e),o=a?n.convertToArcData(a):null;u(this,o,(null==(i=o)?void 0:i.id)||void 0),n.setOverOut(!0,o)}})).on("mouseout",function(t,i){if(a(this,e),!r.transiting){r.event=t;var o=n.updateAngle(i),s=o?n.convertToArcData(o):null;c(),n.setOverOut(!1,s)}}.bind(this)).on("mousemove",(function(t,e){var i=n.updateAngle(e),a=i?n.convertToArcData(i):null;r.event=t,n.showTooltip([a],this)})),o&&n.hasArcType()&&!n.radars){var l=function(t){a(this,e);var n=t.changedTouches[0];return Rn(zn.elementFromPoint(n.clientX,n.clientY))}.bind(this);n.$el.svg.on("touchstart touchmove",(function(t){var e,i;if(!r.transiting){r.event=t;var a=l(t).datum(),o=null!=(e=a)&&e.data&&a.data.id?n.updateAngle(a):null,s=o?n.convertToArcData(o):null,h=(null==(i=s)?void 0:i.id)||void 0;n.callOverOutForTouch(s),Va(h)?c():u(this,s,h)}}))}},redrawArcText:function(t){var e,n=this,i=this,r=i.config,o=i.state,s=i.$el,u=s.main,c=s.arcs,l=i.hasType("gauge"),h=i.hasMultiArcGauge();if(l&&1===i.data.targets.length&&r.gauge_title||(e=u.selectAll("."+Po.chartArc).select("text").style("opacity","0").attr("class",function(t){return a(this,n),i.isGaugeType(t.data)?Xo.gaugeValue:null}.bind(this)).call(i.textForArcLabel.bind(i)).attr("transform",i.transformForArcLabel.bind(i)).style("font-size",function(t){return a(this,n),i.isGaugeType(t.data)&&1===i.data.targets.length&&!h?Math.round(o.radius/5)+"px":null}.bind(this)).transition().duration(t).style("opacity",function(t){return a(this,n),i.isTargetToShow(t.data.id)&&i.isArcType(t.data)?null:"0"}.bind(this)),h&&e.attr("dy","-.1em")),u.select("."+Po.chartArcsTitle).style("opacity",i.hasType("donut")||l?null:"0"),l){var f,d=r.gauge_fullCircle;d&&(null==(f=e)||f.attr("dy",""+(h?0:Math.round(o.radius/14)))),r.gauge_label_show&&(c.select("."+Xo.chartArcsGaugeUnit).attr("dy",(d?1.5:.75)+"em").text(r.gauge_units),c.select("."+Xo.chartArcsGaugeMin).attr("dx",-1*(o.innerRadius+(o.radius-o.innerRadius)/(d?1:2))+"px").attr("dy","1.2em").text(i.textForGaugeMinMax(r.gauge_min,!1)),d||c.select("."+Xo.chartArcsGaugeMax).attr("dx",o.innerRadius+(o.radius-o.innerRadius)/2+"px").attr("dy","1.2em").text(i.textForGaugeMinMax(r.gauge_max,!0)))}},getArcElementByIdOrIndex:function(t){var e,n=this,i=this.$el.arcs,r=Ya(t)?function(e){return a(this,n),e.index===t}.bind(this):function(e){return a(this,n),e.data.id===t}.bind(this);return null==(e=i)?void 0:e.selectAll("."+Lo.target+" path").filter(r)}};function Ld(t){return t[0]}function Pd(t){return t[1]}function Dd(t,e){var n=Jf(!0),i=null,r=gh,a=null,o=Td(s);function s(s){var u,c,l,h=(s=Kf(s)).length,f=!1;for(null==i&&(a=r(l=o())),u=0;u<=h;++u)!(u=h;--f)s.point(y[f],x[f]);s.lineEnd(),s.areaEnd()}v&&(y[l]=+t(d,l,c),x[l]=+e(d,l,c),s.point(i?+i(d,l,c):y[l],n?+n(d,l,c):x[l]))}if(g)return s=null,g+""||null}function l(){return Dd().defined(r).curve(o).context(a)}return t="function"==typeof t?t:void 0===t?Ld:Jf(+t),e="function"==typeof e?e:Jf(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?Pd:Jf(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jf(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:Jf(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Jf(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Jf(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Jf(+t),c):n},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(n)},c.lineX1=function(){return l().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:Jf(!!t),c):r},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}();p=s?p.y(l).x0(h).x1(f):p.x(l).y0(r.area_above?0:r.area_below?i.state.height:h).y1(f),o||(p=p.defined(function(t){return a(this,e),null!==i.getBaseValue(t)}.bind(this))),i.isStepType(t)&&(c=i.convertValuesToStep(c)),u=p.curve(i.getCurve(t))(c)}else c[0]&&(d=i.scale.x(c[0].x),g=i.getYScaleById(t.id)(c[0].value)),u=s?"M "+g+" "+d:"M "+d+" "+g;return u||"M 0 0"}.bind(this)},generateGetAreaPoints:function(t,e){var n=this,i=n.config,r=n.getShapeX(0,t,e),a=n.getShapeY(!!e),o=n.getShapeOffset(n.isAreaType,t,e),s=n.getYScaleById.bind(n);return function(t,u){var c=s.call(n,t.id,e)(n.getShapeYMin(t.id)),l=o(t,u)||c,h=r(t),f=t.value,d=a(t);return i.axis_rotated&&(f>0&&d0?function(){return a(this,n),u}.bind(this):Ya(c)?function(t){return a(this,n),t*c}.bind(this):null;return function(t,e){a(this,n);var u=o(t,e),c=+s,h=+!c,f=t.value<0,d=r["axis_"+i.axis.getId(t.id)+"_inverted"],g=!d&&f||d&&!f,p=["",""],v=0,y=i.isGrouped(t.id),x=!(!l||!y)&&i.isStackingRadiusData(t);if(l){var b=s?h:c,m=u[2][b]-u[0][b],_="a"+(v=!y||x?l(m):0)+","+v+" "+(g?"1 0 0":"0 0 1")+" ";p[+!s]=""+_+v+","+v,p[+s]=""+_+[-v,v][s?"sort":"reverse"](),g&&p.reverse()}var T=s?"H"+(u[1][c]+(g?v:-v))+" "+p[0]+"V"+(u[2][h]-v)+" "+p[1]+"H"+u[3][c]:"V"+(u[1][h]+(g?-v:v))+" "+p[0]+"H"+(u[2][c]-v)+" "+p[1]+"V"+u[3][h];return"M"+u[0][c]+","+u[0][h]+T+"z"}.bind(this)},isStackingRadiusData:function(t){var e=this,n=this,i=n.$el,r=n.config,o=n.data,s=n.state,u=t.id,c=t.index,l=t.value;if(s.hiddenTargetIds.indexOf(u)>-1){var h=i.bar.filter(function(t){return a(this,e),t.id===u&&t.value===l}.bind(this));return!h.empty()&&/a\d+/i.test(h.attr("d"))}var f=r.data_groups.find(function(t){return a(this,e),t.indexOf(u)>-1}.bind(this)),d=n.orderTargets(n.filterTargetsToShow(o.targets.filter(n.isBarType,n))).filter(function(t){return a(this,e),f.indexOf(t.id)>-1}.bind(this)).map(function(t){var n=this;return a(this,e),t.values.filter(function(t){return a(this,n),t.index===c&&(Ya(l)&&l>0?t.value>0:t.value<0)}.bind(this))[0]}.bind(this)).filter(Boolean).map(function(t){return a(this,e),t.id}.bind(this));return 0!==l&&d.indexOf(u)===d.length-1},generateGetBarPoints:function(t,e){var n=this,i=this,r=i.config,o=e?i.axis.subX:i.axis.x,s=i.getIndicesMax(t)+1,u=i.getBarW("bar",o,s),c=i.getShapeX(u,t,!!e),l=i.getShapeY(!!e),h=i.getShapeOffset(i.isBarType,t,!!e),f=i.getYScaleById.bind(i);return function(t,o){a(this,n);var s=t.id,d=f.call(i,s,e)(i.getShapeYMin(s)),g=h(t,o)||d,p=Ya(u)?u:u[t.id]||u._$width,v=r["axis_"+i.axis.getId(s)+"_inverted"],y=t.value,x=c(t),b=l(t);r.axis_rotated&&!v&&(y>0&&b0&&x.start=e.open),e||null}},Bd={initGauge:function(){var t=this,e=this,n=e.config,i=e.$el.arcs,r=function(e){a(this,t),i.append("text").attr("class",e).style("text-anchor","middle").style("pointer-events","none")}.bind(this);if(e.hasType("gauge")){var o=e.hasMultiArcGauge();i.append(o?"g":"path").attr("class",Po.chartArcsBackground).style("fill",!o&&n.gauge_background||null),n.gauge_units&&r(Xo.chartArcsGaugeUnit),n.gauge_label_show&&(r(Xo.chartArcsGaugeMin),n.gauge_fullCircle||r(Xo.chartArcsGaugeMax))}},updateGaugeMax:function(){var t=this,e=t.config,n=t.state,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawMultiArcGauge:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el,o=e.state.hiddenTargetIds,s=r.main.selectAll("."+Po.arcs).selectAll("."+Po.arcLabelLine).data(e.arcData.bind(e));s.enter().append("rect").attr("class",function(e){return a(this,t),Po.arcLabelLine+" "+Lo.target+" "+Lo.target+"-"+e.data.id}.bind(this)).merge(s).style("fill",function(n){return a(this,t),e.levelColor?e.levelColor(n.data.values[0].value):e.color(n.data)}.bind(this)).style("display",n.gauge_label_show?null:"none").each((function(t){var n=0,r=0,a=0,s="";if(o.indexOf(t.data.id)<0){var u=e.updateAngle(t),c=i.gaugeArcWidth/e.filterTargetsToShow(e.data.targets).length*(u.index+1),l=u.endAngle-Math.PI/2,h=i.radius-c,f=l-(0===h?0:1/h);n=i.radiusExpanded-i.radius+c,r=Math.cos(f)*h,a=Math.sin(f)*h,s="rotate("+180*l/Math.PI+", "+r+", "+a+")"}Rn(this).attr("x",r).attr("y",a).attr("width",n).attr("height",2).attr("transform",s).style("stroke-dasharray","0, "+(n+2)+", 0")}))},textForGaugeMinMax:function(t,e){var n=this.config.gauge_label_extents;return Xa(n)?n.bind(this.api)(t,e):t},getGaugeLabelHeight:function(){var t=this.config;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge:function(){return this.getGaugeLabelHeight()*(this.config.gauge_label_show?2:2.5)}},$d={initBubble:function(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle")},getBaseLength:function(){var t=this,e=t.state,n=e.width,i=e.height,r=_s,a=t.cache.get(r);return a||t.cache.add(r,a=wo("min",[n,i])),a},getBubbleR:function(t){var e=this,n=this,i=n.config.bubble_maxR;Xa(i)?i=i.bind(n.api)(t):Ya(i)||(i=n.getBaseLength()/(2*n.getMaxDataCount())+12);var r=wo("max",n.getMinMaxData().max.map(function(t){return a(this,e),n.isBubbleZType(t)?n.getBubbleZData(t.value,"y"):eo(t.value)?t.value.mid:t.value}.bind(this))),o=i*i*Math.PI,s=(n.isBubbleZType(t)?n.getBubbleZData(t.value,"z"):t.value)*(o/r);return Math.sqrt(s/Math.PI)},getBubbleZData:function(t,e){return eo(t)?t[e]:t["y"===e?0:1]}},Xd={initLine:function(){var t=this.$el;t.line=t.main.select("."+Lo.chart).append("g").attr("class",Yo.chartLines).call(this.setCssRule(!1,"."+Yo.chartLines,["pointer-events:none"]))},updateTargetsForLine:function(t){var e=this,n=this,i=n.$el,r=i.area,o=i.line,s=i.main,u=n.getChartClass("Line"),c=n.getClass("lines",!0),l=n.classFocus.bind(n);o||n.initLine();var h=t.filter(function(t){return a(this,e),!(n.isScatterType(t)||n.isBubbleType(t))}.bind(this)),f=s.select("."+Yo.chartLines).selectAll("."+Yo.chartLine).data(h).attr("class",function(t){return a(this,e),u(t)+l(t)}.bind(this)),d=f.enter().append("g").attr("class",u).style("opacity","0").style("pointer-events",n.getStylePropValue("none"));if(d.append("g").attr("class",c),n.hasTypeOf("Area")){var g=(!r&&d.empty()?f:d).filter(n.isAreaType.bind(n));n.initArea(g)}n.updateTargetForCircle(h,d)},updateLine:function(t,e){var n=this;void 0===e&&(e=!1);var i=this,r=i.format.extraLineClasses,o=i.$el,s=i.$T,u=e?o.subchart:o,c=u.main.selectAll("."+Yo.lines).selectAll("."+Yo.line).data(i.lineData.bind(i));s(c.exit(),t).style("opacity","0").remove(),u.line=c.enter().append("path").attr("class",function(t){return a(this,n),i.getClass("line",!0)(t)+" "+(r(t)||"")}.bind(this)).style("stroke",i.color).merge(c).style("opacity",i.initialOpacity.bind(i)).attr("transform",null)},redrawLine:function(t,e,n){void 0===n&&(n=!1);var i=this.$el;return[(0,this.$T)((n?i.subchart:i).line,e,ho()).attr("d",t).style("stroke",this.color).style("opacity",null)]},getCurve:function(t){var e=this,n=this;return n.config.axis_rotated&&n.isStepType(t)?function(i){a(this,e);var r=n.getInterpolate(t)(i);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}.bind(this):n.getInterpolate(t)},generateDrawLine:function(t,e){var n=this,i=this,r=i.config,o=i.scale,s=r.line_connectNull,u=r.axis_rotated,c=i.generateGetLinePoints(t,e),l=i.getYScaleById.bind(i),h=function(t){return a(this,n),(e?i.subxx:i.xx).call(i,t)}.bind(this),f=function(t,r){return a(this,n),i.isGrouped(t.id)?c(t,r)[0][1]:l(t.id,e)(i.getBaseValue(t))}.bind(this),d=Dd();d=u?d.x(f).y(h):d.x(h).y(f),s||(d=d.defined(function(t){return a(this,n),null!==i.getBaseValue(t)}.bind(this)));var g=e?o.subX:o.x;return function(t){a(this,n);var c,h=l(t.id,e),f=s?i.filterRemoveNull(t.values):t.values,p=0,v=0;if(i.isLineType(t)){var y=r.data_regions[t.id];y?c=i.lineWithRegions(f,o.zoom||g,h,y):(i.isStepType(t)&&(f=i.convertValuesToStep(f)),c=d.curve(i.getCurve(t))(f))}else f[0]&&(p=g(f[0].x),v=h(f[0].value)),c=u?"M "+v+" "+p:"M "+p+" "+v;return c||"M 0 0"}.bind(this)},lineWithRegions:function(t,e,n,i){var r,o,s,u,c=this,l=this,h=l.config.axis_rotated,f=l.axis.isTimeSeries(),d=[];if(Ga(i))for(var g,p=function(t,e){return a(this,c),Va(t)?e:f?ko.call(l,t):t}.bind(this),v=0;g=i[v];v++){var y=p(g.start,t[0].x),x=p(g.end,t[t.length-1].x),b=g.style||{dasharray:"2 2"};d[v]={start:y,end:x,style:b}}for(var m,_=h?function(t){return a(this,c),n(t.value)}.bind(this):function(t){return a(this,c),e(t.x)}.bind(this),T=h?function(t){return a(this,c),e(t.x)}.bind(this):function(t){return a(this,c),n(t.value)}.bind(this),w=function(t){return a(this,c),"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]}.bind(this),A=f?function(t,i,r,u){a(this,c);var l=t.x.getTime(),f=i.x-t.x,d=new Date(l+f*r),g=new Date(l+f*(r+u)),p=h?[[n(o(r)),e(d)],[n(o(r+s)),e(g)]]:[[e(d),n(o(r))],[e(g),n(o(r+s))]];return w(p)}.bind(this):function(t,i,s,u){a(this,c);var l=h?[[n(o(s),!0),e(r(s))],[n(o(s+u),!0),e(r(s+u))]]:[[e(r(s),!0),n(o(s))],[e(r(s+u),!0),n(o(s+u))]];return w(l)}.bind(this),S={x:l.axis.getAxisType("x"),y:l.axis.getAxisType("y")},E="",k=0;m=t[k];k++){var M=t[k-1],O=M&&$a(M.value);b=l.isWithinRegions(m.x,d);if($a(m.value))if(!Va(d)&&b&&O){if(O){try{b=b.dasharray.split(" ")}catch(t){b="2 2".split(" ")}r=pl(S.x,M.x,m.x),o=pl(S.y,M.value,m.value);var R=e(m.x)-e(M.x),C=n(m.value)-n(M.value),I=Math.sqrt(Math.pow(R,2)+Math.pow(C,2));u=(s=b[0]/I)*b[1];for(var L=s;L<=1;L+=u)E+=A(M,m,L,s),L+u>=1&&(E+=A(M,m,1,0))}}else E+=(k&&O?"L":"M")+_(m)+","+T(m)}return E},isWithinRegions:function(t,e){for(var n,i=0;n=e[i];i++)if(n.start-1?"0":null})),u&&h.forEach(function(t){var e=this;a(this,n),s.main.selectAll("."+Jo.selectedCircles+i.getTargetSelectorSuffix(t.id)).selectAll(""+Jo.selectedCircle).each(function(n){a(this,e),n.value=t.values[n.index].value}.bind(this))}.bind(this))}},updateCircle:function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.config,r=n.state,o=n.$el,s=i.point_focus_only,u=t?o.subchart:o;if(i.point_show&&!r.toggling){var c=u.main.selectAll("."+jo.circles).selectAll("."+jo.circle).data(function(t){return a(this,e),n.isLineType(t)&&n.shouldDrawPointsForLine(t)||n.isBubbleType(t)||n.isRadarType(t)||n.isScatterType(t)?s?[t.values[0]]:t.values:[]}.bind(this));c.exit().remove(),c.enter().filter(Boolean).append(n.point("create",this,n.pointR.bind(n),n.getStylePropValue(n.color))),u.circle=u.main.selectAll("."+jo.circles+" ."+jo.circle).style("stroke",n.getStylePropValue(n.color)).style("opacity",n.initialOpacityForCircle.bind(n))}},redrawCircle:function(t,e,n,i,r){void 0===r&&(r=!1);var a=this,o=a.state.rendered,s=a.$el,u=a.$T,c=r?s.subchart:s,l=c.main.selectAll("."+Jo.selectedCircle);if(!a.config.point_show)return[];var h=a.point("update",a,t,e,a.getStylePropValue(a.color),n,i,l),f=a.isCirclePoint()?"c":"",d=ho(),g=a.opacityForCircle.bind(a),p=[];return c.circle.each((function(t){var e=h.bind(this)(t);e=u(e,n||!o,d).style("opacity",g),p.push(e)})),[p,u(l,n).attr(f+"x",t).attr(f+"y",e)]},showCircleFocus:function(t){var e=this,n=e.config,i=e.state,r=i.hasRadar,o=i.resizing,s=i.toggling,u=i.transiting,c=e.$el.circle;if(!1===u&&n.point_focus_only&&c){var l=(r?e.radarCircleX:e.circleX).bind(e),h=(r?e.radarCircleY:e.circleY).bind(e),f=s||Va(t),d=e.point("update",e,l,h,e.getStylePropValue(e.color),!o&&f);t&&(c=c.filter((function(e){var n=this,i=null==t.filter?void 0:t.filter(function(t){return a(this,n),t.id===e.id}.bind(this));return!!i.length&&Rn(this).datum(i[0])}))),c.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each((function(t){var n=t.id,i=t.index,r=t.value,a="hidden";$a(r)&&(d.bind(this)(t),e.expandCircles(i,n),a=""),this.style.visibility=a}))}},hideCircleFocus:function(){var t=this,e=t.config,n=t.$el.circle;e.point_focus_only&&n&&(t.unexpandCircles(),n.style("visibility","hidden"))},circleX:function(t){return this.xx(t)},updateCircleY:function(t){var e=this;void 0===t&&(t=!1);var n=this,i=n.generateGetLinePoints(n.getShapeIndices(n.isLineType),t);return function(r,o){a(this,e);var s=r.id;return n.isGrouped(s)?i(r,o)[0][1]:n.getYScaleById(s,t)(n.getBaseValue(r))}.bind(this)},expandCircles:function(t,e,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var a=i.getShapeByIndex("circle",t,e).classed(Lo.EXPANDED,!0),o=r(a)/i.config.point_r,s=1-o;i.isCirclePoint()?a.attr("r",r):a.each((function(){var t=Rn(this);if("circle"===this.tagName)t.attr("r",r);else{var e=this.getBBox(),n=e.width,i=e.height,a=s*(+t.attr("x")+n/2),u=s*(+t.attr("y")+i/2);t.attr("transform","translate("+a+" "+u+") scale("+o+")")}}))},unexpandCircles:function(t){var e=this,n=e.pointR.bind(e),i=e.getShapeByIndex("circle",t).filter((function(){return Rn(this).classed(Lo.EXPANDED)})).classed(Lo.EXPANDED,!1);if(i.attr("r",n),!e.isCirclePoint()){var r=n(i)/e.config.point_r;i.attr("transform",1!==r?"scale("+r+")":null)}},pointR:function(t){var e=this,n=e.config.point_r,i=n;return e.isBubbleType(t)?i=e.getBubbleR(t):Xa(n)&&(i=n.bind(e.api)(t)),t.r=i,i},pointExpandedR:function(t){var e=this,n=e.config,i=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*i:e.pointR(t)},pointSelectR:function(t){var e=this.config.point_select_r;return Xa(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function(t,e){var n=uo(this.state.event,t),i=Rn(t),r=this.isCirclePoint(t)?"c":"",a=+i.attr(r+"x"),o=+i.attr(r+"y");if(!a&&!o&&1===t.nodeType){var s=lo(t);a=s.x,o=s.y}return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<(e||this.config.point_sensitivity)},getPointSensitivity:function(t){var e=this.config.point_sensitivity;return Xa(e)?e=e.call(this.api,t):"radius"===e&&(e=t.r),e},insertPointInfoDefs:function(t,e){var n,i=this,r=function(t,e){a(this,i);for(var n,r=t.attributes,o=0;n=r[o];o++)n=n.name,e.setAttribute(n,t.getAttribute(n))}.bind(this),o=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,s=zn.createElementNS(Ce.svg,o.nodeName.toLowerCase());if(s.id=e,s.style.fill="inherit",s.style.stroke="inherit",r(o,s),null!=(n=o.childNodes)&&n.length){var u=Rn(s);"innerHTML"in s?u.html(o.innerHTML):yo(o.childNodes).forEach(function(t){a(this,i),r(t,u.append(t.tagName).node())}.bind(this))}this.$el.defs.node().appendChild(s)},pointFromDefs:function(t){return this.$el.defs.select("#"+t)},updatePointClass:function(t){var e=this,n=e.$el.circle,i=!1;return(eo(t)||n)&&(i=!0===t?n.each((function(t){var n=e.getClass("circle",!0)(t);this.getAttribute("class").indexOf(Lo.EXPANDED)>-1&&(n+=" "+Lo.EXPANDED),this.setAttribute("class",n)})):e.getClass("circle",!0)(t)),i},generateGetLinePoints:function(t,e){var n=this,i=this,r=i.config,o=i.getShapeX(0,t,e),s=i.getShapeY(e),u=i.getShapeOffset(i.isLineType,t,e),c=i.getYScaleById.bind(i);return function(t,l){a(this,n);var h=c.call(i,t.id,e)(i.getShapeYMin(t.id)),f=u(t,l)||h,d=o(t),g=s(t);r.axis_rotated&&(t.value>0&&g2?o-2:0),u=2;un&&(n=e),n}var Gd={initPolar:function(){var t=this,e=t.$el.arcs,n=t.config,i=n.polar_level_text_show,r=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",qo),i&&r&&t.generateDataLabelBackgroundColorFilter(r)},getPolarOuterRadius:function(t,e){var n,i=Vd(this);return(null!=(n=null==t?void 0:t.data.values[0].value)?n:0)/i*e},updateTargetsForPolar:function(t){this.updateTargetsForArc(t)},redrawPolar:function(){this.config.polar_level_show&&this.updatePolarLevel()},updatePolarLevel:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el.arcs.levels,o=n.polar_level_depth,s=Vd(e),u=Ao(0,o),c=i.radius,l=u.map(function(e){return a(this,t),c*((e+1)/o)}.bind(this)),h=(n.polar_level_text_format||function(){}).bind(e.api),f=r.selectAll("."+Wo).data(u);f.exit().remove();var d=f.enter().append("g").attr("class",function(e,n){return a(this,t),Wo+" "+Wo+"-"+n}.bind(this));if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",n.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",function(e){return a(this,t),l[e]}.bind(this)),n.polar_level_text_show){var g=n.polar_level_text_backgroundColor,p="#"+i.datetimeId+"-labels-bg"+e.getTargetSelectorSuffix(g);d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",function(e){return a(this,t),5-l[e]}.bind(this)).attr("filter",g?"url("+p+")":null).text(function(e){return a(this,t),h(s/u.length*(e+1))}.bind(this))}}};var Hd=ks,Wd={initRadar:function(){var t=this,e=t.config,n=t.state.current,i=t.$el;t.hasType("radar")&&(i.radar=i.main.select("."+Lo.chart).append("g").attr("class",Zo.chartRadars),i.radar.levels=i.radar.append("g").attr("class",qo),i.radar.axes=i.radar.append("g").attr("class",No.axis),i.radar.shapes=i.radar.append("g").attr("class",Qo.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function(){var t=this.config,e=this.state,n=e.arcWidth,i=e.arcHeight,r=t.axis_x_categories.length<4?-20:10,a=(Math.min(n,i)-r)/2;return[a,a]},updateTargetsForRadar:function(t){var e=this,n=this.config;Ja(n.axis_x_categories)&&(n.axis_x_categories=Ao(0,wo("max",t.map(function(t){return a(this,e),t.values.length}.bind(this))))),this.generateRadarPoints()},getRadarPosition:function(t,e,n,i){var r=this,o=this.config,s=this.getRadarSize(),u=s[0],c=s[1],l=o.axis_x_categories.length,h=o.radar_direction_clockwise,f=yo(t).map(function(s){return a(this,r),function(t,e,n,i,r,a){var o=t&&i>0?n-i:i,s=2*Math.PI;return r*(1-a*("x"===e?Math.sin:Math.cos)(o*s/n))}(h,s,l,e,Ga(n)?n:"x"===t?u:c,Ya(i)?i:o.radar_size_ratio)}.bind(this));return 1===f.length?f[0]:f},generateRadarPoints:function(){var t=this,e=this,n=e.data.targets,i=e.getRadarSize(),r=i[0],o=i[1],s=e.cache.get(Hd)||{},u=s._size;(!u||u.width!==r&&u.height!==o)&&(n.forEach(function(n){var i=this;a(this,t),s[n.id]=n.values.map(function(t,n){return a(this,i),e.getRadarPosition(["x","y"],n,void 0,e.getRatio("radar",t))}.bind(this))}.bind(this)),s._size={width:r,height:o},e.cache.add(Hd,s))},redrawRadar:function(){var t=this,e=t.$el,n=e.radar,i=e.main,r=t.getTranslate("radar");r&&(n.attr("transform",r),i.select("."+es.chartTexts).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints:function(){var t=this,e=this.cache.get(Hd);return function(n,i){a(this,t);var r=e[n.id][i];return[r,r,r,r]}.bind(this)},updateRadarLevel:function(){var t=this,e=this,n=e.config,i=e.state,r=e.$el.radar,o=e.getRadarSize(),s=o[0],u=o[1],c=n.radar_level_depth,l=n.axis_x_categories.length,h=n.radar_level_text_show,f=r.levels,d=Ao(0,c),g=n.radar_size_ratio*Math.min(s,u),p=d.map(function(e){return a(this,t),g*((e+1)/c)}.bind(this)),v=(n.radar_level_text_format||function(){}).bind(e.api),y=d.map(function(n){var i=this;a(this,t);var r=p[n];return Ao(0,l).map(function(t){return a(this,i),e.getRadarPosition(["x","y"],t,r,1).join(",")}.bind(this)).join(" ")}.bind(this)),x=f.selectAll("."+Wo).data(d);x.exit().remove();var b=x.enter().append("g").attr("class",function(e,n){return a(this,t),Wo+" "+Wo+"-"+n}.bind(this));b.append("polygon").style("visibility",n.radar_level_show?null:"hidden"),h&&(f.select("text").empty()&&f.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return a(this,t),v(0)}.bind(this)),b.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return a(this,t),v(i.current.dataMax/d.length*(e+1))}.bind(this))),b.merge(x).attr("transform",function(e){return a(this,t),"translate("+(s-p[e])+", "+(u-p[e])+")"}.bind(this)).selectAll("polygon").attr("points",function(e){return a(this,t),y[e]}.bind(this)),h&&f.selectAll("text").attr("x",function(e){return a(this,t),Va(e)?s:y[e].split(",")[0]}.bind(this)).attr("y",function(e){return a(this,t),Va(e)?u:0}.bind(this))},updateRadarAxes:function(){var t=this,e=this,n=e.config,i=e.$el.radar,r=e.getRadarSize(),o=r[0],s=r[1],u=n.axis_x_categories,c=i.axes.selectAll("g").data(u);c.exit().remove();var l=c.enter().append("g").attr("class",function(e,n){return a(this,t),No.axis+"-"+n}.bind(this));if(n.radar_axis_line_show&&l.append("line"),n.radar_axis_text_show&&l.append("text"),c=l.merge(c),n.radar_axis_line_show&&c.select("line").attr("x1",o).attr("y1",s).attr("x2",function(n,i){return a(this,t),e.getRadarPosition("x",i)}.bind(this)).attr("y2",function(n,i){return a(this,t),e.getRadarPosition("y",i)}.bind(this)),n.radar_axis_text_show){var h=n.radar_axis_text_position,f=h.x,d=void 0===f?0:f,g=h.y,p=void 0===g?0:g;c.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(e){a(this,t),e.each((function(t){oo(Rn(this),t+"",[-.6,1.2])}))}.bind(this)).datum(function(e,n){return a(this,t),{index:n}}.bind(this)).attr("transform",(function(t){Va(this.width)&&(this.width=this.getBoundingClientRect().width/2);var n=e.getRadarPosition("x",t.index,void 0,1),i=Math.round(e.getRadarPosition("y",t.index,void 0,1));return n>o?n+=this.width+d:Math.round(n)s?(i/2===s&&"tspan"===this.firstChild.tagName&&this.firstChild.setAttribute("dy","0em"),i+=p):if&&(f=s),v=l*l*p,(d=Math.max(f/v,v/h))>g){l-=s;break}g=d}y.push(o={value:l,dice:u1?e:1)},n}(Jd);function eg(t){if("function"!=typeof t)throw new Error;return t}function ng(){return 0}function ig(t){return function(){return t}}function rg(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function ag(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return og(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return og(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function og(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0;--a)u.push(i=r[a]=new yg(r[a])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(vg)}function dg(t){return t.children}function gg(t){return Array.isArray(t)?t[1]:null}function pg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function vg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function yg(t){this.data=t,this.depth=this.height=0,this.parent=null}function xg(t,e,n,i,r){var a,o,s=t.children,u=s.length,c=Array(u+1);for(c[0]=o=a=0;a=n-1){var l=s[e];return l.x0=r,l.y0=a,l.x1=o,void(l.y1=u)}var h=c[e],f=i/2+h,d=e+1,g=n-1;for(;d>>1;c[p]u-a){var x=i?(r*y+o*v)/i:o;t(e,d,v,r,a,x,u),t(d,n,y,x,a,o,u)}else{var b=i?(a*y+u*v)/i:u;t(e,d,v,r,a,o,b),t(d,n,y,r,b,o,u)}}(0,u,t.value,e,n,i,r)}function bg(t,e,n,i,r){(1&t.depth?Kd:Zd)(t,e,n,i,r)}yg.prototype=fg.prototype=(cg={constructor:yg,count:function(){return this.eachAfter(rg)},each:function(t,e){for(var n,i=-1,r=ag(this);!(n=r()).done;){var a=n.value;t.call(e,a,++i,this)}return this},eachAfter:function(t,e){for(var n,i,r,a=this,o=[a],s=[],u=-1;a=o.pop();)if(s.push(a),n=a.children)for(i=0,r=n.length;i=0;--i)a.push(n[i]);return this},find:function(t,e){for(var n,i=-1,r=sg(this);!(n=r()).done;){var a=n.value;if(t.call(e,a,++i,this))return a}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop(),e=i.pop();for(;t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)e=e.parent,i.push(e);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return fg(this).eachBefore(pg)}},cg[Symbol.iterator]=hg,cg);var mg=function t(e){function n(t,n,i,r,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,u,c,l,h=-1,f=o.length,d=t.value;++h1?e:1)},n}(Jd);function _g(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Tg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tg(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Tg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0,g=!n||n.indexOf(h)>=0,p=o.classed(Jo.SELECTED);o.classed(Yo.line)||o.classed(Do.area)||(t?d&&g&&u(a)&&!p?f(!0,o.classed(Jo.SELECTED,!0),a,h):Ga(i)&&i&&p&&f(!1,o.classed(Jo.SELECTED,!1),a,h):d&&g&&u(a)&&p&&f(!1,o.classed(Jo.SELECTED,!1),a,h))}))}var lp={selected:function(t){var e=this,n=this.internal,i=[];return n.$el.main.selectAll("."+(Qo.shapes+n.getTargetSelectorSuffix(t))).selectAll("."+Qo.shape).filter((function(){return Rn(this).classed(Jo.SELECTED)})).each(function(t){return a(this,e),i.push(t)}.bind(this)),i},select:function(t,e,n){var i=this.internal;cp.bind(i)(!0,t,e,n)},unselect:function(t,e){var n=this.internal;cp.bind(n)(!1,t,e)}},hp={subchart:{show:function(){var t=this.internal,e=t.$el.subchart,n=t.config,i=n.subchart_show;if(!i){var r,a;t.unbindZoomEvent(),n.subchart_show=!i,e.main||t.initSubchart();var o,s=e.main.selectAll("."+Lo.target);if(t.data.targets.length!==s.size())t.updateSizes(),t.updateTargetsForSubchart(t.data.targets),s=null==(o=e.main)?void 0:o.selectAll("."+Lo.target);null==(r=s)||r.style("opacity",null),null==(a=e.main)||a.style("display",null),this.resize()}},hide:function(){var t=this.internal,e=t.$el.subchart.main,n=t.config;n.subchart_show&&"none"!==(null==e?void 0:e.style("display"))&&(n.subchart_show=!1,e.style("display","none"),this.resize())},toggle:function(){var t=this.internal.config;this.subchart[t.subchart_show?"hide":"show"]()}}};function fp(t){return((t=Math.exp(t))+1/t)/2}var dp=function t(e,n,i){function r(t,r){var a,o,s=t[0],u=t[1],c=t[2],l=r[0],h=r[1],f=r[2],d=l-s,g=h-u,p=d*d+g*g;if(p<1e-12)o=Math.log(f/c)/e,a=function(t){return[s+t*d,u+t*g,c*Math.exp(e*t*o)]};else{var v=Math.sqrt(p),y=(f*f-c*c+i*p)/(2*c*n*v),x=(f*f-c*c-i*p)/(2*f*n*v),b=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(x*x+1)-x);o=(m-b)/e,a=function(t){var i=t*o,r=fp(b),a=c/(n*v)*(r*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*i+b)-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[s+a*d,u+a*g,c*r/fp(e*i+b)]}}return a.duration=1e3*o*e/Math.SQRT2,a}return r.rho=function(e){var n=Math.max(.001,+e),i=n*n;return t(n,i,i*i)},r}(Math.SQRT2,2,4),gp=function(t){var e=this;return a(this,undefined),function(){return a(this,e),t}.bind(this)}.bind(void 0);function pp(t,e){var n=e.sourceEvent,i=e.target,r=e.transform,a=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function vp(t,e,n){this.k=t,this.x=e,this.y=n}vp.prototype={constructor:vp,scale:function(t){return 1===t?this:new vp(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new vp(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var yp=new vp(1,0,0);function xp(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yp;return t.__zoom}function bp(t){t.stopImmediatePropagation()}function mp(t){t.preventDefault(),t.stopImmediatePropagation()}function _p(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Tp(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function wp(){return this.__zoom||yp}function Ap(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Sp(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ep(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}xp.prototype=vp.prototype;var kp=function(t){var e=this,n=this.internal,i=n.$el,r=n.axis,o=n.config,s=n.org,u=n.scale,c=o.axis_rotated,l=o.axis_x_inverted,h=r.isCategorized(),f=t;if(o.zoom_enabled&&f){r.isTimeSeries()&&(f=f.map(function(t){return a(this,e),ko.bind(n)(t)}.bind(this)));var d=function(t,e,n,i){var r=this;void 0===i&&(i=!1);var o=n[0],s=n[1];return t.every(function(n,u){var c=this;return a(this,r),(0===u?i?+n<=o:+n>=o:i?+n>=s:+n<=s)&&!t.every(function(t,n){return a(this,c),t===e[n]}.bind(this))}.bind(this))}(f,n.getZoomDomain(!0),n.getZoomDomain(),l);if(d){if(h&&(f=f.map(function(t,n){return a(this,e),+t+(0===n?0:1)}.bind(this))),n.api.tooltip.hide(),o.subchart_show){var g=u.zoom||u.x;n.brush.getSelection().call(n.brush.move,f.map(g))}else{var p,v=h?u.x.orgScale():s.xScale||u.x,y=[-v(f[0]),0],x=(p=yp.scale(v.range()[1]/(v(f[1])-v(f[0])))).translate.apply(p,c?y.reverse():y);i.eventRect.call(n.zoom.transform,x)}n.setZoomResetButton()}}else f=u.zoom?u.zoom.domain():u.x.orgDomain();return f};po(kp,{enable:function(t){var e=this.internal,n=e.config;/^(drag|wheel)$/.test(t)&&(n.zoom_type=t),n.zoom_enabled=!!t,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_max=wo("max",[i[1],t])),n.zoom_x_max},min:function(t){var e=this.internal,n=e.config,i=e.org.xDomain;return(0===t||t)&&(n.zoom_x_min=wo("min",[i[0],t])),n.zoom_x_min},range:function(t){var e=this.zoom;if(eo(t)){var n=t.min,i=t.max;Ga(n)&&e.min(n),Ga(i)&&e.max(i)}return{min:e.min(),max:e.max()}}});var Mp={zoom:kp,unzoom:function(){var t=this.internal,e=t.config,n=t.$el,i=n.eventRect,r=n.zoomResetBtn;t.scale.zoom&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(yp),t.updateZoom(!0),null==r||r.style("display","none"),xp(i.node())!==yp&&t.zoom.transform(i,yp))}},Op={drag:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.main,s=i.data_selection_grouped,u=i.interaction_enabled&&i.data_selection_isselectable;if(!n.hasArcType()&&i.data_selection_enabled&&(!i.zoom_enabled||n.zoom.altDomain)&&i.data_selection_multiple){var c=r.dragStart||[0,0],l=c[0],h=c[1],f=t[0],d=t[1],g=Math.min(l,f),p=Math.max(l,f),v=s?r.margin.top:Math.min(h,d),y=s?r.height:Math.max(h,d);o.select("."+$o.dragarea).attr("x",g).attr("y",v).attr("width",p-g).attr("height",y-v),o.selectAll("."+Qo.shapes).selectAll("."+Qo.shape).filter(function(t){return a(this,e),null==u?void 0:u.bind(n.api)(t)}.bind(this)).each((function(t,e){var i,r=Rn(this),a=r.classed(Jo.SELECTED),o=r.classed($o.INCLUDED),s=!1;if(r.classed(jo.circle)){var u=1*+r.attr("cx"),c=1*+r.attr("cy");i=n.togglePoint,s=g0?n:i]}.bind(this))),u&&o[1].reverse(),this.extent(o),this.update()},i.brush.getSelection=function(){return a(this,n),s.main?s.main.select("."+as.brush):Rn([])}.bind(this)},initSubchart:function(){var t=this,e=this,n=e.config,i=e.state,r=i.clip,o=i.hasAxis,s=e.$el,u=s.defs,c=s.svg,l=s.subchart,h=s.axis;if(o){var f=n.subchart_show?null:"hidden",d=r.id+"-subchart",g=e.getClipPath(d);r.idSubchart=d,e.appendClip(u,d),e.initBrush(),l.main=c.append("g").classed(as.subchart,!0).attr("transform",e.getTranslate("context"));var p=l.main;p.style("visibility",f),p.append("g").attr("clip-path",g).attr("class",as.chart),["bar","line","bubble","candlestick","scatter"].forEach(function(n){a(this,t);var i=vo(/^(bubble|scatter)$/.test(n)?"circle":n);if(e.hasType(n)||e.hasTypeOf(i)){var r=p.select("."+as.chart),o=as["chart"+i+"s"];r.select("."+o).empty()&&r.append("g").attr("class",o)}}.bind(this));var v=p.append("g").attr("clip-path",g).attr("class",as.brush).call(e.brush);n.subchart_showHandle&&e.addBrushHandle(v),h.subX=p.append("g").attr("class",as.axisX).attr("transform",e.getTranslate("subX")).attr("clip-path",n.axis_rotated?"":r.pathXAxis).style("visibility",n.subchart_axis_x_show?f:"hidden")}},addBrushHandle:function(t){var e=this,n=this.config,i=n.axis_rotated,r=n.subchart_init_range,o=i?["M 5.2491724,29.749209 a 6,6 0 0 0 -5.50000003,-6.5 H -5.7508276 a 6,6 0 0 0 -6.0000004,6.5 z m -5.00000003,-2 H -6.7508276 m 6.99999997,-2 H -6.7508276Z","M 5.2491724,23.249172 a 6,-6 0 0 1 -5.50000003,6.5 H -5.7508276 a 6,-6 0 0 1 -6.0000004,-6.5 z m -5.00000003,2 H -6.7508276 m 6.99999997,2 H -6.7508276Z"]:["M 0 18 A 6 6 0 0 0 -6.5 23.5 V 29 A 6 6 0 0 0 0 35 Z M -2 23 V 30 M -4 23 V 30Z","M 0 18 A 6 6 0 0 1 6.5 23.5 V 29 A 6 6 0 0 1 0 35 Z M 2 23 V 30 M 4 23 V 30Z"];this.brush.handle=t.selectAll(".handle--custom").data(i?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class","handle--custom").attr("cursor",(i?"ns":"ew")+"-resize").attr("d",function(t){return a(this,e),o[+/[se]/.test(t.type)]}.bind(this)).attr("display",r?null:"none")},updateTargetsForSubchart:function(t){var e=this,n=this,i=n.config,r=n.state,o=n.$el.subchart.main;i.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(function(t){return a(this,e),n.hasType(t)||n.hasTypeOf(vo(t))}.bind(this)).forEach(function(i){a(this,e);var r=/^(bubble|scatter)$/.test(i),s=vo(r?"circle":i),u=n.getChartClass(s,!0),c=n.getClass(r?"circles":i+"s",!0),l=o.select("."+as["chart"+s+"s"]);if(r){var h=l.selectAll("."+as.circles).data(t.filter(n["is"+vo(i)+"Type"].bind(n))).attr("class",c);h.exit().remove(),h.enter().append("g").attr("class",c)}else{var f=l.selectAll("."+as["chart"+s]).attr("class",u).data(t.filter(n["is"+s+"Type"].bind(n))),d=f.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",c);f.exit().remove(),"line"===i&&n.hasTypeOf("Area")&&d.append("g").attr("class",n.getClass("areas",!0))}}.bind(this)),o.selectAll("."+as.brush+" rect").attr(i.axis_rotated?"width":"height",i.axis_rotated?r.width2:r.height2))},redrawSubchart:function(t,e,n){var i,r=this,o=this,s=o.config,u=o.$el.subchart.main,c=o.state,l=!!e;if((u.style("visibility",s.subchart_show?null:"hidden"),s.subchart_show)&&("zoom"===(null==(i=c.event)?void 0:i.type)&&o.brush.update(),t)){var h=s.subchart_init_range;if(go(o)||o.brush.update(),Object.keys(n.type).forEach(function(t){a(this,r);var e=vo(t),i=o["generateDraw"+e](n.indices[t],!0);o["update"+e](l,!0),o["redraw"+e](i,l,!0)}.bind(this)),o.hasType("bubble")||o.hasType("scatter")){var f=n.pos.cx,d=o.updateCircleY(!0);o.updateCircle(!0),o.redrawCircle(f,d,l,void 0,!0)}!c.rendered&&h&&o.brush.move(o.brush.getSelection(),h.map(o.scale.x))}},redrawForBrush:function(){var t=this,e=t.config,n=e.subchart_onbrush,i=e.zoom_rescale,r=t.scale;t.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),n.bind(t.api)(r.x.orgDomain())},transformContext:function(t,e){var n=this,i=n.$el.subchart,r=n.$T,a=null!=e&&e.axisSubX?e.axisSubX:r(i.main.select("."+as.axisX),t);i.main.attr("transform",n.getTranslate("context")),a.attr("transform",n.getTranslate("subX"))},getExtent:function(){var t=this,e=this,n=e.config,i=e.scale,r=n.axis_x_extent;if(r)if(Xa(r))r=r.bind(e.api)(e.getXDomain(e.data.targets),i.subX);else if(e.axis.isTimeSeries()&&r.every(isNaN)){var o=ko.bind(e);r=r.map(function(e){return a(this,t),i.subX(o(e))}.bind(this))}return r}},Pp={initZoom:function(){var t=this;t.scale.zoom=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function(t){void 0===t&&(t=!0);var e=this,n=e.config;n.zoom_enabled&&t?n.subchart_show||e.bindZoomOnEventRect():!1===t&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom:function(){var t=this,e=this,n=e.config,i=e.org,r=e.scale,o=function(){var t,e,n,i=_p,r=Tp,a=Ep,o=Ap,s=Sp,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,h=dp,f=Kn("start","zoom","end"),d=0,g=10;function p(t){t.property("__zoom",wp).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new vp(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new vp(t.k,i,r)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,e,n,i){t.on("start.zoom",(function(){m(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,a=arguments,o=m(t,a).event(i),s=r.apply(t,a),u=null==n?x(s):"function"==typeof n?n.apply(t,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=h(l.invert(u).concat(c/l.k),f.invert(u).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=c/e[2];t=new vp(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=r.apply(t,e),this.taps=0}function T(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r1?e-1:0),o=1;od}u.event(t).zoom("mouse",a(y(u.that.__zoom,u.mouse[0]=Vn(t,s),u.mouse[1]),u.extent,c))}),!0).on("mouseup.zoom",(function(t){l.on("mousemove.zoom mouseup.zoom",null),ii(t.view,u.moved),mp(t),u.event(t).end()}),!0),h=Vn(t,s),f=t.clientX,g=t.clientY;ni(t.view),bp(t),u.mouse=[h,this.__zoom.invert(h)],Rr(this),u.start()}}function A(t){for(var e=arguments.length,n=Array(e>1?e-1:0),o=1;o0?Rn(this).transition().duration(l).call(b,d,u,t):Rn(this).call(p.transform,d,u,t)}}function S(n){for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o1?e-1:0),i=1;i1?i-1:0),a=1;a-1&&1===(null==u?void 0:u.touches.length))){t.sourceEvent&&(o.zooming=!0);var l="mousemove"===(null==u?void 0:u.type),h=(null==u?void 0:u.wheelDelta)<0,f=t.transform;!l&&h&&r.x.domain().every(function(t,n){return a(this,e),t!==s.xDomain[n]}.bind(this))&&r.x.domain(s.xDomain),n.zoom.updateTransformScale(f,"wheel"===i.zoom_type&&u);var d=i.transition_duration>0&&!i.subchart_show&&(o.dragging||c||!t.sourceEvent);n.redraw({withTransition:d,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n.state.cancelClick=l,c||io(i.zoom_onzoom,n.api,n.zoom.getDomain())}},onZoomEnd:function(t){var e,n,i=this,r=i.config,a=i.state,o=i.zoom.startEvent,s=null==t?void 0:t.sourceEvent,u=(null==t?void 0:t.transform)===yp;(null==(e=o)?void 0:e.type.indexOf("touch"))>-1&&(o=o.changedTouches[0],s=null==(n=s)||null==(n=n.changedTouches)?void 0:n[0]);"drag"===r.zoom_type&&s&&o.clientX===s.clientX&&o.clientY===s.clientY||(i.redrawEventRect(),i.updateZoom(),a.zooming=!1,!u&&(s||a.dragging)&&io(r.zoom_onzoomend,i.api,i.zoom.getDomain()))},updateZoom:function(t){var e=this,n=e.scale,i=n.subX,r=n.x,a=n.zoom;if(a){var o=a.domain(),s=i.domain(),u=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+u>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+u):(o[0]<=s[0]||o[0]-u<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-u);(t||c)&&(e.axis.x.scale(i),r.domain(i.orgDomain()),e.scale.zoom=null)}},bindZoomOnEventRect:function(){var t=this,e=this,n=e.config,i=e.$el.eventRect,r="drag"===n.zoom_type?e.zoomBehaviour:e.zoom;e.$el.svg.on("wheel",function(){a(this,t)}.bind(this)),i.call(r).on("dblclick.zoom",null)},initZoomBehaviour:function(){var t,e=this,n=this,i=n.config,r=n.state,o=i.axis_rotated,s=0,u=0,c={axis:o?"y":"x",attr:o?"height":"width",index:o?1:0};n.zoomBehaviour=du().clickDistance(4).on("start",(function(e){r.event=e,n.setDragStatus(!0),n.unselectRect(),t||(t=n.$el.main.append("rect").attr("clip-path",r.clip.path).attr("class",rs.zoomBrush).attr("width",o?r.width:0).attr("height",o?0:r.height)),s=uo(e,this)[c.index],u=s,t.attr(c.axis,s).attr(c.attr,0),n.onZoomStart(e)})).on("drag",(function(e){u=uo(e,this)[c.index],t.attr(c.axis,Math.min(s,u)).attr(c.attr,Math.abs(u-s))})).on("end",function(i){var o=this;a(this,e);var l=n.scale.zoom||n.scale.x;if(r.event=i,t.attr(c.axis,0).attr(c.attr,0),s>u){var h=[u,s];s=h[0],u=h[1]}s<0&&(u+=Math.abs(s),s=0),s!==u&&n.api.zoom([s,u].map(function(t){return a(this,o),l.invert(t)}.bind(this))),n.setDragStatus(!1)}.bind(this))},setZoomResetButton:function(){var t=this,e=t.config,n=t.$el,i=e.zoom_resetButton;i&&"drag"===e.zoom_type&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Lo.button,!0).append("span").on("click",(function(){Xa(i.onclick)&&i.onclick.bind(t.api)(this),t.api.unzoom()})).classed(rs.buttonZoomReset,!0).text(i.text||"Reset Zoom"))}},Dp=void 0,Np={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return a(this,Dp),!0}.bind(void 0),data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:function(){a(this,Dp)}.bind(void 0),data_onunselected:function(){a(this,Dp)}.bind(void 0)},Fp={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:function(){a(this,undefined)}.bind(void 0)},zp={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0},jp=void 0,Bp=function(){var t=this;return a(this,jp),po(Ch.prototype,Ip),po(Hh.prototype,lp),ms.setOptions([Np]),(Bp=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),$p=function(){var t=this;return a(this,jp),po(Ch.prototype,Lp),po(Hh.prototype,hp),ms.setOptions([Fp]),($p=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),Xp=function(){var t=this;return a(this,jp),po(Ch.prototype,Pp),po(Hh.prototype,Mp),ms.setOptions([zp]),(Xp=function(){return a(this,t),!0}.bind(this))()}.bind(void 0),Up={},Yp={version:"3.9.2-nightly-20230808003859",generate:function(t){var e=_o({},Up,t),n=new Hh(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(t){return eo(t)&&(Up=t),Up},instance:[],plugin:{}},Vp=void 0;Object.keys(i).forEach(function(t){return a(this,Vp),i[t]()}.bind(void 0)),Object.keys(r).forEach(function(t){return a(this,Vp),r[t]()}.bind(void 0))},function(t,e,n){var i=n(528)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){var i=n(529).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=r=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof p?e:p,a=Object.create(r.prototype),s=new M(i||[]);return o(a,"_invoke",{value:A(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g={};function p(){}function v(){}function y(){}var x={};h(x,u,(function(){return this}));var b=Object.getPrototypeOf,m=b&&b(b(O([])));m&&m!==n&&a.call(m,u)&&(x=m);var _=y.prototype=p.prototype=Object.create(x);function T(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(r,o,s,u){var c=d(t[r],t,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==i(h)&&a.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var r;o(this,"_invoke",{value:function(t,i){function a(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(a,a):a()}})}function A(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return{value:void 0,done:!0}}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=S(o,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var u=d(t,e,n);if("normal"===u.type){if(i=n.done?"completed":"suspendedYield",u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i="completed",n.method="throw",n.arg=u.arg)}}}function S(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var r=d(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t||""===t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--i){var r=this.tryEntries[i],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=a.call(r,"catchLoc"),u=a.call(r,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&a.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),g}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}],e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var a=e[i]={exports:{}};return t[i].call(a.exports,a,a.exports,n),a.exports}return n.d=function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(0),n(526)}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-bubblecompare.js b/dist/plugin/billboardjs-plugin-bubblecompare.js index 832481417..18011a71f 100644 --- a/dist/plugin/billboardjs-plugin-bubblecompare.js +++ b/dist/plugin/billboardjs-plugin-bubblecompare.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -186,7 +186,7 @@ var Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.2-nightly-20230805003715"; +Plugin.version = "3.9.2-nightly-20230808003859"; ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts diff --git a/dist/plugin/billboardjs-plugin-bubblecompare.min.js b/dist/plugin/billboardjs-plugin-bubblecompare.min.js index 0b0c052ec..3f37922b9 100644 --- a/dist/plugin/billboardjs-plugin-bubblecompare.min.js +++ b/dist/plugin/billboardjs-plugin-bubblecompare.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.9.2-nightly-20230805003715";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}i.d(r,{default:function(){return u}});var o=i(1),s=function(){function e(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var n=e.prototype;return n.$beforeInit=function(){},n.$init=function(){},n.$afterInit=function(){},n.$redraw=function(){},n.$willDestroy=function(){var e=this;Object.keys(this).forEach(function(n){t(this,e),this[n]=null,delete this[n]}.bind(this))},e}();s.version="3.9.2-nightly-20230808003859";var u=function(i){var r,s;function u(t){var n=i.call(this,t)||this;return n.$$=void 0,e(n)||e(n)}s=i,(r=u).prototype=Object.create(s.prototype),r.prototype.constructor=r,n(r,s);var a=u.prototype;return a.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},a.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,o.select)(t.node().parentNode.parentNode).raise()},a.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},a.findClosest=function(e,n){var i=this,r=this.$$;return e.filter(function(e){return t(this,i),e&&!r.isBarType(e.id)}.bind(this)).reduce(function(e,o){return t(this,i),r.dist(o,n)0&&c===a?0:s/c;return Math.abs(f)*(o-r)+r},a.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(s);u.version="0.0.1"}(),r=r.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-sparkline.js b/dist/plugin/billboardjs-plugin-sparkline.js index 34a8728f6..e2f03aa57 100644 --- a/dist/plugin/billboardjs-plugin-sparkline.js +++ b/dist/plugin/billboardjs-plugin-sparkline.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -401,7 +401,7 @@ var Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.2-nightly-20230805003715"; +Plugin.version = "3.9.2-nightly-20230808003859"; ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-sparkline.min.js b/dist/plugin/billboardjs-plugin-sparkline.min.js index b211f7cdf..654f86a31 100644 --- a/dist/plugin/billboardjs-plugin-sparkline.min.js +++ b/dist/plugin/billboardjs-plugin-sparkline.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function a(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t,n=1;n1?i-1:0),o=1;o0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(e,t,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-t/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var e,t=this.$$.$el;t.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(e=t.tooltip)?void 0:e.node())&&document.body.appendChild(t.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(t){var n=this;void 0===t&&(t=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(t?"add":"remove")+"EventListener";this.element.forEach(function(t){e(this,n);var i=t.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,i=this.$$,r=i.getDataIndexFromEvent(e),o=null==(t=i.api.data(e.target.__id))?void 0:t[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=e,i.config.point_focus_only&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.config.point_focus_only?t.hideCircleFocus():t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var t,n=this,i=this.$$,r=i.$el,o=this.element,s=i.api.data(),a=null==(t=r.chart.html().match(/]*>/))?void 0:t[0];if(o.length0;b--)c.parentNode.insertBefore(o[0].cloneNode(),c.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(t){return e(this,n),t.id}.bind(this)).forEach(function(t,i){e(this,n);var s="."+l.target+"-"+t,c=r.main.selectAll(s),b=o[i].querySelector("svg");b||(o[i].innerHTML=a+"",(b=o[i].querySelector("svg")).__id=t),b.querySelector(s)||c.style("opacity",null),c.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(c.node())}.bind(this))},a.$willDestroy=function(){var t=this;this.bindEvents(!1),this.element.forEach(function(n){e(this,t),n.innerHTML=""}.bind(this))},s}(u);A.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function r(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e,t){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},n(e,t)}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function a(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t,n=1;n1?i-1:0),o=1;o0}.bind(this);i(n.axis_x_padding)&&(n.axis_x_padding={left:15,right:15,unit:"px"}),i(n.axis_y_padding)&&(n.axis_y_padding=5)}n.axis_y_show=!1,n.tooltip_position||(n.tooltip_position=function(e,t,n){var i=this.internal.state.event,r=i.pageY-1.35*n,o=i.pageX-t/2;return r<0&&(r=0),o<0&&(o=0),{top:r,left:o}})},a.$init=function(){var e,t=this.$$.$el;t.chart.style("width","0").style("height","0").style("pointer-events","none"),(null==(e=t.tooltip)?void 0:e.node())&&document.body.appendChild(t.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(t){var n=this;void 0===t&&(t=!0);var i=this.$$.config;if(i.interaction_enabled&&i.tooltip_show){var r=(t?"add":"remove")+"EventListener";this.element.forEach(function(t){e(this,n);var i=t.querySelector("svg");i[r]("mouseover",this.overHandler),i[r]("mousemove",this.moveHandler),i[r]("mouseout",this.outHandler)}.bind(this))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,i=this.$$,r=i.getDataIndexFromEvent(e),o=null==(t=i.api.data(e.target.__id))?void 0:t[0],s=null==o||null==(n=o.values)?void 0:n[r];s&&!s.name&&(s.name=s.id),i.state.event=e,i.config.point_focus_only&&s&&(null==i.showCircleFocus||i.showCircleFocus([s])),i.setExpand(r,o.id,!0),i.showTooltip([s],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.config.point_focus_only?t.hideCircleFocus():t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var t,n=this,i=this.$$,r=i.$el,o=this.element,s=i.api.data(),a=null==(t=r.chart.html().match(/]*>/))?void 0:t[0];if(o.length0;b--)c.parentNode.insertBefore(o[0].cloneNode(),c.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}s.map(function(t){return e(this,n),t.id}.bind(this)).forEach(function(t,i){e(this,n);var s="."+l.target+"-"+t,c=r.main.selectAll(s),b=o[i].querySelector("svg");b||(o[i].innerHTML=a+"",(b=o[i].querySelector("svg")).__id=t),b.querySelector(s)||c.style("opacity",null),c.style("fill","none").style("opacity",null),b.innerHTML="",b.appendChild(c.node())}.bind(this))},a.$willDestroy=function(){var t=this;this.bindEvents(!1),this.element.forEach(function(n){e(this,t),n.innerHTML=""}.bind(this))},s}(u);A.version="0.0.1"}(),o=o.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-stanford.js b/dist/plugin/billboardjs-plugin-stanford.js index c797e0201..e5d6a62e7 100644 --- a/dist/plugin/billboardjs-plugin-stanford.js +++ b/dist/plugin/billboardjs-plugin-stanford.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -1393,7 +1393,7 @@ var Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.2-nightly-20230805003715"; +Plugin.version = "3.9.2-nightly-20230808003859"; ;// CONCATENATED MODULE: ./src/Plugin/stanford/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-stanford.min.js b/dist/plugin/billboardjs-plugin-stanford.min.js index 31e3f9bb7..3538c3241 100644 --- a/dist/plugin/billboardjs-plugin-stanford.min.js +++ b/dist/plugin/billboardjs-plugin-stanford.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,i,n,r,o,a){return function(){"use strict";var s=[,function(t){t.exports=n},,function(t){t.exports=r},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=i},function(t){t.exports=o},function(t){t.exports=a}],c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var i=c[t]={exports:{}};return s[t](i,i.exports,l),i.exports}l.d=function(t,e){for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}l.d(b,{default:function(){return K}});var n=l(5),r=l(6),o=l(7);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function c(t,e,i){return(e=s(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function d(t){for(var e,i=1;i1?n-1:0),o=1;oe.epochs?1:0}function V(t){for(var e,i=function(t){for(var e,i,n=0,r=0,o=t.length,a=o-1;r';return i.forEach(function(e){t(this,a);var i=e.id,l=void 0===i?"":i,b=e.value,u=void 0===b?0:b,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="\n\t\t\t\t\t\t\t"+(s||"")+'\n\t\t\t\t\t\t\t'+n(void 0===p?"":p)+"\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t"+e.id+'\n\t\t\t\t\t\t\t'+r(u)+'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEpochs\n\t\t\t\t\t\t\t'+r(f)+"\n\t\t\t\t\t\t"}.bind(this)),c+""})},b.countEpochsInRegion=function(e){var i=this,n=this.data.targets[0],r=n.values.reduce(function(e,n){return t(this,i),e+ +n.epochs}.bind(this),0),o=n.values.reduce(function(n,r){return t(this,i),function(t,e){for(var i=t.x,n=t.value,r=!1,o=0,a=e.length-1;on!=b>n&&i<(l-s)*(n-c)/(b-c)+s&&(r=!r)}return r}(r,e)?n+ +r.epochs:n}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(q)}(),b=b.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):"function"==typeof define&&define.amd?define("bb",["d3-interpolate","d3-color","d3-scale","d3-selection","d3-brush","d3-axis","d3-format"],e):"object"==typeof exports?exports.bb=e(require("d3-interpolate"),require("d3-color"),require("d3-scale"),require("d3-selection"),require("d3-brush"),require("d3-axis"),require("d3-format")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.stanford=e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3))}(this,(function(t,e,i,n,r,o,a){return function(){"use strict";var s=[,function(t){t.exports=n},,function(t){t.exports=r},,function(e){e.exports=t},function(t){t.exports=e},function(t){t.exports=i},function(t){t.exports=o},function(t){t.exports=a}],c={};function l(t){var e=c[t];if(void 0!==e)return e.exports;var i=c[t]={exports:{}};return s[t](i,i.exports,l),i.exports}l.d=function(t,e){for(var i in e)l.o(e,i)&&!l.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var b={};return function(){function t(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}l.d(b,{default:function(){return K}});var n=l(5),r=l(6),o=l(7);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function c(t,e,i){return(e=s(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function d(t){for(var e,i=1;i1?n-1:0),o=1;oe.epochs?1:0}function V(t){for(var e,i=function(t){for(var e,i,n=0,r=0,o=t.length,a=o-1;r';return i.forEach(function(e){t(this,a);var i=e.id,l=void 0===i?"":i,b=e.value,u=void 0===b?0:b,d=e.epochs,f=void 0===d?0:d,p=e.x;c+="\n\t\t\t\t\t\t\t"+(s||"")+'\n\t\t\t\t\t\t\t'+n(void 0===p?"":p)+"\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t"+e.id+'\n\t\t\t\t\t\t\t'+r(u)+'\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEpochs\n\t\t\t\t\t\t\t'+r(f)+"\n\t\t\t\t\t\t"}.bind(this)),c+""})},b.countEpochsInRegion=function(e){var i=this,n=this.data.targets[0],r=n.values.reduce(function(e,n){return t(this,i),e+ +n.epochs}.bind(this),0),o=n.values.reduce(function(n,r){return t(this,i),function(t,e){for(var i=t.x,n=t.value,r=!1,o=0,a=e.length-1;on!=b>n&&i<(l-s)*(n-c)/(b-c)+s&&(r=!r)}return r}(r,e)?n+ +r.epochs:n}.bind(this),0);return{value:o,percentage:0!==o?+(o/r*100).toFixed(1):0}},l}(q)}(),b=b.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-tableview.js b/dist/plugin/billboardjs-plugin-tableview.js index e8cea7aa8..04957d024 100644 --- a/dist/plugin/billboardjs-plugin-tableview.js +++ b/dist/plugin/billboardjs-plugin-tableview.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -236,7 +236,7 @@ var Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.2-nightly-20230805003715"; +Plugin.version = "3.9.2-nightly-20230808003859"; ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-tableview.min.js b/dist/plugin/billboardjs-plugin-tableview.min.js index 8721cf4ef..50b0b1fd7 100644 --- a/dist/plugin/billboardjs-plugin-tableview.min.js +++ b/dist/plugin/billboardjs-plugin-tableview.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=[,function(e){e.exports=t},,function(t){t.exports=e}],i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,n,i){return(n=e(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}o.d(r,{default:function(){return B}});var u=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){i(this,t),this[e]=null,delete this[e]}.bind(this))},t}();u.version="3.9.2-nightly-20230805003715";var s=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){var e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}},l="__tableview-style__",f="bb-tableview",b=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",d="{=title}\n\t\t{=thead}\n\t\t{=tbody}",h='{=title}',v='{=value}',p="{=value}",y=(o(1),o(3),void 0),g=function(){return i(this,y),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),m="function"==typeof g.requestAnimationFrame,w="function"==typeof g.requestIdleCallback,O=m?g.requestAnimationFrame:function(t){return i(this,y),setTimeout(t,1)}.bind(void 0),j=m?g.cancelAnimationFrame:function(t){return i(this,y),clearTimeout(t)}.bind(void 0),E=(w&&g.requestIdleCallback,w&&g.cancelIdleCallback,null==g?void 0:g.document),T=void 0;(function(t){return i(this,T),t||0===t}).bind(void 0),function(t){return i(this,T),"function"==typeof t}.bind(void 0);var $=function(t){return i(this,T),"string"==typeof t}.bind(void 0),x=function(t){return i(this,T),"number"==typeof t}.bind(void 0),S=function(t){return i(this,T),void 0===t}.bind(void 0),P=function(t){return i(this,T),void 0!==t}.bind(void 0),C=(function(t){return i(this,T),"boolean"==typeof t}.bind(void 0),function(t){return i(this,T),10*Math.ceil(t/10)}.bind(void 0),function(t){return i(this,T),Math.ceil(t)+.5}.bind(void 0),function(t){return i(this,T),t[1]-t[0]}.bind(void 0),function(t){return i(this,T),"object"==typeof t}.bind(void 0)),k=function(t){return i(this,T),S(t)||null===t||$(t)&&0===t.length||C(t)&&!(t instanceof Date)&&0===Object.keys(t).length||x(t)&&isNaN(t)}.bind(void 0),M=(function(t){return i(this,T),!k(t)}.bind(void 0),function(t){return i(this,T),Array.isArray(t)}.bind(void 0)),_=function(t){return i(this,T),t&&!(null!=t&&t.nodeType)&&C(t)&&!M(t)}.bind(void 0);(function(t){return i(this,T),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return i(this,T),[].slice.call(t)}).bind(void 0);function q(t){for(var e=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r"+e.map(function(t,e){return i(this,o),A(e?p:v,{value:0===e?n.categoryFormat.bind(this)(t):x(t)?t.toLocaleString():""})}.bind(this)).join("")+""}.bind(this));var s=A(d,I(I({},n),{},{title:n.title||e.config.title_text||"",thead:c,tbody:a})).replace(/<[^>]+><\/[^>]+>/g,"");o.innerHTML=s},r.$redraw=function(){var t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},r.$willDestroy=function(){if(this.element.parentNode.removeChild(this.element),1===this.$$.charts.length){var t,e=document.getElementById(l);null==e||null==(t=e.parentNode)||t.removeChild(e)}},o}(u)}(),r=r.default}()})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],e):"object"==typeof exports?exports.bb=e(require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.tableview=e(t.d3,t.d3))}(this,(function(t,e){return function(){"use strict";var n=[,function(e){e.exports=t},,function(t){t.exports=e}],i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,o),r.exports}o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,n||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===t(n)?n:String(n)}function n(t,n,i){return(n=e(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function i(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}o.d(r,{default:function(){return B}});var u=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach(function(e){i(this,t),this[e]=null,delete this[e]}.bind(this))},t}();u.version="3.9.2-nightly-20230808003859";var s=function(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){var e=t;return this.$$.axis.isCategorized()?e=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(e=t.toLocaleDateString()),e},class:void 0,style:!0,title:void 0,updateOnToggle:!0}},l="__tableview-style__",f="bb-tableview",b=".bb-tableview {\n\t\tborder-collapse:collapse;\n\t\tborder-spacing:0;\n\t\tbackground:#fff;\n\t\tmin-width:100%;\n\t\tmargin-top:10px;\n\t\tfont-family:sans-serif;\n\t\tfont-size:.9em;\n\t}\n\t.bb-tableview tr:hover {\n\t\tbackground:#eef7ff;\n\t}\n\t.bb-tableview thead tr {\n\t\tbackground:#f8f8f8;\n\t}\n\t.bb-tableview caption,.bb-tableview td,.bb-tableview th {\n\t\ttext-align: center;\n\t\tborder:1px solid silver;\n\t\tpadding:.5em;\n\t}\n\t.bb-tableview caption {\n\t\tfont-size:1.1em;\n\t\tfont-weight:700;\n\t\tmargin-bottom: -1px;\n\t}",d="{=title}\n\t\t{=thead}\n\t\t{=tbody}",h='{=title}',v='{=value}',p="{=value}",y=(o(1),o(3),void 0),g=function(){return i(this,y),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),m="function"==typeof g.requestAnimationFrame,w="function"==typeof g.requestIdleCallback,O=m?g.requestAnimationFrame:function(t){return i(this,y),setTimeout(t,1)}.bind(void 0),j=m?g.cancelAnimationFrame:function(t){return i(this,y),clearTimeout(t)}.bind(void 0),E=(w&&g.requestIdleCallback,w&&g.cancelIdleCallback,null==g?void 0:g.document),T=void 0;(function(t){return i(this,T),t||0===t}).bind(void 0),function(t){return i(this,T),"function"==typeof t}.bind(void 0);var $=function(t){return i(this,T),"string"==typeof t}.bind(void 0),x=function(t){return i(this,T),"number"==typeof t}.bind(void 0),S=function(t){return i(this,T),void 0===t}.bind(void 0),P=function(t){return i(this,T),void 0!==t}.bind(void 0),C=(function(t){return i(this,T),"boolean"==typeof t}.bind(void 0),function(t){return i(this,T),10*Math.ceil(t/10)}.bind(void 0),function(t){return i(this,T),Math.ceil(t)+.5}.bind(void 0),function(t){return i(this,T),t[1]-t[0]}.bind(void 0),function(t){return i(this,T),"object"==typeof t}.bind(void 0)),k=function(t){return i(this,T),S(t)||null===t||$(t)&&0===t.length||C(t)&&!(t instanceof Date)&&0===Object.keys(t).length||x(t)&&isNaN(t)}.bind(void 0),M=(function(t){return i(this,T),!k(t)}.bind(void 0),function(t){return i(this,T),Array.isArray(t)}.bind(void 0)),_=function(t){return i(this,T),t&&!(null!=t&&t.nodeType)&&C(t)&&!M(t)}.bind(void 0);(function(t){return i(this,T),t.charAt(0).toUpperCase()+t.slice(1)}).bind(void 0);(function(t){return i(this,T),[].slice.call(t)}).bind(void 0);function q(t){for(var e=this,n=arguments.length,o=Array(n>1?n-1:0),r=1;r"+e.map(function(t,e){return i(this,o),A(e?p:v,{value:0===e?n.categoryFormat.bind(this)(t):x(t)?t.toLocaleString():""})}.bind(this)).join("")+""}.bind(this));var s=A(d,I(I({},n),{},{title:n.title||e.config.title_text||"",thead:c,tbody:a})).replace(/<[^>]+><\/[^>]+>/g,"");o.innerHTML=s},r.$redraw=function(){var t=this.$$.state;t.resizing||!this.config.updateOnToggle&&t.toggling||this.generateTable()},r.$willDestroy=function(){if(this.element.parentNode.removeChild(this.element),1===this.$$.charts.length){var t,e=document.getElementById(l);null==e||null==(t=e.parentNode)||t.removeChild(e)}},o}(u)}(),r=r.default}()})); \ No newline at end of file diff --git a/dist/plugin/billboardjs-plugin-textoverlap.js b/dist/plugin/billboardjs-plugin-textoverlap.js index 227f556f9..8fad7016d 100644 --- a/dist/plugin/billboardjs-plugin-textoverlap.js +++ b/dist/plugin/billboardjs-plugin-textoverlap.js @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ @@ -1210,7 +1210,7 @@ var Plugin = /*#__PURE__*/function () { }; return Plugin; }(); -Plugin.version = "3.9.2-nightly-20230805003715"; +Plugin.version = "3.9.2-nightly-20230808003859"; ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/Options.ts /** diff --git a/dist/plugin/billboardjs-plugin-textoverlap.min.js b/dist/plugin/billboardjs-plugin-textoverlap.min.js index 658ff3726..70214674f 100644 --- a/dist/plugin/billboardjs-plugin-textoverlap.min.js +++ b/dist/plugin/billboardjs-plugin-textoverlap.min.js @@ -5,8 +5,8 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 * @requires billboard.js * @summary billboard.js plugin */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-selection","d3-brush"],n):"object"==typeof exports?exports.bb=n(require("d3-delaunay"),require("d3-polygon"),require("d3-selection"),require("d3-brush")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.textoverlap=n(t.d3,t.d3,t.d3,t.d3))}(this,(function(t,n,e,i){return function(){"use strict";var o={3:function(t){t.exports=i},12:function(n){n.exports=t},13:function(t){t.exports=n},1:function(t){t.exports=e}},r={};function u(t){var n=r[t];if(void 0!==n)return n.exports;var e=r[t]={exports:{}};return o[t](e,e.exports,u),e.exports}u.d=function(t,n){for(var e in n)u.o(n,e)&&!u.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},u.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)};var s={};return function(){function t(t,n){if(t!==n)throw new TypeError("Cannot instantiate an arrow function")}function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},e(t,n)}u.d(s,{default:function(){return M}});var i=u(12),o=u(13);u(1),u(3);var r=void 0,c=function(){return t(this,r),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")()}.bind(void 0)(),a="function"==typeof c.requestAnimationFrame,d="function"==typeof c.requestIdleCallback,l=a?c.requestAnimationFrame:function(n){return t(this,r),setTimeout(n,1)}.bind(void 0),f=a?c.cancelAnimationFrame:function(n){return t(this,r),clearTimeout(n)}.bind(void 0),h=(d&&c.requestIdleCallback,d&&c.cancelIdleCallback,null==c?void 0:c.document),b=void 0;(function(n){return t(this,b),n||0===n}).bind(void 0),function(n){return t(this,b),"function"==typeof n}.bind(void 0);var v=function(n){return t(this,b),"string"==typeof n}.bind(void 0),p=function(n){return t(this,b),"number"==typeof n}.bind(void 0),y=function(n){return t(this,b),void 0===n}.bind(void 0),g=function(n){return t(this,b),void 0!==n}.bind(void 0),m=(function(n){return t(this,b),"boolean"==typeof n}.bind(void 0),function(n){return t(this,b),10*Math.ceil(n/10)}.bind(void 0),function(n){return t(this,b),Math.ceil(n)+.5}.bind(void 0),function(n){return t(this,b),n[1]-n[0]}.bind(void 0),function(n){return t(this,b),"object"==typeof n}.bind(void 0)),j=function(n){return t(this,b),y(n)||null===n||v(n)&&0===n.length||m(n)&&!(n instanceof Date)&&0===Object.keys(n).length||p(n)&&isNaN(n)}.bind(void 0),x=(function(n){return t(this,b),!j(n)}.bind(void 0),function(n){return t(this,b),Array.isArray(n)}.bind(void 0)),O=function(n){return t(this,b),n&&!(null!=n&&n.nodeType)&&m(n)&&!x(n)}.bind(void 0);(function(n){return t(this,b),n.charAt(0).toUpperCase()+n.slice(1)}).bind(void 0);(function(n){return t(this,b),[].slice.call(n)}).bind(void 0);function w(n){for(var e=this,i=arguments.length,o=Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;rspan,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-line{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file + * @version 3.9.2-nightly-20230808003859 + */.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;font-size:11px;line-height:1}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-font-smoothing:antialiased;fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{stroke-width:.7px}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:.7px}.bb-circle{fill:#fff!important}.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:1px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;stroke-dasharray:1 20;transform:translate(7px,1px)}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{-webkit-font-smoothing:antialiased;background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{background-color:#0b00b1;border-bottom:2px solid #ff2d2d;color:#fffdfd;font-size:13px;padding:2px 8px;text-align:left}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-line{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file diff --git a/dist/theme/graph.css b/dist/theme/graph.css index 8aeeb8be6..fec4b372f 100644 --- a/dist/theme/graph.css +++ b/dist/theme/graph.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ /*-- Graph Theme --*/ /*-- Default color pattern --*/ @@ -110,11 +110,12 @@ rect.bb-circle._expanded_, use.bb-circle._expanded_ { opacity: .05 !important; } /*-- Region --*/ -.bb-region { +.bb-region rect { fill: steelblue; fill-opacity: 0.1; } - .bb-region.selected rect { - fill: #27c903; } + +.bb-region.selected rect { + fill: #27c903; } /*-- Zoom region --*/ .bb-zoom-brush { diff --git a/dist/theme/graph.min.css b/dist/theme/graph.min.css index 1a194313a..9e8061019 100644 --- a/dist/theme/graph.min.css +++ b/dist/theme/graph.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 - */.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px} \ No newline at end of file + * @version 3.9.2-nightly-20230808003859 + */.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px} \ No newline at end of file diff --git a/dist/theme/insight.css b/dist/theme/insight.css index 843edb7f1..b1c9d7373 100644 --- a/dist/theme/insight.css +++ b/dist/theme/insight.css @@ -5,7 +5,7 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 + * @version 3.9.2-nightly-20230808003859 */ /*-- Insight Theme --*/ /*-- Default color pattern --*/ @@ -110,11 +110,12 @@ rect.bb-circle._expanded_, use.bb-circle._expanded_ { opacity: .05 !important; } /*-- Region --*/ -.bb-region { +.bb-region rect { fill: steelblue; fill-opacity: 0.1; } - .bb-region.selected rect { - fill: #27c903; } + +.bb-region.selected rect { + fill: #27c903; } /*-- Zoom region --*/ .bb-zoom-brush { diff --git a/dist/theme/insight.min.css b/dist/theme/insight.min.css index b2146c4eb..e666fef34 100644 --- a/dist/theme/insight.min.css +++ b/dist/theme/insight.min.css @@ -5,5 +5,5 @@ * billboard.js, JavaScript chart library * https://naver.github.io/billboard.js/ * - * @version 3.9.2-nightly-20230805003715 - */.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file + * @version 3.9.2-nightly-20230808003859 + */.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region rect{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file